@po-ui/ng-components 15.2.0 → 15.3.0

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.
Files changed (32) hide show
  1. package/esm2020/lib/components/po-button/po-button-base.component.mjs +5 -2
  2. package/esm2020/lib/components/po-button/po-button.component.mjs +4 -4
  3. package/esm2020/lib/components/po-calendar/po-calendar-base.component.mjs +25 -3
  4. package/esm2020/lib/components/po-calendar/po-calendar.component.mjs +19 -5
  5. package/esm2020/lib/components/po-dynamic/po-dynamic-view/po-dynamic-view-field.interface.mjs +1 -1
  6. package/esm2020/lib/components/po-dynamic/po-dynamic-view/po-dynamic-view.component.mjs +15 -4
  7. package/esm2020/lib/components/po-field/po-number/po-number-base.component.mjs +4 -2
  8. package/esm2020/lib/components/po-image/po-image.component.mjs +1 -1
  9. package/esm2020/lib/components/po-modal/po-modal-base.component.mjs +5 -2
  10. package/esm2020/lib/components/po-modal/po-modal.component.mjs +57 -43
  11. package/esm2020/lib/components/po-modal/po-modal.module.mjs +5 -4
  12. package/fesm2015/po-ui-ng-components.mjs +131 -60
  13. package/fesm2015/po-ui-ng-components.mjs.map +1 -1
  14. package/fesm2020/po-ui-ng-components.mjs +127 -60
  15. package/fesm2020/po-ui-ng-components.mjs.map +1 -1
  16. package/lib/components/po-button/po-button-base.component.d.ts +13 -1
  17. package/lib/components/po-dynamic/po-dynamic-view/po-dynamic-view-base.component.d.ts +4 -0
  18. package/lib/components/po-dynamic/po-dynamic-view/po-dynamic-view-field.interface.d.ts +28 -0
  19. package/lib/components/po-dynamic/po-dynamic-view/po-dynamic-view.component.d.ts +1 -0
  20. package/lib/components/po-modal/po-modal-base.component.d.ts +26 -2
  21. package/lib/components/po-modal/po-modal.module.d.ts +2 -1
  22. package/package.json +4 -4
  23. package/po-ui-ng-components-15.3.0.tgz +0 -0
  24. package/schematics/ng-add/index.js +1 -1
  25. package/schematics/ng-update/v14/index.js +1 -1
  26. package/schematics/ng-update/v15/index.js +1 -1
  27. package/schematics/ng-update/v2/index.js +1 -1
  28. package/schematics/ng-update/v3/index.js +1 -1
  29. package/schematics/ng-update/v4/index.js +1 -1
  30. package/schematics/ng-update/v5/index.js +1 -1
  31. package/schematics/ng-update/v6/index.js +1 -1
  32. package/po-ui-ng-components-15.2.0.tgz +0 -0
@@ -148,6 +148,18 @@ export declare class PoButtonBaseComponent {
148
148
  */
149
149
  set disabled(value: boolean);
150
150
  get disabled(): boolean;
151
+ /**
152
+ * @optional
153
+ *
154
+ * @description
155
+ *
156
+ * Define um `aria-label` para o `po-button`.
157
+ *
158
+ * Caso esta propriedade não seja informada será considerada a label do botão.
159
+ *
160
+ * > Em caso de botões com apenas ícone a atribuição de valor à esta propriedade é muito importante para acessibilidade.
161
+ */
162
+ ariaLabel?: string;
151
163
  static ɵfac: i0.ɵɵFactoryDeclaration<PoButtonBaseComponent, never>;
152
- static ɵdir: i0.ɵɵDirectiveDeclaration<PoButtonBaseComponent, never, never, { "label": "p-label"; "icon": "p-icon"; "loading": "p-loading"; "small": "p-small"; "danger": "p-danger"; "size": "p-size"; "kind": "p-kind"; "disabled": "p-disabled"; }, { "click": "p-click"; }, never, never, false, never>;
164
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PoButtonBaseComponent, never, never, { "label": "p-label"; "icon": "p-icon"; "loading": "p-loading"; "small": "p-small"; "danger": "p-danger"; "size": "p-size"; "kind": "p-kind"; "disabled": "p-disabled"; "ariaLabel": "p-aria-label"; }, { "click": "p-click"; }, never, never, false, never>;
153
165
  }
