@skalfa/skalfa-component 1.0.22 → 1.0.23
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.
|
@@ -213,10 +213,10 @@ function TableSupervisionComponent({ title, id, fetchControl, columnControl, for
|
|
|
213
213
|
} }) }, "button-add"));
|
|
214
214
|
}
|
|
215
215
|
if (cb == "IMPORT") {
|
|
216
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "px-1.5 rounded-md relative", children: (0, jsx_runtime_1.jsx)(__1.ButtonComponent, { icon: "solid/
|
|
216
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "px-1.5 rounded-md relative", children: (0, jsx_runtime_1.jsx)(__1.ButtonComponent, { icon: "solid/import", variant: "outline", className: "!text-foreground", onClick: () => setToggle(`MODAL_IMPORT_${toggleKey}`), size: "sm" }) }, "import"));
|
|
217
217
|
}
|
|
218
218
|
if (cb == "EXPORT") {
|
|
219
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "px-1.5 rounded-md relative", children: (0, jsx_runtime_1.jsx)(__1.ButtonComponent, { icon: "solid/
|
|
219
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "px-1.5 rounded-md relative", children: (0, jsx_runtime_1.jsx)(__1.ButtonComponent, { icon: "solid/export", variant: "outline", className: "!text-foreground", onClick: () => setToggle(`MODAL_EXPORT_${toggleKey}`), size: "sm" }) }, "export-excel"));
|
|
220
220
|
}
|
|
221
221
|
if (cb == "PRINT") {
|
|
222
222
|
return ((0, jsx_runtime_1.jsx)("div", { className: "px-1.5 rounded-md relative", children: (0, jsx_runtime_1.jsx)(__1.ButtonComponent, { icon: "solid/file-pdf", label: l.base.print ? l.base.print() : "Print", variant: "outline", className: "!text-foreground", onClick: () => setToggle(`MODAL_PRINT_${toggleKey}`), size: "sm" }) }, "export-pdf"));
|
|
@@ -97,7 +97,7 @@ function TableComponent({ id, controlBar, columns, data, pagination, loading, so
|
|
|
97
97
|
selector: c.selector,
|
|
98
98
|
type: typeof c?.filterable == "object" ? c?.filterable?.type : "text",
|
|
99
99
|
options: typeof c?.filterable == "object" && c?.filterable?.type == "select" ? c?.filterable?.options : undefined
|
|
100
|
-
})), onFilter: (filters) => onChangeFilter?.(filters), filter: filter, className: (0, _utils_1.pcn)(className, "controller-bar") || "" })), (0, jsx_runtime_1.jsx)("div", { className: "relative", children: (0, jsx_runtime_1.jsx)(ScrollContainer_component_1.ScrollContainerComponent, { scrollFloating: !isSm && block, className:
|
|
100
|
+
})), onFilter: (filters) => onChangeFilter?.(filters), filter: filter, className: (0, _utils_1.pcn)(className, "controller-bar") || "" })), (0, jsx_runtime_1.jsx)("div", { className: "relative", children: (0, jsx_runtime_1.jsx)(ScrollContainer_component_1.ScrollContainerComponent, { scrollFloating: !isSm && block, className: `w-full ${block ? "pb-12" : ""}`, onScroll: (e) => {
|
|
101
101
|
actionColumnRef.current?.clientWidth && e.scrollLeft &&
|
|
102
102
|
setShowFloatingAction(e.scrollLeft + e.clientWidth <= e.scrollWidth - actionColumnRef.current?.clientWidth);
|
|
103
103
|
}, footer: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: block && pagination && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "py-6" }), (0, jsx_runtime_1.jsx)("div", { className: "my-2 absolute bottom-0 w-full", children: (0, jsx_runtime_1.jsx)(Pagination_component_1.PaginationComponent, { ...pagination }) })] })) }), children: loading ? ((0, jsx_runtime_1.jsx)("div", { className: "w-max min-w-full", children: (0, jsx_runtime_1.jsx)("div", { className: "table-loading-container", children: (0, jsx_runtime_1.jsx)("h1", { className: "table-loading-text", children: l.base.tableLoading ? l.base.tableLoading() : "" }) }) })) : !data || !data.length ? ((0, jsx_runtime_1.jsx)("div", { className: "table-empty-container", children: (0, jsx_runtime_1.jsx)("h1", { className: "table-empty-text", children: l.base.tableEmpty ? l.base.tableEmpty() : "Data empty" }) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !isSm || !responsiveControl?.mobile ? ((0, jsx_runtime_1.jsxs)("div", { className: "w-max min-w-full", children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("table-head-row", (0, _utils_1.pcn)(className, "row")), children: [!!actionBulking && ((0, jsx_runtime_1.jsx)("div", { className: "table-head-column w-max", children: (0, jsx_runtime_1.jsx)(Checkbox_component_1.CheckboxComponent, { name: "selected_table", className: "w-5 h-5", checked: data.length > 0 && checks?.length === data.length, onChange: () => data.length > 0 && checks?.length === data.length ? onChangeChecks?.([]) : onChangeChecks?.(data.map((d) => d.id)) }) })), !noIndex && (0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("table-head-column w-8", (0, _utils_1.pcn)(className, "head-column")), children: "#" }), renderHead()] }), (0, jsx_runtime_1.jsx)("div", { className: "table-body", children: data.map((item, key) => {
|
package/package.json
CHANGED
|
@@ -431,7 +431,7 @@ export function TableSupervisionComponent({
|
|
|
431
431
|
return (
|
|
432
432
|
<div className="px-1.5 rounded-md relative" key={"import"}>
|
|
433
433
|
<ButtonComponent
|
|
434
|
-
icon={"solid/
|
|
434
|
+
icon={"solid/import"}
|
|
435
435
|
variant="outline"
|
|
436
436
|
className="!text-foreground"
|
|
437
437
|
onClick={() => setToggle(`MODAL_IMPORT_${toggleKey}`)}
|
|
@@ -445,7 +445,7 @@ export function TableSupervisionComponent({
|
|
|
445
445
|
return (
|
|
446
446
|
<div className="px-1.5 rounded-md relative" key={"export-excel"}>
|
|
447
447
|
<ButtonComponent
|
|
448
|
-
icon={"solid/
|
|
448
|
+
icon={"solid/export"}
|
|
449
449
|
variant="outline"
|
|
450
450
|
className="!text-foreground"
|
|
451
451
|
onClick={() => setToggle(`MODAL_EXPORT_${toggleKey}`)}
|
|
@@ -293,7 +293,7 @@ export function TableComponent({
|
|
|
293
293
|
<div className="relative">
|
|
294
294
|
<ScrollContainerComponent
|
|
295
295
|
scrollFloating={!isSm && block}
|
|
296
|
-
className=
|
|
296
|
+
className={`w-full ${block ? "pb-12" : ""}`}
|
|
297
297
|
onScroll={(e) => {
|
|
298
298
|
actionColumnRef.current?.clientWidth && e.scrollLeft &&
|
|
299
299
|
setShowFloatingAction(e.scrollLeft + e.clientWidth <= e.scrollWidth - actionColumnRef.current?.clientWidth);
|