@o3r/styling 12.0.0-next.3 → 12.0.0-next.5

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.
@@ -1,5 +1,3 @@
1
- export * from './breakpoints';
2
1
  export * from './core/index';
3
2
  export * from './devkit/index';
4
- export * from './services/index';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxrQkFBa0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vYnJlYWtwb2ludHMnO1xuZXhwb3J0ICogZnJvbSAnLi9jb3JlL2luZGV4JztcbmV4cG9ydCAqIGZyb20gJy4vZGV2a2l0L2luZGV4JztcbmV4cG9ydCAqIGZyb20gJy4vc2VydmljZXMvaW5kZXgnO1xuIl19
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsZ0JBQWdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NvcmUvaW5kZXgnO1xuZXhwb3J0ICogZnJvbSAnLi9kZXZraXQvaW5kZXgnO1xuIl19
@@ -1,22 +1,10 @@
1
- import { Breakpoints } from '@angular/cdk/layout';
2
1
  import * as i0 from '@angular/core';
3
2
  import { inject, Injectable, InjectionToken, DestroyRef, Optional, Inject, NgModule } from '@angular/core';
4
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
4
  import { sendOtterMessage, filterMessageContent } from '@o3r/core';
6
5
  import * as i1 from '@o3r/logger';
7
- import { fromEvent, firstValueFrom } from 'rxjs';
6
+ import { fromEvent } from 'rxjs';
8
7
  import { DOCUMENT } from '@angular/common';
9
- import * as i1$1 from '@o3r/dynamic-content';
10
- import { DynamicContentModule } from '@o3r/dynamic-content';
11
-
12
- /**
13
- * Angular CDK Breakpoints to detect devices
14
- * @deprecated use Breakpoints exported by @angular/cdk instead, will be removed in v12
15
- */
16
- const deviceBreakpoints = {
17
- mobile: [Breakpoints.HandsetLandscape, Breakpoints.HandsetPortrait],
18
- tablet: [Breakpoints.TabletLandscape, Breakpoints.TabletPortrait]
19
- };
20
8
 
21
9
  /** Tag to identify theme variable */
22
10
  const THEME_TAG_NAME = 'theme';
@@ -234,76 +222,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
234
222
  }]
235
223
  }] });
236
224
 
237
- /**
238
- * @deprecated use StyleLazyLoaderModule exported by @o3r/dynamic-content instead, will be removed in v12
239
- */
240
- class StyleLazyLoaderModule {
241
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
242
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoaderModule, imports: [DynamicContentModule] }); }
243
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoaderModule, imports: [DynamicContentModule] }); }
244
- }
245
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoaderModule, decorators: [{
246
- type: NgModule,
247
- args: [{
248
- imports: [DynamicContentModule]
249
- }]
250
- }] });
251
-
252
- /**
253
- * Service to lazy load a CSS file
254
- * @deprecated use StyleLazyLoader exported by @o3r/dynamic-content instead, will be removed in v12
255
- */
256
- class StyleLazyLoader {
257
- constructor(dcService) {
258
- this.dcService = dcService;
259
- this.DEFAULT_STYLE_ELEMENT_ID = 'external-theme';
260
- }
261
- /**
262
- * Load a new CSS from an absolute URL, if we already HTML element exists with the url, otherwise
263
- * @param styleUrlConfig object containing CSS File absolute URL to load, integrity and crossOrigin attributes
264
- * and the styleId id of the dynamic style in the body tag.
265
- */
266
- loadStyleFromURL(styleUrlConfig) {
267
- const elementId = styleUrlConfig.id || this.DEFAULT_STYLE_ELEMENT_ID;
268
- let style = document.querySelector(`#${elementId}`);
269
- if (style === null) {
270
- style = document.createElement('link');
271
- style.rel = 'stylesheet';
272
- style.type = 'text/css';
273
- const head = document.querySelectorAll('head')[0];
274
- head.append(style);
275
- }
276
- if (styleUrlConfig.integrity) {
277
- style.integrity = styleUrlConfig.integrity;
278
- }
279
- if (styleUrlConfig.crossOrigin !== undefined) {
280
- style.crossOrigin = styleUrlConfig.crossOrigin;
281
- }
282
- style.href = styleUrlConfig.href;
283
- }
284
- /**
285
- * Load a new CSS File
286
- * @param styleUrlConfig CSS File config containing URL to load, integrity and crossOrigin attributes
287
- * and the styleId id of the dynamic style in the body tag
288
- */
289
- async asyncLoadStyleFromDynamicContent(styleUrlConfig) {
290
- const dynamicContentPath = await firstValueFrom(this.dcService.getContentPathStream(styleUrlConfig.href));
291
- styleUrlConfig.href = dynamicContentPath;
292
- this.loadStyleFromURL(styleUrlConfig);
293
- }
294
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoader, deps: [{ token: i1$1.DynamicContentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
295
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoader, providedIn: StyleLazyLoaderModule }); }
296
- }
297
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoader, decorators: [{
298
- type: Injectable,
299
- args: [{
300
- providedIn: StyleLazyLoaderModule
301
- }]
302
- }], ctorParameters: () => [{ type: i1$1.DynamicContentService }] });
303
-
304
225
  /**
305
226
  * Generated bundle index. Do not edit.
306
227
  */
307
228
 
