@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 class="column-label">
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
- white-space: nowrap;
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 synthetic id for a column kind that does not take an `id`
131
- * from the caller. Mirrors the existing pattern used by `ActionsDef` and
132
- * `RowSelectionDef`. The returned value is the `SyntheticColumnId` brand. */
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
- const suffix = hint ?? generateUUID();
135
- return syntheticColumnId(`${prefix}-${suffix}`);
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
@@ -160,4 +160,6 @@
160
160
  display: flex;
161
161
  flex-flow: column nowrap;
162
162
  background-color: #ffffff;
163
+ padding: 0 1.25rem;
164
+ box-sizing: border-box;
163
165
  }</style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lavalogic/scoria",
3
3
  "description": "Svelte components used for the FloWMS Web Frontend",
4
- "version": "0.37.16",
4
+ "version": "0.37.17",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },