@sebgroup/green-core 3.8.1 → 3.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.
- package/components/card/card.styles.js +1 -0
- package/components/card-linked/card-linked.styles.js +1 -1
- package/components/table/table.component.d.ts +27 -7
- package/components/table/table.component.js +730 -101
- package/components/table/table.imports.js +8 -0
- package/components/table/table.stories.data.d.ts +8 -5
- package/components/table/table.stories.data.js +705 -31
- package/components/table/table.styles.js +409 -189
- package/components/table/table.types.d.ts +97 -11
- package/custom-elements.json +4838 -4724
- package/gds-element.js +1 -1
- package/generated/locales/da.d.ts +4 -1
- package/generated/locales/da.js +4 -1
- package/generated/locales/de.d.ts +4 -1
- package/generated/locales/de.js +4 -1
- package/generated/locales/fi.d.ts +4 -1
- package/generated/locales/fi.js +4 -1
- package/generated/locales/fr.d.ts +4 -1
- package/generated/locales/fr.js +4 -1
- package/generated/locales/it.d.ts +4 -1
- package/generated/locales/it.js +4 -1
- package/generated/locales/nl.d.ts +4 -1
- package/generated/locales/nl.js +4 -1
- package/generated/locales/no.d.ts +4 -1
- package/generated/locales/no.js +4 -1
- package/generated/locales/sv.d.ts +4 -1
- package/generated/locales/sv.js +4 -1
- package/generated/mcp/card-pattern-01/api.md +2 -1
- package/generated/mcp/components.json +1 -1
- package/generated/mcp/icons.json +1 -1
- package/generated/mcp/index.json +1 -1
- package/generated/mcp/table/angular.md +1 -0
- package/generated/mcp/table/api.md +32 -2
- package/generated/mcp/table/react.md +1 -0
- package/generated/mcp/tokens.json +1 -1
- package/generated/react/index.d.ts +9 -9
- package/generated/react/index.js +9 -9
- package/generated/react/table/index.d.ts +10 -4
- package/package.json +1 -1
- package/patterns/card-pattern-01/card-pattern-01.component.d.ts +2 -1
- package/patterns/card-pattern-01/card-pattern-01.component.js +49 -25
- package/shared-styles/rbcb-toggle.style.js +1 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
|
@@ -10,13 +10,13 @@ let feedbackPromise = null;
|
|
|
10
10
|
const defineSlots = (row) => ({
|
|
11
11
|
...row,
|
|
12
12
|
name: Slot(row.name, ["avatar", "value"]),
|
|
13
|
-
// name: Slot(row.name, ['avatar', 'value'], row.email),
|
|
14
13
|
email: Slot(row.email, ["value", "copy-button"]),
|
|
15
14
|
status: Slot(row.status, ["status"]),
|
|
16
15
|
amount: Slot(row.amount, ["amount", "currency"]),
|
|
17
16
|
account: Slot(row.account, ["main"]),
|
|
18
17
|
login: Slot(row.lastLogin, ["main"]),
|
|
19
|
-
download: Slot(row.download ?? "#", ["main"])
|
|
18
|
+
download: Slot(row.download ?? "#", ["main"]),
|
|
19
|
+
actions: Slot(void 0, ["main"])
|
|
20
20
|
});
|
|
21
21
|
let usersRawCache = null;
|
|
22
22
|
let usersRawPromise = null;
|
|
@@ -73,12 +73,14 @@ const Users = {
|
|
|
73
73
|
{
|
|
74
74
|
key: "id",
|
|
75
75
|
label: "ID",
|
|
76
|
-
sortable: false
|
|
76
|
+
sortable: false,
|
|
77
|
+
width: "6ch"
|
|
77
78
|
},
|
|
78
79
|
{
|
|
79
80
|
key: "name",
|
|
80
81
|
label: "Name",
|
|
81
|
-
sortable: true
|
|
82
|
+
sortable: true,
|
|
83
|
+
width: "28ch"
|
|
82
84
|
},
|
|
83
85
|
{
|
|
84
86
|
key: "email",
|
|
@@ -121,12 +123,14 @@ const Users = {
|
|
|
121
123
|
{
|
|
122
124
|
key: "download",
|
|
123
125
|
label: "Download"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
key: "actions",
|
|
129
|
+
label: "Actions",
|
|
130
|
+
justify: "end",
|
|
131
|
+
sticky: "right"
|
|
124
132
|
}
|
|
125
133
|
],
|
|
126
|
-
Actions: {
|
|
127
|
-
label: "Actions",
|
|
128
|
-
justify: "end"
|
|
129
|
-
},
|
|
130
134
|
Tfoot: {
|
|
131
135
|
label: "Totals",
|
|
132
136
|
sticky: true
|
|
@@ -335,22 +339,25 @@ const actionsStaticRows = [
|
|
|
335
339
|
];
|
|
336
340
|
const actionsDataProvider = async (request) => {
|
|
337
341
|
const start = (request.page - 1) * request.rows;
|
|
338
|
-
const page = actionsStaticRows.slice(start, start + request.rows)
|
|
342
|
+
const page = actionsStaticRows.slice(start, start + request.rows).map((row) => ({
|
|
343
|
+
...row,
|
|
344
|
+
actions: Slot(void 0, ["main"], row.id)
|
|
345
|
+
}));
|
|
339
346
|
return { rows: page, total: actionsStaticRows.length };
|
|
340
347
|
};
|
|
341
348
|
const Actions = {
|
|
342
349
|
Columns: [
|
|
343
350
|
{ key: "task", label: "Task", align: "center" },
|
|
344
351
|
{ key: "assignee", label: "Assignee", align: "center" },
|
|
345
|
-
{ key: "priority", label: "Priority", align: "center", width: "100px" }
|
|
352
|
+
{ key: "priority", label: "Priority", align: "center", width: "100px" },
|
|
353
|
+
{
|
|
354
|
+
key: "actions",
|
|
355
|
+
label: "Actions",
|
|
356
|
+
align: "center",
|
|
357
|
+
justify: "end",
|
|
358
|
+
sticky: "right"
|
|
359
|
+
}
|
|
346
360
|
],
|
|
347
|
-
MultipleActions: {
|
|
348
|
-
label: "Actions",
|
|
349
|
-
align: "center",
|
|
350
|
-
justify: "start",
|
|
351
|
-
// width: '150px',
|
|
352
|
-
sticky: true
|
|
353
|
-
},
|
|
354
361
|
MultipleActionsSlotContent: (rows) => {
|
|
355
362
|
return html`
|
|
356
363
|
${rows.map(
|
|
@@ -375,13 +382,6 @@ const Actions = {
|
|
|
375
382
|
)}
|
|
376
383
|
`;
|
|
377
384
|
},
|
|
378
|
-
ActionLink: {
|
|
379
|
-
label: "Actions",
|
|
380
|
-
align: "center",
|
|
381
|
-
justify: "end",
|
|
382
|
-
// width: '150px',
|
|
383
|
-
sticky: true
|
|
384
|
-
},
|
|
385
385
|
ActionLinkSlotContent: (rows) => {
|
|
386
386
|
return html`
|
|
387
387
|
${rows.map(
|
|
@@ -397,13 +397,6 @@ const Actions = {
|
|
|
397
397
|
)}
|
|
398
398
|
`;
|
|
399
399
|
},
|
|
400
|
-
ActionContextMenu: {
|
|
401
|
-
label: "Actions",
|
|
402
|
-
align: "center",
|
|
403
|
-
justify: "end",
|
|
404
|
-
// width: '150px',
|
|
405
|
-
sticky: true
|
|
406
|
-
},
|
|
407
400
|
ActionContextMenuSlotContent: (rows) => {
|
|
408
401
|
return html`
|
|
409
402
|
${rows.map(
|
|
@@ -422,8 +415,689 @@ const Actions = {
|
|
|
422
415
|
},
|
|
423
416
|
Data: actionsDataProvider
|
|
424
417
|
};
|
|
418
|
+
const financeBaseRows = [
|
|
419
|
+
{
|
|
420
|
+
id: 201,
|
|
421
|
+
account: "SEB Payroll Main",
|
|
422
|
+
accountNumber: "5001 10 123 45",
|
|
423
|
+
owner: "Nordic Retail AB",
|
|
424
|
+
segment: "Operating",
|
|
425
|
+
currency: "SEK",
|
|
426
|
+
amount: 125e4,
|
|
427
|
+
available: 98e4,
|
|
428
|
+
status: "Healthy",
|
|
429
|
+
lastUpdated: "2026-03-01",
|
|
430
|
+
expansionMode: "children"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
id: 202,
|
|
434
|
+
account: "SEB Liquidity Reserve",
|
|
435
|
+
accountNumber: "5001 10 128 01",
|
|
436
|
+
owner: "Nordic Retail AB",
|
|
437
|
+
segment: "Treasury",
|
|
438
|
+
currency: "SEK",
|
|
439
|
+
amount: 34e5,
|
|
440
|
+
available: 3389e3,
|
|
441
|
+
status: "Healthy",
|
|
442
|
+
lastUpdated: "2026-03-01",
|
|
443
|
+
expansionMode: "full"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
id: 203,
|
|
447
|
+
account: "SEB Project Escrow",
|
|
448
|
+
accountNumber: "5001 10 129 77",
|
|
449
|
+
owner: "Green Build One",
|
|
450
|
+
segment: "Escrow",
|
|
451
|
+
currency: "SEK",
|
|
452
|
+
amount: 49e4,
|
|
453
|
+
available: 21e4,
|
|
454
|
+
status: "Watch",
|
|
455
|
+
lastUpdated: "2026-03-02",
|
|
456
|
+
expansionMode: "children"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
id: 204,
|
|
460
|
+
account: "SEB Vendor Settlement",
|
|
461
|
+
accountNumber: "5001 10 132 09",
|
|
462
|
+
owner: "Supply Chain Ops",
|
|
463
|
+
segment: "Operating",
|
|
464
|
+
currency: "SEK",
|
|
465
|
+
amount: 28e4,
|
|
466
|
+
available: 75e3,
|
|
467
|
+
status: "Risk",
|
|
468
|
+
lastUpdated: "2026-03-02",
|
|
469
|
+
expansionMode: "full"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
id: 205,
|
|
473
|
+
account: "SEB FX Settlement Flow",
|
|
474
|
+
accountNumber: "5001 10 140 55",
|
|
475
|
+
owner: "Cross Border Team",
|
|
476
|
+
segment: "FX",
|
|
477
|
+
currency: "SEK",
|
|
478
|
+
amount: 77e4,
|
|
479
|
+
available: 59e4,
|
|
480
|
+
status: "Healthy",
|
|
481
|
+
lastUpdated: "2026-03-03",
|
|
482
|
+
expansionMode: "none"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
id: 206,
|
|
486
|
+
account: "SEB Tax Holding",
|
|
487
|
+
accountNumber: "5001 10 143 88",
|
|
488
|
+
owner: "Tax Office",
|
|
489
|
+
segment: "Compliance",
|
|
490
|
+
currency: "SEK",
|
|
491
|
+
amount: 36e4,
|
|
492
|
+
available: 359900,
|
|
493
|
+
status: "Healthy",
|
|
494
|
+
lastUpdated: "2026-03-03",
|
|
495
|
+
expansionMode: "none"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
id: 207,
|
|
499
|
+
account: "SEB Benefits Wallet",
|
|
500
|
+
accountNumber: "5001 10 147 31",
|
|
501
|
+
owner: "People Operations",
|
|
502
|
+
segment: "Payroll",
|
|
503
|
+
currency: "SEK",
|
|
504
|
+
amount: 42e4,
|
|
505
|
+
available: 165e3,
|
|
506
|
+
status: "Watch",
|
|
507
|
+
lastUpdated: "2026-03-04",
|
|
508
|
+
expansionMode: "children"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
id: 208,
|
|
512
|
+
account: "SEB Capital Buffer",
|
|
513
|
+
accountNumber: "5001 10 149 92",
|
|
514
|
+
owner: "CFO Office",
|
|
515
|
+
segment: "Treasury",
|
|
516
|
+
currency: "SEK",
|
|
517
|
+
amount: 51e5,
|
|
518
|
+
available: 5095e3,
|
|
519
|
+
status: "Healthy",
|
|
520
|
+
lastUpdated: "2026-03-04",
|
|
521
|
+
expansionMode: "children"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
id: 209,
|
|
525
|
+
account: "SEB M&A Holding",
|
|
526
|
+
accountNumber: "5001 10 151 66",
|
|
527
|
+
owner: "Strategy Group",
|
|
528
|
+
segment: "Investment",
|
|
529
|
+
currency: "SEK",
|
|
530
|
+
amount: 11e5,
|
|
531
|
+
available: 85e4,
|
|
532
|
+
status: "Watch",
|
|
533
|
+
lastUpdated: "2026-03-05",
|
|
534
|
+
expansionMode: "full"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
id: 210,
|
|
538
|
+
account: "SEB Lease Clearing",
|
|
539
|
+
accountNumber: "5001 10 158 03",
|
|
540
|
+
owner: "Property Ops",
|
|
541
|
+
segment: "Operating",
|
|
542
|
+
currency: "SEK",
|
|
543
|
+
amount: 195e3,
|
|
544
|
+
available: 42e3,
|
|
545
|
+
status: "Risk",
|
|
546
|
+
lastUpdated: "2026-03-05",
|
|
547
|
+
expansionMode: "children"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
id: 211,
|
|
551
|
+
account: "SEB Insurance Pool",
|
|
552
|
+
accountNumber: "5001 10 161 74",
|
|
553
|
+
owner: "Risk Management",
|
|
554
|
+
segment: "Insurance",
|
|
555
|
+
currency: "SEK",
|
|
556
|
+
amount: 62e4,
|
|
557
|
+
available: 6e5,
|
|
558
|
+
status: "Healthy",
|
|
559
|
+
lastUpdated: "2026-03-06",
|
|
560
|
+
expansionMode: "children"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
id: 212,
|
|
564
|
+
account: "SEB Card Settlement",
|
|
565
|
+
accountNumber: "5001 10 166 20",
|
|
566
|
+
owner: "Payments Platform",
|
|
567
|
+
segment: "Payments",
|
|
568
|
+
currency: "SEK",
|
|
569
|
+
amount: 86e4,
|
|
570
|
+
available: 31e4,
|
|
571
|
+
status: "Watch",
|
|
572
|
+
lastUpdated: "2026-03-06",
|
|
573
|
+
expansionMode: "children"
|
|
574
|
+
}
|
|
575
|
+
];
|
|
576
|
+
const mapExpandedFinanceRows = (entries) => {
|
|
577
|
+
return entries.map((entry) => ({
|
|
578
|
+
...entry,
|
|
579
|
+
account: Slot(entry.account, ["value"]),
|
|
580
|
+
amount: Slot(entry.amount, ["amount-value", "amount-currency"]),
|
|
581
|
+
available: Slot(entry.available, ["available-value", "available-currency"]),
|
|
582
|
+
status: Slot(entry.status, ["status"]),
|
|
583
|
+
accountNumber: String(entry.accountNumberDisplay ?? ""),
|
|
584
|
+
accountNumberDisplay: Slot(entry.accountNumberDisplay, ["main"]),
|
|
585
|
+
actions: Slot(void 0, ["main"])
|
|
586
|
+
}));
|
|
587
|
+
};
|
|
588
|
+
const financeRows = financeBaseRows.map((row) => ({
|
|
589
|
+
...row.expansionMode === "children" ? {
|
|
590
|
+
isExpandable: true,
|
|
591
|
+
subRowCount: 2,
|
|
592
|
+
subRows: async () => {
|
|
593
|
+
const related = financeExpandedRowsById[Number(row.id)] ?? [];
|
|
594
|
+
await new Promise((resolve) => setTimeout(resolve, 180));
|
|
595
|
+
return mapExpandedFinanceRows(related);
|
|
596
|
+
}
|
|
597
|
+
} : row.expansionMode === "full" ? {
|
|
598
|
+
isExpandable: true,
|
|
599
|
+
subRowCount: 1,
|
|
600
|
+
fullContent: async () => {
|
|
601
|
+
await new Promise((resolve) => setTimeout(resolve, 180));
|
|
602
|
+
return true;
|
|
603
|
+
}
|
|
604
|
+
} : {
|
|
605
|
+
isExpandable: row.expansionMode !== "none"
|
|
606
|
+
},
|
|
607
|
+
...row,
|
|
608
|
+
account: Slot(row.account, ["account-icon", "value"]),
|
|
609
|
+
amount: Slot(row.amount, ["amount-value", "amount-currency"]),
|
|
610
|
+
available: Slot(row.available, ["available-value", "available-currency"]),
|
|
611
|
+
status: Slot(row.status, ["status"]),
|
|
612
|
+
accountNumberDisplay: Slot(row.accountNumber, ["main"]),
|
|
613
|
+
actions: Slot(void 0, ["main"])
|
|
614
|
+
}));
|
|
615
|
+
const financeExpandableData = async (request) => {
|
|
616
|
+
let data = [...financeRows];
|
|
617
|
+
if (request.searchQuery) {
|
|
618
|
+
const query = request.searchQuery.toLowerCase();
|
|
619
|
+
data = data.filter(
|
|
620
|
+
(row) => [
|
|
621
|
+
row.id,
|
|
622
|
+
row.account,
|
|
623
|
+
row.owner,
|
|
624
|
+
row.segment,
|
|
625
|
+
row.currency,
|
|
626
|
+
row.status,
|
|
627
|
+
row.accountNumber
|
|
628
|
+
].join(" ").toLowerCase().includes(query)
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
if (request.sortColumn && data.length > 0) {
|
|
632
|
+
const key = request.sortColumn;
|
|
633
|
+
data.sort((a, b) => {
|
|
634
|
+
const aValue = String(a[key] ?? "");
|
|
635
|
+
const bValue = String(b[key] ?? "");
|
|
636
|
+
return request.sortDirection === "desc" ? bValue.localeCompare(aValue) : aValue.localeCompare(bValue);
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
const start = (request.page - 1) * request.rows;
|
|
640
|
+
const end = start + request.rows;
|
|
641
|
+
return {
|
|
642
|
+
rows: data.slice(start, end),
|
|
643
|
+
total: data.length
|
|
644
|
+
};
|
|
645
|
+
};
|
|
646
|
+
const financeExpandedRowsById = {
|
|
647
|
+
201: [
|
|
648
|
+
{
|
|
649
|
+
id: "201-r1",
|
|
650
|
+
account: "Payroll Batch - March",
|
|
651
|
+
owner: "Nordic Retail AB",
|
|
652
|
+
segment: "Outgoing",
|
|
653
|
+
status: "Booked",
|
|
654
|
+
amount: 52e4,
|
|
655
|
+
available: 73e4,
|
|
656
|
+
currency: "SEK",
|
|
657
|
+
lastUpdated: "2026-03-01",
|
|
658
|
+
accountNumberDisplay: "5001 10 123 45"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
id: "201-r2",
|
|
662
|
+
account: "Payroll Tax Reserve",
|
|
663
|
+
owner: "Nordic Retail AB",
|
|
664
|
+
segment: "Reserved",
|
|
665
|
+
status: "Pending",
|
|
666
|
+
amount: 21e4,
|
|
667
|
+
available: 52e4,
|
|
668
|
+
currency: "SEK",
|
|
669
|
+
lastUpdated: "2026-03-01",
|
|
670
|
+
accountNumberDisplay: "5001 10 123 45"
|
|
671
|
+
}
|
|
672
|
+
],
|
|
673
|
+
203: [
|
|
674
|
+
{
|
|
675
|
+
id: "203-r1",
|
|
676
|
+
account: "Project Milestone A",
|
|
677
|
+
owner: "Green Build One",
|
|
678
|
+
segment: "Escrow Hold",
|
|
679
|
+
status: "Held",
|
|
680
|
+
amount: 18e4,
|
|
681
|
+
available: 31e4,
|
|
682
|
+
currency: "SEK",
|
|
683
|
+
lastUpdated: "2026-03-02",
|
|
684
|
+
accountNumberDisplay: "5001 10 129 77"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
id: "203-r2",
|
|
688
|
+
account: "Project Milestone B",
|
|
689
|
+
owner: "Green Build One",
|
|
690
|
+
segment: "Escrow Hold",
|
|
691
|
+
status: "Held",
|
|
692
|
+
amount: 11e4,
|
|
693
|
+
available: 2e5,
|
|
694
|
+
currency: "SEK",
|
|
695
|
+
lastUpdated: "2026-03-02",
|
|
696
|
+
accountNumberDisplay: "5001 10 129 77"
|
|
697
|
+
}
|
|
698
|
+
],
|
|
699
|
+
205: [
|
|
700
|
+
{
|
|
701
|
+
id: "205-r1",
|
|
702
|
+
account: "Cross Border Payroll Bridge",
|
|
703
|
+
owner: "Cross Border Team",
|
|
704
|
+
segment: "FX Transfer",
|
|
705
|
+
status: "Booked",
|
|
706
|
+
amount: 24e4,
|
|
707
|
+
available: 53e4,
|
|
708
|
+
currency: "SEK",
|
|
709
|
+
lastUpdated: "2026-03-03",
|
|
710
|
+
accountNumberDisplay: "5001 10 140 55"
|
|
711
|
+
}
|
|
712
|
+
],
|
|
713
|
+
207: [
|
|
714
|
+
{
|
|
715
|
+
id: "207-r1",
|
|
716
|
+
account: "Benefits Payout Week 10",
|
|
717
|
+
owner: "People Operations",
|
|
718
|
+
segment: "Outgoing",
|
|
719
|
+
status: "Pending",
|
|
720
|
+
amount: 14e4,
|
|
721
|
+
available: 28e4,
|
|
722
|
+
currency: "SEK",
|
|
723
|
+
lastUpdated: "2026-03-04",
|
|
724
|
+
accountNumberDisplay: "5001 10 147 31"
|
|
725
|
+
}
|
|
726
|
+
],
|
|
727
|
+
208: [
|
|
728
|
+
{
|
|
729
|
+
id: "208-r1",
|
|
730
|
+
account: "Quarterly Buffer Allocation",
|
|
731
|
+
owner: "CFO Office",
|
|
732
|
+
segment: "Reserved",
|
|
733
|
+
status: "Booked",
|
|
734
|
+
amount: 7e5,
|
|
735
|
+
available: 4395e3,
|
|
736
|
+
currency: "SEK",
|
|
737
|
+
lastUpdated: "2026-03-04",
|
|
738
|
+
accountNumberDisplay: "5001 10 149 92"
|
|
739
|
+
}
|
|
740
|
+
],
|
|
741
|
+
210: [
|
|
742
|
+
{
|
|
743
|
+
id: "210-r1",
|
|
744
|
+
account: "Lease Settlement Q1",
|
|
745
|
+
owner: "Property Ops",
|
|
746
|
+
segment: "Outgoing",
|
|
747
|
+
status: "Pending",
|
|
748
|
+
amount: 108e3,
|
|
749
|
+
available: 87e3,
|
|
750
|
+
currency: "SEK",
|
|
751
|
+
lastUpdated: "2026-03-05",
|
|
752
|
+
accountNumberDisplay: "5001 10 158 03"
|
|
753
|
+
}
|
|
754
|
+
],
|
|
755
|
+
212: [
|
|
756
|
+
{
|
|
757
|
+
id: "212-r1",
|
|
758
|
+
account: "Card Clearing Morning",
|
|
759
|
+
owner: "Payments Platform",
|
|
760
|
+
segment: "Settled",
|
|
761
|
+
status: "Booked",
|
|
762
|
+
amount: 21e4,
|
|
763
|
+
available: 65e4,
|
|
764
|
+
currency: "SEK",
|
|
765
|
+
lastUpdated: "2026-03-06",
|
|
766
|
+
accountNumberDisplay: "5001 10 166 20"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
id: "212-r2",
|
|
770
|
+
account: "Card Clearing Afternoon",
|
|
771
|
+
owner: "Payments Platform",
|
|
772
|
+
segment: "Pending",
|
|
773
|
+
status: "Pending",
|
|
774
|
+
amount: 34e4,
|
|
775
|
+
available: 31e4,
|
|
776
|
+
currency: "SEK",
|
|
777
|
+
lastUpdated: "2026-03-06",
|
|
778
|
+
accountNumberDisplay: "5001 10 166 20"
|
|
779
|
+
}
|
|
780
|
+
],
|
|
781
|
+
211: [
|
|
782
|
+
{
|
|
783
|
+
id: "211-r1",
|
|
784
|
+
account: "Insurance Buffer Allocation",
|
|
785
|
+
owner: "Risk Management",
|
|
786
|
+
segment: "Reserved",
|
|
787
|
+
status: "Booked",
|
|
788
|
+
amount: 12e4,
|
|
789
|
+
available: 48e4,
|
|
790
|
+
currency: "SEK",
|
|
791
|
+
lastUpdated: "2026-03-06",
|
|
792
|
+
accountNumberDisplay: "5001 10 161 74"
|
|
793
|
+
}
|
|
794
|
+
]
|
|
795
|
+
};
|
|
796
|
+
const ExpandableFinance = {
|
|
797
|
+
Columns: [
|
|
798
|
+
{
|
|
799
|
+
key: "account",
|
|
800
|
+
label: "Name",
|
|
801
|
+
sortable: true,
|
|
802
|
+
width: "28ch",
|
|
803
|
+
sticky: "left"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
key: "owner",
|
|
807
|
+
label: "Owner",
|
|
808
|
+
sortable: true,
|
|
809
|
+
width: "22ch"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
key: "segment",
|
|
813
|
+
label: "Segment",
|
|
814
|
+
sortable: true,
|
|
815
|
+
width: "14ch"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
key: "status",
|
|
819
|
+
label: "Status",
|
|
820
|
+
sortable: true,
|
|
821
|
+
width: "12ch"
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
key: "accountNumberDisplay",
|
|
825
|
+
label: "Account",
|
|
826
|
+
sortable: true,
|
|
827
|
+
width: "18ch"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
key: "amount",
|
|
831
|
+
label: "Booked",
|
|
832
|
+
sortable: true,
|
|
833
|
+
justify: "end"
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
key: "available",
|
|
837
|
+
label: "Balance",
|
|
838
|
+
sortable: true,
|
|
839
|
+
justify: "end"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
key: "actions",
|
|
843
|
+
label: "Actions",
|
|
844
|
+
sortable: false,
|
|
845
|
+
justify: "end",
|
|
846
|
+
sticky: "right"
|
|
847
|
+
}
|
|
848
|
+
],
|
|
849
|
+
Tfoot: {
|
|
850
|
+
label: "Totals",
|
|
851
|
+
sticky: true
|
|
852
|
+
},
|
|
853
|
+
Data: financeExpandableData,
|
|
854
|
+
SlotContent: (rows) => html`
|
|
855
|
+
${rows.map(
|
|
856
|
+
(row) => html`
|
|
857
|
+
<gds-badge
|
|
858
|
+
slot="status:${row.id}:status"
|
|
859
|
+
size="small"
|
|
860
|
+
variant="${String(row.status) === "Healthy" ? "positive" : String(row.status) === "Watch" ? "warning" : "negative"}"
|
|
861
|
+
>
|
|
862
|
+
${String(row.status)}
|
|
863
|
+
</gds-badge>
|
|
864
|
+
|
|
865
|
+
<gds-formatted-account
|
|
866
|
+
slot="accountNumberDisplay:${row.id}:main"
|
|
867
|
+
account="${String(
|
|
868
|
+
row.accountNumber ?? row.accountNumberDisplay ?? ""
|
|
869
|
+
)}"
|
|
870
|
+
format="seb-account"
|
|
871
|
+
></gds-formatted-account>
|
|
872
|
+
|
|
873
|
+
<gds-badge
|
|
874
|
+
slot="account:${row.id}:account-icon"
|
|
875
|
+
size="small"
|
|
876
|
+
variant="information"
|
|
877
|
+
>
|
|
878
|
+
${String(row.currency)}
|
|
879
|
+
</gds-badge>
|
|
880
|
+
|
|
881
|
+
<gds-formatted-number
|
|
882
|
+
slot="amount:${row.id}:amount-value"
|
|
883
|
+
.value=${Number(row.amount)}
|
|
884
|
+
></gds-formatted-number>
|
|
885
|
+
<gds-badge slot="amount:${row.id}:amount-currency" size="small">
|
|
886
|
+
${String(row.currency)}
|
|
887
|
+
</gds-badge>
|
|
888
|
+
|
|
889
|
+
<gds-formatted-number
|
|
890
|
+
slot="available:${row.id}:available-value"
|
|
891
|
+
.value=${Number(row.available)}
|
|
892
|
+
></gds-formatted-number>
|
|
893
|
+
<gds-badge slot="available:${row.id}:available-currency" size="small">
|
|
894
|
+
${String(row.currency)}
|
|
895
|
+
</gds-badge>
|
|
896
|
+
|
|
897
|
+
<gds-context-menu slot="actions:${row.id}:main">
|
|
898
|
+
<gds-button slot="trigger" rank="tertiary" size="small">
|
|
899
|
+
<gds-icon-dot-grid-one-horizontal></gds-icon-dot-grid-one-horizontal>
|
|
900
|
+
</gds-button>
|
|
901
|
+
<gds-menu-item>Open account</gds-menu-item>
|
|
902
|
+
<gds-menu-item>View transactions</gds-menu-item>
|
|
903
|
+
<gds-menu-item>Export statement</gds-menu-item>
|
|
904
|
+
</gds-context-menu>
|
|
905
|
+
|
|
906
|
+
${row.expansionMode === "full" && row.id === 204 ? html`
|
|
907
|
+
<gds-card
|
|
908
|
+
slot="expand:${row.id}:full"
|
|
909
|
+
variant="neutral-02-outlined"
|
|
910
|
+
>
|
|
911
|
+
<gds-flex flex-direction="column" gap="m" padding="m">
|
|
912
|
+
<gds-flex
|
|
913
|
+
justify-content="space-between"
|
|
914
|
+
align-items="center"
|
|
915
|
+
flex-wrap="wrap"
|
|
916
|
+
gap="s"
|
|
917
|
+
>
|
|
918
|
+
<gds-flex flex-direction="column" gap="2xs">
|
|
919
|
+
<gds-text font="heading-xs">
|
|
920
|
+
Vendor Settlement Monitoring
|
|
921
|
+
</gds-text>
|
|
922
|
+
<gds-text font="detail-s-book">
|
|
923
|
+
Available balance on ${String(row.account)} is below
|
|
924
|
+
internal threshold for ${String(row.segment)}.
|
|
925
|
+
</gds-text>
|
|
926
|
+
</gds-flex>
|
|
927
|
+
<gds-badge variant="negative" size="small"
|
|
928
|
+
>Action needed</gds-badge
|
|
929
|
+
>
|
|
930
|
+
</gds-flex>
|
|
931
|
+
|
|
932
|
+
<gds-grid columns="1; s{1}; m{2}; l{3}" gap="s">
|
|
933
|
+
<gds-card variant="neutral-02-outlined" padding="s">
|
|
934
|
+
<gds-flex flex-direction="column" gap="2xs">
|
|
935
|
+
<gds-text font="detail-s-book">Booked Amount</gds-text>
|
|
936
|
+
<gds-formatted-number
|
|
937
|
+
.value=${Number(row.amount)}
|
|
938
|
+
></gds-formatted-number>
|
|
939
|
+
</gds-flex>
|
|
940
|
+
</gds-card>
|
|
941
|
+
|
|
942
|
+
<gds-card variant="neutral-02-outlined" padding="s">
|
|
943
|
+
<gds-flex flex-direction="column" gap="2xs">
|
|
944
|
+
<gds-text font="detail-s-book">Available</gds-text>
|
|
945
|
+
<gds-formatted-number
|
|
946
|
+
.value=${Number(row.available)}
|
|
947
|
+
></gds-formatted-number>
|
|
948
|
+
</gds-flex>
|
|
949
|
+
</gds-card>
|
|
950
|
+
|
|
951
|
+
<gds-card variant="neutral-02-outlined" padding="s">
|
|
952
|
+
<gds-flex flex-direction="column" gap="2xs">
|
|
953
|
+
<gds-text font="detail-s-book">Owner</gds-text>
|
|
954
|
+
<gds-text font="detail-s-bold"
|
|
955
|
+
>${String(row.owner)}</gds-text
|
|
956
|
+
>
|
|
957
|
+
</gds-flex>
|
|
958
|
+
</gds-card>
|
|
959
|
+
</gds-grid>
|
|
960
|
+
|
|
961
|
+
<gds-flex gap="s" flex-wrap="wrap">
|
|
962
|
+
<gds-button size="small">Top up account</gds-button>
|
|
963
|
+
<gds-button rank="secondary" size="small">
|
|
964
|
+
Set alert rule
|
|
965
|
+
</gds-button>
|
|
966
|
+
<gds-button rank="tertiary" size="small">
|
|
967
|
+
View settlement queue
|
|
968
|
+
</gds-button>
|
|
969
|
+
</gds-flex>
|
|
970
|
+
</gds-flex>
|
|
971
|
+
</gds-card>
|
|
972
|
+
` : row.expansionMode === "full" && row.id === 202 ? html`
|
|
973
|
+
<gds-card
|
|
974
|
+
slot="expand:${row.id}:full"
|
|
975
|
+
variant="neutral-02-outlined"
|
|
976
|
+
>
|
|
977
|
+
<gds-flex flex-direction="column" gap="m" padding="m">
|
|
978
|
+
<gds-flex
|
|
979
|
+
justify-content="space-between"
|
|
980
|
+
align-items="center"
|
|
981
|
+
flex-wrap="wrap"
|
|
982
|
+
gap="s"
|
|
983
|
+
>
|
|
984
|
+
<gds-flex flex-direction="column" gap="2xs">
|
|
985
|
+
<gds-text font="heading-xs">
|
|
986
|
+
Liquidity Reserve Overview
|
|
987
|
+
</gds-text>
|
|
988
|
+
<gds-text font="detail-s-book">
|
|
989
|
+
${String(row.account)} acts as the primary treasury
|
|
990
|
+
reserve used for short-term liquidity balancing.
|
|
991
|
+
</gds-text>
|
|
992
|
+
</gds-flex>
|
|
993
|
+
<gds-badge variant="information" size="small">
|
|
994
|
+
Treasury account
|
|
995
|
+
</gds-badge>
|
|
996
|
+
</gds-flex>
|
|
997
|
+
|
|
998
|
+
<gds-grid columns="s{1}; m{2}; l{4}" gap="s">
|
|
999
|
+
<gds-card variant="neutral-02-outlined" padding="s">
|
|
1000
|
+
<gds-flex flex-direction="column" gap="2xs">
|
|
1001
|
+
<gds-text font="detail-s-book">
|
|
1002
|
+
Booked Amount
|
|
1003
|
+
</gds-text>
|
|
1004
|
+
<gds-formatted-number
|
|
1005
|
+
.value=${Number(row.amount)}
|
|
1006
|
+
></gds-formatted-number>
|
|
1007
|
+
</gds-flex>
|
|
1008
|
+
</gds-card>
|
|
1009
|
+
|
|
1010
|
+
<gds-card variant="neutral-02-outlined" padding="s">
|
|
1011
|
+
<gds-flex flex-direction="column" gap="2xs">
|
|
1012
|
+
<gds-text font="detail-s-book">Available</gds-text>
|
|
1013
|
+
<gds-formatted-number
|
|
1014
|
+
.value=${Number(row.available)}
|
|
1015
|
+
></gds-formatted-number>
|
|
1016
|
+
</gds-flex>
|
|
1017
|
+
</gds-card>
|
|
1018
|
+
|
|
1019
|
+
<gds-card variant="neutral-02-outlined" padding="s">
|
|
1020
|
+
<gds-flex flex-direction="column" gap="2xs">
|
|
1021
|
+
<gds-text font="detail-s-book">Owner</gds-text>
|
|
1022
|
+
<gds-text font="detail-s-bold">
|
|
1023
|
+
${String(row.owner)}
|
|
1024
|
+
</gds-text>
|
|
1025
|
+
</gds-flex>
|
|
1026
|
+
</gds-card>
|
|
1027
|
+
|
|
1028
|
+
<gds-card variant="neutral-02-outlined" padding="s">
|
|
1029
|
+
<gds-flex flex-direction="column" gap="2xs">
|
|
1030
|
+
<gds-text font="detail-s-book">Updated</gds-text>
|
|
1031
|
+
<gds-text font="detail-s-bold">
|
|
1032
|
+
${String(row.lastUpdated)}
|
|
1033
|
+
</gds-text>
|
|
1034
|
+
</gds-flex>
|
|
1035
|
+
</gds-card>
|
|
1036
|
+
</gds-grid>
|
|
1037
|
+
|
|
1038
|
+
<gds-flex gap="s" flex-wrap="wrap">
|
|
1039
|
+
<gds-button size="small">View cash forecast</gds-button>
|
|
1040
|
+
<gds-button rank="secondary" size="small">
|
|
1041
|
+
Transfer funds
|
|
1042
|
+
</gds-button>
|
|
1043
|
+
<gds-button rank="tertiary" size="small">
|
|
1044
|
+
Download reserve report
|
|
1045
|
+
</gds-button>
|
|
1046
|
+
</gds-flex>
|
|
1047
|
+
</gds-flex>
|
|
1048
|
+
</gds-card>
|
|
1049
|
+
` : row.expansionMode === "full" && row.id === 209 ? html`
|
|
1050
|
+
<gds-flex
|
|
1051
|
+
slot="expand:${row.id}:full"
|
|
1052
|
+
gap="s"
|
|
1053
|
+
align-items="center"
|
|
1054
|
+
padding="m"
|
|
1055
|
+
>
|
|
1056
|
+
<gds-badge size="small" variant="warning"
|
|
1057
|
+
>Monitoring</gds-badge
|
|
1058
|
+
>
|
|
1059
|
+
<gds-text font="detail-s-book">
|
|
1060
|
+
Available balance on ${String(row.account)} is below
|
|
1061
|
+
internal threshold for ${String(row.segment)}.
|
|
1062
|
+
</gds-text>
|
|
1063
|
+
</gds-flex>
|
|
1064
|
+
` : null}
|
|
1065
|
+
`
|
|
1066
|
+
)}
|
|
1067
|
+
`,
|
|
1068
|
+
TfootSlotContent: (rows) => {
|
|
1069
|
+
const pageBooked = rows.reduce(
|
|
1070
|
+
(sum, row) => sum + (Number(row.amount) || 0),
|
|
1071
|
+
0
|
|
1072
|
+
);
|
|
1073
|
+
const pageAvailable = rows.reduce(
|
|
1074
|
+
(sum, row) => sum + (Number(row.available) || 0),
|
|
1075
|
+
0
|
|
1076
|
+
);
|
|
1077
|
+
const riskCount = rows.filter((row) => String(row.status) === "Risk").length;
|
|
1078
|
+
return html`
|
|
1079
|
+
<span slot="tfoot:account">${rows.length} accounts</span>
|
|
1080
|
+
<gds-badge
|
|
1081
|
+
slot="tfoot:status"
|
|
1082
|
+
size="small"
|
|
1083
|
+
variant="${riskCount > 0 ? "negative" : "positive"}"
|
|
1084
|
+
>
|
|
1085
|
+
${riskCount > 0 ? `${riskCount} at risk` : "No risk"}
|
|
1086
|
+
</gds-badge>
|
|
1087
|
+
<gds-flex slot="tfoot:amount" gap="s" align-items="center">
|
|
1088
|
+
<gds-formatted-number .value=${pageBooked}></gds-formatted-number>
|
|
1089
|
+
<gds-badge size="small">SEK</gds-badge>
|
|
1090
|
+
</gds-flex>
|
|
1091
|
+
<gds-flex slot="tfoot:available" gap="s" align-items="center">
|
|
1092
|
+
<gds-formatted-number .value=${pageAvailable}></gds-formatted-number>
|
|
1093
|
+
<gds-badge size="small">SEK</gds-badge>
|
|
1094
|
+
</gds-flex>
|
|
1095
|
+
`;
|
|
1096
|
+
}
|
|
1097
|
+
};
|
|
425
1098
|
export {
|
|
426
1099
|
Actions,
|
|
1100
|
+
ExpandableFinance,
|
|
427
1101
|
Feedback,
|
|
428
1102
|
Users
|
|
429
1103
|
};
|