@inseefr/lunatic 2.5.1-suggesterCustomisationStyle → 2.5.2-beta

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.
Files changed (59) hide show
  1. package/lib/components/commons/components/combo-box/combo-box-container.js +3 -2
  2. package/lib/components/commons/components/combo-box/combo-box-content-box.js +2 -7
  3. package/lib/components/commons/components/combo-box/combo-box-content.js +6 -5
  4. package/lib/components/commons/components/combo-box/combo-box.js +22 -6
  5. package/lib/components/commons/components/combo-box/panel/panel-container.js +5 -2
  6. package/lib/components/commons/components/combo-box/panel/panel-container.spec.js +7 -6
  7. package/lib/components/commons/components/combo-box/panel/panel.js +2 -2
  8. package/lib/components/commons/components/combo-box/selection/selection-container.js +2 -2
  9. package/lib/components/commons/components/combo-box/selection/selection.js +2 -2
  10. package/lib/components/dropdown/lunatic-dropdown.js +3 -1
  11. package/lib/components/index.js +7 -0
  12. package/lib/components/modal/html/modal.js +88 -0
  13. package/lib/components/modal/html/modal.scss +43 -0
  14. package/lib/components/modal/index.js +13 -0
  15. package/lib/components/modal/lunatic-modal.js +38 -0
  16. package/lib/components/pairwise-links/orchestrator.js +2 -0
  17. package/lib/components/pairwise-links/pairwise-links.js +1 -1
  18. package/lib/components/pairwise-links/row.js +2 -0
  19. package/lib/components/roundabout/lunatic-roundabout.js +0 -7
  20. package/lib/components/suggester/html/suggester.js +10 -6
  21. package/lib/src/components/commons/components/combo-box/combo-box-container.d.ts +1 -0
  22. package/lib/src/components/commons/components/combo-box/combo-box-content-box.d.ts +2 -5
  23. package/lib/src/components/commons/components/combo-box/combo-box-content.d.ts +2 -2
  24. package/lib/src/components/commons/components/combo-box/combo-box.d.ts +1 -0
  25. package/lib/src/components/commons/components/combo-box/combo-box.stories.d.ts +2 -1
  26. package/lib/src/components/commons/components/combo-box/panel/panel-container.d.ts +2 -2
  27. package/lib/src/components/commons/components/combo-box/selection/selection-container.d.ts +2 -2
  28. package/lib/src/components/commons/components/combo-box/selection/selection.d.ts +2 -2
  29. package/lib/src/components/dropdown/lunatic-dropdown.d.ts +1 -1
  30. package/lib/src/components/index.d.ts +1 -0
  31. package/lib/src/components/modal/html/modal.d.ts +14 -0
  32. package/lib/src/components/modal/index.d.ts +1 -0
  33. package/lib/src/components/modal/lunatic-modal.d.ts +3 -0
  34. package/lib/src/components/pairwise-links/row.d.ts +1 -1
  35. package/lib/src/components/suggester/html/suggester.d.ts +1 -0
  36. package/lib/src/components/type.d.ts +8 -0
  37. package/lib/src/use-lunatic/actions.d.ts +4 -0
  38. package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +40 -0
  39. package/lib/src/use-lunatic/reducer/overview/overview-on-init.d.ts +2 -0
  40. package/lib/src/use-lunatic/type.d.ts +2 -0
  41. package/lib/src/use-lunatic/use-lunatic.d.ts +22 -0
  42. package/lib/stories/modal/modal.stories.js +34 -0
  43. package/lib/stories/modal/source.json +97 -0
  44. package/lib/stories/questionnaires/simpsons/simpsons.stories.js +33 -36
  45. package/lib/stories/roundabout/data1.json +25 -0
  46. package/lib/stories/roundabout/roundabout.stories.js +12 -4
  47. package/lib/use-lunatic/commons/fill-components/fill-from-state.js +6 -2
  48. package/lib/use-lunatic/commons/page-navigation.js +2 -2
  49. package/lib/use-lunatic/commons/page.js +8 -2
  50. package/lib/use-lunatic/initial-state.js +2 -0
  51. package/lib/use-lunatic/reducer/commons/auto-explore-loop.js +24 -5
  52. package/lib/use-lunatic/reducer/reduce-go-next-page.js +11 -4
  53. package/lib/use-lunatic/reducer/reduce-go-previous-page.js +13 -5
  54. package/lib/use-lunatic/reducer/reduce-go-to-page.js +7 -6
  55. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-resizing.js +0 -3
  56. package/lib/use-lunatic/reducer/reduce-on-init.js +11 -7
  57. package/lib/use-lunatic/use-lunatic.js +3 -1
  58. package/package.json +1 -1
  59. /package/lib/stories/roundabout/{data.json → data2.json} +0 -0
