@digigov/react-modules 2.0.8 → 2.0.9-platform-196.17-02-26-12-34

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.
@@ -0,0 +1 @@
1
+ module.exports = require('@digigov/cli-lint/prettierrc')();
@@ -0,0 +1,15 @@
1
+
2
+ > @digigov/react-modules@2.0.9-platform-196.17-02-26-12-34 build /builds/devs/digigov/digigov-sdk/libs/react-modules
3
+ > digigov build --generate-registry
4
+
5
+  LOG  Running: rimraf dist
6
+  LOG  Generated registry files
7
+ info build started...
8
+ ready built in 0.19 s
9
+ start generating declaration files... (esm)
10
+ ready declaration files generated in 11.1 s (esm)
11
+
12
+ 13 files generated in dist (esm)
13
+ Total size: 30.6 kB
14
+
15
+ ⏱️ "build" execution time: 15.611s
package/CHANGELOG.json ADDED
@@ -0,0 +1,131 @@
1
+ {
2
+ "name": "@digigov/react-modules",
3
+ "entries": [
4
+ {
5
+ "date": "Tue, 17 Feb 2026 12:35:02 GMT",
6
+ "version": "2.0.9-platform-196.17-02-26-12-34",
7
+ "tag": "@digigov/react-modules_v2.0.9-platform-196.17-02-26-12-34",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "sangelopoulos@admin.grnet.gr",
12
+ "package": "@digigov/react-modules",
13
+ "commit": "58160ac319e725bc00e7299a63f8f195e823ced4",
14
+ "comment": "Migrate to pnpm catalog"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "version": "2.0.8",
21
+ "tag": "@digigov/react-modules_v2.0.8",
22
+ "date": "Wed, 11 Feb 2026 14:46:37 GMT",
23
+ "comments": {}
24
+ },
25
+ {
26
+ "version": "2.0.7",
27
+ "tag": "@digigov/react-modules_v2.0.7",
28
+ "date": "Tue, 10 Feb 2026 13:53:35 GMT",
29
+ "comments": {}
30
+ },
31
+ {
32
+ "version": "2.0.6",
33
+ "tag": "@digigov/react-modules_v2.0.6",
34
+ "date": "Wed, 28 Jan 2026 13:14:05 GMT",
35
+ "comments": {}
36
+ },
37
+ {
38
+ "version": "2.0.5",
39
+ "tag": "@digigov/react-modules_v2.0.5",
40
+ "date": "Tue, 27 Jan 2026 13:46:07 GMT",
41
+ "comments": {}
42
+ },
43
+ {
44
+ "version": "2.0.4",
45
+ "tag": "@digigov/react-modules_v2.0.4",
46
+ "date": "Tue, 27 Jan 2026 13:12:04 GMT",
47
+ "comments": {}
48
+ },
49
+ {
50
+ "version": "2.0.3",
51
+ "tag": "@digigov/react-modules_v2.0.3",
52
+ "date": "Wed, 21 Jan 2026 21:01:49 GMT",
53
+ "comments": {}
54
+ },
55
+ {
56
+ "version": "2.0.2",
57
+ "tag": "@digigov/react-modules_v2.0.2",
58
+ "date": "Wed, 21 Jan 2026 15:58:34 GMT",
59
+ "comments": {
60
+ "patch": [
61
+ {
62
+ "comment": "Generate test"
63
+ },
64
+ {
65
+ "comment": "Remove @digigov/babel-ts-to-proptypes"
66
+ },
67
+ {
68
+ "comment": "Add in Faq pattern mouse move"
69
+ },
70
+ {
71
+ "comment": "Show doc page in stories"
72
+ },
73
+ {
74
+ "comment": "Update Faq test"
75
+ },
76
+ {
77
+ "comment": "Specify mb style for md screens for SearchButton in Faq component"
78
+ },
79
+ {
80
+ "comment": "Fix import issues"
81
+ }
82
+ ],
83
+ "none": [
84
+ {
85
+ "comment": "Generate registry and lazy files"
86
+ },
87
+ {
88
+ "comment": "Update theme references in tailwind config & remove unnecessary deps"
89
+ },
90
+ {
91
+ "comment": "Fix linter errors"
92
+ },
93
+ {
94
+ "comment": "Update Faq test"
95
+ },
96
+ {
97
+ "comment": "Remove registry files from src"
98
+ },
99
+ {
100
+ "comment": "Update playwright-related dependency versions"
101
+ },
102
+ {
103
+ "comment": "Update @types/node"
104
+ },
105
+ {
106
+ "comment": "Remove unnecessary dev dependencies"
107
+ }
108
+ ],
109
+ "minor": [
110
+ {
111
+ "comment": "Create faq component, utils, hooks and storybook example"
112
+ },
113
+ {
114
+ "comment": "Create package"
115
+ },
116
+ {
117
+ "comment": "Remove CloseButton from FiltersResults, add onClick to FilterHeadingContainer."
118
+ },
119
+ {
120
+ "comment": "Upgrade react peer dependency version to include ^19.1.0 along with ^18.3.0"
121
+ }
122
+ ],
123
+ "major": [
124
+ {
125
+ "comment": "Make lib \"pure ESM\" & update clsx to v2"
126
+ }
127
+ ]
128
+ }
129
+ }
130
+ ]
131
+ }
@@ -0,0 +1,8 @@
1
+ import config from '@digigov/cli-lint/eslint.config';
2
+
3
+ export default [
4
+ ...config,
5
+ {
6
+ ignores: ['**/*.test.*'],
7
+ },
8
+ ];
package/package.json CHANGED
@@ -1,23 +1,66 @@
1
1
  {
2
2
  "name": "@digigov/react-modules",
3
- "version": "2.0.8",
3
+ "version": "2.0.9-platform-196.17-02-26-12-34",
4
4
  "description": "@digigov patterns based on ui components",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./dist/index.d.ts",
8
+ "import": "./dist/index.js"
9
+ },
10
+ "./src/*": "./src/*",
11
+ "./*": {
12
+ "types": [
13
+ "./dist/*.d.ts",
14
+ "./dist/*/index.d.ts"
15
+ ],
16
+ "import": [
17
+ "./dist/*.js",
18
+ "./dist/*/index.js"
19
+ ]
20
+ },
21
+ "./*.js": {
22
+ "types": "./dist/*.d.ts",
23
+ "import": "./dist/*.js"
24
+ }
25
+ },
5
26
  "type": "module",
