@africanies/angular-web-sdk 0.1.12 → 0.1.13
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/13293303228070520113/dist/libs/africanies-core/README.md +85 -0
- package/.nx/cache/13293303228070520113/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +4699 -0
- package/.nx/cache/13293303228070520113/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -0
- package/.nx/cache/13293303228070520113/dist/libs/africanies-core/package.json +31 -0
- package/.nx/cache/13293303228070520113/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +2748 -0
- package/.nx/cache/13387631073062967069/dist/libs/africanies-theme/README.md +46 -0
- package/.nx/cache/13387631073062967069/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +249 -0
- package/.nx/cache/13387631073062967069/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
- package/.nx/cache/13387631073062967069/dist/libs/africanies-theme/package.json +35 -0
- package/.nx/cache/13387631073062967069/dist/libs/africanies-theme/tailwind-preset.cjs +330 -0
- package/.nx/cache/13387631073062967069/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +178 -0
- package/.nx/cache/16704640000606796352/dist/libs/africanies-storage/README.md +31 -0
- package/.nx/cache/16704640000606796352/dist/libs/africanies-storage/fesm2022/africanies-africanies-storage.mjs +249 -0
- package/.nx/cache/16704640000606796352/dist/libs/africanies-storage/fesm2022/africanies-africanies-storage.mjs.map +1 -0
- package/.nx/cache/16704640000606796352/dist/libs/africanies-storage/package.json +26 -0
- package/.nx/cache/16704640000606796352/dist/libs/africanies-storage/types/africanies-africanies-storage.d.ts +210 -0
- package/.nx/cache/2427575433215940812/dist/libs/africanies-ui/README.md +68 -0
- package/.nx/cache/2427575433215940812/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- package/.nx/cache/2427575433215940812/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- package/.nx/cache/2427575433215940812/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +5 -0
- package/.nx/cache/2427575433215940812/dist/libs/africanies-ui/assets/carriers/dhl.svg +7 -0
- package/.nx/cache/2427575433215940812/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +21251 -0
- package/.nx/cache/2427575433215940812/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
- package/.nx/cache/2427575433215940812/dist/libs/africanies-ui/package.json +35 -0
- package/.nx/cache/2427575433215940812/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +5803 -0
- package/.nx/cache/7730350229628359718/dist/libs/africanies-icons/README.md +69 -0
- package/.nx/cache/7730350229628359718/dist/libs/africanies-icons/assets/icons.sprite.svg +1851 -0
- package/.nx/cache/7730350229628359718/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs +839 -0
- package/.nx/cache/7730350229628359718/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs.map +1 -0
- package/.nx/cache/7730350229628359718/dist/libs/africanies-icons/package.json +30 -0
- package/.nx/cache/7730350229628359718/dist/libs/africanies-icons/types/africanies-africanies-icons.d.ts +108 -0
- package/.nx/cache/run.json +35 -35
- package/.nx/cache/terminalOutputs/10603154579345867998 +397 -0
- package/.nx/cache/terminalOutputs/12354163057083828162 +80 -0
- package/.nx/cache/terminalOutputs/13293303228070520113 +21 -0
- package/.nx/cache/terminalOutputs/13387631073062967069 +21 -0
- package/.nx/cache/terminalOutputs/14876351543379349919 +176 -0
- package/.nx/cache/terminalOutputs/15336883221450327589 +21 -0
- package/.nx/cache/terminalOutputs/16208231681037145050 +86 -84
- package/.nx/cache/terminalOutputs/16704640000606796352 +21 -0
- package/.nx/cache/terminalOutputs/1811006905937373707 +74 -0
- package/.nx/cache/terminalOutputs/2005781115771702035 +8 -0
- package/.nx/cache/terminalOutputs/2360743690449633551 +21 -0
- package/.nx/cache/terminalOutputs/2427575433215940812 +21 -0
- package/.nx/cache/terminalOutputs/2981230413857865352 +8 -0
- package/.nx/cache/terminalOutputs/3243550283886864639 +8 -0
- package/.nx/cache/terminalOutputs/3380188914363501109 +231 -0
- package/.nx/cache/terminalOutputs/3699068646900552690 +8 -0
- package/.nx/cache/terminalOutputs/5175669339257931410 +8 -0
- package/.nx/cache/terminalOutputs/6040230831125637867 +8 -0
- package/.nx/cache/terminalOutputs/7730350229628359718 +21 -0
- package/.nx/cache/terminalOutputs/8098730470212963224 +87 -0
- package/.nx/cache/terminalOutputs/8928690901537686687 +21 -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 +2859 -0
- package/.nx/workspace-data/d/server-process.json +2 -2
- package/.nx/workspace-data/file-map.json +2155 -2183
- package/.nx/workspace-data/nx_files.nxt +0 -0
- package/.nx/workspace-data/project-graph.json +2 -2
- package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +60 -0
- package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -1
- package/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs +6 -0
- package/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs.map +1 -1
- package/dist/libs/africanies-storage/fesm2022/africanies-africanies-storage.mjs +6 -0
- package/dist/libs/africanies-storage/fesm2022/africanies-africanies-storage.mjs.map +1 -1
- package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +6 -0
- package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -1
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +297 -51
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -1
- package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +12 -12
- package/libs/africanies-core/src/lib/auth/auth-token.service.ts +3 -0
- package/libs/africanies-core/src/lib/auth/auth.service.ts +3 -0
- package/libs/africanies-core/src/lib/country/country.service.ts +3 -0
- package/libs/africanies-core/src/lib/currency/currency.service.ts +3 -0
- package/libs/africanies-core/src/lib/document/document.service.ts +3 -0
- package/libs/africanies-core/src/lib/file/file.service.ts +3 -0
- package/libs/africanies-core/src/lib/filters/filter-options.resolver.ts +3 -0
- package/libs/africanies-core/src/lib/http/api-client.ts +3 -0
- package/libs/africanies-core/src/lib/mode/mode-config.service.ts +3 -0
- package/libs/africanies-core/src/lib/notification/notification.service.ts +3 -0
- package/libs/africanies-core/src/lib/overlay/route-overlay.service.ts +3 -0
- package/libs/africanies-core/src/lib/payment-method/payment-method.service.ts +3 -0
- package/libs/africanies-core/src/lib/plan/plan.service.ts +3 -0
- package/libs/africanies-core/src/lib/product/product.service.ts +3 -0
- package/libs/africanies-core/src/lib/service/service.service.ts +3 -0
- package/libs/africanies-core/src/lib/shipment-method/shipment-method.service.ts +3 -0
- package/libs/africanies-core/src/lib/shipping/shipping-mode.service.ts +3 -0
- package/libs/africanies-core/src/lib/user/user.service.ts +3 -0
- package/libs/africanies-core/src/lib/warehouse/warehouse.service.ts +3 -0
- package/libs/africanies-core/src/lib/zone/zone.service.ts +3 -0
- package/libs/africanies-icons/src/lib/africanies-icon.component.ts +3 -0
- package/libs/africanies-icons/src/lib/icon-registry.service.ts +3 -0
- package/libs/africanies-storage/src/lib/local-storage.service.ts +3 -0
- package/libs/africanies-storage/src/lib/session-storage.service.ts +3 -0
- package/libs/africanies-theme/src/lib/mode-color.service.ts +3 -0
- package/libs/africanies-theme/src/lib/theme.service.ts +3 -0
- package/libs/africanies-ui/src/index.ts +11 -11
- package/libs/africanies-ui/src/lib/accordion/accordion.component.ts +3 -0
- package/libs/africanies-ui/src/lib/action-menu/action-menu-trigger.directive.ts +3 -0
- package/libs/africanies-ui/src/lib/action-menu/action-menu.component.ts +3 -0
- package/libs/africanies-ui/src/lib/alert/alert.component.ts +3 -0
- package/libs/africanies-ui/src/lib/avatar/avatar-menu.component.ts +3 -0
- package/libs/africanies-ui/src/lib/avatar/avatar.component.ts +3 -0
- package/libs/africanies-ui/src/lib/brand/brand-logo.component.ts +3 -0
- package/libs/africanies-ui/src/lib/button/button.component.ts +3 -0
- package/libs/africanies-ui/src/lib/carrier/carrier-logo.component.ts +3 -0
- package/libs/africanies-ui/src/lib/chip/chip.component.ts +3 -0
- package/libs/africanies-ui/src/lib/content-stack/content-stack.component.ts +3 -0
- package/libs/africanies-ui/src/lib/copy-button/copy-button.component.ts +3 -0
- package/libs/africanies-ui/src/lib/feedback/async-state.component.ts +3 -0
- package/libs/africanies-ui/src/lib/feedback/empty-state.component.ts +3 -0
- package/libs/africanies-ui/src/lib/feedback/error-indicator.component.ts +3 -0
- package/libs/africanies-ui/src/lib/feedback/error-state.component.ts +3 -0
- package/libs/africanies-ui/src/lib/feedback/loading-state.component.ts +3 -0
- package/libs/africanies-ui/src/lib/filters/filter-drawer.panel.ts +3 -0
- package/libs/africanies-ui/src/lib/filters/filter-drawer.service.ts +3 -0
- package/libs/africanies-ui/src/lib/filters/filter-query.service.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/address-input/address-input.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/address-input/google-places.service.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/checkbox/checkbox.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/date-picker/date-picker.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/file-upload/camera-capture.dialog.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/file-upload/file-preview.dialog.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/file-upload/file-upload.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/index.ts +3 -3
- package/libs/africanies-ui/src/lib/forms/number-input/number-input.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/otp-input/otp-input.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/phone-input/phone-input.component.ts +9 -6
- package/libs/africanies-ui/src/lib/forms/radio/radio.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/search-combobox/search-combobox.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/select/select.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/text-input/text-input.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/textarea/textarea.component.ts +3 -0
- package/libs/africanies-ui/src/lib/forms/toggle/toggle.component.ts +3 -0
- package/libs/africanies-ui/src/lib/image/image.component.ts +3 -0
- package/libs/africanies-ui/src/lib/info-popover/info-popover-content.directive.ts +3 -0
- package/libs/africanies-ui/src/lib/info-popover/info-popover-trigger.directive.ts +3 -0
- package/libs/africanies-ui/src/lib/info-popover/info-popover.component.ts +3 -0
- package/libs/africanies-ui/src/lib/layout/app-shell-content-header.component.ts +3 -0
- package/libs/africanies-ui/src/lib/layout/app-shell-header-slot.directive.ts +3 -0
- package/libs/africanies-ui/src/lib/layout/app-shell-header.component.ts +9 -0
- package/libs/africanies-ui/src/lib/layout/app-shell.component.ts +3 -0
- package/libs/africanies-ui/src/lib/layout/header-weather.spec.ts +62 -94
- package/libs/africanies-ui/src/lib/layout/header-weather.ts +54 -61
- package/libs/africanies-ui/src/lib/layout/page-header.component.ts +3 -0
- package/libs/africanies-ui/src/lib/modules/africanies-actions.module.ts +3 -0
- package/libs/africanies-ui/src/lib/modules/africanies-feedback.module.ts +3 -0
- package/libs/africanies-ui/src/lib/modules/africanies-forms.module.ts +3 -0
- package/libs/africanies-ui/src/lib/modules/africanies-info-popover.module.ts +3 -0
- package/libs/africanies-ui/src/lib/modules/africanies-navigation.module.ts +3 -0
- package/libs/africanies-ui/src/lib/modules/africanies-stepper.module.ts +3 -0
- package/libs/africanies-ui/src/lib/modules/africanies-table.module.ts +3 -0
- package/libs/africanies-ui/src/lib/modules/africanies-tooltip.module.ts +3 -0
- package/libs/africanies-ui/src/lib/navigation/breadcrumb/breadcrumb.component.ts +3 -0
- package/libs/africanies-ui/src/lib/navigation/segment/segment.component.ts +3 -0
- package/libs/africanies-ui/src/lib/navigation/shipping-mode-switch/shipping-mode-switch.component.ts +3 -0
- package/libs/africanies-ui/src/lib/navigation/side-nav/africanies-side-nav.component.ts +3 -0
- package/libs/africanies-ui/src/lib/navigation/tabs/tab-def.directive.ts +3 -0
- package/libs/africanies-ui/src/lib/navigation/tabs/tabs.component.ts +3 -0
- package/libs/africanies-ui/src/lib/notifications/notification-drawer.panel.ts +3 -0
- package/libs/africanies-ui/src/lib/notifications/notification-drawer.service.ts +3 -0
- package/libs/africanies-ui/src/lib/overlay/confirm-dialog.component.ts +3 -0
- package/libs/africanies-ui/src/lib/overlay/confirm.service.ts +3 -0
- package/libs/africanies-ui/src/lib/overlay/drawer.service.ts +3 -0
- package/libs/africanies-ui/src/lib/overlay/modal.service.ts +3 -0
- package/libs/africanies-ui/src/lib/overlay/overlay-frame.component.ts +9 -0
- package/libs/africanies-ui/src/lib/pagination/pagination.component.ts +3 -0
- package/libs/africanies-ui/src/lib/stepper/step-def.directive.ts +3 -0
- package/libs/africanies-ui/src/lib/stepper/stepper.component.ts +3 -0
- package/libs/africanies-ui/src/lib/table/cell-def.directive.ts +3 -0
- package/libs/africanies-ui/src/lib/table/header-cell-def.directive.ts +3 -0
- package/libs/africanies-ui/src/lib/table/row-detail-def.directive.ts +3 -0
- package/libs/africanies-ui/src/lib/table/table.component.ts +3 -0
- package/libs/africanies-ui/src/lib/toast/toast-host.component.ts +4 -1
- package/libs/africanies-ui/src/lib/toast/toast-item.component.ts +3 -0
- package/libs/africanies-ui/src/lib/toast/toast.service.ts +3 -0
- package/libs/africanies-ui/src/lib/tooltip/tooltip-trigger.directive.ts +3 -0
- package/libs/africanies-ui/src/lib/tooltip/tooltip.component.ts +3 -0
- package/package.json +1 -1
|
@@ -30,6 +30,9 @@ import { asString } from '../http/wire';
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
@Injectable({ providedIn: 'root' })
|
|
33
|
+
/**
|
|
34
|
+
* Holds the bearer access token used by {@link authInterceptor}.
|
|
35
|
+
*/
|
|
33
36
|
export class AuthTokenService {
|
|
34
37
|
private readonly storage = inject(STORAGE_TOKEN);
|
|
35
38
|
private readonly api = inject(ApiClient);
|
|
@@ -46,6 +46,9 @@ const COUNTRY_CACHE_TTL_MS = 5 * 60_000;
|
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
48
|
@Injectable({ providedIn: 'root' })
|
|
49
|
+
/**
|
|
50
|
+
* Public country utility reads (`GET /public/country/read/{id?}`).
|
|
51
|
+
*/
|
|
49
52
|
export class CountryService {
|
|
50
53
|
private readonly api = inject(ApiClient);
|
|
51
54
|
|
|
@@ -60,6 +60,9 @@ const CURRENCY_CACHE_TTL_MS = 5 * 60_000;
|
|
|
60
60
|
* ```
|
|
61
61
|
*/
|
|
62
62
|
@Injectable({ providedIn: 'root' })
|
|
63
|
+
/**
|
|
64
|
+
* Currency App Settings API (`GET /currency/read/{id?}` plus create / update / delete).
|
|
65
|
+
*/
|
|
63
66
|
export class CurrencyService {
|
|
64
67
|
private readonly api = inject(ApiClient);
|
|
65
68
|
|
|
@@ -46,6 +46,9 @@ const DOCUMENT_CACHE_TTL_MS = 5 * 60_000;
|
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
48
|
@Injectable({ providedIn: 'root' })
|
|
49
|
+
/**
|
|
50
|
+
* Public document catalog reads (`GET /public/document/read/{id?}`).
|
|
51
|
+
*/
|
|
49
52
|
export class DocumentService {
|
|
50
53
|
private readonly api = inject(ApiClient);
|
|
51
54
|
|
|
@@ -46,6 +46,9 @@ const SDK_FILTER_OPTIONS_SOURCES = new Set<FilterOptionsSource>([
|
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
48
|
@Injectable({ providedIn: 'root' })
|
|
49
|
+
/**
|
|
50
|
+
* Resolves filter drawer select options from built-in SDK catalog services.
|
|
51
|
+
*/
|
|
49
52
|
export class FilterOptionsResolver {
|
|
50
53
|
private readonly warehouses = inject(WarehouseService);
|
|
51
54
|
private readonly shipmentMethods = inject(ShipmentMethodService);
|
|
@@ -116,6 +116,9 @@ type ResponseMode = NonNullable<ApiRequestOptions['responseMode']>;
|
|
|
116
116
|
* ```
|
|
117
117
|
*/
|
|
118
118
|
@Injectable({ providedIn: 'root' })
|
|
119
|
+
/**
|
|
120
|
+
* Endpoint-agnostic HTTP façade over Angular {@link HttpClient}.
|
|
121
|
+
*/
|
|
119
122
|
export class ApiClient {
|
|
120
123
|
private readonly http = inject(HttpClient);
|
|
121
124
|
private readonly config = inject(AFRICANIES_SDK_CONFIG);
|
|
@@ -45,6 +45,9 @@ import {
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
@Injectable({ providedIn: 'root' })
|
|
48
|
+
/**
|
|
49
|
+
* Source of truth for region currency and measurement units (STN / SFN).
|
|
50
|
+
*/
|
|
48
51
|
export class ModeConfigService {
|
|
49
52
|
private readonly api = inject(ApiClient);
|
|
50
53
|
private readonly storage = inject(STORAGE_TOKEN);
|
|
@@ -37,6 +37,9 @@ interface OpenOverlayState {
|
|
|
37
37
|
* {@link MODAL_SERVICE} / {@link DRAWER_SERVICE} to avoid a circular dependency.
|
|
38
38
|
*/
|
|
39
39
|
@Injectable()
|
|
40
|
+
/**
|
|
41
|
+
* Keeps query-param state in sync with modal/drawer overlays.
|
|
42
|
+
*/
|
|
40
43
|
export class RouteOverlayService {
|
|
41
44
|
private readonly route = inject(ActivatedRoute);
|
|
42
45
|
private readonly router = inject(Router);
|
|
@@ -65,6 +65,9 @@ const PAYMENT_METHOD_CACHE_TTL_MS = 5 * 60_000;
|
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
67
|
@Injectable({ providedIn: 'root' })
|
|
68
|
+
/**
|
|
69
|
+
* Payment-method App Settings API (`GET /payment_method/read/{id?}` plus update).
|
|
70
|
+
*/
|
|
68
71
|
export class PaymentMethodService {
|
|
69
72
|
private readonly api = inject(ApiClient);
|
|
70
73
|
|
|
@@ -45,6 +45,9 @@ const SERVICE_CACHE_TTL_MS = 5 * 60_000;
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
@Injectable({ providedIn: 'root' })
|
|
48
|
+
/**
|
|
49
|
+
* Public subscription-service reads (`GET /public/service/read/{id?}`).
|
|
50
|
+
*/
|
|
48
51
|
export class ServiceService {
|
|
49
52
|
private readonly api = inject(ApiClient);
|
|
50
53
|
|
|
@@ -45,6 +45,9 @@ const SHIPMENT_METHOD_CACHE_TTL_MS = 5 * 60_000;
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
@Injectable({ providedIn: 'root' })
|
|
48
|
+
/**
|
|
49
|
+
* Shipment method / carrier utility reads (`GET /shipment_method/read/{id?}`).
|
|
50
|
+
*/
|
|
48
51
|
export class ShipmentMethodService {
|
|
49
52
|
private readonly api = inject(ApiClient);
|
|
50
53
|
|
|
@@ -62,6 +62,9 @@ export type ShippingModeChangeGuard = (
|
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
64
|
@Injectable({ providedIn: 'root' })
|
|
65
|
+
/**
|
|
66
|
+
* Signal-based holder for the active {@link ShippingMode}.
|
|
67
|
+
*/
|
|
65
68
|
export class ShippingModeService {
|
|
66
69
|
private readonly storage = inject(SessionStorageService);
|
|
67
70
|
private readonly injector = inject(Injector);
|
|
@@ -59,6 +59,9 @@ import { IconRegistryService } from './icon-registry.service';
|
|
|
59
59
|
'[attr.data-icon]': 'name()',
|
|
60
60
|
},
|
|
61
61
|
})
|
|
62
|
+
/**
|
|
63
|
+
* Renders a single icon from the shared SVG sprite.
|
|
64
|
+
*/
|
|
62
65
|
export class AfricaniesIconComponent {
|
|
63
66
|
private readonly registry = inject(IconRegistryService);
|
|
64
67
|
|
|
@@ -34,6 +34,9 @@ export const AFRICANIES_ICON_SPRITE_URL = new InjectionToken<string>(
|
|
|
34
34
|
* to invoke repeatedly — concurrent callers share one in-flight promise.
|
|
35
35
|
*/
|
|
36
36
|
@Injectable({ providedIn: 'root' })
|
|
37
|
+
/**
|
|
38
|
+
* Fetches and inlines the icon sprite once into `document.body`.
|
|
39
|
+
*/
|
|
37
40
|
export class IconRegistryService {
|
|
38
41
|
private readonly document = inject(DOCUMENT);
|
|
39
42
|
private readonly spriteUrl = inject(AFRICANIES_ICON_SPRITE_URL);
|
|
@@ -25,6 +25,9 @@ import { readJson, writeJson } from './storage-json';
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
@Injectable({ providedIn: 'root' })
|
|
28
|
+
/**
|
|
29
|
+
* `sessionStorage`-backed {@link StorageService}.
|
|
30
|
+
*/
|
|
28
31
|
export class SessionStorageService extends StorageService {
|
|
29
32
|
/**
|
|
30
33
|
* @inheritdoc
|
|
@@ -72,6 +72,9 @@ export interface ModeColorClasses {
|
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
74
|
@Injectable({ providedIn: 'root' })
|
|
75
|
+
/**
|
|
76
|
+
* Maps {@link ShippingModeService} to mode-accent Tailwind classes.
|
|
77
|
+
*/
|
|
75
78
|
export class ModeColorService {
|
|
76
79
|
private readonly shippingMode = inject(ShippingModeService);
|
|
77
80
|
|
|
@@ -40,6 +40,9 @@ import type { Theme } from './theme.types';
|
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
42
|
@Injectable({ providedIn: 'root' })
|
|
43
|
+
/**
|
|
44
|
+
* Application light/dark theme preference.
|
|
45
|
+
*/
|
|
43
46
|
export class ThemeService {
|
|
44
47
|
private readonly storage = inject(STORAGE_TOKEN);
|
|
45
48
|
private readonly document = inject(DOCUMENT);
|
|
@@ -163,40 +163,40 @@ export {
|
|
|
163
163
|
AddressInputComponent,
|
|
164
164
|
type AddressPlace,
|
|
165
165
|
type AddressPrediction,
|
|
166
|
+
buildPhoneNumberValue,
|
|
166
167
|
CheckboxComponent,
|
|
167
168
|
DatePickerComponent,
|
|
169
|
+
dialCodeForIso2,
|
|
168
170
|
fileExtensionLabel,
|
|
169
171
|
fileMatchesAccept,
|
|
170
172
|
FileUploadComponent,
|
|
171
173
|
type FileUploadResult,
|
|
172
174
|
type FileUploadVariant,
|
|
175
|
+
formatNationalDigits,
|
|
173
176
|
GOOGLE_PLACES_CONFIG,
|
|
174
177
|
type GooglePlacesConfig,
|
|
175
178
|
GooglePlacesService,
|
|
179
|
+
isPhoneNumberComplete,
|
|
180
|
+
matchDialCode,
|
|
181
|
+
normalizePhoneIso2,
|
|
176
182
|
NumberInputComponent,
|
|
177
183
|
OtpInputComponent,
|
|
178
184
|
type OtpInputVariant,
|
|
185
|
+
parsePhoneControlValue,
|
|
179
186
|
PHONE_DIAL_CODES,
|
|
180
187
|
PHONE_MAX_NATIONAL_DIGITS,
|
|
181
188
|
PHONE_MIN_NATIONAL_DIGITS,
|
|
182
|
-
type PhoneCountryOption,
|
|
183
|
-
PhoneInputComponent,
|
|
184
|
-
type PhoneNumberValue,
|
|
185
|
-
buildPhoneNumberValue,
|
|
186
|
-
dialCodeForIso2,
|
|
187
|
-
formatNationalDigits,
|
|
188
|
-
isPhoneNumberComplete,
|
|
189
|
-
matchDialCode,
|
|
190
|
-
normalizePhoneIso2,
|
|
191
|
-
parsePhoneControlValue,
|
|
192
189
|
phoneCountryName,
|
|
190
|
+
type PhoneCountryOption,
|
|
193
191
|
phoneCountryOptions,
|
|
194
192
|
phoneDigitsOnly,
|
|
193
|
+
PhoneInputComponent,
|
|
194
|
+
type PhoneNumberValue,
|
|
195
195
|
phoneToE164,
|
|
196
|
-
removeDialCode,
|
|
197
196
|
provideGooglePlaces,
|
|
198
197
|
RadioComponent,
|
|
199
198
|
type RadioOption,
|
|
199
|
+
removeDialCode,
|
|
200
200
|
type SearchComboboxBadge,
|
|
201
201
|
type SearchComboboxBadgeFn,
|
|
202
202
|
SearchComboboxComponent,
|
|
@@ -97,6 +97,9 @@ export type AccordionSize = 'md' | 'sm';
|
|
|
97
97
|
</div>
|
|
98
98
|
`,
|
|
99
99
|
})
|
|
100
|
+
/**
|
|
101
|
+
* Bordered expandable panel with animated fold — the pattern used on Manifest detail and Make Payment review.
|
|
102
|
+
*/
|
|
100
103
|
export class AccordionComponent {
|
|
101
104
|
/** Plain-text header. Prefer projected `[africaniesAccordionTitle]` for rich titles. */
|
|
102
105
|
readonly title = input('');
|
|
@@ -90,6 +90,9 @@ const DEFAULT_ICONS: Record<AlertVariant, IconName> = {
|
|
|
90
90
|
</div>
|
|
91
91
|
`,
|
|
92
92
|
})
|
|
93
|
+
/**
|
|
94
|
+
* Inline page/section banner — distinct from {@link ErrorStateComponent} (full-section async failure + Retry).
|
|
95
|
+
*/
|
|
93
96
|
export class AlertComponent {
|
|
94
97
|
/** Semantic tone. Defaults to `info`. */
|
|
95
98
|
readonly variant = input<AlertVariant>('info');
|
|
@@ -65,6 +65,9 @@ import { AvatarComponent, type AvatarSize } from './avatar.component';
|
|
|
65
65
|
}
|
|
66
66
|
`,
|
|
67
67
|
})
|
|
68
|
+
/**
|
|
69
|
+
* Avatar trigger with an attached overflow menu — profile / account actions.
|
|
70
|
+
*/
|
|
68
71
|
export class AvatarMenuComponent {
|
|
69
72
|
readonly name = input.required<string>();
|
|
70
73
|
readonly src = input<string | null>(null);
|
|
@@ -44,6 +44,9 @@ export type AvatarSize = 'sm' | 'md' | 'lg';
|
|
|
44
44
|
</span>
|
|
45
45
|
`,
|
|
46
46
|
})
|
|
47
|
+
/**
|
|
48
|
+
* Circular avatar with image or initials fallback.
|
|
49
|
+
*/
|
|
47
50
|
export class AvatarComponent {
|
|
48
51
|
/** Display name — used for initials when no image loads. */
|
|
49
52
|
readonly name = input('');
|
|
@@ -102,6 +102,9 @@ export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
|
102
102
|
'(click)': 'blockWhenDisabled($event)',
|
|
103
103
|
},
|
|
104
104
|
})
|
|
105
|
+
/**
|
|
106
|
+
* Theme-token button used across AFRICANIES surfaces.
|
|
107
|
+
*/
|
|
105
108
|
export class ButtonComponent {
|
|
106
109
|
private readonly modeColor = inject(ModeColorService);
|
|
107
110
|
|
|
@@ -114,6 +114,9 @@ export type ChipSize = 'sm' | 'md';
|
|
|
114
114
|
}
|
|
115
115
|
`,
|
|
116
116
|
})
|
|
117
|
+
/**
|
|
118
|
+
* Compact status / category label.
|
|
119
|
+
*/
|
|
117
120
|
export class ChipComponent {
|
|
118
121
|
/** Semantic tone. Defaults to `neutral`. Ignored when {@link color} is set. */
|
|
119
122
|
readonly variant = input<ChipVariant>('neutral');
|
|
@@ -42,6 +42,9 @@ import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
|
42
42
|
</div>
|
|
43
43
|
`,
|
|
44
44
|
})
|
|
45
|
+
/**
|
|
46
|
+
* Compact stacked text for table cells and detail panels.
|
|
47
|
+
*/
|
|
45
48
|
export class ContentStackComponent {
|
|
46
49
|
/** Primary line — usually a person or entity name. */
|
|
47
50
|
readonly title = input('');
|
|
@@ -53,6 +53,9 @@ import { ToastService } from '../toast/toast.service';
|
|
|
53
53
|
</button>
|
|
54
54
|
`,
|
|
55
55
|
})
|
|
56
|
+
/**
|
|
57
|
+
* Icon button that copies {@link value} to the clipboard.
|
|
58
|
+
*/
|
|
56
59
|
export class CopyButtonComponent {
|
|
57
60
|
private readonly toastService = inject(ToastService, { optional: true });
|
|
58
61
|
|
|
@@ -111,6 +111,9 @@ type AsyncView =
|
|
|
111
111
|
}
|
|
112
112
|
`,
|
|
113
113
|
})
|
|
114
|
+
/**
|
|
115
|
+
* Async query wrapper that maps {@link AsyncQueryStateModel} into loading / error / empty / success with non-blocking badges for background activity.
|
|
116
|
+
*/
|
|
114
117
|
export class AsyncStateComponent<T = unknown> {
|
|
115
118
|
/**
|
|
116
119
|
* Snapshot from the app's query layer (e.g. mapped `injectQuery()` signals).
|
|
@@ -54,6 +54,9 @@ import { ButtonComponent } from '../button/button.component';
|
|
|
54
54
|
</div>
|
|
55
55
|
`,
|
|
56
56
|
})
|
|
57
|
+
/**
|
|
58
|
+
* Blocking empty state when a fetch succeeded but produced no rows / value.
|
|
59
|
+
*/
|
|
57
60
|
export class EmptyStateComponent {
|
|
58
61
|
/**
|
|
59
62
|
* Empty-copy. Defaults to a generic phrase; override for filter-specific help.
|
|
@@ -161,6 +161,9 @@ import { ButtonComponent } from '../button/button.component';
|
|
|
161
161
|
}
|
|
162
162
|
`,
|
|
163
163
|
})
|
|
164
|
+
/**
|
|
165
|
+
* Compact error pill for non-blocking failures while stale data stays visible — distinct from {@link ErrorStateComponent} (full-section blocking).
|
|
166
|
+
*/
|
|
164
167
|
export class ErrorIndicatorComponent {
|
|
165
168
|
/**
|
|
166
169
|
* Error copy. When empty, the indicator is not shown.
|
|
@@ -54,6 +54,9 @@ import { ButtonComponent } from '../button/button.component';
|
|
|
54
54
|
</div>
|
|
55
55
|
`,
|
|
56
56
|
})
|
|
57
|
+
/**
|
|
58
|
+
* Blocking error state for failed async fetches (not field validation).
|
|
59
|
+
*/
|
|
57
60
|
export class ErrorStateComponent {
|
|
58
61
|
/**
|
|
59
62
|
* Human-readable failure reason. Required so the alert is never an empty
|
|
@@ -338,6 +338,9 @@ import { FilterQueryService } from './filter-query.service';
|
|
|
338
338
|
</div>
|
|
339
339
|
`,
|
|
340
340
|
})
|
|
341
|
+
/**
|
|
342
|
+
* Schema-driven filter drawer body.
|
|
343
|
+
*/
|
|
341
344
|
export class FilterDrawerPanel {
|
|
342
345
|
protected readonly data = inject<FilterDrawerData>(OVERLAY_DATA);
|
|
343
346
|
protected readonly ref = inject(AfricaniesOverlayRef<FilterDrawerResult>);
|
|
@@ -43,6 +43,9 @@ import { FilterQueryService } from './filter-query.service';
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
@Injectable()
|
|
46
|
+
/**
|
|
47
|
+
* Opens the schema-driven {@link FilterDrawerPanel} via {@link DrawerService}.
|
|
48
|
+
*/
|
|
46
49
|
export class FilterDrawerService {
|
|
47
50
|
private readonly drawer = inject(DrawerService);
|
|
48
51
|
private readonly filterQuery = inject(FilterQueryService);
|
|
@@ -24,6 +24,9 @@ import {
|
|
|
24
24
|
* `provideRouter`).
|
|
25
25
|
*/
|
|
26
26
|
@Injectable({ providedIn: 'root' })
|
|
27
|
+
/**
|
|
28
|
+
* Bidirectional list-query sync with the browser URL.
|
|
29
|
+
*/
|
|
27
30
|
export class FilterQueryService {
|
|
28
31
|
private readonly route = inject(ActivatedRoute, { optional: true });
|
|
29
32
|
private readonly router = inject(Router, { optional: true });
|
|
@@ -209,6 +209,9 @@ const ADDRESS_PANEL_POSITIONS: ConnectedPosition[] = [
|
|
|
209
209
|
}
|
|
210
210
|
`,
|
|
211
211
|
})
|
|
212
|
+
/**
|
|
213
|
+
* Google Places address field with suggestion dropdown.
|
|
214
|
+
*/
|
|
212
215
|
export class AddressInputComponent implements ControlValueAccessor {
|
|
213
216
|
private readonly places = inject(GooglePlacesService);
|
|
214
217
|
private readonly destroyRef = inject(DestroyRef);
|
|
@@ -55,6 +55,9 @@ interface PlaceDetailsApiResponse {
|
|
|
55
55
|
* Register {@link provideGooglePlaces} with a key that has Places API (New).
|
|
56
56
|
*/
|
|
57
57
|
@Injectable({ providedIn: 'root' })
|
|
58
|
+
/**
|
|
59
|
+
* Places API (New) over REST — same contract as the working React autocomplete (`POST …/places:autocomplete`, `GET …/places/{id}`).
|
|
60
|
+
*/
|
|
58
61
|
export class GooglePlacesService {
|
|
59
62
|
private readonly config = inject(GOOGLE_PLACES_CONFIG, { optional: true });
|
|
60
63
|
|
|
@@ -97,6 +97,9 @@ let nextCheckboxId = 0;
|
|
|
97
97
|
</div>
|
|
98
98
|
`,
|
|
99
99
|
})
|
|
100
|
+
/**
|
|
101
|
+
* Boolean checkbox following the shared AFRICANIES form field pattern.
|
|
102
|
+
*/
|
|
100
103
|
export class CheckboxComponent implements ControlValueAccessor {
|
|
101
104
|
private readonly modeColor = inject(ModeColorService);
|
|
102
105
|
|
|
@@ -98,6 +98,9 @@ let nextDatePickerId = 0;
|
|
|
98
98
|
}
|
|
99
99
|
`,
|
|
100
100
|
})
|
|
101
|
+
/**
|
|
102
|
+
* Date field wrapping native `input[type=date]`, following shared AFRICANIES form field pattern.
|
|
103
|
+
*/
|
|
101
104
|
export class DatePickerComponent implements ControlValueAccessor {
|
|
102
105
|
private readonly theme = inject(ThemeService, { optional: true });
|
|
103
106
|
|
|
@@ -114,6 +114,9 @@ type CameraFacing = 'environment' | 'user';
|
|
|
114
114
|
</div>
|
|
115
115
|
`,
|
|
116
116
|
})
|
|
117
|
+
/**
|
|
118
|
+
* Live webcam capture dialog for {@link FileUploadComponent}.
|
|
119
|
+
*/
|
|
117
120
|
export class CameraCaptureDialogComponent {
|
|
118
121
|
private readonly destroyRef = inject(DestroyRef);
|
|
119
122
|
private readonly ref = inject(AfricaniesOverlayRef<File>);
|
|
@@ -97,6 +97,9 @@ type PreviewKind = 'image' | 'unavailable';
|
|
|
97
97
|
</div>
|
|
98
98
|
`,
|
|
99
99
|
})
|
|
100
|
+
/**
|
|
101
|
+
* Large-file preview modal for {@link FileUploadComponent}.
|
|
102
|
+
*/
|
|
100
103
|
export class FilePreviewDialogComponent {
|
|
101
104
|
protected readonly data = inject<FilePreviewData>(OVERLAY_DATA);
|
|
102
105
|
private readonly ref = inject(AfricaniesOverlayRef<void>);
|
|
@@ -386,6 +386,9 @@ let nextFileUploadId = 0;
|
|
|
386
386
|
/>
|
|
387
387
|
`,
|
|
388
388
|
})
|
|
389
|
+
/**
|
|
390
|
+
* File / camera / drag-and-drop picker following the shared AFRICANIES form field pattern.
|
|
391
|
+
*/
|
|
389
392
|
export class FileUploadComponent implements ControlValueAccessor, OnDestroy {
|
|
390
393
|
private readonly destroyRef = inject(DestroyRef);
|
|
391
394
|
/** Optional so the control still works when overlays are not registered. */
|