plmt-constructor-sdk 0.14.0 → 0.15.1
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.
|
@@ -5,7 +5,10 @@ export declare enum ViewSettingsItemType {
|
|
|
5
5
|
Radio = "radio",
|
|
6
6
|
Select = "select",
|
|
7
7
|
ColorPicker = "color-picker",
|
|
8
|
+
Group = "group",
|
|
8
9
|
Title = "title",
|
|
10
|
+
Subtitle = "subtitle",
|
|
11
|
+
SectionLabel = "sectionLabel",
|
|
9
12
|
TextArea = "textArea",
|
|
10
13
|
ConditionalFormatters = "conditions"
|
|
11
14
|
}
|
|
@@ -8,7 +8,10 @@ var ViewSettingsItemType;
|
|
|
8
8
|
ViewSettingsItemType["Radio"] = "radio";
|
|
9
9
|
ViewSettingsItemType["Select"] = "select";
|
|
10
10
|
ViewSettingsItemType["ColorPicker"] = "color-picker";
|
|
11
|
+
ViewSettingsItemType["Group"] = "group";
|
|
11
12
|
ViewSettingsItemType["Title"] = "title";
|
|
13
|
+
ViewSettingsItemType["Subtitle"] = "subtitle";
|
|
14
|
+
ViewSettingsItemType["SectionLabel"] = "sectionLabel";
|
|
12
15
|
ViewSettingsItemType["TextArea"] = "textArea";
|
|
13
16
|
ViewSettingsItemType["ConditionalFormatters"] = "conditions";
|
|
14
17
|
})(ViewSettingsItemType = exports.ViewSettingsItemType || (exports.ViewSettingsItemType = {}));
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { FilterMethod } from '../data';
|
|
2
|
+
export declare enum ColumnType {
|
|
3
|
+
String = 0,
|
|
4
|
+
Number = 1,
|
|
5
|
+
Date = 2,
|
|
6
|
+
Boolean = 3
|
|
7
|
+
}
|
|
3
8
|
export declare const COLOR_STEPS = 128;
|
|
4
9
|
export interface Condition {
|
|
5
10
|
column_id: number;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.COLOR_STEPS = exports.ColumnType = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var ColumnType;
|
|
5
|
+
(function (ColumnType) {
|
|
6
|
+
ColumnType[ColumnType["String"] = 0] = "String";
|
|
7
|
+
ColumnType[ColumnType["Number"] = 1] = "Number";
|
|
8
|
+
ColumnType[ColumnType["Date"] = 2] = "Date";
|
|
9
|
+
ColumnType[ColumnType["Boolean"] = 3] = "Boolean";
|
|
10
|
+
})(ColumnType = exports.ColumnType || (exports.ColumnType = {}));
|
|
6
11
|
exports.COLOR_STEPS = 128;
|
package/config.d.ts
CHANGED
|
@@ -136,6 +136,7 @@ export interface CreateViewSettings<DataSettings extends WidgetDataSettings | Wi
|
|
|
136
136
|
}): ViewSettingsItem[];
|
|
137
137
|
}
|
|
138
138
|
export declare type ViewSettingsValidator = (value: any) => Text | null;
|
|
139
|
+
declare type ViewSettingsLabel = Text | string;
|
|
139
140
|
export interface ViewSettingsValidation {
|
|
140
141
|
[key: string]: ViewSettingsValidator;
|
|
141
142
|
}
|
|
@@ -198,5 +199,21 @@ export declare function colorPicker(params: {
|
|
|
198
199
|
defaultValue?: string;
|
|
199
200
|
tooltip?: TooltipSettings;
|
|
200
201
|
}): ViewSettingsItem;
|
|
201
|
-
|
|
202
|
+
/**
|
|
203
|
+
* Создаёт collapsible секцию в панели настроек
|
|
204
|
+
*/
|
|
205
|
+
export declare function group(label: ViewSettingsLabel): ViewSettingsItem;
|
|
206
|
+
/**
|
|
207
|
+
* @deprecated Используйте group(), старый title() оставлен как alias для обратной совместимости
|
|
208
|
+
*/
|
|
209
|
+
export declare function title(label: ViewSettingsLabel): ViewSettingsItem;
|
|
210
|
+
/**
|
|
211
|
+
* Создаёт внутренний подзаголовок внутри текущей секции настроек
|
|
212
|
+
*/
|
|
213
|
+
export declare function subtitle(label: ViewSettingsLabel): ViewSettingsItem;
|
|
214
|
+
/**
|
|
215
|
+
* Создаёт вложенный заголовок внутри секции настроек
|
|
216
|
+
*/
|
|
217
|
+
export declare function sectionLabel(label: ViewSettingsLabel): ViewSettingsItem;
|
|
202
218
|
export declare function conditionalFormatters(key: string, label?: Text): ViewSettingsItem;
|
|
219
|
+
export {};
|
package/config.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module Конфигурация
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.conditionalFormatters = exports.title = exports.colorPicker = exports.select = exports.radio = exports.checkbox = exports.textArea = exports.input = exports.ViewSettingsItem = exports.drilldown = exports.colorize = exports.sort = exports.filter = exports.block = exports.Block = exports.BlockIcon = exports.DataQueryFunction = exports.DataQueryMethod = void 0;
|
|
9
|
+
exports.conditionalFormatters = exports.sectionLabel = exports.subtitle = exports.title = exports.group = exports.colorPicker = exports.select = exports.radio = exports.checkbox = exports.textArea = exports.input = exports.ViewSettingsItem = exports.drilldown = exports.colorize = exports.sort = exports.filter = exports.block = exports.Block = exports.BlockIcon = exports.DataQueryFunction = exports.DataQueryMethod = void 0;
|
|
10
10
|
const data_1 = require("./data");
|
|
11
11
|
const config_1 = require("./__internal__/config");
|
|
12
12
|
const dataset_1 = require("./__internal__/dataset");
|
|
@@ -149,6 +149,9 @@ function createViewSettingsItem(value) {
|
|
|
149
149
|
[view_settings_1.viewSettingsItemValue]: value,
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
+
function toText(label) {
|
|
153
|
+
return typeof label === 'string' ? { ru: label, en: label } : label;
|
|
154
|
+
}
|
|
152
155
|
function input(params) {
|
|
153
156
|
return createViewSettingsItem({
|
|
154
157
|
type: view_settings_1.ViewSettingsItemType.Input,
|
|
@@ -191,14 +194,41 @@ function colorPicker(params) {
|
|
|
191
194
|
});
|
|
192
195
|
}
|
|
193
196
|
exports.colorPicker = colorPicker;
|
|
194
|
-
function
|
|
197
|
+
function layoutItem(type, label) {
|
|
195
198
|
return createViewSettingsItem({
|
|
196
|
-
type
|
|
199
|
+
type,
|
|
197
200
|
key: '',
|
|
198
|
-
label,
|
|
201
|
+
label: toText(label),
|
|
199
202
|
});
|
|
200
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Создаёт collapsible секцию в панели настроек
|
|
206
|
+
*/
|
|
207
|
+
function group(label) {
|
|
208
|
+
return layoutItem(view_settings_1.ViewSettingsItemType.Group, label);
|
|
209
|
+
}
|
|
210
|
+
exports.group = group;
|
|
211
|
+
/**
|
|
212
|
+
* @deprecated Используйте group(), старый title() оставлен как alias для обратной совместимости
|
|
213
|
+
*/
|
|
214
|
+
function title(label) {
|
|
215
|
+
return layoutItem(view_settings_1.ViewSettingsItemType.Title, label);
|
|
216
|
+
}
|
|
201
217
|
exports.title = title;
|
|
218
|
+
/**
|
|
219
|
+
* Создаёт внутренний подзаголовок внутри текущей секции настроек
|
|
220
|
+
*/
|
|
221
|
+
function subtitle(label) {
|
|
222
|
+
return layoutItem(view_settings_1.ViewSettingsItemType.Subtitle, label);
|
|
223
|
+
}
|
|
224
|
+
exports.subtitle = subtitle;
|
|
225
|
+
/**
|
|
226
|
+
* Создаёт вложенный заголовок внутри секции настроек
|
|
227
|
+
*/
|
|
228
|
+
function sectionLabel(label) {
|
|
229
|
+
return layoutItem(view_settings_1.ViewSettingsItemType.SectionLabel, label);
|
|
230
|
+
}
|
|
231
|
+
exports.sectionLabel = sectionLabel;
|
|
202
232
|
function conditionalFormatters(key, label) {
|
|
203
233
|
return createViewSettingsItem({
|
|
204
234
|
type: view_settings_1.ViewSettingsItemType.ConditionalFormatters,
|