@snabcentr/client-ui 1.0.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/auth/sign-up-form/sc-sign-up-form.component.d.ts +7 -1
- package/brands-list/index.d.ts +2 -0
- package/brands-list/sc-brands-list.component.d.ts +15 -0
- package/brands-list/sc-brands-list.module.d.ts +12 -0
- package/contragents/new-contragent-form/sc-new-contragent-form.component.d.ts +5 -1
- package/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.d.ts +48 -4
- package/delivery-address/sc-delivery-address.module.d.ts +2 -1
- package/esm2020/auth/sign-up-form/sc-sign-up-form.component.mjs +38 -6
- package/esm2020/brands-list/index.mjs +3 -0
- package/esm2020/brands-list/sc-brands-list.component.mjs +24 -0
- package/esm2020/brands-list/sc-brands-list.module.mjs +22 -0
- package/esm2020/contacts/new-contact-form/sc-new-contact-form.component.mjs +1 -1
- package/esm2020/contragents/add-contragent-dialog/sc-add-contragent-dialog.component.mjs +1 -1
- package/esm2020/contragents/new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component.mjs +1 -1
- package/esm2020/contragents/new-contragent-form/sc-new-contragent-form.component.mjs +15 -5
- package/esm2020/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.mjs +97 -11
- package/esm2020/delivery-address/sc-delivery-address.module.mjs +18 -5
- package/esm2020/form-fields/suggestion-field/sc-suggestion-field.component.mjs +10 -3
- package/esm2020/public-api.mjs +2 -1
- package/esm2020/user/update-user-info-dialog/sc-update-user-info-dialog.component.mjs +1 -1
- package/fesm2015/snabcentr-client-ui.mjs +205 -21
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +201 -21
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/form-fields/suggestion-field/sc-suggestion-field.component.d.ts +6 -2
- package/package.json +2 -1
- package/public-api.d.ts +1 -0
- package/styles/tailwind/tailwind.scss +86 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
import { OnInit } from '@angular/core';
|
2
2
|
import { FormArray, FormControl, FormGroup } from '@angular/forms';
|
3
|
-
import { ScAuthService, ScConvertersService, ScIReferencesTypes, ScISuggestionType, ScOpfList, ScReferencesService, ScUserMetrikaService, ScUserService } from '@snabcentr/client-core';
|
3
|
+
import { ScAuthService, ScConvertersService, ScIReferencesTypes, ScISuggestionType, ScOpfList, ScReferencesService, ScSuggestion, ScUserMetrikaService, ScUserService } from '@snabcentr/client-core';
|
4
4
|
import { Observable, Subject } from 'rxjs';
|
5
5
|
import { ScContactFormGroup } from '../interfaces';
|
6
6
|
import * as i0 from "@angular/core";
|
@@ -126,6 +126,12 @@ export declare class ScSignUpFormComponent implements OnInit {
|
|
126
126
|
* Создаёт группу полей контактного лица.
|
127
127
|
*/
|
128
128
|
createContactGroup(): ScContactFormGroup;
|
129
|
+
/**
|
130
|
+
* Обработчик выбора адреса доставки.
|
131
|
+
*
|
132
|
+
* @param suggestion Объект подсказки ареса.
|
133
|
+
*/
|
134
|
+
onSelectedOrganization(suggestion: ScSuggestion): void;
|
129
135
|
/**
|
130
136
|
* Добавляет контактное лицо контрагента.
|
131
137
|
*/
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
/**
|
3
|
+
* Компонент списка брэндов.
|
4
|
+
*/
|
5
|
+
export declare class ScBrandsListComponent {
|
6
|
+
/**
|
7
|
+
* Список элементов брендов.
|
8
|
+
*/
|
9
|
+
items: Array<{
|
10
|
+
src: string;
|
11
|
+
alt: string;
|
12
|
+
}>;
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScBrandsListComponent, never>;
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScBrandsListComponent, "sc-brands-list", never, { "items": "items"; }, {}, never, never, false>;
|
15
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./sc-brands-list.component";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
import * as i3 from "@taiga-ui/cdk";
|
5
|
+
/**
|
6
|
+
* Модуль списка брэндов.
|
7
|
+
*/
|
8
|
+
export declare class ScBrandsListModule {
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScBrandsListModule, never>;
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ScBrandsListModule, [typeof i1.ScBrandsListComponent], [typeof i2.CommonModule, typeof i3.TuiRepeatTimesModule], [typeof i1.ScBrandsListComponent]>;
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ScBrandsListModule>;
|
12
|
+
}
|
@@ -11,6 +11,10 @@ export declare class ScNewContragentFormComponent implements OnInit, OnDestroy {
|
|
11
11
|
private readonly referencesService;
|
12
12
|
private readonly locationsService;
|
13
13
|
private readonly formGroupDirective;
|
14
|
+
/**
|
15
|
+
* Поле выбора организационно-правовой формы.
|
16
|
+
*/
|
17
|
+
opfControl?: FormControl<keyof typeof ScOpfList | null>;
|
14
18
|
/**
|
15
19
|
* Группа полей информации о контрагенте индивидуальном предпринимателе.
|
16
20
|
*/
|
@@ -103,5 +107,5 @@ export declare class ScNewContragentFormComponent implements OnInit, OnDestroy {
|
|
103
107
|
*/
|
104
108
|
getCountriesById$(countryId: number): Observable<ScICountry | undefined>;
|
105
109
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScNewContragentFormComponent, [null, null, { skipSelf: true; }]>;
|
106
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ScNewContragentFormComponent, "sc-new-contragent-form", never, {}, {}, never, never, false>;
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScNewContragentFormComponent, "sc-new-contragent-form", never, { "opfControl": "opfControl"; }, {}, never, never, false>;
|
107
111
|
}
|
package/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.d.ts
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
import { AfterViewInit } from '@angular/core';
|
2
2
|
import { FormControl, FormGroup } from '@angular/forms';
|
3
|
-
import { ScConvertersService, ScDeliveryAddressService, ScISuggestionType, ScUserMetrikaService } from '@snabcentr/client-core';
|
3
|
+
import { ScConvertersService, ScDeliveryAddressService, ScISuggestionAddress, ScISuggestionType, ScSuggestion, ScUserMetrikaService } from '@snabcentr/client-core';
|
4
4
|
import { TuiDialogContext } from '@taiga-ui/core';
|
5
|
+
import { YaReadyEvent } from 'angular8-yandex-maps';
|
5
6
|
import { Observable, Subject } from 'rxjs';
|
6
7
|
import * as i0 from "@angular/core";
|
7
8
|
/**
|
8
9
|
* Компонент добавления адреса доставки.
|
9
|
-
*
|
10
|
-
* TODO: TASK[8813] Добавить карту, и поведение выбора адреса доставки через карту. При этом вынести форму в отдельный компонент AddDeliveryAddressForm или submit логику в директиву.
|
11
10
|
*/
|
12
11
|
export declare class ScAddDeliveryAddressDialogComponent implements AfterViewInit {
|
13
12
|
private readonly deliveryAddressService;
|
@@ -34,11 +33,23 @@ export declare class ScAddDeliveryAddressDialogComponent implements AfterViewIni
|
|
34
33
|
* {@link Observable} изменения состояния загрузки данных.
|
35
34
|
*/
|
36
35
|
readonly loading$: Observable<boolean>;
|
36
|
+
/**
|
37
|
+
* Группа с полями адресов.
|
38
|
+
*/
|
39
|
+
addressControl: FormControl<ScISuggestionAddress | string | null>;
|
40
|
+
/**
|
41
|
+
* Настройки карты.
|
42
|
+
*/
|
43
|
+
options: ymaps.IMapOptions;
|
37
44
|
/**
|
38
45
|
* Форма для создания адреса доставки.
|
39
46
|
*/
|
40
47
|
readonly form: FormGroup<{
|
41
|
-
address: FormControl<string | null>;
|
48
|
+
address: FormControl<string | ScISuggestionAddress | null>;
|
49
|
+
coordinates: FormGroup<{
|
50
|
+
lat: FormControl<number | null>;
|
51
|
+
long: FormControl<number | null>;
|
52
|
+
}>;
|
42
53
|
contact: FormGroup<{
|
43
54
|
name: FormControl<string | null>;
|
44
55
|
phone: FormControl<string | null>;
|
@@ -46,6 +57,14 @@ export declare class ScAddDeliveryAddressDialogComponent implements AfterViewIni
|
|
46
57
|
position: FormControl<string | null>;
|
47
58
|
}>;
|
48
59
|
}>;
|
60
|
+
/**
|
61
|
+
* Точка адреса на карте.
|
62
|
+
*/
|
63
|
+
addressPlacemark?: ymaps.Placemark;
|
64
|
+
/**
|
65
|
+
* Яндекс карта.
|
66
|
+
*/
|
67
|
+
yaMap?: ymaps.Map;
|
49
68
|
/**
|
50
69
|
* Инициализирует экземпляр класса {@link ScAddDeliveryAddressDialogComponent}.
|
51
70
|
*
|
@@ -57,6 +76,31 @@ export declare class ScAddDeliveryAddressDialogComponent implements AfterViewIni
|
|
57
76
|
constructor(deliveryAddressService: ScDeliveryAddressService, userMetrikaService: ScUserMetrikaService, context: TuiDialogContext<void, void>, convertersService: ScConvertersService);
|
58
77
|
/** @inheritdoc */
|
59
78
|
ngAfterViewInit(): void;
|
79
|
+
/**
|
80
|
+
* Обработчик загрузки карты на странице.
|
81
|
+
*
|
82
|
+
* @param target Экземпляр целевого объекта.
|
83
|
+
* @param target.target
|
84
|
+
*/
|
85
|
+
onMapReadyHandle({ target }: YaReadyEvent<ymaps.Map>): void;
|
86
|
+
/**
|
87
|
+
* Обработчик выбора адреса доставки.
|
88
|
+
*
|
89
|
+
* @param suggestion Объект подсказки ареса.
|
90
|
+
*/
|
91
|
+
onSelectedAddress(suggestion: ScSuggestion): void;
|
92
|
+
/**
|
93
|
+
* Устанавливает {@link addressPlacemark} точку на определённые координаты.
|
94
|
+
*
|
95
|
+
* @param coords Координаты точки.
|
96
|
+
*/
|
97
|
+
private setGeoCoordinates;
|
98
|
+
/**
|
99
|
+
* Создаёт объект точки и устанавливает события для него.
|
100
|
+
*
|
101
|
+
* @param coords Координаты точки.
|
102
|
+
*/
|
103
|
+
private createPlacemark;
|
60
104
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScAddDeliveryAddressDialogComponent, never>;
|
61
105
|
static ɵcmp: i0.ɵɵComponentDeclaration<ScAddDeliveryAddressDialogComponent, "sc-add-delivery-address-dialog", never, {}, {}, never, never, false>;
|
62
106
|
}
|
@@ -10,11 +10,12 @@ import * as i8 from "../contacts/sc-contacts.module";
|
|
10
10
|
import * as i9 from "@angular/forms";
|
11
11
|
import * as i10 from "@taiga-ui/kit";
|
12
12
|
import * as i11 from "../form-fields/form-fields.module";
|
13
|
+
import * as i12 from "angular8-yandex-maps";
|
13
14
|
/**
|
14
15
|
* Модуль для отображение адресов доставки разделами, с возможностью скрывать и отображать содержимое.
|
15
16
|
*/
|
16
17
|
export declare class ScDeliveryAddressModule {
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScDeliveryAddressModule, never>;
|
18
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ScDeliveryAddressModule, [typeof i1.ScDeliveryAddressAccordionComponent, typeof i2.ScDeliveryAddressAccordionItemComponent, typeof i3.ScAddDeliveryAddressDialogComponent], [typeof i4.CommonModule, typeof i5.ScAccordionModule, typeof i6.TuiButtonModule, typeof i6.TuiLoaderModule, typeof i7.TuiLetModule, typeof i6.TuiNotificationModule, typeof i8.ScContactsModule, typeof i9.FormsModule, typeof i9.ReactiveFormsModule, typeof i6.TuiLabelModule, typeof i10.TuiFieldErrorPipeModule, typeof i6.TuiErrorModule, typeof i10.TuiInputModule, typeof i10.TuiInputPhoneModule, typeof i11.ScFormFieldsModule], [typeof i1.ScDeliveryAddressAccordionComponent, typeof i3.ScAddDeliveryAddressDialogComponent]>;
|
19
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ScDeliveryAddressModule, [typeof i1.ScDeliveryAddressAccordionComponent, typeof i2.ScDeliveryAddressAccordionItemComponent, typeof i3.ScAddDeliveryAddressDialogComponent], [typeof i4.CommonModule, typeof i5.ScAccordionModule, typeof i6.TuiButtonModule, typeof i6.TuiLoaderModule, typeof i7.TuiLetModule, typeof i6.TuiNotificationModule, typeof i8.ScContactsModule, typeof i9.FormsModule, typeof i9.ReactiveFormsModule, typeof i6.TuiLabelModule, typeof i10.TuiFieldErrorPipeModule, typeof i6.TuiErrorModule, typeof i10.TuiInputModule, typeof i10.TuiInputPhoneModule, typeof i11.ScFormFieldsModule, typeof i6.TuiDataListModule, typeof i12.AngularYandexMapsModule, typeof i10.TuiElasticContainerModule], [typeof i1.ScDeliveryAddressAccordionComponent, typeof i3.ScAddDeliveryAddressDialogComponent]>;
|
19
20
|
static ɵinj: i0.ɵɵInjectorDeclaration<ScDeliveryAddressModule>;
|
20
21
|
}
|