blixify-ui-web 1.2.141 → 1.2.142

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.
Files changed (39) hide show
  1. package/lib/components/chat/chatBase/index.d.ts.map +1 -1
  2. package/lib/components/chat/chatBase/index.js +3 -13
  3. package/lib/components/chat/chatBase/index.js.map +1 -1
  4. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  5. package/lib/components/data/dataTemplate/index.js +39 -18
  6. package/lib/components/data/dataTemplate/index.js.map +1 -1
  7. package/lib/components/data/dataTemplate/model.d.ts +2 -0
  8. package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
  9. package/lib/components/data/listModule.d.ts.map +1 -1
  10. package/lib/components/data/listModule.js +2 -12
  11. package/lib/components/data/listModule.js.map +1 -1
  12. package/lib/components/data/readModule.d.ts.map +1 -1
  13. package/lib/components/data/readModule.js +2 -12
  14. package/lib/components/data/readModule.js.map +1 -1
  15. package/lib/components/data/updateModule.d.ts +1 -0
  16. package/lib/components/data/updateModule.d.ts.map +1 -1
  17. package/lib/components/data/updateModule.js +22 -27
  18. package/lib/components/data/updateModule.js.map +1 -1
  19. package/lib/components/data/utils.d.ts.map +1 -1
  20. package/lib/components/data/utils.js +1 -0
  21. package/lib/components/data/utils.js.map +1 -1
  22. package/lib/components/design/faq/index.d.ts.map +1 -1
  23. package/lib/components/design/faq/index.js +3 -13
  24. package/lib/components/design/faq/index.js.map +1 -1
  25. package/lib/components/display/filePreview/index.d.ts.map +1 -1
  26. package/lib/components/display/filePreview/index.js +56 -1
  27. package/lib/components/display/filePreview/index.js.map +1 -1
  28. package/lib/components/input/markdown/compact.d.ts +21 -0
  29. package/lib/components/input/markdown/compact.d.ts.map +1 -0
  30. package/lib/components/input/markdown/compact.js +37 -0
  31. package/lib/components/input/markdown/compact.js.map +1 -0
  32. package/lib/components/input/markdown/index.d.ts.map +1 -1
  33. package/lib/components/input/markdown/index.js +4 -1
  34. package/lib/components/input/markdown/index.js.map +1 -1
  35. package/lib/components/input/markdown/mermaid.d.ts.map +1 -1
  36. package/lib/components/input/markdown/mermaid.js +34 -1
  37. package/lib/components/input/markdown/mermaid.js.map +1 -1
  38. package/lib/tail.css +2 -2
  39. package/package.json +8 -2
@@ -78,6 +78,7 @@ var dayjs_1 = __importDefault(require("../dayjs"));
78
78
  var outline_1 = require("@heroicons/react/24/outline");
79
79
  var dompurify_1 = __importDefault(require("dompurify"));
80
80
  var markdown_it_1 = __importDefault(require("markdown-it"));
81
+ var compact_1 = require("../input/markdown/compact");
81
82
  var markdown_it_task_lists_1 = __importDefault(require("markdown-it-task-lists"));
82
83
  var iconButton_1 = require("../action/iconButton");
83
84
  var radioList_1 = require("../action/radioList");
@@ -1045,18 +1046,7 @@ var renderEachListObject = function (type, selectedModelId, model, selectedData,
1045
1046
  linkify: true,
1046
1047
  });
1047
1048
  md.use(markdown_it_task_lists_1.default);
1048
- md.renderer.rules.heading_open = function (tokens, idx) {
1049
- var tag = tokens[idx].tag;
1050
- var classMap = {
1051
- h1: "mt-6 mb-4 font-semibold leading-[1.25] text-3xl",
1052
- h2: "mt-6 mb-4 font-semibold leading-[1.25] pb-[0.3em] text-2xl border-b border-gray-300 dark:border-gray-600",
1053
- h3: "mt-6 mb-4 font-semibold leading-[1.25] text-xl",
1054
- h4: "mt-6 mb-4 font-semibold leading-[1.25] text-base",
1055
- h5: "mt-6 mb-4 font-semibold leading-[1.25] text-sm",
1056
- h6: "mt-6 mb-4 font-semibold leading-[1.25] text-[0.85em] text-gray-500 dark:text-gray-400",
1057
- };
1058
- return "<".concat(tag, " class=\"").concat(classMap[tag] || "", "\">");
1059
- };
1049
+ (0, compact_1.handleApplyCompactHeadings)(md);
1060
1050
  md.renderer.rules.list_item_open = function (tokens, idx) {
1061
1051
  var _a;
1062
1052
  var token = tokens[idx];
@@ -1083,8 +1073,8 @@ var renderEachListObject = function (type, selectedModelId, model, selectedData,
1083
1073
  ],
1084
1074
  });