6
27
  "dependencies": {
7
- "@digigov/react-icons": "2.0.8",
8
- "@digigov/form": "2.0.8",
9
- "@digigov/ui": "2.0.8",
10
- "dompurify": "3.0.6"
28
+ "dompurify": "3.0.6",
29
+ "@digigov/react-icons": "2.0.9-platform-196.17-02-26-12-34",
30
+ "@digigov/form": "2.0.9-platform-196.17-02-26-12-34",
31
+ "@digigov/ui": "2.0.9-platform-196.17-02-26-12-34"
11
32
  },
12
33
  "peerDependencies": {
13
34
  "react-query": "2.26.4",
14
35
  "clsx": "2.1.1",
15
36
  "react": "^18.3.0 || ^19.1.0",
16
37
  "react-dom": "^18.3.0 || ^19.1.0",
17
- "@digigov/react-core": "2.0.8",
18
- "@digigov/css": "2.0.8"
38
+ "@digigov/react-core": "2.0.9-platform-196.17-02-26-12-34",
39
+ "@digigov/css": "2.0.9-platform-196.17-02-26-12-34"
40
+ },
41
+ "devDependencies": {
42
+ "typescript": "5.6.2",
43
+ "@types/node": "20.17.24",
44
+ "@types/react": "19.1.3",
45
+ "@types/react-dom": "19.1.3",
46
+ "@playwright/experimental-ct-react": "1.48.2",
47
+ "@playwright/test": "1.48.2",
48
+ "eslint": "9.16.0",
49
+ "prettier": "3.4.2",
50
+ "@hookform/devtools": "4.4.0",
51
+ "publint": "0.1.8",
52
+ "jimp": "0.22.10",
53
+ "@digigov/cli-lint": "2.0.9-platform-196.17-02-26-12-34",
54
+ "@digigov/cli": "2.0.9-platform-196.17-02-26-12-34",
55
+ "@digigov/cli-build": "2.0.9-platform-196.17-02-26-12-34",
56
+ "@digigov/react-core": "2.0.9-platform-196.17-02-26-12-34",
57
+ "@digigov/css": "2.0.9-platform-196.17-02-26-12-34"
19
58
  },
20
- "private": false,
21
- "main": "index.js",
22
- "module": "index.js"
59
+ "scripts": {
60
+ "publint": "publint dist",
61
+ "lint": "digigov lint",
62
+ "e2e": "digigov e2e",
63
+ "build": "digigov build --generate-registry",
64
+ "prepublish": "digigov build --generate-registry"
65
+ }
23
66
  }
