@limetech/lime-elements 37.2.6 → 37.2.7
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/CHANGELOG.md +8 -0
- package/dist/cjs/{config-cb774b61.js → config-e7e1a299.js} +3 -3
- package/dist/cjs/config-e7e1a299.js.map +1 -0
- package/dist/cjs/limel-config.cjs.entry.js +3 -3
- package/dist/cjs/limel-config.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-icon.cjs.entry.js +1 -1
- package/dist/cjs/limel-input-field_3.cjs.entry.js +1 -1
- package/dist/collection/components/config/config.js +22 -5
- package/dist/collection/components/config/config.js.map +1 -1
- package/dist/collection/global/config.js +2 -2
- package/dist/collection/global/config.js.map +1 -1
- package/dist/esm/{config-19f3ce37.js → config-656a588f.js} +3 -3
- package/dist/esm/config-656a588f.js.map +1 -0
- package/dist/esm/limel-config.entry.js +3 -3
- package/dist/esm/limel-config.entry.js.map +1 -1
- package/dist/esm/limel-icon.entry.js +1 -1
- package/dist/esm/limel-input-field_3.entry.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-fa2fbaa8.entry.js → p-04996e4f.entry.js} +2 -2
- package/dist/lime-elements/p-04996e4f.entry.js.map +1 -0
- package/dist/lime-elements/{p-78193666.js → p-2c35fb9d.js} +1 -1
- package/dist/lime-elements/p-2c35fb9d.js.map +1 -0
- package/dist/lime-elements/{p-58b3bb60.entry.js → p-6a83064c.entry.js} +2 -2
- package/dist/lime-elements/{p-af1eb67f.entry.js → p-711c8538.entry.js} +2 -2
- package/dist/types/components/config/config.d.ts +16 -7
- package/dist/types/components.d.ts +42 -12
- package/dist/types/global/config.d.ts +22 -2
- package/package.json +5 -5
- package/dist/cjs/config-cb774b61.js.map +0 -1
- package/dist/esm/config-19f3ce37.js.map +0 -1
- package/dist/lime-elements/p-78193666.js.map +0 -1
- package/dist/lime-elements/p-fa2fbaa8.entry.js.map +0 -1
- /package/dist/lime-elements/{p-58b3bb60.entry.js.map → p-6a83064c.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-af1eb67f.entry.js.map → p-711c8538.entry.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [37.2.7](https://github.com/Lundalogik/lime-elements/compare/v37.2.6...v37.2.7) (2024-02-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **config:** revert unintentional breaking change in 37.2.0 ([49d74b4](https://github.com/Lundalogik/lime-elements/commit/49d74b4ab0d6c6a9b44abc9a8f689ac197b05a9c)), closes [#2781](https://github.com/Lundalogik/lime-elements/issues/2781)
|
|
8
|
+
|
|
1
9
|
## [37.2.6](https://github.com/Lundalogik/lime-elements/compare/v37.2.5...v37.2.6) (2024-02-12)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
class
|
|
3
|
+
class ConfigClass {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.iconPath = '';
|
|
6
6
|
this.defaultLocale = navigator.language;
|
|
@@ -19,11 +19,11 @@ function getFeatureSwitches(storage) {
|
|
|
19
19
|
}
|
|
20
20
|
return features;
|
|
21
21
|
}
|
|
22
|
-
const config = new
|
|
22
|
+
const config = new ConfigClass();
|
|
23
23
|
const globalConfig = (() => {
|
|
24
24
|
return config;
|
|
25
25
|
})();
|
|
26
26
|
|
|
27
27
|
exports.globalConfig = globalConfig;
|
|
28
28
|
|
|
29
|
-
//# sourceMappingURL=config-
|
|
29
|
+
//# sourceMappingURL=config-e7e1a299.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"config-e7e1a299.js","mappings":";;AAsBA,MAAM,WAAW;EAAjB;IACW,aAAQ,GAAG,EAAE,CAAC;IACd,kBAAa,GAAG,SAAS,CAAC,QAAQ,CAAC;IACnC,oBAAe,GAAQ,kBAAkB,CAAC,YAAY,CAAC,CAAC;GAClE;CAAA;AAED,SAAS,kBAAkB,CAAC,OAAgB;EACxC,MAAM,QAAQ,GAAG,EAAE,CAAC;EACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAEnC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;MACpC,SAAS;KACZ;IAED,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,MAAM,CAAC;GACpC;EAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;MACpB,YAAY,GAAG,CAAC;EACzB,OAAO,MAAM,CAAC;AAClB,CAAC;;;;","names":[],"sources":["./src/global/config.ts"],"sourcesContent":["/**\n * Configuration options for limel-config.\n *\n * @public\n */\nexport type Config = {\n /**\n * The path to where the icon library used by limel-icon is located.\n */\n iconPath?: string;\n\n /**\n * The default locale to use for components that support localization.\n */\n defaultLocale?: string;\n\n /**\n * @internal\n */\n featureSwitches?: Record<string, boolean>;\n};\n\nclass ConfigClass implements Config {\n public iconPath = '';\n public defaultLocale = navigator.language;\n public featureSwitches: any = getFeatureSwitches(localStorage);\n}\n\nfunction getFeatureSwitches(storage: Storage) {\n const features = {};\n for (let i = 0; i < storage.length; i++) {\n const key = storage.key(i);\n const value = storage.getItem(key);\n\n if (!['true', 'false'].includes(value)) {\n continue;\n }\n\n features[key] = value === 'true';\n }\n\n return features;\n}\n\nconst config = new ConfigClass();\nexport const globalConfig = (() => {\n return config;\n})();\n"],"version":3}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-38eb64b5.js');
|
|
6
|
-
const config = require('./config-
|
|
6
|
+
const config = require('./config-e7e1a299.js');
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const ConfigComponent = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
index.registerInstance(this, hostRef);
|
|
11
11
|
this.config = undefined;
|
|
@@ -32,6 +32,6 @@ const Config = class {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
exports.limel_config =
|
|
35
|
+
exports.limel_config = ConfigComponent;
|
|
36
36
|
|
|
37
37
|
//# sourceMappingURL=limel-config.cjs.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"limel-config.entry.cjs.js","mappings":";;;;;;;
|
|
1
|
+
{"file":"limel-config.entry.cjs.js","mappings":";;;;;;;MAsBa,eAAe;;;;;EAOjB,gBAAgB;IACnB,IAAI,CAAC,eAAe,EAAE,CAAC;GAC1B;EAEM,kBAAkB;IACrB,IAAI,CAAC,eAAe,EAAE,CAAC;GAC1B;;;;EAKO,eAAe;IACnB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;MACd,OAAO;KACV;IAED,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG;MACjCA,mBAAY,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;KACxC,CAAC,CAAC;GACN;EAEM,MAAM;IACT,OAAO,IAAI,CAAC;GACf;;;;;","names":["globalConfig"],"sources":["./src/components/config/config.tsx"],"sourcesContent":["import { Component, Prop } from '@stencil/core';\nimport { Config, globalConfig } from '../../global/config';\n\n/**\n * Component used to set global configuration for Lime Elements.\n *\n * :::warning\n * **Building something for Lime CRM?** Then you should _NOT_ use this component.\n * Lime CRM already uses this component to set the global configuration for\n * Lime Elements. No matter what problem you are facing at the moment, using\n * this component will not help, and might cause other problems.\n * :::\n *\n * Building your own software, which is using Lime Elements?\n * Then you _might_ need to use this component.\n *\n * @private\n */\n@Component({\n tag: 'limel-config',\n shadow: true,\n})\nexport class ConfigComponent {\n /**\n * Global configuration for Lime Elements.\n */\n @Prop()\n public config: Config;\n\n public componentDidLoad() {\n this.setGlobalConfig();\n }\n\n public componentDidUpdate() {\n this.setGlobalConfig();\n }\n\n /*\n * Copy any config settings to the global config object\n */\n private setGlobalConfig() {\n if (!this.config) {\n return;\n }\n\n Object.keys(this.config).forEach((key) => {\n globalConfig[key] = this.config[key];\n });\n }\n\n public render() {\n return null;\n }\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-38eb64b5.js');
|
|
6
|
-
const config = require('./config-
|
|
6
|
+
const config = require('./config-e7e1a299.js');
|
|
7
7
|
|
|
8
8
|
class CacheStorageIconCache {
|
|
9
9
|
constructor(cache) {
|
|
@@ -6,7 +6,7 @@ const index = require('./index-38eb64b5.js');
|
|
|
6
6
|
const keycodes = require('./keycodes-3949f425.js');
|
|
7
7
|
const linkHelper = require('./link-helper-b7e6c8df.js');
|
|
8
8
|
const randomString = require('./random-string-c8445652.js');
|
|
9
|
-
const config = require('./config-
|
|
9
|
+
const config = require('./config-e7e1a299.js');
|
|
10
10
|
const component = require('./component-37425b99.js');
|
|
11
11
|
const isObject = require('./isObject-e28b7997.js');
|
|
12
12
|
const toNumber = require('./toNumber-062ea29c.js');
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { globalConfig } from '../../global/config';
|
|
2
2
|
/**
|
|
3
|
+
* Component used to set global configuration for Lime Elements.
|
|
4
|
+
*
|
|
5
|
+
* :::warning
|
|
6
|
+
* **Building something for Lime CRM?** Then you should _NOT_ use this component.
|
|
7
|
+
* Lime CRM already uses this component to set the global configuration for
|
|
8
|
+
* Lime Elements. No matter what problem you are facing at the moment, using
|
|
9
|
+
* this component will not help, and might cause other problems.
|
|
10
|
+
* :::
|
|
11
|
+
*
|
|
12
|
+
* Building your own software, which is using Lime Elements?
|
|
13
|
+
* Then you _might_ need to use this component.
|
|
14
|
+
*
|
|
3
15
|
* @private
|
|
4
16
|
*/
|
|
5
|
-
export class
|
|
17
|
+
export class ConfigComponent {
|
|
6
18
|
constructor() {
|
|
7
19
|
this.config = undefined;
|
|
8
20
|
}
|
|
@@ -34,15 +46,20 @@ export class Config {
|
|
|
34
46
|
"type": "unknown",
|
|
35
47
|
"mutable": false,
|
|
36
48
|
"complexType": {
|
|
37
|
-
"original": "
|
|
38
|
-
"resolved": "{ iconPath?: string; defaultLocale?: string; featureSwitches
|
|
39
|
-
"references": {
|
|
49
|
+
"original": "Config",
|
|
50
|
+
"resolved": "{ iconPath?: string; defaultLocale?: string; featureSwitches?: Record<string, boolean>; }",
|
|
51
|
+
"references": {
|
|
52
|
+
"Config": {
|
|
53
|
+
"location": "import",
|
|
54
|
+
"path": "../../global/config"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
40
57
|
},
|
|
41
58
|
"required": false,
|
|
42
59
|
"optional": false,
|
|
43
60
|
"docs": {
|
|
44
61
|
"tags": [],
|
|
45
|
-
"text": "Global configuration for Lime Elements"
|
|
62
|
+
"text": "Global configuration for Lime Elements."
|
|
46
63
|
}
|
|
47
64
|
}
|
|
48
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/components/config/config.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/components/config/config.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAU,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;GAcG;AAKH,MAAM,OAAO,eAAe;;;;EAOjB,gBAAgB;IACnB,IAAI,CAAC,eAAe,EAAE,CAAC;EAC3B,CAAC;EAEM,kBAAkB;IACrB,IAAI,CAAC,eAAe,EAAE,CAAC;EAC3B,CAAC;EAED;;KAEG;EACK,eAAe;IACnB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;MACd,OAAO;KACV;IAED,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;MACrC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;EACP,CAAC;EAEM,MAAM;IACT,OAAO,IAAI,CAAC;EAChB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop } from '@stencil/core';\nimport { Config, globalConfig } from '../../global/config';\n\n/**\n * Component used to set global configuration for Lime Elements.\n *\n * :::warning\n * **Building something for Lime CRM?** Then you should _NOT_ use this component.\n * Lime CRM already uses this component to set the global configuration for\n * Lime Elements. No matter what problem you are facing at the moment, using\n * this component will not help, and might cause other problems.\n * :::\n *\n * Building your own software, which is using Lime Elements?\n * Then you _might_ need to use this component.\n *\n * @private\n */\n@Component({\n tag: 'limel-config',\n shadow: true,\n})\nexport class ConfigComponent {\n /**\n * Global configuration for Lime Elements.\n */\n @Prop()\n public config: Config;\n\n public componentDidLoad() {\n this.setGlobalConfig();\n }\n\n public componentDidUpdate() {\n this.setGlobalConfig();\n }\n\n /*\n * Copy any config settings to the global config object\n */\n private setGlobalConfig() {\n if (!this.config) {\n return;\n }\n\n Object.keys(this.config).forEach((key) => {\n globalConfig[key] = this.config[key];\n });\n }\n\n public render() {\n return null;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
class ConfigClass {
|
|
2
2
|
constructor() {
|
|
3
3
|
this.iconPath = '';
|
|
4
4
|
this.defaultLocale = navigator.language;
|
|
@@ -17,7 +17,7 @@ function getFeatureSwitches(storage) {
|
|
|
17
17
|
}
|
|
18
18
|
return features;
|
|
19
19
|
}
|
|
20
|
-
const config = new
|
|
20
|
+
const config = new ConfigClass();
|
|
21
21
|
export const globalConfig = (() => {
|
|
22
22
|
return config;
|
|
23
23
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/global/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/global/config.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW;EAAjB;IACW,aAAQ,GAAG,EAAE,CAAC;IACd,kBAAa,GAAG,SAAS,CAAC,QAAQ,CAAC;IACnC,oBAAe,GAAQ,kBAAkB,CAAC,YAAY,CAAC,CAAC;EACnE,CAAC;CAAA;AAED,SAAS,kBAAkB,CAAC,OAAgB;EACxC,MAAM,QAAQ,GAAG,EAAE,CAAC;EACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAEnC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;MACpC,SAAS;KACZ;IAED,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,MAAM,CAAC;GACpC;EAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;AACjC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE;EAC9B,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/**\n * Configuration options for limel-config.\n *\n * @public\n */\nexport type Config = {\n /**\n * The path to where the icon library used by limel-icon is located.\n */\n iconPath?: string;\n\n /**\n * The default locale to use for components that support localization.\n */\n defaultLocale?: string;\n\n /**\n * @internal\n */\n featureSwitches?: Record<string, boolean>;\n};\n\nclass ConfigClass implements Config {\n public iconPath = '';\n public defaultLocale = navigator.language;\n public featureSwitches: any = getFeatureSwitches(localStorage);\n}\n\nfunction getFeatureSwitches(storage: Storage) {\n const features = {};\n for (let i = 0; i < storage.length; i++) {\n const key = storage.key(i);\n const value = storage.getItem(key);\n\n if (!['true', 'false'].includes(value)) {\n continue;\n }\n\n features[key] = value === 'true';\n }\n\n return features;\n}\n\nconst config = new ConfigClass();\nexport const globalConfig = (() => {\n return config;\n})();\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class ConfigClass {
|
|
2
2
|
constructor() {
|
|
3
3
|
this.iconPath = '';
|
|
4
4
|
this.defaultLocale = navigator.language;
|
|
@@ -17,11 +17,11 @@ function getFeatureSwitches(storage) {
|
|
|
17
17
|
}
|
|
18
18
|
return features;
|
|
19
19
|
}
|
|
20
|
-
const config = new
|
|
20
|
+
const config = new ConfigClass();
|
|
21
21
|
const globalConfig = (() => {
|
|
22
22
|
return config;
|
|
23
23
|
})();
|
|
24
24
|
|
|
25
25
|
export { globalConfig as g };
|
|
26
26
|
|
|
27
|
-
//# sourceMappingURL=config-
|
|
27
|
+
//# sourceMappingURL=config-656a588f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"config-656a588f.js","mappings":"AAsBA,MAAM,WAAW;EAAjB;IACW,aAAQ,GAAG,EAAE,CAAC;IACd,kBAAa,GAAG,SAAS,CAAC,QAAQ,CAAC;IACnC,oBAAe,GAAQ,kBAAkB,CAAC,YAAY,CAAC,CAAC;GAClE;CAAA;AAED,SAAS,kBAAkB,CAAC,OAAgB;EACxC,MAAM,QAAQ,GAAG,EAAE,CAAC;EACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAEnC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;MACpC,SAAS;KACZ;IAED,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,MAAM,CAAC;GACpC;EAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;MACpB,YAAY,GAAG,CAAC;EACzB,OAAO,MAAM,CAAC;AAClB,CAAC;;;;","names":[],"sources":["./src/global/config.ts"],"sourcesContent":["/**\n * Configuration options for limel-config.\n *\n * @public\n */\nexport type Config = {\n /**\n * The path to where the icon library used by limel-icon is located.\n */\n iconPath?: string;\n\n /**\n * The default locale to use for components that support localization.\n */\n defaultLocale?: string;\n\n /**\n * @internal\n */\n featureSwitches?: Record<string, boolean>;\n};\n\nclass ConfigClass implements Config {\n public iconPath = '';\n public defaultLocale = navigator.language;\n public featureSwitches: any = getFeatureSwitches(localStorage);\n}\n\nfunction getFeatureSwitches(storage: Storage) {\n const features = {};\n for (let i = 0; i < storage.length; i++) {\n const key = storage.key(i);\n const value = storage.getItem(key);\n\n if (!['true', 'false'].includes(value)) {\n continue;\n }\n\n features[key] = value === 'true';\n }\n\n return features;\n}\n\nconst config = new ConfigClass();\nexport const globalConfig = (() => {\n return config;\n})();\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance } from './index-232e9616.js';
|
|
2
|
-
import { g as globalConfig } from './config-
|
|
2
|
+
import { g as globalConfig } from './config-656a588f.js';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const ConfigComponent = class {
|
|
5
5
|
constructor(hostRef) {
|
|
6
6
|
registerInstance(this, hostRef);
|
|
7
7
|
this.config = undefined;
|
|
@@ -28,6 +28,6 @@ const Config = class {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export {
|
|
31
|
+
export { ConfigComponent as limel_config };
|
|
32
32
|
|
|
33
33
|
//# sourceMappingURL=limel-config.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"limel-config.entry.js","mappings":";;;
|
|
1
|
+
{"file":"limel-config.entry.js","mappings":";;;MAsBa,eAAe;;;;;EAOjB,gBAAgB;IACnB,IAAI,CAAC,eAAe,EAAE,CAAC;GAC1B;EAEM,kBAAkB;IACrB,IAAI,CAAC,eAAe,EAAE,CAAC;GAC1B;;;;EAKO,eAAe;IACnB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;MACd,OAAO;KACV;IAED,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG;MACjC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;KACxC,CAAC,CAAC;GACN;EAEM,MAAM;IACT,OAAO,IAAI,CAAC;GACf;;;;;","names":[],"sources":["./src/components/config/config.tsx"],"sourcesContent":["import { Component, Prop } from '@stencil/core';\nimport { Config, globalConfig } from '../../global/config';\n\n/**\n * Component used to set global configuration for Lime Elements.\n *\n * :::warning\n * **Building something for Lime CRM?** Then you should _NOT_ use this component.\n * Lime CRM already uses this component to set the global configuration for\n * Lime Elements. No matter what problem you are facing at the moment, using\n * this component will not help, and might cause other problems.\n * :::\n *\n * Building your own software, which is using Lime Elements?\n * Then you _might_ need to use this component.\n *\n * @private\n */\n@Component({\n tag: 'limel-config',\n shadow: true,\n})\nexport class ConfigComponent {\n /**\n * Global configuration for Lime Elements.\n */\n @Prop()\n public config: Config;\n\n public componentDidLoad() {\n this.setGlobalConfig();\n }\n\n public componentDidUpdate() {\n this.setGlobalConfig();\n }\n\n /*\n * Copy any config settings to the global config object\n */\n private setGlobalConfig() {\n if (!this.config) {\n return;\n }\n\n Object.keys(this.config).forEach((key) => {\n globalConfig[key] = this.config[key];\n });\n }\n\n public render() {\n return null;\n }\n}\n"],"version":3}
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, g as getElement, H as Host
|
|
|
2
2
|
import { d as TAB_KEY_CODE, T as TAB, A as ARROW_UP, g as ARROW_UP_KEY_CODE, h as ARROW_DOWN, i as ARROW_DOWN_KEY_CODE, E as ESCAPE, c as ENTER, e as ESCAPE_KEY_CODE, f as ENTER_KEY_CODE, S as SPACE, j as SPACE_KEY_CODE } from './keycodes-22fb659d.js';
|
|
3
3
|
import { g as getHref, a as getTarget } from './link-helper-725a9166.js';
|
|
4
4
|
import { c as createRandomString } from './random-string-812b1c35.js';
|
|
5
|
-
import { g as globalConfig } from './config-
|
|
5
|
+
import { g as globalConfig } from './config-656a588f.js';
|
|
6
6
|
import { M as MDCTextField } from './component-58f68f3e.js';
|
|
7
7
|
import { r as root, i as isObject } from './isObject-c74e273c.js';
|
|
8
8
|
import { t as toNumber } from './toNumber-a6ed64f0.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-3075aa67.js";export{s as setNonce}from"./p-3075aa67.js";const i=()=>{const l=import.meta.url;const i={};if(l!==""){i.resourcesUrl=new URL(".",l).href}return e(i)};i().then((e=>l([["p-5240b8a3",[[1,"limel-helper-line",{helperText:[513,"helper-text"],length:[514],maxLength:[514,"max-length"],invalid:[516],helperTextId:[513,"helper-text-id"]}]]],["p-019675bd",[[1,"limel-action-bar",{actions:[16],accessibleLabel:[513,"accessible-label"],layout:[513],openDirection:[513,"open-direction"],overflowCutoff:[32]}]]],["p-d3f9a2f1",[[1,"limel-split-button",{label:[513],primary:[516],icon:[513],disabled:[516],items:[16]}]]],["p-c0543a74",[[1,"limel-file-viewer",{url:[513],filename:[513],alt:[513],allowFullscreen:[516,"allow-fullscreen"],allowOpenInNewTab:[516,"allow-open-in-new-tab"],allowDownload:[516,"allow-download"],language:[1],officeViewer:[513,"office-viewer"],actions:[16],isFullscreen:[32],fileType:[32],loading:[32],fileUrl:[32]}]]],["p-e0f37631",[[1,"limel-color-picker",{value:[513],label:[513],helperText:[513,"helper-text"],tooltipLabel:[513,"tooltip-label"],required:[516],readonly:[516],isOpen:[32]}]]],["p-5d140ffb",[[1,"limel-dock",{dockItems:[16],dockFooterItems:[16],accessibleLabel:[513,"accessible-label"],expanded:[516],allowResize:[516,"allow-resize"],mobileBreakPoint:[514,"mobile-break-point"],useMobileLayout:[32]}]]],["p-f70a9044",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],helperText:[513,"helper-text"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],invalid:[516],value:[16],searcher:[16],multiple:[4],delimiter:[513],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],badgeIcons:[516,"badge-icons"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-8b79a71e",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[513],format:[513],language:[513],formatter:[16],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-030dba13",[[1,"limel-snackbar",{message:[1],timeout:[2],actionText:[1,"action-text"],dismissible:[4],multiline:[4],language:[1],show:[64]}]]],["p-095e03af",[[1,"limel-tab-panel",{tabs:[1040]}]]],["p-9928ba36",[[1,"limel-button-group",{value:[16],disabled:[516],selectedButtonId:[32]}]]],["p-1291ed2c",[[1,"limel-collapsible-section",{isOpen:[1540,"is-open"],header:[513],actions:[16]}]]],["p-1ca94bcf",[[1,"limel-help",{value:[1],trigger:[1],readMoreLink:[16],openDirection:[513,"open-direction"],isOpen:[32]}]]],["p-c022dd0d",[[1,"limel-select",{disabled:[516],readonly:[516],invalid:[516],required:[516],label:[513],helperText:[513,"helper-text"],value:[16],options:[16],multiple:[4],menuOpen:[32]}]]],["p-bbe3ce51",[[1,"limel-file",{value:[16],label:[513],required:[516],disabled:[516],readonly:[516],invalid:[516],accept:[513],language:[1],isDraggingOverDropZone:[32]}]]],["p-3985cb80",[[1,"limel-info-tile",{value:[520],icon:[1],label:[513],prefix:[513],suffix:[513],disabled:[516],badge:[520],loading:[516],link:[16],progress:[16]}]]],["p-e5ca6c0c",[[1,"limel-checkbox",{disabled:[516],readonly:[516],invalid:[516],label:[513],helperText:[513,"helper-text"],checked:[516],indeterminate:[516],required:[516],modified:[32]}]]],["p-1c67a941",[[1,"limel-table",{data:[16],columns:[16],mode:[1],layout:[1],pageSize:[2,"page-size"],totalRows:[2,"total-rows"],sorting:[16],activeRow:[1040],movableColumns:[4,"movable-columns"],loading:[4],page:[2],emptyMessage:[1,"empty-message"],aggregates:[16],selectable:[4],selection:[16]}]]],["p-48aa89a6",[[1,"limel-chip",{language:[513],text:[513],icon:[1],link:[16],badge:[520],disabled:[516],readonly:[516],selected:[516],removable:[516],type:[513]}]]],["p-82077942",[[1,"limel-dialog",{heading:[1],fullscreen:[516],open:[1540],closingActions:[16]}]]],["p-bccf626e",[[1,"limel-progress-flow",{flowItems:[16],disabled:[4],readonly:[4]}]]],["p-dd034867",[[1,"limel-shortcut",{icon:[513],label:[513],disabled:[516],badge:[520],link:[16]}]]],["p-ce3cf1a1",[[1,"limel-banner",{message:[513],icon:[513],isOpen:[32],open:[64],close:[64]}]]],["p-235c7556",[[1,"limel-callout",{heading:[513],icon:[513],type:[513],language:[1]}]]],["p-79fa180b",[[1,"limel-slider",{disabled:[516],readonly:[516],factor:[514],label:[513],helperText:[513,"helper-text"],unit:[513],value:[514],valuemax:[514],valuemin:[514],step:[514],percentageClass:[32]}]]],["p-386d1c5a",[[1,"limel-switch",{label:[513],disabled:[516],readonly:[516],invalid:[516],value:[516],helperText:[513,"helper-text"],fieldId:[32]}]]],["p-7ecb6224",[[1,"limel-code-editor",{value:[1],language:[1],readonly:[4],lineNumbers:[4,"line-numbers"],fold:[4],lint:[4],colorScheme:[1,"color-scheme"],random:[32]}]]],["p-
|
|
1
|
+
import{p as e,b as l}from"./p-3075aa67.js";export{s as setNonce}from"./p-3075aa67.js";const i=()=>{const l=import.meta.url;const i={};if(l!==""){i.resourcesUrl=new URL(".",l).href}return e(i)};i().then((e=>l([["p-5240b8a3",[[1,"limel-helper-line",{helperText:[513,"helper-text"],length:[514],maxLength:[514,"max-length"],invalid:[516],helperTextId:[513,"helper-text-id"]}]]],["p-019675bd",[[1,"limel-action-bar",{actions:[16],accessibleLabel:[513,"accessible-label"],layout:[513],openDirection:[513,"open-direction"],overflowCutoff:[32]}]]],["p-d3f9a2f1",[[1,"limel-split-button",{label:[513],primary:[516],icon:[513],disabled:[516],items:[16]}]]],["p-c0543a74",[[1,"limel-file-viewer",{url:[513],filename:[513],alt:[513],allowFullscreen:[516,"allow-fullscreen"],allowOpenInNewTab:[516,"allow-open-in-new-tab"],allowDownload:[516,"allow-download"],language:[1],officeViewer:[513,"office-viewer"],actions:[16],isFullscreen:[32],fileType:[32],loading:[32],fileUrl:[32]}]]],["p-e0f37631",[[1,"limel-color-picker",{value:[513],label:[513],helperText:[513,"helper-text"],tooltipLabel:[513,"tooltip-label"],required:[516],readonly:[516],isOpen:[32]}]]],["p-5d140ffb",[[1,"limel-dock",{dockItems:[16],dockFooterItems:[16],accessibleLabel:[513,"accessible-label"],expanded:[516],allowResize:[516,"allow-resize"],mobileBreakPoint:[514,"mobile-break-point"],useMobileLayout:[32]}]]],["p-f70a9044",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],helperText:[513,"helper-text"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],invalid:[516],value:[16],searcher:[16],multiple:[4],delimiter:[513],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],badgeIcons:[516,"badge-icons"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-8b79a71e",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[513],format:[513],language:[513],formatter:[16],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-030dba13",[[1,"limel-snackbar",{message:[1],timeout:[2],actionText:[1,"action-text"],dismissible:[4],multiline:[4],language:[1],show:[64]}]]],["p-095e03af",[[1,"limel-tab-panel",{tabs:[1040]}]]],["p-9928ba36",[[1,"limel-button-group",{value:[16],disabled:[516],selectedButtonId:[32]}]]],["p-1291ed2c",[[1,"limel-collapsible-section",{isOpen:[1540,"is-open"],header:[513],actions:[16]}]]],["p-1ca94bcf",[[1,"limel-help",{value:[1],trigger:[1],readMoreLink:[16],openDirection:[513,"open-direction"],isOpen:[32]}]]],["p-c022dd0d",[[1,"limel-select",{disabled:[516],readonly:[516],invalid:[516],required:[516],label:[513],helperText:[513,"helper-text"],value:[16],options:[16],multiple:[4],menuOpen:[32]}]]],["p-bbe3ce51",[[1,"limel-file",{value:[16],label:[513],required:[516],disabled:[516],readonly:[516],invalid:[516],accept:[513],language:[1],isDraggingOverDropZone:[32]}]]],["p-3985cb80",[[1,"limel-info-tile",{value:[520],icon:[1],label:[513],prefix:[513],suffix:[513],disabled:[516],badge:[520],loading:[516],link:[16],progress:[16]}]]],["p-e5ca6c0c",[[1,"limel-checkbox",{disabled:[516],readonly:[516],invalid:[516],label:[513],helperText:[513,"helper-text"],checked:[516],indeterminate:[516],required:[516],modified:[32]}]]],["p-1c67a941",[[1,"limel-table",{data:[16],columns:[16],mode:[1],layout:[1],pageSize:[2,"page-size"],totalRows:[2,"total-rows"],sorting:[16],activeRow:[1040],movableColumns:[4,"movable-columns"],loading:[4],page:[2],emptyMessage:[1,"empty-message"],aggregates:[16],selectable:[4],selection:[16]}]]],["p-48aa89a6",[[1,"limel-chip",{language:[513],text:[513],icon:[1],link:[16],badge:[520],disabled:[516],readonly:[516],selected:[516],removable:[516],type:[513]}]]],["p-82077942",[[1,"limel-dialog",{heading:[1],fullscreen:[516],open:[1540],closingActions:[16]}]]],["p-bccf626e",[[1,"limel-progress-flow",{flowItems:[16],disabled:[4],readonly:[4]}]]],["p-dd034867",[[1,"limel-shortcut",{icon:[513],label:[513],disabled:[516],badge:[520],link:[16]}]]],["p-ce3cf1a1",[[1,"limel-banner",{message:[513],icon:[513],isOpen:[32],open:[64],close:[64]}]]],["p-235c7556",[[1,"limel-callout",{heading:[513],icon:[513],type:[513],language:[1]}]]],["p-79fa180b",[[1,"limel-slider",{disabled:[516],readonly:[516],factor:[514],label:[513],helperText:[513,"helper-text"],unit:[513],value:[514],valuemax:[514],valuemin:[514],step:[514],percentageClass:[32]}]]],["p-386d1c5a",[[1,"limel-switch",{label:[513],disabled:[516],readonly:[516],invalid:[516],value:[516],helperText:[513,"helper-text"],fieldId:[32]}]]],["p-7ecb6224",[[1,"limel-code-editor",{value:[1],language:[1],readonly:[4],lineNumbers:[4,"line-numbers"],fold:[4],lint:[4],colorScheme:[1,"color-scheme"],random:[32]}]]],["p-04996e4f",[[1,"limel-config",{config:[16]}]]],["p-bd62071d",[[1,"limel-flex-container",{direction:[513],justify:[513],align:[513],reverse:[516]}]]],["p-60063e02",[[1,"limel-form",{schema:[16],value:[16],disabled:[4],propsFactory:[16],transformErrors:[16],errors:[16]}]]],["p-4a04ede1",[[1,"limel-grid"]]],["p-89a75b1e",[[0,"limel-dock-button",{item:[16],expanded:[516],useMobileLayout:[516,"use-mobile-layout"],isOpen:[32]}]]],["p-554cdf9e",[[1,"limel-color-picker-palette",{value:[513],label:[513],helperText:[513,"helper-text"],required:[516]}]]],["p-b9922526",[[1,"limel-icon-button",{icon:[513],elevated:[516],label:[513],disabled:[516]}]]],["p-85a770a4",[[1,"limel-tab-bar",{tabs:[1040],canScrollLeft:[32],canScrollRight:[32]},[[9,"resize","handleWindowResize"]]]]],["p-af53d049",[[1,"limel-header",{icon:[1],heading:[1],subheading:[1],supportingText:[1,"supporting-text"],subheadingDivider:[1,"subheading-divider"]}]]],["p-86550ce4",[[1,"limel-help-content",{value:[1],readMoreLink:[16]}]]],["p-854343a1",[[0,"limel-progress-flow-item",{item:[16],disabled:[4],readonly:[4],currentStep:[4,"current-step"]}]]],["p-f081f064",[[1,"limel-flatpickr-adapter",{value:[16],type:[1],format:[1],isOpen:[4,"is-open"],inputElement:[16],language:[1],formatter:[16]}]]],["p-552fd521",[[1,"limel-spinner",{size:[513],limeBranded:[4,"lime-branded"]}]]],["p-774ec512",[[1,"limel-badge",{label:[520]}]]],["p-6a83064c",[[1,"limel-icon",{size:[513],name:[513],badge:[516]}]]],["p-4a8ac53b",[[1,"limel-menu",{items:[16],disabled:[516],openDirection:[513,"open-direction"],surfaceWidth:[513,"surface-width"],open:[1540],badgeIcons:[516,"badge-icons"],gridLayout:[516,"grid-layout"],loading:[516],currentSubMenu:[1040],searcher:[16],emptyResultMessage:[1,"empty-result-message"],loadingSubItems:[32],menuBreadCrumb:[32],searchValue:[32],searchResults:[32]}],[1,"limel-breadcrumbs",{items:[16],divider:[1]}],[1,"limel-menu-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[1],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}]]],["p-acd589ef",[[0,"limel-action-bar-overflow-menu",{items:[16],openDirection:[513,"open-direction"]}],[0,"limel-action-bar-item",{item:[16],isVisible:[516,"is-visible"]}]]],["p-8a9d91cf",[[1,"limel-chip-set",{value:[16],type:[513],label:[513],helperText:[513,"helper-text"],disabled:[516],readonly:[516],invalid:[516],inputType:[513,"input-type"],maxItems:[514,"max-items"],required:[516],searchLabel:[513,"search-label"],emptyInputOnBlur:[516,"empty-input-on-blur"],clearAllButton:[4,"clear-all-button"],leadingIcon:[513,"leading-icon"],delimiter:[513],language:[1],editMode:[32],textValue:[32],blurred:[32],inputChipIndexSelected:[32],getEditMode:[64],setFocus:[64],emptyInput:[64]}]]],["p-8be76471",[[1,"limel-button",{label:[513],primary:[516],outlined:[516],icon:[513],disabled:[516],loading:[516],loadingFailed:[516,"loading-failed"],justLoaded:[32]}]]],["p-f6288a1d",[[1,"limel-circular-progress",{value:[2],maxValue:[2,"max-value"],prefix:[513],suffix:[1],displayPercentageColors:[4,"display-percentage-colors"],size:[513]}],[1,"limel-linear-progress",{value:[514],indeterminate:[516]}]]],["p-920d88db",[[1,"limel-markdown",{value:[1]}]]],["p-e39732b4",[[1,"limel-tooltip",{elementId:[513,"element-id"],label:[513],helperLabel:[513,"helper-label"],maxlength:[514],openDirection:[513,"open-direction"],open:[32]}],[1,"limel-tooltip-content",{label:[513],helperLabel:[513,"helper-label"],maxlength:[514]}],[1,"limel-portal",{openDirection:[513,"open-direction"],position:[513],containerId:[513,"container-id"],containerStyle:[16],parent:[16],inheritParentWidth:[516,"inherit-parent-width"],visible:[516],anchor:[16]}]]],["p-e53b7ccf",[[1,"limel-popover",{open:[4],openDirection:[513,"open-direction"]}],[1,"limel-popover-surface",{contentCollection:[16]}]]],["p-711c8538",[[1,"limel-input-field",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],prefix:[513],suffix:[513],required:[516],value:[513],trailingIcon:[513,"trailing-icon"],leadingIcon:[513,"leading-icon"],pattern:[513],type:[513],formatNumber:[516,"format-number"],step:[520],max:[514],min:[514],maxlength:[514],minlength:[514],completions:[16],showLink:[516,"show-link"],locale:[513],isFocused:[32],isModified:[32],showCompletions:[32]}],[1,"limel-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[1],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{open:[4],allowClicksElement:[16]}]]]],e)));
|
|
2
2
|
//# sourceMappingURL=lime-elements.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t}from"./p-3075aa67.js";import{g as s}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t}from"./p-3075aa67.js";import{g as s}from"./p-2c35fb9d.js";const i=class{constructor(s){t(this,s);this.config=undefined}componentDidLoad(){this.setGlobalConfig()}componentDidUpdate(){this.setGlobalConfig()}setGlobalConfig(){if(!this.config){return}Object.keys(this.config).forEach((t=>{s[t]=this.config[t]}))}render(){return null}};export{i as limel_config};
|
|
2
|
+
//# sourceMappingURL=p-04996e4f.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ConfigComponent","componentDidLoad","this","setGlobalConfig","componentDidUpdate","config","Object","keys","forEach","key","globalConfig","render"],"sources":["./src/components/config/config.tsx"],"sourcesContent":["import { Component, Prop } from '@stencil/core';\nimport { Config, globalConfig } from '../../global/config';\n\n/**\n * Component used to set global configuration for Lime Elements.\n *\n * :::warning\n * **Building something for Lime CRM?** Then you should _NOT_ use this component.\n * Lime CRM already uses this component to set the global configuration for\n * Lime Elements. No matter what problem you are facing at the moment, using\n * this component will not help, and might cause other problems.\n * :::\n *\n * Building your own software, which is using Lime Elements?\n * Then you _might_ need to use this component.\n *\n * @private\n */\n@Component({\n tag: 'limel-config',\n shadow: true,\n})\nexport class ConfigComponent {\n /**\n * Global configuration for Lime Elements.\n */\n @Prop()\n public config: Config;\n\n public componentDidLoad() {\n this.setGlobalConfig();\n }\n\n public componentDidUpdate() {\n this.setGlobalConfig();\n }\n\n /*\n * Copy any config settings to the global config object\n */\n private setGlobalConfig() {\n if (!this.config) {\n return;\n }\n\n Object.keys(this.config).forEach((key) => {\n globalConfig[key] = this.config[key];\n });\n }\n\n public render() {\n return null;\n }\n}\n"],"mappings":"8EAsBaA,EAAe,M,+CAOjBC,mBACHC,KAAKC,iB,CAGFC,qBACHF,KAAKC,iB,CAMDA,kBACJ,IAAKD,KAAKG,OAAQ,CACd,M,CAGJC,OAAOC,KAAKL,KAAKG,QAAQG,SAASC,IAC9BC,EAAaD,GAAOP,KAAKG,OAAOI,EAAI,G,CAIrCE,SACH,OAAO,I"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
class t{constructor(){this.iconPath="";this.defaultLocale=navigator.language;this.featureSwitches=o(localStorage)}}function o(t){const o={};for(let n=0;n<t.length;n++){const s=t.key(n);const c=t.getItem(s);if(!["true","false"].includes(c)){continue}o[s]=c==="true"}return o}const n=new t;const s=(()=>n)();export{s as g};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
2
|
+
//# sourceMappingURL=p-2c35fb9d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ConfigClass","constructor","this","iconPath","defaultLocale","navigator","language","featureSwitches","getFeatureSwitches","localStorage","storage","features","i","length","key","value","getItem","includes","config","globalConfig"],"sources":["./src/global/config.ts"],"sourcesContent":["/**\n * Configuration options for limel-config.\n *\n * @public\n */\nexport type Config = {\n /**\n * The path to where the icon library used by limel-icon is located.\n */\n iconPath?: string;\n\n /**\n * The default locale to use for components that support localization.\n */\n defaultLocale?: string;\n\n /**\n * @internal\n */\n featureSwitches?: Record<string, boolean>;\n};\n\nclass ConfigClass implements Config {\n public iconPath = '';\n public defaultLocale = navigator.language;\n public featureSwitches: any = getFeatureSwitches(localStorage);\n}\n\nfunction getFeatureSwitches(storage: Storage) {\n const features = {};\n for (let i = 0; i < storage.length; i++) {\n const key = storage.key(i);\n const value = storage.getItem(key);\n\n if (!['true', 'false'].includes(value)) {\n continue;\n }\n\n features[key] = value === 'true';\n }\n\n return features;\n}\n\nconst config = new ConfigClass();\nexport const globalConfig = (() => {\n return config;\n})();\n"],"mappings":"AAsBA,MAAMA,EAANC,cACWC,KAAAC,SAAW,GACXD,KAAAE,cAAgBC,UAAUC,SAC1BJ,KAAAK,gBAAuBC,EAAmBC,a,EAGrD,SAASD,EAAmBE,GACxB,MAAMC,EAAW,GACjB,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAQG,OAAQD,IAAK,CACrC,MAAME,EAAMJ,EAAQI,IAAIF,GACxB,MAAMG,EAAQL,EAAQM,QAAQF,GAE9B,IAAK,CAAC,OAAQ,SAASG,SAASF,GAAQ,CACpC,Q,CAGJJ,EAASG,GAAOC,IAAU,M,CAG9B,OAAOJ,CACX,CAEA,MAAMO,EAAS,IAAIlB,E,MACNmB,EAAe,KACjBD,EADiB,U"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as i,g as e}from"./p-3075aa67.js";import{g as r}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as i,g as e}from"./p-3075aa67.js";import{g as r}from"./p-2c35fb9d.js";class s{constructor(t){this.promises={};this.cache=t}async get(t,i=""){const e=await this.cache;const r=this.getUrl(t,i);let s=await e.match(r);if(!s){s=await this.fetchData(r,e)}return this.getIcon(s)}async fetchData(t,i){let e=this.promises[t];if(e===undefined){e=i.add(t);this.promises[t]=e}await e;return i.match(t)}async getIcon(t){let i=await t.text();i=i.replace(/#000000/g,"currentColor");if(!this.validSvg(i)){throw new Error("Invalid SVG")}return i}validSvg(t){const i=new DOMParser;const e=i.parseFromString(t,"image/svg+xml");return e.documentElement.tagName.toLowerCase()==="svg"}getUrl(t,i){let e=i||"";if(i&&!i.endsWith("/")){e=`${i}/`}return`${e}assets/icons/${t}.svg`}}class n{constructor(){this.cache={};this.resolveFunctions={}}async get(t,i=""){if(!this.cache[t]){this.cache[t]=await this.getIcon(t,i)}return this.cache[t]}getIcon(t,i){return new Promise((e=>{if(!this.resolveFunctions[t]){this.resolveFunctions[t]=[];this.fetchData(t,i)}this.resolveFunctions[t].push(e)}))}async fetchData(t,i){let e=i||"";if(i&&!i.endsWith("/")){e=`${i}/`}const r=await fetch(`${e}assets/icons/${t}.svg`);let s=await r.text();s=s.replace(/#000000/g,"currentColor");if(!this.validSvg(s)){throw new Error("Invalid SVG")}this.resolvePromises(t,s)}validSvg(t){const i=new DOMParser;const e=i.parseFromString(t,"image/svg+xml");return e.documentElement.tagName.toLowerCase()==="svg"}resolvePromises(t,i){const e=this.resolveFunctions[t];e.forEach((t=>{t(i)}));this.resolveFunctions[t]=null}}const o="@limetech/lime-elements/icons";function a(){try{const t=caches.open(o);return new s(t)}catch(t){return new n}}const h=(()=>a())();const m=":host{background-color:var(--icon-background-color, transparent);border-radius:50%;display:inline-block;line-height:0;box-sizing:border-box}:host svg{fill:currentColor;height:100%;pointer-events:none;width:100%}:host div{margin:var(--limel-icon-svg-margin, 0)}:host([hidden]){display:none}:host([size=x-small]){height:0.9375rem !important;width:0.9375rem !important}:host([size=small]){height:1.25rem !important;width:1.25rem !important}:host([size=medium]){height:1.5625rem !important;width:1.5625rem !important}:host([size=large]){height:1.875rem !important;width:1.875rem !important}:host([badge][size=x-small]){height:1.4375rem !important;width:1.4375rem !important;--limel-icon-svg-margin:0.25rem}:host([badge][size=small]){height:1.875rem !important;width:1.875rem !important;--limel-icon-svg-margin:0.3125rem}:host([badge][size=medium]){height:2.5rem !important;width:2.5rem !important;--limel-icon-svg-margin:0.5rem}:host([badge][size=large]){height:2.875rem !important;width:2.875rem !important;--limel-icon-svg-margin:0.5rem}";const c=class{constructor(i){t(this,i);this.size=undefined;this.name=undefined;this.badge=undefined}componentDidLoad(){this.loadIcon(this.name)}render(){return i("div",{class:"container"})}async loadIcon(t){if(t===undefined||t===""){return}const i=await this.loadSvg(t);this.renderSvg(i)}loadSvg(t){return h.get(t,r.iconPath)}renderSvg(t){const i=this.host.shadowRoot.querySelector("div.container");if(i){i.innerHTML=t}}get host(){return e(this)}static get watchers(){return{name:["loadIcon"]}}};c.style=m;export{c as limel_icon};
|
|
2
|
+
//# sourceMappingURL=p-6a83064c.entry.js.map
|