@c8y/options 1022.10.1 → 1022.13.0
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/package.json +2 -2
- package/src/ApplicationOptions.d.ts +19 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c8y/options",
|
|
3
|
-
"version": "1022.
|
|
3
|
+
"version": "1022.13.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "Cumulocity",
|
|
6
6
|
"description": "Cumulocity application options",
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"options"
|
|
18
18
|
],
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@c8y/client": "1022.
|
|
20
|
+
"@c8y/client": "1022.13.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -46,7 +46,7 @@ export interface ApplicationOptions {
|
|
|
46
46
|
dynamicOptionsUrl?: string | boolean;
|
|
47
47
|
/** URL to favicon. */
|
|
48
48
|
faviconUrl?: string;
|
|
49
|
-
/** URL to
|
|
49
|
+
/** URL to `*.css` file which will replace default branding. */
|
|
50
50
|
brandingUrl?: string;
|
|
51
51
|
/** Enables the branding preview mode. If set to true, the `dynamicOptionsUrl` will be polled regularly for changes. In case the `lastUpdated` field of the dynamic options changes, the page is reloaded in order to apply the new branding. */
|
|
52
52
|
brandingPreview?: boolean;
|
|
@@ -57,12 +57,11 @@ export interface ApplicationOptions {
|
|
|
57
57
|
*
|
|
58
58
|
* Its keys are language codes and its values are objects with the following properties:
|
|
59
59
|
*
|
|
60
|
-
* -
|
|
61
|
-
* -
|
|
62
|
-
* -
|
|
63
|
-
* if not defined, translations will be loaded from `${localePath}/${langCode}.json
|
|
60
|
+
* - **name:** English name of the language,
|
|
61
|
+
* - **nativeName:** native name of the language,
|
|
62
|
+
* - **url:** full URL to JSON file with compiled translations;
|
|
63
|
+
* if not defined, translations will be loaded from `${localePath}/${langCode}.json.
|
|
64
64
|
*
|
|
65
|
-
* Example:
|
|
66
65
|
* ```json
|
|
67
66
|
* "languages": {
|
|
68
67
|
* "de": {
|
|
@@ -80,7 +79,7 @@ export interface ApplicationOptions {
|
|
|
80
79
|
* Its keys are language codes (https://cumulocity.com/docs/section/getting_started/#a-name-languages-a-available-languages)
|
|
81
80
|
* and its values are objects with key-value pairs, where the key is the original string in English and the value - its translation.
|
|
82
81
|
*
|
|
83
|
-
* -
|
|
82
|
+
* - **Home:** "Startseite"
|
|
84
83
|
*
|
|
85
84
|
* For example, you can add the translation of your custom cookie banner configured in the branding settings:
|
|
86
85
|
* ```json
|
|
@@ -93,7 +92,7 @@ export interface ApplicationOptions {
|
|
|
93
92
|
* ```
|
|
94
93
|
*/
|
|
95
94
|
i18nExtra?: I18nExtra;
|
|
96
|
-
/** Array of URLs to additional
|
|
95
|
+
/** Array of URLs to additional `*.css` files to be loaded at runtime. */
|
|
97
96
|
extraCssUrls?: string[];
|
|
98
97
|
/** Stylesheet (CSS) that will be added at runtime. The string should actually contain the CSS not a path or URL to it. */
|
|
99
98
|
extraCss?: string;
|
|
@@ -277,8 +276,8 @@ export interface ApplicationOptions {
|
|
|
277
276
|
/**
|
|
278
277
|
* Defines the type of refresh mechanism used for alarms in the application.
|
|
279
278
|
*
|
|
280
|
-
* -
|
|
281
|
-
* -
|
|
279
|
+
* - **realtime:** Utilizes a realtime mechanism for updating alarms.
|
|
280
|
+
* - **interval:** Utilizes HTTP polling at regular intervals to refresh the alarms.
|
|
282
281
|
*
|
|
283
282
|
* This setting allows to switch between realtime and interval-based refresh methods.
|
|
284
283
|
*/
|
|
@@ -289,7 +288,16 @@ export interface ApplicationOptions {
|
|
|
289
288
|
* (e.g. in the HTML-Widget). The keys are the import paths and the values are the URLs.
|
|
290
289
|
*
|
|
291
290
|
* You can also add a js file but need to copy it. Or you can add a node module name but
|
|
292
|
-
* this need to have a single entry point. Otherwise you need to copy the files.
|
|
291
|
+
* this need to have a single entry point. Otherwise you need to copy the files. A url can also
|
|
292
|
+
* be used but you need to ensure that the CSP rules are not blocking the loading of the file.
|
|
293
|
+
*
|
|
294
|
+
* ```
|
|
295
|
+
* {
|
|
296
|
+
* 'my-widget': 'https://example.com/path/to/widget.js',
|
|
297
|
+
* 'node-module': '@scope/my-node-module',
|
|
298
|
+
* 'local-js': './my-local-file.js'
|
|
299
|
+
* }
|
|
300
|
+
* ```
|
|
293
301
|
*/
|
|
294
302
|
importMap?: {
|
|
295
303
|
[key: string]: string;
|