@aaamb/ngx-design-system 1.3.6 → 1.3.8
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/fesm2022/aaamb-ngx-design-system.mjs +4075 -0
- package/fesm2022/aaamb-ngx-design-system.mjs.map +1 -0
- package/package.json +14 -58
- package/styles/compiled.css +2 -0
- package/types/aaamb-ngx-design-system.d.ts +1142 -0
- package/.editorconfig +0 -17
- package/.nvmrc +0 -1
- package/.postcssrc.json +0 -5
- package/.storybook/main.ts +0 -20
- package/.storybook/preview.ts +0 -23
- package/.storybook/storybook.css +0 -1
- package/.storybook/tsconfig.json +0 -19
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/tasks.json +0 -42
- package/CHANGELOG.md +0 -10
- package/LOCAL_DEVELOPMENT.md +0 -129
- package/angular.json +0 -74
- package/bitbucket-pipelines.yml +0 -41
- package/iac/bin/app.ts +0 -42
- package/iac/cdk.json +0 -82
- package/iac/lib/config/environments.ts +0 -19
- package/iac/lib/config/types.ts +0 -13
- package/iac/lib/stacks/certificate-stack.ts +0 -34
- package/iac/lib/stacks/frontend-stack.ts +0 -120
- package/iac/lib/stacks/index.ts +0 -2
- package/iac/package-lock.json +0 -726
- package/iac/package.json +0 -25
- package/iac/tsconfig.json +0 -24
- package/ng-package.json +0 -8
- package/src/components/button/button-green.stories.ts +0 -101
- package/src/components/button/button-text.stories.ts +0 -105
- package/src/components/button/button-white.stories.ts +0 -105
- package/src/components/button/button.component.stories.ts +0 -91
- package/src/components/button/button.component.ts +0 -93
- package/src/components/checkbox/checkbox.component.html +0 -30
- package/src/components/checkbox/checkbox.component.stories.ts +0 -183
- package/src/components/checkbox/checkbox.component.ts +0 -211
- package/src/components/datepicker-selector/datepicker-selector.component.html +0 -103
- package/src/components/datepicker-selector/datepicker-selector.component.stories.ts +0 -69
- package/src/components/datepicker-selector/datepicker-selector.component.ts +0 -287
- package/src/components/error-message/error-message.component.html +0 -3
- package/src/components/error-message/error-message.component.ts +0 -13
- package/src/components/filter-button/filter-button.component.html +0 -286
- package/src/components/filter-button/filter-button.component.stories.ts +0 -123
- package/src/components/filter-button/filter-button.component.ts +0 -582
- package/src/components/icon/icon.component.ts +0 -20
- package/src/components/icon/icon.html +0 -1333
- package/src/components/icon/icon.stories.ts +0 -49
- package/src/components/icon/icons-list.stories.ts +0 -42
- package/src/components/input/input.component.stories.ts +0 -101
- package/src/components/input/input.component.ts +0 -317
- package/src/components/input/input.html +0 -160
- package/src/components/input-datepicker/input-datepicker.component.ts +0 -356
- package/src/components/input-datepicker/input-datepicker.html +0 -69
- package/src/components/input-datepicker/input-datepicker.stories.ts +0 -99
- package/src/components/input-rangepicker/input-rangepicker.component.ts +0 -365
- package/src/components/input-rangepicker/input-rangepicker.html +0 -54
- package/src/components/input-rangepicker/input-rangepicker.stories.ts +0 -88
- package/src/components/input-weekpicker/input-weekpicker.component.ts +0 -417
- package/src/components/input-weekpicker/input-weekpicker.html +0 -54
- package/src/components/input-weekpicker/input-weekpicker.stories.ts +0 -103
- package/src/components/label/label.component.html +0 -20
- package/src/components/label/label.component.ts +0 -22
- package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.html +0 -32
- package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.stories.ts +0 -57
- package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.ts +0 -48
- package/src/components/modals/feedback-modal/feedback-modal.component.html +0 -118
- package/src/components/modals/feedback-modal/feedback-modal.component.stories.ts +0 -93
- package/src/components/modals/feedback-modal/feedback-modal.component.ts +0 -187
- package/src/components/modals/help-modal/help-modal.component.html +0 -32
- package/src/components/modals/help-modal/help-modal.component.stories.ts +0 -76
- package/src/components/modals/help-modal/help-modal.component.ts +0 -54
- package/src/components/modals/information-modal/information-modal.component.html +0 -24
- package/src/components/modals/information-modal/information-modal.component.stories.ts +0 -62
- package/src/components/modals/information-modal/information-modal.component.ts +0 -35
- package/src/components/modals/main-modal/main-modal.component.html +0 -85
- package/src/components/modals/main-modal/main-modal.component.stories.ts +0 -127
- package/src/components/modals/main-modal/main-modal.component.ts +0 -85
- package/src/components/modals/notification-modal/notification-modal.component.html +0 -22
- package/src/components/modals/notification-modal/notification-modal.component.stories.ts +0 -59
- package/src/components/modals/notification-modal/notification-modal.component.ts +0 -37
- package/src/components/selectors/multiple-selector/multiple-selector.component.html +0 -51
- package/src/components/selectors/multiple-selector/multiple-selector.component.stories.ts +0 -306
- package/src/components/selectors/multiple-selector/multiple-selector.component.ts +0 -308
- package/src/components/selectors/single-selector/single-selector.component.html +0 -46
- package/src/components/selectors/single-selector/single-selector.component.stories.ts +0 -294
- package/src/components/selectors/single-selector/single-selector.component.ts +0 -239
- package/src/components/side-nav/side-nav.component.stories.ts +0 -157
- package/src/components/side-nav/side-nav.component.ts +0 -306
- package/src/components/snackbar/snackbar.component.ts +0 -150
- package/src/components/snackbar/snackbar.html +0 -21
- package/src/components/snackbar/snackbar.stories.ts +0 -51
- package/src/components/state/state.component.ts +0 -30
- package/src/components/state/state.html +0 -13
- package/src/components/state/state.stories.ts +0 -74
- package/src/components/table/table.component.html +0 -441
- package/src/components/table/table.component.scss +0 -28
- package/src/components/table/table.component.stories.ts +0 -655
- package/src/components/table/table.component.ts +0 -475
- package/src/components/tabs/tabs.component.stories.ts +0 -114
- package/src/components/tabs/tabs.component.ts +0 -69
- package/src/core/types.ts +0 -486
- package/src/public-api.ts +0 -23
- package/tsconfig.json +0 -37
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -13
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
@if (getRows().length > 0 || isLoading) {
|
|
2
|
-
<!-- Main table layout: data grid + footer pagination area -->
|
|
3
|
-
<div class="flex min-h-[60vh] w-full flex-col justify-between gap-4">
|
|
4
|
-
<!-- @if (isLoading) {
|
|
5
|
-
<div
|
|
6
|
-
class="flex min-h-40 items-center justify-center rounded-2xl bg-white-base/80 px-6 py-8 shadow-sm"
|
|
7
|
-
>
|
|
8
|
-
<div class="flex items-center gap-3 text-green-1">
|
|
9
|
-
<span
|
|
10
|
-
class="h-10 w-10 animate-spin rounded-full border-t-green-1"
|
|
11
|
-
></span>
|
|
12
|
-
<span class="text-sm font-medium">Loading table data</span>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
} -->
|
|
16
|
-
|
|
17
|
-
<div class="w-full overflow-x-auto">
|
|
18
|
-
<table
|
|
19
|
-
[attr.data-testid]="contentTestId"
|
|
20
|
-
class="min-w-full table-fixed border-separate border-spacing-0"
|
|
21
|
-
>
|
|
22
|
-
<!-- Interactive header row: sorting, drag-and-drop, and column resizing -->
|
|
23
|
-
<thead class="bg-green-1 text-white-base">
|
|
24
|
-
<tr
|
|
25
|
-
cdkDropList
|
|
26
|
-
cdkDropListOrientation="horizontal"
|
|
27
|
-
class="h-10 min-h-10 max-h-11.25"
|
|
28
|
-
(cdkDropListDropped)="drop($event)"
|
|
29
|
-
[ngStyle]="allContentLeft ? { 'text-align': 'left' } : null"
|
|
30
|
-
>
|
|
31
|
-
@for (
|
|
32
|
-
column of getHeaderCells();
|
|
33
|
-
track column.id + "-" + headerRenderVersion
|
|
34
|
-
) {
|
|
35
|
-
@if (isColumnSortable(column)) {
|
|
36
|
-
@if (areColumnsDraggable) {
|
|
37
|
-
<!-- Sortable + draggable header cell -->
|
|
38
|
-
<th
|
|
39
|
-
cdkDrag
|
|
40
|
-
cdkDragLockAxis="x"
|
|
41
|
-
[ngStyle]="getColumnHeaderStyles(column)"
|
|
42
|
-
class="relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0 overflow-hidden cursor-grab active:cursor-grabbing"
|
|
43
|
-
[attr.data-testid]="getHeaderTestId(column)"
|
|
44
|
-
>
|
|
45
|
-
<button
|
|
46
|
-
type="button"
|
|
47
|
-
cdkDragHandle
|
|
48
|
-
class="group flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 border-none outline-0 bg-transparent hover:bg-white/10"
|
|
49
|
-
[ngClass]="headerAlignmentClass(column)"
|
|
50
|
-
(click)="sort(column, $event)"
|
|
51
|
-
[title]="
|
|
52
|
-
enableMultiSort ? 'Shift+click to add to sort' : null
|
|
53
|
-
"
|
|
54
|
-
>
|
|
55
|
-
<!-- When right-aligned, the sort indicator is shown before the header text -->
|
|
56
|
-
@if (getSortEntry(column); as entry) {
|
|
57
|
-
@if (isSortIconLeading(column)) {
|
|
58
|
-
@if (multiSortCriteria.length > 1) {
|
|
59
|
-
<span
|
|
60
|
-
class="inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px"
|
|
61
|
-
>
|
|
62
|
-
{{ entry.index + 1 }}
|
|
63
|
-
</span>
|
|
64
|
-
}
|
|
65
|
-
<ads-icon
|
|
66
|
-
class="text-current transition-transform duration-200 -rotate-90"
|
|
67
|
-
[class.rotate-90]="entry.direction === 'ASC'"
|
|
68
|
-
[iconName]="'arrow_right'"
|
|
69
|
-
[size]="16"
|
|
70
|
-
></ads-icon>
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
<span class="truncate">{{
|
|
74
|
-
column.column.columnDef.header
|
|
75
|
-
}}</span>
|
|
76
|
-
<!-- For left/center aligned headers, the sort indicator is shown after the text -->
|
|
77
|
-
@if (getSortEntry(column); as entry) {
|
|
78
|
-
@if (!isSortIconLeading(column)) {
|
|
79
|
-
@if (multiSortCriteria.length > 1) {
|
|
80
|
-
<span
|
|
81
|
-
class="inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px"
|
|
82
|
-
>
|
|
83
|
-
{{ entry.index + 1 }}
|
|
84
|
-
</span>
|
|
85
|
-
}
|
|
86
|
-
<ads-icon
|
|
87
|
-
class="text-current transition-transform duration-200 -rotate-90"
|
|
88
|
-
[class.rotate-90]="entry.direction === 'ASC'"
|
|
89
|
-
[iconName]="'arrow_right'"
|
|
90
|
-
[size]="16"
|
|
91
|
-
></ads-icon>
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
</button>
|
|
95
|
-
<div
|
|
96
|
-
class="absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1"
|
|
97
|
-
(mousedown)="startResize($event, column)"
|
|
98
|
-
(touchstart)="startResize($event, column)"
|
|
99
|
-
></div>
|
|
100
|
-
</th>
|
|
101
|
-
} @else {
|
|
102
|
-
<!-- Sortable header cell without drag-and-drop -->
|
|
103
|
-
<th
|
|
104
|
-
[ngStyle]="getColumnHeaderStyles(column)"
|
|
105
|
-
class="relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0"
|
|
106
|
-
[attr.data-testid]="getHeaderTestId(column)"
|
|
107
|
-
>
|
|
108
|
-
<button
|
|
109
|
-
type="button"
|
|
110
|
-
class="flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 hover:bg-white/10 bg-green-base"
|
|
111
|
-
[ngClass]="headerAlignmentClass(column)"
|
|
112
|
-
(click)="sort(column, $event)"
|
|
113
|
-
[title]="
|
|
114
|
-
enableMultiSort ? 'Shift+click to add to sort' : null
|
|
115
|
-
"
|
|
116
|
-
>
|
|
117
|
-
@if (getSortEntry(column); as entry) {
|
|
118
|
-
@if (isSortIconLeading(column)) {
|
|
119
|
-
@if (multiSortCriteria.length > 1) {
|
|
120
|
-
<span
|
|
121
|
-
class="inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base"
|
|
122
|
-
>
|
|
123
|
-
{{ entry.index + 1 }}
|
|
124
|
-
</span>
|
|
125
|
-
}
|
|
126
|
-
<ads-icon
|
|
127
|
-
class="text-current transition-transform duration-200 -rotate-90"
|
|
128
|
-
[class.rotate-90]="entry.direction === 'ASC'"
|
|
129
|
-
[iconName]="'arrow_right'"
|
|
130
|
-
[size]="16"
|
|
131
|
-
></ads-icon>
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
<span class="truncate">{{
|
|
135
|
-
column.column.columnDef.header
|
|
136
|
-
}}</span>
|
|
137
|
-
@if (getSortEntry(column); as entry) {
|
|
138
|
-
@if (!isSortIconLeading(column)) {
|
|
139
|
-
@if (multiSortCriteria.length > 1) {
|
|
140
|
-
<span
|
|
141
|
-
class="inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base"
|
|
142
|
-
>
|
|
143
|
-
{{ entry.index + 1 }}
|
|
144
|
-
</span>
|
|
145
|
-
}
|
|
146
|
-
<ads-icon
|
|
147
|
-
class="text-current transition-transform duration-200 -rotate-90"
|
|
148
|
-
[class.rotate-90]="entry.direction === 'ASC'"
|
|
149
|
-
[iconName]="'arrow_right'"
|
|
150
|
-
[size]="16"
|
|
151
|
-
></ads-icon>
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
</button>
|
|
155
|
-
<div
|
|
156
|
-
class="absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1"
|
|
157
|
-
(mousedown)="startResize($event, column)"
|
|
158
|
-
(touchstart)="startResize($event, column)"
|
|
159
|
-
></div>
|
|
160
|
-
</th>
|
|
161
|
-
}
|
|
162
|
-
} @else {
|
|
163
|
-
@if (areColumnsDraggable) {
|
|
164
|
-
<!-- Non-sortable but draggable header cell -->
|
|
165
|
-
<th
|
|
166
|
-
cdkDrag
|
|
167
|
-
cdkDragLockAxis="x"
|
|
168
|
-
[ngStyle]="getColumnHeaderStyles(column)"
|
|
169
|
-
class="relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0"
|
|
170
|
-
[attr.data-testid]="getHeaderTestId(column)"
|
|
171
|
-
>
|
|
172
|
-
<div
|
|
173
|
-
cdkDragHandle
|
|
174
|
-
class="flex h-full w-full items-center px-3"
|
|
175
|
-
[ngClass]="headerAlignmentClass(column)"
|
|
176
|
-
>
|
|
177
|
-
<span class="truncate">{{
|
|
178
|
-
column.column.columnDef.header
|
|
179
|
-
}}</span>
|
|
180
|
-
</div>
|
|
181
|
-
<div
|
|
182
|
-
class="absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1"
|
|
183
|
-
(mousedown)="startResize($event, column)"
|
|
184
|
-
(touchstart)="startResize($event, column)"
|
|
185
|
-
></div>
|
|
186
|
-
</th>
|
|
187
|
-
} @else {
|
|
188
|
-
<!-- Plain header cell (no sort, no drag) -->
|
|
189
|
-
<th
|
|
190
|
-
[ngStyle]="getColumnHeaderStyles(column)"
|
|
191
|
-
class="relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0"
|
|
192
|
-
[attr.data-testid]="getHeaderTestId(column)"
|
|
193
|
-
>
|
|
194
|
-
<div
|
|
195
|
-
class="flex h-full w-full items-center px-3"
|
|
196
|
-
[ngClass]="headerAlignmentClass(column)"
|
|
197
|
-
>
|
|
198
|
-
<span class="truncate">{{
|
|
199
|
-
column.column.columnDef.header
|
|
200
|
-
}}</span>
|
|
201
|
-
</div>
|
|
202
|
-
<div
|
|
203
|
-
class="absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1"
|
|
204
|
-
(mousedown)="startResize($event, column)"
|
|
205
|
-
(touchstart)="startResize($event, column)"
|
|
206
|
-
></div>
|
|
207
|
-
</th>
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
@if (showButtons) {
|
|
213
|
-
<!-- Optional actions column header -->
|
|
214
|
-
<th
|
|
215
|
-
[attr.data-testid]="contentTestId + '-header-actions'"
|
|
216
|
-
class="h-10 min-h-10 max-h-11.25 px-3 text-center font-medium whitespace-nowrap rounded-r-2xl"
|
|
217
|
-
[ngStyle]="{ width: '1%' }"
|
|
218
|
-
>
|
|
219
|
-
Actions
|
|
220
|
-
</th>
|
|
221
|
-
}
|
|
222
|
-
</tr>
|
|
223
|
-
</thead>
|
|
224
|
-
|
|
225
|
-
<tbody>
|
|
226
|
-
<!-- Data rows -->
|
|
227
|
-
@for (row of getRows(); track trackByFn($index, row)) {
|
|
228
|
-
<tr
|
|
229
|
-
[attr.data-testid]="getRowTestId(row, $index)"
|
|
230
|
-
class="h-10 min-h-10 max-h-11.25"
|
|
231
|
-
>
|
|
232
|
-
@for (cell of row.getVisibleCells(); track cell.id) {
|
|
233
|
-
<td
|
|
234
|
-
class="border-b border-[#aedad8] px-3 py-0 text-sm whitespace-pre-line wrap-break-word text-black-base"
|
|
235
|
-
[ngClass]="cellAlignmentClass(cell)"
|
|
236
|
-
[ngStyle]="allContentLeft ? { padding: '0' } : null"
|
|
237
|
-
>
|
|
238
|
-
@if (isStateCell(cell)) {
|
|
239
|
-
<!-- State-like values (status/active) are rendered with ads-state for a consistent visual token -->
|
|
240
|
-
<ads-state
|
|
241
|
-
[shape]="getStateStyle(cell).shape ?? statusShape"
|
|
242
|
-
[containerShapes]="getStateStyle(cell).shape ?? statusShape"
|
|
243
|
-
[borderColor]="getStateStyle(cell).borderColor"
|
|
244
|
-
[bgColor]="getStateStyle(cell).bgColor"
|
|
245
|
-
[textColor]="getStateStyle(cell).textColor"
|
|
246
|
-
[text]="getStateText(cell)"
|
|
247
|
-
[fullWidth]="getStateStyle(cell).fullWidth ?? false"
|
|
248
|
-
[boldText]="getStateStyle(cell).boldText ?? true"
|
|
249
|
-
></ads-state>
|
|
250
|
-
} @else {
|
|
251
|
-
<!-- Generic cell rendering for non-state columns via TanStack flexRender output -->
|
|
252
|
-
<ng-container
|
|
253
|
-
*flexRender="
|
|
254
|
-
cell.column.columnDef.cell;
|
|
255
|
-
props: cell.getContext();
|
|
256
|
-
let renderedCell
|
|
257
|
-
"
|
|
258
|
-
>
|
|
259
|
-
<div
|
|
260
|
-
[innerHTML]="renderedCell"
|
|
261
|
-
[ngStyle]="
|
|
262
|
-
allContentLeft ? { 'text-align': 'left' } : null
|
|
263
|
-
"
|
|
264
|
-
></div>
|
|
265
|
-
</ng-container>
|
|
266
|
-
}
|
|
267
|
-
</td>
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
@if (showButtons && actionButtons.length > 0) {
|
|
271
|
-
<!-- Optional row action buttons -->
|
|
272
|
-
<td
|
|
273
|
-
class="border-b border-[#aedad8] px-1 py-1 align-middle text-center whitespace-nowrap"
|
|
274
|
-
>
|
|
275
|
-
<div
|
|
276
|
-
class="flex w-full items-center justify-center gap-1 p-0"
|
|
277
|
-
>
|
|
278
|
-
@for (button of actionButtons; track $index) {
|
|
279
|
-
@if (
|
|
280
|
-
!button.condition || button.condition(row.original)
|
|
281
|
-
) {
|
|
282
|
-
<button
|
|
283
|
-
nz-tooltip
|
|
284
|
-
[nzTooltipTitle]="
|
|
285
|
-
getTooltipText(button, row.original)
|
|
286
|
-
"
|
|
287
|
-
ads-button
|
|
288
|
-
type="button"
|
|
289
|
-
[onlyIconButton]="true"
|
|
290
|
-
color="text"
|
|
291
|
-
[attr.data-testid]="
|
|
292
|
-
getActionButtonTestId(row, button, $index)
|
|
293
|
-
"
|
|
294
|
-
[title]="getTooltipText(button, row.original)"
|
|
295
|
-
[disabled]="
|
|
296
|
-
isActionButtonDisabled(button, row.original)
|
|
297
|
-
"
|
|
298
|
-
(click)="button.callback(row.original)"
|
|
299
|
-
>
|
|
300
|
-
<ads-icon
|
|
301
|
-
[ngClass]="
|
|
302
|
-
isActionButtonDisabled(button, row.original)
|
|
303
|
-
? 'text-neutral-disabled-text'
|
|
304
|
-
: 'text-green-1'
|
|
305
|
-
"
|
|
306
|
-
[iconName]="iconNameFor(button.icon)"
|
|
307
|
-
[size]="16"
|
|
308
|
-
></ads-icon>
|
|
309
|
-
</button>
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
</div>
|
|
313
|
-
</td>
|
|
314
|
-
}
|
|
315
|
-
</tr>
|
|
316
|
-
}
|
|
317
|
-
</tbody>
|
|
318
|
-
</table>
|
|
319
|
-
</div>
|
|
320
|
-
|
|
321
|
-
<!-- Footer controls: page size selector, page navigation, and total record counter -->
|
|
322
|
-
<div class="flex w-full flex-wrap items-center justify-end gap-4 py-2">
|
|
323
|
-
<div class="mr-auto flex items-center gap-2 text-sm text-green-1">
|
|
324
|
-
<span class="whitespace-nowrap font-medium">Rows per page</span>
|
|
325
|
-
<select
|
|
326
|
-
class="h-8 cursor-pointer rounded border border-aqua-1 bg-white-base px-2 text-sm text-green-1 outline-none transition hover:border-green-1 focus:border-green-1 focus:ring-2 focus:ring-green-1/20"
|
|
327
|
-
[value]="pageSize"
|
|
328
|
-
(change)="onPageSizeChange($event)"
|
|
329
|
-
[attr.data-testid]="contentTestId + '-page-size-select'"
|
|
330
|
-
>
|
|
331
|
-
<option value="10">10</option>
|
|
332
|
-
<option value="25">25</option>
|
|
333
|
-
<option value="50">50</option>
|
|
334
|
-
<option value="100">100</option>
|
|
335
|
-
</select>
|
|
336
|
-
</div>
|
|
337
|
-
|
|
338
|
-
<div class="flex w-fit items-center justify-center gap-1">
|
|
339
|
-
<button
|
|
340
|
-
type="button"
|
|
341
|
-
class="inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent"
|
|
342
|
-
[disabled]="currentPage === 1"
|
|
343
|
-
(click)="previousPage()"
|
|
344
|
-
[attr.data-testid]="contentTestId + '-pagination-previous'"
|
|
345
|
-
>
|
|
346
|
-
<span class="text-lg leading-none">‹</span>
|
|
347
|
-
Previous
|
|
348
|
-
</button>
|
|
349
|
-
|
|
350
|
-
<div class="flex items-center justify-center gap-1">
|
|
351
|
-
@for (page of getPageNumbers(); track $index) {
|
|
352
|
-
@if (page === null) {
|
|
353
|
-
<span
|
|
354
|
-
class="inline-flex h-8 min-w-8 select-none items-center justify-center px-2 font-medium text-neutral-disabled-text"
|
|
355
|
-
>...</span
|
|
356
|
-
>
|
|
357
|
-
} @else {
|
|
358
|
-
<button
|
|
359
|
-
type="button"
|
|
360
|
-
class="inline-flex h-8 min-w-8 items-center justify-center rounded px-2 font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 outline-0 border-none"
|
|
361
|
-
[ngClass]="{
|
|
362
|
-
'bg-green-1 text-white-base hover:text-white-base':
|
|
363
|
-
currentPage === page,
|
|
364
|
-
'bg-transparent': currentPage !== page,
|
|
365
|
-
}"
|
|
366
|
-
[disabled]="false"
|
|
367
|
-
(click)="goToPage(page)"
|
|
368
|
-
[attr.data-testid]="contentTestId + '-pagination-page-' + page"
|
|
369
|
-
>
|
|
370
|
-
{{ page }}
|
|
371
|
-
</button>
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
</div>
|
|
375
|
-
|
|
376
|
-
<button
|
|
377
|
-
type="button"
|
|
378
|
-
class="inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent"
|
|
379
|
-
[disabled]="currentPage === totalPages"
|
|
380
|
-
(click)="nextPage()"
|
|
381
|
-
[attr.data-testid]="contentTestId + '-pagination-next'"
|
|
382
|
-
>
|
|
383
|
-
Next
|
|
384
|
-
<span class="text-lg leading-none">›</span>
|
|
385
|
-
</button>
|
|
386
|
-
</div>
|
|
387
|
-
|
|
388
|
-
@if (totalRegisters) {
|
|
389
|
-
<div
|
|
390
|
-
class="w-fit min-w-20 text-sm font-medium text-neutral-disabled-text"
|
|
391
|
-
[attr.data-testid]="contentTestId + '-pagination-info'"
|
|
392
|
-
>
|
|
393
|
-
Total Records: {{ totalRegisters }}
|
|
394
|
-
</div>
|
|
395
|
-
}
|
|
396
|
-
</div>
|
|
397
|
-
</div>
|
|
398
|
-
} @else {
|
|
399
|
-
<!-- Empty state layout when there are no rows to display -->
|
|
400
|
-
<div class="w-full overflow-x-auto">
|
|
401
|
-
<table
|
|
402
|
-
[attr.data-testid]="contentTestId"
|
|
403
|
-
class="min-w-full table-fixed border-separate border-spacing-0"
|
|
404
|
-
>
|
|
405
|
-
<thead class="bg-green-1 text-white-base">
|
|
406
|
-
<tr class="h-10 min-h-10 max-h-11.25">
|
|
407
|
-
@for (column of getHeaderCells(); track column.id) {
|
|
408
|
-
<th
|
|
409
|
-
class="h-10 min-h-10 max-h-11.25 px-3 text-left font-medium first:rounded-l-2xl"
|
|
410
|
-
>
|
|
411
|
-
{{ column.column.columnDef.header }}
|
|
412
|
-
</th>
|
|
413
|
-
}
|
|
414
|
-
@if (showButtons) {
|
|
415
|
-
<th
|
|
416
|
-
class="h-10 min-h-10 max-h-11.25 px-3 text-center font-medium rounded-r-2xl"
|
|
417
|
-
>
|
|
418
|
-
Options
|
|
419
|
-
</th>
|
|
420
|
-
}
|
|
421
|
-
</tr>
|
|
422
|
-
</thead>
|
|
423
|
-
<tbody>
|
|
424
|
-
<tr>
|
|
425
|
-
<td [attr.colspan]="getEmptyColspan()" class="py-2">
|
|
426
|
-
<div
|
|
427
|
-
class="flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-aqua-2 bg-aqua-5/40 px-6 py-5 text-center"
|
|
428
|
-
>
|
|
429
|
-
<span class="text-base font-semibold text-green-1"
|
|
430
|
-
>No available data</span
|
|
431
|
-
>
|
|
432
|
-
<span class="text-sm text-neutral-disabled-text"
|
|
433
|
-
>No data to display right now.</span
|
|
434
|
-
>
|
|
435
|
-
</div>
|
|
436
|
-
</td>
|
|
437
|
-
</tr>
|
|
438
|
-
</tbody>
|
|
439
|
-
</table>
|
|
440
|
-
</div>
|
|
441
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
:host ::ng-deep .cdk-drag-preview {
|
|
2
|
-
background-color: #014744 !important;
|
|
3
|
-
color: #ffffff !important;
|
|
4
|
-
border-radius: 1rem !important;
|
|
5
|
-
border-right: 1px solid #ffffff33 !important;
|
|
6
|
-
box-shadow: 0 12px 28px #01474447 !important;
|
|
7
|
-
overflow: hidden !important;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
:host ::ng-deep .cdk-drag-placeholder {
|
|
11
|
-
opacity: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host ::ng-deep .cdk-drop-list-dragging th.cdk-drag:not(.cdk-drag-placeholder) {
|
|
15
|
-
transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host ::ng-deep th.cdk-drag-animating {
|
|
19
|
-
transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
::ng-deep .cdk-drag-preview {
|
|
23
|
-
background: #014743a9 !important;
|
|
24
|
-
color: white !important;
|
|
25
|
-
box-shadow: none !important;
|
|
26
|
-
border: none !important;
|
|
27
|
-
border-radius: 10rem !important;
|
|
28
|
-
}
|