@@ -4,7 +4,7 @@ type Props = PropsWithChildren<{
4
4
  onBlur: () => void;
5
5
  onFocus: () => void;
6
6
  onKeyDown: (key: string) => void;
7
- className?: string;
7
+ classNamePrefix?: string;
8
8
  }>;
9
- export declare function ComboBoxContent({ children, focused, onFocus, onBlur, onKeyDown, className, }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export declare function ComboBoxContent({ children, focused, onFocus, onBlur, onKeyDown, classNamePrefix, }: Props): import("react/jsx-runtime").JSX.Element;
10
10
  export default ComboBoxContent;
@@ -6,6 +6,7 @@ import { PanelProps } from './panel/panel';
6
6
  import { LunaticBaseProps } from '../../../type';
7
7
  type Props = SelectionProps & PanelProps & {
8
8
  className?: string;
9
+ classNamePrefix?: string;
9
10
  classStyle?: string;
10
11
  value: string | null;
11
12
  messageError?: string;
@@ -10,9 +10,10 @@ export declare const Default: Story<{
10
10
  editable?: boolean | undefined;
11
11
  labelId?: string | undefined;
12
12
  id?: string | undefined;
13
- className?: string | undefined;
13
+ classNamePrefix?: string | undefined;
14
14
  } & import("./selection/label-selection").LabelSelectionProps & import("./panel/panel").PanelProps & {
15
15
  className?: string | undefined;
16
+ classNamePrefix?: string | undefined;
16
17
  classStyle?: string | undefined;
17
18
  value: string | null;
18
19
  messageError?: string | undefined;
@@ -4,5 +4,5 @@ type Props = PropsWithChildren<{
4
4
  expanded?: boolean;
5
5
  id?: string;
6
6
  }>;
7
- export declare function PanelContainer({ children, focused, expanded, id }: Props): import("react/jsx-runtime").JSX.Element;
8
- export {};
7
+ declare const _default: import("react").ComponentType<Props>;
8
+ export default _default;
@@ -5,7 +5,7 @@ type Props = PropsWithChildren<{
5
5
  disabled?: boolean;
6
6
  labelId?: string;
7
7
  id?: string;
8
- className?: string;
8
+ classNamePrefix?: string;
9
9
  }>;
10
- declare function SelectionContainer({ children, id, expanded, focused, disabled, labelId, className, }: Props): import("react/jsx-runtime").JSX.Element;
10
+ declare function SelectionContainer({ children, id, expanded, focused, disabled, labelId, classNamePrefix, }: Props): import("react/jsx-runtime").JSX.Element;
11
11
  export default SelectionContainer;
@@ -6,6 +6,6 @@ export type SelectionProps = {
6
6
  editable?: boolean;
7
7
  labelId?: string;
8
8
  id?: string;
9
- className?: string;
9
+ classNamePrefix?: string;
10
10
  } & LabelSelectionProps;
11
- export declare function Selection({ labelRenderer, placeholder, search, expanded, disabled, focused, onChange, selectedIndex, options, editable, labelId, id, className, }: SelectionProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function Selection({ labelRenderer, placeholder, search, expanded, disabled, focused, onChange, selectedIndex, options, editable, labelId, id, classNamePrefix, }: SelectionProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { LunaticComponentProps } from '../type';
2
- declare function LunaticDropdown({ id, handleChange, options, writable, disabled, value, response, errors, label, preferences, declarations, missing, missingResponse, management, description, }: LunaticComponentProps<'Dropdown'>): import("react/jsx-runtime").JSX.Element;
2
+ declare function LunaticDropdown({ id, handleChange, options, writable, disabled, className, value, response, errors, label, preferences, declarations, missing, missingResponse, management, description, }: LunaticComponentProps<'Dropdown'>): import("react/jsx-runtime").JSX.Element;
3
3
  export default LunaticDropdown;
@@ -27,3 +27,4 @@ export { Summary } from './summary';
27
27
  export { default as QuestionInformation } from './questions/question-information';
28
28
  export { default as QuestionContext } from './questions/question-context';
29
29
  export { default as QuestionExplication } from './question-explication';
30
+ export { default as ConfirmationModal } from './modal';
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import './modal.scss';
3
+ declare const _default: import("react").ComponentType<Pick<import("../../type").LunaticBaseProps<string | null> & {
4
+ goToPage: (page: {
5
+ page: string;
6
+ iteration?: number | undefined;
7
+ nbIterations?: number | undefined;
8
+ subPage?: number | undefined;
9
+ }) => void;
10
+ page: string;
11
+ goNextPage: () => void;
12
+ goPreviousPage: () => void;
13
+ }, "label" | "id" | "description" | "goToPage" | "page" | "goNextPage" | "goPreviousPage">>;
14
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default } from './lunatic-modal';
@@ -0,0 +1,3 @@
1
+ import { LunaticComponentProps } from '../type';
2
+ declare function LunaticModal(props: LunaticComponentProps<'Modal'>): import("react/jsx-runtime").JSX.Element;
3
+ export default LunaticModal;
@@ -3,5 +3,5 @@ type Props = {
3
3
  linksIterations: [number, number];
4
4
  lengths: number[];
5
5
  } & Omit<LunaticComponentProps<'PairwiseLinks'>, 'declarations' | 'xAxisIterations' | 'yAxisIterations'>;
6
- declare function Row({ components, value: valueMap, handleChange, features, missing, shortcut, management, preferences, executeExpression, linksIterations, symLinks, lengths, }: Props): import("react/jsx-runtime").JSX.Element | null;
6
+ declare function Row({ components, value: valueMap, handleChange, features, missing, shortcut, management, className, preferences, executeExpression, linksIterations, symLinks, lengths, }: Props): import("react/jsx-runtime").JSX.Element | null;
7
7
  export default Row;
@@ -5,6 +5,7 @@ import { ComboBoxOptionType } from '../../commons/components/combo-box/combo-box
5
5
  import { LunaticComponentProps } from '../../type';
6
6
  type Props = {
7
7
  className?: string;
8
+ classNamePrefix?: string;
8
9
  placeholder?: string;
9
10
  onSelect?: (s: string | null) => void;
10
11
  value: string | null;
@@ -41,6 +41,8 @@ export type LunaticBaseProps<ValueType = unknown> = {
41
41
  executeExpression: LunaticState['executeExpression'];
42
42
  features?: string[];
43
43
  componentType?: string;
44
+ goNextPage?: () => void;
45
+ goPreviousPage?: () => void;
44
46
  };
45
47
  export type SuggesterOption = {
46
48
  children?: string[];
@@ -264,6 +266,12 @@ type ComponentPropsByType = {
264
266
  iterations?: number;
265
267
  }>;
266
268
  };
269
+ Modal: LunaticBaseProps<string | null> & {
270
+ goToPage: ReturnType<typeof useLunatic>['goToPage'];
271
+ page: string;
272
+ goNextPage: () => void;
273
+ goPreviousPage: () => void;
274
+ };
267
275
  };
268
276
  export type LunaticComponentType = keyof ComponentPropsByType;
269
277
  export type LunaticComponentProps<T extends LunaticComponentType = LunaticComponentType> = ComponentPropsByType[T];
@@ -50,6 +50,8 @@ export type ActionInit = {
50
50
  handleChange: LunaticState['handleChange'];
51
51
  activeControls: boolean;
52
52
  goToPage: (params: ActionGoToPage['payload']) => void;
53
+ goNextPage: () => void;
54
+ goPreviousPage: () => void;
53
55
  withOverview: boolean;
54
56
  };
55
57
  };
@@ -112,6 +114,8 @@ export declare const onInit: (payload: {
112
114
  handleChange: LunaticState['handleChange'];
113
115
  activeControls: boolean;
114
116
  goToPage: (params: ActionGoToPage['payload']) => void;
117
+ goNextPage: () => void;
118
+ goPreviousPage: () => void;
115
119
  withOverview: boolean;
116
120
  }) => ActionInit & {
117
121
  type: ActionKind.ON_INIT;
@@ -5,6 +5,8 @@ export type FilledProps = {
5
5
  preferences: LunaticState['preferences'];
6
6
  goToPage: LunaticState['goToPage'];
7
7
  shortcut: LunaticState['shortcut'];
8
+ goNextPage: LunaticState['goNextPage'];
9
+ goPreviousPage: LunaticState['goPreviousPage'];
8
10
  };
9
11
  declare function fillFromState(component: LunaticComponentDefinition, state: LunaticState): {
10
12
  handleChange: (response: {
@@ -28,6 +30,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
28
30
  status: import("../../use-suggesters").SuggesterStatus;
29
31
  timestamp: number;
30
32
  };
33
+ goNextPage: () => void;
34
+ goPreviousPage: () => void;
31
35
  label: import("../../type-source").LabelType;
32
36
  declarations?: import("../../type-source").DeclarationType[] | undefined;
33
37
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -60,6 +64,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
60
64
  status: import("../../use-suggesters").SuggesterStatus;
61
65
  timestamp: number;
62
66
  };
67
+ goNextPage: () => void;
68
+ goPreviousPage: () => void;
63
69
  label: import("../../type-source").LabelType;
64
70
  declarations?: import("../../type-source").DeclarationType[] | undefined;
65
71
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -93,6 +99,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
93
99
  status: import("../../use-suggesters").SuggesterStatus;
94
100
  timestamp: number;
95
101
  };
102
+ goNextPage: () => void;
103
+ goPreviousPage: () => void;
96
104
  label: import("../../type-source").LabelType;
97
105
  declarations?: import("../../type-source").DeclarationType[] | undefined;
98
106
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -162,6 +170,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
162
170
  status: import("../../use-suggesters").SuggesterStatus;
163
171
  timestamp: number;
164
172
  };
173
+ goNextPage: () => void;
174
+ goPreviousPage: () => void;
165
175
  label: import("../../type-source").LabelType;
166
176
  declarations?: import("../../type-source").DeclarationType[] | undefined;
167
177
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -204,6 +214,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
204
214
  status: import("../../use-suggesters").SuggesterStatus;
205
215
  timestamp: number;
206
216
  };
217
+ goNextPage: () => void;
218
+ goPreviousPage: () => void;
207
219
  label: import("../../type-source").LabelType;
208
220
  declarations?: import("../../type-source").DeclarationType[] | undefined;
209
221
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -272,6 +284,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
272
284
  status: import("../../use-suggesters").SuggesterStatus;
273
285
  timestamp: number;
274
286
  };
287
+ goNextPage: () => void;
288
+ goPreviousPage: () => void;
275
289
  label: import("../../type-source").LabelType;
276
290
  declarations?: import("../../type-source").DeclarationType[] | undefined;
277
291
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -309,6 +323,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
309
323
  status: import("../../use-suggesters").SuggesterStatus;
310
324
  timestamp: number;
311
325
  };
