blixify-ui-web 0.4.152 → 0.4.153

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":"AA8BA,OAAO,KAQN,MAAM,OAAO,CAAC;AAuEf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,mFA61OvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAQN,MAAM,OAAO,CAAC;AAuEf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,mFAg3OvB,CAAC"}
@@ -3805,7 +3805,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3805
3805
  var listElement = [];
3806
3806
  var hasTabAlign = ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.tabAlign) || ((_b = props.space) === null || _b === void 0 ? void 0 : _b.tabAlign);
3807
3807
  var isListObject = structure.filter(function (eachAttribute) {
3808
+ var _a;
3808
3809
  if (eachAttribute.type === "listObject") {
3810
+ if (((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdatePrefill) && type === "update") {
3811
+ var present_1 = false;
3812
+ props.bareSettings
3813
+ .bareUpdatePrefill(selectedData)
3814
+ .map(function (eachField) {
3815
+ if (eachField.key === eachAttribute.id)
3816
+ present_1 = true;
3817
+ return null;
3818
+ });
3819
+ if (present_1)
3820
+ return false;
3821
+ }
3809
3822
  if (type === "update" && !eachAttribute.listObjOrder) {
3810
3823
  return true;
3811
3824
  }
@@ -3900,7 +3913,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3900
3913
  var _a;
3901
3914
  canvasElement.push(react_1.default.createElement("div", { key: eachCanvas.id, className: "w-full my-6" },
3902
3915
  react_1.default.createElement("h3", { className: "text-lg font-medium text-gray-900 mb-4" }, eachCanvas.name),
3903
- react_1.default.createElement(canvas_1.Canvas, { label: eachCanvas.name, texts: (_a = clonedSelectedData[eachCanvas.id]) !== null && _a !== void 0 ? _a : [], backgroundImageUrl: eachCanvas.canvasImage })));
3916
+ react_1.default.createElement(canvas_1.Canvas, { label: eachCanvas.name, texts: (_a = clonedSelectedData[eachCanvas.id]) !== null && _a !== void 0 ? _a : [], backgroundImageUrl: eachCanvas.canvasImage, disabled: true })));
3904
3917
  return null;
3905
3918
  });
3906
3919
  return canvasElement;
@@ -4101,7 +4114,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4101
4114
  authList));
4102
4115
  };
4103
4116
  var renderContent = function () {
4104
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16;
4117
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24;
4105
4118
  var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
4106
4119
  var tabs = renderTabs();
4107
4120
  var pages = [
@@ -4281,6 +4294,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4281
4294
  var tabId = uniqueTabIds_1[stepIndex];
4282
4295
  handleUpdateTabId(tabId);
4283
4296
  } })),
4297
+ ((_7 = props.bareSettings) === null || _7 === void 0 ? void 0 : _7.bareUpdateComponentAbove) &&
4298
+ ((_8 = props.bareSettings) === null || _8 === void 0 ? void 0 : _8.bareUpdateComponent) &&
4299
+ ((_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareUpdateComponent(selectedData)),
4284
4300
  react_1.default.createElement(form_1.Form, { className: "mt-6", ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
4285
4301
  uniqueTabIds_1.map(function (tabId) {
4286
4302
  var filterByTab = filterModel_1
@@ -4296,16 +4312,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4296
4312
  : "hidden"
4297
4313
  : "") }, renderDataTemplateFormContent(selectedData, filterByTab, modalFormInputRefs, false, false, undefined, undefined, activeTab !== tabId)));
4298
4314
  }),
