@espresso-lab/mantine-data-table 1.9.10 → 1.9.12
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/DataTable/DeleteModal.d.ts +1 -1
- package/dist/DataTable/UpdateModal.d.ts +1 -2
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +9 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +25 -25
- package/dist/index.umd.js.map +1 -1
- package/package.json +9 -9
|
@@ -5,5 +5,5 @@ interface DeleteModalProps<T> {
|
|
|
5
5
|
apiPath: string;
|
|
6
6
|
selectedRecords: T[];
|
|
7
7
|
}
|
|
8
|
+
export type { DeleteModalProps };
|
|
8
9
|
export declare function DeleteModal<T extends BaseEntity>({ queryKey, apiPath, onClose, selectedRecords, }: DeleteModalProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseEntity } from '../Hooks/useApi';
|
|
2
2
|
import { Field, StepConfig } from './DataTableInner.tsx';
|
|
3
|
-
interface UpdateModalProps<T> {
|
|
3
|
+
export interface UpdateModalProps<T> {
|
|
4
4
|
fields: Field<T>[];
|
|
5
5
|
steps?: StepConfig[];
|
|
6
6
|
onClose: () => void;
|
|
@@ -9,4 +9,3 @@ interface UpdateModalProps<T> {
|
|
|
9
9
|
id: string | number;
|
|
10
10
|
}
|
|
11
11
|
export declare function UpdateModal<T extends BaseEntity>({ fields, onClose, queryKey, apiPath, id, steps, }: UpdateModalProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ export type { BaseEntity } from './Hooks/useApi';
|
|
|
2
2
|
export { getApiHeaders, api, useGetOne, useDeleteOne, useGetAll, useUpdateOne, deleteOne, createOne, getAll, updateOne, useAddOne, getOne, } from './Hooks/useApi';
|
|
3
3
|
export type { DataTableProps, FieldType, Field, StepConfig, TabOption, } from './DataTable/DataTableInner.tsx';
|
|
4
4
|
export { DataTable } from './DataTable/DataTable.tsx';
|
|
5
|
+
export { CreateModal } from './DataTable/CreateModal.tsx';
|
|
6
|
+
export type { CreateModalProps } from './DataTable/CreateModal.tsx';
|
|
7
|
+
export { UpdateModal } from './DataTable/UpdateModal.tsx';
|
|
8
|
+
export type { UpdateModalProps } from './DataTable/UpdateModal.tsx';
|
|
9
|
+
export { DeleteModal } from './DataTable/DeleteModal.tsx';
|
|
10
|
+
export type { DeleteModalProps } from './DataTable/DeleteModal.tsx';
|
|
5
11
|
export { usePersistentState } from './Hooks/usePersitentState.ts';
|
|
6
12
|
export { useDataTable } from './Hooks/useDataTable.ts';
|
|
7
13
|
export { DataTableProvider } from './Context/DataTableContext.tsx';
|
package/dist/index.es.js
CHANGED
|
@@ -332,9 +332,7 @@ function Ty() {
|
|
|
332
332
|
}
|
|
333
333
|
var My = class extends ss {
|
|
334
334
|
constructor(i, n) {
|
|
335
|
-
super(), this.options = n, this.#t = i, this.#a = null, this.#s = tf(), this.
|
|
336
|
-
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
337
|
-
), this.bindMethods(), this.setOptions(n);
|
|
335
|
+
super(), this.options = n, this.#t = i, this.#a = null, this.#s = tf(), this.bindMethods(), this.setOptions(n);
|
|
338
336
|
}
|
|
339
337
|
#t;
|
|
340
338
|
#e = void 0;
|
|
@@ -409,7 +407,11 @@ var My = class extends ss {
|
|
|
409
407
|
}
|
|
410
408
|
trackResult(i, n) {
|
|
411
409
|
return new Proxy(i, {
|
|
412
|
-
get: (r, s) => (this.trackProp(s), n?.(s),
|
|
410
|
+
get: (r, s) => (this.trackProp(s), n?.(s), s === "promise" && !this.options.experimental_prefetchInRender && this.#s.status === "pending" && this.#s.reject(
|
|
411
|
+
new Error(
|
|
412
|
+
"experimental_prefetchInRender feature flag is not enabled"
|
|
413
|
+
)
|
|
414
|
+
), Reflect.get(r, s))
|
|
413
415
|
});
|
|
414
416
|
}
|
|
415
417
|
trackProp(i) {
|
|
@@ -12032,8 +12034,11 @@ function Cx(i) {
|
|
|
12032
12034
|
return n[2] !== r || n[3] !== s ? (u = /* @__PURE__ */ O.jsx(bh, { client: r, children: s }), n[2] = r, n[3] = s, n[4] = u) : u = n[4], u;
|
|
12033
12035
|
}
|
|
12034
12036
|
export {
|
|
12037
|
+
Jw as CreateModal,
|
|
12035
12038
|
Cx as DataTable,
|
|
12036
12039
|
bx as DataTableProvider,
|
|
12040
|
+
nx as DeleteModal,
|
|
12041
|
+
Kb as UpdateModal,
|
|
12037
12042
|
xx as api,
|
|
12038
12043
|
V2 as createOne,
|
|
12039
12044
|
G2 as deleteOne,
|