blixify-ui-web 1.2.181 → 1.2.182

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/data/dataTemplate/activityChanges.d.ts.map +1 -1
  2. package/lib/components/data/dataTemplate/activityChanges.js +1 -0
  3. package/lib/components/data/dataTemplate/activityChanges.js.map +1 -1
  4. package/lib/components/data/dataTemplate/index.d.ts +1 -0
  5. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  6. package/lib/components/data/dataTemplate/index.js +502 -246
  7. package/lib/components/data/dataTemplate/index.js.map +1 -1
  8. package/lib/components/data/dataTemplate/model.d.ts +11 -2
  9. package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
  10. package/lib/components/data/flexFilter/index.d.ts.map +1 -1
  11. package/lib/components/data/flexFilter/index.js +41 -14
  12. package/lib/components/data/flexFilter/index.js.map +1 -1
  13. package/lib/components/data/formula/builder.d.ts +19 -0
  14. package/lib/components/data/formula/builder.d.ts.map +1 -0
  15. package/lib/components/data/formula/builder.js +189 -0
  16. package/lib/components/data/formula/builder.js.map +1 -0
  17. package/lib/components/data/formula/functions.d.ts +22 -0
  18. package/lib/components/data/formula/functions.d.ts.map +1 -0
  19. package/lib/components/data/formula/functions.js +773 -0
  20. package/lib/components/data/formula/functions.js.map +1 -0
  21. package/lib/components/data/formula/index.d.ts +75 -0
  22. package/lib/components/data/formula/index.d.ts.map +1 -0
  23. package/lib/components/data/formula/index.js +801 -0
  24. package/lib/components/data/formula/index.js.map +1 -0
  25. package/lib/components/data/listModule.d.ts.map +1 -1
  26. package/lib/components/data/listModule.js +7 -1
  27. package/lib/components/data/listModule.js.map +1 -1
  28. package/lib/components/data/readModule.d.ts.map +1 -1
  29. package/lib/components/data/readModule.js +25 -2
  30. package/lib/components/data/readModule.js.map +1 -1
  31. package/lib/components/data/utils.d.ts.map +1 -1
  32. package/lib/components/data/utils.js +4 -0
  33. package/lib/components/data/utils.js.map +1 -1
  34. package/lib/components/display/newTable/index.d.ts +1 -0
  35. package/lib/components/display/newTable/index.d.ts.map +1 -1
  36. package/lib/components/display/newTable/index.js +85 -30
  37. package/lib/components/display/newTable/index.js.map +1 -1
  38. package/lib/tail.css +1 -1
  39. package/package.json +1 -1
@@ -94,6 +94,8 @@ var iconButton_1 = require("../../action/iconButton");
94
94
  var textButton_1 = require("../../action/textButton");
95
95
  var collapse_1 = require("../../advanced/collapse");
96
96
  var popUp_1 = require("../../advanced/popUp");
97
+ var formula_1 = require("../../data/formula");
98
+ var builder_1 = require("../../data/formula/builder");
97
99
  var readModule_1 = require("../../data/readModule");
98
100
  var updateModule_1 = require("../../data/updateModule");
99
101
  var utils_1 = require("../../data/utils");
