UNPKG

@devgateway/dvz-ui-react

Version:

A modular, embeddable React component library for data visualization and UI, built with TypeScript. Provides reusable components for charts, maps, dashboards, and more, with built-in support for internationalization and Redux integration.

64 lines (63 loc) 1.29 kB
import { jsx as w } from "react/jsx-runtime"; import { useEffect as x } from "react"; import F from "./PostsFilterDropdown.js"; import { getYearRange as L } from "@devgateway/wp-react-lib"; const k = (o) => { const { group: r, placeholder: s, allLabel: n, noneLabel: l, useSingleColumn: i, enableTextSearch: p, filterType: c, showNoDataOption: f, closeOnSelect: m, allNoneSameBehaviour: u, autoApply: d, alphabeticalSort: h, ascOrder: g, onChange: Y, yearOptions: v, setYearOptions: y, yearFilterLoading: C, setYearFilterLoading: t, ...O } = o, S = async () => { t(!0); const b = (await L()).data.map((e) => ({ key: e, value: e, text: e.toString() })); return t(!1), b; }; return x(() => { (async () => { const a = await S(); y(a); })(); }, []), /* @__PURE__ */ w( F, { ...O, group: r, placeholder: s, allLabel: n, noneLabel: l, useSingleColumn: i, enableTextSearch: p, filterType: c, showNoDataOption: f, closeOnSelect: m, allNoneSameBehaviour: u, autoApply: d, alphabeticalSort: h, ascOrder: g, onChange: Y } ); }; export { k as default };