@@ -115,6 +115,10 @@ export declare class PoDynamicViewBaseComponent {
115
115
  alt?: string;
116
116
  height?: string;
117
117
  image?: boolean;
118
+ options?: {
119
+ label: string;
120
+ value: string | number;
121
+ }[];
118
122
  key?: boolean;
119
123
  property: string;
120
124
  label: string;
@@ -147,4 +147,32 @@ export interface PoDynamicViewField extends PoDynamicField {
147
147
  * **Componentes compatíveis:** `po-image`.
148
148
  */
149
149
  image?: boolean;
150
+ /**
151
+ * Lista de opções que podem ser vinculadas à propriedade p-value.
152
+ * Quando uma opção de valor é passada, sua propriedade label será atribuída à propriedade p-value.
153
+ *
154
+ * Exemplo de utilização:
155
+ *
156
+ * ```
157
+ * fields = [
158
+ * {
159
+ * property: 'name', options: [
160
+ * {label: 'Anna', value: '1'},
161
+ * {label: 'Jhon', value: '2'},
162
+ * {label: 'Mark', value: '3'}
163
+ * ]
164
+ * }
165
+ * ];
166
+ * ```
167
+ *
168
+ * ```
169
+ * <!-- Passando o valor 2 referente ao Jhon -->
170
+ * <po-dynamic-view [p-fields]="fields" [p-value]="{ name: '2' }"> </po-dynamic-view>
171
+ * ```
172
+ *
173
+ */
174
+ options?: Array<{
175
+ label: string;
176
+ value: string | number;
177
+ }>;
150
178
  }
@@ -28,6 +28,7 @@ export declare class PoDynamicViewComponent extends PoDynamicViewBaseComponent i
28
28
  constructor(currencyPipe: CurrencyPipe, datePipe: DatePipe, decimalPipe: DecimalPipe, timePipe: PoTimePipe, titleCasePipe: TitleCasePipe, dynamicViewService: PoDynamicViewService);
29
29
  ngOnChanges(changes: SimpleChanges): void;
30
30
  ngOnInit(): void;
31
+ setFieldValue(field: any): any;
31
32
  private getValuesAndFieldsFromLoad;
32
33
  private getVisibleFields;
33
34
  private setFieldOnLoad;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, TemplateRef } from '@angular/core';
2
2
  import { PoModalAction } from './po-modal-action.interface';
3
3
  import { PoLanguageService } from '../../services/po-language/po-language.service';
4
4
  import * as i0 from "@angular/core";
