@po-ui/ng-components 21.16.0 → 21.17.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.
Files changed (64) hide show
  1. package/fesm2022/{po-ui-ng-components-po-chart-modal-table.component-C4GP9pZp.mjs → po-ui-ng-components-po-chart-modal-table.component-ZnSFYVDt.mjs} +4 -4
  2. package/fesm2022/{po-ui-ng-components-po-chart-modal-table.component-C4GP9pZp.mjs.map → po-ui-ng-components-po-chart-modal-table.component-ZnSFYVDt.mjs.map} +1 -1
  3. package/fesm2022/po-ui-ng-components.mjs +18186 -14839
  4. package/fesm2022/po-ui-ng-components.mjs.map +1 -1
  5. package/lib/components/po-calendar/po-calendar-base.component.d.ts +54 -44
  6. package/lib/components/po-calendar/po-calendar-mode.enum.d.ts +2 -1
  7. package/lib/components/po-calendar/po-calendar.component.d.ts +7 -2
  8. package/lib/components/po-calendar/services/po-calendar.service.d.ts +1 -0
  9. package/lib/components/po-dynamic/po-dynamic-form/interfaces/po-dynamic-form-field.interface.d.ts +28 -8
  10. package/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-fields/po-dynamic-form-fields-base.component.d.ts +7 -0
  11. package/lib/components/po-field/index.d.ts +2 -0
  12. package/lib/components/po-field/po-datetimepicker/po-datetimepicker-base.component.d.ts +509 -0
  13. package/lib/components/po-field/po-datetimepicker/po-datetimepicker.component.d.ts +130 -0
  14. package/lib/components/po-field/po-datetimepicker/po-datetimepicker.literals.d.ts +42 -0
  15. package/lib/components/po-field/po-datetimepicker/po-datetimepicker.module.d.ts +7 -0
  16. package/lib/components/po-field/po-field.module.d.ts +1 -1
  17. package/lib/components/po-helper/interfaces/po-helper.interface.d.ts +10 -5
  18. package/lib/components/po-helper/po-helper.component.d.ts +2 -0
  19. package/lib/components/po-page/po-page-default/po-page-default-base.component.d.ts +35 -1
  20. package/lib/components/po-page/po-page-detail/po-page-detail-base.component.d.ts +11 -1
  21. package/lib/components/po-page/po-page-edit/po-page-edit-base.component.d.ts +11 -1
  22. package/lib/components/po-page/po-page-header/po-page-header-base.component.d.ts +10 -2
  23. package/lib/components/po-page/po-page-list/po-page-list-base.component.d.ts +11 -1
  24. package/lib/components/po-popover/po-popover.component.d.ts +1 -0
  25. package/lib/components/po-table/po-table.component.d.ts +35 -4
  26. package/lib/components/po-timer/po-timer.component.d.ts +2 -2
  27. package/lib/services/index.d.ts +1 -0
  28. package/lib/services/po-theme/helpers/types/po-theme-dark-defaults-AA.constant.d.ts +1 -0
  29. package/lib/services/po-theme/helpers/types/po-theme-dark-defaults.constant.d.ts +1 -0
  30. package/lib/services/po-user-guide/enums/index.d.ts +2 -0
  31. package/lib/services/po-user-guide/enums/po-user-guide-alignment.enum.d.ts +18 -0
  32. package/lib/services/po-user-guide/enums/po-user-guide-position.enum.d.ts +24 -0
  33. package/lib/services/po-user-guide/index.d.ts +6 -0
  34. package/lib/services/po-user-guide/interfaces/index.d.ts +6 -0
  35. package/lib/services/po-user-guide/interfaces/po-user-guide-end-event.interface.d.ts +46 -0
  36. package/lib/services/po-user-guide/interfaces/po-user-guide-literals.interface.d.ts +19 -0
  37. package/lib/services/po-user-guide/interfaces/po-user-guide-options.interface.d.ts +195 -0
  38. package/lib/services/po-user-guide/interfaces/po-user-guide-start-event.interface.d.ts +39 -0
  39. package/lib/services/po-user-guide/interfaces/po-user-guide-step-change-event.interface.d.ts +54 -0
  40. package/lib/services/po-user-guide/interfaces/po-user-guide-step.interface.d.ts +169 -0
  41. package/lib/services/po-user-guide/po-user-guide-base.service.d.ts +365 -0
  42. package/lib/services/po-user-guide/po-user-guide-scroll-lock.d.ts +55 -0
  43. package/lib/services/po-user-guide/po-user-guide.literals.d.ts +7 -0
  44. package/lib/services/po-user-guide/po-user-guide.module.d.ts +2 -0
  45. package/lib/services/po-user-guide/po-user-guide.service.d.ts +174 -0
  46. package/lib/utils/safe-text-parser.d.ts +23 -0
  47. package/package.json +5 -4
  48. package/po-ui-ng-components-21.17.0-beta.1.tgz +0 -0
  49. package/schematics/ng-add/index.js +1 -1
  50. package/schematics/ng-update/v14/index.js +1 -1
  51. package/schematics/ng-update/v15/index.js +1 -1
  52. package/schematics/ng-update/v16/index.js +1 -1
  53. package/schematics/ng-update/v17/index.js +1 -1
  54. package/schematics/ng-update/v18/index.js +2 -2
  55. package/schematics/ng-update/v19/index.js +2 -2
  56. package/schematics/ng-update/v2/index.js +1 -1
  57. package/schematics/ng-update/v20/index.js +2 -2
  58. package/schematics/ng-update/v21/index.js +1 -1
  59. package/schematics/ng-update/v3/index.js +1 -1
  60. package/schematics/ng-update/v4/index.js +1 -1
  61. package/schematics/ng-update/v5/index.js +1 -1
  62. package/schematics/ng-update/v6/index.js +1 -1
  63. package/types/po-ui-ng-components.d.ts +17325 -15403
  64. package/po-ui-ng-components-21.16.0.tgz +0 -0