326
+ goNextPage: () => void;
327
+ goPreviousPage: () => void;
312
328
  label: import("../../type-source").LabelType;
313
329
  declarations?: import("../../type-source").DeclarationType[] | undefined;
314
330
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -345,6 +361,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
345
361
  status: import("../../use-suggesters").SuggesterStatus;
346
362
  timestamp: number;
347
363
  };
364
+ goNextPage: () => void;
365
+ goPreviousPage: () => void;
348
366
  label: import("../../type-source").LabelType;
349
367
  declarations?: import("../../type-source").DeclarationType[] | undefined;
350
368
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -382,6 +400,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
382
400
  status: import("../../use-suggesters").SuggesterStatus;
383
401
  timestamp: number;
384
402
  };
403
+ goNextPage: () => void;
404
+ goPreviousPage: () => void;
385
405
  label: import("../../type-source").LabelType;
386
406
  declarations?: import("../../type-source").DeclarationType[] | undefined;
387
407
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -416,6 +436,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
416
436
  status: import("../../use-suggesters").SuggesterStatus;
417
437
  timestamp: number;
418
438
  };
439
+ goNextPage: () => void;
440
+ goPreviousPage: () => void;
419
441
  label: import("../../type-source").LabelType;
420
442
  declarations?: import("../../type-source").DeclarationType[] | undefined;
