@po-ui/ng-components 19.5.1 → 19.6.0-beta.2
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 +31 -15
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-tabs/po-tabs-base.component.d.ts +3 -1
- package/lib/services/po-theme/po-theme.service.d.ts +2 -0
- package/package.json +4 -4
- package/po-ui-ng-components-19.6.0-beta.2.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/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/po-ui-ng-components-19.5.1.tgz +0 -0
|
@@ -21034,18 +21034,7 @@ class PoThemeService {
|
|
|
21034
21034
|
this.document = document;
|
|
21035
21035
|
this.renderer = rendererFactory.createRenderer(null, null);
|
|
21036
21036
|
this._iconToken = value ?? AnimaliaIconDictionary;
|
|
21037
|
-
|
|
21038
|
-
// result: html:root
|
|
21039
|
-
this.setPerComponentAndOnRoot(undefined, poThemeDefaultAAA.perComponent, poThemeDefaultAAA.onRoot);
|
|
21040
|
-
// set double A
|
|
21041
|
-
// result: html[class*="-AA"]:root
|
|
21042
|
-
this.setPerComponentAndOnRoot({ a11y: PoThemeA11yEnum.AA }, poThemeDefaultAA.perComponent, poThemeDefaultAA.onRoot);
|
|
21043
|
-
// set Light mode values
|
|
21044
|
-
// result: html[class*="-light"]:root
|
|
21045
|
-
this.setPerComponentAndOnRoot({ type: PoThemeTypeEnum.light }, poThemeDefaultLightValues.perComponent, poThemeDefaultLightValues.onRoot);
|
|
21046
|
-
// set Dark mode values
|
|
21047
|
-
// result: html[class*="-dark"]:root
|
|
21048
|
-
this.setPerComponentAndOnRoot({ type: PoThemeTypeEnum.dark }, poThemeDefaultDarkValues.perComponent, poThemeDefaultDarkValues.onRoot);
|
|
21037
|
+
this.setDefaultBaseStyle();
|
|
21049
21038
|
}
|
|
21050
21039
|
/**
|
|
21051
21040
|
* Aplica um tema ao componente de acordo com o tipo de tema e o nível de acessibilidade especificados.
|
|
@@ -21059,6 +21048,9 @@ class PoThemeService {
|
|
|
21059
21048
|
* @param {boolean} [persistPreference=true] - (Opcional) Define se a preferência de tema deve ser salva no localStorage para persistência. `true` para salvar, `false` para não salvar.
|
|
21060
21049
|
*/
|
|
21061
21050
|
setTheme(themeConfig, themeType = PoThemeTypeEnum.light, a11yLevel = PoThemeA11yEnum.AAA, persistPreference = true) {
|
|
21051
|
+
if (themeConfig === poThemeDefault) {
|
|
21052
|
+
this.resetBaseTheme();
|
|
21053
|
+
}
|
|
21062
21054
|
// Change theme name, remove special characteres and number, replace space with dash
|
|
21063
21055
|
this.formatTheme(themeConfig, themeType, a11yLevel);
|
|
21064
21056
|
const _themeActive = Array.isArray(themeConfig.type) && themeConfig.type.length >= 1
|
|
@@ -21455,6 +21447,27 @@ class PoThemeService {
|
|
|
21455
21447
|
const _theme = this.getThemeActive();
|
|
21456
21448
|
this.setThemeA11y(_theme, a11y);
|
|
21457
21449
|
}
|
|
21450
|
+
resetBaseTheme() {
|
|
21451
|
+
const styleElement = this.document.head.querySelector('#baseStyle');
|
|
21452
|
+
if (styleElement) {
|
|
21453
|
+
this.renderer.removeChild(this.document.head, styleElement);
|
|
21454
|
+
}
|
|
21455
|
+
this.setDefaultBaseStyle();
|
|
21456
|
+
}
|
|
21457
|
+
setDefaultBaseStyle() {
|
|
21458
|
+
// set triple A for all themes (its the base theme)
|
|
21459
|
+
// result: html:root
|
|
21460
|
+
this.setPerComponentAndOnRoot(undefined, poThemeDefaultAAA.perComponent, poThemeDefaultAAA.onRoot);
|
|
21461
|
+
// set double A
|
|
21462
|
+
// result: html[class*="-AA"]:root
|
|
21463
|
+
this.setPerComponentAndOnRoot({ a11y: PoThemeA11yEnum.AA }, poThemeDefaultAA.perComponent, poThemeDefaultAA.onRoot);
|
|
21464
|
+
// set Light mode values
|
|
21465
|
+
// result: html[class*="-light"]:root
|
|
21466
|
+
this.setPerComponentAndOnRoot({ type: PoThemeTypeEnum.light }, poThemeDefaultLightValues.perComponent, poThemeDefaultLightValues.onRoot);
|
|
21467
|
+
// set Dark mode values
|
|
21468
|
+
// result: html[class*="-dark"]:root
|
|
21469
|
+
this.setPerComponentAndOnRoot({ type: PoThemeTypeEnum.dark }, poThemeDefaultDarkValues.perComponent, poThemeDefaultDarkValues.onRoot);
|
|
21470
|
+
}
|
|
21458
21471
|
static ɵfac = function PoThemeService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PoThemeService)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i0.RendererFactory2), i0.ɵɵinject(ICONS_DICTIONARY, 8)); };
|
|
21459
21472
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: PoThemeService, factory: PoThemeService.ɵfac, providedIn: 'root' });
|
|
21460
21473
|
}
|
|
@@ -47720,7 +47733,7 @@ class PoDynamicViewBaseComponent extends PoDynamicSharedBase {
|
|
|
47720
47733
|
}
|
|
47721
47734
|
else {
|
|
47722
47735
|
this.service = this.multiselectFilterService;
|
|
47723
|
-
this.service.configProperties(field.optionsService, field.fieldLabel, field.fieldValue);
|
|
47736
|
+
this.service.configProperties(field.optionsService, field.fieldLabel || 'label', field.fieldValue || 'value');
|
|
47724
47737
|
}
|
|
47725
47738
|
}
|
|
47726
47739
|
else {
|
|
@@ -47729,7 +47742,7 @@ class PoDynamicViewBaseComponent extends PoDynamicSharedBase {
|
|
|
47729
47742
|
}
|
|
47730
47743
|
else {
|
|
47731
47744
|
this.service = this.comboFilterService;
|
|
47732
|
-
this.service.configProperties(field.optionsService, field.fieldLabel, field.fieldValue);
|
|
47745
|
+
this.service.configProperties(field.optionsService, field.fieldLabel || 'label', field.fieldValue || 'value');
|
|
47733
47746
|
}
|
|
47734
47747
|
}
|
|
47735
47748
|
}
|
|
@@ -47778,6 +47791,7 @@ class PoDynamicViewBaseComponent extends PoDynamicSharedBase {
|
|
|
47778
47791
|
const oldFieldIndex = newFields.indexOf(newFields.find(field => field === oldField));
|
|
47779
47792
|
newFields.splice(oldFieldIndex, 1, allValues);
|
|
47780
47793
|
sortFields(newFields);
|
|
47794
|
+
this.setContainerFields();
|
|
47781
47795
|
});
|
|
47782
47796
|
}
|
|
47783
47797
|
returnValues(field, value) {
|
|
@@ -58628,7 +58642,9 @@ class PoTabDropdownComponent {
|
|
|
58628
58642
|
* | `--font-weight` | Peso da fonte | `var(--font-weight-bold)` |
|
|
58629
58643
|
* | `--margin-tabs-container-left` | Margem lateral esquerda do componente quando usado dentro de um `page-default` | `var(--spacing-md)` |
|
|
58630
58644
|
* | `--margin-tabs-container-right` | Margem lateral direita do componente quando usado dentro de um `page-default` | `-16px` |
|
|
58631
|
-
* | `--padding-tabs-header` | Padding do valor lateral das abas |
|
|
58645
|
+
* | `--padding-tabs-header` | Padding do valor lateral das abas | `var(--spacing-sm)` |
|
|
58646
|
+
* | `--margin-tabs-first-child` | Margem lateral da primeira aba | `var(--spacing-md)` |
|
|
58647
|
+
* | `--margin-tabs-last-child` | Margem lateral da ultima aba | `var(--spacing-md)` |
|
|
58632
58648
|
* | **Disabled** | | |
|
|
58633
58649
|
* | `--color-disabled` | Cor da fonte no estado disabilitado | `var(--color-action-disabled)` |
|
|
58634
58650
|
* | `--background-item-disabled` | Cor de background do item desabilitado | `var(--color-neutral-light-10)` |
|