@inseefr/lunatic 3.6.14 → 3.6.15-rc.1
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/components/Roundabout/Roundabout.js +8 -3
- package/components/Roundabout/Roundabout.js.map +1 -1
- package/esm/components/Roundabout/Roundabout.js +8 -3
- package/esm/components/Roundabout/Roundabout.js.map +1 -1
- package/esm/hooks/useMultimode.d.ts +49 -0
- package/esm/hooks/useMultimode.js +83 -0
- package/esm/hooks/useMultimode.js.map +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/type.source.d.ts +33 -1
- package/esm/type.source.js +0 -1
- package/esm/type.source.js.map +1 -1
- package/esm/use-lunatic/reducer/reduce-go-next-page.js +2 -1
- package/esm/use-lunatic/reducer/reduce-go-next-page.js.map +1 -1
- package/esm/use-lunatic/reducer/reducerInitializer.d.ts +2 -2
- package/esm/use-lunatic/reducer/reducerInitializer.js +31 -24
- package/esm/use-lunatic/reducer/reducerInitializer.js.map +1 -1
- package/esm/use-lunatic/type.d.ts +2 -0
- package/esm/use-lunatic/use-lunatic.js +3 -0
- package/esm/use-lunatic/use-lunatic.js.map +1 -1
- package/esm/utils/getArticulationState.d.ts +64 -0
- package/esm/utils/getArticulationState.js +82 -0
- package/esm/utils/getArticulationState.js.map +1 -0
- package/hooks/useMultimode.d.ts +49 -0
- package/hooks/useMultimode.js +84 -0
- package/hooks/useMultimode.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +18 -1
- package/src/components/Roundabout/Roundabout.tsx +8 -3
- package/src/hooks/useMultimode.ts +102 -0
- package/src/index.ts +1 -0
- package/src/stories/behaviour/articulation/articulation.stories.tsx +90 -0
- package/src/stories/behaviour/articulation/multimode.stories.tsx +19 -0
- package/src/stories/behaviour/articulation/roundabout.json +413 -0
- package/src/stories/utils/Orchestrator.tsx +3 -0
- package/src/stories/utils/OrchestratorSidebar.tsx +25 -1
- package/src/type.source.ts +33 -2
- package/src/use-lunatic/reducer/reduce-go-next-page.ts +2 -1
- package/src/use-lunatic/reducer/reducerInitializer.tsx +40 -29
- package/src/use-lunatic/type.ts +2 -0
- package/src/use-lunatic/use-lunatic.ts +4 -0
- package/src/utils/getArticulationState.ts +124 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/type.source.d.ts +33 -1
- package/type.source.js +0 -1
- package/type.source.js.map +1 -1
- package/use-lunatic/reducer/reduce-go-next-page.js +2 -1
- package/use-lunatic/reducer/reduce-go-next-page.js.map +1 -1
- package/use-lunatic/reducer/reducerInitializer.d.ts +2 -2
- package/use-lunatic/reducer/reducerInitializer.js +31 -24
- package/use-lunatic/reducer/reducerInitializer.js.map +1 -1
- package/use-lunatic/type.d.ts +2 -0
- package/use-lunatic/use-lunatic.js +3 -0
- package/use-lunatic/use-lunatic.js.map +1 -1
- package/utils/getArticulationState.d.ts +64 -0
- package/utils/getArticulationState.js +84 -0
- package/utils/getArticulationState.js.map +1 -0
package/type.source.d.ts
CHANGED
|
@@ -224,7 +224,7 @@ export type Variable = {
|
|
|
224
224
|
dimension?: number;
|
|
225
225
|
};
|
|
226
226
|
export type VariableValue = VariableScalarValue | unknown[];
|
|
227
|
-
export type VariableScalarValue = string | number | null;
|
|
227
|
+
export type VariableScalarValue = string | number | null | boolean;
|
|
228
228
|
/**
|
|
229
229
|
* Representation of a Lunatic questionnaire.
|
|
230
230
|
*/
|
|
@@ -278,6 +278,38 @@ export type LunaticSource = {
|
|
|
278
278
|
};
|
|
279
279
|
};
|
|
280
280
|
maxPage?: string;
|
|
281
|
+
articulation?: {
|
|
282
|
+
/**
|
|
283
|
+
* id du composant roundabout
|
|
284
|
+
*/
|
|
285
|
+
source: string;
|
|
286
|
+
/**
|
|
287
|
+
* Ligne du tableau d'articulation
|
|
288
|
+
*/
|
|
289
|
+
items: {
|
|
290
|
+
/**
|
|
291
|
+
* Libellé du champs
|
|
292
|
+
*/
|
|
293
|
+
label: string;
|
|
294
|
+
/**
|
|
295
|
+
* Expression VTL
|
|
296
|
+
*/
|
|
297
|
+
value: string;
|
|
298
|
+
}[];
|
|
299
|
+
};
|
|
300
|
+
multimode?: {
|
|
301
|
+
questionnaire: {
|
|
302
|
+
rules: {
|
|
303
|
+
[k: string]: VTLExpression;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
leaf: {
|
|
307
|
+
source: string;
|
|
308
|
+
rules: {
|
|
309
|
+
[k: string]: VTLExpression;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
281
313
|
};
|
|
282
314
|
export type VTLExpression = {
|
|
283
315
|
/**
|
package/type.source.js
CHANGED
package/type.source.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.source.js","sourceRoot":"","sources":["src/type.source.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"type.source.js","sourceRoot":"","sources":["src/type.source.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
|
@@ -7,6 +7,7 @@ const page_navigation_1 = require("../commons/page-navigation");
|
|
|
7
7
|
const auto_explore_loop_1 = require("./commons/auto-explore-loop");
|
|
8
8
|
const reduce_handle_changes_1 = require("./reduce-handle-changes");
|
|
9
9
|
const actions_1 = require("../actions");
|
|
10
|
+
const getArticulationState_1 = require("../../utils/getArticulationState");
|
|
10
11
|
function reduceGoNextPage(state) {
|
|
11
12
|
const { pages, pager } = state;
|
|
12
13
|
const parentType = pages[pager.page]?.components[0].componentType;
|
|
@@ -43,7 +44,7 @@ function reduceGoNextPage(state) {
|
|
|
43
44
|
responses: [
|
|
44
45
|
{
|
|
45
46
|
name: firstComponent.progressVariable,
|
|
46
|
-
value:
|
|
47
|
+
value: getArticulationState_1.ArticulationState.COMPLETED,
|
|
47
48
|
iteration: [newState.previousPager.iteration],
|
|
48
49
|
},
|
|
49
50
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reduce-go-next-page.js","sourceRoot":"","sources":["../../src/use-lunatic/reducer/reduce-go-next-page.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"reduce-go-next-page.js","sourceRoot":"","sources":["../../src/use-lunatic/reducer/reduce-go-next-page.ts"],"names":[],"mappings":";;AASA,4CA+DC;AAxED,wCAA+C;AAC/C,0CAAyD;AACzD,gEAA0D;AAE1D,mEAA8D;AAC9D,mEAA8D;AAC9D,wCAAwC;AACxC,2EAAqE;AAErE,SAAgB,gBAAgB,CAC/B,KAA0B;IAE1B,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAC/B,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;IAClE,MAAM,SAAS,GAAG,IAAA,8BAAY,EAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,IAAA,gBAAS,EAAC,SAAS,CAAC,CAAC;IAEpC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,0BAA0B,MAAM,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,QAAQ,GAAG,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAE9C,yCAAyC;IACzC,IAAI,IAAA,kBAAW,EAAC,QAAQ,CAAC,EAAE,CAAC;QAC3B,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED,kCAAkC;IAClC,QAAQ,GAAG,IAAA,mCAAe,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAEhD,sEAAsE;IACtE,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,IAAI,IAAA,kBAAW,EAAC,QAAQ,CAAC,EAAE,CAAC;QAC3D,OAAO,gBAAgB,CAAC,QAAQ,CAAC,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ptions['disableFilters'];
|
|
12
12
|
disableFiltersDescription?: LunaticOptions['disableFiltersDescription'];
|
|
13
13
|
getReferentiel?: LunaticOptions['getReferentiel'];
|
|
14
|
-
onVariableChange
|
|
15
|
-
logger
|
|
14
|
+
onVariableChange?: RefObject<LunaticOptions['onVariableChange']>;
|
|
15
|
+
logger?: LunaticLogger;
|
|
16
16
|
}): LunaticReducerState;
|
|
@@ -32,7 +32,8 @@ const baseState = {
|
|
|
32
32
|
executeExpression: () => null,
|
|
33
33
|
options: { disableFilters: false, disableFiltersDescription: true },
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
const onChange = { current: () => { } };
|
|
36
|
+
function reducerInitializer({ source, data, features = ['VTL'], initialPage = '1', lastReachedPage = undefined, withOverview = false, disableFilters = false, disableFiltersDescription = true, getReferentiel, onVariableChange = onChange, logger = console.error, }) {
|
|
36
37
|
const variables = lunatic_variables_store_1.LunaticVariablesStore.makeFromSource(source, data, onVariableChange, disableFilters, source.pagination !== 'question');
|
|
37
38
|
const pages = (0, commons_1.checkLoops)((0, commons_1.createMapPages)(source));
|
|
38
39
|
if (!source || !data) {
|
|
@@ -70,11 +71,13 @@ function reducerInitializer({ source, data, features = ['VTL'], initialPage = '1
|
|
|
70
71
|
return result;
|
|
71
72
|
}
|
|
72
73
|
catch (e) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
if (logger) {
|
|
75
|
+
// If there is an error interpreting a variable, return the raw expression
|
|
76
|
+
logger({
|
|
77
|
+
type: 'ERROR',
|
|
78
|
+
error: e,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
78
81
|
return expressionString;
|
|
79
82
|
}
|
|
80
83
|
};
|
|
@@ -85,9 +88,9 @@ function reducerInitializer({ source, data, features = ['VTL'], initialPage = '1
|
|
|
85
88
|
const pager = {
|
|
86
89
|
page: initialPager?.page ?? 1,
|
|
87
90
|
maxPage: source.maxPage ? parseInt(source.maxPage, 10) : 1,
|
|
88
|
-
subPage:
|
|
91
|
+
subPage: initialPager?.subPage,
|
|
89
92
|
nbSubPages: undefined,
|
|
90
|
-
iteration:
|
|
93
|
+
iteration: initialPager?.iteration,
|
|
91
94
|
nbIterations: undefined,
|
|
92
95
|
lastReachedPage: lastReachedPage ?? initialPage,
|
|
93
96
|
};
|
|
@@ -96,7 +99,7 @@ function reducerInitializer({ source, data, features = ['VTL'], initialPage = '1
|
|
|
96
99
|
pager,
|
|
97
100
|
previousPager: pager,
|
|
98
101
|
pages,
|
|
99
|
-
isInLoop:
|
|
102
|
+
isInLoop: pager.subPage !== undefined,
|
|
100
103
|
updatedAt: Date.now(),
|
|
101
104
|
overview: withOverview ? (0, overviewOnInit_1.buildOverview)(source) : [],
|
|
102
105
|
updateBindings,
|
|
@@ -113,21 +116,25 @@ function fillPagerForLoop(state) {
|
|
|
113
116
|
return state;
|
|
114
117
|
}
|
|
115
118
|
const { isLoop, subPages, iterations, loopDependencies } = pages[pager.page];
|
|
116
|
-
if (
|
|
117
|
-
|
|
119
|
+
if (
|
|
120
|
+
// For loop, jump at the first page
|
|
121
|
+
isLoop ||
|
|
122
|
+
// For roundabout, jump at the desired iteration / subpage (only if defined)
|
|
123
|
+
(pager?.iteration !== undefined && subPages)) {
|
|
124
|
+
return {
|
|
125
|
+
...state,
|
|
126
|
+
isInLoop: true,
|
|
127
|
+
pager: {
|
|
128
|
+
...pager,
|
|
129
|
+
subPage: pager?.subPage ?? 1,
|
|
130
|
+
nbSubPages: (subPages ?? []).length,
|
|
131
|
+
iteration: pager?.iteration ?? 0,
|
|
132
|
+
nbIterations: (0, number_1.forceInt)(state.executeExpression(iterations, {
|
|
133
|
+
deps: loopDependencies,
|
|
134
|
+
})),
|
|
135
|
+
},
|
|
136
|
+
};
|
|
118
137
|
}
|
|
119
|
-
return
|
|
120
|
-
...state,
|
|
121
|
-
isInLoop: true,
|
|
122
|
-
pager: {
|
|
123
|
-
...pager,
|
|
124
|
-
subPage: pager?.subPage ?? 0,
|
|
125
|
-
nbSubPages: (subPages ?? []).length,
|
|
126
|
-
iteration: pager?.iteration ?? 0,
|
|
127
|
-
nbIterations: (0, number_1.forceInt)(state.executeExpression(iterations, {
|
|
128
|
-
deps: loopDependencies,
|
|
129
|
-
})),
|
|
130
|
-
},
|
|
131
|
-
};
|
|
138
|
+
return state;
|
|
132
139
|
}
|
|
133
140
|
//# sourceMappingURL=reducerInitializer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducerInitializer.js","sourceRoot":"","sources":["../../src/use-lunatic/reducer/reducerInitializer.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"reducerInitializer.js","sourceRoot":"","sources":["../../src/use-lunatic/reducer/reducerInitializer.tsx"],"names":[],"mappings":";;AA0CA,gDAsHC;;AA1JD,0FAAqF;AACrF,wCAAwD;AACxD,yCAA2E;AAC3E,qDAAgD;AAChD,qEAAkE;AAClE,kDAA0D;AAC1D,8DAA0D;AAC1D,+CAA8C;AAC9C,8EAA2E;AAI3E,MAAM,SAAS,GAAG;IACjB,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,SAAS;IAC3B,YAAY,EAAE,SAAS;CACvB,CAAC;AACF,MAAM,SAAS,GAAG;IACjB,SAAS,EAAE,IAAI,+CAAqB,EAAE;IACtC,KAAK,EAAE,SAAS;IAChB,aAAa,EAAE,SAAS;IACxB,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;IACrB,QAAQ,EAAE,EAAE;IACZ,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,iBAAiB,EAAE,GAAO,EAAE,CAAC,IAAS;IACtC,OAAO,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE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BAC5B,UAAU,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,MAAM;gBACnC,SAAS,EAAE,KAAK,EAAE,SAAS,IAAI,CAAC;gBAChC,YAAY,EAAE,IAAA,iBAAQ,EACrB,KAAK,CAAC,iBAAiB,CAAC,UAAU,EAAE;oBACnC,IAAI,EAAE,gBAAgB;iBACtB,CAAC,CACF;aACD;SACD,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC"}
|
package/use-lunatic/type.d.ts
CHANGED
|
@@ -329,6 +329,8 @@ export type LunaticState = {
|
|
|
329
329
|
* ])
|
|
330
330
|
*/
|
|
331
331
|
handleChanges: LunaticChangesHandler;
|
|
332
|
+
/** Return the multimode state **/
|
|
333
|
+
getMultimode: () => Record<string, boolean>;
|
|
332
334
|
};
|
|
333
335
|
/** Function taking as arguments the various changes the user has made. */
|
|
334
336
|
export type LunaticChangesHandler = (args: {
|
|
@@ -25,6 +25,7 @@ const useRefSync_1 = require("../hooks/useRefSync");
|
|
|
25
25
|
const ConsoleLogger_1 = require("./logger/ConsoleLogger");
|
|
26
26
|
const useWarnDepChange_1 = require("./hooks/useWarnDepChange");
|
|
27
27
|
const useCallbackOnNextRender_1 = require("./hooks/useCallbackOnNextRender");
|
|
28
|
+
const useMultimode_1 = require("../hooks/useMultimode");
|
|
28
29
|
const empty = {}; // Keep the same empty object (to avoid problem with useEffect dependencies)
|
|
29
30
|
const DEFAULT_DATA = empty;
|
|
30
31
|
const DEFAULT_FEATURES = ['VTL', 'MD'];
|
|
@@ -123,6 +124,7 @@ argOptions = empty) {
|
|
|
123
124
|
return (0, get_questionnaire_data_1.getQuestionnaireData)(state.variables, source.variables, withRefreshedCalculated, variableNames);
|
|
124
125
|
};
|
|
125
126
|
const { resetChangedData, getChangedData } = (0, use_track_changes_1.useTrackChanges)(trackChanges, state.variables, (variableNames) => getData(false, variableNames));
|
|
127
|
+
const { getMultimode } = (0, useMultimode_1.useMultimode)(source, state.variables);
|
|
126
128
|
const pageTag = (0, commons_1.getPageTag)(state.pager);
|
|
127
129
|
const { isFirstPage, isLastPage } = (0, commons_1.isFirstLastPage)(state.pager);
|
|
128
130
|
const components = (0, fill_components_1.fillComponents)((0, get_components_from_state_1.getComponentsFromState)(state), {
|
|
@@ -163,6 +165,7 @@ argOptions = empty) {
|
|
|
163
165
|
// Components
|
|
164
166
|
Provider,
|
|
165
167
|
handleChanges,
|
|
168
|
+
getMultimode,
|
|
166
169
|
};
|
|
167
170
|
}
|
|
168
171
|
//# sourceMappingURL=use-lunatic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-lunatic.js","sourceRoot":"","sources":["../src/use-lunatic/use-lunatic.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"use-lunatic.js","sourceRoot":"","sources":["../src/use-lunatic/use-lunatic.ts"],"names":[],"mappings":";;;;;AAyEA,gCA+KC;AAxPD,iCAAyD;AACzD,uCAKmB;AACnB,uCAAwD;AAExD,mDAAwB;AACxB,kDAA+C;AAC/C,uDAA0D;AAS1D,iEAAmF;AACnF,mEAA8D;AAC9D,uFAAkF;AAClF,kEAA6D;AAC7D,yEAAmE;AACnE,qDAAkD;AAClD,qEAAkE;AAClE,mFAA6E;AAC7E,+EAA2E;AAC3E,+CAA4C;AAC5C,4CAA+C;AAC/C,oDAAiD;AACjD,0DAAuD;AACvD,+DAA4D;AAC5D,6EAA0E;AAC1E,wDAAqD;AAErD,MAAM,KAAK,GAAG,EAAE,CAAC,CAAC,4EAA4E;AAC9F,MAAM,YAAY,GAAG,KAAoB,CAAC;AAC1C,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,IAAI,CAAkB,CAAC;AACxD,MAAM,mBAAmB,GAAG,CAAC,qBAAS,CAAkB,CAAC;AACzD,MAAM,gBAAgB,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAEvD,MAAM,iBAAiB,GAAG,cAA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,CAAC;IAEF,OAAO;QACN,OAAO;QACP,WAAW;QACX,UAAU;QACV,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,IAAA,yBAAW,EAAC,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC;QACvC,aAAa,EAAE,IAAA,qCAAgB,EAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;QACzD,UAAU;QACV,aAAa;QACb,cAAc;QACd,UAAU;QACV,QAAQ;QACR,eAAe;QACf,OAAO;QACP,cAAc;QACd,gBAAgB;QAChB,eAAe,EAAE,IAAA,0CAAkB,EAAC,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC;QACxE,aAAa;QACb,QAAQ;QACR,aAAa;QACb,YAAY;KACW,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ComponentDefinition, ComponentRoundaboutDefinition, LunaticSource } from '../type.source';
|
|
2
|
+
import type { LunaticData, PageTag } from '../use-lunatic/type';
|
|
3
|
+
import { type ReactNode } from 'react';
|
|
4
|
+
export declare enum ArticulationState {
|
|
5
|
+
COMPLETED = 1,
|
|
6
|
+
STARTED = 0,
|
|
7
|
+
NOT_STARTED = -1
|
|
8
|
+
}
|
|
9
|
+
type ArticulationItem = {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
type Articulation = {
|
|
14
|
+
source: string;
|
|
15
|
+
items: ArticulationItem[];
|
|
16
|
+
};
|
|
17
|
+
type Item = {
|
|
18
|
+
cells: {
|
|
19
|
+
label: string;
|
|
20
|
+
value: ReactNode;
|
|
21
|
+
}[];
|
|
22
|
+
progress: ArticulationState;
|
|
23
|
+
page: PageTag;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Retrieve the articulation state
|
|
27
|
+
*
|
|
28
|
+
* The goal of this function is to provide insights about a roundabout using extra information inserted in the JSON source
|
|
29
|
+
* provided to Lunatic.
|
|
30
|
+
*
|
|
31
|
+
* For instance
|
|
32
|
+
*
|
|
33
|
+
* ```
|
|
34
|
+
* "articulation": {
|
|
35
|
+
* "source": "roundabout",
|
|
36
|
+
* "items": [
|
|
37
|
+
* {
|
|
38
|
+
* "label": "Prénom",
|
|
39
|
+
* "value": "PRENOMS"
|
|
40
|
+
* },
|
|
41
|
+
* {
|
|
42
|
+
* "label": "Sexe",
|
|
43
|
+
* "value": "if SEXE = \"H\" then \"Homme\" else \"Femme\""
|
|
44
|
+
* },
|
|
45
|
+
* {
|
|
46
|
+
* "label": "Age",
|
|
47
|
+
* "value": "cast(AGE, string) || \" ans\""
|
|
48
|
+
* }
|
|
49
|
+
* ]
|
|
50
|
+
* },
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* - source is the ID of the roundabout component
|
|
54
|
+
* - items define the field to extract from the roundabout data
|
|
55
|
+
*/
|
|
56
|
+
export declare function getArticulationState(source: LunaticSource & {
|
|
57
|
+
articulation: Articulation;
|
|
58
|
+
}, data: LunaticData): {
|
|
59
|
+
items: Item[];
|
|
60
|
+
};
|
|
61
|
+
export declare function findComponentById(components: ComponentDefinition[], id: string): (ComponentRoundaboutDefinition & {
|
|
62
|
+
page?: string;
|
|
63
|
+
}) | null;
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArticulationState = void 0;
|
|
4
|
+
exports.getArticulationState = getArticulationState;
|
|
5
|
+
exports.findComponentById = findComponentById;
|
|
6
|
+
const reducerInitializer_1 = require("../use-lunatic/reducer/reducerInitializer");
|
|
7
|
+
const array_1 = require("./array");
|
|
8
|
+
const number_1 = require("./number");
|
|
9
|
+
var ArticulationState;
|
|
10
|
+
(function (ArticulationState) {
|
|
11
|
+
ArticulationState[ArticulationState["COMPLETED"] = 1] = "COMPLETED";
|
|
12
|
+
ArticulationState[ArticulationState["STARTED"] = 0] = "STARTED";
|
|
13
|
+
ArticulationState[ArticulationState["NOT_STARTED"] = -1] = "NOT_STARTED";
|
|
14
|
+
})(ArticulationState || (exports.ArticulationState = ArticulationState = {}));
|
|
15
|
+
/**
|
|
16
|
+
* Retrieve the articulation state
|
|
17
|
+
*
|
|
18
|
+
* The goal of this function is to provide insights about a roundabout using extra information inserted in the JSON source
|
|
19
|
+
* provided to Lunatic.
|
|
20
|
+
*
|
|
21
|
+
* For instance
|
|
22
|
+
*
|
|
23
|
+
* ```
|
|
24
|
+
* "articulation": {
|
|
25
|
+
* "source": "roundabout",
|
|
26
|
+
* "items": [
|
|
27
|
+
* {
|
|
28
|
+
* "label": "Prénom",
|
|
29
|
+
* "value": "PRENOMS"
|
|
30
|
+
* },
|
|
31
|
+
* {
|
|
32
|
+
* "label": "Sexe",
|
|
33
|
+
* "value": "if SEXE = \"H\" then \"Homme\" else \"Femme\""
|
|
34
|
+
* },
|
|
35
|
+
* {
|
|
36
|
+
* "label": "Age",
|
|
37
|
+
* "value": "cast(AGE, string) || \" ans\""
|
|
38
|
+
* }
|
|
39
|
+
* ]
|
|
40
|
+
* },
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* - source is the ID of the roundabout component
|
|
44
|
+
* - items define the field to extract from the roundabout data
|
|
45
|
+
*/
|
|
46
|
+
function getArticulationState(source, data) {
|
|
47
|
+
const roundabout = findComponentById(source.components, source.articulation.source);
|
|
48
|
+
const { variables } = (0, reducerInitializer_1.reducerInitializer)({ source, data });
|
|
49
|
+
const iterations = (0, number_1.forceInt)(variables.run(roundabout?.iterations.value ?? '0'));
|
|
50
|
+
const rows = (0, array_1.times)(iterations, (k) => source.articulation.items.map((item) => ({
|
|
51
|
+
label: item.label,
|
|
52
|
+
value: variables.run(item.value, { iteration: [k] }),
|
|
53
|
+
})));
|
|
54
|
+
if (!roundabout) {
|
|
55
|
+
return {
|
|
56
|
+
items: [],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
items: rows.map((row, k) => ({
|
|
61
|
+
cells: row,
|
|
62
|
+
progress: (0, number_1.forceInt)(variables.get(roundabout.progressVariable, [k]) ??
|
|
63
|
+
ArticulationState.NOT_STARTED),
|
|
64
|
+
page: (roundabout.page
|
|
65
|
+
? `${roundabout.page}.1#${k + 1}`
|
|
66
|
+
: '1'),
|
|
67
|
+
})),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function findComponentById(components, id) {
|
|
71
|
+
for (const c of components) {
|
|
72
|
+
if ('id' in c && c.id === id && c.componentType === 'Roundabout') {
|
|
73
|
+
return c;
|
|
74
|
+
}
|
|
75
|
+
if ('components' in c) {
|
|
76
|
+
const child = findComponentById(c.components, id);
|
|
77
|
+
if (child) {
|
|
78
|
+
return child;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=getArticulationState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getArticulationState.js","sourceRoot":"","sources":["../src/utils/getArticulationState.ts"],"names":[],"mappings":";;;AAmEA,oDAsCC;AAED,8CAgBC;AArHD,kFAA+E;AAE/E,mCAAgC;AAChC,qCAAoC;AAEpC,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC5B,mEAAa,CAAA;IACb,+DAAW,CAAA;IACX,wEAAgB,CAAA;AACjB,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAgB,oBAAoB,CACnC,MAAsD,EACtD,IAAiB;IAEjB,MAAM,UAAU,GAAG,iBAAiB,CACnC,MAAM,CAAC,UAAU,EACjB,MAAM,CAAC,YAAY,CAAC,MAAM,CAC1B,CAAC;IACF,MAAM,EAAE,SAAS,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