plmt-constructor-sdk 0.17.9 → 0.17.11
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/__internal__/view-settings.d.ts +3 -0
- package/__internal__/view-settings.js +2 -0
- package/config.d.ts +8 -57
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +1 -1
- package/view-settings-params.d.ts +62 -0
- package/view-settings-params.js +8 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Text, ViewSettingsItem } from '../config';
|
|
2
|
+
import type { AffixContent } from '../view-settings-params';
|
|
2
3
|
export declare enum ViewSettingsItemType {
|
|
3
4
|
Input = "text",
|
|
4
5
|
Checkbox = "checkbox",
|
|
@@ -68,6 +69,8 @@ export interface ViewSettingsItemValue {
|
|
|
68
69
|
}[];
|
|
69
70
|
span?: number;
|
|
70
71
|
invalidChars?: string[];
|
|
72
|
+
prefix?: AffixContent;
|
|
73
|
+
suffix?: AffixContent;
|
|
71
74
|
}
|
|
72
75
|
export declare const viewSettingsItemValue = "418d9556-a046-4623-be0b-4f4f69ccb783";
|
|
73
76
|
export declare function viewSettingsExtract(viewSettings: ViewSettingsItem[]): ViewSettingsItemValue[];
|
package/config.d.ts
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
import { ColumnType } from './data';
|
|
8
8
|
import { DataSettings as WidgetDataSettings, DataSettingsMap as WidgetDataSettingsMap, ViewSettings } from './widget';
|
|
9
9
|
import { configDataBlock_Server } from './__internal__/config';
|
|
10
|
-
import {
|
|
10
|
+
import { viewSettingsItemValue } from './__internal__/view-settings';
|
|
11
|
+
import type { CheckboxParams, ColorPickerParams, InputParams, RadioParams, SelectParams, TextAreaParams } from './view-settings-params';
|
|
11
12
|
export declare enum DataQueryMethod {
|
|
12
13
|
Table = "table",
|
|
13
14
|
PivotTable = "pivot",
|
|
@@ -150,62 +151,12 @@ export declare class ViewSettingsItem {
|
|
|
150
151
|
private [viewSettingsItemValue];
|
|
151
152
|
constructor(_: symbol);
|
|
152
153
|
}
|
|
153
|
-
export declare function input(params:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
tooltip?: TooltipSettings;
|
|
160
|
-
disabled?: true;
|
|
161
|
-
clearable?: true;
|
|
162
|
-
flex?: true;
|
|
163
|
-
id?: number;
|
|
164
|
-
typeInput?: InputType;
|
|
165
|
-
invalidChars?: string[];
|
|
166
|
-
}): ViewSettingsItem;
|
|
167
|
-
export declare function textArea(params: {
|
|
168
|
-
key: string;
|
|
169
|
-
label: Text;
|
|
170
|
-
span?: number;
|
|
171
|
-
placeholder?: Text;
|
|
172
|
-
defaultValue?: string;
|
|
173
|
-
}): ViewSettingsItem;
|
|
174
|
-
export declare function checkbox(params: {
|
|
175
|
-
key: string;
|
|
176
|
-
label: Text;
|
|
177
|
-
span?: number;
|
|
178
|
-
defaultValue?: boolean;
|
|
179
|
-
tooltip?: TooltipSettings;
|
|
180
|
-
}): ViewSettingsItem;
|
|
181
|
-
export declare function radio(params: {
|
|
182
|
-
key: string;
|
|
183
|
-
label: Text;
|
|
184
|
-
options: {
|
|
185
|
-
label: Text;
|
|
186
|
-
value: string;
|
|
187
|
-
}[];
|
|
188
|
-
span?: number;
|
|
189
|
-
defaultValue?: string;
|
|
190
|
-
}): ViewSettingsItem;
|
|
191
|
-
export declare function select(params: {
|
|
192
|
-
key: string;
|
|
193
|
-
label: Text;
|
|
194
|
-
options: {
|
|
195
|
-
label: Text;
|
|
196
|
-
value: string;
|
|
197
|
-
}[];
|
|
198
|
-
span?: number;
|
|
199
|
-
defaultValue?: string;
|
|
200
|
-
tooltip?: TooltipSettings;
|
|
201
|
-
}): ViewSettingsItem;
|
|
202
|
-
export declare function colorPicker(params: {
|
|
203
|
-
key: string;
|
|
204
|
-
label: Text;
|
|
205
|
-
span?: number;
|
|
206
|
-
defaultValue?: string;
|
|
207
|
-
tooltip?: TooltipSettings;
|
|
208
|
-
}): ViewSettingsItem;
|
|
154
|
+
export declare function input(params: InputParams): ViewSettingsItem;
|
|
155
|
+
export declare function textArea(params: TextAreaParams): ViewSettingsItem;
|
|
156
|
+
export declare function checkbox(params: CheckboxParams): ViewSettingsItem;
|
|
157
|
+
export declare function radio(params: RadioParams): ViewSettingsItem;
|
|
158
|
+
export declare function select(params: SelectParams): ViewSettingsItem;
|
|
159
|
+
export declare function colorPicker(params: ColorPickerParams): ViewSettingsItem;
|
|
209
160
|
/**
|
|
210
161
|
* Создаёт collapsible секцию в панели настроек
|
|
211
162
|
*/
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./declare"), exports);
|
|
18
18
|
__exportStar(require("./widget"), exports);
|
|
19
19
|
__exportStar(require("./conditional-format"), exports);
|
|
20
|
+
__exportStar(require("./view-settings-params"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Типы параметров элементов панели настроек виджета
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
* @module Настройки отображения
|
|
6
|
+
*/
|
|
7
|
+
import type { Text } from './config';
|
|
8
|
+
import type { InputType, TooltipSettings } from './__internal__/view-settings';
|
|
9
|
+
export declare type IconSettings = string | {
|
|
10
|
+
icon: string;
|
|
11
|
+
library: string;
|
|
12
|
+
};
|
|
13
|
+
export interface HtmlSettings {
|
|
14
|
+
type: 'html';
|
|
15
|
+
html: string;
|
|
16
|
+
}
|
|
17
|
+
export declare type BadgeVariant = 'primary' | 'success' | 'neutral' | 'warning' | 'danger';
|
|
18
|
+
export declare type BadgeSize = 'x-small' | 'small' | 'medium' | 'large';
|
|
19
|
+
export interface BadgeSettings extends AffixOptions {
|
|
20
|
+
type: 'badge';
|
|
21
|
+
size?: BadgeSize;
|
|
22
|
+
pill?: true;
|
|
23
|
+
variant?: BadgeVariant;
|
|
24
|
+
light?: true;
|
|
25
|
+
content?: Text;
|
|
26
|
+
}
|
|
27
|
+
export declare type AffixContent = IconSettings | BadgeSettings | HtmlSettings;
|
|
28
|
+
export interface AffixOptions {
|
|
29
|
+
prefix?: AffixContent;
|
|
30
|
+
suffix?: AffixContent;
|
|
31
|
+
}
|
|
32
|
+
export declare type ViewSettingsOption<T extends any = {}> = {
|
|
33
|
+
label: Text;
|
|
34
|
+
value: string;
|
|
35
|
+
} & T;
|
|
36
|
+
export interface ViewSettingsBaseParams extends AffixOptions {
|
|
37
|
+
key: string;
|
|
38
|
+
label: Text;
|
|
39
|
+
span?: number;
|
|
40
|
+
defaultValue?: string;
|
|
41
|
+
placeholder?: Text;
|
|
42
|
+
tooltip?: TooltipSettings;
|
|
43
|
+
}
|
|
44
|
+
export interface InputParams extends ViewSettingsBaseParams {
|
|
45
|
+
disabled?: true;
|
|
46
|
+
clearable?: true;
|
|
47
|
+
flex?: true;
|
|
48
|
+
id?: number;
|
|
49
|
+
typeInput?: InputType;
|
|
50
|
+
invalidChars?: string[];
|
|
51
|
+
}
|
|
52
|
+
export declare type TextAreaParams = ViewSettingsBaseParams;
|
|
53
|
+
export interface CheckboxParams extends Omit<ViewSettingsBaseParams, 'defaultValue'> {
|
|
54
|
+
defaultValue?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface RadioParams extends ViewSettingsBaseParams {
|
|
57
|
+
options: ViewSettingsOption[];
|
|
58
|
+
}
|
|
59
|
+
export interface SelectParams extends ViewSettingsBaseParams {
|
|
60
|
+
options: ViewSettingsOption<AffixOptions>[];
|
|
61
|
+
}
|
|
62
|
+
export declare type ColorPickerParams = ViewSettingsBaseParams;
|