@mamrp/components 1.0.12 → 1.0.14
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 +23 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -234,8 +234,9 @@ type FormInputNumberProps<T extends FieldValues> = {
|
|
|
234
234
|
data?: any;
|
|
235
235
|
borderColor?: string;
|
|
236
236
|
decimalScale?: number;
|
|
237
|
+
textAlign?: "left" | "right" | "center";
|
|
237
238
|
} & TextFieldProps;
|
|
238
|
-
declare const FormInputNumber: <T extends FieldValues>({ name, control, label, endAdornment, thousandSeparator, startAdornment, allowLeadingZeros, allowNegative, maxLength, isLoading, rules, data, borderColor, decimalScale, ...rest }: FormInputNumberProps<T>) => React__default.JSX.Element;
|
|
239
|
+
declare const FormInputNumber: <T extends FieldValues>({ name, control, label, endAdornment, thousandSeparator, startAdornment, allowLeadingZeros, allowNegative, maxLength, isLoading, rules, data, borderColor, decimalScale, textAlign, ...rest }: FormInputNumberProps<T>) => React__default.JSX.Element;
|
|
239
240
|
|
|
240
241
|
type FormInputTextProps<T extends FieldValues> = {
|
|
241
242
|
control: Control<T>;
|
package/dist/index.d.ts
CHANGED
|
@@ -234,8 +234,9 @@ type FormInputNumberProps<T extends FieldValues> = {
|
|
|
234
234
|
data?: any;
|
|
235
235
|
borderColor?: string;
|
|
236
236
|
decimalScale?: number;
|
|
237
|
+
textAlign?: "left" | "right" | "center";
|
|
237
238
|
} & TextFieldProps;
|
|
238
|
-
declare const FormInputNumber: <T extends FieldValues>({ name, control, label, endAdornment, thousandSeparator, startAdornment, allowLeadingZeros, allowNegative, maxLength, isLoading, rules, data, borderColor, decimalScale, ...rest }: FormInputNumberProps<T>) => React__default.JSX.Element;
|
|
239
|
+
declare const FormInputNumber: <T extends FieldValues>({ name, control, label, endAdornment, thousandSeparator, startAdornment, allowLeadingZeros, allowNegative, maxLength, isLoading, rules, data, borderColor, decimalScale, textAlign, ...rest }: FormInputNumberProps<T>) => React__default.JSX.Element;
|
|
239
240
|
|
|
240
241
|
type FormInputTextProps<T extends FieldValues> = {
|
|
241
242
|
control: Control<T>;
|
package/dist/index.js
CHANGED
|
@@ -3062,19 +3062,20 @@ var Table = ({
|
|
|
3062
3062
|
},
|
|
3063
3063
|
[]
|
|
3064
3064
|
);
|
|
3065
|
+
const shouldShowPagination = !!(paginationModel && setPaginationModel);
|
|
3065
3066
|
const option = {
|
|
3066
3067
|
...!!setsortQuery && {
|
|
3067
3068
|
sortingMode: "server",
|
|
3068
3069
|
onSortModelChange: handleSortModelChange,
|
|
3069
3070
|
sortModel
|
|
3070
3071
|
},
|
|
3071
|
-
|
|
3072
|
-
...pagingmode == "client" && { paginationMode: "client" },
|
|
3073
|
-
|
|
3072
|
+
...shouldShowPagination && !pagingmode && { paginationMode: "server" },
|
|
3073
|
+
...shouldShowPagination && pagingmode == "client" && { paginationMode: "client" },
|
|
3074
|
+
...shouldShowPagination && !pagingmode && {
|
|
3074
3075
|
onPaginationModelChange: setPaginationModel,
|
|
3075
3076
|
paginationModel
|
|
3076
3077
|
},
|
|
3077
|
-
...pagingmode == "client" && {
|
|
3078
|
+
...shouldShowPagination && pagingmode == "client" && {
|
|
3078
3079
|
initialState: {
|
|
3079
3080
|
pagination: {
|
|
3080
3081
|
paginationModel: {
|
|
@@ -3086,7 +3087,7 @@ var Table = ({
|
|
|
3086
3087
|
}
|
|
3087
3088
|
}
|
|
3088
3089
|
},
|
|
3089
|
-
...pagingmode == "client" && {
|
|
3090
|
+
...shouldShowPagination && pagingmode == "client" && {
|
|
3090
3091
|
paginationModel
|
|
3091
3092
|
// Connect paginationModel to DataGrid
|
|
3092
3093
|
}
|
|
@@ -3097,7 +3098,7 @@ var Table = ({
|
|
|
3097
3098
|
rows,
|
|
3098
3099
|
columns: columns.map((column) => ({ ...column })),
|
|
3099
3100
|
disableRowSelectionOnClick: true,
|
|
3100
|
-
pagination: true,
|
|
3101
|
+
...shouldShowPagination ? { pagination: true } : { hideFooter: true },
|
|
3101
3102
|
sx: {
|
|
3102
3103
|
fontSize: fontSize ?? "0.875rem",
|
|
3103
3104
|
"& .MuiDataGrid-columnHeaders": {
|
|
@@ -3118,15 +3119,21 @@ var Table = ({
|
|
|
3118
3119
|
}
|
|
3119
3120
|
},
|
|
3120
3121
|
...option,
|
|
3121
|
-
|
|
3122
|
+
...shouldShowPagination && {
|
|
3123
|
+
onPaginationModelChange: setPaginationModel
|
|
3124
|
+
},
|
|
3122
3125
|
getRowId: rowId,
|
|
3123
3126
|
disableColumnResize: true,
|
|
3124
3127
|
autoHeight: true,
|
|
3125
|
-
rowCount: totalRows,
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3128
|
+
...shouldShowPagination && { rowCount: totalRows },
|
|
3129
|
+
...shouldShowPagination && {
|
|
3130
|
+
pageSizeOptions: [5, 10, 25, 50, 75, 100]
|
|
3131
|
+
},
|
|
3132
|
+
...shouldShowPagination && {
|
|
3133
|
+
slotProps: {
|
|
3134
|
+
pagination: {
|
|
3135
|
+
labelRowsPerPage: "\u062A\u0639\u062F\u0627\u062F \u062F\u0631 \u0647\u0631 \u0635\u0641\u062D\u0647"
|
|
3136
|
+
}
|
|
3130
3137
|
}
|
|
3131
3138
|
},
|
|
3132
3139
|
disableColumnMenu: true,
|
|
@@ -3183,6 +3190,7 @@ var FormInputNumber = ({
|
|
|
3183
3190
|
data,
|
|
3184
3191
|
borderColor,
|
|
3185
3192
|
decimalScale = 2,
|
|
3193
|
+
textAlign = "left",
|
|
3186
3194
|
...rest
|
|
3187
3195
|
}) => {
|
|
3188
3196
|
return /* @__PURE__ */ import_react21.default.createElement(
|
|
@@ -3216,6 +3224,9 @@ var FormInputNumber = ({
|
|
|
3216
3224
|
},
|
|
3217
3225
|
"& .MuiInputLabel-root.Mui-focused": {
|
|
3218
3226
|
color: "#085938"
|
|
3227
|
+
},
|
|
3228
|
+
"& .MuiInputBase-input": {
|
|
3229
|
+
textAlign
|
|
3219
3230
|
}
|
|
3220
3231
|
},
|
|
3221
3232
|
label,
|