@lavalogic/scoria 0.9.4 → 0.10.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.
@@ -226,7 +226,7 @@ button.max-height {
226
226
  button.max-width {
227
227
  width: 100%;
228
228
  }
229
- button:focus, button:focus-visible, button:focus-within {
229
+ button:not(.with-outline):focus, button:not(.with-outline):focus-visible, button:not(.with-outline):focus-within {
230
230
  outline: none !important;
231
231
  }
232
232
  button.auxiliary {
@@ -143,7 +143,7 @@ dialog .modal-main {
143
143
  overflow: auto;
144
144
  }
145
145
  dialog .modal-main.noscroll {
146
- overflow: auto;
146
+ overflow: visible;
147
147
  }
148
148
  dialog .footer {
149
149
  flex-shrink: 0;
@@ -85,7 +85,7 @@ dialog .modal-main {
85
85
  overflow: auto;
86
86
  }
87
87
  dialog .modal-main.noscroll {
88
- overflow: auto;
88
+ overflow: visible;
89
89
  }
90
90
  dialog .footer {
91
91
  flex-shrink: 0;
@@ -275,7 +275,7 @@ dialog .modal-main {
275
275
  overflow: auto;
276
276
  }
277
277
  dialog .modal-main.noscroll {
278
- overflow: auto;
278
+ overflow: visible;
279
279
  }
280
280
  dialog .footer {
281
281
  flex-shrink: 0;
@@ -233,8 +233,8 @@
233
233
  </div>
234
234
 
235
235
  <style>.select-wrapper {
236
- min-width: var(--input-min-width);
237
- width: min(100%, max(var(--input-width), 12rem));
236
+ min-width: var(--input-min-width, 12rem);
237
+ width: var(--input-width, 100%);
238
238
  height: max(var(--input-height, 3rem));
239
239
  display: flex;
240
240
  gap: 2rem;
@@ -394,8 +394,8 @@
394
394
  <!-- #region CSS
395
395
  -->
396
396
  <style>.select-wrapper {
397
- min-width: var(--input-min-width);
398
- width: min(100%, max(var(--input-width), 12rem));
397
+ min-width: var(--input-min-width, 12rem);
398
+ width: var(--input-width, 100%);
399
399
  height: max(var(--input-height, 3rem));
400
400
  display: flex;
401
401
  gap: 2rem;
@@ -302,8 +302,8 @@
302
302
  </div>
303
303
 
304
304
  <style>.select-wrapper {
305
- min-width: var(--input-min-width);
306
- width: min(100%, max(var(--input-width), 12rem));
305
+ min-width: var(--input-min-width, 12rem);
306
+ width: var(--input-width, 100%);
307
307
  height: max(var(--input-height, 3rem));
308
308
  display: flex;
309
309
  gap: 2rem;
@@ -20,6 +20,10 @@
20
20
 
21
21
  const value = $derived(cell.getValue());
22
22
 
23
+ const visibleValue = $derived(
24
+ cell.column.columnDef.getDisplayValue?.(cell.row.original, cell.row.originalIndex) ?? value
25
+ );
26
+
23
27
  const tableContext = getContext<TableContext<T>>(TableContext.identifier);
24
28
  const toastContext = getContext<ToastContext>(ToastContext.identifier);
25
29
 
@@ -75,7 +79,7 @@ class:bottom={focusDetails.bottomEdge} -->
75
79
  {externalValue}
76
80
  {/await}
77
81
  {:else}
78
- {#await value}
82
+ {#await visibleValue}
79
83
  loading…
80
84
  {:then value}
81
85
  {(value instanceof Date
@@ -32,7 +32,7 @@
32
32
  const selectValue = $derived(cell.getValue() as T | null | undefined);
33
33
 
34
34
  const visibleValue = $derived(
35
- cell.column.columnDef.getDisplayValue!(cell.row.original, cell.row.originalIndex)
35
+ cell.column.columnDef.getDisplayValue(cell.row.original, cell.row.originalIndex)
36
36
  );
37
37
 
38
38
  const optional = $derived((cell.column.columnDef as SelectDef<T>).optional ?? false);
@@ -12,7 +12,7 @@ export declare class QueryDef<T extends object> extends AccessorDef<T, SelectFil
12
12
  readonly accessorType: "Query";
13
13
  constructor(props: QueryDefProps<T>);
14
14
  readonly filterFn: CustomFilterFn | FilterFn<T, SelectFilterValueType<T>> | undefined;
15
- get getDisplayValue(): (item: T, index: number) => string | null | Promise<string | null>;
15
+ getDisplayValue: (item: T, index: number) => string | null | Promise<string | null>;
16
16
  readonly query: (queryString: string, item: T, index: number) => Promise<Array<SelectOption<unknown>>>;
17
17
  readonly clearable: boolean;
18
18
  }
@@ -8,9 +8,6 @@ export class QueryDef extends AccessorDef {
8
8
  this.clearable = $derived(props.clearable ?? true);
9
9
  }
10
10
  filterFn;
11
- get getDisplayValue() {
12
- return this._getDisplayValue;
13
- }
14
11
  query;
15
12
  clearable;
16
13
  }
@@ -21,5 +21,6 @@ export declare class SelectDef<T extends object> extends AccessorDef<T, SelectFi
21
21
  readonly optional: boolean;
22
22
  readonly clearable: boolean;
23
23
  readonly getSpecificOptions?: (item: T, index: number) => Array<SelectOption<unknown>> | Promise<Array<SelectOption<unknown>>>;
24
+ getDisplayValue: (item: T, index: number) => string | null | Promise<string | null>;
24
25
  getOptions: () => Array<SelectOption<unknown>> | Promise<Array<SelectOption<unknown>>>;
25
26
  }
@@ -55,9 +55,7 @@ export declare abstract class ColumnDef<T extends object, FilterFnType = undefin
55
55
  private _filterValueType;
56
56
  get filterValueType(): FilterValueType | undefined;
57
57
  set filterValueType(v: FilterValueType | undefined);
58
- protected _getDisplayValue: ((item: T, index: number) => string | null | Promise<string | null>) | undefined;
59
- get getDisplayValue(): ((item: T, index: number) => string | null | Promise<string | null>) | undefined;
60
- set getDisplayValue(v: ((item: T, index: number) => string | null | Promise<string | null>) | undefined);
58
+ readonly getDisplayValue: ((item: T, index: number) => string | null | Promise<string | null>) | undefined;
61
59
  toJSON(): object;
62
60
  readonly isEditable: (item: T, index: number) => boolean | Promise<boolean>;
63
61
  readonly resizable: boolean;
@@ -14,7 +14,7 @@ export class ColumnDef {
14
14
  this.resizable = $derived(props.resizable ?? true);
15
15
  this.header = $derived(props.header);
16
16
  this._filterValueType = $derived(props.filterValueType);
17
- this._getDisplayValue = $derived(props.getDisplayValue);
17
+ this.getDisplayValue = $derived(props.getDisplayValue);
18
18
  this.debug = $derived(props.debug ?? false);
19
19
  this.getOptions = $derived(props.getOptions);
20
20
  }
@@ -75,13 +75,7 @@ export class ColumnDef {
75
75
  set filterValueType(v) {
76
76
  this._filterValueType = v;
77
77
  }
78
- _getDisplayValue;
79
- get getDisplayValue() {
80
- return this._getDisplayValue;
81
- }
82
- set getDisplayValue(v) {
83
- this._getDisplayValue = v;
84
- }
78
+ getDisplayValue;
85
79
  toJSON() {
86
80
  return { columnType: this.columnType, id: this.id, header: this.header };
87
81
  }
@@ -116,7 +116,7 @@ dialog .modal-main {
116
116
  overflow: auto;
117
117
  }
118
118
  dialog .modal-main.noscroll {
119
- overflow: auto;
119
+ overflow: visible;
120
120
  }
121
121
  dialog .footer {
122
122
  flex-shrink: 0;
@@ -146,7 +146,7 @@ dialog .modal-main {
146
146
  overflow: auto;
147
147
  }
148
148
  dialog .modal-main.noscroll {
149
- overflow: auto;
149
+ overflow: visible;
150
150
  }
151
151
  dialog .footer {
152
152
  flex-shrink: 0;
@@ -129,7 +129,7 @@ dialog .modal-main {
129
129
  overflow: auto;
130
130
  }
131
131
  dialog .modal-main.noscroll {
132
- overflow: auto;
132
+ overflow: visible;
133
133
  }
134
134
  dialog .footer {
135
135
  flex-shrink: 0;
@@ -172,7 +172,7 @@ dialog .modal-main {
172
172
  overflow: auto;
173
173
  }
174
174
  dialog .modal-main.noscroll {
175
- overflow: auto;
175
+ overflow: visible;
176
176
  }
177
177
  dialog .footer {
178
178
  flex-shrink: 0;
@@ -405,7 +405,7 @@
405
405
  overflow: auto;
406
406
 
407
407
  &.noscroll {
408
- overflow: auto;
408
+ overflow: visible;
409
409
  }
410
410
  }
411
411
  .footer {
@@ -2356,8 +2356,8 @@
2356
2356
  // --input-height: #{sizing.$input-height};
2357
2357
  // --sv-min-height: 44px;
2358
2358
 
2359
- min-width: var(--input-min-width);
2360
- width: min(100%, max(var(--input-width), #{sizing.$input-width}));
2359
+ min-width: var(--input-min-width, #{sizing.$input-width});
2360
+ width: var(--input-width, 100%);
2361
2361
  // height: min(var(--max-height), max(var(--input-height, 2rem), #{sizing.$input-height}));
2362
2362
  height: max(var(--input-height, #{sizing.$input-height}));
2363
2363
 
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.9.4",
4
+ "version": "0.10.0",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },