polymatica-widget 2.1.7 → 2.1.9

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.
Files changed (2) hide show
  1. package/config.d.ts +9 -16
  2. 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,19 @@ export interface Block {
54
53
  }
55
54
  export interface OptionsConfig {
56
55
  options: {
57
- provider(options: Options, data: unknown): void;
56
+ map?(options: Options): Options;
57
+ render(options: Options): void;
58
58
  default: Options;
59
59
  validators?: OptionsValidation;
60
+ dataDependent?: false;
61
+ } | {
62
+ map?(options: Options): Options;
63
+ render(options: Options, data: unknown): void;
64
+ default: Options;
65
+ validators?: OptionsValidation;
66
+ dataDependent: true;
60
67
  };
61
68
  }
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
69
  export declare const STEP = 24;
76
70
  export declare function title(label: Text, params?: {
77
71
  hint: Text;
@@ -164,4 +158,3 @@ export interface OptionsValidation {
164
158
  export interface OptionsValidator {
165
159
  (value: any): Text | null;
166
160
  }
167
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polymatica-widget",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "description": "SDK для создания виджетов для платформы Polymatica",
5
5
  "keywords": [],
6
6
  "license": "ISC",