dotvvm-types 4.1.0-preview13-final → 4.1.0-preview16-final
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/package.json +1 -1
- package/types/index.d.ts +30 -25
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -19,24 +19,25 @@ declare module "shared-classes" {
|
|
|
19
19
|
declare module "utils/logging" {
|
|
20
20
|
type LogLevel = "normal" | "verbose";
|
|
21
21
|
export const level: LogLevel;
|
|
22
|
-
export
|
|
23
|
-
export function
|
|
24
|
-
export function
|
|
25
|
-
export function
|
|
22
|
+
export type DotvvmLoggingArea = ("debug" | "configuration" | "postback" | "spa" | "static-command" | "binding-handler" | "resource-loader" | "coercer" | "state-manager" | "validation" | "events" | "rest-api");
|
|
23
|
+
export function logInfoVerbose(area: DotvvmLoggingArea, ...args: any[]): void;
|
|
24
|
+
export function logInfo(area: DotvvmLoggingArea, ...args: any[]): void;
|
|
25
|
+
export function logWarning(area: DotvvmLoggingArea, ...args: any[]): void;
|
|
26
|
+
export function logError(area: DotvvmLoggingArea, ...args: any[]): void;
|
|
26
27
|
export function logPostBackScriptError(err: any): void;
|
|
27
28
|
/** puts the string in quotes, escaping weird characters if it is more complex than just letters */
|
|
28
29
|
export function debugQuoteString(s: string): string;
|
|
29
30
|
}
|
|
30
31
|
declare module "serialization/date" {
|
|
31
|
-
export function parseDate(value: string | null, convertFromUtc?: boolean): Date | null;
|
|
32
|
-
export function parseDateOnly(value: string | null): Date | null;
|
|
33
|
-
export function parseTimeOnly(value: string | null): Date | null;
|
|
34
|
-
export function parseTimeSpan(value: string | null): number | null;
|
|
35
|
-
export function parseDateTimeOffset(value: string | null): Date | null;
|
|
32
|
+
export function parseDate(value: string | null | undefined, convertFromUtc?: boolean): Date | null;
|
|
33
|
+
export function parseDateOnly(value: string | null | undefined): Date | null;
|
|
34
|
+
export function parseTimeOnly(value: string | null | undefined): Date | null;
|
|
35
|
+
export function parseTimeSpan(value: string | null | undefined): number | null;
|
|
36
|
+
export function parseDateTimeOffset(value: string | null | undefined): Date | null;
|
|
36
37
|
export function serializeDate(date: string | Date | null, convertToUtc?: boolean): string | null;
|
|
37
|
-
export function serializeDateOnly(date: Date
|
|
38
|
-
export function serializeTimeOnly(date: Date
|
|
39
|
-
export function serializeTimeSpan(
|
|
38
|
+
export function serializeDateOnly(date: Date): string;
|
|
39
|
+
export function serializeTimeOnly(date: Date): string;
|
|
40
|
+
export function serializeTimeSpan(ticks: number): string;
|
|
40
41
|
}
|
|
41
42
|
declare module "utils/dom" {
|
|
42
43
|
export const getElementByDotvvmId: (id: string) => HTMLElement;
|
|
@@ -72,6 +73,7 @@ declare module "metadata/typeMap" {
|
|
|
72
73
|
export function getKnownTypes(): string[];
|
|
73
74
|
export function updateTypeInfo(newTypes: TypeMap | undefined): void;
|
|
74
75
|
export function replaceTypeInfo(newTypes: TypeMap | undefined): void;
|
|
76
|
+
export function areObjectTypesEqual(currentValue: any, newVal: any): boolean;
|
|
75
77
|
}
|
|
76
78
|
declare module "events" {
|
|
77
79
|
export class DotvvmEvent<T> {
|
|
@@ -418,7 +420,9 @@ declare module "binding-handlers/file-upload" {
|
|
|
418
420
|
declare module "binding-handlers/js-component" {
|
|
419
421
|
const _default_11: {
|
|
420
422
|
"dotvvm-js-component": {
|
|
421
|
-
init(element: HTMLInputElement, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor):
|
|
423
|
+
init(element: HTMLInputElement, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor): {
|
|
424
|
+
controlsDescendantBindings: boolean;
|
|
425
|
+
};
|
|
422
426
|
};
|
|
423
427
|
};
|
|
424
428
|
export default _default_11;
|
|
@@ -459,7 +463,7 @@ declare module "DotVVM.Globalize" {
|
|
|
459
463
|
type GlobalizeFormattable = null | undefined | string | Date | number;
|
|
460
464
|
export function formatString(format: string | null | undefined, value: GlobalizeFormattable | KnockoutObservable<GlobalizeFormattable>, type: string | null): string;
|
|
461
465
|
export function parseNumber(value: string): number;
|
|
462
|
-
export function parseDate(value: string, format: string, previousValue?: Date): Date | null;
|
|
466
|
+
export function parseDate(value: string, format: string, previousValue?: Date | null): Date | null;
|
|
463
467
|
export const parseDotvvmDate: typeof serializationParseDate;
|
|
464
468
|
export function bindingDateToString(value: GlobalizeFormattable | KnockoutObservable<GlobalizeFormattable>, format?: string): KnockoutComputed<string>;
|
|
465
469
|
export function bindingDateOnlyToString(value: GlobalizeFormattable | KnockoutObservable<GlobalizeFormattable>, format?: string): KnockoutComputed<string>;
|
|
@@ -634,6 +638,18 @@ declare module "postback/postback" {
|
|
|
634
638
|
export function isPostbackHandler(obj: any): obj is DotvvmPostbackHandler;
|
|
635
639
|
export function sortHandlers(handlers: DotvvmPostbackHandler[]): DotvvmPostbackHandler[];
|
|
636
640
|
}
|
|
641
|
+
declare module "api/eventHub" {
|
|
642
|
+
export function notify(id: string): void;
|
|
643
|
+
export function get(id: string): KnockoutObservable<number>;
|
|
644
|
+
}
|
|
645
|
+
declare module "api/api" {
|
|
646
|
+
type ApiComputed<T> = KnockoutComputed<T | null> & {
|
|
647
|
+
refreshValue: () => PromiseLike<any>;
|
|
648
|
+
};
|
|
649
|
+
export function invoke<T>(target: any, methodName: string, argsProvider: () => any[], refreshTriggers: (args: any[]) => Array<KnockoutObservable<any> | string>, notifyTriggers: (args: any[]) => string[], cacheElement: HTMLElement, sharingKeyProvider: (args: any[]) => string[], lifetimeElement: HTMLElement): ApiComputed<T>;
|
|
650
|
+
export function refreshOn<T>(value: ApiComputed<T>, watch: KnockoutObservable<any>): ApiComputed<T>;
|
|
651
|
+
export function clearApiCachedValues(): void;
|
|
652
|
+
}
|
|
637
653
|
declare module "spa/navigation" {
|
|
638
654
|
export function navigateCore(url: string, options: PostbackOptions, handlePageNavigating: (url: string) => void): Promise<DotvvmNavigationEventArgs>;
|
|
639
655
|
}
|
|
@@ -659,17 +675,6 @@ declare module "controls/fileUpload" {
|
|
|
659
675
|
export function showUploadDialog(sender: HTMLElement): void;
|
|
660
676
|
export function reportProgress(inputControl: HTMLInputElement, isBusy: boolean, progress: number, result: DotvvmStaticCommandResponse<DotvvmFileUploadData[]> | string): void;
|
|
661
677
|
}
|
|
662
|
-
declare module "api/eventHub" {
|
|
663
|
-
export function notify(id: string): void;
|
|
664
|
-
export function get(id: string): KnockoutObservable<number>;
|
|
665
|
-
}
|
|
666
|
-
declare module "api/api" {
|
|
667
|
-
type ApiComputed<T> = KnockoutObservable<T | null> & {
|
|
668
|
-
refreshValue: (throwOnError?: boolean) => PromiseLike<any> | undefined;
|
|
669
|
-
};
|
|
670
|
-
export function invoke<T>(target: any, methodName: string, argsProvider: () => any[], refreshTriggers: (args: any[]) => Array<KnockoutObservable<any> | string>, notifyTriggers: (args: any[]) => string[], element: HTMLElement, sharingKeyProvider: (args: any[]) => string[]): ApiComputed<T>;
|
|
671
|
-
export function refreshOn<T>(value: ApiComputed<T>, watch: KnockoutObservable<any>): ApiComputed<T>;
|
|
672
|
-
}
|
|
673
678
|
declare module "metadata/metadataHelper" {
|
|
674
679
|
export function getTypeId(viewModel: object): string | undefined;
|
|
675
680
|
export function getTypeMetadata(typeId: string): TypeMetadata;
|