421
443
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -454,6 +476,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
454
476
  status: import("../../use-suggesters").SuggesterStatus;
455
477
  timestamp: number;
456
478
  };
479
+ goNextPage: () => void;
480
+ goPreviousPage: () => void;
457
481
  label: import("../../type-source").LabelType;
458
482
  declarations?: import("../../type-source").DeclarationType[] | undefined;
459
483
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -487,6 +511,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
487
511
  status: import("../../use-suggesters").SuggesterStatus;
488
512
  timestamp: number;
489
513
  };
514
+ goNextPage: () => void;
515
+ goPreviousPage: () => void;
490
516
  label: import("../../type-source").LabelType;
491
517
  declarations?: import("../../type-source").DeclarationType[] | undefined;
492
518
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -525,6 +551,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
525
551
  status: import("../../use-suggesters").SuggesterStatus;
526
552
  timestamp: number;
527
553
  };
554
+ goNextPage: () => void;
555
+ goPreviousPage: () => void;
528
556
  label: import("../../type-source").LabelType;
529
557
  declarations?: import("../../type-source").DeclarationType[] | undefined;
530
558
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -562,6 +590,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
562
590
  status: import("../../use-suggesters").SuggesterStatus;
563
591
  timestamp: number;
564
592
  };
593
+ goNextPage: () => void;
594
+ goPreviousPage: () => void;
565
595
  label: import("../../type-source").LabelType;
