@rolster/react-components 18.17.0 → 18.17.3
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/index.js +30 -28
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +30 -28
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/Input/Input.js +1 -1
- package/dist/esm/components/atoms/InputMoney/InputMoney.js +2 -2
- package/dist/esm/components/atoms/InputMoney/InputMoney.js.map +1 -1
- package/dist/esm/components/atoms/InputNumber/InputNumber.js +2 -2
- package/dist/esm/components/atoms/InputNumber/InputNumber.js.map +1 -1
- package/dist/esm/components/atoms/InputText/InputText.js +2 -2
- package/dist/esm/components/atoms/InputText/InputText.js.map +1 -1
- package/dist/esm/components/organisms/Confirmation/Confirmation.d.ts +12 -7
- package/dist/esm/components/organisms/Confirmation/Confirmation.js +9 -7
- package/dist/esm/components/organisms/Confirmation/Confirmation.js.map +1 -1
- package/dist/esm/components/organisms/Datatable/Datatable.d.ts +7 -7
- package/dist/esm/components/organisms/Datatable/Datatable.js +14 -14
- package/dist/esm/components/organisms/Datatable/Datatable.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,6 @@ export function RlsInput({ children, disabled, formControl, identifier, onValue,
|
|
|
22
22
|
return (_jsxs("div", { id: identifier, className: renderClassStatus('rls-input', {
|
|
23
23
|
focused: formControl?.focused ?? focused,
|
|
24
24
|
disabled: formControl?.disabled || disabled
|
|
25
|
-
}), children: [_jsx("input", { ref: formControl?.elementRef, className: "rls-input__component", autoComplete: "off", type: type ?? 'text', placeholder: placeholder, disabled: formControl?.disabled || disabled, onFocus: onFocus, onBlur: onBlur, onChange: onChange, value: formControl?.value
|
|
25
|
+
}), children: [_jsx("input", { ref: formControl?.elementRef, className: "rls-input__component", autoComplete: "off", type: type ?? 'text', placeholder: placeholder, disabled: formControl?.disabled || disabled, onFocus: onFocus, onBlur: onBlur, onChange: onChange, value: formControl?.value || value || '' }), _jsx("span", { className: "rls-input__value", children: children })] }));
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=Input.js.map
|
|
@@ -5,10 +5,10 @@ import { RlsInput } from '../Input/Input';
|
|
|
5
5
|
import './InputMoney.css';
|
|
6
6
|
export function RlsInputMoney({ decimals, disabled, formControl, identifier, onValue, placeholder, symbol, value }) {
|
|
7
7
|
const [valueInput, setValueInput] = useState(value || 0);
|
|
8
|
-
function
|
|
8
|
+
function onValueInput(value) {
|
|
9
9
|
!formControl && setValueInput(value);
|
|
10
10
|
onValue && onValue(value);
|
|
11
11
|
}
|
|
12
|
-
return (_jsx("div", { id: identifier, className: "rls-input-money", children: _jsx(RlsInput, { formControl: formControl, type: "number", value: value, disabled: disabled, placeholder: placeholder, onValue:
|
|
12
|
+
return (_jsx("div", { id: identifier, className: "rls-input-money", children: _jsx(RlsInput, { formControl: formControl, type: "number", value: value, disabled: disabled, placeholder: placeholder, onValue: onValueInput, children: _jsx(RlsAmount, { value: formControl?.value ?? value ?? valueInput, symbol: symbol, decimals: decimals }) }) }));
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=InputMoney.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputMoney.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputMoney/InputMoney.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,kBAAkB,CAAC;AAO1B,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,UAAU,EACV,OAAO,EACP,WAAW,EACX,MAAM,EACN,KAAK,EACW;IAChB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAEzD,SAAS,
|
|
1
|
+
{"version":3,"file":"InputMoney.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputMoney/InputMoney.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,kBAAkB,CAAC;AAO1B,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,UAAU,EACV,OAAO,EACP,WAAW,EACX,MAAM,EACN,KAAK,EACW;IAChB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAEzD,SAAS,YAAY,CAAC,KAAa;QACjC,CAAC,WAAW,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,CACL,cAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAC,iBAAiB,YAC9C,KAAC,QAAQ,IACP,WAAW,EAAE,WAAW,EACxB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,YAAY,YAErB,KAAC,SAAS,IACR,KAAK,EAAE,WAAW,EAAE,KAAK,IAAI,KAAK,IAAI,UAAU,EAChD,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GAClB,GACO,GACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,10 +4,10 @@ import { RlsInput } from '../Input/Input';
|
|
|
4
4
|
import './InputNumber.css';
|
|
5
5
|
export function RlsInputNumber({ disabled, formControl, identifier, onValue, placeholder, value }) {
|
|
6
6
|
const [valueInput, setValueInput] = useState(value ?? 0);
|
|
7
|
-
function
|
|
7
|
+
function onValueInput(value) {
|
|
8
8
|
!formControl && setValueInput(value);
|
|
9
9
|
onValue && onValue(value);
|
|
10
10
|
}
|
|
11
|
-
return (_jsx("div", { id: identifier, className: "rls-input-number", children: _jsx(RlsInput, { formControl: formControl, type: "number", value: value, disabled: disabled, placeholder: placeholder, onValue:
|
|
11
|
+
return (_jsx("div", { id: identifier, className: "rls-input-number", children: _jsx(RlsInput, { formControl: formControl, type: "number", value: value, disabled: disabled, placeholder: placeholder, onValue: onValueInput, children: formControl?.value ?? value ?? valueInput }) }));
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=InputNumber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputNumber.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputNumber/InputNumber.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,mBAAmB,CAAC;AAE3B,MAAM,UAAU,cAAc,CAAC,EAC7B,QAAQ,EACR,WAAW,EACX,UAAU,EACV,OAAO,EACP,WAAW,EACX,KAAK,EACc;IACnB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAEzD,SAAS,
|
|
1
|
+
{"version":3,"file":"InputNumber.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputNumber/InputNumber.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,mBAAmB,CAAC;AAE3B,MAAM,UAAU,cAAc,CAAC,EAC7B,QAAQ,EACR,WAAW,EACX,UAAU,EACV,OAAO,EACP,WAAW,EACX,KAAK,EACc;IACnB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAEzD,SAAS,YAAY,CAAC,KAAa;QACjC,CAAC,WAAW,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,CACL,cAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAC,kBAAkB,YAC/C,KAAC,QAAQ,IACP,WAAW,EAAE,WAAW,EACxB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,YAAY,YAEpB,WAAW,EAAE,KAAK,IAAI,KAAK,IAAI,UAAU,GACjC,GACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,10 +4,10 @@ import { RlsInput } from '../Input/Input';
|
|
|
4
4
|
import './InputText.css';
|
|
5
5
|
export function RlsInputText({ disabled, formControl, identifier, onValue, placeholder, value }) {
|
|
6
6
|
const [valueInput, setValueInput] = useState(value ?? '');
|
|
7
|
-
function
|
|
7
|
+
function onValueInput(value) {
|
|
8
8
|
!formControl && setValueInput(value);
|
|
9
9
|
onValue && onValue(value);
|
|
10
10
|
}
|
|
11
|
-
return (_jsx("div", { id: identifier, className: "rls-input-text", children: _jsx(RlsInput, { formControl: formControl, type: "text", value: value, disabled: disabled, placeholder: placeholder, onValue:
|
|
11
|
+
return (_jsx("div", { id: identifier, className: "rls-input-text", children: _jsx(RlsInput, { formControl: formControl, type: "text", value: value, disabled: disabled, placeholder: placeholder, onValue: onValueInput, children: formControl?.value ?? value ?? valueInput }) }));
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=InputText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputText.js","sourceRoot":"","sources":["../../../../../src/components/atoms/InputText/InputText.tsx"],"names":[],"mappings":";AAAA,O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10 @@ export declare class ConfirmationResult extends PartialSealed<void, void, {
|
|
|
10
10
|
static reject(): ConfirmationResult;
|
|
11
11
|
}
|
|
12
12
|
type Result = Promise<ConfirmationResult>;
|
|
13
|
-
interface
|
|
13
|
+
interface ConfirmationButton {
|
|
14
14
|
label: string;
|
|
15
15
|
onClick: () => void;
|
|
16
|
+
identifier?: string;
|
|
16
17
|
}
|
|
17
18
|
interface ConfirmationBasic {
|
|
18
19
|
content?: ReactNode;
|
|
@@ -21,15 +22,19 @@ interface ConfirmationBasic {
|
|
|
21
22
|
rlsTheme?: RlsTheme;
|
|
22
23
|
}
|
|
23
24
|
interface ConfirmationProps extends ConfirmationBasic {
|
|
24
|
-
approved?:
|
|
25
|
-
reject?:
|
|
25
|
+
approved?: ConfirmationButton;
|
|
26
|
+
reject?: ConfirmationButton;
|
|
26
27
|
visible?: boolean;
|
|
27
28
|
}
|
|
28
|
-
interface
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
interface ConfirmationAction {
|
|
30
|
+
label: string;
|
|
31
|
+
identifier?: string;
|
|
32
|
+
}
|
|
33
|
+
interface ConfirmationOptions extends ConfirmationBasic {
|
|
34
|
+
approved?: ConfirmationAction;
|
|
35
|
+
reject?: ConfirmationAction;
|
|
31
36
|
}
|
|
32
|
-
export type Confirmation = (
|
|
37
|
+
export type Confirmation = (options: ConfirmationOptions) => Result;
|
|
33
38
|
export interface ConfirmationService {
|
|
34
39
|
RlsConfirmation: JSX.Element;
|
|
35
40
|
confirmation: Confirmation;
|
|
@@ -15,34 +15,36 @@ export class ConfirmationResult extends PartialSealed {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
export function RlsConfirmation({ approved, content, reject, rlsTheme, subtitle, title, visible }) {
|
|
18
|
-
return (_jsxs("div", { className: renderClassStatus('rls-confirmation', { visible }), "rls-theme": rlsTheme, children: [_jsxs("div", { className: "rls-confirmation__component", children: [_jsxs("div", { className: "rls-confirmation__header", children: [title && _jsx("div", { className: "rls-confirmation__title", children: title }), subtitle && (_jsx("div", { className: "rls-confirmation__subtitle", children: subtitle }))] }), _jsx("div", { className: "rls-confirmation__body", children: content && (_jsx("div", { className: "rls-confirmation__message", children: content })) }), (approved || reject) && (_jsx("div", { className: "rls-confirmation__footer", children: _jsxs("div", { className: "rls-confirmation__actions", children: [approved && (_jsx(RlsButton, { type: "raised", onClick: approved.onClick, children: approved.label })), reject && (_jsx(RlsButton, { type: "outline", onClick: reject.onClick, children: reject.label }))] }) }))] }), _jsx("div", { className: "rls-confirmation__backdrop" })] }));
|
|
18
|
+
return (_jsxs("div", { className: renderClassStatus('rls-confirmation', { visible }), "rls-theme": rlsTheme, children: [_jsxs("div", { className: "rls-confirmation__component", children: [_jsxs("div", { className: "rls-confirmation__header", children: [title && _jsx("div", { className: "rls-confirmation__title", children: title }), subtitle && (_jsx("div", { className: "rls-confirmation__subtitle", children: subtitle }))] }), _jsx("div", { className: "rls-confirmation__body", children: content && (_jsx("div", { className: "rls-confirmation__message", children: content })) }), (approved || reject) && (_jsx("div", { className: "rls-confirmation__footer", children: _jsxs("div", { className: "rls-confirmation__actions", children: [approved && (_jsx(RlsButton, { identifier: approved.identifier, type: "raised", onClick: approved.onClick, children: approved.label })), reject && (_jsx(RlsButton, { identifier: reject.identifier, type: "outline", onClick: reject.onClick, children: reject.label }))] }) }))] }), _jsx("div", { className: "rls-confirmation__backdrop" })] }));
|
|
19
19
|
}
|
|
20
20
|
export function useConfirmationService() {
|
|
21
21
|
const [config, setConfig] = useState({});
|
|
22
22
|
const [visible, setVisible] = useState(false);
|
|
23
23
|
const rlsConfirmation = ReactDOM.createPortal(_jsx(RlsConfirmation, { ...config, visible: visible }), document.body);
|
|
24
|
-
function confirmation(
|
|
24
|
+
function confirmation(options) {
|
|
25
25
|
return new Promise((resolve) => {
|
|
26
|
-
const { content, rlsTheme, subtitle, title, approved, reject } =
|
|
26
|
+
const { content, rlsTheme, subtitle, title, approved, reject } = options;
|
|
27
27
|
setConfig({
|
|
28
28
|
content,
|
|
29
29
|
rlsTheme,
|
|
30
30
|
subtitle,
|
|
31
31
|
title,
|
|
32
32
|
approved: {
|
|
33
|
-
label: approved
|
|
33
|
+
label: approved?.label ?? reactI18n('confirmationActionApproved'),
|
|
34
34
|
onClick: () => {
|
|
35
35
|
setVisible(false);
|
|
36
36
|
resolve(ConfirmationResult.approved());
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
identifier: approved?.identifier
|
|
38
39
|
},
|
|
39
40
|
reject: reject
|
|
40
41
|
? {
|
|
41
|
-
label: reject,
|
|
42
|
+
label: reject.label,
|
|
42
43
|
onClick: () => {
|
|
43
44
|
setVisible(false);
|
|
44
45
|
resolve(ConfirmationResult.reject());
|
|
45
|
-
}
|
|
46
|
+
},
|
|
47
|
+
identifier: reject.identifier
|
|
46
48
|
}
|
|
47
49
|
: undefined
|
|
48
50
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Confirmation.js","sourceRoot":"","sources":["../../../../../src/components/organisms/Confirmation/Confirmation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,oBAAoB,CAAC;AAE5B,MAAM,OAAO,kBAAmB,SAAQ,aAOvC;IACQ,MAAM,CAAC,QAAQ;QACpB,OAAO,IAAI,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;IAEM,MAAM,CAAC,MAAM;QAClB,OAAO,IAAI,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"Confirm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CAAC,QAAQ,EAAE,CAAC,CAAC;oBACzC,CAAC;oBACD,UAAU,EAAE,QAAQ,EAAE,UAAU;iBACjC;gBACD,MAAM,EAAE,MAAM;oBACZ,CAAC,CAAC;wBACE,KAAK,EAAE,MAAM,CAAC,KAAK;wBACnB,OAAO,EAAE,GAAG,EAAE;4BACZ,UAAU,CAAC,KAAK,CAAC,CAAC;4BAClB,OAAO,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC,CAAC;wBACvC,CAAC;wBACD,UAAU,EAAE,MAAM,CAAC,UAAU;qBAC9B;oBACH,CAAC,CAAC,SAAS;aACd,CAAC,CAAC;YAEH,UAAU,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,eAAe,EAAE,eAAe;QAChC,YAAY;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -16,11 +16,11 @@ interface DatatableProps extends RlsComponent {
|
|
|
16
16
|
header?: JSX.Element;
|
|
17
17
|
summary?: JSX.Element;
|
|
18
18
|
}
|
|
19
|
-
export declare function RlsDatatableHeader({ children }: RlsComponent): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare function RlsDatatableTitle({ children, className, control }: DatatableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare function RlsDatatableRecord({ children, className, error, warning }: DatatableRecordProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export declare function RlsDatatableTotals({ children, className, error, warning }: DatatableRecordProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export declare function RlsDatatableCell({ children, className, control, overflow }: DatatableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export declare function RlsDatatableData({ children, className, control, overflow }: DatatableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare function RlsDatatable({ children, datatable, footer, header, rlsTheme, summary }: DatatableProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function RlsDatatableHeader({ children, identifier }: RlsComponent): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function RlsDatatableTitle({ children, className, control, identifier }: DatatableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function RlsDatatableRecord({ children, className, error, identifier, warning }: DatatableRecordProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function RlsDatatableTotals({ children, className, error, identifier, warning }: DatatableRecordProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function RlsDatatableCell({ children, className, control, identifier, overflow }: DatatableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function RlsDatatableData({ children, className, control, identifier, overflow }: DatatableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function RlsDatatable({ children, datatable, footer, header, identifier, rlsTheme, summary }: DatatableProps): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export {};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { renderClassStatus } from '../../../helpers/css';
|
|
3
|
-
export function RlsDatatableHeader({ children }) {
|
|
4
|
-
return _jsx("tr", { className: "rls-datatable__header", children: children });
|
|
3
|
+
export function RlsDatatableHeader({ children, identifier }) {
|
|
4
|
+
return (_jsx("tr", { id: identifier, className: "rls-datatable__header", children: children }));
|
|
5
5
|
}
|
|
6
|
-
export function RlsDatatableTitle({ children, className, control }) {
|
|
7
|
-
return (_jsx("th", { className: renderClassStatus('rls-datatable__title', { control }, className).trim(), children: children }));
|
|
6
|
+
export function RlsDatatableTitle({ children, className, control, identifier }) {
|
|
7
|
+
return (_jsx("th", { id: identifier, className: renderClassStatus('rls-datatable__title', { control }, className).trim(), children: children }));
|
|
8
8
|
}
|
|
9
|
-
export function RlsDatatableRecord({ children, className, error, warning }) {
|
|
10
|
-
return (_jsx("tr", { className: renderClassStatus('rls-datatable__record', { error, warning }, className).trim(), children: children }));
|
|
9
|
+
export function RlsDatatableRecord({ children, className, error, identifier, warning }) {
|
|
10
|
+
return (_jsx("tr", { id: identifier, className: renderClassStatus('rls-datatable__record', { error, warning }, className).trim(), children: children }));
|
|
11
11
|
}
|
|
12
|
-
export function RlsDatatableTotals({ children, className, error, warning }) {
|
|
13
|
-
return (_jsx("div", { className: renderClassStatus('rls-datatable__totals', { error, warning }, className).trim(), children: children }));
|
|
12
|
+
export function RlsDatatableTotals({ children, className, error, identifier, warning }) {
|
|
13
|
+
return (_jsx("div", { id: identifier, className: renderClassStatus('rls-datatable__totals', { error, warning }, className).trim(), children: children }));
|
|
14
14
|
}
|
|
15
|
-
export function RlsDatatableCell({ children, className, control, overflow }) {
|
|
16
|
-
return (_jsx("th", { className: renderClassStatus('rls-datatable__cell', { control, overflow }, className).trim(), children: children }));
|
|
15
|
+
export function RlsDatatableCell({ children, className, control, identifier, overflow }) {
|
|
16
|
+
return (_jsx("th", { id: identifier, className: renderClassStatus('rls-datatable__cell', { control, overflow }, className).trim(), children: children }));
|
|
17
17
|
}
|
|
18
|
-
export function RlsDatatableData({ children, className, control, overflow }) {
|
|
19
|
-
return (_jsx("div", { className: renderClassStatus('rls-datatable__data', { control, overflow }, className).trim(), children: children }));
|
|
18
|
+
export function RlsDatatableData({ children, className, control, identifier, overflow }) {
|
|
19
|
+
return (_jsx("div", { id: identifier, className: renderClassStatus('rls-datatable__data', { control, overflow }, className).trim(), children: children }));
|
|
20
20
|
}
|
|
21
|
-
export function RlsDatatable({ children, datatable, footer, header, rlsTheme, summary }) {
|
|
21
|
+
export function RlsDatatable({ children, datatable, footer, header, identifier, rlsTheme, summary }) {
|
|
22
22
|
return (_jsxs("div", { className: renderClassStatus('rls-datatable', {
|
|
23
23
|
scrolleable: datatable?.scrolleable
|
|
24
|
-
}), "rls-theme": rlsTheme, children: [_jsxs("table", { children: [header && _jsx("thead", { className: "rls-datatable__thead", children: header }), _jsx("tbody", { ref: datatable?.tableRef, className: "rls-datatable__tbody", children: children })] }), summary && _jsx("div", { className: "rls-datatable__tsummary", children: summary }), footer && _jsx("div", { className: "rls-datatable__tfooter", children: footer })] }));
|
|
24
|
+
}), "rls-theme": rlsTheme, children: [_jsxs("table", { id: identifier, children: [header && _jsx("thead", { className: "rls-datatable__thead", children: header }), _jsx("tbody", { ref: datatable?.tableRef, className: "rls-datatable__tbody", children: children })] }), summary && _jsx("div", { className: "rls-datatable__tsummary", children: summary }), footer && _jsx("div", { className: "rls-datatable__tfooter", children: footer })] }));
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=Datatable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Datatable.js","sourceRoot":"","sources":["../../../../../src/components/organisms/Datatable/Datatable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAuBzD,MAAM,UAAU,kBAAkB,CAAC,EAAE,QAAQ,EAAgB;
|
|
1
|
+
{"version":3,"file":"Datatable.js","sourceRoot":"","sources":["../../../../../src/components/organisms/Datatable/Datatable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAuBzD,MAAM,UAAU,kBAAkB,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAgB;IACvE,OAAO,CACL,aAAI,EAAE,EAAE,UAAU,EAAE,SAAS,EAAC,uBAAuB,YAClD,QAAQ,GACN,CACN,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,EAChC,QAAQ,EACR,SAAS,EACT,OAAO,EACP,UAAU,EACS;IACnB,OAAO,CACL,aACE,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,iBAAiB,CAC1B,sBAAsB,EACtB,EAAE,OAAO,EAAE,EACX,SAAS,CACV,CAAC,IAAI,EAAE,YAEP,QAAQ,GACN,CACN,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAU,EAC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