plmt-constructor-sdk 0.13.5 → 0.13.7

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 CHANGED
@@ -1,143 +1,149 @@
1
- /**
2
- * К помощью конфигурация настраивается получение данных
3
- *
4
- * @packageDocumentation
5
- * @module Конфигурация
6
- */
7
- import { ColumnType } from './data';
8
- import { DataSettings as WidgetDataSettings, DataSettingsMap as WidgetDataSettingsMap, ViewSettings } from './widget';
9
- import { configDataBlock_Server } from './__internal__/config';
10
- import { viewSettingsItemValue } from './__internal__/view-settings';
11
- export declare enum DataQueryMethod {
12
- Table = "table",
13
- Aggregate = "aggregate"
14
- }
15
- export declare enum DataQueryFunction {
16
- Group = "group",
17
- Sum = "sum",
18
- Average = "avg",
19
- Min = "min",
20
- Max = "max",
21
- First = "first",
22
- Last = "last"
23
- }
24
- export declare enum BlockIcon {
25
- AxisX = "sys:axis-x",
26
- AxisY = "sys:axis-y",
27
- Value = "sys:value-column"
28
- }
29
- export declare type Locale = 'ru' | 'en';
30
- export declare type Text = Record<Locale, string>;
31
- export interface Config {
32
- label: Text;
33
- icon: string;
34
- type?: string;
35
- documentation: ConfigDocumentation;
36
- dataSettings: Omit<DataSettings, 'key'> | DataSettings[];
37
- }
38
- export interface ConfigDocumentation {
39
- readme: string;
40
- assetsDirectory: string;
41
- images: string[];
42
- }
43
- export interface DataSettings {
44
- method: DataQueryMethod;
45
- key: string;
46
- label?: Text;
47
- min?: number;
48
- max?: number;
49
- validation?: {
50
- requiredSome?: string[];
51
- requiredEvery?: string[];
52
- };
53
- blocks: Block[];
54
- }
55
- export declare class Block {
56
- private [configDataBlock_Server];
57
- constructor(_: symbol);
58
- }
59
- export declare function block(params: {
60
- key: string;
61
- dataQueryFunction: DataQueryFunction;
62
- label: Text;
63
- columnTypes?: ColumnType[];
64
- icon?: BlockIcon | string;
65
- max?: number;
66
- }): Block;
67
- export declare function filter(params?: {
68
- label?: Text;
69
- icon?: BlockIcon | string;
70
- }): Block;
71
- export declare function sort(params?: {
72
- label?: Text;
73
- icon?: BlockIcon | string;
74
- }): Block;
75
- export declare function colorize(params?: {
76
- label?: Text;
77
- icon?: BlockIcon | string;
78
- max?: number;
79
- }): Block;
80
- export declare function drilldown(params: {
81
- source: string;
82
- additionalFilterSources?: string[];
83
- label?: Text;
84
- }): Block;
85
- export interface CreateViewSettings<DataSettings extends WidgetDataSettings | WidgetDataSettingsMap> {
86
- (settings: {
87
- dataSettings: DataSettings;
88
- viewSettings: ViewSettings;
89
- }): ViewSettingsItem[];
90
- }
91
- export declare type ViewSettingsValidator = (value: any) => Text | null;
92
- export interface ViewSettingsValidation {
93
- [key: string]: ViewSettingsValidator;
94
- }
95
- export declare class ViewSettingsItem {
96
- private [viewSettingsItemValue];
97
- constructor(_: symbol);
98
- }
99
- export declare function input(params: {
100
- key: string;
101
- label: Text;
102
- span?: number;
103
- defaultValue?: string;
104
- }): ViewSettingsItem;
105
- export declare function textArea(params: {
106
- key: string;
107
- label: Text;
108
- span?: number;
109
- defaultValue?: string;
110
- }): ViewSettingsItem;
111
- export declare function checkbox(params: {
112
- key: string;
113
- label: Text;
114
- span?: number;
115
- defaultValue?: boolean;
116
- }): ViewSettingsItem;
117
- export declare function radio(params: {
118
- key: string;
119
- label: Text;
120
- options: {
121
- label: Text;
122
- value: string;
123
- }[];
124
- span?: number;
125
- defaultValue?: string;
126
- }): ViewSettingsItem;
127
- export declare function select(params: {
128
- key: string;
129
- label: Text;
130
- options: {
131
- label: Text;
132
- value: string;
133
- }[];
134
- span?: number;
135
- defaultValue?: string;
136
- }): ViewSettingsItem;
137
- export declare function colorPicker(params: {
138
- key: string;
139
- label: Text;
140
- span?: number;
141
- defaultValue?: string;
142
- }): ViewSettingsItem;
143
- export declare function title(label: any): ViewSettingsItem;
1
+ /**
2
+ * К помощью конфигурация настраивается получение данных
3
+ *
4
+ * @packageDocumentation
5
+ * @module Конфигурация
6
+ */
7
+ import { ColumnType } from './data';
8
+ import { DataSettings as WidgetDataSettings, DataSettingsMap as WidgetDataSettingsMap, ViewSettings } from './widget';
9
+ import { configDataBlock_Server } from './__internal__/config';
10
+ import { viewSettingsItemValue } from './__internal__/view-settings';
11
+ export declare enum DataQueryMethod {
12
+ Table = "table",
13
+ Aggregate = "aggregate"
14
+ }
15
+ export declare enum DataQueryFunction {
16
+ Group = "group",
17
+ Sum = "sum",
18
+ Average = "avg",
19
+ Min = "min",
20
+ Max = "max",
21
+ First = "first",
22
+ Last = "last"
23
+ }
24
+ export declare enum BlockIcon {
25
+ AxisX = "sys:axis-x",
26
+ AxisY = "sys:axis-y",
27
+ Value = "sys:value-column"
28
+ }
29
+ export declare type Locale = 'ru' | 'en';
30
+ export declare type Text = Record<Locale, string>;
31
+ export interface Config {
32
+ label: Text;
33
+ icon: string;
34
+ type?: string;
35
+ repeatable?: true | {
36
+ min?: number;
37
+ max?: number;
38
+ };
39
+ documentation: ConfigDocumentation;
40
+ dataSettings: Omit<DataSettings, 'key'> | DataSettings[];
41
+ }
42
+ export interface ConfigDocumentation {
43
+ readme: string;
44
+ assetsDirectory: string;
45
+ images: string[];
46
+ }
47
+ export interface DataSettings {
48
+ method: DataQueryMethod;
49
+ key: string;
50
+ label?: Text;
51
+ min?: number;
52
+ max?: number;
53
+ hideSort?: boolean;
54
+ hideCounter?: boolean;
55
+ validation?: {
56
+ requiredSome?: string[];
57
+ requiredEvery?: string[];
58
+ };
59
+ blocks: Block[];
60
+ }
61
+ export declare class Block {
62
+ private [configDataBlock_Server];
63
+ constructor(_: symbol);
64
+ }
65
+ export declare function block(params: {
66
+ key: string;
67
+ dataQueryFunction: DataQueryFunction;
68
+ label: Text;
69
+ columnTypes?: ColumnType[];
70
+ icon?: BlockIcon | string;
71
+ max?: number;
72
+ }): Block;
73
+ export declare function filter(params?: {
74
+ label?: Text;
75
+ icon?: BlockIcon | string;
76
+ }): Block;
77
+ export declare function sort(params?: {
78
+ label?: Text;
79
+ icon?: BlockIcon | string;
80
+ }): Block;
81
+ export declare function colorize(params?: {
82
+ label?: Text;
83
+ icon?: BlockIcon | string;
84
+ max?: number;
85
+ }): Block;
86
+ export declare function drilldown(params: {
87
+ source: string;
88
+ additionalFilterSources?: string[];
89
+ label?: Text;
90
+ }): Block;
91
+ export interface CreateViewSettings<DataSettings extends WidgetDataSettings | WidgetDataSettingsMap> {
92
+ (settings: {
93
+ dataSettings: DataSettings;
94
+ viewSettings: ViewSettings;
95
+ }): ViewSettingsItem[];
96
+ }
97
+ export declare type ViewSettingsValidator = (value: any) => Text | null;
98
+ export interface ViewSettingsValidation {
99
+ [key: string]: ViewSettingsValidator;
100
+ }
101
+ export declare class ViewSettingsItem {
102
+ private [viewSettingsItemValue];
103
+ constructor(_: symbol);
104
+ }
105
+ export declare function input(params: {
106
+ key: string;
107
+ label: Text;
108
+ span?: number;
109
+ defaultValue?: string;
110
+ }): ViewSettingsItem;
111
+ export declare function textArea(params: {
112
+ key: string;
113
+ label: Text;
114
+ span?: number;
115
+ defaultValue?: string;
116
+ }): ViewSettingsItem;
117
+ export declare function checkbox(params: {
118
+ key: string;
119
+ label: Text;
120
+ span?: number;
121
+ defaultValue?: boolean;
122
+ }): ViewSettingsItem;
123
+ export declare function radio(params: {
124
+ key: string;
125
+ label: Text;
126
+ options: {
127
+ label: Text;
128
+ value: string;
129
+ }[];
130
+ span?: number;
131
+ defaultValue?: string;
132
+ }): ViewSettingsItem;
133
+ export declare function select(params: {
134
+ key: string;
135
+ label: Text;
136
+ options: {
137
+ label: Text;
138
+ value: string;
139
+ }[];
140
+ span?: number;
141
+ defaultValue?: string;
142
+ }): ViewSettingsItem;
143
+ export declare function colorPicker(params: {
144
+ key: string;
145
+ label: Text;
146
+ span?: number;
147
+ defaultValue?: string;
148
+ }): ViewSettingsItem;
149
+ export declare function title(label: any): ViewSettingsItem;