566
596
  declarations?: import("../../type-source").DeclarationType[] | undefined;
567
597
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -598,6 +628,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
598
628
  status: import("../../use-suggesters").SuggesterStatus;
599
629
  timestamp: number;
600
630
  };
631
+ goNextPage: () => void;
632
+ goPreviousPage: () => void;
601
633
  label: import("../../type-source").LabelType;
602
634
  declarations?: import("../../type-source").DeclarationType[] | undefined;
603
635
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -631,6 +663,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
631
663
  status: import("../../use-suggesters").SuggesterStatus;
632
664
  timestamp: number;
633
665
  };
666
+ goNextPage: () => void;
667
+ goPreviousPage: () => void;
634
668
  label: import("../../type-source").LabelType;
635
669
  declarations?: import("../../type-source").DeclarationType[] | undefined;
636
670
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -666,6 +700,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
666
700
  status: import("../../use-suggesters").SuggesterStatus;
667
701
  timestamp: number;
668
702
  };
703
+ goNextPage: () => void;
704
+ goPreviousPage: () => void;
669
705
  label: import("../../type-source").LabelType;
670
706
  declarations?: import("../../type-source").DeclarationType[] | undefined;
671
707
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -698,6 +734,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
698
734
  status: import("../../use-suggesters").SuggesterStatus;
699
735
  timestamp: number;
700
736
  };
737
+ goNextPage: () => void;
738
+ goPreviousPage: () => void;
701
739
  label: import("../../type-source").LabelType;
702
740
  declarations?: import("../../type-source").DeclarationType[] | undefined;
703
741
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -731,6 +769,8 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
731
769
  status: import("../../use-suggesters").SuggesterStatus;
732
770
  timestamp: number;
733
771
  };
772
+ goNextPage: () => void;
773
+ goPreviousPage: () => void;
734
774
  label: import("../../type-source").LabelType;
735
775
  declarations?: import("../../type-source").DeclarationType[] | undefined;
736
776
  conditionFilter: import("../../type-source").ConditionFilterType;
@@ -95,6 +95,8 @@ export declare function reduceOverviewOnInit(state: LunaticState, action: Action
95
95
  nbIterations?: number | undefined;
96
96
  subPage?: number | undefined;
97
97
  }) => void;
98
+ goNextPage: () => void;
99
+ goPreviousPage: () => void;
98
100
  getSuggesterStatus: (name: string) => {
99
101
  status: import("../../use-suggesters").SuggesterStatus;
100
102
  timestamp: number;
@@ -136,6 +136,8 @@ export type LunaticState = {
136
136
  nbIterations?: number;
137
137
  subPage?: number;
138
138
  }) => void;
139
+ goNextPage: () => void;
140
+ goPreviousPage: () => void;
139
141
  getSuggesterStatus: (name: string) => {
140
142
  status: SuggesterStatus;
141
143
  timestamp: number;
@@ -263,6 +263,17 @@ declare function useLunatic(source: LunaticSource, data: Partial<Record<"EXTERNA
263
263
  iterations?: number | undefined;
264
264
  }[];
265
265
  };
266
+ Modal: import("../components/type").LunaticBaseProps<string | null> & {
267
+ goToPage: (page: {
268
+ page: string;
269
+ iteration?: number | undefined;
270
+ nbIterations?: number | undefined;
271
+ subPage?: number | undefined;
272
+ }) => void;
273
+ page: string;
274
+ goNextPage: () => void;
275
+ goPreviousPage: () => void;
276
+ };
266
277
  })[] | undefined;
267
278
  except?: (keyof {
268
279
  InputNumber: import("../components/type").LunaticBaseProps<number | null> & {
@@ -498,6 +509,17 @@ declare function useLunatic(source: LunaticSource, data: Partial<Record<"EXTERNA
498
509
  iterations?: number | undefined;
499
510
  }[];
500
511
  };
512
+ Modal: import("../components/type").LunaticBaseProps<string | null> & {
513
+ goToPage: (page: {
514
+ page: string;
515
+ iteration?: number | undefined;
516
+ nbIterations?: number | undefined;
517
+ subPage?: number | undefined;
518
+ }) => void;
519
+ page: string;
520
+ goNextPage: () => void;
521
+ goPreviousPage: () => void;
522
+ };
501
523
  })[] | undefined;
