@inseefr/lunatic 2.7.20-rc.2 → 2.7.21
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/lib/components/checkbox/commons/checkbox-option.spec.js +2 -2
- package/lib/components/commons/components/combo-box/combo-box-content.js +0 -1
- package/lib/components/commons/components/combo-box/combo-box.stories.js +2 -2
- package/lib/components/commons/components/combo-box/panel/option-container.spec.js +2 -2
- package/lib/components/commons/components/html-table/th.spec.js +2 -2
- package/lib/components/commons/components/html-table/thead.spec.js +2 -2
- package/lib/components/commons/components/lunatic-component-with-label.js +2 -2
- package/lib/components/commons/components/lunatic-component-without-label.js +2 -2
- package/lib/components/commons/components/md-label/link.js +2 -2
- package/lib/components/commons/components/md-label/md-label.js +2 -2
- package/lib/components/commons/components/md-label/router-link.js +2 -2
- package/lib/components/commons/components/missing/missing.js +2 -2
- package/lib/components/commons/components/orchestrated-component.js +2 -2
- package/lib/components/commons/create-customizable-field.js +2 -2
- package/lib/components/component-set/lunatic-component-set.js +2 -2
- package/lib/components/datepicker/html/datepicker.js +2 -2
- package/lib/components/declarations/declarations-after-text.js +2 -2
- package/lib/components/declarations/declarations-before-text.js +3 -5
- package/lib/components/declarations/declarations-detachable.js +2 -4
- package/lib/components/dropdown/html/dropdown-writable/writable-option-renderer.js +2 -2
- package/lib/components/duration/durationInput.js +2 -2
- package/lib/components/loop/block-for-loop.js +4 -4
- package/lib/components/loop/loop.js +2 -2
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +2 -2
- package/lib/components/lunatic-components.js +2 -2
- package/lib/components/modal-controls/modal-controls.js +2 -2
- package/lib/components/pairwise-links/pairwise-links.js +2 -2
- package/lib/components/question-explication/question-explication.spec.js +2 -2
- package/lib/components/sequence/sequence.spec.js +2 -3
- package/lib/components/subsequence/subsequence.spec.js +2 -2
- package/lib/components/suggester/html/suggester.js +5 -4
- package/lib/components/suggester/idb-suggester/idb-suggester.js +4 -1
- package/lib/components/suggester/lunatic-suggester.js +2 -0
- package/lib/components/suggester-loader-widget/widget.js +2 -2
- package/lib/i18n/build-dictionary.js +2 -2
- package/lib/i18n/index.js +2 -2
- package/lib/src/components/declarations/declarations-before-text.d.ts +2 -2
- package/lib/src/components/declarations/declarations-detachable.d.ts +2 -2
- package/lib/src/components/sequence/html/sequence.d.ts +1 -1
- package/lib/src/components/suggester/html/suggester.d.ts +1 -0
- package/lib/src/components/suggester/idb-suggester/idb-suggester.d.ts +2 -2
- package/lib/src/components/suggester/lunatic-suggester.d.ts +1 -1
- package/lib/src/components/type.d.ts +3 -2
- package/lib/src/index.d.ts +4 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +28 -32
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +6 -6
- package/lib/src/use-lunatic/commons/fill-components/fill-iterations.d.ts +20 -24
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +11 -11
- package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -1
- package/lib/src/use-lunatic/commons/variables/lunatic-variables-store.d.ts +4 -2
- package/lib/src/use-lunatic/replace-component-sequence.d.ts +1 -5
- package/lib/src/use-lunatic/type-source.d.ts +2 -5
- package/lib/src/use-lunatic/use-lunatic.d.ts +9 -7
- package/lib/stories/behaviour/cleaning/cleaning.stories.js +2 -2
- package/lib/stories/behaviour/controls/controls-externes.stories.js +2 -2
- package/lib/stories/behaviour/controls/controls.stories.js +2 -2
- package/lib/stories/behaviour/missing/missing.stories.js +2 -2
- package/lib/stories/behaviour/others/test.stories.js +2 -2
- package/lib/stories/behaviour/paste/source.json +44337 -5678
- package/lib/stories/behaviour/paste/test.stories.js +2 -2
- package/lib/stories/behaviour/performance/performance.stories.js +2 -2
- package/lib/stories/behaviour/resizing/resizing.stories.js +2 -2
- package/lib/stories/checkbox-boolean/checkboxBoolean.stories.js +2 -2
- package/lib/stories/checkbox-group/checkbox-group.stories.js +2 -2
- package/lib/stories/checkbox-one/checkboxOne.stories.js +2 -2
- package/lib/stories/component-set/component-set.stories.js +2 -2
- package/lib/stories/declaration/input.stories.js +2 -2
- package/lib/stories/disabled/disabled.stories.js +2 -2
- package/lib/stories/dropdown/dropdown.stories.js +2 -2
- package/lib/stories/duration/duration.stories.js +2 -2
- package/lib/stories/filter-description/filter-description.stories.js +2 -2
- package/lib/stories/input/input.stories.js +2 -2
- package/lib/stories/input-number/input-number.stories.js +2 -2
- package/lib/stories/loop/loop.stories.js +2 -2
- package/lib/stories/loop/roster-for-loop.stories.js +2 -2
- package/lib/stories/markdown/markdown.stories.js +2 -2
- package/lib/stories/modal/modal.stories.js +2 -2
- package/lib/stories/overview/overview.stories.js +2 -2
- package/lib/stories/pairwise/pairwise-links.stories.js +2 -2
- package/lib/stories/question/question.stories.js +4 -8
- package/lib/stories/question-context/question-context.stories.js +2 -2
- package/lib/stories/question-explication/question-explication.stories.js +2 -2
- package/lib/stories/question-information/question-information.stories.js +2 -2
- package/lib/stories/questionnaires/logement/logement.stories.js +2 -2
- package/lib/stories/questionnaires/recensement/recensement.stories.js +2 -2
- package/lib/stories/questionnaires/recensement/source.json +2 -2
- package/lib/stories/questionnaires/rp/rp.stories.js +2 -2
- package/lib/stories/questionnaires/simpsons/simpsons.stories.js +2 -2
- package/lib/stories/questionnaires2023/bySequence/ticWeb.stories.js +2 -2
- package/lib/stories/questionnaires2023/famille/famille.stories.js +2 -2
- package/lib/stories/questionnaires2023/simpsons/simpsons.stories.js +2 -2
- package/lib/stories/questionnaires2023/ticTel/ticWeb.stories.js +2 -2
- package/lib/stories/questionnaires2023/ticWeb/ticWeb.stories.js +2 -2
- package/lib/stories/radio/radio.stories.js +2 -2
- package/lib/stories/roundabout/roundabout.stories.js +2 -2
- package/lib/stories/sequence/sequence.stories.js +2 -2
- package/lib/stories/suggester/source-component-set.json +54 -8
- package/lib/stories/suggester/source.json +327 -182
- package/lib/stories/suggester/suggester.stories.js +3 -17
- package/lib/stories/summary/summary.stories.js +2 -2
- package/lib/stories/switch/switch.stories.js +2 -2
- package/lib/stories/table/table.stories.js +2 -2
- package/lib/stories/textarea/textarea.stories.js +2 -2
- package/lib/stories/utils/default-arg-types.js +2 -2
- package/lib/stories/utils/orchestrator.js +3 -2
- package/lib/stories/utils/referentiel.js +5 -14
- package/lib/use-lunatic/commons/check-loops.js +2 -2
- package/lib/use-lunatic/commons/compile-controls.js +2 -2
- package/lib/use-lunatic/commons/create-map-pages.js +2 -2
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +2 -2
- package/lib/use-lunatic/commons/fill-components/fill-component-required.js +2 -2
- package/lib/use-lunatic/commons/fill-components/fill-component-value.js +2 -2
- package/lib/use-lunatic/commons/fill-components/fill-from-state.js +2 -2
- package/lib/use-lunatic/commons/fill-components/fill-iterations.js +2 -2
- package/lib/use-lunatic/commons/fill-components/fill-management.js +2 -2
- package/lib/use-lunatic/commons/fill-components/fill-missing-response.js +2 -2
- package/lib/use-lunatic/commons/fill-components/fill-pagination.js +2 -2
- package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +2 -2
- package/lib/use-lunatic/commons/page-navigation.js +2 -2
- package/lib/use-lunatic/commons/page-navigation.spec.js +2 -2
- package/lib/use-lunatic/commons/variables/get-questionnaire-data.js +2 -2
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.js +30 -4
- package/lib/use-lunatic/reducer/commons/auto-explore-loop.js +2 -2
- package/lib/use-lunatic/reducer/overview/overview-on-change.js +2 -2
- package/lib/use-lunatic/reducer/overview/overview-on-init.js +2 -2
- package/lib/use-lunatic/reducer/reduce-go-next-page.js +2 -2
- package/lib/use-lunatic/reducer/reduce-go-previous-page.js +2 -2
- package/lib/use-lunatic/reducer/reduce-go-to-page.js +2 -2
- package/lib/use-lunatic/reducer/reduce-handle-change.js +2 -2
- package/lib/use-lunatic/reducer/reduce-on-init.js +4 -4
- package/lib/use-lunatic/reducer/reduce-on-set-waiting.js +2 -2
- package/lib/use-lunatic/reducer/reduce-update-state.js +2 -2
- package/lib/use-lunatic/use-lunatic.test.js +2 -2
- package/lib/use-lunatic/use-suggesters.js +2 -2
- package/lib/utils/array.js +0 -1
- package/lib/utils/idb-tools/idb-bulk-insert.js +2 -2
- package/lib/utils/logger.js +2 -2
- package/lib/utils/suggester-workers/append-to-index/prepare-entities.js +2 -2
- package/lib/utils/suggester-workers/append-to-index/store-messages.js +2 -2
- package/lib/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +2 -2
- package/lib/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +2 -2
- package/lib/utils/suggester-workers/commons-tokenizer/create-filter-stop-words.js +2 -2
- package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.js +2 -2
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.js +2 -2
- package/lib/utils/suggester-workers/find-best-label/find-best-label.js +2 -2
- package/lib/utils/suggester-workers/searching/compute-score.js +2 -2
- package/lib/utils/suggester-workers/searching/searching.js +2 -2
- package/package.json +13 -18
- package/workers-release/lunatic-append-worker-0.3.0.js +1 -1
- package/workers-release/lunatic-label-worker-0.3.0.js +1 -1
- package/workers-release/lunatic-search-worker-0.3.0.js +1 -1
- package/lib/stories/suggester/simple.json +0 -168
|
@@ -14,8 +14,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
14
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
16
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
function _toPropertyKey(
|
|
18
|
-
function _toPrimitive(
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
19
|
var stories = {
|
|
20
20
|
title: 'Components/Radio',
|
|
21
21
|
component: _orchestrator["default"],
|
|
@@ -15,8 +15,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
17
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
-
function _toPropertyKey(
|
|
19
|
-
function _toPrimitive(
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
20
|
var stories = {
|
|
21
21
|
title: 'Components/Roundabout',
|
|
22
22
|
component: _orchestrator["default"],
|
|
@@ -15,8 +15,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
17
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
-
function _toPropertyKey(
|
|
19
|
-
function _toPrimitive(
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
20
|
var stories = {
|
|
21
21
|
title: 'Components/Sequence',
|
|
22
22
|
component: _orchestrator["default"],
|
|
@@ -2,21 +2,67 @@
|
|
|
2
2
|
"maxPage": "1",
|
|
3
3
|
"suggesters": [
|
|
4
4
|
{
|
|
5
|
-
"
|
|
5
|
+
"responseNames": ["VARIABLE_ACTIVITE"],
|
|
6
|
+
"name": "L_ACTIVITES-1-0-0",
|
|
6
7
|
"fields": [
|
|
7
8
|
{
|
|
8
9
|
"name": "label",
|
|
9
10
|
"rules": ["[\\w]+"],
|
|
10
11
|
"language": "French",
|
|
11
|
-
"min":
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
"min": 3,
|
|
13
|
+
"stemmer": false,
|
|
14
|
+
"synonyms": {
|
|
15
|
+
"EHPAD": ["EPHAD", "HEPAD", "EPAD", "EPAHD", "EPADH"],
|
|
16
|
+
"plaquisterie": ["PLACO", "PLACOPLATRE"],
|
|
17
|
+
"pneumatiques": ["PNEUS"],
|
|
18
|
+
"prestations": ["PRESTATAIRE"],
|
|
19
|
+
"echafaudages": ["ECHAFFAUDAGE", "ECHAFFAUDEUR"],
|
|
20
|
+
"URSSAF": ["URSAF", "URSAFF"],
|
|
21
|
+
"ascenseurs": ["ASCENCEUR", "ASSENCEUR", "ACSENCEUR"],
|
|
22
|
+
"briqueterie": ["BRIQUETTERIE"],
|
|
23
|
+
"joaillerie": ["JOAILLIER"],
|
|
24
|
+
"agroalimentaire": ["AGGROALIMANTAIRE", "AGROALIMANTAIRE"],
|
|
25
|
+
"alimentaire": ["ALIMANTAIRE"],
|
|
26
|
+
"alimentaires": ["ALIMANTAIRES"],
|
|
27
|
+
"agroalimentaires": ["AGGROALIMANTAIRES", "AGROALIMENTAIRES"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
14
30
|
],
|
|
15
31
|
"queryParser": {
|
|
16
32
|
"type": "tokenized",
|
|
17
|
-
"params": {
|
|
33
|
+
"params": {
|
|
34
|
+
"language": "French",
|
|
35
|
+
"pattern": "[\\w.]+",
|
|
36
|
+
"min": 3,
|
|
37
|
+
"stemmer": false
|
|
38
|
+
}
|
|
18
39
|
},
|
|
19
|
-
"version": "1"
|
|
40
|
+
"version": "1",
|
|
41
|
+
"stopWords": [
|
|
42
|
+
"a",
|
|
43
|
+
"au",
|
|
44
|
+
"dans",
|
|
45
|
+
"de",
|
|
46
|
+
"des",
|
|
47
|
+
"du",
|
|
48
|
+
"en",
|
|
49
|
+
"er",
|
|
50
|
+
"la",
|
|
51
|
+
"le",
|
|
52
|
+
"ou",
|
|
53
|
+
"sur",
|
|
54
|
+
"d",
|
|
55
|
+
"l",
|
|
56
|
+
"aux",
|
|
57
|
+
"dans",
|
|
58
|
+
"un",
|
|
59
|
+
"une",
|
|
60
|
+
"pour",
|
|
61
|
+
"avec",
|
|
62
|
+
"chez",
|
|
63
|
+
"par",
|
|
64
|
+
"les"
|
|
65
|
+
]
|
|
20
66
|
}
|
|
21
67
|
],
|
|
22
68
|
"components": [
|
|
@@ -37,9 +83,9 @@
|
|
|
37
83
|
{
|
|
38
84
|
"id": "communes-2023",
|
|
39
85
|
"componentType": "Suggester",
|
|
40
|
-
"label": { "value": "\"
|
|
86
|
+
"label": { "value": "\"Activité\"", "type": "VTL" },
|
|
41
87
|
"description": "\"industrie\"",
|
|
42
|
-
"storeName": "
|
|
88
|
+
"storeName": "L_ACTIVITES-1-0-0",
|
|
43
89
|
"conditionFilter": {
|
|
44
90
|
"value": "true",
|
|
45
91
|
"type": "VTL"
|