@@ -1,12 +1,9 @@
1
1
  /**
2
- * @usedBy PoHelperComponent
2
+ * @usedBy PoHelperComponent, PoPageDefaultComponent
3
3
  *
4
4
  * @description
5
5
  *
6
- * *Interface* que define as opções de configuração do componente po-helper.
7
- *
8
- * Permite customizar o conteúdo, título, tipo do ícone, modo de abertura do popover, ações customizadas e eventos.
9
- *
6
+ * Interface para configuração das opções de ajuda (*helper*).
10
7
  */
11
8
  export interface PoHelperOptions {
12
9
  /**
@@ -25,6 +22,14 @@ export interface PoHelperOptions {
25
22
  * @description
26
23
  *
27
24
  * Texto explicativo exibido no popover.
25
+ *
26
+ * Suporta formatação básica com as tags `<b>` (negrito), `<strong>` (negrito), `<i>` (itálico), `<em>` (itálico) e
27
+ * `<u>` (sublinhado).
28
+ *
29
+ * Exemplo:
30
+ * ```typescript
31
+ * content: 'Texto <b>importante</b> com <em>destaque</em> e <u>sublinhado</u>'
32
+ * ```
28
33
  */
29
34
  content?: string;
30
35
  /**
@@ -2,6 +2,7 @@ import { ElementRef, AfterViewInit, OnDestroy, OnChanges, SimpleChanges, ChangeD
2
2
  import { PoHelperBaseComponent } from './po-helper-base.component';
3
3
  import { PoPopoverComponent } from '../po-popover/po-popover.component';
4
4
  import { PoButtonComponent } from '../po-button';
5
+ import { PoTextFragment } from '../../utils/safe-text-parser';
5
6
  /**
6
7
  * @docsExtends PoHelperBaseComponent
7
8
  *
@@ -34,6 +35,7 @@ export declare class PoHelperComponent extends PoHelperBaseComponent implements
34
35
  id: string;
35
36
  private boundFocusIn;
36
37
  private readonly poHelperLiterals;
38
+ protected readonly contentFragments: import("@angular/core").Signal<PoTextFragment[]>;
37
39
  constructor(cdr: ChangeDetectorRef);
38
40
  ngAfterViewInit(): void;
39
41
  setPopoverPositionByScreen(): void;
@@ -1,5 +1,6 @@
1
1
  import { PoLanguageService } from './../../../services/po-language/po-language.service';
2
2
  import { PoBreadcrumb } from '../../po-breadcrumb/po-breadcrumb.interface';
3
+ import { PoHelperOptions } from '../../po-helper/interfaces/po-helper.interface';
3
4
  import { PoPageAction } from '../interfaces/po-page-action.interface';
4
5
  import { PoPageContentComponent } from '../po-page-content/po-page-content.component';
5
6
  import { PoPageActionsLayout } from './enums/po-page-actions-layout.enum';
@@ -99,6 +100,30 @@ export declare abstract class PoPageDefaultBaseComponent {
99
100
  */
100
101
  set componentsSize(value: string);
101
102
  get componentsSize(): string;
103
+ /**
104
+ * @optional
105
+ *
106
+ * @description
107
+ *
108
+ * Define o conteúdo do po-helper informativo exibido ao lado do subtítulo da página.
109
+ *
110
+ * Quando não houver subtítulo (`p-subtitle`), o po-helper será exibido logo abaixo do título.
111
+ *
112
+ * Aceita uma string simples (exibida como conteúdo) ou um objeto do tipo `PoHelperOptions`
113
+ * para configuração avançada (título, conteúdo, tipo, ações).
114
+ *
115
+ * Exemplo de uso:
116
+ * ```html
117
+ * <po-page-default
118
+ * p-title="Cadastro"
119
+ * p-subtitle="Preencha os dados"
120
+ * [p-helper]="{ title: 'Ajuda', content: 'Informações sobre o cadastro' }"
121
+ * ></po-page-default>
122
+ * ```
123
+ *
124
+ * @default `info`
125
+ */
126
+ helper: import("@angular/core").InputSignalWithTransform<string | PoHelperOptions, string | PoHelperOptions>;
102
127
  /**
103
128
  * @optional
104
129
  *
@@ -169,7 +194,15 @@ export declare abstract class PoPageDefaultBaseComponent {
169
194
  *
170
195
  * Define um texto de apoio ou informações adicionais logo abaixo do título principal.
171
196
  *
172
- * > Requer que`p-title` esteja definido.
197
+ * Suporta formatação básica com as tags `<b>` (negrito), `<strong>` (negrito), `<i>` (itálico), `<em>` (itálico) e
198
+ * `<u>` (sublinhado).
199
+ *
200
+ * Exemplo:
201
+ * ```typescript
202
+ * subtitle = 'Texto <b>importante</b> com <em>destaque</em> e <u>sublinhado</u>';
203
+ * ```
204
+ *
205
+ * > Requer que `p-title` esteja definido.
173
206
  */
174
207
  set subtitle(value: string);
175
208
  get subtitle(): string;
@@ -186,6 +219,7 @@ export declare abstract class PoPageDefaultBaseComponent {
186
219
  constructor(languageService: PoLanguageService);
187
220
  protected onThemeChange(): void;
188
221
  private applySizeBasedOnA11y;
222
+ private transformPageHelper;
189
223
  abstract setDropdownActions(): any;
190
224
  abstract getVisibleActions(): any;
191
225
  }
@@ -133,7 +133,17 @@ export declare class PoPageDetailBaseComponent {
133
133
  *
134
134
  * @description
135
135
  *
136
- * Subtitulo do Header da página
136
+ * Subtitulo do Header da página.
137
+ *
138
+ * Suporta formatação básica com as tags `<b>` (negrito), `<strong>` (negrito), `<i>` (itálico), `<em>` (itálico) e
139
+ * `<u>` (sublinhado).
140
+ *
141
+ * Exemplo:
142
+ * ```typescript
143
+ * subtitle = 'Status: <b>Active</b> | Role: <i>Administrator</i>';
144
+ * ```
145
+ *
146
+ * > Requer que `p-title` esteja definido.
137
147
  */
138
148
  subtitle: string;
139
149
  constructor(languageService: PoLanguageService);
@@ -139,7 +139,17 @@ export declare class PoPageEditBaseComponent {
139
139
  *
140
140
  * @description
141
141
  *
142
- * Subtitulo do Header da página
142
+ * Subtitulo do Header da página.
143
+ *
144
+ * Suporta formatação básica com as tags `<b>` (negrito), `<strong>` (negrito), `<i>` (itálico), `<em>` (itálico) e
145
+ * `<u>` (sublinhado).
146
+ *
147
+ * Exemplo:
148
+ * ```typescript
149
+ * subtitle = 'Fields marked with <b>*</b> are <u>required</u>';
150
+ * ```
151
+ *
152
+ * > Requer que `p-title` esteja definido.
143
153
  */
144
154
  subtitle: string;
145
155
  constructor(languageService: PoLanguageService);
@@ -1,4 +1,6 @@
1
1
  import { PoBreadcrumb } from '../../po-breadcrumb/po-breadcrumb.interface';
2
+ import { PoHelperOptions } from '../../po-helper/interfaces/po-helper.interface';
3
+ import { PoTextFragment } from '../../../utils/safe-text-parser';
2
4
  /**
3
5
  * @docsPrivate
4
6
  *
@@ -10,14 +12,20 @@ import { PoBreadcrumb } from '../../po-breadcrumb/po-breadcrumb.interface';
10
12
  export declare class PoPageHeaderBaseComponent {
11
13
  /** Título da página. */
12
14
  title: string;
15
+ /** Define o conteúdo do po-helper. */
16
+ helper: import("@angular/core").InputSignal<string | PoHelperOptions>;
13
17
  /** Define o tamanho dos componentes no header. */
14
18
  size: string;
15
- /** Subtítulo da página. */
16
- subtitle: string;
17
19
  /** Define o tipo de header: `primary`, `secondary` ou `tertiary`. */
18
20
  type: string;
19
21
  private _breadcrumb;
22
+ private _subtitle;
23
+ private _subtitleFragments;
20
24
  /** Objeto com propriedades do breadcrumb. */
21
25
  set breadcrumb(value: PoBreadcrumb);
22
26
  get breadcrumb(): PoBreadcrumb;
27
+ /** Subtítulo da página. */
28
+ set subtitle(value: string);
29
+ get subtitle(): string;
30
+ get subtitleFragments(): Array<PoTextFragment>;
23
31
  }
@@ -149,7 +149,17 @@ export declare abstract class PoPageListBaseComponent {
149
149
  *
150
150
  * @description
151
151
  *
152
- * Subtitulo do Header da página
152
+ * Subtitulo do Header da página.
153
+ *
154
+ * Suporta formatação básica com as tags `<b>` (negrito), `<strong>` (negrito), `<i>` (itálico), `<em>` (itálico) e
155
+ * `<u>` (sublinhado).
156
+ *
157
+ * Exemplo:
158
+ * ```typescript
159
+ * subtitle = 'Manage <b>active</b> and <i>pending</i> processes';
160
+ * ```
161
+ *
162
+ * > Requer que `p-title` esteja definido.
153
163
  */
154
164
  subtitle: string;
155
165
  constructor(languageService: PoLanguageService);
@@ -46,6 +46,7 @@ export declare class PoPopoverComponent extends PoPopoverBaseComponent implement
46
46
  close(): void;
47
47
  debounceResize(): void;
48
48
  open(): void;
49
+ private showPopover;
49
50
  ensurePopoverPosition(): void;
50
51
  setOpacity(value: number): void;
51
52
  setPopoverPosition(): void;
@@ -1,7 +1,7 @@
1
1
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
2
2
  import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
3
3
  import { DecimalPipe } from '@angular/common';
4
- import { AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, IterableDiffers, OnDestroy, OnInit, QueryList, Renderer2, TemplateRef } from '@angular/core';
4
+ import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, IterableDiffers, OnDestroy, OnInit, QueryList, Renderer2, TemplateRef } from '@angular/core';
5
5
  import { PoDateService } from '../../services/po-date/po-date.service';
6
6
  import { PoLanguageService } from '../../services/po-language/po-language.service';
7
7
  import { PoNotificationService } from '../../services/po-notification/po-notification.service';
@@ -69,13 +69,18 @@ import { PoTableColumnSpacing } from './enums/po-table-spacing.enum';
69
69
  * <file name="sample-po-table-draggable/sample-po-table-draggable.component.ts"> </file>
70
70
  * </example>
71
71
  */
72
- export declare class PoTableComponent extends PoTableBaseComponent implements AfterViewInit, DoCheck, OnDestroy, OnInit {
72
+ export declare class PoTableComponent extends PoTableBaseComponent implements AfterViewChecked, AfterViewInit, DoCheck, OnDestroy, OnInit {
73
+ private readonly renderer;
73
74
  private readonly changeDetector;
74
75
  private readonly decimalPipe;
75
76
  private readonly defaultService;
76
77
  tableRowTemplate: PoTableRowTemplateDirective;
77
78
  tableCellTemplate: PoTableCellTemplateDirective;
78
79
  tableColumnTemplates: QueryList<PoTableColumnTemplateDirective>;
80
+ virtualScrollWrapper: ElementRef;
81
+ headerScrollContainer: ElementRef;
82
+ headerTableElement: ElementRef;
83
+ bodyTableElement: ElementRef;
79
84
  noColumnsHeader: any;
80
85
  poPopupComponent: PoPopupComponent;
81
86
  modalDelete: PoModalComponent;
@@ -104,9 +109,10 @@ export declare class PoTableComponent extends PoTableBaseComponent implements Af
104
109
  idRadio: string;
105
110
  inputFieldValue: string;
106
111
  JSON: JSON;
107
- newOrderColumns: Array<PoTableColumn>;
108
112
  sizeLoading: string;
109
113
  headerWidth: number;
114
+ headerTableScrollWidth: number;
115
+ computedColumnWidths: Array<string>;
110
116
  close: PoModalAction;
111
117
  confirm: PoModalAction;
112
118
  private _columnManagerTarget;
@@ -118,6 +124,20 @@ export declare class PoTableComponent extends PoTableBaseComponent implements Af
118
124
  private scrollEvent$;
119
125
  private subscriptionScrollEvent;
120
126
  private readonly subscriptionService;
127
+ private resizeObserver;
128
+ private scrollSyncListener;
129
+ private containerScrollSyncListener;
130
+ private virtualScrollOverflowConfigured;
131
+ private syncScheduled;
132
+ private lastColumnsKey;
133
+ private lastHeaderHeight;
134
+ private readonly SELECTOR_BODY_ROW;
135
+ private readonly SELECTOR_HEADER_CELLS;
136
+ private readonly SELECTOR_HEADER_MAIN_CELLS;
137
+ private readonly SELECTOR_BODY_CELLS;
138
+ private readonly SELECTOR_BODY_MAIN_CELLS;
139
+ private readonly SELECTOR_CDK_CONTENT_WRAPPER;
140
+ private readonly SELECTOR_FIXED_INNER_CONTAINER;
121
141
  private readonly clickListener;
122
142
  private readonly resizeListener;
123
143
  set columnManagerTarget(value: ElementRef);
@@ -139,10 +159,11 @@ export declare class PoTableComponent extends PoTableBaseComponent implements Af
139
159
  get hasVisibleSubtitleColumns(): boolean;
140
160
  get isSingleAction(): boolean;
141
161
  get isDraggable(): boolean;
142
- get inverseOfTranslation(): string;
143
162
  ngOnInit(): void;
144
163
  changeHeaderWidth(): void;
145
164
  ngAfterViewInit(): void;
165
+ ngAfterViewChecked(): void;
166
+ private shouldScheduleVirtualScrollColumnSyncWithoutWidths;
146
167
  showMoreInfiniteScroll({ target }: {
147
168
  target: any;
148
169
  }): void;
@@ -298,4 +319,14 @@ export declare class PoTableComponent extends PoTableBaseComponent implements Af
298
319
  private setTableOpacity;
299
320
  private verifyChangeHeightInFooter;
300
321
  private toggleSelect;
322
+ private configureVirtualScrollOverflow;
323
+ private applyVirtualScrollStyles;
324
+ private registerScrollSyncListeners;
325
+ private syncHeaderScrollLeft;
326
+ private setupColumnWidthSync;
327
+ private clearColumnWidths;
328
+ private removeCellWidthStyles;
329
+ private syncColumnWidths;
330
+ private measureCellWidths;
331
+ private syncHeaderTableWidth;
301
332
  }
@@ -1,6 +1,6 @@
1
- import { AfterViewInit, AfterViewChecked, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
2
- import { PoButtonComponent } from '../po-button/po-button.component';
1
+ import { OnInit, OnChanges, OnDestroy, QueryList, ElementRef, EventEmitter, SimpleChanges, AfterViewInit, AfterViewChecked } from '@angular/core';
3
2
  import { PoTimerBaseComponent } from './po-timer-base.component';
3
+ import { PoButtonComponent } from '../po-button/po-button.component';
4
4
  /** Tipo dos eixos das colunas. */
5
5
  type PoTimerColumnType = 'hour' | 'minute' | 'second' | 'period';
6
6
  /**
@@ -10,3 +10,4 @@ export * from './po-i18n/index';
10
10
  export * from './po-media-query/index';
11
11
  export * from './po-notification/index';
12
12
  export * from './po-theme/index';
13
+ export * from './po-user-guide/index';
@@ -85,6 +85,7 @@ declare const poThemeDefaultDarkValuesAA: {
85
85
  '--color-black-alpha-10': string;
86
86
  '--color-black-alpha-15': string;
87
87
  '--color-black-alpha-30': string;
88
+ '--color-po-user-guide-overlay': string;
88
89
  '--color-primary-light-80': string;
89
90
  '--color-primary-light-95': string;
90
91
  '--color-primary-alpha-50': string;
@@ -89,6 +89,7 @@ declare const poThemeDefaultDarkValues: {
89
89
  '--color-black-alpha-10': string;
90
90
  '--color-black-alpha-15': string;
91
91
  '--color-black-alpha-30': string;
92
+ '--color-po-user-guide-overlay': string;
92
93
  '--color-primary-light-80': string;
93
94
  '--color-primary-light-95': string;
94
95
  '--color-primary-alpha-50': string;
@@ -0,0 +1,2 @@
1
+ export * from './po-user-guide-alignment.enum';
2
+ export * from './po-user-guide-position.enum';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @usedBy PoUserGuideService
3
+ *
4
+ * @description
5
+ *
6
+ * *Enum* que define o alinhamento do popover do tour ao longo do eixo da posição configurada,
7
+ * utilizado na propriedade `align` de `PoUserGuideStep`.
8
+ *
9
+ * > Quando o valor não é informado, é aplicado o padrão `PoUserGuideAlignment.Start`.
10
+ */
11
+ export declare enum PoUserGuideAlignment {
12
+ /** O popover é alinhado ao início do eixo da posição (topo ou esquerda, conforme a `PoUserGuidePosition`). */
13
+ Start = "start",
14
+ /** O popover é alinhado ao centro do eixo da posição. */
15
+ Center = "center",
16
+ /** O popover é alinhado ao final do eixo da posição (rodapé ou direita, conforme a `PoUserGuidePosition`). */
17
+ End = "end"
18
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @usedBy PoUserGuideService
3
+ *
4
+ * @description
5
+ *
6
+ * *Enum* que define a posição preferida do popover do tour em relação ao elemento destacado,
7
+ * utilizado na propriedade `position` de `PoUserGuideStep`.
8
+ *
9
+ * > Quando o valor não é informado, é aplicado o padrão `PoUserGuidePosition.Auto`.
10
+ */
11
+ export declare enum PoUserGuidePosition {
12
+ /** O popover é renderizado acima do elemento destacado. */
13
+ Top = "top",
14
+ /** O popover é renderizado à direita do elemento destacado. */
15
+ Right = "right",
16
+ /** O popover é renderizado abaixo do elemento destacado. */
17
+ Bottom = "bottom",
18
+ /** O popover é renderizado à esquerda do elemento destacado. */
19
+ Left = "left",
20
+ /** O popover é renderizado sobreposto ao elemento destacado. */
21
+ Over = "over",
22
+ /** A posição é calculada automaticamente conforme o espaço disponível na viewport. */
23
+ Auto = "auto"
24
+ }
@@ -0,0 +1,6 @@
1
+ export * from './po-user-guide-base.service';
2
+ export * from './enums/index';
3
+ export * from './interfaces/index';
4
+ export * from './po-user-guide.literals';
5
+ export * from './po-user-guide.module';
6
+ export * from './po-user-guide.service';
@@ -0,0 +1,6 @@
1
+ export * from './po-user-guide-end-event.interface';
2
+ export * from './po-user-guide-literals.interface';
3
+ export * from './po-user-guide-options.interface';
4
+ export * from './po-user-guide-start-event.interface';
5
+ export * from './po-user-guide-step-change-event.interface';
6
+ export * from './po-user-guide-step.interface';
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @usedBy PoUserGuideService
3
+ *
4
+ * @description
5
+ *
6
+ * Interface que descreve o evento emitido pelo `PoUserGuideService` no encerramento da execução de um tour guiado.
7
+ *
8
+ * É publicado no `Observable` `PoUserGuideService.tourEnd$` exatamente uma vez por execução, sempre após a
9
+ * emissão do último `PoUserGuideStepChangeEvent` em `PoUserGuideService.stepChange$` e após a limpeza do estado
10
+ * interno do serviço.
11
+ *
12
+ * As aplicações consumidoras podem assinar `tourEnd$` para registrar telemetria de conclusão ou de
13
+ * abandono do tour, executar limpezas de UI ou disparar lógica de negócio dependente do encerramento
14
+ * da jornada do usuário.
15
+ */
16
+ export interface PoUserGuideEndEvent {
17
+ /**
18
+ * @description
19
+ *
20
+ * Motivo do encerramento do tour.
21
+ *
22
+ * Valores aceitos:
23
+ *
24
+ * - `completed`: o usuário avançou além do último passo do tour, concluindo a jornada por completo.
25
+ * - `closed`: o tour foi encerrado antes da conclusão, seja pelo usuário (tecla `Esc`, botão "Fechar"
26
+ * ou clique fora do popover quando `PoUserGuideOptions.allowClose` está habilitado) ou pela aplicação
27
+ * consumidora através das chamadas a `PoUserGuideService.close` ou `PoUserGuideService.exit`.
28
+ */
29
+ reason: 'completed' | 'closed';
30
+ /**
31
+ * @description
32
+ *
33
+ * Índice, com base zero, do último passo ativo antes do encerramento do tour.
34
+ *
35
+ * Quando `reason` é `'completed'`, corresponde ao índice do último passo da lista (`totalSteps - 1`).
36
+ * Quando `reason` é `'closed'`, corresponde ao índice do passo que estava em exibição
37
+ * no momento do encerramento.
38
+ */
39
+ lastIndex: number;
40
+ /**
41
+ * @description
42
+ *
43
+ * Total de passos configurados no tour, equivalente ao tamanho do array passado a `PoUserGuideService.setSteps`.
44
+ */
45
+ totalSteps: number;
46
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @usedBy PoUserGuideService
3
+ *
4
+ * @description
5
+ *
6
+ * Interface para definição das literais usadas no `po-user-guide`.
7
+ */
8
+ export interface PoUserGuideLiterals {
9
+ /** Label padrão do botão "Próximo" aplicado a todos os passos do tour. */
10
+ next?: string;
11
+ /** Label padrão do botão "Anterior" aplicado a todos os passos do tour. */
12
+ previous?: string;
13
+ /** Label padrão do botão "Finalizar" aplicado ao último passo do tour. */
14
+ done?: string;
15
+ /** Label padrão do botão "Fechar" (X) exibido no canto do popover do tour. */
16
+ close?: string;
17
+ /** Template padrão do texto de progresso exibido no popover (ex: `{ {current} } de { {total} }`). */
18
+ progressTemplate?: string;
19
+ }
@@ -0,0 +1,195 @@
1
+ import { PoUserGuideLiterals } from './po-user-guide-literals.interface';
2
+ import { PoUserGuideStepChangeEvent } from './po-user-guide-step-change-event.interface';
3
+ /**
4
+ * @usedBy PoUserGuideService
5
+ *
6
+ * @description
7
+ *
8
+ * Interface que descreve as opções globais de configuração do tour guiado executado pelo `PoUserGuideService`.
9
+ *
10
+ * Os valores informados são aplicados a toda a execução do tour e podem ser sobrescritos pontualmente
11
+ * em cada `PoUserGuideStep` através das propriedades específicas de *labels* (`nextLabel`, `previousLabel`,
12
+ * `doneLabel`) — neste caso, o valor declarado no passo prevalece sobre o valor declarado nas opções globais.
13
+ *
14
+ */
15
+ export interface PoUserGuideOptions {
16
+ /**
17
+ * @optional
18
+ *
19
+ * @description
20
+ *
21
+ * Permite que o usuário encerre o tour clicando fora do popover ou utilizando o botão "Fechar" (X).
22
+ *
23
+ * Quando definido como `false`, o tour somente pode ser encerrado de forma programática (por exemplo,
24
+ * através do método `close()` do `PoUserGuideService`) ou ao avançar além do último passo.
25
+ *
26
+ * @default `true`
27
+ */
28
+ allowClose?: boolean;
29
+ /**
30
+ * @optional
31
+ *
32
+ * @description
33
+ *
34
+ * Quando `true`, mantém a rolagem da página totalmente livre durante o tour.
35
+ *
36
+ * O valor padrão `false` (ou a omissão da propriedade) preserva o comportamento padrão de
37
+ * bloqueio: a rolagem do `document.documentElement` e do `document.body` é desabilitada
38
+ * enquanto o tour estiver ativo e restaurada integralmente ao seu término.
39
+ *
40
+ * @default `false`
41
+ */
42
+ allowScroll?: boolean;
43
+ /**
44
+ * @optional
45
+ *
46
+ * @description
47
+ *
48
+ * Exibe o indicador textual de progresso do tour no popover (por exemplo, `1 de 5`).
49
+ *
50
+ * O texto pode ser personalizado através da propriedade `progressTemplate`.
51
+ *
52
+ * @default `true`
53
+ */
54
+ showProgress?: boolean;
55
+ /**
56
+ * @optional
57
+ *
58
+ * @description
59
+ *
60
+ * Habilita/desabilita o controle do tour por teclado (valor padrão: `true`).
61
+ * Se configurado como `false`, o controle por teclado é desabilitado.
62
+ *
63
+ * Quando ativo, são interpretadas as seguintes teclas:
64
+ *
65
+ * - `Esc`: encerra o tour (equivalente a `close()`).
66
+ * - `→` (seta para a direita) ou `Enter`: avança para o próximo passo (equivalente a `next()`).
67
+ * - `←` (seta para a esquerda): retrocede para o passo anterior (equivalente a `previous()`).
68
+ *
69
+ * @default `true`
70
+ */
71
+ keyboardControl?: boolean;
72
+ /**
73
+ * @optional
74
+ *
75
+ * @description
76
+ *
77
+ * Define a opacidade do *overlay* que escurece a página ao redor do elemento destacado.
78
+ *
79
+ * O valor deve estar contido no intervalo `[0, 1]`, sendo `0` totalmente transparente e `1` totalmente opaco.
80
+ * Valores fora deste intervalo são ajustados (*clamped*) para os limites mais próximos.
81
+ *
82
+ * @default `0.7`
83
+ */
84
+ overlayOpacity?: number;
85
+ /**
86
+ * @optional
87
+ *
88
+ * @description
89
+ *
90
+ * *Label* padrão do botão "Próximo" aplicado a todos os passos do tour.
91
+ *
92
+ * Pode ser sobrescrito individualmente por passo através de `PoUserGuideStep.nextLabel`.
93
+ *
94
+ * @default `Próximo`
95
+ */
96
+ nextLabel?: string;
97
+ /**
98
+ * @optional
99
+ *
100
+ * @description
101
+ *
102
+ * *Label* padrão do botão "Anterior" aplicado a todos os passos do tour.
103
+ *
104
+ * Pode ser sobrescrito individualmente por passo através de `PoUserGuideStep.previousLabel`.
105
+ *
106
+ * @default `Anterior`
107
+ */
108
+ previousLabel?: string;
109
+ /**
110
+ * @optional
111
+ *
112
+ * @description
113
+ *
114
+ * *Label* padrão do botão "Finalizar" aplicado ao último passo do tour.
115
+ *
116
+ * Pode ser sobrescrito individualmente por passo através de `PoUserGuideStep.doneLabel`.
117
+ *
118
+ * @default `Finalizar`
119
+ */
120
+ doneLabel?: string;
121
+ /**
122
+ * @optional
123
+ *
124
+ * @description
125
+ *
126
+ * *Label* padrão do botão "Fechar" (X) exibido no canto do popover do tour.
127
+ *
128
+ * @default `Fechar`
129
+ */
130
+ closeLabel?: string;
131
+ /**
132
+ * @optional
133
+ *
134
+ * @description
135
+ *
136
+ * Template do texto de progresso exibido no popover quando `showProgress` está habilitado.
137
+ *
138
+ * Aceita os seguintes *placeholders*, que são substituídos em tempo de renderização:
139
+ *
140
+ * - `current`: número do passo atual, com base 1 (ou seja, o primeiro passo é exibido como `1`).
141
+ * - `total`: número total de passos do tour.
142
+ *
143
+ * Quando o template informado não contém nenhum dos *placeholders* suportados, o texto é exibido
144
+ * literalmente e um aviso é registrado em `console.warn`.
145
+ *
146
+ * @default `{ {current} } de { {total} }`
147
+ */
148
+ progressTemplate?: string;
149
+ /**
150
+ * @optional
151
+ *
152
+ * @description
153
+ *
154
+ * Classe CSS adicional aplicada ao elemento raiz do popover do tour.
155
+ *
156
+ * Útil para customizações pontuais sem alterar o tema global do PO UI. A classe padrão `po-user-guide-popover`
157
+ * é sempre aplicada e preservada — o valor informado é concatenado a ela.
158
+ */
159
+ popoverClass?: string;
160
+ /**
161
+ * @optional
162
+ *
163
+ * @description
164
+ *
165
+ * Objeto com as literais usadas no `po-user-guide`.
166
+ *
167
+ * Permite customizar os textos dos botões de navegação e o template de progresso do tour.
168
+ * Quando omitido, as literais são traduzidas automaticamente de acordo com o idioma do
169
+ * [`PoI18nService`](/documentation/po-i18n) ou do browser.
170
+ *
171
+ * Exemplo passando apenas as literais que deseja customizar:
172
+ *
173
+ * ```
174
+ * const customLiterals: PoUserGuideLiterals = {
175
+ * next: 'Avançar',
176
+ * done: 'Concluir'
177
+ * };
178
+ * ```
179
+ */
180
+ literals?: PoUserGuideLiterals;
181
+ /**
182
+ * @optional
183
+ *
184
+ * @description
185
+ *
186
+ * Função de *callback* invocada a cada mudança de passo durante a execução do tour.
187
+ *
188
+ * Recebe como argumento um evento `PoUserGuideStepChangeEvent` contendo o passo ativo, seu índice, a direção
189
+ * da transição (`'next'`, `'previous'`, `'goto'` ou `'start'`) e o total de passos do tour.
190
+ *
191
+ * O *callback* é executado antes da emissão do evento correspondente em `PoUserGuideService.stepChange$`,
192
+ * permitindo a aplicação consumidora reagir à transição antes que outros assinantes do `Observable` sejam notificados.
193
+ */
194
+ onStepChange?: (event: PoUserGuideStepChangeEvent) => void;
195
+ }