502
524
  }) => import("./commons/fill-components/fill-components").LunaticComponentProps<"Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ComponentSet" | "Roundabout" | "QuestionExplication">[];
503
525
  goPreviousPage: () => void;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.Default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
9
+ var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
10
+ var _source = _interopRequireDefault(require("./source"));
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
14
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
18
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
+ var stories = {
20
+ title: 'Components/Modal',
21
+ component: _orchestrator["default"],
22
+ argTypes: _defaultArgTypes["default"]
23
+ };
24
+ var _default = stories;
25
+ exports["default"] = _default;
26
+ var Template = function Template(args) {
27
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_orchestrator["default"], _objectSpread({}, args));
28
+ };
29
+ var Default = Template.bind({});
30
+ exports.Default = Default;
31
+ Default.args = {
32
+ id: 'modal',
33
+ source: _source["default"]
34
+ };
@@ -0,0 +1,97 @@
1
+ {
2
+ "maxPage": "4",
3
+ "components": [
4
+ {
5
+ "id": "kze792d8",
6
+ "componentType": "InputNumber",
7
+ "mandatory": false,
8
+ "page": "1",
9
+ "min": 0,
10
+ "max": 10,
11
+ "decimals": 0,
12
+ "label": {
13
+ "value": "\"➡ 1. \" || \"In put for Number \"",
14
+ "type": "VTL|MD"
15
+ },
16
+ "description": { "value": "\"Description\"", "type": "VTL|MD" },
17
+ "conditionFilter": { "value": "true", "type": "VTL" },
18
+ "response": { "name": "NB" }
19
+ },
20
+ {
21
+ "id": "modaltoto",
22
+ "componentType": "ConfirmationModal",
23
+ "conditionFilter": { "value": "true", "type": "VTL" },
24
+ "page": "2",
25
+ "label": {
26
+ "value": "\"### Est-ce correcte ? \"",
27
+ "type": "VTL|MD"
28
+ },
29
+ "description": {
30
+ "value": "\"Vous avez renseigné : \" || cast(NB, string) || \".\"",
31
+ "type": "VTL|MD"
32
+ },
33
+ "declarations": [
34
+ {
35
+ "id": "kb9hi4j0-krnoclfe",
36
+ "declarationType": "INSTRUCTION",
37
+ "position": "BEFORE_QUESTION_TEXT",
38
+ "label": {
39
+ "value": "\"Déclaration Before\"",
40
+ "type": "VTL|MD"
41
+ }
42
+ },
43
+ {
44
+ "id": "kb9hi4j0-krnoclfe",
45
+ "declarationType": "INSTRUCTION",
46
+ "position": "AFTER_QUESTION_TEXT",
47
+ "label": {
48
+ "value": "\"Déclaration AFTER\"",
49
+ "type": "VTL|MD"
50
+ }
51
+ },
52
+ {
53
+ "id": "kb9hi4j0-krnoclfe",
54
+ "declarationType": "HELP",
55
+ "position": "DETACHABLE",
56
+ "label": {
57
+ "value": "\"Declaration Detachable\"",
58
+ "type": "VTL|MD"
59
+ }
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "id": "modaltoto",
65
+ "componentType": "Sequence",
66
+ "conditionFilter": { "value": "false", "type": "VTL" },
67
+ "page": "3",
68
+ "label": {
69
+ "value": "toto to skip",
70
+ "type": "VTL"
71
+ }
72
+ },
73
+ {
74
+ "id": "modaltoto",
75
+ "componentType": "Sequence",
76
+ "conditionFilter": { "value": "true", "type": "VTL" },
77
+ "page": "4",
78
+ "label": {
79
+ "value": "toto to not skip",
80
+ "type": "VTL"
81
+ }
82
+ }
83
+ ],
84
+ "variables": [
85
+ {
86
+ "variableType": "COLLECTED",
87
+ "name": "NB",
88
+ "values": {
89
+ "PREVIOUS": null,
90
+ "COLLECTED": null,
91
+ "FORCED": null,
92
+ "EDITED": null,
93
+ "INPUTED": null
94
+ }
95
+ }
96
+ ]
97
+ }