@inseefr/lunatic 3.5.0-rc.0 → 3.5.0-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/Datepicker/Datepicker.js +1 -1
- package/components/Datepicker/Datepicker.js.map +1 -1
- package/components/Duration/Duration.js +3 -2
- package/components/Duration/Duration.js.map +1 -1
- package/components/Input/Input.js +6 -3
- package/components/Input/Input.js.map +1 -1
- package/components/Input/Input.spec.js +25 -0
- package/components/Input/Input.spec.js.map +1 -1
- package/components/InputNumber/InputNumber.js +1 -1
- package/components/InputNumber/InputNumber.js.map +1 -1
- package/components/InputNumber/InputNumber.spec.js +9 -1
- package/components/InputNumber/InputNumber.spec.js.map +1 -1
- package/components/InputNumber/InputNumberThousand.d.ts +2 -1
- package/components/InputNumber/InputNumberThousand.js +8 -2
- package/components/InputNumber/InputNumberThousand.js.map +1 -1
- package/components/Loop/Loop.js +1 -1
- package/components/Loop/Loop.js.map +1 -1
- package/components/Loop/Loop.spec.d.ts +1 -0
- package/components/Loop/Loop.spec.js +39 -0
- package/components/Loop/Loop.spec.js.map +1 -0
- package/components/Roundabout/CustomRoundabout.d.ts +1 -1
- package/components/Roundabout/CustomRoundabout.js +4 -3
- package/components/Roundabout/CustomRoundabout.js.map +1 -1
- package/components/Roundabout/roundabout.spec.js +3 -1
- package/components/Roundabout/roundabout.spec.js.map +1 -1
- package/components/Textarea/Textarea.js +4 -1
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.spec.js +13 -0
- package/components/Textarea/Textarea.spec.js.map +1 -1
- package/components/shared/CharactersCount/CharactersCount.d.ts +7 -0
- package/components/shared/CharactersCount/CharactersCount.js +20 -0
- package/components/shared/CharactersCount/CharactersCount.js.map +1 -0
- package/components/shared/CharactersCount/CharactersCount.spec.d.ts +1 -0
- package/components/shared/CharactersCount/CharactersCount.spec.js +28 -0
- package/components/shared/CharactersCount/CharactersCount.spec.js.map +1 -0
- package/components/shared/Label/Label.js +1 -1
- package/components/shared/Label/Label.js.map +1 -1
- package/components/shared/Label/Label.spec.js +11 -3
- package/components/shared/Label/Label.spec.js.map +1 -1
- package/components/shared/utils/getCharactersCountId.d.ts +4 -0
- package/components/shared/utils/getCharactersCountId.js +10 -0
- package/components/shared/utils/getCharactersCountId.js.map +1 -0
- package/components/type.d.ts +1 -0
- package/esm/components/Datepicker/Datepicker.js +1 -1
- package/esm/components/Datepicker/Datepicker.js.map +1 -1
- package/esm/components/Duration/Duration.js +3 -2
- package/esm/components/Duration/Duration.js.map +1 -1
- package/esm/components/Input/Input.js +6 -3
- package/esm/components/Input/Input.js.map +1 -1
- package/esm/components/Input/Input.spec.js +25 -0
- package/esm/components/Input/Input.spec.js.map +1 -1
- package/esm/components/InputNumber/InputNumber.js +1 -1
- package/esm/components/InputNumber/InputNumber.js.map +1 -1
- package/esm/components/InputNumber/InputNumber.spec.js +9 -1
- package/esm/components/InputNumber/InputNumber.spec.js.map +1 -1
- package/esm/components/InputNumber/InputNumberThousand.d.ts +2 -1
- package/esm/components/InputNumber/InputNumberThousand.js +8 -2
- package/esm/components/InputNumber/InputNumberThousand.js.map +1 -1
- package/esm/components/Loop/Loop.js +1 -1
- package/esm/components/Loop/Loop.js.map +1 -1
- package/esm/components/Loop/Loop.spec.d.ts +1 -0
- package/esm/components/Loop/Loop.spec.js +37 -0
- package/esm/components/Loop/Loop.spec.js.map +1 -0
- package/esm/components/Roundabout/CustomRoundabout.d.ts +1 -1
- package/esm/components/Roundabout/CustomRoundabout.js +4 -3
- package/esm/components/Roundabout/CustomRoundabout.js.map +1 -1
- package/esm/components/Roundabout/roundabout.spec.js +3 -1
- package/esm/components/Roundabout/roundabout.spec.js.map +1 -1
- package/esm/components/Textarea/Textarea.js +4 -1
- package/esm/components/Textarea/Textarea.js.map +1 -1
- package/esm/components/Textarea/Textarea.spec.js +13 -0
- package/esm/components/Textarea/Textarea.spec.js.map +1 -1
- package/esm/components/shared/CharactersCount/CharactersCount.d.ts +7 -0
- package/esm/components/shared/CharactersCount/CharactersCount.js +15 -0
- package/esm/components/shared/CharactersCount/CharactersCount.js.map +1 -0
- package/esm/components/shared/CharactersCount/CharactersCount.spec.d.ts +1 -0
- package/esm/components/shared/CharactersCount/CharactersCount.spec.js +26 -0
- package/esm/components/shared/CharactersCount/CharactersCount.spec.js.map +1 -0
- package/esm/components/shared/Label/Label.js +1 -1
- package/esm/components/shared/Label/Label.js.map +1 -1
- package/esm/components/shared/Label/Label.spec.js +11 -3
- package/esm/components/shared/Label/Label.spec.js.map +1 -1
- package/esm/components/shared/utils/getCharactersCountId.d.ts +4 -0
- package/esm/components/shared/utils/getCharactersCountId.js +7 -0
- package/esm/components/shared/utils/getCharactersCountId.js.map +1 -0
- package/esm/components/type.d.ts +1 -0
- package/esm/main.css +20 -0
- package/esm/main.css.map +1 -1
- package/esm/stories/overview/sourceWithHierarchy.json +5151 -0
- package/esm/tests/utils/lunatic.d.ts +0 -4
- package/esm/tests/utils/lunatic.js +0 -4
- package/esm/tests/utils/lunatic.js.map +1 -1
- package/esm/type.source.d.ts +6 -6
- package/esm/type.source.js +0 -1
- package/esm/type.source.js.map +1 -1
- package/esm/use-lunatic/commons/page.js +8 -0
- package/esm/use-lunatic/commons/page.js.map +1 -1
- package/esm/use-lunatic/commons/variables/behaviours/cleaning-behaviour.d.ts +1 -1
- package/esm/use-lunatic/commons/variables/behaviours/cleaning-behaviour.js +111 -14
- package/esm/use-lunatic/commons/variables/behaviours/cleaning-behaviour.js.map +1 -1
- package/esm/use-lunatic/commons/variables/get-questionnaire-data.js +0 -8
- package/esm/use-lunatic/commons/variables/get-questionnaire-data.js.map +1 -1
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.d.ts +2 -2
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.js +5 -3
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.js.map +1 -1
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.spec.js +164 -8
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.spec.js.map +1 -1
- package/esm/use-lunatic/hooks/use-page-has-response.js +50 -35
- package/esm/use-lunatic/hooks/use-page-has-response.js.map +1 -1
- package/esm/use-lunatic/hooks/useOverview.d.ts +1 -1
- package/esm/use-lunatic/hooks/useOverview.js +19 -14
- package/esm/use-lunatic/hooks/useOverview.js.map +1 -1
- package/esm/use-lunatic/hooks/useOverview.spec.d.ts +1 -0
- package/esm/use-lunatic/hooks/useOverview.spec.js +38 -0
- package/esm/use-lunatic/hooks/useOverview.spec.js.map +1 -0
- package/esm/use-lunatic/props/getComponentTypeProps.d.ts +1 -0
- package/esm/use-lunatic/props/propValue.js +18 -6
- package/esm/use-lunatic/props/propValue.js.map +1 -1
- package/esm/use-lunatic/props/propValue.spec.js +97 -2
- package/esm/use-lunatic/props/propValue.spec.js.map +1 -1
- package/esm/use-lunatic/reducer/reducerInitializer.d.ts +2 -2
- package/esm/use-lunatic/reducer/reducerInitializer.js +25 -32
- package/esm/use-lunatic/reducer/reducerInitializer.js.map +1 -1
- package/esm/use-lunatic/test.utils.d.ts +2 -0
- package/esm/use-lunatic/test.utils.js +13 -0
- package/esm/use-lunatic/test.utils.js.map +1 -0
- package/esm/use-lunatic/type.d.ts +0 -4
- package/esm/use-lunatic/use-lunatic.d.ts +1 -2
- package/esm/use-lunatic/use-lunatic.js.map +1 -1
- package/esm/utils/cast.d.ts +19 -0
- package/esm/utils/cast.js +63 -0
- package/esm/utils/cast.js.map +1 -0
- package/esm/utils/constants/variable-status.d.ts +0 -4
- package/esm/utils/constants/variable-status.js +0 -4
- package/esm/utils/constants/variable-status.js.map +1 -1
- package/esm/utils/variables.spec.js +0 -8
- package/esm/utils/variables.spec.js.map +1 -1
- package/main.css +20 -0
- package/main.css.map +1 -1
- package/package.json +61 -69
- package/src/components/Datepicker/Datepicker.tsx +1 -1
- package/src/components/Datepicker/__snapshots__/Datepicker.spec.tsx.snap +2 -2
- package/src/components/Duration/Duration.test.tsx +52 -0
- package/src/components/Duration/Duration.tsx +17 -4
- package/src/components/Input/Input.spec.tsx +34 -0
- package/src/components/Input/Input.tsx +26 -18
- package/src/components/Input/__snapshots__/Input.spec.tsx.snap +38 -19
- package/src/components/InputNumber/InputNumber.spec.tsx +15 -1
- package/src/components/InputNumber/InputNumber.tsx +1 -0
- package/src/components/InputNumber/InputNumberThousand.tsx +11 -1
- package/src/components/Loop/Loop.spec.tsx +77 -0
- package/src/components/Loop/Loop.tsx +1 -1
- package/src/components/RosterForLoop/__snapshots__/RosterForLoop.spec.tsx.snap +42 -20
- package/src/components/Roundabout/CustomRoundabout.tsx +13 -4
- package/src/components/Roundabout/roundabout.spec.tsx +3 -0
- package/src/components/Textarea/Textarea.spec.tsx +18 -0
- package/src/components/Textarea/Textarea.tsx +21 -13
- package/src/components/Textarea/__snapshots__/Textarea.spec.tsx.snap +21 -11
- package/src/components/shared/CharactersCount/CharactersCount.spec.tsx +31 -0
- package/src/components/shared/CharactersCount/CharactersCount.tsx +27 -0
- package/src/components/shared/Label/Label.spec.tsx +15 -3
- package/src/components/shared/Label/Label.tsx +1 -1
- package/src/components/shared/utils/getCharactersCountId.test.ts +14 -0
- package/src/components/shared/utils/getCharactersCountId.ts +6 -0
- package/src/components/type.ts +1 -0
- package/src/css/components/Input.scss +10 -0
- package/src/css/components/Roundabout.scss +10 -0
- package/src/stories/accordion/source.json +1 -5
- package/src/stories/behaviour/cleaning/cleaning.stories.jsx +11 -0
- package/src/stories/behaviour/cleaning/loop.json +246 -0
- package/src/stories/behaviour/cleaning/source-loop.json +3 -15
- package/src/stories/behaviour/cleaning/source.json +2 -10
- package/src/stories/behaviour/controls/boucles-n.json +2 -10
- package/src/stories/behaviour/controls/loop.json +2 -10
- package/src/stories/behaviour/controls/roundabout.json +3 -15
- package/src/stories/behaviour/controls/simple-numeric.json +19 -95
- package/src/stories/behaviour/controls/simple.json +7 -35
- package/src/stories/behaviour/filter/dataLoop.json +0 -8
- package/src/stories/behaviour/filter/source.json +0 -12
- package/src/stories/behaviour/filter/sourceLoop.json +0 -12
- package/src/stories/behaviour/missing/source.json +12 -60
- package/src/stories/behaviour/others/V2_DeclarationsSimples.json +14 -70
- package/src/stories/behaviour/others/V2_MinMaxSum_Boucles.json +5 -25
- package/src/stories/behaviour/others/V2_QuestSimple_Boucles.json +107 -535
- package/src/stories/behaviour/others/V2_TCMRallyeGames.json +33 -165
- package/src/stories/behaviour/others/test-dylan.json +5 -25
- package/src/stories/behaviour/paste/source.json +1 -5
- package/src/stories/behaviour/performance/performance.stories.jsx +9 -1
- package/src/stories/behaviour/performance/source.json +4 -20
- package/src/stories/behaviour/performance/srcv.json +44747 -0
- package/src/stories/behaviour/resizing/source-resizing-cleaning.json +2 -10
- package/src/stories/behaviour/resizing/source.json +5 -25
- package/src/stories/checkbox-boolean/source.json +1 -5
- package/src/stories/checkbox-group/source.json +16 -80
- package/src/stories/checkbox-group/sourceCondition.json +3 -15
- package/src/stories/checkbox-group/sourceDetail.json +18 -90
- package/src/stories/checkbox-group/sourceLoop.json +2 -10
- package/src/stories/checkbox-one/source.json +1 -5
- package/src/stories/checkbox-one/sourceDetail.json +2 -10
- package/src/stories/date-picker/source.json +1 -5
- package/src/stories/declaration/source.json +2 -10
- package/src/stories/disabled/data.json +0 -16
- package/src/stories/disabled/source.json +7 -35
- package/src/stories/dropdown/data.json +2 -10
- package/src/stories/dropdown/source.json +2 -10
- package/src/stories/duration/mois.json +1 -5
- package/src/stories/duration/time.json +1 -5
- package/src/stories/filter-description/source-options.json +3 -15
- package/src/stories/input/source.json +1 -5
- package/src/stories/input-number/input-number.stories.jsx +5 -0
- package/src/stories/input-number/source-big-number.json +27 -0
- package/src/stories/input-number/source-euro.json +2 -6
- package/src/stories/input-number/source.json +1 -5
- package/src/stories/loop/source-bloc.json +2 -10
- package/src/stories/loop/source-paginated.json +2 -10
- package/src/stories/loop/source-roster.json +2 -10
- package/src/stories/loop/source-with-header.json +2 -10
- package/src/stories/overview/dataLoop.json +24 -120
- package/src/stories/overview/overview.stories.jsx +9 -0
- package/src/stories/overview/source.json +1 -5
- package/src/stories/overview/sourceLoop.json +24 -120
- package/src/stories/overview/sourceWithHierarchy.json +164 -820
- package/src/stories/pairwise/source.json +5 -25
- package/src/stories/question/source.json +2 -10
- package/src/stories/questionnaires/logement/data.json +0 -1288
- package/src/stories/questionnaires/logement/source-sequence.json +564 -2820
- package/src/stories/questionnaires/logement/source-sum.json +280 -1400
- package/src/stories/questionnaires/logement/source.json +564 -2820
- package/src/stories/questionnaires/recensement/source.json +106 -530
- package/src/stories/questionnaires/rp/source.json +8 -40
- package/src/stories/questionnaires/simpsons/source.json +104 -520
- package/src/stories/radio/source.json +1 -5
- package/src/stories/radio/sourceCondition.json +2 -10
- package/src/stories/radio/sourceDetail.json +2 -10
- package/src/stories/radio/sourceHorizontal.json +1 -5
- package/src/stories/roundabout/data1.json +0 -12
- package/src/stories/roundabout/data2.json +0 -16
- package/src/stories/roundabout/source.json +11 -35
- package/src/stories/suggester/source-arbitrary-response.json +6 -30
- package/src/stories/suggester/source-error.json +6 -30
- package/src/stories/suggester/source-multiline.json +0 -16
- package/src/stories/suggester/source-option-responses.json +5 -25
- package/src/stories/suggester/source.json +7 -35
- package/src/stories/summary/data.json +0 -16
- package/src/stories/summary/source.json +7 -35
- package/src/stories/switch/data-forced.json +2 -10
- package/src/stories/switch/source.json +4 -20
- package/src/stories/table/source-colspan.json +8 -40
- package/src/stories/table/table-dynamique.json +1 -5
- package/src/stories/text/source-roster.json +3 -15
- package/src/stories/text/source-table.json +9 -45
- package/src/stories/textarea/source.json +1 -5
- package/src/stories/utils/{SchemaValidator.tsx → SchemaValidator.jsx} +1 -1
- package/src/stories/utils/{orchestrator.tsx → orchestrator.jsx} +9 -13
- package/src/stories/utils/{overview.tsx → overview.jsx} +0 -2
- package/src/tests/utils/lunatic.ts +0 -4
- package/src/type.source.ts +8 -7
- package/src/use-lunatic/__snapshots__/use-lunatic.test.ts.snap +0 -1159
- package/src/use-lunatic/commons/page.ts +10 -0
- package/src/use-lunatic/commons/variables/behaviours/cleaning-behaviour.ts +182 -24
- package/src/use-lunatic/commons/variables/get-questionnaire-data.ts +0 -12
- package/src/use-lunatic/commons/variables/lunatic-variables-store.spec.ts +190 -8
- package/src/use-lunatic/commons/variables/lunatic-variables-store.ts +7 -4
- package/src/use-lunatic/hooks/use-page-has-response.test.ts +200 -0
- package/src/use-lunatic/hooks/use-page-has-response.ts +67 -44
- package/src/use-lunatic/hooks/useOverview.spec.ts +42 -0
- package/src/use-lunatic/hooks/useOverview.ts +41 -18
- package/src/use-lunatic/props/propValue.spec.ts +105 -2
- package/src/use-lunatic/props/propValue.ts +26 -8
- package/src/use-lunatic/reducer/reducerInitializer.tsx +31 -41
- package/src/use-lunatic/test.utils.ts +17 -0
- package/src/use-lunatic/type.ts +0 -4
- package/src/use-lunatic/use-lunatic.test.ts +2 -21
- package/src/use-lunatic/use-lunatic.ts +5 -4
- package/src/utils/cast.ts +67 -0
- package/src/utils/constants/variable-status.ts +0 -4
- package/src/utils/variables.spec.ts +0 -8
- package/stories/overview/sourceWithHierarchy.json +5151 -0
- package/tests/utils/lunatic.d.ts +0 -4
- package/tests/utils/lunatic.js +0 -4
- package/tests/utils/lunatic.js.map +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/type.source.d.ts +6 -6
- package/type.source.js +0 -1
- package/type.source.js.map +1 -1
- package/use-lunatic/commons/page.js +8 -0
- package/use-lunatic/commons/page.js.map +1 -1
- package/use-lunatic/commons/variables/behaviours/cleaning-behaviour.d.ts +1 -1
- package/use-lunatic/commons/variables/behaviours/cleaning-behaviour.js +111 -14
- package/use-lunatic/commons/variables/behaviours/cleaning-behaviour.js.map +1 -1
- package/use-lunatic/commons/variables/get-questionnaire-data.js +0 -8
- package/use-lunatic/commons/variables/get-questionnaire-data.js.map +1 -1
- package/use-lunatic/commons/variables/lunatic-variables-store.d.ts +2 -2
- package/use-lunatic/commons/variables/lunatic-variables-store.js +5 -3
- package/use-lunatic/commons/variables/lunatic-variables-store.js.map +1 -1
- package/use-lunatic/commons/variables/lunatic-variables-store.spec.js +187 -8
- package/use-lunatic/commons/variables/lunatic-variables-store.spec.js.map +1 -1
- package/use-lunatic/hooks/use-page-has-response.js +49 -34
- package/use-lunatic/hooks/use-page-has-response.js.map +1 -1
- package/use-lunatic/hooks/useOverview.d.ts +1 -1
- package/use-lunatic/hooks/useOverview.js +19 -14
- package/use-lunatic/hooks/useOverview.js.map +1 -1
- package/use-lunatic/hooks/useOverview.spec.d.ts +1 -0
- package/use-lunatic/hooks/useOverview.spec.js +43 -0
- package/use-lunatic/hooks/useOverview.spec.js.map +1 -0
- package/use-lunatic/props/getComponentTypeProps.d.ts +1 -0
- package/use-lunatic/props/propValue.js +18 -6
- package/use-lunatic/props/propValue.js.map +1 -1
- package/use-lunatic/props/propValue.spec.js +97 -2
- package/use-lunatic/props/propValue.spec.js.map +1 -1
- package/use-lunatic/reducer/reducerInitializer.d.ts +2 -2
- package/use-lunatic/reducer/reducerInitializer.js +25 -32
- package/use-lunatic/reducer/reducerInitializer.js.map +1 -1
- package/use-lunatic/test.utils.d.ts +2 -0
- package/use-lunatic/test.utils.js +17 -0
- package/use-lunatic/test.utils.js.map +1 -0
- package/use-lunatic/type.d.ts +0 -4
- package/use-lunatic/use-lunatic.d.ts +1 -2
- package/use-lunatic/use-lunatic.js.map +1 -1
- package/utils/cast.d.ts +19 -0
- package/utils/cast.js +70 -0
- package/utils/cast.js.map +1 -0
- package/utils/constants/variable-status.d.ts +0 -4
- package/utils/constants/variable-status.js +1 -5
- package/utils/constants/variable-status.js.map +1 -1
- package/utils/variables.spec.js +0 -8
- package/utils/variables.spec.js.map +1 -1
- package/constants/component-types.d.ts +0 -1
- package/constants/component-types.js +0 -5
- package/constants/component-types.js.map +0 -1
- package/constants/declarations.d.ts +0 -9
- package/constants/declarations.js +0 -15
- package/constants/declarations.js.map +0 -1
- package/constants/event-types.d.ts +0 -10
- package/constants/event-types.js +0 -16
- package/constants/event-types.js.map +0 -1
- package/constants/index.d.ts +0 -5
- package/constants/index.js +0 -22
- package/constants/index.js.map +0 -1
- package/constants/indexedDBStore.d.ts +0 -21
- package/constants/indexedDBStore.js +0 -22
- package/constants/indexedDBStore.js.map +0 -1
- package/constants/supported-preferences.d.ts +0 -1
- package/constants/supported-preferences.js +0 -36
- package/constants/supported-preferences.js.map +0 -1
- package/constants/value-types.d.ts +0 -5
- package/constants/value-types.js +0 -9
- package/constants/value-types.js.map +0 -1
- package/constants/variable-types.d.ts +0 -2
- package/constants/variable-types.js +0 -8
- package/constants/variable-types.js.map +0 -1
- package/esm/constants/component-types.d.ts +0 -1
- package/esm/constants/component-types.js +0 -2
- package/esm/constants/component-types.js.map +0 -1
- package/esm/constants/declarations.d.ts +0 -9
- package/esm/constants/declarations.js +0 -12
- package/esm/constants/declarations.js.map +0 -1
- package/esm/constants/event-types.d.ts +0 -10
- package/esm/constants/event-types.js +0 -13
- package/esm/constants/event-types.js.map +0 -1
- package/esm/constants/index.d.ts +0 -5
- package/esm/constants/index.js +0 -6
- package/esm/constants/index.js.map +0 -1
- package/esm/constants/indexedDBStore.d.ts +0 -21
- package/esm/constants/indexedDBStore.js +0 -19
- package/esm/constants/indexedDBStore.js.map +0 -1
- package/esm/constants/supported-preferences.d.ts +0 -1
- package/esm/constants/supported-preferences.js +0 -10
- package/esm/constants/supported-preferences.js.map +0 -1
- package/esm/constants/value-types.d.ts +0 -5
- package/esm/constants/value-types.js +0 -6
- package/esm/constants/value-types.js.map +0 -1
- package/esm/constants/variable-types.d.ts +0 -2
- package/esm/constants/variable-types.js +0 -5
- package/esm/constants/variable-types.js.map +0 -1
- package/esm/hooks/useArticulation.d.ts +0 -58
- package/esm/hooks/useArticulation.js +0 -81
- package/esm/hooks/useArticulation.js.map +0 -1
- package/hooks/useArticulation.d.ts +0 -58
- package/hooks/useArticulation.js +0 -81
- package/hooks/useArticulation.js.map +0 -1
- package/src/constants/component-types.ts +0 -1
- package/src/constants/declarations.ts +0 -14
- package/src/constants/event-types.ts +0 -13
- package/src/constants/index.ts +0 -5
- package/src/constants/indexedDBStore.ts +0 -20
- package/src/constants/supported-preferences.ts +0 -10
- package/src/constants/value-types.ts +0 -5
- package/src/constants/variable-types.ts +0 -4
- package/src/hooks/useArticulation.ts +0 -124
- package/src/stories/behaviour/articulation/articulation.stories.tsx +0 -105
- package/src/stories/behaviour/articulation/roundabout.json +0 -348
|
@@ -25,11 +25,7 @@
|
|
|
25
25
|
"name": "READY",
|
|
26
26
|
"componentRef": "1",
|
|
27
27
|
"values": {
|
|
28
|
-
"
|
|
29
|
-
"COLLECTED": true,
|
|
30
|
-
"FORCED": null,
|
|
31
|
-
"EDITED": null,
|
|
32
|
-
"INPUTTED": null
|
|
28
|
+
"COLLECTED": true
|
|
33
29
|
}
|
|
34
30
|
},
|
|
35
31
|
{
|
|
@@ -37,11 +33,7 @@
|
|
|
37
33
|
"name": "READY2",
|
|
38
34
|
"componentRef": "2",
|
|
39
35
|
"values": {
|
|
40
|
-
"
|
|
41
|
-
"COLLECTED": true,
|
|
42
|
-
"FORCED": null,
|
|
43
|
-
"EDITED": null,
|
|
44
|
-
"INPUTTED": null
|
|
36
|
+
"COLLECTED": true
|
|
45
37
|
}
|
|
46
38
|
}
|
|
47
39
|
]
|
|
@@ -33,11 +33,7 @@
|
|
|
33
33
|
"name": "READY",
|
|
34
34
|
"componentRef": "1",
|
|
35
35
|
"values": {
|
|
36
|
-
"
|
|
37
|
-
"COLLECTED": null,
|
|
38
|
-
"FORCED": null,
|
|
39
|
-
"EDITED": null,
|
|
40
|
-
"INPUTTED": null
|
|
36
|
+
"COLLECTED": null
|
|
41
37
|
}
|
|
42
38
|
},
|
|
43
39
|
{
|
|
@@ -45,11 +41,7 @@
|
|
|
45
41
|
"name": "READY_MISSING",
|
|
46
42
|
"componentRef": "1",
|
|
47
43
|
"values": {
|
|
48
|
-
"
|
|
49
|
-
"COLLECTED": null,
|
|
50
|
-
"FORCED": null,
|
|
51
|
-
"EDITED": null,
|
|
52
|
-
"INPUTTED": null
|
|
44
|
+
"COLLECTED": null
|
|
53
45
|
}
|
|
54
46
|
},
|
|
55
47
|
{
|
|
@@ -57,11 +49,7 @@
|
|
|
57
49
|
"name": "READY2",
|
|
58
50
|
"componentRef": "2",
|
|
59
51
|
"values": {
|
|
60
|
-
"
|
|
61
|
-
"COLLECTED": true,
|
|
62
|
-
"FORCED": null,
|
|
63
|
-
"EDITED": null,
|
|
64
|
-
"INPUTTED": null
|
|
52
|
+
"COLLECTED": true
|
|
65
53
|
}
|
|
66
54
|
},
|
|
67
55
|
{
|
|
@@ -69,11 +57,7 @@
|
|
|
69
57
|
"name": "READY2_MISSING",
|
|
70
58
|
"componentRef": "2",
|
|
71
59
|
"values": {
|
|
72
|
-
"
|
|
73
|
-
"COLLECTED": null,
|
|
74
|
-
"FORCED": null,
|
|
75
|
-
"EDITED": null,
|
|
76
|
-
"INPUTTED": null
|
|
60
|
+
"COLLECTED": null
|
|
77
61
|
}
|
|
78
62
|
}
|
|
79
63
|
]
|
|
@@ -192,11 +192,7 @@
|
|
|
192
192
|
"variableType": "COLLECTED",
|
|
193
193
|
"name": "PERCENTAGE_EXPENSES11",
|
|
194
194
|
"values": {
|
|
195
|
-
"
|
|
196
|
-
"COLLECTED": null,
|
|
197
|
-
"FORCED": null,
|
|
198
|
-
"EDITED": null,
|
|
199
|
-
"INPUTTED": null
|
|
195
|
+
"COLLECTED": null
|
|
200
196
|
}
|
|
201
197
|
},
|
|
202
198
|
|
|
@@ -204,11 +200,7 @@
|
|
|
204
200
|
"variableType": "COLLECTED",
|
|
205
201
|
"name": "PERCENTAGE_EXPENSES21",
|
|
206
202
|
"values": {
|
|
207
|
-
"
|
|
208
|
-
"COLLECTED": null,
|
|
209
|
-
"FORCED": null,
|
|
210
|
-
"EDITED": null,
|
|
211
|
-
"INPUTTED": null
|
|
203
|
+
"COLLECTED": null
|
|
212
204
|
}
|
|
213
205
|
},
|
|
214
206
|
|
|
@@ -216,11 +208,7 @@
|
|
|
216
208
|
"variableType": "COLLECTED",
|
|
217
209
|
"name": "PERCENTAGE_EXPENSES31",
|
|
218
210
|
"values": {
|
|
219
|
-
"
|
|
220
|
-
"COLLECTED": null,
|
|
221
|
-
"FORCED": null,
|
|
222
|
-
"EDITED": null,
|
|
223
|
-
"INPUTTED": null
|
|
211
|
+
"COLLECTED": null
|
|
224
212
|
}
|
|
225
213
|
},
|
|
226
214
|
|
|
@@ -228,11 +216,7 @@
|
|
|
228
216
|
"variableType": "COLLECTED",
|
|
229
217
|
"name": "PERCENTAGE_EXPENSES41",
|
|
230
218
|
"values": {
|
|
231
|
-
"
|
|
232
|
-
"COLLECTED": null,
|
|
233
|
-
"FORCED": null,
|
|
234
|
-
"EDITED": null,
|
|
235
|
-
"INPUTTED": null
|
|
219
|
+
"COLLECTED": null
|
|
236
220
|
}
|
|
237
221
|
},
|
|
238
222
|
|
|
@@ -240,11 +224,7 @@
|
|
|
240
224
|
"variableType": "COLLECTED",
|
|
241
225
|
"name": "PERCENTAGE_EXPENSES51",
|
|
242
226
|
"values": {
|
|
243
|
-
"
|
|
244
|
-
"COLLECTED": null,
|
|
245
|
-
"FORCED": null,
|
|
246
|
-
"EDITED": null,
|
|
247
|
-
"INPUTTED": null
|
|
227
|
+
"COLLECTED": null
|
|
248
228
|
}
|
|
249
229
|
},
|
|
250
230
|
|
|
@@ -252,11 +232,7 @@
|
|
|
252
232
|
"variableType": "COLLECTED",
|
|
253
233
|
"name": "PERCENTAGE_EXPENSES61",
|
|
254
234
|
"values": {
|
|
255
|
-
"
|
|
256
|
-
"COLLECTED": null,
|
|
257
|
-
"FORCED": null,
|
|
258
|
-
"EDITED": null,
|
|
259
|
-
"INPUTTED": null
|
|
235
|
+
"COLLECTED": null
|
|
260
236
|
}
|
|
261
237
|
},
|
|
262
238
|
|
|
@@ -264,11 +240,7 @@
|
|
|
264
240
|
"variableType": "COLLECTED",
|
|
265
241
|
"name": "PERCENTAGE_EXPENSES71",
|
|
266
242
|
"values": {
|
|
267
|
-
"
|
|
268
|
-
"COLLECTED": null,
|
|
269
|
-
"FORCED": null,
|
|
270
|
-
"EDITED": null,
|
|
271
|
-
"INPUTTED": null
|
|
243
|
+
"COLLECTED": null
|
|
272
244
|
}
|
|
273
245
|
},
|
|
274
246
|
|
|
@@ -276,11 +248,7 @@
|
|
|
276
248
|
"variableType": "COLLECTED",
|
|
277
249
|
"name": "PERCENTAGE_EXPENSES81",
|
|
278
250
|
"values": {
|
|
279
|
-
"
|
|
280
|
-
"COLLECTED": null,
|
|
281
|
-
"FORCED": null,
|
|
282
|
-
"EDITED": null,
|
|
283
|
-
"INPUTTED": null
|
|
251
|
+
"COLLECTED": null
|
|
284
252
|
}
|
|
285
253
|
},
|
|
286
254
|
|
|
@@ -7,33 +7,21 @@
|
|
|
7
7
|
{
|
|
8
8
|
"variableType": "COLLECTED",
|
|
9
9
|
"values": {
|
|
10
|
-
"COLLECTED": []
|
|
11
|
-
"EDITED": [],
|
|
12
|
-
"FORCED": [],
|
|
13
|
-
"INPUTTED": [],
|
|
14
|
-
"PREVIOUS": []
|
|
10
|
+
"COLLECTED": []
|
|
15
11
|
},
|
|
16
12
|
"name": "PREMIERTAB2"
|
|
17
13
|
},
|
|
18
14
|
{
|
|
19
15
|
"variableType": "COLLECTED",
|
|
20
16
|
"values": {
|
|
21
|
-
"COLLECTED": []
|
|
22
|
-
"EDITED": [],
|
|
23
|
-
"FORCED": [],
|
|
24
|
-
"INPUTTED": [],
|
|
25
|
-
"PREVIOUS": []
|
|
17
|
+
"COLLECTED": []
|
|
26
18
|
},
|
|
27
19
|
"name": "PREMIERTAB3"
|
|
28
20
|
},
|
|
29
21
|
{
|
|
30
22
|
"variableType": "COLLECTED",
|
|
31
23
|
"values": {
|
|
32
|
-
"COLLECTED": []
|
|
33
|
-
"EDITED": [],
|
|
34
|
-
"FORCED": [],
|
|
35
|
-
"INPUTTED": [],
|
|
36
|
-
"PREVIOUS": []
|
|
24
|
+
"COLLECTED": []
|
|
37
25
|
},
|
|
38
26
|
"name": "PREMIERTAB4"
|
|
39
27
|
}
|
|
@@ -4,99 +4,63 @@
|
|
|
4
4
|
{
|
|
5
5
|
"variableType": "COLLECTED",
|
|
6
6
|
"values": {
|
|
7
|
-
"COLLECTED": null
|
|
8
|
-
"EDITED": null,
|
|
9
|
-
"FORCED": null,
|
|
10
|
-
"INPUTTED": null,
|
|
11
|
-
"PREVIOUS": null
|
|
7
|
+
"COLLECTED": null
|
|
12
8
|
},
|
|
13
9
|
"name": "TABLEAUCLA11"
|
|
14
10
|
},
|
|
15
11
|
{
|
|
16
12
|
"variableType": "COLLECTED",
|
|
17
13
|
"values": {
|
|
18
|
-
"COLLECTED": null
|
|
19
|
-
"EDITED": null,
|
|
20
|
-
"FORCED": null,
|
|
21
|
-
"INPUTTED": null,
|
|
22
|
-
"PREVIOUS": null
|
|
14
|
+
"COLLECTED": null
|
|
23
15
|
},
|
|
24
16
|
"name": "TABLEAUCLA21"
|
|
25
17
|
},
|
|
26
18
|
{
|
|
27
19
|
"variableType": "COLLECTED",
|
|
28
20
|
"values": {
|
|
29
|
-
"COLLECTED": null
|
|
30
|
-
"EDITED": null,
|
|
31
|
-
"FORCED": null,
|
|
32
|
-
"INPUTTED": null,
|
|
33
|
-
"PREVIOUS": null
|
|
21
|
+
"COLLECTED": null
|
|
34
22
|
},
|
|
35
23
|
"name": "TABLEAUCLA31"
|
|
36
24
|
},
|
|
37
25
|
{
|
|
38
26
|
"variableType": "COLLECTED",
|
|
39
27
|
"values": {
|
|
40
|
-
"COLLECTED": null
|
|
41
|
-
"EDITED": null,
|
|
42
|
-
"FORCED": null,
|
|
43
|
-
"INPUTTED": null,
|
|
44
|
-
"PREVIOUS": null
|
|
28
|
+
"COLLECTED": null
|
|
45
29
|
},
|
|
46
30
|
"name": "TABLEAUCLA12"
|
|
47
31
|
},
|
|
48
32
|
{
|
|
49
33
|
"variableType": "COLLECTED",
|
|
50
34
|
"values": {
|
|
51
|
-
"COLLECTED": null
|
|
52
|
-
"EDITED": null,
|
|
53
|
-
"FORCED": null,
|
|
54
|
-
"INPUTTED": null,
|
|
55
|
-
"PREVIOUS": null
|
|
35
|
+
"COLLECTED": null
|
|
56
36
|
},
|
|
57
37
|
"name": "TABLEAUCLA22"
|
|
58
38
|
},
|
|
59
39
|
{
|
|
60
40
|
"variableType": "COLLECTED",
|
|
61
41
|
"values": {
|
|
62
|
-
"COLLECTED": null
|
|
63
|
-
"EDITED": null,
|
|
64
|
-
"FORCED": null,
|
|
65
|
-
"INPUTTED": null,
|
|
66
|
-
"PREVIOUS": null
|
|
42
|
+
"COLLECTED": null
|
|
67
43
|
},
|
|
68
44
|
"name": "TABLEAUCLA32"
|
|
69
45
|
},
|
|
70
46
|
{
|
|
71
47
|
"variableType": "COLLECTED",
|
|
72
48
|
"values": {
|
|
73
|
-
"COLLECTED": null
|
|
74
|
-
"EDITED": null,
|
|
75
|
-
"FORCED": null,
|
|
76
|
-
"INPUTTED": null,
|
|
77
|
-
"PREVIOUS": null
|
|
49
|
+
"COLLECTED": null
|
|
78
50
|
},
|
|
79
51
|
"name": "TABLEAUCLA13"
|
|
80
52
|
},
|
|
81
53
|
{
|
|
82
54
|
"variableType": "COLLECTED",
|
|
83
55
|
"values": {
|
|
84
|
-
"COLLECTED": null
|
|
85
|
-
"EDITED": null,
|
|
86
|
-
"FORCED": null,
|
|
87
|
-
"INPUTTED": null,
|
|
88
|
-
"PREVIOUS": null
|
|
56
|
+
"COLLECTED": null
|
|
89
57
|
},
|
|
90
58
|
"name": "TABLEAUCLA23"
|
|
91
59
|
},
|
|
92
60
|
{
|
|
93
61
|
"variableType": "COLLECTED",
|
|
94
62
|
"values": {
|
|
95
|
-
"COLLECTED": null
|
|
96
|
-
"EDITED": null,
|
|
97
|
-
"FORCED": null,
|
|
98
|
-
"INPUTTED": null,
|
|
99
|
-
"PREVIOUS": null
|
|
63
|
+
"COLLECTED": null
|
|
100
64
|
},
|
|
101
65
|
"name": "TABLEAUCLA33"
|
|
102
66
|
},
|
|
@@ -2,7 +2,7 @@ import Ajv from 'ajv/dist/2020.js';
|
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import LunaticSchema from '../../../lunatic-schema.json';
|
|
4
4
|
|
|
5
|
-
export function SchemaValidator({ source }
|
|
5
|
+
export function SchemaValidator({ source }) {
|
|
6
6
|
const errors = useMemo(() => {
|
|
7
7
|
const ajv = new Ajv({
|
|
8
8
|
removeAdditional: true,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// @ts-nocheck
|
|
3
1
|
import './custom-lunatic.scss';
|
|
4
2
|
import './orchestrator.scss';
|
|
5
3
|
|
|
@@ -9,19 +7,19 @@ import {
|
|
|
9
7
|
LunaticComponents,
|
|
10
8
|
ModalControls,
|
|
11
9
|
useLunatic,
|
|
12
|
-
} from '
|
|
13
|
-
import { memo, useCallback, useEffect, useState } from 'react';
|
|
10
|
+
} from '../..';
|
|
11
|
+
import React, { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
14
12
|
|
|
15
|
-
import { Logger } from '../../utils/logger
|
|
16
|
-
import { Overview } from './overview
|
|
13
|
+
import { Logger } from '../../utils/logger';
|
|
14
|
+
import { Overview } from './overview';
|
|
17
15
|
import { SchemaValidator } from './SchemaValidator.jsx';
|
|
18
16
|
|
|
19
17
|
const Input = components.Input;
|
|
20
18
|
|
|
21
|
-
function DevOptions({ goToPage, getData }
|
|
19
|
+
function DevOptions({ goToPage, getData }) {
|
|
22
20
|
const [toPage, setToPage] = useState(1);
|
|
23
21
|
|
|
24
|
-
function handleChange(_, value
|
|
22
|
+
function handleChange(_, value) {
|
|
25
23
|
setToPage(value);
|
|
26
24
|
}
|
|
27
25
|
|
|
@@ -35,8 +33,6 @@ function DevOptions({ goToPage, getData }: { goToPage: any; getData: any }) {
|
|
|
35
33
|
</div>
|
|
36
34
|
<Input
|
|
37
35
|
id="page-to-jump"
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
39
|
-
// @ts-ignore
|
|
40
36
|
value={toPage}
|
|
41
37
|
handleChange={handleChange}
|
|
42
38
|
min={1}
|
|
@@ -93,7 +89,7 @@ function Pager({
|
|
|
93
89
|
);
|
|
94
90
|
}
|
|
95
91
|
|
|
96
|
-
function onLogChange(response
|
|
92
|
+
function onLogChange(response, value, args) {
|
|
97
93
|
Logger.log('onChange', { response, value, args });
|
|
98
94
|
}
|
|
99
95
|
|
|
@@ -114,7 +110,7 @@ function OrchestratorForStories({
|
|
|
114
110
|
missingStrategy = logMissingStrategy,
|
|
115
111
|
missingShortcut,
|
|
116
112
|
autoSuggesterLoading,
|
|
117
|
-
|
|
113
|
+
addExternal,
|
|
118
114
|
preferences,
|
|
119
115
|
slots,
|
|
120
116
|
showOverview = false,
|
|
@@ -140,7 +136,7 @@ function OrchestratorForStories({
|
|
|
140
136
|
pageTag,
|
|
141
137
|
isFirstPage,
|
|
142
138
|
isLastPage,
|
|
143
|
-
|
|
139
|
+
waiting,
|
|
144
140
|
overview,
|
|
145
141
|
compileControls,
|
|
146
142
|
getData,
|
package/src/type.source.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
1
|
/**
|
|
3
2
|
* This file was automatically generated by json-schema-to-typescript.
|
|
4
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
@@ -244,11 +243,7 @@ export type Variable =
|
|
|
244
243
|
variableType: 'COLLECTED';
|
|
245
244
|
name: string;
|
|
246
245
|
values?: {
|
|
247
|
-
PREVIOUS: VariableValue;
|
|
248
246
|
COLLECTED: VariableValue;
|
|
249
|
-
FORCED: VariableValue;
|
|
250
|
-
EDITED: VariableValue;
|
|
251
|
-
INPUTTED: VariableValue;
|
|
252
247
|
};
|
|
253
248
|
}
|
|
254
249
|
| {
|
|
@@ -262,7 +257,7 @@ export type VariableValue = VariableScalarValue | unknown[];
|
|
|
262
257
|
export type VariableScalarValue = string | number | null;
|
|
263
258
|
|
|
264
259
|
/**
|
|
265
|
-
*
|
|
260
|
+
* Representation of a Lunatic questionnaire.
|
|
266
261
|
*/
|
|
267
262
|
export type LunaticSource = {
|
|
268
263
|
label?: VTLExpression;
|
|
@@ -277,7 +272,13 @@ export type LunaticSource = {
|
|
|
277
272
|
suggesters?: SuggesterDefinition[];
|
|
278
273
|
cleaning?: {
|
|
279
274
|
[k: string]: {
|
|
280
|
-
[k: string]:
|
|
275
|
+
[k: string]:
|
|
276
|
+
| string
|
|
277
|
+
| {
|
|
278
|
+
expression: string;
|
|
279
|
+
shapeFrom?: string;
|
|
280
|
+
isAggregatorUsed: boolean;
|
|
281
|
+
}[];
|
|
281
282
|
};
|
|
282
283
|
};
|
|
283
284
|
missingBlock?: {
|