@aurodesignsystem-dev/auro-formkit 0.0.0-pr740.2 → 0.0.0-pr740.3
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/components/bibtemplate/dist/auro-bibtemplate.d.ts +0 -6
- package/components/bibtemplate/dist/index.js +1 -26
- package/components/bibtemplate/dist/registered.js +1 -26
- package/components/combobox/demo/api.min.js +59 -26
- package/components/combobox/demo/index.min.js +59 -26
- package/components/combobox/dist/index.js +59 -26
- package/components/combobox/dist/registered.js +59 -26
- package/components/counter/demo/api.min.js +59 -26
- package/components/counter/demo/index.min.js +59 -26
- package/components/counter/dist/index.js +59 -26
- package/components/counter/dist/registered.js +59 -26
- package/components/datepicker/demo/api.min.js +59 -26
- package/components/datepicker/demo/index.min.js +59 -26
- package/components/datepicker/dist/index.js +59 -26
- package/components/datepicker/dist/registered.js +59 -26
- package/components/dropdown/demo/api.min.js +58 -0
- package/components/dropdown/demo/index.min.js +58 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts +6 -0
- package/components/dropdown/dist/index.js +58 -0
- package/components/dropdown/dist/registered.js +58 -0
- package/components/select/demo/api.min.js +59 -26
- package/components/select/demo/index.min.js +59 -26
- package/components/select/dist/index.js +59 -26
- package/components/select/dist/registered.js +59 -26
- package/package.json +1 -1
|
@@ -32,12 +32,6 @@ export class AuroBibtemplate extends LitElement {
|
|
|
32
32
|
* @private
|
|
33
33
|
*/
|
|
34
34
|
private buttonTag;
|
|
35
|
-
/**
|
|
36
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
37
|
-
* @param {Event} event - The touchmove event.
|
|
38
|
-
* @returns {void}
|
|
39
|
-
*/
|
|
40
|
-
preventBodyScroll(event: Event): void;
|
|
41
35
|
onCloseButtonClick(): void;
|
|
42
36
|
/**
|
|
43
37
|
* Exposes CSS parts for styling from parent components.
|
|
@@ -1840,31 +1840,6 @@ class AuroBibtemplate extends LitElement {
|
|
|
1840
1840
|
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
1841
1841
|
}
|
|
1842
1842
|
|
|
1843
|
-
/**
|
|
1844
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
1845
|
-
* @param {Event} event - The touchmove event.
|
|
1846
|
-
* @returns {void}
|
|
1847
|
-
*/
|
|
1848
|
-
preventBodyScroll(event) {
|
|
1849
|
-
if (event.target === this) {
|
|
1850
|
-
event.preventDefault();
|
|
1851
|
-
event.stopImmediatePropagation();
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
connectedCallback() {
|
|
1856
|
-
super.connectedCallback();
|
|
1857
|
-
|
|
1858
|
-
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
1859
|
-
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
disconnectedCallback() {
|
|
1863
|
-
super.disconnectedCallback();
|
|
1864
|
-
|
|
1865
|
-
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
1843
|
onCloseButtonClick() {
|
|
1869
1844
|
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
1870
1845
|
composed: true }));
|
|
@@ -1893,7 +1868,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
1893
1868
|
// function that renders the HTML and CSS into the scope of the component
|
|
1894
1869
|
render() {
|
|
1895
1870
|
return html$1`
|
|
1896
|
-
<div id="bibTemplate" part="bibtemplate"
|
|
1871
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
1897
1872
|
${this.isFullscreen ? html$1`
|
|
1898
1873
|
<div id="headerContainer">
|
|
1899
1874
|
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
@@ -1840,31 +1840,6 @@ class AuroBibtemplate extends LitElement {
|
|
|
1840
1840
|
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
1841
1841
|
}
|
|
1842
1842
|
|
|
1843
|
-
/**
|
|
1844
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
1845
|
-
* @param {Event} event - The touchmove event.
|
|
1846
|
-
* @returns {void}
|
|
1847
|
-
*/
|
|
1848
|
-
preventBodyScroll(event) {
|
|
1849
|
-
if (event.target === this) {
|
|
1850
|
-
event.preventDefault();
|
|
1851
|
-
event.stopImmediatePropagation();
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
connectedCallback() {
|
|
1856
|
-
super.connectedCallback();
|
|
1857
|
-
|
|
1858
|
-
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
1859
|
-
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
disconnectedCallback() {
|
|
1863
|
-
super.disconnectedCallback();
|
|
1864
|
-
|
|
1865
|
-
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
1843
|
onCloseButtonClick() {
|
|
1869
1844
|
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
1870
1845
|
composed: true }));
|
|
@@ -1893,7 +1868,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
1893
1868
|
// function that renders the HTML and CSS into the scope of the component
|
|
1894
1869
|
render() {
|
|
1895
1870
|
return html$1`
|
|
1896
|
-
<div id="bibTemplate" part="bibtemplate"
|
|
1871
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
1897
1872
|
${this.isFullscreen ? html$1`
|
|
1898
1873
|
<div id="headerContainer">
|
|
1899
1874
|
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
@@ -3927,6 +3927,10 @@ class AuroDropdownBib extends i$2 {
|
|
|
3927
3927
|
connectedCallback() {
|
|
3928
3928
|
super.connectedCallback();
|
|
3929
3929
|
|
|
3930
|
+
this.addEventListener('touchstart', this.preventBodyScroll);
|
|
3931
|
+
this.addEventListener('touchmove', this.preventBodyScroll);
|
|
3932
|
+
|
|
3933
|
+
|
|
3930
3934
|
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3931
3935
|
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3932
3936
|
const bibTemplate = event.detail.element;
|
|
@@ -3956,6 +3960,60 @@ class AuroDropdownBib extends i$2 {
|
|
|
3956
3960
|
}));
|
|
3957
3961
|
}
|
|
3958
3962
|
|
|
3963
|
+
/**
|
|
3964
|
+
* Prevents scrolling of the body when touching empty areas of the component.
|
|
3965
|
+
* @param {Event} event - The touchmove event.
|
|
3966
|
+
* @returns {void}
|
|
3967
|
+
*/
|
|
3968
|
+
preventBodyScroll(event) {
|
|
3969
|
+
function checkIfDecent(target, parent) {
|
|
3970
|
+
if (!parent.tagName || "text,svg".includes(parent.tagName.toLowerCase())) {
|
|
3971
|
+
return false;
|
|
3972
|
+
}
|
|
3973
|
+
|
|
3974
|
+
if (parent.tagName.toLowerCase() === 'slot') {
|
|
3975
|
+
const assignedElements = parent.assignedElements();
|
|
3976
|
+
if (assignedElements) {
|
|
3977
|
+
for (const child of assignedElements) {
|
|
3978
|
+
if (checkIfDecent(target, child)) {
|
|
3979
|
+
return true;
|
|
3980
|
+
}
|
|
3981
|
+
}
|
|
3982
|
+
}
|
|
3983
|
+
return false;
|
|
3984
|
+
}
|
|
3985
|
+
|
|
3986
|
+
if (target === parent || parent.contains(target)) {
|
|
3987
|
+
return true;
|
|
3988
|
+
}
|
|
3989
|
+
|
|
3990
|
+
if (parent.shadowRoot && checkIfDecent(target, parent.shadowRoot)) {
|
|
3991
|
+
return true;
|
|
3992
|
+
}
|
|
3993
|
+
|
|
3994
|
+
if (target.assignedSlot && checkIfDecent(target.assignedSlot, parent)) {
|
|
3995
|
+
return true;
|
|
3996
|
+
}
|
|
3997
|
+
|
|
3998
|
+
if (parent.children) {
|
|
3999
|
+
for (const child of parent.children) {
|
|
4000
|
+
if (checkIfDecent(target, child)) {
|
|
4001
|
+
return true;
|
|
4002
|
+
}
|
|
4003
|
+
}
|
|
4004
|
+
}
|
|
4005
|
+
|
|
4006
|
+
return false;
|
|
4007
|
+
}
|
|
4008
|
+
const isDecent = checkIfDecent(event.target, this);
|
|
4009
|
+
if (isDecent && event.type === 'touchstart') {
|
|
4010
|
+
// if the target is on the bib, let it go for `click` event
|
|
4011
|
+
return;
|
|
4012
|
+
}
|
|
4013
|
+
event.preventDefault();
|
|
4014
|
+
event.stopImmediatePropagation();
|
|
4015
|
+
}
|
|
4016
|
+
|
|
3959
4017
|
// function that renders the HTML and CSS into the scope of the component
|
|
3960
4018
|
render() {
|
|
3961
4019
|
const classes = {
|
|
@@ -15277,31 +15335,6 @@ class AuroBibtemplate extends i$2 {
|
|
|
15277
15335
|
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
15278
15336
|
}
|
|
15279
15337
|
|
|
15280
|
-
/**
|
|
15281
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
15282
|
-
* @param {Event} event - The touchmove event.
|
|
15283
|
-
* @returns {void}
|
|
15284
|
-
*/
|
|
15285
|
-
preventBodyScroll(event) {
|
|
15286
|
-
if (event.target === this) {
|
|
15287
|
-
event.preventDefault();
|
|
15288
|
-
event.stopImmediatePropagation();
|
|
15289
|
-
}
|
|
15290
|
-
}
|
|
15291
|
-
|
|
15292
|
-
connectedCallback() {
|
|
15293
|
-
super.connectedCallback();
|
|
15294
|
-
|
|
15295
|
-
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
15296
|
-
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15297
|
-
}
|
|
15298
|
-
|
|
15299
|
-
disconnectedCallback() {
|
|
15300
|
-
super.disconnectedCallback();
|
|
15301
|
-
|
|
15302
|
-
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15303
|
-
}
|
|
15304
|
-
|
|
15305
15338
|
onCloseButtonClick() {
|
|
15306
15339
|
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
15307
15340
|
composed: true }));
|
|
@@ -15330,7 +15363,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
15330
15363
|
// function that renders the HTML and CSS into the scope of the component
|
|
15331
15364
|
render() {
|
|
15332
15365
|
return u$2`
|
|
15333
|
-
<div id="bibTemplate" part="bibtemplate"
|
|
15366
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
15334
15367
|
${this.isFullscreen ? u$2`
|
|
15335
15368
|
<div id="headerContainer">
|
|
15336
15369
|
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
@@ -3785,6 +3785,10 @@ class AuroDropdownBib extends i$2 {
|
|
|
3785
3785
|
connectedCallback() {
|
|
3786
3786
|
super.connectedCallback();
|
|
3787
3787
|
|
|
3788
|
+
this.addEventListener('touchstart', this.preventBodyScroll);
|
|
3789
|
+
this.addEventListener('touchmove', this.preventBodyScroll);
|
|
3790
|
+
|
|
3791
|
+
|
|
3788
3792
|
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3789
3793
|
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3790
3794
|
const bibTemplate = event.detail.element;
|
|
@@ -3814,6 +3818,60 @@ class AuroDropdownBib extends i$2 {
|
|
|
3814
3818
|
}));
|
|
3815
3819
|
}
|
|
3816
3820
|
|
|
3821
|
+
/**
|
|
3822
|
+
* Prevents scrolling of the body when touching empty areas of the component.
|
|
3823
|
+
* @param {Event} event - The touchmove event.
|
|
3824
|
+
* @returns {void}
|
|
3825
|
+
*/
|
|
3826
|
+
preventBodyScroll(event) {
|
|
3827
|
+
function checkIfDecent(target, parent) {
|
|
3828
|
+
if (!parent.tagName || "text,svg".includes(parent.tagName.toLowerCase())) {
|
|
3829
|
+
return false;
|
|
3830
|
+
}
|
|
3831
|
+
|
|
3832
|
+
if (parent.tagName.toLowerCase() === 'slot') {
|
|
3833
|
+
const assignedElements = parent.assignedElements();
|
|
3834
|
+
if (assignedElements) {
|
|
3835
|
+
for (const child of assignedElements) {
|
|
3836
|
+
if (checkIfDecent(target, child)) {
|
|
3837
|
+
return true;
|
|
3838
|
+
}
|
|
3839
|
+
}
|
|
3840
|
+
}
|
|
3841
|
+
return false;
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3844
|
+
if (target === parent || parent.contains(target)) {
|
|
3845
|
+
return true;
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3848
|
+
if (parent.shadowRoot && checkIfDecent(target, parent.shadowRoot)) {
|
|
3849
|
+
return true;
|
|
3850
|
+
}
|
|
3851
|
+
|
|
3852
|
+
if (target.assignedSlot && checkIfDecent(target.assignedSlot, parent)) {
|
|
3853
|
+
return true;
|
|
3854
|
+
}
|
|
3855
|
+
|
|
3856
|
+
if (parent.children) {
|
|
3857
|
+
for (const child of parent.children) {
|
|
3858
|
+
if (checkIfDecent(target, child)) {
|
|
3859
|
+
return true;
|
|
3860
|
+
}
|
|
3861
|
+
}
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
return false;
|
|
3865
|
+
}
|
|
3866
|
+
const isDecent = checkIfDecent(event.target, this);
|
|
3867
|
+
if (isDecent && event.type === 'touchstart') {
|
|
3868
|
+
// if the target is on the bib, let it go for `click` event
|
|
3869
|
+
return;
|
|
3870
|
+
}
|
|
3871
|
+
event.preventDefault();
|
|
3872
|
+
event.stopImmediatePropagation();
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3817
3875
|
// function that renders the HTML and CSS into the scope of the component
|
|
3818
3876
|
render() {
|
|
3819
3877
|
const classes = {
|
|
@@ -15135,31 +15193,6 @@ class AuroBibtemplate extends i$2 {
|
|
|
15135
15193
|
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
15136
15194
|
}
|
|
15137
15195
|
|
|
15138
|
-
/**
|
|
15139
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
15140
|
-
* @param {Event} event - The touchmove event.
|
|
15141
|
-
* @returns {void}
|
|
15142
|
-
*/
|
|
15143
|
-
preventBodyScroll(event) {
|
|
15144
|
-
if (event.target === this) {
|
|
15145
|
-
event.preventDefault();
|
|
15146
|
-
event.stopImmediatePropagation();
|
|
15147
|
-
}
|
|
15148
|
-
}
|
|
15149
|
-
|
|
15150
|
-
connectedCallback() {
|
|
15151
|
-
super.connectedCallback();
|
|
15152
|
-
|
|
15153
|
-
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
15154
|
-
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15155
|
-
}
|
|
15156
|
-
|
|
15157
|
-
disconnectedCallback() {
|
|
15158
|
-
super.disconnectedCallback();
|
|
15159
|
-
|
|
15160
|
-
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15161
|
-
}
|
|
15162
|
-
|
|
15163
15196
|
onCloseButtonClick() {
|
|
15164
15197
|
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
15165
15198
|
composed: true }));
|
|
@@ -15188,7 +15221,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
15188
15221
|
// function that renders the HTML and CSS into the scope of the component
|
|
15189
15222
|
render() {
|
|
15190
15223
|
return u$2`
|
|
15191
|
-
<div id="bibTemplate" part="bibtemplate"
|
|
15224
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
15192
15225
|
${this.isFullscreen ? u$2`
|
|
15193
15226
|
<div id="headerContainer">
|
|
15194
15227
|
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
@@ -3716,6 +3716,10 @@ class AuroDropdownBib extends LitElement {
|
|
|
3716
3716
|
connectedCallback() {
|
|
3717
3717
|
super.connectedCallback();
|
|
3718
3718
|
|
|
3719
|
+
this.addEventListener('touchstart', this.preventBodyScroll);
|
|
3720
|
+
this.addEventListener('touchmove', this.preventBodyScroll);
|
|
3721
|
+
|
|
3722
|
+
|
|
3719
3723
|
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3720
3724
|
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3721
3725
|
const bibTemplate = event.detail.element;
|
|
@@ -3745,6 +3749,60 @@ class AuroDropdownBib extends LitElement {
|
|
|
3745
3749
|
}));
|
|
3746
3750
|
}
|
|
3747
3751
|
|
|
3752
|
+
/**
|
|
3753
|
+
* Prevents scrolling of the body when touching empty areas of the component.
|
|
3754
|
+
* @param {Event} event - The touchmove event.
|
|
3755
|
+
* @returns {void}
|
|
3756
|
+
*/
|
|
3757
|
+
preventBodyScroll(event) {
|
|
3758
|
+
function checkIfDecent(target, parent) {
|
|
3759
|
+
if (!parent.tagName || "text,svg".includes(parent.tagName.toLowerCase())) {
|
|
3760
|
+
return false;
|
|
3761
|
+
}
|
|
3762
|
+
|
|
3763
|
+
if (parent.tagName.toLowerCase() === 'slot') {
|
|
3764
|
+
const assignedElements = parent.assignedElements();
|
|
3765
|
+
if (assignedElements) {
|
|
3766
|
+
for (const child of assignedElements) {
|
|
3767
|
+
if (checkIfDecent(target, child)) {
|
|
3768
|
+
return true;
|
|
3769
|
+
}
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
return false;
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
if (target === parent || parent.contains(target)) {
|
|
3776
|
+
return true;
|
|
3777
|
+
}
|
|
3778
|
+
|
|
3779
|
+
if (parent.shadowRoot && checkIfDecent(target, parent.shadowRoot)) {
|
|
3780
|
+
return true;
|
|
3781
|
+
}
|
|
3782
|
+
|
|
3783
|
+
if (target.assignedSlot && checkIfDecent(target.assignedSlot, parent)) {
|
|
3784
|
+
return true;
|
|
3785
|
+
}
|
|
3786
|
+
|
|
3787
|
+
if (parent.children) {
|
|
3788
|
+
for (const child of parent.children) {
|
|
3789
|
+
if (checkIfDecent(target, child)) {
|
|
3790
|
+
return true;
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
|
|
3795
|
+
return false;
|
|
3796
|
+
}
|
|
3797
|
+
const isDecent = checkIfDecent(event.target, this);
|
|
3798
|
+
if (isDecent && event.type === 'touchstart') {
|
|
3799
|
+
// if the target is on the bib, let it go for `click` event
|
|
3800
|
+
return;
|
|
3801
|
+
}
|
|
3802
|
+
event.preventDefault();
|
|
3803
|
+
event.stopImmediatePropagation();
|
|
3804
|
+
}
|
|
3805
|
+
|
|
3748
3806
|
// function that renders the HTML and CSS into the scope of the component
|
|
3749
3807
|
render() {
|
|
3750
3808
|
const classes = {
|
|
@@ -15053,31 +15111,6 @@ class AuroBibtemplate extends LitElement {
|
|
|
15053
15111
|
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
15054
15112
|
}
|
|
15055
15113
|
|
|
15056
|
-
/**
|
|
15057
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
15058
|
-
* @param {Event} event - The touchmove event.
|
|
15059
|
-
* @returns {void}
|
|
15060
|
-
*/
|
|
15061
|
-
preventBodyScroll(event) {
|
|
15062
|
-
if (event.target === this) {
|
|
15063
|
-
event.preventDefault();
|
|
15064
|
-
event.stopImmediatePropagation();
|
|
15065
|
-
}
|
|
15066
|
-
}
|
|
15067
|
-
|
|
15068
|
-
connectedCallback() {
|
|
15069
|
-
super.connectedCallback();
|
|
15070
|
-
|
|
15071
|
-
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
15072
|
-
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15073
|
-
}
|
|
15074
|
-
|
|
15075
|
-
disconnectedCallback() {
|
|
15076
|
-
super.disconnectedCallback();
|
|
15077
|
-
|
|
15078
|
-
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15079
|
-
}
|
|
15080
|
-
|
|
15081
15114
|
onCloseButtonClick() {
|
|
15082
15115
|
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
15083
15116
|
composed: true }));
|
|
@@ -15106,7 +15139,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
15106
15139
|
// function that renders the HTML and CSS into the scope of the component
|
|
15107
15140
|
render() {
|
|
15108
15141
|
return html`
|
|
15109
|
-
<div id="bibTemplate" part="bibtemplate"
|
|
15142
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
15110
15143
|
${this.isFullscreen ? html`
|
|
15111
15144
|
<div id="headerContainer">
|
|
15112
15145
|
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
@@ -3716,6 +3716,10 @@ class AuroDropdownBib extends LitElement {
|
|
|
3716
3716
|
connectedCallback() {
|
|
3717
3717
|
super.connectedCallback();
|
|
3718
3718
|
|
|
3719
|
+
this.addEventListener('touchstart', this.preventBodyScroll);
|
|
3720
|
+
this.addEventListener('touchmove', this.preventBodyScroll);
|
|
3721
|
+
|
|
3722
|
+
|
|
3719
3723
|
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3720
3724
|
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3721
3725
|
const bibTemplate = event.detail.element;
|
|
@@ -3745,6 +3749,60 @@ class AuroDropdownBib extends LitElement {
|
|
|
3745
3749
|
}));
|
|
3746
3750
|
}
|
|
3747
3751
|
|
|
3752
|
+
/**
|
|
3753
|
+
* Prevents scrolling of the body when touching empty areas of the component.
|
|
3754
|
+
* @param {Event} event - The touchmove event.
|
|
3755
|
+
* @returns {void}
|
|
3756
|
+
*/
|
|
3757
|
+
preventBodyScroll(event) {
|
|
3758
|
+
function checkIfDecent(target, parent) {
|
|
3759
|
+
if (!parent.tagName || "text,svg".includes(parent.tagName.toLowerCase())) {
|
|
3760
|
+
return false;
|
|
3761
|
+
}
|
|
3762
|
+
|
|
3763
|
+
if (parent.tagName.toLowerCase() === 'slot') {
|
|
3764
|
+
const assignedElements = parent.assignedElements();
|
|
3765
|
+
if (assignedElements) {
|
|
3766
|
+
for (const child of assignedElements) {
|
|
3767
|
+
if (checkIfDecent(target, child)) {
|
|
3768
|
+
return true;
|
|
3769
|
+
}
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
return false;
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
if (target === parent || parent.contains(target)) {
|
|
3776
|
+
return true;
|
|
3777
|
+
}
|
|
3778
|
+
|
|
3779
|
+
if (parent.shadowRoot && checkIfDecent(target, parent.shadowRoot)) {
|
|
3780
|
+
return true;
|
|
3781
|
+
}
|
|
3782
|
+
|
|
3783
|
+
if (target.assignedSlot && checkIfDecent(target.assignedSlot, parent)) {
|
|
3784
|
+
return true;
|
|
3785
|
+
}
|
|
3786
|
+
|
|
3787
|
+
if (parent.children) {
|
|
3788
|
+
for (const child of parent.children) {
|
|
3789
|
+
if (checkIfDecent(target, child)) {
|
|
3790
|
+
return true;
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
|
|
3795
|
+
return false;
|
|
3796
|
+
}
|
|
3797
|
+
const isDecent = checkIfDecent(event.target, this);
|
|
3798
|
+
if (isDecent && event.type === 'touchstart') {
|
|
3799
|
+
// if the target is on the bib, let it go for `click` event
|
|
3800
|
+
return;
|
|
3801
|
+
}
|
|
3802
|
+
event.preventDefault();
|
|
3803
|
+
event.stopImmediatePropagation();
|
|
3804
|
+
}
|
|
3805
|
+
|
|
3748
3806
|
// function that renders the HTML and CSS into the scope of the component
|
|
3749
3807
|
render() {
|
|
3750
3808
|
const classes = {
|
|
@@ -15053,31 +15111,6 @@ class AuroBibtemplate extends LitElement {
|
|
|
15053
15111
|
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
15054
15112
|
}
|
|
15055
15113
|
|
|
15056
|
-
/**
|
|
15057
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
15058
|
-
* @param {Event} event - The touchmove event.
|
|
15059
|
-
* @returns {void}
|
|
15060
|
-
*/
|
|
15061
|
-
preventBodyScroll(event) {
|
|
15062
|
-
if (event.target === this) {
|
|
15063
|
-
event.preventDefault();
|
|
15064
|
-
event.stopImmediatePropagation();
|
|
15065
|
-
}
|
|
15066
|
-
}
|
|
15067
|
-
|
|
15068
|
-
connectedCallback() {
|
|
15069
|
-
super.connectedCallback();
|
|
15070
|
-
|
|
15071
|
-
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
15072
|
-
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15073
|
-
}
|
|
15074
|
-
|
|
15075
|
-
disconnectedCallback() {
|
|
15076
|
-
super.disconnectedCallback();
|
|
15077
|
-
|
|
15078
|
-
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
15079
|
-
}
|
|
15080
|
-
|
|
15081
15114
|
onCloseButtonClick() {
|
|
15082
15115
|
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
15083
15116
|
composed: true }));
|
|
@@ -15106,7 +15139,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
15106
15139
|
// function that renders the HTML and CSS into the scope of the component
|
|
15107
15140
|
render() {
|
|
15108
15141
|
return html`
|
|
15109
|
-
<div id="bibTemplate" part="bibtemplate"
|
|
15142
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
15110
15143
|
${this.isFullscreen ? html`
|
|
15111
15144
|
<div id="headerContainer">
|
|
15112
15145
|
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
@@ -5636,6 +5636,10 @@ class AuroDropdownBib extends i$2 {
|
|
|
5636
5636
|
connectedCallback() {
|
|
5637
5637
|
super.connectedCallback();
|
|
5638
5638
|
|
|
5639
|
+
this.addEventListener('touchstart', this.preventBodyScroll);
|
|
5640
|
+
this.addEventListener('touchmove', this.preventBodyScroll);
|
|
5641
|
+
|
|
5642
|
+
|
|
5639
5643
|
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
5640
5644
|
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
5641
5645
|
const bibTemplate = event.detail.element;
|
|
@@ -5665,6 +5669,60 @@ class AuroDropdownBib extends i$2 {
|
|
|
5665
5669
|
}));
|
|
5666
5670
|
}
|
|
5667
5671
|
|
|
5672
|
+
/**
|
|
5673
|
+
* Prevents scrolling of the body when touching empty areas of the component.
|
|
5674
|
+
* @param {Event} event - The touchmove event.
|
|
5675
|
+
* @returns {void}
|
|
5676
|
+
*/
|
|
5677
|
+
preventBodyScroll(event) {
|
|
5678
|
+
function checkIfDecent(target, parent) {
|
|
5679
|
+
if (!parent.tagName || "text,svg".includes(parent.tagName.toLowerCase())) {
|
|
5680
|
+
return false;
|
|
5681
|
+
}
|
|
5682
|
+
|
|
5683
|
+
if (parent.tagName.toLowerCase() === 'slot') {
|
|
5684
|
+
const assignedElements = parent.assignedElements();
|
|
5685
|
+
if (assignedElements) {
|
|
5686
|
+
for (const child of assignedElements) {
|
|
5687
|
+
if (checkIfDecent(target, child)) {
|
|
5688
|
+
return true;
|
|
5689
|
+
}
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5692
|
+
return false;
|
|
5693
|
+
}
|
|
5694
|
+
|
|
5695
|
+
if (target === parent || parent.contains(target)) {
|
|
5696
|
+
return true;
|
|
5697
|
+
}
|
|
5698
|
+
|
|
5699
|
+
if (parent.shadowRoot && checkIfDecent(target, parent.shadowRoot)) {
|
|
5700
|
+
return true;
|
|
5701
|
+
}
|
|
5702
|
+
|
|
5703
|
+
if (target.assignedSlot && checkIfDecent(target.assignedSlot, parent)) {
|
|
5704
|
+
return true;
|
|
5705
|
+
}
|
|
5706
|
+
|
|
5707
|
+
if (parent.children) {
|
|
5708
|
+
for (const child of parent.children) {
|
|
5709
|
+
if (checkIfDecent(target, child)) {
|
|
5710
|
+
return true;
|
|
5711
|
+
}
|
|
5712
|
+
}
|
|
5713
|
+
}
|
|
5714
|
+
|
|
5715
|
+
return false;
|
|
5716
|
+
}
|
|
5717
|
+
const isDecent = checkIfDecent(event.target, this);
|
|
5718
|
+
if (isDecent && event.type === 'touchstart') {
|
|
5719
|
+
// if the target is on the bib, let it go for `click` event
|
|
5720
|
+
return;
|
|
5721
|
+
}
|
|
5722
|
+
event.preventDefault();
|
|
5723
|
+
event.stopImmediatePropagation();
|
|
5724
|
+
}
|
|
5725
|
+
|
|
5668
5726
|
// function that renders the HTML and CSS into the scope of the component
|
|
5669
5727
|
render() {
|
|
5670
5728
|
const classes = {
|
|
@@ -8764,31 +8822,6 @@ class AuroBibtemplate extends i$2 {
|
|
|
8764
8822
|
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
8765
8823
|
}
|
|
8766
8824
|
|
|
8767
|
-
/**
|
|
8768
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
8769
|
-
* @param {Event} event - The touchmove event.
|
|
8770
|
-
* @returns {void}
|
|
8771
|
-
*/
|
|
8772
|
-
preventBodyScroll(event) {
|
|
8773
|
-
if (event.target === this) {
|
|
8774
|
-
event.preventDefault();
|
|
8775
|
-
event.stopImmediatePropagation();
|
|
8776
|
-
}
|
|
8777
|
-
}
|
|
8778
|
-
|
|
8779
|
-
connectedCallback() {
|
|
8780
|
-
super.connectedCallback();
|
|
8781
|
-
|
|
8782
|
-
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
8783
|
-
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
8784
|
-
}
|
|
8785
|
-
|
|
8786
|
-
disconnectedCallback() {
|
|
8787
|
-
super.disconnectedCallback();
|
|
8788
|
-
|
|
8789
|
-
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
8790
|
-
}
|
|
8791
|
-
|
|
8792
8825
|
onCloseButtonClick() {
|
|
8793
8826
|
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
8794
8827
|
composed: true }));
|
|
@@ -8817,7 +8850,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
8817
8850
|
// function that renders the HTML and CSS into the scope of the component
|
|
8818
8851
|
render() {
|
|
8819
8852
|
return u`
|
|
8820
|
-
<div id="bibTemplate" part="bibtemplate"
|
|
8853
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
8821
8854
|
${this.isFullscreen ? u`
|
|
8822
8855
|
<div id="headerContainer">
|
|
8823
8856
|
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|