@africanies/angular-web-sdk 0.1.6 → 0.1.7
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/.nx/cache/13466509747676776487/dist/libs/africanies-core/README.md +85 -0
- package/.nx/cache/13466509747676776487/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +4634 -0
- package/.nx/cache/13466509747676776487/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -0
- package/.nx/cache/13466509747676776487/dist/libs/africanies-core/package.json +31 -0
- package/.nx/cache/13466509747676776487/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +2743 -0
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/README.md +68 -0
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +5 -0
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/assets/carriers/dhl.svg +7 -0
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +19395 -0
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/package.json +35 -0
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +5493 -0
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/README.md +46 -0
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +231 -0
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/package.json +35 -0
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/tailwind-preset.cjs +262 -0
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +174 -0
- package/.nx/cache/run.json +27 -27
- package/.nx/cache/terminalOutputs/13466509747676776487 +21 -0
- package/.nx/cache/terminalOutputs/1446890025183346611 +32 -0
- package/.nx/cache/terminalOutputs/14995846848874973576 +21 -0
- package/.nx/cache/terminalOutputs/6337357866566791975 +6 -0
- package/.nx/cache/terminalOutputs/6673686859704879504 +21 -0
- package/.nx/cache/terminalOutputs/8032148447904822353 +183 -0
- package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db +0 -0
- package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-shm +0 -0
- package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-wal +0 -0
- package/.nx/workspace-data/d/daemon.log +1609 -0
- package/.nx/workspace-data/d/server-process.json +2 -2
- package/.nx/workspace-data/file-map.json +3428 -3428
- package/.nx/workspace-data/nx_files.nxt +0 -0
- package/.nx/workspace-data/project-graph.json +2 -2
- package/apps/playground/src/app/pages/button-page.ts +5 -3
- package/apps/playground/src/app/pages/feedback-page.ts +1 -1
- package/apps/playground/src/app/pages/home-page.ts +1 -1
- package/apps/playground/src/app/pages/icons-page.ts +3 -3
- package/apps/playground/src/app/pages/lecture-page.ts +3 -3
- package/apps/playground/src/app/pages/models-page.ts +1 -1
- package/apps/playground/src/app/pages/overlay-demos.ts +1 -1
- package/apps/playground/src/app/pages/tokens-page.ts +17 -3
- package/apps/playground/src/app/pages/usecases/onboarding-login.page.ts +1 -1
- package/apps/playground/src/app/pages/usecases/onboarding-reset-password.page.ts +1 -1
- package/apps/playground/src/app/pages/usecases/shipment-detail.page.ts +1 -1
- package/apps/playground/src/app/pages/viewport-preview.component.ts +1 -1
- package/apps/playground/src/app/snippets/button.snippets.ts +4 -3
- package/apps/playground/src/index.html +6 -0
- package/apps/playground/src/styles.css +4 -5
- package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +131 -8
- package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -1
- package/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +8 -6
- package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +12 -2
- package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -1
- package/dist/libs/africanies-theme/tailwind-preset.cjs +16 -7
- package/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +11 -3
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +83 -63
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -1
- package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +11 -8
- package/libs/africanies-core/src/index.ts +1 -0
- package/libs/africanies-core/src/lib/notification/index.ts +1 -1
- package/libs/africanies-core/src/lib/notification/notification-link.spec.ts +40 -7
- package/libs/africanies-core/src/lib/notification/notification-link.ts +143 -7
- package/libs/africanies-theme/src/lib/mode-color.safelist.ts +8 -2
- package/libs/africanies-theme/src/lib/mode-color.service.ts +16 -0
- package/libs/africanies-theme/tailwind-preset.cjs +16 -7
- package/libs/africanies-ui/src/lib/button/button.component.ts +5 -1
- package/libs/africanies-ui/src/lib/feedback/empty-state.component.ts +1 -1
- package/libs/africanies-ui/src/lib/feedback/error-state.component.ts +1 -1
- package/libs/africanies-ui/src/lib/forms/file-upload/file-preview.dialog.ts +1 -1
- package/libs/africanies-ui/src/lib/forms/file-upload/file-upload.component.ts +4 -4
- package/libs/africanies-ui/src/lib/forms/form-field.classes.ts +2 -2
- package/libs/africanies-ui/src/lib/forms/select/select.component.ts +1 -1
- package/libs/africanies-ui/src/lib/layout/app-shell-header.component.ts +1 -1
- package/libs/africanies-ui/src/lib/layout/app-shell.component.ts +2 -2
- package/libs/africanies-ui/src/lib/navigation/shipping-mode-switch/shipping-mode-switch.component.ts +2 -2
- package/libs/africanies-ui/src/lib/navigation/side-nav/africanies-side-nav.component.html +2 -2
- package/libs/africanies-ui/src/lib/navigation/side-nav/africanies-side-nav.component.ts +10 -6
- package/libs/africanies-ui/src/lib/notifications/notification-drawer.panel.ts +21 -8
- package/libs/africanies-ui/src/lib/overlay/drawer.service.ts +1 -1
- package/libs/africanies-ui/src/lib/overlay/modal.service.ts +1 -1
- package/libs/africanies-ui/src/lib/pagination/pagination.component.ts +3 -3
- package/libs/africanies-ui/src/lib/table/table.component.ts +5 -5
- package/libs/africanies-ui/src/lib/toast/toast-host.component.ts +4 -4
- package/libs/africanies-ui/src/lib/toast/toast-item.component.ts +1 -1
- package/package.json +1 -1
|
@@ -38,9 +38,10 @@ const DEFAULT_LINK_ACTIVE: IsActiveMatchOptions = {
|
|
|
38
38
|
/**
|
|
39
39
|
* App shell side navigation with icons, nested items, and a collapsible rail.
|
|
40
40
|
*
|
|
41
|
-
* **Design - ink spine:** a continuous mode-accent edge
|
|
42
|
-
*
|
|
43
|
-
*
|
|
41
|
+
* **Design - ink spine:** a continuous mode-accent edge; active leaves use
|
|
42
|
+
* primary fill + white text (portal parity); expanded parents of an active
|
|
43
|
+
* child use primary text on white. Collapsed mode keeps icons; hover opens a
|
|
44
|
+
* floating label blade (name + children) instead of a plain tooltip.
|
|
44
45
|
*
|
|
45
46
|
* ## Parent items with children
|
|
46
47
|
* **Expanded rail:** branches start open by default (`expandBranchesByDefault`).
|
|
@@ -244,12 +245,15 @@ export class SideNavComponent {
|
|
|
244
245
|
|
|
245
246
|
const leaf = this.isLeafActive(item);
|
|
246
247
|
const ancestor = !leaf && this.isItemActive(item);
|
|
248
|
+
const colors = this.modeColor.classes();
|
|
247
249
|
|
|
250
|
+
// Portal: active leaf / collapsed rail = primary fill + white text.
|
|
248
251
|
if (leaf) {
|
|
249
|
-
return `${base} ${
|
|
252
|
+
return `${base} ${colors.activeFill} font-semibold`;
|
|
250
253
|
}
|
|
254
|
+
// Portal: expanded parent of active child = primary text on white.
|
|
251
255
|
if (ancestor) {
|
|
252
|
-
return `${base}
|
|
256
|
+
return `${base} bg-transparent ${colors.text} font-semibold`;
|
|
253
257
|
}
|
|
254
258
|
return (
|
|
255
259
|
`${base} font-medium text-neutral-600 hover:bg-background-welcome hover:text-ink ` +
|
|
@@ -264,7 +268,7 @@ export class SideNavComponent {
|
|
|
264
268
|
(item.disabled ? 'cursor-not-allowed opacity-50 ' : 'cursor-pointer ');
|
|
265
269
|
|
|
266
270
|
if (this.isLeafActive(item)) {
|
|
267
|
-
return `${base} ${this.modeColor.classes().
|
|
271
|
+
return `${base} ${this.modeColor.classes().activeFill} font-semibold`;
|
|
268
272
|
}
|
|
269
273
|
return (
|
|
270
274
|
`${base} font-medium text-neutral-600 hover:bg-background-welcome hover:text-ink ` +
|
|
@@ -127,7 +127,7 @@ const MARK_ALL_CONFIRM_MS = 4000;
|
|
|
127
127
|
<button
|
|
128
128
|
africanies-button
|
|
129
129
|
type="button"
|
|
130
|
-
variant="
|
|
130
|
+
variant="flat"
|
|
131
131
|
size="sm"
|
|
132
132
|
(click)="retryInitialLoad()"
|
|
133
133
|
>
|
|
@@ -296,13 +296,14 @@ export class NotificationDrawerPanel {
|
|
|
296
296
|
});
|
|
297
297
|
|
|
298
298
|
protected readonly title = computed(() => this.data.title ?? 'Notifications');
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
);
|
|
299
|
+
private readonly seededItems = this.data.notifications ?? [];
|
|
300
|
+
protected readonly items = signal<AfricaniesNotification[]>(this.seededItems);
|
|
302
301
|
protected readonly markingId = signal<string | null>(null);
|
|
303
302
|
protected readonly markingAll = signal(false);
|
|
304
303
|
protected readonly confirmingMarkAll = signal(false);
|
|
305
|
-
protected readonly loadingInitial = signal(
|
|
304
|
+
protected readonly loadingInitial = signal(
|
|
305
|
+
!!this.data.onLoadPage && this.seededItems.length === 0,
|
|
306
|
+
);
|
|
306
307
|
protected readonly loadingMore = signal(false);
|
|
307
308
|
protected readonly loadError = signal<string | null>(null);
|
|
308
309
|
protected readonly hasMore = signal(false);
|
|
@@ -334,7 +335,12 @@ export class NotificationDrawerPanel {
|
|
|
334
335
|
|
|
335
336
|
constructor() {
|
|
336
337
|
if (this.data.onLoadPage) {
|
|
337
|
-
this.
|
|
338
|
+
if (this.seededItems.length > 0) {
|
|
339
|
+
this.currentPage.set(1);
|
|
340
|
+
this.fetchPage(1, 'refresh');
|
|
341
|
+
} else {
|
|
342
|
+
this.fetchPage(1, 'replace');
|
|
343
|
+
}
|
|
338
344
|
}
|
|
339
345
|
|
|
340
346
|
effect(() => {
|
|
@@ -578,7 +584,10 @@ export class NotificationDrawerPanel {
|
|
|
578
584
|
this.fetchPage(this.currentPage() + 1, 'append');
|
|
579
585
|
}
|
|
580
586
|
|
|
581
|
-
private fetchPage(
|
|
587
|
+
private fetchPage(
|
|
588
|
+
page: number,
|
|
589
|
+
mode: 'replace' | 'append' | 'refresh',
|
|
590
|
+
): void {
|
|
582
591
|
const loadPage = this.data.onLoadPage;
|
|
583
592
|
if (!loadPage) {
|
|
584
593
|
return;
|
|
@@ -587,6 +596,8 @@ export class NotificationDrawerPanel {
|
|
|
587
596
|
if (mode === 'replace') {
|
|
588
597
|
this.loadingInitial.set(true);
|
|
589
598
|
this.loadError.set(null);
|
|
599
|
+
} else if (mode === 'refresh') {
|
|
600
|
+
this.loadError.set(null);
|
|
590
601
|
} else {
|
|
591
602
|
this.loadingMore.set(true);
|
|
592
603
|
}
|
|
@@ -594,7 +605,7 @@ export class NotificationDrawerPanel {
|
|
|
594
605
|
this.runPageLoad(
|
|
595
606
|
() => loadPage(page),
|
|
596
607
|
(result) => {
|
|
597
|
-
if (mode === 'replace') {
|
|
608
|
+
if (mode === 'replace' || mode === 'refresh') {
|
|
598
609
|
this.items.set(result.items ?? []);
|
|
599
610
|
} else {
|
|
600
611
|
this.appendItems(result.items ?? []);
|
|
@@ -614,6 +625,8 @@ export class NotificationDrawerPanel {
|
|
|
614
625
|
if (mode === 'replace') {
|
|
615
626
|
this.loadError.set('Could not load notifications. Try again.');
|
|
616
627
|
this.loadingInitial.set(false);
|
|
628
|
+
} else if (mode === 'refresh' && this.items().length === 0) {
|
|
629
|
+
this.loadError.set('Could not load notifications. Try again.');
|
|
617
630
|
}
|
|
618
631
|
this.loadingMore.set(false);
|
|
619
632
|
},
|
|
@@ -134,7 +134,7 @@ type PageItem = number | 'ellipsis';
|
|
|
134
134
|
<button
|
|
135
135
|
africanies-button
|
|
136
136
|
type="button"
|
|
137
|
-
variant="
|
|
137
|
+
variant="flat"
|
|
138
138
|
size="sm"
|
|
139
139
|
[disabled]="controlsDisabled() || !meta().has_previous_page"
|
|
140
140
|
(click)="emitPage(meta().current_page - 1)"
|
|
@@ -155,7 +155,7 @@ type PageItem = number | 'ellipsis';
|
|
|
155
155
|
type="button"
|
|
156
156
|
size="sm"
|
|
157
157
|
class="min-w-8"
|
|
158
|
-
[variant]="item === meta().current_page ? 'primary' : '
|
|
158
|
+
[variant]="item === meta().current_page ? 'primary' : 'flat'"
|
|
159
159
|
[disabled]="controlsDisabled()"
|
|
160
160
|
[attr.aria-label]="'Page ' + item"
|
|
161
161
|
[attr.aria-current]="
|
|
@@ -170,7 +170,7 @@ type PageItem = number | 'ellipsis';
|
|
|
170
170
|
<button
|
|
171
171
|
africanies-button
|
|
172
172
|
type="button"
|
|
173
|
-
variant="
|
|
173
|
+
variant="flat"
|
|
174
174
|
size="sm"
|
|
175
175
|
[disabled]="controlsDisabled() || !meta().has_next_page"
|
|
176
176
|
(click)="emitPage(meta().current_page + 1)"
|
|
@@ -142,7 +142,7 @@ import { TableColumn, TableSortChange } from './table-column';
|
|
|
142
142
|
<button
|
|
143
143
|
africanies-button
|
|
144
144
|
type="button"
|
|
145
|
-
variant="
|
|
145
|
+
variant="flat"
|
|
146
146
|
size="sm"
|
|
147
147
|
[disabled]="loading() || refreshing()"
|
|
148
148
|
[attr.aria-label]="refreshLabel()"
|
|
@@ -162,7 +162,7 @@ import { TableColumn, TableSortChange } from './table-column';
|
|
|
162
162
|
<button
|
|
163
163
|
africanies-button
|
|
164
164
|
type="button"
|
|
165
|
-
variant="
|
|
165
|
+
variant="flat"
|
|
166
166
|
size="sm"
|
|
167
167
|
[attr.aria-label]="filterLabel()"
|
|
168
168
|
(click)="filterClick.emit()"
|
|
@@ -182,7 +182,7 @@ import { TableColumn, TableSortChange } from './table-column';
|
|
|
182
182
|
<button
|
|
183
183
|
africanies-button
|
|
184
184
|
type="button"
|
|
185
|
-
variant="
|
|
185
|
+
variant="flat"
|
|
186
186
|
size="sm"
|
|
187
187
|
[attr.aria-label]="exportLabel()"
|
|
188
188
|
(click)="exportClick.emit()"
|
|
@@ -208,7 +208,7 @@ import { TableColumn, TableSortChange } from './table-column';
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
<div
|
|
211
|
-
class="min-w-0 w-full overflow-x-auto rounded-md border border-border bg-white dark:border-white/10 dark:bg-ink"
|
|
211
|
+
class="min-w-0 w-full overflow-x-auto rounded-md border border-border bg-white dark:border-white/10 dark:bg-ink-surface"
|
|
212
212
|
>
|
|
213
213
|
<table
|
|
214
214
|
class="w-max min-w-full table-auto border-separate border-spacing-0 bg-inherit text-left text-body text-ink dark:text-white"
|
|
@@ -806,7 +806,7 @@ export class TableComponent<T = unknown> {
|
|
|
806
806
|
// Fill comes from {@link headerSoftClass} on the cell — do not re-tint.
|
|
807
807
|
return `${side} z-[2]`;
|
|
808
808
|
}
|
|
809
|
-
const fill = 'bg-white dark:bg-ink';
|
|
809
|
+
const fill = 'bg-white dark:bg-ink-surface';
|
|
810
810
|
return `${side} ${fill}`;
|
|
811
811
|
}
|
|
812
812
|
|
|
@@ -25,14 +25,14 @@ import { ToastItemComponent } from './toast-item.component';
|
|
|
25
25
|
<div class="flex w-full flex-col gap-2">
|
|
26
26
|
@if (toastService.showHostActions()) {
|
|
27
27
|
<div
|
|
28
|
-
class="sticky top-0 z-10 flex flex-wrap justify-end gap-2 bg-white/80 pb-1 backdrop-blur-sm dark:bg-ink/80"
|
|
28
|
+
class="sticky top-0 z-10 flex flex-wrap justify-end gap-2 bg-white/80 pb-1 backdrop-blur-sm dark:bg-ink-surface/80"
|
|
29
29
|
>
|
|
30
30
|
@if (toastService.hasStacks()) {
|
|
31
31
|
@if (toastService.allStacksExpanded()) {
|
|
32
32
|
<button
|
|
33
33
|
africanies-button
|
|
34
34
|
type="button"
|
|
35
|
-
variant="
|
|
35
|
+
variant="flat"
|
|
36
36
|
size="sm"
|
|
37
37
|
class="!min-h-0 !rounded-full !bg-white !px-2.5 !py-1 !text-caption dark:!bg-ink"
|
|
38
38
|
(click)="toastService.collapseAll()"
|
|
@@ -43,7 +43,7 @@ import { ToastItemComponent } from './toast-item.component';
|
|
|
43
43
|
<button
|
|
44
44
|
africanies-button
|
|
45
45
|
type="button"
|
|
46
|
-
variant="
|
|
46
|
+
variant="flat"
|
|
47
47
|
size="sm"
|
|
48
48
|
class="!min-h-0 !rounded-full !bg-white !px-2.5 !py-1 !text-caption dark:!bg-ink"
|
|
49
49
|
(click)="toastService.expandAll()"
|
|
@@ -55,7 +55,7 @@ import { ToastItemComponent } from './toast-item.component';
|
|
|
55
55
|
<button
|
|
56
56
|
africanies-button
|
|
57
57
|
type="button"
|
|
58
|
-
variant="
|
|
58
|
+
variant="flat"
|
|
59
59
|
size="sm"
|
|
60
60
|
class="!min-h-0 !rounded-full !bg-white !px-2.5 !py-1 !text-caption dark:!bg-ink"
|
|
61
61
|
(click)="toastService.clear()"
|
|
@@ -262,7 +262,7 @@ export class ToastItemComponent {
|
|
|
262
262
|
() =>
|
|
263
263
|
'africanies-toast-enter relative flex w-full overflow-hidden rounded-lg border border-border ' +
|
|
264
264
|
'bg-white/95 text-ink shadow-lg backdrop-blur-md ' +
|
|
265
|
-
'dark:border-white/15 dark:bg-ink/95 dark:text-white',
|
|
265
|
+
'dark:border-white/15 dark:bg-ink-950/95 dark:text-white',
|
|
266
266
|
);
|
|
267
267
|
|
|
268
268
|
protected readonly accentClass = computed(
|