blixify-ui-web 0.3.13 → 0.3.15

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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAQN,MAAM,OAAO,CAAC;AA0Df,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAO1B,eAAO,MAAM,YAAY,mFAg7KvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAQN,MAAM,OAAO,CAAC;AA2Df,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAO1B,eAAO,MAAM,YAAY,mFAy8KvB,CAAC"}
@@ -121,6 +121,7 @@ var tabs_1 = require("../../navigation/tabs");
121
121
  var link_1 = require("../../structure/link");
122
122
  var blobModule_1 = require("../blobModule");
123
123
  var listModule_1 = require("../listModule");
124
+ var moduleUtils_1 = require("../moduleUtils");
124
125
  var queryForm_1 = require("../queryForm");
125
126
  var readModule_1 = require("../readModule");
126
127
  var readQuery_1 = require("../readQuery");
@@ -303,6 +304,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
303
304
  handlePopUpModal: handlePopUpModal,
304
305
  handleDeleteModal: handleDeleteModal,
305
306
  handleUploadOfflineData: handleUploadOfflineData,
307
+ handleOnChangeUpdatePrefill: handleOnChangeUpdatePrefill,
306
308
  }); });
307
309
  (0, react_1.useEffect)(function () {
308
310
  handleCheckOfflineDataLength();
@@ -397,6 +399,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
397
399
  if ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateHandleData)
398
400
  props.bareSettings.bareUpdateHandleData(selectedData);
399
401
  }, [selectedData]);
402
+ var handleOnChangeUpdatePrefill = function () {
403
+ var _a, _b;
404
+ (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareOnChangeUpdatePrefill) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData).map(function (eachField) {
405
+ var key = eachField.key, value = eachField.value;
406
+ selectedData[key] = value;
407
+ return null;
408
+ });
409
+ setTimeout(function () {
410
+ setPrefillTrigger(!prefillTrigger);
411
+ }, 50);
412
+ };
400
413
  //=====================================================================================
401
414
  //SECTION: Handle List
402
415
  //=====================================================================================
@@ -2988,7 +3001,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
2988
3001
  var renderDetailListData = function (model) {
2989
3002
  var detailList = [];
2990
3003
  model.map(function (eachAttribute) {
2991
- var _a, _b, _c, _d, _e;
3004
+ var _a, _b, _c, _d, _e, _f;
2992
3005
  var selectedDataKey = Object.keys(selectedData).find(function (eachKey) { return eachKey === eachAttribute.id; });
2993
3006
  if (selectedDataKey) {
2994
3007
  var showIdCondition = showId
@@ -3002,8 +3015,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3002
3015
  var bareReadDescFunc = (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareReadDescription;
3003
3016
  if (bareReadDescFunc === null || bareReadDescFunc === void 0 ? void 0 : bareReadDescFunc((_c = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.id) !== null && _c !== void 0 ? _c : "", selectedData[selectedDataKey]))
3004
3017
  currentValue = bareReadDescFunc === null || bareReadDescFunc === void 0 ? void 0 : bareReadDescFunc((_d = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.id) !== null && _d !== void 0 ? _d : "", selectedData[selectedDataKey]);
3018
+ if (eachAttribute.type === "listReference") {
3019
+ currentValue = (_e = selectedData[selectedDataKey]) === null || _e === void 0 ? void 0 : _e.map(function (eachData) {
3020
+ var _a, _b;
3021
+ return ((_b = eachData === null || eachData === void 0 ? void 0 : eachData[(_a = eachAttribute.referenceLabel) !== null && _a !== void 0 ? _a : ""]) !== null && _b !== void 0 ? _b : (0, moduleUtils_1.renderReferenceStringAttribute)(eachData));
3022
+ });
3023
+ }
3005
3024
  detailList.push({
3006
- title: (_e = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.name) !== null && _e !== void 0 ? _e : "",
3025
+ title: (_f = eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.name) !== null && _f !== void 0 ? _f : "",
3007
3026
  text: currentValue,
3008
3027
  });
3009
3028
  }