warqadui 0.0.42 → 0.0.44
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -601,11 +601,12 @@ declare const useA4StatementView: ({ url, v, delay, params, startPage, }?: {
|
|
|
601
601
|
reactToPrintFn: react_to_print.UseReactToPrintFn;
|
|
602
602
|
};
|
|
603
603
|
|
|
604
|
-
declare const useTransaction: ({ url, v, delay, params, }: {
|
|
604
|
+
declare const useTransaction: ({ url, v, delay, params, dateFilter, }: {
|
|
605
605
|
url: string;
|
|
606
606
|
v?: 0 | 1 | 2;
|
|
607
607
|
delay?: number;
|
|
608
608
|
params?: Record<string, any>;
|
|
609
|
+
dateFilter?: boolean;
|
|
609
610
|
}) => {
|
|
610
611
|
TransactionViewComponent: ({ columns, data, error, pageRows, searchPlaceholder, selectable, filterables, verticalLines, index, rowPadding, className, title, description, onCreate, createTitle, ...rest }: {
|
|
611
612
|
columns: DataTableColumn[];
|
package/dist/index.d.ts
CHANGED
|
@@ -601,11 +601,12 @@ declare const useA4StatementView: ({ url, v, delay, params, startPage, }?: {
|
|
|
601
601
|
reactToPrintFn: react_to_print.UseReactToPrintFn;
|
|
602
602
|
};
|
|
603
603
|
|
|
604
|
-
declare const useTransaction: ({ url, v, delay, params, }: {
|
|
604
|
+
declare const useTransaction: ({ url, v, delay, params, dateFilter, }: {
|
|
605
605
|
url: string;
|
|
606
606
|
v?: 0 | 1 | 2;
|
|
607
607
|
delay?: number;
|
|
608
608
|
params?: Record<string, any>;
|
|
609
|
+
dateFilter?: boolean;
|
|
609
610
|
}) => {
|
|
610
611
|
TransactionViewComponent: ({ columns, data, error, pageRows, searchPlaceholder, selectable, filterables, verticalLines, index, rowPadding, className, title, description, onCreate, createTitle, ...rest }: {
|
|
611
612
|
columns: DataTableColumn[];
|
package/dist/index.js
CHANGED
|
@@ -1970,10 +1970,9 @@ var useApi = () => {
|
|
|
1970
1970
|
const { api: configApi } = useWarqadConfig();
|
|
1971
1971
|
const api = (0, import_react12.useMemo)(() => {
|
|
1972
1972
|
const baseURL = configApi || "/api";
|
|
1973
|
-
const isExternal = baseURL.startsWith("http");
|
|
1974
1973
|
return import_axios.default.create({
|
|
1975
1974
|
baseURL,
|
|
1976
|
-
withCredentials:
|
|
1975
|
+
withCredentials: true
|
|
1977
1976
|
});
|
|
1978
1977
|
}, [configApi]);
|
|
1979
1978
|
const [data, setData] = (0, import_react12.useState)();
|
|
@@ -4524,13 +4523,14 @@ var useTransaction = ({
|
|
|
4524
4523
|
url,
|
|
4525
4524
|
v = 1,
|
|
4526
4525
|
delay,
|
|
4527
|
-
params = {}
|
|
4526
|
+
params = {},
|
|
4527
|
+
dateFilter = true
|
|
4528
4528
|
}) => {
|
|
4529
4529
|
const [date, setDate] = (0, import_react20.useState)(
|
|
4530
4530
|
(0, import_moment.default)().format("DD/MM/YYYY")
|
|
4531
4531
|
);
|
|
4532
4532
|
const dateObj = {};
|
|
4533
|
-
if (date) dateObj.date = date;
|
|
4533
|
+
if (date && dateFilter) dateObj.date = date;
|
|
4534
4534
|
const { data: apiData, isLoading, get, error: apiError } = useApis_default();
|
|
4535
4535
|
const getData = () => {
|
|
4536
4536
|
console.log(dateObj);
|
|
@@ -4600,7 +4600,7 @@ var useTransaction = ({
|
|
|
4600
4600
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Card.Description, { children: description })
|
|
4601
4601
|
] }),
|
|
4602
4602
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("section", { className: "flex gap-2 items-center", children: [
|
|
4603
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4603
|
+
dateFilter && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4604
4604
|
Fields_default.DateInput,
|
|
4605
4605
|
{
|
|
4606
4606
|
value: date,
|
package/dist/index.mjs
CHANGED
|
@@ -1911,10 +1911,9 @@ var useApi = () => {
|
|
|
1911
1911
|
const { api: configApi } = useWarqadConfig();
|
|
1912
1912
|
const api = useMemo2(() => {
|
|
1913
1913
|
const baseURL = configApi || "/api";
|
|
1914
|
-
const isExternal = baseURL.startsWith("http");
|
|
1915
1914
|
return axios.create({
|
|
1916
1915
|
baseURL,
|
|
1917
|
-
withCredentials:
|
|
1916
|
+
withCredentials: true
|
|
1918
1917
|
});
|
|
1919
1918
|
}, [configApi]);
|
|
1920
1919
|
const [data, setData] = useState11();
|
|
@@ -4507,13 +4506,14 @@ var useTransaction = ({
|
|
|
4507
4506
|
url,
|
|
4508
4507
|
v = 1,
|
|
4509
4508
|
delay,
|
|
4510
|
-
params = {}
|
|
4509
|
+
params = {},
|
|
4510
|
+
dateFilter = true
|
|
4511
4511
|
}) => {
|
|
4512
4512
|
const [date, setDate] = useState17(
|
|
4513
4513
|
moment().format("DD/MM/YYYY")
|
|
4514
4514
|
);
|
|
4515
4515
|
const dateObj = {};
|
|
4516
|
-
if (date) dateObj.date = date;
|
|
4516
|
+
if (date && dateFilter) dateObj.date = date;
|
|
4517
4517
|
const { data: apiData, isLoading, get, error: apiError } = useApis_default();
|
|
4518
4518
|
const getData = () => {
|
|
4519
4519
|
console.log(dateObj);
|
|
@@ -4583,7 +4583,7 @@ var useTransaction = ({
|
|
|
4583
4583
|
/* @__PURE__ */ jsx29(Card.Description, { children: description })
|
|
4584
4584
|
] }),
|
|
4585
4585
|
/* @__PURE__ */ jsxs21("section", { className: "flex gap-2 items-center", children: [
|
|
4586
|
-
/* @__PURE__ */ jsx29(
|
|
4586
|
+
dateFilter && /* @__PURE__ */ jsx29(
|
|
4587
4587
|
Fields_default.DateInput,
|
|
4588
4588
|
{
|
|
4589
4589
|
value: date,
|