@po-ui/ng-components 21.32.6 → 21.32.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/po-ui-ng-components.mjs +59 -10
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/services/po-media-query/po-media-query.service.d.ts +2 -1
- package/lib/services/po-theme/po-theme.service.d.ts +2 -1
- package/lib/services/po-user-guide/po-user-guide.service.d.ts +2 -1
- package/lib/utils/csp-nonce.d.ts +14 -0
- package/package.json +4 -4
- package/po-ui-ng-components-21.32.7.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v19/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v20/index.js +2 -2
- package/schematics/ng-update/v21/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/types/po-ui-ng-components.d.ts +9 -6
- package/po-ui-ng-components-21.32.6.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Input, Directive, ChangeDetectionStrategy, Component, NgModule, TemplateRef, HostBinding, ViewChild, Injectable, EventEmitter, Output, ElementRef, SecurityContext, HostListener, inject, ChangeDetectorRef, ContentChildren, ViewChildren, input, InjectionToken, ViewContainerRef, Optional, Inject, computed, output, effect, signal, ViewEncapsulation, Renderer2, Injector, EnvironmentInjector, ApplicationRef, createComponent, forwardRef, IterableDiffers, NgZone, ContentChild, model, Pipe, provideAppInitializer } from '@angular/core';
|
|
2
|
+
import { Input, Directive, ChangeDetectionStrategy, Component, NgModule, TemplateRef, HostBinding, ViewChild, Injectable, EventEmitter, Output, ElementRef, SecurityContext, HostListener, inject, ChangeDetectorRef, ContentChildren, ViewChildren, input, InjectionToken, ViewContainerRef, Optional, Inject, computed, output, effect, signal, ViewEncapsulation, Renderer2, Injector, EnvironmentInjector, ApplicationRef, createComponent, forwardRef, IterableDiffers, NgZone, ContentChild, model, Pipe, CSP_NONCE, provideAppInitializer } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT, CurrencyPipe, DecimalPipe, TitleCasePipe, DatePipe, NgOptimizedImage, Location } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/platform-browser';
|
|
@@ -26478,6 +26478,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImpo
|
|
|
26478
26478
|
}]
|
|
26479
26479
|
}] });
|
|
26480
26480
|
|
|
26481
|
+
/**
|
|
26482
|
+
* @docsPrivate
|
|
26483
|
+
*
|
|
26484
|
+
* Aplica o nonce da Content-Security-Policy (token `CSP_NONCE` do Angular) a um elemento criado em tempo de execução
|
|
26485
|
+
* (ex.: `<style>`), para que ele seja aceito por políticas sem `'unsafe-inline'`.
|
|
26486
|
+
*
|
|
26487
|
+
* Deve ser chamado antes de o elemento ser inserido no DOM. Sem nonce configurado, o elemento permanece inalterado.
|
|
26488
|
+
*
|
|
26489
|
+
* @param element Elemento que receberá o nonce.
|
|
26490
|
+
* @param nonce Valor do `CSP_NONCE`. `null`, `undefined` ou vazio não alteram o elemento.
|
|
26491
|
+
* @param renderer (Opcional) Renderer usado para definir o atributo. Sem ele, é usado `element.setAttribute`.
|
|
26492
|
+
*/
|
|
26493
|
+
function applyCspNonce(element, nonce, renderer) {
|
|
26494
|
+
if (!element || !nonce) {
|
|
26495
|
+
return;
|
|
26496
|
+
}
|
|
26497
|
+
if (renderer) {
|
|
26498
|
+
renderer.setAttribute(element, 'nonce', nonce);
|
|
26499
|
+
}
|
|
26500
|
+
else {
|
|
26501
|
+
element.setAttribute('nonce', nonce);
|
|
26502
|
+
}
|
|
26503
|
+
}
|
|
26504
|
+
|
|
26481
26505
|
/**
|
|
26482
26506
|
* @description
|
|
26483
26507
|
*
|
|
@@ -26530,8 +26554,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImpo
|
|
|
26530
26554
|
*
|
|
26531
26555
|
*/
|
|
26532
26556
|
class PoMediaQueryService {
|
|
26557
|
+
cspNonce;
|
|
26533
26558
|
renderer;
|
|
26534
|
-
constructor(rendererFactory) {
|
|
26559
|
+
constructor(rendererFactory, cspNonce) {
|
|
26560
|
+
this.cspNonce = cspNonce;
|
|
26535
26561
|
this.renderer = rendererFactory.createRenderer(null, null);
|
|
26536
26562
|
}
|
|
26537
26563
|
/**
|
|
@@ -26554,6 +26580,7 @@ class PoMediaQueryService {
|
|
|
26554
26580
|
}
|
|
26555
26581
|
createStyleElement() {
|
|
26556
26582
|
const styleElement = this.renderer.createElement('style');
|
|
26583
|
+
applyCspNonce(styleElement, this.cspNonce, this.renderer);
|
|
26557
26584
|
this.renderer.appendChild(document.head, styleElement);
|
|
26558
26585
|
return styleElement;
|
|
26559
26586
|
}
|
|
@@ -26611,7 +26638,7 @@ class PoMediaQueryService {
|
|
|
26611
26638
|
return existingQuery;
|
|
26612
26639
|
}
|
|
26613
26640
|
}
|
|
26614
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoMediaQueryService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
26641
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoMediaQueryService, deps: [{ token: i0.RendererFactory2 }, { token: CSP_NONCE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
26615
26642
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoMediaQueryService, providedIn: 'root' });
|
|
26616
26643
|
}
|
|
26617
26644
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoMediaQueryService, decorators: [{
|
|
@@ -26619,7 +26646,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImpo
|
|
|
26619
26646
|
args: [{
|
|
26620
26647
|
providedIn: 'root'
|
|
26621
26648
|
}]
|
|
26622
|
-
}], ctorParameters: () => [{ type: i0.RendererFactory2 }
|
|
26649
|
+
}], ctorParameters: () => [{ type: i0.RendererFactory2 }, { type: undefined, decorators: [{
|
|
26650
|
+
type: Optional
|
|
26651
|
+
}, {
|
|
26652
|
+
type: Inject,
|
|
26653
|
+
args: [CSP_NONCE]
|
|
26654
|
+
}] }] });
|
|
26623
26655
|
|
|
26624
26656
|
/**
|
|
26625
26657
|
* @description
|
|
@@ -27810,10 +27842,12 @@ const poThemeDefault = {
|
|
|
27810
27842
|
*/
|
|
27811
27843
|
class PoThemeService {
|
|
27812
27844
|
document;
|
|
27845
|
+
cspNonce;
|
|
27813
27846
|
renderer;
|
|
27814
27847
|
theme;
|
|
27815
|
-
constructor(document, rendererFactory) {
|
|
27848
|
+
constructor(document, rendererFactory, cspNonce) {
|
|
27816
27849
|
this.document = document;
|
|
27850
|
+
this.cspNonce = cspNonce;
|
|
27817
27851
|
this.renderer = rendererFactory.createRenderer(null, null);
|
|
27818
27852
|
this.setDefaultBaseStyle();
|
|
27819
27853
|
}
|
|
@@ -28054,6 +28088,7 @@ class PoThemeService {
|
|
|
28054
28088
|
let styleElement = this.document.head.querySelector('#baseStyle');
|
|
28055
28089
|
if (!styleElement) {
|
|
28056
28090
|
styleElement = this.renderer.createElement('style');
|
|
28091
|
+
applyCspNonce(styleElement, this.cspNonce, this.renderer);
|
|
28057
28092
|
styleElement.id = 'baseStyle';
|
|
28058
28093
|
this.renderer.appendChild(styleElement, this.renderer.createText(styleCss));
|
|
28059
28094
|
this.renderer.insertBefore(this.document.head, styleElement, this.document.head.firstChild);
|
|
@@ -28230,6 +28265,7 @@ class PoThemeService {
|
|
|
28230
28265
|
*/
|
|
28231
28266
|
createStyleElement(css, id) {
|
|
28232
28267
|
const styleElement = this.renderer.createElement('style');
|
|
28268
|
+
applyCspNonce(styleElement, this.cspNonce, this.renderer);
|
|
28233
28269
|
styleElement.id = id;
|
|
28234
28270
|
this.renderer.appendChild(styleElement, this.renderer.createText(css));
|
|
28235
28271
|
return styleElement;
|
|
@@ -28388,7 +28424,7 @@ class PoThemeService {
|
|
|
28388
28424
|
// result: :root[class*="-dark-AA"]Add commentMore actions
|
|
28389
28425
|
this.setPerComponentAndOnRoot({ type: PoThemeTypeEnum.dark, a11y: PoThemeA11yEnum.AA }, poThemeDefaultDarkValuesAA.perComponent, poThemeDefaultDarkValuesAA.onRoot);
|
|
28390
28426
|
}
|
|
28391
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoThemeService, deps: [{ token: DOCUMENT }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28427
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoThemeService, deps: [{ token: DOCUMENT }, { token: i0.RendererFactory2 }, { token: CSP_NONCE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28392
28428
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoThemeService, providedIn: 'root' });
|
|
28393
28429
|
}
|
|
28394
28430
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoThemeService, decorators: [{
|
|
@@ -28399,7 +28435,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImpo
|
|
|
28399
28435
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
28400
28436
|
type: Inject,
|
|
28401
28437
|
args: [DOCUMENT]
|
|
28402
|
-
}] }, { type: i0.RendererFactory2 }
|
|
28438
|
+
}] }, { type: i0.RendererFactory2 }, { type: undefined, decorators: [{
|
|
28439
|
+
type: Optional
|
|
28440
|
+
}, {
|
|
28441
|
+
type: Inject,
|
|
28442
|
+
args: [CSP_NONCE]
|
|
28443
|
+
}] }] });
|
|
28403
28444
|
|
|
28404
28445
|
/**
|
|
28405
28446
|
* Módulo do serviço PoThemeService.
|
|
@@ -30078,15 +30119,17 @@ class PoUserGuideScrollLock {
|
|
|
30078
30119
|
*/
|
|
30079
30120
|
class PoUserGuideService extends PoUserGuideBaseService {
|
|
30080
30121
|
sanitizer;
|
|
30122
|
+
cspNonce;
|
|
30081
30123
|
driverFactoryCache = null;
|
|
30082
30124
|
driverInstance = null;
|
|
30083
30125
|
pendingEndReason = null;
|
|
30084
30126
|
scrollLock = new PoUserGuideScrollLock();
|
|
30085
30127
|
activeScrollLockEnabled = false;
|
|
30086
30128
|
static stylesInjected = false;
|
|
30087
|
-
constructor(languageService, sanitizer) {
|
|
30129
|
+
constructor(languageService, sanitizer, cspNonce) {
|
|
30088
30130
|
super(languageService);
|
|
30089
30131
|
this.sanitizer = sanitizer;
|
|
30132
|
+
this.cspNonce = cspNonce;
|
|
30090
30133
|
}
|
|
30091
30134
|
isBrowser() {
|
|
30092
30135
|
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
@@ -30120,6 +30163,7 @@ class PoUserGuideService extends PoUserGuideBaseService {
|
|
|
30120
30163
|
return;
|
|
30121
30164
|
}
|
|
30122
30165
|
const style = document.createElement('style');
|
|
30166
|
+
applyCspNonce(style, this.cspNonce);
|
|
30123
30167
|
style.dataset['poUserGuideStyles'] = 'true';
|
|
30124
30168
|
style.textContent = `.po-user-guide-popover { font-family: var(--font-family-theme, system-ui, -apple-system, sans-serif); }`;
|
|
30125
30169
|
document.head.appendChild(style);
|
|
@@ -30561,7 +30605,7 @@ class PoUserGuideService extends PoUserGuideBaseService {
|
|
|
30561
30605
|
getCurrentIndex() {
|
|
30562
30606
|
return this.isActive() ? this.currentIndex : -1;
|
|
30563
30607
|
}
|
|
30564
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoUserGuideService, deps: [{ token: PoLanguageService }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
30608
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoUserGuideService, deps: [{ token: PoLanguageService }, { token: i2.DomSanitizer }, { token: CSP_NONCE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
30565
30609
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoUserGuideService, providedIn: 'root' });
|
|
30566
30610
|
}
|
|
30567
30611
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoUserGuideService, decorators: [{
|
|
@@ -30569,7 +30613,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImpo
|
|
|
30569
30613
|
args: [{
|
|
30570
30614
|
providedIn: 'root'
|
|
30571
30615
|
}]
|
|
30572
|
-
}], ctorParameters: () => [{ type: PoLanguageService }, { type: i2.DomSanitizer }
|
|
30616
|
+
}], ctorParameters: () => [{ type: PoLanguageService }, { type: i2.DomSanitizer }, { type: undefined, decorators: [{
|
|
30617
|
+
type: Optional
|
|
30618
|
+
}, {
|
|
30619
|
+
type: Inject,
|
|
30620
|
+
args: [CSP_NONCE]
|
|
30621
|
+
}] }] });
|
|
30573
30622
|
|
|
30574
30623
|
const PoDatetimepickerLiterals = {
|
|
30575
30624
|
en: {
|