@legalplace/tagextractor 1.1.1 → 1.1.3

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
@@ -1,2 +1,4 @@
1
1
  import TagExtractor from './libs/Extractor';
2
+ import TagsType, { OptionTagType, VariableTagType } from './types/tags.type';
3
+ export { TagsType, OptionTagType, VariableTagType };
2
4
  export default TagExtractor;
@@ -77,11 +77,12 @@ var TagExtractor = (function () {
77
77
  });
78
78
  };
79
79
  TagExtractor.prototype.isVariableDisplayed = function (id, index) {
80
- var _a;
80
+ var _a, _b;
81
81
  var variableCondition = this.getVariableCondition(id, index);
82
82
  var variableParents = ((_a = this.references.relations.variables[id]) === null || _a === void 0 ? void 0 : _a.parents) || [];
83
83
  var parentOptionIsDisplayed = this.isOptionDisplayed(variableParents[0], index);
84
- return [variableCondition, parentOptionIsDisplayed].filter(function (c) { return c !== true; }).length === 0;
84
+ var parentOptionIsTruethful = ((_b = this.inputs.options[variableParents[0]]) === null || _b === void 0 ? void 0 : _b[index]) === true;
85
+ return [variableCondition, parentOptionIsDisplayed, parentOptionIsTruethful].filter(function (c) { return c !== true; }).length === 0;
85
86
  };
86
87
  TagExtractor.prototype.isOptionDisplayed = function (id, index) {
87
88
  var _this = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/tagextractor",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "TagExtractor",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://git.legalplace.eu/legalplace/tagextractor",
package/src/index.ts CHANGED
@@ -1,3 +1,6 @@
1
1
  import TagExtractor from './libs/Extractor'
2
2
 
3
+ import TagsType, { OptionTagType, VariableTagType } from './types/tags.type'
4
+
5
+ export { TagsType, OptionTagType, VariableTagType }
3
6
  export default TagExtractor
@@ -99,8 +99,9 @@ class TagExtractor {
99
99
  const variableCondition = this.getVariableCondition(id, index)
100
100
  const variableParents = this.references.relations.variables[id]?.parents || []
101
101
  const parentOptionIsDisplayed = this.isOptionDisplayed(variableParents[0], index)
102
+ const parentOptionIsTruethful = this.inputs.options[variableParents[0]]?.[index] === true
102
103
 
103
- return [variableCondition, parentOptionIsDisplayed].filter(c => c !== true).length === 0
104
+ return [variableCondition, parentOptionIsDisplayed, parentOptionIsTruethful].filter(c => c !== true).length === 0
104
105
  }
105
106
 
106
107
  /**