@v1nt1248/3nclient-lib 0.1.68 → 0.1.70

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@v1nt1248/3nclient-lib",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "author": "v1nt1248",
5
- "version": "0.1.68",
5
+ "version": "0.1.70",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -10,7 +10,6 @@
10
10
  const emits = defineEmits<Ui3nDialogComponentEmits>();
11
11
 
12
12
  const currentDialogProps = computed(() => ({
13
- teleport: props.dialogProps?.teleport || 'body',
14
13
  title: props.dialogProps?.title || '',
15
14
  cssClass: props.dialogProps?.cssClass || [],
16
15
  cssStyle: props.dialogProps?.cssStyle || {},
@@ -87,7 +86,7 @@
87
86
 
88
87
  function onKeydown(event: KeyboardEvent) {
89
88
  const { code } = event;
90
- console.log('onKeydown: ', code, props.dialogProps?.closeOnEsc);
89
+
91
90
  if (code === 'Escape' && props.dialogProps?.closeOnEsc) {
92
91
  event.preventDefault();
93
92
  event.stopPropagation();
@@ -206,12 +205,12 @@
206
205
  v-on="
207
206
  dialogProps?.draggable
208
207
  ? {
209
- dragstart: onDragstart,
210
- mousedown: onMousedown,
211
- mouseup: onMouseup,
212
- mousemove: onMousemove,
213
- keydown: onKeydown
214
- }
208
+ dragstart: onDragstart,
209
+ mousedown: onMousedown,
210
+ mouseup: onMouseup,
211
+ mousemove: onMousemove,
212
+ keydown: onKeydown,
213
+ }
215
214
  : { keydown: onKeydown }
216
215
  "
217
216
  >
@@ -262,7 +261,7 @@
262
261
  >
263
262
  <ui3n-button
264
263
  v-if="currentDialogProps.cancelButton"
265
- type="secondary"
264
+ type="custom"
266
265
  :color="currentDialogProps.cancelButtonBackground"
267
266
  :text-color="currentDialogProps.cancelButtonColor"
268
267
  @click="handleEvent($event, 'cancel')"
@@ -272,6 +271,7 @@
272
271
 
273
272
  <ui3n-button
274
273
  v-if="currentDialogProps.confirmButton"
274
+ type="custom"
275
275
  :color="currentDialogProps.confirmButtonBackground"
276
276
  :text-color="currentDialogProps.confirmButtonColor"
277
277
  :disabled="!isValid"
@@ -43,12 +43,12 @@ export interface Ui3nTableProps<T extends Ui3nTableBodyBaseItem> {
43
43
 
44
44
  export interface Ui3nTableEmits<T extends Ui3nTableBodyBaseItem> {
45
45
  (ev: 'change:sort', val: Ui3nTableSort<T>): void;
46
-
47
46
  (ev: 'select:row', val: T[]): void;
48
47
  }
49
48
 
50
- export type Ui3nTableNoDataSlot = {
49
+ export type Ui3nTableOtherSlots = {
51
50
  'no-data': () => VNode;
51
+ 'unused-place': () => VNode;
52
52
  };
53
53
 
54
54
  export type Ui3nTableGroupActionsSlot<T extends Ui3nTableBodyBaseItem> = {
@@ -86,7 +86,7 @@ export type Ui3nTableBodyRowCellSlot<T extends Ui3nTableBodyBaseItem, K extends
86
86
  [p in `row-cell-${K}`]: (scope: Ui3nTableBodyRowCellSlotScope<T, K>) => VNode;
87
87
  };
88
88
 
89
- export type Ui3nTableSlots<T extends Ui3nTableBodyBaseItem, K extends string & keyof T> = Ui3nTableNoDataSlot &
89
+ export type Ui3nTableSlots<T extends Ui3nTableBodyBaseItem, K extends string & keyof T> = Ui3nTableOtherSlots &
90
90
  Ui3nTableGroupActionsSlot<T> &
91
91
  Ui3nTableHeaderCellSlot<T, K> &
92
92
  Ui3nTableBodyRowSlot<T> &
@@ -105,7 +105,7 @@
105
105
  </template>
106
106
  </div>
107
107
 
108
- <!-- table body -->
108
+ <!-- table: body -->
109
109
  <div :class="$style.body">
110
110
  <template v-if="config?.showNoDataMessage && !size(body.content)">
111
111
  <slot name="no-data">
@@ -177,6 +177,11 @@
177
177
  </template>
178
178
  </template>
179
179
  </div>
180
+
181
+ <!-- table: unused space-->
182
+ <div :class="$style.unusedPlace">
183
+ <slot name="unused-place" />
184
+ </div>
180
185
  </div>
181
186
  </template>
182
187
 
@@ -200,6 +205,10 @@
200
205
  height: 100%;
201
206
  background-color: transparent;
202
207
  overflow-y: auto;
208
+ display: flex;
209
+ flex-direction: column;
210
+ justify-content: flex-start;
211
+ align-items: stretch;
203
212
  }
204
213
 
205
214
  .header {
@@ -360,4 +369,8 @@
360
369
  font-weight: 600;
361
370
  color: var(--ui3n-table-nodata-color);
362
371
  }
372
+
373
+ .unusedPlace {
374
+ flex-grow: 1;
375
+ }
363
376
  </style>