udp-react-enterprise-component-library 25.18.1-beta.82 → 25.18.1-beta.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.
@@ -203,8 +203,8 @@ const UdpTransactionGrid = (props) => {
203
203
  refreshGridData();
204
204
  handleSuccessSnackbar(t(`Transaction has been cancelled successfully`));
205
205
  } else handleErrorSnackbar(new Error(t(`Error cancelling Transaction. Please try again later.`)));
206
- } catch (error) {
207
- handleErrorSnackbar(error);
206
+ } catch (error$1) {
207
+ handleErrorSnackbar(error$1);
208
208
  } finally {
209
209
  handleDialogClose();
210
210
  }
@@ -690,8 +690,8 @@ const UdpTransactionCustomPage = (props) => {
690
690
  handleSuccessSnackbar(t(`${message} `));
691
691
  onSubmitSuccess?.(response);
692
692
  } else handleErrorSnackbar(new Error(t(`Error ${errorMessagePart} Transaction. Please try again later.`)));
693
- } catch (error) {
694
- handleErrorSnackbar(error);
693
+ } catch (error$1) {
694
+ handleErrorSnackbar(error$1);
695
695
  } finally {
696
696
  if (setHasUnsavedChanges) {
697
697
  formRef.current?.form?.restart(values);
@@ -1259,11 +1259,11 @@ const EditTransactionDetailsFooterItem = (props) => {
1259
1259
  var EditTransactionDetailsFooterItem_default = EditTransactionDetailsFooterItem;
1260
1260
 
1261
1261
  //#endregion
1262
- //#region src/udp/pages/UdpTransactionsPage/components/EditTransactionDetailsFormFields.jsx
1262
+ //#region src/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainFormFields.jsx
1263
1263
  const EditTransactionDetailsFormFields = (props) => {
1264
- const { transaction, fieldAttributes } = props;
1264
+ const { transaction, fieldAttributes, transactionTypeId } = props;
1265
1265
  const { t } = useTranslation();
1266
- const { getHiddenFields, getRequiredFields } = useTransactionEngine(transaction.transactionTypeId);
1266
+ const { getHiddenFields, getRequiredFields } = useTransactionEngine(transactionTypeId);
1267
1267
  const fieldComponentMap = {
1268
1268
  string: AmbientTextField,
1269
1269
  datetime: AmbientTextField,
@@ -1280,14 +1280,24 @@ const EditTransactionDetailsFormFields = (props) => {
1280
1280
  "long"
1281
1281
  ];
1282
1282
  const removeTimeFormatDate = (date) => {
1283
- const parsedDate = new Date(date);
1284
- if (parsedDate.getTime()) {
1285
- const year = parsedDate.getFullYear();
1286
- const month = parsedDate.getMonth() + 1;
1287
- const day = parsedDate.getDate().toString().padStart(2, "0");
1288
- return `${year}-${month.toString().padStart(2, "0")}-${day}`;
1283
+ if (date) {
1284
+ const parsedDate = new Date(date);
1285
+ if (parsedDate.getTime()) {
1286
+ const year = parsedDate.getFullYear();
1287
+ const month = parsedDate.getMonth() + 1;
1288
+ const day = parsedDate.getDate().toString().padStart(2, "0");
1289
+ return `${year}-${month.toString().padStart(2, "0")}-${day}`;
1290
+ }
1291
+ return parsedDate;
1289
1292
  }
1290
- return parsedDate;
1293
+ return date;
1294
+ };
1295
+ const addSpacingInHeaderName = (headerName) => {
1296
+ let formattedHeaderName = "";
1297
+ for (var i = 0; i < headerName.length; i++) if (i == 0) formattedHeaderName += headerName[i].toUpperCase();
1298
+ else if (i !== 0 && headerName[i].match(/[A-Z]/) && i != headerName.length - 1) formattedHeaderName += " " + headerName[i];
1299
+ else formattedHeaderName += headerName[i];
1300
+ return formattedHeaderName;
1291
1301
  };
1292
1302
  const dataTypeComponentMap = (transaction$1, attribute) => {
1293
1303
  const fieldName = attribute.name;
@@ -1298,14 +1308,14 @@ const EditTransactionDetailsFormFields = (props) => {
1298
1308
  switch (fieldDataType) {
1299
1309
  case "number":
1300
1310
  fieldComponentProps = {
1301
- initialValue: transaction$1.entityBusinessObject[fieldName],
1311
+ initialValue: transaction$1?.entityBusinessObject[fieldName],
1302
1312
  type: "number",
1303
1313
  InputProps: { inputProps: { min: 0 } }
1304
1314
  };
1305
1315
  break;
1306
1316
  case "datetime":
1307
1317
  fieldComponentProps = {
1308
- initialValue: removeTimeFormatDate(transaction$1.entityBusinessObject[fieldName]),
1318
+ initialValue: removeTimeFormatDate(transaction$1?.entityBusinessObject[fieldName]),
1309
1319
  type: "date"
1310
1320
  };
1311
1321
  break;
@@ -1313,7 +1323,7 @@ const EditTransactionDetailsFormFields = (props) => {
1313
1323
  fieldComponentProps = {
1314
1324
  options: attribute?.options?.map((option) => option.id),
1315
1325
  getOptionLabelFunction: (option) => getEntityName(attribute?.options, option) || option,
1316
- initialValue: transaction$1.entityBusinessObject[fieldName]
1326
+ initialValue: transaction$1?.entityBusinessObject[fieldName]
1317
1327
  };
1318
1328
  break;
1319
1329
  case "bool":
@@ -1322,11 +1332,12 @@ const EditTransactionDetailsFormFields = (props) => {
1322
1332
  initialValue: false
1323
1333
  };
1324
1334
  break;
1325
- default: fieldComponentProps = { initialValue: transaction$1.entityBusinessObject[fieldName] };
1335
+ default: fieldComponentProps = { initialValue: transaction$1?.entityBusinessObject[fieldName] };
1326
1336
  }
1327
- const formLabel = isAsscoiationLabel ? fieldName + " Name" : fieldName;
1328
- const isRequired = getRequiredFields(transaction$1).includes(fieldName) || attribute.required;
1329
- const isHidden = getHiddenFields(transaction$1).includes(fieldName) || attribute.isPrimaryKey || !attribute.extendedProperties.defaultVisible;
1337
+ const formattedFieldName = addSpacingInHeaderName(fieldName);
1338
+ const formLabel = isAsscoiationLabel ? formattedFieldName + " Name" : formattedFieldName;
1339
+ const isRequired = getRequiredFields(transaction$1).includes(fieldName) || attribute.required || !attribute.nullable;
1340
+ const isHidden = getHiddenFields(transaction$1).includes(fieldName) || attribute.isPrimaryKey || !attribute.extendedProperties.defaultVisible || attribute?.hidden;
1330
1341
  let fieldComponent = /* @__PURE__ */ React.createElement(Field, {
1331
1342
  component: fieldComponentMap[fieldDataType] ?? AmbientTextField,
1332
1343
  label: t(formLabel),
@@ -1347,14 +1358,14 @@ const EditTransactionDetailsFormFields = (props) => {
1347
1358
  return /* @__PURE__ */ React.createElement(React.Fragment, null, dataTypeComponentMap(transaction, attribute));
1348
1359
  }));
1349
1360
  };
1350
- var EditTransactionDetailsFormFields_default = EditTransactionDetailsFormFields;
1361
+ var DynamicTransactionDomainFormFields_default = EditTransactionDetailsFormFields;
1351
1362
 
1352
1363
  //#endregion
1353
- //#region src/udp/pages/UdpTransactionsPage/components/EditTransactionDetailsForm.jsx
1354
- const EditTransactionDetailsForm = (props) => {
1355
- const { transaction, formRef } = props;
1364
+ //#region src/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainForm.jsx
1365
+ const DynamicTransactionDomainForm = (props) => {
1366
+ const { transaction, formRef, domainName, transactionTypeId, transactionUiActionType, setHasUnsavedChanges, onSubmitSuccess, refetchTransaction } = props;
1356
1367
  const [entityAttributes, setEntityAttributes] = useState(null);
1357
- const fullyQualifiedName = transaction.entityBusinessKey?.split("|")[0];
1368
+ const fullyQualifiedName = transaction?.entityBusinessKey?.split("|")[0];
1358
1369
  const { handleErrorSnackbar, handleSuccessSnackbar } = useHandleAxiosSnackbar();
1359
1370
  const { t } = useTranslation();
1360
1371
  const { currentApiCatalogId, catalogsMap } = useCatalogStore();
@@ -1370,7 +1381,7 @@ const EditTransactionDetailsForm = (props) => {
1370
1381
  filterElements: [{
1371
1382
  searchField: "sanitizedName",
1372
1383
  searchOperator: "=",
1373
- searchValue: getSanitizedName(fullyQualifiedName)
1384
+ searchValue: fullyQualifiedName ? getSanitizedName(fullyQualifiedName) : domainName
1374
1385
  }]
1375
1386
  }
1376
1387
  });
@@ -1430,7 +1441,7 @@ const EditTransactionDetailsForm = (props) => {
1430
1441
  try {
1431
1442
  const getTableEntriesResp = await apiMutate(ConfigService$1.productV1ApiUrl, `${fkDomainName}`, { method: "get" });
1432
1443
  if (getTableEntriesResp.data.length > 0 && fkFieldInfo) updateFieldInfo(getTableEntriesResp.data, entityCatalogObjectInfo, fkFieldInfo, fkDomainName);
1433
- } catch (error) {
1444
+ } catch (error$1) {
1434
1445
  handleErrorSnackbar(new Error(t(`Error finiding field information! Please try again.`)));
1435
1446
  }
1436
1447
  }
@@ -1453,7 +1464,6 @@ const EditTransactionDetailsForm = (props) => {
1453
1464
  ]);
1454
1465
  useEffect(() => {
1455
1466
  if (catalogObjectList) {
1456
- let domainName = transaction.entityBusinessKey.split("|")[0].split(".").pop();
1457
1467
  let domainCatalogObject = catalogObjectList?.find((catalogObject) => getSanitizedName(catalogObject.catalogObjectName) == domainName);
1458
1468
  if (domainCatalogObject) filterAdjustEntityAttributes(domainCatalogObject.properties).then((filteredResp) => {
1459
1469
  setEntityAttributes(filteredResp);
@@ -1462,36 +1472,71 @@ const EditTransactionDetailsForm = (props) => {
1462
1472
  }, [
1463
1473
  filterAdjustEntityAttributes,
1464
1474
  catalogObjectList,
1465
- transaction
1475
+ domainName
1466
1476
  ]);
1467
- const executeSaveChanges = useCallback(async (data) => apiMutate(ConfigService$1.productV1ApiUrl, `udpTransaction/${transaction?.transactionId}/saveChanges`, { method: "put" }, data), [transaction.transactionId]);
1477
+ const executeSaveChanges = useCallback(async (data) => apiMutate(ConfigService$1.productV1ApiUrl, `udpTransaction/${transaction?.transactionId}/saveChanges`, { method: "put" }, data), [transaction?.transactionId]);
1478
+ const executeCreateTransactionAndDomain = useCallback(async (data) => apiMutate(ConfigService$1.productV1ApiUrl, `udpTransaction/transactionType/${transactionTypeId}/create`, { method: "post" }, data), [transactionTypeId]);
1468
1479
  const onSubmit = useCallback(async (values) => {
1469
- if ((await executeSaveChanges({ data: values }))?.status === 200) handleSuccessSnackbar(t("Transaction has been saved successfully"));
1470
- else handleErrorSnackbar(new Error(t(`Error saving Transaction. Please try again later.`)));
1480
+ try {
1481
+ const request = { data: values };
1482
+ let response = null;
1483
+ let successMessageAction = "";
1484
+ let errorMessageAction = "";
1485
+ if (transactionUiActionType == TransactionUiActionTypeEnums.Render_Transaction_Details_Page) {
1486
+ response = await executeSaveChanges({ data: values });
1487
+ successMessageAction = "saved";
1488
+ errorMessageAction = "saving";
1489
+ } else if (transactionUiActionType == TransactionUiActionTypeEnums.Render_Create_Transaction_Page) {
1490
+ response = await executeCreateTransactionAndDomain(request);
1491
+ successMessageAction = "created";
1492
+ errorMessageAction = "creating";
1493
+ }
1494
+ if (response?.status === 200) {
1495
+ handleSuccessSnackbar(t(`Transaction has been ${successMessageAction} successfully`));
1496
+ onSubmitSuccess?.(response);
1497
+ } else handleErrorSnackbar(new Error(t(`Error ${errorMessageAction} Transaction. Please try again later.`)));
1498
+ } catch (e) {
1499
+ handleErrorSnackbar(error);
1500
+ } finally {
1501
+ if (setHasUnsavedChanges) {
1502
+ formRef.current?.form?.restart(values);
1503
+ setHasUnsavedChanges(false);
1504
+ }
1505
+ if (refetchTransaction) refetchTransaction();
1506
+ }
1471
1507
  }, [
1472
1508
  executeSaveChanges,
1509
+ executeCreateTransactionAndDomain,
1473
1510
  handleSuccessSnackbar,
1474
1511
  handleErrorSnackbar,
1475
- t
1512
+ t,
1513
+ transactionUiActionType,
1514
+ setHasUnsavedChanges,
1515
+ formRef,
1516
+ onSubmitSuccess,
1517
+ refetchTransaction
1476
1518
  ]);
1477
1519
  const fieldAttributes = useMemo(() => {
1478
1520
  if (!entityAttributes) return [];
1479
1521
  return entityAttributes;
1480
1522
  }, [entityAttributes]);
1481
- return fieldAttributes.length == 0 ? /* @__PURE__ */ React.createElement(LinearProgress, null) : /* @__PURE__ */ React.createElement(AmbientCard, null, /* @__PURE__ */ React.createElement(Form, {
1523
+ return fieldAttributes.length == 0 ? /* @__PURE__ */ React.createElement(LinearProgress, null) : /* @__PURE__ */ React.createElement(AmbientCard, { fullWidth: true }, /* @__PURE__ */ React.createElement(Form, {
1482
1524
  onSubmit,
1483
1525
  ref: formRef
1484
- }, /* @__PURE__ */ React.createElement(EditTransactionDetailsFormFields_default, {
1526
+ }, /* @__PURE__ */ React.createElement(FormSpy, { subscription: { dirty: true } }, ({ dirty }) => {
1527
+ if (setHasUnsavedChanges) setHasUnsavedChanges(dirty);
1528
+ }), /* @__PURE__ */ React.createElement(DynamicTransactionDomainFormFields_default, {
1485
1529
  transaction,
1486
- fieldAttributes
1530
+ fieldAttributes,
1531
+ transactionTypeId
1487
1532
  })));
1488
1533
  };
1489
- var EditTransactionDetailsForm_default = EditTransactionDetailsForm;
1534
+ var DynamicTransactionDomainForm_default = DynamicTransactionDomainForm;
1490
1535
 
1491
1536
  //#endregion
1492
1537
  //#region src/udp/pages/UdpTransactionsPage/sidesheets/EditTransaction.jsx
1493
1538
  const EditTransaction = (props) => {
1494
- const { transaction: initialTransaction, transactionTypeId, transactionIsClosed, openInnerSidesheetState, setOpenInnerSidesheetState, refreshGridData, closeSideSheet, setSidesheetLoading, setHasUnsavedChanges, attachmentType, setAttachmentType, currentAttachments, setCurrentAttachments, attachmentProgress, setAttachmentProgress, transactionAttachmentTypes, transactionAttachments, setTransactionAttachments, filePreview, setFilePreview } = props;
1539
+ const { transaction: initialTransaction, transactionTypeId, transactionIsClosed, openInnerSidesheetState, setOpenInnerSidesheetState, refreshGridData, closeSideSheet, setSidesheetLoading, setHasUnsavedChanges, domainName, attachmentType, setAttachmentType, currentAttachments, setCurrentAttachments, attachmentProgress, setAttachmentProgress, transactionAttachmentTypes, transactionAttachments, setTransactionAttachments, filePreview, setFilePreview } = props;
1495
1540
  const { t } = useTranslation();
1496
1541
  const [selectedTab, setSelectedTab] = useState(0);
1497
1542
  const [transaction, setTransaction] = useState(initialTransaction);
@@ -1546,9 +1591,9 @@ const EditTransaction = (props) => {
1546
1591
  try {
1547
1592
  setTransactionAttachments((await fetchTransactionAttachments()).data.pageList);
1548
1593
  refetchTransaction();
1549
- } catch (error) {
1550
- console.error("Failed to fetch attachments:", error);
1551
- if (error?.message !== "canceled") enqueueSnackbar("Attachment fetch failed: We encountered a system error. Please try again or contact support if the issue persists.", {
1594
+ } catch (error$1) {
1595
+ console.error("Failed to fetch attachments:", error$1);
1596
+ if (error$1?.message !== "canceled") enqueueSnackbar("Attachment fetch failed: We encountered a system error. Please try again or contact support if the issue persists.", {
1552
1597
  variant: "error",
1553
1598
  anchorOrigin: {
1554
1599
  vertical: "top",
@@ -1607,7 +1652,7 @@ const EditTransaction = (props) => {
1607
1652
  horizontal: "center"
1608
1653
  }
1609
1654
  });
1610
- } catch (error) {
1655
+ } catch (error$1) {
1611
1656
  enqueueSnackbar(`File upload failed: We encountered a system error. Please try again or contact support if the issue persists.`, {
1612
1657
  variant: "error",
1613
1658
  anchorOrigin: {
@@ -1615,7 +1660,7 @@ const EditTransaction = (props) => {
1615
1660
  horizontal: "center"
1616
1661
  }
1617
1662
  });
1618
- throw error;
1663
+ throw error$1;
1619
1664
  } finally {
1620
1665
  setAttachmentProgress(false);
1621
1666
  }
@@ -1650,7 +1695,7 @@ const EditTransaction = (props) => {
1650
1695
  buttonLabel: "Save",
1651
1696
  buttonOneDisabled: !attachmentType || currentAttachments.length <= 0,
1652
1697
  onSubmit: () => {
1653
- handleUploadFiles().then(() => refreshGridData()).catch((error) => console.error(error));
1698
+ handleUploadFiles().then(() => refreshGridData()).catch((error$1) => console.error(error$1));
1654
1699
  },
1655
1700
  children: /* @__PURE__ */ React.createElement(Attachments, {
1656
1701
  attachmentTypes: transactionAttachmentTypes,
@@ -1763,9 +1808,14 @@ const EditTransaction = (props) => {
1763
1808
  transaction,
1764
1809
  refetchTransaction,
1765
1810
  setHasUnsavedChanges
1766
- }) : /* @__PURE__ */ React.createElement(EditTransactionDetailsForm_default, {
1811
+ }) : /* @__PURE__ */ React.createElement(DynamicTransactionDomainForm_default, {
1767
1812
  transaction,
1768
- formRef
1813
+ formRef,
1814
+ domainName,
1815
+ transactionTypeId,
1816
+ transactionUiActionType: TransactionUiActionTypeEnums.Render_Transaction_Details_Page,
1817
+ setHasUnsavedChanges,
1818
+ refetchTransaction
1769
1819
  })), /* @__PURE__ */ React.createElement(UdpTabPanel, {
1770
1820
  value: selectedTab,
1771
1821
  index: TRANSACTION_TAB.HISTORY
@@ -1883,8 +1933,8 @@ const UdpTransactionSidesheet = (props) => {
1883
1933
  try {
1884
1934
  setClosingTransactionLoading(true);
1885
1935
  await executeCloseTransaction();
1886
- } catch (error) {
1887
- handleErrorSnackbar(error);
1936
+ } catch (error$1) {
1937
+ handleErrorSnackbar(error$1);
1888
1938
  } finally {
1889
1939
  setClosingTransactionLoading(false);
1890
1940
  handleDialogClose();
@@ -1928,7 +1978,7 @@ const UdpTransactionSidesheet = (props) => {
1928
1978
  horizontal: "center"
1929
1979
  }
1930
1980
  });
1931
- } catch (error) {
1981
+ } catch (error$1) {
1932
1982
  enqueueSnackbar(`File upload failed: We encountered a system error. Please try again or contact support if the issue persists.`, {
1933
1983
  variant: "error",
1934
1984
  anchorOrigin: {
@@ -1936,7 +1986,7 @@ const UdpTransactionSidesheet = (props) => {
1936
1986
  horizontal: "center"
1937
1987
  }
1938
1988
  });
1939
- throw error;
1989
+ throw error$1;
1940
1990
  } finally {
1941
1991
  setAttachmentProgress(false);
1942
1992
  }
@@ -2004,6 +2054,9 @@ const UdpTransactionSidesheet = (props) => {
2004
2054
  transaction,
2005
2055
  formattedBusinesskey
2006
2056
  ]);
2057
+ const transactionCreatePageId = useMemo(() => {
2058
+ return getUiActionRenderPageId(TransactionUiActionTypeEnums.Render_Create_Transaction_Page);
2059
+ }, [getUiActionRenderPageId]);
2007
2060
  const sidesheetList = useMemo(() => {
2008
2061
  return [
2009
2062
  {
@@ -2015,11 +2068,18 @@ const UdpTransactionSidesheet = (props) => {
2015
2068
  title: domainName,
2016
2069
  width: sidesheetWidth,
2017
2070
  onSubmit: handleTransactionCreation,
2018
- children: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(UdpTransactionCustomPage_default, {
2071
+ children: /* @__PURE__ */ React.createElement(React.Fragment, null, transactionCreatePageId ? /* @__PURE__ */ React.createElement(UdpTransactionCustomPage_default, {
2019
2072
  transactionTypeId,
2020
2073
  transactionUiActionType: TransactionUiActionTypeEnums.Render_Create_Transaction_Page,
2021
2074
  formRef,
2022
2075
  onSubmitSuccess: handleTransactionCreationSuccess
2076
+ }) : /* @__PURE__ */ React.createElement(DynamicTransactionDomainForm_default, {
2077
+ transaction,
2078
+ formRef,
2079
+ domainName,
2080
+ transactionTypeId,
2081
+ transactionUiActionType: TransactionUiActionTypeEnums.Render_Create_Transaction_Page,
2082
+ onSubmitSuccess: handleTransactionCreationSuccess
2023
2083
  }), /* @__PURE__ */ React.createElement(SideSheet, {
2024
2084
  key: "Create Transaction: Add Attachment",
2025
2085
  open: createTransactionOpenInnerSidesheetState?.attachments,
@@ -2131,7 +2191,8 @@ const UdpTransactionSidesheet = (props) => {
2131
2191
  transactionAttachments,
2132
2192
  setTransactionAttachments,
2133
2193
  filePreview,
2134
- setFilePreview
2194
+ setFilePreview,
2195
+ domainName
2135
2196
  })
2136
2197
  },
2137
2198
  {
@@ -2169,6 +2230,7 @@ const UdpTransactionSidesheet = (props) => {
2169
2230
  pdfViewPageId,
2170
2231
  sidesheetWidth,
2171
2232
  handleNextStepsAction,
2233
+ transactionCreatePageId,
2172
2234
  createTransactionOpenInnerSidesheetState,
2173
2235
  t,
2174
2236
  attachmentType,
@@ -2247,7 +2309,7 @@ const useTransactionType = (options = {}) => {
2247
2309
  const [resolvedId, setResolvedId] = useState(transactionTypeId || null);
2248
2310
  const [data, setData] = useState(void 0);
2249
2311
  const [loading, setLoading] = useState(true);
2250
- const [error, setError] = useState(void 0);
2312
+ const [error$1, setError] = useState(void 0);
2251
2313
  const [promise, setPromise] = useState(void 0);
2252
2314
  const { transactionTypesMap, setTransactionTypesMap } = useTransactionStore();
2253
2315
  const setSuccessState = useCallback((response) => {
@@ -2299,7 +2361,7 @@ const useTransactionType = (options = {}) => {
2299
2361
  return {
2300
2362
  data,
2301
2363
  loading,
2302
- error,
2364
+ error: error$1,
2303
2365
  promise
2304
2366
  };
2305
2367
  };
@@ -2467,4 +2529,4 @@ var UdpTransactionsPage_exports = /* @__PURE__ */ __exportAll({ default: () => U
2467
2529
 
2468
2530
  //#endregion
2469
2531
  export { UdpTransactionsPage_default as n, UdpTransactionsPage_exports as t };
2470
- //# sourceMappingURL=UdpTransactionsPage-B6OV3w81.js.map
2532
+ //# sourceMappingURL=UdpTransactionsPage-DPUGjVmO.js.map