@infomaximum/widget-sdk 3.24.1 → 3.25.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.
package/dist/index.d.ts CHANGED
@@ -34,7 +34,8 @@ declare enum EControlType {
34
34
  eventsColor = "eventsColor",
35
35
  inputMarkdown = "inputMarkdown",
36
36
  filter = "filter",
37
- actionOnClick = "actionOnClick"
37
+ actionOnClick = "actionOnClick",
38
+ eventsPicker = "eventsPicker"
38
39
  }
39
40
  /** Конфигурация элемента управления настройкой */
40
41
  interface IControlRecord<Settings extends object, Value, ControlType = EControlType> {
@@ -776,7 +777,7 @@ interface IWidgetAction {
776
777
  inputs: IWidgetActionInput[];
777
778
  shouldRefreshWidgetsAfterExecution: boolean;
778
779
  }
779
- declare const isActionValid: (action: IWidgetAction, { scripts, tables }: IWidgetsContext) => boolean;
780
+ declare const isActionValid: (action: IWidgetAction, { scripts, tables, variables }: IWidgetsContext) => boolean;
780
781
 
781
782
  interface IBaseWidgetSettings {
782
783
  apiVersion: string;
package/dist/index.esm.js CHANGED
@@ -73,7 +73,7 @@ var EWidgetActionInputMode;
73
73
  })(EWidgetActionInputMode || (EWidgetActionInputMode = {}));
74
74
  var isActionValid = function (action, _a) {
75
75
  var _b;
76
- var scripts = _a.scripts, tables = _a.tables;
76
+ var scripts = _a.scripts, tables = _a.tables, variables = _a.variables;
77
77
  var currentScript = scripts.get((_b = action.scriptGuid) !== null && _b !== void 0 ? _b : "");
78
78
  if (!currentScript) {
79
79
  return false;
@@ -88,7 +88,8 @@ var isActionValid = function (action, _a) {
88
88
  return false;
89
89
  }
90
90
  var value = actionInput.value;
91
- if (value.mode === EWidgetActionInputMode.FROM_VARIABLE && !value.guid) {
91
+ if (value.mode === EWidgetActionInputMode.FROM_VARIABLE &&
92
+ !variables.has(value.guid)) {
92
93
  return false;
93
94
  }
94
95
  if (value.mode === EWidgetActionInputMode.FORMULA && !value.formula) {
@@ -941,6 +942,7 @@ var EControlType;
941
942
  EControlType["inputMarkdown"] = "inputMarkdown";
942
943
  EControlType["filter"] = "filter";
943
944
  EControlType["actionOnClick"] = "actionOnClick";
945
+ EControlType["eventsPicker"] = "eventsPicker";
944
946
  })(EControlType || (EControlType = {}));
945
947
 
946
948
  var ESortDirection;
package/dist/index.js CHANGED
@@ -74,7 +74,7 @@ exports.EWidgetActionInputMode = void 0;
74
74
  })(exports.EWidgetActionInputMode || (exports.EWidgetActionInputMode = {}));
75
75
  var isActionValid = function (action, _a) {
76
76
  var _b;
77
- var scripts = _a.scripts, tables = _a.tables;
77
+ var scripts = _a.scripts, tables = _a.tables, variables = _a.variables;
78
78
  var currentScript = scripts.get((_b = action.scriptGuid) !== null && _b !== void 0 ? _b : "");
79
79
  if (!currentScript) {
80
80
  return false;
@@ -89,7 +89,8 @@ var isActionValid = function (action, _a) {
89
89
  return false;
90
90
  }
91
91
  var value = actionInput.value;
92
- if (value.mode === exports.EWidgetActionInputMode.FROM_VARIABLE && !value.guid) {
92
+ if (value.mode === exports.EWidgetActionInputMode.FROM_VARIABLE &&
93
+ !variables.has(value.guid)) {
93
94
  return false;
94
95
  }
95
96
  if (value.mode === exports.EWidgetActionInputMode.FORMULA && !value.formula) {
@@ -942,6 +943,7 @@ exports.EControlType = void 0;
942
943
  EControlType["inputMarkdown"] = "inputMarkdown";
943
944
  EControlType["filter"] = "filter";
944
945
  EControlType["actionOnClick"] = "actionOnClick";
946
+ EControlType["eventsPicker"] = "eventsPicker";
945
947
  })(exports.EControlType || (exports.EControlType = {}));
946
948
 
947
949
  exports.ESortDirection = void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/widget-sdk",
3
- "version": "3.24.1",
3
+ "version": "3.25.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",