@snabcentr/client-ui 5.3.1 → 5.3.3
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.
|
@@ -17,7 +17,7 @@ import { AsyncPipe, DOCUMENT, NgTemplateOutlet, NgClass, CommonModule, DecimalPi
|
|
|
17
17
|
import { isValidPhoneNumber } from 'libphonenumber-js/max';
|
|
18
18
|
import { MaskitoDirective } from '@maskito/angular';
|
|
19
19
|
import { getCountries } from 'libphonenumber-js';
|
|
20
|
-
import { isNil, isUndefined, isObject,
|
|
20
|
+
import { isNil, isUndefined, isObject, isString, isArray } from 'lodash-es';
|
|
21
21
|
import { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusTemplate, PolymorpheusOutlet, injectContext } from '@taiga-ui/polymorpheus';
|
|
22
22
|
import { QRCodeComponent } from 'angularx-qrcode';
|
|
23
23
|
import * as i3 from '@taiga-ui/core/portals/dropdown';
|
|
@@ -1128,7 +1128,12 @@ class ScSelectOnFocusinDirective {
|
|
|
1128
1128
|
// eslint-disable-next-line class-methods-use-this
|
|
1129
1129
|
onFocusIn(target) {
|
|
1130
1130
|
if (target instanceof HTMLInputElement) {
|
|
1131
|
-
|
|
1131
|
+
// Safari может сбрасывать выделение после focusin при клике мышью.
|
|
1132
|
+
setTimeout(() => {
|
|
1133
|
+
if (document.activeElement === target) {
|
|
1134
|
+
target.select();
|
|
1135
|
+
}
|
|
1136
|
+
});
|
|
1132
1137
|
}
|
|
1133
1138
|
}
|
|
1134
1139
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScSelectOnFocusinDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -8325,9 +8330,12 @@ class ScOrderFormComponent {
|
|
|
8325
8330
|
/**
|
|
8326
8331
|
* Возвращает признак, что указанная дата недоступна для выбора.
|
|
8327
8332
|
*
|
|
8328
|
-
* @
|
|
8333
|
+
* Календарь передаёт сюда {@link TuiDay}, а валидатор недоступных элементов поля ({@link TuiItemsHandlersValidator})
|
|
8334
|
+
* уже преобразованное значение контрола (строку формата `"YYYY-MM-DD 00:00:00"`), поэтому обрабатываем оба случая.
|
|
8335
|
+
*
|
|
8336
|
+
* @param date Дата в виде {@link TuiDay} или строки значения контрола.
|
|
8329
8337
|
*/
|
|
8330
|
-
this.deliveryDateFilter = (date) => !this.deliveryDates().includes(`${date.toString('yyyy/mm/dd', '-')} 00:00:00`);
|
|
8338
|
+
this.deliveryDateFilter = (date) => !this.deliveryDates().includes(isString(date) ? date : `${date.toString('yyyy/mm/dd', '-')} 00:00:00`);
|
|
8331
8339
|
// Автоматически выбираем единственного контрагента-физлицо.
|
|
8332
8340
|
this.contragents$
|
|
8333
8341
|
.pipe(filter((contragents) => !!contragents && contragents.length === 1), first(), filter(([contragent]) => contragent.opf.id === ScOpfList.individual.valueOf()), takeUntilDestroyed(this.destroyRef))
|