1085
1075
  var renderedHtml = md.render(safeHTML);
1086
- eachNewList[eachKey] = (react_1.default.createElement("div", { className: "mt-2 prose prose-sm [&>p]:leading-normal [&>p]:mb-0 [&>p]:mt-0", dangerouslySetInnerHTML: { __html: renderedHtml } }));
1087
- eachNewTable[eachKey] = (react_1.default.createElement("div", { className: "mt-2 prose prose-sm [&>p]:leading-normal [&>p]:mb-0 [&>p]:mt-0", dangerouslySetInnerHTML: { __html: renderedHtml } }));
1076
+ eachNewList[eachKey] = (react_1.default.createElement("div", { className: "mt-2 prose prose-sm ".concat(compact_1.compactParagraphClassName), dangerouslySetInnerHTML: { __html: renderedHtml } }));
1077
+ eachNewTable[eachKey] = (react_1.default.createElement("div", { className: "mt-2 prose prose-sm ".concat(compact_1.compactParagraphClassName), dangerouslySetInnerHTML: { __html: renderedHtml } }));
1088
1078
  }
1089
1079
  break;
1090
1080
  case "canvas":
@@ -1339,7 +1329,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
1339
1329
  cellInput.onBlur(__assign(__assign({}, clonedSelectedData), (_a = {}, _a[id] = value, _a)), { keepEditing: true });
1340
1330
  };
1341
1331
  filteredModel.forEach(function (eachAttribute, index) {
1342
- 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, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44;
1332
+ 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, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45;
1343
1333
  var shouldShow = (0, exports.renderShowCondition)(eachAttribute, clonedSelectedData, isForm);
1344
1334
  if (!shouldShow)
1345
1335
  return;
@@ -1376,7 +1366,10 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
1376
1366
  }
1377
1367
  }
1378
1368
  var groupId = "default";
1379
- if (eachAttribute.groupId && !(cellInput === null || cellInput === void 0 ? void 0 : cellInput.active))
1369
+ if (eachAttribute.groupId &&
1370
+ !(cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) &&
1371
+ (eachAttribute.type !== "listObject" ||
1372
+ eachAttribute.listObjectApplyGroup === true))
1380
1373
  groupId = eachAttribute.groupId;
1381
1374
  if (!inputList[groupId])
1382
1375
  inputList[groupId] = [];
@@ -2012,17 +2005,19 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
2012
2005
  }, signatureClear: true, canvasContainerClassName: "shadow-none", infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, customElement: selectInputCustomElement })));
2013
2006
  break;
2014
2007
  case "listObject":
