aq-fe-framework 0.1.82 → 0.1.84

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.
@@ -1,4 +1,4 @@
1
- // src/utils/converter.ts
1
+ // src/utils/utils_converter.ts
2
2
  var utils_converter_getLabelByValue = (data, value) => {
3
3
  const numericValue = Number(value);
4
4
  return data[numericValue] || "Kh\xF4ng x\xE1c \u0111\u1ECBnh";
@@ -22,7 +22,7 @@ function utils_converter_enumToSelectOptions(enumObject) {
22
22
  return result;
23
23
  }
24
24
 
25
- // src/utils/date.ts
25
+ // src/utils/utils_date.ts
26
26
  function U0DateToDDMMYYYString(date) {
27
27
  if (!(date instanceof Date) || isNaN(date.getTime())) return "";
28
28
  const day = String(date.getDate()).padStart(2, "0");
@@ -47,10 +47,16 @@ function utils_date_formatToDateTimeStartEnd(startDate, endDate) {
47
47
  return `${startday}/${startmonth}/${startyear} [${starthour}:${startminute} - ${endhour}:${endminuate}]`;
48
48
  }
49
49
 
50
- // src/utils/excel.ts
50
+ // src/utils/utils_excel.ts
51
51
  import saveAs from "file-saver";
52
+ function isObjectPath(path) {
53
+ return /^[a-zA-Z_$][a-zA-Z0-9_$]*(\.[a-zA-Z_$][a-zA-Z0-9_$]*)+$/.test(path);
54
+ }
52
55
  function getValueByPath(obj, path) {
53
- return path.split(".").reduce((acc, key) => acc == null ? void 0 : acc[key], obj);
56
+ if (isObjectPath(path)) {
57
+ return path.split(".").reduce((acc, key) => acc == null ? void 0 : acc[key], obj);
58
+ }
59
+ return obj == null ? void 0 : obj[path];
54
60
  }
55
61
  async function utils_excel_exportExcel({
56
62
  workbook,
@@ -135,7 +141,7 @@ async function utils_excel_download({
135
141
  saveAs(blob, name);
136
142
  }
137
143
 
138
- // src/utils/file.ts
144
+ // src/utils/utils_file.ts
139
145
  import Docxtemplater from "docxtemplater";
140
146
  import { saveAs as saveAs2 } from "file-saver";
141
147
  import PizZip from "pizzip";
@@ -171,7 +177,7 @@ async function utils_file_docxtemplaterDownload({
171
177
  saveAs2(buffer, fileName || "output.docx");
172
178
  }
173
179
 
174
- // src/utils/notification.ts
180
+ // src/utils/utils_notification.ts
175
181
  import { notifications } from "@mantine/notifications";
176
182
  function utils_notification_show({ crudType = "create", message, color }) {
177
183
  if (crudType == "create") {
@@ -210,7 +216,7 @@ function utils_notification_show({ crudType = "create", message, color }) {
210
216
  }
211
217
  }
212
218
 
213
- // src/utils/pdf.ts
219
+ // src/utils/utils_pdf.ts
214
220
  import axios from "axios";
215
221
  async function utils_pdf_download(url) {
216
222
  try {
@@ -229,7 +235,7 @@ async function utils_pdf_download(url) {
229
235
  }
230
236
  }
231
237
 
232
- // src/utils/time.ts
238
+ // src/utils/utils_time.ts
233
239
  var utils_time_convertTimeStringToSeconds = (time) => {
234
240
  const [hours, minutes, seconds] = time.split(":").map(Number);
235
241
  return hours * 3600 + minutes * 60 + seconds;
@@ -245,7 +251,7 @@ var utils_time_getCurrentTimeString = () => {
245
251
  return `${hours}:${minutes}:${seconds}`;
246
252
  };
247
253
 
248
- // src/utils/validateForm.ts
254
+ // src/utils/utils_validateForm.ts
249
255
  import { isNotEmpty } from "@mantine/form";
250
256
  function U0MyValidateEmpty(message) {
251
257
  return isNotEmpty(message ? message : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng");
@@ -9,7 +9,7 @@ import {
9
9
  utils_file_fileToAQDocumentType,
10
10
  utils_notification_show,
11
11
  utils_pdf_download
12
- } from "./chunk-WNGACHRD.mjs";
12
+ } from "./chunk-EEQENBXZ.mjs";
13
13
  import {
14
14
  __objRest,
15
15
  __spreadProps,
@@ -3,7 +3,7 @@ import react__default, { ReactNode, ComponentProps } from 'react';
3
3
  import { MantineSize, ActionIconProps, ButtonProps, useModalsStack, CheckboxProps, SelectProps, NumberFormatterProps, FieldsetProps, FileInputProps, NumberInputProps, TextareaProps, TextInputProps, ContainerProps, FlexProps, GroupProps, TypographyStylesProviderProps, TabsProps, SkeletonProps } from '@mantine/core';
4
4
  import { useDisclosure, useListState } from '@mantine/hooks';
5
5
  import { UseFormReturnType, useForm } from '@mantine/form';
6
- import { I as IUtils_Excel_ColumnConfig } from '../excel-CP9z_HOI.mjs';
6
+ import { I as IUtils_Excel_ColumnConfig } from '../utils_excel-CP9z_HOI.mjs';
7
7
  import { MRT_ColumnDef, MRT_RowData, MRT_TableOptions, MRT_TableInstance } from 'mantine-react-table';
8
8
  import { ConfigOptions } from 'export-to-csv';
9
9
  import { DateInputProps } from '@mantine/dates';
@@ -62,9 +62,9 @@ import {
62
62
  useHeaderMegaMenuStore,
63
63
  useS_ButtonImport,
64
64
  utils_layout_getItemsWithoutLinks
65
- } from "../chunk-QJYFL44D.mjs";
65
+ } from "../chunk-MLFJD56W.mjs";
66
66
  import "../chunk-AL73DX37.mjs";
67
- import "../chunk-WNGACHRD.mjs";
67
+ import "../chunk-EEQENBXZ.mjs";
68
68
  import "../chunk-FWCSY2DS.mjs";
69
69
  export {
70
70
  AQButtonCreateByImportFile,
@@ -57,9 +57,9 @@ import {
57
57
  useS_authenticate,
58
58
  useS_core83092,
59
59
  utils_core83092_mergePage
60
- } from "../chunk-QJYFL44D.mjs";
60
+ } from "../chunk-MLFJD56W.mjs";
61
61
  import "../chunk-AL73DX37.mjs";
62
- import "../chunk-WNGACHRD.mjs";
62
+ import "../chunk-EEQENBXZ.mjs";
63
63
  import "../chunk-FWCSY2DS.mjs";
64
64
  export {
65
65
  F_authenticate_Login,
@@ -1,4 +1,4 @@
1
- export { I as IUtils_Excel_ColumnConfig, a as utils_excel_download, u as utils_excel_exportExcel } from '../excel-CP9z_HOI.mjs';
1
+ export { I as IUtils_Excel_ColumnConfig, a as utils_excel_download, u as utils_excel_exportExcel } from '../utils_excel-CP9z_HOI.mjs';
2
2
  import { DefaultMantineColor } from '@mantine/core';
3
3
  import * as react from 'react';
4
4
  import 'exceljs';
@@ -15,7 +15,7 @@ import {
15
15
  utils_pdf_download,
16
16
  utils_time_convertTimeStringToSeconds,
17
17
  utils_time_getCurrentTimeString
18
- } from "../chunk-WNGACHRD.mjs";
18
+ } from "../chunk-EEQENBXZ.mjs";
19
19
  import "../chunk-FWCSY2DS.mjs";
20
20
  export {
21
21
  U0DateToDDMMYYYString,
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "types": "./dist/modules-features/index.d.mts"
19
19
  }
20
20
  },
21
- "version": "0.1.82",
21
+ "version": "0.1.84",
22
22
  "private": false,
23
23
  "files": [
24
24
  "dist"