@lion/ui 0.0.13 → 0.0.14
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/icon/src/LionIcon.js +11 -4
- package/components/localize/src/LocalizeMixin.js +4 -3
- package/custom-elements.json +2 -2
- package/dist-types/components/icon/src/LionIcon.d.ts.map +1 -1
- package/dist-types/components/localize/src/LocalizeMixin.d.ts +1 -0
- package/dist-types/components/localize/src/LocalizeMixin.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-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/radio-group/overview.md +3 -3
- 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/LocalConfiguration.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
- 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/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 +1 -1
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/configuration.md +12 -10
- 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/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
|
@@ -194,11 +194,18 @@ export class LionIcon extends LitElement {
|
|
|
194
194
|
}
|
|
195
195
|
} else {
|
|
196
196
|
const iconIdBeforeResolve = this.iconId;
|
|
197
|
-
const svg = await this._iconManager.resolveIconForId(iconIdBeforeResolve);
|
|
198
197
|
|
|
199
|
-
//
|
|
200
|
-
|
|
201
|
-
|
|
198
|
+
// Wrap in try-catch so error is non-fatal.
|
|
199
|
+
// Failure to load an icon (asset) should not crash the entire app.
|
|
200
|
+
try {
|
|
201
|
+
const svg = await this._iconManager.resolveIconForId(iconIdBeforeResolve);
|
|
202
|
+
// update SVG if it did not change in the meantime to avoid race conditions
|
|
203
|
+
if (this.iconId === iconIdBeforeResolve) {
|
|
204
|
+
this.svg = svg;
|
|
205
|
+
}
|
|
206
|
+
} catch (e) {
|
|
207
|
+
// eslint-disable-next-line no-console
|
|
208
|
+
console.error(e);
|
|
202
209
|
}
|
|
203
210
|
}
|
|
204
211
|
}
|
|
@@ -6,6 +6,7 @@ import { localize } from './singleton.js';
|
|
|
6
6
|
/**
|
|
7
7
|
* @typedef {import('lit/directive.js').DirectiveResult} DirectiveResult
|
|
8
8
|
* @typedef {import('../types/LocalizeMixinTypes.js').LocalizeMixin} LocalizeMixin
|
|
9
|
+
* @typedef {import('../types/LocalizeMixinTypes.js').NamespaceObject} NamespaceObject
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -17,7 +18,7 @@ const LocalizeMixinImplementation = superclass =>
|
|
|
17
18
|
// @ts-ignore https://github.com/microsoft/TypeScript/issues/36821#issuecomment-588375051
|
|
18
19
|
class LocalizeMixin extends superclass {
|
|
19
20
|
/**
|
|
20
|
-
* @returns {
|
|
21
|
+
* @returns {NamespaceObject[]}
|
|
21
22
|
*/
|
|
22
23
|
static get localizeNamespaces() {
|
|
23
24
|
return [];
|
|
@@ -106,11 +107,11 @@ const LocalizeMixinImplementation = superclass =>
|
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
/**
|
|
109
|
-
* @returns {
|
|
110
|
+
* @returns {NamespaceObject[]}
|
|
110
111
|
* @private
|
|
111
112
|
*/
|
|
112
113
|
__getUniqueNamespaces() {
|
|
113
|
-
/** @type {
|
|
114
|
+
/** @type {NamespaceObject[]} */
|
|
114
115
|
const uniqueNamespaces = [];
|
|
115
116
|
|
|
116
117
|
// IE11 does not support iterable in the constructor
|
package/custom-elements.json
CHANGED
|
@@ -27177,7 +27177,7 @@
|
|
|
27177
27177
|
"static": true,
|
|
27178
27178
|
"return": {
|
|
27179
27179
|
"type": {
|
|
27180
|
-
"text": "
|
|
27180
|
+
"text": "NamespaceObject[]"
|
|
27181
27181
|
}
|
|
27182
27182
|
}
|
|
27183
27183
|
},
|
|
@@ -27237,7 +27237,7 @@
|
|
|
27237
27237
|
"name": "__getUniqueNamespaces",
|
|
27238
27238
|
"return": {
|
|
27239
27239
|
"type": {
|
|
27240
|
-
"text": "
|
|
27240
|
+
"text": "NamespaceObject[]"
|
|
27241
27241
|
}
|
|
27242
27242
|
},
|
|
27243
27243
|
"privacy": "private"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LionIcon.d.ts","sourceRoot":"","sources":["../../../../components/icon/src/LionIcon.js"],"names":[],"mappings":"AA6BA;;GAEG;AACH;IACE;QAEI;;;WAGG;;;;QAIH;;;WAGG;;;;;;QAMH;;;WAGG;;;;;QAKH;;WAEG;;;;;;MAON;IAED,+CA6BC;IAIC,aAAiB;IACjB,kBAAmB;IACnB,eAAgB;IAChB;;;OAGG;IACH,cAAoB;IAetB,+CAEC;IAQD;;;;OAIG;IACH,sFAOC;IAED;;OAEG;IACH,mFAEC;IAED,iBAAiB;IACjB,kCAOC;IAED;;;OAGG;IACH,gCAHW,cAAc,iBAAU,QASlC;IAED,iBAAiB;IAEjB,kCAEC;IAED;;;OAGG;IACH,uCAHW,MAAM,
|
|
1
|
+
{"version":3,"file":"LionIcon.d.ts","sourceRoot":"","sources":["../../../../components/icon/src/LionIcon.js"],"names":[],"mappings":"AA6BA;;GAEG;AACH;IACE;QAEI;;;WAGG;;;;QAIH;;;WAGG;;;;;;QAMH;;;WAGG;;;;;QAKH;;WAEG;;;;;;MAON;IAED,+CA6BC;IAIC,aAAiB;IACjB,kBAAmB;IACnB,eAAgB;IAChB;;;OAGG;IACH,cAAoB;IAetB,+CAEC;IAQD;;;;OAIG;IACH,sFAOC;IAED;;OAEG;IACH,mFAEC;IAED,iBAAiB;IACjB,kCAOC;IAED;;;OAGG;IACH,gCAHW,cAAc,iBAAU,QASlC;IAED,iBAAiB;IAEjB,kCAEC;IAED;;;OAGG;IACH,uCAHW,MAAM,iBAyBhB;CACF;6BA9MY,OAAO,KAAK,EAAE,cAAc;0CACZ,oBAAoB,WAAY,MAAM,EAAE,KAAK,MAAM,KAAK,MAAM"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type LocalizeMixin = import('../types/LocalizeMixinTypes.js').LocalizeMixin;
|
|
2
2
|
export const LocalizeMixin: <T extends import("@open-wc/dedupe-mixin").Constructor<import("lit").LitElement>>(superclass: T) => T & import("@open-wc/dedupe-mixin").Constructor<import("../types/LocalizeMixinTypes.js").LocalizeMixinHost> & Pick<typeof import("../types/LocalizeMixinTypes.js").LocalizeMixinHost, "prototype" | "localizeNamespaces" | "waitForLocalizeNamespaces"> & Pick<typeof import("lit").LitElement, "prototype" | "_$litElement$" | "enabledWarnings" | "enableWarning" | "disableWarning" | "addInitializer" | "_initializers" | "elementProperties" | "properties" | "elementStyles" | "styles" | "observedAttributes" | "createProperty" | "getPropertyOptions" | "shadowRootOptions">;
|
|
3
3
|
export type DirectiveResult = import('lit/directive.js').DirectiveResult;
|
|
4
|
+
export type NamespaceObject = import('../types/LocalizeMixinTypes.js').NamespaceObject;
|
|
4
5
|
//# sourceMappingURL=LocalizeMixin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizeMixin.d.ts","sourceRoot":"","sources":["../../../../components/localize/src/LocalizeMixin.js"],"names":[],"mappings":"4BAOa,OAAO,gCAAgC,EAAE,aAAa;
|
|
1
|
+
{"version":3,"file":"LocalizeMixin.d.ts","sourceRoot":"","sources":["../../../../components/localize/src/LocalizeMixin.js"],"names":[],"mappings":"4BAOa,OAAO,gCAAgC,EAAE,aAAa;AA8JnE,srBAAsE;8BA/JzD,OAAO,kBAAkB,EAAE,eAAe;8BAE1C,OAAO,gCAAgC,EAAE,eAAe"}
|