@legalplace/tagextractor 2.1.0 → 2.3.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/.eslintignore +2 -0
- package/.eslintrc +2 -58
- package/CHANGELOG.md +17 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/libs/Extractor.d.ts +5 -5
- package/dist/libs/Extractor.js +99 -100
- package/dist/libs/Extractor.test.d.ts +1 -0
- package/dist/libs/Extractor.test.js +274 -0
- package/dist/libs/fixtures/inputs.json +60 -0
- package/dist/libs/fixtures/model.json +291 -0
- package/dist/libs/fixtures/ovc.json +15 -0
- package/dist/libs/fixtures/references.json +946 -0
- package/jest.config.ts +205 -0
- package/package.json +25 -22
- package/setupJest.ts +8 -0
- package/src/index.ts +4 -4
- package/src/libs/Extractor.test.ts +360 -0
- package/src/libs/Extractor.ts +127 -72
- package/src/libs/fixtures/inputs.json +60 -0
- package/src/libs/fixtures/model.json +291 -0
- package/src/libs/fixtures/ovc.json +15 -0
- package/src/libs/fixtures/references.json +946 -0
- package/src/types/tags.type.ts +15 -15
- package/tsconfig.json +21 -8
- package/.gitlab-ci.yml +0 -43
- package/.prettierrc.js +0 -10
- package/tsconfig.eslint.json +0 -12
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"options": {
|
|
3
|
+
"1": [
|
|
4
|
+
true
|
|
5
|
+
],
|
|
6
|
+
"2": [
|
|
7
|
+
true
|
|
8
|
+
],
|
|
9
|
+
"5": [
|
|
10
|
+
true
|
|
11
|
+
],
|
|
12
|
+
"6": [
|
|
13
|
+
true
|
|
14
|
+
],
|
|
15
|
+
"7": [
|
|
16
|
+
true
|
|
17
|
+
],
|
|
18
|
+
"8": [
|
|
19
|
+
false
|
|
20
|
+
],
|
|
21
|
+
"10": [
|
|
22
|
+
false
|
|
23
|
+
],
|
|
24
|
+
"11": [
|
|
25
|
+
true
|
|
26
|
+
],
|
|
27
|
+
"12": [
|
|
28
|
+
true
|
|
29
|
+
],
|
|
30
|
+
"13": [
|
|
31
|
+
false
|
|
32
|
+
],
|
|
33
|
+
"14": [
|
|
34
|
+
false
|
|
35
|
+
],
|
|
36
|
+
"15": [
|
|
37
|
+
false
|
|
38
|
+
],
|
|
39
|
+
"16": [
|
|
40
|
+
true
|
|
41
|
+
],
|
|
42
|
+
"18": [
|
|
43
|
+
false
|
|
44
|
+
],
|
|
45
|
+
"24": [
|
|
46
|
+
true
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"variables": {
|
|
50
|
+
"1": [
|
|
51
|
+
"Company"
|
|
52
|
+
],
|
|
53
|
+
"2": [
|
|
54
|
+
""
|
|
55
|
+
],
|
|
56
|
+
"5": [
|
|
57
|
+
"Non merci"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
{
|
|
2
|
+
"documents": {
|
|
3
|
+
"main": {
|
|
4
|
+
"name": "main",
|
|
5
|
+
"sections": [
|
|
6
|
+
{
|
|
7
|
+
"id": 1,
|
|
8
|
+
"label": "Première section",
|
|
9
|
+
"options": [
|
|
10
|
+
1,
|
|
11
|
+
2,
|
|
12
|
+
5,
|
|
13
|
+
6,
|
|
14
|
+
7,
|
|
15
|
+
11
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": 2,
|
|
20
|
+
"label": "Deuxième section ",
|
|
21
|
+
"options": [
|
|
22
|
+
15,
|
|
23
|
+
16
|
|
24
|
+
],
|
|
25
|
+
"grantLevel": "ADMIN"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"options": {
|
|
31
|
+
"1": {
|
|
32
|
+
"meta": {
|
|
33
|
+
"type": "hidden",
|
|
34
|
+
"label": "Text de la question",
|
|
35
|
+
"output": "<p></p>",
|
|
36
|
+
"step": "*",
|
|
37
|
+
"id": 1
|
|
38
|
+
},
|
|
39
|
+
"variables": [],
|
|
40
|
+
"options": []
|
|
41
|
+
},
|
|
42
|
+
"2": {
|
|
43
|
+
"meta": {
|
|
44
|
+
"type": "box",
|
|
45
|
+
"id": 2,
|
|
46
|
+
"step": "*",
|
|
47
|
+
"box": {
|
|
48
|
+
"type": "light",
|
|
49
|
+
"content": "<p>Ceci est du texte de présentation de la première section</p>"
|
|
50
|
+
},
|
|
51
|
+
"label": ""
|
|
52
|
+
},
|
|
53
|
+
"options": [],
|
|
54
|
+
"variables": []
|
|
55
|
+
},
|
|
56
|
+
"5": {
|
|
57
|
+
"meta": {
|
|
58
|
+
"type": "checkbox",
|
|
59
|
+
"id": 5,
|
|
60
|
+
"step": "*",
|
|
61
|
+
"label": "J'ai déjà choisi le nom de mon entreprise (conditionne la question sur le nom de l'entreprise)",
|
|
62
|
+
"conditions": {
|
|
63
|
+
"and": [
|
|
64
|
+
{
|
|
65
|
+
"selected": [
|
|
66
|
+
{
|
|
67
|
+
"var": "o.12"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"options": [],
|
|
75
|
+
"variables": []
|
|
76
|
+
},
|
|
77
|
+
"6": {
|
|
78
|
+
"meta": {
|
|
79
|
+
"type": "static",
|
|
80
|
+
"id": 6,
|
|
81
|
+
"label": "Quel est le nom de votre entreprise ?",
|
|
82
|
+
"step": "*",
|
|
83
|
+
"conditions": {
|
|
84
|
+
"and": [
|
|
85
|
+
{
|
|
86
|
+
"selected": [
|
|
87
|
+
{
|
|
88
|
+
"var": "o.5"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"multiple": {
|
|
95
|
+
"enabled": false
|
|
96
|
+
},
|
|
97
|
+
"style": "full"
|
|
98
|
+
},
|
|
99
|
+
"options": [
|
|
100
|
+
18,
|
|
101
|
+
24
|
|
102
|
+
],
|
|
103
|
+
"variables": [
|
|
104
|
+
1
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"7": {
|
|
108
|
+
"meta": {
|
|
109
|
+
"type": "static",
|
|
110
|
+
"id": 7,
|
|
111
|
+
"label": "Connaissiez-vous déjà LegalPlace ?",
|
|
112
|
+
"step": "*",
|
|
113
|
+
"hidden": false,
|
|
114
|
+
"tags": [
|
|
115
|
+
"LP_fan"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"options": [
|
|
119
|
+
8,
|
|
120
|
+
10
|
|
121
|
+
],
|
|
122
|
+
"variables": []
|
|
123
|
+
},
|
|
124
|
+
"8": {
|
|
125
|
+
"meta": {
|
|
126
|
+
"type": "radio",
|
|
127
|
+
"id": 8,
|
|
128
|
+
"step": "*",
|
|
129
|
+
"label": "Oui j'adore"
|
|
130
|
+
},
|
|
131
|
+
"options": [],
|
|
132
|
+
"variables": []
|
|
133
|
+
},
|
|
134
|
+
"10": {
|
|
135
|
+
"meta": {
|
|
136
|
+
"type": "radio",
|
|
137
|
+
"id": 10,
|
|
138
|
+
"step": "*",
|
|
139
|
+
"label": "Non"
|
|
140
|
+
},
|
|
141
|
+
"options": [],
|
|
142
|
+
"variables": []
|
|
143
|
+
},
|
|
144
|
+
"11": {
|
|
145
|
+
"meta": {
|
|
146
|
+
"type": "static",
|
|
147
|
+
"id": 11,
|
|
148
|
+
"label": "Quel type d'entreprise ? ",
|
|
149
|
+
"step": "*"
|
|
150
|
+
},
|
|
151
|
+
"options": [
|
|
152
|
+
12,
|
|
153
|
+
13,
|
|
154
|
+
14
|
|
155
|
+
],
|
|
156
|
+
"variables": []
|
|
157
|
+
},
|
|
158
|
+
"12": {
|
|
159
|
+
"meta": {
|
|
160
|
+
"type": "radio",
|
|
161
|
+
"id": 12,
|
|
162
|
+
"step": "*",
|
|
163
|
+
"label": "SAS"
|
|
164
|
+
},
|
|
165
|
+
"options": [],
|
|
166
|
+
"variables": []
|
|
167
|
+
},
|
|
168
|
+
"13": {
|
|
169
|
+
"meta": {
|
|
170
|
+
"type": "radio",
|
|
171
|
+
"id": 13,
|
|
172
|
+
"step": "*",
|
|
173
|
+
"label": "SASU"
|
|
174
|
+
},
|
|
175
|
+
"options": [],
|
|
176
|
+
"variables": []
|
|
177
|
+
},
|
|
178
|
+
"14": {
|
|
179
|
+
"meta": {
|
|
180
|
+
"type": "radio",
|
|
181
|
+
"id": 14,
|
|
182
|
+
"step": "*",
|
|
183
|
+
"label": "Autre"
|
|
184
|
+
},
|
|
185
|
+
"options": [],
|
|
186
|
+
"variables": []
|
|
187
|
+
},
|
|
188
|
+
"15": {
|
|
189
|
+
"meta": {
|
|
190
|
+
"type": "checkbox",
|
|
191
|
+
"id": 15,
|
|
192
|
+
"step": "*",
|
|
193
|
+
"label": "Je souhaite avoir des questions supplémentaires"
|
|
194
|
+
},
|
|
195
|
+
"options": [],
|
|
196
|
+
"variables": []
|
|
197
|
+
},
|
|
198
|
+
"16": {
|
|
199
|
+
"meta": {
|
|
200
|
+
"type": "static",
|
|
201
|
+
"id": 16,
|
|
202
|
+
"label": "Choisissez le jour de la semaine",
|
|
203
|
+
"step": "*",
|
|
204
|
+
"conditions": {
|
|
205
|
+
"and": [
|
|
206
|
+
{
|
|
207
|
+
"selected": [
|
|
208
|
+
{
|
|
209
|
+
"var": "o.15"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"options": [],
|
|
217
|
+
"variables": [
|
|
218
|
+
2
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
"18": {
|
|
222
|
+
"meta": {
|
|
223
|
+
"type": "checkbox",
|
|
224
|
+
"id": 18,
|
|
225
|
+
"step": "*",
|
|
226
|
+
"label": "Orange"
|
|
227
|
+
},
|
|
228
|
+
"options": [],
|
|
229
|
+
"variables": []
|
|
230
|
+
},
|
|
231
|
+
"24": {
|
|
232
|
+
"meta": {
|
|
233
|
+
"type": "static",
|
|
234
|
+
"id": 24,
|
|
235
|
+
"label": "Voulez-vous changer de nom ? ",
|
|
236
|
+
"step": "*"
|
|
237
|
+
},
|
|
238
|
+
"options": [],
|
|
239
|
+
"variables": [
|
|
240
|
+
5
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"variables": {
|
|
245
|
+
"1": {
|
|
246
|
+
"type": "text",
|
|
247
|
+
"id": 1,
|
|
248
|
+
"label": "Nom de l'entreprise",
|
|
249
|
+
"step": "*",
|
|
250
|
+
"mandatory": false,
|
|
251
|
+
"placeholder": "",
|
|
252
|
+
"conditions": {
|
|
253
|
+
"and": [
|
|
254
|
+
{
|
|
255
|
+
"selected": [
|
|
256
|
+
{
|
|
257
|
+
"var": "o.8"
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
"tags": [
|
|
264
|
+
"Company_name"
|
|
265
|
+
],
|
|
266
|
+
"hidden": false
|
|
267
|
+
},
|
|
268
|
+
"2": {
|
|
269
|
+
"type": "list",
|
|
270
|
+
"id": 2,
|
|
271
|
+
"label": "Dropdown",
|
|
272
|
+
"step": "*",
|
|
273
|
+
"selectValues": [
|
|
274
|
+
"Lundi",
|
|
275
|
+
"Mardi",
|
|
276
|
+
"Mercredi",
|
|
277
|
+
"Jeudi",
|
|
278
|
+
"Vendredi"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"5": {
|
|
282
|
+
"type": "text",
|
|
283
|
+
"id": 5,
|
|
284
|
+
"label": "Field",
|
|
285
|
+
"step": "*",
|
|
286
|
+
"mandatory": false,
|
|
287
|
+
"placeholder": ""
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"customization": {}
|
|
291
|
+
}
|