@inseefr/lunatic 3.5.7 → 3.5.8
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/shared/Combobox/Combobox.stories.d.ts +3 -2
- package/components/shared/Combobox/Combobox.stories.js +26 -21
- package/components/shared/Combobox/Combobox.stories.js.map +1 -1
- package/esm/components/shared/Combobox/Combobox.stories.d.ts +3 -2
- package/esm/components/shared/Combobox/Combobox.stories.js +28 -24
- package/esm/components/shared/Combobox/Combobox.stories.js.map +1 -1
- package/esm/hooks/useLocalStorage.d.ts +1 -0
- package/esm/hooks/useLocalStorage.js +31 -0
- package/esm/hooks/useLocalStorage.js.map +1 -0
- package/esm/type.source.d.ts +6 -0
- package/esm/use-lunatic/commons/compile-controls.js +22 -14
- package/esm/use-lunatic/commons/compile-controls.js.map +1 -1
- package/esm/use-lunatic/commons/fill-components/fill-component-expressions.js +4 -1
- package/esm/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -1
- package/esm/use-lunatic/hooks/use-page-has-response.js +1 -1
- package/esm/use-lunatic/hooks/use-page-has-response.js.map +1 -1
- package/esm/use-lunatic/hooks/useOverview.spec.js +2 -2
- package/esm/use-lunatic/hooks/useOverview.spec.js.map +1 -1
- package/esm/utils/number.d.ts +4 -0
- package/esm/utils/number.js +12 -0
- package/esm/utils/number.js.map +1 -1
- package/esm/utils/object.d.ts +10 -0
- package/esm/utils/object.js +26 -0
- package/esm/utils/object.js.map +1 -1
- package/hooks/useLocalStorage.d.ts +1 -0
- package/hooks/useLocalStorage.js +34 -0
- package/hooks/useLocalStorage.js.map +1 -0
- package/package.json +76 -137
- package/src/components/shared/Combobox/Combobox.stories.tsx +48 -49
- package/src/hooks/useLocalStorage.ts +37 -0
- package/src/json.d.ts +16 -0
- package/src/stories/accordion/accordion.stories.tsx +21 -0
- package/src/stories/behaviour/cleaning/cleaning.stories.tsx +40 -0
- package/src/stories/behaviour/controls/controls.stories.tsx +51 -0
- package/src/stories/behaviour/disabled/disabled.stories.tsx +29 -0
- package/src/stories/behaviour/filter/filter.stories.tsx +34 -0
- package/src/stories/behaviour/missing/missing.stories.tsx +31 -0
- package/src/stories/behaviour/overview/overview.stories.tsx +61 -0
- package/src/stories/{overview/sourceWithHierarchy.json → behaviour/overview/source.json} +1 -1
- package/src/stories/{overview → behaviour/overview}/sourceLoop.json +1 -1
- package/src/stories/behaviour/performance/performance.stories.tsx +29 -0
- package/src/stories/behaviour/resizing/resizing.stories.tsx +34 -0
- package/src/stories/behaviour/slots.stories.tsx +34 -0
- package/src/stories/checkbox/checkbox.stories.tsx +75 -0
- package/src/stories/{checkbox-group/sourceLoop.json → checkbox/sourceGroupLoop.json} +1 -1
- package/src/stories/datepicker/datepicker.stories.tsx +21 -0
- package/src/stories/declaration/declaration.stories.tsx +27 -0
- package/src/stories/dropdown/dropdown.stories.tsx +27 -0
- package/src/stories/duration/duration.stories.tsx +27 -0
- package/src/stories/filter-description/filter-description.stories.tsx +28 -0
- package/src/stories/input/input.stories.tsx +21 -0
- package/src/stories/input-number/input-number.stories.tsx +35 -0
- package/src/stories/loop/loop.stories.tsx +35 -0
- package/src/stories/loop/roster-for-loop.stories.tsx +59 -0
- package/src/stories/pairwise/pairwise.stories.tsx +30 -0
- package/src/stories/paste.stories.tsx +85 -0
- package/src/stories/question/question.stories.tsx +21 -0
- package/src/stories/questionnaires/logement/logement.stories.tsx +26 -0
- package/src/stories/questionnaires/recensement/recensement.stories.tsx +28 -0
- package/src/stories/questionnaires/rp/rp.stories.tsx +21 -0
- package/src/stories/questionnaires/simpsons/simpsons.stories.tsx +31 -0
- package/src/stories/radio/radio.stories.tsx +53 -0
- package/src/stories/roundabout/roundabout.stories.tsx +37 -0
- package/src/stories/roundabout/source.json +1 -0
- package/src/stories/sequence/sequence.stories.tsx +28 -0
- package/src/stories/suggester/source-option-responses.json +1 -1
- package/src/stories/suggester/suggester.stories.tsx +68 -0
- package/src/stories/summary/source.json +22 -1
- package/src/stories/summary/summary.stories.tsx +31 -0
- package/src/stories/table/table.stories.tsx +35 -0
- package/src/stories/text/text.stories.tsx +38 -0
- package/src/stories/textarea/textarea.stories.tsx +21 -0
- package/src/stories/utils/Orchestrator.tsx +310 -0
- package/src/stories/utils/OrchestratorData.tsx +176 -0
- package/src/stories/utils/OrchestratorOverview.tsx +70 -0
- package/src/stories/utils/OrchestratorSidebar.tsx +119 -0
- package/src/stories/utils/SchemaValidator.tsx +29 -0
- package/src/stories/utils/referentiel.ts +9 -0
- package/src/type.source.ts +6 -0
- package/src/use-lunatic/commons/compile-controls.ts +36 -18
- package/src/use-lunatic/commons/fill-components/fill-component-expressions.ts +4 -1
- package/src/use-lunatic/hooks/use-page-has-response.ts +1 -1
- package/src/use-lunatic/hooks/useOverview.spec.ts +3 -2
- package/src/use-lunatic/use-lunatic.test.ts +53 -40
- package/src/utils/number.ts +13 -0
- package/src/utils/object.ts +40 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/type.source.d.ts +6 -0
- package/use-lunatic/commons/compile-controls.js +21 -13
- package/use-lunatic/commons/compile-controls.js.map +1 -1
- package/use-lunatic/commons/fill-components/fill-component-expressions.js +5 -2
- package/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -1
- package/use-lunatic/hooks/use-page-has-response.js +2 -2
- package/use-lunatic/hooks/use-page-has-response.js.map +1 -1
- package/use-lunatic/hooks/useOverview.spec.js +8 -8
- package/use-lunatic/hooks/useOverview.spec.js.map +1 -1
- package/utils/number.d.ts +4 -0
- package/utils/number.js +13 -0
- package/utils/number.js.map +1 -1
- package/utils/object.d.ts +10 -0
- package/utils/object.js +30 -0
- package/utils/object.js.map +1 -1
- package/esm/stories/overview/sourceWithHierarchy.json +0 -5151
- package/esm/tests/utils/lunatic.d.ts +0 -15
- package/esm/tests/utils/lunatic.js +0 -27
- package/esm/tests/utils/lunatic.js.map +0 -1
- package/esm/use-lunatic/replace-component-sequence.d.ts +0 -36
- package/esm/use-lunatic/replace-component-sequence.js +0 -19
- package/esm/use-lunatic/replace-component-sequence.js.map +0 -1
- package/esm/use-lunatic/test.utils.d.ts +0 -2
- package/esm/use-lunatic/test.utils.js +0 -13
- package/esm/use-lunatic/test.utils.js.map +0 -1
- package/esm/utils/is-object.d.ts +0 -4
- package/esm/utils/is-object.js +0 -7
- package/esm/utils/is-object.js.map +0 -1
- package/esm/utils/to-number.d.ts +0 -4
- package/esm/utils/to-number.js +0 -13
- package/esm/utils/to-number.js.map +0 -1
- package/src/stories/accordion/accordion.stories.jsx +0 -17
- package/src/stories/behaviour/cleaning/cleaning.stories.jsx +0 -69
- package/src/stories/behaviour/controls/controls.stories.jsx +0 -81
- package/src/stories/behaviour/filter/dataLoop.json +0 -14
- package/src/stories/behaviour/filter/filter.stories.jsx +0 -36
- package/src/stories/behaviour/missing/missing.stories.jsx +0 -69
- package/src/stories/behaviour/others/V2_DeclarationsSimples.json +0 -908
- package/src/stories/behaviour/others/V2_MinMaxSum_Boucles.json +0 -489
- package/src/stories/behaviour/others/V2_QuestSimple_Boucles.json +0 -3919
- package/src/stories/behaviour/others/V2_TCMRallyeGames.json +0 -2760
- package/src/stories/behaviour/others/test-dylan.json +0 -538
- package/src/stories/behaviour/others/test.stories.jsx +0 -78
- package/src/stories/behaviour/paste/source.json +0 -32
- package/src/stories/behaviour/paste/test.stories.jsx +0 -62
- package/src/stories/behaviour/performance/performance.stories.jsx +0 -26
- package/src/stories/behaviour/resizing/resizing.stories.jsx +0 -60
- package/src/stories/behaviour/slots.stories.jsx +0 -32
- package/src/stories/checkbox-boolean/checkboxBoolean.stories.jsx +0 -17
- package/src/stories/checkbox-group/checkbox-group.stories.jsx +0 -77
- package/src/stories/checkbox-one/checkboxOne.stories.jsx +0 -53
- package/src/stories/date-picker/data.json +0 -3
- package/src/stories/date-picker/datepicker.stories.jsx +0 -26
- package/src/stories/declaration/data.json +0 -1
- package/src/stories/declaration/input.stories.jsx +0 -18
- package/src/stories/disabled/data.json +0 -16
- package/src/stories/disabled/disabled.stories.jsx +0 -18
- package/src/stories/dropdown/data.json +0 -8
- package/src/stories/dropdown/dropdown.stories.jsx +0 -25
- package/src/stories/duration/duration.stories.jsx +0 -25
- package/src/stories/filter-description/filter-description.stories.jsx +0 -37
- package/src/stories/input/data.json +0 -1
- package/src/stories/input/input.stories.jsx +0 -18
- package/src/stories/input-number/input-number.stories.jsx +0 -23
- package/src/stories/loop/loop.stories.jsx +0 -29
- package/src/stories/loop/roster-for-loop.stories.jsx +0 -46
- package/src/stories/markdown/markdown.stories.jsx +0 -20
- package/src/stories/overview/data.json +0 -1
- package/src/stories/overview/dataLoop.json +0 -93
- package/src/stories/overview/overview.stories.jsx +0 -44
- package/src/stories/overview/source.json +0 -25
- package/src/stories/pairwise/data.json +0 -12
- package/src/stories/pairwise/pairwise-links.stories.jsx +0 -48
- package/src/stories/question/question.stories.jsx +0 -16
- package/src/stories/questionnaires/logement/logement.stories.jsx +0 -59
- package/src/stories/questionnaires/recensement/data.json +0 -12
- package/src/stories/questionnaires/recensement/recensement.stories.jsx +0 -35
- package/src/stories/questionnaires/rp/data.json +0 -5
- package/src/stories/questionnaires/rp/rp.stories.jsx +0 -23
- package/src/stories/questionnaires/simpsons/simpsons.stories.jsx +0 -246
- package/src/stories/radio/radio.stories.jsx +0 -78
- package/src/stories/roundabout/data1.json +0 -13
- package/src/stories/roundabout/data2.json +0 -16
- package/src/stories/roundabout/roundabout.stories.jsx +0 -32
- package/src/stories/sequence/sequence.stories.jsx +0 -29
- package/src/stories/suggester/suggester.stories.jsx +0 -71
- package/src/stories/summary/data.json +0 -16
- package/src/stories/summary/summary.stories.jsx +0 -23
- package/src/stories/switch/README.md +0 -29
- package/src/stories/switch/data-forced.json +0 -40
- package/src/stories/switch/source.json +0 -64
- package/src/stories/switch/switch.stories.jsx +0 -17
- package/src/stories/table/data.json +0 -1
- package/src/stories/table/table.stories.jsx +0 -30
- package/src/stories/text/data-roster.json +0 -5
- package/src/stories/text/text.stories.jsx +0 -20
- package/src/stories/textarea/data.json +0 -1
- package/src/stories/textarea/textarea.stories.jsx +0 -18
- package/src/stories/utils/SchemaValidator.jsx +0 -40
- package/src/stories/utils/default-arg-types.js +0 -39
- package/src/stories/utils/default-args.js +0 -3
- package/src/stories/utils/options.js +0 -19
- package/src/stories/utils/orchestrator.jsx +0 -267
- package/src/stories/utils/orchestrator.scss +0 -66
- package/src/stories/utils/overview.jsx +0 -39
- package/src/stories/utils/overview.scss +0 -37
- package/src/stories/utils/referentiel.js +0 -7
- package/src/tests/utils/e2e.js +0 -91
- package/src/tests/utils/lunatic.ts +0 -33
- package/src/use-lunatic/replace-component-sequence.ts +0 -25
- package/src/use-lunatic/test.utils.ts +0 -17
- package/src/utils/is-object.ts +0 -6
- package/src/utils/to-number.ts +0 -12
- package/stories/overview/sourceWithHierarchy.json +0 -5151
- package/tests/utils/lunatic.d.ts +0 -15
- package/tests/utils/lunatic.js +0 -31
- package/tests/utils/lunatic.js.map +0 -1
- package/use-lunatic/replace-component-sequence.d.ts +0 -36
- package/use-lunatic/replace-component-sequence.js +0 -22
- package/use-lunatic/replace-component-sequence.js.map +0 -1
- package/use-lunatic/test.utils.d.ts +0 -2
- package/use-lunatic/test.utils.js +0 -17
- package/use-lunatic/test.utils.js.map +0 -1
- package/utils/is-object.d.ts +0 -4
- package/utils/is-object.js +0 -10
- package/utils/is-object.js.map +0 -1
- package/utils/to-number.d.ts +0 -4
- package/utils/to-number.js +0 -16
- package/utils/to-number.js.map +0 -1
- /package/src/stories/behaviour/cleaning/{loop.json → source-loop-scopes.json} +0 -0
- /package/src/stories/behaviour/controls/{boucles-n.json → source-boucles-n.json} +0 -0
- /package/src/stories/behaviour/controls/{loop.json → source-loop.json} +0 -0
- /package/src/stories/behaviour/controls/{roundabout.json → source-roundabout.json} +0 -0
- /package/src/stories/behaviour/controls/{simple-numeric.json → source-simple-numeric.json} +0 -0
- /package/src/stories/behaviour/controls/{simple.json → source-simple.json} +0 -0
- /package/src/stories/{disabled → behaviour/disabled}/source.json +0 -0
- /package/src/stories/{checkbox-boolean → checkbox}/source.json +0 -0
- /package/src/stories/{checkbox-group/source.json → checkbox/sourceGroup.json} +0 -0
- /package/src/stories/{checkbox-group/sourceCondition.json → checkbox/sourceGroupCondition.json} +0 -0
- /package/src/stories/{checkbox-group/sourceDetail.json → checkbox/sourceGroupDetail.json} +0 -0
- /package/src/stories/{checkbox-one/source.json → checkbox/sourceOne.json} +0 -0
- /package/src/stories/{checkbox-one/sourceDetail.json → checkbox/sourceOneDetail.json} +0 -0
- /package/src/stories/{date-picker → datepicker}/source.json +0 -0
- /package/src/stories/{markdown/source.json → declaration/sourceMarkdown.json} +0 -0
- /package/src/stories/duration/{mois.json → sourceMonths.json} +0 -0
- /package/src/stories/duration/{time.json → sourceTime.json} +0 -0
- /package/src/stories/filter-description/{source-options.json → sourceOptions.json} +0 -0
- /package/src/stories/table/{table-dynamique.json → source-dynamic.json} +0 -0
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import defaultArgTypes from '../../utils/default-arg-types';
|
|
3
|
-
import Orchestrator from '../../utils/orchestrator';
|
|
4
|
-
import source from './source.json';
|
|
5
|
-
|
|
6
|
-
const stories = {
|
|
7
|
-
title: 'Behaviour/Paste',
|
|
8
|
-
component: Orchestrator,
|
|
9
|
-
argTypes: {
|
|
10
|
-
...defaultArgTypes,
|
|
11
|
-
missing: {
|
|
12
|
-
table: { disable: false },
|
|
13
|
-
control: 'boolean',
|
|
14
|
-
defaultValue: true,
|
|
15
|
-
},
|
|
16
|
-
activeGoNextForMissing: {
|
|
17
|
-
table: { disable: false },
|
|
18
|
-
control: 'boolean',
|
|
19
|
-
defaultValue: true,
|
|
20
|
-
},
|
|
21
|
-
disableFilters: {
|
|
22
|
-
table: { disable: false },
|
|
23
|
-
control: 'boolean',
|
|
24
|
-
defaultValue: false,
|
|
25
|
-
},
|
|
26
|
-
disableFiltersDescription: {
|
|
27
|
-
table: { disable: false },
|
|
28
|
-
control: 'boolean',
|
|
29
|
-
defaultValue: true,
|
|
30
|
-
},
|
|
31
|
-
management: {
|
|
32
|
-
table: { disable: false },
|
|
33
|
-
control: 'boolean',
|
|
34
|
-
defaultValue: false,
|
|
35
|
-
},
|
|
36
|
-
activeControls: {
|
|
37
|
-
control: 'boolean',
|
|
38
|
-
defaultValue: true,
|
|
39
|
-
},
|
|
40
|
-
source: {
|
|
41
|
-
table: { disable: false },
|
|
42
|
-
control: { type: 'object' },
|
|
43
|
-
defaultValue: source,
|
|
44
|
-
},
|
|
45
|
-
data: {
|
|
46
|
-
table: { disable: false },
|
|
47
|
-
control: { type: 'object' },
|
|
48
|
-
defaultValue: { COLLECTED: { READY: { COLLECTED: true } } },
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default stories;
|
|
54
|
-
|
|
55
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
56
|
-
export const Default = Template.bind({});
|
|
57
|
-
|
|
58
|
-
Default.args = {
|
|
59
|
-
id: 'simpsons-default',
|
|
60
|
-
pagination: true,
|
|
61
|
-
source,
|
|
62
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../../utils/orchestrator';
|
|
3
|
-
import source from './source.json';
|
|
4
|
-
import { generateData } from '../../../tests/utils/lunatic';
|
|
5
|
-
import { times } from '../../../utils/array';
|
|
6
|
-
|
|
7
|
-
const stories = {
|
|
8
|
-
title: 'Behaviour/Performance',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default stories;
|
|
13
|
-
|
|
14
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
15
|
-
export const Default = Template.bind({});
|
|
16
|
-
Default.args = {
|
|
17
|
-
id: 'performance-default',
|
|
18
|
-
pagination: true,
|
|
19
|
-
source,
|
|
20
|
-
data: generateData({
|
|
21
|
-
PRENOM: times(200, (k) => `John${k}`),
|
|
22
|
-
NOM: times(200, (k) => `Doe${k}`),
|
|
23
|
-
AGE: times(200, (k) => k + 1),
|
|
24
|
-
BIRTHDAY: times(200, (k) => `2${k.toString().padStart(3, '0')}-01-01`),
|
|
25
|
-
}),
|
|
26
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import defaultArgTypes from '../../utils/default-arg-types';
|
|
3
|
-
import Orchestrator from '../../utils/orchestrator';
|
|
4
|
-
import source from './source.json';
|
|
5
|
-
import sourceResizingCleaning from './source-resizing-cleaning.json';
|
|
6
|
-
|
|
7
|
-
const stories = {
|
|
8
|
-
title: 'Behaviour/Resizing',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
argTypes: {
|
|
11
|
-
...defaultArgTypes,
|
|
12
|
-
missing: {
|
|
13
|
-
table: { disable: false },
|
|
14
|
-
control: 'boolean',
|
|
15
|
-
defaultValue: true,
|
|
16
|
-
},
|
|
17
|
-
activeGoNextForMissing: {
|
|
18
|
-
table: { disable: false },
|
|
19
|
-
control: 'boolean',
|
|
20
|
-
defaultValue: true,
|
|
21
|
-
},
|
|
22
|
-
management: {
|
|
23
|
-
table: { disable: false },
|
|
24
|
-
control: 'boolean',
|
|
25
|
-
defaultValue: false,
|
|
26
|
-
},
|
|
27
|
-
activeControls: {
|
|
28
|
-
control: 'boolean',
|
|
29
|
-
defaultValue: true,
|
|
30
|
-
},
|
|
31
|
-
source: {
|
|
32
|
-
table: { disable: false },
|
|
33
|
-
control: { type: 'object' },
|
|
34
|
-
defaultValue: source,
|
|
35
|
-
},
|
|
36
|
-
data: {
|
|
37
|
-
table: { disable: false },
|
|
38
|
-
control: { type: 'object' },
|
|
39
|
-
defaultValue: { COLLECTED: { READY: { COLLECTED: true } } },
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export default stories;
|
|
45
|
-
|
|
46
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
47
|
-
export const Default = Template.bind({});
|
|
48
|
-
|
|
49
|
-
Default.args = {
|
|
50
|
-
id: 'resizing-default',
|
|
51
|
-
pagination: true,
|
|
52
|
-
source,
|
|
53
|
-
};
|
|
54
|
-
export const ResizingWithCleaning = Template.bind({});
|
|
55
|
-
|
|
56
|
-
ResizingWithCleaning.args = {
|
|
57
|
-
id: 'resizing-with-cleaning',
|
|
58
|
-
source: sourceResizingCleaning,
|
|
59
|
-
pagination: true,
|
|
60
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import source from '../input/source';
|
|
4
|
-
import data from '../input/data';
|
|
5
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
6
|
-
|
|
7
|
-
const stories = {
|
|
8
|
-
title: 'Behaviour/Slots',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
argTypes: defaultArgTypes,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default stories;
|
|
14
|
-
|
|
15
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
16
|
-
export const Default = Template.bind({});
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @var
|
|
20
|
-
*/
|
|
21
|
-
const CustomInput = ({ onChange, value, label }) => (
|
|
22
|
-
<fieldset>
|
|
23
|
-
<legend style={{ color: 'gray', fontSize: '1rem' }}>{label}</legend>
|
|
24
|
-
<input
|
|
25
|
-
style={{ border: 'solid 3px gray', padding: '.5rem 1rem' }}
|
|
26
|
-
value={value}
|
|
27
|
-
onChange={(e) => onChange(e.target.value)}
|
|
28
|
-
/>
|
|
29
|
-
</fieldset>
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
Default.args = { id: 'input', source, data, slots: { Input: CustomInput } };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import source from './source';
|
|
4
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
5
|
-
|
|
6
|
-
const stories = {
|
|
7
|
-
title: 'Components/Checkboolean',
|
|
8
|
-
component: Orchestrator,
|
|
9
|
-
argTypes: defaultArgTypes,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default stories;
|
|
13
|
-
|
|
14
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
15
|
-
export const Default = Template.bind({});
|
|
16
|
-
|
|
17
|
-
Default.args = { id: 'checkboxBoolean', source };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import source from './source';
|
|
4
|
-
import sourceLoop from './sourceLoop';
|
|
5
|
-
import sourceDetail from './sourceDetail';
|
|
6
|
-
import sourceCondition from './sourceCondition';
|
|
7
|
-
import defaultArgs from '../utils/default-args';
|
|
8
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
9
|
-
|
|
10
|
-
const stories = {
|
|
11
|
-
title: 'Components/CheckboxGroup',
|
|
12
|
-
component: Orchestrator,
|
|
13
|
-
args: {
|
|
14
|
-
...defaultArgs,
|
|
15
|
-
shortcut: true,
|
|
16
|
-
},
|
|
17
|
-
argTypes: {
|
|
18
|
-
...defaultArgTypes,
|
|
19
|
-
shortcut: {
|
|
20
|
-
table: { disable: false },
|
|
21
|
-
control: 'boolean',
|
|
22
|
-
defaultValue: true,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default stories;
|
|
28
|
-
|
|
29
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
30
|
-
export const Default = Template.bind({});
|
|
31
|
-
|
|
32
|
-
Default.args = {
|
|
33
|
-
...stories.args,
|
|
34
|
-
source,
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const Condition = Template.bind({});
|
|
38
|
-
|
|
39
|
-
Condition.args = {
|
|
40
|
-
...Default.args,
|
|
41
|
-
source: sourceCondition,
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const ReadOnly = Template.bind({});
|
|
45
|
-
|
|
46
|
-
ReadOnly.args = {
|
|
47
|
-
...Default.args,
|
|
48
|
-
source,
|
|
49
|
-
readOnly: true,
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const WithDetail = Template.bind({});
|
|
53
|
-
WithDetail.args = {
|
|
54
|
-
...Default.args,
|
|
55
|
-
source: sourceDetail,
|
|
56
|
-
detailAlwaysDisplayed: false,
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
WithDetail.argTypes = {
|
|
60
|
-
...Default.argTypes,
|
|
61
|
-
detailAlwaysDisplayed: {
|
|
62
|
-
control: 'boolean',
|
|
63
|
-
defaultValue: false,
|
|
64
|
-
description: 'Always display detail options',
|
|
65
|
-
table: {
|
|
66
|
-
disable: false,
|
|
67
|
-
category: 'Components Options',
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const Loop = Template.bind({});
|
|
73
|
-
|
|
74
|
-
Loop.args = {
|
|
75
|
-
...Default.args,
|
|
76
|
-
source: sourceLoop,
|
|
77
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import source from './source';
|
|
4
|
-
import sourceWithDetail from './sourceDetail';
|
|
5
|
-
import defaultArgs from '../utils/default-args';
|
|
6
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
7
|
-
|
|
8
|
-
const stories = {
|
|
9
|
-
title: 'Components/CheckboxOne',
|
|
10
|
-
component: Orchestrator,
|
|
11
|
-
args: {
|
|
12
|
-
...defaultArgs,
|
|
13
|
-
shortcut: true,
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
...defaultArgTypes,
|
|
17
|
-
shortcut: {
|
|
18
|
-
table: { disable: false },
|
|
19
|
-
control: 'boolean',
|
|
20
|
-
defaultValue: true,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export default stories;
|
|
26
|
-
|
|
27
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
28
|
-
export const Default = Template.bind({});
|
|
29
|
-
|
|
30
|
-
Default.args = {
|
|
31
|
-
...stories.args,
|
|
32
|
-
source,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const WithDetail = Template.bind({});
|
|
36
|
-
WithDetail.args = {
|
|
37
|
-
...Default.args,
|
|
38
|
-
source: sourceWithDetail,
|
|
39
|
-
detailAlwaysDisplayed: false,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
WithDetail.argTypes = {
|
|
43
|
-
...Default.argTypes,
|
|
44
|
-
detailAlwaysDisplayed: {
|
|
45
|
-
control: 'boolean',
|
|
46
|
-
defaultValue: false,
|
|
47
|
-
description: 'Always display detail options',
|
|
48
|
-
table: {
|
|
49
|
-
disable: false,
|
|
50
|
-
category: 'Components Options',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
import { Datepicker } from '../../components/Datepicker/Datepicker';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Components/Datepicker',
|
|
6
|
-
component: Datepicker,
|
|
7
|
-
args: {
|
|
8
|
-
value: '1920-02-01',
|
|
9
|
-
dateFormat: 'YYYY-MM-DD',
|
|
10
|
-
handleChange: action('handleChange'),
|
|
11
|
-
response: { name: 'date' },
|
|
12
|
-
},
|
|
13
|
-
parameters: {
|
|
14
|
-
controls: { include: ['dateFormat', 'readOnly', 'disabled'] },
|
|
15
|
-
},
|
|
16
|
-
argTypes: {
|
|
17
|
-
dateFormat: {
|
|
18
|
-
control: 'radio',
|
|
19
|
-
options: ['YYYY-MM-DD', 'YYYY-MM', 'YYYY'],
|
|
20
|
-
},
|
|
21
|
-
readOnly: { control: 'boolean' },
|
|
22
|
-
disabled: { control: 'boolean' },
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const Basic = {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import source from './source';
|
|
4
|
-
import data from './data';
|
|
5
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
6
|
-
|
|
7
|
-
const stories = {
|
|
8
|
-
title: 'Components/Declarations',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
argTypes: defaultArgTypes,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default stories;
|
|
14
|
-
|
|
15
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
16
|
-
export const Default = Template.bind({});
|
|
17
|
-
|
|
18
|
-
Default.args = { id: 'input', source, data };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import source from './source';
|
|
4
|
-
import data from './data';
|
|
5
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
6
|
-
|
|
7
|
-
const stories = {
|
|
8
|
-
title: 'Components/Disabled-component',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
argTypes: defaultArgTypes,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default stories;
|
|
14
|
-
|
|
15
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
16
|
-
export const Disabled = Template.bind({});
|
|
17
|
-
|
|
18
|
-
Disabled.args = { id: 'input', source, data };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import source from './source';
|
|
4
|
-
import data from './data';
|
|
5
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
6
|
-
|
|
7
|
-
const stories = {
|
|
8
|
-
title: 'Components/Dropdown',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
argTypes: defaultArgTypes,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default stories;
|
|
14
|
-
|
|
15
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
16
|
-
export const Default = Template.bind({});
|
|
17
|
-
|
|
18
|
-
Default.args = {
|
|
19
|
-
id: 'dropdown',
|
|
20
|
-
source,
|
|
21
|
-
data,
|
|
22
|
-
disabled: false,
|
|
23
|
-
editable: false,
|
|
24
|
-
writable: true,
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
3
|
-
import Orchestrator from '../utils/orchestrator';
|
|
4
|
-
import moisSource from './mois';
|
|
5
|
-
import timeSource from './time';
|
|
6
|
-
|
|
7
|
-
const stories = {
|
|
8
|
-
title: 'Components/Duration',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
argTypes: defaultArgTypes,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default stories;
|
|
14
|
-
|
|
15
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
16
|
-
export const DateDuration = Template.bind({});
|
|
17
|
-
|
|
18
|
-
DateDuration.args = { id: 'durationAnnéesMois', source: moisSource };
|
|
19
|
-
|
|
20
|
-
export const TimeDuration = Template.bind({});
|
|
21
|
-
|
|
22
|
-
TimeDuration.args = {
|
|
23
|
-
id: 'durationHeureMinute',
|
|
24
|
-
source: timeSource,
|
|
25
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import source from './source';
|
|
4
|
-
import sourceOptions from './source-options';
|
|
5
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
6
|
-
|
|
7
|
-
const stories = {
|
|
8
|
-
title: 'Components/FilterDescription',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
argTypes: {
|
|
11
|
-
...defaultArgTypes,
|
|
12
|
-
disableFiltersDescription: {
|
|
13
|
-
table: { disable: false },
|
|
14
|
-
control: 'boolean',
|
|
15
|
-
defaultValue: true,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default stories;
|
|
21
|
-
|
|
22
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
23
|
-
export const Default = Template.bind({});
|
|
24
|
-
|
|
25
|
-
Default.args = {
|
|
26
|
-
id: 'filter-description',
|
|
27
|
-
disableFiltersDescription: false,
|
|
28
|
-
source,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const Options = Template.bind({});
|
|
32
|
-
|
|
33
|
-
Options.args = {
|
|
34
|
-
id: 'filter-description-options',
|
|
35
|
-
source: sourceOptions,
|
|
36
|
-
disableFiltersDescription: true,
|
|
37
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import source from './source';
|
|
4
|
-
import data from './data';
|
|
5
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
6
|
-
|
|
7
|
-
const stories = {
|
|
8
|
-
title: 'Components/Input',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
argTypes: defaultArgTypes,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default stories;
|
|
14
|
-
|
|
15
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
16
|
-
export const Default = Template.bind({});
|
|
17
|
-
|
|
18
|
-
Default.args = { id: 'input', source, data };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import source from './source';
|
|
4
|
-
import sourceEuro from './source-euro.json';
|
|
5
|
-
import sourceBigNumber from './source-big-number.json';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Components/InputNumber',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
argTypes: defaultArgTypes,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const Default = {
|
|
14
|
-
args: { source },
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const DynamicUnit = {
|
|
18
|
-
args: { source: sourceEuro },
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const BigNumber = {
|
|
22
|
-
args: { source: sourceBigNumber },
|
|
23
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import sourceBloc from './source-bloc.json';
|
|
4
|
-
import sourcePaginated from './source-paginated.json';
|
|
5
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
6
|
-
|
|
7
|
-
const stories = {
|
|
8
|
-
title: 'Components/Loop',
|
|
9
|
-
component: Orchestrator,
|
|
10
|
-
argTypes: defaultArgTypes,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default stories;
|
|
14
|
-
|
|
15
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
16
|
-
|
|
17
|
-
export const Default = Template.bind({});
|
|
18
|
-
Default.args = { id: 'loop', source: sourceBloc };
|
|
19
|
-
|
|
20
|
-
export const Paginated = Template.bind({});
|
|
21
|
-
Paginated.args = {
|
|
22
|
-
id: 'loop-paginated',
|
|
23
|
-
source: sourcePaginated,
|
|
24
|
-
initialPage: '1',
|
|
25
|
-
data: {},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const ReadOnly = Template.bind({});
|
|
29
|
-
ReadOnly.args = { id: 'bloc-for-loop', source: sourceBloc, readOnly: true };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import sourceRoster from './source-roster';
|
|
4
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
5
|
-
import { playwrightToUserEvent } from '../../tests/utils/e2e';
|
|
6
|
-
import { sleep } from '../../tests/utils/timer';
|
|
7
|
-
|
|
8
|
-
const stories = {
|
|
9
|
-
title: 'Components/RosterForLoop',
|
|
10
|
-
component: Orchestrator,
|
|
11
|
-
argTypes: defaultArgTypes,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default stories;
|
|
15
|
-
|
|
16
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
17
|
-
export const Default = Template.bind({});
|
|
18
|
-
export const ReadOnly = Template.bind({});
|
|
19
|
-
|
|
20
|
-
Default.args = { id: 'roster-for-loop', source: sourceRoster };
|
|
21
|
-
|
|
22
|
-
ReadOnly.args = {
|
|
23
|
-
id: 'roster-for-loop-readonly',
|
|
24
|
-
source: sourceRoster,
|
|
25
|
-
readOnly: true,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const Filled = Template.bind({});
|
|
29
|
-
Filled.args = { id: 'roster-for-loop', source: sourceRoster };
|
|
30
|
-
|
|
31
|
-
Filled.play = async ({ args, canvasElement }) => {
|
|
32
|
-
const page = playwrightToUserEvent(canvasElement);
|
|
33
|
-
await sleep(100);
|
|
34
|
-
await page.getByRole('button', { name: 'Ajouter un individu' }).click();
|
|
35
|
-
await page.getByLabel('Prénom', { index: 0 }).fill('John');
|
|
36
|
-
await page.getByLabel('Prénom', { index: 1 }).fill('Jane');
|
|
37
|
-
await page.getByRole('button', { name: 'Next' }).click();
|
|
38
|
-
await page.getByLabel('John, quel est vôtre âge ?').fill('18');
|
|
39
|
-
await page.getByRole('button', { name: 'Next' }).click();
|
|
40
|
-
await page.getByLabel('Jane, quel est vôtre âge ?').fill('21');
|
|
41
|
-
await page.getByLabel(/Page/).fill('2.1#1');
|
|
42
|
-
await page.getByRole('button', { name: /Go to page/ }).click();
|
|
43
|
-
await page.getByRole('button', { name: 'Next' }).click();
|
|
44
|
-
await page.getByRole('button', { name: 'Next' }).click();
|
|
45
|
-
await page.getByText('End').shouldBeVisible();
|
|
46
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Orchestrator from '../utils/orchestrator';
|
|
3
|
-
import defaultArgTypes from '../utils/default-arg-types';
|
|
4
|
-
import source from './source.json';
|
|
5
|
-
|
|
6
|
-
const stories = {
|
|
7
|
-
title: 'Behaviour/Markdown',
|
|
8
|
-
component: Orchestrator,
|
|
9
|
-
argTypes: defaultArgTypes,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default stories;
|
|
13
|
-
|
|
14
|
-
const Template = (args) => <Orchestrator {...args} />;
|
|
15
|
-
export const Default = Template.bind({});
|
|
16
|
-
|
|
17
|
-
Default.args = {
|
|
18
|
-
id: 'markdown',
|
|
19
|
-
source: source,
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|