@sevtech/kit 21.6.1 → 21.7.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.
@@ -1,6 +1,6 @@
1
1
  import { WritableSignal, ComponentRef, OutputRef, QueryList, InputSignalWithTransform, InjectionToken, TemplateRef, ViewContainerRef, Provider, DestroyRef } from '@angular/core';
2
2
  import { Observable, Subscriber, MonoTypeOperatorFunction, OperatorFunction } from 'rxjs';
3
- import { Route } from '@angular/router';
3
+ import { Route, UrlTree, Event } from '@angular/router';
4
4
  import { FormArray, FormControl, FormGroup, FormRecord, AbstractControl, AsyncValidatorFn, ValidatorFn } from '@angular/forms';
5
5
  import { NgComponentOutlet } from '@angular/common';
6
6
  import { MaybeArray } from '@sevtech/kit/misc';
@@ -212,5 +212,30 @@ declare function fromMaybeAsync<T>(value: MaybeAsync<T>): Observable<T>;
212
212
  declare function safeCatchError<T>(): MonoTypeOperatorFunction<T>;
213
213
  declare function safeCatchError<T, R>(fallback: R): OperatorFunction<T, T | R>;
214
214
 
215
- export { collectFeatureProviders, dateAttribute, defineKitFeature, fromMaybeAsync, htmlBooleanAttribute, ifAsyncValidator, ifValidator, isComponentOutlet, isComponentRef, isFormArray, isFormControl, isFormGroup, isFormRecord, isTemplateRef, isViewContainer, linkedQueryParam, resizeObservable, resolveConfigProviders, revalidateOn, safeCatchError };
215
+ /**
216
+ * Оставляет ровно один `/` в начале пути.
217
+ *
218
+ * @example
219
+ * withLeadingSlash('//login'); // '/login'
220
+ */
221
+ declare function withLeadingSlash(path: string): string;
222
+ /** Проверяет, что значение — `UrlTree` или непустая строка. */
223
+ declare function isRouterUrlInput(url: unknown): url is UrlTree | string;
224
+ /**
225
+ * Возвращает локальный URL для Angular Router или null.
226
+ * Принимает относительные ссылки и пути от корня приложения.
227
+ * Сравнивает запрещённые маршруты по основному outlet через {@link DefaultUrlSerializer}.
228
+ * При сравнении игнорирует matrix-параметры, query и фрагмент.
229
+ * Параметры, фрагмент и дополнительные outlets разрешённого URL сохраняются.
230
+ */
231
+ declare function toSafeRelativeUrl(url: unknown, blocked?: string | readonly string[]): string | null;
232
+
233
+ type RouterEventClass = abstract new (...args: never[]) => Event;
234
+ /**
235
+ * Возвращает поток указанных событий Router с общей фильтрацией для его подписчиков.
236
+ * Вызывать в контексте инъекции.
237
+ */
238
+ declare function injectRouterEvents<T extends [RouterEventClass, ...RouterEventClass[]]>(...eventClasses: T): Observable<InstanceType<T[number]>>;
239
+
240
+ export { collectFeatureProviders, dateAttribute, defineKitFeature, fromMaybeAsync, htmlBooleanAttribute, ifAsyncValidator, ifValidator, injectRouterEvents, isComponentOutlet, isComponentRef, isFormArray, isFormControl, isFormGroup, isFormRecord, isRouterUrlInput, isTemplateRef, isViewContainer, linkedQueryParam, resizeObservable, resolveConfigProviders, revalidateOn, safeCatchError, toSafeRelativeUrl, withLeadingSlash };
216
241
  export type { DataRoute, DataRoutes, ExtractAsync, ExtractComponentRef, ExtractFormArray, ExtractFormControl, ExtractFormGroup, ExtractFormRecord, ExtractOutputs, ExtractQueryList, ExtractSignalInputs, ExtractTokenType, KitFeature, LinkedQueryParamOptions, MaybeAsync, RevalidateOnOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sevtech/kit",
3
- "version": "21.6.1",
3
+ "version": "21.7.0",
4
4
  "sideEffects": false,
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
@@ -413,6 +413,7 @@ declare class Yoda extends BaseDirective implements ControlValueAccessor, ChainL
413
413
  private onTouched;
414
414
  private onChange;
415
415
  private lastValue;
416
+ private lastEmitted;
416
417
  private loadedParent;
417
418
  protected readonly flexBasis$$: _angular_core.Signal<string | null>;
418
419
  private readonly chainPending$$;