@sqrzro/admin 2.1.0-bz.41 → 2.1.0-bz.43

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.
Files changed (56) hide show
  1. package/dist/components/AppLayout/index.d.ts +0 -1
  2. package/dist/components/AppNavigation/index.d.ts +0 -1
  3. package/dist/components/AppNavigationComponent/index.d.ts +0 -1
  4. package/dist/components/AppNavigationSub/index.d.ts +11 -0
  5. package/dist/components/AppNavigationSub/index.js +12 -0
  6. package/dist/components/Badge/index.d.ts +0 -1
  7. package/dist/components/BooleanFilter/index.d.ts +0 -1
  8. package/dist/components/Dashboard/index.d.ts +0 -1
  9. package/dist/components/DataTable/index.d.ts +0 -1
  10. package/dist/components/DateFilter/index.d.ts +0 -1
  11. package/dist/components/DropdownFilter/index.d.ts +0 -1
  12. package/dist/components/FilterBar/index.d.ts +0 -1
  13. package/dist/components/FilterBarClearButton/index.d.ts +0 -1
  14. package/dist/components/FilterBarItem/index.d.ts +0 -1
  15. package/dist/components/GridList/index.d.ts +0 -1
  16. package/dist/components/GridListItem/index.d.ts +0 -1
  17. package/dist/components/InfoPanel/index.d.ts +0 -1
  18. package/dist/components/List/index.d.ts +0 -1
  19. package/dist/components/ListAction/index.d.ts +1 -0
  20. package/dist/components/ListAction/index.js +9 -0
  21. package/dist/components/ListActions/index.d.ts +0 -1
  22. package/dist/components/ListClientComponent/index.d.ts +0 -1
  23. package/dist/components/ListComponent/index.d.ts +0 -1
  24. package/dist/components/ListItem/index.d.ts +0 -1
  25. package/dist/components/ListSkeleton/index.d.ts +0 -1
  26. package/dist/components/MeActions/index.d.ts +0 -1
  27. package/dist/components/MePanel/index.d.ts +0 -1
  28. package/dist/components/Menu/index.d.ts +0 -1
  29. package/dist/components/MenuItem/index.d.ts +0 -1
  30. package/dist/components/Page/index.d.ts +0 -1
  31. package/dist/components/PageActions/index.d.ts +0 -1
  32. package/dist/components/PaginatedList/index.d.ts +0 -1
  33. package/dist/components/PaginatedListComponent/index.d.ts +0 -1
  34. package/dist/components/Pagination/index.d.ts +0 -1
  35. package/dist/components/PaginationItem/index.d.ts +0 -1
  36. package/dist/components/Panel/index.d.ts +0 -1
  37. package/dist/components/RootLayout/index.d.ts +0 -1
  38. package/dist/components/SettingsForm/index.d.ts +0 -1
  39. package/dist/components/SettingsPage/index.d.ts +0 -1
  40. package/dist/components/Table/index.d.ts +0 -1
  41. package/dist/components/TableClientComponent/index.d.ts +0 -1
  42. package/dist/components/TableComponent/index.d.ts +0 -1
  43. package/dist/components/Tabs/index.d.ts +0 -1
  44. package/dist/components/TabsComponent/index.d.ts +0 -1
  45. package/dist/components/index.d.ts +2 -2
  46. package/dist/components/index.js +1 -1
  47. package/dist/index.cjs +1166 -105
  48. package/dist/index.cjs.map +1 -1
  49. package/dist/index.js.map +1 -1
  50. package/dist/services/ConfigService.d.ts +0 -1
  51. package/dist/services/PermissionService.js +2 -1
  52. package/package.json +1 -1
  53. package/dist/components/AppNavigationItem/index.d.ts +0 -13
  54. package/dist/components/AppNavigationItem/index.js +0 -18
  55. package/dist/components/ListComponent copy/index.d.ts +0 -14
  56. package/dist/components/ListComponent copy/index.js +0 -21
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface AppLayoutProps {
3
2
  children: React.ReactNode;
4
3
  logoutButton?: React.ReactNode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AppNavigationProps {
3
2
  layout?: string;
4
3
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface ConfigNavigationObject {
3
2
  href: string;
4
3
  label: string;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ interface ConfigNavigationObject {
3
+ href: string;
4
+ label: string;
5
+ permission?: string;
6
+ }
7
+ interface AppNavigationSubProps {
8
+ data: ConfigNavigationObject[];
9
+ }
10
+ declare function AppNavigationSub({ data }: Readonly<AppNavigationSubProps>): React.ReactElement;
11
+ export default AppNavigationSub;
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Fragment, useState } from 'react';
4
+ import { Link } from '@sqrzro/components';
5
+ function AppNavigationSub({ data }) {
6
+ const [isOpen, setIsOpen] = useState(false);
7
+ function toggleIsOpen() {
8
+ setIsOpen((prev) => !prev);
9
+ }
10
+ return (_jsxs(Fragment, { children: [_jsx("button", { onClick: toggleIsOpen, type: "button", children: "Open" }), isOpen ? (_jsx("ul", { children: data.map(({ href, label }) => (_jsx("li", { children: _jsx(Link, { href: href, children: label }) }, href))) })) : null] }));
11
+ }
12
+ export default AppNavigationSub;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StyleVariant } from '@sqrzro/interfaces';
3
2
  export interface BadgeProps {
4
3
  children: React.ReactNode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FilterComponentProps } from '../../interfaces';
3
2
  declare function BooleanFilter({ name, onChange, value, }: Readonly<FilterComponentProps>): React.ReactElement;
4
3
  export declare function renderBooleanValue(value: string): string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface DashboardProps {
3
2
  children?: React.ReactNode;
4
3
  title: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface DataTableProps {
3
2
  data: Record<string, React.ReactNode>;
4
3
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FilterComponentProps } from '../../interfaces';
3
2
  declare function DateFilter({ name, onChange, value }: Readonly<FilterComponentProps>): React.ReactElement;
4
3
  export declare function transformDateValue(value?: string | null): string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { SimpleObject } from '@sqrzro/interfaces';
3
2
  import type { FilterComponentProps } from '../../interfaces';
4
3
  declare function DropdownFilter({ data, name, onChange, value, }: Readonly<FilterComponentProps>): React.ReactElement;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FilterObject } from '../FilterBarItem';
3
2
  export type { FilterObject } from '../FilterBarItem';
4
3
  export interface FilterBarProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface FilterBarClearButtonProps {
3
2
  onClick: () => void;
4
3
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type FilterType = 'boolean' | 'date' | 'dropdown';
3
2
  export interface FilterObject {
4
3
  data?: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ListProps } from '../List';
3
2
  export type GridListProps<Item extends object, Params> = Omit<ListProps<Item, Params>, 'renderItem'>;
4
3
  declare function GridList<Item extends object, Params>(props: GridListProps<Item, Params>): React.ReactElement;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ListObject } from '../ListItem';
3
2
  declare function GridListItem({ description, href, id, image, imageHref, meta, title, }: Readonly<ListObject>): React.ReactElement;
4
3
  export default GridListItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StyleVariant } from '@sqrzro/interfaces';
