polymatica-widget 2.1.6 → 2.1.8
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/config.d.ts +6 -15
- package/dataset.d.ts +1 -0
- package/package.json +1 -1
package/config.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ColumnType } from "./dataset";
|
|
2
1
|
import { Text } from "./locale";
|
|
3
2
|
import { Options } from "./widget";
|
|
4
3
|
export declare enum Size {
|
|
@@ -54,24 +53,17 @@ export interface Block {
|
|
|
54
53
|
}
|
|
55
54
|
export interface OptionsConfig {
|
|
56
55
|
options: {
|
|
56
|
+
provider(options: Options): void;
|
|
57
|
+
default: Options;
|
|
58
|
+
validators?: OptionsValidation;
|
|
59
|
+
dataDependent?: false;
|
|
60
|
+
} | {
|
|
57
61
|
provider(options: Options, data: unknown): void;
|
|
58
62
|
default: Options;
|
|
59
63
|
validators?: OptionsValidation;
|
|
64
|
+
dataDependent: true;
|
|
60
65
|
};
|
|
61
66
|
}
|
|
62
|
-
export declare type DataFromConfig<T> = T extends SingleData & Repeatable ? Data[] : T extends SingleData ? Data : T extends MultiData<infer DataItemKeys> ? {
|
|
63
|
-
[Key in DataItemKeys]: T["data"][Key] extends Repeatable ? Data[] : Data;
|
|
64
|
-
} : never;
|
|
65
|
-
interface Data {
|
|
66
|
-
readonly columns: Column[];
|
|
67
|
-
readonly columnsByBlock: {
|
|
68
|
-
[blockKey: string]: Column[];
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
interface Column {
|
|
72
|
-
readonly name: string;
|
|
73
|
-
readonly type: ColumnType;
|
|
74
|
-
}
|
|
75
67
|
export declare const STEP = 24;
|
|
76
68
|
export declare function title(label: Text, params?: {
|
|
77
69
|
hint: Text;
|
|
@@ -164,4 +156,3 @@ export interface OptionsValidation {
|
|
|
164
156
|
export interface OptionsValidator {
|
|
165
157
|
(value: any): Text | null;
|
|
166
158
|
}
|
|
167
|
-
export {};
|
package/dataset.d.ts
CHANGED