@onereach/ui-components-vue2 26.4.1-beta.5881.0 → 26.4.1-beta.5882.0
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.
|
@@ -271,7 +271,7 @@ var script$e = defineComponent({
|
|
|
271
271
|
const root = ref();
|
|
272
272
|
const rootStyles = computed(() => {
|
|
273
273
|
var _a, _b, _c, _d;
|
|
274
|
-
return ['or-data-grid-table-content-cell-v3', ...DataGridTableContentCell, ...(((_a = props.column) === null || _a === void 0 ? void 0 : _a.stickiness) ? [`sticky-${props.column.stickiness}
|
|
274
|
+
return ['or-data-grid-table-content-cell-v3', ...DataGridTableContentCell, ...(((_a = props.column) === null || _a === void 0 ? void 0 : _a.stickiness) ? ['overflow-hidden', `sticky-${props.column.stickiness}`] : []), ...(!!((_b = props.features) === null || _b === void 0 ? void 0 : _b.resizing) && !!((_c = props.column) === null || _c === void 0 ? void 0 : _c.name) && ((_d = props.column) === null || _d === void 0 ? void 0 : _d.resizing) !== false ? ['resizable'] : [])];
|
|
275
275
|
});
|
|
276
276
|
const rootInlineStyles = computed(() => {
|
|
277
277
|
if (props.column) {
|
|
@@ -306,9 +306,9 @@ var script$e = defineComponent({
|
|
|
306
306
|
const contentStyles = computed(() => {
|
|
307
307
|
var _a, _b, _c, _d, _e, _f;
|
|
308
308
|
const isWrapping = (_b = (_a = props.column) === null || _a === void 0 ? void 0 : _a.wrapping) !== null && _b !== void 0 ? _b : props.variant === DataGridVariant.Dynamic && !((_c = props.column) === null || _c === void 0 ? void 0 : _c.control);
|
|
309
|
-
const
|
|
310
|
-
const
|
|
311
|
-
return ['layout-row items-center w-full min-w-0', ...(
|
|
309
|
+
const isTags = ((_e = (_d = props.column) === null || _d === void 0 ? void 0 : _d.control) === null || _e === void 0 ? void 0 : _e.type) === 'tags';
|
|
310
|
+
const isFitContent = (_f = props.column) === null || _f === void 0 ? void 0 : _f.fitContent;
|
|
311
|
+
return ['layout-row items-center w-full min-w-0', ...(isTags ? ['overflow-hidden'] : []), ...DataGridTableContentCellContent.filter(style => style !== 'truncate'), ...(isWrapping ? ['whitespace-pre-wrap break-words'] : isFitContent ? ['overflow-hidden'] : ['truncate'])];
|
|
312
312
|
});
|
|
313
313
|
const contentInlineStyles = computed(() => ({
|
|
314
314
|
minWidth: props.column && props.column.minWidth || DATA_GRID_DEFAULT_MIN_WIDTH,
|
|
@@ -895,14 +895,15 @@ var script$8 = defineComponent({
|
|
|
895
895
|
});
|
|
896
896
|
const rootStyles = computed(() => {
|
|
897
897
|
var _a;
|
|
898
|
-
return ['or-data-grid-table-header-cell-v3', 'relative', ...DataGridTableHeaderCell, ...(((_a = props.column) === null || _a === void 0 ? void 0 : _a.stickiness) ? [`sticky-${props.column.stickiness}
|
|
898
|
+
return ['or-data-grid-table-header-cell-v3', 'relative', ...DataGridTableHeaderCell, ...(((_a = props.column) === null || _a === void 0 ? void 0 : _a.stickiness) ? ['overflow-hidden', `sticky-${props.column.stickiness}`] : []), ...(isResizable.value ? ['resizable'] : []), ...(isSortable.value ? ['interactivity-click'] : [])];
|
|
899
899
|
});
|
|
900
900
|
const resizeHandleStyles = computed(() => ['or-data-grid-table-header-cell-resize-handle-v3', ...DataGridTableHeaderCellResizeHandle]);
|
|
901
901
|
const wrapInlineStyle = computed(() => {
|
|
902
902
|
var _a, _b;
|
|
903
903
|
return {
|
|
904
904
|
minWidth: ((_a = props.column) === null || _a === void 0 ? void 0 : _a.minWidth) || DATA_GRID_DEFAULT_MIN_WIDTH,
|
|
905
|
-
maxWidth: (_b = props.column) === null || _b === void 0 ? void 0 : _b.maxWidth
|
|
905
|
+
maxWidth: (_b = props.column) === null || _b === void 0 ? void 0 : _b.maxWidth,
|
|
906
|
+
overflow: 'hidden'
|
|
906
907
|
};
|
|
907
908
|
});
|
|
908
909
|
const rootInlineStyles = computed(() => {
|
|
@@ -1330,8 +1331,11 @@ var script$4 = defineComponent({
|
|
|
1330
1331
|
return column.width;
|
|
1331
1332
|
}
|
|
1332
1333
|
const width = (_a = column.width) !== null && _a !== void 0 ? _a : '1fr';
|
|
1333
|
-
const min = column.minWidth || (column.width ? DATA_GRID_DEFAULT_MIN_WIDTH : '120px');
|
|
1334
|
-
|
|
1334
|
+
const min = column.minWidth || (column.width ? DATA_GRID_DEFAULT_MIN_WIDTH : column.fitContent ? 'max-content' : column.stickiness ? 'max-content' : '120px');
|
|
1335
|
+
const max = column.maxWidth || (column.width ? width === 'max-content' ? 'max-content' : width : column.fitContent ? 'max-content' : column.minWidth || column.stickiness ? 'max-content' : '1fr');
|
|
1336
|
+
if (column.fitContent) {
|
|
1337
|
+
return 'max-content';
|
|
1338
|
+
}
|
|
1335
1339
|
if (width.endsWith('px')) {
|
|
1336
1340
|
return width;
|
|
1337
1341
|
}
|
|
@@ -23,6 +23,7 @@ export type DataGridColumn = {
|
|
|
23
23
|
sorting?: boolean;
|
|
24
24
|
resizing?: boolean;
|
|
25
25
|
wrapping?: boolean;
|
|
26
|
+
fitContent?: boolean;
|
|
26
27
|
control?: {
|
|
27
28
|
type: 'text' | 'number' | 'rating' | 'select' | 'checkbox' | 'switch' | 'date' | 'time' | 'datetime' | 'tags';
|
|
28
29
|
options?: SelectItem[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components-vue2",
|
|
3
|
-
"version": "26.4.1-beta.
|
|
3
|
+
"version": "26.4.1-beta.5882.0",
|
|
4
4
|
"description": "Vue components library for v2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@codemirror/view": "^6",
|
|
41
41
|
"@floating-ui/dom": "1.5.3",
|
|
42
42
|
"@lezer/highlight": "*",
|
|
43
|
-
"@onereach/styles": "^26.4.1-beta.
|
|
44
|
-
"@onereach/ui-components-common": "^26.4.1-beta.
|
|
43
|
+
"@onereach/styles": "^26.4.1-beta.5882.0",
|
|
44
|
+
"@onereach/ui-components-common": "^26.4.1-beta.5882.0",
|
|
45
45
|
"@splidejs/splide": "4.0.6",
|
|
46
46
|
"@tiptap/core": "2.27.1",
|
|
47
47
|
"@tiptap/extension-blockquote": "2.27.1",
|