3
2
  type InfoPanelVariant = StyleVariant | 'mail';
4
3
  export interface InfoPanelProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FilterObject } from '../FilterBar';
3
2
  import type { ListComponentProps } from '../ListComponent';
4
3
  export interface ListProps<Item extends object, Params> extends Omit<ListComponentProps<Item, Params>, 'actions'> {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { ConfirmableAction } from '@sqrzro/interfaces';
2
3
  interface ListActionProps extends ConfirmableAction<number> {
3
4
  id: number;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ConfirmableButton } from '@sqrzro/components';
3
+ function ListAction({ id, onClick, label, variant, }) {
4
+ function handleClick() {
5
+ onClick(id);
6
+ }
7
+ return (_jsx(ConfirmableButton, { onClick: handleClick, variant: variant, isText: true, children: label }));
8
+ }
9
+ export default ListAction;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ConfirmableAction, LinkableAction } from '@sqrzro/interfaces';
3
2
  export interface ListAction extends Omit<ConfirmableAction & LinkableAction, 'onClick'> {
4
3
  onClick?: (id: string) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { EmptyMessageProps } from '@sqrzro/components';
3
2
  import type { ListObject } from '../ListItem';
4
3
  export interface ListClientComponentProps<Data = Record<string, unknown>> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Errorable } from '@sqrzro/interfaces';