308
- export { OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS, OTTER_STYLING_DEVTOOLS_OPTIONS, OtterStylingDevtools, PALETTE_TAG_NAME, StyleLazyLoader, StyleLazyLoaderModule, StylingDevtoolsMessageService, StylingDevtoolsModule, THEME_TAG_NAME, deviceBreakpoints };
229
+ export { OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS, OTTER_STYLING_DEVTOOLS_OPTIONS, OtterStylingDevtools, PALETTE_TAG_NAME, StylingDevtoolsMessageService, StylingDevtoolsModule, THEME_TAG_NAME };
309
230
  //# sourceMappingURL=o3r-styling.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-styling.mjs","sources":["../../src/breakpoints.ts","../../src/devkit/styling-devkit.interface.ts","../../src/devkit/styling-devtools.service.ts","../../src/devkit/styling-devtools.token.ts","../../src/devkit/styling-devtools.message.service.ts","../../src/devkit/styling-devtools.module.ts","../../src/services/styling/style-lazy-loader.module.ts","../../src/services/styling/style-lazy-loader.service.ts","../../src/o3r-styling.ts"],"sourcesContent":["import {\n Breakpoints,\n} from '@angular/cdk/layout';\n\n/**\n * Angular CDK Breakpoints to detect devices\n * @deprecated use Breakpoints exported by @angular/cdk instead, will be removed in v12\n */\nexport const deviceBreakpoints = {\n mobile: [Breakpoints.HandsetLandscape, Breakpoints.HandsetPortrait],\n tablet: [Breakpoints.TabletLandscape, Breakpoints.TabletPortrait]\n};\n","import type {\n ConnectContentMessage,\n DevtoolsCommonOptions,\n MessageDataTypes,\n OtterMessageContent,\n RequestMessagesContentMessage,\n} from '@o3r/core';\nimport {\n CssVariable,\n} from '../core/index';\n\n/**\n * Styling devtools service options\n */\nexport interface StylingDevtoolsServiceOptions extends DevtoolsCommonOptions {\n /**\n * Path to retrieve the styling metadata file\n */\n stylingMetadataPath: string;\n}\n\n/** Update styling variables */\nexport interface UpdateStylingVariablesContentMessage extends OtterMessageContent<'updateStylingVariables'> {\n /**\n * Dictionary of variable value to update\n * indexed by the variable name\n */\n variables: Record<string, string>;\n}\n\n/** Reset styling variables override */\nexport interface ResetStylingVariablesContentMessage extends OtterMessageContent<'resetStylingVariables'> {}\n\n/** Styling variable */\nexport type StylingVariable = CssVariable & { runtimeValue?: string };\n\n/** Get styling variables */\nexport interface GetStylingVariableContentMessage extends OtterMessageContent<'getStylingVariable'> {\n /** List of styling variables */\n variables: StylingVariable[];\n}\n\n/**\n * List of styling message contents\n */\ntype StylingMessageContents =\n | UpdateStylingVariablesContentMessage\n | ResetStylingVariablesContentMessage\n | GetStylingVariableContentMessage;\n\n/** List of possible DataTypes for Styling messages */\nexport type StylingMessageDataTypes = MessageDataTypes<StylingMessageContents>;\n\n/** List of all messages for Styling purposes */\nexport type AvailableStylingMessageContents =\n | StylingMessageContents\n | ConnectContentMessage\n | RequestMessagesContentMessage<StylingMessageDataTypes>;\n\n/** Tag to identify theme variable */\nexport const THEME_TAG_NAME = 'theme';\n\n/** Tag to identify palette variable */\nexport const PALETTE_TAG_NAME = 'palette';\n","import {\n DOCUMENT,\n} from '@angular/common';\nimport {\n inject,\n Injectable,\n} from '@angular/core';\nimport type {\n CssMetadata,\n} from '../core/index';\n\n/**\n * Styling devtools service\n */\n@Injectable()\nexport class OtterStylingDevtools {\n private readonly document = inject(DOCUMENT);\n\n /**\n * Retrieve styling metadata\n * @param stylingMetadataPath\n */\n public async getStylingMetadata(stylingMetadataPath: string): Promise<CssMetadata> {\n return (await fetch(stylingMetadataPath)).json();\n }\n\n /**\n * Update styling variables\n * @param variables\n */\n public updateVariables(variables: Record<string, string>) {\n Object.entries(variables).forEach(([varName, value]) => this.document.querySelector('html')!.style.setProperty(`--${varName}`, value));\n }\n\n /**\n * Reset styling variables override\n */\n public resetStylingVariables() {\n const style = this.document.querySelector('html')!.style;\n style.cssText\n .split(/;(\\s+)?/)\n .reduce((acc: string[], str) => {\n const match = str?.match(/^(--.*):/);\n return match ? acc.concat(match[1]) : acc;\n }, [])\n .forEach((varName) => style.removeProperty(varName));\n }\n}\n","import {\n InjectionToken,\n} from '@angular/core';\nimport type {\n StylingDevtoolsServiceOptions,\n} from './styling-devkit.interface';\n\n/**\n * Default value for styling devtools\n */\nexport const OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS: Readonly<StylingDevtoolsServiceOptions> = {\n isActivatedOnBootstrap: false,\n stylingMetadataPath: './metadata/styling.metadata.json'\n} as const;\n\n/**\n * Token for styling devtools\n */\nexport const OTTER_STYLING_DEVTOOLS_OPTIONS = new InjectionToken<StylingDevtoolsServiceOptions>('Otter Styling Devtools options');\n","/* eslint-disable no-console -- this is the purpose of this service */\nimport {\n DestroyRef,\n inject,\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n filterMessageContent,\n sendOtterMessage,\n} from '@o3r/core';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n fromEvent,\n} from 'rxjs';\nimport {\n AvailableStylingMessageContents,\n StylingDevtoolsServiceOptions,\n StylingMessageDataTypes,\n} from './styling-devkit.interface';\nimport {\n OtterStylingDevtools,\n} from './styling-devtools.service';\nimport {\n OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_STYLING_DEVTOOLS_OPTIONS,\n} from './styling-devtools.token';\n\nconst isStylingMessage = (message: any): message is AvailableStylingMessageContents => {\n return message && (\n message.dataType === 'updateStylingVariables'\n || message.dataType === 'resetStylingVariables'\n || message.dataType === 'getStylingVariable'\n || message.dataType === 'requestMessages'\n || message.dataType === 'connect'\n );\n};\n\nconst getCSSRulesAppliedOnRoot = () => Array.from(document.styleSheets)\n .reverse()\n .reduce((acc: CSSStyleRule[], styleSheet) => {\n let rules;\n try {\n rules = styleSheet.cssRules || styleSheet.rules;\n } catch (err) {\n console.debug(`Could not access to stylesheet ${styleSheet.href}. This might be due to network issues, please check:\n- network connectivity\n- CORS setup\n- granted access to the stylesheet`, err);\n }\n\n return acc.concat(\n Array.from(rules || [])\n .reverse()\n .filter((rule): rule is CSSStyleRule => rule instanceof CSSStyleRule && /\\b:root\\b/.test(rule.selectorText))\n );\n }, []);\n\nconst getCSSVariableValueInCSSStyleDeclaration = (variableName: string, style: CSSStyleDeclaration) =>\n style.getPropertyValue(variableName).trim();\n\nconst getCSSVariableValue = (variableName: string, cssRules: CSSStyleRule[]) => {\n const inlineValue = getCSSVariableValueInCSSStyleDeclaration(variableName, document.querySelector('html')!.style);\n if (inlineValue) {\n return inlineValue;\n }\n\n for (const rule of cssRules) {\n const ruleValue = getCSSVariableValueInCSSStyleDeclaration(variableName, rule.style);\n if (ruleValue) {\n return ruleValue;\n }\n }\n};\n\n/**\n * Service to handle communication between application and chrome extension for styling\n */\n@Injectable()\nexport class StylingDevtoolsMessageService {\n private readonly sendMessage = sendOtterMessage<AvailableStylingMessageContents>;\n private readonly destroyRef = inject(DestroyRef);\n\n constructor(\n private readonly logger: LoggerService,\n private readonly stylingDevTools: OtterStylingDevtools,\n @Optional() @Inject(OTTER_STYLING_DEVTOOLS_OPTIONS) private readonly options: StylingDevtoolsServiceOptions = OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS) {\n this.options = {\n ...OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n ...this.options\n };\n if (this.options.isActivatedOnBootstrap) {\n this.activate();\n }\n }\n\n private async sendMetadata() {\n const metadata = await this.stylingDevTools.getStylingMetadata(this.options.stylingMetadataPath);\n const cssRules = getCSSRulesAppliedOnRoot();\n const variables = Object.values(metadata.variables).map((variable) => ({\n ...variable,\n runtimeValue: getCSSVariableValue(`--${variable.name}`, cssRules)\n }));\n this.sendMessage('getStylingVariable', { variables });\n }\n\n /**\n * Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension\n * @param only restricted list of messages to re-send\n */\n private handleReEmitRequest(only?: StylingMessageDataTypes[]) {\n if (!only || only.includes('getStylingVariable')) {\n return this.sendMetadata();\n }\n }\n\n /**\n * Function to handle the incoming messages from Otter Chrome DevTools extension\n * @param message Message coming from the Otter Chrome DevTools extension\n */\n private handleEvents(message: AvailableStylingMessageContents) {\n this.logger.debug('Message handling by the styling service', message);\n\n switch (message.dataType) {\n case 'connect': {\n this.connectPlugin();\n break;\n }\n case 'requestMessages': {\n void this.handleReEmitRequest(message.only);\n break;\n }\n case 'updateStylingVariables': {\n this.stylingDevTools.updateVariables(message.variables);\n break;\n }\n case 'resetStylingVariables': {\n this.stylingDevTools.resetStylingVariables();\n break;\n }\n default: {\n this.logger.warn('Message ignored by the styling service', message);\n }\n }\n }\n\n /**\n * Function to connect the plugin to the Otter Chrome DevTools extension\n */\n private connectPlugin() {\n this.logger.debug('Otter DevTools is plugged to styling service of the application');\n }\n\n /** @inheritDoc */\n public activate() {\n fromEvent(window, 'message').pipe(\n takeUntilDestroyed(this.destroyRef),\n filterMessageContent(isStylingMessage)\n ).subscribe((e) => this.handleEvents(e));\n }\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport type {\n StylingDevtoolsServiceOptions,\n} from './styling-devkit.interface';\nimport {\n StylingDevtoolsMessageService,\n} from './styling-devtools.message.service';\nimport {\n OtterStylingDevtools,\n} from './styling-devtools.service';\nimport {\n OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_STYLING_DEVTOOLS_OPTIONS,\n} from './styling-devtools.token';\n\n@NgModule({\n providers: [\n { provide: OTTER_STYLING_DEVTOOLS_OPTIONS, useValue: OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS },\n StylingDevtoolsMessageService,\n OtterStylingDevtools\n ]\n})\nexport class StylingDevtoolsModule {\n /**\n * Initialize Otter Devtools\n * @param options\n */\n public static instrument(options: Partial<StylingDevtoolsServiceOptions>): ModuleWithProviders<StylingDevtoolsModule> {\n return {\n ngModule: StylingDevtoolsModule,\n providers: [\n { provide: OTTER_STYLING_DEVTOOLS_OPTIONS, useValue: { ...OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS, ...options }, multi: false },\n StylingDevtoolsMessageService,\n OtterStylingDevtools\n ]\n };\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n DynamicContentModule,\n} from '@o3r/dynamic-content';\n\n/**\n * @deprecated use StyleLazyLoaderModule exported by @o3r/dynamic-content instead, will be removed in v12\n */\n@NgModule({\n imports: [DynamicContentModule]\n})\nexport class StyleLazyLoaderModule {}\n","import {\n Injectable,\n} from '@angular/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n firstValueFrom,\n} from 'rxjs';\nimport {\n StyleLazyLoaderModule,\n} from './style-lazy-loader.module';\n\n/**\n * Interface to describe a style to lazy load from a url.\n * @deprecated use StyleURL exported by @o3r/dynamic-content instead, will be removed in v12\n */\nexport interface StyleURL {\n /** url to file */\n href: string;\n /** id of the HTML element */\n id?: string;\n /** html integrity attribute to verify fetched resources */\n integrity?: string;\n /** html crossOrigin attribute for CORS support. */\n crossOrigin?: 'anonymous' | 'use-credentials' | '';\n}\n\n/**\n * Service to lazy load a CSS file\n * @deprecated use StyleLazyLoader exported by @o3r/dynamic-content instead, will be removed in v12\n */\n@Injectable({\n providedIn: StyleLazyLoaderModule\n})\nexport class StyleLazyLoader {\n private readonly DEFAULT_STYLE_ELEMENT_ID = 'external-theme';\n\n constructor(private readonly dcService: DynamicContentService) {}\n\n /**\n * Load a new CSS from an absolute URL, if we already HTML element exists with the url, otherwise\n * @param styleUrlConfig object containing CSS File absolute URL to load, integrity and crossOrigin attributes\n * and the styleId id of the dynamic style in the body tag.\n */\n public loadStyleFromURL(styleUrlConfig: StyleURL) {\n const elementId = styleUrlConfig.id || this.DEFAULT_STYLE_ELEMENT_ID;\n let style = document.querySelector<HTMLLinkElement>(`#${elementId}`);\n\n if (style === null) {\n style = document.createElement('link');\n style.rel = 'stylesheet';\n style.type = 'text/css';\n const head = document.querySelectorAll('head')[0];\n head.append(style);\n }\n if (styleUrlConfig.integrity) {\n style.integrity = styleUrlConfig.integrity;\n }\n if (styleUrlConfig.crossOrigin !== undefined) {\n style.crossOrigin = styleUrlConfig.crossOrigin;\n }\n style.href = styleUrlConfig.href;\n }\n\n /**\n * Load a new CSS File\n * @param styleUrlConfig CSS File config containing URL to load, integrity and crossOrigin attributes\n * and the styleId id of the dynamic style in the body tag\n */\n public async asyncLoadStyleFromDynamicContent(styleUrlConfig: StyleURL) {\n const dynamicContentPath = await firstValueFrom(\n this.dcService.getContentPathStream(styleUrlConfig.href)\n );\n styleUrlConfig.href = dynamicContentPath;\n this.loadStyleFromURL(styleUrlConfig);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAIA;;;AAGG;AACU,MAAA,iBAAiB,GAAG;IAC/B,MAAM,EAAE,CAAC,WAAW,CAAC,gBAAgB,EAAE,WAAW,CAAC,eAAe,CAAC;IACnE,MAAM,EAAE,CAAC,WAAW,CAAC,eAAe,EAAE,WAAW,CAAC,cAAc;;;ACiDlE;AACO,MAAM,cAAc,GAAG;AAE9B;AACO,MAAM,gBAAgB,GAAG;;ACpDhC;;AAEG;MAEU,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AA+B7C;AA7BC;;;AAGG;IACI,MAAM,kBAAkB,CAAC,mBAA2B,E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../../src/devkit/styling-devkit.interface.ts","../../src/devkit/styling-devtools.service.ts","../../src/devkit/styling-devtools.token.ts","../../src/devkit/styling-devtools.message.service.ts","../../src/devkit/styling-devtools.module.ts","../../src/o3r-styling.ts"],"sourcesContent":["import type {\n ConnectContentMessage,\n DevtoolsCommonOptions,\n MessageDataTypes,\n OtterMessageContent,\n RequestMessagesContentMessage,\n} from '@o3r/core';\nimport {\n CssVariable,\n} from '../core/index';\n\n/**\n * Styling devtools service options\n */\nexport interface StylingDevtoolsServiceOptions extends DevtoolsCommonOptions {\n /**\n * Path to retrieve the styling metadata file\n */\n stylingMetadataPath: string;\n}\n\n/** Update styling variables */\nexport interface UpdateStylingVariablesContentMessage extends OtterMessageContent<'updateStylingVariables'> {\n /**\n * Dictionary of variable value to update\n * indexed by the variable name\n */\n variables: Record<string, string>;\n}\n\n/** Reset styling variables override */\nexport interface ResetStylingVariablesContentMessage extends OtterMessageContent<'resetStylingVariables'> {}\n\n/** Styling variable */\nexport type StylingVariable = CssVariable & { runtimeValue?: string };\n\n/** Get styling variables */\nexport interface GetStylingVariableContentMessage extends OtterMessageContent<'getStylingVariable'> {\n /** List of styling variables */\n variables: StylingVariable[];\n}\n\n/**\n * List of styling message contents\n */\ntype StylingMessageContents =\n | UpdateStylingVariablesContentMessage\n | ResetStylingVariablesContentMessage\n | GetStylingVariableContentMessage;\n\n/** List of possible DataTypes for Styling messages */\nexport type StylingMessageDataTypes = MessageDataTypes<StylingMessageContents>;\n\n/** List of all messages for Styling purposes */\nexport type AvailableStylingMessageContents =\n | StylingMessageContents\n | ConnectContentMessage\n | RequestMessagesContentMessage<StylingMessageDataTypes>;\n\n/** Tag to identify theme variable */\nexport const THEME_TAG_NAME = 'theme';\n\n/** Tag to identify palette variable */\nexport const PALETTE_TAG_NAME = 'palette';\n","import {\n DOCUMENT,\n} from '@angular/common';\nimport {\n inject,\n Injectable,\n} from '@angular/core';\nimport type {\n CssMetadata,\n} from '../core/index';\n\n/**\n * Styling devtools service\n */\n@Injectable()\nexport class OtterStylingDevtools {\n private readonly document = inject(DOCUMENT);\n\n /**\n * Retrieve styling metadata\n * @param stylingMetadataPath\n */\n public async getStylingMetadata(stylingMetadataPath: string): Promise<CssMetadata> {\n return (await fetch(stylingMetadataPath)).json();\n }\n\n /**\n * Update styling variables\n * @param variables\n */\n public updateVariables(variables: Record<string, string>) {\n Object.entries(variables).forEach(([varName, value]) => this.document.querySelector('html')!.style.setProperty(`--${varName}`, value));\n }\n\n /**\n * Reset styling variables override\n */\n public resetStylingVariables() {\n const style = this.document.querySelector('html')!.style;\n style.cssText\n .split(/;(\\s+)?/)\n .reduce((acc: string[], str) => {\n const match = str?.match(/^(--.*):/);\n return match ? acc.concat(match[1]) : acc;\n }, [])\n .forEach((varName) => style.removeProperty(varName));\n }\n}\n","import {\n InjectionToken,\n} from '@angular/core';\nimport type {\n StylingDevtoolsServiceOptions,\n} from './styling-devkit.interface';\n\n/**\n * Default value for styling devtools\n */\nexport const OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS: Readonly<StylingDevtoolsServiceOptions> = {\n isActivatedOnBootstrap: false,\n stylingMetadataPath: './metadata/styling.metadata.json'\n} as const;\n\n/**\n * Token for styling devtools\n */\nexport const OTTER_STYLING_DEVTOOLS_OPTIONS = new InjectionToken<StylingDevtoolsServiceOptions>('Otter Styling Devtools options');\n","/* eslint-disable no-console -- this is the purpose of this service */\nimport {\n DestroyRef,\n inject,\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n filterMessageContent,\n sendOtterMessage,\n} from '@o3r/core';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n fromEvent,\n} from 'rxjs';\nimport {\n AvailableStylingMessageContents,\n StylingDevtoolsServiceOptions,\n StylingMessageDataTypes,\n} from './styling-devkit.interface';\nimport {\n OtterStylingDevtools,\n} from './styling-devtools.service';\nimport {\n OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_STYLING_DEVTOOLS_OPTIONS,\n} from './styling-devtools.token';\n\nconst isStylingMessage = (message: any): message is AvailableStylingMessageContents => {\n return message && (\n message.dataType === 'updateStylingVariables'\n || message.dataType === 'resetStylingVariables'\n || message.dataType === 'getStylingVariable'\n || message.dataType === 'requestMessages'\n || message.dataType === 'connect'\n );\n};\n\nconst getCSSRulesAppliedOnRoot = () => Array.from(document.styleSheets)\n .reverse()\n .reduce((acc: CSSStyleRule[], styleSheet) => {\n let rules;\n try {\n rules = styleSheet.cssRules || styleSheet.rules;\n } catch (err) {\n console.debug(`Could not access to stylesheet ${styleSheet.href}. This might be due to network issues, please check:\n- network connectivity\n- CORS setup\n- granted access to the stylesheet`, err);\n }\n\n return acc.concat(\n Array.from(rules || [])\n .reverse()\n .filter((rule): rule is CSSStyleRule => rule instanceof CSSStyleRule && /\\b:root\\b/.test(rule.selectorText))\n );\n }, []);\n\nconst getCSSVariableValueInCSSStyleDeclaration = (variableName: string, style: CSSStyleDeclaration) =>\n style.getPropertyValue(variableName).trim();\n\nconst getCSSVariableValue = (variableName: string, cssRules: CSSStyleRule[]) => {\n const inlineValue = getCSSVariableValueInCSSStyleDeclaration(variableName, document.querySelector('html')!.style);\n if (inlineValue) {\n return inlineValue;\n }\n\n for (const rule of cssRules) {\n const ruleValue = getCSSVariableValueInCSSStyleDeclaration(variableName, rule.style);\n if (ruleValue) {\n return ruleValue;\n }\n }\n};\n\n/**\n * Service to handle communication between application and chrome extension for styling\n */\n@Injectable()\nexport class StylingDevtoolsMessageService {\n private readonly sendMessage = sendOtterMessage<AvailableStylingMessageContents>;\n private readonly destroyRef = inject(DestroyRef);\n\n constructor(\n private readonly logger: LoggerService,\n private readonly stylingDevTools: OtterStylingDevtools,\n @Optional() @Inject(OTTER_STYLING_DEVTOOLS_OPTIONS) private readonly options: StylingDevtoolsServiceOptions = OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS) {\n this.options = {\n ...OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n ...this.options\n };\n if (this.options.isActivatedOnBootstrap) {\n this.activate();\n }\n }\n\n private async sendMetadata() {\n const metadata = await this.stylingDevTools.getStylingMetadata(this.options.stylingMetadataPath);\n const cssRules = getCSSRulesAppliedOnRoot();\n const variables = Object.values(metadata.variables).map((variable) => ({\n ...variable,\n runtimeValue: getCSSVariableValue(`--${variable.name}`, cssRules)\n }));\n this.sendMessage('getStylingVariable', { variables });\n }\n\n /**\n * Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension\n * @param only restricted list of messages to re-send\n */\n private handleReEmitRequest(only?: StylingMessageDataTypes[]) {\n if (!only || only.includes('getStylingVariable')) {\n return this.sendMetadata();\n }\n }\n\n /**\n * Function to handle the incoming messages from Otter Chrome DevTools extension\n * @param message Message coming from the Otter Chrome DevTools extension\n */\n private handleEvents(message: AvailableStylingMessageContents) {\n this.logger.debug('Message handling by the styling service', message);\n\n switch (message.dataType) {\n case 'connect': {\n this.connectPlugin();\n break;\n }\n case 'requestMessages': {\n void this.handleReEmitRequest(message.only);\n break;\n }\n case 'updateStylingVariables': {\n this.stylingDevTools.updateVariables(message.variables);\n break;\n }\n case 'resetStylingVariables': {\n this.stylingDevTools.resetStylingVariables();\n break;\n }\n default: {\n this.logger.warn('Message ignored by the styling service', message);\n }\n }\n }\n\n /**\n * Function to connect the plugin to the Otter Chrome DevTools extension\n */\n private connectPlugin() {\n this.logger.debug('Otter DevTools is plugged to styling service of the application');\n }\n\n /** @inheritDoc */\n public activate() {\n fromEvent(window, 'message').pipe(\n takeUntilDestroyed(this.destroyRef),\n filterMessageContent(isStylingMessage)\n ).subscribe((e) => this.handleEvents(e));\n }\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport type {\n StylingDevtoolsServiceOptions,\n} from './styling-devkit.interface';\nimport {\n StylingDevtoolsMessageService,\n} from './styling-devtools.message.service';\nimport {\n OtterStylingDevtools,\n} from './styling-devtools.service';\nimport {\n OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_STYLING_DEVTOOLS_OPTIONS,\n} from './styling-devtools.token';\n\n@NgModule({\n providers: [\n { provide: OTTER_STYLING_DEVTOOLS_OPTIONS, useValue: OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS },\n StylingDevtoolsMessageService,\n OtterStylingDevtools\n ]\n})\nexport class StylingDevtoolsModule {\n /**\n * Initialize Otter Devtools\n * @param options\n */\n public static instrument(options: Partial<StylingDevtoolsServiceOptions>): ModuleWithProviders<StylingDevtoolsModule> {\n return {\n ngModule: StylingDevtoolsModule,\n providers: [\n { provide: OTTER_STYLING_DEVTOOLS_OPTIONS, useValue: { ...OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS, ...options }, multi: false },\n StylingDevtoolsMessageService,\n OtterStylingDevtools\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AA2DA;AACO,MAAM,cAAc,GAAG;AAE9B;AACO,MAAM,gBAAgB,GAAG;;ACpDhC;;AAEG;MAEU,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AA+B7C;AA7BC;;;AAGG;IACI,MAAM,kBAAkB,CAAC,mBAA2B,EAAA;QACzD,OAAO,CAAC,MAAM,KAAK,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE;;AAGlD;;;AAGG;AACI,IAAA,eAAe,CAAC,SAAiC,EAAA;AACtD,QAAA,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAE,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,OAAO,CAAA,CAAE,EAAE,KAAK,CAAC,CAAC;;AAGxI;;AAEG;IACI,q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SAAS,EAAE;AACT,gBAAA,EAAE,OAAO,EAAE,8BAA8B,EAAE,QAAQ,EAAE,EAAE,GAAG,sCAAsC,EAAE,GAAG,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;gBAC9H,6BAA6B;gBAC7B;AACD;SACF;;kIAbQ,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mIAArB,qBAAqB,EAAA,CAAA,CAAA;AAArB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,EANrB,SAAA,EAAA;AACT,YAAA,EAAE,OAAO,EAAE,8BAA8B,EAAE,QAAQ,EAAE,sCAAsC,EAAE;YAC7F,6BAA6B;YAC7B;AACD,SAAA,EAAA,CAAA,CAAA;;4FAEU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,8BAA8B,EAAE,QAAQ,EAAE,sCAAsC,EAAE;wBAC7F,6BAA6B;wBAC7B;AACD;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/styling",
