@africanies/angular-web-sdk 0.1.11 → 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/{13466509747676776487 → 13293303228070520113}/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +66 -1
- package/.nx/cache/13293303228070520113/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -0
- package/.nx/cache/{13466509747676776487 → 13293303228070520113}/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +6 -1
- package/.nx/cache/{6673686859704879504 → 13387631073062967069}/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +31 -13
- package/.nx/cache/13387631073062967069/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
- package/.nx/cache/{6673686859704879504 → 13387631073062967069}/dist/libs/africanies-theme/tailwind-preset.cjs +85 -17
- package/.nx/cache/{6673686859704879504 → 13387631073062967069}/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +7 -3
- 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/{14876618240301288353 → 2427575433215940812}/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +2998 -1122
- package/.nx/cache/2427575433215940812/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
- package/.nx/cache/{14995846848874973576 → 2427575433215940812}/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +450 -140
- package/.nx/cache/{6664915487114632770 → 7730350229628359718}/dist/libs/africanies-icons/assets/icons.sprite.svg +7 -0
- package/.nx/cache/{6664915487114632770 → 7730350229628359718}/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs +7 -0
- package/.nx/cache/7730350229628359718/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs.map +1 -0
- package/.nx/cache/{6664915487114632770 → 7730350229628359718}/dist/libs/africanies-icons/types/africanies-africanies-icons.d.ts +2 -2
- package/.nx/cache/{14995846848874973576 → 7821397806208783174}/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +2572 -962
- package/.nx/cache/7821397806208783174/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
- package/.nx/cache/{14876618240301288353 → 7821397806208783174}/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +460 -147
- 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/{9040451482998546630 → 13293303228070520113} +1 -1
- package/.nx/cache/terminalOutputs/{6673686859704879504 → 13387631073062967069} +1 -1
- package/.nx/cache/terminalOutputs/{14061940909886036014 → 14876351543379349919} +46 -43
- package/.nx/cache/terminalOutputs/15336883221450327589 +21 -0
- package/.nx/cache/terminalOutputs/16208231681037145050 +87 -0
- package/.nx/cache/terminalOutputs/{13466509747676776487 → 16704640000606796352} +6 -6
- 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/{14876618240301288353 → 2427575433215940812} +2 -2
- 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/{14995846848874973576 → 7821397806208783174} +2 -2
- 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 +4176 -0
- package/.nx/workspace-data/d/server-process.json +2 -2
- package/.nx/workspace-data/file-map.json +2995 -2989
- package/.nx/workspace-data/nx_files.nxt +0 -0
- package/.nx/workspace-data/project-graph.json +2 -2
- package/apps/playground/src/app/pages/forms-page.ts +70 -14
- package/apps/playground/src/app/snippets/forms.snippets.ts +41 -6
- 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 +1323 -85
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -1
- package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +201 -15
- 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 +18 -0
- 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 +20 -0
- 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/index.ts +21 -0
- package/libs/africanies-ui/src/lib/forms/phone-input/phone-codes.ts +264 -0
- package/libs/africanies-ui/src/lib/forms/phone-input/phone-input.component.ts +480 -0
- package/libs/africanies-ui/src/lib/forms/phone-input/phone-input.types.ts +35 -0
- package/libs/africanies-ui/src/lib/forms/phone-input/phone-input.utils.spec.ts +81 -0
- package/libs/africanies-ui/src/lib/forms/phone-input/phone-input.utils.ts +275 -0
- 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 +5 -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 +5 -1
- 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
- package/.nx/cache/13466509747676776487/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +0 -1
- package/.nx/cache/14416694322692463866/dist/libs/africanies-models/README.md +0 -60
- package/.nx/cache/14416694322692463866/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs +0 -599
- package/.nx/cache/14416694322692463866/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs.map +0 -1
- package/.nx/cache/14416694322692463866/dist/libs/africanies-models/package.json +0 -23
- package/.nx/cache/14416694322692463866/dist/libs/africanies-models/types/africanies-africanies-models.d.ts +0 -1452
- package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +0 -1
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +0 -1
- package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +0 -221
- package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +0 -1
- package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/tailwind-preset.cjs +0 -253
- package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +0 -166
- package/.nx/cache/6664915487114632770/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs.map +0 -1
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/README.md +0 -46
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +0 -1
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/package.json +0 -35
- package/.nx/cache/9040451482998546630/dist/libs/africanies-core/README.md +0 -85
- package/.nx/cache/9040451482998546630/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +0 -4511
- package/.nx/cache/9040451482998546630/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +0 -1
- package/.nx/cache/9040451482998546630/dist/libs/africanies-core/package.json +0 -31
- package/.nx/cache/9040451482998546630/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +0 -2741
- package/.nx/cache/terminalOutputs/13555699813138069787 +0 -6
- package/.nx/cache/terminalOutputs/14416694322692463866 +0 -108
- package/.nx/cache/terminalOutputs/1446890025183346611 +0 -32
- package/.nx/cache/terminalOutputs/17394769338046050914 +0 -8
- package/.nx/cache/terminalOutputs/17626862048742598274 +0 -21
- package/.nx/cache/terminalOutputs/6337357866566791975 +0 -6
- package/.nx/cache/terminalOutputs/6664915487114632770 +0 -44
- package/.nx/cache/terminalOutputs/783228502946611950 +0 -19
- package/.nx/cache/terminalOutputs/7978448102466861029 +0 -32
- /package/.nx/cache/{13466509747676776487 → 13293303228070520113}/dist/libs/africanies-core/README.md +0 -0
- /package/.nx/cache/{13466509747676776487 → 13293303228070520113}/dist/libs/africanies-core/package.json +0 -0
- /package/.nx/cache/{17626862048742598274 → 13387631073062967069}/dist/libs/africanies-theme/README.md +0 -0
- /package/.nx/cache/{17626862048742598274 → 13387631073062967069}/dist/libs/africanies-theme/package.json +0 -0
- /package/.nx/cache/{14876618240301288353 → 2427575433215940812}/dist/libs/africanies-ui/README.md +0 -0
- /package/.nx/cache/{14876618240301288353 → 2427575433215940812}/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- /package/.nx/cache/{14876618240301288353 → 2427575433215940812}/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- /package/.nx/cache/{14876618240301288353 → 2427575433215940812}/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +0 -0
- /package/.nx/cache/{14876618240301288353 → 2427575433215940812}/dist/libs/africanies-ui/assets/carriers/dhl.svg +0 -0
- /package/.nx/cache/{14876618240301288353 → 2427575433215940812}/dist/libs/africanies-ui/package.json +0 -0
- /package/.nx/cache/{6664915487114632770 → 7730350229628359718}/dist/libs/africanies-icons/README.md +0 -0
- /package/.nx/cache/{6664915487114632770 → 7730350229628359718}/dist/libs/africanies-icons/package.json +0 -0
- /package/.nx/cache/{14995846848874973576 → 7821397806208783174}/dist/libs/africanies-ui/README.md +0 -0
- /package/.nx/cache/{14995846848874973576 → 7821397806208783174}/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- /package/.nx/cache/{14995846848874973576 → 7821397806208783174}/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- /package/.nx/cache/{14995846848874973576 → 7821397806208783174}/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +0 -0
- /package/.nx/cache/{14995846848874973576 → 7821397806208783174}/dist/libs/africanies-ui/assets/carriers/dhl.svg +0 -0
- /package/.nx/cache/{14995846848874973576 → 7821397806208783174}/dist/libs/africanies-ui/package.json +0 -0
|
@@ -3,14 +3,14 @@ import type { IconName } from '@africanies/africanies-icons';
|
|
|
3
3
|
import type { HeaderWeather, HeaderWeatherKind } from './header-greeting.util';
|
|
4
4
|
|
|
5
5
|
/** Bump when cache shape or city resolution strategy changes. */
|
|
6
|
-
const CACHE_KEY = 'africanies-header-weather-
|
|
7
|
-
const FETCH_MS =
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const CACHE_KEY = 'africanies-header-weather-v8';
|
|
7
|
+
const FETCH_MS = 8_000;
|
|
8
|
+
/** After Allow, wait for a GPS/Wi-Fi fix. A short timeout loses the prompt and falls through to IP. */
|
|
9
|
+
const DEVICE_GEO_MS = 15_000;
|
|
10
|
+
const DEVICE_GEO_PROMPT_MS = 25_000;
|
|
11
|
+
/** IP city is the office egress (often Lagos) and must not label the device. */
|
|
10
12
|
const GEO_URL = 'https://get.geojs.io/v1/ip/geo.json';
|
|
11
|
-
|
|
12
|
-
const REVERSE_GEO_URL =
|
|
13
|
-
'https://api.bigdatacloud.net/data/reverse-geocode-client';
|
|
13
|
+
const REVERSE_GEO_URL = 'https://geocoding-api.open-meteo.com/v1/reverse';
|
|
14
14
|
|
|
15
15
|
const WEATHER_LABELS: Record<HeaderWeatherKind, string> = {
|
|
16
16
|
clear: 'Clear',
|
|
@@ -36,9 +36,10 @@ interface GeoJsPayload {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
interface ReverseGeoPayload {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
results?: Array<{
|
|
40
|
+
name?: string;
|
|
41
|
+
admin1?: string;
|
|
42
|
+
}>;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
interface OpenMeteoPayload {
|
|
@@ -119,15 +120,16 @@ export function headerWeatherIcon(kind: HeaderWeatherKind, hour: number): IconNa
|
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
/**
|
|
122
|
-
* City-level forecast
|
|
123
|
+
* City-level forecast. The label is the device location only.
|
|
123
124
|
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
125
|
+
* The Geolocation API (GPS / nearby Wi-Fi) is reverse-geocoded. IP lookup is
|
|
126
|
+
* not used for the city — a shared office egress makes every colleague "Lagos".
|
|
127
|
+
* If the device fix is refused, weather still loads from IP coordinates with
|
|
128
|
+
* no city.
|
|
127
129
|
*
|
|
128
130
|
* Fails closed: missing browser APIs, timeouts, and HTTP errors all return
|
|
129
|
-
* `null` so the greeting can stay time-of-day only.
|
|
130
|
-
* in `sessionStorage`.
|
|
131
|
+
* `null` so the greeting can stay time-of-day only. A snapshot with a city
|
|
132
|
+
* is cached per local hour in `sessionStorage`.
|
|
131
133
|
*
|
|
132
134
|
* @param fetchFn - Injected `fetch` for tests.
|
|
133
135
|
* @returns Forecast snapshot, or `null` when lookup fails.
|
|
@@ -147,7 +149,8 @@ export async function loadHeaderWeather(
|
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
try {
|
|
150
|
-
const
|
|
152
|
+
const device = await tryDeviceCoordinates();
|
|
153
|
+
const coords = device ?? (await ipCoordinates(run));
|
|
151
154
|
if (!coords) {
|
|
152
155
|
return null;
|
|
153
156
|
}
|
|
@@ -168,11 +171,13 @@ export async function loadHeaderWeather(
|
|
|
168
171
|
}
|
|
169
172
|
|
|
170
173
|
const temperatureC = asNumber(forecast?.current?.temperature_2m) ?? undefined;
|
|
171
|
-
const city =
|
|
172
|
-
|
|
173
|
-
|
|
174
|
+
const city = device
|
|
175
|
+
? await reverseGeocodeCity(run, device.latitude, device.longitude)
|
|
176
|
+
: undefined;
|
|
174
177
|
const weather: HeaderWeather = { kind, temperatureC, city };
|
|
175
|
-
|
|
178
|
+
if (city) {
|
|
179
|
+
writeCache({ hour, kind, temperatureC, city });
|
|
180
|
+
}
|
|
176
181
|
return weather;
|
|
177
182
|
} catch {
|
|
178
183
|
return null;
|
|
@@ -221,41 +226,17 @@ function writeCache(value: CachedWeather): void {
|
|
|
221
226
|
}
|
|
222
227
|
}
|
|
223
228
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
*/
|
|
229
|
-
async function resolveCoordinates(
|
|
230
|
-
fetchFn: typeof fetch,
|
|
231
|
-
): Promise<(Coordinates & { fallbackCity?: string }) | null> {
|
|
232
|
-
const [browser, ipGeo] = await Promise.all([
|
|
233
|
-
tryBrowserGeolocation(),
|
|
234
|
-
fetchIpGeo(fetchFn),
|
|
235
|
-
]);
|
|
236
|
-
const ipCity = asCity(ipGeo?.city);
|
|
237
|
-
|
|
238
|
-
if (browser) {
|
|
239
|
-
return { ...browser, fallbackCity: ipCity };
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
const latitude = asNumber(ipGeo?.latitude);
|
|
243
|
-
const longitude = asNumber(ipGeo?.longitude);
|
|
229
|
+
async function ipCoordinates(fetchFn: typeof fetch): Promise<Coordinates | null> {
|
|
230
|
+
const payload = (await fetchJson(fetchFn, GEO_URL)) as GeoJsPayload | null;
|
|
231
|
+
const latitude = asNumber(payload?.latitude);
|
|
232
|
+
const longitude = asNumber(payload?.longitude);
|
|
244
233
|
if (latitude === null || longitude === null) {
|
|
245
234
|
return null;
|
|
246
235
|
}
|
|
247
|
-
return {
|
|
248
|
-
latitude,
|
|
249
|
-
longitude,
|
|
250
|
-
fallbackCity: ipCity,
|
|
251
|
-
};
|
|
236
|
+
return { latitude, longitude };
|
|
252
237
|
}
|
|
253
238
|
|
|
254
|
-
async function
|
|
255
|
-
return (await fetchJson(fetchFn, GEO_URL)) as GeoJsPayload | null;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
async function tryBrowserGeolocation(): Promise<Coordinates | null> {
|
|
239
|
+
async function tryDeviceCoordinates(): Promise<Coordinates | null> {
|
|
259
240
|
if (
|
|
260
241
|
typeof navigator === 'undefined' ||
|
|
261
242
|
typeof navigator.geolocation?.getCurrentPosition !== 'function'
|
|
@@ -263,8 +244,14 @@ async function tryBrowserGeolocation(): Promise<Coordinates | null> {
|
|
|
263
244
|
return null;
|
|
264
245
|
}
|
|
265
246
|
|
|
247
|
+
const permission = await geolocationPermission();
|
|
248
|
+
if (permission === 'denied') {
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const timeout = permission === 'granted' ? DEVICE_GEO_MS : DEVICE_GEO_PROMPT_MS;
|
|
266
253
|
return await new Promise((resolve) => {
|
|
267
|
-
const timer = setTimeout(() => resolve(null),
|
|
254
|
+
const timer = setTimeout(() => resolve(null), timeout);
|
|
268
255
|
navigator.geolocation.getCurrentPosition(
|
|
269
256
|
(position) => {
|
|
270
257
|
clearTimeout(timer);
|
|
@@ -278,14 +265,23 @@ async function tryBrowserGeolocation(): Promise<Coordinates | null> {
|
|
|
278
265
|
resolve(null);
|
|
279
266
|
},
|
|
280
267
|
{
|
|
281
|
-
enableHighAccuracy:
|
|
282
|
-
maximumAge:
|
|
283
|
-
timeout
|
|
268
|
+
enableHighAccuracy: true,
|
|
269
|
+
maximumAge: 0,
|
|
270
|
+
timeout,
|
|
284
271
|
},
|
|
285
272
|
);
|
|
286
273
|
});
|
|
287
274
|
}
|
|
288
275
|
|
|
276
|
+
async function geolocationPermission(): Promise<PermissionState | 'unknown'> {
|
|
277
|
+
try {
|
|
278
|
+
const status = await navigator.permissions?.query({ name: 'geolocation' });
|
|
279
|
+
return status?.state ?? 'unknown';
|
|
280
|
+
} catch {
|
|
281
|
+
return 'unknown';
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
289
285
|
async function reverseGeocodeCity(
|
|
290
286
|
fetchFn: typeof fetch,
|
|
291
287
|
latitude: number,
|
|
@@ -294,13 +290,10 @@ async function reverseGeocodeCity(
|
|
|
294
290
|
const url =
|
|
295
291
|
`${REVERSE_GEO_URL}?latitude=${encodeURIComponent(String(latitude))}` +
|
|
296
292
|
`&longitude=${encodeURIComponent(String(longitude))}` +
|
|
297
|
-
`&
|
|
293
|
+
`&language=en&count=1`;
|
|
298
294
|
const payload = (await fetchJson(fetchFn, url)) as ReverseGeoPayload | null;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
asCity(payload?.locality) ??
|
|
302
|
-
asCity(payload?.principalSubdivision)
|
|
303
|
-
);
|
|
295
|
+
const place = payload?.results?.[0];
|
|
296
|
+
return asCity(place?.name) ?? asCity(place?.admin1);
|
|
304
297
|
}
|
|
305
298
|
|
|
306
299
|
function asNumber(value: unknown): number | null {
|
|
@@ -54,6 +54,9 @@ import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
|
54
54
|
}
|
|
55
55
|
`,
|
|
56
56
|
})
|
|
57
|
+
/**
|
|
58
|
+
* Page title + subtitle for product screens.
|
|
59
|
+
*/
|
|
57
60
|
export class PageHeaderComponent {
|
|
58
61
|
/** Page heading. Omit when the shell already rendered a title. */
|
|
59
62
|
readonly title = input('');
|
|
@@ -6,6 +6,7 @@ import { DatePickerComponent } from '../forms/date-picker';
|
|
|
6
6
|
import { FileUploadComponent } from '../forms/file-upload';
|
|
7
7
|
import { NumberInputComponent } from '../forms/number-input';
|
|
8
8
|
import { OtpInputComponent } from '../forms/otp-input';
|
|
9
|
+
import { PhoneInputComponent } from '../forms/phone-input';
|
|
9
10
|
import { RadioComponent } from '../forms/radio';
|
|
10
11
|
import { SelectComponent } from '../forms/select';
|
|
11
12
|
import { TextInputComponent } from '../forms/text-input';
|
|
@@ -24,6 +25,7 @@ const FORM_CONTROLS = [
|
|
|
24
25
|
DatePickerComponent,
|
|
25
26
|
FileUploadComponent,
|
|
26
27
|
OtpInputComponent,
|
|
28
|
+
PhoneInputComponent,
|
|
27
29
|
] as const;
|
|
28
30
|
|
|
29
31
|
/**
|
|
@@ -43,4 +45,7 @@ const FORM_CONTROLS = [
|
|
|
43
45
|
imports: [...FORM_CONTROLS],
|
|
44
46
|
exports: [...FORM_CONTROLS],
|
|
45
47
|
})
|
|
48
|
+
/**
|
|
49
|
+
* All form controls in one import for apps that prefer NgModules.
|
|
50
|
+
*/
|
|
46
51
|
export class AfricaniesFormsModule {}
|
|
@@ -48,4 +48,7 @@ const NAV = [
|
|
|
48
48
|
imports: [...NAV],
|
|
49
49
|
exports: [...NAV],
|
|
50
50
|
})
|
|
51
|
+
/**
|
|
52
|
+
* App shell, breadcrumb, tabs (+ `africaniesTabDef`), segment, side nav, shipping mode switch, brand logo, avatar menu, and shell header chrome.
|
|
53
|
+
*/
|
|
51
54
|
export class AfricaniesNavigationModule {}
|
|
@@ -70,8 +70,9 @@ const DEFAULT_LINK_ACTIVE: IsActiveMatchOptions = {
|
|
|
70
70
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
71
71
|
imports: [AfricaniesIconComponent],
|
|
72
72
|
styles: `
|
|
73
|
+
/* Track p-1 (0.25×2) + 0.25 gap between pills — keep right inset equal to left. */
|
|
73
74
|
:host .africanies-segment-thumb {
|
|
74
|
-
width: calc((100% - 0.
|
|
75
|
+
width: calc((100% - 0.75rem) / 2);
|
|
75
76
|
}
|
|
76
77
|
`,
|
|
77
78
|
template: `
|
|
@@ -134,6 +135,9 @@ const DEFAULT_LINK_ACTIVE: IsActiveMatchOptions = {
|
|
|
134
135
|
</div>
|
|
135
136
|
`,
|
|
136
137
|
})
|
|
138
|
+
/**
|
|
139
|
+
* Compact segmented control for view modes and filters.
|
|
140
|
+
*/
|
|
137
141
|
export class SegmentComponent {
|
|
138
142
|
private readonly router = inject(Router);
|
|
139
143
|
protected readonly modeColor = inject(ModeColorService);
|
package/libs/africanies-ui/src/lib/navigation/shipping-mode-switch/shipping-mode-switch.component.ts
CHANGED
|
@@ -211,6 +211,9 @@ const SHIPPING_MODE_GLYPH = `M88.42,68.75a48.8,48.8,0,0,1-4.74,11.1h9.89a7.67,7.
|
|
|
211
211
|
}
|
|
212
212
|
`,
|
|
213
213
|
})
|
|
214
|
+
/**
|
|
215
|
+
* Two-up shipping mode switcher for app-shell side navs.
|
|
216
|
+
*/
|
|
214
217
|
export class ShippingModeSwitchComponent {
|
|
215
218
|
private readonly shipping = inject(ShippingModeService);
|
|
216
219
|
|
|
@@ -81,6 +81,9 @@ const DEFAULT_LINK_ACTIVE: IsActiveMatchOptions = {
|
|
|
81
81
|
styleUrl: './africanies-side-nav.component.css',
|
|
82
82
|
templateUrl: './africanies-side-nav.component.html',
|
|
83
83
|
})
|
|
84
|
+
/**
|
|
85
|
+
* App shell side navigation with icons, nested items, and a collapsible rail.
|
|
86
|
+
*/
|
|
84
87
|
export class SideNavComponent {
|
|
85
88
|
protected readonly modeColor = inject(ModeColorService);
|
|
86
89
|
private readonly defaultLogoUrl = inject(AFRICANIES_BRAND_LOGO_URL);
|
|
@@ -23,6 +23,9 @@ export interface TabDefContext {
|
|
|
23
23
|
selector: '[africaniesTabDef]',
|
|
24
24
|
standalone: true,
|
|
25
25
|
})
|
|
26
|
+
/**
|
|
27
|
+
* Registers projected tab panel content against a tab id for {@link TabsComponent} (local / non-router mode).
|
|
28
|
+
*/
|
|
26
29
|
export class TabDefDirective {
|
|
27
30
|
/** Template projected as the active tab panel. */
|
|
28
31
|
readonly template = inject(TemplateRef<TabDefContext>);
|
|
@@ -155,6 +155,9 @@ const DEFAULT_LINK_ACTIVE: IsActiveMatchOptions = {
|
|
|
155
155
|
</div>
|
|
156
156
|
`,
|
|
157
157
|
})
|
|
158
|
+
/**
|
|
159
|
+
* Tab list for page / section navigation.
|
|
160
|
+
*/
|
|
158
161
|
export class TabsComponent {
|
|
159
162
|
private readonly router = inject(Router);
|
|
160
163
|
protected readonly modeColor = inject(ModeColorService);
|
|
@@ -272,6 +272,9 @@ const MARK_ALL_CONFIRM_MS = 4000;
|
|
|
272
272
|
</div>
|
|
273
273
|
`,
|
|
274
274
|
})
|
|
275
|
+
/**
|
|
276
|
+
* Right-edge drawer listing in-app notifications.
|
|
277
|
+
*/
|
|
275
278
|
export class NotificationDrawerPanel {
|
|
276
279
|
protected readonly ref =
|
|
277
280
|
inject<AfricaniesOverlayRef<NotificationDrawerResult>>(AfricaniesOverlayRef);
|
|
@@ -15,6 +15,9 @@ import { NotificationDrawerPanel } from './notification-drawer.panel';
|
|
|
15
15
|
* Requires {@link provideAfricaniesUiOverlays} at bootstrap.
|
|
16
16
|
*/
|
|
17
17
|
@Injectable({ providedIn: 'root' })
|
|
18
|
+
/**
|
|
19
|
+
* Opens {@link NotificationDrawerPanel} via {@link DrawerService}.
|
|
20
|
+
*/
|
|
18
21
|
export class NotificationDrawerService {
|
|
19
22
|
private readonly drawer = inject(DrawerService);
|
|
20
23
|
|
|
@@ -115,6 +115,9 @@ import { OVERLAY_DATA } from './overlay-data.token';
|
|
|
115
115
|
</div>
|
|
116
116
|
`,
|
|
117
117
|
})
|
|
118
|
+
/**
|
|
119
|
+
* Built-in confirm dialog hosted by {@link ConfirmService} / {@link ModalService}.
|
|
120
|
+
*/
|
|
118
121
|
export class ConfirmDialogComponent {
|
|
119
122
|
/** Stable ids so aria-labelledby / aria-describedby stay unique per instance. */
|
|
120
123
|
protected readonly titleId = `africanies-confirm-title-${cryptoRandom()}`;
|
|
@@ -21,6 +21,9 @@ import {
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
@Injectable()
|
|
24
|
+
/**
|
|
25
|
+
* Opens edge-anchored drawer panels via Angular CDK Overlay.
|
|
26
|
+
*/
|
|
24
27
|
export class DrawerService implements OverlayOpener {
|
|
25
28
|
private readonly overlay = inject(Overlay);
|
|
26
29
|
private readonly injector = inject(Injector);
|
|
@@ -72,6 +72,9 @@ export interface ModalOpenConfig<TData = unknown>
|
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
74
|
@Injectable()
|
|
75
|
+
/**
|
|
76
|
+
* Opens centered modal dialogs via Angular CDK Overlay.
|
|
77
|
+
*/
|
|
75
78
|
export class ModalService implements OverlayOpener {
|
|
76
79
|
private readonly overlay = inject(Overlay);
|
|
77
80
|
private readonly injector = inject(Injector);
|
|
@@ -18,6 +18,9 @@ import { ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
|
18
18
|
selector: '[africaniesOverlayHeader]',
|
|
19
19
|
standalone: true,
|
|
20
20
|
})
|
|
21
|
+
/**
|
|
22
|
+
* Marks projected chrome as the non-scrolling overlay header (title + close).
|
|
23
|
+
*/
|
|
21
24
|
export class OverlayHeaderDirective {}
|
|
22
25
|
|
|
23
26
|
/**
|
|
@@ -38,6 +41,9 @@ export class OverlayHeaderDirective {}
|
|
|
38
41
|
selector: '[africaniesOverlayFooter]',
|
|
39
42
|
standalone: true,
|
|
40
43
|
})
|
|
44
|
+
/**
|
|
45
|
+
* Marks projected chrome as the non-scrolling overlay footer (actions).
|
|
46
|
+
*/
|
|
41
47
|
export class OverlayFooterDirective {}
|
|
42
48
|
|
|
43
49
|
/**
|
|
@@ -92,4 +98,7 @@ export class OverlayFooterDirective {}
|
|
|
92
98
|
</div>
|
|
93
99
|
`,
|
|
94
100
|
})
|
|
101
|
+
/**
|
|
102
|
+
* Header / scroll body / footer shell for {@link ModalService} and {@link DrawerService} panels.
|
|
103
|
+
*/
|
|
95
104
|
export class OverlayFrameComponent {}
|
|
@@ -181,6 +181,9 @@ type PageItem = number | 'ellipsis';
|
|
|
181
181
|
</nav>
|
|
182
182
|
`,
|
|
183
183
|
})
|
|
184
|
+
/**
|
|
185
|
+
* Page-size select, numbered pager, and prev/next — driven by {@link PaginationMetaModel} from the API envelope.
|
|
186
|
+
*/
|
|
184
187
|
export class PaginationComponent {
|
|
185
188
|
private readonly filterQuery = inject(FilterQueryService);
|
|
186
189
|
protected readonly modeColor = inject(ModeColorService);
|
|
@@ -30,6 +30,9 @@ export interface StepDefContext {
|
|
|
30
30
|
selector: '[africaniesStepDef]',
|
|
31
31
|
standalone: true,
|
|
32
32
|
})
|
|
33
|
+
/**
|
|
34
|
+
* Registers projected step body content against a step key for {@link StepperComponent}.
|
|
35
|
+
*/
|
|
33
36
|
export class StepDefDirective {
|
|
34
37
|
/** Template projected as the active step body. */
|
|
35
38
|
readonly template = inject(TemplateRef<StepDefContext>);
|
|
@@ -30,6 +30,9 @@ export interface CellDefContext<T = unknown> {
|
|
|
30
30
|
selector: '[africaniesCellDef]',
|
|
31
31
|
standalone: true,
|
|
32
32
|
})
|
|
33
|
+
/**
|
|
34
|
+
* Registers a projected cell template against a column key for {@link TableComponent}.
|
|
35
|
+
*/
|
|
33
36
|
export class CellDefDirective {
|
|
34
37
|
/** Template projected into matching column body cells. */
|
|
35
38
|
readonly template = inject(TemplateRef<CellDefContext>);
|
|
@@ -18,6 +18,9 @@ import { Directive, inject, input, TemplateRef } from '@angular/core';
|
|
|
18
18
|
selector: '[africaniesHeaderCellDef]',
|
|
19
19
|
standalone: true,
|
|
20
20
|
})
|
|
21
|
+
/**
|
|
22
|
+
* Registers a projected header cell template against a column key for {@link TableComponent}.
|
|
23
|
+
*/
|
|
21
24
|
export class HeaderCellDefDirective {
|
|
22
25
|
/** Template projected into the matching column header cell. */
|
|
23
26
|
readonly template = inject(TemplateRef);
|
|
@@ -25,6 +25,9 @@ export type RowDetailDefContext<T = unknown> = CellDefContext<T>;
|
|
|
25
25
|
selector: '[africaniesRowDetail]',
|
|
26
26
|
standalone: true,
|
|
27
27
|
})
|
|
28
|
+
/**
|
|
29
|
+
* Registers a label / value pair inside an expanded table row.
|
|
30
|
+
*/
|
|
28
31
|
export class RowDetailDefDirective {
|
|
29
32
|
/** Template rendered as the detail value. */
|
|
30
33
|
readonly template = inject(TemplateRef<RowDetailDefContext>);
|
|
@@ -499,6 +499,9 @@ import { TableColumn, TableSortChange } from './table-column';
|
|
|
499
499
|
</div>
|
|
500
500
|
`,
|
|
501
501
|
})
|
|
502
|
+
/**
|
|
503
|
+
* Presentational data table with template-based cells.
|
|
504
|
+
*/
|
|
502
505
|
export class TableComponent<T = unknown> {
|
|
503
506
|
private readonly destroyRef = inject(DestroyRef);
|
|
504
507
|
protected readonly shipping = inject(ShippingModeService);
|
|
@@ -25,7 +25,7 @@ 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-
|
|
28
|
+
class="sticky top-0 z-10 flex flex-wrap justify-end gap-2 bg-transparent pb-1 backdrop-blur-sm dark:bg-transparent"
|
|
29
29
|
>
|
|
30
30
|
@if (toastService.hasStacks()) {
|
|
31
31
|
@if (toastService.allStacksExpanded()) {
|
|
@@ -78,6 +78,9 @@ import { ToastItemComponent } from './toast-item.component';
|
|
|
78
78
|
</div>
|
|
79
79
|
`,
|
|
80
80
|
})
|
|
81
|
+
/**
|
|
82
|
+
* Fixed stack host attached once by {@link ToastService.ensureHost}. Caps to the viewport and scrolls when the stack (or an expanded group) would otherwise run off-screen.
|
|
83
|
+
*/
|
|
81
84
|
export class ToastHostComponent {
|
|
82
85
|
protected readonly toastService = inject(ToastService);
|
|
83
86
|
protected readonly toasts = this.toastService.items;
|
|
@@ -221,6 +221,9 @@ import {
|
|
|
221
221
|
}
|
|
222
222
|
`,
|
|
223
223
|
})
|
|
224
|
+
/**
|
|
225
|
+
* Single toast card — dense, token-based, with optional countdown rail. Stacked identical toasts can expand; close peels the outermost copy.
|
|
226
|
+
*/
|
|
224
227
|
export class ToastItemComponent {
|
|
225
228
|
/** Stack entry to render. */
|
|
226
229
|
readonly item = input.required<ToastItem>();
|
|
@@ -47,6 +47,9 @@ type PopoverToggles = {
|
|
|
47
47
|
* Prefer {@link provideAfricaniesToasts} at bootstrap so the host overlay mounts once.
|
|
48
48
|
*/
|
|
49
49
|
@Injectable()
|
|
50
|
+
/**
|
|
51
|
+
* Imperative toast stack for AFRICANIES apps.
|
|
52
|
+
*/
|
|
50
53
|
export class ToastService implements AfricaniesHttpToastHandler {
|
|
51
54
|
private readonly overlay = inject(Overlay);
|
|
52
55
|
private readonly injector = inject(Injector);
|
|
@@ -191,6 +191,9 @@ const PLACEMENT_POSITIONS: Record<TooltipPlacement, ConnectedPosition[]> = {
|
|
|
191
191
|
</ng-template>
|
|
192
192
|
`,
|
|
193
193
|
})
|
|
194
|
+
/**
|
|
195
|
+
* Contextual help tip — default info icon or a custom projected trigger.
|
|
196
|
+
*/
|
|
194
197
|
export class TooltipComponent {
|
|
195
198
|
protected readonly tooltipId = `africanies-tooltip-${++nextTooltipId}`;
|
|
196
199
|
|