4299
- ((_7 = props.bareSettings) === null || _7 === void 0 ? void 0 : _7.bareUpdateComponent) &&
4300
- ((_8 = props.bareSettings) === null || _8 === void 0 ? void 0 : _8.bareUpdateComponent(selectedData))),
4315
+ !((_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareUpdateComponentAbove) &&
4316
+ ((_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareUpdateComponent) &&
4317
+ ((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareUpdateComponent(selectedData))),
4301
4318
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
4302
4319
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
4303
4320
  isBottom &&
4304
4321
  renderActionButtons(props.type, true, hasTabAlign_1, uniqueTabIds_1)))) : (react_1.default.createElement("div", null,
4322
+ ((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareUpdateComponentAbove) &&
4323
+ ((_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareUpdateComponent) &&
4324
+ ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareUpdateComponent(selectedData)),
4305
4325
  react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " gap-6 mt-6"), ref: formRef, refList: __spreadArray(__spreadArray([], modalFormInputRefs, true), flexTableRefs, true), handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1, handleOnFailValidation: handleOnFailValidation },
4306
4326
  renderDataTemplateFormContent(selectedData, filterModel_1, modalFormInputRefs, false, false),
4307
- ((_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareUpdateComponent) &&
4308
- ((_10 = props.bareSettings) === null || _10 === void 0 ? void 0 : _10.bareUpdateComponent(selectedData))),
4327
+ !((_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareUpdateComponentAbove) &&
4328
+ ((_17 = props.bareSettings) === null || _17 === void 0 ? void 0 : _17.bareUpdateComponent) &&
4329
+ ((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareUpdateComponent(selectedData))),
4309
4330
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
4310
4331
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
4311
4332
  isBottom &&
@@ -4317,14 +4338,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4317
4338
  var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
4318
4339
  dbModule: dbModule,
4319
4340
  dbType: devSettings.server,
4320
- dbCollection: (_12 = (_11 = props === null || props === void 0 ? void 0 : props.space) === null || _11 === void 0 ? void 0 : _11.pipelineDefaultSpaceId) !== null && _12 !== void 0 ? _12 : props.collectionId,
4341
+ dbCollection: (_20 = (_19 = props === null || props === void 0 ? void 0 : props.space) === null || _19 === void 0 ? void 0 : _19.pipelineDefaultSpaceId) !== null && _20 !== void 0 ? _20 : props.collectionId,
4321
4342
  dbEndpoint: devSettings.dbEndpoint,
4322
4343
  dbAPIToken: devSettings.dbAPIToken,
4323
4344
  dbUserToken: devSettings.dbUserToken,
4324
- }, cond: handleReadQueryHocCond(), offline: (_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareOffline, onChangeData: function (data) {
4345
+ }, cond: handleReadQueryHocCond(), offline: (_21 = props.bareSettings) === null || _21 === void 0 ? void 0 : _21.bareOffline, onChangeData: function (data) {
4325
4346
  handleGetListData(data, "", "");
4326
4347
  }, onError: handleGetItemError }));
4327
- if ((_14 = props.renderSettings) === null || _14 === void 0 ? void 0 : _14.renderListUI) {
4348
+ if ((_22 = props.renderSettings) === null || _22 === void 0 ? void 0 : _22.renderListUI) {
4328
4349
  return (react_1.default.createElement(react_1.default.Fragment, null,
4329
4350
  listReadQueryHOC,
4330
4351
  props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
@@ -4343,7 +4364,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4343
4364
  }
4344
4365
  }
4345
4366
  if (filterElementList.length > 0) {
4346
- return (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center mt-6 space-y-3 md:space-x-3 md:space-y-0 md:flex-row md:mt-0 md:mx-3" }, filterElementList));
4367
+ return (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center mt-3 space-y-3 md:space-x-3 md:space-y-0 md:flex-row md:mt-0 md:mx-3" }, filterElementList));
4347
4368
  }
4348
4369
  else
4349
4370
  return null;
@@ -4422,7 +4443,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4422
4443
  renderListFilterElements(),
4423
4444
  renderListActionElements()),
4424
4445
  renderListNewRowFilterElements(),
4425
- (schemaPresent || ((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_16 = props.organise) === null || _16 === void 0 ? void 0 : _16.darkMode })),
4446
+ (schemaPresent || ((_23 = props.bareSettings) === null || _23 === void 0 ? void 0 : _23.bareReadListTabs)) && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.darkMode })),
4426
4447
  renderTabContent(tabs, props.type, viewType),
4427
4448
  isBottom && renderActionButtons(props.type, true)));
4428
4449
  default:
@@ -4433,7 +4454,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4433
4454
  //SECTION: Render Utils
4434
4455
  //=====================================================================================
4435
4456
  var renderDataTemplateFormContent = function (state, model, ref, isObject, isObjectList, modalInput, parentData, markdownReadOnly) {
4436
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
4457
+ var _a, _b, _c, _d, _e, _f, _g, _h;
4437
4458
  return (0, updateModule_1.renderDataTemplateForm)(state, model, ref, {
4438
4459
  handleOnChangeAddress: handleOnChangeAddress,
4439
4460
  handleOnChangeText: handleOnChangeText,
@@ -4482,7 +4503,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4482
4503
  handleSelectListObjectData: handleSelectListObjectData,
4483
4504
  renderObjectTags: renderObjectTags,
4484
4505
  setSelectedData: setSelectedData,
4485
- }, { signing: signatureSigning, setSigning: setSignatureSigning }, { readOnly: markdownReadOnly ? true : false }, props.onComplete ? true : false, (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareOffline, (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareUpdateOneColumn, (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareSelectCustomBtns, (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareUpdateIndividualComponent);
4506
+ }, { signing: signatureSigning, setSigning: setSignatureSigning }, { readOnly: markdownReadOnly ? true : false }, props.onComplete ? true : false, (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareOffline, (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareUpdateOneColumn, (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareUpdateIndividualComponent);
4486
4507
  };
4487
4508
  var renderGridAndListData = function (imageTag, type, kanbanGroupId, useColumnName) {
4488
4509
  var _a, _b;