@@ -177,6 +179,8 @@ var ADD_COLUMN_TYPES = [
177
179
  { key: "textArea", label: "Long text" },
178
180
  { key: "markdown", label: "Markdown" },
179
181
  { key: "number", label: "Number" },
182
+ // INFO: a monday-style formula, built in the formula builder
183
+ { key: "formula", label: "Formula" },
180
184
  { key: "boolean", label: "Yes / No" },
181
185
  { key: "date", label: "Date" },
182
186
  { key: "list", label: "Single select" },
@@ -365,19 +369,22 @@ var NewTable = function (props) {
365
369
  var _10 = (0, react_2.useState)(""), newColumnOptions = _10[0], setNewColumnOptions = _10[1];
366
370
  var _11 = (0, react_2.useState)(false), newColumnRequired = _11[0], setNewColumnRequired = _11[1];
367
371
  var _12 = (0, react_2.useState)(false), addingColumn = _12[0], setAddingColumn = _12[1];
372
+ // INFO: the formula as shown in the builder — column names, not ids
373
+ var _13 = (0, react_2.useState)(""), newColumnFormula = _13[0], setNewColumnFormula = _13[1];
374
+ var addColumnPopUpRef = (0, react_2.useRef)(null);
368
375
  // INFO: the column being changed — empty while the panel adds a new one
369
- var _13 = (0, react_2.useState)(null), editingColumn = _13[0], setEditingColumn = _13[1];
376
+ var _14 = (0, react_2.useState)(null), editingColumn = _14[0], setEditingColumn = _14[1];
370
377
  //=====================================================================================
371
378
  // SECTION: Editable & Addable cells
372
379
  //=====================================================================================
373
- var _14 = (0, react_2.useState)(""), editDataRowId = _14[0], setEditDataRowId = _14[1];
374
- var _15 = (0, react_2.useState)(""), editDataHeaderKey = _15[0], setEditDataHeaderKey = _15[1];
380
+ var _15 = (0, react_2.useState)(""), editDataRowId = _15[0], setEditDataRowId = _15[1];
381
+ var _16 = (0, react_2.useState)(""), editDataHeaderKey = _16[0], setEditDataHeaderKey = _16[1];
375
382
  // INFO: an editable table used to mount an input in every cell — it read as a
376
383
  // form, and a row click always landed on a child input. Only the hovered cell
377
384
  // becomes its input now.
378
- var _16 = (0, react_2.useState)(null), hoveredCell = _16[0], setHoveredCell = _16[1];
379
- var _17 = (0, react_2.useState)(false), modalEditVisible = _17[0], setModalEditVisible = _17[1];
380
- var _18 = (0, react_2.useState)([]), collapsedGroupIds = _18[0], setCollapsedGroupIds = _18[1];
385
+ var _17 = (0, react_2.useState)(null), hoveredCell = _17[0], setHoveredCell = _17[1];
386
+ var _18 = (0, react_2.useState)(false), modalEditVisible = _18[0], setModalEditVisible = _18[1];
387
+ var _19 = (0, react_2.useState)([]), collapsedGroupIds = _19[0], setCollapsedGroupIds = _19[1];
381
388
  // INFO: per-group scroll pagination. One sentinel element per band, observed
382
389
  // by a single IntersectionObserver that fires props.onGroupLoadMore when a
383
390
  // band's sentinel scrolls into view. The debounce guard stops repeat fires
@@ -393,25 +400,25 @@ var NewTable = function (props) {
393
400
  var lastSelectedRowRef = (0, react_2.useRef)(null);
394
401
  var dragSelectRef = (0, react_2.useRef)(null);
395
402
  var suppressNextClickRef = (0, react_2.useRef)(false);
396
- var _19 = (0, react_2.useState)(false), isDragSelecting = _19[0], setIsDragSelecting = _19[1];
397
- var _20 = (0, react_2.useState)(0), copiedCount = _20[0], setCopiedCount = _20[1];
398
- var _21 = (0, react_2.useState)({}), editDataValue = _21[0], setEditDataValue = _21[1];
399
- var _22 = (0, react_2.useState)(false), editDataIsLoading = _22[0], setEditDataIsLoading = _22[1];
403
+ var _20 = (0, react_2.useState)(false), isDragSelecting = _20[0], setIsDragSelecting = _20[1];
404
+ var _21 = (0, react_2.useState)(0), copiedCount = _21[0], setCopiedCount = _21[1];
405
+ var _22 = (0, react_2.useState)({}), editDataValue = _22[0], setEditDataValue = _22[1];
406
+ var _23 = (0, react_2.useState)(false), editDataIsLoading = _23[0], setEditDataIsLoading = _23[1];
400
407
  // INFO: true while the empty bottom row is being filled in; the row itself is
401
408
  // always there in an addable table
402
- var _23 = (0, react_2.useState)(false), addData = _23[0], setAddData = _23[1];
403
- var _24 = (0, react_2.useState)({}), addDataValue = _24[0], setAddDataValue = _24[1];
409
+ var _24 = (0, react_2.useState)(false), addData = _24[0], setAddData = _24[1];
410
+ var _25 = (0, react_2.useState)({}), addDataValue = _25[0], setAddDataValue = _25[1];
404
411
  // INFO: bumped after each saved row, so the next one starts with fresh
405
412
  // inputs and its first cell takes the focus
406
- var _25 = (0, react_2.useState)(0), addRowKey = _25[0], setAddRowKey = _25[1];
407
- var _26 = (0, react_2.useState)({}), referencesOptions = _26[0], setReferencesOptions = _26[1];
413
+ var _26 = (0, react_2.useState)(0), addRowKey = _26[0], setAddRowKey = _26[1];
414
+ var _27 = (0, react_2.useState)({}), referencesOptions = _27[0], setReferencesOptions = _27[1];
408
415
  // INFO: seeded options sit under the local map so a cell's own search
409
416
  // results still win per key
410
417
  var mergedReferencesOptions = __assign(__assign({}, ((_l = props.referencesOptions) !== null && _l !== void 0 ? _l : {})), referencesOptions);
411
- var _27 = (0, react_2.useState)({}), referencesDetails = _27[0], setReferencesDetails = _27[1];
412
- var _28 = (0, react_2.useState)(false), referenceLoading = _28[0], setReferenceLoading = _28[1];
418
+ var _28 = (0, react_2.useState)({}), referencesDetails = _28[0], setReferencesDetails = _28[1];
419
+ var _29 = (0, react_2.useState)(false), referenceLoading = _29[0], setReferenceLoading = _29[1];
413
420
  // INFO: measured pixel widths for pinned columns without an explicit width.
414
- var _29 = (0, react_2.useState)({}), measuredPinWidths = _29[0], setMeasuredPinWidths = _29[1];
421
+ var _30 = (0, react_2.useState)({}), measuredPinWidths = _30[0], setMeasuredPinWidths = _30[1];
415
422
  var editDataValueRef = (0, react_2.useRef)({});
416
423
  var editDataRowIdRef = (0, react_2.useRef)("");
417
424
  var editDataHeaderKeyRef = (0, react_2.useRef)("");
@@ -1036,7 +1043,7 @@ var NewTable = function (props) {
1036
1043
  // resize is a per-viewer preference and there is no storage for it yet.
1037
1044
  // Tailwind cannot emit a runtime w-[Npx], so this drives an inline style and
1038
1045
  // wins over the col.width class.
1039
- var _30 = (0, react_2.useState)({}), columnWidths = _30[0], setColumnWidths = _30[1];
1046
+ var _31 = (0, react_2.useState)({}), columnWidths = _31[0], setColumnWidths = _31[1];
1040
1047
  var resizeRef = (0, react_2.useRef)(null);
1041
1048
  // INFO: a consumer may deliberately set a column narrower than the default
1042
1049
  // floor (a 40px icon column, say) — never force it wider than it was asked to
@@ -1102,7 +1109,7 @@ var NewTable = function (props) {
1102
1109
  });
1103
1110
  };
1104
1111
  var renderAddColumnPanel = function () {
1105
- var _a, _b, _c, _d, _e, _f, _g, _h;
1112
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1106
1113
  // INFO: a caller that renders its own form keeps full control; the
1107
1114
  // built-in one only appears when it hands over onAddColumn instead
1108
1115
  if ((_a = props.advSettings) === null || _a === void 0 ? void 0 : _a.renderAddColumnElements)
@@ -1117,8 +1124,9 @@ var NewTable = function (props) {
1117
1124
  react_2.default.createElement(textInput_1.TextInput, { id: "newColumnName", type: "text", label: "Column name", placeholder: "Order Date", value: newColumnName, darkMode: props.darkMode, onChange: function (event) { var _a, _b; return setNewColumnName((_b = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ""); } }),
1118
1125
  !editingColumn && (react_2.default.createElement("div", { className: "-mt-2" },
1119
1126
  react_2.default.createElement("p", { className: "text-xs text-gray-500" }, derivedId ? (react_2.default.createElement(react_2.default.Fragment, null,
1120
- "Saved on each record as",
1121
- " ",
1127
+ newColumnType === "formula"
1128
+ ? "Column id "
1129
+ : "Saved on each record as ",
1122
1130
  react_2.default.createElement("span", { className: "font-mono font-medium" }, derivedId),
1123
1131
  taken ? " — already used by another column" : "")) : ("The field id is generated from the name")))),
1124
1132
  react_2.default.createElement(select_1.Select, { id: "newColumnType", label: "Type", value: newColumnType, darkMode: props.darkMode, options: editingColumn
@@ -1126,7 +1134,16 @@ var NewTable = function (props) {
1126
1134
  return (0, exports.handleGetEditableColumnTypes)(editingColumn.type).includes(eachType.key);
1127
1135
  })
1128
1136
  : ADD_COLUMN_TYPES, disabled: !!editingColumn &&
1129
- (0, exports.handleGetEditableColumnTypes)(editingColumn.type).length < 2, portalDropdown: true, onChange: function (value) { return setNewColumnType(value); } }),
1137
+ (0, exports.handleGetEditableColumnTypes)(editingColumn.type).length < 2, portalDropdown: true, onChange: function (value) {
1138
+ var _a;
1139
+ setNewColumnType(value);
1140
+ // INFO: the formula builder needs a modal's room, as monday opens
1141
+ // its builder — the popup hands over what was typed and closes
1142
+ if (value === "formula" && !addColumnModal) {
1143
+ (_a = addColumnPopUpRef.current) === null || _a === void 0 ? void 0 : _a.handleOnClose();
1144
+ setAddColumnModal("new");
1145
+ }
1146
+ } }),
1130
1147
  REFERENCE_TYPES.includes(newColumnType) &&
1131
1148
  ((_c = props.advSettings) === null || _c === void 0 ? void 0 : _c.renderReferenceSpaceOptions) && (react_2.default.createElement(react_2.default.Fragment, null,
1132
1149
  react_2.default.createElement(select_1.Select, { id: "newColumnRefSpace", label: "Reference endpoint", value: newColumnRefSpace, darkMode: props.darkMode, portalDropdown: true, options: (_d = props.advSettings.renderReferenceSpaceOptions()) !== null && _d !== void 0 ? _d : [], onChange: function (value) {
@@ -1144,13 +1161,14 @@ var NewTable = function (props) {
1144
1161
  return eachOption.includes(",");
1145
1162
  }), onChange: function (event) { var _a, _b; return setNewColumnOptions((_b = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ""); } })),
1146
1163
  ASSET_TYPES.includes(newColumnType) && (react_2.default.createElement("p", { className: "-mt-2 text-xs text-gray-500" }, "Uploads are stored against this space automatically.")),
1147
- react_2.default.createElement(checkbox_1.Checkbox, { id: "newColumnRequired",
1164
+ newColumnType === "formula" && (react_2.default.createElement(builder_1.FormulaBuilder, { value: newColumnFormula, schema: handleGetFormulaSchema(), columnId: editingColumn === null || editingColumn === void 0 ? void 0 : editingColumn.id, previewRow: (_j = props.data) === null || _j === void 0 ? void 0 : _j[0], previewDisplayRow: (_k = props.spaceData) === null || _k === void 0 ? void 0 : _k[0], darkMode: props.darkMode, onChange: setNewColumnFormula })),
1165
+ newColumnType !== "formula" && (react_2.default.createElement(checkbox_1.Checkbox, { id: "newColumnRequired",
1148
1166
  // INFO: the checkbox itself is not a required field — without this it
1149
1167
  // renders "Required *", which reads as a validation error on a toggle
1150
1168
  optional: true, darkMode: props.darkMode, itemList: [{ key: "required", label: "Required" }], selectItemList: newColumnRequired ? ["required"] : [], onChange: function (items) {
1151
1169
  return setNewColumnRequired(items.includes("required"));
1152
- } }),
1153
- newColumnRequired && !editingColumn && (react_2.default.createElement("p", { className: "-mt-3 text-xs text-gray-500" }, "Rows already in this table have no value for it yet.")),
1170
+ } })),
1171
+ newColumnType !== "formula" && newColumnRequired && !editingColumn && (react_2.default.createElement("p", { className: "-mt-3 text-xs text-gray-500" }, "Rows already in this table have no value for it yet.")),
1154
1172
  react_2.default.createElement("div", { className: "flex flex-row justify-end gap-x-2" },
1155
1173
  react_2.default.createElement(button_1.Button, { type: "light", text: "Cancel", onClick: function () { return handleAddColumnModal(""); } }),
1156
1174
  react_2.default.createElement(button_1.Button, { type: "normal", text: editingColumn
@@ -1177,6 +1195,9 @@ var NewTable = function (props) {
1177
1195
  setNewColumnRefLabel((_f = schema.referenceLabel) !== null && _f !== void 0 ? _f : "");
1178
1196
  setNewColumnOptions(handleJoinOptions((_g = schema.listSelection) !== null && _g !== void 0 ? _g : []));
1179
1197
  setNewColumnRequired(!schema.optional);
1198
+ setNewColumnFormula(schema.type === "formula"
1199
+ ? (0, formula_1.handleGetFormulaDisplay)(schema, handleGetFormulaSchema())
1200
+ : "");
1180
1201
  setAddColumnModal(columnId);
1181
1202
  };
1182
1203
  var handleAddColumnModal = function (id) {
@@ -1189,6 +1210,7 @@ var NewTable = function (props) {
1189
1210
  setNewColumnRefLabel("");
1190
1211
  setNewColumnOptions("");
1191
1212
  setNewColumnRequired(false);
1213
+ setNewColumnFormula("");
1192
1214
  }
1193
1215
  };
1194
1216
  // INFO: the stored field id is derived from what the user types rather than
@@ -1208,11 +1230,36 @@ var NewTable = function (props) {
1208
1230
  var handleColumnIdTaken = function (id) {
1209
1231
  return flatColumns.some(function (eachColumn) { return eachColumn.key === id; });
1210
1232
  };
1233
+ // INFO: every column a formula may read. The full model when the caller
1234
+ // gives it — hidden columns are still on the row — else the shown columns.
1235
+ var handleGetFormulaSchema = function () {
1236
+ var _a, _b;
1237
+ var schema = (_b = (_a = props.advSettings) === null || _a === void 0 ? void 0 : _a.getSchema) === null || _b === void 0 ? void 0 : _b.call(_a);
1238
+ if (schema)
1239
+ return schema;
1240
+ return flatColumns
1241
+ .filter(function (eachColumn) { return eachColumn.key !== "update"; })
1242
+ .map(function (eachColumn) {
1243
+ var _a, _b, _c, _d;
1244
+ return (_c = (_b = (_a = props.advSettings) === null || _a === void 0 ? void 0 : _a.getColumnSchema) === null || _b === void 0 ? void 0 : _b.call(_a, eachColumn.key)) !== null && _c !== void 0 ? _c : {
1245
+ id: eachColumn.key,
1246
+ name: eachColumn.title,
1247
+ type: (_d = eachColumn.type) !== null && _d !== void 0 ? _d : "string",
1248
+ };
1249
+ });
1250
+ };
1211
1251
  // INFO: a reference with no target resolves nothing, so it cannot be saved
1212
1252
  // half-built. Everything else is complete with a name and a type.
1213
1253
  var handleIsNewColumnReady = function () {
1214
1254
  if (REFERENCE_TYPES.includes(newColumnType))
1215
1255
  return !!newColumnRefSpace && !!newColumnRefLabel;
1256
+ // INFO: an illegal formula would show "Error" in every row
1257
+ if (newColumnType === "formula") {
1258
+ if (!newColumnFormula.trim())
1259
+ return false;
1260
+ var schema = handleGetFormulaSchema();
1261
+ return !(0, formula_1.handleValidateFormula)((0, formula_1.handleFormulaToStorage)(newColumnFormula, schema), schema);
1262
+ }
1216
1263
  return true;
1217
1264
  };
1218
1265
  var handleSubmitNewColumn = function () { return __awaiter(void 0, void 0, void 0, function () {
@@ -1252,6 +1299,10 @@ var NewTable = function (props) {
1252
1299
  .split(",")
1253
1300
  .map(function (eachOption) { return eachOption.trim(); })
1254
1301
  .filter(Boolean);
1302
+ if (newColumnType === "formula") {
1303
+ column.formulaExpression = (0, formula_1.handleFormulaToStorage)(newColumnFormula.trim(), handleGetFormulaSchema());
1304
+ column.optional = true;
1305
+ }
1255
1306
  return [4 /*yield*/, ((_b = (_a = props.advSettings) === null || _a === void 0 ? void 0 : _a.onAddColumn) === null || _b === void 0 ? void 0 : _b.call(_a, column))];
1256
1307
  case 4:
1257
1308
  _c.sent();
@@ -1319,6 +1370,10 @@ var NewTable = function (props) {
1319
1370
  delete column_1.listSelectionColour;
1320
1371
  delete column_1.listSelectionLabel;
1321
1372
  }
1373
+ if (newColumnType === "formula") {
1374
+ column_1.formulaExpression = (0, formula_1.handleFormulaToStorage)(newColumnFormula.trim(), handleGetFormulaSchema());
1375
+ column_1.optional = true;
1376
+ }
1322
1377
  return [4 /*yield*/, ((_d = (_c = props.advSettings) === null || _c === void 0 ? void 0 : _c.onEditColumn) === null || _d === void 0 ? void 0 : _d.call(_c, column_1))];
1323
1378
  case 2:
1324
1379
  _e.sent();
@@ -2257,14 +2312,14 @@ var NewTable = function (props) {
2257
2312
  var filterColumnEnabled = utils_1.supportedAQList.includes((_b = col.type) !== null && _b !== void 0 ? _b : "");
2258
2313
  if (sortColumnEnabled && (advSettings === null || advSettings === void 0 ? void 0 : advSettings.sortEnabled)) {
2259
2314
  if (col.key !== ((_c = advSettings.sortId) === null || _c === void 0 ? void 0 : _c.sortId)) {
2260
- sortIcon = (react_2.default.createElement(solid_2.ArrowsUpDownIcon, { className: sortClassname, onClick: function () { return handleSort(col.key, "new"); } }));
2315
+ sortIcon = (react_2.default.createElement(solid_2.ArrowsUpDownIcon, { "data-testid": "table-column-sort-".concat(col.key), className: sortClassname, onClick: function () { return handleSort(col.key, "new"); } }));
2261
2316
  }
2262
2317
  else if (col.key === advSettings.sortId.sortId) {
2263
2318
  if (advSettings.sortId.type === "desc") {
2264
- sortIcon = (react_2.default.createElement(solid_2.BarsArrowDownIcon, { className: sortClassname, onClick: function () { return handleSort(col.key, "asc"); } }));
2319
+ sortIcon = (react_2.default.createElement(solid_2.BarsArrowDownIcon, { "data-testid": "table-column-sort-".concat(col.key), className: sortClassname, onClick: function () { return handleSort(col.key, "asc"); } }));
2265
2320
  }
2266
2321
  else if (advSettings.sortId.type === "asc") {
2267
- sortIcon = (react_2.default.createElement(solid_2.BarsArrowUpIcon, { className: sortClassname, onClick: function () { return handleSort(col.key, "desc"); } }));
2322
+ sortIcon = (react_2.default.createElement(solid_2.BarsArrowUpIcon, { "data-testid": "table-column-sort-".concat(col.key), className: sortClassname, onClick: function () { return handleSort(col.key, "desc"); } }));
2268
2323
  }
2269
2324
  }
2270
2325
  }
@@ -2291,7 +2346,7 @@ var NewTable = function (props) {
2291
2346
  // this reason.
2292
2347
  className: "".concat(cellPadding, " w-px whitespace-nowrap text-left text-xs font-semibold uppercase tracking-wide ").concat(cursorClassname) },
2293
2348
  react_2.default.createElement("div", { className: "hidden flex-row items-center md:flex" },
2294
- react_2.default.createElement(popUp_1.PopUp, { darkMode: props.darkMode, darkModeBg: props.darkModeBg, anchor: "right", portal: true, lib: { Transition: react_1.Transition }, excludePortalIds: ["select-portal"], ctaComp: react_2.default.createElement(iconButton_1.IconButton, { testId: "table-add-column-btn", icon: react_2.default.createElement(solid_1.PlusIcon, { className: "h-5 w-5 text-gray" }) }), renderComp: react_2.default.createElement("div", { className: "w-80 p-4 normal-case tracking-normal" }, renderAddColumnPanel()) })),
2349
+ react_2.default.createElement(popUp_1.PopUp, { ref: addColumnPopUpRef, darkMode: props.darkMode, darkModeBg: props.darkModeBg, anchor: "right", portal: true, lib: { Transition: react_1.Transition }, excludePortalIds: ["select-portal"], ctaComp: react_2.default.createElement(iconButton_1.IconButton, { testId: "table-add-column-btn", icon: react_2.default.createElement(solid_1.PlusIcon, { className: "h-5 w-5 text-gray" }) }), renderComp: react_2.default.createElement("div", { className: "w-80 p-4 normal-case tracking-normal" }, renderAddColumnPanel()) })),
2295
2350
  react_2.default.createElement("div", { className: "flex flex-row items-center md:hidden" },
2296
2351
  react_2.default.createElement(iconButton_1.IconButton, { testId: "table-add-column-btn-mobile", icon: react_2.default.createElement(solid_1.PlusIcon, { className: "h-5 w-5 text-gray" }), onClick: function () { return handleAddColumnModal("new"); } }))));
2297
2352
  };
@@ -2577,7 +2632,7 @@ var NewTable = function (props) {
2577
2632
  react_2.default.createElement(button_1.Button, { text: "Cancel", type: "light", onClick: handleModalEditClose }),
2578
2633
  react_2.default.createElement(button_1.Button, { text: editDataIsLoading ? "Saving" : "Save", type: "normal", disable: editDataIsLoading, onClick: handleModalEditSave }))));
2579
2634
  } }),
2580
- react_2.default.createElement(modal_1.Modal, { open: addColumnModal ? true : false, title: editingColumn ? "Edit Column" : "Add Column", renderContent: renderAddColumnPanel, onClose: function () { return handleAddColumnModal(""); } }),
2635
+ react_2.default.createElement(modal_1.Modal, { open: addColumnModal ? true : false, maxWidth: newColumnType === "formula" ? "2xl" : undefined, title: editingColumn ? "Edit Column" : "Add Column", renderContent: renderAddColumnPanel, onClose: function () { return handleAddColumnModal(""); } }),
2581
2636
  react_2.default.createElement(scrollShadow_1.ScrollShadow, { className: "w-full overflow-x-auto ".concat(isFlat
2582
2637
  ? ""
2583
2638
  : "".concat(borderRadius, " border ").concat(borderColor, " ").concat(bgColor, " shadow-sm")), darkMode: props.darkMode },