@@ -73,6 +73,30 @@ export declare class PoModalBaseComponent {
73
73
  */
74
74
  set hideClose(value: boolean);
75
75
  get hideClose(): boolean;
76
+ /**
77
+ * @optional
78
+ *
79
+ * @description
80
+ * Ícone exibido ao lado esquerdo do label do titúlo da modal.
81
+ *
82
+ * É possível usar qualquer um dos ícones da [Biblioteca de ícones](/guides/icons). conforme exemplo abaixo:
83
+ * ```
84
+ * <po-modal p-icon="po-icon-user" p-title="PO Modal"></po-modal>
85
+ * ```
86
+ * Também é possível utilizar outras fontes de ícones, por exemplo a biblioteca *Font Awesome*, da seguinte forma:
87
+ * ```
88
+ * <po-modal p-icon="fa fa-podcast" p-title="PO Modal"></po-modal>
89
+ * ```
90
+ * Outra opção seria a customização do ícone através do `TemplateRef`, conforme exemplo abaixo:
91
+ * ```
92
+ * <po-modal [p-icon]="template" p-title="PO Modal"></po-modal>
93
+ *
94
+ * <ng-template #template>
95
+ * <ion-icon style="font-size: inherit" name="heart"></ion-icon>
96
+ * </ng-template>
97
+ * ```
98
+ */
99
+ icon?: string | TemplateRef<void>;
76
100
  constructor(poLanguageService: PoLanguageService);
77
101
  /** Função para fechar a modal. */
78
102
  close(xClosed?: boolean): void;
@@ -80,5 +104,5 @@ export declare class PoModalBaseComponent {
80
104
  open(): void;
81
105
  validPrimaryAction(): void;
82
106
  static ɵfac: i0.ɵɵFactoryDeclaration<PoModalBaseComponent, never>;
83
- static ɵdir: i0.ɵɵDirectiveDeclaration<PoModalBaseComponent, never, never, { "title": "p-title"; "primaryAction": "p-primary-action"; "secondaryAction": "p-secondary-action"; "size": "p-size"; "setClickOut": "p-click-out"; "hideClose": "p-hide-close"; }, { "closeModal": "p-close"; }, never, never, false, never>;
107
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PoModalBaseComponent, never, never, { "title": "p-title"; "primaryAction": "p-primary-action"; "secondaryAction": "p-secondary-action"; "size": "p-size"; "setClickOut": "p-click-out"; "hideClose": "p-hide-close"; "icon": "p-icon"; }, { "closeModal": "p-close"; }, never, never, false, never>;
84
108
  }
@@ -3,12 +3,13 @@ import * as i1 from "./po-modal.component";
3
3
  import * as i2 from "./po-modal-footer/po-modal-footer.component";
4
4
  import * as i3 from "@angular/common";
5
5
  import * as i4 from "../po-button/po-button.module";
6
+ import * as i5 from "../po-icon/po-icon.module";
6
7
  /**
7
8
  * @description
8
9
  * Módulo do componente po-modal
9
10
  */
10
11
  export declare class PoModalModule {
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<PoModalModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<PoModalModule, [typeof i1.PoModalComponent, typeof i2.PoModalFooterComponent], [typeof i3.CommonModule, typeof i4.PoButtonModule], [typeof i1.PoModalComponent, typeof i2.PoModalFooterComponent]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PoModalModule, [typeof i1.PoModalComponent, typeof i2.PoModalFooterComponent], [typeof i3.CommonModule, typeof i4.PoButtonModule, typeof i5.PoIconModule], [typeof i1.PoModalComponent, typeof i2.PoModalFooterComponent]>;
13
14
  static ɵinj: i0.ɵɵInjectorDeclaration<PoModalModule>;
14
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@po-ui/ng-components",
3
- "version": "15.2.0",
3
+ "version": "15.3.0",
4
4
  "tag": "next",
5
5
  "description": "PO UI - Components",
6
6
  "author": "PO UI",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@angular/cdk": "^15.0.2",
25
- "@po-ui/style": "15.2.0",
26
- "@po-ui/ng-schematics": "15.2.0",
25
+ "@po-ui/style": "15.3.0",
26
+ "@po-ui/ng-schematics": "15.3.0",
27
27
  "tslib": "^2.3.0"
28
28
  },
29
29
  "peerDependencies": {
@@ -36,7 +36,7 @@
36
36
  "@angular/platform-browser": "^15.0.3",
37
37
  "@angular/platform-browser-dynamic": "^15.0.3",
38
38
  "@angular/router": "^15.0.3",
39
- "@po-ui/style": "15.2.0",
39
+ "@po-ui/style": "15.3.0",
40
40
  "rxjs": "~7.5.5",
41
41
  "zone.js": "~0.12.0"
42
42
  },
Binary file
@@ -18,7 +18,7 @@ function default_1(options) {
18
18
  exports.default = default_1;
19
19
  function addPoPackageAndInstall() {
20
20
  return (tree, context) => {
21
- (0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '15.2.0');
21
+ (0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '15.3.0');
22
22
  // install packages
23
23
  context.addTask(new tasks_1.NodePackageInstallTask());
24
24
  };
@@ -5,7 +5,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
5
5
  const package_config_1 = require("@po-ui/ng-schematics/package-config");
6
6
  const changes_1 = require("./changes");
7
7
  function default_1() {
8
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.2.0', changes_1.updateDepedenciesVersion), postUpdate()]);
8
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.3.0', changes_1.updateDepedenciesVersion), postUpdate()]);
9
9
  }
10
10
  exports.default = default_1;
11
11
  function postUpdate() {
@@ -10,7 +10,7 @@ const changes_1 = require("./changes");
10
10
  const httpClientModuleName = 'HttpClientModule';
11
11
  const httpClientModuleSourcePath = '@angular/common/http';
12
12
  function default_1() {
13
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.2.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
13
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.3.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
14
14
  }
15
15
  exports.default = default_1;
16
16
  function postUpdate() {
@@ -10,7 +10,7 @@ const package_config_1 = require("@po-ui/ng-schematics/package-config");
10
10
  const changes_1 = require("./changes");
11
11
  function updateToV2() {
12
12
  return (0, schematics_1.chain)([
13
- updatePackageJson('15.2.0', changes_1.dependeciesChanges),
13
+ updatePackageJson('15.3.0', changes_1.dependeciesChanges),
14
14
  (0, replace_1.replaceInFile)('tslint.json', changes_1.tsLintReplaces),
15
15
  (0, replace_1.replaceInFile)('angular.json', changes_1.angularJsonReplaces),
16
16
  createUpgradeRule(),
@@ -7,7 +7,7 @@ const project_1 = require("@po-ui/ng-schematics/project");
7
7
  const package_config_1 = require("@po-ui/ng-schematics/package-config");
8
8
  const changes_1 = require("./changes");
9
9
  function updateToV3() {
10
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.2.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
10
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.3.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
11
11
  }
12
12
  exports.updateToV3 = updateToV3;
13
13
  function postUpdate() {
@@ -6,7 +6,7 @@ const project_1 = require("@po-ui/ng-schematics/project");
6
6
  const package_config_1 = require("@po-ui/ng-schematics/package-config");
7
7
  const changes_1 = require("./changes");
8
8
  function default_1() {
9
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.2.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
9
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.3.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
10
10
  }
11
11
  exports.default = default_1;
12
12
  function postUpdate() {
@@ -6,7 +6,7 @@ const project_1 = require("@po-ui/ng-schematics/project");
6
6
  const package_config_1 = require("@po-ui/ng-schematics/package-config");
7
7
  const changes_1 = require("./changes");
8
8
  function default_1() {
9
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.2.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
9
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.3.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
10
10
  }
11
11
  exports.default = default_1;
12
12
  function postUpdate() {
@@ -5,7 +5,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
5
5
  const package_config_1 = require("@po-ui/ng-schematics/package-config");
6
6
  const changes_1 = require("./changes");
7
7
  function default_1() {
8
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.2.0', changes_1.updateDepedenciesVersion), postUpdate()]);
8
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('15.3.0', changes_1.updateDepedenciesVersion), postUpdate()]);
9
9
  }
10
10
  exports.default = default_1;
11
11
  function postUpdate() {
Binary file