@snabcentr/client-ui 0.14.3 → 0.15.2
Sign up to get free protection for your applications and to get access to all the features.
- package/accordion/sc-accordion.component.d.ts +9 -0
- package/auth/index.d.ts +0 -1
- package/catalog/input-quantity/sc-input-quantity.component.d.ts +3 -0
- package/contacts/add-contact-dialog/sc-add-contact-dialog.component.d.ts +44 -0
- package/contacts/contacts-accordion/sc-contacts-accordion.component.d.ts +3 -3
- package/contacts/index.d.ts +2 -2
- package/contacts/new-contact-form/sc-new-contact-form.component.d.ts +23 -0
- package/contacts/sc-contacts.module.d.ts +3 -3
- package/{contacts → contragents}/add-contragent-bank-account-dialog/sc-add-contragent-bank-account-dialog.component.d.ts +1 -1
- package/contragents/add-contragent-dialog/sc-add-contragent-dialog.component.d.ts +147 -0
- package/contragents/contragents-accordion/contragents-accordion-item/sc-contragents-accordion-item.component.d.ts +24 -6
- package/contragents/contragents-accordion/sc-contragents-accordion.component.d.ts +19 -8
- package/contragents/index.d.ts +4 -0
- package/contragents/new-contragent-form/sc-new-contragent-form.component.d.ts +100 -0
- package/contragents/sc-contragents.module.d.ts +15 -6
- package/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.d.ts +53 -0
- package/delivery-address/delivery-address-accordion/delivery-address-accordion-item/sc-delivery-address-accordion-item.component.d.ts +23 -5
- package/delivery-address/delivery-address-accordion/sc-delivery-address-accordion.component.d.ts +17 -2
- package/delivery-address/index.d.ts +1 -0
- package/delivery-address/sc-delivery-address.module.d.ts +10 -6
- package/directives/carousel-item-hidden/sc-carousel-item-hidden.directive.d.ts +24 -0
- package/directives/carousel-item-hidden/sc-carousel-item-hidden.module.d.ts +11 -0
- package/directives/index.d.ts +2 -0
- package/esm2020/accordion/sc-accordion.component.mjs +14 -4
- package/esm2020/auth/index.mjs +1 -2
- package/esm2020/catalog/input-quantity/sc-input-quantity.component.mjs +6 -1
- package/esm2020/contacts/add-contact-dialog/sc-add-contact-dialog.component.mjs +71 -0
- package/esm2020/contacts/contacts-accordion/sc-contacts-accordion.component.mjs +6 -6
- package/esm2020/contacts/index.mjs +3 -3
- package/esm2020/contacts/new-contact-form/sc-new-contact-form.component.mjs +28 -0
- package/esm2020/contacts/sc-contacts.module.mjs +7 -7
- package/esm2020/contragents/add-contragent-bank-account-dialog/sc-add-contragent-bank-account-dialog.component.mjs +71 -0
- package/esm2020/contragents/add-contragent-dialog/sc-add-contragent-dialog.component.mjs +249 -0
- package/esm2020/contragents/contragents-accordion/contragents-accordion-item/sc-contragents-accordion-item.component.mjs +32 -11
- package/esm2020/contragents/contragents-accordion/sc-contragents-accordion.component.mjs +24 -12
- package/esm2020/contragents/index.mjs +5 -1
- package/esm2020/contragents/new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component.mjs +61 -0
- package/esm2020/contragents/new-contragent-form/sc-new-contragent-form.component.mjs +183 -0
- package/esm2020/contragents/sc-contragents.module.mjs +84 -7
- package/esm2020/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.mjs +79 -0
- package/esm2020/delivery-address/delivery-address-accordion/delivery-address-accordion-item/sc-delivery-address-accordion-item.component.mjs +28 -8
- package/esm2020/delivery-address/delivery-address-accordion/sc-delivery-address-accordion.component.mjs +21 -3
- package/esm2020/delivery-address/index.mjs +2 -1
- package/esm2020/delivery-address/sc-delivery-address.module.mjs +58 -7
- package/esm2020/directives/carousel-item-hidden/sc-carousel-item-hidden.directive.mjs +40 -0
- package/esm2020/directives/carousel-item-hidden/sc-carousel-item-hidden.module.mjs +21 -0
- package/esm2020/directives/index.mjs +3 -0
- package/esm2020/masks/index.mjs +5 -1
- package/esm2020/masks/sc-inn-mask.mjs +13 -0
- package/esm2020/masks/sc-kpp-mask.mjs +7 -0
- package/esm2020/masks/sc-okpo-mask.mjs +13 -0
- package/esm2020/masks/sc-phone-verification-code-mask.mjs +7 -0
- package/esm2020/profile/sc-profile-accordions-content/sc-profile-accordions-content.component.mjs +67 -8
- package/esm2020/profile/sc-profile.module.mjs +8 -4
- package/esm2020/public-api.mjs +2 -1
- package/esm2020/user/reset-user-password/sc-reset-user-password.component.mjs +24 -18
- package/esm2020/verification/verification-phone-check-form/sc-verification-phone-check-form.component.mjs +3 -3
- package/fesm2015/snabcentr-client-ui.mjs +1176 -264
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +1155 -262
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/masks/index.d.ts +4 -0
- package/masks/sc-inn-mask.d.ts +9 -0
- package/masks/sc-kpp-mask.d.ts +5 -0
- package/masks/sc-okpo-mask.d.ts +9 -0
- package/{auth/constants/phone-approve-code-mask.d.ts → masks/sc-phone-verification-code-mask.d.ts} +1 -1
- package/package.json +2 -2
- package/profile/sc-profile-accordions-content/sc-profile-accordions-content.component.d.ts +50 -4
- package/profile/sc-profile.module.d.ts +2 -1
- package/public-api.d.ts +1 -0
- package/styles/tailwind/tailwind.scss +30 -6
- package/user/reset-user-password/sc-reset-user-password.component.d.ts +11 -3
- package/esm2020/auth/constants/phone-approve-code-mask.mjs +0 -7
- package/esm2020/contacts/add-contragent-bank-account-dialog/sc-add-contragent-bank-account-dialog.component.mjs +0 -72
- package/esm2020/contacts/new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component.mjs +0 -61
- /package/{contacts → contragents}/new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component.d.ts +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
2
2
|
import { ScAccordionContentDirective } from './sc-accordion-content.directive';
|
3
3
|
import { TuiSizeS } from '@taiga-ui/core';
|
4
|
+
import { TuiAccordionItemComponent } from '@taiga-ui/kit';
|
4
5
|
import * as i0 from "@angular/core";
|
5
6
|
/**
|
6
7
|
* Компонент, позволяющий отображать и скрывать содержимое в разделах.
|
@@ -30,6 +31,10 @@ export declare class ScAccordionComponent {
|
|
30
31
|
* Дочерний элемент контента.
|
31
32
|
*/
|
32
33
|
protected readonly content?: ScAccordionContentDirective;
|
34
|
+
/**
|
35
|
+
* Ссылка на шаблон превью-просмотра в разметке.
|
36
|
+
*/
|
37
|
+
readonly accordion?: TuiAccordionItemComponent;
|
33
38
|
/**
|
34
39
|
* Событие нажатия на кнопку добавления.
|
35
40
|
*/
|
@@ -38,6 +43,10 @@ export declare class ScAccordionComponent {
|
|
38
43
|
* Событие нажатия на кнопку удаления.
|
39
44
|
*/
|
40
45
|
deleteButtonClick: EventEmitter<void>;
|
46
|
+
/**
|
47
|
+
* Закрывает акордион.
|
48
|
+
*/
|
49
|
+
close(): void;
|
41
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScAccordionComponent, never>;
|
42
51
|
static ɵcmp: i0.ɵɵComponentDeclaration<ScAccordionComponent, "sc-accordion", never, { "showAddButton": "showAddButton"; "showDeleteButton": "showDeleteButton"; "showArrow": "showArrow"; "open": "open"; "size": "size"; }, { "addButtonClick": "addButtonClick"; "deleteButtonClick": "deleteButtonClick"; }, ["content"], ["*"], false>;
|
43
52
|
}
|
package/auth/index.d.ts
CHANGED
@@ -3,5 +3,4 @@ export * from './sc-sign-in-form/sc-sign-in-form-by-email/sc-sign-in-form-by-ema
|
|
3
3
|
export * from './sc-sign-in-form/sc-sign-in-form-by-phone/sc-sign-in-form-by-phone.component';
|
4
4
|
export * from './enums/auth-method';
|
5
5
|
export * from './interfaces/ApiErrorResponse';
|
6
|
-
export * from './constants/phone-approve-code-mask';
|
7
6
|
export * from './sc-auth.module';
|
@@ -3,6 +3,9 @@ import { FormControl, NgControl } from '@angular/forms';
|
|
3
3
|
import { TuiSizeL, TuiSizeM, TuiSizeS } from '@taiga-ui/core';
|
4
4
|
import { AbstractTuiNullableControl, AbstractTuiValueTransformer } from '@taiga-ui/cdk';
|
5
5
|
import * as i0 from "@angular/core";
|
6
|
+
/**
|
7
|
+
* Компонент поля ввода количества.
|
8
|
+
*/
|
6
9
|
export declare class ScInputQuantityComponent extends AbstractTuiNullableControl<number> implements OnInit {
|
7
10
|
/**
|
8
11
|
* Компонент поля ввода.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { FormGroup, FormControl } from '@angular/forms';
|
2
|
+
import { ScIContactOnDataCreate, ScContactsService, ScIContactWithRelations, ScConvertersService, ScIContactBase } from '@snabcentr/client-core';
|
3
|
+
import { Observable, Subject } from 'rxjs';
|
4
|
+
import { TuiDialogContext } from '@taiga-ui/core';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
/**
|
7
|
+
* Компонент формы создания нового контактного лица.
|
8
|
+
*/
|
9
|
+
export declare class ScAddContactDialogComponent {
|
10
|
+
private readonly contactsService;
|
11
|
+
readonly convertersService: ScConvertersService;
|
12
|
+
readonly context: TuiDialogContext<ScIContactWithRelations, Omit<ScIContactOnDataCreate, keyof ScIContactBase>>;
|
13
|
+
/**
|
14
|
+
* Группа с полями контактного лица.
|
15
|
+
*/
|
16
|
+
form: FormGroup<{
|
17
|
+
name: FormControl<string | null>;
|
18
|
+
phone: FormControl<string | null>;
|
19
|
+
email: FormControl<string | null>;
|
20
|
+
position: FormControl<string | null>;
|
21
|
+
}>;
|
22
|
+
/**
|
23
|
+
* {@link Subject} события отправки формы.
|
24
|
+
*/
|
25
|
+
readonly onSubmit: Subject<void>;
|
26
|
+
/**
|
27
|
+
* {@link Observable} запроса добавления контактного лица.
|
28
|
+
*/
|
29
|
+
private readonly request$;
|
30
|
+
/**
|
31
|
+
* {@link Observable} изменения состояния загрузки данных аутентификации по номеру телефона.
|
32
|
+
*/
|
33
|
+
readonly loading$: Observable<boolean>;
|
34
|
+
/**
|
35
|
+
* Инициализирует экземпляр класса {@link ScAddContactDialogComponent}.
|
36
|
+
*
|
37
|
+
* @param contactsService Сервис для работы с контактными лицами.
|
38
|
+
* @param convertersService Сервис конвертации данных.
|
39
|
+
* @param context Контекст диалогового окна, в котором открыт компонент.
|
40
|
+
*/
|
41
|
+
constructor(contactsService: ScContactsService, convertersService: ScConvertersService, context: TuiDialogContext<ScIContactWithRelations, Omit<ScIContactOnDataCreate, keyof ScIContactBase>>);
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScAddContactDialogComponent, never>;
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScAddContactDialogComponent, "sc-add-contact-dialog", never, {}, {}, never, never, false>;
|
44
|
+
}
|
@@ -15,9 +15,9 @@ export declare class ScContactsAccordionComponent {
|
|
15
15
|
*/
|
16
16
|
addContactClick: EventEmitter<void>;
|
17
17
|
/**
|
18
|
-
* Событие нажатия на кнопку
|
18
|
+
* Событие нажатия на кнопку удаления контактного лица.
|
19
19
|
*/
|
20
|
-
|
20
|
+
deleteButtonClick: EventEmitter<ScIContact>;
|
21
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScContactsAccordionComponent, never>;
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ScContactsAccordionComponent, "sc-contacts-accordion", never, { "contacts$": "contacts$"; }, { "addContactClick": "addContactClick"; "
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScContactsAccordionComponent, "sc-contacts-accordion", never, { "contacts$": "contacts$"; }, { "addContactClick": "addContactClick"; "deleteButtonClick": "deleteButtonClick"; }, never, never, false>;
|
23
23
|
}
|
package/contacts/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
export * from './contacts-accordion/sc-contacts-accordion.component';
|
2
|
-
export * from './add-
|
3
|
-
export * from './new-
|
2
|
+
export * from './add-contact-dialog/sc-add-contact-dialog.component';
|
3
|
+
export * from './new-contact-form/sc-new-contact-form.component';
|
4
4
|
export * from './sc-contacts.module';
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { FormGroup, FormControl } from '@angular/forms';
|
2
|
+
import { ScISuggestionType } from '@snabcentr/client-core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
/**
|
5
|
+
* Компонент формы контактного лица.
|
6
|
+
*/
|
7
|
+
export declare class ScNewContactFormComponent {
|
8
|
+
/**
|
9
|
+
* Перечисление типов подсказок.
|
10
|
+
*/
|
11
|
+
readonly suggestionType: typeof ScISuggestionType;
|
12
|
+
/**
|
13
|
+
* Группа с полями контактного лица.
|
14
|
+
*/
|
15
|
+
form: FormGroup<{
|
16
|
+
name: FormControl<string | null>;
|
17
|
+
phone: FormControl<string | null>;
|
18
|
+
email: FormControl<string | null>;
|
19
|
+
position: FormControl<string | null>;
|
20
|
+
}>;
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScNewContactFormComponent, never>;
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScNewContactFormComponent, "sc-new-contact-form", never, { "form": "form"; }, {}, never, never, false>;
|
23
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
import * as i1 from "./contacts-accordion/sc-contacts-accordion.component";
|
3
|
-
import * as i2 from "./new-
|
4
|
-
import * as i3 from "./add-
|
3
|
+
import * as i2 from "./new-contact-form/sc-new-contact-form.component";
|
4
|
+
import * as i3 from "./add-contact-dialog/sc-add-contact-dialog.component";
|
5
5
|
import * as i4 from "@angular/common";
|
6
6
|
import * as i5 from "@angular/forms";
|
7
7
|
import * as i6 from "../accordion/sc-accordion.module";
|
@@ -15,6 +15,6 @@ import * as i11 from "@taiga-ui/kit";
|
|
15
15
|
*/
|
16
16
|
export declare class ScContactsModule {
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScContactsModule, never>;
|
18
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ScContactsModule, [typeof i1.ScContactsAccordionComponent, typeof i2.
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ScContactsModule, [typeof i1.ScContactsAccordionComponent, typeof i2.ScNewContactFormComponent, typeof i3.ScAddContactDialogComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.ScAccordionModule, typeof i7.TuiButtonModule, typeof i7.TuiModeModule, typeof i7.TuiLoaderModule, typeof i8.TuiLetModule, typeof i7.TuiNotificationModule, typeof i7.TuiLinkModule, typeof i7.TuiFormatPhonePipeModule, typeof i9.ScFormFieldsModule, typeof i10.MaskitoModule, typeof i11.TuiFieldErrorPipeModule, typeof i11.TuiSelectModule, typeof i7.TuiDataListModule, typeof i11.TuiDataListWrapperModule, typeof i7.TuiLabelModule, typeof i11.TuiInputModule, typeof i11.TuiInputPhoneModule, typeof i7.TuiErrorModule], [typeof i1.ScContactsAccordionComponent, typeof i2.ScNewContactFormComponent, typeof i3.ScAddContactDialogComponent]>;
|
19
19
|
static ɵinj: i0.ɵɵInjectorDeclaration<ScContactsModule>;
|
20
20
|
}
|
@@ -26,7 +26,7 @@ export declare class ScAddContragentBankAccountsDialogComponent {
|
|
26
26
|
*/
|
27
27
|
readonly onSubmit: Subject<void>;
|
28
28
|
/**
|
29
|
-
* {@link Observable} запроса
|
29
|
+
* {@link Observable} запроса создания банковского счёта контрагента.
|
30
30
|
*/
|
31
31
|
private readonly request$;
|
32
32
|
/**
|
@@ -0,0 +1,147 @@
|
|
1
|
+
import { FormArray, FormControl, FormGroup } from '@angular/forms';
|
2
|
+
import { ScOpfList, ScReferencesService, ScContragentService, ScConvertersService, ScLocationsService, ScISalesDirection, ScIReferencesTypes, ScICurrency, ScICountry, ScContragent } from '@snabcentr/client-core';
|
3
|
+
import { TuiDialogContext } from '@taiga-ui/core';
|
4
|
+
import { Observable, Subject } from 'rxjs';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
/**
|
7
|
+
* Компотен добавления контрагента.
|
8
|
+
*/
|
9
|
+
export declare class ScAddContragentDialogComponent {
|
10
|
+
private readonly referencesService;
|
11
|
+
private readonly contragentService;
|
12
|
+
private readonly convertersService;
|
13
|
+
private readonly locationsService;
|
14
|
+
private readonly context;
|
15
|
+
/**
|
16
|
+
* Перечисление организационно-правовых форм.
|
17
|
+
*/
|
18
|
+
readonly opfListEnum: typeof ScOpfList;
|
19
|
+
/**
|
20
|
+
* Расположение баннера.
|
21
|
+
*/
|
22
|
+
stepIndex: number;
|
23
|
+
/**
|
24
|
+
* Родительская `FormGroup`.
|
25
|
+
*/
|
26
|
+
form: FormGroup<{
|
27
|
+
contragent: FormGroup<any>;
|
28
|
+
}>;
|
29
|
+
/**
|
30
|
+
* {@link Subject} события отправки формы.
|
31
|
+
*/
|
32
|
+
readonly onSubmit: Subject<void>;
|
33
|
+
/**
|
34
|
+
* {@link Observable} запроса добавления контрагента.
|
35
|
+
*/
|
36
|
+
private readonly request$;
|
37
|
+
/**
|
38
|
+
* {@link Observable} изменения состояния загрузки данных аутентификации по номеру телефона.
|
39
|
+
*/
|
40
|
+
readonly loading$: Observable<boolean>;
|
41
|
+
/**
|
42
|
+
* Текущий выбранный ОПФ.
|
43
|
+
*/
|
44
|
+
get selectOpf(): ScOpfList;
|
45
|
+
/**
|
46
|
+
* Список групп полей банковских реквизитов.
|
47
|
+
*/
|
48
|
+
get bankAccounts(): FormArray<ReturnType<ScAddContragentDialogComponent['createBankAccountGroup']>>;
|
49
|
+
/**
|
50
|
+
* Список групп полей контактных лиц.
|
51
|
+
*/
|
52
|
+
get contacts(): FormArray<ReturnType<ScAddContragentDialogComponent['createContactGroup']>>;
|
53
|
+
/**
|
54
|
+
* Инициализирует экземпляр класса {@link ScAddContragentDialogComponent}.
|
55
|
+
*
|
56
|
+
* @param referencesService Сервис справочников.
|
57
|
+
* @param contragentService Сервис работы с контрагентами.
|
58
|
+
* @param convertersService Сервис конвертации данных.
|
59
|
+
* @param context Контекст диалогового окна, в котором открыт компонент.
|
60
|
+
*/
|
61
|
+
constructor(referencesService: ScReferencesService, contragentService: ScContragentService, convertersService: ScConvertersService, locationsService: ScLocationsService, context: TuiDialogContext<ScContragent, void>);
|
62
|
+
/**
|
63
|
+
* Выполняет навигацию по форме создания контрагента.
|
64
|
+
*
|
65
|
+
* @param delta Значение, на которое необходимо выполнить навигацию.
|
66
|
+
*/
|
67
|
+
navigate(delta: number): void;
|
68
|
+
/**
|
69
|
+
* Проверяет, может ли пользователь перейти к следующему шагу создания контрагента.
|
70
|
+
*
|
71
|
+
* @returns Выводит значение `boolean` на основании {@link stepIndex}.
|
72
|
+
*/
|
73
|
+
canNextStep(): boolean;
|
74
|
+
/**
|
75
|
+
* Возвращает {@link Observable} списка направлений продаж.
|
76
|
+
*/
|
77
|
+
getSalesDirections$(): Observable<ScISalesDirection[]>;
|
78
|
+
/**
|
79
|
+
* Возвращает {@link Observable} списка направлений продаж.
|
80
|
+
*/
|
81
|
+
getDirectionById$(directionId: number): Observable<ScISalesDirection | undefined>;
|
82
|
+
/**
|
83
|
+
* Возвращает {@link Observable} список организационно-правовых форм.
|
84
|
+
*/
|
85
|
+
getOpf$(): Observable<ScIReferencesTypes<ScOpfList, typeof ScOpfList>[]>;
|
86
|
+
/**
|
87
|
+
* Возвращает {@link Observable} организационно-правовой формы, соответствующий символьному обозначению (slug) на входе.
|
88
|
+
*
|
89
|
+
* @param slug Символьное обозначение (slug).
|
90
|
+
*/
|
91
|
+
getOpfBySlug$(slug: keyof typeof ScOpfList): Observable<ScIReferencesTypes<ScOpfList, typeof ScOpfList> | undefined>;
|
92
|
+
/**
|
93
|
+
* Возвращает {@link Observable} списка валют.
|
94
|
+
*/
|
95
|
+
getCurrencies$(): Observable<ScICurrency[]>;
|
96
|
+
/**
|
97
|
+
* Возвращает {@link Observable} валюты, соответствующий идентификатору на входе.
|
98
|
+
*
|
99
|
+
* @param currencyId — Идентификатор валюты.
|
100
|
+
*/
|
101
|
+
getCurrencyById$(currencyId: number): Observable<ScICurrency | undefined>;
|
102
|
+
/**
|
103
|
+
* Возвращает {@link Observable} списка стран.
|
104
|
+
*/
|
105
|
+
getCountries$(): Observable<ScICountry[]>;
|
106
|
+
/**
|
107
|
+
* Возвращает {@link Observable} страны, соответствующий идентификатору на входе.
|
108
|
+
*
|
109
|
+
* @param countryId — Идентификатор страны.
|
110
|
+
*/
|
111
|
+
getCountriesById$(countryId: number): Observable<ScICountry | undefined>;
|
112
|
+
/**
|
113
|
+
* Создаёт группу полей банковских реквизитов.
|
114
|
+
*/
|
115
|
+
private createBankAccountGroup;
|
116
|
+
/**
|
117
|
+
* Добавляет Банковские реквизиты.
|
118
|
+
*/
|
119
|
+
addBankAccountGroup(): void;
|
120
|
+
/**
|
121
|
+
* Удаляет банковские реквизиты.
|
122
|
+
*
|
123
|
+
* @param index Индекс банковских реквизитов.
|
124
|
+
*/
|
125
|
+
removeBankAccountGroup(index: number): void;
|
126
|
+
/**
|
127
|
+
* Создаёт группу полей контактного лица.
|
128
|
+
*/
|
129
|
+
createContactGroup(): FormGroup<{
|
130
|
+
name: FormControl<string | null>;
|
131
|
+
phone: FormControl<string | null>;
|
132
|
+
email: FormControl<string | null>;
|
133
|
+
position: FormControl<string | null>;
|
134
|
+
}>;
|
135
|
+
/**
|
136
|
+
* Добавляет контактное лицо контрагента.
|
137
|
+
*/
|
138
|
+
addContactGroup(): void;
|
139
|
+
/**
|
140
|
+
* Удаляет контактное лицо контрагента.
|
141
|
+
*
|
142
|
+
* @param index Индекс контактного лица.
|
143
|
+
*/
|
144
|
+
removeContactGroup(index: number): void;
|
145
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScAddContragentDialogComponent, [null, null, null, null, { optional: true; }]>;
|
146
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScAddContragentDialogComponent, "sc-add-contragent-dialog", never, {}, {}, never, never, false>;
|
147
|
+
}
|
@@ -11,18 +11,29 @@ export declare class ScContragentsAccordionItemComponent implements OnInit {
|
|
11
11
|
* Контрагент пользователя.
|
12
12
|
*/
|
13
13
|
contragent: ScContragent;
|
14
|
+
/**
|
15
|
+
* Событие нажатия на кнопку удаления контрагента.
|
16
|
+
*/
|
17
|
+
deleteContragentClick: EventEmitter<ScContragent>;
|
14
18
|
/**
|
15
19
|
* Событие нажатия на кнопку добавления банковского счёта контрагенту.
|
16
20
|
*/
|
17
|
-
|
21
|
+
addContragentBankAccountClick: EventEmitter<ScContragent>;
|
22
|
+
/**
|
23
|
+
* Событие нажатия на кнопку удаления банковского счёта контрагента.
|
24
|
+
*/
|
25
|
+
deleteContragentBankAccountClick: EventEmitter<ScIBankAccount>;
|
18
26
|
/**
|
19
|
-
* Событие нажатия на кнопку
|
27
|
+
* Событие нажатия на кнопку добавления контактного лица контрагенту.
|
20
28
|
*/
|
21
|
-
|
29
|
+
addContragentContactClick: EventEmitter<ScContragent>;
|
22
30
|
/**
|
23
|
-
* Событие нажатия на кнопку
|
31
|
+
* Событие нажатия на кнопку удаления контактного лица у контрагента.
|
24
32
|
*/
|
25
|
-
|
33
|
+
deleteContragentContactClick: EventEmitter<{
|
34
|
+
contact: ScIContact;
|
35
|
+
contragent: ScContragent;
|
36
|
+
}>;
|
26
37
|
/**
|
27
38
|
* Список банковских счетов контрагента.
|
28
39
|
*/
|
@@ -39,6 +50,13 @@ export declare class ScContragentsAccordionItemComponent implements OnInit {
|
|
39
50
|
constructor(contragentService: ScContragentService);
|
40
51
|
/** @inheritDoc */
|
41
52
|
ngOnInit(): void;
|
53
|
+
/**
|
54
|
+
* Обработчик нажатия на кнопку удаления контактного лица у контрагента.
|
55
|
+
*
|
56
|
+
* @param contact Контактное лицо.
|
57
|
+
* @param contragent Контрагент.
|
58
|
+
*/
|
59
|
+
onDeleteContragentContactClick(contact: ScIContact, contragent: ScContragent): void;
|
42
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScContragentsAccordionItemComponent, never>;
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ScContragentsAccordionItemComponent, "sc-contragents-accordion-item", never, { "contragent": "contragent"; }, { "
|
61
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScContragentsAccordionItemComponent, "sc-contragents-accordion-item", never, { "contragent": "contragent"; }, { "deleteContragentClick": "deleteContragentClick"; "addContragentBankAccountClick": "addContragentBankAccountClick"; "deleteContragentBankAccountClick": "deleteContragentBankAccountClick"; "addContragentContactClick": "addContragentContactClick"; "deleteContragentContactClick": "deleteContragentContactClick"; }, never, never, false>;
|
44
62
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
2
|
-
import { ScContragent, ScContragentService } from '@snabcentr/client-core';
|
2
|
+
import { ScContragent, ScContragentService, ScIBankAccount, ScIContact } from '@snabcentr/client-core';
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
/**
|
@@ -12,21 +12,32 @@ export declare class ScContragentsAccordionComponent {
|
|
12
12
|
*/
|
13
13
|
contragents$: Observable<ScContragent[] | null>;
|
14
14
|
/**
|
15
|
-
* Событие нажатия на кнопку
|
15
|
+
* Событие нажатия на кнопку удаления контрагента.
|
16
16
|
*/
|
17
17
|
addContragentClick: EventEmitter<void>;
|
18
18
|
/**
|
19
|
-
* Событие нажатия на кнопку
|
19
|
+
* Событие нажатия на кнопку удаления контрагента.
|
20
20
|
*/
|
21
|
-
|
21
|
+
deleteContragentClick: EventEmitter<ScContragent>;
|
22
22
|
/**
|
23
23
|
* Событие нажатия на кнопку добавления банковского счёта контрагенту.
|
24
24
|
*/
|
25
|
-
|
25
|
+
addContragentBankAccountClick: EventEmitter<ScContragent>;
|
26
26
|
/**
|
27
|
-
* Событие нажатия на кнопку
|
27
|
+
* Событие нажатия на кнопку удаления банковского счёта контрагента.
|
28
28
|
*/
|
29
|
-
|
29
|
+
deleteContragentBankAccountClick: EventEmitter<ScIBankAccount>;
|
30
|
+
/**
|
31
|
+
* Событие нажатия на кнопку добавления контактного лица контрагенту.
|
32
|
+
*/
|
33
|
+
addContragentContactClick: EventEmitter<ScContragent>;
|
34
|
+
/**
|
35
|
+
* Событие нажатия на кнопку удаления контактного лица у контрагента.
|
36
|
+
*/
|
37
|
+
deleteContragentContactClick: EventEmitter<{
|
38
|
+
contact: ScIContact;
|
39
|
+
contragent: ScContragent;
|
40
|
+
}>;
|
30
41
|
/**
|
31
42
|
* Инициализирует экземпляр класса {@link ScContragentsAccordionComponent}.
|
32
43
|
*
|
@@ -34,5 +45,5 @@ export declare class ScContragentsAccordionComponent {
|
|
34
45
|
*/
|
35
46
|
constructor(contragentService: ScContragentService);
|
36
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScContragentsAccordionComponent, never>;
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ScContragentsAccordionComponent, "sc-contragents-accordion", never, {}, { "addContragentClick": "addContragentClick"; "
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScContragentsAccordionComponent, "sc-contragents-accordion", never, {}, { "addContragentClick": "addContragentClick"; "deleteContragentClick": "deleteContragentClick"; "addContragentBankAccountClick": "addContragentBankAccountClick"; "deleteContragentBankAccountClick": "deleteContragentBankAccountClick"; "addContragentContactClick": "addContragentContactClick"; "deleteContragentContactClick": "deleteContragentContactClick"; }, never, never, false>;
|
38
49
|
}
|
package/contragents/index.d.ts
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
export * from './add-contragent-bank-account-dialog/sc-add-contragent-bank-account-dialog.component';
|
2
|
+
export * from './add-contragent-dialog/sc-add-contragent-dialog.component';
|
1
3
|
export * from './contragents-accordion/contragents-accordion-item/sc-contragents-accordion-item.component';
|
2
4
|
export * from './contragents-accordion/sc-contragents-accordion.component';
|
5
|
+
export * from './new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component';
|
6
|
+
export * from './new-contragent-form/sc-new-contragent-form.component';
|
3
7
|
export * from './sc-contragents.module';
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
2
|
+
import { FormGroup, FormControl, FormArray, FormGroupDirective } from '@angular/forms';
|
3
|
+
import { ScOpfList, ScISuggestionType, ScReferencesService, ScLocationsService, ScISalesDirection, ScIReferencesTypes, ScICountry } from '@snabcentr/client-core';
|
4
|
+
import { Observable } from 'rxjs';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
/**
|
7
|
+
* Форма создания нового контрагента.
|
8
|
+
*/
|
9
|
+
export declare class ScNewContragentFormComponent implements OnInit, OnDestroy {
|
10
|
+
private readonly referencesService;
|
11
|
+
private readonly locationsService;
|
12
|
+
private readonly formGroupDirective;
|
13
|
+
/**
|
14
|
+
* Группа полей информации о контрагенте индивидуальном предпринимателе.
|
15
|
+
*/
|
16
|
+
private readonly entrepreneurGroup;
|
17
|
+
/**
|
18
|
+
* Группа полей информации о контрагенте юридическом лице.
|
19
|
+
*/
|
20
|
+
private readonly legalGroup;
|
21
|
+
/**
|
22
|
+
* Группа полей информации о контрагенте юридическом лице нерезиденте.
|
23
|
+
*/
|
24
|
+
private readonly nonResidentLegalGroup;
|
25
|
+
/**
|
26
|
+
* Форма для создания нового контрагента физического лица.
|
27
|
+
*/
|
28
|
+
readonly form: FormGroup<{
|
29
|
+
name: FormControl<string | null>;
|
30
|
+
opf: FormControl<"individual" | "entrepreneur" | "legal" | "non_resident_legal" | null>;
|
31
|
+
salesDirectionId: FormControl<number | null>;
|
32
|
+
contacts: FormArray<any>;
|
33
|
+
}>;
|
34
|
+
/**
|
35
|
+
* Перечисление типов подсказок.
|
36
|
+
*/
|
37
|
+
readonly suggestionType: typeof ScISuggestionType;
|
38
|
+
/**
|
39
|
+
* {@link Observable} выбора ОПФ.
|
40
|
+
*/
|
41
|
+
readonly selectOpf$: Observable<keyof typeof ScOpfList>;
|
42
|
+
/**
|
43
|
+
* Маска поля ввода ИНН.
|
44
|
+
*/
|
45
|
+
readonly innMask: (opf: keyof typeof ScOpfList) => import("@maskito/core").MaskitoOptions;
|
46
|
+
/**
|
47
|
+
* Маска поля ввода ОКПО.
|
48
|
+
*/
|
49
|
+
readonly okpoMask: (opf: keyof typeof ScOpfList) => import("@maskito/core").MaskitoOptions;
|
50
|
+
/**
|
51
|
+
* Маска поля ввода КПП.
|
52
|
+
*/
|
53
|
+
readonly kppMask: import("@maskito/core").MaskitoOptions;
|
54
|
+
/**
|
55
|
+
* Перечисление организационно-правовых форм.
|
56
|
+
*/
|
57
|
+
readonly opfListEnum: typeof ScOpfList;
|
58
|
+
/**
|
59
|
+
* Родительская `FormGroup`.
|
60
|
+
*/
|
61
|
+
get parentForm(): FormGroup<any> | undefined;
|
62
|
+
/**
|
63
|
+
* Инициализирует экземпляр класса {@link ScNewContragentFormComponent}.
|
64
|
+
*
|
65
|
+
* @param referencesService Сервис справочников.
|
66
|
+
* @param locationsService Сервис для получения списков стран, регионов, городов.
|
67
|
+
* @param formGroupDirective Директива c `FormGroup` из DOM.
|
68
|
+
*/
|
69
|
+
constructor(referencesService: ScReferencesService, locationsService: ScLocationsService, formGroupDirective: FormGroupDirective | null);
|
70
|
+
/** @inheritDoc */
|
71
|
+
ngOnInit(): void;
|
72
|
+
/** @inheritDoc */
|
73
|
+
ngOnDestroy(): void;
|
74
|
+
/**
|
75
|
+
* Возвращает {@link Observable} списка направлений продаж.
|
76
|
+
*/
|
77
|
+
getDirectionById$(directionId: number): Observable<ScISalesDirection | undefined>;
|
78
|
+
/**
|
79
|
+
* Возвращает {@link Observable} список организационно-правовых форм..
|
80
|
+
*/
|
81
|
+
getOpf$(): Observable<ScIReferencesTypes<ScOpfList, typeof ScOpfList>[]>;
|
82
|
+
/**
|
83
|
+
* Возвращает {@link Observable} организационно-правовой формы, соответствующий символьному обозначению (slug) на входе.
|
84
|
+
*
|
85
|
+
* @param slug Символьное обозначение (slug).
|
86
|
+
*/
|
87
|
+
getOpfBySlug$(slug: keyof typeof ScOpfList): Observable<ScIReferencesTypes<ScOpfList, typeof ScOpfList> | undefined>;
|
88
|
+
/**
|
89
|
+
* Возвращает {@link Observable} списка стран
|
90
|
+
*/
|
91
|
+
getCountries$(): Observable<ScICountry[]>;
|
92
|
+
/**
|
93
|
+
* Возвращает {@link Observable} страны по идентификатору.
|
94
|
+
*
|
95
|
+
* @param countryId — Идентификатор страны.
|
96
|
+
*/
|
97
|
+
getCountriesById$(countryId: number): Observable<ScICountry | undefined>;
|
98
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScNewContragentFormComponent, [null, null, { skipSelf: true; }]>;
|
99
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScNewContragentFormComponent, "sc-new-contragent-form", never, {}, {}, never, never, false>;
|
100
|
+
}
|
@@ -1,16 +1,25 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
import * as i1 from "./contragents-accordion/sc-contragents-accordion.component";
|
3
3
|
import * as i2 from "./contragents-accordion/contragents-accordion-item/sc-contragents-accordion-item.component";
|
4
|
-
import * as i3 from "
|
5
|
-
import * as i4 from "
|
6
|
-
import * as i5 from "
|
7
|
-
import * as i6 from "
|
8
|
-
import * as i7 from "
|
4
|
+
import * as i3 from "./new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component";
|
5
|
+
import * as i4 from "./add-contragent-bank-account-dialog/sc-add-contragent-bank-account-dialog.component";
|
6
|
+
import * as i5 from "./add-contragent-dialog/sc-add-contragent-dialog.component";
|
7
|
+
import * as i6 from "./new-contragent-form/sc-new-contragent-form.component";
|
8
|
+
import * as i7 from "@angular/forms";
|
9
|
+
import * as i8 from "@angular/common";
|
10
|
+
import * as i9 from "../accordion/sc-accordion.module";
|
11
|
+
import * as i10 from "@taiga-ui/core";
|
12
|
+
import * as i11 from "@taiga-ui/cdk";
|
13
|
+
import * as i12 from "../contacts/sc-contacts.module";
|
14
|
+
import * as i13 from "@taiga-ui/kit";
|
15
|
+
import * as i14 from "@maskito/angular";
|
16
|
+
import * as i15 from "../form-fields/form-fields.module";
|
17
|
+
import * as i16 from "../directives/carousel-item-hidden/sc-carousel-item-hidden.module";
|
9
18
|
/**
|
10
19
|
* Модуль для отображение контента разделами, с возможностью скрывать и отображать содержимое.
|
11
20
|
*/
|
12
21
|
export declare class ScContragentsModule {
|
13
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScContragentsModule, never>;
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ScContragentsModule, [typeof i1.ScContragentsAccordionComponent, typeof i2.ScContragentsAccordionItemComponent], [typeof
|
23
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ScContragentsModule, [typeof i1.ScContragentsAccordionComponent, typeof i2.ScContragentsAccordionItemComponent, typeof i3.ScNewContragentBankAccountsFormComponent, typeof i4.ScAddContragentBankAccountsDialogComponent, typeof i5.ScAddContragentDialogComponent, typeof i6.ScNewContragentFormComponent], [typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.CommonModule, typeof i9.ScAccordionModule, typeof i10.TuiButtonModule, typeof i10.TuiModeModule, typeof i10.TuiLoaderModule, typeof i11.TuiLetModule, typeof i10.TuiNotificationModule, typeof i12.ScContactsModule, typeof i13.TuiFieldErrorPipeModule, typeof i10.TuiErrorModule, typeof i13.TuiSelectModule, typeof i10.TuiDataListModule, typeof i13.TuiDataListWrapperModule, typeof i10.TuiLabelModule, typeof i13.TuiInputModule, typeof i13.TuiInputPhoneModule, typeof i14.MaskitoModule, typeof i15.ScFormFieldsModule, typeof i13.TuiElasticContainerModule, typeof i13.TuiCarouselModule, typeof i16.ScCarouselItemHiddenModule], [typeof i1.ScContragentsAccordionComponent, typeof i3.ScNewContragentBankAccountsFormComponent, typeof i4.ScAddContragentBankAccountsDialogComponent, typeof i5.ScAddContragentDialogComponent, typeof i6.ScNewContragentFormComponent]>;
|
15
24
|
static ɵinj: i0.ɵɵInjectorDeclaration<ScContragentsModule>;
|
16
25
|
}
|
package/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.d.ts
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
2
|
+
import { ScConvertersService, ScDeliveryAddressService, ScISuggestionType } from '@snabcentr/client-core';
|
3
|
+
import { TuiDialogContext } from '@taiga-ui/core';
|
4
|
+
import { Observable, Subject } from 'rxjs';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
/**
|
7
|
+
* Компонент добавления адреса доставки.
|
8
|
+
*
|
9
|
+
* TODO: TASK[8813] Добавить карту, и поведение выбора адреса доставки через карту. При этом вынести форму в отдельный компонент AddDeliveryAddressForm или submit логику в директиву.
|
10
|
+
*/
|
11
|
+
export declare class ScAddDeliveryAddressDialogComponent {
|
12
|
+
private readonly deliveryAddressService;
|
13
|
+
private readonly context;
|
14
|
+
private readonly convertersService;
|
15
|
+
/**
|
16
|
+
* Перечисление типов подсказок.
|
17
|
+
*/
|
18
|
+
readonly suggestionType: typeof ScISuggestionType;
|
19
|
+
/**
|
20
|
+
* {@link Subject} события отправки формы.
|
21
|
+
*/
|
22
|
+
readonly onSubmit$: Subject<void>;
|
23
|
+
/**
|
24
|
+
* {@link Observable} запроса данных добавления адрес доставки.
|
25
|
+
*/
|
26
|
+
private readonly request$;
|
27
|
+
/**
|
28
|
+
* {@link Observable} изменения состояния загрузки данных.
|
29
|
+
*/
|
30
|
+
readonly loading$: Observable<boolean>;
|
31
|
+
/**
|
32
|
+
* Форма для создания адреса доставки.
|
33
|
+
*/
|
34
|
+
readonly form: FormGroup<{
|
35
|
+
address: FormControl<string | null>;
|
36
|
+
contact: FormGroup<{
|
37
|
+
name: FormControl<string | null>;
|
38
|
+
phone: FormControl<string | null>;
|
39
|
+
email: FormControl<string | null>;
|
40
|
+
position: FormControl<string | null>;
|
41
|
+
}>;
|
42
|
+
}>;
|
43
|
+
/**
|
44
|
+
* Инициализирует экземпляр класса {@link ScAddDeliveryAddressDialogComponent}.
|
45
|
+
*
|
46
|
+
* @param deliveryAddressService Сервис работы с адресами доставки.
|
47
|
+
* @param context Контекст диалогового окна, в котором открыт компонент.
|
48
|
+
* @param convertersService Сервис конвертации данных.
|
49
|
+
*/
|
50
|
+
constructor(deliveryAddressService: ScDeliveryAddressService, context: TuiDialogContext<void, void>, convertersService: ScConvertersService);
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScAddDeliveryAddressDialogComponent, never>;
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScAddDeliveryAddressDialogComponent, "sc-add-delivery-address-dialog", never, {}, {}, never, never, false>;
|
53
|
+
}
|