@inseefr/lunatic 2.7.1 → 2.7.2
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/README.md +45 -11
- package/lib/components/checkbox/checkbox-boolean/html/checkbox-boolean.js +3 -3
- package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +2 -1
- package/lib/components/checkbox/checkbox-group/checkbox-group-content.js +0 -2
- package/lib/components/checkbox/checkbox-group/html/checkbox-group-content.js +4 -2
- package/lib/components/checkbox/checkbox-group/html/checkbox-group.js +3 -3
- package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +2 -2
- package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +2 -1
- package/lib/components/checkbox/commons/checkbox-option.js +3 -1
- package/lib/components/commons/components/combo-box/combo-box-container.js +1 -2
- package/lib/components/commons/components/combo-box/combo-box.js +2 -2
- package/lib/components/commons/components/combo-box/selection/LabelOrInput.js +3 -1
- package/lib/components/commons/components/combo-box/selection/input.js +3 -1
- package/lib/components/commons/components/combo-box/selection/selection.js +3 -1
- package/lib/components/commons/components/errors/errors.js +12 -10
- package/lib/components/commons/components/errors/errors.spec.js +6 -6
- package/lib/components/component-set/html/__snapshots__/component-set.spec.tsx.snap +2 -0
- package/lib/components/component-set/html/component-set.js +2 -2
- package/lib/components/datepicker/html/DatepickerField.js +47 -0
- package/lib/components/datepicker/html/__snapshots__/datepicker.spec.tsx.snap +209 -17
- package/lib/components/datepicker/html/datepicker.js +104 -21
- package/lib/components/datepicker/html/datepicker.scss +19 -1
- package/lib/components/datepicker/html/datepicker.spec.js +71 -23
- package/lib/components/datepicker/lunatic-datepicker.js +5 -2
- package/lib/components/dropdown/lunatic-dropdown.js +2 -1
- package/lib/components/duration/duration.js +6 -7
- package/lib/components/duration/duration.scss +6 -14
- package/lib/components/duration/durationInput.js +14 -8
- package/lib/components/duration/durationUtils.js +38 -8
- package/lib/components/input/html/__snapshots__/input.spec.tsx.snap +2 -0
- package/lib/components/input/html/input.js +3 -3
- package/lib/components/input/lunatic-input.js +2 -1
- package/lib/components/input-number/html/__snapshots__/input-number.spec.tsx.snap +2 -2
- package/lib/components/input-number/html/input-number-thousand.js +4 -17
- package/lib/components/input-number/html/input-number.js +3 -5
- package/lib/components/input-number/lunatic-input-number.js +2 -3
- package/lib/components/loop/roster-for-loop/__snapshots__/roster-for-loop.spec.tsx.snap +88 -0
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +7 -3
- package/lib/components/loop/roster-for-loop/roster-for-loop.spec.js +46 -0
- package/lib/components/lunatic-components.js +2 -11
- package/lib/components/radio/html/radio-group-content.js +4 -2
- package/lib/components/radio/html/radio-group.js +3 -3
- package/lib/components/radio/html/radio-option.js +3 -1
- package/lib/components/radio/lunatic-radio-group.js +2 -1
- package/lib/components/suggester/find-best-label/find-best-label.js +5 -5
- package/lib/components/suggester/idb-suggester/check-store.js +6 -3
- package/lib/components/suggester/idb-suggester/idb-suggester.js +8 -7
- package/lib/components/suggester/idb-suggester/suggester-status.js +1 -4
- package/lib/components/suggester/lunatic-suggester.js +7 -4
- package/lib/components/suggester/searching/create-searching.js +19 -42
- package/lib/components/switch/html/switch.js +2 -2
- package/lib/components/switch/lunatic-switch.js +2 -1
- package/lib/components/table/lunatic-table.js +2 -2
- package/lib/components/textarea/html/__snapshots__/textarea.spec.tsx.snap +2 -0
- package/lib/components/textarea/html/textarea.js +6 -4
- package/lib/components/textarea/lunatic-textarea.js +6 -3
- package/lib/hooks/use-auto-focus.js +26 -0
- package/lib/src/components/checkbox/checkbox-boolean/html/checkbox-boolean.d.ts +1 -1
- package/lib/src/components/checkbox/checkbox-group/html/checkbox-group-content.d.ts +2 -1
- package/lib/src/components/checkbox/checkbox-group/html/checkbox-group.d.ts +1 -1
- package/lib/src/components/checkbox/commons/checkbox-option.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/combo-box-container.d.ts +2 -2
- package/lib/src/components/commons/components/combo-box/combo-box.d.ts +2 -2
- package/lib/src/components/commons/components/combo-box/selection/LabelOrInput.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/selection/input.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/selection/selection.d.ts +2 -1
- package/lib/src/components/commons/components/errors/errors.d.ts +6 -3
- package/lib/src/components/datepicker/html/DatepickerField.d.ts +12 -0
- package/lib/src/components/datepicker/html/datepicker.d.ts +4 -3
- package/lib/src/components/datepicker/lunatic-datepicker.d.ts +1 -0
- package/lib/src/components/dropdown/html/dropdown-writable/dropdown-writable.d.ts +1 -1
- package/lib/src/components/dropdown/html/dropdown.d.ts +3 -1
- package/lib/src/components/duration/durationInput.d.ts +6 -2
- package/lib/src/components/duration/durationUtils.d.ts +24 -7
- package/lib/src/components/input/html/input.d.ts +2 -2
- package/lib/src/components/input-number/html/input-number-thousand.d.ts +2 -2
- package/lib/src/components/input-number/html/input-number.d.ts +2 -3
- package/lib/src/components/radio/html/radio-group-content.d.ts +2 -1
- package/lib/src/components/radio/html/radio-group.d.ts +1 -1
- package/lib/src/components/radio/html/radio-option.d.ts +1 -0
- package/lib/src/components/suggester/find-best-label/find-best-label.d.ts +1 -1
- package/lib/src/components/suggester/html/suggester.d.ts +1 -1
- package/lib/src/components/suggester/idb-suggester/check-store.d.ts +5 -2
- package/lib/src/components/suggester/idb-suggester/idb-suggester.d.ts +5 -2
- package/lib/src/components/suggester/idb-suggester/suggester-status.d.ts +1 -4
- package/lib/src/components/suggester/lunatic-suggester.d.ts +1 -1
- package/lib/src/components/suggester/searching/create-searching.d.ts +1 -1
- package/lib/src/components/switch/html/switch.d.ts +1 -1
- package/lib/src/components/textarea/html/textarea.d.ts +3 -2
- package/lib/src/components/type.d.ts +5 -3
- package/lib/src/hooks/use-auto-focus.d.ts +6 -0
- package/lib/src/use-lunatic/actions.d.ts +2 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +383 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-component-value.d.ts +1 -1
- package/lib/src/use-lunatic/commons/fill-components/fill-component-value.spec.d.ts +1 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +20 -0
- package/lib/src/use-lunatic/commons/variables/lunatic-variables-store.d.ts +4 -0
- package/lib/src/use-lunatic/reducer/overview/overview-on-init.d.ts +1 -0
- package/lib/src/use-lunatic/type.d.ts +1 -0
- package/lib/src/use-lunatic/use-lunatic.d.ts +8 -3
- package/lib/src/use-lunatic/use-suggesters.d.ts +2 -1
- package/lib/src/utils/suggester-workers/append-to-index/create-append-task.d.ts +2 -2
- package/lib/src/utils/suggester-workers/worker-path.d.ts +6 -0
- package/lib/stories/behaviour/cleaning/source.json +151 -0
- package/lib/stories/behaviour/cleaning/test.stories.js +82 -0
- package/lib/stories/{questionnaires-test → behaviour}/controls/controls.stories.js +5 -5
- package/lib/stories/{questionnaires-test → behaviour/others}/test.stories.js +7 -7
- package/lib/stories/{paste-questionnaire → behaviour/paste}/test.stories.js +3 -3
- package/lib/stories/{resizing-questionnaire → behaviour/resizing}/test.stories.js +3 -3
- package/lib/stories/date-picker/datepicker.stories.js +32 -29
- package/lib/stories/duration/duration.stories.js +4 -4
- package/lib/stories/duration/{source.json → mois.json} +1 -1
- package/lib/stories/duration/{source1.json → time.json} +1 -1
- package/lib/use-lunatic/commons/fill-components/fill-component-required.js +23 -0
- package/lib/use-lunatic/commons/fill-components/fill-component-value.js +1 -1
- package/lib/use-lunatic/commons/fill-components/fill-component-value.spec.js +67 -0
- package/lib/use-lunatic/commons/fill-components/fill-components.js +2 -1
- package/lib/use-lunatic/commons/fill-components/fill-from-state.js +2 -0
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.js +15 -0
- package/lib/use-lunatic/commons/variables/lunatic-variables-store.spec.js +9 -1
- package/lib/use-lunatic/initial-state.js +2 -1
- package/lib/use-lunatic/reducer/reduce-on-init.js +4 -2
- package/lib/use-lunatic/use-lunatic.js +7 -3
- package/lib/use-lunatic/use-suggesters.js +54 -37
- package/lib/utils/env.js +9 -1
- package/lib/utils/suggester-workers/append-to-index/create-append-task.js +5 -4
- package/lib/utils/suggester-workers/create-worker.js +10 -1
- package/lib/utils/suggester-workers/worker-path.js +29 -0
- package/package.json +24 -11
- package/scripts/build/add-workers-to-public.js +44 -0
- package/scripts/build/workers-paths.js +45 -0
- package/workers-release/lunatic-append-worker-0.3.0.js +2 -0
- package/workers-release/lunatic-append-worker-0.3.0.js.LICENSE.txt +34 -0
- package/workers-release/lunatic-label-worker-0.3.0.js +2 -0
- package/workers-release/lunatic-label-worker-0.3.0.js.LICENSE.txt +13 -0
- package/workers-release/lunatic-search-worker-0.3.0.js +2 -0
- package/workers-release/lunatic-search-worker-0.3.0.js.LICENSE.txt +34 -0
- package/lib/components/datepicker/html/datepicker-container.js +0 -17
- package/lib/components/datepicker/html/datepicker-input.js +0 -35
- package/lib/env.d.js +0 -1
- package/lib/src/components/datepicker/html/datepicker-container.d.ts +0 -3
- package/lib/src/components/datepicker/html/datepicker-input.d.ts +0 -13
- package/lib/src/utils/get-component-value.d.ts +0 -5
- package/lib/src/utils/store-tools/worker-path.d.ts +0 -1
- package/lib/utils/get-component-value.js +0 -34
- package/lib/utils/get-component-value.test.js +0 -57
- package/lib/utils/store-tools/worker-path.js +0 -13
- package/lib/utils/suggester-workers/create-worker-ts.js +0 -54
- /package/lib/src/{utils/get-component-value.test.d.ts → components/loop/roster-for-loop/roster-for-loop.spec.d.ts} +0 -0
- /package/lib/src/utils/suggester-workers/{create-worker-ts.d.ts → create-worker.d.ts} +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/V2_ControlesNonNum_horsBoucle_PasPageFin.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/V2_ControlesNum_horsBoucle_PasPageFin.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/V2_Controles_BouclesLiees2_PasPageFin.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/V2_Controles_BouclesLiees_PasPageFin.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/boucles-n.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/controls-externes.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour}/controls/controls-externes.stories.js +0 -0
- /package/lib/stories/{questionnaires-test → behaviour/others}/V2_DeclarationsSimples.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour/others}/V2_MinMaxSum_Boucles.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour/others}/V2_QuestSimple_Boucles.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour/others}/V2_TCMRallyeGames.json +0 -0
- /package/lib/stories/{questionnaires-test → behaviour/others}/test-dylan.json +0 -0
- /package/lib/stories/{paste-questionnaire → behaviour/paste}/source.json +0 -0
- /package/lib/stories/{resizing-questionnaire → behaviour/resizing}/source.json +0 -0
|
@@ -34,6 +34,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
34
34
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
35
35
|
timestamp: number;
|
|
36
36
|
};
|
|
37
|
+
workersBasePath: string | undefined;
|
|
37
38
|
goNextPage: () => void;
|
|
38
39
|
goPreviousPage: () => void;
|
|
39
40
|
label: import("../../type-source").LabelType;
|
|
@@ -69,6 +70,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
69
70
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
70
71
|
timestamp: number;
|
|
71
72
|
};
|
|
73
|
+
workersBasePath: string | undefined;
|
|
72
74
|
goNextPage: () => void;
|
|
73
75
|
goPreviousPage: () => void;
|
|
74
76
|
label: import("../../type-source").LabelType;
|
|
@@ -105,6 +107,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
105
107
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
106
108
|
timestamp: number;
|
|
107
109
|
};
|
|
110
|
+
workersBasePath: string | undefined;
|
|
108
111
|
goNextPage: () => void;
|
|
109
112
|
goPreviousPage: () => void;
|
|
110
113
|
label: import("../../type-source").LabelType;
|
|
@@ -159,6 +162,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
159
162
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
160
163
|
timestamp: number;
|
|
161
164
|
};
|
|
165
|
+
workersBasePath: string | undefined;
|
|
162
166
|
goNextPage: () => void;
|
|
163
167
|
goPreviousPage: () => void;
|
|
164
168
|
label: import("../../type-source").LabelType;
|
|
@@ -204,6 +208,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
204
208
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
205
209
|
timestamp: number;
|
|
206
210
|
};
|
|
211
|
+
workersBasePath: string | undefined;
|
|
207
212
|
goNextPage: () => void;
|
|
208
213
|
goPreviousPage: () => void;
|
|
209
214
|
label: import("../../type-source").LabelType;
|
|
@@ -257,6 +262,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
257
262
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
258
263
|
timestamp: number;
|
|
259
264
|
};
|
|
265
|
+
workersBasePath: string | undefined;
|
|
260
266
|
goNextPage: () => void;
|
|
261
267
|
goPreviousPage: () => void;
|
|
262
268
|
label: import("../../type-source").LabelType;
|
|
@@ -297,6 +303,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
297
303
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
298
304
|
timestamp: number;
|
|
299
305
|
};
|
|
306
|
+
workersBasePath: string | undefined;
|
|
300
307
|
goNextPage: () => void;
|
|
301
308
|
goPreviousPage: () => void;
|
|
302
309
|
label: import("../../type-source").LabelType;
|
|
@@ -336,6 +343,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
336
343
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
337
344
|
timestamp: number;
|
|
338
345
|
};
|
|
346
|
+
workersBasePath: string | undefined;
|
|
339
347
|
goNextPage: () => void;
|
|
340
348
|
goPreviousPage: () => void;
|
|
341
349
|
label: import("../../type-source").LabelType;
|
|
@@ -376,6 +384,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
376
384
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
377
385
|
timestamp: number;
|
|
378
386
|
};
|
|
387
|
+
workersBasePath: string | undefined;
|
|
379
388
|
goNextPage: () => void;
|
|
380
389
|
goPreviousPage: () => void;
|
|
381
390
|
label: import("../../type-source").LabelType;
|
|
@@ -413,6 +422,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
413
422
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
414
423
|
timestamp: number;
|
|
415
424
|
};
|
|
425
|
+
workersBasePath: string | undefined;
|
|
416
426
|
goNextPage: () => void;
|
|
417
427
|
goPreviousPage: () => void;
|
|
418
428
|
label: import("../../type-source").LabelType;
|
|
@@ -454,6 +464,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
454
464
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
455
465
|
timestamp: number;
|
|
456
466
|
};
|
|
467
|
+
workersBasePath: string | undefined;
|
|
457
468
|
goNextPage: () => void;
|
|
458
469
|
goPreviousPage: () => void;
|
|
459
470
|
label: import("../../type-source").LabelType;
|
|
@@ -490,6 +501,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
490
501
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
491
502
|
timestamp: number;
|
|
492
503
|
};
|
|
504
|
+
workersBasePath: string | undefined;
|
|
493
505
|
goNextPage: () => void;
|
|
494
506
|
goPreviousPage: () => void;
|
|
495
507
|
label: import("../../type-source").LabelType;
|
|
@@ -531,6 +543,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
531
543
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
532
544
|
timestamp: number;
|
|
533
545
|
};
|
|
546
|
+
workersBasePath: string | undefined;
|
|
534
547
|
goNextPage: () => void;
|
|
535
548
|
goPreviousPage: () => void;
|
|
536
549
|
label: import("../../type-source").LabelType;
|
|
@@ -572,6 +585,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
572
585
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
573
586
|
timestamp: number;
|
|
574
587
|
};
|
|
588
|
+
workersBasePath: string | undefined;
|
|
575
589
|
goNextPage: () => void;
|
|
576
590
|
goPreviousPage: () => void;
|
|
577
591
|
label: import("../../type-source").LabelType;
|
|
@@ -611,6 +625,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
611
625
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
612
626
|
timestamp: number;
|
|
613
627
|
};
|
|
628
|
+
workersBasePath: string | undefined;
|
|
614
629
|
goNextPage: () => void;
|
|
615
630
|
goPreviousPage: () => void;
|
|
616
631
|
label: import("../../type-source").LabelType;
|
|
@@ -647,6 +662,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
647
662
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
648
663
|
timestamp: number;
|
|
649
664
|
};
|
|
665
|
+
workersBasePath: string | undefined;
|
|
650
666
|
goNextPage: () => void;
|
|
651
667
|
goPreviousPage: () => void;
|
|
652
668
|
label: import("../../type-source").LabelType;
|
|
@@ -685,6 +701,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
685
701
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
686
702
|
timestamp: number;
|
|
687
703
|
};
|
|
704
|
+
workersBasePath: string | undefined;
|
|
688
705
|
goNextPage: () => void;
|
|
689
706
|
goPreviousPage: () => void;
|
|
690
707
|
label: import("../../type-source").LabelType;
|
|
@@ -720,6 +737,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
720
737
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
721
738
|
timestamp: number;
|
|
722
739
|
};
|
|
740
|
+
workersBasePath: string | undefined;
|
|
723
741
|
goNextPage: () => void;
|
|
724
742
|
goPreviousPage: () => void;
|
|
725
743
|
label: import("../../type-source").LabelType;
|
|
@@ -755,6 +773,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
755
773
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
756
774
|
timestamp: number;
|
|
757
775
|
};
|
|
776
|
+
workersBasePath: string | undefined;
|
|
758
777
|
goNextPage: () => void;
|
|
759
778
|
goPreviousPage: () => void;
|
|
760
779
|
label: import("../../type-source").LabelType;
|
|
@@ -791,6 +810,7 @@ declare function fillFromState(component: LunaticComponentDefinition, state: Lun
|
|
|
791
810
|
status: import("../../use-suggesters").SuggesterStatus;
|
|
792
811
|
timestamp: number;
|
|
793
812
|
};
|
|
813
|
+
workersBasePath: string | undefined;
|
|
794
814
|
goNextPage: () => void;
|
|
795
815
|
goPreviousPage: () => void;
|
|
796
816
|
label: import("../../type-source").LabelType;
|
|
@@ -16,6 +16,10 @@ export declare class LunaticVariablesStore {
|
|
|
16
16
|
private eventTarget;
|
|
17
17
|
constructor();
|
|
18
18
|
static makeFromSource(source: LunaticSource, data: LunaticData): LunaticVariablesStore;
|
|
19
|
+
/**
|
|
20
|
+
* Create a new store from an object (useful for testing)
|
|
21
|
+
*/
|
|
22
|
+
static makeFromObject(values?: Record<string, unknown>): LunaticVariablesStore;
|
|
19
23
|
/**
|
|
20
24
|
* Retrieve variable value
|
|
21
25
|
*/
|
|
@@ -2,7 +2,7 @@ import { type FunctionComponent } from 'react';
|
|
|
2
2
|
import type { LunaticData, LunaticState } from './type';
|
|
3
3
|
import type { LunaticSource } from './type-source';
|
|
4
4
|
import type { LunaticComponentType } from '../components/type';
|
|
5
|
-
declare function useLunatic(source: LunaticSource, data: LunaticData | undefined, { features, preferences, savingType, onChange, management, shortcut, initialPage, lastReachedPage, autoSuggesterLoading, activeControls, getReferentiel, custom, withOverview, missing, missingStrategy, missingShortcut, dontKnowButton, refusedButton, trackChanges, }: {
|
|
5
|
+
declare function useLunatic(source: LunaticSource, data: LunaticData | undefined, { features, preferences, savingType, onChange, management, shortcut, initialPage, lastReachedPage, autoSuggesterLoading, activeControls, getReferentiel, custom, withOverview, missing, missingStrategy, missingShortcut, dontKnowButton, refusedButton, workersBasePath, trackChanges, }: {
|
|
6
6
|
features?: LunaticState['features'];
|
|
7
7
|
preferences?: LunaticState['preferences'];
|
|
8
8
|
savingType?: LunaticState['savingType'];
|
|
@@ -24,12 +24,13 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
24
24
|
};
|
|
25
25
|
dontKnowButton?: string;
|
|
26
26
|
refusedButton?: string;
|
|
27
|
+
workersBasePath?: string;
|
|
27
28
|
trackChanges?: boolean;
|
|
28
29
|
}): {
|
|
29
30
|
getComponents: ({ only, except, }?: {
|
|
30
31
|
only?: (keyof {
|
|
31
32
|
InputNumber: import("../components/type").LunaticBaseProps<number | null> & {
|
|
32
|
-
min
|
|
33
|
+
min?: number | undefined;
|
|
33
34
|
max: number;
|
|
34
35
|
decimals: number;
|
|
35
36
|
unit?: string | undefined;
|
|
@@ -110,6 +111,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
110
111
|
iteration: number | undefined;
|
|
111
112
|
};
|
|
112
113
|
Datepicker: import("../components/type").LunaticBaseProps<string | null> & {
|
|
114
|
+
format: "YYYY-MM-DD" | "YYYY-MM" | "YYYY";
|
|
113
115
|
min?: string | undefined;
|
|
114
116
|
max?: string | undefined;
|
|
115
117
|
response: {
|
|
@@ -226,6 +228,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
226
228
|
};
|
|
227
229
|
Suggester: import("../components/type").LunaticBaseProps<string | null> & {
|
|
228
230
|
storeName: string;
|
|
231
|
+
workersBasePath?: string | undefined;
|
|
229
232
|
getSuggesterStatus: (name: string) => {
|
|
230
233
|
status: import("./use-suggesters").SuggesterStatus;
|
|
231
234
|
timestamp: number;
|
|
@@ -272,7 +275,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
272
275
|
})[] | undefined;
|
|
273
276
|
except?: (keyof {
|
|
274
277
|
InputNumber: import("../components/type").LunaticBaseProps<number | null> & {
|
|
275
|
-
min
|
|
278
|
+
min?: number | undefined;
|
|
276
279
|
max: number;
|
|
277
280
|
decimals: number;
|
|
278
281
|
unit?: string | undefined;
|
|
@@ -353,6 +356,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
353
356
|
iteration: number | undefined;
|
|
354
357
|
};
|
|
355
358
|
Datepicker: import("../components/type").LunaticBaseProps<string | null> & {
|
|
359
|
+
format: "YYYY-MM-DD" | "YYYY-MM" | "YYYY";
|
|
356
360
|
min?: string | undefined;
|
|
357
361
|
max?: string | undefined;
|
|
358
362
|
response: {
|
|
@@ -469,6 +473,7 @@ declare function useLunatic(source: LunaticSource, data: LunaticData | undefined
|
|
|
469
473
|
};
|
|
470
474
|
Suggester: import("../components/type").LunaticBaseProps<string | null> & {
|
|
471
475
|
storeName: string;
|
|
476
|
+
workersBasePath?: string | undefined;
|
|
472
477
|
getSuggesterStatus: (name: string) => {
|
|
473
478
|
status: import("./use-suggesters").SuggesterStatus;
|
|
474
479
|
timestamp: number;
|
|
@@ -3,6 +3,7 @@ type useSuggestersType = {
|
|
|
3
3
|
auto: boolean;
|
|
4
4
|
getReferentiel?: (name: string) => Promise<Array<unknown>>;
|
|
5
5
|
suggesters?: Array<SuggesterType>;
|
|
6
|
+
workersBasePath?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare enum SuggesterStatus {
|
|
8
9
|
unused = 0,
|
|
@@ -12,7 +13,7 @@ export declare enum SuggesterStatus {
|
|
|
12
13
|
unknown = 4,
|
|
13
14
|
error = 5
|
|
14
15
|
}
|
|
15
|
-
export declare function useSuggesters({ auto, getReferentiel, suggesters, }: useSuggestersType): (name: string) => {
|
|
16
|
+
export declare function useSuggesters({ auto, getReferentiel, suggesters, workersBasePath, }: useSuggestersType): (name: string) => {
|
|
16
17
|
status: SuggesterStatus;
|
|
17
18
|
timestamp: number;
|
|
18
19
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SuggesterType } from '../../../use-lunatic/type-source';
|
|
2
2
|
declare function consoleLogging(...args: Array<any>): void;
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Creates methods to communicate with workers for indexing data
|
|
5
5
|
*/
|
|
6
|
-
export declare function createAppendTask<T>(info: SuggesterType, version: number, log?: typeof consoleLogging): [(args: Array<any>) => Promise<boolean>, () => void];
|
|
6
|
+
export declare function createAppendTask<T>(info: SuggesterType, version: number, log?: typeof consoleLogging, workersBasePath?: string): [(args: Array<any>) => Promise<boolean>, () => void];
|
|
7
7
|
export {};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cleaning": {
|
|
3
|
+
"ORIGIN": {
|
|
4
|
+
"CITY": "ORIGIN = \"FR\""
|
|
5
|
+
}
|
|
6
|
+
},
|
|
7
|
+
"variables": [
|
|
8
|
+
{
|
|
9
|
+
"variableType": "COLLECTED",
|
|
10
|
+
"values": {
|
|
11
|
+
"COLLECTED": null,
|
|
12
|
+
"EDITED": null,
|
|
13
|
+
"INPUTED": null,
|
|
14
|
+
"FORCED": null,
|
|
15
|
+
"PREVIOUS": null
|
|
16
|
+
},
|
|
17
|
+
"name": "ORIGIN"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"variableType": "COLLECTED",
|
|
21
|
+
"values": {
|
|
22
|
+
"COLLECTED": null,
|
|
23
|
+
"EDITED": null,
|
|
24
|
+
"INPUTED": null,
|
|
25
|
+
"FORCED": null,
|
|
26
|
+
"PREVIOUS": null
|
|
27
|
+
},
|
|
28
|
+
"name": "CITY"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"components": [
|
|
32
|
+
{
|
|
33
|
+
"componentType": "Sequence",
|
|
34
|
+
"hierarchy": {
|
|
35
|
+
"sequence": {
|
|
36
|
+
"id": "ksyjs7vy",
|
|
37
|
+
"page": "1",
|
|
38
|
+
"label": {
|
|
39
|
+
"type": "VTL|MD",
|
|
40
|
+
"value": "\"I - \" || \"S0\""
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"conditionFilter": {
|
|
45
|
+
"type": "VTL",
|
|
46
|
+
"value": "true"
|
|
47
|
+
},
|
|
48
|
+
"id": "ksyjs7vy",
|
|
49
|
+
"page": "1",
|
|
50
|
+
"label": {
|
|
51
|
+
"type": "VTL|MD",
|
|
52
|
+
"value": "\"I - \" || \"Test du cleaning\""
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"componentType": "Radio",
|
|
57
|
+
"id": "radio",
|
|
58
|
+
"controls": [],
|
|
59
|
+
"hierarchy": {
|
|
60
|
+
"sequence": {
|
|
61
|
+
"id": "ksyjs7vy",
|
|
62
|
+
"page": "1",
|
|
63
|
+
"label": {
|
|
64
|
+
"type": "VTL|MD",
|
|
65
|
+
"value": "\"I - \" || \"S0\""
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"options": [
|
|
70
|
+
{
|
|
71
|
+
"value": "US",
|
|
72
|
+
"label": {
|
|
73
|
+
"value": "\"Etats unis\"",
|
|
74
|
+
"type": "VTL|MD"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"value": "FR",
|
|
79
|
+
"label": {
|
|
80
|
+
"value": "\"France\"",
|
|
81
|
+
"type": "VTL|MD"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"conditionFilter": {
|
|
86
|
+
"type": "VTL",
|
|
87
|
+
"value": "true"
|
|
88
|
+
},
|
|
89
|
+
"label": {
|
|
90
|
+
"type": "VTL|MD",
|
|
91
|
+
"value": "\"➡ 1. \" || \"Origine\""
|
|
92
|
+
},
|
|
93
|
+
"mandatory": false,
|
|
94
|
+
"bindingDependencies": ["ORIGIN"],
|
|
95
|
+
"response": {
|
|
96
|
+
"name": "ORIGIN"
|
|
97
|
+
},
|
|
98
|
+
"page": "2"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"componentType": "Input",
|
|
102
|
+
"id": "input",
|
|
103
|
+
"controls": [],
|
|
104
|
+
"hierarchy": {
|
|
105
|
+
"sequence": {
|
|
106
|
+
"id": "ksyjs7vy",
|
|
107
|
+
"page": "1",
|
|
108
|
+
"label": {
|
|
109
|
+
"type": "VTL|MD",
|
|
110
|
+
"value": "\"I - \" || \"S0\""
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"conditionFilter": {
|
|
115
|
+
"type": "VTL",
|
|
116
|
+
"value": "ORIGIN = \"FR\""
|
|
117
|
+
},
|
|
118
|
+
"label": {
|
|
119
|
+
"type": "VTL|MD",
|
|
120
|
+
"value": "\"➡ 2. \" || \"Ville de france\""
|
|
121
|
+
},
|
|
122
|
+
"mandatory": false,
|
|
123
|
+
"bindingDependencies": ["CITY"],
|
|
124
|
+
"response": {
|
|
125
|
+
"name": "CITY"
|
|
126
|
+
},
|
|
127
|
+
"page": "3"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"componentType": "Sequence",
|
|
131
|
+
"conditionFilter": {
|
|
132
|
+
"type": "VTL",
|
|
133
|
+
"value": "true"
|
|
134
|
+
},
|
|
135
|
+
"id": "ksyjs7vy",
|
|
136
|
+
"page": "4",
|
|
137
|
+
"label": {
|
|
138
|
+
"type": "VTL|MD",
|
|
139
|
+
"value": "\"END\""
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"pagination": "question",
|
|
144
|
+
"lunaticModelVersion": "2.3.2-rc4",
|
|
145
|
+
"modele": "TESTSURSUM",
|
|
146
|
+
"enoCoreVersion": "2.4.1-pairwise",
|
|
147
|
+
"generatingDate": "14-04-2023 09:00:09",
|
|
148
|
+
"missing": false,
|
|
149
|
+
"id": "lb3ei722",
|
|
150
|
+
"maxPage": "4"
|
|
151
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 _orchestrator = _interopRequireDefault(require("../../utils/orchestrator"));
|
|
9
|
+
var _source = _interopRequireDefault(require("./source.json"));
|
|
10
|
+
var _defaultArgTypes = _interopRequireDefault(require("../../utils/default-arg-types"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
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: 'Behaviour/Cleaning',
|
|
21
|
+
component: _orchestrator["default"],
|
|
22
|
+
argTypes: _objectSpread(_objectSpread({}, _defaultArgTypes["default"]), {}, {
|
|
23
|
+
missing: {
|
|
24
|
+
table: {
|
|
25
|
+
disable: false
|
|
26
|
+
},
|
|
27
|
+
control: 'boolean',
|
|
28
|
+
defaultValue: true
|
|
29
|
+
},
|
|
30
|
+
activeGoNextForMissing: {
|
|
31
|
+
table: {
|
|
32
|
+
disable: false
|
|
33
|
+
},
|
|
34
|
+
control: 'boolean',
|
|
35
|
+
defaultValue: true
|
|
36
|
+
},
|
|
37
|
+
management: {
|
|
38
|
+
table: {
|
|
39
|
+
disable: false
|
|
40
|
+
},
|
|
41
|
+
control: 'boolean',
|
|
42
|
+
defaultValue: false
|
|
43
|
+
},
|
|
44
|
+
activeControls: {
|
|
45
|
+
control: 'boolean',
|
|
46
|
+
defaultValue: true
|
|
47
|
+
},
|
|
48
|
+
source: {
|
|
49
|
+
table: {
|
|
50
|
+
disable: false
|
|
51
|
+
},
|
|
52
|
+
control: {
|
|
53
|
+
type: 'object'
|
|
54
|
+
},
|
|
55
|
+
defaultValue: _source["default"]
|
|
56
|
+
},
|
|
57
|
+
data: {
|
|
58
|
+
table: {
|
|
59
|
+
disable: false
|
|
60
|
+
},
|
|
61
|
+
control: {
|
|
62
|
+
type: 'object'
|
|
63
|
+
},
|
|
64
|
+
defaultValue: {
|
|
65
|
+
COLLECTED: {
|
|
66
|
+
READY: {
|
|
67
|
+
COLLECTED: true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
};
|
|
74
|
+
var _default = exports["default"] = stories;
|
|
75
|
+
var Template = function Template(args) {
|
|
76
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_orchestrator["default"], _objectSpread({}, args));
|
|
77
|
+
};
|
|
78
|
+
var Default = exports.Default = Template.bind({});
|
|
79
|
+
Default.args = {
|
|
80
|
+
id: 'resizing-default',
|
|
81
|
+
pagination: true
|
|
82
|
+
};
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = exports.SimpleNum = exports.Simple = exports.LinkedLoop2 = exports.LinkedLoop = exports.BoucleN = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _orchestrator = _interopRequireDefault(require("../../utils/orchestrator"));
|
|
9
|
-
var _V2_ControlesNonNum_horsBoucle_PasPageFin = _interopRequireDefault(require("./V2_ControlesNonNum_horsBoucle_PasPageFin"));
|
|
10
|
-
var _V2_ControlesNum_horsBoucle_PasPageFin = _interopRequireDefault(require("./V2_ControlesNum_horsBoucle_PasPageFin"));
|
|
11
|
-
var _V2_Controles_BouclesLiees_PasPageFin = _interopRequireDefault(require("./V2_Controles_BouclesLiees_PasPageFin"));
|
|
12
|
-
var _V2_Controles_BouclesLiees2_PasPageFin = _interopRequireDefault(require("./V2_Controles_BouclesLiees2_PasPageFin"));
|
|
9
|
+
var _V2_ControlesNonNum_horsBoucle_PasPageFin = _interopRequireDefault(require("./V2_ControlesNonNum_horsBoucle_PasPageFin.json"));
|
|
10
|
+
var _V2_ControlesNum_horsBoucle_PasPageFin = _interopRequireDefault(require("./V2_ControlesNum_horsBoucle_PasPageFin.json"));
|
|
11
|
+
var _V2_Controles_BouclesLiees_PasPageFin = _interopRequireDefault(require("./V2_Controles_BouclesLiees_PasPageFin.json"));
|
|
12
|
+
var _V2_Controles_BouclesLiees2_PasPageFin = _interopRequireDefault(require("./V2_Controles_BouclesLiees2_PasPageFin.json"));
|
|
13
13
|
var _defaultArgTypes = _interopRequireDefault(require("../../utils/default-arg-types"));
|
|
14
|
-
var _bouclesN = _interopRequireDefault(require("./boucles-n"));
|
|
14
|
+
var _bouclesN = _interopRequireDefault(require("./boucles-n.json"));
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.TestDylan = exports.SimpleLoops = exports.RallyeGames = exports.MinMaxLoops = exports.DeclarationsSimples = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _orchestrator = _interopRequireDefault(require("
|
|
9
|
-
var _testDylan = _interopRequireDefault(require("./test-dylan"));
|
|
10
|
-
var _V2_MinMaxSum_Boucles = _interopRequireDefault(require("./V2_MinMaxSum_Boucles"));
|
|
11
|
-
var _V2_QuestSimple_Boucles = _interopRequireDefault(require("./V2_QuestSimple_Boucles"));
|
|
12
|
-
var _V2_TCMRallyeGames = _interopRequireDefault(require("./V2_TCMRallyeGames"));
|
|
13
|
-
var _V2_DeclarationsSimples = _interopRequireDefault(require("./V2_DeclarationsSimples"));
|
|
14
|
-
var _defaultArgTypes = _interopRequireDefault(require("
|
|
8
|
+
var _orchestrator = _interopRequireDefault(require("../../utils/orchestrator"));
|
|
9
|
+
var _testDylan = _interopRequireDefault(require("./test-dylan.json"));
|
|
10
|
+
var _V2_MinMaxSum_Boucles = _interopRequireDefault(require("./V2_MinMaxSum_Boucles.json"));
|
|
11
|
+
var _V2_QuestSimple_Boucles = _interopRequireDefault(require("./V2_QuestSimple_Boucles.json"));
|
|
12
|
+
var _V2_TCMRallyeGames = _interopRequireDefault(require("./V2_TCMRallyeGames.json"));
|
|
13
|
+
var _V2_DeclarationsSimples = _interopRequireDefault(require("./V2_DeclarationsSimples.json"));
|
|
14
|
+
var _defaultArgTypes = _interopRequireDefault(require("../../utils/default-arg-types"));
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.Default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _orchestrator = _interopRequireDefault(require("
|
|
9
|
-
var _source = _interopRequireDefault(require("./source"));
|
|
10
|
-
var _defaultArgTypes = _interopRequireDefault(require("
|
|
8
|
+
var _orchestrator = _interopRequireDefault(require("../../utils/orchestrator"));
|
|
9
|
+
var _source = _interopRequireDefault(require("./source.json"));
|
|
10
|
+
var _defaultArgTypes = _interopRequireDefault(require("../../utils/default-arg-types"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
13
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.Default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _orchestrator = _interopRequireDefault(require("
|
|
9
|
-
var _source = _interopRequireDefault(require("./source"));
|
|
10
|
-
var _defaultArgTypes = _interopRequireDefault(require("
|
|
8
|
+
var _orchestrator = _interopRequireDefault(require("../../utils/orchestrator"));
|
|
9
|
+
var _source = _interopRequireDefault(require("./source.json"));
|
|
10
|
+
var _defaultArgTypes = _interopRequireDefault(require("../../utils/default-arg-types"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
13
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -3,34 +3,37 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = exports.
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var _source = _interopRequireDefault(require("./source"));
|
|
10
|
-
var _data = _interopRequireDefault(require("./data"));
|
|
11
|
-
var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
6
|
+
exports["default"] = exports.Basic = void 0;
|
|
7
|
+
var _datepicker = _interopRequireDefault(require("../../components/datepicker"));
|
|
8
|
+
var _addonActions = require("@storybook/addon-actions");
|
|
13
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
var _default = exports["default"] = {
|
|
11
|
+
title: 'Components/Datepicker',
|
|
12
|
+
component: _datepicker["default"],
|
|
13
|
+
args: {
|
|
14
|
+
value: '1920-02-01',
|
|
15
|
+
format: 'YYYY-MM-DD',
|
|
16
|
+
handleChange: (0, _addonActions.action)('handleChange'),
|
|
17
|
+
response: {
|
|
18
|
+
name: 'date'
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
parameters: {
|
|
22
|
+
controls: {
|
|
23
|
+
include: ['format', 'readOnly', 'disabled']
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
argTypes: {
|
|
27
|
+
format: {
|
|
28
|
+
control: 'radio',
|
|
29
|
+
options: ['YYYY-MM-DD', 'YYYY-MM', 'YYYY']
|
|
30
|
+
},
|
|
31
|
+
readOnly: {
|
|
32
|
+
control: 'boolean'
|
|
33
|
+
},
|
|
34
|
+
disabled: {
|
|
35
|
+
control: 'boolean'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
24
38
|
};
|
|
25
|
-
var
|
|
26
|
-
var Template = function Template(args) {
|
|
27
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_orchestrator["default"], _objectSpread({}, args));
|
|
28
|
-
};
|
|
29
|
-
var Default = exports.Default = Template.bind({});
|
|
30
|
-
Default.args = {
|
|
31
|
-
id: 'input',
|
|
32
|
-
source: _source["default"],
|
|
33
|
-
data: _data["default"],
|
|
34
|
-
disabled: false,
|
|
35
|
-
readOnly: false
|
|
36
|
-
};
|
|
39
|
+
var Basic = exports.Basic = {};
|