@praxisui/stepper 1.0.0-beta.58 → 1.0.0-beta.60
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/README.md +1 -0
- package/fesm2022/praxisui-stepper.mjs +1094 -1151
- package/fesm2022/praxisui-stepper.mjs.map +1 -1
- package/index.d.ts +11 -4
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -244,13 +244,14 @@ type WizardWidgetId = 'praxis-wizard-benefits' | 'praxis-wizard-content' | 'prax
|
|
|
244
244
|
type EditorialZone = 'before' | 'after';
|
|
245
245
|
declare class PraxisStepperConfigEditor implements SettingsValueProvider {
|
|
246
246
|
config: StepperMetadata;
|
|
247
|
-
|
|
247
|
+
activeStepRef: StepConfig | null;
|
|
248
248
|
isDirty$: BehaviorSubject<boolean>;
|
|
249
249
|
isValid$: BehaviorSubject<boolean>;
|
|
250
250
|
isBusy$: BehaviorSubject<boolean>;
|
|
251
251
|
private readonly settings;
|
|
252
252
|
private readonly dialog;
|
|
253
253
|
private readonly iconPicker;
|
|
254
|
+
private readonly cdr;
|
|
254
255
|
constructor(data?: any);
|
|
255
256
|
markDirty(): void;
|
|
256
257
|
validate(): void;
|
|
@@ -275,11 +276,16 @@ declare class PraxisStepperConfigEditor implements SettingsValueProvider {
|
|
|
275
276
|
get symbolsLikelySelected(): string[];
|
|
276
277
|
setIconsSetToSymbols(): void;
|
|
277
278
|
drop(ev: CdkDragDrop<StepConfig[]>): void;
|
|
278
|
-
setActive(
|
|
279
|
-
|
|
279
|
+
setActive(step: StepConfig): void;
|
|
280
|
+
onStepItemEnter(event: Event, step: StepConfig): void;
|
|
281
|
+
onStepItemSpace(event: Event, step: StepConfig): void;
|
|
282
|
+
focusAdjacentStep(event: Event, index: number, delta: number): void;
|
|
280
283
|
addStep(): void;
|
|
281
284
|
removeStep(idx: number): void;
|
|
285
|
+
get activeIndex(): number;
|
|
282
286
|
get activeStep(): StepConfig | null;
|
|
287
|
+
private ensureActiveStep;
|
|
288
|
+
private commitFocusedFieldBeforeSwitch;
|
|
283
289
|
ensureWidgets(): WidgetDefinition[];
|
|
284
290
|
ensureWidgetsBeforeForm(): WidgetDefinition[];
|
|
285
291
|
displayWidgetName(w: WidgetDefinition): string;
|
|
@@ -288,6 +294,7 @@ declare class PraxisStepperConfigEditor implements SettingsValueProvider {
|
|
|
288
294
|
advancedWidgets(step: StepConfig): WidgetDefinition[];
|
|
289
295
|
widgetBlockId(w: WidgetDefinition): string | null;
|
|
290
296
|
editorialWidgetSummary(w: WidgetDefinition): string;
|
|
297
|
+
editorialWidgetStatus(w: WidgetDefinition): string;
|
|
291
298
|
addEditorialWidget(id: WizardWidgetId, zone?: EditorialZone): void;
|
|
292
299
|
dropEditorialBefore(ev: CdkDragDrop<WidgetDefinition[]>): void;
|
|
293
300
|
dropEditorialAfter(ev: CdkDragDrop<WidgetDefinition[]>): void;
|
|
@@ -425,7 +432,7 @@ interface WizardFormConfig {
|
|
|
425
432
|
theme?: Record<string, string>;
|
|
426
433
|
}
|
|
427
434
|
|
|
428
|
-
declare const FT_WIZARD_JSON = "{\n \"id\": \"ft-edit-wizard\",\n \"brand\": \"FINANCIAL TIMES\",\n \"progress\": {\n \"variant\": \"line\",\n \"showLabels\": true,\n \"labelPosition\": \"bottom\"\n },\n \"cta\": {\n \"label\": \"Continue\",\n \"action\": \"next\",\n \"secondaryLabel\": \"Back\",\n \"secondaryAction\": \"prev\",\n \"sticky\": true\n },\n \"preferences\": {\n \"stepId\": \"preferences\",\n \"storageKey\": \"praxis:ft-wizard\",\n \"persistFields\": [\"topStories\", \"invitesOffers\", \"recommendations\"]\n },\n \"theme\": {\n \"praxis-wizard-card-bg\": \"#fff1e5\",\n \"md-sys-color-surface\": \"#fff1e5\",\n \"md-sys-color-on-surface\": \"#33302e\",\n \"praxis-wizard-accent\": \"#0d7680\",\n \"praxis-wizard-border\": \"#cfcfcf\",\n \"md-sys-color-outline-variant\": \"#cfcfcf\",\n \"ft-font-head\": \"\\\"Financier Display\\\", Georgia, serif\",\n \"ft-font-body\": \"\\\"Metric\\\", \\\"Helvetica Neue\\\", Helvetica, Arial, sans-serif\",\n \"ft-radius\": \"0\",\n \"ft-shadow\": \"none\",\n \"ft-header-border\": \"1px solid #cfcfcf\"\n },\n \"steps\": [\n {\n \"id\": \"access\",\n \"label\": \"Access\",\n \"title\": \"Create an FT Edit account\",\n \"subtitle\": \"Get access in a couple of steps and upgrade later for the full FT experience.\",\n \"zones\": {\n \"intro\": [\n {\n \"type\": \"benefitsGrid\",\n \"title\": \"Why register?\",\n \"columns\": 4,\n \"boxed\": true,\n \"items\": [\n {\n \"icon\": \"format_quote\",\n \"title\": \"Beyond the headlines\",\n \"text\": \"Insightful news, thought-provoking opinion and fascinating features.\"\n },\n {\n \"icon\": \"edit_note\",\n \"title\": \"Curated daily editions\",\n \"text\": \"Eight fresh articles a day chosen for you by our senior editors.\"\n },\n {\n \"icon\": \"bookmarks\",\n \"title\": \"Never miss a great story\",\n \"text\": \"Explore previous editions from the past week.\"\n },\n {\n \"icon\": \"mail\",\n \"title\": \"Receive the FT Edit newsletter\",\n \"text\": \"A daily round-up delivered straight to your inbox.\"\n }\n ]\n }\n ],\n \"footer\": [\n {\n \"type\": \"inlineNotice\",\n \"text\": \"For more information about how we use your data, please refer to our privacy and cookie policies.\"\n }\n ]\n },\n \"cta\": {\n \"label\": \"Register with email\",\n \"action\": \"next\"\n },\n \"form\": {\n \"config\": {\n \"sections\": [\n {\n \"id\": \"access-section\",\n \"rows\": [\n {\n \"columns\": [\n {\n \"fields\": [\"confirmAge\", \"editNewsletter\"]\n }\n ]\n }\n ]\n }\n ],\n \"fieldMetadata\": [\n {\n \"name\": \"confirmAge\",\n \"label\": \"\",\n \"controlType\": \"checkbox\",\n \"required\": true,\n \"layout\": \"horizontal\",\n \"options\": [\n {\n \"label\": \"I confirm I am 16+ years old and agree to the Terms & Conditions.\",\n \"value\": true\n }\n ]\n },\n {\n \"name\": \"editNewsletter\",\n \"label\": \"FT Edit newsletter\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true,\n \"hint\": \"All new members also start receiving our daily FT Edit newsletter.\"\n }\n ],\n \"actions\": {\n \"submit\": { \"visible\": false, \"label\": \"Submit\" },\n \"cancel\": { \"visible\": false, \"label\": \"Cancel\" },\n \"reset\": { \"visible\": false, \"label\": \"Reset\" }\n }\n }\n }\n },\n {\n \"id\": \"account\",\n \"label\": \"Account\",\n \"title\": \"Create an FT Edit account\",\n \"subtitle\": \"This address will be used to create your account.\",\n \"zones\": {\n \"intro\": [\n {\n \"type\": \"inlineNotice\",\n \"text\": \"All new members also start receiving our daily FT Edit newsletter.\",\n \"tone\": \"info\"\n }\n ],\n \"footer\": [\n {\n \"type\": \"inlineNotice\",\n \"text\": \"We will send you service messages about your account, security or legal notifications.\"\n }\n ]\n },\n \"form\": {\n \"config\": {\n \"sections\": [\n {\n \"id\": \"account-section\",\n \"rows\": [\n {\n \"columns\": [\n { \"fields\": [\"email\", \"password\"] },\n { \"fields\": [\"newsletterOptIn\"] }\n ]\n }\n ]\n }\n ],\n \"fieldMetadata\": [\n {\n \"name\": \"email\",\n \"label\": \"Email address\",\n \"controlType\": \"email\",\n \"required\": true,\n \"placeholder\": \"Enter your email address\"\n },\n {\n \"name\": \"password\",\n \"label\": \"Password\",\n \"controlType\": \"password\",\n \"required\": true,\n \"placeholder\": \"Enter a password\",\n \"hint\": \"Use 8 or more characters. You can use letters, numbers or symbols.\",\n \"validators\": {\n \"minLength\": 8\n },\n \"revealToggle\": {\n \"enabled\": true,\n \"style\": \"text\",\n \"showLabel\": \"Show password\",\n \"hideLabel\": \"Hide password\",\n \"ariaLabel\": \"Toggle password visibility\"\n }\n },\n {\n \"name\": \"newsletterOptIn\",\n \"label\": \"Stay up to date\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true,\n \"hint\": \"All new members also start receiving our daily FT Edit newsletter.\"\n }\n ],\n \"actions\": {\n \"submit\": { \"visible\": false, \"label\": \"Submit\" },\n \"cancel\": { \"visible\": false, \"label\": \"Cancel\" },\n \"reset\": { \"visible\": false, \"label\": \"Reset\" }\n }\n }\n }\n },\n {\n \"id\": \"preferences\",\n \"label\": \"Preferences\",\n \"title\": \"Stay up to date\",\n \"subtitle\": \"You can update these any time in your Contact Preferences.\",\n \"description\": \"We will send you service messages about your account, security or legal notifications.\",\n \"zones\": {\n \"footer\": [\n {\n \"type\": \"divider\"\n },\n {\n \"type\": \"inlineNotice\",\n \"text\": \"We will send you service messages about your account, security or legal notifications.\"\n }\n ]\n },\n \"cta\": {\n \"label\": \"Create an FT Edit account\",\n \"action\": \"submit\",\n \"secondaryLabel\": \"Back\",\n \"secondaryAction\": \"prev\"\n },\n \"form\": {\n \"config\": {\n \"sections\": [\n {\n \"id\": \"prefs-section\",\n \"rows\": [\n {\n \"columns\": [\n { \"fields\": [\"topStories\"] },\n { \"fields\": [\"invitesOffers\"] },\n { \"fields\": [\"recommendations\"] }\n ]\n }\n ]\n }\n ],\n \"fieldMetadata\": [\n {\n \"name\": \"topStories\",\n \"label\": \"Top stories & features\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true,\n \"hint\": \"Get the most from the Financial Times with personalised special reports, recommended reads and latest feature announcements.\"\n },\n {\n \"name\": \"invitesOffers\",\n \"label\": \"Invites & offers from the FT\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true,\n \"hint\": \"Receive exclusive personalised event invitations, carefully-curated offers and promotions from the Financial Times.\"\n },\n {\n \"name\": \"recommendations\",\n \"label\": \"Personal recommendations\",\n \"controlType\": \"toggle\",\n \"defaultValue\": false,\n \"hint\": \"Tailored reading lists based on what you follow.\"\n }\n ],\n \"actions\": {\n \"submit\": { \"visible\": false, \"label\": \"Submit\" },\n \"cancel\": { \"visible\": false, \"label\": \"Cancel\" },\n \"reset\": { \"visible\": false, \"label\": \"Reset\" }\n }\n }\n }\n }\n ]\n}";
|
|
435
|
+
declare const FT_WIZARD_JSON = "{\n \"id\": \"advanced-onboarding-wizard\",\n \"brand\": \"PRAXIS UI\",\n \"progress\": {\n \"variant\": \"line\",\n \"showLabels\": true,\n \"labelPosition\": \"bottom\"\n },\n \"cta\": {\n \"label\": \"Continuar\",\n \"action\": \"next\",\n \"secondaryLabel\": \"Voltar\",\n \"secondaryAction\": \"prev\",\n \"sticky\": true\n },\n \"preferences\": {\n \"stepId\": \"preferences\",\n \"storageKey\": \"praxis:advanced-wizard\",\n \"persistFields\": [\"novidadesProduto\", \"eventosConteudo\", \"recomendacoes\"]\n },\n \"theme\": {\n \"praxis-wizard-card-bg\": \"#fff7ef\",\n \"md-sys-color-surface\": \"#fff7ef\",\n \"md-sys-color-on-surface\": \"#33302e\",\n \"praxis-wizard-accent\": \"#0d7680\",\n \"praxis-wizard-border\": \"#cfcfcf\",\n \"md-sys-color-outline-variant\": \"#cfcfcf\",\n \"ft-font-head\": \"Georgia, \\\"Times New Roman\\\", serif\",\n \"ft-font-body\": \"\\\"Source Sans 3\\\", \\\"Segoe UI\\\", Arial, sans-serif\",\n \"ft-radius\": \"0\",\n \"ft-shadow\": \"none\",\n \"ft-header-border\": \"1px solid #cfcfcf\"\n },\n \"steps\": [\n {\n \"id\": \"access\",\n \"label\": \"Acesso\",\n \"title\": \"Crie sua conta\",\n \"subtitle\": \"Ative seu acesso em poucos passos e personalize a experi\u00EAncia desde o in\u00EDcio.\",\n \"zones\": {\n \"intro\": [\n {\n \"type\": \"benefitsGrid\",\n \"title\": \"Por que se cadastrar?\",\n \"columns\": 4,\n \"boxed\": true,\n \"items\": [\n {\n \"icon\": \"format_quote\",\n \"title\": \"Conte\u00FAdo relevante\",\n \"text\": \"Receba atualiza\u00E7\u00F5es, novidades e materiais selecionados para o seu perfil.\"\n },\n {\n \"icon\": \"edit_note\",\n \"title\": \"Fluxo guiado\",\n \"text\": \"Conclua o cadastro com uma jornada simples, clara e orientada por etapas.\"\n },\n {\n \"icon\": \"bookmarks\",\n \"title\": \"Prefer\u00EAncias salvas\",\n \"text\": \"Defina suas escolhas iniciais e retome o processo sem perder o progresso.\"\n },\n {\n \"icon\": \"mail\",\n \"title\": \"Comunica\u00E7\u00E3o sob controle\",\n \"text\": \"Escolha como deseja receber novidades, alertas e recomenda\u00E7\u00F5es.\"\n }\n ]\n }\n ],\n \"footer\": [\n {\n \"type\": \"inlineNotice\",\n \"text\": \"Ao continuar, voc\u00EA concorda com os termos de uso e com a pol\u00EDtica de privacidade da plataforma.\"\n }\n ]\n },\n \"cta\": {\n \"label\": \"Come\u00E7ar cadastro\",\n \"action\": \"next\"\n },\n \"form\": {\n \"config\": {\n \"sections\": [\n {\n \"id\": \"access-section\",\n \"rows\": [\n {\n \"columns\": [\n {\n \"fields\": [\"confirmAge\", \"receberNovidades\"]\n }\n ]\n }\n ]\n }\n ],\n \"fieldMetadata\": [\n {\n \"name\": \"confirmAge\",\n \"label\": \"\",\n \"controlType\": \"checkbox\",\n \"required\": true,\n \"layout\": \"horizontal\",\n \"options\": [\n {\n \"label\": \"Confirmo que li e aceito os termos de uso e a pol\u00EDtica de privacidade.\",\n \"value\": true\n }\n ]\n },\n {\n \"name\": \"receberNovidades\",\n \"label\": \"Receber novidades por e-mail\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true,\n \"hint\": \"Voc\u00EA pode alterar essa prefer\u00EAncia a qualquer momento nas configura\u00E7\u00F5es da conta.\"\n }\n ],\n \"actions\": {\n \"submit\": { \"visible\": false, \"label\": \"Salvar\" },\n \"cancel\": { \"visible\": false, \"label\": \"Cancelar\" },\n \"reset\": { \"visible\": false, \"label\": \"Limpar\" }\n }\n }\n }\n },\n {\n \"id\": \"account\",\n \"label\": \"Conta\",\n \"title\": \"Configure seu acesso\",\n \"subtitle\": \"Esses dados ser\u00E3o usados para criar e proteger sua conta.\",\n \"zones\": {\n \"intro\": [\n {\n \"type\": \"inlineNotice\",\n \"text\": \"Use um e-mail v\u00E1lido para confirmar o cadastro e recuperar o acesso quando necess\u00E1rio.\",\n \"tone\": \"info\"\n }\n ],\n \"footer\": [\n {\n \"type\": \"inlineNotice\",\n \"text\": \"Mensagens de seguran\u00E7a e comunica\u00E7\u00F5es operacionais continuam ativas mesmo se voc\u00EA desativar novidades.\"\n }\n ]\n },\n \"form\": {\n \"config\": {\n \"sections\": [\n {\n \"id\": \"account-section\",\n \"rows\": [\n {\n \"columns\": [\n { \"fields\": [\"email\", \"password\"] },\n { \"fields\": [\"aceitaComunicacoes\"] }\n ]\n }\n ]\n }\n ],\n \"fieldMetadata\": [\n {\n \"name\": \"email\",\n \"label\": \"E-mail\",\n \"controlType\": \"email\",\n \"required\": true,\n \"placeholder\": \"Digite seu e-mail\"\n },\n {\n \"name\": \"password\",\n \"label\": \"Senha\",\n \"controlType\": \"password\",\n \"required\": true,\n \"placeholder\": \"Crie uma senha\",\n \"hint\": \"Use 8 ou mais caracteres, combinando letras, n\u00FAmeros e s\u00EDmbolos.\",\n \"validators\": {\n \"minLength\": 8\n },\n \"revealToggle\": {\n \"enabled\": true,\n \"style\": \"icon\",\n \"showLabel\": \"Mostrar senha\",\n \"hideLabel\": \"Ocultar senha\",\n \"ariaLabel\": \"Alternar visibilidade da senha\",\n \"iconShow\": \"visibility\",\n \"iconHide\": \"visibility_off\"\n }\n },\n {\n \"name\": \"aceitaComunicacoes\",\n \"label\": \"Receber comunica\u00E7\u00F5es da plataforma\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true,\n \"hint\": \"Inclui novidades de produto, convites para eventos e conte\u00FAdos de apoio.\"\n }\n ],\n \"actions\": {\n \"submit\": { \"visible\": false, \"label\": \"Salvar\" },\n \"cancel\": { \"visible\": false, \"label\": \"Cancelar\" },\n \"reset\": { \"visible\": false, \"label\": \"Limpar\" }\n }\n }\n }\n },\n {\n \"id\": \"preferences\",\n \"label\": \"Prefer\u00EAncias\",\n \"title\": \"Personalize sua experi\u00EAncia\",\n \"subtitle\": \"Voc\u00EA pode alterar essas configura\u00E7\u00F5es a qualquer momento no painel da conta.\",\n \"description\": \"Escolha quais comunica\u00E7\u00F5es e recomenda\u00E7\u00F5es fazem sentido para o seu contexto.\",\n \"zones\": {\n \"footer\": [\n {\n \"type\": \"divider\"\n },\n {\n \"type\": \"inlineNotice\",\n \"text\": \"Alertas de seguran\u00E7a e mensagens essenciais sobre a conta permanecem ativos para garantir a opera\u00E7\u00E3o.\"\n }\n ]\n },\n \"cta\": {\n \"label\": \"Concluir cadastro\",\n \"action\": \"submit\",\n \"secondaryLabel\": \"Voltar\",\n \"secondaryAction\": \"prev\"\n },\n \"form\": {\n \"config\": {\n \"sections\": [\n {\n \"id\": \"prefs-section\",\n \"rows\": [\n {\n \"columns\": [\n { \"fields\": [\"novidadesProduto\"] },\n { \"fields\": [\"eventosConteudo\"] },\n { \"fields\": [\"recomendacoes\"] }\n ]\n }\n ]\n }\n ],\n \"fieldMetadata\": [\n {\n \"name\": \"novidadesProduto\",\n \"label\": \"Novidades de produto\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true,\n \"hint\": \"Receba lancamentos, melhorias e comunicados importantes sobre a plataforma.\"\n },\n {\n \"name\": \"eventosConteudo\",\n \"label\": \"Eventos e conte\u00FAdos especiais\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true,\n \"hint\": \"Seja avisado sobre webinars, materiais t\u00E9cnicos e convites para trilhas de capacita\u00E7\u00E3o.\"\n },\n {\n \"name\": \"recomendacoes\",\n \"label\": \"Recomenda\u00E7\u00F5es personalizadas\",\n \"controlType\": \"toggle\",\n \"defaultValue\": false,\n \"hint\": \"Receba sugest\u00F5es de recursos e exemplos com base nas suas prefer\u00EAncias de uso.\"\n }\n ],\n \"actions\": {\n \"submit\": { \"visible\": false, \"label\": \"Salvar\" },\n \"cancel\": { \"visible\": false, \"label\": \"Cancelar\" },\n \"reset\": { \"visible\": false, \"label\": \"Limpar\" }\n }\n }\n }\n }\n ]\n}";
|
|
429
436
|
declare const FT_WIZARD_CONFIG: WizardFormConfig;
|
|
430
437
|
|
|
431
438
|
declare class PraxisWizardFormComponent {
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/stepper",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.60",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^20.0.0",
|
|
6
6
|
"@angular/core": "^20.0.0",
|
|
7
7
|
"@angular/material": "^20.0.0",
|
|
8
8
|
"@angular/cdk": "^20.0.0",
|
|
9
|
-
"@praxisui/core": "^1.0.0-beta.
|
|
10
|
-
"@praxisui/dynamic-form": "^1.0.0-beta.
|
|
11
|
-
"@praxisui/settings-panel": "^1.0.0-beta.
|
|
12
|
-
"@praxisui/list": "^1.0.0-beta.
|
|
13
|
-
"@praxisui/files-upload": "^1.0.0-beta.
|
|
14
|
-
"@praxisui/page-builder": "^1.0.0-beta.
|
|
9
|
+
"@praxisui/core": "^1.0.0-beta.60",
|
|
10
|
+
"@praxisui/dynamic-form": "^1.0.0-beta.60",
|
|
11
|
+
"@praxisui/settings-panel": "^1.0.0-beta.60",
|
|
12
|
+
"@praxisui/list": "^1.0.0-beta.60",
|
|
13
|
+
"@praxisui/files-upload": "^1.0.0-beta.60",
|
|
14
|
+
"@praxisui/page-builder": "^1.0.0-beta.60"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"tslib": "^2.3.0"
|