2015
- if (eachAttribute.listObjOrder || eachAttribute.listFlexTable) {
2008
+ if (eachAttribute.listObjectApplyGroup === true ||
2009
+ eachAttribute.listObjOrder ||
2010
+ eachAttribute.listFlexTable) {
2016
2011
  var flexTableRef = undefined;
2017
2012
  if (eachAttribute.listFlexTable) {
2018
- var flexTableRefIndex = model
2013
+ var flexTableRefIndex = ((_33 = objectProps === null || objectProps === void 0 ? void 0 : objectProps.flexTableModel) !== null && _33 !== void 0 ? _33 : model)
2019
2014
  .filter(function (m) { return m.type === "listObject" && m.listFlexTable; })
2020
2015
  .findIndex(function (m) { return m.id === eachAttribute.id; });
2021
2016
  if (flexTableRefIndex >= 0 && (objectProps === null || objectProps === void 0 ? void 0 : objectProps.flexTableRefs)) {
2022
2017
  flexTableRef = objectProps.flexTableRefs[flexTableRefIndex];
2023
2018
  }
2024
2019
  }
2025
- inputList[groupId].push((0, exports.renderEachListObject)((_33 = props === null || props === void 0 ? void 0 : props.type) !== null && _33 !== void 0 ? _33 : "read", eachAttribute.id, model, data, (_34 = props === null || props === void 0 ? void 0 : props.id) !== null && _34 !== void 0 ? _34 : "", (props === null || props === void 0 ? void 0 : props.remainId) ? false : true, isForm ? false : true, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.organiseListObjTableView) ? true : false, referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.devSettings, objectProps === null || objectProps === void 0 ? void 0 : objectProps.handleSelectListObjectData, referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.referencesOptions, objectProps === null || objectProps === void 0 ? void 0 : objectProps.setSelectedObjectStructureId, objectProps === null || objectProps === void 0 ? void 0 : objectProps.handlePopUpModal, objectProps === null || objectProps === void 0 ? void 0 : objectProps.setSelectedData, flexTableRef, undefined));
2020
+ inputList[groupId].push((0, exports.renderEachListObject)((_34 = props === null || props === void 0 ? void 0 : props.type) !== null && _34 !== void 0 ? _34 : "read", eachAttribute.id, model, data, (_35 = props === null || props === void 0 ? void 0 : props.id) !== null && _35 !== void 0 ? _35 : "", (props === null || props === void 0 ? void 0 : props.remainId) ? false : true, isForm ? false : true, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.organiseListObjTableView) ? true : false, referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.devSettings, objectProps === null || objectProps === void 0 ? void 0 : objectProps.handleSelectListObjectData, referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.referencesOptions, objectProps === null || objectProps === void 0 ? void 0 : objectProps.setSelectedObjectStructureId, objectProps === null || objectProps === void 0 ? void 0 : objectProps.handlePopUpModal, objectProps === null || objectProps === void 0 ? void 0 : objectProps.setSelectedData, flexTableRef, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode }));
2026
2021
  }
2027
2022
  break;
2028
2023
  case "canvas":
@@ -2038,20 +2033,20 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
2038
2033
  normalizedDrawings = [];
2039
2034
  }
2040
2035
  else {
2041
- normalizedTexts = (_35 = canvasData.texts) !== null && _35 !== void 0 ? _35 : [];
2042
- normalizedDrawings = (_36 = canvasData.drawings) !== null && _36 !== void 0 ? _36 : [];
2036
+ normalizedTexts = (_36 = canvasData.texts) !== null && _36 !== void 0 ? _36 : [];
2037
+ normalizedDrawings = (_37 = canvasData.drawings) !== null && _37 !== void 0 ? _37 : [];
2043
2038
  }
2044
2039
  }
2045
2040
  else {
2046
2041
  // Old format: expect texts[] array
2047
2042
  normalizedTexts = Array.isArray(canvasData)
2048
2043
  ? canvasData
2049
- : ((_37 = canvasData === null || canvasData === void 0 ? void 0 : canvasData.texts) !== null && _37 !== void 0 ? _37 : []);
2044
+ : ((_38 = canvasData === null || canvasData === void 0 ? void 0 : canvasData.texts) !== null && _38 !== void 0 ? _38 : []);
2050
2045
  normalizedDrawings = [];
2051
2046
  }