@@ -0,0 +1,3 @@
1
+ import playwrightConfig from '@digigov/cli-e2e/playwright-ct.config';
2
+
3
+ export default playwrightConfig;
@@ -0,0 +1,17 @@
1
+ const path = require('path');
2
+ const SDK_DIR = path.resolve('../..');
3
+
4
+ /** @type {import('tailwindcss').Config} */
5
+ module.exports = {
6
+ content: [
7
+ SDK_DIR + '/libs-ui/react-core/src/**/*.{js,jsx,ts,tsx}',
8
+ SDK_DIR + '/libs/ui/src/**/*.{js,jsx,ts,tsx}',
9
+ SDK_DIR + '/libs/react-modules/src/**/*.{js,jsx,ts,tsx}',
10
+ SDK_DIR + '/libs/form/src/**/*.{js,jsx,ts,tsx}',
11
+ ],
12
+ plugins: [
13
+ require(SDK_DIR + '/libs/css/index.js')({
14
+ customTheme: SDK_DIR + '/themes/govgr/dist/index.css',
15
+ }),
16
+ ],
17
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "extends": "@digigov/cli-build/tsconfig.base",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "types": ["node", "react"],
6
+ "paths": {
7
+ "@digigov/react-modules": ["./src"],
8
+ "@digigov/react-modules/*": ["./src/*"],
9
+ "@digigov/react-icons": ["node_modules/@digigov/react-icons/src"],
10
+ "@digigov/react-icons/*": ["node_modules/@digigov/react-icons/src/*"],
11
+ "@digigov/ui": ["node_modules/@digigov/ui/src"],
12
+ "@digigov/ui/*": ["node_modules/@digigov/ui/src/*"],
13
+ "@digigov/form": ["node_modules/@digigov/form/src"],
14
+ "@digigov/form/*": ["node_modules/@digigov/form/src/*"],
15
+ "@digigov/react-core": ["node_modules/@digigov/react-core/src"],
16
+ "@digigov/react-core/*": ["node_modules/@digigov/react-core/src/*"]
17
+ },
18
+ "baseUrl": "./"
19
+ },
20
+ "include": ["src"],
21
+ "exclude": ["node_modules", "dist"]
22
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "types": ["node", "react"]
5
+ },
6
+ "exclude": [
7
+ "node_modules",
8
+ "dist",
9
+ "**/*.test.*",
10
+ "**/*.spec.*",
11
+ "**/*stories*"
12
+ ]
13
+ }
package/Faq/Results.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface ResultsProps {
3
- filteredSections: number;
4
- primarySections: number;
5
- Onclose: (v: string) => void;
6
- activeQa: string;
7
- }
8
- declare const Results: React.ForwardRefExoticComponent<ResultsProps & React.RefAttributes<HTMLHeadingElement>>;
9
- export default Results;
package/Faq/Results.js DELETED
@@ -1,34 +0,0 @@
1
- import react, { useCallback } from "react";
2
- import { useFormContext } from "@digigov/form/FormBuilder/index.js";
3
- import Button from "@digigov/ui/form/Button/index.js";
4
- import { Heading } from "@digigov/ui/typography/Heading/index.js";
5
- const Results_Results = /*#__PURE__*/ react.forwardRef(function({ filteredSections, Onclose, activeQa, primarySections }, ref) {
6
- const { resetField, submit } = useFormContext();
7
- const handleReset = useCallback((e)=>{
8
- e.preventDefault();
9
- const urlParams = new URLSearchParams(window.location.search);
10
- urlParams.delete('text');
11
- urlParams.delete('activeQa');
12
- window.history.replaceState({}, '', '?' + urlParams.toString());
13
- resetField('text', {
14
- defaultValue: ''
15
- });
16
- Onclose(activeQa);
17
- submit();
18
- }, [
19
- resetField,
20
- Onclose,
21
- submit,
22
- activeQa
23
- ]);
24
- return /*#__PURE__*/ react.createElement(Heading, {
25
- ref: ref,
26
- size: "sm",
27
- marginTop: 4
28
- }, "Αποτελέσματα: ", filteredSections, " από ", primarySections, ".", ' ', /*#__PURE__*/ react.createElement(Button, {
29
- variant: "link",
30
- onClick: (e)=>handleReset(e)
31
- }, "Επαναφορά αναζήτησης"));
32
- });
33
- const Faq_Results = Results_Results;
34
- export { Faq_Results as default };
package/Faq/hooks.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import { sectionsConfigType, SectionType } from './index.js';
2
- export declare const useURLParamsSearch: (searchFunc: (params: Record<string, string | undefined>) => void, { navigate, filteredSections, }: {
3
- navigate: (url: string) => void;
4
- filteredSections: SectionType[];
5
- }) => {
6
- search: (params: Record<string, string>) => void;
7
- values: {
8
- text: string;
9
- };
10
- hashId: string;
11
- };
12
- export declare const useFaqSearch: (questions: sectionsConfigType) => {
13
- filteredSections: SectionType[];
14
- search: (values: Record<string, string>) => void;
15
- };
package/Faq/hooks.js DELETED
@@ -1,54 +0,0 @@
1
- import { useState } from "react";
2
- import { slug } from "./slug.js";
3
- const removeAccents = (text)=>text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
4
- const useURLParamsSearch = (searchFunc, { navigate, filteredSections })=>{
5
- const urlParams = new URLSearchParams(window.location.search);
6
- const currentParams = Object.fromEntries(urlParams.entries());
7
- const hashId = window.location.hash ? window.location.hash.slice(1) : '';
8
- const hashExistsInFilteredSections = filteredSections.some((section)=>section.qa.some(({ id, question })=>id === hashId || slug(question) === hashId));
9
- const search = (params)=>{
10
- const updatedParams = Object.entries({
11
- ...currentParams,
12
- ...params
13
- }).filter(([, value])=>Boolean(value)).reduce((acc, [key, value])=>{
14
- acc[key] = value;
15
- return acc;
16
- }, {});
17
- const newUrl = Object.keys(updatedParams).length ? '?' + new URLSearchParams(updatedParams).toString() : window.location.pathname;
18
- const finalURL = hashExistsInFilteredSections ? newUrl + `#${hashId}` : newUrl;
19
- navigate(finalURL);
20
- return searchFunc(params);
21
- };
22
- return {
23
- search,
24
- values: {
25
- text: currentParams.text
26
- },
27
- hashId
28
- };
29
- };
30
- const useFaqSearch = (questions)=>{
31
- const [filteredSections, setFilteredSections] = useState(questions.sections);
32
- const search = (values)=>{
33
- if (!values || !values.text?.trim()) return void setFilteredSections(questions.sections);
34
- const searchValue = values.text.trim();
35
- const normalizedSearchWord = removeAccents(searchValue.toLowerCase());
36
- const filteredSections = questions.sections.map((section)=>{
37
- const filteredQa = section.qa.filter(({ question, answer })=>{
38
- const normalizedQuestion = removeAccents(question?.toLowerCase() || '');
39
- const normalizedAnswer = removeAccents(answer?.toLowerCase() || '');
40
- return normalizedQuestion.includes(normalizedSearchWord) || normalizedAnswer.includes(normalizedSearchWord);
41
- });
42
- return {
43
- ...section,
44
- qa: filteredQa
45
- };
46
- }).filter((section)=>section.qa.length > 0);
47
- setFilteredSections(filteredSections);
48
- };
49
- return {
50
- filteredSections,
51
- search
52
- };
53
- };
54
- export { useFaqSearch, useURLParamsSearch };
package/Faq/index.d.ts DELETED
@@ -1,43 +0,0 @@
1
- import React from 'react';
2
- export interface sectionsConfigType {
3
- sections: SectionType[];
4
- }
5
- export interface QaType {
6
- id?: string;
7
- question: string;
8
- answer: string;
9
- }
10
- export interface SectionType {
11
- id: string;
12
- title: string;
13
- qa: QaType[];
14
- }
15
- export interface TocType {
16
- title: string;
17
- placement: 'top' | 'left' | 'right' | 'none';
18
- }
19
- export interface SearchFilterType {
20
- title?: string;
21
- }
22
- export interface ContentsType {
23
- title: string;
24
- toc: TocType;
25
- search?: SearchFilterType;
26
- }
27
- export interface NavigationListProps {
28
- title?: string;
29
- sections: SectionType[];
30
- }
31
- export interface FaqProps {
32
- contents: ContentsType;
33
- sections: SectionType[];
34
- initialSections: sectionsConfigType;
35
- search: (values: Record<string, string>) => void;
36
- submitValues: {
37
- text: string;
38
- };
39
- activeQa: string;
40
- onActiveQa: (v: string) => void;
41
- }
42
- export declare const Faq: React.ForwardRefExoticComponent<FaqProps & React.RefAttributes<HTMLDivElement>>;
43
- export default Faq;
package/Faq/index.js DELETED
@@ -1,197 +0,0 @@
1
- import react, { useContext, useEffect } from "react";
2
- import { Field } from "@digigov/form/Field/index.js";
3
- import FormBuilder from "@digigov/form/FormBuilder/index.js";
4
- import { FormContext } from "@digigov/form/FormContext.js";
5
- import Results from "./Results.js";
6
- import { createId } from "./utils.js";
7
- import PageTitleContainer, { PageTitleHeading } from "@digigov/ui/app/PageTitleContainer/index.js";
8
- import { Accordion, AccordionSection, AccordionSectionContent, AccordionSectionSummary, AccordionSectionSummaryHeading } from "@digigov/ui/content/Accordion/index.js";
9
- import { useAccordion } from "@digigov/ui/content/Accordion/hooks.js";
10
- import Markdown from "@digigov/ui/content/Markdown/index.js";
11
- import { SearchButton } from "@digigov/ui/form/SearchContainer/index.js";
12
- import { Stack } from "@digigov/ui/layouts/index.js";
13
- import { Aside } from "@digigov/ui/layouts/Basic/Aside/index.js";
14
- import { Container } from "@digigov/ui/layouts/Basic/Container/index.js";
15
- import { Main } from "@digigov/ui/layouts/Basic/Main/index.js";
16
- import Grid from "@digigov/ui/layouts/Grid/index.js";
17
- import SectionBreak from "@digigov/ui/layouts/SectionBreak/index.js";
18
- import { BackToTop } from "@digigov/ui/navigation/BackToTopLink/index.js";
19
- import NavList, { NavListItemAction } from "@digigov/ui/navigation/NavList/index.js";
20
- import { Heading } from "@digigov/ui/typography/Heading/index.js";
21
- import Hint from "@digigov/ui/typography/Hint/index.js";
22
- const FormBuilderSyncValues = ({ values, autoSubmit })=>{
23
- const form = useContext(FormContext);
24
- const previousValues = form.getValues();
25
- useEffect(()=>{
26
- const mergedObject = {
27
- ...values,
28
- ...previousValues
29
- };
30
- let shouldSubmit = false;
31
- for(const key in mergedObject)if (void 0 !== values[key] && previousValues[key] !== values[key]) {
32
- shouldSubmit = true;
33
- previousValues[key] = values[key];
34
- form.setValue(key, values[key]);
35
- }
36
- if (autoSubmit && shouldSubmit) form.submit();
37
- }, [
38
- autoSubmit,
39
- form,
40
- previousValues,
41
- values
42
- ]);
43
- return /*#__PURE__*/ react.createElement(react.Fragment, null);
44
- };
45
- const Faq_NavigationList = /*#__PURE__*/ react.forwardRef(function({ title, sections }, ref) {
46
- return /*#__PURE__*/ react.createElement(NavList, {
47
- ref: ref,
48
- layout: "vertical",
49
- marginBottom: 10
50
- }, title && /*#__PURE__*/ react.createElement(Heading, {
51
- size: "md",
52
- id: "contents",
53
- marginBottom: 4
54
- }, title), sections && sections.length > 0 && sections.map(({ id, title }, index)=>/*#__PURE__*/ react.createElement(NavListItemAction, {
55
- key: index,
56
- href: `#${createId(id, title)}`
57
- }, title)));
58
- });
59
- const Faq_Faq = /*#__PURE__*/ react.forwardRef(function({ contents, sections, initialSections, submitValues, activeQa, onActiveQa, search }, ref) {
60
- const { section, currentOpen, onOpen, close } = useAccordion({
61
- singleOpen: true,
62
- defaultOpen: 0
63
- });
64
- const placement = contents.toc?.placement || 'none';
65
- const filteredSections = sections.reduce((acc, section)=>acc + (section.qa.length || 0), 0);
66
- const primarySections = initialSections.sections.reduce((acc, section)=>acc + (section.qa.length || 0), 0);
67
- const hash = window.location.hash.slice(1);
68
- const currentId = activeQa ? activeQa : hash;
69
- useEffect(()=>{
70
- if (onActiveQa) {
71
- if (currentOpen && activeQa !== currentOpen) onActiveQa(currentOpen);
72
- }
73
- }, [
74
- activeQa,
75
- currentOpen,
76
- onActiveQa
77
- ]);
78
- useEffect(()=>{
79
- if (activeQa && activeQa !== currentOpen) onOpen(activeQa);
80
- }, [
81
- activeQa,
82
- currentOpen,
83
- onOpen
84
- ]);
85
- useEffect(()=>{
86
- if (currentId) {
87
- const element = document.getElementById(currentId);
88
- if (element) element.scrollIntoView({
89
- behavior: 'smooth',
90
- block: 'start'
91
- });
92
- }
93
- }, [
94
- activeQa,
95
- currentId,
96
- hash
97
- ]);
98
- const Onclose = (activeQa)=>{
99
- const urlParams = new URLSearchParams(window.location.search);
100
- urlParams.delete('text');
101
- urlParams.delete('activeQa');
102
- window.history.pushState({}, '', '?' + urlParams.toString());
103
- onActiveQa('');
104
- close(activeQa);
105
- };
106
- const handleSubmit = (data)=>{
107
- search(data);
108
- onActiveQa('');
109
- close(activeQa);
110
- const urlParams = new URLSearchParams(window.location.search);
111
- urlParams.delete('activeQa');
112
- window.history.replaceState({}, '', '?' + urlParams.toString());
113
- };
114
- return /*#__PURE__*/ react.createElement(Container, {
115
- ref: ref
116
- }, 'none' !== placement && 'left' === placement && /*#__PURE__*/ react.createElement(Aside, {
117
- sticky: false
118
- }, /*#__PURE__*/ react.createElement(Faq_NavigationList, {
119
- title: contents.toc?.title,
120
- sections: sections
121
- })), /*#__PURE__*/ react.createElement(Main, null, /*#__PURE__*/ react.createElement(PageTitleContainer, null, /*#__PURE__*/ react.createElement(PageTitleHeading, {
122
- size: "xl",
123
- id: "faq"
124
- }, contents?.title)), 'none' !== placement && 'top' === placement && /*#__PURE__*/ react.createElement(Faq_NavigationList, {
125
- title: contents?.toc?.title,
126
- sections: sections
127
- }), contents.search && /*#__PURE__*/ react.createElement(FormBuilder, {
128
- onSubmit: handleSubmit,
129
- initial: {
130
- text: ''
131
- }
132
- }, submitValues && /*#__PURE__*/ react.createElement(FormBuilderSyncValues, {
133
- values: submitValues,
134
- autoSubmit: true
135
- }), /*#__PURE__*/ react.createElement(Stack, {
136
- direction: "row",
137
- flexWrap: "nowrap",
138
- alignItems: "flex-end",
139
- spacing: 4
140
- }, /*#__PURE__*/ react.createElement(Grid, {
141
- container: true,
142
- style: {
143
- width: '100%'
144
- }
145
- }, /*#__PURE__*/ react.createElement(Field, {
146
- type: "string",
147
- key: "text",
148
- name: "text",
149
- placeholder: "Αναζητήστε σχετικά με την ερώτησή σας",
150
- label: {
151
- primary: contents.search.title
152
- }
153
- })), /*#__PURE__*/ react.createElement(SearchButton, {
154
- type: "submit",
155
- mb: {
156
- md: 10
157
- },
158
- style: {
159
- minHeight: '2.75rem'
160
- }
161
- })), filteredSections !== primarySections && /*#__PURE__*/ react.createElement(Results, {
162
- filteredSections: filteredSections,
163
- primarySections: primarySections,
164
- Onclose: Onclose,
165
- activeQa: activeQa
166
- })), /*#__PURE__*/ react.createElement(Grid, null, sections && sections.length > 0 ? sections.map(({ id: sectionId, title, qa }, index)=>/*#__PURE__*/ react.createElement(react.Fragment, {
167
- key: index
168
- }, /*#__PURE__*/ react.createElement(Heading, {
169
- id: createId(sectionId, title),
170
- size: "lg"
171
- }, title), /*#__PURE__*/ react.createElement(Accordion, {
172
- marginBottom: qa && qa.length > 0 ? 12 : 0
173
- }, qa?.map(({ id, question, answer }, indx)=>/*#__PURE__*/ react.createElement(AccordionSection, {
174
- key: indx,
175
- ...section(createId(id, question))
176
- }, /*#__PURE__*/ react.createElement(AccordionSectionSummary, null, /*#__PURE__*/ react.createElement(AccordionSectionSummaryHeading, {
177
- "aria-controls": createId(id, question)
178
- }, question)), /*#__PURE__*/ react.createElement(AccordionSectionContent, {
179
- id: createId(id, question)
180
- }, /*#__PURE__*/ react.createElement(Markdown, {
181
- content: answer
182
- }))))), /*#__PURE__*/ react.createElement(SectionBreak, {
183
- visible: false
184
- }))) : /*#__PURE__*/ react.createElement(Hint, {
185
- marginBottom: 10
186
- }, "Δεν βρέθηκαν αποτελέσματα.")), /*#__PURE__*/ react.createElement(BackToTop, {
187
- topLimitId: "contents",
188
- id: "back-to-top"
189
- }, "Επιστροφή στα Περιεχόμενα")), 'none' !== placement && 'right' === placement && /*#__PURE__*/ react.createElement(Aside, {
190
- sticky: false
191
- }, /*#__PURE__*/ react.createElement(Faq_NavigationList, {
192
- title: contents?.toc?.title,
193
- sections: sections
194
- })));
195
- });
196
- const Faq = Faq_Faq;
197
- export { Faq_Faq as Faq, Faq as default };
package/Faq/slug.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function slug(text: string, maxWidth?: number): string;
package/Faq/slug.js DELETED
@@ -1,94 +0,0 @@
1
- function slug(text, maxWidth = 50) {
2
- const greekToLatinMap = {
3
- α: 'a',
4
- β: 'b',
5
- γ: 'g',
6
- δ: 'd',
7
- ε: 'e',
8
- ζ: 'z',
9
- η: 'i',
10
- θ: 'th',
11
- ι: 'i',
12
- κ: 'k',
13
- λ: 'l',
14
- μ: 'm',
15
- ν: 'n',
16
- ξ: 'x',
17
- ο: 'o',
18
- π: 'p',
19
- ρ: 'r',
20
- σ: 's',
21
- τ: 't',
22
- υ: 'y',
23
- φ: 'f',
24
- χ: 'ch',
25
- ψ: 'ps',
26
- ω: 'o',
27
- ά: 'a',
28
- έ: 'e',
29
- ί: 'i',
30
- ό: 'o',
31
- ύ: 'y',
32
- ή: 'i',
33
- ώ: 'o',
34
- ς: 's',
35
- ϊ: 'i',
36
- ΰ: 'y',
37
- ϋ: 'y',
38
- ΐ: 'i',
39
- Α: 'A',
40
- Β: 'B',
41
- Γ: 'G',
42
- Δ: 'D',
43
- Ε: 'E',
44
- Ζ: 'Z',
45
- Η: 'I',
46
- Θ: 'TH',
47
- Ι: 'I',
48
- Κ: 'K',
49
- Λ: 'L',
50
- Μ: 'M',
51
- Ν: 'N',
52
- Ξ: 'X',
53
- Ο: 'O',
54
- Π: 'P',
55
- Ρ: 'R',
56
- Σ: 'S',
57
- Τ: 'T',
58
- Υ: 'Y',
59
- Φ: 'F',
60
- Χ: 'CH',
61
- Ψ: 'PS',
62
- Ω: 'O',
63
- Ά: 'A',
64
- Έ: 'E',
65
- Ί: 'I',
66
- Ό: 'O',
67
- Ύ: 'Y',
68
- Ή: 'I',
69
- Ώ: 'O',
70
- Ϊ: 'I',
71
- Ϋ: 'Y'
72
- };
73
- const latinText = text.split('').map((char)=>greekToLatinMap[char] || char).join('');
74
- const processedText = latinText.toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, '');
75
- let slug1 = processedText.substring(0, maxWidth);
76
- const remainingText = processedText.substring(maxWidth);
77
- slug1 = slug1.replace(/-+$/, '');
78
- const id = generateIDFromText(remainingText);
79
- return `${slug1}${id && '-'}${id}`;
80
- }
81
- function generateIDFromText(text) {
82
- if (!text) return '';
83
- let processedText = text.replace(/-/g, '').replace(/[^a-z0-9]/g, '');
84
- if (!processedText) processedText = 'default';
85
- let hash = 0;
86
- for(let i = 0; i < processedText.length; i++){
87
- const char = processedText.charCodeAt(i);
88
- hash = (hash << 5) - hash + char;
89
- hash &= hash;
90
- }
91
- const id = Math.abs(hash).toString(36);
92
- return id;
93
- }
94
- export { slug };
package/Faq/utils.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const createId: (id: string | undefined, text: string) => string;
package/Faq/utils.js DELETED
@@ -1,3 +0,0 @@
1
- import { slug } from "./slug.js";
2
- const createId = (id, text)=>id ? id : slug(text);
3
- export { createId };
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export declare function DataTable({ dataConfig, data }: {
3
- dataConfig: any;
4
- data: any;
5
- }): React.JSX.Element;
@@ -1,12 +0,0 @@
1
- import react from "react";
2
- import { Table, TableBody, TableContainer, TableDataCell, TableHead, TableHeadCell, TableNoDataRow, TableRow } from "@digigov/ui/content/Table/index.js";
3
- function DataTable({ dataConfig, data }) {
4
- return /*#__PURE__*/ react.createElement(TableContainer, null, /*#__PURE__*/ react.createElement(Table, null, /*#__PURE__*/ react.createElement(TableHead, null, /*#__PURE__*/ react.createElement(TableRow, null, dataConfig.map((itenConfig)=>/*#__PURE__*/ react.createElement(TableHeadCell, {
5
- key: itenConfig.key
6
- }, itenConfig.title)))), /*#__PURE__*/ react.createElement(TableBody, null, data.length > 0 ? data.map((item, index)=>/*#__PURE__*/ react.createElement(TableRow, {
7
- key: index
8
- }, dataConfig.map((itemConfig, idx)=>/*#__PURE__*/ react.createElement(TableDataCell, {
9
- key: idx
10
- }, itemConfig.displayComponent ? itemConfig.displayComponent(item[itemConfig.key]) : item[itemConfig.key])))) : /*#__PURE__*/ react.createElement(TableNoDataRow, null, "Δεν υπάρχουν αποτελέσματα"))));
11
- }
12
- export { DataTable };
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const FilterChips: () => React.JSX.Element | null;
3
- export default FilterChips;
@@ -1,34 +0,0 @@
1
- import react from "react";
2
- import { useFormContext, useFormValues } from "@digigov/form/FormBuilder/index.js";
3
- import { getOptionLabelForSelectValue } from "./hooks.js";
4
- import { FilterSelectedHeading, FilterSelectedSection } from "@digigov/ui/app/FilterContainer/index.js";
5
- import { Chip, ChipContainer } from "@digigov/ui/content/Chip/index.js";
6
- import { Button } from "@digigov/ui/form/Button/index.js";
7
- const FilterChips = ()=>{
8
- const { fieldsMap, reset, resetField, submit } = useFormContext();
9
- const values = useFormValues();
10
- const enabledFilters = Object.keys(values).filter((v)=>values[v]);
11
- if (0 === enabledFilters.length) return null;
12
- return /*#__PURE__*/ react.createElement(FilterSelectedSection, {
13
- m: 0,
14
- mb: 6
15
- }, /*#__PURE__*/ react.createElement(FilterSelectedHeading, {
16
- mb: 0
17
- }, /*#__PURE__*/ react.createElement(ChipContainer, null, enabledFilters.map((filterKey)=>/*#__PURE__*/ react.createElement(Chip, {
18
- mb: 0,
19
- key: filterKey,
20
- onDelete: ()=>{
21
- resetField(filterKey);
22
- submit();
23
- }
24
- }, /*#__PURE__*/ react.createElement("b", null, fieldsMap[filterKey].label?.primary), " ", ': ', getOptionLabelForSelectValue(fieldsMap[filterKey], values[filterKey])))), /*#__PURE__*/ react.createElement(Button, {
25
- onClick: (e)=>{
26
- e.preventDefault();
27
- reset();
28
- submit();
29
- },
30
- variant: "link"
31
- }, "Επαναφορά Επιλογών")));
32
- };
33
- const FilteredResults_FilterChips = FilterChips;
34
- export { FilterChips, FilteredResults_FilterChips as default };
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export declare const FilterFields: ({ fields, horizontal }: {
3
- fields: any;
4
- horizontal: any;
5
- }) => React.JSX.Element;
@@ -1,13 +0,0 @@
1
- import react from "react";
2
- import Field from "@digigov/form/Field/index.js";
3
- import { FilterOptionsSection } from "@digigov/ui/app/FilterContainer/index.js";
4
- import { Button } from "@digigov/ui/form/Button/index.js";
5
- const FilterFields = ({ fields, horizontal })=>/*#__PURE__*/ react.createElement(FilterOptionsSection, {
6
- horizontal: horizontal
7
- }, fields.map((field)=>/*#__PURE__*/ react.createElement(Field, {
8
- key: field.key,
9
- name: field.key
10
- })), /*#__PURE__*/ react.createElement(Button, {
11
- type: "submit"
12
- }, "Αναζήτηση"));
13
- export { FilterFields };
@@ -1,22 +0,0 @@
1
- import { FieldSpec } from '@digigov/form/types';
2
- import { ScalarType } from './index.js';
3
- export declare function isBooleanString(str: string): boolean;
4
- export declare function normalizeText(text: string): string;
5
- export declare const getOptionLabelForSelectValue: (field: any, value: any) => any;
6
- export declare const useURLParamsSearch: (searchFunc: any, { navigate, fields }: {
7
- navigate: any;
8
- fields: any;
9
- }) => {
10
- search: (params: any) => any;
11
- values: any;
12
- };
13
- interface UseStaticSearchProps<DT extends Record<string, ScalarType>, FT extends Record<string, ScalarType>> {
14
- fields: FieldSpec[];
15
- data: DT[];
16
- initialFilters: FT;
17
- }
18
- export declare function useStaticSearch<DT extends Record<string, ScalarType>, FT extends Record<string, ScalarType>>({ fields, data, initialFilters }: UseStaticSearchProps<DT, FT>): {
19
- search: (filters: FT) => void;
20
- results: DT[];
21
- };
22
- export {};
@@ -1,78 +0,0 @@
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 };
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import { FieldSpec } from '@digigov/form/types';
3
- export type ScalarType = string | number | boolean | null | undefined;
4
- export interface DataConfigType {
5
- key: string;
6
- title: string;
7
- displayComponent?: (value: string | number | boolean) => React.ReactNode;
8
- }
9
- export interface FilteredResultsProps<DT extends Record<string, ScalarType>, FT extends Record<string, ScalarType>> {
10
- fields: FieldSpec[];
11
- data: DT[];
12
- variant?: 'drawer-left' | 'drawer-right' | 'block';
13
- defaultFilters?: FT;
14
- currentFilters?: FT;
15
- onSearch: (filters: unknown) => void;
16
- children?: React.ReactNode;
17
- }
18
- export declare const FormBuilderSyncValues: ({ values, autoSubmit }: {
19
- values: any;
20
- autoSubmit: any;
21
- }) => React.JSX.Element;
22
- export declare const DrawerFilteredResults: React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;
23
- export declare const BlockFilteredResults: React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;
24
- export declare const FilteredResults: React.ForwardRefExoticComponent<FilteredResultsProps<Record<string, ScalarType>, Record<string, ScalarType>> & React.RefAttributes<HTMLFormElement>>;
25
- export default FilteredResults;
@@ -1,104 +0,0 @@
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);
32
- };
33
- const FilteredResults_DrawerFilteredResults = /*#__PURE__*/ react.forwardRef(function({ fields, direction = 'left', ...props }, ref) {
34
- const { registerDrawer, registerAction, currentOpen } = useDrawer();
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, {
55
- mb: 4,
56
- ...registerAction('filters-drawer', 'filters-drawer' === currentOpen ? 'close' : 'open'),
57
- color: "secondary"
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, {
76
- color: "secondary",
77
- mdUpHidden: true,
78
- mb: 4,
79
- onClick: ()=>setOpen(true)
80
- }, "Φίλτρα"), /*#__PURE__*/ react.createElement(SectionBreak, {
81
- size: "md",
82
- visible: false
83
- }), props.children);
84
- });
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 DELETED
@@ -1,2 +0,0 @@
1
- export * from './FilteredResults/index.js';
2
- export * from './Faq/index.js';
package/index.js DELETED
@@ -1,7 +0,0 @@
1
- /** @license Digigov v2.0.8
2
- *
3
- * This source code is licensed under the BSD-2-Clause license found in the
4
- * LICENSE file in the root directory of this source tree.
5
- */
6
- export * from "./FilteredResults/index.js";
7
- export * from "./Faq/index.js";
package/lazy.d.ts DELETED
@@ -1,17 +0,0 @@
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 DELETED
@@ -1,28 +0,0 @@
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/registry.d.ts DELETED
@@ -1,14 +0,0 @@
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 DELETED
@@ -1,34 +0,0 @@
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/src/lazy.ts DELETED
@@ -1,11 +0,0 @@
1
- import { lazy } from 'react';
2
- export default {
3
- 'FormBuilderSyncValues': lazy(() => import('@digigov/react-modules/FilteredResults').then((module) => ({ default: module['FormBuilderSyncValues'] }))),
4
- 'DrawerFilteredResults': lazy(() => import('@digigov/react-modules/FilteredResults').then((module) => ({ default: module['DrawerFilteredResults'] }))),
5
- 'BlockFilteredResults': lazy(() => import('@digigov/react-modules/FilteredResults').then((module) => ({ default: module['BlockFilteredResults'] }))),
6
- 'FilteredResults': lazy(() => import('@digigov/react-modules/FilteredResults').then((module) => ({ default: module['FilteredResults'] }))),
7
- 'Faq': lazy(() => import('@digigov/react-modules/Faq').then((module) => ({ default: module['Faq'] }))),
8
- 'DataTable': lazy(() => import('@digigov/react-modules/FilteredResults/DataTable').then((module) => ({ default: module['DataTable'] }))),
9
- 'FilterChips': lazy(() => import('@digigov/react-modules/FilteredResults/FilterChips').then((module) => ({ default: module['FilterChips'] }))),
10
- 'FilterFields': lazy(() => import('@digigov/react-modules/FilteredResults/FilterFields').then((module) => ({ default: module['FilterFields'] })))
11
- };
package/src/registry.ts DELETED
@@ -1,43 +0,0 @@
1
-
2
- import * as _digigov_react_modules from "@digigov/react-modules";
3
- import * as _digigov_react_modules_Faq_Results from "@digigov/react-modules/Faq/Results";
4
- import * as _digigov_react_modules_Faq_hooks from "@digigov/react-modules/Faq/hooks";
5
- import * as _digigov_react_modules_Faq from "@digigov/react-modules/Faq";
6
- import * as _digigov_react_modules_Faq_slug from "@digigov/react-modules/Faq/slug";
7
- import * as _digigov_react_modules_Faq_utils from "@digigov/react-modules/Faq/utils";
8
- import * as _digigov_react_modules_FilteredResults_DataTable from "@digigov/react-modules/FilteredResults/DataTable";
9
- import * as _digigov_react_modules_FilteredResults_FilterChips from "@digigov/react-modules/FilteredResults/FilterChips";
10
- import * as _digigov_react_modules_FilteredResults_FilterFields from "@digigov/react-modules/FilteredResults/FilterFields";
11
- import * as _digigov_react_modules_FilteredResults_hooks from "@digigov/react-modules/FilteredResults/hooks";
12
- import * as _digigov_react_modules_FilteredResults from "@digigov/react-modules/FilteredResults";
13
- function lazyImport(pkgImport) {
14
- return new Proxy(
15
- {},
16
- {
17
- get: (_target, name) => {
18
- if (name === '__esModule' || name === 'default') {
19
- return pkgImport.default;
20
- } else if(
21
- name === '*'
22
- ) {
23
- return pkgImport;
24
- } else {
25
- return pkgImport[name];
26
- }
27
- },
28
- }
29
- )
30
- }
31
- export default {
32
- '@digigov/react-modules': lazyImport(_digigov_react_modules),
33
- '@digigov/react-modules/Faq/Results': lazyImport(_digigov_react_modules_Faq_Results),
34
- '@digigov/react-modules/Faq/hooks': lazyImport(_digigov_react_modules_Faq_hooks),
35
- '@digigov/react-modules/Faq': lazyImport(_digigov_react_modules_Faq),
36
- '@digigov/react-modules/Faq/slug': lazyImport(_digigov_react_modules_Faq_slug),
37
- '@digigov/react-modules/Faq/utils': lazyImport(_digigov_react_modules_Faq_utils),
38
- '@digigov/react-modules/FilteredResults/DataTable': lazyImport(_digigov_react_modules_FilteredResults_DataTable),
39
- '@digigov/react-modules/FilteredResults/FilterChips': lazyImport(_digigov_react_modules_FilteredResults_FilterChips),
40
- '@digigov/react-modules/FilteredResults/FilterFields': lazyImport(_digigov_react_modules_FilteredResults_FilterFields),
41
- '@digigov/react-modules/FilteredResults/hooks': lazyImport(_digigov_react_modules_FilteredResults_hooks),
42
- '@digigov/react-modules/FilteredResults': lazyImport(_digigov_react_modules_FilteredResults)
43
- };