@po-ui/ng-components 19.34.0 → 19.35.0-beta.1

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.
@@ -85,11 +85,12 @@ export declare class PoButtonBaseComponent {
85
85
  * @description
86
86
  * Ícone exibido ao lado esquerdo do label do botão.
87
87
  *
88
- * É possível usar qualquer um dos ícones da [Biblioteca de ícones](https://po-ui.io/icons). conforme exemplo abaixo:
88
+ * É possível usar qualquer um dos ícones da [Biblioteca de ícones](https://po-ui.io/icons), conforme exemplo:
89
89
  * ```
90
90
  * <po-button p-icon="an an-user" p-label="PO button"></po-button>
91
91
  * ```
92
- * Também é possível utilizar outras fontes de ícones, por exemplo a biblioteca *Font Awesome*, da seguinte forma:
92
+ * Também é possível utilizar outras fontes de ícones, por exemplo a biblioteca *Font Awesome*, desde que a biblioteca
93
+ * esteja carregada no projeto:
93
94
  * ```
94
95
  * <po-button p-icon="fa fa-podcast" p-label="PO button"></po-button>
95
96
  * ```
@@ -1,3 +1,4 @@
1
+ import { TemplateRef } from '@angular/core';
1
2
  /**
2
3
  * @usedBy PoModalComponent
3
4
  *
@@ -16,6 +17,49 @@ export interface PoModalAction {
16
17
  danger?: boolean;
17
18
  /** Desabilita o botão impossibilitando que sua ação seja executada. */
18
19
  disabled?: boolean;
20
+ /**
21
+ * Ícone exibido ao lado esquerdo do label do botão.
22
+ *
23
+ * É possível usar qualquer um dos ícones da [Biblioteca de ícones](https://po-ui.io/icons), conforme exemplo:
24
+ * ```
25
+ * modalAction: PoModalAction = {
26
+ * action: () => {},
27
+ * label: 'Botão com ícone PO',
28
+ * icon: 'an an-user'
29
+ * };
30
+ * ```
31
+ * Também é possível utilizar outras fontes de ícones, por exemplo a biblioteca *Font Awesome*, desde que a biblioteca
32
+ * esteja carregada no projeto:
33
+ * ```
34
+ * modalAction: PoModalAction = {
35
+ * action: () => {},
36
+ * label: 'Botão com ícone Font Awesome',
37
+ * icon: 'fa fa-user'
38
+ * };
39
+ * ```
40
+ * Outra opção seria a customização do ícone através do `TemplateRef`, conforme exemplo abaixo:
41
+ * ```
42
+ * // Template HTML
43
+ * <ng-template #customIcon>
44
+ * <span class="fa fa-user"></span>
45
+ * </ng-template>
46
+ *
47
+ * // Componente TypeScript
48
+ * @ViewChild('customIcon', { static: true }) customIcon: TemplateRef<void>;
49
+ *
50
+ * modalAction: PoModalAction = {
51
+ * action: () => {},
52
+ * label: 'Botão com ícone customizado',
53
+ * };
54
+ *
55
+ * // Atribuição do TemplateRef à propriedade icon após a inicialização da view
56
+ * ngAfterViewInit() {
57
+ * this.modalAction.icon = this.customIcon;
58
+ * }
59
+ * ```
60
+ * > Para o ícone enquadrar corretamente, deve-se utilizar `font-size: inherit` caso o ícone utilizado não aplique-o.
61
+ */
62
+ icon?: string | TemplateRef<void>;
19
63
  /** Rótulo do botão. */
20
64
  label: string;
21
65
  /** Habilita um estado de carregamento ao botão, desabilitando-o e exibindo um ícone de carregamento à esquerda de seu rótulo. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@po-ui/ng-components",
3
- "version": "19.34.0",
3
+ "version": "19.35.0-beta.1",
4
4
  "description": "PO UI - Components",
5
5
  "author": "PO UI",
6
6
  "license": "MIT",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@angular/cdk": "~19.0.3",
25
- "@po-ui/style": "19.34.0",
26
- "@po-ui/ng-schematics": "19.34.0",
25
+ "@po-ui/style": "19.35.0-beta.1",
26
+ "@po-ui/ng-schematics": "19.35.0-beta.1",
27
27
  "echarts": "^5.6.0",
28
28
  "tslib": "^2.6.2"
29
29
  },
@@ -38,7 +38,7 @@
38
38
  "@angular/platform-browser-dynamic": "^19",
39
39
  "@angular/router": "^19",
40
40
  "@angular-devkit/schematics": "^19",
41
- "@po-ui/style": "19.34.0",
41
+ "@po-ui/style": "19.35.0-beta.1",
42
42
  "rxjs": "~7.8.1",
43
43
  "zone.js": "~0.15.0"
44
44
  },
@@ -18,7 +18,7 @@ function default_1(options) {
18
18
  }
19
19
  function addPoPackageAndInstall() {
20
20
  return (tree, context) => {
21
- (0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '19.34.0');
21
+ (0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '19.35.0-beta.1');
22
22
  // install packages
23
23
  context.addTask(new tasks_1.NodePackageInstallTask());
24
24
  };
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
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)('19.34.0', changes_1.updateDepedenciesVersion), postUpdate()]);
9
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion), postUpdate()]);
10
10
  }
11
11
  function postUpdate() {
12
12
  return (_, context) => {
@@ -11,7 +11,7 @@ const changes_1 = require("./changes");
11
11
  const httpClientModuleName = 'HttpClientModule';
12
12
  const httpClientModuleSourcePath = '@angular/common/http';
13
13
  function default_1() {
14
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.34.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
14
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
15
15
  }
16
16
  function postUpdate() {
17
17
  return (_, context) => {
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
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)('19.34.0', changes_1.updateDepedenciesVersion), postUpdate()]);
9
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion), postUpdate()]);
10
10
  }
11
11
  function postUpdate() {
12
12
  return (_, context) => {
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
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)('19.34.0', changes_1.updateDepedenciesVersion), postUpdate()]);
9
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion), postUpdate()]);
10
10
  }
11
11
  function postUpdate() {
12
12
  return (_, context) => {
@@ -40,11 +40,11 @@ function main(options) {
40
40
  configureNewIcon.toLowerCase() === 'y' ||
41
41
  configureNewIcon.toLowerCase() === 'sim' ||
42
42
  configureNewIcon.toLowerCase() === '') {
43
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.34.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
43
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
44
44
  }
45
45
  else {
46
46
  return (0, schematics_1.chain)([
47
- (0, package_config_1.updatePackageJson)('19.34.0', changes_1.updateDepedenciesVersion),
47
+ (0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion),
48
48
  addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
49
49
  addProviderToAppModule(options, newProviderDictionary),
50
50
  updateAppConfigFileRule(),
@@ -40,11 +40,11 @@ function main(options) {
40
40
  configureNewIcon.toLowerCase() === 'y' ||
41
41
  configureNewIcon.toLowerCase() === 'sim' ||
42
42
  configureNewIcon.toLowerCase() === '') {
43
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.34.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
43
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
44
44
  }
45
45
  else {
46
46
  return (0, schematics_1.chain)([
47
- (0, package_config_1.updatePackageJson)('19.34.0', changes_1.updateDepedenciesVersion),
47
+ (0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion),
48
48
  addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
49
49
  addProviderToAppModule(options, newProviderDictionary),
50
50
  updateAppConfigFileRule(),
@@ -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('19.34.0', changes_1.dependeciesChanges),
13
+ updatePackageJson('19.35.0-beta.1', 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)('19.34.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
10
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
11
11
  }
12
12
  function postUpdate() {
13
13
  return (_, context) => {
@@ -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 default_1() {
10
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.34.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
10
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
11
11
  }
12
12
  function postUpdate() {
13
13
  return (_, context) => {
@@ -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 default_1() {
10
- return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.34.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
10
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
11
11
  }
12
12
  function postUpdate() {
13
13
  return (_, context) => {
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
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)('19.34.0', changes_1.updateDepedenciesVersion), postUpdate()]);
9
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.35.0-beta.1', changes_1.updateDepedenciesVersion), postUpdate()]);
10
10
  }
11
11
  function postUpdate() {
12
12
  return (_, context) => {
Binary file