@legalplace/lplogic 2.1.0 → 2.1.2

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/LpLogic.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- declare const LpLogic: (logic: any, data?: any) => any;
1
+ import jsonLogic from "@legalplace/json-logic-js";
2
+ declare const LpLogic: typeof jsonLogic.apply;
2
3
  export default LpLogic;
package/dist/LpLogic.js CHANGED
@@ -97,6 +97,10 @@ json_logic_js_1.default.add_operation("not-selected", function (values, comparat
97
97
  var filter = reducedValue.filter(function (_value) { return _value !== true; });
98
98
  return reducedValue.length === filter.length;
99
99
  });
100
+ json_logic_js_1.default.add_operation("not-selected-ip", function (values) {
101
+ var filter = values.filter(function (_value) { return _value !== true; });
102
+ return values.length === filter.length;
103
+ });
100
104
  json_logic_js_1.default.add_operation("has-one", function (values, comparator, parents) {
101
105
  var reducedValue = reduceValues(values, parents, function (value, parent) { return value && parent; });
102
106
  if (!Array.isArray(reducedValue))
@@ -190,8 +194,5 @@ var notLike = function (values, comparator, parents) {
190
194
  return reducedValues.length === filter.length;
191
195
  };
192
196
  json_logic_js_1.default.add_operation("not-like", notLike);
193
- var LpLogic = function (logic, data) {
194
- console.log("Condition", { logic: logic, data: data });
195
- return json_logic_js_1.default.apply(logic, data);
196
- };
197
+ var LpLogic = json_logic_js_1.default.apply;
197
198
  exports.default = LpLogic;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/lplogic",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "LegalPlace LpLogic",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",