@lion/ui 0.8.5 → 0.8.6
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/core/src/ScopedElementsMixin.js +2 -2
- package/components/core/test/ScopedElementsMixin.test.js +34 -1
- package/components/core/test/SlotMixin.test.js +13 -28
- package/components/form-core/test-suites/ValidateMixin.suite.js +7 -7
- package/components/overlays/src/OverlayController.js +25 -1
- package/components/overlays/src/OverlayMixin.js +17 -4
- package/components/overlays/src/utils/adopt-styles.js +3 -3
- package/components/overlays/test/OverlayController.test.js +33 -2
- package/custom-elements.json +106 -0
- package/dist-types/components/core/test/SlotMixin.test.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayController.d.ts +2 -0
- package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/overview.md +1 -1
- package/docs/components/fieldset/overview.md +5 -5
- package/docs/components/form/overview.md +3 -3
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-tel/overview.md +1 -1
- package/docs/components/input-tel/use-cases.md +6 -6
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/listbox/use-cases.md +1 -1
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/use-cases.md +1 -1
- package/docs/components/tabs/examples.md +1 -1
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +42 -139
- package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
- package/docs/fundamentals/rationales/accessibility.md +1 -1
- package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
- package/docs/fundamentals/systems/core/overview.md +1 -1
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
- package/docs/fundamentals/systems/form/model-value.md +1 -1
- package/docs/fundamentals/systems/form/overview.md +28 -28
- package/docs/fundamentals/systems/form/validate.md +2 -2
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/configuration.md +2 -2
- package/docs/fundamentals/systems/overlays/overview.md +5 -5
- package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
- package/docs/fundamentals/tools/helpers/overview.md +1 -1
- package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
- package/docs/guides/how-to/create-a-custom-field.md +5 -5
- package/docs/guides/how-to/create-a-form.md +4 -4
- package/docs/guides/how-to/extend-a-native-input.md +2 -2
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -1
- package/package.json +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +0 -68
- package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +0 -111
- package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +0 -69
- package/docs/fundamentals/node-tools/providence-analytics/assets/_mermaid.svg.js +0 -1226
- package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +0 -22
|
@@ -19,11 +19,11 @@ import '@lion/ui/define/lion-checkbox.js';
|
|
|
19
19
|
</lion-checkbox-group>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
> Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/
|
|
22
|
+
> Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/form/overview.md)'s serialization result.
|
|
23
23
|
|
|
24
24
|
## Features
|
|
25
25
|
|
|
26
|
-
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/
|
|
26
|
+
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/fieldset/overview.md),
|
|
27
27
|
it has all the features a fieldset has.
|
|
28
28
|
|
|
29
29
|
## Installation
|
|
@@ -22,7 +22,7 @@ export const main = () => html`
|
|
|
22
22
|
## Features
|
|
23
23
|
|
|
24
24
|
- Use `opened` attribute or `toggle()` method to render default open.
|
|
25
|
-
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/button/overview.md) or native `button` with custom styling.
|
|
26
26
|
- Observe the state with the help of `@opened-changed` event.
|
|
27
27
|
- `show()` and `hide()` are helper methods to hide or show the content from outside.
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@ export const main = () => html`
|
|
|
34
34
|
`;
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
[...show more](https://github.com/ing-bank/lion/blob/
|
|
37
|
+
[...show more](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/combobox/extensions.md)
|
|
38
38
|
|
|
39
39
|
## Features
|
|
40
40
|
|
|
@@ -457,4 +457,4 @@ export const complexObjectChoiceValue = () =>
|
|
|
457
457
|
## Listbox compatibility
|
|
458
458
|
|
|
459
459
|
All configurations that can be applied to `lion-listbox`, can be applied to `lion-combobox` as well.
|
|
460
|
-
See the [listbox documentation](https://github.com/ing-bank/lion/blob/
|
|
460
|
+
See the [listbox documentation](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/listbox/overview.md) for more information.
|
|
@@ -54,6 +54,6 @@ import '@lion/ui/define/lion-dialog.js';
|
|
|
54
54
|
## Changing the configuration
|
|
55
55
|
|
|
56
56
|
You can use the `.config` property on the dialog to change the configuration.
|
|
57
|
-
The documentation of the full config object can be found in the `overlays` folder or here in [Overlay System - Configuration](https://github.com/ing-bank/lion/blob/
|
|
57
|
+
The documentation of the full config object can be found in the `overlays` folder or here in [Overlay System - Configuration](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/overlays/configuration.md).
|
|
58
58
|
|
|
59
59
|
The `config` property uses a setter to merge the passed configuration with the current, so you only **overwrite what you pass** when updating `config`.
|
|
@@ -20,9 +20,9 @@ export const main = () => html`
|
|
|
20
20
|
|
|
21
21
|
We have three specific fieldset implementations:
|
|
22
22
|
|
|
23
|
-
- [form](https://github.com/ing-bank/lion/blob/
|
|
24
|
-
- [checkbox-group](https://github.com/ing-bank/lion/blob/
|
|
25
|
-
- [radio-group](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
- [form](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/form/overview.md)
|
|
24
|
+
- [checkbox-group](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/checkbox-group/overview.md)
|
|
25
|
+
- [radio-group](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/radio-group/overview.md)
|
|
26
26
|
|
|
27
27
|
A native fieldset element should always have a legend-element for a11y purposes.
|
|
28
28
|
However, our fieldset element is not native and should not have a legend-element.
|
|
@@ -31,8 +31,8 @@ Our fieldset instead has a label attribute or you can add a label with a div- or
|
|
|
31
31
|
## Features
|
|
32
32
|
|
|
33
33
|
- Easy retrieval of form data based on field names
|
|
34
|
-
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/
|
|
35
|
-
- Can have [validate](https://github.com/ing-bank/lion/blob/
|
|
34
|
+
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/interaction-states.md)
|
|
35
|
+
- Can have [validate](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/validate.md) on fieldset level and shows the validation feedback below the fieldset
|
|
36
36
|
- Can disable input fields on fieldset level
|
|
37
37
|
- Accessible out of the box
|
|
38
38
|
|
|
@@ -8,7 +8,7 @@ import '@lion/ui/define/lion-form.js';
|
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
A web component that enhances the functionality of the native `form` component.
|
|
11
|
-
It is designed to interact with (instances of) the [form controls](https://github.com/ing-bank/lion/blob/
|
|
11
|
+
It is designed to interact with (instances of) the [form controls](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/overview.md).
|
|
12
12
|
|
|
13
13
|
```js preview-story
|
|
14
14
|
export const main = () => {
|
|
@@ -37,11 +37,11 @@ export const main = () => {
|
|
|
37
37
|
- Data synchronization with models
|
|
38
38
|
- Easy retrieval of form data based on field names
|
|
39
39
|
- Advanced validation possibilities
|
|
40
|
-
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/
|
|
40
|
+
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/interaction-states.md)
|
|
41
41
|
- Registration mechanism for form controls
|
|
42
42
|
- Accessible out of the box
|
|
43
43
|
|
|
44
|
-
For more information about fields that are designed for our `form`, please read [form system](https://github.com/ing-bank/lion/blob/
|
|
44
|
+
For more information about fields that are designed for our `form`, please read [form system](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/overview.md).
|
|
45
45
|
|
|
46
46
|
## Installation
|
|
47
47
|
|
|
@@ -26,7 +26,7 @@ icons.addIconResolver('lion', (iconset, name) => {
|
|
|
26
26
|
## Icon sets
|
|
27
27
|
|
|
28
28
|
Icons are displayed using icon sets. These are collections of icons, lazily loaded on demand for performance.
|
|
29
|
-
See the [system documentation](https://github.com/ing-bank/lion/blob/
|
|
29
|
+
See the [system documentation](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/icon/overview.md) to learn more about icon sets.
|
|
30
30
|
|
|
31
31
|
```js preview-story
|
|
32
32
|
export const iconSets = () => html`
|
|
@@ -23,7 +23,7 @@ export const main = () => html`<lion-input label="First Name"></lion-input>`;
|
|
|
23
23
|
- **before**: does not have an active use case yet, but the option is in place.
|
|
24
24
|
- **after**: can be used to show a currency or percentage.
|
|
25
25
|
- Delegates attributes like `type`, `disabled`, `placeholder` and `readonly` to the native input.
|
|
26
|
-
- Can make use of [validation](https://github.com/ing-bank/lion/blob/
|
|
26
|
+
- Can make use of [validation](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/validate.md).
|
|
27
27
|
|
|
28
28
|
## Installation
|
|
29
29
|
|
|
@@ -24,13 +24,13 @@ export const main = () => {
|
|
|
24
24
|
|
|
25
25
|
## Features
|
|
26
26
|
|
|
27
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
28
|
-
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/
|
|
27
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input/overview.md)
|
|
28
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
|
|
29
29
|
- Option to show currency as a suffix
|
|
30
30
|
- Option to override locale to change the formatting and parsing
|
|
31
31
|
- Option to provide additional format options overrides
|
|
32
32
|
- Default label in different languages
|
|
33
|
-
- Can make use of number specific [validators](https://github.com/ing-bank/lion/blob/
|
|
33
|
+
- Can make use of number specific [validators](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
34
34
|
- IsNumber (default)
|
|
35
35
|
- MinNumber
|
|
36
36
|
- MaxNumber
|
|
@@ -16,11 +16,11 @@ import '@lion/ui/define/lion-input-date.js';
|
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
20
|
-
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/
|
|
19
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input/overview.md)
|
|
20
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
|
|
21
21
|
- Option to override locale to change the formatting and parsing
|
|
22
22
|
- Default label in different languages
|
|
23
|
-
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
24
24
|
- IsDate (default)
|
|
25
25
|
- MinDate
|
|
26
26
|
- MaxDate
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A web component based on the date text input field. Its purpose is to provide a way for users to fill in a date with a datepicker.
|
|
4
4
|
For an input field with a big range, such as `birthday-input`, a datepicker is not the best choice due to the high variance between possible inputs.
|
|
5
|
-
We encourage using our standard [input-date](https://github.com/ing-bank/lion/blob/
|
|
5
|
+
We encourage using our standard [input-date](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input-date/overview.md) for this.
|
|
6
6
|
|
|
7
7
|
```js script
|
|
8
8
|
import { html } from '@mdjs/mdjs-preview';
|
|
@@ -18,11 +18,11 @@ export const main = () => {
|
|
|
18
18
|
## Features
|
|
19
19
|
|
|
20
20
|
- Input field with a datepicker to help to choose a date
|
|
21
|
-
- Based on our [input-date](https://github.com/ing-bank/lion/blob/
|
|
22
|
-
- Makes use of our [calendar](https://github.com/ing-bank/lion/blob/
|
|
23
|
-
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/
|
|
21
|
+
- Based on our [input-date](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input-date/overview.md)
|
|
22
|
+
- Makes use of our [calendar](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/calendar/overview.md) inside the datepicker
|
|
23
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
|
|
24
24
|
- Option to overwrite locale to change the formatting and parsing
|
|
25
|
-
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
26
26
|
- IsDate (default)
|
|
27
27
|
- MinDate
|
|
28
28
|
- MaxDate
|
|
@@ -15,8 +15,8 @@ export const main = () => {
|
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
19
|
-
- Makes use of email [validators](https://github.com/ing-bank/lion/blob/
|
|
18
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input/overview.md)
|
|
19
|
+
- Makes use of email [validators](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
20
20
|
- IsEmail (default)
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
@@ -15,7 +15,7 @@ export const main = () => {
|
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
18
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input/overview.md)
|
|
19
19
|
- Default labels and validation messages in different languages
|
|
20
20
|
- Options for multi file upload and drop-zone.
|
|
21
21
|
|
|
@@ -16,9 +16,9 @@ export const main = () => {
|
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
19
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input/overview.md)
|
|
20
20
|
- Default label in different languages
|
|
21
|
-
- Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/
|
|
21
|
+
- Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
22
22
|
- IsIBAN (default)
|
|
23
23
|
- IsCountryIBAN
|
|
24
24
|
- Parses IBANs automatically
|
|
@@ -13,11 +13,11 @@ import '@lion/ui/define/lion-input-range.js';
|
|
|
13
13
|
|
|
14
14
|
## Features
|
|
15
15
|
|
|
16
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
16
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input/overview.md).
|
|
17
17
|
- Shows `modelValue` and `unit` above the range input.
|
|
18
18
|
- Shows `min` and `max` value after the range input.
|
|
19
19
|
- Can hide the `min` and `max` value via `no-min-max-labels`.
|
|
20
|
-
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/
|
|
20
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
@@ -18,7 +18,7 @@ loadDefaultFeedbackMessages();
|
|
|
18
18
|
|
|
19
19
|
## Features
|
|
20
20
|
|
|
21
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
21
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input/overview.md).
|
|
22
22
|
- Set `min` and `max` value to define the range.
|
|
23
23
|
- Set `step` value in integer or decimal to increase and decrease the value.
|
|
24
24
|
- Use `ArrowUp` or `ArrowDown` to update the value.
|
|
@@ -39,7 +39,7 @@ export const main = () => {
|
|
|
39
39
|
|
|
40
40
|
## Features
|
|
41
41
|
|
|
42
|
-
- Extends our [input](https://github.com/ing-bank/lion/blob/
|
|
42
|
+
- Extends our [input](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input/overview.md)
|
|
43
43
|
- Shows a mobile telephone keypad on mobile (by having a native `<input inputmode="tel">` inside)
|
|
44
44
|
- Can be configured with a list of allowed region codes
|
|
45
45
|
- Will be preconfigured with region derived from locale
|
|
@@ -22,7 +22,7 @@ Say we have the following telephone number from Madrid, Spain: `+34919930432`.
|
|
|
22
22
|
It contains a [country code](https://en.wikipedia.org/wiki/Country_code) (34), an [area code](https://en.wikipedia.org/wiki/Telephone_numbering_plan#Area_code) (91) and a [dial code](https://en.wikipedia.org/wiki/Mobile_dial_code) (+34 91).
|
|
23
23
|
Input Tel interprets phone numbers based on their [region code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2): a two character long region representation('ES' in the telephone number above).
|
|
24
24
|
|
|
25
|
-
The table below lists all possible regions worldwide. When [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
The table below lists all possible regions worldwide. When [allowed regions](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input-tel/#allowed-regions) are not configured,
|
|
26
26
|
all of them will be supported as values of Input Tel.
|
|
27
27
|
|
|
28
28
|
```js story
|
|
@@ -37,11 +37,11 @@ export const regionCodesTable = () => {
|
|
|
37
37
|
The active region (accessible via readonly accessor `.activeRegion`) determines how validation and formatting
|
|
38
38
|
should be applied. It is dependent on the following factors:
|
|
39
39
|
|
|
40
|
-
- [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
41
|
-
[.allowedRegions has only one entry](https://github.com/ing-bank/lion/blob/
|
|
40
|
+
- [allowed regions](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input-tel/#allowed-regions): a list that determines what is allowed to become .activeRegion. If
|
|
41
|
+
[.allowedRegions has only one entry](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input-tel/#restrict-to-one-region), .activeRegion will always be this value.
|
|
42
42
|
- the modelValue or viewValue: once it contains sufficient info to derive its region code (and
|
|
43
|
-
the derived code is inside [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
44
|
-
- active locale (and the derived locale is inside [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
43
|
+
the derived code is inside [allowed regions](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input-tel/#allowed-regions) if configured)
|
|
44
|
+
- active locale (and the derived locale is inside [allowed regions](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input-tel/#allowed-regions) if configured)
|
|
45
45
|
|
|
46
46
|
What follows from the list above is that .activeRegion can change dynamically, after a value
|
|
47
47
|
change in the text box by the user (or when locales or allowed regions would be changed by the
|
|
@@ -130,7 +130,7 @@ export const heuristic = () => {
|
|
|
130
130
|
Once it is configured, validation and formatting will be restricted to those
|
|
131
131
|
values that are present in this list.
|
|
132
132
|
|
|
133
|
-
> Note that for [InputTelDropdown](https://github.com/ing-bank/lion/blob/
|
|
133
|
+
> Note that for [InputTelDropdown](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input-tel-dropdown/index.md), only allowed regions will
|
|
134
134
|
> be shown in the dropdown list.
|
|
135
135
|
|
|
136
136
|
```js preview-story
|
|
@@ -19,7 +19,7 @@ export const main = () => {
|
|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
22
|
-
- Extends our [input-tel](https://github.com/ing-bank/lion/blob/
|
|
22
|
+
- Extends our [input-tel](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/input-tel/overview.md)
|
|
23
23
|
- Shows dropdown list with all possible regions
|
|
24
24
|
- Shows only allowed regions in dropdown list when .allowedRegions is configured
|
|
25
25
|
- Highlights regions on top of dropdown list when .preferredRegions is configured
|
|
@@ -139,4 +139,4 @@ Navigation will skip over disabled options. Let's disable Artichoke and Brussel
|
|
|
139
139
|
|
|
140
140
|
## Validation
|
|
141
141
|
|
|
142
|
-
A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/
|
|
142
|
+
A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/validate.md).
|
|
@@ -20,12 +20,12 @@ export const main = () => html`
|
|
|
20
20
|
`;
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
- Make sure that to use a name attribute as it is necessary for our [form](https://github.com/ing-bank/lion/blob/
|
|
24
|
-
- If you have many options for a user to pick from, consider using our [select](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
- Make sure that to use a name attribute as it is necessary for our [form](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/form/overview.md)'s serialization result.
|
|
24
|
+
- If you have many options for a user to pick from, consider using our [select](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/select/overview.md) instead.
|
|
25
25
|
|
|
26
26
|
## Features
|
|
27
27
|
|
|
28
|
-
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/
|
|
28
|
+
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/fieldset/overview.md), it has all the features a fieldset has.
|
|
29
29
|
|
|
30
30
|
- Get or set the checked value of the group:
|
|
31
31
|
- modelValue (default) - `checkedValue()`
|
|
@@ -53,7 +53,7 @@ Or by setting the `disabled` attribute on the entire `lion-select` field.
|
|
|
53
53
|
|
|
54
54
|
## Validation
|
|
55
55
|
|
|
56
|
-
A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/
|
|
56
|
+
A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/form/validate.md).
|
|
57
57
|
|
|
58
58
|
## Rendering and updating select options
|
|
59
59
|
|
|
@@ -302,7 +302,7 @@ LionSelectRich will give it acces to:
|
|
|
302
302
|
- LionSelectRich itself, via `.hostElement`
|
|
303
303
|
|
|
304
304
|
Code of an advanced custom invoker is shown below (this is the code for the
|
|
305
|
-
invoker used in [IntlSelectRich](https://github.com/ing-bank/lion/blob/
|
|
305
|
+
invoker used in [IntlSelectRich](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/components/select-rich/examples.md)).
|
|
306
306
|
The invoker is usually added in the invoker slot of the LionSelectRich subclass.
|
|
307
307
|
However, it would also be possible for an application developer to provide the invoker
|
|
308
308
|
by putting it in light dom:
|
|
@@ -9,7 +9,7 @@ import './src/lea-tab-panel.js';
|
|
|
9
9
|
|
|
10
10
|
## Lea Tabs
|
|
11
11
|
|
|
12
|
-
Learn how to create the `lea tabs` in our ["introducing lion" blogpost](https://github.com/ing-bank/lion/blob/
|
|
12
|
+
Learn how to create the `lea tabs` in our ["introducing lion" blogpost](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/blog/ing-open-sources-lion.md).
|
|
13
13
|
|
|
14
14
|
```js preview-story
|
|
15
15
|
export const main = () => html`
|
|
@@ -9,11 +9,11 @@ Here you find more details about what we offer.
|
|
|
9
9
|
|
|
10
10
|
Let's see what each section describes.
|
|
11
11
|
|
|
12
|
-
1. [Systems](https://github.com/ing-bank/lion/blob/
|
|
12
|
+
1. [Systems](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/systems/core/overview.md) <br>
|
|
13
13
|
These are the fundamental systems that power all of our components.
|
|
14
|
-
2. [Tools](https://github.com/ing-bank/lion/blob/
|
|
14
|
+
2. [Tools](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/tools/helpers/overview.md) <br>
|
|
15
15
|
Frontend Tools useful for web development but are not visual and therefore are not components.
|
|
16
|
-
3. [Node Tools](https://github.com/ing-bank/lion/blob/
|
|
16
|
+
3. [Node Tools](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/node-tools/babel-plugin-extend-docs/overview.md) <br>
|
|
17
17
|
Node tools to analyse the code and for extending the documentation.
|
|
18
|
-
4. [Rationales](https://github.com/ing-bank/lion/blob/
|
|
18
|
+
4. [Rationales](https://github.com/ing-bank/lion/blob/d80a8e9dffd7ce23a7960c80af8312acc3f47827/docs/fundamentals/rationales/side-effects.md) <br>
|
|
19
19
|
The reasoning behind some of our decisions.
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
```js script
|
|
4
4
|
import { html } from '@mdjs/mdjs-preview';
|
|
5
|
-
import { providenceFlowSvg, providenceInternalFlowSvg } from './assets/_mermaid.svg.js';
|
|
6
5
|
```
|
|
7
6
|
|
|
8
7
|
Providence is the 'All Seeing Eye' that generates usage statistics by analyzing code.
|
|
@@ -10,8 +9,6 @@ It measures the effectivity and popularity of your software.
|
|
|
10
9
|
With just a few commands you can measure the impact for (breaking) changes, making
|
|
11
10
|
your release process more stable and predictable.
|
|
12
11
|
|
|
13
|
-
Providence can be used as a dev dependency in a project for which metrics
|
|
14
|
-
can be generated via analyzers (see below).
|
|
15
12
|
For instance for a repo "lion-based-ui" that extends @lion/\* we can answer questions like:
|
|
16
13
|
|
|
17
14
|
- **Which subsets of my product are popular?**
|
|
@@ -23,170 +20,76 @@ For instance for a repo "lion-based-ui" that extends @lion/\* we can answer ques
|
|
|
23
20
|
|
|
24
21
|
- etc...
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
Providence uses abstract syntax trees (ASTs) to have the most advanced analysis possible.
|
|
24
|
+
It does this via the [oxc parser](https://oxc.rs/docs/guide/usage/parser.html), the quickest parser available today!
|
|
28
25
|
|
|
29
|
-
##
|
|
26
|
+
## Run
|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
Providence expects an analyzer name that tells it what type of analysis to run:
|
|
32
29
|
|
|
33
30
|
```bash
|
|
34
|
-
|
|
31
|
+
npx providence analyze <analyzer-name>
|
|
35
32
|
```
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
By default Providence ships these analyzers:
|
|
38
35
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
> The example above illustrates how to run the "match-imports" analyzer for reference project 'lion-based-ui'. Note that it is possible to run other analyzers and configurations supported by providence as well. For a full overview of cli options, run `npx providence --help`. All supported analyzers will be viewed when running `npx providence analyze`
|
|
46
|
-
|
|
47
|
-
You are now ready to use providence in your project. All
|
|
48
|
-
data will be stored in json files in the folder `./providence-output`
|
|
49
|
-
|
|
50
|
-

|
|
51
|
-
|
|
52
|
-
## Setup: Dashboard
|
|
53
|
-
|
|
54
|
-
### Add "providence:dashboard" script to package.json
|
|
55
|
-
|
|
56
|
-
```js
|
|
57
|
-
...
|
|
58
|
-
"scripts": {
|
|
59
|
-
...
|
|
60
|
-
"providence:dashboard": "providence dashboard"
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Add providence.conf.js
|
|
65
|
-
|
|
66
|
-
```js
|
|
67
|
-
export default {
|
|
68
|
-
referenceCollections: {
|
|
69
|
-
'lion-based-ui-collection': [
|
|
70
|
-
'./node_modules/lion-based-ui/packages/x',
|
|
71
|
-
'./node_modules/lion-based-ui/packages/y',
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Run `npm run providence:dashboard`
|
|
78
|
-
|
|
79
|
-

|
|
80
|
-
|
|
81
|
-
## Setup: about result output
|
|
82
|
-
|
|
83
|
-
All output files will be stored in `./providence-output`.
|
|
84
|
-
This means they will be committed to git, so your colleagues don't have to
|
|
85
|
-
rerun the analysis (for large projects with many dependencies this can be time consuming)
|
|
86
|
-
and can directly start the dashboard usage metrics.
|
|
87
|
-
Also, note that the files serve as cache (they are stored with hashes based on project version and analyzer configuration). This means that an interrupted analysis can be
|
|
88
|
-
resumed later on.
|
|
89
|
-
|
|
90
|
-
## Conceptual overview
|
|
91
|
-
|
|
92
|
-
Providence performs queries on one or more search targets.
|
|
93
|
-
These search targets consist of one or more software projects (javascript/html repositories)
|
|
94
|
-
|
|
95
|
-
The diagram below shows how `providenceMain` function can be used from an external context.
|
|
96
|
-
|
|
97
|
-
```js story
|
|
98
|
-
export const providenceFlow = () => providenceFlowSvg;
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Flow inside providence
|
|
102
|
-
|
|
103
|
-
The diagram below depicts the flow inside the `providenceMain` function.
|
|
104
|
-
It uses:
|
|
105
|
-
|
|
106
|
-
- InputDataService
|
|
107
|
-
Used to create a data structure based on a folder (for instance the search target or
|
|
108
|
-
the references root). The structure creates entries for every file, which get enriched with code,
|
|
109
|
-
ast results, query results etc. Returns `InputData` object.
|
|
110
|
-
- QueryService
|
|
111
|
-
Requires a `queryConfig` and `InputData` object. It will perform a query (grep search or ast analysis)
|
|
112
|
-
and returns a `QueryResult`.
|
|
113
|
-
It also contains helpers for the creation of a `queryConfig`
|
|
114
|
-
- ReportService
|
|
115
|
-
The result gets outputted to the user. Currently, a log to the console and/or a dump to a json file
|
|
116
|
-
are available as output formats.
|
|
117
|
-
|
|
118
|
-
```js story
|
|
119
|
-
export const providenceInternalFlow = () => providenceInternalFlowSvg;
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Queries
|
|
123
|
-
|
|
124
|
-
Providence requires a queries as input.
|
|
125
|
-
Queries are defined as objects and can be of two types:
|
|
126
|
-
|
|
127
|
-
- feature-query
|
|
128
|
-
- ast-analyzer
|
|
129
|
-
|
|
130
|
-
A `QueryConfig` is required as input to run the `providenceMain` function.
|
|
131
|
-
This object specifies the type of query and contains the relevant meta
|
|
132
|
-
information that will later be outputted in the `QueryResult` (the JSON object that
|
|
133
|
-
the `providenceMain` function returns.)
|
|
134
|
-
|
|
135
|
-
## Analyzer Query
|
|
136
|
-
|
|
137
|
-
Analyzer queries are also created via `QueryConfig`s.
|
|
138
|
-
|
|
139
|
-
Analyzers can be described as predefined queries that use AST traversal.
|
|
36
|
+
- find-imports
|
|
37
|
+
- find-exports
|
|
38
|
+
- find-classes
|
|
39
|
+
- match-imports
|
|
40
|
+
- match-subclasses
|
|
140
41
|
|
|
141
|
-
|
|
42
|
+
Let's say we run `find-imports`:
|
|
142
43
|
|
|
143
44
|
```bash
|
|
144
|
-
providence analyze
|
|
45
|
+
npx providence analyze find-imports
|
|
145
46
|
```
|
|
146
47
|
|
|
147
|
-
Now
|
|
48
|
+
Now it retrieves all relevant data about es module imports.
|
|
49
|
+
There are plenty of edge cases that it needs to take into account here;
|
|
50
|
+
you can have a look at the tests to get an idea about all different cases Providence handles for you.
|
|
148
51
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
- etc...
|
|
52
|
+
## Projects
|
|
53
|
+
|
|
54
|
+
Providence uses the concept of projects. A project is a piece of software to analyze:
|
|
55
|
+
usually an npm artifact or a git (mono-)repository. What all projects have in common,
|
|
56
|
+
is a package.json. From it, the following project data is derived:
|
|
155
57
|
|
|
156
|
-
|
|
58
|
+
- the name
|
|
59
|
+
- the version
|
|
60
|
+
- the files it uses for scanning. One of the following strategies is usually followed:
|
|
61
|
+
- exportmap entrypoints (by 'expanding' package.json "exports" on file system)
|
|
62
|
+
- npm files (it reads package.json "files" | .npmignore)
|
|
63
|
+
- the git files (it reads .gitignore)
|
|
64
|
+
- a custom defined list
|
|
157
65
|
|
|
158
|
-
|
|
159
|
-
## Running providence from its own repo
|
|
66
|
+
For a "find" analyzer, there is one project involved (the target project).
|
|
160
67
|
|
|
161
|
-
|
|
68
|
+
We can specify it like this (we override the default current working directory):
|
|
162
69
|
|
|
163
70
|
```bash
|
|
164
|
-
|
|
71
|
+
npx providence analyze find-imports -t /importing/project
|
|
165
72
|
```
|
|
166
73
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
By adding a reference project, you can automatically see how code in your reference project is
|
|
170
|
-
used across the search target projects.
|
|
171
|
-
Under the hood, this automatically creates a set of queries for you.
|
|
74
|
+
For a "match" analyzer, there is also a reference project.
|
|
75
|
+
Here we match the exports of the reference project (-r) against the imports of the target project (-t).
|
|
172
76
|
|
|
173
77
|
```bash
|
|
174
|
-
|
|
78
|
+
npx providence analyze match-imports -t /importing/project -r /exporting/project
|
|
175
79
|
```
|
|
176
80
|
|
|
177
|
-
|
|
81
|
+
## Utils
|
|
178
82
|
|
|
179
|
-
|
|
83
|
+
Providence comes with many tools for deep traversal of identifiers,
|
|
84
|
+
the (babel like) traversal of ast trees in oxc and swc and more.
|
|
85
|
+
Also more generic utils for caching and performant globbing come delivered with Providence.
|
|
180
86
|
|
|
181
|
-
|
|
182
|
-
git submodule update --init --recursive
|
|
183
|
-
```
|
|
87
|
+
For a better understanding, check out the utils folders (tests and code).
|
|
184
88
|
|
|
185
|
-
|
|
89
|
+
## More
|
|
186
90
|
|
|
187
|
-
|
|
91
|
+
For more options, see:
|
|
188
92
|
|
|
189
93
|
```bash
|
|
190
|
-
|
|
94
|
+
npx providence --help
|
|
191
95
|
```
|
|
192
|
-
-->
|