Skip to content
Open

teste #2739

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
87fabef
feat(guided-tour): cria arquivo de componente principal com arquitetura
alinecbgml Feb 24, 2026
4d49c78
feat(guided-tour): adiciona template HTML do componente
alinecbgml Feb 24, 2026
41eadf1
feat(demo): implementa logica de tour guiado no app de demonstração
alinecbgml Feb 24, 2026
bb2b88f
feat(demo): adiciona template com componentes PO UI para showcase do …
alinecbgml Feb 24, 2026
8a6252b
Create deploy-gh-pages.yml
alinecbgml Feb 24, 2026
388f795
fix(guided-tour): corrige erro de tipagem TS e ajusta configuração do…
alinecbgml Feb 24, 2026
6a91023
Update po-guided-tour.componfix(guided-tour): restaura conteúdo do ar…
alinecbgml Feb 24, 2026
801fb67
Update app.module.tsfix(demo): declara PoGuidedTourComponent no AppMo…
alinecbgml Feb 24, 2026
ff55059
Update app.module.tsfix(demo): corrige path de import do PoGuidedTour…
alinecbgml Feb 24, 2026
e8dd75a
feat(guided-tour): adiciona arquivo SCSS do componente guided-tour
alinecbgml Feb 24, 2026
fc4ebb1
Create po-guided-tour.module.tsfeat(guided-tour): cria PoGuidedTourMo…
alinecbgml Feb 24, 2026
b499aba
Update po-guided-tour.componefeat(guided-tour): transforma o componen…
alinecbgml Feb 24, 2026
a26df22
Update po-guided-tour.component.ts
alinecbgml Feb 24, 2026
c12d779
refactor(guided-tour): remove standalone e volta a ser declarado no m…
alinecbgml Feb 24, 2026
84f342a
fix(guided-tour): add missing templateUrl and styleUrls to component …
alinecbgml Feb 24, 2026
5259752
fix(demo): importa PoGuidedTourModule ao invés do componente
alinecbgml Feb 24, 2026
d7d6588
fix(demo): remove importação duplicada do componente
alinecbgml Feb 24, 2026
2d0508e
feat(guided-tour): exporta módulo no public API
alinecbgml Feb 24, 2026
4a6f306
fix(demo): usa API pública para importar PoGuidedTourModule
alinecbgml Feb 24, 2026
8e9c5dd
feat(guided-tour): cria index.ts para exportar módulo
alinecbgml Feb 24, 2026
36258c8
fix(guided-tour): remove imports desnecessários de standalone
alinecbgml Feb 24, 2026
da72d36
feat(guided-tour): adiciona PoGuidedTourModule no components.module
alinecbgml Feb 24, 2026
e5d939c
fix(guided-tour): remove imports standalone do module
alinecbgml Feb 24, 2026
a211b52
fix(app): corrige formatação do app.module.ts
alinecbgml Feb 24, 2026
451ddb0
fix(guided-tour): adiciona CommonModule no imports do module
alinecbgml Feb 24, 2026
23303e3
fix(guided-tour): exporta componente no index para resolver NG3001
alinecbgml Feb 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy Demo to GitHub Pages

on:
push:
branches:
- demo/guided-tour-gh-pages

permissions:
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Setup Node.js ⚙️
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Dependencies 📦
run: npm install --legacy-peer-deps

- name: Build Library 🏗️
run: npm run build:ui

- name: Build Demo App 🚀
run: npx ng build app --base-href /po-angular/

- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist/app
branch: gh-pages
34 changes: 34 additions & 0 deletions projects/app/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<div class="po-wrapper">
<po-menu p-title="PO UI Guided Tour" [p-menus]="[{ label: 'Home', link: '/' }, { label: 'Showcase', link: '/showcase' }]"></po-menu>

<po-page-default p-title="Guided Tour Showcase">
<div class="po-row">
<po-info class="po-md-12" p-label="Demonstração" p-value="Este é um exemplo de uso do novo componente de tour guiado."></po-info>
</div>

<div class="po-row">
<po-widget class="po-md-6" id="welcome-card" p-title="Bem-vindo!">
<p>Este card é o primeiro passo do nosso tour. Ele serve para dar as boas-vindas aos usuários.</p>
</po-widget>

<po-widget class="po-md-6" p-title="Configurações">
<p>Clique no botão abaixo para iniciar a experiência guiada.</p>
<po-button id="action-btn" p-label="Iniciar Tour" (p-click)="startTour()" p-type="primary"></po-button>
</po-widget>
</div>

<div class="po-row">
<po-widget class="po-md-12" id="final-card" p-title="Resumo da Experiência">
<p>O tour guiado ajuda a aumentar o engajamento e diminuir a curva de aprendizado da sua aplicação.</p>
</po-widget>
</div>
</po-page-default>

