@po-ui/ng-components 21.32.5 → 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 +60 -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.5.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';
|
|
@@ -299,6 +299,7 @@ class PoIconComponent {
|
|
|
299
299
|
}
|
|
300
300
|
else if (value instanceof TemplateRef) {
|
|
301
301
|
this._icon = value;
|
|
302
|
+
this.class = '';
|
|
302
303
|
this.hostPIcon = null;
|
|
303
304
|
}
|
|
304
305
|
}
|
|
@@ -26477,6 +26478,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImpo
|
|
|
26477
26478
|
}]
|
|
26478
26479
|
}] });
|
|
26479
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
|
+
|
|
26480
26505
|
/**
|
|
26481
26506
|
* @description
|
|
26482
26507
|
*
|
|
@@ -26529,8 +26554,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImpo
|
|
|
26529
26554
|
*
|
|
26530
26555
|
*/
|
|
26531
26556
|
class PoMediaQueryService {
|
|
26557
|
+
cspNonce;
|
|
26532
26558
|
renderer;
|
|
26533
|
-
constructor(rendererFactory) {
|
|
26559
|
+
constructor(rendererFactory, cspNonce) {
|
|
26560
|
+
this.cspNonce = cspNonce;
|
|
26534
26561
|
this.renderer = rendererFactory.createRenderer(null, null);
|
|
26535
26562
|
}
|
|
26536
26563
|
/**
|
|
@@ -26553,6 +26580,7 @@ class PoMediaQueryService {
|
|
|
26553
26580
|
}
|
|
26554
26581
|
createStyleElement() {
|
|
26555
26582
|
const styleElement = this.renderer.createElement('style');
|
|
26583
|
+
applyCspNonce(styleElement, this.cspNonce, this.renderer);
|
|
26556
26584
|
this.renderer.appendChild(document.head, styleElement);
|
|
26557
26585
|
return styleElement;
|
|
26558
26586
|
}
|
|
@@ -26610,7 +26638,7 @@ class PoMediaQueryService {
|
|
|
26610
26638
|
return existingQuery;
|
|
26611
26639
|
}
|
|
26612
26640
|
}
|
|
26613
|
-
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 });
|
|
26614
26642
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoMediaQueryService, providedIn: 'root' });
|
|
26615
26643
|
}
|
|
26616
26644
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoMediaQueryService, decorators: [{
|
|
@@ -26618,7 +26646,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImpo
|
|
|
26618
26646
|
args: [{
|
|
26619
26647
|
providedIn: 'root'
|
|
26620
26648
|
}]
|
|
26621
|
-
}], ctorParameters: () => [{ type: i0.RendererFactory2 }
|
|
26649
|
+
}], ctorParameters: () => [{ type: i0.RendererFactory2 }, { type: undefined, decorators: [{
|
|
26650
|
+
type: Optional
|
|
26651
|
+
}, {
|
|
26652
|
+
type: Inject,
|
|
26653
|
+
args: [CSP_NONCE]
|
|
26654
|
+
}] }] });
|
|
26622
26655
|
|
|
26623
26656
|
/**
|
|
26624
26657
|
* @description
|
|
@@ -27809,10 +27842,12 @@ const poThemeDefault = {
|
|
|
27809
27842
|
*/
|
|
27810
27843
|
class PoThemeService {
|
|
27811
27844
|
document;
|
|
27845
|
+
cspNonce;
|
|
27812
27846
|
renderer;
|
|
27813
27847
|
theme;
|
|
27814
|
-
constructor(document, rendererFactory) {
|
|
27848
|
+
constructor(document, rendererFactory, cspNonce) {
|
|
27815
27849
|
this.document = document;
|
|
27850
|
+
this.cspNonce = cspNonce;
|
|
27816
27851
|
this.renderer = rendererFactory.createRenderer(null, null);
|
|
27817
27852
|
this.setDefaultBaseStyle();
|
|
27818
27853
|
}
|
|
@@ -28053,6 +28088,7 @@ class PoThemeService {
|
|
|
28053
28088
|
let styleElement = this.document.head.querySelector('#baseStyle');
|
|
28054
28089
|
if (!styleElement) {
|
|
28055
28090
|
styleElement = this.renderer.createElement('style');
|
|
28091
|
+
applyCspNonce(styleElement, this.cspNonce, this.renderer);
|
|
28056
28092
|
styleElement.id = 'baseStyle';
|
|
28057
28093
|
this.renderer.appendChild(styleElement, this.renderer.createText(styleCss));
|
|
28058
28094
|
this.renderer.insertBefore(this.document.head, styleElement, this.document.head.firstChild);
|
|
@@ -28229,6 +28265,7 @@ class PoThemeService {
|
|
|
28229
28265
|
*/
|
|
28230
28266
|
createStyleElement(css, id) {
|
|
28231
28267
|
const styleElement = this.renderer.createElement('style');
|
|
28268
|
+
applyCspNonce(styleElement, this.cspNonce, this.renderer);
|
|
28232
28269
|
styleElement.id = id;
|
|
28233
28270
|
this.renderer.appendChild(styleElement, this.renderer.createText(css));
|
|
28234
28271
|
return styleElement;
|
|
@@ -28387,7 +28424,7 @@ class PoThemeService {
|
|
|
28387
28424
|
// result: :root[class*="-dark-AA"]Add commentMore actions
|
|
28388
28425
|
this.setPerComponentAndOnRoot({ type: PoThemeTypeEnum.dark, a11y: PoThemeA11yEnum.AA }, poThemeDefaultDarkValuesAA.perComponent, poThemeDefaultDarkValuesAA.onRoot);
|
|
28389
28426
|
}
|
|
28390
|
-
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 });
|
|
28391
28428
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoThemeService, providedIn: 'root' });
|
|
28392
28429
|
}
|
|
28393
28430
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoThemeService, decorators: [{
|
|
@@ -28398,7 +28435,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImpo
|
|
|
28398
28435
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
28399
28436
|
type: Inject,
|
|
28400
28437
|
args: [DOCUMENT]
|
|
28401
|
-
}] }, { type: i0.RendererFactory2 }
|
|
28438
|
+
}] }, { type: i0.RendererFactory2 }, { type: undefined, decorators: [{
|
|
28439
|
+
type: Optional
|
|
28440
|
+
}, {
|
|
28441
|
+
type: Inject,
|
|
28442
|
+
args: [CSP_NONCE]
|
|
28443
|
+
}] }] });
|
|
28402
28444
|
|
|
28403
28445
|
/**
|
|
28404
28446
|
* Módulo do serviço PoThemeService.
|
|
@@ -30077,15 +30119,17 @@ class PoUserGuideScrollLock {
|
|
|
30077
30119
|
*/
|
|
30078
30120
|
class PoUserGuideService extends PoUserGuideBaseService {
|
|
30079
30121
|
sanitizer;
|
|
30122
|
+
cspNonce;
|
|
30080
30123
|
driverFactoryCache = null;
|
|
30081
30124
|
driverInstance = null;
|
|
30082
30125
|
pendingEndReason = null;
|
|
30083
30126
|
scrollLock = new PoUserGuideScrollLock();
|
|
30084
30127
|
activeScrollLockEnabled = false;
|
|
30085
30128
|
static stylesInjected = false;
|
|
30086
|
-
constructor(languageService, sanitizer) {
|
|
30129
|
+
constructor(languageService, sanitizer, cspNonce) {
|
|
30087
30130
|
super(languageService);
|
|
30088
30131
|
this.sanitizer = sanitizer;
|
|
30132
|
+
this.cspNonce = cspNonce;
|
|
30089
30133
|
}
|
|
30090
30134
|
isBrowser() {
|
|
30091
30135
|
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
@@ -30119,6 +30163,7 @@ class PoUserGuideService extends PoUserGuideBaseService {
|
|
|
30119
30163
|
return;
|
|
30120
30164
|
}
|
|
30121
30165
|
const style = document.createElement('style');
|
|
30166
|
+
applyCspNonce(style, this.cspNonce);
|
|
30122
30167
|
style.dataset['poUserGuideStyles'] = 'true';
|
|
30123
30168
|
style.textContent = `.po-user-guide-popover { font-family: var(--font-family-theme, system-ui, -apple-system, sans-serif); }`;
|
|
30124
30169
|
document.head.appendChild(style);
|
|
@@ -30560,7 +30605,7 @@ class PoUserGuideService extends PoUserGuideBaseService {
|
|
|
30560
30605
|
getCurrentIndex() {
|
|
30561
30606
|
return this.isActive() ? this.currentIndex : -1;
|
|
30562
30607
|
}
|
|
30563
|
-
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 });
|
|
30564
30609
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoUserGuideService, providedIn: 'root' });
|
|
30565
30610
|
}
|
|
30566
30611
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: PoUserGuideService, decorators: [{
|
|
@@ -30568,7 +30613,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImpo
|
|
|
30568
30613
|
args: [{
|
|
30569
30614
|
providedIn: 'root'
|
|
30570
30615
|
}]
|
|
30571
|
-
}], 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
|
+
}] }] });
|
|
30572
30622
|
|
|
30573
30623
|
const PoDatetimepickerLiterals = {
|
|
30574
30624
|
en: {
|