index-scrollbar
Advanced tools
Comparing version 1.0.24 to 1.0.25
@@ -95,8 +95,8 @@ 'use strict'; | ||
this.alphabetContainer.addEventListener('touchmove', ev => this.focusEvent(ev, 'touchmove'), { passive: true }); | ||
this.alphabetContainer.addEventListener('touchend', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('touchend', ev => this.focusEnd(ev, 'touchend'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseenter', ev => this.focusEvent(ev, 'mouseenter'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mousemove', ev => this.focusEvent(ev, 'mousemove'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseleave', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseleave', ev => this.focusEnd(ev, 'mouseleave'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mousedown', ev => this.focusEvent(ev, 'mousedown'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseup', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseup', ev => this.focusEnd(ev, 'mouseup'), { passive: true }); | ||
// this.alphabetContainer.addEventListener('click', ev => this.focusEvent(ev, 'click'), { passive: true }); | ||
@@ -126,8 +126,8 @@ setTimeout(() => { | ||
this.alphabetContainer.removeEventListener('touchmove', ev => this.focusEvent(ev, 'touchmove')); | ||
this.alphabetContainer.removeEventListener('touchend', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('touchend', ev => this.focusEnd(ev, 'touchend')); | ||
this.alphabetContainer.removeEventListener('mouseenter', ev => this.focusEvent(ev, 'mouseenter')); | ||
this.alphabetContainer.removeEventListener('mousemove', ev => this.focusEvent(ev, 'mousemove')); | ||
this.alphabetContainer.removeEventListener('mouseleave', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('mouseleave', ev => this.focusEnd(ev, 'mouseleave')); | ||
this.alphabetContainer.removeEventListener('mousedown', ev => this.focusEvent(ev, 'mousedown')); | ||
this.alphabetContainer.removeEventListener('mouseup', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('mouseup', ev => this.focusEnd(ev, 'mouseup')); | ||
// this.alphabetContainer.removeEventListener('click', ev => this.focusEvent(ev, 'click')); | ||
@@ -218,6 +218,4 @@ window.removeEventListener('resize', this.checkVisibleLetters.bind(this)); | ||
if (type.includes('start') || type.includes('enter') || type.includes('down')) { | ||
if (!this._isComponentActive) { | ||
this.isActive.emit(true); | ||
this._isComponentActive = true; | ||
} | ||
if (!this._isComponentActive) | ||
this.isActive.emit((this._isComponentActive = true)); | ||
} | ||
@@ -229,3 +227,5 @@ this.setLetterFromCoordinates((_b = (_a = event.touches) === null || _a === void 0 ? void 0 : _a[0].clientX) !== null && _b !== void 0 ? _b : event.clientX, (_d = (_c = event.touches) === null || _c === void 0 ? void 0 : _c[0].clientY) !== null && _d !== void 0 ? _d : event.clientY); | ||
} | ||
focusEnd() { | ||
focusEnd(_, type) { | ||
if (type.includes('up') && this.navigateOnHover) | ||
return; | ||
this.isActive.emit((this._isComponentActive = false)); | ||
@@ -232,0 +232,0 @@ } |
@@ -85,8 +85,8 @@ import { Component, Host, h, Prop, Event, Element, State, Watch } from '@stencil/core'; | ||
this.alphabetContainer.addEventListener('touchmove', ev => this.focusEvent(ev, 'touchmove'), { passive: true }); | ||
this.alphabetContainer.addEventListener('touchend', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('touchend', ev => this.focusEnd(ev, 'touchend'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseenter', ev => this.focusEvent(ev, 'mouseenter'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mousemove', ev => this.focusEvent(ev, 'mousemove'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseleave', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseleave', ev => this.focusEnd(ev, 'mouseleave'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mousedown', ev => this.focusEvent(ev, 'mousedown'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseup', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseup', ev => this.focusEnd(ev, 'mouseup'), { passive: true }); | ||
// this.alphabetContainer.addEventListener('click', ev => this.focusEvent(ev, 'click'), { passive: true }); | ||
@@ -116,8 +116,8 @@ setTimeout(() => { | ||
this.alphabetContainer.removeEventListener('touchmove', ev => this.focusEvent(ev, 'touchmove')); | ||
this.alphabetContainer.removeEventListener('touchend', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('touchend', ev => this.focusEnd(ev, 'touchend')); | ||
this.alphabetContainer.removeEventListener('mouseenter', ev => this.focusEvent(ev, 'mouseenter')); | ||
this.alphabetContainer.removeEventListener('mousemove', ev => this.focusEvent(ev, 'mousemove')); | ||
this.alphabetContainer.removeEventListener('mouseleave', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('mouseleave', ev => this.focusEnd(ev, 'mouseleave')); | ||
this.alphabetContainer.removeEventListener('mousedown', ev => this.focusEvent(ev, 'mousedown')); | ||
this.alphabetContainer.removeEventListener('mouseup', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('mouseup', ev => this.focusEnd(ev, 'mouseup')); | ||
// this.alphabetContainer.removeEventListener('click', ev => this.focusEvent(ev, 'click')); | ||
@@ -208,6 +208,4 @@ window.removeEventListener('resize', this.checkVisibleLetters.bind(this)); | ||
if (type.includes('start') || type.includes('enter') || type.includes('down')) { | ||
if (!this._isComponentActive) { | ||
this.isActive.emit(true); | ||
this._isComponentActive = true; | ||
} | ||
if (!this._isComponentActive) | ||
this.isActive.emit((this._isComponentActive = true)); | ||
} | ||
@@ -219,3 +217,5 @@ this.setLetterFromCoordinates((_b = (_a = event.touches) === null || _a === void 0 ? void 0 : _a[0].clientX) !== null && _b !== void 0 ? _b : event.clientX, (_d = (_c = event.touches) === null || _c === void 0 ? void 0 : _c[0].clientY) !== null && _d !== void 0 ? _d : event.clientY); | ||
} | ||
focusEnd() { | ||
focusEnd(_, type) { | ||
if (type.includes('up') && this.navigateOnHover) | ||
return; | ||
this.isActive.emit((this._isComponentActive = false)); | ||
@@ -222,0 +222,0 @@ } |
@@ -93,8 +93,8 @@ import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client'; | ||
this.alphabetContainer.addEventListener('touchmove', ev => this.focusEvent(ev, 'touchmove'), { passive: true }); | ||
this.alphabetContainer.addEventListener('touchend', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('touchend', ev => this.focusEnd(ev, 'touchend'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseenter', ev => this.focusEvent(ev, 'mouseenter'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mousemove', ev => this.focusEvent(ev, 'mousemove'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseleave', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseleave', ev => this.focusEnd(ev, 'mouseleave'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mousedown', ev => this.focusEvent(ev, 'mousedown'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseup', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseup', ev => this.focusEnd(ev, 'mouseup'), { passive: true }); | ||
// this.alphabetContainer.addEventListener('click', ev => this.focusEvent(ev, 'click'), { passive: true }); | ||
@@ -124,8 +124,8 @@ setTimeout(() => { | ||
this.alphabetContainer.removeEventListener('touchmove', ev => this.focusEvent(ev, 'touchmove')); | ||
this.alphabetContainer.removeEventListener('touchend', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('touchend', ev => this.focusEnd(ev, 'touchend')); | ||
this.alphabetContainer.removeEventListener('mouseenter', ev => this.focusEvent(ev, 'mouseenter')); | ||
this.alphabetContainer.removeEventListener('mousemove', ev => this.focusEvent(ev, 'mousemove')); | ||
this.alphabetContainer.removeEventListener('mouseleave', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('mouseleave', ev => this.focusEnd(ev, 'mouseleave')); | ||
this.alphabetContainer.removeEventListener('mousedown', ev => this.focusEvent(ev, 'mousedown')); | ||
this.alphabetContainer.removeEventListener('mouseup', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('mouseup', ev => this.focusEnd(ev, 'mouseup')); | ||
// this.alphabetContainer.removeEventListener('click', ev => this.focusEvent(ev, 'click')); | ||
@@ -216,6 +216,4 @@ window.removeEventListener('resize', this.checkVisibleLetters.bind(this)); | ||
if (type.includes('start') || type.includes('enter') || type.includes('down')) { | ||
if (!this._isComponentActive) { | ||
this.isActive.emit(true); | ||
this._isComponentActive = true; | ||
} | ||
if (!this._isComponentActive) | ||
this.isActive.emit((this._isComponentActive = true)); | ||
} | ||
@@ -227,3 +225,5 @@ this.setLetterFromCoordinates((_b = (_a = event.touches) === null || _a === void 0 ? void 0 : _a[0].clientX) !== null && _b !== void 0 ? _b : event.clientX, (_d = (_c = event.touches) === null || _c === void 0 ? void 0 : _c[0].clientY) !== null && _d !== void 0 ? _d : event.clientY); | ||
} | ||
focusEnd() { | ||
focusEnd(_, type) { | ||
if (type.includes('up') && this.navigateOnHover) | ||
return; | ||
this.isActive.emit((this._isComponentActive = false)); | ||
@@ -230,0 +230,0 @@ } |
@@ -91,8 +91,8 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5f889f85.js'; | ||
this.alphabetContainer.addEventListener('touchmove', ev => this.focusEvent(ev, 'touchmove'), { passive: true }); | ||
this.alphabetContainer.addEventListener('touchend', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('touchend', ev => this.focusEnd(ev, 'touchend'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseenter', ev => this.focusEvent(ev, 'mouseenter'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mousemove', ev => this.focusEvent(ev, 'mousemove'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseleave', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseleave', ev => this.focusEnd(ev, 'mouseleave'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mousedown', ev => this.focusEvent(ev, 'mousedown'), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseup', () => this.focusEnd(), { passive: true }); | ||
this.alphabetContainer.addEventListener('mouseup', ev => this.focusEnd(ev, 'mouseup'), { passive: true }); | ||
// this.alphabetContainer.addEventListener('click', ev => this.focusEvent(ev, 'click'), { passive: true }); | ||
@@ -122,8 +122,8 @@ setTimeout(() => { | ||
this.alphabetContainer.removeEventListener('touchmove', ev => this.focusEvent(ev, 'touchmove')); | ||
this.alphabetContainer.removeEventListener('touchend', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('touchend', ev => this.focusEnd(ev, 'touchend')); | ||
this.alphabetContainer.removeEventListener('mouseenter', ev => this.focusEvent(ev, 'mouseenter')); | ||
this.alphabetContainer.removeEventListener('mousemove', ev => this.focusEvent(ev, 'mousemove')); | ||
this.alphabetContainer.removeEventListener('mouseleave', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('mouseleave', ev => this.focusEnd(ev, 'mouseleave')); | ||
this.alphabetContainer.removeEventListener('mousedown', ev => this.focusEvent(ev, 'mousedown')); | ||
this.alphabetContainer.removeEventListener('mouseup', () => this.focusEnd()); | ||
this.alphabetContainer.removeEventListener('mouseup', ev => this.focusEnd(ev, 'mouseup')); | ||
// this.alphabetContainer.removeEventListener('click', ev => this.focusEvent(ev, 'click')); | ||
@@ -214,6 +214,4 @@ window.removeEventListener('resize', this.checkVisibleLetters.bind(this)); | ||
if (type.includes('start') || type.includes('enter') || type.includes('down')) { | ||
if (!this._isComponentActive) { | ||
this.isActive.emit(true); | ||
this._isComponentActive = true; | ||
} | ||
if (!this._isComponentActive) | ||
this.isActive.emit((this._isComponentActive = true)); | ||
} | ||
@@ -225,3 +223,5 @@ this.setLetterFromCoordinates((_b = (_a = event.touches) === null || _a === void 0 ? void 0 : _a[0].clientX) !== null && _b !== void 0 ? _b : event.clientX, (_d = (_c = event.touches) === null || _c === void 0 ? void 0 : _c[0].clientY) !== null && _d !== void 0 ? _d : event.clientY); | ||
} | ||
focusEnd() { | ||
focusEnd(_, type) { | ||
if (type.includes('up') && this.navigateOnHover) | ||
return; | ||
this.isActive.emit((this._isComponentActive = false)); | ||
@@ -228,0 +228,0 @@ } |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as i}from"./p-d4d31fe4.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>i([["p-a03068ec",[[1,"index-scrollbar",{alphabet:[16],overflowDivider:[1,"overflow-divider"],validLetters:[16],disableInvalidLetters:[4,"disable-invalid-letters"],prioritizeHidingInvalidLetters:[4,"prioritize-hiding-invalid-letters"],letterMagnification:[4,"letter-magnification"],magnifyDividers:[4,"magnify-dividers"],magnificationMultiplier:[2,"magnification-multiplier"],magnificationCurve:[16],exactX:[4,"exact-x"],navigateOnHover:[4,"navigate-on-hover"],letterSpacing:[8,"letter-spacing"],offsetSizeCheckInterval:[2,"offset-size-check-interval"],_isComponentActive:[32],visibleLetters:[32],rendering:[32],_lastEmittedLetter:[32],magIndex:[32],_isInBounds:[32],visualLetterIndex:[32],letterSelected:[32]}]]]],e))); | ||
import{p as e,b as i}from"./p-d4d31fe4.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>i([["p-b2cd0967",[[1,"index-scrollbar",{alphabet:[16],overflowDivider:[1,"overflow-divider"],validLetters:[16],disableInvalidLetters:[4,"disable-invalid-letters"],prioritizeHidingInvalidLetters:[4,"prioritize-hiding-invalid-letters"],letterMagnification:[4,"letter-magnification"],magnifyDividers:[4,"magnify-dividers"],magnificationMultiplier:[2,"magnification-multiplier"],magnificationCurve:[16],exactX:[4,"exact-x"],navigateOnHover:[4,"navigate-on-hover"],letterSpacing:[8,"letter-spacing"],offsetSizeCheckInterval:[2,"offset-size-check-interval"],_isComponentActive:[32],visibleLetters:[32],rendering:[32],_lastEmittedLetter:[32],magIndex:[32],_isInBounds:[32],visualLetterIndex:[32],letterSelected:[32]}]]]],e))); |
@@ -46,3 +46,3 @@ import { EventEmitter } from '../../stencil-public-runtime'; | ||
_lastEmittedLetter: string; | ||
focusEnd(): void; | ||
focusEnd(_: MouseEvent | TouchEvent | any, type?: string): void; | ||
magIndex: number; | ||
@@ -49,0 +49,0 @@ _isInBounds: boolean; |
{ | ||
"name": "index-scrollbar", | ||
"version": "1.0.24", | ||
"version": "1.0.25", | ||
"description": "Stencil Component Starter", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
405603