blixify-ui-web 1.2.253 → 1.2.255
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.
- package/lib/components/data/columnTypes/lookup.d.ts +12 -4
- package/lib/components/data/columnTypes/lookup.d.ts.map +1 -1
- package/lib/components/data/columnTypes/lookup.js +22 -5
- package/lib/components/data/columnTypes/lookup.js.map +1 -1
- package/lib/components/data/dataTemplate/chartBuilder.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/chartBuilder.js +19 -7
- package/lib/components/data/dataTemplate/chartBuilder.js.map +1 -1
- package/lib/components/data/dataTemplate/chartView.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/chartView.js +5 -1
- package/lib/components/data/dataTemplate/chartView.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +28 -13
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.js +8 -1
- package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.d.ts +2 -5
- package/lib/components/data/dataTemplate/viewStatePersistence.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.js +15 -4
- package/lib/components/data/dataTemplate/viewStatePersistence.js.map +1 -1
- package/lib/components/data/flexFilter/index.d.ts.map +1 -1
- package/lib/components/data/flexFilter/index.js +5 -2
- package/lib/components/data/flexFilter/index.js.map +1 -1
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +13 -12
- package/lib/components/data/listModule.js.map +1 -1
- package/lib/components/data/readModule.d.ts +3 -0
- package/lib/components/data/readModule.d.ts.map +1 -1
- package/lib/components/data/readModule.js +43 -18
- package/lib/components/data/readModule.js.map +1 -1
- package/lib/components/display/groupSection/index.d.ts +5 -0
- package/lib/components/display/groupSection/index.d.ts.map +1 -1
- package/lib/components/display/groupSection/index.js +35 -4
- package/lib/components/display/groupSection/index.js.map +1 -1
- package/lib/components/display/hoverTooltip/index.d.ts +22 -0
- package/lib/components/display/hoverTooltip/index.d.ts.map +1 -0
- package/lib/components/display/hoverTooltip/index.js +203 -0
- package/lib/components/display/hoverTooltip/index.js.map +1 -0
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +23 -23
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/components/display/newTable/tagLine.d.ts +12 -0
- package/lib/components/display/newTable/tagLine.d.ts.map +1 -0
- package/lib/components/display/newTable/tagLine.js +141 -0
- package/lib/components/display/newTable/tagLine.js.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +5 -2
- package/lib/components/index.js.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -99,6 +99,7 @@ var solid_1 = require("@heroicons/react/20/solid");
|
|
|
99
99
|
var outline_1 = require("@heroicons/react/24/outline");
|
|
100
100
|
var solid_2 = require("@heroicons/react/24/solid");
|
|
101
101
|
var axios_1 = __importDefault(require("axios"));
|
|
102
|
+
var hoverTooltip_1 = require("../hoverTooltip");
|
|
102
103
|
var react_2 = __importStar(require("react"));
|
|
103
104
|
var button_1 = require("../../action/button");
|
|
104
105
|
var iconButton_1 = require("../../action/iconButton");
|
|
@@ -129,6 +130,7 @@ var recordActions_1 = require("../recordActions");
|
|
|
129
130
|
var scrollShadow_1 = require("../scrollShadow");
|
|
130
131
|
var columnWidth_1 = require("./columnWidth");
|
|
131
132
|
var labelPicker_1 = require("./labelPicker");
|
|
133
|
+
var tagLine_1 = require("./tagLine");
|
|
132
134
|
var tag_1 = require("../tag");
|
|
133
135
|
var defaultColours_1 = require("../../data/columnTypes/defaultColours");
|
|
134
136
|
var personAvatar_1 = require("../../data/columnTypes/personAvatar");
|
|
@@ -383,8 +385,6 @@ var handleGetEditableColumnTypes = function (type) {
|
|
|
383
385
|
], ((_a = SAFE_TYPE_CHANGES[type]) !== null && _a !== void 0 ? _a : []), true);
|
|
384
386
|
};
|
|
385
387
|
exports.handleGetEditableColumnTypes = handleGetEditableColumnTypes;
|
|
386
|
-
// INFO: group band (tinted) — shared with the list and grid sections
|
|
387
|
-
var BAND_CLASS = groupSection_1.GROUP_BAND_CLASS;
|
|
388
388
|
// INFO: the cell padding is an !important class, which beats an inline
|
|
389
389
|
// padding, so the room for the title's actions is an !important class too —
|
|
390
390
|
// without it a squeezed title (a pinned column on a phone) runs under them
|
|
@@ -432,7 +432,9 @@ var ACCENT_CLASS = {
|
|
|
432
432
|
};
|
|
433
433
|
// INFO: the colour a list column assigns to a value, or undefined when the
|
|
434
434
|
// column carries no palette — undefined means "render as before"
|
|
435
|
-
// INFO: tags a closed multi-select cell shows before the rest become +N
|
|
435
|
+
// INFO: tags a closed multi-select cell shows before the rest become +N when
|
|
436
|
+
// its column is sized to its content, and before a column with a set width
|
|
437
|
+
// has been measured; once measured, that width decides how many show
|
|
436
438
|
var TAG_LINE_MAX = 2;
|
|
437
439
|
// INFO: listModule draws thumbnails, signatures and chip rows at the size the
|
|
438
440
|
// list, grid and kanban views show them; inside a table they are held to the
|
|
@@ -2743,19 +2745,14 @@ var NewTable = function (rawProps) {
|
|
|
2743
2745
|
var renderTagLine = function (col, value) {
|
|
2744
2746
|
var picks = (Array.isArray(value) ? value : value ? [value] : []).map(String);
|
|
2745
2747
|
if (!handleColumnShowsTags(col))
|
|
2746
|
-
return react_2.default.createElement(
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
className: "shrink-0 whitespace-nowrap ".concat(gridLines === "all" ? "!mx-0" : "") }));
|
|
2755
|
-
}),
|
|
2756
|
-
picks.length > shown.length && (react_2.default.createElement("span", { className: "shrink-0 text-xs text-gray-500" },
|
|
2757
|
-
"+",
|
|
2758
|
-
picks.length - shown.length))));
|
|
2748
|
+
return (react_2.default.createElement(hoverTooltip_1.HoverTooltip, { className: "min-w-0 truncate", onlyWhenClipped: true }, picks.join(", ")));
|
|
2749
|
+
return (react_2.default.createElement(tagLine_1.TagLine, { picks: picks, getColour: function (pick) { return handleGetListColour(col, pick); }, fallbackMax: TAG_LINE_MAX,
|
|
2750
|
+
// INFO: only a column with a set width (a set or dragged width, or a
|
|
2751
|
+
// pin) is fitted; one sized to its content keeps two tags and the count
|
|
2752
|
+
fit: handleIsReadCellFixed(col),
|
|
2753
|
+
// INFO: under gridLines="all" the row's gap-1 is the only space
|
|
2754
|
+
// between tags — Tag's own mx-1 doubled it to 12px
|
|
2755
|
+
tagClassName: gridLines === "all" ? "!mx-0" : "" }));
|
|
2759
2756
|
};
|
|
2760
2757
|
var renderEditDataInputs = function (colIndex, col, rowData, rowId, rowBgClass, isHoverable) {
|
|
2761
2758
|
var _a, _b, _c, _d;
|
|
@@ -2997,7 +2994,10 @@ var NewTable = function (rawProps) {
|
|
|
2997
2994
|
setAddLabelPicker({ key: ds.id, anchor: cell });
|
|
2998
2995
|
};
|
|
2999
2996
|
return (react_2.default.createElement("td", { key: ds.id + String(index), "data-add-cell": ds.id, "data-add-error": isMissing ? "" : undefined, className: "".concat(editCellPadding, " ").concat(handleCellMinWidth(ds.type), " text-sm ").concat(cellFontColor, " ").concat(isPicking ? "!shadow-[inset_0_0_0_2px_#9ca3af]" : isMissing ? "!shadow-[inset_0_0_0_2px_#fca5a5]" : "") },
|
|
3000
|
-
react_2.default.createElement("div", { "data-testid": "table-add-tag-line-".concat(ds.id), role: "button", "aria-haspopup": "dialog", "aria-expanded": isPicking, tabIndex: 0, "aria-label": "Pick ".concat(col.title),
|
|
2997
|
+
react_2.default.createElement("div", { "data-testid": "table-add-tag-line-".concat(ds.id), role: "button", "aria-haspopup": "dialog", "aria-expanded": isPicking, tabIndex: 0, "aria-label": "Pick ".concat(col.title),
|
|
2998
|
+
// INFO: width 0 in a column with a set width, as in the read cell,
|
|
2999
|
+
// so the picks never widen the column and fit to its set width
|
|
3000
|
+
className: "flex h-[34px] cursor-pointer items-center gap-1 overflow-hidden whitespace-nowrap ".concat(handleIsReadCellFixed(col) ? "w-0 min-w-full" : ""), onClick: function (e) { return handleOpen_1(e.currentTarget); }, onKeyDown: function (e) {
|
|
3001
3001
|
if (e.key !== "Enter" && e.key !== " ")
|
|
3002
3002
|
return;
|
|
3003
3003
|
e.preventDefault();
|
|
@@ -3609,7 +3609,7 @@ var NewTable = function (rawProps) {
|
|
|
3609
3609
|
handleCheckModalEditEmpty(cellValue) ? (
|
|
3610
3610
|
// INFO: an empty cell under gridLines="all" is blank,
|
|
3611
3611
|
// as every other empty cell of the grid is
|
|
3612
|
-
gridLines === "all" ? null : (react_2.default.createElement("span", { className: "text-gray-400 italic" }, "Add"))) : (react_2.default.createElement(
|
|
3612
|
+
gridLines === "all" ? null : (react_2.default.createElement("span", { className: "text-gray-400 italic" }, "Add"))) : (react_2.default.createElement(hoverTooltip_1.HoverTooltip, { className: "min-w-0 truncate", onlyWhenClipped: true }, (0, readModule_1.renderEachRowDataBasedOnDataType)(col.key, cellValue, props.bareSettings, true, props.disableEllipsisOnLongWord))),
|
|
3613
3613
|
react_2.default.createElement(outline_1.PencilIcon, { className: "w-3.5 h-3.5 text-gray-400 opacity-0 group-hover/modaledit:opacity-100 flex-shrink-0" }))));
|
|
3614
3614
|
}
|
|
3615
3615
|
if (isModalEdit) {
|
|
@@ -3628,7 +3628,7 @@ var NewTable = function (rawProps) {
|
|
|
3628
3628
|
handleCheckModalEditEmpty(cellValue) ? (
|
|
3629
3629
|
// INFO: an empty cell under gridLines="all" is blank,
|
|
3630
3630
|
// as every other empty cell of the grid is
|
|
3631
|
-
gridLines === "all" ? null : (react_2.default.createElement("span", { className: "text-gray-400 italic" }, "Add"))) : (react_2.default.createElement(
|
|
3631
|
+
gridLines === "all" ? null : (react_2.default.createElement("span", { className: "text-gray-400 italic" }, "Add"))) : (react_2.default.createElement(hoverTooltip_1.HoverTooltip, { className: "min-w-0 truncate", onlyWhenClipped: true }, (0, readModule_1.renderEachRowDataBasedOnDataType)(col.key, cellValue, props.bareSettings, true, props.disableEllipsisOnLongWord))),
|
|
3632
3632
|
react_2.default.createElement(outline_1.PencilIcon, { className: "w-3.5 h-3.5 text-gray-400 opacity-0 group-hover/modaledit:opacity-100 flex-shrink-0" }))));
|
|
3633
3633
|
}
|
|
3634
3634
|
// INFO: a multi-select shows its picks as one line of tags until it is
|
|
@@ -3734,7 +3734,7 @@ var NewTable = function (rawProps) {
|
|
|
3734
3734
|
handleEditDataOnClick(row.id, col.key, rowData);
|
|
3735
3735
|
});
|
|
3736
3736
|
}
|
|
3737
|
-
: undefined }, handleIsReadCellFixed(col) ? (react_2.default.createElement("div",
|
|
3737
|
+
: undefined }, handleIsReadCellFixed(col) ? (react_2.default.createElement(hoverTooltip_1.HoverTooltip, { as: "div", className: "w-0 min-w-full truncate", onlyWhenClipped: true }, renderReadCellValue(col, row, cellValue))) : (renderReadCellValue(col, row, cellValue))));
|
|
3738
3738
|
if (!isEditable || bareOverride)
|
|
3739
3739
|
return readCell;
|
|
3740
3740
|
if (isClickToEditCell)
|
|
@@ -3815,7 +3815,7 @@ var NewTable = function (rawProps) {
|
|
|
3815
3815
|
}
|
|
3816
3816
|
var indexById = new Map(props.data.map(function (row, index) { return [row.id, index]; }));
|
|
3817
3817
|
return props.groups.map(function (group) {
|
|
3818
|
-
var _a, _b, _c, _d
|
|
3818
|
+
var _a, _b, _c, _d;
|
|
3819
3819
|
var colourKey = (_a = group.colour) !== null && _a !== void 0 ? _a : "none";
|
|
3820
3820
|
var isCollapsed = collapsedGroupIds.includes(group.id);
|
|
3821
3821
|
var memberIndexes = group.rowIds
|
|
@@ -3829,7 +3829,7 @@ var NewTable = function (rawProps) {
|
|
|
3829
3829
|
memberIndexes.length === 0 &&
|
|
3830
3830
|
group.count === undefined;
|
|
3831
3831
|
return (react_2.default.createElement(react_2.default.Fragment, { key: "group-".concat(group.id) },
|
|
3832
|
-
react_2.default.createElement("tr", __assign({ "data-testid": "table-group-".concat(group.id), "data-collapsed": isCollapsed ? "true" : "false", hidden: isPending, className: "border-l-4 ".concat((
|
|
3832
|
+
react_2.default.createElement("tr", __assign({ "data-testid": "table-group-".concat(group.id), "data-collapsed": isCollapsed ? "true" : "false", hidden: isPending, className: "border-l-4 ".concat((0, groupSection_1.handleGetGroupBandClass)(colourKey, props.darkMode), " ").concat(dropGroupId === group.id
|
|
3833
3833
|
? "ring-2 ring-inset ring-primary-400"
|
|
3834
3834
|
: "") }, handleGroupDropProps(group)),
|
|
3835
3835
|
react_2.default.createElement("td", { colSpan: columnCount, className: "px-3 py-2" },
|
|
@@ -3844,7 +3844,7 @@ var NewTable = function (rawProps) {
|
|
|
3844
3844
|
isCollapsed ? (react_2.default.createElement(solid_2.ChevronRightIcon, { className: "h-4 w-4" })) : (react_2.default.createElement(solid_2.ChevronDownIcon, { className: "h-4 w-4" })),
|
|
3845
3845
|
group.avatar && (react_2.default.createElement(personAvatar_1.PersonAvatar, { label: group.avatar.label, image: group.avatar.image })),
|
|
3846
3846
|
react_2.default.createElement("span", null, group.title),
|
|
3847
|
-
react_2.default.createElement("span", { className: "rounded-full
|
|
3847
|
+
react_2.default.createElement("span", { className: "rounded-full ".concat((0, groupSection_1.handleGetGroupCountClass)(props.darkMode), " px-2 py-0.5 text-[11px] font-medium normal-case tracking-normal") }, (_d = (_c = (_b = group.summary) === null || _b === void 0 ? void 0 : _b.count) !== null && _c !== void 0 ? _c : group.count) !== null && _d !== void 0 ? _d : memberIndexes.length)))),
|
|
3848
3848
|
!isCollapsed &&
|
|
3849
3849
|
renderMemberRows(group.id, memberIndexes.slice(0, handleGetGroupVisibleCount(group.id)), tableVersion, columnCount, virtualGroups, colourKey, group),
|
|
3850
3850
|
renderGroupShowMoreRow(group.id, memberIndexes.length, columnCount, isCollapsed),
|