plmt-constructor-sdk 0.17.6 → 0.17.9

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.
@@ -1,2 +1,3 @@
1
- import { ColumnType, Condition } from './constants';
1
+ import { Condition } from './constants';
2
+ import { ColumnType } from '../data';
2
3
  export declare function isFulfillingCondition(type: ColumnType, cellValue: any, condition: Condition): boolean;
@@ -1,21 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isFulfillingCondition = void 0;
4
- const constants_1 = require("./constants");
5
4
  const data_1 = require("../data");
6
5
  function isFulfillingCondition(type, cellValue, condition) {
7
6
  const method = condition.condition;
8
7
  const conditionValue = condition.value;
9
8
  switch (type) {
10
- case constants_1.ColumnType.String:
9
+ case data_1.ColumnType.String:
11
10
  return isFulfillingStringCondition(method, cellValue, conditionValue);
12
- case constants_1.ColumnType.Number:
13
- case constants_1.ColumnType.Boolean:
11
+ case data_1.ColumnType.Number:
12
+ case data_1.ColumnType.Boolean:
14
13
  const value = Array.isArray(conditionValue)
15
14
  ? conditionValue.map((item) => Number(item))
16
15
  : conditionValue;
17
16
  return isFulfillingNumberCondition(method, cellValue, value);
18
- case constants_1.ColumnType.Date:
17
+ case data_1.ColumnType.Date:
19
18
  const cellDate = new Date(cellValue);
20
19
  if (Array.isArray(conditionValue)) {
21
20
  if (conditionValue.length < 2)
@@ -1,10 +1,4 @@
1
1
  import { FilterMethod } from '../data';
2
- export declare enum ColumnType {
3
- String = 0,
4
- Number = 1,
5
- Date = 2,
6
- Boolean = 3
7
- }
8
2
  export declare const COLOR_STEPS = 128;
9
3
  export interface Condition {
10
4
  column_id: number;
@@ -1,11 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COLOR_STEPS = exports.ColumnType = void 0;
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 = {}));
3
+ exports.COLOR_STEPS = void 0;
11
4
  exports.COLOR_STEPS = 128;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plmt-constructor-sdk",
3
- "version": "0.17.6",
3
+ "version": "0.17.9",
4
4
  "description": "Набор инструментов для создания виджетов.",
5
5
  "dependencies": {
6
6
  "logical-not": "^1.0.9"