@rolster/react-components 18.15.36 → 18.15.40
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/cjs/assets/{index-B-LAHoFc.css → index-DTDYY-4K.css} +4 -0
- package/dist/cjs/index.js +29 -22
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-B-LAHoFc.css → index-DTDYY-4K.css} +4 -0
- package/dist/es/index.js +29 -22
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/ButtonAction/ButtonAction.js +1 -1
- package/dist/esm/components/atoms/ButtonAction/ButtonAction.js.map +1 -1
- package/dist/esm/components/atoms/Poster/Poster.css +4 -0
- package/dist/esm/components/atoms/Poster/Poster.d.ts +5 -1
- package/dist/esm/components/atoms/Poster/Poster.js +3 -2
- package/dist/esm/components/atoms/Poster/Poster.js.map +1 -1
- package/dist/esm/components/atoms/TabularText/TabularText.js +4 -2
- package/dist/esm/components/atoms/TabularText/TabularText.js.map +1 -1
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocomplete.d.ts +15 -26
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocomplete.js.map +1 -1
- package/dist/esm/components/organisms/FieldDate/FieldDate.d.ts +14 -8
- package/dist/esm/components/organisms/FieldDate/FieldDate.js +2 -2
- package/dist/esm/components/organisms/FieldDate/FieldDate.js.map +1 -1
- package/dist/esm/components/organisms/FieldDateRange/FieldDateRange.d.ts +14 -7
- package/dist/esm/components/organisms/FieldDateRange/FieldDateRange.js +12 -7
- package/dist/esm/components/organisms/FieldDateRange/FieldDateRange.js.map +1 -1
- package/dist/esm/components/organisms/FieldSelect/FieldSelect.d.ts +15 -26
- package/dist/esm/components/organisms/FieldSelect/FieldSelect.js.map +1 -1
- package/package.json +3 -3
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { RlsIcon } from '../Icon/Icon';
|
|
3
3
|
import './ButtonAction.css';
|
|
4
4
|
export function RlsButtonAction({ icon, disabled, tooltip, onClick }) {
|
|
5
|
-
return (_jsxs("button", { className: "rls-button-action", onClick: onClick, disabled: disabled, children: [_jsx("div", { className: "rls-button-action__content", children: _jsx(RlsIcon, { value: icon }) }), tooltip && (_jsx("div", { className: "rls-button-action__tooltip
|
|
5
|
+
return (_jsxs("button", { className: "rls-button-action", onClick: onClick, disabled: disabled, children: [_jsx("div", { className: "rls-button-action__content", children: _jsx(RlsIcon, { value: icon }) }), tooltip && (_jsx("div", { className: "rls-button-action__tooltip rls-overline-medium", children: _jsx("span", { children: tooltip }) }))] }));
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=ButtonAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonAction.js","sourceRoot":"","sources":["../../../../../src/components/atoms/ButtonAction/ButtonAction.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,oBAAoB,CAAC;AAS5B,MAAM,UAAU,eAAe,CAAC,EAC9B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,EACW;IAClB,OAAO,CACL,kBAAQ,SAAS,EAAC,mBAAmB,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,aACxE,cAAK,SAAS,EAAC,4BAA4B,YACzC,KAAC,OAAO,IAAC,KAAK,EAAE,IAAI,GAAI,GACpB,EACL,OAAO,IAAI,CACV,cAAK,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"ButtonAction.js","sourceRoot":"","sources":["../../../../../src/components/atoms/ButtonAction/ButtonAction.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,oBAAoB,CAAC;AAS5B,MAAM,UAAU,eAAe,CAAC,EAC9B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,EACW;IAClB,OAAO,CACL,kBAAQ,SAAS,EAAC,mBAAmB,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,aACxE,cAAK,SAAS,EAAC,4BAA4B,YACzC,KAAC,OAAO,IAAC,KAAK,EAAE,IAAI,GAAI,GACpB,EACL,OAAO,IAAI,CACV,cAAK,SAAS,EAAC,gDAAgD,YAC7D,yBAAO,OAAO,GAAQ,GAClB,CACP,IACM,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { RlsComponent } from '../../definitions';
|
|
2
2
|
import './Poster.css';
|
|
3
|
-
|
|
3
|
+
interface PosterProps extends RlsComponent {
|
|
4
|
+
contrast?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function RlsPoster({ children, contrast, rlsTheme }: PosterProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { renderClassStatus } from '../../../helpers';
|
|
2
3
|
import './Poster.css';
|
|
3
|
-
export function RlsPoster({ children, rlsTheme }) {
|
|
4
|
-
return (_jsx("div", { className:
|
|
4
|
+
export function RlsPoster({ children, contrast, rlsTheme }) {
|
|
5
|
+
return (_jsx("div", { className: renderClassStatus('rls-poster', { contrast }), "rls-theme": rlsTheme, children: children }));
|
|
5
6
|
}
|
|
6
7
|
//# sourceMappingURL=Poster.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Poster.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Poster/Poster.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Poster.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Poster/Poster.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,cAAc,CAAC;AAMtB,MAAM,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAe;IACrE,OAAO,CACL,cACE,SAAS,EAAE,iBAAiB,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,CAAC,eAC7C,QAAQ,YAElB,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import './TabularText.css';
|
|
3
|
-
const
|
|
3
|
+
const className = 'rls-tabular-text';
|
|
4
4
|
const pointers = ['.', ','];
|
|
5
5
|
function charClass(char) {
|
|
6
|
-
return pointers.includes(char)
|
|
6
|
+
return pointers.includes(char)
|
|
7
|
+
? `${className}__pointer`
|
|
8
|
+
: `${className}__char`;
|
|
7
9
|
}
|
|
8
10
|
export function RlsTabularText({ value }) {
|
|
9
11
|
return (_jsx("div", { className: "rls-tabular-text", children: value?.split('').map((char, index) => (_jsx("span", { className: charClass(char), children: char }, index))) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabularText.js","sourceRoot":"","sources":["../../../../../src/components/atoms/TabularText/TabularText.tsx"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAC;AAE3B,MAAM,
|
|
1
|
+
{"version":3,"file":"TabularText.js","sourceRoot":"","sources":["../../../../../src/components/atoms/TabularText/TabularText.tsx"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAC;AAE3B,MAAM,SAAS,GAAG,kBAAkB,CAAC;AACrC,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAE5B,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC5B,CAAC,CAAC,GAAG,SAAS,WAAW;QACzB,CAAC,CAAC,GAAG,SAAS,QAAQ,CAAC;AAC3B,CAAC;AAMD,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAoB;IACxD,OAAO,CACL,cAAK,SAAS,EAAC,kBAAkB,YAC9B,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACrC,eAAkB,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC,YACzC,IAAI,IADI,KAAK,CAET,CACR,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -11,7 +11,7 @@ interface FieldAutocompleteProps<T = any, E extends Element<T> = Element<T>> ext
|
|
|
11
11
|
msgErrorDisabled?: boolean;
|
|
12
12
|
onSearch?: (pattern: string) => void;
|
|
13
13
|
onSelect?: (value: NonNullable<T>) => void;
|
|
14
|
-
onValue?: (value?: T) => void;
|
|
14
|
+
onValue?: ((value?: T) => void) | ((value: T) => void);
|
|
15
15
|
placeholder?: string;
|
|
16
16
|
searching?: boolean;
|
|
17
17
|
value?: T;
|
|
@@ -19,38 +19,27 @@ interface FieldAutocompleteProps<T = any, E extends Element<T> = Element<T>> ext
|
|
|
19
19
|
interface FieldAutocompleteTemplateProps<T = any, E extends Element<T> = Element<T>> extends FieldAutocompleteProps<T, E> {
|
|
20
20
|
render: (element: E) => ReactNode;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
value: undefined;
|
|
25
|
-
}
|
|
26
|
-
interface FormControlTemplateProps<T = any> extends FieldAutocompleteTemplateProps<T, AutocompleteElement<T>> {
|
|
22
|
+
export declare function RlsFieldAutocompleteTemplate<T = any, E extends Element<T> = Element<T>>(props: FieldAutocompleteTemplateProps<T, E>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
interface FormControlDefinedProps<T = any> extends FieldAutocompleteProps<T, AutocompleteElement<T>> {
|
|
27
24
|
formControl: ReactControl<HTMLElement, NonNullable<T>>;
|
|
28
25
|
value: NonNullable<T>;
|
|
26
|
+
onValue?: (value: T) => void;
|
|
29
27
|
}
|
|
30
|
-
interface
|
|
31
|
-
formControl: ReactControl<HTMLElement, T | undefined>;
|
|
32
|
-
}
|
|
33
|
-
type SuggestionsTemplateProps<T = any> = Omit<FieldAutocompleteTemplateProps<T, AutocompleteElement<T>>, 'formControl' | 'value'>;
|
|
34
|
-
export declare function RlsFieldAutocompleteTemplate<T = any>(props: FormUndefinedTemplateProps<T>): JSX.Element;
|
|
35
|
-
export declare function RlsFieldAutocompleteTemplate<T = any>(props: FormControlTemplateProps<T>): JSX.Element;
|
|
36
|
-
export declare function RlsFieldAutocompleteTemplate<T = any>(props: FormVoidTemplateProps<T>): JSX.Element;
|
|
37
|
-
export declare function RlsFieldAutocompleteTemplate<T = any>(props: SuggestionsTemplateProps<T>): JSX.Element;
|
|
38
|
-
export declare function RlsFieldAutocompleteTemplate<T = any, E extends Element<T> = Element<T>>(props: FieldAutocompleteTemplateProps<T, E>): JSX.Element;
|
|
39
|
-
interface FormUndefinedProps<T = any> extends FieldAutocompleteProps<T, AutocompleteElement<T>> {
|
|
28
|
+
interface FormControlUndefinedProps<T = any> extends FieldAutocompleteProps<T, AutocompleteElement<T>> {
|
|
40
29
|
formControl: ReactControl<HTMLElement, T | undefined>;
|
|
41
30
|
value: undefined;
|
|
31
|
+
onValue?: (value?: T) => void;
|
|
42
32
|
}
|
|
43
|
-
interface
|
|
44
|
-
formControl: ReactControl<HTMLElement, NonNullable<T>>;
|
|
45
|
-
value: NonNullable<T>;
|
|
46
|
-
}
|
|
47
|
-
interface FormVoidProps<T = any> extends Omit<FieldAutocompleteProps<T, AutocompleteElement<T>>, 'value'> {
|
|
33
|
+
interface FormControlVoidProps<T = any> extends Omit<FieldAutocompleteProps<T, AutocompleteElement<T>>, 'value'> {
|
|
48
34
|
formControl: ReactControl<HTMLElement, T | undefined>;
|
|
35
|
+
onValue?: (value: T) => void;
|
|
36
|
+
}
|
|
37
|
+
interface FormControlEmptyProps<T = any> extends Omit<FieldAutocompleteProps<T, AutocompleteElement<T>>, 'formControl' | 'value'> {
|
|
38
|
+
onValue?: (value?: T) => void;
|
|
49
39
|
}
|
|
50
|
-
|
|
51
|
-
export declare function RlsFieldAutocomplete<T = any>(props:
|
|
52
|
-
export declare function RlsFieldAutocomplete<T = any>(props:
|
|
53
|
-
export declare function RlsFieldAutocomplete<T = any>(props:
|
|
54
|
-
export declare function RlsFieldAutocomplete<T = any>(props: SuggestionsProps<T>): JSX.Element;
|
|
40
|
+
export declare function RlsFieldAutocomplete<T = any>(props: FormControlUndefinedProps<T>): JSX.Element;
|
|
41
|
+
export declare function RlsFieldAutocomplete<T = any>(props: FormControlDefinedProps<T>): JSX.Element;
|
|
42
|
+
export declare function RlsFieldAutocomplete<T = any>(props: FormControlVoidProps<T>): JSX.Element;
|
|
43
|
+
export declare function RlsFieldAutocomplete<T = any>(props: FormControlEmptyProps<T>): JSX.Element;
|
|
55
44
|
export declare function RlsFieldAutocomplete<T = any>(props: FieldAutocompleteProps<T, AutocompleteElement<T>>): JSX.Element;
|
|
56
45
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldAutocomplete.js","sourceRoot":"","sources":["../../../../../src/components/organisms/FieldAutocomplete/FieldAutocomplete.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldAutocomplete.js","sourceRoot":"","sources":["../../../../../src/components/organisms/FieldAutocomplete/FieldAutocomplete.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EA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
10
10
|
minDate?: Date;
|
|
11
11
|
msgErrorDisabled?: boolean;
|
|
12
|
-
onValue?: (value?: Date) => void;
|
|
12
|
+
onValue?: ((value?: Date) => void) | ((value: Date) => void);
|
|
13
13
|
placeholder?: string;
|
|
14
14
|
value?: Date;
|
|
15
15
|
}
|
|
16
|
-
interface
|
|
16
|
+
interface FormControlDefinedProps extends FieldDateProps {
|
|
17
17
|
formControl: ReactControl<HTMLElement, Date>;
|
|
18
18
|
value: Date;
|
|
19
|
+
onValue?: (value: Date) => void;
|
|
19
20
|
}
|
|
20
|
-
interface
|
|
21
|
+
interface FormControlUndefinedProps extends FieldDateProps {
|
|
21
22
|
formControl: ReactControl<HTMLElement, Date | undefined>;
|
|
22
23
|
value: undefined;
|
|
24
|
+
onValue?: (value?: Date) => void;
|
|
23
25
|
}
|
|
24
|
-
interface
|
|
26
|
+
interface FormControlVoidProps extends Omit<FieldDateProps, 'value'> {
|
|
25
27
|
formControl: ReactControl<HTMLElement, Date | undefined>;
|
|
28
|
+
onValue?: (value?: Date) => void;
|
|
29
|
+
}
|
|
30
|
+
interface FormControlEmptyProps extends Omit<FieldDateProps, 'formControl' | 'value'> {
|
|
31
|
+
onValue?: (value?: Date) => void;
|
|
26
32
|
}
|
|
27
|
-
export declare function RlsFieldDate(props:
|
|
28
|
-
export declare function RlsFieldDate(props:
|
|
29
|
-
export declare function RlsFieldDate(props:
|
|
30
|
-
export declare function RlsFieldDate(props:
|
|
33
|
+
export declare function RlsFieldDate(props: FormControlDefinedProps): JSX.Element;
|
|
34
|
+
export declare function RlsFieldDate(props: FormControlUndefinedProps): JSX.Element;
|
|
35
|
+
export declare function RlsFieldDate(props: FormControlVoidProps): JSX.Element;
|
|
36
|
+
export declare function RlsFieldDate(props: FormControlEmptyProps): JSX.Element;
|
|
31
37
|
export {};
|
|
@@ -11,7 +11,7 @@ import './FieldDate.css';
|
|
|
11
11
|
const FORMAT_DATE = '{dd}/{mx}/{aa}';
|
|
12
12
|
export function RlsFieldDate({ children, date, disabled, formControl, format, maxDate, minDate, msgErrorDisabled, onValue, placeholder, rlsTheme, value: defaultValue }) {
|
|
13
13
|
const today = new Date(); // Initial current date in component
|
|
14
|
-
const [value, setValue] = useState(defaultValue);
|
|
14
|
+
const [value, setValue] = useState(formControl?.value || defaultValue);
|
|
15
15
|
const [modalIsVisible, setModalIsVisible] = useState(false);
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
const dateCheck = checkDateRange({
|
|
@@ -33,7 +33,7 @@ export function RlsFieldDate({ children, date, disabled, formControl, format, ma
|
|
|
33
33
|
if (value) {
|
|
34
34
|
formControl?.setValue(defaultValue);
|
|
35
35
|
formControl?.touch();
|
|
36
|
-
onChange(
|
|
36
|
+
onChange(defaultValue);
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
39
|
setModalIsVisible(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldDate.js","sourceRoot":"","sources":["../../../../../src/components/organisms/FieldDate/FieldDate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,iBAAiB,CAAC;AAEzB,MAAM,WAAW,GAAG,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldDate.js","sourceRoot":"","sources":["../../../../../src/components/organisms/FieldDate/FieldDate.tsx"],"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3C,IACL,GACF,EAEL,CAAC,gBAAgB,IAAI,CACpB,KAAC,mBAAmB,IAClB,SAAS,EAAC,sBAAsB,EAChC,WAAW,EAAE,WAAW,GACxB,CACH,IACG,EAEN,KAAC,QAAQ,IAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,YACnD,KAAC,aAAa,IACZ,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;wBAC9B,IAAI,KAAK,kBAAkB,CAAC,MAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;wBACtD,WAAW,EAAE,KAAK,EAAE,CAAC;wBACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;oBAC3B,CAAC,GACD,GACO,IACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -9,22 +9,29 @@ interface FieldDateRangeProps extends RlsComponent {
|
|
|
9
9
|
maxDate?: Date;
|
|
10
10
|
minDate?: Date;
|
|
11
11
|
msgErrorDisabled?: boolean;
|
|
12
|
+
onValue?: ((value?: DateRange) => void) | ((value: DateRange) => void);
|
|
12
13
|
placeholder?: string;
|
|
13
14
|
value?: DateRange;
|
|
14
15
|
}
|
|
15
|
-
interface
|
|
16
|
+
interface FormControlDefinedProps extends FieldDateRangeProps {
|
|
16
17
|
formControl: ReactControl<HTMLElement, DateRange>;
|
|
17
18
|
value: DateRange;
|
|
19
|
+
onValue?: (value: DateRange) => void;
|
|
18
20
|
}
|
|
19
|
-
interface
|
|
21
|
+
interface FormControlUndefinedProps extends FieldDateRangeProps {
|
|
20
22
|
formControl: ReactControl<HTMLElement, DateRange | undefined>;
|
|
21
23
|
value: undefined;
|
|
24
|
+
onValue?: (value?: DateRange) => void;
|
|
22
25
|
}
|
|
23
|
-
interface
|
|
26
|
+
interface FormControlVoidProps extends Omit<FieldDateRangeProps, 'value'> {
|
|
24
27
|
formControl: ReactControl<HTMLElement, DateRange | undefined>;
|
|
28
|
+
onValue?: (value?: DateRange) => void;
|
|
25
29
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export declare function RlsFieldDateRange(props:
|
|
30
|
+
interface FormControlEmptyProps extends Omit<FieldDateRangeProps, 'formControl' | 'value'> {
|
|
31
|
+
onValue?: (value?: DateRange) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare function RlsFieldDateRange(props: FormControlDefinedProps): JSX.Element;
|
|
34
|
+
export declare function RlsFieldDateRange(props: FormControlUndefinedProps): JSX.Element;
|
|
35
|
+
export declare function RlsFieldDateRange(props: FormControlVoidProps): JSX.Element;
|
|
36
|
+
export declare function RlsFieldDateRange(props: FormControlEmptyProps): JSX.Element;
|
|
30
37
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { PickerListenerType } from '@rolster/components';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { rangeFormatTemplate, renderClassStatus } from '../../../helpers';
|
|
5
5
|
import { RlsIcon } from '../../atoms';
|
|
@@ -7,10 +7,9 @@ import { RlsMessageFormError } from '../../molecules';
|
|
|
7
7
|
import { RlsModal } from '../Modal/Modal';
|
|
8
8
|
import { RlsPickerDateRange } from '../PickerDateRange/PickerDateRange';
|
|
9
9
|
import './FieldDateRange.css';
|
|
10
|
-
export function RlsFieldDateRange({ children, date: datePicker, disabled, formControl, maxDate, minDate, msgErrorDisabled, placeholder, rlsTheme, value: defaultValue }) {
|
|
11
|
-
const currentRange = formControl?.value || DateRange.now();
|
|
10
|
+
export function RlsFieldDateRange({ children, date: datePicker, disabled, formControl, maxDate, minDate, msgErrorDisabled, onValue, placeholder, rlsTheme, value: defaultValue }) {
|
|
12
11
|
const currentDate = datePicker || new Date();
|
|
13
|
-
const [value, setValue] = useState(
|
|
12
|
+
const [value, setValue] = useState(formControl?.value || defaultValue);
|
|
14
13
|
const [modalIsVisible, setModalIsVisible] = useState(false);
|
|
15
14
|
function onClickInput() {
|
|
16
15
|
setModalIsVisible(true);
|
|
@@ -18,14 +17,20 @@ export function RlsFieldDateRange({ children, date: datePicker, disabled, formCo
|
|
|
18
17
|
function onClickAction() {
|
|
19
18
|
if (value) {
|
|
20
19
|
formControl?.setValue(defaultValue);
|
|
21
|
-
|
|
20
|
+
formControl?.touch();
|
|
21
|
+
onChange(defaultValue);
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
24
|
setModalIsVisible(true);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
function onChange(value) {
|
|
28
|
+
setValue(value);
|
|
29
|
+
onValue && onValue(value);
|
|
30
|
+
}
|
|
31
|
+
return (_jsxs("div", { className: "rls-field-date-range", "rls-theme": rlsTheme, children: [_jsxs("div", { className: renderClassStatus('rls-field-box', { disabled }), children: [children && _jsx("label", { className: "rls-field-box__label", children: children }), _jsx("div", { className: "rls-field-box__component", children: _jsxs("div", { className: "rls-field-box__body", children: [_jsx("input", { className: "rls-field-date-range__control", type: "text", value: value ? rangeFormatTemplate(value) : '', readOnly: true, placeholder: placeholder, onClick: onClickInput, disabled: disabled }), _jsx("button", { className: "rls-field-date-range__action", onClick: onClickAction, disabled: disabled, children: _jsx(RlsIcon, { value: value ? 'trash-2' : 'calendar' }) })] }) }), !msgErrorDisabled && (_jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }), _jsx(RlsModal, { visible: modalIsVisible, rlsTheme: rlsTheme, children: _jsx(RlsPickerDateRange, { formControl: formControl, date: currentDate, disabled: disabled, maxDate: maxDate, minDate: minDate, onListener: ({ type, value }) => {
|
|
32
|
+
type !== PickerListenerType.Cancel && onChange(value);
|
|
33
|
+
formControl?.touch();
|
|
29
34
|
setModalIsVisible(false);
|
|
30
35
|
} }) })] }));
|
|
31
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldDateRange.js","sourceRoot":"","sources":["../../../../../src/components/organisms/FieldDateRange/FieldDateRange.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"FieldDateRange.js","sourceRoot":"","sources":["../../../../../src/components/organisms/FieldDateRange/FieldDateRange.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,sBAAsB,CAAC;AA4C9B,MAAM,UAAU,iBAAiB,CAAC,EAChC,QAAQ,EACR,IAAI,EAAE,UAAU,EAChB,QAAQ,EACR,WAAW,EACX,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,OAAO,EACP,WAAW,EACX,QAAQ,EACR,KAAK,EAAE,YAAY,EACC;IACpB,MAAM,WAAW,GAAG,UAAU,IAAI,IAAI,IAAI,EAAE,CAAC;IAE7C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,WAAW,EAAE,KAAK,IAAI,YAAY,CAAC,CAAC;IACvE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5D,SAAS,YAAY;QACnB,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,SAAS,aAAa;QACpB,IAAI,KA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AAQ,EAAE,QAAQ,YACnD,KAAC,kBAAkB,IACjB,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;wBAC9B,IAAI,KAAK,kBAAkB,CAAC,MAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;wBACtD,WAAW,EAAE,KAAK,EAAE,CAAC;wBACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;oBAC3B,CAAC,GACD,GACO,IACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -9,45 +9,34 @@ interface FieldSelectProps<T = any, E extends Element<T> = Element<T>> extends R
|
|
|
9
9
|
formControl?: ReactControl<HTMLElement, T | undefined> | ReactControl<HTMLElement, NonNullable<T>>;
|
|
10
10
|
msgErrorDisabled?: boolean;
|
|
11
11
|
onSelect?: (value: NonNullable<T>) => void;
|
|
12
|
-
onValue?: (value: T) => void;
|
|
12
|
+
onValue?: ((value?: T) => void) | ((value: T) => void);
|
|
13
13
|
placeholder?: string;
|
|
14
14
|
value?: T;
|
|
15
15
|
}
|
|
16
16
|
interface FieldSelectTemplateProps<T = any, E extends Element<T> = Element<T>> extends FieldSelectProps<T, E> {
|
|
17
17
|
render: (element: E) => ReactNode;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
value: undefined;
|
|
22
|
-
}
|
|
23
|
-
interface FormControlTemplateProps<T = any> extends FieldSelectTemplateProps<T, ListElement<T>> {
|
|
19
|
+
export declare function RlsFieldSelectTemplate<T = any, E extends ListElement<T> = ListElement<T>>(props: FieldSelectTemplateProps<T, E>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
interface FormControlDefinedProps<T = any> extends FieldSelectProps<T, ListElement<T>> {
|
|
24
21
|
formControl: ReactControl<HTMLElement, NonNullable<T>>;
|
|
25
22
|
value: NonNullable<T>;
|
|
23
|
+
onValue?: (value: T) => void;
|
|
26
24
|
}
|
|
27
|
-
interface
|
|
28
|
-
formControl: ReactControl<HTMLElement, T | undefined>;
|
|
29
|
-
}
|
|
30
|
-
type SuggestionsTemplateProps<T = any> = Omit<FieldSelectTemplateProps<T, ListElement<T>>, 'formControl' | 'value'>;
|
|
31
|
-
export declare function RlsFieldSelectTemplate<T = any>(props: FormUndefinedTemplateProps<T>): JSX.Element;
|
|
32
|
-
export declare function RlsFieldSelectTemplate<T = any>(props: FormControlTemplateProps<T>): JSX.Element;
|
|
33
|
-
export declare function RlsFieldSelectTemplate<T = any>(props: FormVoidTemplateProps<T>): JSX.Element;
|
|
34
|
-
export declare function RlsFieldSelectTemplate<T = any>(props: SuggestionsTemplateProps<T>): JSX.Element;
|
|
35
|
-
export declare function RlsFieldSelectTemplate<T = any, E extends ListElement<T> = ListElement<T>>(props: FieldSelectTemplateProps<T, E>): JSX.Element;
|
|
36
|
-
interface FormUndefinedProps<T = any> extends FieldSelectProps<T, ListElement<T>> {
|
|
25
|
+
interface FormControlUndefinedProps<T = any> extends FieldSelectProps<T, ListElement<T>> {
|
|
37
26
|
formControl: ReactControl<HTMLElement, T | undefined>;
|
|
38
27
|
value: undefined;
|
|
28
|
+
onValue?: (value?: T) => void;
|
|
39
29
|
}
|
|
40
|
-
interface
|
|
41
|
-
formControl: ReactControl<HTMLElement, NonNullable<T>>;
|
|
42
|
-
value: NonNullable<T>;
|
|
43
|
-
}
|
|
44
|
-
interface FormVoidProps<T = any> extends Omit<FieldSelectProps<T, ListElement<T>>, 'value'> {
|
|
30
|
+
interface FormControlVoidProps<T = any> extends Omit<FieldSelectProps<T, ListElement<T>>, 'value'> {
|
|
45
31
|
formControl: ReactControl<HTMLElement, T | undefined>;
|
|
32
|
+
onValue?: (value?: T) => void;
|
|
33
|
+
}
|
|
34
|
+
interface FormControlEmptyProps<T = any> extends Omit<FieldSelectProps<T, ListElement<T>>, 'formControl' | 'value'> {
|
|
35
|
+
onValue?: (value?: T) => void;
|
|
46
36
|
}
|
|
47
|
-
|
|
48
|
-
export declare function RlsFieldSelect<T = any>(props:
|
|
49
|
-
export declare function RlsFieldSelect<T = any>(props:
|
|
50
|
-
export declare function RlsFieldSelect<T = any>(props:
|
|
51
|
-
export declare function RlsFieldSelect<T = any>(props: SuggestionsProps<T>): JSX.Element;
|
|
37
|
+
export declare function RlsFieldSelect<T = any>(props: FormControlUndefinedProps<T>): JSX.Element;
|
|
38
|
+
export declare function RlsFieldSelect<T = any>(props: FormControlDefinedProps<T>): JSX.Element;
|
|
39
|
+
export declare function RlsFieldSelect<T = any>(props: FormControlVoidProps<T>): JSX.Element;
|
|
40
|
+
export declare function RlsFieldSelect<T = any>(props: FormControlEmptyProps<T>): JSX.Element;
|
|
52
41
|
export declare function RlsFieldSelect<T = any>(props: FieldSelectProps<T, ListElement<T>>): JSX.Element;
|
|
53
42
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldSelect.js","sourceRoot":"","sources":["../../../../../src/components/organisms/FieldSelect/FieldSelect.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldSelect.js","sourceRoot":"","sources":["../../../../../src/components/organisms/FieldSelect/FieldSelect.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAA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ACpC,OAAO,EAAE,MAAM,CAAC,eAAe,GAC1B,IACH,IACF,CACP,CAAC;AACJ,CAAC;AA0CD,MAAM,UAAU,cAAc,CAC5B,KAA0C;IAE1C,OAAO,CACL,KAAC,sBAAsB,OACjB,KAAK,EACT,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CACnB,KAAC,SAAS,IACR,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,GAAG,EAAE,OAAO,CAAC,GAAG,EAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ,YAE1B,yBAAO,OAAO,CAAC,KAAK,GAAQ,GAClB,CACb,GACD,CACH,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolster/react-components",
|
|
3
|
-
"version": "18.15.
|
|
3
|
+
"version": "18.15.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Package containing UI components for React Project.",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"@rolster/commons": "^2.0.9",
|
|
38
38
|
"@rolster/components": "^0.3.10",
|
|
39
39
|
"@rolster/dates": "^2.0.0",
|
|
40
|
-
"@rolster/forms": "^2.
|
|
40
|
+
"@rolster/forms": "^2.7.1",
|
|
41
41
|
"@rolster/i18n": "^2.1.1",
|
|
42
|
-
"@rolster/react-forms": "^18.
|
|
42
|
+
"@rolster/react-forms": "^18.8.0",
|
|
43
43
|
"@rolster/strings": "^2.0.0",
|
|
44
44
|
"@rolster/validators": "^2.0.2",
|
|
45
45
|
"lottie-react": "^2.4.0",
|