Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6a46379
accordion: стилизация, сторисы, обёртки
Apr 8, 2026
4032f6f
confirm-dialog: стилизация, сторисы, обёртки
Apr 9, 2026
b9db1e5
data-table: стилизация, сторисы, обёртки
Apr 9, 2026
8020a49
confirm-dialog: убран класс p-icon с иконки сообщения
Apr 13, 2026
1627b92
confirm-dialog: добавлены headerTemplate и footerTemplate для кастоми…
Apr 13, 2026
0480f7a
confirm-dialog: добавлен ConfirmDialogService, заменён ConfirmationSe…
Apr 13, 2026
b6684fd
confirm-dialog: фикс цветов иконок severity, убран severity secondary…
Apr 13, 2026
cf0045f
sortable сделано внутренним условием
Apr 13, 2026
6927c62
фикс текста при наведении в headerCell
Apr 13, 2026
2c16a58
Merge branch 'overlay.dialog' into overlay.confirmdialog
khaliulin Apr 15, 2026
ddf6b54
stepper: стилизация, сторисы, обёртки
Apr 15, 2026
606aeb7
фикс вёрстки для вертикального состояния
Apr 15, 2026
41d492e
дизейбл состояние, если шаг с оишбкой
Apr 15, 2026
cea2739
confirm-dialog: заменяем p-button на ButtonComponent, (onClick) → (cl…
Apr 17, 2026
1311700
confirm-dialog: ConfirmDialogService.providers() инкапсулирует Confir…
Apr 17, 2026
cd9f122
удалён файл claude.md
Apr 17, 2026
386ac2b
stepper: заменить *ngIf/*ngFor на @if/@for
Apr 20, 2026
2e78c42
stepper: заменить p-button на ButtonComponent
Apr 20, 2026
8b16555
stepper: экспорт типа как в других компонентах
Apr 20, 2026
654e7fb
stepper: change detection = OnPush
Apr 20, 2026
3ff846f
modified .gitignore
Apr 20, 2026
ca483e1
confirm-dialog: фикс отображения стилей
Apr 20, 2026
79247b2
Merge branch 'feature/styles-debug' into panel.stepper
khaliulin Apr 22, 2026
5dd9d9f
Merge branch 'feature/styles-debug' into data.datatable
AxyIX May 23, 2026
952dcec
DS-517
AxyIX May 25, 2026
70f940d
DS-517
AxyIX May 29, 2026
eed9aba
Merge branch 'refs/heads/feature/styles-debug' into data.datatable
AxyIX May 29, 2026
d5197b7
DS-517
AxyIX May 29, 2026
5b3fd84
DS-517
AxyIX May 29, 2026
2430385
Merge pull request #35 from cdek-it/data.datatable
AxyIX May 29, 2026
94c30f0
Merge branch 'feature/styles-debug' into panel.stepper
AxyIX May 29, 2026
9ee5e31
DS-517
AxyIX May 29, 2026
35b8d8c
Merge pull request #47 from cdek-it/panel.stepper
AxyIX May 29, 2026
b36165e
Merge branch 'feature/styles-debug' into panel.accordion
AxyIX May 29, 2026
5686e25
DS-493
AxyIX May 29, 2026
ebde6b7
Merge pull request #32 from cdek-it/panel.accordion
AxyIX May 29, 2026
c1a6a5b
Merge branch 'feature/styles-debug' into overlay.confirmdialog
AxyIX May 29, 2026
5bf25e5
DS-497
AxyIX May 30, 2026
11aa27a
Merge pull request #33 from cdek-it/overlay.confirmdialog
AxyIX May 30, 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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ src/assets/components/themes
/debug-storybook.log
/documentation.json

.claude/*

.playwright-mcp/*

.claude/*
40 changes: 40 additions & 0 deletions src/lib/components/accordion/accordion.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { Accordion, AccordionPanel, AccordionHeader, AccordionContent } from 'primeng/accordion';

export interface ExtraAccordionItem {
value: string;
header: string;
content: string;
icon?: string;
disabled?: boolean;
}

@Component({
selector: 'extra-accordion',
host: { style: 'display: block' },
standalone: true,
imports: [Accordion, AccordionPanel, AccordionHeader, AccordionContent],
template: `
<p-accordion [multiple]="multiple" [value]="activeValue" (valueChange)="activeValueChange.emit($event)">
@for (item of items; track item.value) {
<p-accordion-panel [value]="item.value" [disabled]="item.disabled ?? false">
<p-accordion-header>
<div>
@if (item.icon) {
<i [class]="item.icon"></i>
}
<span>{{ item.header }}</span>
</div>
</p-accordion-header>
<p-accordion-content>{{ item.content }}</p-accordion-content>
</p-accordion-panel>
}
</p-accordion>
`
})
export class ExtraAccordionComponent {
@Input() items: ExtraAccordionItem[] = [];
@Input() multiple = false;
@Input() activeValue: string | null = '0';
@Output() activeValueChange = new EventEmitter<string | number | string[] | number[] | null | undefined>();
}
6 changes: 6 additions & 0 deletions src/lib/components/accordion/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "public_api.ts"
}
}
1 change: 1 addition & 0 deletions src/lib/components/accordion/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './accordion.component';
88 changes: 88 additions & 0 deletions src/lib/components/confirm-dialog/confirm-dialog.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import { Component, Input, TemplateRef } from '@angular/core';
import { NgTemplateOutlet } from '@angular/common';
import { ConfirmDialog } from 'primeng/confirmdialog';
import { PrimeTemplate } from 'primeng/api';
import { ExtraButtonComponent } from '../button/button.component';

export type ExtraConfirmDialogSize = 'sm' | 'default' | 'lg' | 'xlg';
export type ExtraConfirmDialogSeverity = 'success' | 'info' | 'warn' | 'help' | 'danger' | 'default';

@Component({
selector: 'extra-confirm-dialog',
host: { style: 'display: contents' },
standalone: true,
imports: [ConfirmDialog, ExtraButtonComponent, PrimeTemplate, NgTemplateOutlet],
template: `
<p-confirmDialog [key]="key" [styleClass]="computedClass" appendTo="body">
<ng-template pTemplate="headless" let-message let-onAccept="onAccept" let-onReject="onReject">
@if (headerTemplate) {
<ng-container [ngTemplateOutlet]="headerTemplate"
[ngTemplateOutletContext]="{ $implicit: message, onAccept, onReject }">
</ng-container>
} @else {
<div class="p-dialog-header">
<div class="p-dialog-title">
<i [class]="message.icon"></i>
<span>{{ message.header }}</span>
</div>
<extra-button
styleClass="p-dialog-close-button"
variant="text"
icon="ti ti-x"
[rounded]="true"
[iconOnly]="true"
(click)="onReject()"
></extra-button>
</div>
}
<div class="p-dialog-content">
<p>{{ message.message }}</p>
</div>
@if (footerTemplate) {
<ng-container [ngTemplateOutlet]="footerTemplate"
[ngTemplateOutletContext]="{ $implicit: message, onAccept, onReject }">
</ng-container>
} @else {
<div class="p-dialog-footer">
<extra-button
[label]="message.rejectLabel"
variant="text"
(click)="onReject()"
></extra-button>
<extra-button
[label]="message.acceptLabel"
[severity]="message.acceptButtonProps?.severity"
(click)="onAccept()"
></extra-button>
</div>
}
</ng-template>
</p-confirmDialog>
`,
})
export class ExtraConfirmDialogComponent {
@Input() key = '';
@Input() size: ExtraConfirmDialogSize = 'default';
@Input() severity: ExtraConfirmDialogSeverity = 'default';
@Input() headerTemplate: TemplateRef<any> | null = null;
@Input() footerTemplate: TemplateRef<any> | null = null;

get computedClass(): string {
const classes: string[] = [];
if (this.size === 'sm') classes.push('p-confirmdialog-sm');
else if (this.size === 'lg') classes.push('p-confirmdialog-lg');
else if (this.size === 'xlg') classes.push('p-confirmdialog-xlg');

const severityMap: Record<ExtraConfirmDialogSeverity, string> = {
success: 'p-confirm-dialog-accept',
info: 'p-confirm-dialog-info',
warn: 'p-confirm-dialog-warn',
help: 'p-confirm-dialog-help',
danger: 'p-confirm-dialog-error',
default: '',
};
if (severityMap[this.severity]) classes.push(severityMap[this.severity]);

return classes.join(' ');
}
}
20 changes: 20 additions & 0 deletions src/lib/components/confirm-dialog/confirm-dialog.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Injectable, Provider } from '@angular/core';
import { Confirmation, ConfirmationService } from 'primeng/api';

export type ConfirmDialogOptions = Pick<
Confirmation,
'key' | 'message' | 'header' | 'icon' | 'acceptLabel' | 'rejectLabel' | 'accept' | 'reject' | 'acceptButtonProps'
>;

export function provideConfirmDialog(): Provider[] {
return [ConfirmationService, ConfirmDialogService];
}

@Injectable()
export class ConfirmDialogService {
constructor(private readonly confirmationService: ConfirmationService) {}

confirm(options: ConfirmDialogOptions): void {
this.confirmationService.confirm(options);
}
}
7 changes: 7 additions & 0 deletions src/lib/components/confirm-dialog/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "public_api.ts"
}
}

2 changes: 2 additions & 0 deletions src/lib/components/confirm-dialog/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './confirm-dialog.component';
export * from './confirm-dialog.service';
7 changes: 7 additions & 0 deletions src/lib/components/stepper/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "public_api.ts"
}
}

4 changes: 4 additions & 0 deletions src/lib/components/stepper/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './stepper.component';



114 changes: 114 additions & 0 deletions src/lib/components/stepper/stepper.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { NgClass } from '@angular/common';
import { Stepper } from 'primeng/stepper';
import { StepList } from 'primeng/stepper';
import { Step } from 'primeng/stepper';
import { StepPanels } from 'primeng/stepper';
import { StepPanel } from 'primeng/stepper';
import { StepItem } from 'primeng/stepper';
import { ExtraButtonComponent } from '../button/button.component';

export interface ExtraStepperItem {
value: number | undefined;
label: string;
caption?: string;
content?: string;
disabled?: boolean;
invalid?: boolean;
}

@Component({
selector: 'extra-stepper',
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [Stepper, StepList, Step, StepPanels, StepPanel, StepItem, ExtraButtonComponent, NgClass],
template: `
<p-stepper
[value]="value"
[linear]="linear"
(valueChange)="onValueChange($event)"
>
@if (orientation === 'horizontal') {
<p-step-list>
@for (step of steps; track step.value) {
<p-step
[value]="step.value"
[disabled]="step.disabled || false"
[ngClass]="{ 'step-invalid': step.invalid }"
>
{{ step.label }}
@if (step.caption) {
<div class="caption-secondary">{{ step.caption }}</div>
}
</p-step>
}
</p-step-list>
}
@if (orientation === 'horizontal' && showPanels) {
<p-step-panels>
@for (step of steps; track step.value; let i = $index; let first = $first; let last = $last) {
<p-step-panel [value]="step.value">
<ng-template #content let-activateCallback="activateCallback">
<p class="m-0">{{ step.content }}</p>
<div class="flex pt-4">
@if (!first) {
<extra-button label="Назад" variant="outlined" (click)="activateCallback(steps[i - 1].value)"></extra-button>
}
@if (!last) {
<extra-button label="Вперёд" variant="secondary" class="ml-auto" [disabled]="!!step.invalid" (click)="activateCallback(steps[i + 1].value)"></extra-button>
}
</div>
</ng-template>
</p-step-panel>
}
</p-step-panels>
}

@if (orientation === 'vertical') {
@for (step of steps; track step.value; let i = $index; let first = $first; let last = $last) {
<p-step-item [value]="step.value">
<p-step
[value]="step.value"
[disabled]="step.disabled || false"
[ngClass]="{ 'step-invalid': step.invalid }"
>
{{ step.label }}
@if (step.caption) {
<div class="caption-secondary">{{ step.caption }}</div>
}
</p-step>
@if (showPanels) {
<p-step-panel [value]="step.value">
<ng-template #content let-activateCallback="activateCallback">
<p class="m-0">{{ step.content }}</p>
<div class="flex gap-2 pt-4">
@if (!first) {
<extra-button label="Назад" variant="outlined" (click)="activateCallback(steps[i - 1].value)"></extra-button>
}
@if (!last) {
<extra-button label="Вперёд" variant="secondary" [disabled]="!!step.invalid" (click)="activateCallback(steps[i + 1].value)"></extra-button>
}
</div>
</ng-template>
</p-step-panel>
}
</p-step-item>
}
}
</p-stepper>
`,
})
export class ExtraStepperComponent {
@Input() value: number | undefined = 1;
@Input() steps: ExtraStepperItem[] = [];
@Input() linear = false;
@Input() orientation: 'horizontal' | 'vertical' = 'horizontal';
@Input() showPanels = true;

@Output() valueChange = new EventEmitter<number | undefined>();

onValueChange(newValue: number | undefined): void {
this.value = newValue;
this.valueChange.emit(newValue);
}
}
Loading
Loading