Socket
Socket
Sign inDemoInstall

@lion/core

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/core - npm Package Compare versions

Comparing version 0.15.0 to 0.16.0

20

CHANGELOG.md
# Change Log
## 0.16.0
### Minor Changes
- 43e4bb81: Type fixes and enhancements:
- all protected/private entries added to form-core type definitions, and their dependents were fixed
- a lot @ts-expect-error and @ts-ignore (all `get slots()` and `get modelValue()` issues are fixed)
- categorized @ts-expect-error / @ts-ignore into:
- [external]: when a 3rd party didn't ship types (could also be browser specs)
- [allow-protected]: when we are allowed to know about protected methods. For instance when code
resides in the same package
- [allow-private]: when we need to check a private value inside a test
- [allow]: miscellaneous allows
- [editor]: when the editor complains, but the cli/ci doesn't
### Patch Changes
- 77a04245: add protected and private type info
## 0.15.0

@@ -4,0 +24,0 @@

6

docs/guides/how-to/creating-a-custom-field.md

@@ -11,3 +11,3 @@ # How To >> Creating a custom field ||20

Custom fields can be created in just a few steps. All you need is an interaction element (like for instance a slider, a listbox or a combobox) and connect it to the [input components](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/components/inputs/input/overview.md).
Custom fields can be created in just a few steps. All you need is an interaction element (like for instance a slider, a listbox or a combobox) and connect it to the [input components](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/components/inputs/input/overview.md).

@@ -23,3 +23,3 @@ ## Prerequisite: an interaction element

Now we want to integrate the slider in our form framework to enrich the user interface, get
validation support and get all the other [benefits of LionField](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/docs/systems/form/overview.md). We start by creating a component `<lion-slider>` that extends from `LionField`. Then we follow the steps below:
validation support and get all the other [benefits of LionField](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/docs/systems/form/overview.md). We start by creating a component `<lion-slider>` that extends from `LionField`. Then we follow the steps below:

@@ -36,3 +36,3 @@ ### 1. Add your interaction element as ‘input slot'

Every time the `user-input-changed` fires, the value of `<my-slider>` is synchronized with the [`modelValue`](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/docs/systems/form/model-value.md) of `<my-slider>`. Now the cycle is complete: the modelValue connects your interaction element to all logic inside the LionField.
Every time the `user-input-changed` fires, the value of `<my-slider>` is synchronized with the [`modelValue`](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/docs/systems/form/model-value.md) of `<my-slider>`. Now the cycle is complete: the modelValue connects your interaction element to all logic inside the LionField.

@@ -39,0 +39,0 @@ Steps as described can be implemented with the following javascript:

@@ -41,3 +41,3 @@ # How To >> Get Started ||10

