@guillotinaweb/react-gmi 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/TdLink.d.ts +3 -3
- package/dist/components/input/email.d.ts +2 -1
- package/dist/components/input/password.d.ts +4 -1
- package/dist/hooks/useRegistry.d.ts +3 -3
- package/dist/react-gmi.js +12 -5
- package/dist/react-gmi.js.map +1 -1
- package/dist/react-gmi.modern.js +12 -5
- package/dist/react-gmi.modern.js.map +1 -1
- package/dist/react-gmi.umd.js +12 -5
- package/dist/react-gmi.umd.js.map +1 -1
- package/dist/types/guillotina.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ItemModel } from '../models';
|
|
3
3
|
import { IndexSignature } from '../types/global';
|
|
4
|
-
import {
|
|
5
|
-
interface Props {
|
|
6
|
-
model: ItemModel<
|
|
4
|
+
import { SearchOrCommonObject } from '../types/guillotina';
|
|
5
|
+
interface Props<T extends SearchOrCommonObject = SearchOrCommonObject> {
|
|
6
|
+
model: ItemModel<T>;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
style?: IndexSignature;
|
|
9
9
|
}
|
|
@@ -4,6 +4,7 @@ interface Props {
|
|
|
4
4
|
onChange: (value: string) => void;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
id?: string;
|
|
7
|
+
required?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const EmailInput: ({ value, dataTest, placeholder, id, onChange, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const EmailInput: ({ value, dataTest, placeholder, id, onChange, required, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -3,6 +3,9 @@ interface Props {
|
|
|
3
3
|
value: string;
|
|
4
4
|
dataTest: string;
|
|
5
5
|
onChange: (value: string) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
required?: boolean;
|
|
6
9
|
}
|
|
7
|
-
export declare const PasswordInput: ({ value, dataTest, onChange, }: Props & InputHTMLAttributes<HTMLInputElement>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const PasswordInput: ({ value, dataTest, onChange, placeholder, id, required, }: Props & InputHTMLAttributes<HTMLInputElement>) => import("react/jsx-runtime").JSX.Element;
|
|
8
11
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FolderCtx } from '../views/folder';
|
|
2
2
|
import { BaseFormProps } from '../forms/base';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { GuillotinaCommonObject, ItemColumn, RegistrySchema,
|
|
4
|
+
import { GuillotinaCommonObject, ItemColumn, RegistrySchema, SearchOrCommonObject } from '../types/guillotina';
|
|
5
5
|
import { MessageDescriptor } from 'react-intl';
|
|
6
6
|
export interface RegistrySortValue {
|
|
7
7
|
direction: 'asc' | 'des';
|
|
@@ -30,7 +30,7 @@ export interface IRegistry {
|
|
|
30
30
|
[key: string]: (props: any | undefined) => JSX.Element | null;
|
|
31
31
|
};
|
|
32
32
|
itemsColumn: {
|
|
33
|
-
[key: string]: () => ItemColumn<
|
|
33
|
+
[key: string]: <T extends SearchOrCommonObject = SearchOrCommonObject>() => ItemColumn<T>[];
|
|
34
34
|
};
|
|
35
35
|
schemas: {
|
|
36
36
|
[key: string]: RegistrySchema;
|
|
@@ -72,7 +72,7 @@ export interface IManageRegistry {
|
|
|
72
72
|
getAction: (type: string, fallback?: React.FC) => React.FC;
|
|
73
73
|
getBehavior: (type: string, fallback?: React.FC) => React.FC<any>;
|
|
74
74
|
getProperties: (type: string) => RegistryProperties;
|
|
75
|
-
getItemsColumn: (type: string) => ItemColumn<
|
|
75
|
+
getItemsColumn: <T extends SearchOrCommonObject = SearchOrCommonObject>(type: string) => ItemColumn<T>[] | undefined;
|
|
76
76
|
getSchemas: (type: string) => RegistrySchema;
|
|
77
77
|
getFieldsToFilter: (type: string, fallback?: string[]) => string[];
|
|
78
78
|
getParsedSearchQueryParam: (query: string, type: string) => string;
|
package/dist/react-gmi.js
CHANGED
|
@@ -1896,7 +1896,8 @@ var EmailInput = function EmailInput(_ref) {
|
|
|
1896
1896
|
dataTest = _ref.dataTest,
|
|
1897
1897
|
placeholder = _ref.placeholder,
|
|
1898
1898
|
id = _ref.id,
|
|
1899
|
-
onChange = _ref.onChange
|
|
1899
|
+
onChange = _ref.onChange,
|
|
1900
|
+
required = _ref.required;
|
|
1900
1901
|
var intl = reactIntl.useIntl();
|
|
1901
1902
|
return jsxRuntime.jsx(Input, {
|
|
1902
1903
|
type: "email",
|
|
@@ -1915,7 +1916,8 @@ var EmailInput = function EmailInput(_ref) {
|
|
|
1915
1916
|
}),
|
|
1916
1917
|
id: id,
|
|
1917
1918
|
placeholder: placeholder,
|
|
1918
|
-
onChange: onChange
|
|
1919
|
+
onChange: onChange,
|
|
1920
|
+
required: required
|
|
1919
1921
|
});
|
|
1920
1922
|
};
|
|
1921
1923
|
|
|
@@ -1962,12 +1964,18 @@ var Form = function Form(_ref) {
|
|
|
1962
1964
|
var PasswordInput = function PasswordInput(_ref) {
|
|
1963
1965
|
var value = _ref.value,
|
|
1964
1966
|
dataTest = _ref.dataTest,
|
|
1965
|
-
onChange = _ref.onChange
|
|
1967
|
+
onChange = _ref.onChange,
|
|
1968
|
+
placeholder = _ref.placeholder,
|
|
1969
|
+
id = _ref.id,
|
|
1970
|
+
required = _ref.required;
|
|
1966
1971
|
return jsxRuntime.jsx(Input, {
|
|
1967
1972
|
value: value,
|
|
1968
1973
|
type: "password",
|
|
1969
1974
|
dataTest: dataTest,
|
|
1970
|
-
onChange: onChange
|
|
1975
|
+
onChange: onChange,
|
|
1976
|
+
placeholder: placeholder,
|
|
1977
|
+
id: id,
|
|
1978
|
+
required: required
|
|
1971
1979
|
});
|
|
1972
1980
|
};
|
|
1973
1981
|
|
|
@@ -9134,7 +9142,6 @@ function TabsPanel(_ref2) {
|
|
|
9134
9142
|
});
|
|
9135
9143
|
};
|
|
9136
9144
|
|
|
9137
|
-
console.log('restProps', restProps);
|
|
9138
9145
|
return jsxRuntime.jsxs("div", {
|
|
9139
9146
|
className: "container",
|
|
9140
9147
|
children: [jsxRuntime.jsxs("div", {
|