@inseefr/lunatic 3.14.0-rc-delay-sequence-cleaning.0 → 4.0.0
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/esm/type.source.d.ts +10 -0
- package/esm/use-lunatic/commons/fill-components/fill-component.spec.js +7 -9
- package/esm/use-lunatic/commons/fill-components/fill-component.spec.js.map +1 -1
- package/esm/use-lunatic/commons/fill-components/fill-components.d.ts +2 -2
- package/esm/use-lunatic/commons/fill-components/fill-components.js +1 -2
- package/esm/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
- package/esm/use-lunatic/commons/index.d.ts +1 -0
- package/esm/use-lunatic/commons/index.js +1 -0
- package/esm/use-lunatic/commons/index.js.map +1 -1
- package/esm/use-lunatic/commons/pagination/page.js +1 -1
- package/esm/use-lunatic/commons/pagination/page.js.map +1 -1
- package/esm/use-lunatic/commons/remove-condition-filters.d.ts +12 -0
- package/esm/use-lunatic/commons/remove-condition-filters.js +78 -0
- package/esm/use-lunatic/commons/remove-condition-filters.js.map +1 -0
- package/esm/use-lunatic/commons/remove-condition-filters.spec.d.ts +1 -0
- package/esm/use-lunatic/commons/remove-condition-filters.spec.js +111 -0
- package/esm/use-lunatic/commons/remove-condition-filters.spec.js.map +1 -0
- package/esm/use-lunatic/hooks/useOverview.d.ts +1 -1
- package/esm/use-lunatic/hooks/useOverview.js +5 -7
- package/esm/use-lunatic/hooks/useOverview.js.map +1 -1
- package/esm/use-lunatic/hooks/useOverview.spec.js +13 -4
- package/esm/use-lunatic/hooks/useOverview.spec.js.map +1 -1
- package/esm/use-lunatic/props/propOptions.d.ts +1 -2
- package/esm/use-lunatic/props/propOptions.js +3 -5
- package/esm/use-lunatic/props/propOptions.js.map +1 -1
- package/esm/use-lunatic/props/propOptions.spec.js +66 -57
- package/esm/use-lunatic/props/propOptions.spec.js.map +1 -1
- package/esm/use-lunatic/reducer/reducerInitializer.d.ts +2 -2
- package/esm/use-lunatic/reducer/reducerInitializer.js +19 -7
- package/esm/use-lunatic/reducer/reducerInitializer.js.map +1 -1
- package/esm/use-lunatic/type.d.ts +10 -6
- package/esm/use-lunatic/use-lunatic.js +3 -3
- package/esm/use-lunatic/use-lunatic.js.map +1 -1
- package/package.json +16 -1
- package/src/stories/behaviour/filter/filter.stories.tsx +24 -0
- package/src/stories/behaviour/filter/sourceActiveFilters.json +275 -0
- package/src/stories/utils/Orchestrator.tsx +6 -5
- package/src/type.source.ts +10 -0
- package/src/use-lunatic/commons/fill-components/fill-component.spec.ts +7 -9
- package/src/use-lunatic/commons/fill-components/fill-components.ts +8 -8
- package/src/use-lunatic/commons/index.ts +4 -0
- package/src/use-lunatic/commons/pagination/page.ts +1 -1
- package/src/use-lunatic/commons/remove-condition-filters.spec.ts +131 -0
- package/src/use-lunatic/commons/remove-condition-filters.ts +103 -0
- package/src/use-lunatic/hooks/useOverview.spec.ts +15 -4
- package/src/use-lunatic/hooks/useOverview.ts +5 -20
- package/src/use-lunatic/props/propOptions.spec.ts +83 -60
- package/src/use-lunatic/props/propOptions.ts +2 -8
- package/src/use-lunatic/reducer/reducerInitializer.tsx +23 -8
- package/src/use-lunatic/type.ts +27 -23
- package/src/use-lunatic/use-lunatic.test.ts +9 -9
- package/src/use-lunatic/use-lunatic.ts +6 -6
- package/tsconfig.build.tsbuildinfo +1 -1
- package/type.source.d.ts +10 -0
- package/use-lunatic/commons/fill-components/fill-component.spec.js +7 -9
- package/use-lunatic/commons/fill-components/fill-component.spec.js.map +1 -1
- package/use-lunatic/commons/fill-components/fill-components.d.ts +2 -2
- package/use-lunatic/commons/fill-components/fill-components.js +1 -2
- package/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
- package/use-lunatic/commons/index.d.ts +1 -0
- package/use-lunatic/commons/index.js +4 -1
- package/use-lunatic/commons/index.js.map +1 -1
- package/use-lunatic/commons/pagination/page.js +1 -1
- package/use-lunatic/commons/pagination/page.js.map +1 -1
- package/use-lunatic/commons/remove-condition-filters.d.ts +12 -0
- package/use-lunatic/commons/remove-condition-filters.js +81 -0
- package/use-lunatic/commons/remove-condition-filters.js.map +1 -0
- package/use-lunatic/commons/remove-condition-filters.spec.d.ts +1 -0
- package/use-lunatic/commons/remove-condition-filters.spec.js +113 -0
- package/use-lunatic/commons/remove-condition-filters.spec.js.map +1 -0
- package/use-lunatic/hooks/useOverview.d.ts +1 -1
- package/use-lunatic/hooks/useOverview.js +5 -7
- package/use-lunatic/hooks/useOverview.js.map +1 -1
- package/use-lunatic/hooks/useOverview.spec.js +13 -4
- package/use-lunatic/hooks/useOverview.spec.js.map +1 -1
- package/use-lunatic/props/propOptions.d.ts +1 -2
- package/use-lunatic/props/propOptions.js +3 -5
- package/use-lunatic/props/propOptions.js.map +1 -1
- package/use-lunatic/props/propOptions.spec.js +66 -57
- package/use-lunatic/props/propOptions.spec.js.map +1 -1
- package/use-lunatic/reducer/reducerInitializer.d.ts +2 -2
- package/use-lunatic/reducer/reducerInitializer.js +19 -7
- package/use-lunatic/reducer/reducerInitializer.js.map +1 -1
- package/use-lunatic/type.d.ts +10 -6
- package/use-lunatic/use-lunatic.js +3 -3
- package/use-lunatic/use-lunatic.js.map +1 -1
|
@@ -45,13 +45,13 @@ const DEFAULT_DONT_KNOW = D.DK;
|
|
|
45
45
|
const DEFAULT_REFUSED = D.RF;
|
|
46
46
|
|
|
47
47
|
const defaultOptions = {
|
|
48
|
-
disableFilters: false,
|
|
49
48
|
disableFiltersDescription: true,
|
|
49
|
+
activeFilters: 'ALL',
|
|
50
50
|
features: DEFAULT_FEATURES,
|
|
51
51
|
preferences: DEFAULT_PREFERENCES,
|
|
52
52
|
savingType: COLLECTED,
|
|
53
|
-
onChange: () => {},
|
|
54
|
-
onVariableChange: () => {},
|
|
53
|
+
onChange: () => { },
|
|
54
|
+
onVariableChange: () => { },
|
|
55
55
|
management: false,
|
|
56
56
|
shortcut: false,
|
|
57
57
|
initialPage: '1' as PageTag,
|
|
@@ -61,7 +61,7 @@ const defaultOptions = {
|
|
|
61
61
|
// Calculate an overview of every sequence (will be exposed as "overview")
|
|
62
62
|
withOverview: false,
|
|
63
63
|
missing: false,
|
|
64
|
-
missingStrategy: () => {},
|
|
64
|
+
missingStrategy: () => { },
|
|
65
65
|
missingShortcut: DEFAULT_SHORTCUT,
|
|
66
66
|
dontKnowButton: DEFAULT_DONT_KNOW,
|
|
67
67
|
refusedButton: DEFAULT_REFUSED,
|
|
@@ -88,7 +88,7 @@ export function useLunatic(
|
|
|
88
88
|
): LunaticState {
|
|
89
89
|
const options = mergeDefault(argOptions, defaultOptions);
|
|
90
90
|
const {
|
|
91
|
-
|
|
91
|
+
activeFilters,
|
|
92
92
|
disableFiltersDescription,
|
|
93
93
|
management,
|
|
94
94
|
missing,
|
|
@@ -209,7 +209,7 @@ export function useLunatic(
|
|
|
209
209
|
const { isFirstPage, isLastPage } = isFirstLastPage(state.pager);
|
|
210
210
|
|
|
211
211
|
const components = fillComponents(getComponentsFromState(state), {
|
|
212
|
-
|
|
212
|
+
activeFilters,
|
|
213
213
|
disableFiltersDescription,
|
|
214
214
|
handleChanges,
|
|
215
215
|
preferences,
|