@legalplace/tagextractor 1.1.2 → 1.1.4
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 +2 -0
- package/dist/libs/OvcConverter.js +5 -3
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/libs/OvcConverter.ts +5 -3
package/dist/index.d.ts
CHANGED
|
@@ -38,13 +38,15 @@ var OvcConverter = (function () {
|
|
|
38
38
|
currentOption.forEach(function (childId, index) {
|
|
39
39
|
var sanitizedId = typeof childId === 'string' && childId.split('_').length > 0 ? childId.split('_')[0] : childId;
|
|
40
40
|
if (!Object.prototype.hasOwnProperty.call(inputs.options, id)) {
|
|
41
|
-
|
|
41
|
+
var defaultValue = references.options[id].meta.type === 'static';
|
|
42
|
+
inputs.options[id] = new Array(occurences_1).fill(defaultValue);
|
|
42
43
|
}
|
|
43
44
|
if (typeof sanitizedId === 'string' && sanitizedId.trim().length === 0) {
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
47
|
if (!Object.prototype.hasOwnProperty.call(inputs.options, sanitizedId)) {
|
|
47
|
-
|
|
48
|
+
var defaultValue = references.options[sanitizedId].meta.type === 'static';
|
|
49
|
+
inputs.options[sanitizedId] = new Array(occurences_1).fill(defaultValue);
|
|
48
50
|
}
|
|
49
51
|
inputs.options = __assign(__assign({}, inputs.options), _this.pushStaticChildren(inputs.options, sanitizedId, occurences_1, references));
|
|
50
52
|
inputs.options[sanitizedId][index] = true;
|
|
@@ -125,7 +127,7 @@ var OvcConverter = (function () {
|
|
|
125
127
|
});
|
|
126
128
|
staticOptions.forEach(function (childId) {
|
|
127
129
|
if (!Object.prototype.hasOwnProperty.call(result, childId)) {
|
|
128
|
-
result[childId] = new Array(occurences).fill(
|
|
130
|
+
result[childId] = new Array(occurences).fill(true);
|
|
129
131
|
}
|
|
130
132
|
});
|
|
131
133
|
return result;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/libs/OvcConverter.ts
CHANGED
|
@@ -29,7 +29,8 @@ class OvcConverter {
|
|
|
29
29
|
|
|
30
30
|
// Making sure the input exist
|
|
31
31
|
if (!Object.prototype.hasOwnProperty.call(inputs.options, id)) {
|
|
32
|
-
|
|
32
|
+
const defaultValue = references.options[id].meta.type === 'static'
|
|
33
|
+
inputs.options[id] = new Array(occurences).fill(defaultValue)
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
// Making sure the childId is not empty
|
|
@@ -39,7 +40,8 @@ class OvcConverter {
|
|
|
39
40
|
|
|
40
41
|
// Creating input if it doesn't exist
|
|
41
42
|
if (!Object.prototype.hasOwnProperty.call(inputs.options, sanitizedId)) {
|
|
42
|
-
|
|
43
|
+
const defaultValue = references.options[sanitizedId].meta.type === 'static'
|
|
44
|
+
inputs.options[sanitizedId] = new Array(occurences).fill(defaultValue)
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
// Adding static childrens
|
|
@@ -142,7 +144,7 @@ class OvcConverter {
|
|
|
142
144
|
staticOptions.forEach(childId => {
|
|
143
145
|
// Creating input if it doesn't exist
|
|
144
146
|
if (!Object.prototype.hasOwnProperty.call(result, childId)) {
|
|
145
|
-
result[childId] = new Array(occurences).fill(
|
|
147
|
+
result[childId] = new Array(occurences).fill(true)
|
|
146
148
|
}
|
|
147
149
|
})
|
|
148
150
|
|