3
- "version": "12.0.0-next.3",
3
+ "version": "12.0.0-next.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -40,11 +40,11 @@
40
40
  "@angular/common": "^18.2.0",
41
41
  "@angular/core": "^18.2.0",
42
42
  "@angular/material": "^18.2.0",
43
- "@o3r/core": "^12.0.0-next.3",
44
- "@o3r/dynamic-content": "^12.0.0-next.3",
45
- "@o3r/extractors": "^12.0.0-next.3",
46
- "@o3r/logger": "^12.0.0-next.3",
47
- "@o3r/schematics": "^12.0.0-next.3",
43
+ "@o3r/core": "^12.0.0-next.5",
44
+ "@o3r/dynamic-content": "^12.0.0-next.5",
45
+ "@o3r/extractors": "^12.0.0-next.5",
46
+ "@o3r/logger": "^12.0.0-next.5",
47
+ "@o3r/schematics": "^12.0.0-next.5",
48
48
  "@schematics/angular": "^18.2.0",
49
49
  "@yarnpkg/cli": "^4.3.1",
50
50
  "@yarnpkg/core": "^4.1.1",
@@ -56,6 +56,7 @@
56
56
  "rxjs": "^7.8.1",
57
57
  "sass": "^1.81.0",
58
58
  "semver": "^7.5.2",
