@infomaximum/widget-sdk 4.10.0 → 4.11.0

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
@@ -394,9 +394,9 @@ interface IFormulaFilterValue {
394
394
  /** Метод фильтрации */
395
395
  filteringMethod: valueof<typeof formulaFilterMethods>;
396
396
  /** Выбранные в списке значения в виде моделей */
397
- checkedValues: (string | null)[];
397
+ checkedValues?: (string | null)[];
398
398
  /** Значения полей формы редактора */
399
- formValues: Partial<{
399
+ formValues?: Partial<{
400
400
  [EFormulaFilterFieldKeys.date]: string | null;
401
401
  [EFormulaFilterFieldKeys.dateRange]: [string, string];
402
402
  [EFormulaFilterFieldKeys.duration]: string;
@@ -813,7 +813,6 @@ type TActionOpenView = IActionCommon & {
813
813
  }>));
814
814
  type TActionsOnClick = IActionGoToUrl | IActionRunScript | IActionUpdateVariable | TActionOpenView;
815
815
  interface IWidgetAction extends IActionCommon {
816
- filters: TExtendedFormulaFilterValue[];
817
816
  parameters: TWidgetActionParameter[];
818
817
  type: EActionTypes.EXECUTE_SCRIPT;
819
818
  scriptKey: string;
package/dist/index.esm.js CHANGED
@@ -566,6 +566,9 @@ var getFormulaFilterValues = function (filterValue) {
566
566
  if (checkedValues && checkedValues.length) {
567
567
  return checkedValues;
568
568
  }
569
+ if (!formValues) {
570
+ return [];
571
+ }
569
572
  function stringifyNumbersRange(range) {
570
573
  if (range === void 0) { range = [undefined, undefined]; }
571
574
  return range.map(function (value, index) {
@@ -600,7 +603,7 @@ var getFormulaFilterValues = function (filterValue) {
600
603
  }
601
604
  return compact([datePickerValue]);
602
605
  case EFormatTypes.STRING:
603
- return compact([(_a = formValues === null || formValues === void 0 ? void 0 : formValues[EFormulaFilterFieldKeys.string]) !== null && _a !== void 0 ? _a : null]);
606
+ return compact([(_a = formValues[EFormulaFilterFieldKeys.string]) !== null && _a !== void 0 ? _a : null]);
604
607
  case EFormatTypes.NUMBER:
605
608
  case EFormatTypes.YEAR:
606
609
  case EFormatTypes.DAY_OF_MONTH:
package/dist/index.js CHANGED
@@ -567,6 +567,9 @@ var getFormulaFilterValues = function (filterValue) {
567
567
  if (checkedValues && checkedValues.length) {
568
568
  return checkedValues;
569
569
  }
570
+ if (!formValues) {
571
+ return [];
572
+ }
570
573
  function stringifyNumbersRange(range) {
571
574
  if (range === void 0) { range = [undefined, undefined]; }
572
575
  return range.map(function (value, index) {
@@ -601,7 +604,7 @@ var getFormulaFilterValues = function (filterValue) {
601
604
  }
602
605
  return compact([datePickerValue]);
603
606
  case exports.EFormatTypes.STRING:
604
- return compact([(_a = formValues === null || formValues === void 0 ? void 0 : formValues[exports.EFormulaFilterFieldKeys.string]) !== null && _a !== void 0 ? _a : null]);
607
+ return compact([(_a = formValues[exports.EFormulaFilterFieldKeys.string]) !== null && _a !== void 0 ? _a : null]);
605
608
  case exports.EFormatTypes.NUMBER:
606
609
  case exports.EFormatTypes.YEAR:
607
610
  case exports.EFormatTypes.DAY_OF_MONTH:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/widget-sdk",
3
- "version": "4.10.0",
3
+ "version": "4.11.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",