2052
2047
  inputList[groupId].push(react_1.default.createElement(canvas_1.Canvas, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
2053
2048
  ? null
2054
- : formInputRef[(_38 = eachAttribute.refIndex) !== null && _38 !== void 0 ? _38 : index], id: eachAttribute.id, label: label, labelExtra: labelExtra, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, customElement: selectInputCustomElement, optional: isOptional, enableDraw: (props === null || props === void 0 ? void 0 : props.type) === "update" ? eachAttribute.enableDraw : false, enableImageUpload: (props === null || props === void 0 ? void 0 : props.type) === "update" ? eachAttribute.enableImageUpload : false, readOnly: (props === null || props === void 0 ? void 0 : props.type) !== "update", texts: normalizedTexts, drawings: normalizedDrawings, backgroundImageUrl: eachAttribute.enableImageUpload &&
2049
+ : formInputRef[(_39 = eachAttribute.refIndex) !== null && _39 !== void 0 ? _39 : index], id: eachAttribute.id, label: label, labelExtra: labelExtra, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, customElement: selectInputCustomElement, optional: isOptional, enableDraw: (props === null || props === void 0 ? void 0 : props.type) === "update" ? eachAttribute.enableDraw : false, enableImageUpload: (props === null || props === void 0 ? void 0 : props.type) === "update" ? eachAttribute.enableImageUpload : false, readOnly: (props === null || props === void 0 ? void 0 : props.type) !== "update", texts: normalizedTexts, drawings: normalizedDrawings, backgroundImageUrl: eachAttribute.enableImageUpload &&
2055
2050
  canvasData &&
2056
2051
  !Array.isArray(canvasData) &&
2057
2052
  canvasData.backgroundImage
@@ -2059,17 +2054,17 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
2059
2054
  // If it has file but no token, create blob URL from File object
2060
2055
  canvasData.backgroundImage.token
2061
2056
  ? (props === null || props === void 0 ? void 0 : props.isObjectList)
2062
- ? (0, blobModule_1.renderImageUrlFromPath)((_39 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _39 !== void 0 ? _39 : "", eachAttribute.imageCollectionName + "%2F" + props.id, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId) +
2057
+ ? (0, blobModule_1.renderImageUrlFromPath)((_40 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _40 !== void 0 ? _40 : "", eachAttribute.imageCollectionName + "%2F" + props.id, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId) +
2063
2058
  "%2F" +
2064
2059
  (objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectId) +
2065
2060
  "%2F" +
2066
2061
  eachAttribute.id, canvasData.backgroundImage.fileName, canvasData.backgroundImage.token, fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageBucketName)
2067
2062
  : (props === null || props === void 0 ? void 0 : props.isObject)
2068
- ? (0, blobModule_1.renderImageUrlFromPath)((_40 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _40 !== void 0 ? _40 : "", eachAttribute.imageCollectionName + "%2F" + props.id, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId) +
2063
+ ? (0, blobModule_1.renderImageUrlFromPath)((_41 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _41 !== void 0 ? _41 : "", eachAttribute.imageCollectionName + "%2F" + props.id, (objectProps === null || objectProps === void 0 ? void 0 : objectProps.selectedObjectStructureId) +
2069
2064
  "%2F" +
2070
2065
  eachAttribute.id +
2071
2066
  "%2FbaseCanvas", canvasData.backgroundImage.fileName, canvasData.backgroundImage.token, fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageBucketName)
2072
- : (0, blobModule_1.renderImageUrlFromPath)((_41 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _41 !== void 0 ? _41 : "", (_42 = eachAttribute.imageCollectionName) !== null && _42 !== void 0 ? _42 : "", ((_43 = props === null || props === void 0 ? void 0 : props.id) !== null && _43 !== void 0 ? _43 : "") + "%2FbaseCanvas", canvasData.backgroundImage.fileName, canvasData.backgroundImage.token, fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageBucketName)
2067
+ : (0, blobModule_1.renderImageUrlFromPath)((_42 = fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint) !== null && _42 !== void 0 ? _42 : "", (_43 = eachAttribute.imageCollectionName) !== null && _43 !== void 0 ? _43 : "", ((_44 = props === null || props === void 0 ? void 0 : props.id) !== null && _44 !== void 0 ? _44 : "") + "%2FbaseCanvas", canvasData.backgroundImage.fileName, canvasData.backgroundImage.token, fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageBucketName)
2073
2068
  : canvasData.backgroundImage.file &&
2074
2069
  canvasData.backgroundImage.file instanceof File
2075
2070
  ? // Image hasn't been uploaded yet - use cached blob URL from File object
@@ -2186,7 +2181,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
2186
2181
  } }));
2187
2182
  break;
2188
2183
  case "ganttchart":
2189
- inputList[groupId].push(react_1.default.createElement(ganttChart_1.GanttChart, { id: eachAttribute.id, title: label, label: label, labelExtra: labelExtra, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, tasks: (_44 = clonedSelectedData[eachAttribute.id]) !== null && _44 !== void 0 ? _44 : [], onTaskChange: function (tasks) {
2184
+ inputList[groupId].push(react_1.default.createElement(ganttChart_1.GanttChart, { id: eachAttribute.id, title: label, label: label, labelExtra: labelExtra, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, tasks: (_45 = clonedSelectedData[eachAttribute.id]) !== null && _45 !== void 0 ? _45 : [], onTaskChange: function (tasks) {
2190
2185
  updateMethod.handleOnChangeSelect(eachAttribute.id, tasks);
2191
2186
  }, mode: "write", chartOnly: true }));
2192
2187
  break;