3
2
  import type { ListObject } from '../ListItem';
4
3
  import type { ListClientComponentProps } from '../ListClientComponent';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StyleVariant } from '@sqrzro/interfaces';
3
2
  export interface ListObject<Data = Record<string, unknown>> {
4
3
  $data?: Data;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface ListSkeletonProps {
3
2
  }
4
3
  declare function ListSkeleton({}: Readonly<ListSkeletonProps>): React.ReactElement;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface MeActionsProps {
3
2
  logoutButton?: React.ReactNode;
4
3
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface MePanelProps {
3
2
  layout?: string;
4
3
  logoutButton?: React.ReactNode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ConfirmableAction, LinkableAction } from '@sqrzro/interfaces';
3
2
  interface MenuProps {
4
3
  actions: (ConfirmableAction & LinkableAction)[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ConfirmableAction, LinkableAction } from '@sqrzro/interfaces';
3
2
  type MenuItemProps = ConfirmableAction & LinkableAction;
4
3
  declare function MenuItem({ href, isConfirmable, label, onClick, variant, }: Readonly<MenuItemProps>): React.ReactElement;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { LinkableAction } from '@sqrzro/interfaces';
3
2
  import type { NavigationAction } from '../../interfaces';
4
3
  export interface PageProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface PageActionsProps {
3
2
  children: React.ReactNode;
4
3
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FilterObject } from '../FilterBar';
3
2
  import type { PaginatedListComponentProps } from '../PaginatedListComponent';
4
3
  export interface PaginatedListProps<Item extends object, Params> extends Omit<PaginatedListComponentProps<Item, Params>, 'actions'> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Errorable, Paginated } from '@sqrzro/interfaces';
3
2
  import type { ListObject } from '../ListItem';
4
3
  import type { ListClientComponentProps } from '../ListClientComponent';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface PaginationProps {
3
2
  limit: number;
4
3
  page: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare function getLink(pathname: string, searchParams: URLSearchParams, page: number): string;
3
2
  interface PaginationItemProps {
4
3
  currentPage: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { LinkableAction } from '@sqrzro/interfaces';
3
2
  export interface PanelProps {
4
3
  action?: LinkableAction | React.ReactElement;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Config as ConfigObject } from '../../services/ConfigService';
3
2
  export interface RootLayoutProps {
4
3
  children: React.ReactNode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { SettingsFormFields } from '../../services/SettingsService';
3
2
  interface SettingsFormProps {
4
3
  defaults: Partial<SettingsFormFields>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare function SettingsPage(): Promise<React.ReactElement>;
3
2
  export default SettingsPage;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FilterObject } from '../FilterBar';
3
2
  import type { TableComponentProps } from '../TableComponent';
4
3
  export interface TableProps<Item extends object, Params> extends Omit<TableComponentProps<Item, Params>, 'actions'> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface TableItemObject {
3
2
  [key: string]: string;
4
3
  id: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Errorable } from '@sqrzro/interfaces';
3
2
  import type { TableClientComponentProps, TableItemObject } from '../TableClientComponent';
4
3
  export interface TableComponentProps<Item, Params> extends Omit<TableClientComponentProps, 'data'> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { TabsComponentProps } from '../TabsComponent';
3
2
  declare function Tabs({ basePath, data }: Readonly<TabsComponentProps>): Promise<React.ReactElement>;
4
3
  export default Tabs;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { NavigationAction } from '../../interfaces';
3
2
  export interface TabsComponentProps {
4
3
  basePath?: string;
@@ -1,5 +1,5 @@
1
- export { Autocomplete, AutocompleteFormField, Button, CalendarInput, CheckboxInput, ConfirmableButton, ConfirmableForm, ContentFormField, DateFormField, DateInput, DefinitionList, Dropdown, DropdownFormField, EditableAutocompleteFormField, EditableContentFormField, EditableDateFormField, EditableDropdownFormField, EditableForm, EditableFormField, EditableMoneyFormField, EditableMultiFormField, EditableNumberFormField, EditableSwitchFormField, EditableTextAreaFormField, EditableTextFormField, EmptyMessage, Fieldset, Form, FormField, FormSubmit, ImageInput, ImageFormField, Link, LoadingModal, Modal, ModalActions, ModalForm, MoneyFormField, MoneyInput, MultiFormField, NumberFormField, NumberInput, ObjectFormField, RadioInput, Switch, SwitchFormField, TextArea, TextAreaFormField, TextFormField, TextInput, Toaster, } from '@sqrzro/components';
2
- export type { DropdownItem, EditableFormFieldProps, FormFieldProps, LinkProps, NumberInputProps, } from '@sqrzro/components';
1
+ export { Autocomplete, AutocompleteFormField, Button, CalendarInput, CheckboxInput, ConfirmableButton, ConfirmableForm, ContentFormField, DateFormField, DateInput, DefinitionList, Dropdown, DropdownFormField, EditableAutocompleteFormField, EditableContentFormField, EditableDateFormField, EditableDropdownFormField, EditableForm, EditableFormField, EditableMoneyFormField, EditableMultiFormField, EditableNumberFormField, EditableSwitchFormField, EditableTextAreaFormField, EditableTextFormField, EmptyMessage, Fieldset, Form, FormField, FormSubmit, ImageInput, ImageFormField, Link, LoadingModal, Mail, MailBlock, MailButton, Modal, ModalActions, ModalForm, MoneyFormField, MoneyInput, MultiFormField, NumberFormField, NumberInput, ObjectFormField, RadioInput, Switch, SwitchFormField, TextArea, TextAreaFormField, TextFormField, TextInput, Toaster, } from '@sqrzro/components';
2
+ export type { DropdownItem, EditableFormFieldProps, FormFieldProps, LinkProps, MailProps, MailBlockProps, MailButtonProps, NumberInputProps, } from '@sqrzro/components';
3
3
  export type { AppLayoutProps } from './AppLayout';
4
4
  export { default as AppLayout } from './AppLayout';
5
5
  export type { BadgeProps } from './Badge';
@@ -1,5 +1,5 @@
1
1
  // Exported from @sqrzro/components
2
- export { Autocomplete, AutocompleteFormField, Button, CalendarInput, CheckboxInput, ConfirmableButton, ConfirmableForm, ContentFormField, DateFormField, DateInput, DefinitionList, Dropdown, DropdownFormField, EditableAutocompleteFormField, EditableContentFormField, EditableDateFormField, EditableDropdownFormField, EditableForm, EditableFormField, EditableMoneyFormField, EditableMultiFormField, EditableNumberFormField, EditableSwitchFormField, EditableTextAreaFormField, EditableTextFormField, EmptyMessage, Fieldset, Form, FormField, FormSubmit, ImageInput, ImageFormField, Link, LoadingModal, Modal, ModalActions, ModalForm, MoneyFormField, MoneyInput, MultiFormField, NumberFormField, NumberInput, ObjectFormField, RadioInput, Switch, SwitchFormField, TextArea, TextAreaFormField, TextFormField, TextInput, Toaster, } from '@sqrzro/components';
2
+ export { Autocomplete, AutocompleteFormField, Button, CalendarInput, CheckboxInput, ConfirmableButton, ConfirmableForm, ContentFormField, DateFormField, DateInput, DefinitionList, Dropdown, DropdownFormField, EditableAutocompleteFormField, EditableContentFormField, EditableDateFormField, EditableDropdownFormField, EditableForm, EditableFormField, EditableMoneyFormField, EditableMultiFormField, EditableNumberFormField, EditableSwitchFormField, EditableTextAreaFormField, EditableTextFormField, EmptyMessage, Fieldset, Form, FormField, FormSubmit, ImageInput, ImageFormField, Link, LoadingModal, Mail, MailBlock, MailButton, Modal, ModalActions, ModalForm, MoneyFormField, MoneyInput, MultiFormField, NumberFormField, NumberInput, ObjectFormField, RadioInput, Switch, SwitchFormField, TextArea, TextAreaFormField, TextFormField, TextInput, Toaster, } from '@sqrzro/components';
3
3
  export { default as AppLayout } from './AppLayout';
4
4
  export { default as Badge } from './Badge';
5
5
  export { default as Dashboard } from './Dashboard';