@digigov/react-modules 1.2.0-rc.32 → 2.0.0-16fbe090
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/Faq/Results.js +34 -0
- package/Faq/hooks.d.ts +1 -1
- package/Faq/hooks.js +54 -0
- package/Faq/index.js +191 -163
- package/Faq/slug.js +94 -0
- package/Faq/utils.js +3 -0
- package/FilteredResults/DataTable.js +12 -0
- package/FilteredResults/FilterChips.js +34 -0
- package/FilteredResults/FilterFields.js +13 -0
- package/FilteredResults/hooks.d.ts +1 -1
- package/FilteredResults/hooks.js +78 -0
- package/FilteredResults/index.js +96 -112
- package/index.d.ts +2 -2
- package/index.js +3 -4
- package/lazy.d.ts +17 -0
- package/lazy.js +28 -0
- package/package.json +10 -10
- package/registry.d.ts +14 -0
- package/registry.js +34 -0
- package/Faq/Faq.stories.d.ts +0 -8
- package/Faq/Results/index.js +0 -29
- package/Faq/Results/package.json +0 -6
- package/Faq/Results.js.map +0 -7
- package/Faq/__stories__/Default.d.ts +0 -2
- package/Faq/hooks/index.js +0 -66
- package/Faq/hooks/package.json +0 -6
- package/Faq/hooks.js.map +0 -7
- package/Faq/index.js.map +0 -7
- package/Faq/index.test.d.ts +0 -1
- package/Faq/package.json +0 -6
- package/Faq/slug/index.js +0 -97
- package/Faq/slug/package.json +0 -6
- package/Faq/slug.js.map +0 -7
- package/Faq/splitted.test.d.ts +0 -1
- package/Faq/utils/index.js +0 -8
- package/Faq/utils/package.json +0 -6
- package/Faq/utils.js.map +0 -7
- package/FilteredResults/DataTable/index.js +0 -18
- package/FilteredResults/DataTable/package.json +0 -6
- package/FilteredResults/DataTable.js.map +0 -7
- package/FilteredResults/FilterChips/index.js +0 -52
- package/FilteredResults/FilterChips/package.json +0 -6
- package/FilteredResults/FilterChips.js.map +0 -7
- package/FilteredResults/FilterFields/index.js +0 -11
- package/FilteredResults/FilterFields/package.json +0 -6
- package/FilteredResults/FilterFields.js.map +0 -7
- package/FilteredResults/FilteredResults.stories.d.ts +0 -8
- package/FilteredResults/__stories__/Default.d.ts +0 -2
- package/FilteredResults/hooks/index.js +0 -105
- package/FilteredResults/hooks/package.json +0 -6
- package/FilteredResults/hooks.js.map +0 -7
- package/FilteredResults/index.js.map +0 -7
- package/FilteredResults/index.test.d.ts +0 -1
- package/FilteredResults/package.json +0 -6
- package/FilteredResults/splitted.test.d.ts +0 -1
- package/ReactModules.stories.d.ts +0 -4
- package/cjs/Faq/Results/index.js +0 -58
- package/cjs/Faq/Results.js.map +0 -7
- package/cjs/Faq/hooks/index.js +0 -90
- package/cjs/Faq/hooks.js.map +0 -7
- package/cjs/Faq/index.js +0 -194
- package/cjs/Faq/index.js.map +0 -7
- package/cjs/Faq/slug/index.js +0 -120
- package/cjs/Faq/slug.js.map +0 -7
- package/cjs/Faq/utils/index.js +0 -31
- package/cjs/Faq/utils.js.map +0 -7
- package/cjs/FilteredResults/DataTable/index.js +0 -42
- package/cjs/FilteredResults/DataTable.js.map +0 -7
- package/cjs/FilteredResults/FilterChips/index.js +0 -82
- package/cjs/FilteredResults/FilterChips.js.map +0 -7
- package/cjs/FilteredResults/FilterFields/index.js +0 -44
- package/cjs/FilteredResults/FilterFields.js.map +0 -7
- package/cjs/FilteredResults/hooks/index.js +0 -132
- package/cjs/FilteredResults/hooks.js.map +0 -7
- package/cjs/FilteredResults/index.js +0 -153
- package/cjs/FilteredResults/index.js.map +0 -7
- package/cjs/index.js +0 -24
- package/cjs/index.js.map +0 -7
- package/cjs/lazy.js +0 -44
- package/cjs/lazy.js.map +0 -7
- package/cjs/registry.js +0 -73
- package/cjs/registry.js.map +0 -7
- package/index.js.map +0 -7
- package/lazy/package.json +0 -6
- package/registry/package.json +0 -6
- package/src/lazy.js +0 -11
- package/src/registry.js +0 -43
- /package/{lazy/index.js → src/lazy.ts} +0 -0
- /package/{registry/index.js → src/registry.ts} +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useEffect, useMemo, useState } from "react";
|
|
2
|
+
function isBooleanString(str) {
|
|
3
|
+
return /^(true|false)$/i.test(str);
|
|
4
|
+
}
|
|
5
|
+
function normalizeText(text) {
|
|
6
|
+
return text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
7
|
+
}
|
|
8
|
+
const getOptionLabelForSelectValue = (field, value)=>{
|
|
9
|
+
if (field.extra?.options) {
|
|
10
|
+
const matchedOption = field.extra.options.find((option)=>option.value.toString() === value?.toString());
|
|
11
|
+
if (matchedOption) return matchedOption.label.primary;
|
|
12
|
+
}
|
|
13
|
+
return value;
|
|
14
|
+
};
|
|
15
|
+
const useURLParamsSearch = (searchFunc, { navigate, fields })=>{
|
|
16
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
17
|
+
const currentParams = Object.fromEntries(urlParams.entries());
|
|
18
|
+
const values = fields.reduce((newValues, field)=>{
|
|
19
|
+
if (currentParams[field.key]) newValues[field.key] = currentParams[field.key];
|
|
20
|
+
return newValues;
|
|
21
|
+
}, {});
|
|
22
|
+
const search = (params)=>{
|
|
23
|
+
navigate('?' + new URLSearchParams(Object.entries({
|
|
24
|
+
...currentParams,
|
|
25
|
+
...params
|
|
26
|
+
}).filter(([, value])=>!!value)).toString());
|
|
27
|
+
return searchFunc(params);
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
search,
|
|
31
|
+
values
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
function useStaticSearch({ fields, data, initialFilters }) {
|
|
35
|
+
const [results, setResults] = useState(data);
|
|
36
|
+
useEffect(()=>{
|
|
37
|
+
search(initialFilters);
|
|
38
|
+
}, [
|
|
39
|
+
initialFilters
|
|
40
|
+
]);
|
|
41
|
+
const search = (filters)=>{
|
|
42
|
+
if (!filters || Object.keys(filters).every((key)=>'' === filters[key])) return void setResults(data);
|
|
43
|
+
const newResults = data.filter((row)=>{
|
|
44
|
+
const filterKeys = Object.keys(filters);
|
|
45
|
+
const enabledFilters = filterKeys.filter((filterKey)=>filters[filterKey]?.toString() && row[filterKey]?.toString());
|
|
46
|
+
const freeTextFilters = filterKeys.filter((filterKey)=>filters[filterKey]?.toString() && !row[filterKey]?.toString());
|
|
47
|
+
let filtersMatchingValue = false;
|
|
48
|
+
if (enabledFilters.length > 0) {
|
|
49
|
+
filtersMatchingValue = enabledFilters.every((filterKey)=>{
|
|
50
|
+
if (filters[filterKey]?.toString() !== row[filterKey]?.toString()) {
|
|
51
|
+
const field = fields.find((f)=>f.key === filterKey);
|
|
52
|
+
const optionsObj = field?.extra?.options.find((option)=>option?.label?.primary === row[filterKey]);
|
|
53
|
+
return optionsObj?.value.toString() === filters[filterKey]?.toString();
|
|
54
|
+
}
|
|
55
|
+
filtersMatchingValue = true;
|
|
56
|
+
return filtersMatchingValue;
|
|
57
|
+
});
|
|
58
|
+
if (!filtersMatchingValue) return false;
|
|
59
|
+
}
|
|
60
|
+
if (freeTextFilters.length > 0) return freeTextFilters.every((filterKey)=>Object.values(row).some((value)=>{
|
|
61
|
+
if ('string' != typeof value) return false;
|
|
62
|
+
const normalizedItemValue = normalizeText(value.toString().toLowerCase());
|
|
63
|
+
const normalizedFilterValue = normalizeText(filters[filterKey]?.toString().toLowerCase().trim() || '');
|
|
64
|
+
return normalizedItemValue.includes(normalizedFilterValue);
|
|
65
|
+
}));
|
|
66
|
+
return filtersMatchingValue;
|
|
67
|
+
});
|
|
68
|
+
setResults(newResults);
|
|
69
|
+
};
|
|
70
|
+
return useMemo(()=>({
|
|
71
|
+
search,
|
|
72
|
+
results
|
|
73
|
+
}), [
|
|
74
|
+
search,
|
|
75
|
+
results
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
export { getOptionLabelForSelectValue, isBooleanString, normalizeText, useStaticSearch, useURLParamsSearch };
|
package/FilteredResults/index.js
CHANGED
|
@@ -1,120 +1,104 @@
|
|
|
1
|
-
import
|
|
2
|
-
import FormBuilder from "@digigov/form/FormBuilder";
|
|
3
|
-
import { FormContext } from "@digigov/form/FormContext";
|
|
4
|
-
import { FilterChips } from "
|
|
5
|
-
import { FilterFields } from "
|
|
6
|
-
import FilterContainer, {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "@digigov/ui/
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, [values]);
|
|
33
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null);
|
|
1
|
+
import react, { useContext, useEffect } from "react";
|
|
2
|
+
import FormBuilder from "@digigov/form/FormBuilder/index.js";
|
|
3
|
+
import { FormContext } from "@digigov/form/FormContext.js";
|
|
4
|
+
import { FilterChips } from "./FilterChips.js";
|
|
5
|
+
import { FilterFields } from "./FilterFields.js";
|
|
6
|
+
import FilterContainer, { FilterContent, FilterHeadingContainer } from "@digigov/ui/app/FilterContainer/index.js";
|
|
7
|
+
import { Button } from "@digigov/ui/form/Button/index.js";
|
|
8
|
+
import { Grid } from "@digigov/ui/layouts/Grid/index.js";
|
|
9
|
+
import { SectionBreak } from "@digigov/ui/layouts/SectionBreak/index.js";
|
|
10
|
+
import { Drawer, DrawerHeading } from "@digigov/ui/navigation/Drawer/index.js";
|
|
11
|
+
import { useDrawer } from "@digigov/ui/navigation/Drawer/hooks.js";
|
|
12
|
+
import { Heading } from "@digigov/ui/typography/Heading/index.js";
|
|
13
|
+
const FormBuilderSyncValues = ({ values, autoSubmit })=>{
|
|
14
|
+
const form = useContext(FormContext);
|
|
15
|
+
const previousValues = form.getValues();
|
|
16
|
+
useEffect(()=>{
|
|
17
|
+
const mergedObject = {
|
|
18
|
+
...values,
|
|
19
|
+
...previousValues
|
|
20
|
+
};
|
|
21
|
+
let shouldSubmit = false;
|
|
22
|
+
for(const key in mergedObject)if (void 0 !== values[key] && previousValues[key] !== values[key]) {
|
|
23
|
+
shouldSubmit = true;
|
|
24
|
+
previousValues[key] = values[key];
|
|
25
|
+
form.setValue(key, values[key]);
|
|
26
|
+
}
|
|
27
|
+
if (autoSubmit && shouldSubmit) form.submit();
|
|
28
|
+
}, [
|
|
29
|
+
values
|
|
30
|
+
]);
|
|
31
|
+
return /*#__PURE__*/ react.createElement(react.Fragment, null);
|
|
34
32
|
};
|
|
35
|
-
const
|
|
36
|
-
function DrawerFilteredResults2({ fields, direction = "left", ...props }, ref) {
|
|
33
|
+
const FilteredResults_DrawerFilteredResults = /*#__PURE__*/ react.forwardRef(function({ fields, direction = 'left', ...props }, ref) {
|
|
37
34
|
const { registerDrawer, registerAction, currentOpen } = useDrawer();
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
return /*#__PURE__*/ react.createElement(react.Fragment, null, currentOpen && /*#__PURE__*/ react.createElement(Grid, {
|
|
36
|
+
item: true,
|
|
37
|
+
xs: 12,
|
|
38
|
+
md: 12,
|
|
39
|
+
lg: 4,
|
|
40
|
+
ref: ref
|
|
41
|
+
}, /*#__PURE__*/ react.createElement(Drawer, registerDrawer('filters-drawer', {
|
|
42
|
+
upRelative: 'lg',
|
|
43
|
+
direction
|
|
44
|
+
}), /*#__PURE__*/ react.createElement(DrawerHeading, registerAction('filters-drawer', 'close'), /*#__PURE__*/ react.createElement(Heading, {
|
|
45
|
+
size: "md"
|
|
46
|
+
}, "Φίλτρα")), /*#__PURE__*/ react.createElement(FilterContent, null, /*#__PURE__*/ react.createElement(FilterFields, {
|
|
47
|
+
fields: fields,
|
|
48
|
+
horizontal: false
|
|
49
|
+
})))), /*#__PURE__*/ react.createElement(Grid, {
|
|
50
|
+
item: true,
|
|
51
|
+
xs: 12,
|
|
52
|
+
md: 12,
|
|
53
|
+
lg: currentOpen ? 8 : 12
|
|
54
|
+
}, /*#__PURE__*/ react.createElement(Button, {
|
|
51
55
|
mb: 4,
|
|
52
|
-
...registerAction(
|
|
53
|
-
"filters-drawer",
|
|
54
|
-
currentOpen === "filters-drawer" ? "close" : "open"
|
|
55
|
-
),
|
|
56
|
+
...registerAction('filters-drawer', 'filters-drawer' === currentOpen ? 'close' : 'open'),
|
|
56
57
|
color: "secondary"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
}, "Φίλτρα"), /*#__PURE__*/ react.createElement(FilterChips, null), props.children));
|
|
59
|
+
});
|
|
60
|
+
const FilteredResults_BlockFilteredResults = /*#__PURE__*/ react.forwardRef(function({ fields, ...props }, ref) {
|
|
61
|
+
const [open, setOpen] = react.useState(true);
|
|
62
|
+
return /*#__PURE__*/ react.createElement(Grid, {
|
|
63
|
+
item: true,
|
|
64
|
+
xs: 12,
|
|
65
|
+
ref: ref
|
|
66
|
+
}, /*#__PURE__*/ react.createElement(FilterContainer, {
|
|
67
|
+
open: open
|
|
68
|
+
}, /*#__PURE__*/ react.createElement(FilterHeadingContainer, {
|
|
69
|
+
onClick: ()=>setOpen(false)
|
|
70
|
+
}, /*#__PURE__*/ react.createElement(Heading, {
|
|
71
|
+
size: "md"
|
|
72
|
+
}, "Φίλτρα")), /*#__PURE__*/ react.createElement(FilterContent, null, /*#__PURE__*/ react.createElement(FilterChips, null), /*#__PURE__*/ react.createElement(FilterFields, {
|
|
73
|
+
fields: fields,
|
|
74
|
+
horizontal: true
|
|
75
|
+
}))), /*#__PURE__*/ react.createElement(Button, {
|
|
68
76
|
color: "secondary",
|
|
69
77
|
mdUpHidden: true,
|
|
70
78
|
mb: 4,
|
|
71
|
-
onClick: ()
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
);
|
|
77
|
-
const FilteredResults = React.forwardRef(function FilteredResults2({
|
|
78
|
-
fields,
|
|
79
|
-
onSearch,
|
|
80
|
-
variant = "block",
|
|
81
|
-
defaultFilters,
|
|
82
|
-
currentFilters,
|
|
83
|
-
children
|
|
84
|
-
}, ref) {
|
|
85
|
-
const isDrawer = variant.startsWith("drawer-");
|
|
86
|
-
return /* @__PURE__ */ React.createElement(
|
|
87
|
-
FormBuilder,
|
|
88
|
-
{
|
|
89
|
-
onSubmit: onSearch,
|
|
90
|
-
initial: defaultFilters,
|
|
91
|
-
fields,
|
|
92
|
-
grid: true,
|
|
93
|
-
ref
|
|
94
|
-
},
|
|
95
|
-
currentFilters && /* @__PURE__ */ React.createElement(FormBuilderSyncValues, { values: currentFilters, autoSubmit: true }),
|
|
96
|
-
isDrawer ? (
|
|
97
|
-
// @ts-ignore
|
|
98
|
-
/* @__PURE__ */ React.createElement(
|
|
99
|
-
DrawerFilteredResults,
|
|
100
|
-
{
|
|
101
|
-
fields,
|
|
102
|
-
direction: variant.split("-")[1]
|
|
103
|
-
},
|
|
104
|
-
children
|
|
105
|
-
)
|
|
106
|
-
) : (
|
|
107
|
-
// @ts-ignore
|
|
108
|
-
/* @__PURE__ */ React.createElement(BlockFilteredResults, { fields }, children)
|
|
109
|
-
)
|
|
110
|
-
);
|
|
79
|
+
onClick: ()=>setOpen(true)
|
|
80
|
+
}, "Φίλτρα"), /*#__PURE__*/ react.createElement(SectionBreak, {
|
|
81
|
+
size: "md",
|
|
82
|
+
visible: false
|
|
83
|
+
}), props.children);
|
|
111
84
|
});
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
85
|
+
const FilteredResults_FilteredResults = /*#__PURE__*/ react.forwardRef(function({ fields, onSearch, variant = 'block', defaultFilters, currentFilters, children }, ref) {
|
|
86
|
+
const isDrawer = variant.startsWith('drawer-');
|
|
87
|
+
return /*#__PURE__*/ react.createElement(FormBuilder, {
|
|
88
|
+
onSubmit: onSearch,
|
|
89
|
+
initial: defaultFilters,
|
|
90
|
+
fields: fields,
|
|
91
|
+
grid: true,
|
|
92
|
+
ref: ref
|
|
93
|
+
}, currentFilters && /*#__PURE__*/ react.createElement(FormBuilderSyncValues, {
|
|
94
|
+
values: currentFilters,
|
|
95
|
+
autoSubmit: true
|
|
96
|
+
}), isDrawer ? /*#__PURE__*/ react.createElement(FilteredResults_DrawerFilteredResults, {
|
|
97
|
+
fields: fields,
|
|
98
|
+
direction: variant.split('-')[1]
|
|
99
|
+
}, children) : /*#__PURE__*/ react.createElement(FilteredResults_BlockFilteredResults, {
|
|
100
|
+
fields: fields
|
|
101
|
+
}, children));
|
|
102
|
+
});
|
|
103
|
+
const src_FilteredResults = FilteredResults_FilteredResults;
|
|
104
|
+
export { FilteredResults_BlockFilteredResults as BlockFilteredResults, FilteredResults_DrawerFilteredResults as DrawerFilteredResults, FilteredResults_FilteredResults as FilteredResults, FormBuilderSyncValues, src_FilteredResults as default };
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
1
|
+
export * from './FilteredResults/index.js';
|
|
2
|
+
export * from './Faq/index.js';
|
package/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/** @license Digigov
|
|
1
|
+
/** @license Digigov v2.0.0-16fbe090
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the BSD-2-Clause license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
5
5
|
*/
|
|
6
|
-
export * from "
|
|
7
|
-
export * from "
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
6
|
+
export * from "./FilteredResults/index.js";
|
|
7
|
+
export * from "./Faq/index.js";
|
package/lazy.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
FormBuilderSyncValues: import("react").LazyExoticComponent<({ values, autoSubmit }: {
|
|
3
|
+
values: any;
|
|
4
|
+
autoSubmit: any;
|
|
5
|
+
}) => import("react").JSX.Element>;
|
|
6
|
+
DrawerFilteredResults: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>>;
|
|
7
|
+
BlockFilteredResults: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>>;
|
|
8
|
+
FilteredResults: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("./FilteredResults/index.js").FilteredResultsProps<Record<string, import("./FilteredResults/index.js").ScalarType>, Record<string, import("./FilteredResults/index.js").ScalarType>> & import("react").RefAttributes<HTMLFormElement>>>;
|
|
9
|
+
Faq: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("./Faq/index.js").FaqProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
10
|
+
DataTable: import("react").LazyExoticComponent<typeof import("./FilteredResults/DataTable.js").DataTable>;
|
|
11
|
+
FilterChips: import("react").LazyExoticComponent<() => import("react").JSX.Element | null>;
|
|
12
|
+
FilterFields: import("react").LazyExoticComponent<({ fields, horizontal }: {
|
|
13
|
+
fields: any;
|
|
14
|
+
horizontal: any;
|
|
15
|
+
}) => import("react").JSX.Element>;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
package/lazy.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { lazy } from "react";
|
|
2
|
+
const src_lazy = {
|
|
3
|
+
FormBuilderSyncValues: lazy(()=>import("./FilteredResults/index.js").then((module)=>({
|
|
4
|
+
default: module['FormBuilderSyncValues']
|
|
5
|
+
}))),
|
|
6
|
+
DrawerFilteredResults: lazy(()=>import("./FilteredResults/index.js").then((module)=>({
|
|
7
|
+
default: module['DrawerFilteredResults']
|
|
8
|
+
}))),
|
|
9
|
+
BlockFilteredResults: lazy(()=>import("./FilteredResults/index.js").then((module)=>({
|
|
10
|
+
default: module['BlockFilteredResults']
|
|
11
|
+
}))),
|
|
12
|
+
FilteredResults: lazy(()=>import("./FilteredResults/index.js").then((module)=>({
|
|
13
|
+
default: module['FilteredResults']
|
|
14
|
+
}))),
|
|
15
|
+
Faq: lazy(()=>import("./Faq/index.js").then((module)=>({
|
|
16
|
+
default: module['Faq']
|
|
17
|
+
}))),
|
|
18
|
+
DataTable: lazy(()=>import("./FilteredResults/DataTable.js").then((module)=>({
|
|
19
|
+
default: module['DataTable']
|
|
20
|
+
}))),
|
|
21
|
+
FilterChips: lazy(()=>import("./FilteredResults/FilterChips.js").then((module)=>({
|
|
22
|
+
default: module['FilterChips']
|
|
23
|
+
}))),
|
|
24
|
+
FilterFields: lazy(()=>import("./FilteredResults/FilterFields.js").then((module)=>({
|
|
25
|
+
default: module['FilterFields']
|
|
26
|
+
})))
|
|
27
|
+
};
|
|
28
|
+
export { src_lazy as default };
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/react-modules",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-16fbe090",
|
|
4
4
|
"description": "@digigov patterns based on ui components",
|
|
5
|
-
"
|
|
6
|
-
"module": "./index.js",
|
|
5
|
+
"type": "module",
|
|
7
6
|
"dependencies": {
|
|
8
|
-
"@digigov/react-icons": "2.0.0-
|
|
9
|
-
"@digigov/form": "2.0.0-
|
|
10
|
-
"@digigov/ui": "2.0.0-
|
|
7
|
+
"@digigov/react-icons": "2.0.0-16fbe090",
|
|
8
|
+
"@digigov/form": "2.0.0-16fbe090",
|
|
9
|
+
"@digigov/ui": "2.0.0-16fbe090",
|
|
11
10
|
"dompurify": "3.0.6"
|
|
12
11
|
},
|
|
13
12
|
"peerDependencies": {
|
|
14
13
|
"react-query": "2.26.4",
|
|
15
|
-
"clsx": "
|
|
14
|
+
"clsx": "2.1.1",
|
|
16
15
|
"react": "^18.3.0 || ^19.1.0",
|
|
17
16
|
"react-dom": "^18.3.0 || ^19.1.0",
|
|
18
|
-
"@digigov/react-core": "2.0.0-
|
|
19
|
-
"@digigov/css": "2.0.0-
|
|
17
|
+
"@digigov/react-core": "2.0.0-16fbe090",
|
|
18
|
+
"@digigov/css": "2.0.0-16fbe090"
|
|
20
19
|
},
|
|
21
20
|
"private": false,
|
|
22
|
-
"
|
|
21
|
+
"main": "index.js",
|
|
22
|
+
"module": "index.js"
|
|
23
23
|
}
|
package/registry.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'@digigov/react-modules': {};
|
|
3
|
+
'@digigov/react-modules/Faq/Results': {};
|
|
4
|
+
'@digigov/react-modules/Faq/hooks': {};
|
|
5
|
+
'@digigov/react-modules/Faq': {};
|
|
6
|
+
'@digigov/react-modules/Faq/slug': {};
|
|
7
|
+
'@digigov/react-modules/Faq/utils': {};
|
|
8
|
+
'@digigov/react-modules/FilteredResults/DataTable': {};
|
|
9
|
+
'@digigov/react-modules/FilteredResults/FilterChips': {};
|
|
10
|
+
'@digigov/react-modules/FilteredResults/FilterFields': {};
|
|
11
|
+
'@digigov/react-modules/FilteredResults/hooks': {};
|
|
12
|
+
'@digigov/react-modules/FilteredResults': {};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
package/registry.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__index_js_fb10b2a7__ from "./index.js";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Faq_Results_js_2bbb1dff__ from "./Faq/Results.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Faq_hooks_js_3eeedcba__ from "./Faq/hooks.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Faq_index_js_2016ecbd__ from "./Faq/index.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Faq_slug_js_c64cf327__ from "./Faq/slug.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Faq_utils_js_116a401a__ from "./Faq/utils.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__FilteredResults_DataTable_js_bf43138f__ from "./FilteredResults/DataTable.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__FilteredResults_FilterChips_js_c4de0176__ from "./FilteredResults/FilterChips.js";
|
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE__FilteredResults_FilterFields_js_6a1ea1f3__ from "./FilteredResults/FilterFields.js";
|
|
10
|
+
import * as __WEBPACK_EXTERNAL_MODULE__FilteredResults_hooks_js_83f6a806__ from "./FilteredResults/hooks.js";
|
|
11
|
+
import * as __WEBPACK_EXTERNAL_MODULE__FilteredResults_index_js_4a35fe24__ from "./FilteredResults/index.js";
|
|
12
|
+
function lazyImport(pkgImport) {
|
|
13
|
+
return new Proxy({}, {
|
|
14
|
+
get: (_target, name)=>{
|
|
15
|
+
if ('__esModule' === name || 'default' === name) return pkgImport.default;
|
|
16
|
+
if ('*' === name) return pkgImport;
|
|
17
|
+
return pkgImport[name];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
const registry = {
|
|
22
|
+
'@digigov/react-modules': lazyImport(__WEBPACK_EXTERNAL_MODULE__index_js_fb10b2a7__),
|
|
23
|
+
'@digigov/react-modules/Faq/Results': lazyImport(__WEBPACK_EXTERNAL_MODULE__Faq_Results_js_2bbb1dff__),
|
|
24
|
+
'@digigov/react-modules/Faq/hooks': lazyImport(__WEBPACK_EXTERNAL_MODULE__Faq_hooks_js_3eeedcba__),
|
|
25
|
+
'@digigov/react-modules/Faq': lazyImport(__WEBPACK_EXTERNAL_MODULE__Faq_index_js_2016ecbd__),
|
|
26
|
+
'@digigov/react-modules/Faq/slug': lazyImport(__WEBPACK_EXTERNAL_MODULE__Faq_slug_js_c64cf327__),
|
|
27
|
+
'@digigov/react-modules/Faq/utils': lazyImport(__WEBPACK_EXTERNAL_MODULE__Faq_utils_js_116a401a__),
|
|
28
|
+
'@digigov/react-modules/FilteredResults/DataTable': lazyImport(__WEBPACK_EXTERNAL_MODULE__FilteredResults_DataTable_js_bf43138f__),
|
|
29
|
+
'@digigov/react-modules/FilteredResults/FilterChips': lazyImport(__WEBPACK_EXTERNAL_MODULE__FilteredResults_FilterChips_js_c4de0176__),
|
|
30
|
+
'@digigov/react-modules/FilteredResults/FilterFields': lazyImport(__WEBPACK_EXTERNAL_MODULE__FilteredResults_FilterFields_js_6a1ea1f3__),
|
|
31
|
+
'@digigov/react-modules/FilteredResults/hooks': lazyImport(__WEBPACK_EXTERNAL_MODULE__FilteredResults_hooks_js_83f6a806__),
|
|
32
|
+
'@digigov/react-modules/FilteredResults': lazyImport(__WEBPACK_EXTERNAL_MODULE__FilteredResults_index_js_4a35fe24__)
|
|
33
|
+
};
|
|
34
|
+
export { registry as default };
|
package/Faq/Faq.stories.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
export let title: string;
|
|
3
|
-
export { Faq as component };
|
|
4
|
-
export let displayName: string;
|
|
5
|
-
}
|
|
6
|
-
export default _default;
|
|
7
|
-
export { Default } from "@digigov/react-modules/Faq/__stories__/Default";
|
|
8
|
-
import Faq from '@digigov/react-modules/Faq';
|
package/Faq/Results/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { useCallback } from "react";
|
|
2
|
-
import { useFormContext } from "@digigov/form/FormBuilder";
|
|
3
|
-
import Button from "@digigov/ui/form/Button";
|
|
4
|
-
import { Heading } from "@digigov/ui/typography/Heading";
|
|
5
|
-
const Results = React.forwardRef(
|
|
6
|
-
function Results2({ filteredSections, Onclose, activeQa, primarySections }, ref) {
|
|
7
|
-
const { resetField, submit } = useFormContext();
|
|
8
|
-
const handleReset = useCallback(
|
|
9
|
-
(e) => {
|
|
10
|
-
e.preventDefault();
|
|
11
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
12
|
-
urlParams.delete("text");
|
|
13
|
-
urlParams.delete("activeQa");
|
|
14
|
-
window.history.replaceState({}, "", "?" + urlParams.toString());
|
|
15
|
-
resetField("text", { defaultValue: "" });
|
|
16
|
-
Onclose(activeQa);
|
|
17
|
-
submit();
|
|
18
|
-
},
|
|
19
|
-
[resetField, Onclose, submit, activeQa]
|
|
20
|
-
// Added necessary dependencies
|
|
21
|
-
);
|
|
22
|
-
return /* @__PURE__ */ React.createElement(Heading, { ref, size: "sm", marginTop: 4 }, "\u0391\u03C0\u03BF\u03C4\u03B5\u03BB\u03AD\u03C3\u03BC\u03B1\u03C4\u03B1: ", filteredSections, " \u03B1\u03C0\u03CC ", primarySections, ".", " ", /* @__PURE__ */ React.createElement(Button, { variant: "link", onClick: (e) => handleReset(e) }, "\u0395\u03C0\u03B1\u03BD\u03B1\u03C6\u03BF\u03C1\u03AC \u03B1\u03BD\u03B1\u03B6\u03AE\u03C4\u03B7\u03C3\u03B7\u03C2"));
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
var Results_default = Results;
|
|
26
|
-
export {
|
|
27
|
-
Results_default as default
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=Results.js.map
|
package/Faq/Results/package.json
DELETED
package/Faq/Results.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Faq/Results.tsx"],
|
|
4
|
-
"sourcesContent": ["// Results.tsx\nimport React, { useCallback } from 'react';\nimport { useFormContext } from '@digigov/form/FormBuilder';\nimport Button from '@digigov/ui/form/Button';\nimport { Heading } from '@digigov/ui/typography/Heading';\n\ninterface ResultsProps {\n filteredSections: number;\n primarySections: number;\n Onclose: (v: string) => void;\n activeQa: string;\n}\n\nconst Results = React.forwardRef<HTMLHeadingElement, ResultsProps>(\n function Results(\n { filteredSections, Onclose, activeQa, primarySections },\n ref\n ) {\n const { resetField, submit } = useFormContext();\n const handleReset = useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n\n // Remove 'text' from the URL\n const urlParams = new URLSearchParams(window.location.search);\n urlParams.delete('text');\n urlParams.delete('activeQa');\n window.history.replaceState({}, '', '?' + urlParams.toString());\n\n // Reset the form field\n resetField('text', { defaultValue: '' });\n\n // Close active FAQ\n Onclose(activeQa);\n\n // Submit the form (if needed)\n submit();\n },\n [resetField, Onclose, submit, activeQa] // Added necessary dependencies\n );\n\n return (\n <Heading ref={ref} size=\"sm\" marginTop={4}>\n \u0391\u03C0\u03BF\u03C4\u03B5\u03BB\u03AD\u03C3\u03BC\u03B1\u03C4\u03B1: {filteredSections} \u03B1\u03C0\u03CC {primarySections}.{' '}\n <Button variant=\"link\" onClick={(e) => handleReset(e)}>\n \u0395\u03C0\u03B1\u03BD\u03B1\u03C6\u03BF\u03C1\u03AC \u03B1\u03BD\u03B1\u03B6\u03AE\u03C4\u03B7\u03C3\u03B7\u03C2\n </Button>\n </Heading>\n );\n }\n);\n\nexport default Results;\n"],
|
|
5
|
-
"mappings": "AACA,OAAO,SAAS,mBAAmB;AACnC,SAAS,sBAAsB;AAC/B,OAAO,YAAY;AACnB,SAAS,eAAe;AASxB,MAAM,UAAU,MAAM;AAAA,EACpB,SAASA,SACP,EAAE,kBAAkB,SAAS,UAAU,gBAAgB,GACvD,KACA;AACA,UAAM,EAAE,YAAY,OAAO,IAAI,eAAe;AAC9C,UAAM,cAAc;AAAA,MAClB,CAAC,MAA2C;AAC1C,UAAE,eAAe;AAGjB,cAAM,YAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAC5D,kBAAU,OAAO,MAAM;AACvB,kBAAU,OAAO,UAAU;AAC3B,eAAO,QAAQ,aAAa,CAAC,GAAG,IAAI,MAAM,UAAU,SAAS,CAAC;AAG9D,mBAAW,QAAQ,EAAE,cAAc,GAAG,CAAC;AAGvC,gBAAQ,QAAQ;AAGhB,eAAO;AAAA,MACT;AAAA,MACA,CAAC,YAAY,SAAS,QAAQ,QAAQ;AAAA;AAAA,IACxC;AAEA,WACE,oCAAC,WAAQ,KAAU,MAAK,MAAK,WAAW,KAAG,8EAC1B,kBAAiB,wBAAM,iBAAgB,KAAE,KACxD,oCAAC,UAAO,SAAQ,QAAO,SAAS,CAAC,MAAM,YAAY,CAAC,KAAG,qHAEvD,CACF;AAAA,EAEJ;AACF;AAEA,IAAO,kBAAQ;",
|
|
6
|
-
"names": ["Results"]
|
|
7
|
-
}
|
package/Faq/hooks/index.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { slug } from "@digigov/react-modules/Faq/slug";
|
|
3
|
-
const removeAccents = (text) => {
|
|
4
|
-
return text.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
5
|
-
};
|
|
6
|
-
const useURLParamsSearch = (searchFunc, {
|
|
7
|
-
navigate,
|
|
8
|
-
filteredSections
|
|
9
|
-
}) => {
|
|
10
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
11
|
-
const currentParams = Object.fromEntries(urlParams.entries());
|
|
12
|
-
const hashId = window.location.hash ? window.location.hash.slice(1) : "";
|
|
13
|
-
const hashExistsInFilteredSections = filteredSections.some(
|
|
14
|
-
(section) => section.qa.some(
|
|
15
|
-
({ id, question }) => id === hashId || slug(question) === hashId
|
|
16
|
-
)
|
|
17
|
-
);
|
|
18
|
-
const search = (params) => {
|
|
19
|
-
const updatedParams = Object.entries({
|
|
20
|
-
...currentParams,
|
|
21
|
-
...params
|
|
22
|
-
}).filter(([, value]) => Boolean(value)).reduce(
|
|
23
|
-
(acc, [key, value]) => {
|
|
24
|
-
acc[key] = value;
|
|
25
|
-
return acc;
|
|
26
|
-
},
|
|
27
|
-
{}
|
|
28
|
-
);
|
|
29
|
-
const newUrl = Object.keys(updatedParams).length ? "?" + new URLSearchParams(updatedParams).toString() : window.location.pathname;
|
|
30
|
-
const finalURL = hashExistsInFilteredSections ? newUrl + `#${hashId}` : newUrl;
|
|
31
|
-
navigate(finalURL);
|
|
32
|
-
return searchFunc(params);
|
|
33
|
-
};
|
|
34
|
-
return { search, values: { text: currentParams.text }, hashId };
|
|
35
|
-
};
|
|
36
|
-
const useFaqSearch = (questions) => {
|
|
37
|
-
const [filteredSections, setFilteredSections] = useState(questions.sections);
|
|
38
|
-
const search = (values) => {
|
|
39
|
-
if (!values || !values.text?.trim()) {
|
|
40
|
-
setFilteredSections(questions.sections);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const searchValue = values.text.trim();
|
|
44
|
-
const normalizedSearchWord = removeAccents(searchValue.toLowerCase());
|
|
45
|
-
const filteredSections2 = questions.sections.map((section) => {
|
|
46
|
-
const filteredQa = section.qa.filter(({ question, answer }) => {
|
|
47
|
-
const normalizedQuestion = removeAccents(
|
|
48
|
-
question?.toLowerCase() || ""
|
|
49
|
-
);
|
|
50
|
-
const normalizedAnswer = removeAccents(answer?.toLowerCase() || "");
|
|
51
|
-
return normalizedQuestion.includes(normalizedSearchWord) || normalizedAnswer.includes(normalizedSearchWord);
|
|
52
|
-
});
|
|
53
|
-
return { ...section, qa: filteredQa };
|
|
54
|
-
}).filter((section) => section.qa.length > 0);
|
|
55
|
-
setFilteredSections(filteredSections2);
|
|
56
|
-
};
|
|
57
|
-
return {
|
|
58
|
-
filteredSections,
|
|
59
|
-
search
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
export {
|
|
63
|
-
useFaqSearch,
|
|
64
|
-
useURLParamsSearch
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=hooks.js.map
|
package/Faq/hooks/package.json
DELETED
package/Faq/hooks.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Faq/hooks.ts"],
|
|
4
|
-
"sourcesContent": ["import { useState } from 'react';\nimport { sectionsConfigType, SectionType } from '@digigov/react-modules/Faq';\nimport { slug } from '@digigov/react-modules/Faq/slug';\nconst removeAccents = (text: string) => {\n return text.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n};\n\nexport const useURLParamsSearch = (\n searchFunc: (params: Record<string, string | undefined>) => void,\n {\n navigate,\n filteredSections,\n }: { navigate: (url: string) => void; filteredSections: SectionType[] }\n) => {\n const urlParams = new URLSearchParams(window.location.search);\n const currentParams = Object.fromEntries(urlParams.entries());\n const hashId = window.location.hash ? window.location.hash.slice(1) : '';\n\n // When filtered sections change, check if hash should be preserved\n const hashExistsInFilteredSections = filteredSections.some((section) =>\n section.qa.some(\n ({ id, question }) => id === hashId || slug(question) === hashId\n )\n );\n\n const search = (params: Record<string, string>) => {\n const updatedParams = Object.entries({\n ...currentParams,\n ...params,\n })\n .filter(([, value]) => Boolean(value)) // Ensure value is not empty\n .reduce(\n (acc, [key, value]) => {\n acc[key] = value as string; // Explicitly cast to string\n return acc;\n },\n {} as Record<string, string>\n ); // Ensure correct type\n\n const newUrl = Object.keys(updatedParams).length\n ? '?' + new URLSearchParams(updatedParams).toString()\n : window.location.pathname; // Reset to base URL if no params\n\n const finalURL = hashExistsInFilteredSections\n ? newUrl + `#${hashId}`\n : newUrl;\n navigate(finalURL);\n return searchFunc(params);\n };\n return { search, values: { text: currentParams.text }, hashId };\n};\n\nexport const useFaqSearch = (questions: sectionsConfigType) => {\n const [filteredSections, setFilteredSections] = useState(questions.sections);\n\n const search = (values: Record<string, string>) => {\n if (!values || !values.text?.trim()) {\n setFilteredSections(questions.sections);\n return;\n }\n\n const searchValue: string = values.text.trim(); // Ensure no spaces-only search\n const normalizedSearchWord = removeAccents(searchValue.toLowerCase());\n\n const filteredSections = questions.sections\n .map((section: SectionType) => {\n const filteredQa = section.qa.filter(({ question, answer }: any) => {\n const normalizedQuestion = removeAccents(\n question?.toLowerCase() || ''\n );\n const normalizedAnswer = removeAccents(answer?.toLowerCase() || '');\n return (\n normalizedQuestion.includes(normalizedSearchWord) ||\n normalizedAnswer.includes(normalizedSearchWord)\n );\n });\n\n return { ...section, qa: filteredQa };\n })\n .filter((section: SectionType) => section.qa.length > 0);\n\n setFilteredSections(filteredSections);\n };\n\n return {\n filteredSections,\n search,\n };\n};\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,gBAAgB;AAEzB,SAAS,YAAY;AACrB,MAAM,gBAAgB,CAAC,SAAiB;AACtC,SAAO,KAAK,UAAU,KAAK,EAAE,QAAQ,oBAAoB,EAAE;AAC7D;AAEO,MAAM,qBAAqB,CAChC,YACA;AAAA,EACE;AAAA,EACA;AACF,MACG;AACH,QAAM,YAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAC5D,QAAM,gBAAgB,OAAO,YAAY,UAAU,QAAQ,CAAC;AAC5D,QAAM,SAAS,OAAO,SAAS,OAAO,OAAO,SAAS,KAAK,MAAM,CAAC,IAAI;AAGtE,QAAM,+BAA+B,iBAAiB;AAAA,IAAK,CAAC,YAC1D,QAAQ,GAAG;AAAA,MACT,CAAC,EAAE,IAAI,SAAS,MAAM,OAAO,UAAU,KAAK,QAAQ,MAAM;AAAA,IAC5D;AAAA,EACF;AAEA,QAAM,SAAS,CAAC,WAAmC;AACjD,UAAM,gBAAgB,OAAO,QAAQ;AAAA,MACnC,GAAG;AAAA,MACH,GAAG;AAAA,IACL,CAAC,EACE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,QAAQ,KAAK,CAAC,EACpC;AAAA,MACC,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AACrB,YAAI,GAAG,IAAI;AACX,eAAO;AAAA,MACT;AAAA,MACA,CAAC;AAAA,IACH;AAEF,UAAM,SAAS,OAAO,KAAK,aAAa,EAAE,SACtC,MAAM,IAAI,gBAAgB,aAAa,EAAE,SAAS,IAClD,OAAO,SAAS;AAEpB,UAAM,WAAW,+BACb,SAAS,IAAI,MAAM,KACnB;AACJ,aAAS,QAAQ;AACjB,WAAO,WAAW,MAAM;AAAA,EAC1B;AACA,SAAO,EAAE,QAAQ,QAAQ,EAAE,MAAM,cAAc,KAAK,GAAG,OAAO;AAChE;AAEO,MAAM,eAAe,CAAC,cAAkC;AAC7D,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAS,UAAU,QAAQ;AAE3E,QAAM,SAAS,CAAC,WAAmC;AACjD,QAAI,CAAC,UAAU,CAAC,OAAO,MAAM,KAAK,GAAG;AACnC,0BAAoB,UAAU,QAAQ;AACtC;AAAA,IACF;AAEA,UAAM,cAAsB,OAAO,KAAK,KAAK;AAC7C,UAAM,uBAAuB,cAAc,YAAY,YAAY,CAAC;AAEpE,UAAMA,oBAAmB,UAAU,SAChC,IAAI,CAAC,YAAyB;AAC7B,YAAM,aAAa,QAAQ,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,MAAW;AAClE,cAAM,qBAAqB;AAAA,UACzB,UAAU,YAAY,KAAK;AAAA,QAC7B;AACA,cAAM,mBAAmB,cAAc,QAAQ,YAAY,KAAK,EAAE;AAClE,eACE,mBAAmB,SAAS,oBAAoB,KAChD,iBAAiB,SAAS,oBAAoB;AAAA,MAElD,CAAC;AAED,aAAO,EAAE,GAAG,SAAS,IAAI,WAAW;AAAA,IACtC,CAAC,EACA,OAAO,CAAC,YAAyB,QAAQ,GAAG,SAAS,CAAC;AAEzD,wBAAoBA,iBAAgB;AAAA,EACtC;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
-
"names": ["filteredSections"]
|
|
7
|
-
}
|