UNPKG

@qoollo/ngx-form-url-saver

Version:

Angular directive for syncing form's data with URL query

26 lines (25 loc) 1.15 kB
import { Params } from '@angular/router'; import { QueryGenerationStrategy } from './query-generation-strategy.interface'; export declare class SeparatedComplexQueryGenerationStrategy implements QueryGenerationStrategy { private readonly useDateTime; private readonly COMPLEX_OBJECT_PREFIX; constructor(useDateTime: boolean); inferFormValueFromQuery(queryParams: Params, formValue: Record<string, unknown>): object; convertFormValueToQueryObject(formValue: Record<string, unknown>): object; createClearingObject(formValue: Record<string, undefined>): object; private prepareValue; private readAllSimpleQuery; getNewValueByQueryKey(queryParams: Params, key: string, form: Record<string, unknown>): unknown; private readAllComplexQuery; private createComplexKey; private getOriginKey; private checkIfKeyIsComplex; /** * Checks whether the passed value is an object. * Returns `false` for `date` or `array`. * * `Object.prototype.toString.call(new Date()) = [object Date]` * `Object.prototype.toString.call(new Array()) = [object Array]` */ private isObject; }