@c8y/ngx-components 1023.14.197 → 1023.14.201
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/branding/shared/data/index.d.ts +22 -1
- package/branding/shared/data/index.d.ts.map +1 -1
- package/ecosystem/application-plugins/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs +2 -0
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +38 -25
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +22 -14
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +2 -0
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/locales/de.po +21 -3
- package/locales/es.po +21 -3
- package/locales/fr.po +21 -3
- package/locales/ja_JP.po +21 -3
- package/locales/ko.po +21 -3
- package/locales/locales.pot +18 -3
- package/locales/nl.po +21 -3
- package/locales/pl.po +21 -3
- package/locales/pt_BR.po +21 -3
- package/locales/zh_CN.po +21 -3
- package/locales/zh_TW.po +21 -3
- package/package.json +1 -1
|
@@ -16,16 +16,37 @@ type NotUnpackedTopLevelFormKeys = Pick<BrandingFormValue, TopLevelFormKeysNotTo
|
|
|
16
16
|
type TopLevelForm = NotUnpackedTopLevelFormKeys & UnpackedTopLevelFormKeys;
|
|
17
17
|
type TopLevelValues = TopLevelForm;
|
|
18
18
|
type BrandingCSSVarsForm = Omit<BrandingFormValue, BrandingFormTopLevelKeys>;
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Declared explicitly (instead of deriving from `createBrandingForm`'s inferred return type) so
|
|
21
|
+
* that the published `.d.ts` contains no `FormControl` type references for these keys. When the
|
|
22
|
+
* JSON schema for `BrandingOptionsJson` is generated from the packaged `.d.ts` (c8y-schema-loader
|
|
23
|
+
* in apps consuming `@c8y/ngx-components` from npm), such references would make
|
|
24
|
+
* typescript-json-schema emit Angular's `FormControl` class doc as each key's description.
|
|
25
|
+
*/
|
|
26
|
+
type LightBrandingCSSVarsValues = {
|
|
27
|
+
[K in (typeof colorBrandingVars)[number] | (typeof stringBrandingVars)[number]]?: string;
|
|
28
|
+
} & {
|
|
29
|
+
[K in (typeof numberBrandingVars)[number]]?: number;
|
|
30
|
+
} & {
|
|
31
|
+
[K in (typeof stringOrNumberBrandingVars)[number]]?: string | number;
|
|
32
|
+
} & {
|
|
33
|
+
'font-url'?: string;
|
|
34
|
+
'font-family-base'?: string;
|
|
35
|
+
'font-family-headings'?: string;
|
|
36
|
+
'navigator-font-family'?: string;
|
|
37
|
+
};
|
|
20
38
|
type addPrefixToObject<T, P extends string> = {
|
|
21
39
|
[K in keyof T as K extends string ? `${P}${K}` : never]: T[K];
|
|
22
40
|
};
|
|
23
41
|
type DarkBrandingCSSVarsValues = addPrefixToObject<LightBrandingCSSVarsValues, 'dark-'>;
|
|
24
42
|
type BrandingCSSVarsValues = LightBrandingCSSVarsValues & DarkBrandingCSSVarsValues;
|
|
25
43
|
type BrandingOptionsJson = TopLevelValues & {
|
|
44
|
+
/** CSS custom properties (design tokens) that control the light and dark theme colors, fonts, and dimensions of the application. */
|
|
26
45
|
brandingCssVars?: BrandingCSSVarsValues & {
|
|
27
46
|
[key: string]: any;
|
|
28
47
|
};
|
|
48
|
+
/** Whether a dark theme variant is available for this application's branding. */
|
|
49
|
+
darkThemeAvailable?: boolean;
|
|
29
50
|
} & Omit<Partial<ApplicationOptions>, 'brandingCssVars'> & {
|
|
30
51
|
[key: string]: any;
|
|
31
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../../../../branding/shared/data/branding.type.ts","../../../../branding/shared/data/apply-branding-locally.service.ts","../../../../branding/shared/data/branding-shades.service.ts","../../../../branding/shared/data/branding-version.service.ts","../../../../branding/shared/data/branding-tracking.service.ts","../../../../branding/shared/data/store-branding.service.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;AAGM;AACA;AACA;AACA;AAGA;;AASA;;AAEA;AAEA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../../branding/shared/data/branding.type.ts","../../../../branding/shared/data/apply-branding-locally.service.ts","../../../../branding/shared/data/branding-shades.service.ts","../../../../branding/shared/data/branding-version.service.ts","../../../../branding/shared/data/branding-tracking.service.ts","../../../../branding/shared/data/store-branding.service.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;AAGM;AACA;AACA;AACA;AAGA;;AASA;;AAEA;AAEA;AAEN;;;;;;AAMG;AACG;AACH;;;;AAIA;;;;;;;AAqCH;AACG;;AAGG;;AAIA;;;AAEwC;;;;;AAGe;;AAE7D;AAMA;AAIA;AACA;AAoDA;AAMA;AAEA;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCC;;ACvOD;AAIc;;AAAQ;AAEpB;;AAqBA;AAMA;AAMA;;;AAWD;;ACpDD;;AAOE;AAQA;AAqBA;AAYA;;;AAyBD;;AC1ED;;AAEG;AACH;AAIE;AAEA;;;;AAIG;AACH;AAIA;;;;;;AAMG;AACH;;;AAAuF;AAgCvF;;;;;;AAMG;;;;AAKJ;;ACnED;AAK0B;;AAAQ;;;;;;AAsBhC;;;;AAgBA;;;AAYD;;;;;;;;;;;AC5BA;;;;;AAMA;;;;;;;AAQA;AAED;;AAEG;AACH;AAkBI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzBF;;;;AAIW;AACX;;;;;;;;AAQkC;AAClC;AAEU;AAYV;;AAEG;AACG;AAON;;;AAGG;;AAYH;;;;AAIG;AACG;AAEO;;;AA2Cb;;;AAGG;;AAyBH;;AAEG;AACG;AA8CN;AAUA;;;AAGG;;AAMH;;;;AAIG;;AAkBH;;;AAGG;;;;;;AA2BH;;;AAGG;AACG;AAMN;;AAEG;AACG;AAUN;;;AAGG;;;;;;AAgBH;;;AAGG;;AAYH;;AAEG;;AAkCH;;;AAGG;AACG;;;;;AAuDN;;;;AAIG;AACH;;;;;AA0CD;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../../../ecosystem/application-plugins/application-plugins.component.ts","../../../ecosystem/application-plugins/plugin-list-item.component.ts","../../../ecosystem/application-plugins/install-plugin.component.ts","../../../ecosystem/application-plugins/plugin-list.service.ts","../../../ecosystem/application-plugins/plugin-list.component.ts","../../../ecosystem/application-plugins/apps-to-update-remotes-select.component.ts","../../../ecosystem/application-plugins/appState.pipe.ts","../../../ecosystem/application-plugins/label-cell-renderer.component.ts","../../../ecosystem/application-plugins/orphaned-status-cell-renderer.component.ts","../../../ecosystem/application-plugins/update-plugin-of-app/update-plugin-of-app.component.ts","../../../ecosystem/application-plugins/only-latest-filter/only-latest-filter.component.ts","../../../ecosystem/application-plugins/application-plugin-readme.component.ts","../../../ecosystem/application-plugins/application-plugins.module.ts","../../../ecosystem/application-plugins/application-plugins.guard.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;AAgDA;AA6HI;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7GgD;AAClD;AAES;;AAIT;AACA;AACA;AAEA;AAOA;AAIA;;;;;;;;;AAWA;AACA;AACA;AACA;;;;;;;;;;AAmKM;AAwCA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../ecosystem/application-plugins/application-plugins.component.ts","../../../ecosystem/application-plugins/plugin-list-item.component.ts","../../../ecosystem/application-plugins/install-plugin.component.ts","../../../ecosystem/application-plugins/plugin-list.service.ts","../../../ecosystem/application-plugins/plugin-list.component.ts","../../../ecosystem/application-plugins/apps-to-update-remotes-select.component.ts","../../../ecosystem/application-plugins/appState.pipe.ts","../../../ecosystem/application-plugins/label-cell-renderer.component.ts","../../../ecosystem/application-plugins/orphaned-status-cell-renderer.component.ts","../../../ecosystem/application-plugins/update-plugin-of-app/update-plugin-of-app.component.ts","../../../ecosystem/application-plugins/only-latest-filter/only-latest-filter.component.ts","../../../ecosystem/application-plugins/application-plugin-readme.component.ts","../../../ecosystem/application-plugins/application-plugins.module.ts","../../../ecosystem/application-plugins/application-plugins.guard.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;AAgDA;AA6HI;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7GgD;AAClD;AAES;;AAIT;AACA;AACA;AAEA;AAOA;AAIA;;;;;;;;;AAWA;AACA;AACA;AACA;;;;;;;;;;AAmKM;AAwCA;;AA2CN;;;;;AAgDA;AAWA;AAmBA;AAmBA;;AAoBA;;;;;;AAqDA;AAgCA;AAqCA;AA8BA;AAwCA;AAkBA;AAUA;;;AAsBD;;AC1rBD;AAuBc;;;AAPH;AACC;;;AAMU;;;;;AAUrB;;ACtBD;AAoCI;AACA;AACA;AAnBO;AACT;;AAEA;AACA;AAIA;;;;;;AASU;;;;;;;AAiCX;;;;ACxED;AAIE;AACA;;;;;;;;;;AAiGM;AA0BN;AAoCA;AAcA;;AAkCA;;;;AAiCD;;ACvPD;AAmCc;AAjBZ;AAES;AACA;;AAEA;AACT;;AAEG;AACM;;;AAGC;AACA;AACV;AAAmB;;AACnB;AAEoB;AAIpB;AAMA;;;;;AAcD;;ACpDD;AA2CI;AACA;AACA;;;;;;AAjBF;AACA;AACA;;;;;AAKA;;;;AAaA;;AA2BA;AAQA;;;;;;AAsCD;;AChJD;AAKc;AAAQ;AAEpB;;;AAOD;;ACdD;AAKqB;AAAA;;;AACpB;;ACAD;AAOqB;AADnB;;;;AAAqD;AAClC;AAInB;;;AAsDD;;ACnDD;AA8BI;AACA;AACA;AACA;AACA;AApBF;;;;AAKA;;AAKA;;;AAMU;;;;;AAmGX;;AClJD;AASqB;;AAFnB;AAEmB;;;AAapB;;ACjBD;;;;;;;;;;AAuBC;;ACjBD;;;;AA2CwC;;ACvDxC;AAEc;AAAQ;;;;AAmBrB;;"}
|
|
@@ -191,6 +191,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
191
191
|
}]
|
|
192
192
|
}] });
|
|
193
193
|
|
|
194
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
195
|
+
const cssVarsFormValueTypesConformanceCheck = {};
|
|
194
196
|
const brandingFormGroupTopLevelEntries = [
|
|
195
197
|
'cookieBanner',
|
|
196
198
|
'genericApplicationOptions',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-branding-shared-data.mjs","sources":["../../branding/shared/data/apply-branding-locally.service.ts","../../branding/shared/data/branding-shades.service.ts","../../branding/shared/data/branding-version.service.ts","../../branding/shared/data/branding.type.ts","../../branding/shared/data/branding-tracking.service.ts","../../branding/shared/data/store-branding.service.ts","../../branding/shared/data/c8y-ngx-components-branding-shared-data.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { OptionsService } from '@c8y/ngx-components';\nimport { BrandingOptionsJson } from './branding.type';\nimport { applyBrandingOptions, getOptionsToMerge, mergeOptions } from '@c8y/bootstrap';\n\n@Injectable({ providedIn: 'root' })\nexport class ApplyBrandingLocallyService {\n private keysToRemove: Array<string> | null;\n\n constructor(private options: OptionsService) {}\n\n applyBranding(optionsJson?: BrandingOptionsJson) {\n if (!this.keysToRemove) {\n this.keysToRemove = Object.keys(this.combineOptions());\n }\n const combinedOptions = this.combineOptions(optionsJson);\n const newKeysToRemove = Object.keys(combinedOptions);\n\n // avoid to remove keys that would actually be set again afterwards\n const keysToActuallyRemove = this.keysToRemove.filter(key => !newKeysToRemove.includes(key));\n this.removeKeysFromOptions(keysToActuallyRemove);\n\n this.keysToRemove = newKeysToRemove;\n\n applyBrandingOptions(combinedOptions);\n this.applyApplicationOptions(combinedOptions);\n }\n\n resetBranding() {\n this.applyBranding();\n }\n\n private applyApplicationOptions(optionsJson: any) {\n Object.entries(optionsJson).forEach(([key, value]) => {\n this.options.set(key, value);\n });\n }\n\n private removeKeysFromOptions(keys: string[]) {\n for (const key of keys) {\n this.options.delete(key);\n }\n }\n\n private combineOptions(optionsJson?: BrandingOptionsJson) {\n const optionsToMerge = getOptionsToMerge();\n if (!optionsToMerge) {\n // should never happen as the options should be set quite early in bootstrapping process.\n throw Error(`Failed to retrieve options for merging`);\n }\n if (optionsJson) {\n optionsToMerge.dynamicOptions = optionsJson;\n }\n return mergeOptions(optionsToMerge);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { default as chroma } from 'chroma-js';\n\n@Injectable({ providedIn: 'root' })\nexport class BrandingShadesService {\n getShadeColorBrandingCssVars(newBrandPrimary: string) {\n const shades = this.generateShades(newBrandPrimary);\n return this.shadesToObject(shades);\n }\n\n isValidShadeColor(color: string): boolean {\n try {\n return chroma.valid(color);\n } catch {\n return false;\n }\n }\n\n hasCustomShadesSet(\n previousBrandPrimary: string,\n otherVars: Record<string, string | number>\n ): boolean {\n if (previousBrandPrimary && otherVars) {\n const oldShades = this.generateShades(previousBrandPrimary);\n const oldShadesObj = this.shadesToObject(oldShades);\n for (const shadeKey of Object.keys(oldShadesObj)) {\n const fromVars = otherVars[shadeKey];\n const generated = oldShadesObj[shadeKey];\n if (fromVars === null || fromVars === undefined) {\n continue;\n }\n if (fromVars !== generated) {\n return true;\n }\n }\n }\n return false;\n }\n\n private shadesToObject(shades: string[]) {\n const brandingCssVars: Record<`c8y-brand-${number}0`, string> = {};\n let i = 1;\n for (const shade of shades) {\n const key = `c8y-brand-${i}0` as const;\n brandingCssVars[key] = shade;\n i++;\n }\n\n return brandingCssVars;\n }\n\n private generateShades(inputColor: string) {\n const referenceShades = [\n '#134158',\n '#1C5569',\n '#058192', // primary color\n '#22A6AA',\n '#3CC1B7',\n '#8ADBD5',\n '#C5EDEA',\n '#EBF9F8'\n ];\n // Calculate the luminance of the reference shades\n const referenceLuminances = referenceShades.map(color => chroma(color).luminance());\n const inputColorAsHex = chroma(inputColor);\n // Generate shades of the input color with the same luminance as the reference shades\n const generatedShades = referenceLuminances.map(luminance =>\n chroma(inputColor).luminance(luminance).hex('rgb')\n );\n // Calculate the distance between the input color and each color in the generatedShades array\n const distances = generatedShades.map(color => chroma.deltaE(inputColorAsHex, color));\n // Find the index of the color with the smallest distance\n const index = distances.indexOf(Math.min(...distances));\n generatedShades[index] = inputColorAsHex.hex('rgb');\n return generatedShades;\n }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Service for creating and manipulating branding versions.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class BrandingVersionService {\n static readonly nameAndIterationSeparator = '-';\n\n /**\n * Creates the initial branding version for a given name.\n * @param name The name of the branding.\n * @returns The initial branding version.\n */\n createInitialBrandingVersion<T extends string>(name: T) {\n return `${name}${BrandingVersionService.nameAndIterationSeparator}${1}` as const;\n }\n\n /**\n * Splits a branding version into its name and iteration.\n * @param version The branding version to split.\n * @returns The name and iteration of the branding version.\n *\n * Errors are thrown if the version is not in the expected format.\n */\n splitBrandingIntoNameAndIteration(version: string): { name: string; iteration: number } {\n const splitted = version.split(BrandingVersionService.nameAndIterationSeparator);\n if (splitted.length < 2) {\n throw Error(\n `A valid version should at least conatin one '${BrandingVersionService.nameAndIterationSeparator}', this is not the case for '${version}'`\n );\n }\n\n const lastValueOfSplittedArray = splitted[splitted.length - 1];\n if (lastValueOfSplittedArray === '' || !/[0-9]+/.test(lastValueOfSplittedArray)) {\n throw Error(\n `The second part of the version should be a positive integer, this is not the case for '${lastValueOfSplittedArray}' from '${version}'`\n );\n }\n\n const iteration = Number.parseInt(lastValueOfSplittedArray);\n if (Number.isNaN(iteration) && iteration <= 0) {\n throw Error(\n `The second part of the version should be a positive integer, this is not the case for '${iteration}' from '${version}'`\n );\n }\n\n const name = splitted.slice(0, -1).join(BrandingVersionService.nameAndIterationSeparator);\n if (!name) {\n throw Error(\n `The first part of the version should not be empty, this is the case for '${name}' from '${version}'`\n );\n }\n\n return { iteration, name };\n }\n\n /**\n * Bumps the iteration of a branding version.\n * @param version The branding version to bump.\n * @returns The bumped branding version.\n *\n * Errors are thrown if the version is not in the expected format.\n */\n bumpBrandingIteration(version: string) {\n const { name, iteration } = this.splitBrandingIntoNameAndIteration(version);\n return `${name}${BrandingVersionService.nameAndIterationSeparator}${iteration + 1}` as const;\n }\n}\n","import type { FormBuilder, FormControl } from '@angular/forms';\nimport { Alert, colorValidator, ApplicationOptions } from '@c8y/ngx-components';\n\nexport type BrandingFormValue = ReturnType<typeof createGenericBrandingForm>['value'];\nexport type BrandingFormKeys = keyof BrandingFormValue;\nexport type BrandingFormTopLevelKeys = (typeof brandingFormGroupTopLevelEntries)[number];\nexport type BrandingFormTopLevelKeysToUnpack =\n (typeof brandingFormGroupTopLevelEntriesToUnpack)[number];\n\nexport type TopLevelFormKeysNotToUnpack = Exclude<\n BrandingFormTopLevelKeys,\n BrandingFormTopLevelKeysToUnpack\n>;\nexport type UnpackedTopLevelFormKeys = Pick<\n BrandingFormValue,\n BrandingFormTopLevelKeysToUnpack\n>[keyof Pick<BrandingFormValue, BrandingFormTopLevelKeysToUnpack>];\n\nexport type NotUnpackedTopLevelFormKeys = Pick<BrandingFormValue, TopLevelFormKeysNotToUnpack>;\nexport type TopLevelForm = NotUnpackedTopLevelFormKeys & UnpackedTopLevelFormKeys;\nexport type TopLevelValues = TopLevelForm;\n\nexport type BrandingCSSVarsForm = Omit<BrandingFormValue, BrandingFormTopLevelKeys>;\n\nexport type LightBrandingCSSVarsValues = ReturnType<typeof createBrandingForm>['value'] &\n BrandingCSSVarsForm[keyof BrandingCSSVarsForm];\n\ntype addPrefixToObject<T, P extends string> = {\n [K in keyof T as K extends string ? `${P}${K}` : never]: T[K];\n};\n\nexport type DarkBrandingCSSVarsValues = addPrefixToObject<LightBrandingCSSVarsValues, 'dark-'>;\n\nexport type BrandingCSSVarsValues = LightBrandingCSSVarsValues & DarkBrandingCSSVarsValues;\n\nexport type BrandingOptionsJson = TopLevelValues & {\n brandingCssVars?: BrandingCSSVarsValues & { [key: string]: any };\n} & Omit<Partial<ApplicationOptions>, 'brandingCssVars'> & { [key: string]: any };\n\nexport const brandingFormGroupTopLevelEntries = [\n 'cookieBanner',\n 'genericApplicationOptions',\n 'darkThemeAvailable',\n 'messageBanner'\n] as const satisfies ReadonlyArray<BrandingFormKeys>;\nexport const brandingFormGroupTopLevelEntriesToUnpack = [\n 'genericApplicationOptions'\n] as const satisfies ReadonlyArray<(typeof brandingFormGroupTopLevelEntries)[number]>;\n\nexport const numberBrandingVars = ['brand-logo-img-height', 'btn-border-radius-base'] as const;\nexport const colorBrandingVars = [\n 'brand-dark',\n 'brand-light',\n 'brand-primary',\n 'c8y-brand-10',\n 'c8y-brand-20',\n 'c8y-brand-30',\n 'c8y-brand-40',\n 'c8y-brand-50',\n 'c8y-brand-60',\n 'c8y-brand-70',\n 'c8y-brand-80',\n 'palette-status-info',\n 'palette-status-warning',\n 'palette-status-success',\n 'palette-status-danger',\n 'palette-status-info-light',\n 'palette-status-warning-light',\n 'palette-status-success-light',\n 'palette-status-danger-light',\n 'palette-status-info-dark',\n 'palette-status-warning-dark',\n 'palette-status-success-dark',\n 'palette-status-danger-dark',\n 'body-background-color',\n 'text-color',\n 'text-muted',\n 'link-color',\n 'link-hover-color',\n 'action-bar-background-default',\n 'action-bar-color-actions-hover',\n 'action-bar-color-actions',\n 'action-bar-color-default',\n 'action-bar-icon-color',\n 'header-color',\n 'header-text-color',\n 'header-hover-color',\n 'navigator-bg-color',\n 'navigator-active-bg',\n 'navigator-border-active',\n 'navigator-header-bg',\n 'navigator-title-color',\n 'navigator-separator-color',\n 'navigator-text-color',\n 'navigator-color-active',\n 'right-drawer-background-default',\n 'right-drawer-text-color-default',\n 'right-drawer-separator-color',\n 'right-drawer-link-color',\n 'right-drawer-link-color-hover',\n 'right-drawer-text-color-muted'\n] as const;\nexport const stringBrandingVars = [\n 'brand-logo-img',\n 'navigator-platform-logo',\n 'login-platform-animation-img'\n] as const;\n\nexport const stringOrNumberBrandingVars = ['navigator-platform-logo-height'] as const;\n\nexport const allBrandingCSSVars = [\n ...numberBrandingVars,\n ...stringBrandingVars,\n ...colorBrandingVars\n] as const;\n\nexport function createGenericBrandingForm(formBuilder: FormBuilder) {\n const form = formBuilder.group({\n darkThemeAvailable: formBuilder.control<boolean>(false),\n cookieBanner: formBuilder.group({\n cookieBannerTitle: formBuilder.control<string>(undefined),\n cookieBannerText: formBuilder.control<string>(undefined),\n cookieBannerDisabled: formBuilder.control(false),\n policyUrl: formBuilder.control<string>(undefined),\n policyVersion: formBuilder.control<string>(undefined)\n }),\n messageBanner: formBuilder.group({\n messageBannerEnabled: formBuilder.control(false),\n messageBannerContent: formBuilder.control<string>(''),\n messageBannerType: formBuilder.control<Alert['type']>('info'),\n messageBannerId: formBuilder.control<string>('')\n }),\n baseTypography: formBuilder.group({\n 'font-url': formBuilder.control<string>(undefined),\n 'font-family-base': formBuilder.control<string>(undefined)\n }),\n headingsAndNavigatorTypography: formBuilder.group({\n 'font-family-headings': formBuilder.control<string>(undefined),\n 'navigator-font-family': formBuilder.control<string>('var(--font-family-base)')\n }),\n genericApplicationOptions: formBuilder.group({\n globalTitle: formBuilder.control<string>(undefined),\n faviconUrl: formBuilder.control<string>(undefined)\n })\n });\n return form;\n}\n\nexport function createBrandingForm(formBuilder: FormBuilder) {\n const colorControls = colorBrandingVars.reduce(\n (acc, key) => {\n acc[key] = formBuilder.control<string>(undefined, { asyncValidators: [colorValidator()] });\n return acc;\n },\n {} as { [key in (typeof colorBrandingVars)[number]]: FormControl<string> }\n );\n const stringControls = stringBrandingVars.reduce(\n (acc, key) => {\n acc[key] = formBuilder.control<string>(undefined);\n return acc;\n },\n {} as { [key in (typeof stringBrandingVars)[number]]: FormControl<string> }\n );\n const numberControls = numberBrandingVars.reduce(\n (acc, key) => {\n acc[key] = formBuilder.control<number>(undefined);\n return acc;\n },\n {} as { [key in (typeof numberBrandingVars)[number]]: FormControl<number> }\n );\n const stringOrNumberControls = stringOrNumberBrandingVars.reduce(\n (acc, key) => {\n acc[key] = formBuilder.control<number>(undefined);\n return acc;\n },\n {} as {\n [key in (typeof stringOrNumberBrandingVars)[number]]: FormControl<string | number>;\n }\n );\n const form = formBuilder.group({\n ...colorControls,\n ...stringControls,\n ...numberControls,\n ...stringOrNumberControls\n });\n\n return form;\n}\n","import { Injectable, Optional } from '@angular/core';\nimport { GainsightService, PxEventData } from '@c8y/ngx-components';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BrandingTrackingService {\n readonly prefix = 'brandingManager';\n constructor(@Optional() private gainsight: GainsightService) {}\n\n getStartedUsingBranding() {\n this.triggerEvent('getStartedUsingBranding');\n }\n\n deleteAllBrandings() {\n this.triggerEvent('deleteAllBrandings');\n }\n\n exportBranding() {\n this.triggerEvent('exportBranding');\n }\n\n addNewVersion() {\n this.triggerEvent('addNewVersion');\n }\n\n duplicateVersion() {\n this.triggerEvent('duplicateVersion');\n }\n\n applyToApps(apps: string[]) {\n this.triggerEvent('applyToApps', { apps });\n }\n\n importBranding() {\n this.triggerEvent('importBranding');\n }\n\n deleteBrandingVariant() {\n this.triggerEvent('deleteBrandingVariant');\n }\n\n openPreviewForBranding() {\n this.triggerEvent('openPreviewForBranding');\n }\n\n private triggerEvent(action: string, props?: PxEventData) {\n if (!this.gainsight) {\n return;\n }\n\n const finalProps = {\n ...props,\n action\n };\n\n return this.gainsight.triggerEvent(this.prefix, finalProps);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n ApplicationAvailability,\n ApplicationService,\n ApplicationType,\n FetchClient,\n IApplication,\n IApplicationBinary,\n IManagedObject,\n InventoryBinaryService,\n InventoryService\n} from '@c8y/client';\nimport { AppStateService, ThemeSwitcherService, ZipService } from '@c8y/ngx-components';\nimport { defer, BehaviorSubject, Observable } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\nimport { cloneDeep, uniq } from 'lodash-es';\nimport { BrandingVersionService } from './branding-version.service';\nimport { BrandingOptionsJson, allBrandingCSSVars, numberBrandingVars } from './branding.type';\nimport { StaticAsset, StaticAssetsService } from '@c8y/ngx-components/static-assets/data';\nimport { BrandingTrackingService } from './branding-tracking.service';\n\nexport interface BrandVersion {\n name: string;\n id: string;\n revision: number;\n version: string;\n tags: string[];\n owner?: string;\n lastUpdated?: string;\n publicOptionsApp?: IApplication;\n}\n\nexport interface BrandingFileDetails {\n fileName: string;\n blob: Blob;\n jsonContent?: any;\n}\n\nexport interface BrandingFileDetailsLegacy {\n path: string;\n value: string;\n blob?: Blob;\n fileName: string;\n urlWrapped: boolean;\n}\n\n/**\n * Service to load and store the branding of the tenant.\n */\n@Injectable({ providedIn: 'root' })\nexport class StoreBrandingService {\n readonly fileNames = {\n options: 'options.json',\n manifest: 'cumulocity.json',\n exportZipName: 'public-options.zip'\n } as const;\n readonly manifestValues = {\n name: 'public-options',\n contextPath: 'public-options',\n key: 'public-options-key',\n description: 'Application containing static assets used by e.g. branding.',\n noAppSwitcher: true,\n type: ApplicationType.HOSTED,\n availability: ApplicationAvailability.SHARED\n } as const satisfies IApplication;\n refreshTriggerBrandingVariants = new BehaviorSubject<void>(null);\n constructor(\n private applicationService: ApplicationService,\n private inventory: InventoryService,\n private binary: InventoryBinaryService,\n private zip: ZipService,\n private fetch: FetchClient,\n private brandingVersionService: BrandingVersionService,\n private appState: AppStateService,\n private staticAssets: StaticAssetsService,\n private themeSwitcher: ThemeSwitcherService,\n private brandingTracking: BrandingTrackingService\n ) {}\n\n /**\n * Sets the `latest` tag on the provided branding version. Making it the global active branding.\n */\n async markAsActive(brandingVersion: BrandVersion, app?: IApplication): Promise<void> {\n const publicOptions = app || (await this.getPublicOptionsApp());\n const tags = brandingVersion.tags || [];\n const version = brandingVersion.version;\n await this.applicationService.setPackageVersionTag(publicOptions, version, [...tags, 'latest']);\n }\n\n /**\n * Opens a new tab with to preview the branding. The branding must have been saved beforehand.\n * @param brandingName the name of the branding to be previewed\n */\n openPreviewForBranding(brandingName: string) {\n this.brandingTracking.openPreviewForBranding();\n window.open(\n `/apps/${\n this.appState.currentApplication.value?.contextPath || 'cockpit'\n }/index.html?brandingPreview=true&dynamicOptionsUrl=/apps/public/public-options@${brandingName}/options.json`,\n '_blank',\n 'noopener,noreferrer'\n );\n }\n\n /**\n * Returns the brandings of the tenant.\n * If no public options app is found, publicOptions will be undefined and variants an empty array.\n * For old brandings (created without versioning) a default version is returned.\n */\n async loadBrandingVariants(\n app?: IApplication\n ): Promise<{ publicOptions: IApplication | undefined; variants: BrandVersion[] }> {\n const publicOptions = app || (await this.getPublicOptionsApp());\n if (!publicOptions) {\n return { publicOptions: undefined, variants: [] };\n }\n const { data: versions } = await this.applicationService.listVersions(publicOptions);\n let mappedVersions: BrandVersion[] =\n versions\n ?.map(tmp => {\n try {\n const { name, iteration } =\n this.brandingVersionService.splitBrandingIntoNameAndIteration(tmp.version);\n return {\n revision: iteration,\n name: name,\n id: tmp.binaryId,\n version: tmp.version,\n tags: tmp.tags || [],\n publicOptionsApp: publicOptions\n };\n } catch (e) {\n console.warn('Failed to parse version', tmp, e);\n return undefined;\n }\n })\n ?.filter(Boolean) || [];\n if (!versions && publicOptions.activeVersionId) {\n mappedVersions = [\n {\n name: 'default',\n id: publicOptions.activeVersionId,\n version: 'default-1',\n revision: 1,\n tags: ['latest', 'default'],\n publicOptionsApp: publicOptions\n }\n ];\n }\n\n const variants = await this.getMetadataOfBrandingBinaries(mappedVersions);\n return { publicOptions, variants };\n }\n\n /**\n * As the branding is not immediately available after creation, this method will wait for the branding to be present.\n * @param version The version of the branding to be retrieved.\n */\n async waitForBrandingToBePresent(version: string): Promise<void> {\n const numberOfAttempts = 120;\n const sleepDurationInSeconds = 1;\n for (let i = 0; i < numberOfAttempts; i++) {\n try {\n // do not sleep before the first attempt\n if (i !== 0) {\n await new Promise(resolve => setTimeout(resolve, sleepDurationInSeconds * 1_000));\n }\n await this.getBrandingOptionsForVersion(version);\n console.info(`Branding \"${version}\" available now.`);\n return;\n } catch (e) {\n console.warn(\n `Branding \"${version}\" not yet present, retrying in ${sleepDurationInSeconds} seconds...`,\n e\n );\n }\n }\n throw new Error(\n `Branding \"${version}\" not available after ${numberOfAttempts * sleepDurationInSeconds} seconds, giving up.`\n );\n }\n\n /**\n * Will create a the initial branding based on the currently applied CSS variables.\n */\n async getStartedUsingBranding(): Promise<void> {\n const allVariables: Record<string, string> = {};\n const themeToRetrieveVars = ['light', 'dark'] as const;\n const unretrievableVars = new Array<string>();\n for (const theme of themeToRetrieveVars) {\n this.themeSwitcher.temporaryChangeTheme(theme);\n const styles = getComputedStyle(document.body);\n const variablesToSkip = [\n 'navigator-platform-logo',\n 'brand-logo-img'\n ] satisfies (typeof allBrandingCSSVars)[number][];\n const values = allBrandingCSSVars\n .filter(cssVar => !variablesToSkip.includes(cssVar as any))\n .reduce((prev, key) => {\n const directValue = styles.getPropertyValue(`--${key}`);\n const c8yPrefixedValue = styles.getPropertyValue(`--c8y-${key}`);\n const newKey = theme === 'light' ? key : `dark-${key}`;\n if (!directValue && !c8yPrefixedValue) {\n unretrievableVars.push(newKey);\n return prev;\n }\n let value: string | number = directValue || c8yPrefixedValue;\n if (numberBrandingVars.includes(key as any)) {\n try {\n value = Number.parseFloat(value.replace(/[A-Za-z]/g, '').trim());\n } catch (e) {\n console.warn(\n `Failed to parse number for \"${key}\" value that failed to parse: \"${value}\"`,\n e\n );\n return prev;\n }\n }\n return Object.assign(prev, { [newKey]: value });\n }, {});\n Object.assign(allVariables, values);\n }\n this.themeSwitcher.resetTemporaryTheme();\n\n try {\n await this.createPublicOptionsAppFromInheritedOptions(allVariables);\n } catch (e) {\n console.warn(e);\n }\n }\n\n getZipForBinary(\n binaryId: string,\n fileName: string = this.fileNames.exportZipName\n ): Observable<File> {\n return defer(() => this.binary.download(binaryId)).pipe(\n switchMap(response => response.blob()),\n map(blob => new File([blob], fileName))\n );\n }\n\n /**\n * Deletes the public options app and therefore all brandings.\n * The public options app can be optionally provided to avoid another request for it.\n */\n async deleteAllBrandings(publicOptions?: IApplication): Promise<void> {\n publicOptions = publicOptions || (await this.getPublicOptionsApp());\n await this.applicationService.delete(publicOptions);\n }\n\n /**\n * Enhances the provided branding versions with metadata from the linked binaries.\n * It will add the owner and lastUpdated fields to the versions.\n * The provided array is altered.\n */\n async getMetadataOfBrandingBinaries(versions: BrandVersion[]): Promise<BrandVersion[]> {\n const binaryIds = uniq(versions.map(tmp => tmp.id));\n if (!binaryIds.length) {\n return versions;\n }\n const { data: metadata } = await this.inventory.list({\n ids: binaryIds.join(','),\n pageSize: 2000\n });\n return versions.map(version => {\n const metadataForVersion =\n metadata.find(tmp => tmp.id === version.id) || ({} as IManagedObject);\n const { owner, lastUpdated } = metadataForVersion;\n return Object.assign(version, { owner, lastUpdated });\n });\n }\n\n /**\n * Saves the provided branding as a new version for the public options app.\n * The public options app can be optionally provided to avoid another request for it.\n */\n async saveBranding(\n blob: Blob | File,\n version: string,\n tags: string[] = [],\n publicOptionsApp?: IApplication\n ): Promise<{\n version: string;\n binary: IApplicationBinary;\n tags: string[];\n }> {\n const file = blob instanceof File ? blob : new File([blob], `public-options-${version}.zip`);\n const publicOptions = publicOptionsApp || (await this.getPublicOptionsApp());\n\n const { data: binary } = await this.applicationService\n .binary(publicOptions)\n .uploadApplicationVersion(file, version, tags);\n if (!publicOptions.activeVersionId || tags.includes('latest')) {\n await this.applicationService.update({\n id: publicOptions.id,\n activeVersionId: `${binary.binaryId}`\n });\n }\n this.refreshTriggerBrandingVariants.next();\n return { version, binary, tags };\n }\n\n /**\n * Removes a branding version from the public options app.\n * The public options app can be optionally provided to avoid another request for it.\n */\n async deleteBrandingVersion(version: string, publicOptions?: IApplication): Promise<void> {\n publicOptions = publicOptions || (await this.getPublicOptionsApp());\n await this.applicationService.deleteVersionPackage(publicOptions, { version });\n this.refreshTriggerBrandingVariants.next();\n }\n\n /**\n * Returns the blob of a zip file containing the provided branding options (options.json) and the manifest (cumulocity.json).\n */\n async getBrandingZip(content: Record<string, any> = {}): Promise<Blob> {\n content.lastUpdated = new Date().toISOString();\n const contentAsString = JSON.stringify(content);\n const zip = await this.zip.createZip([\n { fileName: this.fileNames.options, blob: new Blob([contentAsString]) },\n { fileName: this.fileNames.manifest, blob: new Blob([JSON.stringify(this.manifestValues)]) }\n ]);\n return zip;\n }\n\n /**\n * Adds a new branding version to the public options app.\n * The public options app can be optionally provided to avoid another request for it.\n */\n async addBranding(\n version: string,\n content: BrandingOptionsJson = {},\n tags: string[] = [],\n publicOptionsApp?: IApplication\n ): Promise<{\n version: string;\n binary: IApplicationBinary;\n tags: string[];\n }> {\n const zip = await this.getBrandingZip(content);\n\n return await this.saveBranding(zip, version, tags, publicOptionsApp);\n }\n\n /**\n * Returns the branding options for the provided version.\n * If no branding was found (e.g. status 404), an error is thrown.\n */\n async getBrandingOptionsForVersion(version?: string): Promise<BrandingOptionsJson> {\n const url = `/apps/public/public-options${version ? `@${version}` : ''}/${this.fileNames.options}`;\n const response = await this.fetch.fetch(url, { cache: 'no-cache' });\n if (response.status !== 200) {\n throw Error(`Unexpected status code: ${response.status}`);\n }\n\n const content = await response.json();\n return content as BrandingOptionsJson;\n }\n\n /**\n * Saves a new iteration of an already existing branding.\n */\n async saveExistingBranding(\n branding: Record<string, any>,\n currentVersion: string,\n tagsOfCurrentVersion: string[] = [],\n newVersion?: string\n ): Promise<string> {\n const publicOptions = await this.getPublicOptionsApp();\n const versionToBeSet = newVersion\n ? this.brandingVersionService.createInitialBrandingVersion(newVersion)\n : this.brandingVersionService.bumpBrandingIteration(currentVersion);\n\n const finalTags = tagsOfCurrentVersion;\n // only apply latest tag directly\n // there seems to be some special handling for the latest tag in the backend, that allows to directly move it while uploading the new version.\n // for all other tags this results in a 409 conflict. We therefore need to first delete the old version, before setting the other tags on the new version.\n if (!newVersion) {\n tagsOfCurrentVersion = tagsOfCurrentVersion.filter(tag => tag === 'latest');\n }\n await this.addBranding(versionToBeSet, branding, tagsOfCurrentVersion, publicOptions);\n if (!newVersion) {\n try {\n await this.deleteBrandingVersion(currentVersion, publicOptions);\n } catch (e) {\n if (e.res.status !== 404) {\n throw e;\n }\n }\n await this.applicationService.setPackageVersionTag(publicOptions, versionToBeSet, finalTags);\n }\n\n return versionToBeSet;\n }\n\n /**\n * Combines current branding options with the provided branding variables and creates a new public options app.\n * Any assets in the branding will be cloned.\n */\n async createPublicOptionsAppFromInheritedOptions(brandingVars?: Record<string, string>): Promise<{\n version: string;\n binary: IApplicationBinary;\n tags: string[];\n }> {\n let currentlyAppliedBranding: BrandingOptionsJson;\n let fallBackBranding: BrandingOptionsJson = {};\n try {\n currentlyAppliedBranding = await this.getBrandingOptionsForVersion();\n fallBackBranding = cloneDeep(currentlyAppliedBranding);\n } catch (e) {\n console.warn('Failed to get currently applied branding, proceeding with empty branding.', e);\n }\n\n if (brandingVars) {\n currentlyAppliedBranding = currentlyAppliedBranding || {};\n const brandingCssVars = currentlyAppliedBranding.brandingCssVars || {};\n Object.assign(brandingCssVars, brandingVars);\n currentlyAppliedBranding.brandingCssVars = brandingCssVars;\n }\n\n if (currentlyAppliedBranding) {\n try {\n const { oldAssets, newAssets } = await this.staticAssets.cloneAssetsIntoTenant('branding');\n currentlyAppliedBranding = this.replaceBrandingAssetsInBrandingOptions(\n currentlyAppliedBranding,\n oldAssets,\n newAssets\n );\n } catch (e) {\n console.warn('Failed to relocate branding assets into current tenant.', e);\n }\n }\n\n const publicOptionsApp = await this.createPublicOptionsApp();\n\n const defaultBrandingName = `default`;\n const result = await this.addBranding(\n this.brandingVersionService.createInitialBrandingVersion(defaultBrandingName),\n currentlyAppliedBranding || {},\n ['latest', defaultBrandingName],\n publicOptionsApp\n );\n\n const fallbackBrandingName = `fallback`;\n await this.addBranding(\n this.brandingVersionService.createInitialBrandingVersion(fallbackBrandingName),\n fallBackBranding,\n [fallbackBrandingName],\n publicOptionsApp\n );\n\n return result;\n }\n\n /**\n * Replaces the assets in the branding options with the new assets.\n * Goes through the provided `oldAssets` and replaces their occurrences in the branding with the corresponding `newAssets` entry sharing the same fileName.\n * Returns the updated branding options.\n */\n replaceBrandingAssetsInBrandingOptions(\n branding: BrandingOptionsJson,\n oldAssets: StaticAsset[],\n newAssets: StaticAsset[]\n ): BrandingOptionsJson {\n let brandingAsJSONString = JSON.stringify(branding);\n for (const oldAsset of oldAssets) {\n const newLocatedAsset = newAssets.find(tmp => tmp.fileName === oldAsset.fileName);\n if (!newLocatedAsset) {\n continue;\n }\n // if the path is the same, we don't need to replace it.\n if (oldAsset.path === newLocatedAsset.path) {\n continue;\n }\n\n // TODO: use proper replaceAll once it's available with es2021\n brandingAsJSONString = brandingAsJSONString.split(oldAsset.path).join(newLocatedAsset.path);\n }\n return JSON.parse(brandingAsJSONString);\n }\n\n private async getPublicOptionsApp() {\n try {\n const { data: manifest } = await this.applicationService.getManifestOfContextPath(\n this.manifestValues.contextPath\n );\n const { data: app } = await this.applicationService.detail(manifest.id);\n if (app.owner.tenant.id !== this.appState.currentTenant.value?.name) {\n return undefined;\n }\n return app;\n } catch (e) {\n // e.g. reached when no app with the given context path exists\n return undefined;\n }\n }\n\n private async createPublicOptionsApp() {\n const { data: app } = await this.applicationService.create(this.manifestValues);\n return app;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3.BrandingVersionService","i5.BrandingTrackingService"],"mappings":";;;;;;;;;;;;;MAMa,2BAA2B,CAAA;AAGtC,IAAA,WAAA,CAAoB,OAAuB,EAAA;QAAvB,IAAA,CAAA,OAAO,GAAP,OAAO;IAAmB;AAE9C,IAAA,aAAa,CAAC,WAAiC,EAAA;A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P,MAAM,EAAA,CAAA,CAAA;;4FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACjDlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-branding-shared-data.mjs","sources":["../../branding/shared/data/apply-branding-locally.service.ts","../../branding/shared/data/branding-shades.service.ts","../../branding/shared/data/branding-version.service.ts","../../branding/shared/data/branding.type.ts","../../branding/shared/data/branding-tracking.service.ts","../../branding/shared/data/store-branding.service.ts","../../branding/shared/data/c8y-ngx-components-branding-shared-data.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { OptionsService } from '@c8y/ngx-components';\nimport { BrandingOptionsJson } from './branding.type';\nimport { applyBrandingOptions, getOptionsToMerge, mergeOptions } from '@c8y/bootstrap';\n\n@Injectable({ providedIn: 'root' })\nexport class ApplyBrandingLocallyService {\n private keysToRemove: Array<string> | null;\n\n constructor(private options: OptionsService) {}\n\n applyBranding(optionsJson?: BrandingOptionsJson) {\n if (!this.keysToRemove) {\n this.keysToRemove = Object.keys(this.combineOptions());\n }\n const combinedOptions = this.combineOptions(optionsJson);\n const newKeysToRemove = Object.keys(combinedOptions);\n\n // avoid to remove keys that would actually be set again afterwards\n const keysToActuallyRemove = this.keysToRemove.filter(key => !newKeysToRemove.includes(key));\n this.removeKeysFromOptions(keysToActuallyRemove);\n\n this.keysToRemove = newKeysToRemove;\n\n applyBrandingOptions(combinedOptions);\n this.applyApplicationOptions(combinedOptions);\n }\n\n resetBranding() {\n this.applyBranding();\n }\n\n private applyApplicationOptions(optionsJson: any) {\n Object.entries(optionsJson).forEach(([key, value]) => {\n this.options.set(key, value);\n });\n }\n\n private removeKeysFromOptions(keys: string[]) {\n for (const key of keys) {\n this.options.delete(key);\n }\n }\n\n private combineOptions(optionsJson?: BrandingOptionsJson) {\n const optionsToMerge = getOptionsToMerge();\n if (!optionsToMerge) {\n // should never happen as the options should be set quite early in bootstrapping process.\n throw Error(`Failed to retrieve options for merging`);\n }\n if (optionsJson) {\n optionsToMerge.dynamicOptions = optionsJson;\n }\n return mergeOptions(optionsToMerge);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { default as chroma } from 'chroma-js';\n\n@Injectable({ providedIn: 'root' })\nexport class BrandingShadesService {\n getShadeColorBrandingCssVars(newBrandPrimary: string) {\n const shades = this.generateShades(newBrandPrimary);\n return this.shadesToObject(shades);\n }\n\n isValidShadeColor(color: string): boolean {\n try {\n return chroma.valid(color);\n } catch {\n return false;\n }\n }\n\n hasCustomShadesSet(\n previousBrandPrimary: string,\n otherVars: Record<string, string | number>\n ): boolean {\n if (previousBrandPrimary && otherVars) {\n const oldShades = this.generateShades(previousBrandPrimary);\n const oldShadesObj = this.shadesToObject(oldShades);\n for (const shadeKey of Object.keys(oldShadesObj)) {\n const fromVars = otherVars[shadeKey];\n const generated = oldShadesObj[shadeKey];\n if (fromVars === null || fromVars === undefined) {\n continue;\n }\n if (fromVars !== generated) {\n return true;\n }\n }\n }\n return false;\n }\n\n private shadesToObject(shades: string[]) {\n const brandingCssVars: Record<`c8y-brand-${number}0`, string> = {};\n let i = 1;\n for (const shade of shades) {\n const key = `c8y-brand-${i}0` as const;\n brandingCssVars[key] = shade;\n i++;\n }\n\n return brandingCssVars;\n }\n\n private generateShades(inputColor: string) {\n const referenceShades = [\n '#134158',\n '#1C5569',\n '#058192', // primary color\n '#22A6AA',\n '#3CC1B7',\n '#8ADBD5',\n '#C5EDEA',\n '#EBF9F8'\n ];\n // Calculate the luminance of the reference shades\n const referenceLuminances = referenceShades.map(color => chroma(color).luminance());\n const inputColorAsHex = chroma(inputColor);\n // Generate shades of the input color with the same luminance as the reference shades\n const generatedShades = referenceLuminances.map(luminance =>\n chroma(inputColor).luminance(luminance).hex('rgb')\n );\n // Calculate the distance between the input color and each color in the generatedShades array\n const distances = generatedShades.map(color => chroma.deltaE(inputColorAsHex, color));\n // Find the index of the color with the smallest distance\n const index = distances.indexOf(Math.min(...distances));\n generatedShades[index] = inputColorAsHex.hex('rgb');\n return generatedShades;\n }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Service for creating and manipulating branding versions.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class BrandingVersionService {\n static readonly nameAndIterationSeparator = '-';\n\n /**\n * Creates the initial branding version for a given name.\n * @param name The name of the branding.\n * @returns The initial branding version.\n */\n createInitialBrandingVersion<T extends string>(name: T) {\n return `${name}${BrandingVersionService.nameAndIterationSeparator}${1}` as const;\n }\n\n /**\n * Splits a branding version into its name and iteration.\n * @param version The branding version to split.\n * @returns The name and iteration of the branding version.\n *\n * Errors are thrown if the version is not in the expected format.\n */\n splitBrandingIntoNameAndIteration(version: string): { name: string; iteration: number } {\n const splitted = version.split(BrandingVersionService.nameAndIterationSeparator);\n if (splitted.length < 2) {\n throw Error(\n `A valid version should at least conatin one '${BrandingVersionService.nameAndIterationSeparator}', this is not the case for '${version}'`\n );\n }\n\n const lastValueOfSplittedArray = splitted[splitted.length - 1];\n if (lastValueOfSplittedArray === '' || !/[0-9]+/.test(lastValueOfSplittedArray)) {\n throw Error(\n `The second part of the version should be a positive integer, this is not the case for '${lastValueOfSplittedArray}' from '${version}'`\n );\n }\n\n const iteration = Number.parseInt(lastValueOfSplittedArray);\n if (Number.isNaN(iteration) && iteration <= 0) {\n throw Error(\n `The second part of the version should be a positive integer, this is not the case for '${iteration}' from '${version}'`\n );\n }\n\n const name = splitted.slice(0, -1).join(BrandingVersionService.nameAndIterationSeparator);\n if (!name) {\n throw Error(\n `The first part of the version should not be empty, this is the case for '${name}' from '${version}'`\n );\n }\n\n return { iteration, name };\n }\n\n /**\n * Bumps the iteration of a branding version.\n * @param version The branding version to bump.\n * @returns The bumped branding version.\n *\n * Errors are thrown if the version is not in the expected format.\n */\n bumpBrandingIteration(version: string) {\n const { name, iteration } = this.splitBrandingIntoNameAndIteration(version);\n return `${name}${BrandingVersionService.nameAndIterationSeparator}${iteration + 1}` as const;\n }\n}\n","import type { FormBuilder, FormControl } from '@angular/forms';\nimport { Alert, colorValidator, ApplicationOptions } from '@c8y/ngx-components';\n\nexport type BrandingFormValue = ReturnType<typeof createGenericBrandingForm>['value'];\nexport type BrandingFormKeys = keyof BrandingFormValue;\nexport type BrandingFormTopLevelKeys = (typeof brandingFormGroupTopLevelEntries)[number];\nexport type BrandingFormTopLevelKeysToUnpack =\n (typeof brandingFormGroupTopLevelEntriesToUnpack)[number];\n\nexport type TopLevelFormKeysNotToUnpack = Exclude<\n BrandingFormTopLevelKeys,\n BrandingFormTopLevelKeysToUnpack\n>;\nexport type UnpackedTopLevelFormKeys = Pick<\n BrandingFormValue,\n BrandingFormTopLevelKeysToUnpack\n>[keyof Pick<BrandingFormValue, BrandingFormTopLevelKeysToUnpack>];\n\nexport type NotUnpackedTopLevelFormKeys = Pick<BrandingFormValue, TopLevelFormKeysNotToUnpack>;\nexport type TopLevelForm = NotUnpackedTopLevelFormKeys & UnpackedTopLevelFormKeys;\nexport type TopLevelValues = TopLevelForm;\n\nexport type BrandingCSSVarsForm = Omit<BrandingFormValue, BrandingFormTopLevelKeys>;\n\n/**\n * Declared explicitly (instead of deriving from `createBrandingForm`'s inferred return type) so\n * that the published `.d.ts` contains no `FormControl` type references for these keys. When the\n * JSON schema for `BrandingOptionsJson` is generated from the packaged `.d.ts` (c8y-schema-loader\n * in apps consuming `@c8y/ngx-components` from npm), such references would make\n * typescript-json-schema emit Angular's `FormControl` class doc as each key's description.\n */\nexport type LightBrandingCSSVarsValues = {\n [K in (typeof colorBrandingVars)[number] | (typeof stringBrandingVars)[number]]?: string;\n} & {\n [K in (typeof numberBrandingVars)[number]]?: number;\n} & {\n [K in (typeof stringOrNumberBrandingVars)[number]]?: string | number;\n} & {\n 'font-url'?: string;\n 'font-family-base'?: string;\n 'font-family-headings'?: string;\n 'navigator-font-family'?: string;\n};\n\ntype UnionToIntersection<U> = (U extends unknown ? (u: U) => void : never) extends (\n i: infer I\n) => void\n ? I\n : never;\ntype CssVarKeysDerivedFromForms = keyof (ReturnType<typeof createBrandingForm>['value'] &\n UnionToIntersection<BrandingCSSVarsForm[keyof BrandingCSSVarsForm]>);\ntype AssertNever<T extends never> = T;\n\n/**\n * Compile-time conformance guards with no runtime effect: fail the build if the branding forms\n * (`createBrandingForm` and the typography groups of `createGenericBrandingForm`) drift from the\n * explicitly declared `LightBrandingCSSVarsValues` — a key present on one side but not the other,\n * or a value type conflict on a shared key.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype CssVarKeysInFormsButNotDeclared = AssertNever<\n Exclude<CssVarKeysDerivedFromForms, keyof LightBrandingCSSVarsValues>\n>;\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype CssVarKeysDeclaredButMissingFromForms = AssertNever<\n Exclude<keyof LightBrandingCSSVarsValues, CssVarKeysDerivedFromForms>\n>;\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst cssVarsFormValueTypesConformanceCheck: LightBrandingCSSVarsValues = {} as ReturnType<\n typeof createBrandingForm\n>['value'] &\n BrandingCSSVarsForm[keyof BrandingCSSVarsForm];\n\ntype addPrefixToObject<T, P extends string> = {\n [K in keyof T as K extends string ? `${P}${K}` : never]: T[K];\n};\n\nexport type DarkBrandingCSSVarsValues = addPrefixToObject<LightBrandingCSSVarsValues, 'dark-'>;\n\nexport type BrandingCSSVarsValues = LightBrandingCSSVarsValues & DarkBrandingCSSVarsValues;\n\nexport type BrandingOptionsJson = TopLevelValues & {\n /** CSS custom properties (design tokens) that control the light and dark theme colors, fonts, and dimensions of the application. */\n brandingCssVars?: BrandingCSSVarsValues & { [key: string]: any };\n /** Whether a dark theme variant is available for this application's branding. */\n darkThemeAvailable?: boolean;\n} & Omit<Partial<ApplicationOptions>, 'brandingCssVars'> & { [key: string]: any };\n\nexport const brandingFormGroupTopLevelEntries = [\n 'cookieBanner',\n 'genericApplicationOptions',\n 'darkThemeAvailable',\n 'messageBanner'\n] as const satisfies ReadonlyArray<BrandingFormKeys>;\nexport const brandingFormGroupTopLevelEntriesToUnpack = [\n 'genericApplicationOptions'\n] as const satisfies ReadonlyArray<(typeof brandingFormGroupTopLevelEntries)[number]>;\n\nexport const numberBrandingVars = ['brand-logo-img-height', 'btn-border-radius-base'] as const;\nexport const colorBrandingVars = [\n 'brand-dark',\n 'brand-light',\n 'brand-primary',\n 'c8y-brand-10',\n 'c8y-brand-20',\n 'c8y-brand-30',\n 'c8y-brand-40',\n 'c8y-brand-50',\n 'c8y-brand-60',\n 'c8y-brand-70',\n 'c8y-brand-80',\n 'palette-status-info',\n 'palette-status-warning',\n 'palette-status-success',\n 'palette-status-danger',\n 'palette-status-info-light',\n 'palette-status-warning-light',\n 'palette-status-success-light',\n 'palette-status-danger-light',\n 'palette-status-info-dark',\n 'palette-status-warning-dark',\n 'palette-status-success-dark',\n 'palette-status-danger-dark',\n 'body-background-color',\n 'text-color',\n 'text-muted',\n 'link-color',\n 'link-hover-color',\n 'action-bar-background-default',\n 'action-bar-color-actions-hover',\n 'action-bar-color-actions',\n 'action-bar-color-default',\n 'action-bar-icon-color',\n 'header-color',\n 'header-text-color',\n 'header-hover-color',\n 'navigator-bg-color',\n 'navigator-active-bg',\n 'navigator-border-active',\n 'navigator-header-bg',\n 'navigator-title-color',\n 'navigator-separator-color',\n 'navigator-text-color',\n 'navigator-color-active',\n 'right-drawer-background-default',\n 'right-drawer-text-color-default',\n 'right-drawer-separator-color',\n 'right-drawer-link-color',\n 'right-drawer-link-color-hover',\n 'right-drawer-text-color-muted'\n] as const;\nexport const stringBrandingVars = [\n 'brand-logo-img',\n 'navigator-platform-logo',\n 'login-platform-animation-img'\n] as const;\n\nexport const stringOrNumberBrandingVars = ['navigator-platform-logo-height'] as const;\n\nexport const allBrandingCSSVars = [\n ...numberBrandingVars,\n ...stringBrandingVars,\n ...colorBrandingVars\n] as const;\n\nexport function createGenericBrandingForm(formBuilder: FormBuilder) {\n const form = formBuilder.group({\n darkThemeAvailable: formBuilder.control<boolean>(false),\n cookieBanner: formBuilder.group({\n cookieBannerTitle: formBuilder.control<string>(undefined),\n cookieBannerText: formBuilder.control<string>(undefined),\n cookieBannerDisabled: formBuilder.control(false),\n policyUrl: formBuilder.control<string>(undefined),\n policyVersion: formBuilder.control<string>(undefined)\n }),\n messageBanner: formBuilder.group({\n messageBannerEnabled: formBuilder.control(false),\n messageBannerContent: formBuilder.control<string>(''),\n messageBannerType: formBuilder.control<Alert['type']>('info'),\n messageBannerId: formBuilder.control<string>('')\n }),\n baseTypography: formBuilder.group({\n 'font-url': formBuilder.control<string>(undefined),\n 'font-family-base': formBuilder.control<string>(undefined)\n }),\n headingsAndNavigatorTypography: formBuilder.group({\n 'font-family-headings': formBuilder.control<string>(undefined),\n 'navigator-font-family': formBuilder.control<string>('var(--font-family-base)')\n }),\n genericApplicationOptions: formBuilder.group({\n globalTitle: formBuilder.control<string>(undefined),\n faviconUrl: formBuilder.control<string>(undefined)\n })\n });\n return form;\n}\n\nexport function createBrandingForm(formBuilder: FormBuilder) {\n const colorControls = colorBrandingVars.reduce(\n (acc, key) => {\n acc[key] = formBuilder.control<string>(undefined, { asyncValidators: [colorValidator()] });\n return acc;\n },\n {} as { [key in (typeof colorBrandingVars)[number]]: FormControl<string> }\n );\n const stringControls = stringBrandingVars.reduce(\n (acc, key) => {\n acc[key] = formBuilder.control<string>(undefined);\n return acc;\n },\n {} as { [key in (typeof stringBrandingVars)[number]]: FormControl<string> }\n );\n const numberControls = numberBrandingVars.reduce(\n (acc, key) => {\n acc[key] = formBuilder.control<number>(undefined);\n return acc;\n },\n {} as { [key in (typeof numberBrandingVars)[number]]: FormControl<number> }\n );\n const stringOrNumberControls = stringOrNumberBrandingVars.reduce(\n (acc, key) => {\n acc[key] = formBuilder.control<number>(undefined);\n return acc;\n },\n {} as {\n [key in (typeof stringOrNumberBrandingVars)[number]]: FormControl<string | number>;\n }\n );\n const form = formBuilder.group({\n ...colorControls,\n ...stringControls,\n ...numberControls,\n ...stringOrNumberControls\n });\n\n return form;\n}\n","import { Injectable, Optional } from '@angular/core';\nimport { GainsightService, PxEventData } from '@c8y/ngx-components';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BrandingTrackingService {\n readonly prefix = 'brandingManager';\n constructor(@Optional() private gainsight: GainsightService) {}\n\n getStartedUsingBranding() {\n this.triggerEvent('getStartedUsingBranding');\n }\n\n deleteAllBrandings() {\n this.triggerEvent('deleteAllBrandings');\n }\n\n exportBranding() {\n this.triggerEvent('exportBranding');\n }\n\n addNewVersion() {\n this.triggerEvent('addNewVersion');\n }\n\n duplicateVersion() {\n this.triggerEvent('duplicateVersion');\n }\n\n applyToApps(apps: string[]) {\n this.triggerEvent('applyToApps', { apps });\n }\n\n importBranding() {\n this.triggerEvent('importBranding');\n }\n\n deleteBrandingVariant() {\n this.triggerEvent('deleteBrandingVariant');\n }\n\n openPreviewForBranding() {\n this.triggerEvent('openPreviewForBranding');\n }\n\n private triggerEvent(action: string, props?: PxEventData) {\n if (!this.gainsight) {\n return;\n }\n\n const finalProps = {\n ...props,\n action\n };\n\n return this.gainsight.triggerEvent(this.prefix, finalProps);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n ApplicationAvailability,\n ApplicationService,\n ApplicationType,\n FetchClient,\n IApplication,\n IApplicationBinary,\n IManagedObject,\n InventoryBinaryService,\n InventoryService\n} from '@c8y/client';\nimport { AppStateService, ThemeSwitcherService, ZipService } from '@c8y/ngx-components';\nimport { defer, BehaviorSubject, Observable } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\nimport { cloneDeep, uniq } from 'lodash-es';\nimport { BrandingVersionService } from './branding-version.service';\nimport { BrandingOptionsJson, allBrandingCSSVars, numberBrandingVars } from './branding.type';\nimport { StaticAsset, StaticAssetsService } from '@c8y/ngx-components/static-assets/data';\nimport { BrandingTrackingService } from './branding-tracking.service';\n\nexport interface BrandVersion {\n name: string;\n id: string;\n revision: number;\n version: string;\n tags: string[];\n owner?: string;\n lastUpdated?: string;\n publicOptionsApp?: IApplication;\n}\n\nexport interface BrandingFileDetails {\n fileName: string;\n blob: Blob;\n jsonContent?: any;\n}\n\nexport interface BrandingFileDetailsLegacy {\n path: string;\n value: string;\n blob?: Blob;\n fileName: string;\n urlWrapped: boolean;\n}\n\n/**\n * Service to load and store the branding of the tenant.\n */\n@Injectable({ providedIn: 'root' })\nexport class StoreBrandingService {\n readonly fileNames = {\n options: 'options.json',\n manifest: 'cumulocity.json',\n exportZipName: 'public-options.zip'\n } as const;\n readonly manifestValues = {\n name: 'public-options',\n contextPath: 'public-options',\n key: 'public-options-key',\n description: 'Application containing static assets used by e.g. branding.',\n noAppSwitcher: true,\n type: ApplicationType.HOSTED,\n availability: ApplicationAvailability.SHARED\n } as const satisfies IApplication;\n refreshTriggerBrandingVariants = new BehaviorSubject<void>(null);\n constructor(\n private applicationService: ApplicationService,\n private inventory: InventoryService,\n private binary: InventoryBinaryService,\n private zip: ZipService,\n private fetch: FetchClient,\n private brandingVersionService: BrandingVersionService,\n private appState: AppStateService,\n private staticAssets: StaticAssetsService,\n private themeSwitcher: ThemeSwitcherService,\n private brandingTracking: BrandingTrackingService\n ) {}\n\n /**\n * Sets the `latest` tag on the provided branding version. Making it the global active branding.\n */\n async markAsActive(brandingVersion: BrandVersion, app?: IApplication): Promise<void> {\n const publicOptions = app || (await this.getPublicOptionsApp());\n const tags = brandingVersion.tags || [];\n const version = brandingVersion.version;\n await this.applicationService.setPackageVersionTag(publicOptions, version, [...tags, 'latest']);\n }\n\n /**\n * Opens a new tab with to preview the branding. The branding must have been saved beforehand.\n * @param brandingName the name of the branding to be previewed\n */\n openPreviewForBranding(brandingName: string) {\n this.brandingTracking.openPreviewForBranding();\n window.open(\n `/apps/${\n this.appState.currentApplication.value?.contextPath || 'cockpit'\n }/index.html?brandingPreview=true&dynamicOptionsUrl=/apps/public/public-options@${brandingName}/options.json`,\n '_blank',\n 'noopener,noreferrer'\n );\n }\n\n /**\n * Returns the brandings of the tenant.\n * If no public options app is found, publicOptions will be undefined and variants an empty array.\n * For old brandings (created without versioning) a default version is returned.\n */\n async loadBrandingVariants(\n app?: IApplication\n ): Promise<{ publicOptions: IApplication | undefined; variants: BrandVersion[] }> {\n const publicOptions = app || (await this.getPublicOptionsApp());\n if (!publicOptions) {\n return { publicOptions: undefined, variants: [] };\n }\n const { data: versions } = await this.applicationService.listVersions(publicOptions);\n let mappedVersions: BrandVersion[] =\n versions\n ?.map(tmp => {\n try {\n const { name, iteration } =\n this.brandingVersionService.splitBrandingIntoNameAndIteration(tmp.version);\n return {\n revision: iteration,\n name: name,\n id: tmp.binaryId,\n version: tmp.version,\n tags: tmp.tags || [],\n publicOptionsApp: publicOptions\n };\n } catch (e) {\n console.warn('Failed to parse version', tmp, e);\n return undefined;\n }\n })\n ?.filter(Boolean) || [];\n if (!versions && publicOptions.activeVersionId) {\n mappedVersions = [\n {\n name: 'default',\n id: publicOptions.activeVersionId,\n version: 'default-1',\n revision: 1,\n tags: ['latest', 'default'],\n publicOptionsApp: publicOptions\n }\n ];\n }\n\n const variants = await this.getMetadataOfBrandingBinaries(mappedVersions);\n return { publicOptions, variants };\n }\n\n /**\n * As the branding is not immediately available after creation, this method will wait for the branding to be present.\n * @param version The version of the branding to be retrieved.\n */\n async waitForBrandingToBePresent(version: string): Promise<void> {\n const numberOfAttempts = 120;\n const sleepDurationInSeconds = 1;\n for (let i = 0; i < numberOfAttempts; i++) {\n try {\n // do not sleep before the first attempt\n if (i !== 0) {\n await new Promise(resolve => setTimeout(resolve, sleepDurationInSeconds * 1_000));\n }\n await this.getBrandingOptionsForVersion(version);\n console.info(`Branding \"${version}\" available now.`);\n return;\n } catch (e) {\n console.warn(\n `Branding \"${version}\" not yet present, retrying in ${sleepDurationInSeconds} seconds...`,\n e\n );\n }\n }\n throw new Error(\n `Branding \"${version}\" not available after ${numberOfAttempts * sleepDurationInSeconds} seconds, giving up.`\n );\n }\n\n /**\n * Will create a the initial branding based on the currently applied CSS variables.\n */\n async getStartedUsingBranding(): Promise<void> {\n const allVariables: Record<string, string> = {};\n const themeToRetrieveVars = ['light', 'dark'] as const;\n const unretrievableVars = new Array<string>();\n for (const theme of themeToRetrieveVars) {\n this.themeSwitcher.temporaryChangeTheme(theme);\n const styles = getComputedStyle(document.body);\n const variablesToSkip = [\n 'navigator-platform-logo',\n 'brand-logo-img'\n ] satisfies (typeof allBrandingCSSVars)[number][];\n const values = allBrandingCSSVars\n .filter(cssVar => !variablesToSkip.includes(cssVar as any))\n .reduce((prev, key) => {\n const directValue = styles.getPropertyValue(`--${key}`);\n const c8yPrefixedValue = styles.getPropertyValue(`--c8y-${key}`);\n const newKey = theme === 'light' ? key : `dark-${key}`;\n if (!directValue && !c8yPrefixedValue) {\n unretrievableVars.push(newKey);\n return prev;\n }\n let value: string | number = directValue || c8yPrefixedValue;\n if (numberBrandingVars.includes(key as any)) {\n try {\n value = Number.parseFloat(value.replace(/[A-Za-z]/g, '').trim());\n } catch (e) {\n console.warn(\n `Failed to parse number for \"${key}\" value that failed to parse: \"${value}\"`,\n e\n );\n return prev;\n }\n }\n return Object.assign(prev, { [newKey]: value });\n }, {});\n Object.assign(allVariables, values);\n }\n this.themeSwitcher.resetTemporaryTheme();\n\n try {\n await this.createPublicOptionsAppFromInheritedOptions(allVariables);\n } catch (e) {\n console.warn(e);\n }\n }\n\n getZipForBinary(\n binaryId: string,\n fileName: string = this.fileNames.exportZipName\n ): Observable<File> {\n return defer(() => this.binary.download(binaryId)).pipe(\n switchMap(response => response.blob()),\n map(blob => new File([blob], fileName))\n );\n }\n\n /**\n * Deletes the public options app and therefore all brandings.\n * The public options app can be optionally provided to avoid another request for it.\n */\n async deleteAllBrandings(publicOptions?: IApplication): Promise<void> {\n publicOptions = publicOptions || (await this.getPublicOptionsApp());\n await this.applicationService.delete(publicOptions);\n }\n\n /**\n * Enhances the provided branding versions with metadata from the linked binaries.\n * It will add the owner and lastUpdated fields to the versions.\n * The provided array is altered.\n */\n async getMetadataOfBrandingBinaries(versions: BrandVersion[]): Promise<BrandVersion[]> {\n const binaryIds = uniq(versions.map(tmp => tmp.id));\n if (!binaryIds.length) {\n return versions;\n }\n const { data: metadata } = await this.inventory.list({\n ids: binaryIds.join(','),\n pageSize: 2000\n });\n return versions.map(version => {\n const metadataForVersion =\n metadata.find(tmp => tmp.id === version.id) || ({} as IManagedObject);\n const { owner, lastUpdated } = metadataForVersion;\n return Object.assign(version, { owner, lastUpdated });\n });\n }\n\n /**\n * Saves the provided branding as a new version for the public options app.\n * The public options app can be optionally provided to avoid another request for it.\n */\n async saveBranding(\n blob: Blob | File,\n version: string,\n tags: string[] = [],\n publicOptionsApp?: IApplication\n ): Promise<{\n version: string;\n binary: IApplicationBinary;\n tags: string[];\n }> {\n const file = blob instanceof File ? blob : new File([blob], `public-options-${version}.zip`);\n const publicOptions = publicOptionsApp || (await this.getPublicOptionsApp());\n\n const { data: binary } = await this.applicationService\n .binary(publicOptions)\n .uploadApplicationVersion(file, version, tags);\n if (!publicOptions.activeVersionId || tags.includes('latest')) {\n await this.applicationService.update({\n id: publicOptions.id,\n activeVersionId: `${binary.binaryId}`\n });\n }\n this.refreshTriggerBrandingVariants.next();\n return { version, binary, tags };\n }\n\n /**\n * Removes a branding version from the public options app.\n * The public options app can be optionally provided to avoid another request for it.\n */\n async deleteBrandingVersion(version: string, publicOptions?: IApplication): Promise<void> {\n publicOptions = publicOptions || (await this.getPublicOptionsApp());\n await this.applicationService.deleteVersionPackage(publicOptions, { version });\n this.refreshTriggerBrandingVariants.next();\n }\n\n /**\n * Returns the blob of a zip file containing the provided branding options (options.json) and the manifest (cumulocity.json).\n */\n async getBrandingZip(content: Record<string, any> = {}): Promise<Blob> {\n content.lastUpdated = new Date().toISOString();\n const contentAsString = JSON.stringify(content);\n const zip = await this.zip.createZip([\n { fileName: this.fileNames.options, blob: new Blob([contentAsString]) },\n { fileName: this.fileNames.manifest, blob: new Blob([JSON.stringify(this.manifestValues)]) }\n ]);\n return zip;\n }\n\n /**\n * Adds a new branding version to the public options app.\n * The public options app can be optionally provided to avoid another request for it.\n */\n async addBranding(\n version: string,\n content: BrandingOptionsJson = {},\n tags: string[] = [],\n publicOptionsApp?: IApplication\n ): Promise<{\n version: string;\n binary: IApplicationBinary;\n tags: string[];\n }> {\n const zip = await this.getBrandingZip(content);\n\n return await this.saveBranding(zip, version, tags, publicOptionsApp);\n }\n\n /**\n * Returns the branding options for the provided version.\n * If no branding was found (e.g. status 404), an error is thrown.\n */\n async getBrandingOptionsForVersion(version?: string): Promise<BrandingOptionsJson> {\n const url = `/apps/public/public-options${version ? `@${version}` : ''}/${this.fileNames.options}`;\n const response = await this.fetch.fetch(url, { cache: 'no-cache' });\n if (response.status !== 200) {\n throw Error(`Unexpected status code: ${response.status}`);\n }\n\n const content = await response.json();\n return content as BrandingOptionsJson;\n }\n\n /**\n * Saves a new iteration of an already existing branding.\n */\n async saveExistingBranding(\n branding: Record<string, any>,\n currentVersion: string,\n tagsOfCurrentVersion: string[] = [],\n newVersion?: string\n ): Promise<string> {\n const publicOptions = await this.getPublicOptionsApp();\n const versionToBeSet = newVersion\n ? this.brandingVersionService.createInitialBrandingVersion(newVersion)\n : this.brandingVersionService.bumpBrandingIteration(currentVersion);\n\n const finalTags = tagsOfCurrentVersion;\n // only apply latest tag directly\n // there seems to be some special handling for the latest tag in the backend, that allows to directly move it while uploading the new version.\n // for all other tags this results in a 409 conflict. We therefore need to first delete the old version, before setting the other tags on the new version.\n if (!newVersion) {\n tagsOfCurrentVersion = tagsOfCurrentVersion.filter(tag => tag === 'latest');\n }\n await this.addBranding(versionToBeSet, branding, tagsOfCurrentVersion, publicOptions);\n if (!newVersion) {\n try {\n await this.deleteBrandingVersion(currentVersion, publicOptions);\n } catch (e) {\n if (e.res.status !== 404) {\n throw e;\n }\n }\n await this.applicationService.setPackageVersionTag(publicOptions, versionToBeSet, finalTags);\n }\n\n return versionToBeSet;\n }\n\n /**\n * Combines current branding options with the provided branding variables and creates a new public options app.\n * Any assets in the branding will be cloned.\n */\n async createPublicOptionsAppFromInheritedOptions(brandingVars?: Record<string, string>): Promise<{\n version: string;\n binary: IApplicationBinary;\n tags: string[];\n }> {\n let currentlyAppliedBranding: BrandingOptionsJson;\n let fallBackBranding: BrandingOptionsJson = {};\n try {\n currentlyAppliedBranding = await this.getBrandingOptionsForVersion();\n fallBackBranding = cloneDeep(currentlyAppliedBranding);\n } catch (e) {\n console.warn('Failed to get currently applied branding, proceeding with empty branding.', e);\n }\n\n if (brandingVars) {\n currentlyAppliedBranding = currentlyAppliedBranding || {};\n const brandingCssVars = currentlyAppliedBranding.brandingCssVars || {};\n Object.assign(brandingCssVars, brandingVars);\n currentlyAppliedBranding.brandingCssVars = brandingCssVars;\n }\n\n if (currentlyAppliedBranding) {\n try {\n const { oldAssets, newAssets } = await this.staticAssets.cloneAssetsIntoTenant('branding');\n currentlyAppliedBranding = this.replaceBrandingAssetsInBrandingOptions(\n currentlyAppliedBranding,\n oldAssets,\n newAssets\n );\n } catch (e) {\n console.warn('Failed to relocate branding assets into current tenant.', e);\n }\n }\n\n const publicOptionsApp = await this.createPublicOptionsApp();\n\n const defaultBrandingName = `default`;\n const result = await this.addBranding(\n this.brandingVersionService.createInitialBrandingVersion(defaultBrandingName),\n currentlyAppliedBranding || {},\n ['latest', defaultBrandingName],\n publicOptionsApp\n );\n\n const fallbackBrandingName = `fallback`;\n await this.addBranding(\n this.brandingVersionService.createInitialBrandingVersion(fallbackBrandingName),\n fallBackBranding,\n [fallbackBrandingName],\n publicOptionsApp\n );\n\n return result;\n }\n\n /**\n * Replaces the assets in the branding options with the new assets.\n * Goes through the provided `oldAssets` and replaces their occurrences in the branding with the corresponding `newAssets` entry sharing the same fileName.\n * Returns the updated branding options.\n */\n replaceBrandingAssetsInBrandingOptions(\n branding: BrandingOptionsJson,\n oldAssets: StaticAsset[],\n newAssets: StaticAsset[]\n ): BrandingOptionsJson {\n let brandingAsJSONString = JSON.stringify(branding);\n for (const oldAsset of oldAssets) {\n const newLocatedAsset = newAssets.find(tmp => tmp.fileName === oldAsset.fileName);\n if (!newLocatedAsset) {\n continue;\n }\n // if the path is the same, we don't need to replace it.\n if (oldAsset.path === newLocatedAsset.path) {\n continue;\n }\n\n // TODO: use proper replaceAll once it's available with es2021\n brandingAsJSONString = brandingAsJSONString.split(oldAsset.path).join(newLocatedAsset.path);\n }\n return JSON.parse(brandingAsJSONString);\n }\n\n private async getPublicOptionsApp() {\n try {\n const { data: manifest } = await this.applicationService.getManifestOfContextPath(\n this.manifestValues.contextPath\n );\n const { data: app } = await this.applicationService.detail(manifest.id);\n if (app.owner.tenant.id !== this.appState.currentTenant.value?.name) {\n return undefined;\n }\n return app;\n } catch (e) {\n // e.g. reached when no app with the given context path exists\n return undefined;\n }\n }\n\n private async createPublicOptionsApp() {\n const { data: app } = await this.applicationService.create(this.manifestValues);\n return app;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3.BrandingVersionService","i5.BrandingTrackingService"],"mappings":";;;;;;;;;;;;;MAMa,2BAA2B,CAAA;AAGtC,IAAA,WAAA,CAAoB,OAAuB,EAAA;QAAvB,IAAA,CAAA,OAAO,GAAP,OAAO;IAAmB;AAE9C,IAAA,aAAa,CAAC,WAAiC,EAAA;AAC7C,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;AACtB,YAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;QACxD;QACA,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC;QACxD,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;;QAGpD,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC5F,QAAA,IAAI,CAAC,qBAAqB,CAAC,oBAAoB,CAAC;AAEhD,QAAA,IAAI,CAAC,YAAY,GAAG,eAAe;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cAAc,CAAC;AAC/E,QAAA,OAAO,GAAG;IACZ;+GAlcW,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,sBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,eAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,uBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADP,MAAM,EAAA,CAAA,CAAA;;4FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACjDlC;;AAEG;;;;"}
|
|
@@ -3,22 +3,22 @@ import { Injectable, inject, SecurityContext, ViewChild, Input, Component, Event
|
|
|
3
3
|
import { gettext } from '@c8y/ngx-components/gettext';
|
|
4
4
|
import { from, merge, interval, BehaviorSubject, of, lastValueFrom, defer, forkJoin } from 'rxjs';
|
|
5
5
|
import { mergeMap, map, tap, throttleTime, buffer, switchMap } from 'rxjs/operators';
|
|
6
|
-
import * as i1 from '@c8y/ngx-components';
|
|
6
|
+
import * as i1$1 from '@c8y/ngx-components';
|
|
7
7
|
import { CommonModule, FormsModule, IconDirective, C8yTranslatePipe, WidgetTimeContextMediatorService, WidgetTimeContextDateRangeService, ThemeSwitcherService, DismissAlertStrategy, DynamicComponentAlert, CoreModule, MeasurementRealtimeService, AlarmRealtimeService, EventRealtimeService } from '@c8y/ngx-components';
|
|
8
8
|
import * as echarts from 'echarts';
|
|
9
|
-
import * as i1
|
|
9
|
+
import * as i1 from '@ngx-translate/core';
|
|
10
|
+
import * as i1$3 from '@c8y/client';
|
|
10
11
|
import { AlarmStatus, aggregationType, MeasurementService } from '@c8y/client';
|
|
11
12
|
import * as i6 from '@angular/router';
|
|
12
13
|
import * as i4 from '@c8y/ngx-components/alarms';
|
|
13
14
|
import { AlarmsModule, AlarmSeverityToIconPipe, AlarmSeverityToLabelPipe } from '@c8y/ngx-components/alarms';
|
|
14
15
|
import { INTERVALS } from '@c8y/ngx-components/interval-picker';
|
|
15
|
-
import * as
|
|
16
|
-
import * as i1$1 from '@angular/common';
|
|
16
|
+
import * as i1$2 from '@angular/common';
|
|
17
17
|
import { NgIf, NgForOf, CommonModule as CommonModule$1 } from '@angular/common';
|
|
18
18
|
import * as i2$1 from 'ngx-echarts';
|
|
19
19
|
import { NgxEchartsModule, NGX_ECHARTS_CONFIG } from 'ngx-echarts';
|
|
20
20
|
import { TooltipModule } from 'ngx-bootstrap/tooltip';
|
|
21
|
-
import * as i1$
|
|
21
|
+
import * as i1$4 from 'ngx-bootstrap/popover';
|
|
22
22
|
import { PopoverModule } from 'ngx-bootstrap/popover';
|
|
23
23
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
24
24
|
import * as i2 from 'ngx-bootstrap/dropdown';
|
|
@@ -91,15 +91,16 @@ const ICONS_MAP = {
|
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
class YAxisService {
|
|
94
|
-
constructor(
|
|
95
|
-
this.
|
|
94
|
+
constructor(translate) {
|
|
95
|
+
this.translate = translate;
|
|
96
96
|
this.Y_AXIS_OFFSET = 48;
|
|
97
|
-
this.intlNumberFormatCompliantLocale = this.appStateService.state.lang.replace('_', '-');
|
|
98
97
|
}
|
|
99
98
|
getYAxis(datapointsWithValues, YAxisOptions) {
|
|
100
99
|
const YAxisPlacement = this.getYAxisPlacement(datapointsWithValues, YAxisOptions);
|
|
101
100
|
const hasValues = datapointsWithValues.some(dp => dp.values && Object.keys(dp.values).length > 0);
|
|
102
101
|
const nameGap = hasValues ? 22 : 15;
|
|
102
|
+
const selectedLanguage = this.translate.currentLang;
|
|
103
|
+
const locale = selectedLanguage?.replace('_', '-');
|
|
103
104
|
if (YAxisOptions.forceMergeDatapoints) {
|
|
104
105
|
return {
|
|
105
106
|
name: Array.from(datapointsWithValues)
|
|
@@ -119,7 +120,12 @@ class YAxisService {
|
|
|
119
120
|
axisLabel: {
|
|
120
121
|
fontSize: 10,
|
|
121
122
|
show: true,
|
|
122
|
-
color: YAxisOptions.axisColor
|
|
123
|
+
color: YAxisOptions.axisColor,
|
|
124
|
+
formatter: (val) => new Intl.NumberFormat(locale, {
|
|
125
|
+
notation: 'compact',
|
|
126
|
+
compactDisplay: 'short',
|
|
127
|
+
maximumFractionDigits: 3
|
|
128
|
+
}).format(val)
|
|
123
129
|
},
|
|
124
130
|
axisLine: {
|
|
125
131
|
show: true,
|
|
@@ -196,10 +202,17 @@ class YAxisService {
|
|
|
196
202
|
formatter: val => {
|
|
197
203
|
if (this.isDefined(dp.min) && this.isDefined(dp.max)) {
|
|
198
204
|
const range = dp.max - dp.min;
|
|
199
|
-
const
|
|
200
|
-
|
|
205
|
+
const cleanRange = parseFloat(range.toPrecision(10));
|
|
206
|
+
const magnitudeDecimalPlaces = cleanRange > 0 ? Math.max(0, 1 - Math.floor(Math.log10(cleanRange))) : 0;
|
|
207
|
+
const decimalPlaces = Math.max(this.getDecimalPlaces(cleanRange), magnitudeDecimalPlaces);
|
|
208
|
+
return new Intl.NumberFormat(locale, {
|
|
209
|
+
notation: 'compact',
|
|
210
|
+
compactDisplay: 'short',
|
|
211
|
+
minimumFractionDigits: decimalPlaces,
|
|
212
|
+
maximumFractionDigits: decimalPlaces
|
|
213
|
+
}).format(val);
|
|
201
214
|
}
|
|
202
|
-
return new Intl.NumberFormat(
|
|
215
|
+
return new Intl.NumberFormat(locale, {
|
|
203
216
|
notation: 'compact',
|
|
204
217
|
compactDisplay: 'short',
|
|
205
218
|
maximumFractionDigits: 3
|
|
@@ -318,12 +331,12 @@ class YAxisService {
|
|
|
318
331
|
}
|
|
319
332
|
return !dps.some((dp2, index2) => this.isMatchingDp(dp, dp2) && index2 < index);
|
|
320
333
|
}
|
|
321
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: YAxisService, deps: [{ token: i1.
|
|
334
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: YAxisService, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
322
335
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: YAxisService }); }
|
|
323
336
|
}
|
|
324
337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: YAxisService, decorators: [{
|
|
325
338
|
type: Injectable
|
|
326
|
-
}], ctorParameters: () => [{ type: i1.
|
|
339
|
+
}], ctorParameters: () => [{ type: i1.TranslateService }] });
|
|
327
340
|
|
|
328
341
|
function assertUnreachable(_) {
|
|
329
342
|
throw new Error('Case unreachable.');
|
|
@@ -1548,12 +1561,12 @@ class EchartsOptionsService {
|
|
|
1548
1561
|
return acc;
|
|
1549
1562
|
}, null);
|
|
1550
1563
|
}
|
|
1551
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EchartsOptionsService, deps: [{ token: i1.DatePipe }, { token: YAxisService }, { token: ChartTypesService }, { token: i4.AlarmSeverityToIconPipe }, { token: i4.AlarmSeverityToLabelPipe }, { token:
|
|
1564
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EchartsOptionsService, deps: [{ token: i1$1.DatePipe }, { token: YAxisService }, { token: ChartTypesService }, { token: i4.AlarmSeverityToIconPipe }, { token: i4.AlarmSeverityToLabelPipe }, { token: i1.TranslateService }, { token: i6.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1552
1565
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EchartsOptionsService }); }
|
|
1553
1566
|
}
|
|
1554
1567
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EchartsOptionsService, decorators: [{
|
|
1555
1568
|
type: Injectable
|
|
1556
|
-
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: YAxisService }, { type: ChartTypesService }, { type: i4.AlarmSeverityToIconPipe }, { type: i4.AlarmSeverityToLabelPipe }, { type:
|
|
1569
|
+
}], ctorParameters: () => [{ type: i1$1.DatePipe }, { type: YAxisService }, { type: ChartTypesService }, { type: i4.AlarmSeverityToIconPipe }, { type: i4.AlarmSeverityToLabelPipe }, { type: i1.TranslateService }, { type: i6.Router }] });
|
|
1557
1570
|
|
|
1558
1571
|
class ChartRealtimeService {
|
|
1559
1572
|
constructor(measurementRealtime, alarmRealtimeService, eventRealtimeService, echartsOptionsService) {
|
|
@@ -1886,12 +1899,12 @@ class ChartRealtimeService {
|
|
|
1886
1899
|
datapointBackInSyncCallback(datapoint);
|
|
1887
1900
|
}
|
|
1888
1901
|
}
|
|
1889
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartRealtimeService, deps: [{ token: i1.MeasurementRealtimeService }, { token: i1.AlarmRealtimeService }, { token: i1.EventRealtimeService }, { token: EchartsOptionsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1902
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartRealtimeService, deps: [{ token: i1$1.MeasurementRealtimeService }, { token: i1$1.AlarmRealtimeService }, { token: i1$1.EventRealtimeService }, { token: EchartsOptionsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1890
1903
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartRealtimeService }); }
|
|
1891
1904
|
}
|
|
1892
1905
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartRealtimeService, decorators: [{
|
|
1893
1906
|
type: Injectable
|
|
1894
|
-
}], ctorParameters: () => [{ type: i1.MeasurementRealtimeService }, { type: i1.AlarmRealtimeService }, { type: i1.EventRealtimeService }, { type: EchartsOptionsService }] });
|
|
1907
|
+
}], ctorParameters: () => [{ type: i1$1.MeasurementRealtimeService }, { type: i1$1.AlarmRealtimeService }, { type: i1$1.EventRealtimeService }, { type: EchartsOptionsService }] });
|
|
1895
1908
|
|
|
1896
1909
|
class ChartAlertsComponent {
|
|
1897
1910
|
constructor() {
|
|
@@ -1904,7 +1917,7 @@ class ChartAlertsComponent {
|
|
|
1904
1917
|
return text;
|
|
1905
1918
|
}
|
|
1906
1919
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartAlertsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1907
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ChartAlertsComponent, isStandalone: true, selector: "c8y-chart-alerts", inputs: { alerts: "alerts" }, viewQueries: [{ propertyName: "dismissPermanently", first: true, predicate: ["dismissPermanently"], descendants: true }], ngImport: i0, template: "@if (alerts?.anyAlertExists$ | async) {\n <div class=\"overlay-center-vertically d-col p-16 p-r-24 p-l-24\">\n @for (alertGroup of alerts?.alertGroups; track alertGroup) {\n @if (alertGroup.value.alerts.length) {\n <div\n class=\"alert\"\n role=\"alert\"\n [ngClass]=\"'alert-' + alertGroup.type\"\n >\n @if (alertGroup.value.alertDismissal.dismissStrategy !== 'none') {\n <button\n class=\"close\"\n type=\"button\"\n (click)=\"\n alerts.dismissAlertGroup(alertGroup.type, dismissPermanently.nativeElement.checked)\n \"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n <span class=\"sr-only\">{{ 'Close' | translate }}</span>\n </button>\n }\n\n @for (alertItem of alertGroup.value.alerts; track alertItem) {\n <p [innerHTML]=\"sanitizeAlertText(alertItem.text)\"></p>\n }\n\n @if (alertGroup.value.alertDismissal.dismissStrategy !== 'none') {\n <label\n class=\"c8y-checkbox m-t-16\"\n title=\"{{ 'Don\\'t show again' | translate }}\"\n >\n <input\n type=\"checkbox\"\n #dismissPermanently\n />\n <span></span>\n <span>{{ \"Don't show again\" | translate }}</span>\n </label>\n }\n </div>\n }\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$
|
|
1920
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ChartAlertsComponent, isStandalone: true, selector: "c8y-chart-alerts", inputs: { alerts: "alerts" }, viewQueries: [{ propertyName: "dismissPermanently", first: true, predicate: ["dismissPermanently"], descendants: true }], ngImport: i0, template: "@if (alerts?.anyAlertExists$ | async) {\n <div class=\"overlay-center-vertically d-col p-16 p-r-24 p-l-24\">\n @for (alertGroup of alerts?.alertGroups; track alertGroup) {\n @if (alertGroup.value.alerts.length) {\n <div\n class=\"alert\"\n role=\"alert\"\n [ngClass]=\"'alert-' + alertGroup.type\"\n >\n @if (alertGroup.value.alertDismissal.dismissStrategy !== 'none') {\n <button\n class=\"close\"\n type=\"button\"\n (click)=\"\n alerts.dismissAlertGroup(alertGroup.type, dismissPermanently.nativeElement.checked)\n \"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n <span class=\"sr-only\">{{ 'Close' | translate }}</span>\n </button>\n }\n\n @for (alertItem of alertGroup.value.alerts; track alertItem) {\n <p [innerHTML]=\"sanitizeAlertText(alertItem.text)\"></p>\n }\n\n @if (alertGroup.value.alertDismissal.dismissStrategy !== 'none') {\n <label\n class=\"c8y-checkbox m-t-16\"\n title=\"{{ 'Don\\'t show again' | translate }}\"\n >\n <input\n type=\"checkbox\"\n #dismissPermanently\n />\n <span></span>\n <span>{{ \"Don't show again\" | translate }}</span>\n </label>\n }\n </div>\n }\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1$1.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }] }); }
|
|
1908
1921
|
}
|
|
1909
1922
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartAlertsComponent, decorators: [{
|
|
1910
1923
|
type: Component,
|
|
@@ -1949,12 +1962,12 @@ class ChartEventsService {
|
|
|
1949
1962
|
const result = await Promise.all(promises);
|
|
1950
1963
|
return result.flat();
|
|
1951
1964
|
}
|
|
1952
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartEventsService, deps: [{ token: i1$
|
|
1965
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartEventsService, deps: [{ token: i1$3.EventService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1953
1966
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartEventsService }); }
|
|
1954
1967
|
}
|
|
1955
1968
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartEventsService, decorators: [{
|
|
1956
1969
|
type: Injectable
|
|
1957
|
-
}], ctorParameters: () => [{ type: i1$
|
|
1970
|
+
}], ctorParameters: () => [{ type: i1$3.EventService }] });
|
|
1958
1971
|
|
|
1959
1972
|
class ChartAlarmsService {
|
|
1960
1973
|
constructor(alarmService) {
|
|
@@ -2003,12 +2016,12 @@ class ChartAlarmsService {
|
|
|
2003
2016
|
const result = await Promise.all(promises);
|
|
2004
2017
|
return result.flat();
|
|
2005
2018
|
}
|
|
2006
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartAlarmsService, deps: [{ token: i1$
|
|
2019
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartAlarmsService, deps: [{ token: i1$3.AlarmService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2007
2020
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartAlarmsService }); }
|
|
2008
2021
|
}
|
|
2009
2022
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartAlarmsService, decorators: [{
|
|
2010
2023
|
type: Injectable
|
|
2011
|
-
}], ctorParameters: () => [{ type: i1$
|
|
2024
|
+
}], ctorParameters: () => [{ type: i1$3.AlarmService }] });
|
|
2012
2025
|
|
|
2013
2026
|
class ChartHelpersService {
|
|
2014
2027
|
/**
|
|
@@ -2081,7 +2094,7 @@ class SelectAggregatedDatapointComponent {
|
|
|
2081
2094
|
this.selectedDatapointColor = found?.color || '';
|
|
2082
2095
|
}
|
|
2083
2096
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SelectAggregatedDatapointComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2084
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: SelectAggregatedDatapointComponent, isStandalone: true, selector: "c8y-select-aggregated-datapoint", inputs: { activeDatapoints: "activeDatapoints", value: "value" }, outputs: { valueChange: "valueChange" }, host: { classAttribute: "d-contents" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"dropdown dropup\"\n dropdown\n #datapointDropdown=\"bs-dropdown\"\n [cdkTrapFocus]=\"datapointDropdown.isOpen\"\n *ngIf=\"activeDatapoints?.length > 0\"\n>\n <ng-template #selectedDatapoint>\n <div class=\"text-left\">\n <strong>{{ selectedDatapointLabel }}</strong>\n <br />\n {{ 'Click to change' | translate }}\n </div>\n </ng-template>\n <button\n class=\"btn btn-default d-flex a-i-center dropdown-toggle c8y-dropdown\"\n title=\"{{'Select a data point to view its aggregated values in the time slider.' | translate }}\"\n type=\"button\"\n dropdownToggle\n >\n <span\n [style.background-color]=\"selectedDatapointColor\"\n style=\"display: inline-block; width: 16px; height: 16px; border-radius: 50%\"\n ></span>\n <span class=\"caret\"></span>\n </button>\n <ul\n class=\"dropdown-menu dropdown-menu-right\"\n *dropdownMenu\n >\n <li *ngFor=\"let datapoint of activeDatapoints\">\n <button\n class=\"p-r-8\"\n type=\"button\"\n (click)=\"changeDatapointSelection(datapoint)\"\n >\n <span\n class=\"d-inline-block m-r-4\"\n [style.background-color]=\"datapoint?.color\"\n style=\"width: 16px; height: 16px; border-radius: 50%\"\n ></span>\n <span class=\"text-truncate\" style=\"max-width:220px!important\" title=\"{{ datapoint?.label || `${datapoint?.fragment}-${datapoint?.series}` }}\">\n {{ datapoint?.label || `${datapoint?.fragment}-${datapoint?.series}` }}\n </span>\n <span\n class=\"m-l-auto flex-no-shrink\"\n *ngIf=\"\n datapoint.__target.id === value?.__target.id &&\n datapoint.fragment === value?.fragment &&\n datapoint.series === value?.series\n \"\n >\n <i\n class=\"text-success h4\"\n [c8yIcon]=\"'check'\"\n ></i>\n </span>\n </button>\n </li>\n </ul>\n</div>\n<button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Select a data point to view its aggregated values in the time slider.' | translate\n }}\"\n placement=\"left\"\n triggers=\"focus\"\n container=\"body\"\n></button>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i1$
|
|
2097
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: SelectAggregatedDatapointComponent, isStandalone: true, selector: "c8y-select-aggregated-datapoint", inputs: { activeDatapoints: "activeDatapoints", value: "value" }, outputs: { valueChange: "valueChange" }, host: { classAttribute: "d-contents" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"dropdown dropup\"\n dropdown\n #datapointDropdown=\"bs-dropdown\"\n [cdkTrapFocus]=\"datapointDropdown.isOpen\"\n *ngIf=\"activeDatapoints?.length > 0\"\n>\n <ng-template #selectedDatapoint>\n <div class=\"text-left\">\n <strong>{{ selectedDatapointLabel }}</strong>\n <br />\n {{ 'Click to change' | translate }}\n </div>\n </ng-template>\n <button\n class=\"btn btn-default d-flex a-i-center dropdown-toggle c8y-dropdown\"\n title=\"{{'Select a data point to view its aggregated values in the time slider.' | translate }}\"\n type=\"button\"\n dropdownToggle\n >\n <span\n [style.background-color]=\"selectedDatapointColor\"\n style=\"display: inline-block; width: 16px; height: 16px; border-radius: 50%\"\n ></span>\n <span class=\"caret\"></span>\n </button>\n <ul\n class=\"dropdown-menu dropdown-menu-right\"\n *dropdownMenu\n >\n <li *ngFor=\"let datapoint of activeDatapoints\">\n <button\n class=\"p-r-8\"\n type=\"button\"\n (click)=\"changeDatapointSelection(datapoint)\"\n >\n <span\n class=\"d-inline-block m-r-4\"\n [style.background-color]=\"datapoint?.color\"\n style=\"width: 16px; height: 16px; border-radius: 50%\"\n ></span>\n <span class=\"text-truncate\" style=\"max-width:220px!important\" title=\"{{ datapoint?.label || `${datapoint?.fragment}-${datapoint?.series}` }}\">\n {{ datapoint?.label || `${datapoint?.fragment}-${datapoint?.series}` }}\n </span>\n <span\n class=\"m-l-auto flex-no-shrink\"\n *ngIf=\"\n datapoint.__target.id === value?.__target.id &&\n datapoint.fragment === value?.fragment &&\n datapoint.series === value?.series\n \"\n >\n <i\n class=\"text-success h4\"\n [c8yIcon]=\"'check'\"\n ></i>\n </span>\n </button>\n </li>\n </ul>\n</div>\n<button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Select a data point to view its aggregated values in the time slider.' | translate\n }}\"\n placement=\"left\"\n triggers=\"focus\"\n container=\"body\"\n></button>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i1$4.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i2.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i2.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i2.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
|
|
2085
2098
|
}
|
|
2086
2099
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SelectAggregatedDatapointComponent, decorators: [{
|
|
2087
2100
|
type: Component,
|
|
@@ -2900,7 +2913,7 @@ class ChartsComponent {
|
|
|
2900
2913
|
YAxisService,
|
|
2901
2914
|
AlarmSeverityToIconPipe,
|
|
2902
2915
|
AlarmSeverityToLabelPipe
|
|
2903
|
-
], viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"p-relative fit-h chart-container\">\n <div\n class=\"fit-w fit-h\"\n #chart\n echarts\n [options]=\"chartOption$ | async\"\n (chartInit)=\"onChartInit($event)\"\n ></div>\n\n <c8y-chart-alerts [alerts]=\"alerts\"></c8y-chart-alerts>\n\n @if (showLoadMore) {\n <div class=\"chart-load-more\">\n <button\n class=\"btn btn-primary btn-block\"\n [disabled]=\"isFetching\"\n (click)=\"loadMoreData()\"\n >\n <i c8yIcon=\"restore\"></i>\n {{ 'Load more' | translate }}\n </button>\n </div>\n }\n\n @if (\n activeDatapoints.length > 1 &&\n config?.showSlider &&\n chartViewContext !== CHART_VIEW_CONTEXT.WIDGET_VIEW\n ) {\n <div class=\"e-charts--aggregated-datapoint\">\n <c8y-select-aggregated-datapoint\n [value]=\"config?.aggregatedDatapoint || activeDatapoints[0]\"\n (valueChange)=\"updateAggregatedSliderDatapoint.emit($event)\"\n [activeDatapoints]=\"activeDatapoints\"\n ></c8y-select-aggregated-datapoint>\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule$1 }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: NgxEchartsModule }, { kind: "directive", type: i2$1.NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: ChartAlertsComponent, selector: "c8y-chart-alerts", inputs: ["alerts"] }, { kind: "ngmodule", type: AlarmsModule }, { kind: "component", type: SelectAggregatedDatapointComponent, selector: "c8y-select-aggregated-datapoint", inputs: ["activeDatapoints", "value"], outputs: ["valueChange"] }, { kind: "pipe", type: i1$
|
|
2916
|
+
], viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"p-relative fit-h chart-container\">\n <div\n class=\"fit-w fit-h\"\n #chart\n echarts\n [options]=\"chartOption$ | async\"\n (chartInit)=\"onChartInit($event)\"\n ></div>\n\n <c8y-chart-alerts [alerts]=\"alerts\"></c8y-chart-alerts>\n\n @if (showLoadMore) {\n <div class=\"chart-load-more\">\n <button\n class=\"btn btn-primary btn-block\"\n [disabled]=\"isFetching\"\n (click)=\"loadMoreData()\"\n >\n <i c8yIcon=\"restore\"></i>\n {{ 'Load more' | translate }}\n </button>\n </div>\n }\n\n @if (\n activeDatapoints.length > 1 &&\n config?.showSlider &&\n chartViewContext !== CHART_VIEW_CONTEXT.WIDGET_VIEW\n ) {\n <div class=\"e-charts--aggregated-datapoint\">\n <c8y-select-aggregated-datapoint\n [value]=\"config?.aggregatedDatapoint || activeDatapoints[0]\"\n (valueChange)=\"updateAggregatedSliderDatapoint.emit($event)\"\n [activeDatapoints]=\"activeDatapoints\"\n ></c8y-select-aggregated-datapoint>\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule$1 }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1$1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: NgxEchartsModule }, { kind: "directive", type: i2$1.NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: ChartAlertsComponent, selector: "c8y-chart-alerts", inputs: ["alerts"] }, { kind: "ngmodule", type: AlarmsModule }, { kind: "component", type: SelectAggregatedDatapointComponent, selector: "c8y-select-aggregated-datapoint", inputs: ["activeDatapoints", "value"], outputs: ["valueChange"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.C8yTranslatePipe, name: "translate" }] }); }
|
|
2904
2917
|
}
|
|
2905
2918
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ChartsComponent, decorators: [{
|
|
2906
2919
|
type: Component,
|