@snabcentr/client-ui 4.17.0 → 4.19.0
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/auth/sign-up-form/sc-sign-up-form.component.d.ts +6 -0
- package/contacts/sc-contacts.module.d.ts +5 -4
- package/contragents/contragents-accordion/contragents-accordion-item/sc-contragents-accordion-item.component.d.ts +5 -1
- package/contragents/new-contragent-form/sc-new-contragent-form.component.d.ts +10 -0
- package/contragents/sc-contragents.module.d.ts +5 -3
- package/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.d.ts +13 -0
- package/directives/address-quality/sc-address-quality.directive.d.ts +23 -0
- package/directives/address-quality/sc-address-quality.service.d.ts +122 -0
- package/directives/address-quality/sc-i-address-quality-state.d.ts +14 -0
- package/directives/index.d.ts +2 -0
- package/directives/sc-null-on-empty-value-transformer.directive.d.ts +8 -0
- package/esm2022/auth/sc-simple-sign-up-form/sc-simple-sign-up-form.component.mjs +1 -1
- package/esm2022/auth/sign-up-form/sc-sign-up-form.component.mjs +15 -4
- package/esm2022/catalog/notify-when-in-stock-dialog/sc-notify-when-in-stock-dialog.component.mjs +2 -2
- package/esm2022/contacts/new-contact-form/sc-new-contact-form.component.mjs +7 -6
- package/esm2022/contacts/sc-contacts.module.mjs +5 -2
- package/esm2022/contragents/contragents-accordion/contragents-accordion-item/sc-contragents-accordion-item.component.mjs +8 -3
- package/esm2022/contragents/new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component.mjs +1 -1
- package/esm2022/contragents/new-contragent-form/sc-new-contragent-form.component.mjs +38 -21
- package/esm2022/contragents/sc-contragents.module.mjs +7 -1
- package/esm2022/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.mjs +25 -4
- package/esm2022/directives/address-quality/sc-address-quality.directive.mjs +40 -0
- package/esm2022/directives/address-quality/sc-address-quality.service.mjs +214 -0
- package/esm2022/directives/address-quality/sc-i-address-quality-state.mjs +2 -0
- package/esm2022/directives/index.mjs +3 -1
- package/esm2022/directives/sc-null-on-empty-value-transformer.directive.mjs +30 -0
- package/esm2022/feedback/feedback-form/sc-feedback-form.component.mjs +2 -2
- package/esm2022/form-fields/addresses-selection-field/sc-addresses-selection-field.component.mjs +4 -5
- package/esm2022/form-fields/suggestion-field/sc-suggestion-field.component.mjs +77 -16
- package/esm2022/masks/index.mjs +2 -1
- package/esm2022/masks/sc-ogrn-mask.mjs +13 -0
- package/esm2022/providers/index.mjs +2 -1
- package/esm2022/providers/null-on-empty-value-transformer/index.mjs +2 -0
- package/esm2022/providers/null-on-empty-value-transformer/sc-null-on-empty-value-transformer.mjs +31 -0
- package/esm2022/providers/sc-block-incomplete-address.mjs +8 -0
- package/esm2022/user/update-user-info-dialog/sc-update-user-info-dialog.component.mjs +3 -3
- package/fesm2022/snabcentr-client-ui.mjs +488 -57
- package/fesm2022/snabcentr-client-ui.mjs.map +1 -1
- package/form-fields/addresses-selection-field/sc-addresses-selection-field.component.d.ts +2 -0
- package/form-fields/suggestion-field/sc-suggestion-field.component.d.ts +36 -2
- package/masks/index.d.ts +1 -0
- package/masks/sc-ogrn-mask.d.ts +9 -0
- package/package.json +2 -2
- package/providers/index.d.ts +1 -0
- package/providers/null-on-empty-value-transformer/index.d.ts +1 -0
- package/providers/null-on-empty-value-transformer/sc-null-on-empty-value-transformer.d.ts +21 -0
- package/providers/sc-block-incomplete-address.d.ts +5 -0
- package/release_notes.tmp +3 -3
- package/styles/tailwind/tailwind.scss +4 -0
|
@@ -56,6 +56,8 @@ export declare class ScAddressesSelectionFieldComponent implements OnInit {
|
|
|
56
56
|
}) => string;
|
|
57
57
|
/**
|
|
58
58
|
* Инициализирует экземпляр класса {@link ScAddressesSelectionFieldComponent}.
|
|
59
|
+
* Включение выбора страны сохраняет выбранные страну, регион и город. При выключении выбора страна
|
|
60
|
+
* фиксируется на текущей стране системы, поэтому регион и город сбрасываются, только если была выбрана другая страна.
|
|
59
61
|
*
|
|
60
62
|
* @param formGroupDirective Директива c `FormGroup` из DOM.
|
|
61
63
|
* @param locationsService Сервис для получения списков стран, регионов, городов.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { NgControl } from '@angular/forms';
|
|
3
|
-
import { ScISuggestionOrganization, ScISuggestionType, ScSuggestion, ScSuggestionService } from '@snabcentr/client-core';
|
|
3
|
+
import { ScISuggestionOrganization, ScISuggestionType, ScSuggestion, ScSuggestionAddressQuality, ScSuggestionService } from '@snabcentr/client-core';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
@@ -13,6 +13,11 @@ export declare class ScSuggestionFieldComponent implements OnInit {
|
|
|
13
13
|
* Тип подсказок.
|
|
14
14
|
*/
|
|
15
15
|
type: ScISuggestionType;
|
|
16
|
+
/**
|
|
17
|
+
* Признак, что элементы подсказок показывают пометку о полноте адреса.
|
|
18
|
+
* Отключается там, где адреса из подсказки по организации не применяются.
|
|
19
|
+
*/
|
|
20
|
+
showAddressQuality: boolean;
|
|
16
21
|
/**
|
|
17
22
|
* Событие выбора результата подсказки.
|
|
18
23
|
*/
|
|
@@ -41,6 +46,10 @@ export declare class ScSuggestionFieldComponent implements OnInit {
|
|
|
41
46
|
* Признак, что разрешено выбирать записи ликвидированных организаций.
|
|
42
47
|
*/
|
|
43
48
|
private readonly allowSelectTerminated;
|
|
49
|
+
/**
|
|
50
|
+
* Сервис-реестр качества адресов, выбранных из подсказок.
|
|
51
|
+
*/
|
|
52
|
+
private readonly addressQualityService;
|
|
44
53
|
/**
|
|
45
54
|
* Инициализирует экземпляр класса {@link ScSuggestionFieldComponent}.
|
|
46
55
|
*
|
|
@@ -62,12 +71,37 @@ export declare class ScSuggestionFieldComponent implements OnInit {
|
|
|
62
71
|
* @param suggestion Объект подсказки.
|
|
63
72
|
*/
|
|
64
73
|
isDisabledSuggestion(suggestion: ScSuggestion): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Возвращает текст пометки о качестве адреса для элемента выпадающего списка подсказок либо null, когда пометка не требуется.
|
|
76
|
+
*
|
|
77
|
+
* @param quality Качество (полнота) адреса.
|
|
78
|
+
*/
|
|
79
|
+
getAddressQualityWarning(quality: ScSuggestionAddressQuality | null | undefined): string | null;
|
|
80
|
+
/**
|
|
81
|
+
* Возвращает текст пометки о качестве юридического адреса для подсказки по организации либо null,
|
|
82
|
+
* когда пометка не требуется, в том числе когда у организации нет юридического адреса.
|
|
83
|
+
*
|
|
84
|
+
* @param suggestion Объект подсказки по организации.
|
|
85
|
+
*/
|
|
86
|
+
getOrganizationAddressQualityWarning(suggestion: ScISuggestionOrganization): string | null;
|
|
65
87
|
/**
|
|
66
88
|
* Проверяет прекращена ли деятельность указанной организации.
|
|
67
89
|
*
|
|
68
90
|
* @param suggestion Объект подсказки по организации.
|
|
69
91
|
*/
|
|
70
92
|
isOrgTerminated(suggestion: ScISuggestionOrganization): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Заполняет контрол строкой выбранного адреса и регистрирует качество адреса.
|
|
95
|
+
*
|
|
96
|
+
* @param suggestion Объект подсказки по адресу.
|
|
97
|
+
*/
|
|
98
|
+
private applyAddressSuggestion;
|
|
99
|
+
/**
|
|
100
|
+
* Заполняет поля родительской группы данными выбранной организации и регистрирует качество её адресов.
|
|
101
|
+
*
|
|
102
|
+
* @param suggestion Объект подсказки по организации.
|
|
103
|
+
*/
|
|
104
|
+
private applyOrganizationSuggestion;
|
|
71
105
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScSuggestionFieldComponent, [{ skipSelf: true; }, null]>;
|
|
72
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ScSuggestionFieldComponent, "sc-suggestion-field", never, { "type": { "alias": "type"; "required": false; }; }, { "selectedClick": "selectedClick"; }, never, never, false, never>;
|
|
106
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScSuggestionFieldComponent, "sc-suggestion-field", never, { "type": { "alias": "type"; "required": false; }; "showAddressQuality": { "alias": "showAddressQuality"; "required": false; }; }, { "selectedClick": "selectedClick"; }, never, never, false, never>;
|
|
73
107
|
}
|
package/masks/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MaskitoOptions } from '@maskito/core';
|
|
2
|
+
/**
|
|
3
|
+
* Маска поля ввода ОГРНИП индивидуального предпринимателя.
|
|
4
|
+
*/
|
|
5
|
+
export declare const scEntrepreneurOgrnMask: MaskitoOptions;
|
|
6
|
+
/**
|
|
7
|
+
* Маска поля ввода ОГРН юридического лица.
|
|
8
|
+
*/
|
|
9
|
+
export declare const scLegalOgrnMask: MaskitoOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snabcentr/client-ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.0",
|
|
4
4
|
"author": "Snabcentr Ltd.",
|
|
5
5
|
"repository": "https://gitlab.snabcentr.met/web/angular/snabcentr-client-ui-lib",
|
|
6
6
|
"license": "Commercial",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@maskito/core": "^3.11.1",
|
|
17
17
|
"@ng-web-apis/intersection-observer": "^4.14.0",
|
|
18
18
|
"@ng-web-apis/common": "^4.14.0",
|
|
19
|
-
"@snabcentr/client-core": "^3.23.
|
|
19
|
+
"@snabcentr/client-core": "^3.23.5",
|
|
20
20
|
"@taiga-ui/addon-charts": "^4.66.0",
|
|
21
21
|
"@taiga-ui/addon-commerce": "^4.66.0",
|
|
22
22
|
"@taiga-ui/cdk": "^4.66.0",
|
package/providers/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './sc-verification-code-timeout';
|
|
2
2
|
export * from './sc-dialog-service.providers';
|
|
3
3
|
export * from './sc-allow-select-terminated';
|
|
4
|
+
export * from './sc-block-incomplete-address';
|
|
4
5
|
export * from './sc-help-notification-limit';
|
|
5
6
|
export * from './sc-help-notification-close';
|
|
6
7
|
export * from './sc-max-files-in-form-input';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sc-null-on-empty-value-transformer';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TuiValueTransformer } from '@taiga-ui/cdk';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Преобразователь значения текстового поля, в котором очищенное поле даёт в форме null, как нетронутое.
|
|
5
|
+
*/
|
|
6
|
+
export declare class NullOnEmptyValueTransformer extends TuiValueTransformer<string, string | null> {
|
|
7
|
+
/**
|
|
8
|
+
* Преобразует значение из формы в значение поля ввода: null становится пустой строкой.
|
|
9
|
+
*
|
|
10
|
+
* @param controlValue Значение из формы поля ввода.
|
|
11
|
+
*/
|
|
12
|
+
fromControlValue(controlValue: string | null): string;
|
|
13
|
+
/**
|
|
14
|
+
* Преобразует значение поля ввода в значение формы: пустая строка становится null.
|
|
15
|
+
*
|
|
16
|
+
* @param componentValue Значение из компонента поля ввода.
|
|
17
|
+
*/
|
|
18
|
+
toControlValue(componentValue: string): string | null;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NullOnEmptyValueTransformer, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NullOnEmptyValueTransformer>;
|
|
21
|
+
}
|
package/release_notes.tmp
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## 4.
|
|
1
|
+
## 4.19.0 (2026-10-14)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### added (1 change)
|
|
4
4
|
|
|
5
|
-
- [#
|
|
5
|
+
- [#14052: Добавлено необязательное поле ОГРН в форму создания контрагента](web_soft/libs/angular/snabcentr-client-ui-lib@8d48a15630be00007bee1504e9593c258483e2da) ([merge request](web_soft/libs/angular/snabcentr-client-ui-lib!461))
|
|
6
6
|
|