@africanies/angular-web-sdk 0.1.4 → 0.1.6
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/{18132311043100376919 → 14876618240301288353}/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +456 -169
- package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
- package/.nx/cache/{18132311043100376919 → 14876618240301288353}/dist/libs/africanies-ui/package.json +5 -5
- package/.nx/cache/{5741611231803799383 → 14876618240301288353}/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +100 -20
- package/.nx/cache/{1275815545780424169 → 17626862048742598274}/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +6 -0
- package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
- package/.nx/cache/{14153928176747262656 → 17626862048742598274}/dist/libs/africanies-theme/package.json +3 -3
- package/.nx/cache/{1275815545780424169 → 17626862048742598274}/dist/libs/africanies-theme/tailwind-preset.cjs +15 -7
- package/.nx/cache/{14153928176747262656 → 17626862048742598274}/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +10 -1
- package/.nx/cache/{13524438527920092277 → 9040451482998546630}/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +9 -44
- package/.nx/cache/9040451482998546630/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -0
- package/.nx/cache/{13524438527920092277 → 9040451482998546630}/dist/libs/africanies-core/package.json +3 -3
- package/.nx/cache/{13524438527920092277 → 9040451482998546630}/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +6 -5
- package/.nx/cache/run.json +19 -19
- package/.nx/cache/terminalOutputs/13555699813138069787 +6 -0
- package/.nx/cache/terminalOutputs/{12148417737220755248 → 14061940909886036014} +172 -174
- package/.nx/cache/terminalOutputs/{3064561615116090625 → 14876618240301288353} +7 -7
- package/.nx/cache/terminalOutputs/{1275815545780424169 → 17626862048742598274} +2 -2
- package/.nx/cache/terminalOutputs/7978448102466861029 +32 -0
- package/.nx/cache/terminalOutputs/{4011892767661954819 → 9040451482998546630} +1 -1
- 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 +2370 -0
- package/.nx/workspace-data/d/server-process.json +2 -2
- package/.nx/workspace-data/file-map.json +3177 -3177
- package/.nx/workspace-data/nx_files.nxt +0 -0
- package/.nx/workspace-data/project-graph.json +2 -2
- package/apps/playground/src/app/app.routes.ts +15 -4
- package/apps/playground/src/app/app.ts +2 -2
- package/apps/playground/src/app/pages/home-page.ts +14 -14
- package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +8 -43
- package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -1
- package/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +6 -5
- package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +11 -11
- package/libs/africanies-core/src/lib/http/api-client.ts +4 -18
- package/libs/africanies-core/src/lib/http/is-retryable-get-error.ts +8 -4
- package/libs/africanies-core/src/lib/query/provide-africanies-query-defaults.ts +5 -6
- package/package.json +1 -1
- package/.nx/cache/1275815545780424169/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +0 -1
- package/.nx/cache/1275815545780424169/dist/libs/africanies-theme/package.json +0 -36
- package/.nx/cache/1275815545780424169/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +0 -157
- package/.nx/cache/13524438527920092277/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +0 -1
- package/.nx/cache/14153928176747262656/dist/libs/africanies-theme/README.md +0 -46
- package/.nx/cache/14153928176747262656/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +0 -215
- package/.nx/cache/14153928176747262656/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +0 -1
- package/.nx/cache/14153928176747262656/dist/libs/africanies-theme/tailwind-preset.cjs +0 -245
- package/.nx/cache/18132311043100376919/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +0 -1
- package/.nx/cache/18132311043100376919/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +0 -5410
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/README.md +0 -69
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/assets/icons.sprite.svg +0 -1844
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs +0 -832
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs.map +0 -1
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/package.json +0 -31
- package/.nx/cache/2782605790118376385/dist/libs/africanies-icons/types/africanies-africanies-icons.d.ts +0 -108
- package/.nx/cache/3064561615116090625/dist/libs/africanies-storage/README.md +0 -31
- package/.nx/cache/3064561615116090625/dist/libs/africanies-storage/fesm2022/africanies-africanies-storage.mjs +0 -243
- package/.nx/cache/3064561615116090625/dist/libs/africanies-storage/fesm2022/africanies-africanies-storage.mjs.map +0 -1
- package/.nx/cache/3064561615116090625/dist/libs/africanies-storage/package.json +0 -27
- package/.nx/cache/3064561615116090625/dist/libs/africanies-storage/types/africanies-africanies-storage.d.ts +0 -210
- package/.nx/cache/4011892767661954819/dist/libs/africanies-core/README.md +0 -85
- package/.nx/cache/4011892767661954819/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +0 -4546
- package/.nx/cache/4011892767661954819/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +0 -1
- package/.nx/cache/4011892767661954819/dist/libs/africanies-core/package.json +0 -32
- package/.nx/cache/4011892767661954819/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +0 -2740
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/README.md +0 -68
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +0 -5
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/assets/carriers/dhl.svg +0 -7
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +0 -19088
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +0 -1
- package/.nx/cache/5741611231803799383/dist/libs/africanies-ui/package.json +0 -36
- package/.nx/cache/6372470950255467653/dist/libs/africanies-models/README.md +0 -60
- package/.nx/cache/6372470950255467653/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs +0 -599
- package/.nx/cache/6372470950255467653/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs.map +0 -1
- package/.nx/cache/6372470950255467653/dist/libs/africanies-models/package.json +0 -24
- package/.nx/cache/6372470950255467653/dist/libs/africanies-models/types/africanies-africanies-models.d.ts +0 -1452
- package/.nx/cache/terminalOutputs/11768036696192889608 +0 -8
- package/.nx/cache/terminalOutputs/1227201614544602906 +0 -23
- package/.nx/cache/terminalOutputs/12538607787148205787 +0 -19
- package/.nx/cache/terminalOutputs/13524438527920092277 +0 -196
- package/.nx/cache/terminalOutputs/14153928176747262656 +0 -45
- package/.nx/cache/terminalOutputs/17404566492103808557 +0 -8
- package/.nx/cache/terminalOutputs/18132311043100376919 +0 -315
- package/.nx/cache/terminalOutputs/2436781291243085315 +0 -8
- package/.nx/cache/terminalOutputs/2782605790118376385 +0 -21
- package/.nx/cache/terminalOutputs/3681975492957101833 +0 -8
- package/.nx/cache/terminalOutputs/5741611231803799383 +0 -21
- package/.nx/cache/terminalOutputs/6037166070823946880 +0 -8
- package/.nx/cache/terminalOutputs/6372470950255467653 +0 -21
- package/.nx/cache/terminalOutputs/665190206482526466 +0 -175
- package/.nx/cache/terminalOutputs/7756595539965457927 +0 -23
- package/.nx/cache/terminalOutputs/9200013119269230075 +0 -8
- /package/.nx/cache/{18132311043100376919 → 14876618240301288353}/dist/libs/africanies-ui/README.md +0 -0
- /package/.nx/cache/{18132311043100376919 → 14876618240301288353}/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- /package/.nx/cache/{18132311043100376919 → 14876618240301288353}/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- /package/.nx/cache/{18132311043100376919 → 14876618240301288353}/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +0 -0
- /package/.nx/cache/{18132311043100376919 → 14876618240301288353}/dist/libs/africanies-ui/assets/carriers/dhl.svg +0 -0
- /package/.nx/cache/{1275815545780424169 → 17626862048742598274}/dist/libs/africanies-theme/README.md +0 -0
- /package/.nx/cache/{13524438527920092277 → 9040451482998546630}/dist/libs/africanies-core/README.md +0 -0
|
Binary file
|
|
@@ -826,7 +826,7 @@
|
|
|
826
826
|
"targetGroups": {},
|
|
827
827
|
"js": {
|
|
828
828
|
"packageName": "@africanies/angular-web-sdk",
|
|
829
|
-
"packageVersion": "0.1.
|
|
829
|
+
"packageVersion": "0.1.6",
|
|
830
830
|
"isInPackageManagerWorkspaces": true
|
|
831
831
|
}
|
|
832
832
|
},
|
|
@@ -42090,5 +42090,5 @@
|
|
|
42090
42090
|
},
|
|
42091
42091
|
"version": "6.0",
|
|
42092
42092
|
"errors": [],
|
|
42093
|
-
"computedAt":
|
|
42093
|
+
"computedAt": 1788420746319
|
|
42094
42094
|
}
|
|
@@ -165,14 +165,25 @@ const appRoutes: Route[] = [
|
|
|
165
165
|
loadComponent: () =>
|
|
166
166
|
import('./pages/tokens-page').then((m) => m.TokensPage),
|
|
167
167
|
},
|
|
168
|
+
// Temporarily blocked — restore loadComponent routes when re-enabling.
|
|
168
169
|
{
|
|
169
170
|
path: 'models',
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
pathMatch: 'full',
|
|
172
|
+
redirectTo: 'overview',
|
|
172
173
|
},
|
|
173
174
|
{
|
|
174
175
|
path: 'api',
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
pathMatch: 'full',
|
|
177
|
+
redirectTo: 'overview',
|
|
177
178
|
},
|
|
179
|
+
// {
|
|
180
|
+
// path: 'models',
|
|
181
|
+
// loadComponent: () =>
|
|
182
|
+
// import('./pages/models-page').then((m) => m.ModelsPage),
|
|
183
|
+
// },
|
|
184
|
+
// {
|
|
185
|
+
// path: 'api',
|
|
186
|
+
// loadComponent: () =>
|
|
187
|
+
// import('./pages/api-page').then((m) => m.ApiPage),
|
|
188
|
+
// },
|
|
178
189
|
];
|
|
@@ -287,8 +287,8 @@ export class App {
|
|
|
287
287
|
children: [
|
|
288
288
|
{ id: 'icons', label: 'Icons', routerLink: '/icons' },
|
|
289
289
|
{ id: 'tokens', label: 'Tokens', routerLink: '/tokens' },
|
|
290
|
-
{ id: 'models', label: 'Models', routerLink: '/models' },
|
|
291
|
-
{ id: 'api', label: 'SDK API', routerLink: '/api' },
|
|
290
|
+
// { id: 'models', label: 'Models', routerLink: '/models' },
|
|
291
|
+
// { id: 'api', label: 'SDK API', routerLink: '/api' },
|
|
292
292
|
],
|
|
293
293
|
},
|
|
294
294
|
{
|
|
@@ -239,20 +239,20 @@ export class HomePage {
|
|
|
239
239
|
icon: 'palette',
|
|
240
240
|
group: 'Foundation',
|
|
241
241
|
},
|
|
242
|
-
{
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
},
|
|
242
|
+
// {
|
|
243
|
+
// path: '/models',
|
|
244
|
+
// title: 'Shared models',
|
|
245
|
+
// blurb: 'Field shapes from @africanies/africanies-models — types only.',
|
|
246
|
+
// icon: 'code',
|
|
247
|
+
// group: 'Foundation',
|
|
248
|
+
// },
|
|
249
|
+
// {
|
|
250
|
+
// path: '/api',
|
|
251
|
+
// title: 'SDK API',
|
|
252
|
+
// blurb: 'How to call services — ResourceId, paths, and usage snippets.',
|
|
253
|
+
// icon: 'globe',
|
|
254
|
+
// group: 'Foundation',
|
|
255
|
+
// },
|
|
256
256
|
{
|
|
257
257
|
path: '/lecture',
|
|
258
258
|
title: 'Lecture',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Injector, signal, Injectable, makeEnvironmentProviders, provideAppInitializer } from '@angular/core';
|
|
3
3
|
import { SessionStorageService, AFRICANIES_SHIPPING_MODE_KEY, STORAGE_TOKEN, AFRICANIES_MODE_CONFIG_KEY, provideLocalStorage, AFRICANIES_ACCESS_TOKEN_KEY } from '@africanies/africanies-storage';
|
|
4
|
-
import { of,
|
|
4
|
+
import { of, timeout, throwError, map as map$1, tap as tap$1, catchError, finalize, firstValueFrom, forkJoin } from 'rxjs';
|
|
5
5
|
import { HttpErrorResponse, HttpContextToken, HttpContext, HttpClient, HttpHeaders, HttpParams, provideHttpClient, withInterceptors } from '@angular/common/http';
|
|
6
6
|
import { DEFAULT_PAGE_SIZE, NOTIFICATION_PAGE_SIZE } from '@africanies/africanies-models';
|
|
7
7
|
import { take, tap, map } from 'rxjs/operators';
|
|
@@ -687,31 +687,6 @@ class HttpResponseCache {
|
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
|
|
690
|
-
/**
|
|
691
|
-
* Whether a failed GET should be retried by {@link ApiClient}.
|
|
692
|
-
*
|
|
693
|
-
* Retries transient failures only (network blips, timeouts, 408/429, 5xx).
|
|
694
|
-
* Auth and other 4xx errors fail fast — retrying 401 does not help and causes
|
|
695
|
-
* duplicate requests + toasts.
|
|
696
|
-
* @param err
|
|
697
|
-
*/
|
|
698
|
-
function isRetryableGetError(err) {
|
|
699
|
-
if (err instanceof HttpErrorResponse) {
|
|
700
|
-
if (err.status === 0) {
|
|
701
|
-
return true;
|
|
702
|
-
}
|
|
703
|
-
if (err.status === 408 || err.status === 429) {
|
|
704
|
-
return true;
|
|
705
|
-
}
|
|
706
|
-
if (err.status >= 500) {
|
|
707
|
-
return true;
|
|
708
|
-
}
|
|
709
|
-
return false;
|
|
710
|
-
}
|
|
711
|
-
// Non-HTTP failures (e.g. timeout operator) may still be transient.
|
|
712
|
-
return true;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
690
|
/**
|
|
716
691
|
* Per-request shipping-mode override for {@link shipmentModeInterceptor}.
|
|
717
692
|
*
|
|
@@ -979,7 +954,8 @@ function mapResourcePayload(id, raw, mapOne, mapMany) {
|
|
|
979
954
|
* - HTTP failures rethrown as `Error` whose `.message` is already
|
|
980
955
|
* user-facing ({@link formatApiErrorMessage}) — consumers do not need to
|
|
981
956
|
* parse `HttpErrorResponse` bodies
|
|
982
|
-
* -
|
|
957
|
+
* - **No automatic retry** — fail fast so UIs can show Select / table /
|
|
958
|
+
* error-state Retry instead of a stuck loading spinner
|
|
983
959
|
* - Optional per-GET TTL cache via `cacheTtlMs`
|
|
984
960
|
*
|
|
985
961
|
* @example
|
|
@@ -1121,18 +1097,8 @@ class ApiClient {
|
|
|
1121
1097
|
req$ = this.http.delete(url, hasBody ? { ...httpOpts, body } : httpOpts);
|
|
1122
1098
|
break;
|
|
1123
1099
|
}
|
|
1124
|
-
//
|
|
1125
|
-
|
|
1126
|
-
req$ = req$.pipe(retry({
|
|
1127
|
-
count: 1,
|
|
1128
|
-
delay: (err, retryCount) => {
|
|
1129
|
-
if (!isRetryableGetError(err)) {
|
|
1130
|
-
return throwError(() => err);
|
|
1131
|
-
}
|
|
1132
|
-
return timer(2 ** (retryCount - 1) * 1000);
|
|
1133
|
-
},
|
|
1134
|
-
}));
|
|
1135
|
-
}
|
|
1100
|
+
// No automatic GET retry — admin shells own Retry via UI
|
|
1101
|
+
// (`africanies-select` showRetry, table error→refreshClick, error-state).
|
|
1136
1102
|
if (this.config.timeout != null) {
|
|
1137
1103
|
req$ = req$.pipe(timeout({
|
|
1138
1104
|
each: this.config.timeout,
|
|
@@ -1808,8 +1774,8 @@ function listFetchKind(options) {
|
|
|
1808
1774
|
* (no caret/tilde): TanStack marks the Angular adapter experimental and
|
|
1809
1775
|
* breaking changes land without major bumps.
|
|
1810
1776
|
*
|
|
1811
|
-
*
|
|
1812
|
-
*
|
|
1777
|
+
* Query retries default to **0** to match {@link ApiClient} (fail fast;
|
|
1778
|
+
* screens use manual Retry). Apps can override per `QueryClient` if needed.
|
|
1813
1779
|
*/
|
|
1814
1780
|
/**
|
|
1815
1781
|
* Factory for TanStack `QueryClient` `defaultOptions`.
|
|
@@ -1859,8 +1825,7 @@ function createAfricaniesQueryClientDefaults() {
|
|
|
1859
1825
|
queries: {
|
|
1860
1826
|
staleTime: 60_000,
|
|
1861
1827
|
gcTime: 5 * 60_000,
|
|
1862
|
-
retry:
|
|
1863
|
-
// attemptIndex is 0-based in TanStack; match 1s, 2s, 4s style backoff.
|
|
1828
|
+
retry: 0,
|
|
1864
1829
|
retryDelay: (attemptIndex) => Math.min(1000 * 2 ** attemptIndex, 30_000),
|
|
1865
1830
|
},
|
|
1866
1831
|
mutations: {
|