@snabcentr/client-ui 0.21.0 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- package/contragents/add-contragent-dialog/sc-add-contragent-dialog.component.d.ts +15 -12
- package/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.d.ts +5 -1
- package/esm2020/contragents/add-contragent-dialog/sc-add-contragent-dialog.component.mjs +24 -15
- package/esm2020/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.mjs +20 -12
- package/fesm2015/snabcentr-client-ui.mjs +36 -19
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +36 -19
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/tailwind/tailwind.scss +4 -0
@@ -2597,6 +2597,7 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
2597
2597
|
* @param referencesService Сервис справочников.
|
2598
2598
|
* @param contragentService Сервис работы с контрагентами.
|
2599
2599
|
* @param convertersService Сервис конвертации данных.
|
2600
|
+
* @param locationsService
|
2600
2601
|
* @param context Контекст диалогового окна, в котором открыт компонент.
|
2601
2602
|
*/
|
2602
2603
|
constructor(referencesService, contragentService, convertersService, locationsService, context) {
|
@@ -2617,7 +2618,8 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
2617
2618
|
* Родительская `FormGroup`.
|
2618
2619
|
*/
|
2619
2620
|
this.form = new FormGroup({
|
2620
|
-
|
2621
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2622
|
+
contragent: new FormGroup({}),
|
2621
2623
|
});
|
2622
2624
|
/**
|
2623
2625
|
* {@link Subject} события отправки формы.
|
@@ -2627,11 +2629,16 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
2627
2629
|
* {@link Observable} запроса добавления контрагента.
|
2628
2630
|
*/
|
2629
2631
|
this.request$ = this.onSubmit.pipe(map(() => this.form.value.contragent), filter((value) => this.form.valid), switchMap((value) => {
|
2630
|
-
return this.contragentService.createContragent$(this.convertersService.removeNullRecursive(value)).pipe(tap((contragent) =>
|
2632
|
+
return this.contragentService.createContragent$(this.convertersService.removeNullRecursive(value)).pipe(tap((contragent) => {
|
2633
|
+
this.context.completeWith(contragent);
|
2634
|
+
}),
|
2635
|
+
// eslint-disable-next-line rxjs/no-implicit-any-catch
|
2636
|
+
catchError((error) => {
|
2631
2637
|
tuiMarkControlAsTouchedAndValidate(this.form);
|
2632
2638
|
const errorResponse = error.error;
|
2639
|
+
// eslint-disable-next-line no-restricted-syntax, guard-for-in
|
2633
2640
|
for (const key in errorResponse.errors) {
|
2634
|
-
this.form.controls.contragent.get(key)?.setErrors({ serverResponse: errorResponse.errors[
|
2641
|
+
this.form.controls.contragent.get(key)?.setErrors({ serverResponse: errorResponse.errors[key] });
|
2635
2642
|
}
|
2636
2643
|
if (!errorResponse.errors && errorResponse.message) {
|
2637
2644
|
this.form.setErrors({ serverResponse: [errorResponse.message] });
|
@@ -2679,10 +2686,10 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
2679
2686
|
switch (this.stepIndex) {
|
2680
2687
|
case 0:
|
2681
2688
|
for (const key in this.form.controls.contragent.controls) {
|
2682
|
-
if (Object.prototype.hasOwnProperty.call(this.form.controls.contragent.controls, key) &&
|
2683
|
-
|
2684
|
-
|
2685
|
-
|
2689
|
+
if (Object.prototype.hasOwnProperty.call(this.form.controls.contragent.controls, key) &&
|
2690
|
+
!Array.isArray(this.form.controls.contragent.controls[key].value) &&
|
2691
|
+
this.form.controls.contragent.controls[key].invalid) {
|
2692
|
+
return false;
|
2686
2693
|
}
|
2687
2694
|
}
|
2688
2695
|
return true;
|
@@ -2702,6 +2709,8 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
2702
2709
|
}
|
2703
2710
|
/**
|
2704
2711
|
* Возвращает {@link Observable} списка направлений продаж.
|
2712
|
+
*
|
2713
|
+
* @param directionId
|
2705
2714
|
*/
|
2706
2715
|
getDirectionById$(directionId) {
|
2707
2716
|
return this.referencesService.getDirectionById$(directionId);
|
@@ -2757,7 +2766,7 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
2757
2766
|
bic: new FormControl(null, [Validators.required, Validators.minLength(9), scBicValidator]),
|
2758
2767
|
accountNumber: new FormControl(null, [Validators.required, Validators.minLength(20)]),
|
2759
2768
|
correspondentAccount: new FormControl(null, [Validators.required, Validators.minLength(20), scCorrespondentAccountValidator]),
|
2760
|
-
currencyId: new FormControl(null, Validators.required)
|
2769
|
+
currencyId: new FormControl(null, Validators.required),
|
2761
2770
|
});
|
2762
2771
|
}
|
2763
2772
|
/**
|
@@ -2782,7 +2791,7 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
2782
2791
|
name: new FormControl(null, Validators.required),
|
2783
2792
|
phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
|
2784
2793
|
email: new FormControl(null, Validators.email),
|
2785
|
-
position: new FormControl(null)
|
2794
|
+
position: new FormControl(null),
|
2786
2795
|
});
|
2787
2796
|
}
|
2788
2797
|
/**
|
@@ -2801,13 +2810,13 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
2801
2810
|
}
|
2802
2811
|
};
|
2803
2812
|
ScAddContragentDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentDialogComponent, deps: [{ token: i1.ScReferencesService }, { token: i1.ScContragentService }, { token: i1.ScConvertersService }, { token: i1.ScLocationsService }, { token: POLYMORPHEUS_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
2804
|
-
ScAddContragentDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddContragentDialogComponent, selector: "sc-add-contragent-dialog", ngImport: i0, template: "<form
|
2813
|
+
ScAddContragentDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddContragentDialogComponent, selector: "sc-add-contragent-dialog", ngImport: i0, template: "<form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-4\"\n>\n <tui-elastic-container>\n <tui-carousel\n [(index)]=\"stepIndex\"\n [draggable]=\"false\"\n >\n <sc-new-contragent-form\n *tuiItem\n scCarouselItemHidden\n [index]=\"0\"\n ></sc-new-contragent-form>\n\n <div\n *tuiItem\n scCarouselItemHidden\n [index]=\"1\"\n >\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442 \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n [appearance]=\"'secondary'\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div\n *tuiItem\n scCarouselItemHidden\n [index]=\"2\"\n >\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n [appearance]=\"'secondary'\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </tui-carousel>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"stepIndex = (stepIndex - 1) % 3\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"stepIndex === 2 || (stepIndex === 1 && !form.controls.contragent.controls['bankAccounts']); else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n class=\"self-center\"\n >\n \u0421\u043E\u0437\u0434\u0430\u0442\u044C\n </button>\n <ng-template #nextIndexBtn>\n <div class=\"flex justify-center gap-8\">\n <button\n tuiButton\n (click)=\"context.$implicit.complete()\"\n type=\"button\"\n tuiMode=\"onLight\"\n appearance=\"secondary\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button\n tuiButton\n [disabled]=\"!canNextStep()\"\n type=\"button\"\n (click)=\"stepIndex = (stepIndex + 1) % 3\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </div>\n </ng-template>\n </div>\n</form>\n", styles: ["tui-carousel{--tui-carousel-padding: .5rem}\n"], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }, { kind: "component", type: i4$1.TuiCarouselComponent, selector: "tui-carousel", inputs: ["draggable", "itemsCount", "index"], outputs: ["indexChange"] }, { kind: "directive", type: i4$1.TuiCarouselDirective, selector: "tui-carousel", inputs: ["duration", "index"] }, { kind: "directive", type: i6.TuiItemDirective, selector: "[tuiItem]" }, { kind: "directive", type: ScCarouselItemHiddenDirective, selector: "[tuiItem], [scCarouselItemHidden]", inputs: ["index"] }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "component", type: ScNewContragentFormComponent, selector: "sc-new-contragent-form" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2805
2814
|
ScAddContragentDialogComponent = __decorate([
|
2806
2815
|
UntilDestroy({ checkProperties: true })
|
2807
2816
|
], ScAddContragentDialogComponent);
|
2808
2817
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentDialogComponent, decorators: [{
|
2809
2818
|
type: Component,
|
2810
|
-
args: [{ selector: 'sc-add-contragent-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form
|
2819
|
+
args: [{ selector: 'sc-add-contragent-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-4\"\n>\n <tui-elastic-container>\n <tui-carousel\n [(index)]=\"stepIndex\"\n [draggable]=\"false\"\n >\n <sc-new-contragent-form\n *tuiItem\n scCarouselItemHidden\n [index]=\"0\"\n ></sc-new-contragent-form>\n\n <div\n *tuiItem\n scCarouselItemHidden\n [index]=\"1\"\n >\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442 \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n [appearance]=\"'secondary'\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div\n *tuiItem\n scCarouselItemHidden\n [index]=\"2\"\n >\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n [appearance]=\"'secondary'\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </tui-carousel>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"stepIndex = (stepIndex - 1) % 3\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"stepIndex === 2 || (stepIndex === 1 && !form.controls.contragent.controls['bankAccounts']); else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n class=\"self-center\"\n >\n \u0421\u043E\u0437\u0434\u0430\u0442\u044C\n </button>\n <ng-template #nextIndexBtn>\n <div class=\"flex justify-center gap-8\">\n <button\n tuiButton\n (click)=\"context.$implicit.complete()\"\n type=\"button\"\n tuiMode=\"onLight\"\n appearance=\"secondary\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button\n tuiButton\n [disabled]=\"!canNextStep()\"\n type=\"button\"\n (click)=\"stepIndex = (stepIndex + 1) % 3\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </div>\n </ng-template>\n </div>\n</form>\n", styles: ["tui-carousel{--tui-carousel-padding: .5rem}\n"] }]
|
2811
2820
|
}], ctorParameters: function () { return [{ type: i1.ScReferencesService }, { type: i1.ScContragentService }, { type: i1.ScConvertersService }, { type: i1.ScLocationsService }, { type: undefined, decorators: [{
|
2812
2821
|
type: Optional
|
2813
2822
|
}, {
|
@@ -3405,6 +3414,10 @@ class ScAddDeliveryAddressDialogComponent {
|
|
3405
3414
|
this.deliveryAddressService = deliveryAddressService;
|
3406
3415
|
this.context = context;
|
3407
3416
|
this.convertersService = convertersService;
|
3417
|
+
/**
|
3418
|
+
* Признак того, отображается этот компонент на мобильном устройстве или нет.
|
3419
|
+
*/
|
3420
|
+
this.isMobile = inject(TUI_IS_MOBILE);
|
3408
3421
|
/**
|
3409
3422
|
* Перечисление типов подсказок.
|
3410
3423
|
*/
|
@@ -3416,16 +3429,20 @@ class ScAddDeliveryAddressDialogComponent {
|
|
3416
3429
|
/**
|
3417
3430
|
* {@link Observable} запроса данных добавления адрес доставки.
|
3418
3431
|
*/
|
3419
|
-
this.request$ = this.onSubmit$.pipe(tap(() =>
|
3432
|
+
this.request$ = this.onSubmit$.pipe(tap(() => {
|
3433
|
+
tuiMarkControlAsTouchedAndValidate(this.form);
|
3434
|
+
}), filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.deliveryAddressService.createDeliveryAddress$(this.convertersService.removeNullRecursive(value)).pipe(catchError((error) => {
|
3420
3435
|
const errorResponse = error.error;
|
3421
3436
|
for (const key in errorResponse.errors) {
|
3422
|
-
this.form.get(key)?.setErrors({ serverResponse: errorResponse.errors[
|
3437
|
+
this.form.get(key)?.setErrors({ serverResponse: errorResponse.errors[key] });
|
3423
3438
|
}
|
3424
3439
|
if (!errorResponse.errors && errorResponse.message) {
|
3425
3440
|
this.form.setErrors({ serverResponse: [errorResponse.message] });
|
3426
3441
|
}
|
3427
|
-
return of(
|
3428
|
-
}), tap(() =>
|
3442
|
+
return of();
|
3443
|
+
}), tap(() => {
|
3444
|
+
this.context.completeWith();
|
3445
|
+
}), startWith(null))), share());
|
3429
3446
|
/**
|
3430
3447
|
* {@link Observable} изменения состояния загрузки данных.
|
3431
3448
|
*/
|
@@ -3439,16 +3456,16 @@ class ScAddDeliveryAddressDialogComponent {
|
|
3439
3456
|
name: new FormControl(null, Validators.required),
|
3440
3457
|
phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
|
3441
3458
|
email: new FormControl(null, Validators.email),
|
3442
|
-
position: new FormControl(null)
|
3443
|
-
})
|
3459
|
+
position: new FormControl(null),
|
3460
|
+
}),
|
3444
3461
|
});
|
3445
3462
|
}
|
3446
3463
|
}
|
3447
3464
|
ScAddDeliveryAddressDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddDeliveryAddressDialogComponent, deps: [{ token: i1.ScDeliveryAddressService }, { token: POLYMORPHEUS_CONTEXT }, { token: i1.ScConvertersService }], target: i0.ɵɵFactoryTarget.Component });
|
3448
|
-
ScAddDeliveryAddressDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddDeliveryAddressDialogComponent, selector: "sc-add-delivery-address-dialog", ngImport: i0, template: "<form
|
3465
|
+
ScAddDeliveryAddressDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddDeliveryAddressDialogComponent, selector: "sc-add-delivery-address-dialog", ngImport: i0, template: "<form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit$.next()\"\n class=\"flex flex-col gap-3\"\n>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\">\n <tui-input formControlName=\"address\">\n \u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.address\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"address\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <div\n formGroupName=\"contact\"\n class=\"flex grow flex-col gap-2\"\n >\n <p class=\"w-full font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E:</p>\n <label tuiLabel=\"\u0424.\u0418.\u041E.\">\n <tui-input formControlName=\"name\">\n \u0424.\u0418.\u041E.\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.fio\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"email\">\n <input\n tuiTextfield\n type=\"email\"\n />\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C\">\n <tui-input formControlName=\"position\"> \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C </tui-input>\n <tui-error\n formControlName=\"position\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <div class=\"flex justify-center gap-8\">\n <button\n tuiButton\n (click)=\"context.$implicit.complete()\"\n type=\"button\"\n tuiMode=\"onLight\"\n [icon]=\"isMobile ? 'tuiIconX' : 'tuiIconXLarge'\"\n appearance=\"secondary\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button\n tuiButton\n [icon]=\"isMobile ? 'tuiIconSave' : 'tuiIconSaveLarge'\"\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4$1.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i4$1.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
3449
3466
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddDeliveryAddressDialogComponent, decorators: [{
|
3450
3467
|
type: Component,
|
3451
|
-
args: [{ selector: 'sc-add-delivery-address-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form
|
3468
|
+
args: [{ selector: 'sc-add-delivery-address-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit$.next()\"\n class=\"flex flex-col gap-3\"\n>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\">\n <tui-input formControlName=\"address\">\n \u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.address\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"address\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <div\n formGroupName=\"contact\"\n class=\"flex grow flex-col gap-2\"\n >\n <p class=\"w-full font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E:</p>\n <label tuiLabel=\"\u0424.\u0418.\u041E.\">\n <tui-input formControlName=\"name\">\n \u0424.\u0418.\u041E.\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.fio\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"email\">\n <input\n tuiTextfield\n type=\"email\"\n />\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C\">\n <tui-input formControlName=\"position\"> \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C </tui-input>\n <tui-error\n formControlName=\"position\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <div class=\"flex justify-center gap-8\">\n <button\n tuiButton\n (click)=\"context.$implicit.complete()\"\n type=\"button\"\n tuiMode=\"onLight\"\n [icon]=\"isMobile ? 'tuiIconX' : 'tuiIconXLarge'\"\n appearance=\"secondary\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button\n tuiButton\n [icon]=\"isMobile ? 'tuiIconSave' : 'tuiIconSaveLarge'\"\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C\n </button>\n </div>\n</form>\n" }]
|
3452
3469
|
}], ctorParameters: function () { return [{ type: i1.ScDeliveryAddressService }, { type: undefined, decorators: [{
|
3453
3470
|
type: Inject,
|
3454
3471
|
args: [POLYMORPHEUS_CONTEXT]
|