@ouestfrance/sipa-bms-ui 8.16.0 → 8.17.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.
@@ -1,4 +1,4 @@
1
- import { Filter, SavedFilter, Sort, TableHeader } from '../../models';
1
+ import { Filter, SavedFilter, SelectMode, Sort, TableHeader } from '../../models';
2
2
  interface UiTableProps {
3
3
  disableSearch?: boolean;
4
4
  headers: TableHeader[];
@@ -15,6 +15,7 @@ interface UiTableProps {
15
15
  defaultSort?: Sort;
16
16
  selectable?: boolean;
17
17
  selectableDisabled?: boolean;
18
+ selectMode?: SelectMode.DEFAULT | SelectMode.SINGLE;
18
19
  }
19
20
  type __VLS_Props = UiTableProps;
20
21
  declare const __VLS_defaults: {
@@ -54,6 +55,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
54
55
  size: number;
55
56
  filters: Filter[];
56
57
  selectable: boolean;
58
+ selectMode: SelectMode.DEFAULT | SelectMode.SINGLE;
57
59
  selectableDisabled: boolean;
58
60
  pagination: number[];
59
61
  canSaveFilters: boolean;
@@ -1,7 +1,7 @@
1
1
  import { SelectMode, Sort, TableHeader } from '../../models';
2
2
  interface UiBmsTableProps {
3
3
  headers: TableHeader[];
4
- items: unknown[];
4
+ items: any[];
5
5
  mode?: 'normal' | 'dense';
6
6
  loading?: boolean;
7
7
  hasFilters?: boolean;
@@ -14,3 +14,4 @@ export declare const getFiltersAsQueryParams: (params: {
14
14
  sort?: Sort;
15
15
  }) => any;
16
16
  export declare const enforceActionsColumnHeader: (headers: TableHeader[]) => TableHeader[];
17
+ export declare const getHeaderClasses: (header: TableHeader, sort: Sort) => string[];
@@ -59,5 +59,6 @@ export interface SavedFilter {
59
59
  }
60
60
  export declare enum SelectMode {
61
61
  ALL = "all",
62
- DEFAULT = "default"
62
+ DEFAULT = "default",
63
+ SINGLE = "single"
63
64
  }
@@ -2243,47 +2243,47 @@ nav .additional[data-v-8b4752b4] {
2243
2243
  .bms-pagination__select[data-v-e10f3b80] .field__wrapper {
2244
2244
  min-width: 10em;
2245
2245
  width: 10em;
2246
- }.bms-table__row[data-v-c6304837] {
2246
+ }.bms-table__row[data-v-2ab3888f] {
2247
2247
  --table-cell-padding: 1em;
2248
2248
  background-color: rgb(255, 255, 255);
2249
2249
  }
2250
- .bms-table__row td[data-v-c6304837] {
2250
+ .bms-table__row td[data-v-2ab3888f] {
2251
2251
  padding: var(--table-cell-padding);
2252
2252
  background-color: rgb(255, 255, 255);
2253
2253
  }
2254
- .bms-table__row--dense[data-v-c6304837] {
2254
+ .bms-table__row--dense[data-v-2ab3888f] {
2255
2255
  --table-cell-padding: 0.5em 1em;
2256
2256
  }
2257
- .bms-table__row--selected[data-v-c6304837] td {
2257
+ .bms-table__row--selected[data-v-2ab3888f] td {
2258
2258
  background-color: var(--bms-main-10);
2259
2259
  }
2260
- .bms-table__row--disabled td[data-v-c6304837] {
2260
+ .bms-table__row--disabled td[data-v-2ab3888f] {
2261
2261
  color: var(--bms-grey-50);
2262
2262
  }
2263
- .bms-table__row__cell__checkbox[data-v-c6304837] {
2263
+ .bms-table__row__cell__checkbox[data-v-2ab3888f] {
2264
2264
  width: 4em;
2265
2265
  }
2266
- .bms-table__row__cell--action[data-v-c6304837] {
2266
+ .bms-table__row__cell--action[data-v-2ab3888f] {
2267
2267
  display: flex;
2268
2268
  justify-content: end;
2269
2269
  }
2270
- .bms-table__row__cell--empty[data-v-c6304837] {
2270
+ .bms-table__row__cell--empty[data-v-2ab3888f] {
2271
2271
  height: 360px;
2272
2272
  }
2273
- .bms-table__row__cell--child-element[data-v-c6304837] {
2273
+ .bms-table__row__cell--child-element[data-v-2ab3888f] {
2274
2274
  display: inline-flex;
2275
2275
  align-items: flex-end;
2276
2276
  }
2277
- .bms-table__row__cell--child-element__icon[data-v-c6304837] {
2277
+ .bms-table__row__cell--child-element__icon[data-v-2ab3888f] {
2278
2278
  display: flex;
2279
2279
  margin-right: 1em;
2280
- }.bms-table[data-v-9cbfc981] {
2280
+ }.bms-table[data-v-45f34152] {
2281
2281
  --table-cell-padding: 1em;
2282
2282
  --table-cell-radius: var(--bms-border-radius-large);
2283
2283
  --dynamic-border-height: 2px;
2284
2284
  --table-border: 1px solid var(--bms-grey-10);
2285
2285
  }
2286
- .bms-table__loader[data-v-9cbfc981] {
2286
+ .bms-table__loader[data-v-45f34152] {
2287
2287
  position: absolute;
2288
2288
  background: rgba(255, 255, 255, 0.72);
2289
2289
  inset: 0;
@@ -2293,110 +2293,110 @@ nav .additional[data-v-8b4752b4] {
2293
2293
  font-size: 3em;
2294
2294
  z-index: 10;
2295
2295
  }
2296
- .bms-table__actions[data-v-9cbfc981] {
2296
+ .bms-table__actions[data-v-45f34152] {
2297
2297
  display: flex;
2298
2298
  align-items: center;
2299
2299
  justify-content: space-between;
2300
2300
  margin-bottom: 16px;
2301
2301
  }
2302
- .bms-table__actions__saved-filters[data-v-9cbfc981] {
2302
+ .bms-table__actions__saved-filters[data-v-45f34152] {
2303
2303
  display: flex;
2304
2304
  align-items: center;
2305
2305
  flex-wrap: wrap;
2306
2306
  gap: 1em;
2307
2307
  }
2308
- .bms-table__actions__search[data-v-9cbfc981] {
2308
+ .bms-table__actions__search[data-v-45f34152] {
2309
2309
  display: flex;
2310
2310
  align-items: center;
2311
2311
  gap: 1em;
2312
2312
  }
2313
- .bms-table__actions__custom[data-v-9cbfc981] {
2313
+ .bms-table__actions__custom[data-v-45f34152] {
2314
2314
  display: flex;
2315
2315
  gap: 1em;
2316
2316
  }
2317
- .bms-table__actions__custom[data-v-9cbfc981]:empty {
2317
+ .bms-table__actions__custom[data-v-45f34152]:empty {
2318
2318
  display: none;
2319
2319
  }
2320
- .bms-table__selected[data-v-9cbfc981] {
2320
+ .bms-table__selected[data-v-45f34152] {
2321
2321
  margin-bottom: 1em;
2322
2322
  }
2323
- .bms-table__selected .select-mode-all[data-v-9cbfc981] {
2323
+ .bms-table__selected .select-mode-all[data-v-45f34152] {
2324
2324
  cursor: pointer;
2325
2325
  color: var(--bms-main-100);
2326
2326
  }
2327
- .bms-table__cell__checkbox[data-v-9cbfc981] {
2327
+ .bms-table__cell__checkbox[data-v-45f34152] {
2328
2328
  width: 4em;
2329
2329
  }
2330
- .bms-table__cell--action[data-v-9cbfc981] {
2330
+ .bms-table__cell--action[data-v-45f34152] {
2331
2331
  display: flex;
2332
2332
  justify-content: end;
2333
2333
  }
2334
- .bms-table__cell--empty[data-v-9cbfc981] {
2334
+ .bms-table__cell--empty[data-v-45f34152] {
2335
2335
  height: 360px;
2336
2336
  }
2337
- .bms-table__table[data-v-9cbfc981] {
2337
+ .bms-table__table[data-v-45f34152] {
2338
2338
  width: 100%;
2339
2339
  border-spacing: 0 var(--dynamic-border-height);
2340
2340
  border-radius: var(--bms-border-radius-large);
2341
2341
  border: var(--table-border);
2342
2342
  position: relative;
2343
2343
  }
2344
- .bms-table__table-wrapper[data-v-9cbfc981] {
2344
+ .bms-table__table-wrapper[data-v-45f34152] {
2345
2345
  position: relative;
2346
2346
  }
2347
- .bms-table__table thead[data-v-9cbfc981] {
2347
+ .bms-table__table thead[data-v-45f34152] {
2348
2348
  position: sticky;
2349
2349
  z-index: 2;
2350
2350
  top: var(--header-height, 0);
2351
2351
  }
2352
- .bms-table__table--dense[data-v-9cbfc981] {
2352
+ .bms-table__table--dense[data-v-45f34152] {
2353
2353
  --table-cell-padding: 0.5em 1em;
2354
2354
  }
2355
- .bms-table__table[data-v-9cbfc981] tr td {
2355
+ .bms-table__table[data-v-45f34152] tr td {
2356
2356
  padding: var(--table-cell-padding);
2357
2357
  }
2358
- .bms-table__table th[data-v-9cbfc981] {
2358
+ .bms-table__table th[data-v-45f34152] {
2359
2359
  --header-content-sort-icon-color: var(--bms-grey-25);
2360
2360
  --header-content-justify: start;
2361
2361
  width: var(--table-cell-width, auto);
2362
2362
  padding: var(--table-cell-padding);
2363
2363
  }
2364
- .bms-table__table th.sortable[data-v-9cbfc981]:hover {
2364
+ .bms-table__table th.sortable[data-v-45f34152]:hover {
2365
2365
  --header-content-sort-icon-color: var(--bms-grey-100);
2366
2366
  cursor: pointer;
2367
2367
  }
2368
- .bms-table__table th.u-text-align-start[data-v-9cbfc981] {
2368
+ .bms-table__table th.u-text-align-start[data-v-45f34152] {
2369
2369
  --header-content-justify: start;
2370
2370
  }
2371
- .bms-table__table th.u-text-align-center[data-v-9cbfc981] {
2371
+ .bms-table__table th.u-text-align-center[data-v-45f34152] {
2372
2372
  --header-content-justify: center;
2373
2373
  }
2374
- .bms-table__table th.u-text-align-end[data-v-9cbfc981] {
2374
+ .bms-table__table th.u-text-align-end[data-v-45f34152] {
2375
2375
  --header-content-justify: end;
2376
2376
  }
2377
- .bms-table__table th.sorted[data-v-9cbfc981] {
2377
+ .bms-table__table th.sorted[data-v-45f34152] {
2378
2378
  --header-content-sort-icon-color: var(--bms-grey-100);
2379
2379
  }
2380
- .bms-table__table th .header-content[data-v-9cbfc981] {
2380
+ .bms-table__table th .header-content[data-v-45f34152] {
2381
2381
  display: flex;
2382
2382
  align-items: center;
2383
2383
  justify-content: var(--header-content-justify);
2384
2384
  gap: 0.5em;
2385
2385
  }
2386
- .bms-table__table th .header-content-sort[data-v-9cbfc981] {
2386
+ .bms-table__table th .header-content-sort[data-v-45f34152] {
2387
2387
  color: var(--header-content-sort-icon-color);
2388
2388
  }
2389
- .bms-table__footer[data-v-9cbfc981] {
2389
+ .bms-table__footer[data-v-45f34152] {
2390
2390
  padding-top: 16px;
2391
2391
  }
2392
- .bms-table .blob[data-v-9cbfc981] {
2392
+ .bms-table .blob[data-v-45f34152] {
2393
2393
  visibility: hidden;
2394
2394
  --table-blob-height: 80px;
2395
2395
  }
2396
- .bms-table .blob.dense[data-v-9cbfc981] {
2396
+ .bms-table .blob.dense[data-v-45f34152] {
2397
2397
  --table-blob-height: 50px;
2398
2398
  }
2399
- .bms-table .blob[data-v-9cbfc981] {
2399
+ .bms-table .blob[data-v-45f34152] {
2400
2400
  width: 200px;
2401
2401
  height: var(--table-blob-height);
2402
2402
  background-color: var(--bms-main-50);
@@ -2405,35 +2405,29 @@ nav .additional[data-v-8b4752b4] {
2405
2405
  z-index: -5;
2406
2406
  filter: blur(20px);
2407
2407
  }
2408
- [data-v-9cbfc981] table {
2408
+ [data-v-45f34152] table {
2409
2409
  padding: 0 var(--dynamic-border-height);
2410
2410
  }
2411
- [data-v-9cbfc981] table th:first-child {
2411
+ [data-v-45f34152] table th:first-child {
2412
2412
  border-top-left-radius: var(--table-cell-radius);
2413
2413
  }
2414
- [data-v-9cbfc981] table .stuck th:first-child {
2415
- border-top-left-radius: 0;
2416
- }
2417
- [data-v-9cbfc981] table .stuck th:last-child {
2418
- border-top-right-radius: 0;
2419
- }
2420
- [data-v-9cbfc981] table th:last-child {
2414
+ [data-v-45f34152] table th:last-child {
2421
2415
  border-top-right-radius: var(--table-cell-radius);
2422
2416
  }
2423
- [data-v-9cbfc981] table tr:last-child td:first-child {
2417
+ [data-v-45f34152] table tr:last-child td:first-child {
2424
2418
  border-bottom-left-radius: var(--table-cell-radius);
2425
2419
  }
2426
- [data-v-9cbfc981] table tr:last-child td:last-child {
2420
+ [data-v-45f34152] table tr:last-child td:last-child {
2427
2421
  border-bottom-right-radius: var(--table-cell-radius);
2428
2422
  }
2429
- [data-v-9cbfc981] table th {
2423
+ [data-v-45f34152] table th {
2430
2424
  background-color: rgb(255, 255, 255);
2431
2425
  }
2432
- [data-v-9cbfc981] table tbody {
2426
+ [data-v-45f34152] table tbody {
2433
2427
  overflow: hidden;
2434
2428
  background: white;
2435
2429
  }
2436
- [data-v-9cbfc981] table tbody tr {
2430
+ [data-v-45f34152] table tbody tr {
2437
2431
  position: relative;
2438
2432
  }.filter-button-container[data-v-6047ada7] {
2439
2433
  position: relative;
@@ -2508,7 +2502,7 @@ nav .additional[data-v-8b4752b4] {
2508
2502
  padding-right: 32px;
2509
2503
  }.table-search[data-v-c27df335] {
2510
2504
  width: 260px;
2511
- }.table-search[data-v-2f003e4e] {
2505
+ }.table-search[data-v-704a7453] {
2512
2506
  width: 260px;
2513
2507
  }.cocarde[data-v-d1c7b421] {
2514
2508
  display: flex;