@lavalogic/scoria 0.37.16 → 0.37.17
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.
|
@@ -410,7 +410,10 @@
|
|
|
410
410
|
</div>
|
|
411
411
|
{/if}
|
|
412
412
|
|
|
413
|
-
<span
|
|
413
|
+
<span
|
|
414
|
+
class="column-label"
|
|
415
|
+
title={typeof columnDef.header === 'string' ? columnDef.header : columnDef.id}
|
|
416
|
+
>
|
|
414
417
|
{#if typeof columnDef.header === 'function'}
|
|
415
418
|
<!-- FIXME this needs testing -->
|
|
416
419
|
{@render columnDef.header()}
|
|
@@ -521,9 +524,15 @@ li.single-column:not(.anchor):last-of-type {
|
|
|
521
524
|
.column-label {
|
|
522
525
|
flex: 1 1 auto;
|
|
523
526
|
min-width: 0;
|
|
527
|
+
font-size: 1.125rem;
|
|
528
|
+
line-height: 1.2;
|
|
529
|
+
display: -webkit-box;
|
|
530
|
+
-webkit-line-clamp: 2;
|
|
531
|
+
-webkit-box-orient: vertical;
|
|
524
532
|
overflow: hidden;
|
|
525
533
|
text-overflow: ellipsis;
|
|
526
|
-
|
|
534
|
+
word-break: normal;
|
|
535
|
+
overflow-wrap: anywhere;
|
|
527
536
|
}
|
|
528
537
|
|
|
529
538
|
.reorder-buttons {
|
|
@@ -127,12 +127,26 @@ function commonProps(opts, kind) {
|
|
|
127
127
|
filterGroup: opts.filterGroup,
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
/** Generate a
|
|
131
|
-
* from the caller.
|
|
132
|
-
*
|
|
130
|
+
/** Generate a column id for a kind whose option type does not require
|
|
131
|
+
* an `id` from the caller.
|
|
132
|
+
*
|
|
133
|
+
* - When `hint` is provided, use it as the id verbatim. This is the
|
|
134
|
+
* server-side-filtering contract: callers who pass an `idHint` are
|
|
135
|
+
* indicating that the column maps to a real backend field (so the
|
|
136
|
+
* filter row's `id` flows through `createRemoteRowSource` as the
|
|
137
|
+
* query-string key the server expects). Adding a synthetic prefix
|
|
138
|
+
* here would mean every `col.display({ idHint: 'outboundType_id' })`
|
|
139
|
+
* serialised as `display-outboundType_id` and the server rejected
|
|
140
|
+
* the request with "field does not exist".
|
|
141
|
+
* - When no `hint` is provided, fall back to `${prefix}-${UUID}` so
|
|
142
|
+
* the id is still unique within the table. Such columns cannot
|
|
143
|
+
* participate in server-driven filtering anyway (the server would
|
|
144
|
+
* not know the random suffix). */
|
|
133
145
|
function mintSyntheticId(prefix, hint) {
|
|
134
|
-
|
|
135
|
-
|
|
146
|
+
if (hint != null) {
|
|
147
|
+
return syntheticColumnId(hint);
|
|
148
|
+
}
|
|
149
|
+
return syntheticColumnId(`${prefix}-${generateUUID()}`);
|
|
136
150
|
}
|
|
137
151
|
/** Resolve an `options` field that may be a static array or an async
|
|
138
152
|
* loader into the always-loader form the Def expects. Mutable arrays are
|