polymatica-widget 2.1.16 → 2.1.19

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
@@ -94,19 +94,19 @@ export declare function tabPanels(params: {
94
94
  export declare function text(params: {
95
95
  key: string;
96
96
  label: Text;
97
- placeholder: Text;
97
+ placeholder?: Text;
98
98
  span?: number;
99
99
  }): void;
100
100
  export declare function number(params: {
101
101
  key: string;
102
102
  label: Text;
103
- placeholder: Text;
103
+ placeholder?: Text;
104
104
  span?: number;
105
105
  }): void;
106
106
  export declare function integer(params: {
107
107
  key: string;
108
108
  label: Text;
109
- placeholder: Text;
109
+ placeholder?: Text;
110
110
  span?: number;
111
111
  }): void;
112
112
  export declare function range(params: {
@@ -122,19 +122,19 @@ export declare function interval(params: {
122
122
  export declare function date(params: {
123
123
  key: string;
124
124
  label: Text;
125
- placeholder: Text;
125
+ placeholder?: Text;
126
126
  span?: number;
127
127
  }): void;
128
128
  export declare function time(params: {
129
129
  key: string;
130
130
  label: Text;
131
- placeholder: Text;
131
+ placeholder?: Text;
132
132
  span?: number;
133
133
  }): void;
134
134
  export declare function dateTime(params: {
135
135
  key: string;
136
136
  label: Text;
137
- placeholder: Text;
137
+ placeholder?: Text;
138
138
  span?: number;
139
139
  }): void;
140
140
  export declare function checkbox(params: {
@@ -187,4 +187,7 @@ export declare function button(params: {
187
187
  label: Text;
188
188
  target: string;
189
189
  }): void;
190
+ export declare function conditionalFormatters(params: {
191
+ key: string;
192
+ }): void;
190
193
  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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polymatica-widget",
3
- "version": "2.1.16",
3
+ "version": "2.1.19",
4
4
  "description": "SDK для создания виджетов для платформы Polymatica",
5
5
  "keywords": [],
6
6
  "license": "ISC",