59
+ "ts-node": "~10.9.2",
59
60
  "typescript": "^5.5.4"
60
61
  },
61
62
  "peerDependenciesMeta": {
package/public_api.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- export * from './breakpoints';
2
1
  export * from './core/index';
3
2
  export * from './devkit/index';
4
- export * from './services/index';
5
3
  //# sourceMappingURL=public_api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
@@ -49,7 +49,7 @@
49
49
  @each $key in $keys {
50
50
  @if (not $hasInvalid) {
51
51
  $isValidItem: false;
52
- @each $valid in ('value', 'details', 'variable') { // 'variable' is deprecated and will be removed in v12
52
+ @each $valid in ('value', 'details', 'variable') {
53
53
  @if ($key == $valid) {
54
54
  $isValidItem: true;
55
55
  }
@@ -7,7 +7,7 @@
7
7
  @function _meta-theme-to-otter($meta-theme, $root-name) {
8
8
  @if (meta.type-of($meta-theme) != map) {
9
9
  @return (
10
- variable: $root-name, // Deprecated, this is not used in the final theme calculation, will be removed in Otter v12
10
+ variable: $root-name,
11
11
  value: $meta-theme
12
12
  );
13
13
  }
@@ -1,13 +0,0 @@
1
- /// Map containing the list of possible alternatives for each breakpoint if the value is missing from a property
2
- /// Ex. If there is no value for xxs on header-height property, the next alternative breakpoint is xs and if the latter
3
- /// is not available, it will be sm etc.
4
- /// @deprecate will be removed in v12 as not used anymore by material neither bootstrap
5
- /// @type map
6
- $alternative-breakpoints-map: (
7
- xxs: xxs,
8
- xs: xs xxs,
9
- sm: sm xs xxs,
10
- md: md sm xs xxs,
11
- lg: lg md sm xs xxs,
12
- xl: xl lg md sm xs xxs,
13
- );
package/breakpoints.d.ts DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * Angular CDK Breakpoints to detect devices
3
- * @deprecated use Breakpoints exported by @angular/cdk instead, will be removed in v12
4
- */
5
- export declare const deviceBreakpoints: {
6
- mobile: string[];
7
- tablet: string[];
8
- };
9
- //# sourceMappingURL=breakpoints.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../src/breakpoints.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC"}
@@ -1,10 +0,0 @@
1
- import { Breakpoints, } from '@angular/cdk/layout';
2
- /**
3
- * Angular CDK Breakpoints to detect devices
4
- * @deprecated use Breakpoints exported by @angular/cdk instead, will be removed in v12
5
- */
6
- export const deviceBreakpoints = {
7
- mobile: [Breakpoints.HandsetLandscape, Breakpoints.HandsetPortrait],
8
- tablet: [Breakpoints.TabletLandscape, Breakpoints.TabletPortrait]
9
- };
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJlYWtwb2ludHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYnJlYWtwb2ludHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ik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UEsY0FBYyxpQkFBaUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3R5bGluZy9pbmRleCc7XG4iXX0=
@@ -1,3 +0,0 @@
1
- export * from './style-lazy-loader.module';
2
- export * from './style-lazy-loader.service';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvc2VydmljZXMvc3R5bGluZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMsNkJBQTZCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3N0eWxlLWxhenktbG9hZGVyLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL3N0eWxlLWxhenktbG9hZGVyLnNlcnZpY2UnO1xuIl19
@@ -1,18 +0,0 @@
1
- import { NgModule, } from '@angular/core';
2
- import { DynamicContentModule, } from '@o3r/dynamic-content';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * @deprecated use StyleLazyLoaderModule exported by @o3r/dynamic-content instead, will be removed in v12
6
- */
7
- export class StyleLazyLoaderModule {
8
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
9
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoaderModule, imports: [DynamicContentModule] }); }
10
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoaderModule, imports: [DynamicContentModule] }); }
11
- }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoaderModule, decorators: [{
13
- type: NgModule,
14
- args: [{
15
- imports: [DynamicContentModule]
16
- }]
17
- }] });
18
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUtbGF6eS1sb2FkZXIubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3NlcnZpY2VzL3N0eWxpbmcvc3R5bGUtbGF6eS1sb2FkZXIubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxRQUFRLEdBQ1QsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUNMLG9CQUFvQixHQUNyQixNQUFNLHNCQUFzQixDQUFDOztBQUU5Qjs7R0FFRztBQUlILE1BQU0sT0FBTyxxQkFBcUI7a0lBQXJCLHFCQUFxQjttSUFBckIscUJBQXFCLFlBRnRCLG9CQUFvQjttSUFFbkIscUJBQXFCLFlBRnRCLG9CQUFvQjs7NEZBRW5CLHFCQUFxQjtrQkFIakMsUUFBUTttQkFBQztvQkFDUixPQUFPLEVBQUUsQ0FBQyxvQkFBb0IsQ0FBQztpQkFDaEMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBOZ01vZHVsZSxcbn0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQge1xuICBEeW5hbWljQ29udGVudE1vZHVsZSxcbn0gZnJvbSAnQG8zci9keW5hbWljLWNvbnRlbnQnO1xuXG4vKipcbiAqIEBkZXByZWNhdGVkIHVzZSBTdHlsZUxhenlMb2FkZXJNb2R1bGUgZXhwb3J0ZWQgYnkgQG8zci9keW5hbWljLWNvbnRlbnQgaW5zdGVhZCwgd2lsbCBiZSByZW1vdmVkIGluIHYxMlxuICovXG5ATmdNb2R1bGUoe1xuICBpbXBvcnRzOiBbRHluYW1pY0NvbnRlbnRNb2R1bGVdXG59KVxuZXhwb3J0IGNsYXNzIFN0eWxlTGF6eUxvYWRlck1vZHVsZSB7fVxuIl19
@@ -1,58 +0,0 @@
1
- import { Injectable, } from '@angular/core';
2
- import { DynamicContentService, } from '@o3r/dynamic-content';
3
- import { firstValueFrom, } from 'rxjs';
4
- import { StyleLazyLoaderModule, } from './style-lazy-loader.module';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "@o3r/dynamic-content";
7
- /**
8
- * Service to lazy load a CSS file
9
- * @deprecated use StyleLazyLoader exported by @o3r/dynamic-content instead, will be removed in v12
10
- */
11
- export class StyleLazyLoader {
12
- constructor(dcService) {
13
- this.dcService = dcService;
14
- this.DEFAULT_STYLE_ELEMENT_ID = 'external-theme';
15
- }
16
- /**
17
- * Load a new CSS from an absolute URL, if we already HTML element exists with the url, otherwise
18
- * @param styleUrlConfig object containing CSS File absolute URL to load, integrity and crossOrigin attributes
19
- * and the styleId id of the dynamic style in the body tag.
20
- */
21
- loadStyleFromURL(styleUrlConfig) {
22
- const elementId = styleUrlConfig.id || this.DEFAULT_STYLE_ELEMENT_ID;
23
- let style = document.querySelector(`#${elementId}`);
24
- if (style === null) {
25
- style = document.createElement('link');
26
- style.rel = 'stylesheet';
27
- style.type = 'text/css';
28
- const head = document.querySelectorAll('head')[0];
29
- head.append(style);
30
- }
31
- if (styleUrlConfig.integrity) {
32
- style.integrity = styleUrlConfig.integrity;
33
- }
34
- if (styleUrlConfig.crossOrigin !== undefined) {
35
- style.crossOrigin = styleUrlConfig.crossOrigin;
36
- }
37
- style.href = styleUrlConfig.href;
38
- }
39
- /**
40
- * Load a new CSS File
41
- * @param styleUrlConfig CSS File config containing URL to load, integrity and crossOrigin attributes
42
- * and the styleId id of the dynamic style in the body tag
43
- */
44
- async asyncLoadStyleFromDynamicContent(styleUrlConfig) {
45
- const dynamicContentPath = await firstValueFrom(this.dcService.getContentPathStream(styleUrlConfig.href));
46
- styleUrlConfig.href = dynamicContentPath;
47
- this.loadStyleFromURL(styleUrlConfig);
48
- }
49
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoader, deps: [{ token: i1.DynamicContentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
50
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoader, providedIn: StyleLazyLoaderModule }); }
51
- }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StyleLazyLoader, decorators: [{
53
- type: Injectable,
54
- args: [{
55
- providedIn: StyleLazyLoaderModule
56
- }]
57
- }], ctorParameters: () => [{ type: i1.DynamicContentService }] });
58
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUtbGF6eS1sb2FkZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9zZXJ2aWNlcy9zdHlsaW5nL3N0eWxlLWxhenktbG9hZGVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFVBQVUsR0FDWCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQ0wscUJBQXFCLEdBQ3RCLE1BQU0sc0JBQXNCLENBQUM7QUFDOUIsT0FBTyxFQUNMLGNBQWMsR0FDZixNQUFNLE1BQU0sQ0FBQztBQUNkLE9BQU8sRUFDTCxxQkFBcUIsR0FDdEIsTUFBTSw0QkFBNEIsQ0FBQzs7O0FBaUJwQzs7O0dBR0c7QUFJSCxNQUFNLE9BQU8sZUFBZTtJQUcxQixZQUE2QixTQUFnQztRQUFoQyxjQUFTLEdBQVQsU0FBUyxDQUF1QjtRQUY1Qyw2Qk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lsZVxuICAgKiBAcGFyYW0gc3R5bGVVcmxDb25maWcgQ1NTIEZpbGUgY29uZmlnIGNvbnRhaW5pbmcgVVJMIHRvIGxvYWQsIGludGVncml0eSBhbmQgY3Jvc3NPcmlnaW4gYXR0cmlidXRlc1xuICAgKiBhbmQgdGhlIHN0eWxlSWQgaWQgb2YgdGhlIGR5bmFtaWMgc3R5bGUgaW4gdGhlIGJvZHkgdGFnXG4gICAqL1xuICBwdWJsaWMgYXN5bmMgYXN5bmNMb2FkU3R5bGVGcm9tRHluYW1pY0NvbnRlbnQoc3R5bGVVcmxDb25maWc6IFN0eWxlVVJMKSB7XG4gICAgY29uc3QgZHluYW1pY0NvbnRlbnRQYXRoID0gYXdhaXQgZmlyc3RWYWx1ZUZyb20oXG4gICAgICB0aGlzLmRjU2VydmljZS5nZXRDb250ZW50UGF0aFN0cmVhbShzdHlsZVVybENvbmZpZy5ocmVmKVxuICAgICk7XG4gICAgc3R5bGVVcmxDb25maWcuaHJlZiA9IGR5bmFtaWNDb250ZW50UGF0aDtcbiAgICB0aGlzLmxvYWRTdHlsZUZyb21VUkwoc3R5bGVVcmxDb25maWcpO1xuICB9XG59XG4iXX0=
@@ -1,2 +0,0 @@
1
- export * from './styling/index';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './style-lazy-loader.module';
2
- export * from './style-lazy-loader.service';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/styling/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC"}
@@ -1,11 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@o3r/dynamic-content";
3
- /**
4
- * @deprecated use StyleLazyLoaderModule exported by @o3r/dynamic-content instead, will be removed in v12
5
- */
6
- export declare class StyleLazyLoaderModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<StyleLazyLoaderModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<StyleLazyLoaderModule, never, [typeof i1.DynamicContentModule], never>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<StyleLazyLoaderModule>;
10
- }
11
- //# sourceMappingURL=style-lazy-loader.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style-lazy-loader.module.d.ts","sourceRoot":"","sources":["../../../src/services/styling/style-lazy-loader.module.ts"],"names":[],"mappings":";;AAOA;;GAEG;AACH,qBAGa,qBAAqB;yCAArB,qBAAqB;0CAArB,qBAAqB;0CAArB,qBAAqB;CAAG"}
@@ -1,40 +0,0 @@
1
- import { DynamicContentService } from '@o3r/dynamic-content';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Interface to describe a style to lazy load from a url.
5
- * @deprecated use StyleURL exported by @o3r/dynamic-content instead, will be removed in v12
6
- */
7
- export interface StyleURL {
8
- /** url to file */
9
- href: string;
10
- /** id of the HTML element */
11
- id?: string;
12
- /** html integrity attribute to verify fetched resources */
13
- integrity?: string;
14
- /** html crossOrigin attribute for CORS support. */
15
- crossOrigin?: 'anonymous' | 'use-credentials' | '';
16
- }
17
- /**
18
- * Service to lazy load a CSS file
19
- * @deprecated use StyleLazyLoader exported by @o3r/dynamic-content instead, will be removed in v12
20
- */
21
- export declare class StyleLazyLoader {
22
- private readonly dcService;
23
- private readonly DEFAULT_STYLE_ELEMENT_ID;
24
- constructor(dcService: DynamicContentService);
25
- /**
26
- * Load a new CSS from an absolute URL, if we already HTML element exists with the url, otherwise
27
- * @param styleUrlConfig object containing CSS File absolute URL to load, integrity and crossOrigin attributes
28
- * and the styleId id of the dynamic style in the body tag.
29
- */
30
- loadStyleFromURL(styleUrlConfig: StyleURL): void;
31
- /**
32
- * Load a new CSS File
33
- * @param styleUrlConfig CSS File config containing URL to load, integrity and crossOrigin attributes
34
- * and the styleId id of the dynamic style in the body tag
35
- */
36
- asyncLoadStyleFromDynamicContent(styleUrlConfig: StyleURL): Promise<void>;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<StyleLazyLoader, never>;
38
- static ɵprov: i0.ɵɵInjectableDeclaration<StyleLazyLoader>;
39
- }
40
- //# sourceMappingURL=style-lazy-loader.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style-lazy-loader.service.d.ts","sourceRoot":"","sources":["../../../src/services/styling/style-lazy-loader.service.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;;AAQ9B;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,WAAW,CAAC,EAAE,WAAW,GAAG,iBAAiB,GAAG,EAAE,CAAC;CACpD;AAED;;;GAGG;AACH,qBAGa,eAAe;IAGd,OAAO,CAAC,QAAQ,CAAC,SAAS;IAFtC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAoB;gBAEhC,SAAS,EAAE,qBAAqB;IAE7D;;;;OAIG;IACI,gBAAgB,CAAC,cAAc,EAAE,QAAQ;IAoBhD;;;;OAIG;IACU,gCAAgC,CAAC,cAAc,EAAE,QAAQ;yCAnC3D,eAAe;6CAAf,eAAe;CA0C3B"}