<!-- Componente de Tour Guiado -->
<po-guided-tour
[p-steps]="tourSteps"
[p-allow-close]="true"
[p-allow-skip]="true"
(p-on-complete)="onTourComplete()"
></po-guided-tour>
</div>
48 changes: 46 additions & 2 deletions projects/app/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,52 @@
import { Component } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { PoGuidedTourStep } from './../../ui/src/lib/components/po-guided-tour/po-guided-tour.component';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
standalone: false
})
export class AppComponent {}
export class AppComponent {

@ViewChild(PoGuidedTourComponent) guidedTour: PoGuidedTourComponent;

readonly tourSteps: Array<PoGuidedTourStep> = [
{
id: 'step-welcome',
element: '#welcome-card',
title: 'Boas-vindas!',
description: 'Olá! Este é o novo componente de tour guiado do PO UI. Vamos conhecer algumas funcionalidades?',
position: 'bottom'
},
{
id: 'step-menu',
element: '.po-menu-item-link',
title: 'Navegação Fácil',
description: 'Aqui você pode navegar por todas as áreas da nossa aplicação de demonstração.',
position: 'right'
},
{
id: 'step-action',
element: '#action-btn',
title: 'Ações Contextuais',
description: 'Você pode disparar ações importantes diretamente daqui.',
position: 'left'
},
{
id: 'step-final',
element: '#final-card',
title: 'Pronto para começar?',
description: 'Agora que você conhece o básico, explore à vontade o nosso Design System!',
position: 'top'
}
];

startTour() {
this.guidedTour.start();
}

onTourComplete() {
console.log('Tour finalizado com sucesso!');
}

}
14 changes: 11 additions & 3 deletions projects/app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ import { RouterModule } from '@angular/router';

import { PoModule } from '@po-ui/ng-components';
import { AppComponent } from './app.component';

import { PoGuidedTourModule } from '@po-ui/ng-components';
@NgModule({
declarations: [AppComponent],
declarations: [
AppComponent,
],
bootstrap: [AppComponent],
imports: [BrowserModule, FormsModule, RouterModule.forRoot([], {}), PoModule],
imports: [
BrowserModule,
FormsModule,
RouterModule.forRoot([], {}),
PoModule,
PoGuidedTourModule
],
providers: [provideHttpClient(withInterceptorsFromDi())]
})
export class AppModule {}
2 changes: 2 additions & 0 deletions projects/ui/src/lib/components/components.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { PoFieldModule } from './po-field/po-field.module';
import { PoSwitchModule } from './po-field/po-switch/po-switch.module';
import { PoGaugeModule } from './po-gauge/po-gauge.module';
import { PoGridModule } from './po-grid/po-grid.module';
import { PoGuidedTourModule } from './po-guided-tour/po-guided-tour.module';
import { PoIconModule } from './po-icon/po-icon.module';
import { PoImageModule } from './po-image/po-image.module';
import { PoInfoModule } from './po-info/po-info.module';
Expand Down Expand Up @@ -68,6 +69,7 @@ const PO_MODULES = [
PoFieldModule,
PoGaugeModule,
PoGridModule,
PoGuidedTourModule,
PoIconModule,
PoInfoModule,
PoListViewModule,
Expand Down
1 change: 1 addition & 0 deletions projects/ui/src/lib/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export * from './po-dynamic/index';
export * from './po-field/index';
export * from './po-gauge/index';
export * from './po-grid/index';
export * from './po-guided-tour/index';
export * from './po-helper/index';
export * from './po-icon/index';
export * from './po-image/index';
Expand Down
2 changes: 2 additions & 0 deletions projects/ui/src/lib/components/po-guided-tour/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './po-guided-tour.module';
export * from './po-guided-tour.component';
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<div class="po-guided-tour-container" *ngIf="isActive">
<!-- Popover com controles -->
<div class="po-guided-tour-popover" [style.z-index]="zIndex + 1">
<div class="po-guided-tour-popover-header">
<h3 class="po-guided-tour-title">{{ getCurrentStep()?.title }}</h3>
<button
*ngIf="allowClose"
class="po-guided-tour-close-btn"
(click)="cancel()"
title="Close tour"
aria-label="Close guided tour">
×
</button>
</div>

<div class="po-guided-tour-content">
<p>{{ getCurrentStep()?.description }}</p>
</div>

<div class="po-guided-tour-progress">
<div class="po-guided-tour-progress-bar"
[style.width.%]="getProgress()"></div>
</div>

<div class="po-guided-tour-footer">
<small>{{ currentStep + 1 }} of {{ steps.length }}</small>

<div class="po-guided-tour-actions">
<button
*ngIf="!isFirstStep()"
class="po-guided-tour-btn po-guided-tour-btn-secondary"
(click)="previous()"
aria-label="Previous step">
Previous
</button>

<button
*ngIf="allowSkip"
class="po-guided-tour-btn po-guided-tour-btn-tertiary"
(click)="skipTour()"
aria-label="Skip tour">
Skip
</button>

<button
class="po-guided-tour-btn po-guided-tour-btn-primary"
(click)="isLastStep() ? complete() : next()"
[attr.aria-label]="isLastStep() ? 'Complete tour' : 'Next step'">
{{ isLastStep() ? 'Complete' : 'Next' }}
</button>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.po-guided-tour-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.7);
pointer-events: none;
overflow: hidden;
z-index: 9999;
}

.po-guided-tour-spotlight {
position: absolute;
box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
border-radius: 4px;
transition: all 0.3s ease-in-out;
pointer-events: auto;
}
Loading