@citizenplatform/core 1.0.2 → 1.0.4
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.js +5 -0
- package/dist/index10.js +273 -0
- package/dist/index10.js.map +1 -0
- package/dist/index100.js +31 -0
- package/dist/index100.js.map +1 -0
- package/dist/index101.js +165 -0
- package/dist/index101.js.map +1 -0
- package/dist/index102.js +48 -0
- package/dist/index102.js.map +1 -0
- package/dist/index103.js +8 -0
- package/dist/index103.js.map +1 -0
- package/dist/index104.js +6 -0
- package/dist/index104.js.map +1 -0
- package/dist/index105.js +14 -0
- package/dist/index105.js.map +1 -0
- package/dist/index106.js +8 -0
- package/dist/index106.js.map +1 -0
- package/dist/index107.js +7 -0
- package/dist/index107.js.map +1 -0
- package/dist/index108.js +16 -0
- package/dist/index108.js.map +1 -0
- package/dist/index109.js +7 -0
- package/dist/index109.js.map +1 -0
- package/dist/index11.js +49 -0
- package/dist/index11.js.map +1 -0
- package/dist/index110.js +22 -0
- package/dist/index110.js.map +1 -0
- package/dist/index111.js +22 -0
- package/dist/index111.js.map +1 -0
- package/dist/index112.js +9 -0
- package/dist/index112.js.map +1 -0
- package/dist/index113.js +20 -0
- package/dist/index113.js.map +1 -0
- package/dist/index114.js +149 -0
- package/dist/index114.js.map +1 -0
- package/dist/index115.js +20 -0
- package/dist/index115.js.map +1 -0
- package/dist/index116.js +9 -0
- package/dist/index116.js.map +1 -0
- package/dist/index117.js +9 -0
- package/dist/index117.js.map +1 -0
- package/dist/index118.js +11 -0
- package/dist/index118.js.map +1 -0
- package/dist/index119.js +56 -0
- package/dist/index119.js.map +1 -0
- package/dist/index12.js +16 -0
- package/dist/index12.js.map +1 -0
- package/dist/index120.js +63 -0
- package/dist/index120.js.map +1 -0
- package/dist/index121.js +24 -0
- package/dist/index121.js.map +1 -0
- package/dist/index122.js +9 -0
- package/dist/index122.js.map +1 -0
- package/dist/index123.js +11 -0
- package/dist/index123.js.map +1 -0
- package/dist/index124.js +10 -0
- package/dist/index124.js.map +1 -0
- package/dist/index125.js +254 -0
- package/dist/index125.js.map +1 -0
- package/dist/index126.js +20 -0
- package/dist/index126.js.map +1 -0
- package/dist/index127.js +25 -0
- package/dist/index127.js.map +1 -0
- package/dist/index128.js +250 -0
- package/dist/index128.js.map +1 -0
- package/dist/index129.js +20 -0
- package/dist/index129.js.map +1 -0
- package/dist/index13.js +20 -0
- package/dist/index13.js.map +1 -0
- package/dist/index130.js +13 -0
- package/dist/index130.js.map +1 -0
- package/dist/index131.js +15 -0
- package/dist/index131.js.map +1 -0
- package/dist/index132.js +117 -0
- package/dist/index132.js.map +1 -0
- package/dist/index133.js +13 -0
- package/dist/index133.js.map +1 -0
- package/dist/index134.js +22 -0
- package/dist/index134.js.map +1 -0
- package/dist/index135.js +26 -0
- package/dist/index135.js.map +1 -0
- package/dist/index136.js +20 -0
- package/dist/index136.js.map +1 -0
- package/dist/index137.js +22 -0
- package/dist/index137.js.map +1 -0
- package/dist/index138.js +12 -0
- package/dist/index138.js.map +1 -0
- package/dist/index139.js +26 -0
- package/dist/index139.js.map +1 -0
- package/dist/index14.js +17 -0
- package/dist/index14.js.map +1 -0
- package/dist/index140.js +56 -0
- package/dist/index140.js.map +1 -0
- package/dist/index141.js +12 -0
- package/dist/index141.js.map +1 -0
- package/dist/index142.js +212 -0
- package/dist/index142.js.map +1 -0
- package/dist/index143.js +4 -0
- package/dist/index144.js +5 -0
- package/dist/index145.js +5 -0
- package/dist/index15.js +9 -0
- package/dist/index15.js.map +1 -0
- package/dist/index16.js +10 -0
- package/dist/index16.js.map +1 -0
- package/dist/index17.js +7 -0
- package/dist/index17.js.map +1 -0
- package/dist/index18.js +40 -0
- package/dist/index18.js.map +1 -0
- package/dist/index19.js +13 -0
- package/dist/index19.js.map +1 -0
- package/dist/index2.js +13 -0
- package/dist/index20.js +10 -0
- package/dist/index20.js.map +1 -0
- package/dist/index21.js +61 -0
- package/dist/index21.js.map +1 -0
- package/dist/index22.js +63 -0
- package/dist/index22.js.map +1 -0
- package/dist/index23.js +12 -0
- package/dist/index23.js.map +1 -0
- package/dist/index24.js +26 -0
- package/dist/index24.js.map +1 -0
- package/dist/index25.js +48 -0
- package/dist/index25.js.map +1 -0
- package/dist/index26.js +55 -0
- package/dist/index26.js.map +1 -0
- package/dist/index27.js +71 -0
- package/dist/index27.js.map +1 -0
- package/dist/index28.js +44 -0
- package/dist/index28.js.map +1 -0
- package/dist/index29.js +117 -0
- package/dist/index29.js.map +1 -0
- package/dist/index3.js +64 -0
- package/dist/index3.js.map +1 -0
- package/dist/index30.js +16 -0
- package/dist/index30.js.map +1 -0
- package/dist/index31.js +28 -0
- package/dist/index31.js.map +1 -0
- package/dist/index32.js +36 -0
- package/dist/index32.js.map +1 -0
- package/dist/index33.js +25 -0
- package/dist/index33.js.map +1 -0
- package/dist/index34.js +44 -0
- package/dist/index34.js.map +1 -0
- package/dist/index35.js +160 -0
- package/dist/index35.js.map +1 -0
- package/dist/index36.js +77 -0
- package/dist/index36.js.map +1 -0
- package/dist/index37.js +14 -0
- package/dist/index37.js.map +1 -0
- package/dist/index38.js +41 -0
- package/dist/index38.js.map +1 -0
- package/dist/index39.js +6 -0
- package/dist/index39.js.map +1 -0
- package/dist/index4.js +84 -0
- package/dist/index4.js.map +1 -0
- package/dist/index40.js +39 -0
- package/dist/index40.js.map +1 -0
- package/dist/index41.js +110 -0
- package/dist/index41.js.map +1 -0
- package/dist/index42.js +97 -0
- package/dist/index42.js.map +1 -0
- package/dist/index43.js +22 -0
- package/dist/index43.js.map +1 -0
- package/dist/index44.js +18 -0
- package/dist/index44.js.map +1 -0
- package/dist/index45.js +11 -0
- package/dist/index45.js.map +1 -0
- package/dist/index46.js +192 -0
- package/dist/index46.js.map +1 -0
- package/dist/index47.js +24 -0
- package/dist/index47.js.map +1 -0
- package/dist/index48.js +14 -0
- package/dist/index48.js.map +1 -0
- package/dist/index49.js +54 -0
- package/dist/index49.js.map +1 -0
- package/dist/index5.js +12 -0
- package/dist/index5.js.map +1 -0
- package/dist/index50.js +99 -0
- package/dist/index50.js.map +1 -0
- package/dist/index51.js +10 -0
- package/dist/index51.js.map +1 -0
- package/dist/index52.js +18 -0
- package/dist/index52.js.map +1 -0
- package/dist/index53.js +9 -0
- package/dist/index53.js.map +1 -0
- package/dist/index54.js +67 -0
- package/dist/index54.js.map +1 -0
- package/dist/index55.js +13 -0
- package/dist/index55.js.map +1 -0
- package/dist/index56.js +24 -0
- package/dist/index56.js.map +1 -0
- package/dist/index57.js +6 -0
- package/dist/index57.js.map +1 -0
- package/dist/index58.js +14 -0
- package/dist/index58.js.map +1 -0
- package/dist/index59.js +14 -0
- package/dist/index59.js.map +1 -0
- package/dist/index6.js +41 -0
- package/dist/index6.js.map +1 -0
- package/dist/index60.js +38 -0
- package/dist/index60.js.map +1 -0
- package/dist/index61.js +15 -0
- package/dist/index61.js.map +1 -0
- package/dist/index62.js +12 -0
- package/dist/index62.js.map +1 -0
- package/dist/index63.js +19 -0
- package/dist/index63.js.map +1 -0
- package/dist/index64.js +24 -0
- package/dist/index64.js.map +1 -0
- package/dist/index65.js +12 -0
- package/dist/index65.js.map +1 -0
- package/dist/index66.js +25 -0
- package/dist/index66.js.map +1 -0
- package/dist/index67.js +16 -0
- package/dist/index67.js.map +1 -0
- package/dist/index68.js +130 -0
- package/dist/index68.js.map +1 -0
- package/dist/index69.js +32 -0
- package/dist/index69.js.map +1 -0
- package/dist/index7.js +10 -0
- package/dist/index7.js.map +1 -0
- package/dist/index70.js +8 -0
- package/dist/index70.js.map +1 -0
- package/dist/index71.js +122 -0
- package/dist/index71.js.map +1 -0
- package/dist/index72.js +35 -0
- package/dist/index72.js.map +1 -0
- package/dist/index73.js +14 -0
- package/dist/index73.js.map +1 -0
- package/dist/index74.js +13 -0
- package/dist/index74.js.map +1 -0
- package/dist/index75.js +42 -0
- package/dist/index75.js.map +1 -0
- package/dist/index76.js +66 -0
- package/dist/index76.js.map +1 -0
- package/dist/index77.js +10 -0
- package/dist/index77.js.map +1 -0
- package/dist/index78.js +9 -0
- package/dist/index78.js.map +1 -0
- package/dist/index79.js +21 -0
- package/dist/index79.js.map +1 -0
- package/dist/index8.js +10 -0
- package/dist/index8.js.map +1 -0
- package/dist/index80.js +21 -0
- package/dist/index80.js.map +1 -0
- package/dist/index81.js +21 -0
- package/dist/index81.js.map +1 -0
- package/dist/index82.js +21 -0
- package/dist/index82.js.map +1 -0
- package/dist/index83.js +21 -0
- package/dist/index83.js.map +1 -0
- package/dist/index84.js +21 -0
- package/dist/index84.js.map +1 -0
- package/dist/index85.js +21 -0
- package/dist/index85.js.map +1 -0
- package/dist/index86.js +219 -0
- package/dist/index86.js.map +1 -0
- package/dist/index87.js +12 -0
- package/dist/index87.js.map +1 -0
- package/dist/index88.js +15 -0
- package/dist/index88.js.map +1 -0
- package/dist/index89.js +55 -0
- package/dist/index89.js.map +1 -0
- package/dist/index9.js +46 -0
- package/dist/index9.js.map +1 -0
- package/dist/index90.js +38 -0
- package/dist/index90.js.map +1 -0
- package/dist/index91.js +52 -0
- package/dist/index91.js.map +1 -0
- package/dist/index92.js +12 -0
- package/dist/index92.js.map +1 -0
- package/dist/index93.js +15 -0
- package/dist/index93.js.map +1 -0
- package/dist/index94.js +28 -0
- package/dist/index94.js.map +1 -0
- package/dist/index95.js +111 -0
- package/dist/index95.js.map +1 -0
- package/dist/index96.js +9 -0
- package/dist/index96.js.map +1 -0
- package/dist/index97.js +38 -0
- package/dist/index97.js.map +1 -0
- package/dist/index98.js +8 -0
- package/dist/index98.js.map +1 -0
- package/dist/index99.js +10 -0
- package/dist/index99.js.map +1 -0
- package/package.json +1 -1
package/dist/index133.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { setStateObjValue as e } from "./index138.js";
|
|
2
|
+
//#region src/libs/shared/components/mobileVerification/validateMobileVerification.ts
|
|
3
|
+
var t = "strPleaseVerifyMobileNumber", n = (t, n, r = "") => {
|
|
4
|
+
e(t.fieldError, n, r), e(t.helperText, n, r);
|
|
5
|
+
};
|
|
6
|
+
function r(e, r = "mobileNumber") {
|
|
7
|
+
let i = e.fieldsName, a = e.submitJson?.[i.isVerificationRequired], o = e.submitJson?.[i.isVerified];
|
|
8
|
+
return !a || !e.isValidJson?.[r] ? !a : (n(e, r, o ? "" : t), o);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { r as validateMobileVerification };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=index133.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index133.js","names":[],"sources":["../src/libs/shared/components/mobileVerification/validateMobileVerification.ts"],"sourcesContent":["import type { FieldPayload } from \"libs/shared/types/sharedFormActionTypes\";\r\n\r\nimport { setStateObjValue } from \"utils/commonFunctions\";\r\nimport type { MobileVerificationDTOType } from \"./mobileVerificationDTO\";\r\n\r\nconst VERIFY_MESSAGE = \"strPleaseVerifyMobileNumber\";\r\n\r\nconst setMobileError = (dto: MobileVerificationDTOType, field: string, message = \"\") => {\r\n setStateObjValue(dto.fieldError, field, message);\r\n setStateObjValue(dto.helperText, field, message);\r\n};\r\n\r\nexport function validateMobileVerification(\r\n dto: MobileVerificationDTOType,\r\n mobileField = \"mobileNumber\",\r\n): boolean {\r\n const fields = dto.fieldsName;\r\n const isVerificationRequired =\r\n dto.submitJson?.[fields.isVerificationRequired];\r\n const isVerified = dto.submitJson?.[fields.isVerified];\r\n\r\n if (!isVerificationRequired || !dto.isValidJson?.[mobileField]) {\r\n return !isVerificationRequired;\r\n }\r\n setMobileError(dto, mobileField, isVerified ? \"\" : VERIFY_MESSAGE);\r\n return isVerified;\r\n}\r\n\r\nexport function handleOnChangeMobile(data: FieldPayload, dto: MobileVerificationDTOType) {\r\n const { key, valueOrCd } = data;\r\n const { mobileNumber, isVerified } = dto.fieldsName;\r\n\r\n if (key === mobileNumber && dto.submitJson?.[isVerified]) {\r\n setStateObjValue(dto.submitJson, isVerified, false)\r\n setMobileError(dto, key, VERIFY_MESSAGE);\r\n }\r\n\r\n if (key === isVerified && valueOrCd === true) {\r\n setMobileError(dto, mobileNumber);\r\n }\r\n}\r\n"],"mappings":";;AAKA,IAAM,IAAiB,+BAEjB,KAAkB,GAAgC,GAAe,IAAU,OAAO;CAEtF,AADA,EAAiB,EAAI,YAAY,GAAO,CAAO,GAC/C,EAAiB,EAAI,YAAY,GAAO,CAAO;AACjD;AAEA,SAAgB,EACd,GACA,IAAc,gBACL;CACT,IAAM,IAAS,EAAI,YACb,IACJ,EAAI,aAAa,EAAO,yBACpB,IAAa,EAAI,aAAa,EAAO;CAM3C,OAJI,CAAC,KAA0B,CAAC,EAAI,cAAc,KACzC,CAAC,KAEV,EAAe,GAAK,GAAa,IAAa,KAAK,CAAc,GAC1D;AACT"}
|
package/dist/index134.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/libs/core/constants/dtoNames.ts
|
|
2
|
+
var e = {
|
|
3
|
+
AGE_PANEL: "agePanel",
|
|
4
|
+
ADDRESS_MULTIPLE: "addressMultiple",
|
|
5
|
+
PRESENT_ADDRESS: "presentAddress",
|
|
6
|
+
PERMANANT_ADDRESS: "permanantAddress",
|
|
7
|
+
ADDRESS_HISTORY: "addressHistory",
|
|
8
|
+
PREVIOUS_ADDRESS: "previousAddress",
|
|
9
|
+
ADDRESS_LIST: "addressGrid",
|
|
10
|
+
SINGLE_ADDRESS: "singleAddress",
|
|
11
|
+
ORGANIZATION_INFO: "ORGANIZATION_INFO",
|
|
12
|
+
PERSONAL_DETAILS: "personalDetails",
|
|
13
|
+
MOBILE_PANEL: "mobilePanel",
|
|
14
|
+
FILE_UPLOAD: "fileUpload",
|
|
15
|
+
IDENTIFICATION_PANEL: "identificationPanel",
|
|
16
|
+
PHYSICAL_DESCRIPTION: "physicalDescription",
|
|
17
|
+
SEARCHDATERANGE: "SEARCHDATERANGE"
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { e as DTONames };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=index134.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index134.js","names":[],"sources":["../src/libs/core/constants/dtoNames.ts"],"sourcesContent":["/* please only include the dtoName which are common */\r\n\r\nexport const DTONames = {\r\n AGE_PANEL: \"agePanel\",\r\n ADDRESS_MULTIPLE: \"addressMultiple\",\r\n PRESENT_ADDRESS: \"presentAddress\",\r\n PERMANANT_ADDRESS: \"permanantAddress\",\r\n ADDRESS_HISTORY: \"addressHistory\",\r\n PREVIOUS_ADDRESS: \"previousAddress\",\r\n ADDRESS_LIST: \"addressGrid\",\r\n SINGLE_ADDRESS: \"singleAddress\",\r\n ORGANIZATION_INFO : \"ORGANIZATION_INFO\",\r\n PERSONAL_DETAILS: \"personalDetails\",\r\n MOBILE_PANEL: \"mobilePanel\",\r\n FILE_UPLOAD: \"fileUpload\",\r\n IDENTIFICATION_PANEL: \"identificationPanel\",\r\n PHYSICAL_DESCRIPTION: \"physicalDescription\",\r\n SEARCHDATERANGE: \"SEARCHDATERANGE\"\r\n} as const;\r\n"],"mappings":";AAEA,IAAa,IAAW;CACtB,WAAW;CACX,kBAAkB;CAClB,iBAAiB;CACjB,mBAAmB;CACnB,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,gBAAgB;CAChB,mBAAoB;CACpB,kBAAkB;CAClB,cAAc;CACd,aAAa;CACb,sBAAsB;CACtB,sBAAsB;CACtB,iBAAiB;AACnB"}
|
package/dist/index135.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FieldEnum as e, MenuTextColorEnum as t } from "./index124.js";
|
|
2
|
+
import { flattenValidity as n, setStateObjValue as r } from "./index131.js";
|
|
3
|
+
import { validateField as i } from "./index132.js";
|
|
4
|
+
import { validateMobileVerification as a } from "./index133.js";
|
|
5
|
+
import { DTONames as o } from "./index134.js";
|
|
6
|
+
//#region src/libs/core/utils/validateDto.ts
|
|
7
|
+
function s(c) {
|
|
8
|
+
if (!c) return !0;
|
|
9
|
+
let l = !0;
|
|
10
|
+
if (c.defaultsRules && c.submitJson && Object.keys(c.defaultsRules).forEach((t) => {
|
|
11
|
+
let a = c.defaultsRules[t], o = c.submitJson[t], s = c.submitJson[t], { isValid: u, error: d, count: f } = i(t, s, a, o);
|
|
12
|
+
r(c.isValidJson, t, u), r(c.fieldError, t, d || ""), a && r(c.helperText, t, a.type === e.TEXT ? f : ""), u || (l = !1);
|
|
13
|
+
let p = Object.values(c.isValidJson);
|
|
14
|
+
l = n(p);
|
|
15
|
+
}), c.menuTextColor = l ? t.GREEN : t.RED, c.dtoName === o.MOBILE_PANEL) {
|
|
16
|
+
let e = c;
|
|
17
|
+
a(e, e.fieldsName.mobileNumber) || (l = !1);
|
|
18
|
+
}
|
|
19
|
+
return c.fieldsName && Object.values(c.fieldsName).forEach((e) => {
|
|
20
|
+
e && typeof e == "object" && "defaultsRules" in e && (s(e) || (l = !1), r(c, "menuTextColor", l ? t.GREEN : t.RED));
|
|
21
|
+
}), l;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { s as default };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=index135.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index135.js","names":[],"sources":["../src/libs/core/utils/validateDto.ts"],"sourcesContent":["// libs/core/utils/validateDto.ts\r\nimport { FieldEnum, MenuTextColorEnum } from \"libs/shared/enums/common-enums\";\r\nimport { validateField } from \"./validateFields\";\r\nimport { validateMobileVerification } from \"../../shared/components/mobileVerification/validateMobileVerification\";\r\nimport { DTONames } from \"constants/dtoNames\";\r\nimport type { DTO } from \"libs/shared/types/common-types\";\r\nimport { flattenValidity, setStateObjValue } from \"./commonFunctions\";\r\nimport { type MobileVerificationDTOType } from \"components/mobileVerification/mobileVerificationDTO\";\r\nimport type { FieldValue } from \"libs/shared/types/sharedFormActionTypes\";\r\n\r\nexport default function validateDto(\r\n dto: DTO,\r\n): boolean {\r\n if (!dto) return true;\r\n let isValid = true;\r\n if (dto.defaultsRules && dto.submitJson) {\r\n Object.keys(dto.defaultsRules).forEach((key) => {\r\n const rules = dto.defaultsRules[key];\r\n const valueOrCd = dto.submitJson[key] as FieldValue;\r\n const value = dto.submitJson[key] as FieldValue;\r\n\r\n const { isValid: fieldValid, error, count } = validateField(\r\n key,\r\n value,\r\n rules,\r\n valueOrCd\r\n );\r\n setStateObjValue(dto.isValidJson, key, fieldValid);\r\n setStateObjValue(dto.fieldError, key, error || \"\");\r\n if(rules) {\r\n setStateObjValue(dto.helperText, key, rules.type === FieldEnum.TEXT ? count : \"\");\r\n }\r\n\r\n if (!fieldValid) {\r\n isValid = false;\r\n }\r\n\r\n const values = Object.values(dto.isValidJson);\r\n const isValidJsons = flattenValidity(values);\r\n\r\n isValid = isValidJsons; \r\n });\r\n }\r\n dto.menuTextColor = isValid ? MenuTextColorEnum.GREEN : MenuTextColorEnum.RED\r\n if (dto.dtoName === DTONames.MOBILE_PANEL) {\r\n const mobileDTO = dto as MobileVerificationDTOType\r\n const mobileValid = validateMobileVerification(\r\n mobileDTO,\r\n mobileDTO.fieldsName.mobileNumber,\r\n );\r\n\r\n if (!mobileValid) {\r\n isValid = false;\r\n }\r\n }\r\n \r\n if (dto.fieldsName) {\r\n Object.values(dto.fieldsName).forEach((nestedDto: string | DTO) => {\r\n if (\r\n nestedDto &&\r\n typeof nestedDto === \"object\" &&\r\n \"defaultsRules\" in nestedDto\r\n ) {\r\n const childValid = validateDto(\r\n nestedDto,\r\n );\r\n \r\n if (!childValid) {\r\n isValid = false;\r\n }\r\n setStateObjValue(dto, \"menuTextColor\", isValid ? MenuTextColorEnum.GREEN : MenuTextColorEnum.RED)\r\n }\r\n });\r\n }\r\n return isValid;\r\n}\r\n\r\nexport function hasDtoError(dto: DTO): boolean {\r\n if (!dto) return false;\r\n const currentHasError = Object.values(dto.fieldError || {}).some(Boolean);\r\n if (currentHasError) return true;\r\n return Object.values(dto.fieldsName || {}).some((field: DTO | string) =>\r\n field && typeof field === \"object\" && \"defaultsRules\" in field\r\n ? hasDtoError(field)\r\n : false,\r\n );\r\n}\r\n"],"mappings":";;;;;;AAUA,SAAwB,EACtB,GACS;CACT,IAAI,CAAC,GAAK,OAAO;CACjB,IAAI,IAAU;CA8Bd,IA7BI,EAAI,iBAAiB,EAAI,cAC3B,OAAO,KAAK,EAAI,aAAa,CAAC,CAAC,SAAS,MAAQ;EAC9C,IAAM,IAAQ,EAAI,cAAc,IAC1B,IAAY,EAAI,WAAW,IAC3B,IAAQ,EAAI,WAAW,IAEvB,EAAE,SAAS,GAAY,UAAO,aAAU,EAC5C,GACA,GACA,GACA,CACF;EAOA,AANA,EAAiB,EAAI,aAAa,GAAK,CAAU,GACjD,EAAiB,EAAI,YAAY,GAAK,KAAS,EAAE,GAC9C,KACD,EAAiB,EAAI,YAAY,GAAK,EAAM,SAAS,EAAU,OAAO,IAAQ,EAAE,GAG7E,MACH,IAAU;EAGZ,IAAM,IAAS,OAAO,OAAO,EAAI,WAAW;EAG5C,IAFqB,EAAgB,CAE3B;CACZ,CAAC,GAEH,EAAI,gBAAgB,IAAU,EAAkB,QAAQ,EAAkB,KACtE,EAAI,YAAY,EAAS,cAAc;EACzC,IAAM,IAAY;EAMlB,AALoB,EAClB,GACA,EAAU,WAAW,YAGlB,MACH,IAAU;CAEd;CAoBA,OAlBI,EAAI,cACN,OAAO,OAAO,EAAI,UAAU,CAAC,CAAC,SAAS,MAA4B;EACjE,AACE,KACA,OAAO,KAAc,YACrB,mBAAmB,MAEA,EACjB,CAGG,MACH,IAAU,KAEZ,EAAiB,GAAK,iBAAiB,IAAU,EAAkB,QAAQ,EAAkB,GAAG;CAEpG,CAAC,GAEI;AACT"}
|
package/dist/index136.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/libs/core/utils/loggers.ts
|
|
2
|
+
var e = {
|
|
3
|
+
info: "color: #25eb2f; font-weight: bold;",
|
|
4
|
+
warn: "color: #ffe817; font-weight: bold;",
|
|
5
|
+
error: "color: #dc2626; font-weight: bold;"
|
|
6
|
+
}, t = {
|
|
7
|
+
info(t, ...n) {
|
|
8
|
+
console.info(`%c[INFO] ${t}`, e.info, ...n);
|
|
9
|
+
},
|
|
10
|
+
warn(t, ...n) {
|
|
11
|
+
console.warn(`%c[WARN] ${t}`, e.warn, ...n);
|
|
12
|
+
},
|
|
13
|
+
error(t, ...n) {
|
|
14
|
+
console.error(`%c[ERROR] ${t}`, e.error, ...n);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { t as default };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=index136.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index136.js","names":[],"sources":["../src/libs/core/utils/loggers.ts"],"sourcesContent":["type LogParams = unknown[];\r\n\r\nconst isDev = true;\r\n\r\nconst styles = {\r\n info: \"color: #25eb2f; font-weight: bold;\", // green\r\n warn: \"color: #ffe817; font-weight: bold;\", // yellow\r\n error: \"color: #dc2626; font-weight: bold;\", // red\r\n};\r\n\r\nconst Logger = {\r\n info(message: string, ...optionalParams: LogParams): void {\r\n if (!isDev) return;\r\n\r\n console.info(`%c[INFO] ${message}`, styles.info, ...optionalParams);\r\n },\r\n\r\n warn(message: string, ...optionalParams: LogParams): void {\r\n if (!isDev) return;\r\n\r\n console.warn(`%c[WARN] ${message}`, styles.warn, ...optionalParams);\r\n },\r\n\r\n error(message: string, ...optionalParams: LogParams): void {\r\n console.error(`%c[ERROR] ${message}`, styles.error, ...optionalParams);\r\n },\r\n} as const;\r\n\r\nexport default Logger;\r\n"],"mappings":";AAIA,IAAM,IAAS;CACb,MAAM;CACN,MAAM;CACN,OAAO;AACT,GAEM,IAAS;CACb,KAAK,GAAiB,GAAG,GAAiC;EAGxD,QAAQ,KAAK,YAAY,KAAW,EAAO,MAAM,GAAG,CAAc;CACpE;CAEA,KAAK,GAAiB,GAAG,GAAiC;EAGxD,QAAQ,KAAK,YAAY,KAAW,EAAO,MAAM,GAAG,CAAc;CACpE;CAEA,MAAM,GAAiB,GAAG,GAAiC;EACzD,QAAQ,MAAM,aAAa,KAAW,EAAO,OAAO,GAAG,CAAc;CACvE;AACF"}
|
package/dist/index137.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./index131.js";
|
|
2
|
+
import "./index132.js";
|
|
3
|
+
import "./index135.js";
|
|
4
|
+
import "./index136.js";
|
|
5
|
+
import "@reduxjs/toolkit";
|
|
6
|
+
//#region src/libs/core/utils/sharedFormActions.ts
|
|
7
|
+
var e = {
|
|
8
|
+
VALIDATE_DTO: "validateDTO",
|
|
9
|
+
ON_CHANGE_FIELD: "onChangeField",
|
|
10
|
+
SET_LAST_STEP_COMPLETED: "setLastStepCompleted",
|
|
11
|
+
CLEAR_DTO: "CLEAR_DTO",
|
|
12
|
+
LOAD_NESTED_DTO: "LOAD_NESTED_DTO",
|
|
13
|
+
UPLOAD_FILE: "UPLOAD_FILE",
|
|
14
|
+
UPDATE_FILES: "UPDATE_FILES",
|
|
15
|
+
SET_VIEW_DATA: "SET_VIEW_DATA",
|
|
16
|
+
REMOVE_DATA: "removeData"
|
|
17
|
+
};
|
|
18
|
+
e.ON_CHANGE_FIELD, e.VALIDATE_DTO, e.CLEAR_DTO, e.SET_LAST_STEP_COMPLETED, e.LOAD_NESTED_DTO, e.SET_VIEW_DATA, e.REMOVE_DATA;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { e as sharedFormActionNames };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=index137.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index137.js","names":[],"sources":["../src/libs/core/utils/sharedFormActions.ts"],"sourcesContent":["import { current, type PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { getNestedValue, setStateObjValue } from \"../../../libs/core/utils/commonFunctions\";\r\nimport validateDto from \"./validateDto\";\r\nimport type { DTO, FieldObject } from \"libs/shared/types/common-types\";\r\nimport Logger from \"./loggers\";\r\nimport { validateField } from \"./validateFields\";\r\nimport type {\r\n ChangeFieldPayload,\r\n ValidatePayload,\r\n ClearDTOPayload,\r\n LoadNestedDTOPayloadExtended,\r\n SetViewDataPayload,\r\n RemoveDataPayload,\r\n} from \"libs/shared/types/sharedFormActionTypes\";\r\nimport type { RootState } from \"store/store\";\r\n\r\nexport const sharedFormActionNames = {\r\n VALIDATE_DTO: \"validateDTO\",\r\n ON_CHANGE_FIELD: \"onChangeField\",\r\n SET_LAST_STEP_COMPLETED: \"setLastStepCompleted\",\r\n CLEAR_DTO: \"CLEAR_DTO\",\r\n LOAD_NESTED_DTO: \"LOAD_NESTED_DTO\",\r\n UPLOAD_FILE: \"UPLOAD_FILE\",\r\n UPDATE_FILES: \"UPDATE_FILES\",\r\n SET_VIEW_DATA: \"SET_VIEW_DATA\",\r\n REMOVE_DATA: \"removeData\",\r\n} as const;\r\n\r\nconst sharedFormActions = {\r\n [sharedFormActionNames.ON_CHANGE_FIELD]: (state: RootState, action: PayloadAction<ChangeFieldPayload>) => {\r\n const { key, valueOrCd, value, parentSliceName } = action.payload;\r\n const fieldValue = value ?? valueOrCd;\r\n const dto = getNestedValue(state, parentSliceName) as DTO;\r\n\r\n if (!dto) return;\r\n const rules = dto.defaultsRules?.[key];\r\n\r\n const fieldState = validateField(key, value, rules, valueOrCd);\r\n\r\n setStateObjValue(dto.submitJson, key, valueOrCd);\r\n setStateObjValue(dto.displayJson, key, fieldValue);\r\n setStateObjValue(dto.isValidJson, key, fieldState.isValid);\r\n setStateObjValue(dto.fieldError, key, fieldState.error);\r\n setStateObjValue(dto.helperText, key, fieldState.count);\r\n\r\n if (action.payload?.callback) {\r\n action.payload.callback(action.payload, dto);\r\n }\r\n\r\n Logger.info(\"[sharedFormActionNames.ON_CHANGE_FIELD] ----- \", current(dto));\r\n },\r\n [sharedFormActionNames.VALIDATE_DTO]: (state: RootState, action: PayloadAction<ValidatePayload>) => {\r\n const { parentSliceName } = action.payload;\r\n const dto: DTO = getNestedValue(state, parentSliceName);\r\n if (!dto) return;\r\n validateDto(dto);\r\n Logger.info(\"[sharedFormActionNames.VALIDATE_DTO] ----- \", current(dto));\r\n },\r\n [sharedFormActionNames.CLEAR_DTO]: (state: RootState, action: PayloadAction<ClearDTOPayload>) => {\r\n // --- for clearing the internal dto\r\n const { key, value, parentSliceName } = action.payload;\r\n const dto = getNestedValue(state, parentSliceName) as DTO;\r\n setStateObjValue(dto.fieldsName, key, value);\r\n Logger.info(\"[sharedFormActionNames.CLEAR_DTO] ----- \", current(dto));\r\n },\r\n [sharedFormActionNames.SET_LAST_STEP_COMPLETED]: (state: RootState, action: PayloadAction<boolean>) => {\r\n state.lastStepCompleted = action.payload;\r\n Logger.info(\"[sharedFormActionNames.SET_LAST_STEP_COMPLETED] ----- \", state);\r\n },\r\n [sharedFormActionNames.LOAD_NESTED_DTO]: (state: RootState, action: PayloadAction<LoadNestedDTOPayloadExtended>) => {\r\n /**\r\n * useFull when need to share the data from parent dto to subDto's submitJson and displayJson\r\n */\r\n const { dtoKey, value, valueOrCd, parentSliceName } = action.payload;\r\n const rootDto = getNestedValue(state, parentSliceName) as DTO;\r\n\r\n if (!Object.hasOwn(rootDto.fieldsName, dtoKey)) return; // checking for dynamic dto\r\n\r\n const subDtoState = rootDto.fieldsName[dtoKey] as DTO;\r\n\r\n setStateObjValue(subDtoState, \"displayJson\", value as FieldObject);\r\n setStateObjValue(subDtoState, \"submitJson\", valueOrCd as FieldObject);\r\n\r\n if (action.payload?.callback) {\r\n action.payload.callback(action.payload, rootDto);\r\n }\r\n\r\n Logger.info(\"[sharedFormActionNames.LOAD_NESTED_DTO] ----- \", current(rootDto));\r\n },\r\n [sharedFormActionNames.SET_VIEW_DATA]: (state: FieldObject, action: PayloadAction<SetViewDataPayload>) => {\r\n const { dto, fieldsName, path } = action.payload;\r\n\r\n if (fieldsName) {\r\n const rootDto = path ? (getNestedValue(state, path) as DTO) : state;\r\n setStateObjValue((rootDto as DTO).fieldsName, fieldsName, dto);\r\n if (action.payload.callback) {\r\n action.payload.callback(action.payload, rootDto as DTO);\r\n }\r\n Logger.info(\"[sharedFormActionNames.SET_VIEW_DATA] ----- \", current(rootDto));\r\n } else {\r\n if (action.payload?.callback) {\r\n action.payload.callback(action.payload, dto);\r\n }\r\n Logger.info(\"[sharedFormActionNames.SET_VIEW_DATA] ----- \", dto);\r\n return dto;\r\n }\r\n },\r\n [sharedFormActionNames.REMOVE_DATA]: (state: RootState, action: PayloadAction<RemoveDataPayload>) => { // --- needs rework\r\n const { key, path } = action.payload;\r\n\r\n const rootDto = getNestedValue(state, path) as DTO;\r\n Logger.info(\"[sharedFormActionNames.REMOVE_DATA] before ----- \", current(rootDto));\r\n\r\n const updatedFields = { ...rootDto.fieldsName };\r\n delete updatedFields[key];\r\n\r\n setStateObjValue(rootDto, \"fieldsName\", updatedFields);\r\n\r\n if (action.payload?.callback) {\r\n action.payload.callback(action.payload, rootDto);\r\n }\r\n\r\n Logger.info(\"[sharedFormActionNames.REMOVE_DATA] ----- \", current(rootDto));\r\n }\r\n};\r\nexport default sharedFormActions;\r\n"],"mappings":";;;;;;AAgBA,IAAa,IAAwB;CACnC,cAAc;CACd,iBAAiB;CACjB,yBAAyB;CACzB,WAAW;CACX,iBAAiB;CACjB,aAAa;CACb,cAAc;CACd,eAAe;CACf,aAAa;AACf;AAGG,EAAsB,iBAsBtB,EAAsB,cAOtB,EAAsB,WAOtB,EAAsB,yBAItB,EAAsB,iBAoBtB,EAAsB,eAkBtB,EAAsB"}
|
package/dist/index138.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import e from "./index129.js";
|
|
2
|
+
import "./index130.js";
|
|
3
|
+
import "./index137.js";
|
|
4
|
+
//#region src/libs/core/utils/commonFunctions.ts
|
|
5
|
+
function t(e, t, n) {
|
|
6
|
+
e[t] = n;
|
|
7
|
+
}
|
|
8
|
+
var n = (e) => e.toLocaleString(), r = () => e.resolvedLanguage || e.language || "en";
|
|
9
|
+
//#endregion
|
|
10
|
+
export { r as getTranslation, t as setStateObjValue, n as toLocaleString };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=index138.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index138.js","names":[],"sources":["../src/libs/core/utils/commonFunctions.ts"],"sourcesContent":["import { CommonAddressFields } from \"constants/commonConstants\";\r\nimport { MenuTextColorEnum } from \"libs/shared/enums/common-enums\";\r\nimport type { CommonAddressFieldsTypesDisplay, DTO, FieldObject, GridRowData, MasterResponseDataType } from \"../../shared/types/common-types\";\r\nimport { sharedFormActionNames } from \"./sharedFormActions\";\r\nimport i18n from \"internationalisation/i18n\";\r\nimport { MASTER_DATA_KEYS } from \"constants/masterCodes\";\r\nimport type { StepConfig } from \"ui/stepper/types/stepperTypes\";\r\nimport { customDateObject } from \"./dateUtilities\";\r\n\r\nexport function setStateObjValue<T extends FieldObject | DTO, K extends keyof T>(\r\n state: T,\r\n key: K,\r\n value: T[K]\r\n): void {\r\n state[key] = value;\r\n}\r\n\r\nexport function constructParentSliceName(sliceName: string, parentSliceName: string = \"\"): string {\r\n return parentSliceName ? `${parentSliceName}.${sliceName}` : sliceName;\r\n}\r\n\r\nexport function getNestedValue<T>(obj: Record<string, unknown> | DTO, path: string) {\r\n const keys = path.split(\".\");\r\n\r\n const returnState = keys.reduce((acc: Record<string, unknown> | DTO, key: string) => {\r\n if (key in acc) {\r\n return (acc as Record<string, DTO>)[key] as DTO;\r\n } else if (key in (acc as DTO).fieldsName) {\r\n return (acc as DTO).fieldsName[key] as DTO;\r\n } else return acc;\r\n }, obj);\r\n\r\n return returnState as T;\r\n}\r\n\r\nexport function getBaseDTO(...intialArgsArr: unknown[]): DTO {\r\n return {\r\n submitJson: {},\r\n displayJson: {},\r\n isValidJson: {},\r\n fieldError: {},\r\n helperText: {},\r\n dtoName: \"\",\r\n defaultsRules: {},\r\n fieldsName: {},\r\n initialArgs: intialArgsArr ?? [],\r\n menuTextColor: MenuTextColorEnum.INHERIT\r\n };\r\n}\r\n\r\nexport const toLocaleString = (value: string | number) => {\r\n return value.toLocaleString();\r\n}\r\n\r\nexport const getSelectInputFieldName = (name: string): string => {\r\n return name.split(\"-\")?.[0] ?? \"\"\r\n}\r\n\r\n/**\r\n * Create concat address using display data.\r\n *\r\n * @param {GridRowData} addressDisplay - Address Display Data\r\n * @returns {string} Concanated Address\r\n */\r\nexport const getConcatAddress = (addressDisplay: CommonAddressFieldsTypesDisplay) => {\r\n const fields = CommonAddressFields;\r\n const order = [fields.houseNo, fields.streetName, fields.colony, fields.village, fields.subDistrict, fields.district, fields.state, fields.pincode, fields.country, fields.other];\r\n const concatAddress = order.map((key) => addressDisplay[key]).join(\" \");\r\n return concatAddress.trim();\r\n};\r\n\r\nexport const getOnChangeActionType = (rootSliceName: string) => {\r\n return `${rootSliceName}/${sharedFormActionNames.ON_CHANGE_FIELD}`\r\n}\r\n\r\n/**\r\n * useful to get the value key from the cd key\r\n * @param codeKey \r\n * @param suffix \r\n * @returns value key\r\n */\r\nexport const getValueKey = <T extends string, S extends string = \"Cd\">(codeKey: T, suffix: S = \"Cd\" as S) => {\r\n return codeKey.slice(0, -suffix.length);\r\n};\r\n\r\nexport const filterRecordById = <T extends GridRowData>(row: T, key: string = \"id\") => (obj: T) => obj?.[key] !== row?.[key];\r\n\r\nexport function concatenateFullName<T extends {\r\n firstName?: string | null;\r\n middleName?: string | null;\r\n lastName?: string | null;\r\n}>(data: T): string {\r\n const { firstName, middleName, lastName } = data;\r\n let fullName = \"\";\r\n\r\n for (const name of [firstName, middleName, lastName]) {\r\n const trimmed = name?.trim();\r\n if (trimmed) {\r\n fullName += fullName ? ` ${trimmed}` : trimmed;\r\n }\r\n }\r\n\r\n return fullName;\r\n}\r\n\r\nexport const getTranslation = () => {\r\n return i18n.resolvedLanguage || i18n.language || 'en'\r\n}\r\n\r\nexport const fieldsManager = (dto: DTO, fields: string[]) => {\r\n const { fieldError, isValidJson, helperText, submitJson, displayJson } = dto;\r\n\r\n fields.forEach((field) => {\r\n setStateObjValue(fieldError, field, \"\");\r\n setStateObjValue(isValidJson, field, true);\r\n setStateObjValue(helperText, field, \"\");\r\n delete submitJson[field];\r\n delete displayJson[field];\r\n });\r\n};\r\n\r\n\r\nexport const generateLookupArray = (length: number): MasterResponseDataType[] => {\r\n return Array.from({ length }, (_, i) => ({\r\n [MASTER_DATA_KEYS.CODE]: i + 1,\r\n [MASTER_DATA_KEYS.VALUE]: `${i + 1}`,\r\n id: i + 1,\r\n selectoptiontitle: `${i + 1}`,\r\n }));\r\n}\r\n\r\nexport function reIndex<T extends { id: number }>(list: T[]) {\r\n return list.map((item, index) => ({ ...item, id: index + 1 }));\r\n}\r\n\r\nexport function injectIntoStepCallback(prev: StepConfig[], dtoName: string, newStep: StepConfig, position: \"start\" | \"end\" | number = \"end\", isSection: boolean = false) {\r\n const getUpdatedMenuList = (steps: StepConfig[], newStep: StepConfig): StepConfig[] => {\r\n let updatedMenuList: StepConfig[];\r\n\r\n if (position === \"start\") {\r\n updatedMenuList = [newStep, ...steps];\r\n } else if (position === \"end\") {\r\n updatedMenuList = [...steps, newStep];\r\n } else {\r\n const targetIndex = Math.max(0, Math.min(position, steps.length));\r\n\r\n updatedMenuList = [...steps];\r\n updatedMenuList.splice(targetIndex, 0, newStep);\r\n }\r\n\r\n return reIndex(updatedMenuList);\r\n };\r\n if (isSection) {\r\n return prev.map((step: StepConfig) => {\r\n if (step.dtoName === dtoName) {\r\n return getUpdatedMenuList(step.sections ?? [], newStep);\r\n }\r\n return step;\r\n }) as StepConfig[];\r\n }\r\n\r\n return getUpdatedMenuList(prev, newStep);\r\n\r\n}\r\n\r\nexport function removeFromStepsCallback(prev: StepConfig[], dtoName: string, isSection: boolean = false) {\r\n const filterList = (steps: StepConfig[]) => {\r\n return reIndex(steps.filter((step: StepConfig) => step.dtoName !== dtoName));\r\n };\r\n\r\n if (isSection) {\r\n return prev.map((step: StepConfig) => {\r\n if (step.dtoName === dtoName) {\r\n return filterList(step.sections ?? []);\r\n }\r\n\r\n return step;\r\n }) as StepConfig[];\r\n }\r\n\r\n return filterList(prev);\r\n}\r\nexport const getModuleNumber = (loginId: string | number) => {\r\n const timestamp = customDateObject.format('YYYYMMDDHHmmss');\r\n const randomSuffix = Math.floor(Math.random() * 100); // 2 random digits\r\n return `${loginId}${timestamp}${randomSuffix}`;\r\n}\r\n\r\n\r\n\r\n//Works for booleans, arrays, and nested objects\r\nexport const flattenValidity = (value: unknown): boolean => {\r\n if (typeof value === \"boolean\") {\r\n return value; // base case\r\n }\r\n if (Array.isArray(value)) {\r\n return value.every(flattenValidity); // check each element recursively\r\n }\r\n if (typeof value === \"object\" && value !== null) {\r\n return Object.values(value).every(flattenValidity); // check each field recursively\r\n }\r\n return false; // if unexpected type (string, number etc.)\r\n};"],"mappings":";;;;AASA,SAAgB,EACd,GACA,GACA,GACM;CACN,EAAM,KAAO;AACf;AAmCA,IAAa,KAAkB,MACtB,EAAM,eAAe,GAsDjB,UACJ,EAAK,oBAAoB,EAAK,YAAY"}
|
package/dist/index139.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import e from "./index108.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { Tooltip as r, tooltipClasses as i } from "@mui/material";
|
|
5
|
+
import { useTranslation as a } from "react-i18next";
|
|
6
|
+
//#region src/libs/shared/UI/toolTips/CustomizedTooltip.tsx
|
|
7
|
+
var o = e(({ className: e, ...t }) => /* @__PURE__ */ n(r, {
|
|
8
|
+
...t,
|
|
9
|
+
arrow: !0,
|
|
10
|
+
classes: { popper: e }
|
|
11
|
+
}))(({ theme: e }) => ({
|
|
12
|
+
[`& .${i.arrow}`]: { color: e.palette.common.black },
|
|
13
|
+
[`& .${i.tooltip}`]: { backgroundColor: e.palette.common.black }
|
|
14
|
+
})), s = t.memo(({ title: e, children: t, placement: r = "top" }) => {
|
|
15
|
+
let { t: i } = a();
|
|
16
|
+
return /* @__PURE__ */ n(o, {
|
|
17
|
+
title: i(e),
|
|
18
|
+
placement: r,
|
|
19
|
+
sx: { zIndex: "2000" },
|
|
20
|
+
children: t
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { s as default };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=index139.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index139.js","names":[],"sources":["../src/libs/shared/UI/toolTips/CustomizedTooltip.tsx"],"sourcesContent":["import { Tooltip, tooltipClasses, type TooltipProps } from '@mui/material';\r\nimport { styled } from '@mui/material/styles'; \r\nimport React from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\ntype FormTooltipProps = {\r\n title: string;\r\n children? : React.ReactNode;\r\n placement?: TooltipProps['placement'];\r\n} & TooltipProps\r\n\r\nconst BootstrapTooltip = styled(({ className, ...props }: TooltipProps) => (\r\n <Tooltip {...props} arrow classes={{ popper: className }} />\r\n))(({ theme }) => ({\r\n [`& .${tooltipClasses.arrow}`]: {\r\n color: theme.palette.common.black,\r\n },\r\n [`& .${tooltipClasses.tooltip}`]: {\r\n backgroundColor: theme.palette.common.black,\r\n },\r\n}));\r\n\r\nconst CustomizedTooltip = ({title, children, placement = 'top'}: Readonly<FormTooltipProps> ) => {\r\n const { t } = useTranslation();\r\n \r\n return (\r\n <BootstrapTooltip title={t(title)} placement={placement} sx={{zIndex:'2000'}}>\r\n {children}\r\n </BootstrapTooltip>\r\n );\r\n}\r\n\r\nexport default React.memo(CustomizedTooltip)"],"mappings":";;;;;;AAWA,IAAM,IAAmB,GAAQ,EAAE,cAAW,GAAG,QAC/C,kBAAC,GAAD;CAAS,GAAI;CAAO,OAAA;CAAM,SAAS,EAAE,QAAQ,EAAU;AAAI,CAAA,CAC5D,CAAC,EAAE,EAAE,gBAAa;EAChB,MAAM,EAAe,UAAU,EAC9B,OAAO,EAAM,QAAQ,OAAO,MAC9B;EACC,MAAM,EAAe,YAAY,EAChC,iBAAiB,EAAM,QAAQ,OAAO,MACxC;AACF,EAAE,GAYF,IAAe,EAAM,MAVM,EAAC,UAAO,aAAU,eAAY,YAAwC;CAC/F,IAAM,EAAE,SAAM,EAAe;CAE7B,OACI,kBAAC,GAAD;EAAkB,OAAO,EAAE,CAAK;EAAc;EAAW,IAAI,EAAC,QAAO,OAAM;EACxE;CACe,CAAA;AAExB,CAE2C"}
|
package/dist/index14.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region node_modules/@mui/utils/composeClasses/composeClasses.mjs
|
|
2
|
+
function e(e, t, n = void 0) {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (let i in e) {
|
|
5
|
+
let a = e[i], o = "", s = !0;
|
|
6
|
+
for (let e = 0; e < a.length; e += 1) {
|
|
7
|
+
let r = a[e];
|
|
8
|
+
r && (o += (s === !0 ? "" : " ") + t(r), s = !1, n && n[r] && (o += " " + n[r]));
|
|
9
|
+
}
|
|
10
|
+
r[i] = o;
|
|
11
|
+
}
|
|
12
|
+
return r;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { e as default };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=index14.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index14.js","names":[],"sources":["../node_modules/@mui/utils/composeClasses/composeClasses.mjs"],"sourcesContent":["/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0\n ---\n These rules are preventing the performance optimizations below.\n */\n\n/**\n * Compose classes from multiple sources.\n *\n * @example\n * ```tsx\n * const slots = {\n * root: ['root', 'primary'],\n * label: ['label'],\n * };\n *\n * const getUtilityClass = (slot) => `MuiButton-${slot}`;\n *\n * const classes = {\n * root: 'my-root-class',\n * };\n *\n * const output = composeClasses(slots, getUtilityClass, classes);\n * // {\n * // root: 'MuiButton-root MuiButton-primary my-root-class',\n * // label: 'MuiButton-label',\n * // }\n * ```\n *\n * @param slots a list of classes for each possible slot\n * @param getUtilityClass a function to resolve the class based on the slot name\n * @param classes the input classes from props\n * @returns the resolved classes for all slots\n */\nexport default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n for (const slotName in slots) {\n const slot = slots[slotName];\n let buffer = '';\n let start = true;\n for (let i = 0; i < slot.length; i += 1) {\n const value = slot[i];\n if (value) {\n buffer += (start === true ? '' : ' ') + getUtilityClass(value);\n start = false;\n if (classes && classes[value]) {\n buffer += ' ' + classes[value];\n }\n }\n }\n output[slotName] = buffer;\n }\n return output;\n}"],"x_google_ignoreList":[0],"mappings":";AAiCA,SAAwB,EAAe,GAAO,GAAiB,IAAU,KAAA,GAAW;CAClF,IAAM,IAAS,CAAC;CAChB,KAAK,IAAM,KAAY,GAAO;EAC5B,IAAM,IAAO,EAAM,IACf,IAAS,IACT,IAAQ;EACZ,KAAK,IAAI,IAAI,GAAG,IAAI,EAAK,QAAQ,KAAK,GAAG;GACvC,IAAM,IAAQ,EAAK;GACnB,AAAI,MACF,MAAW,MAAU,KAAO,KAAK,OAAO,EAAgB,CAAK,GAC7D,IAAQ,IACJ,KAAW,EAAQ,OACrB,KAAU,MAAM,EAAQ;EAG9B;EACA,EAAO,KAAY;CACrB;CACA,OAAO;AACT"}
|
package/dist/index140.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import e from "./index105.js";
|
|
2
|
+
import { useAppThemeContext as t } from "./index118.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import { Link as o, Typography as s } from "@mui/material";
|
|
6
|
+
import { useTranslation as c } from "react-i18next";
|
|
7
|
+
var l = n.memo(({ text: l, size: u, color: d, sx: f, isRequired: p = !1, variantType: m = "default", onClick: h, target: g = "_self", ..._ }) => {
|
|
8
|
+
let { t: v } = c(), { fontSize: y } = t(), b = e(), x = {
|
|
9
|
+
color: n.useMemo(() => {
|
|
10
|
+
if (d) return d;
|
|
11
|
+
switch (m) {
|
|
12
|
+
case "primary": return b.palette.primary.main;
|
|
13
|
+
case "secondary": return b.palette.text.secondary;
|
|
14
|
+
case "error": return b.palette.error.main;
|
|
15
|
+
case "link": return b.palette.primary.main;
|
|
16
|
+
default: return b.palette.text.primary;
|
|
17
|
+
}
|
|
18
|
+
}, [
|
|
19
|
+
d,
|
|
20
|
+
m,
|
|
21
|
+
b
|
|
22
|
+
]),
|
|
23
|
+
fontSize: u || y,
|
|
24
|
+
...f
|
|
25
|
+
}, S = /* @__PURE__ */ a(r, { children: [typeof l == "string" ? v(l) : l, p && /* @__PURE__ */ i(s, {
|
|
26
|
+
component: "span",
|
|
27
|
+
sx: {
|
|
28
|
+
color: b.palette.error.main,
|
|
29
|
+
fontSize: u || y,
|
|
30
|
+
ml: .25
|
|
31
|
+
},
|
|
32
|
+
children: "*"
|
|
33
|
+
})] });
|
|
34
|
+
return m === "link" ? /* @__PURE__ */ i(o, {
|
|
35
|
+
target: g,
|
|
36
|
+
underline: "always",
|
|
37
|
+
onClick: h,
|
|
38
|
+
sx: {
|
|
39
|
+
...x,
|
|
40
|
+
cursor: "pointer",
|
|
41
|
+
fontWeight: 500,
|
|
42
|
+
color: b.palette.text.primary,
|
|
43
|
+
"&:hover": { opacity: .8 }
|
|
44
|
+
},
|
|
45
|
+
children: S
|
|
46
|
+
}) : /* @__PURE__ */ i(s, {
|
|
47
|
+
..._,
|
|
48
|
+
sx: x,
|
|
49
|
+
onClick: h,
|
|
50
|
+
children: S
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
export { l as default };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=index140.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index140.js","names":[],"sources":["../src/libs/shared/UI/typography/Typography2.tsx"],"sourcesContent":["import React from \"react\";\r\nimport {\r\n Typography,\r\n Link\r\n} from \"@mui/material\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { useAppThemeContext } from \"../../../core/context/AppThemeContext\";\r\nimport { useTheme } from \"@mui/material/styles\";\r\nimport type { TypographyProps } from \"libs/shared/types/common-types\";\r\n\r\n\r\nconst Typography2: React.FC<TypographyProps> = ({\r\n text,\r\n size: propFontSize,\r\n color,\r\n sx,\r\n isRequired = false,\r\n variantType = \"default\",\r\n onClick,\r\n target = \"_self\",\r\n ...props\r\n}) => {\r\n const { t } = useTranslation();\r\n const { fontSize } = useAppThemeContext();\r\n const theme = useTheme();\r\n\r\n const resolvedColor = React.useMemo(() => {\r\n if (color) return color;\r\n\r\n switch (variantType) {\r\n case \"primary\":\r\n return theme.palette.primary.main;\r\n\r\n case \"secondary\":\r\n return theme.palette.text.secondary;\r\n\r\n case \"error\":\r\n return theme.palette.error.main;\r\n\r\n case \"link\":\r\n return theme.palette.primary.main;\r\n\r\n default:\r\n return theme.palette.text.primary;\r\n }\r\n }, [color, variantType, theme]);\r\n\r\n const commonStyle = {\r\n color: resolvedColor,\r\n fontSize: propFontSize || fontSize,\r\n ...sx,\r\n };\r\n\r\n const content = (\r\n <>\r\n {typeof text === \"string\" ? t(text) : text}\r\n {isRequired && (\r\n <Typography\r\n component=\"span\"\r\n sx={{\r\n color: theme.palette.error.main,\r\n fontSize: propFontSize || fontSize,\r\n ml: 0.25,\r\n }}\r\n >\r\n *\r\n </Typography>\r\n )}\r\n </>\r\n );\r\n\r\n if (variantType === \"link\") {\r\n return (\r\n <Link\r\n target={target}\r\n underline=\"always\"\r\n onClick={onClick}\r\n sx={{\r\n ...commonStyle,\r\n cursor: \"pointer\",\r\n fontWeight: 500,\r\n color : theme.palette.text.primary,\r\n \"&:hover\": {\r\n opacity: 0.8,\r\n },\r\n }}\r\n >\r\n {content}\r\n </Link>\r\n );\r\n }\r\n\r\n return (\r\n <Typography\r\n {...props}\r\n sx={commonStyle}\r\n onClick={onClick}\r\n >\r\n {content}\r\n </Typography>\r\n );\r\n};\r\n\r\nexport default React.memo(Typography2);"],"mappings":";;;;;;AAuGA,IAAA,IAAe,EAAM,MA5F2B,EAC9C,SACA,MAAM,GACN,UACA,OACA,gBAAa,IACb,iBAAc,WACd,YACA,YAAS,SACT,GAAG,QACC;CACJ,IAAM,EAAE,SAAM,EAAe,GACvB,EAAE,gBAAa,EAAmB,GAClC,IAAQ,EAAS,GAuBjB,IAAc;EAClB,OAtBoB,EAAM,cAAc;GACxC,IAAI,GAAO,OAAO;GAElB,QAAQ,GAAR;IACE,KAAK,WACH,OAAO,EAAM,QAAQ,QAAQ;IAE/B,KAAK,aACH,OAAO,EAAM,QAAQ,KAAK;IAE5B,KAAK,SACH,OAAO,EAAM,QAAQ,MAAM;IAE7B,KAAK,QACH,OAAO,EAAM,QAAQ,QAAQ;IAE/B,SACE,OAAO,EAAM,QAAQ,KAAK;GAC9B;EACF,GAAG;GAAC;GAAO;GAAa;EAAK,CAGpB;EACP,UAAU,KAAgB;EAC1B,GAAG;CACL,GAEM,IACJ,kBAAA,GAAA,EAAA,UAAA,CACG,OAAO,KAAS,WAAW,EAAE,CAAI,IAAI,GACrC,KACC,kBAAC,GAAD;EACE,WAAU;EACV,IAAI;GACF,OAAO,EAAM,QAAQ,MAAM;GAC3B,UAAU,KAAgB;GAC1B,IAAI;EACN;EACD,UAAA;CAEW,CAAA,CAEd,EAAA,CAAA;CAwBJ,OArBI,MAAgB,SAEhB,kBAAC,GAAD;EACU;EACR,WAAU;EACD;EACT,IAAI;GACF,GAAG;GACH,QAAQ;GACR,YAAY;GACZ,OAAQ,EAAM,QAAQ,KAAK;GAC3B,WAAW,EACT,SAAS,GACX;EACF;EAEC,UAAA;CACG,CAAA,IAKR,kBAAC,GAAD;EACE,GAAI;EACJ,IAAI;EACK;EAER,UAAA;CACS,CAAA;AAEhB,CAEqC"}
|
package/dist/index141.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import e from "./index119.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { useSelector as a } from "react-redux";
|
|
5
|
+
var o = t.memo(({ label: t = "", value: o = "", children: s }) => {
|
|
6
|
+
let { isPreview: c } = a((e) => e.appData);
|
|
7
|
+
return c ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(e, { text: t }), /* @__PURE__ */ r(e, { text: o || "-" })] }) : s;
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { o as default };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=index141.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index141.js","names":[],"sources":["../src/libs/shared/UI/previewText/PreviewText.tsx"],"sourcesContent":["import React from \"react\"\r\nimport { useSelector } from \"react-redux\"\r\nimport type { RootState } from \"store/store\"\r\nimport Typography2 from \"ui/typography/Typography2\";\r\nimport type { PreviewTextProps } from \"./PreviewText.type\";\r\n\r\nconst PreviewText = ({ label = \"\", value = \"\", children }: PreviewTextProps) => {\r\n const { isPreview } = useSelector((state: RootState) => state.appData);\r\n\r\n if (isPreview) {\r\n return <>\r\n <Typography2 text={label} />\r\n <Typography2 text={value || \"-\"} />\r\n </>\r\n }\r\n\r\n return children\r\n}\r\n\r\nexport default React.memo(PreviewText)"],"mappings":";;;;AAmBA,IAAA,IAAe,EAAM,MAbA,EAAE,WAAQ,IAAI,WAAQ,IAAI,kBAAiC;CAC5E,IAAM,EAAE,iBAAc,GAAa,MAAqB,EAAM,OAAO;CASrE,OAPI,IACO,kBAAA,GAAA,EAAA,UAAA,CACH,kBAAC,GAAD,EAAa,MAAM,EAAQ,CAAA,GAC3B,kBAAC,GAAD,EAAa,MAAM,KAAS,IAAM,CAAA,CACpC,EAAA,CAAA,IAGC;AACX,CAEqC"}
|
package/dist/index142.js
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import e from "./index62.js";
|
|
2
|
+
import t from "./index122.js";
|
|
3
|
+
import { useAppThemeContext as n } from "./index123.js";
|
|
4
|
+
import { toLocaleString as r } from "./index138.js";
|
|
5
|
+
import i from "./index139.js";
|
|
6
|
+
import a from "./index140.js";
|
|
7
|
+
import o from "./index141.js";
|
|
8
|
+
import s, { useMemo as c } from "react";
|
|
9
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
+
import { Box as d, Grid as f, IconButton as p, InputAdornment as m, Stack as h, TextField as g, Tooltip as _ } from "@mui/material";
|
|
11
|
+
import { useTranslation as v } from "react-i18next";
|
|
12
|
+
var y = s.memo(({ label: s, validation: y, size: b = "small", mt: x = 0, value: S = "", width: C, disabled: w = !1, autosx: T, slotProps: E, helperText: D, error: O, onChange: k, sx: A, endIcon: j, startIcon: M, tooltip: N, unitLabel: P, prefixWidth: F = 110, ...I }) => {
|
|
13
|
+
let { t: L } = v(), { fontSize: R } = n(), z = e(), B = c(() => String(S ?? "").length, [S]), V = y?.maxLength || y?.length || 100, H = s ? L("strPlaceholder", { field: L(s) }) : "", U = (e) => {
|
|
14
|
+
let t = e.target.value.replace(/^\s+/, "");
|
|
15
|
+
if (y?.isNotAllowdCharacters && y?.notAllowedString) {
|
|
16
|
+
let e = new RegExp(y.notAllowedString, "gu");
|
|
17
|
+
if (t = t.replace(e, ""), y.extraRegex) {
|
|
18
|
+
let e = new RegExp(y.extraRegex, "gu");
|
|
19
|
+
t = t.replace(e, "$1");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
k && (e.target.value = t, k(e));
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ l(o, {
|
|
25
|
+
label: s,
|
|
26
|
+
value: S,
|
|
27
|
+
children: /* @__PURE__ */ u(h, {
|
|
28
|
+
sx: {
|
|
29
|
+
mt: x,
|
|
30
|
+
width: C || void 0,
|
|
31
|
+
"& > :not(style) ~ :not(style)": { marginTop: 0 }
|
|
32
|
+
},
|
|
33
|
+
children: [
|
|
34
|
+
s && /* @__PURE__ */ l(a, {
|
|
35
|
+
text: s,
|
|
36
|
+
fontWeight: 400,
|
|
37
|
+
isRequired: !w && y?.required,
|
|
38
|
+
sx: {
|
|
39
|
+
color: z.palette.text.primary,
|
|
40
|
+
fontSize: R,
|
|
41
|
+
mb: .5
|
|
42
|
+
}
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ l(_, {
|
|
45
|
+
title: N ? L(N) : "",
|
|
46
|
+
disableInteractive: !N,
|
|
47
|
+
children: /* @__PURE__ */ l(g, {
|
|
48
|
+
...I,
|
|
49
|
+
value: S,
|
|
50
|
+
onChange: U,
|
|
51
|
+
placeholder: w ? "" : H,
|
|
52
|
+
fullWidth: !0,
|
|
53
|
+
size: b,
|
|
54
|
+
disabled: w,
|
|
55
|
+
variant: "outlined",
|
|
56
|
+
error: O,
|
|
57
|
+
slotProps: {
|
|
58
|
+
...E,
|
|
59
|
+
htmlInput: {
|
|
60
|
+
...E?.htmlInput,
|
|
61
|
+
maxLength: V > 0 ? V : void 0,
|
|
62
|
+
style: { height: "1.44rem" }
|
|
63
|
+
},
|
|
64
|
+
input: {
|
|
65
|
+
...E?.input,
|
|
66
|
+
sx: {
|
|
67
|
+
backgroundColor: w ? z.palette.datagrid.heading : "#fff",
|
|
68
|
+
...P && { paddingLeft: 0 }
|
|
69
|
+
},
|
|
70
|
+
startAdornment: P ? /* @__PURE__ */ l(m, {
|
|
71
|
+
position: "start",
|
|
72
|
+
sx: {
|
|
73
|
+
marginRight: 0,
|
|
74
|
+
alignSelf: "stretch",
|
|
75
|
+
maxHeight: "none"
|
|
76
|
+
},
|
|
77
|
+
children: /* @__PURE__ */ l(d, {
|
|
78
|
+
sx: {
|
|
79
|
+
width: F - 20,
|
|
80
|
+
minWidth: F - 30,
|
|
81
|
+
height: "100%",
|
|
82
|
+
minHeight: 40,
|
|
83
|
+
display: "flex",
|
|
84
|
+
alignItems: "center",
|
|
85
|
+
justifyContent: "center",
|
|
86
|
+
bgcolor: z.palette.datagrid.filter,
|
|
87
|
+
color: "primary.main",
|
|
88
|
+
borderRight: `1px solid ${z.palette.datagrid.filter}`,
|
|
89
|
+
fontWeight: 500,
|
|
90
|
+
typography: "body1",
|
|
91
|
+
px: 2,
|
|
92
|
+
maxWidth: "20ch",
|
|
93
|
+
overflow: "hidden",
|
|
94
|
+
whiteSpace: "nowrap",
|
|
95
|
+
textOverflow: "ellipsis"
|
|
96
|
+
},
|
|
97
|
+
children: typeof P == "string" ? /* @__PURE__ */ l(a, {
|
|
98
|
+
fontWeight: 500,
|
|
99
|
+
title: P,
|
|
100
|
+
text: P
|
|
101
|
+
}) : P
|
|
102
|
+
})
|
|
103
|
+
}) : M?.showIcon && M.Component && /* @__PURE__ */ l(m, {
|
|
104
|
+
position: "start",
|
|
105
|
+
children: /* @__PURE__ */ l(i, {
|
|
106
|
+
title: M.toolTip ?? "",
|
|
107
|
+
children: /* @__PURE__ */ l(p, {
|
|
108
|
+
edge: "start",
|
|
109
|
+
sx: { color: M.iconColor ?? "primary.main" },
|
|
110
|
+
children: M.Component
|
|
111
|
+
})
|
|
112
|
+
})
|
|
113
|
+
}),
|
|
114
|
+
...j?.showIcon && !w && { endAdornment: /* @__PURE__ */ l(m, {
|
|
115
|
+
position: "end",
|
|
116
|
+
sx: {
|
|
117
|
+
position: "absolute",
|
|
118
|
+
right: 0
|
|
119
|
+
},
|
|
120
|
+
children: /* @__PURE__ */ l(i, {
|
|
121
|
+
title: j?.toolTip ?? "strComingSoon",
|
|
122
|
+
children: /* @__PURE__ */ l(p, {
|
|
123
|
+
edge: "end",
|
|
124
|
+
onClick: (e) => j?.customIconClick?.(e),
|
|
125
|
+
sx: {
|
|
126
|
+
color: j?.iconColor ?? "primary.main",
|
|
127
|
+
pr: 2
|
|
128
|
+
},
|
|
129
|
+
children: j?.Component ?? /* @__PURE__ */ l(t, {})
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
}) }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
sx: {
|
|
136
|
+
".MuiFormHelperText-root": {
|
|
137
|
+
backgroundColor: z.palette.menuText.primary,
|
|
138
|
+
margin: 0
|
|
139
|
+
},
|
|
140
|
+
"& ::placeholder": {
|
|
141
|
+
fontSize: R,
|
|
142
|
+
color: z.palette.placeholdertext
|
|
143
|
+
},
|
|
144
|
+
"& input[type=number]": { MozAppearance: "textfield" },
|
|
145
|
+
"& input[type=number]::-webkit-outer-spin-button": {
|
|
146
|
+
WebkitAppearance: "none",
|
|
147
|
+
margin: 0
|
|
148
|
+
},
|
|
149
|
+
"& input[type=number]::-webkit-inner-spin-button": {
|
|
150
|
+
WebkitAppearance: "none",
|
|
151
|
+
margin: 0
|
|
152
|
+
},
|
|
153
|
+
"& .MuiOutlinedInput-root": {
|
|
154
|
+
paddingRight: 0,
|
|
155
|
+
color: "primary.main",
|
|
156
|
+
...P && {
|
|
157
|
+
paddingLeft: 0,
|
|
158
|
+
overflow: "hidden",
|
|
159
|
+
"& .MuiOutlinedInput-input": { paddingLeft: 2 }
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"& .MuiOutlinedInput-notchedOutline": { borderColor: "#D9DDE7" },
|
|
163
|
+
"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline": { borderColor: z.palette.primary.main },
|
|
164
|
+
"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
165
|
+
borderWidth: 2,
|
|
166
|
+
borderColor: z.palette.primary.main
|
|
167
|
+
},
|
|
168
|
+
...P && {
|
|
169
|
+
"& .MuiInputAdornment-root": {
|
|
170
|
+
marginRight: 0,
|
|
171
|
+
alignSelf: "stretch",
|
|
172
|
+
maxHeight: "none"
|
|
173
|
+
},
|
|
174
|
+
"& .MuiInputAdornment-root > div": { height: "100%" }
|
|
175
|
+
},
|
|
176
|
+
...T,
|
|
177
|
+
...A
|
|
178
|
+
}
|
|
179
|
+
})
|
|
180
|
+
}),
|
|
181
|
+
!w && (y?.maxLength || D) && /* @__PURE__ */ u(f, {
|
|
182
|
+
container: !0,
|
|
183
|
+
rowSpacing: 0,
|
|
184
|
+
sx: {
|
|
185
|
+
justifyContent: "space-between",
|
|
186
|
+
alignItems: "center",
|
|
187
|
+
width: "100%"
|
|
188
|
+
},
|
|
189
|
+
children: [/* @__PURE__ */ l(a, {
|
|
190
|
+
text: O ? D : "",
|
|
191
|
+
variantType: "error",
|
|
192
|
+
sx: {
|
|
193
|
+
minHeight: "1rem",
|
|
194
|
+
fontSize: R && R - 2
|
|
195
|
+
}
|
|
196
|
+
}), y?.maxLength && /* @__PURE__ */ l(a, {
|
|
197
|
+
text: `${r(B)} / ${r(V)} ${L("strCharacters")}`,
|
|
198
|
+
variant: "body2",
|
|
199
|
+
sx: {
|
|
200
|
+
fontSize: R && R - 2,
|
|
201
|
+
color: "text.primary"
|
|
202
|
+
}
|
|
203
|
+
})]
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
})
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
//#endregion
|
|
210
|
+
export { y as default };
|
|
211
|
+
|
|
212
|
+
//# sourceMappingURL=index142.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index142.js","names":[],"sources":["../src/libs/shared/UI/textInput/TextInputField.tsx"],"sourcesContent":["import MicNoneOutlinedIcon from \"@mui/icons-material/MicNoneOutlined\";\r\nimport { Box, Grid, IconButton, InputAdornment, Stack, TextField, Tooltip } from \"@mui/material\";\r\nimport useTheme from \"@mui/system/useTheme\";\r\nimport { useAppThemeContext } from \"libs/core/context/AppThemeContext\";\r\nimport type { TextInputFieldPropTypes } from \"libs/shared/types/common-types\";\r\nimport React, { useMemo, type JSX } from \"react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { toLocaleString } from \"utils/commonFunctions\";\r\nimport CustomizedTooltip from \"../toolTips/CustomizedTooltip\";\r\nimport Typography2 from \"../typography/Typography2\";\r\nimport PreviewText from \"ui/previewText/PreviewText\";\r\n\r\n\r\nconst TextInputField: React.FC<TextInputFieldPropTypes> = ({\r\n label,\r\n validation,\r\n size = 'small',\r\n mt = 0,\r\n value = \"\",\r\n width,\r\n disabled = false,\r\n autosx,\r\n slotProps,\r\n helperText,\r\n error,\r\n onChange,\r\n sx,\r\n endIcon,\r\n startIcon,\r\n tooltip,\r\n unitLabel,\r\n prefixWidth = 110,\r\n ...props\r\n}): JSX.Element => {\r\n const { t } = useTranslation();\r\n\r\n const { fontSize } = useAppThemeContext();\r\n\r\n const theme = useTheme();\r\n\r\n const currentLength = useMemo(\r\n () => String(value ?? \"\").length,\r\n [value]\r\n );\r\n\r\n const maxLength =\r\n validation?.maxLength ||\r\n validation?.length ||\r\n 100;\r\n\r\n const placeHolderValue = label\r\n ? t(\"strPlaceholder\", {\r\n field: t(label),\r\n })\r\n : \"\";\r\n\r\n const handleInputChange = (\r\n event: React.ChangeEvent<HTMLInputElement>\r\n ) => {\r\n let updatedValue = event.target.value.replace(\r\n /^\\s+/,\r\n \"\"\r\n );\r\n\r\n if (\r\n validation?.isNotAllowdCharacters &&\r\n validation?.notAllowedString\r\n ) {\r\n const regexPattern = new RegExp(\r\n validation.notAllowedString,\r\n \"gu\"\r\n );\r\n\r\n updatedValue = updatedValue.replace(\r\n regexPattern,\r\n \"\"\r\n );\r\n\r\n if (validation.extraRegex) {\r\n const extraPattern = new RegExp(\r\n validation.extraRegex,\r\n \"gu\"\r\n );\r\n\r\n updatedValue = updatedValue.replace(\r\n extraPattern,\r\n \"$1\"\r\n );\r\n }\r\n }\r\n\r\n if (onChange) {\r\n event.target.value = updatedValue;\r\n onChange(event);\r\n }\r\n };\r\n\r\n return (\r\n <PreviewText label={label as string} value={value as string}>\r\n <Stack\r\n sx={{\r\n mt,\r\n width: width || undefined,\r\n\r\n \"& > :not(style) ~ :not(style)\": {\r\n marginTop: 0,\r\n },\r\n }}\r\n >\r\n {label && (\r\n <Typography2\r\n text={label}\r\n fontWeight={400}\r\n isRequired={\r\n !disabled &&\r\n validation?.required\r\n }\r\n sx={{\r\n color:theme.palette.text.primary,\r\n fontSize,\r\n mb: 0.5,\r\n }}\r\n />\r\n )}\r\n\r\n <Tooltip\r\n title={tooltip ? t(tooltip) : \"\"}\r\n disableInteractive={!tooltip}\r\n >\r\n <TextField\r\n {...props}\r\n value={value}\r\n onChange={handleInputChange}\r\n placeholder={\r\n disabled\r\n ? \"\"\r\n : placeHolderValue\r\n }\r\n fullWidth\r\n size={size}\r\n disabled={disabled}\r\n variant=\"outlined\"\r\n error={error}\r\n slotProps={{\r\n ...slotProps,\r\n\r\n htmlInput: {\r\n ...slotProps?.htmlInput,\r\n\r\n maxLength:\r\n maxLength > 0\r\n ? maxLength\r\n : undefined,\r\n\r\n style: {\r\n height: \"1.44rem\",\r\n },\r\n },\r\n\r\n input: {\r\n ...slotProps?.input,\r\n\r\n sx: {\r\n backgroundColor: disabled\r\n ? theme.palette.datagrid.heading\r\n : \"#fff\",\r\n\r\n ...(unitLabel && {\r\n paddingLeft: 0,\r\n }),\r\n },\r\n startAdornment: unitLabel ? (\r\n <InputAdornment\r\n position=\"start\"\r\n sx={{\r\n marginRight: 0,\r\n alignSelf: \"stretch\",\r\n maxHeight: \"none\",\r\n }}\r\n >\r\n <Box\r\n sx={{\r\n width: prefixWidth - 20,\r\n minWidth: prefixWidth - 30,\r\n height: \"100%\",\r\n minHeight: 40,\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n bgcolor: theme.palette.datagrid.filter,\r\n color: 'primary.main',\r\n borderRight: `1px solid ${theme.palette.datagrid.filter}`,\r\n fontWeight: 500,\r\n typography: \"body1\",\r\n px: 2,\r\n maxWidth: '20ch',\r\n overflow: 'hidden',\r\n whiteSpace: 'nowrap',\r\n textOverflow: 'ellipsis',\r\n }}\r\n >\r\n {typeof unitLabel === \"string\" ? (\r\n <Typography2 fontWeight={500} title={unitLabel} text={unitLabel} />\r\n ) : (\r\n unitLabel\r\n )}\r\n </Box>\r\n </InputAdornment>\r\n ) : (\r\n startIcon?.showIcon &&\r\n startIcon.Component && (\r\n <InputAdornment position=\"start\">\r\n <CustomizedTooltip\r\n title={\r\n startIcon.toolTip ??\r\n \"\"\r\n }\r\n >\r\n <IconButton\r\n edge=\"start\"\r\n sx={{\r\n color:\r\n startIcon.iconColor ??\r\n \"primary.main\",\r\n }}\r\n >\r\n {startIcon.Component}\r\n </IconButton>\r\n </CustomizedTooltip>\r\n </InputAdornment>\r\n )\r\n ),\r\n ...(endIcon?.showIcon &&\r\n !disabled && {\r\n endAdornment: (\r\n <InputAdornment\r\n position=\"end\"\r\n sx={{\r\n position: \"absolute\",\r\n right: 0,\r\n }}\r\n >\r\n <CustomizedTooltip\r\n title={\r\n endIcon?.toolTip ??\r\n \"strComingSoon\"\r\n }\r\n >\r\n <IconButton\r\n edge=\"end\"\r\n onClick={(event) =>\r\n endIcon?.customIconClick?.(\r\n event\r\n )\r\n }\r\n sx={{\r\n color:\r\n endIcon?.iconColor ??\r\n \"primary.main\",\r\n pr: 2,\r\n }}\r\n >\r\n {endIcon?.Component ?? (\r\n <MicNoneOutlinedIcon />\r\n )}\r\n </IconButton>\r\n </CustomizedTooltip>\r\n </InputAdornment>\r\n ),\r\n }),\r\n },\r\n }}\r\n sx={{\r\n \".MuiFormHelperText-root\": {\r\n backgroundColor:\r\n theme.palette.menuText.primary,\r\n margin: 0,\r\n },\r\n\r\n \"& ::placeholder\": {\r\n fontSize,\r\n color: theme.palette.placeholdertext\r\n },\r\n\r\n \"& input[type=number]\": {\r\n MozAppearance: \"textfield\",\r\n },\r\n\r\n \"& input[type=number]::-webkit-outer-spin-button\":\r\n {\r\n WebkitAppearance: \"none\",\r\n margin: 0,\r\n },\r\n\r\n \"& input[type=number]::-webkit-inner-spin-button\":\r\n {\r\n WebkitAppearance: \"none\",\r\n margin: 0,\r\n },\r\n\r\n \"& .MuiOutlinedInput-root\": {\r\n paddingRight: 0,\r\n color: \"primary.main\",\r\n\r\n ...(unitLabel && {\r\n paddingLeft: 0,\r\n overflow: \"hidden\",\r\n\r\n \"& .MuiOutlinedInput-input\": {\r\n paddingLeft: 2,\r\n },\r\n }),\r\n },\r\n\r\n \"& .MuiOutlinedInput-notchedOutline\": {\r\n borderColor: \"#D9DDE7\",\r\n },\r\n\r\n \"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline\":\r\n {\r\n borderColor:\r\n theme.palette.primary.main,\r\n },\r\n\r\n \"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline\":\r\n {\r\n borderWidth: 2,\r\n borderColor:\r\n theme.palette.primary.main,\r\n },\r\n\r\n ...(unitLabel && {\r\n \"& .MuiInputAdornment-root\": {\r\n marginRight: 0,\r\n alignSelf: \"stretch\",\r\n maxHeight: \"none\",\r\n },\r\n\r\n \"& .MuiInputAdornment-root > div\": {\r\n height: \"100%\",\r\n },\r\n }),\r\n\r\n ...autosx,\r\n ...sx,\r\n }}\r\n />\r\n </Tooltip>\r\n {!disabled && (validation?.maxLength || helperText) && (\r\n <Grid\r\n container\r\n rowSpacing={0}\r\n sx={{\r\n justifyContent: 'space-between', alignItems: 'center', width: '100%'\r\n }}\r\n >\r\n <Typography2\r\n text={error ? helperText : \"\"}\r\n variantType=\"error\"\r\n sx={{ minHeight: \"1rem\", fontSize: fontSize && (fontSize - 2) }}\r\n />\r\n\r\n {validation?.maxLength && (\r\n <Typography2\r\n text={`${toLocaleString(currentLength)} / ${toLocaleString(maxLength)} ${t(\"strCharacters\")}`}\r\n variant=\"body2\"\r\n sx={{\r\n fontSize: fontSize && (fontSize - 2),\r\n color: \"text.primary\",\r\n }}\r\n />\r\n )}\r\n </Grid>\r\n )}\r\n </Stack>\r\n </PreviewText>\r\n );\r\n};\r\n\r\nexport default React.memo(TextInputField);\r\n"],"mappings":"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"}
|
package/dist/index143.js
ADDED
package/dist/index144.js
ADDED
package/dist/index145.js
ADDED
package/dist/index15.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.mjs
|
|
2
|
+
function e(e, ...t) {
|
|
3
|
+
let n = new URL(`https://mui.com/production-error/?code=${e}`);
|
|
4
|
+
return t.forEach((e) => n.searchParams.append("args[]", e)), `Minified MUI error #${e}; visit ${n} for the full message.`;
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as default };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index15.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index15.js","names":[],"sources":["../node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.mjs"],"sourcesContent":["/**\n * WARNING: Don't import this directly. It's imported by the code generated by\n * `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`\n * constructors to ensure the plugin works as expected. Supported patterns include:\n * throw new Error('My message');\n * throw new Error(`My message: ${foo}`);\n * throw new Error(`My message: ${foo}` + 'another string');\n * ...\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code, ...args) {\n const url = new URL(`https://mui.com/production-error/?code=${code}`);\n args.forEach(arg => url.searchParams.append('args[]', arg));\n return `Minified MUI error #${code}; visit ${url} for the full message.`;\n}"],"x_google_ignoreList":[0],"mappings":";AAUA,SAAwB,EAAsB,GAAM,GAAG,GAAM;CAC3D,IAAM,IAAM,IAAI,IAAI,0CAA0C,GAAM;CAEpE,OADA,EAAK,SAAQ,MAAO,EAAI,aAAa,OAAO,UAAU,CAAG,CAAC,GACnD,uBAAuB,EAAK,UAAU,EAAI;AACnD"}
|
package/dist/index16.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import e from "./index15.js";
|
|
2
|
+
//#region node_modules/@mui/utils/capitalize/capitalize.mjs
|
|
3
|
+
function t(t) {
|
|
4
|
+
if (typeof t != "string") throw Error(process.env.NODE_ENV === "production" ? e(7) : "MUI: `capitalize(string)` expects a string argument.");
|
|
5
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as default };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=index16.js.map
|