return [
super.styles,
...super.styles,
css`

@@ -44,0 +44,0 @@ /* your styles here */

@@ -15,5 +15,5 @@ # Guides

- [Definitions and Terms](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/guides/principles/definitions-and-terms.md)
- [Styling](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/guides/principles/styling.md)
- [Scoped Elements](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/guides/principles/scoped-elements.md)
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/guides/principles/definitions-and-terms.md)
- [Styling](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/guides/principles/styling.md)
- [Scoped Elements](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/guides/principles/scoped-elements.md)

@@ -26,4 +26,4 @@ ## Extending Developer

- [Subclasser APIs](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/guides/principles/subclasser-apis.md)
- [Extend documentation](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/blog/extending-documentation)
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/guides/principles/subclasser-apis.md)
- [Extend documentation](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/blog/extending-documentation)

@@ -34,3 +34,3 @@ ## How To

- [Get started](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/guides/how-to/get-started.md)
- [Create a custom field](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/guides/how-to/creating-a-custom-field.md)
- [Get started](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/guides/how-to/get-started.md)
- [Create a custom field](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/guides/how-to/creating-a-custom-field.md)
# Principles >> Scoped Elements ||40
The [CustomElementRegistry](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry) provides methods for registering custom elements. One of the limitations of working with this global registry is that multiple versions of the same element cannot co-exist. This causes bottlenecks in software delivery that should be managed by the teams and complex build systems. [Scoped Custom Element Registries](https://github.com/w3c/webcomponents/issues/716) is a proposal that will solve the problem. Since this functionality won't be available (especially not cross browser) anytime soon, we've adopted [OpenWC's Scoped Elements](https://open-wc.org/scoped-elements/).
The [CustomElementRegistry](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry) provides methods for registering custom elements. One of the limitations of working with this global registry is that multiple versions of the same element cannot co-exist. This causes bottlenecks in software delivery that should be managed by the teams and complex build systems. [Scoped Custom Element Registries](https://github.com/w3c/webcomponents/issues/716) is a proposal that will solve the problem. Since this functionality won't be available (especially not cross browser) anytime soon, we've adopted [OpenWC's Scoped Elements](https://open-wc.org/docs/development/scoped-elements/).

@@ -101,2 +101,2 @@ Whenever a lion component uses composition (meaning it uses another lion component inside), we

We encourage you to have a look at [OpenWC's Scoped elements](https://open-wc.org/scoped-elements).
We encourage you to have a look at [OpenWC's Scoped elements](https://open-wc.org/docs/development/scoped-elements/).

@@ -22,3 +22,3 @@ # Principles >> Styling ||30

readable by screen readers, but invisible for end users.
- When an html table is used, we allow [subclassers](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/guides/principles/subclasser-apis.md) to override the display property (`table-cell`) to `flex`. By putting the proper accessible roles (`role="cell"`) in the markup, we guarantee our markup stays accessible.
- When an html table is used, we allow [subclassers](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/guides/principles/subclasser-apis.md) to override the display property (`table-cell`) to `flex`. By putting the proper accessible roles (`role="cell"`) in the markup, we guarantee our markup stays accessible.

@@ -25,0 +25,0 @@ Although Lion components try to stay as unbiased as possible with regard to styling, defaults will be needed. In these cases we try to follow the platform as much as possible. If the platform doesn't provide defaults, the largest common denominator across existing UI frameworks is taken as a lead.

@@ -18,3 +18,3 @@ # Systems >> Core >> Overview ||10

- [function to deduplicate mixins (dedupeMixin)](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/docs/systems/core/#deduping-of-mixins)
- [function to deduplicate mixins (dedupeMixin)](https://github.com/ing-bank/lion/blob/d65ffd3c04a456407df98b68b8ff860de5fe5cf8/docs/docs/systems/core/#deduping-of-mixins)
- Mixin to handle disabled (DisabledMixin)

@@ -21,0 +21,0 @@ - Mixin to handle disabled AND tabIndex (DisabledWithTabIndexMixin)

{
"name": "@lion/core",
"version": "0.15.0",
"version": "0.16.0",
"description": "Core functionality that is shared across all Lion Web Components",

@@ -5,0 +5,0 @@ "license": "MIT",

export namespace browserDetection {
export const isIE11: boolean;
export const isChrome: any;
export const isIOSChrome: any;
export const isChromium: any;
export const isChrome: boolean | RegExpMatchArray | null | undefined;
export const isIOSChrome: boolean | RegExpMatchArray | null | undefined;
export const isChromium: boolean | RegExpMatchArray | null | undefined;
export const isMac: boolean;
}

@@ -6,4 +6,3 @@ /**

function checkChrome(flavor = 'google-chrome') {
// @ts-ignore
const isChromium = window.chrome;
const isChromium = /** @type {window & { chrome?: boolean}} */ (window).chrome;
if (flavor === 'chromium') {

@@ -14,4 +13,3 @@ return isChromium;

const vendorName = winNav.vendor;
// @ts-ignore
const isOpera = typeof window.opr !== 'undefined';
const isOpera = typeof (/** @type {window & { opr?: boolean}} */ (window).opr) !== 'undefined';
const isIEedge = winNav.userAgent.indexOf('Edge') > -1;

@@ -18,0 +16,0 @@ const isIOSChrome = winNav.userAgent.match('CriOS');

@@ -25,7 +25,14 @@ /* eslint-disable class-methods-use-this */

/** @type {DelegateEvent[]} */
/**
* @type {DelegateEvent[]}
* @private
*/
this.__eventsQueue = [];
/** @type {Object.<string,?>} */
/**
* @type {Object.<string,?>}
* @private
*/
this.__propertiesQueue = {};
/** @private */
this.__setupPropertyDelegation();

@@ -105,2 +112,5 @@ }

/**
* @protected
*/
_connectDelegateMixin() {

@@ -122,2 +132,5 @@ if (this.__connectedDelegateMixin) return;

/**
* @private
*/
__setupPropertyDelegation() {

@@ -159,2 +172,5 @@ const propertyNames = this.delegations.properties.concat(this.delegations.methods);

/**
* @private
*/
__initialAttributeDelegation() {

@@ -171,2 +187,5 @@ const attributeNames = this.delegations.attributes;

/**
* @private
*/
__emptyEventListenerQueue() {

@@ -178,2 +197,5 @@ this.__eventsQueue.forEach(ev => {

/**
* @private
*/
__emptyPropertiesQueue() {

@@ -180,0 +202,0 @@ Object.keys(this.__propertiesQueue).forEach(propName => {

@@ -25,4 +25,7 @@ import { dedupeMixin } from '@open-wc/dedupe-mixin';

super();
/** @protected */
this._requestedToBeDisabled = false;
/** @private */
this.__isUserSettingDisabled = true;
/** @private */
this.__restoreDisabledTo = false;

@@ -47,3 +50,6 @@ this.disabled = false;

/** @param {boolean} value */
/**
* @param {boolean} value
* @private
*/
__internalSetDisabled(value) {

@@ -50,0 +56,0 @@ this.__isUserSettingDisabled = false;

@@ -30,3 +30,5 @@ import { dedupeMixin } from '@open-wc/dedupe-mixin';

super();
/** @private */
this.__isUserSettingTabIndex = true;
/** @private */
this.__restoreTabIndexTo = 0;

@@ -52,2 +54,3 @@ this.__internalSetTabIndex(0);

* @param {number} value
* @private
*/

@@ -54,0 +57,0 @@ __internalSetTabIndex(value) {

@@ -25,2 +25,3 @@ /* eslint-disable class-methods-use-this */

super();
/** @private */
this.__privateSlots = new Set(null);

@@ -38,2 +39,5 @@ }

/**
* @protected
*/
_connectSlotMixin() {

@@ -60,2 +64,3 @@ if (!this.__isConnectedSlotMixin) {

* @return {boolean} true if given slot name been created by SlotMixin
* @protected
*/

@@ -62,0 +67,0 @@ _isPrivateSlot(slotName) {

@@ -13,3 +13,3 @@ import { Constructor } from '@open-wc/dedupe-mixin';

*/
get slots(): SlotsMap;
public get slots(): SlotsMap;

@@ -16,0 +16,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