Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/component-base

Package Overview
Dependencies
Maintainers
14
Versions
407
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/component-base - npm Package Compare versions

Comparing version 23.1.0-alpha3 to 23.1.0-alpha4

src/async.d.ts

4

package.json
{
"name": "@vaadin/component-base",
"version": "23.1.0-alpha3",
"version": "23.1.0-alpha4",
"publishConfig": {

@@ -45,3 +45,3 @@ "access": "public"

},
"gitHead": "8c9e64e8dfa158dd52a9bf6da351ff038c88ca85"
"gitHead": "aacdb7fe09811894751f0378ff7fb66071892c71"
}

@@ -20,3 +20,3 @@ /**

export declare function ActiveMixin<T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<ActiveMixinClass> & Constructor<DisabledMixinClass> & Constructor<KeyboardMixinClass>;

@@ -23,0 +23,0 @@

@@ -73,3 +73,3 @@ /**

window.clearTimeout(handle);
}
},
};

@@ -97,3 +97,3 @@ },

window.clearTimeout(handle);
}
},
};

@@ -128,3 +128,3 @@ export { timeOut };

window.cancelAnimationFrame(handle);
}
},
};

@@ -159,4 +159,8 @@ export { animationFrame };

cancel(handle) {
window.cancelIdleCallback ? window.cancelIdleCallback(handle) : window.clearTimeout(handle);
}
if (window.cancelIdleCallback) {
window.cancelIdleCallback(handle);
} else {
window.clearTimeout(handle);
}
},
};

@@ -209,8 +213,8 @@ export { idlePeriod };

if (!microtaskCallbacks[idx]) {
throw new Error('invalid async handle: ' + handle);
throw new Error(`invalid async handle: ${handle}`);
}
microtaskCallbacks[idx] = null;
}
}
},
};
export { microTask };

@@ -13,3 +13,3 @@ /**

export declare function ControllerMixin<T extends Constructor<HTMLElement>>(
superclass: T
superclass: T,
): T & Constructor<ControllerMixinClass>;

@@ -16,0 +16,0 @@

@@ -30,3 +30,5 @@ /**

this.__controllers.forEach((c) => {
c.hostConnected && c.hostConnected();
if (c.hostConnected) {
c.hostConnected();
}
});

@@ -40,3 +42,5 @@ }

this.__controllers.forEach((c) => {
c.hostDisconnected && c.hostDisconnected();
if (c.hostDisconnected) {
c.hostDisconnected();
}
});

@@ -68,3 +72,3 @@ }

}
}
},
);

@@ -38,3 +38,3 @@ /**

element: Element | null,
scrollLeft: number
scrollLeft: number,
): void;

@@ -41,0 +41,0 @@ }

@@ -51,4 +51,12 @@ /**

value: '',
reflectToAttribute: true
}
reflectToAttribute: true,
converter: {
fromAttribute: (attr) => {
return !attr ? '' : attr;
},
toAttribute: (prop) => {
return prop === '' ? null : prop;
},
},
},
};

@@ -131,5 +139,7 @@ }

if (push) {
directionSubscribers.indexOf(this) === -1 && directionSubscribers.push(this);
} else {
directionSubscribers.indexOf(this) > -1 && directionSubscribers.splice(directionSubscribers.indexOf(this), 1);
if (!directionSubscribers.includes(this)) {
directionSubscribers.push(this);
}
} else if (directionSubscribers.includes(this)) {
directionSubscribers.splice(directionSubscribers.indexOf(this), 1);
}

@@ -136,0 +146,0 @@ }

@@ -25,4 +25,4 @@ /**

observer: '_disabledChanged',
reflectToAttribute: true
}
reflectToAttribute: true,
},
};

@@ -62,3 +62,3 @@ }

}
}
},
);

@@ -15,3 +15,3 @@ /**

export declare function ElementMixin<T extends Constructor<HTMLElement>>(
superclass: T
superclass: T,
): T & Constructor<DirMixinClass> & Constructor<ElementMixinClass>;

@@ -18,0 +18,0 @@

@@ -42,3 +42,3 @@ /**

static get version() {
return '23.1.0-alpha3';
return '23.1.0-alpha4';
}

@@ -71,3 +71,3 @@

console.warn(
'Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.'
'Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.',
);

@@ -74,0 +74,0 @@ }

@@ -19,3 +19,3 @@ /**

},
{ capture: true }
{ capture: true },
);

@@ -28,3 +28,3 @@

},
{ capture: true }
{ capture: true },
);

@@ -115,3 +115,3 @@

}
}
},
);

@@ -68,3 +68,3 @@ /**

supportsPassive = true;
}
},
});

@@ -107,3 +107,3 @@ window.addEventListener('test', null, opts);

select: true,
textarea: true
textarea: true,
};

@@ -166,3 +166,3 @@

target: null,
mouseIgnoreJob: null
mouseIgnoreJob: null,
},

@@ -173,4 +173,4 @@ touch: {

id: -1,
scrollDecided: false
}
scrollDecided: false,
},
};

@@ -562,3 +562,3 @@

start: ['mousedown', 'touchstart'],
end: ['mouseup', 'touchend']
end: ['mouseup', 'touchend'],
},

@@ -569,3 +569,3 @@ emits: ['down', 'up'],

movefn: null,
upfn: null
upfn: null,
},

@@ -625,3 +625,3 @@

downupFire('up', _findOriginalTarget(e), e.changedTouches[0], e);
}
},
});

@@ -647,3 +647,3 @@

return prevent(e);
}
},
});

@@ -658,3 +658,3 @@ }

start: ['mousedown', 'touchstart'],
end: ['mouseup', 'touchend']
end: ['mouseup', 'touchend'],
},

@@ -678,3 +678,3 @@ emits: ['track'],

upfn: null,
prevent: false
prevent: false,
},

@@ -792,3 +792,3 @@

}
}
},
});

@@ -845,3 +845,3 @@

return deepTargetFind(touch.clientX, touch.clientY);
}
},
});

@@ -855,3 +855,3 @@ }

start: ['mousedown', 'touchstart'],
end: ['click', 'touchend']
end: ['click', 'touchend'],
},

@@ -862,3 +862,3 @@ emits: ['tap'],

y: NaN,
prevent: false
prevent: false,
},

@@ -917,3 +917,3 @@

trackForward(this.info, e.changedTouches[0], e);
}
},
});

@@ -943,3 +943,3 @@

sourceEvent: e,
preventer: preventer
preventer: preventer,
});

@@ -946,0 +946,0 @@ }

@@ -349,3 +349,3 @@ /**

Math.floor(this._virtualStart / this._itemsPerRow) * this._physicalAverage,
this._scrollPosition
this._scrollPosition,
);

@@ -458,3 +458,3 @@ this._update();

return (
this._scrollBottom != 0 &&
this._scrollBottom !== 0 &&
this._physicalBottom - 1 >= this._scrollBottom &&

@@ -472,3 +472,3 @@ this._physicalTop <= this._scrollPosition

DEFAULT_PHYSICAL_COUNT,
this._virtualCount - this._virtualStart
this._virtualCount - this._virtualStart,
);

@@ -526,3 +526,3 @@ nextPhysicalCount = this._convertIndexToCompleteRow(nextPhysicalCount);

this._increasePoolIfNeeded.bind(this, this._clamp(Math.round(50 / this._templateCost), 1, nextIncrease)),
idlePeriod
idlePeriod,
);

@@ -560,3 +560,5 @@ }

flush();
newGrid && this._updateGridMetrics();
if (newGrid) {
this._updateGridMetrics();
}
},

@@ -589,3 +591,3 @@

// Only blur if at least one item is added or removed.
var itemAddedOrRemoved = change.value.indexSplices.some(function (splice) {
var itemAddedOrRemoved = change.value.indexSplices.some((splice) => {
return splice.addedCount > 0 || splice.removed.length > 0;

@@ -602,5 +604,5 @@ });

// Render only if the affected index is rendered.
var affectedIndexRendered = change.value.indexSplices.some(function (splice) {
var affectedIndexRendered = change.value.indexSplices.some((splice) => {
return splice.index + splice.addedCount >= this._virtualStart && splice.index <= this._virtualEnd;
}, this);
});
if (!this._isClientFull() || affectedIndexRendered) {

@@ -699,3 +701,3 @@ this._debounce('_render', this._render, animationFrame);

this._physicalAverage = Math.round(
(prevPhysicalAvg * prevAvgCount + newPhysicalSize) / this._physicalAverageCount
(prevPhysicalAvg * prevAvgCount + newPhysicalSize) / this._physicalAverageCount,
);

@@ -729,3 +731,3 @@ }

}
this.translate3d(x + 'px', y + 'px', 0, this._physicalItems[pidx]);
this.translate3d(`${x}px`, `${y}px`, 0, this._physicalItems[pidx]);
if (this._shouldRenderNextRow(vidx)) {

@@ -740,3 +742,3 @@ y += this._rowHeight;

const item = this._physicalItems[pidx];
this.translate3d(0, y + 'px', 0, item);
this.translate3d(0, `${y}px`, 0, item);
y += this._physicalSizes[pidx];

@@ -822,3 +824,3 @@ const itemId = item.id;

if (forceUpdate || Math.abs(this._estScrollHeight - this._scrollHeight) >= this._viewportHeight) {
this.$.items.style.height = this._estScrollHeight + 'px';
this.$.items.style.height = `${this._estScrollHeight}px`;
this._scrollHeight = this._estScrollHeight;

@@ -904,3 +906,3 @@ }

},
animationFrame
animationFrame,
);

@@ -964,3 +966,3 @@ },

enqueueDebouncer(this._debouncers[name]);
}
},
};

@@ -52,3 +52,3 @@ /**

}
}
},
);

@@ -29,3 +29,3 @@ /**

method,
observerProps
observerProps,
};

@@ -47,3 +47,3 @@ }

options = {
type: options
type: options,
};

@@ -110,3 +110,3 @@ }

// This is run during construction of the element
instance['_set' + upper(name)] = function (value) {
instance[`_set${upper(name)}`] = function (value) {
setter.call(instance, value);

@@ -122,3 +122,3 @@ };

configurable: true,
enumerable: true
enumerable: true,
};

@@ -245,5 +245,5 @@ }

detail: {
value: this[k]
}
})
value: this[k],
},
}),
);

@@ -250,0 +250,0 @@ }

@@ -52,6 +52,6 @@ /**

console.warn(
`WARNING: Since Vaadin 23, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes.`
`WARNING: Since Vaadin 23, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes.`,
);
}
}
},
);

@@ -13,3 +13,3 @@ /**

slotFactory?: () => HTMLElement,
slotInitializer?: (host: HTMLElement, node: HTMLElement) => void
slotInitializer?: (host: HTMLElement, node: HTMLElement) => void,
);

@@ -16,0 +16,0 @@

@@ -59,3 +59,3 @@ /**

}
}
},
);

@@ -16,3 +16,3 @@ /**

export declare function TabindexMixin<T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<DisabledMixinClass> & Constructor<TabindexMixinClass>;

@@ -19,0 +19,0 @@

@@ -29,3 +29,3 @@ /**

reflectToAttribute: true,
observer: '_tabindexChanged'
observer: '_tabindexChanged',
},

@@ -39,4 +39,4 @@

_lastTabIndex: {
type: Number
}
type: Number,
},
};

@@ -43,0 +43,0 @@ }

@@ -21,5 +21,5 @@ /**

console.warn(
`WARNING: <template> inside <${component.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`
`WARNING: <template> inside <${component.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`,
);
}
}

@@ -31,3 +31,3 @@ /**

SCROLL_REORDER: 500,
IGNORE_WHEEL: 500
IGNORE_WHEEL: 500,
};

@@ -122,4 +122,8 @@

this._scrollHandler();
this.__scrollReorderDebouncer && this.__scrollReorderDebouncer.flush();
this.__debouncerWheelAnimationFrame && this.__debouncerWheelAnimationFrame.flush();
if (this.__scrollReorderDebouncer) {
this.__scrollReorderDebouncer.flush();
}
if (this.__debouncerWheelAnimationFrame) {
this.__debouncerWheelAnimationFrame.flush();
}
}

@@ -188,3 +192,3 @@

this._itemsChanged({
path: 'items'
path: 'items',
});

@@ -227,3 +231,3 @@ flush();

return {
length: Math.min(this.size, MAX_VIRTUAL_COUNT)
length: Math.min(this.size, MAX_VIRTUAL_COUNT),
};

@@ -240,3 +244,3 @@ }

return {
items: this.scrollContainer
items: this.scrollContainer,
};

@@ -253,3 +257,5 @@ }

this._scrollPageHeight = this._viewportHeight - this._scrollLineHeight;
this.grid && this._updateGridMetrics();
if (this.grid) {
this._updateGridMetrics();
}
}

@@ -311,3 +317,3 @@

timeOut.after(this.timeouts.SCROLL_REORDER),
() => this.__reorderElements()
() => this.__reorderElements(),
);

@@ -350,3 +356,3 @@ }

animationFrame,
() => (this._wheelAnimationFrame = false)
() => (this._wheelAnimationFrame = false),
);

@@ -367,3 +373,3 @@

timeOut.after(this.timeouts.IGNORE_WHEEL),
() => (this._ignoreNewWheel = false)
() => (this._ignoreNewWheel = false),
);

@@ -439,3 +445,3 @@ } else if ((this._hasResidualMomentum && momentum <= this._previousMomentum) || this._ignoreNewWheel) {

element.contains(this.elementsContainer.getRootNode().activeElement) ||
element.contains(this.scrollTarget.getRootNode().activeElement)
element.contains(this.scrollTarget.getRootNode().activeElement),
);

@@ -442,0 +448,0 @@ const targetElement = elementWithFocus || visibleElements[0];

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc