polymatica-widget 2.1.17 → 2.1.20
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.
|
@@ -40,6 +40,7 @@ function valueConversion(type, source) {
|
|
|
40
40
|
case widget_options_1.WidgetOptionType.ColorPicker:
|
|
41
41
|
case widget_options_1.WidgetOptionType.Radio:
|
|
42
42
|
case widget_options_1.WidgetOptionType.Select:
|
|
43
|
+
case widget_options_1.WidgetOptionType.ConditionalFormatters:
|
|
43
44
|
return source;
|
|
44
45
|
case widget_options_1.WidgetOptionType.Checkbox:
|
|
45
46
|
return Boolean(source);
|
|
@@ -21,7 +21,8 @@ export declare enum WidgetOptionType {
|
|
|
21
21
|
RadioButtons = "radio-buttons",
|
|
22
22
|
Select = "select",
|
|
23
23
|
Suggestion = "suggestion",
|
|
24
|
-
Button = "button"
|
|
24
|
+
Button = "button",
|
|
25
|
+
ConditionalFormatters = "conditions"
|
|
25
26
|
}
|
|
26
27
|
export interface WidgetOption {
|
|
27
28
|
type: WidgetOptionType;
|
|
@@ -31,6 +32,10 @@ export interface Label extends WidgetOption {
|
|
|
31
32
|
label: Text;
|
|
32
33
|
hint?: Text;
|
|
33
34
|
}
|
|
35
|
+
export interface ConditionalFormatters extends WidgetOption {
|
|
36
|
+
type: WidgetOptionType.ConditionalFormatters;
|
|
37
|
+
key: string;
|
|
38
|
+
}
|
|
34
39
|
export interface Spacer extends WidgetOption {
|
|
35
40
|
type: WidgetOptionType.Spacer;
|
|
36
41
|
span: number;
|
|
@@ -28,4 +28,6 @@ var WidgetOptionType;
|
|
|
28
28
|
WidgetOptionType["Suggestion"] = "suggestion";
|
|
29
29
|
// Actions
|
|
30
30
|
WidgetOptionType["Button"] = "button";
|
|
31
|
+
//Other
|
|
32
|
+
WidgetOptionType["ConditionalFormatters"] = "conditions";
|
|
31
33
|
})(WidgetOptionType = exports.WidgetOptionType || (exports.WidgetOptionType = {}));
|
package/config.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export interface Block {
|
|
|
54
54
|
icon?: string;
|
|
55
55
|
aggregation?: boolean;
|
|
56
56
|
max?: number;
|
|
57
|
+
min?: number;
|
|
57
58
|
}
|
|
58
59
|
interface CommonOptionsConfig {
|
|
59
60
|
change?(options: Options): void;
|
|
@@ -187,4 +188,7 @@ export declare function button(params: {
|
|
|
187
188
|
label: Text;
|
|
188
189
|
target: string;
|
|
189
190
|
}): void;
|
|
191
|
+
export declare function conditionalFormatters(params: {
|
|
192
|
+
key: string;
|
|
193
|
+
}): void;
|
|
190
194
|
export {};
|
package/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.button = exports.colorPicker = exports.suggestion = exports.select = exports.radioButton = exports.radio = exports.checkbox = exports.dateTime = exports.time = exports.date = exports.interval = exports.range = exports.integer = exports.number = exports.text = exports.tabPanels = exports.tabs = exports.line = exports.spacer = exports.label = exports.title = exports.STEP = exports.Method = exports.Size = void 0;
|
|
3
|
+
exports.conditionalFormatters = exports.button = exports.colorPicker = exports.suggestion = exports.select = exports.radioButton = exports.radio = exports.checkbox = exports.dateTime = exports.time = exports.date = exports.interval = exports.range = exports.integer = exports.number = exports.text = exports.tabPanels = exports.tabs = exports.line = exports.spacer = exports.label = exports.title = exports.STEP = exports.Method = exports.Size = void 0;
|
|
4
4
|
const constants_1 = require("./__internal__/constants");
|
|
5
5
|
const widget_options_1 = require("./__internal__/widget-options");
|
|
6
6
|
// enums
|
|
@@ -117,3 +117,8 @@ function push(option) {
|
|
|
117
117
|
const target = globalThis[constants_1.widgetOptionsTargetKey];
|
|
118
118
|
target.push(option);
|
|
119
119
|
}
|
|
120
|
+
// other
|
|
121
|
+
function conditionalFormatters(params) {
|
|
122
|
+
push(Object.assign(Object.assign({}, params), { type: widget_options_1.WidgetOptionType.ConditionalFormatters }));
|
|
123
|
+
}
|
|
124
|
+
exports.conditionalFormatters = conditionalFormatters;
|