@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"africanies-africanies-icons.mjs","sources":["../../../../libs/africanies-icons/src/lib/icon-registry.service.ts","../../../../libs/africanies-icons/src/lib/africanies-icon.component.ts","../../../../libs/africanies-icons/src/lib/icon-name.ts","../../../../libs/africanies-icons/src/africanies-africanies-icons.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n inject,\n Injectable,\n InjectionToken,\n} from '@angular/core';\n\n/**\n * URL of the SVG sprite served by the host application.\n *\n * Default assumes the published asset is copied to\n * `/assets/africanies-icons/icons.sprite.svg` (see package README). The leading\n * slash is required: Angular `[src]` / `fetch()` resolve relative URLs\n * against the current route (`/login/assets/…`), not `<base href=\"/\">`.\n * Override when the host uses a CDN or a different assets path.\n */\nexport const AFRICANIES_ICON_SPRITE_URL = new InjectionToken<string>(\n 'AFRICANIES_ICON_SPRITE_URL',\n {\n providedIn: 'root',\n factory: () => '/assets/africanies-icons/icons.sprite.svg',\n },\n);\n\n/**\n * Fetches and inlines the icon sprite once into `document.body`.\n *\n * WHY inline (not external `<use href=\"sprite.svg#id\">`):\n * - External fragment references break under some CSP / cross-origin setups.\n * - Inlining once lets every `<africanies-icon>` use cheap `#symbol-id` hrefs and\n * keeps a single network request for 600+ icons.\n *\n * Call {@link ensureLoaded} from `AfricaniesIconComponent` (or app bootstrap). Safe\n * to invoke repeatedly — concurrent callers share one in-flight promise.\n */\n@Injectable({ providedIn: 'root' })\nexport class IconRegistryService {\n private readonly document = inject(DOCUMENT);\n private readonly spriteUrl = inject(AFRICANIES_ICON_SPRITE_URL);\n\n private loadPromise: Promise<void> | null = null;\n private loaded = false;\n\n /**\n * Ensures the sprite `<svg>` is present in the DOM.\n *\n * @returns Resolves when the sprite is inlined (or already present).\n * @throws {Error} When the sprite URL cannot be fetched.\n */\n ensureLoaded(): Promise<void> {\n if (this.loaded) {\n return Promise.resolve();\n }\n if (this.loadPromise) {\n return this.loadPromise;\n }\n\n this.loadPromise = this.fetchAndInline().finally(() => {\n this.loadPromise = null;\n });\n return this.loadPromise;\n }\n\n /**\n * Whether the sprite has been successfully inlined.\n *\n * @returns `true` after a successful {@link ensureLoaded}.\n */\n isLoaded(): boolean {\n return this.loaded;\n }\n\n private async fetchAndInline(): Promise<void> {\n if (this.document.getElementById('africanies-icon-sprite')) {\n this.loaded = true;\n return;\n }\n\n const response = await fetch(this.spriteUrl);\n if (!response.ok) {\n throw new Error(\n `Failed to load AFRICANIES icon sprite from \"${this.spriteUrl}\" (${response.status})`,\n );\n }\n\n const markup = await response.text();\n const container = this.document.createElement('div');\n container.id = 'africanies-icon-sprite';\n container.setAttribute('hidden', '');\n container.setAttribute('aria-hidden', 'true');\n // WHY innerHTML: sprite is trusted first-party SVG from this package.\n container.innerHTML = markup;\n this.document.body.prepend(container);\n this.loaded = true;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n effect,\n inject,\n input,\n} from '@angular/core';\n\nimport type { IconName } from './icon-name';\nimport { IconRegistryService } from './icon-registry.service';\n\n/**\n * Renders a single icon from the shared SVG sprite.\n *\n * WHY sprite + `<use>`: one network fetch (via {@link IconRegistryService})\n * serves every icon instead of shipping hundreds of Angular components or\n * individual SVG HTTP requests.\n *\n * Host apps must serve `icons.sprite.svg` (see package README) or override\n * {@link AFRICANIES_ICON_SPRITE_URL}.\n *\n * @example\n * ```html\n * <africanies-icon name=\"truck\" />\n * <africanies-icon name=\"search\" [size]=\"32\" />\n * ```\n */\n@Component({\n selector: 'africanies-icon',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <svg\n [attr.width]=\"resolvedSize()\"\n [attr.height]=\"resolvedSize()\"\n [attr.aria-hidden]=\"true\"\n focusable=\"false\"\n part=\"svg\"\n >\n <use [attr.href]=\"href()\" />\n </svg>\n `,\n styles: `\n :host {\n display: inline-flex;\n line-height: 0;\n vertical-align: middle;\n /* Inherit surrounding text so dark:text-white / mode accents paint the glyph. */\n color: inherit;\n }\n\n svg {\n display: block;\n fill: currentColor;\n color: inherit;\n }\n `,\n host: {\n '[attr.data-icon]': 'name()',\n },\n})\nexport class AfricaniesIconComponent {\n private readonly registry = inject(IconRegistryService);\n\n /**\n * Icon id matching a `<symbol>` in the sprite / {@link IconName} union.\n */\n readonly name = input.required<IconName>();\n\n /**\n * CSS pixel size for width and height. Accepts a number (`24`) or CSS length\n * (`'1.5rem'`). Defaults to `24`.\n */\n readonly size = input<number | string>(24);\n\n constructor() {\n // Kick off sprite load on first icon render; failures surface as rejected\n // promises / console errors rather than blanking the whole app.\n effect(() => {\n // Track name so HMR / late registry overrides still trigger ensureLoaded.\n void this.name();\n void this.registry.ensureLoaded().catch((err: unknown) => {\n console.error('[africanies-icon] sprite load failed', err);\n });\n });\n }\n\n /**\n * Fragment href into the inlined sprite (`#truck`).\n *\n * @returns Hash fragment pointing at the named symbol.\n */\n protected href(): string {\n return `#${this.name()}`;\n }\n\n /**\n * Normalized size attribute value.\n *\n * @returns Size as a string suitable for the SVG `width`/`height` attrs.\n */\n protected resolvedSize(): string {\n const value = this.size();\n return typeof value === 'number' ? String(value) : value;\n }\n}\n","/**\n * Generated by `tools/build-icon-sprite.mjs` — do not edit by hand.\n *\n * Closed list of every symbol id in `icons.sprite.svg` so typos fail at\n * compile time, editors autocomplete valid names, and the playground gallery\n * can iterate without maintaining a second list.\n *\n * To add an icon: drop an SVG into `/svg`, then run `npm run icons:build`.\n */\nexport const ICON_NAMES = [\n 'abacus',\n 'absolute-position',\n 'academy-cap',\n 'accessibility',\n 'accordion-menu',\n 'add-dock',\n 'adjust',\n 'adobe-flash',\n 'airplane',\n 'alarm',\n 'align-center',\n 'align-justify',\n 'align-left',\n 'align-right',\n 'alt-a',\n 'alt',\n 'ambulance',\n 'anchor',\n 'angle-double-down',\n 'angle-double-left',\n 'angle-double-right',\n 'angle-double-up',\n 'angle-down',\n 'angle-left',\n 'angle-right',\n 'angle-up',\n 'archive',\n 'archives',\n 'area-select',\n 'arrow-backward',\n 'arrow-circle-down-o',\n 'arrow-circle-down',\n 'arrow-circle-left-o',\n 'arrow-circle-left',\n 'arrow-circle-right-o',\n 'arrow-circle-right',\n 'arrow-circle-up-o',\n 'arrow-circle-up',\n 'arrow-down',\n 'arrow-forward',\n 'arrow-left',\n 'arrow-long-down',\n 'arrow-long-left',\n 'arrow-right',\n 'arrow-up',\n 'arrows-cross',\n 'arrows-long-h',\n 'arrows-long-right',\n 'arrows-long-up',\n 'arrows-long-v',\n 'arrows',\n 'asterisk',\n 'at',\n 'automation',\n 'backspace-a',\n 'backspace',\n 'backwards',\n 'ban',\n 'bar-chart-h',\n 'bar-chart-v',\n 'bar-chart',\n 'barcode',\n 'bed',\n 'bell-o',\n 'bell-slash-o',\n 'bell-slash',\n 'bell',\n 'boat',\n 'bold',\n 'bolt',\n 'bomb',\n 'book-dollar',\n 'book-percent',\n 'book',\n 'bookmark-o',\n 'bookmark',\n 'briefcase',\n 'browser',\n 'bug-o',\n 'bug',\n 'building-o',\n 'building',\n 'bullets',\n 'bullseye',\n 'bus',\n 'button',\n 'calc-book',\n 'calc',\n 'calendar-briefcase',\n 'calendar-clock',\n 'calendar-envelope',\n 'calendar-o',\n 'calendar-user',\n 'calendar',\n 'camera',\n 'car',\n 'caret-down',\n 'caret-left',\n 'caret-right',\n 'caret-square-down-o',\n 'caret-square-left-o',\n 'caret-square-right-o',\n 'caret-square-up-o',\n 'caret-up',\n 'cart-o',\n 'cart',\n 'cash',\n 'chart-3d',\n 'chart-grid',\n 'chart-line',\n 'chart-timeline',\n 'chart',\n 'chat',\n 'check-circle-o',\n 'check-circle',\n 'check-square-o',\n 'check-square',\n 'check',\n 'chevron-circle-down-o',\n 'chevron-circle-down',\n 'chevron-circle-left-o',\n 'chevron-circle-left',\n 'chevron-circle-right-o',\n 'chevron-circle-right',\n 'chevron-circle-up-o',\n 'chevron-circle-up',\n 'chevron-down-small',\n 'chevron-down',\n 'chevron-left-small',\n 'chevron-left',\n 'chevron-right-small',\n 'chevron-right',\n 'chevron-up-small',\n 'chevron-up',\n 'child',\n 'circle-thin',\n 'circle',\n 'clipboard-check',\n 'clipboard-cross',\n 'clipboard-heart',\n 'clipboard-pulse',\n 'clipboard-text',\n 'clipboard-user',\n 'clipboard',\n 'clock',\n 'close-big',\n 'close-circle-o',\n 'close-circle',\n 'close-small',\n 'close',\n 'cloud-download-o',\n 'cloud-download',\n 'cloud-o',\n 'cloud-upload-o',\n 'cloud-upload',\n 'cloud',\n 'cluster',\n 'code',\n 'coffee',\n 'cog-o',\n 'cog',\n 'cogs',\n 'coin-piles',\n 'coins',\n 'combobox',\n 'comment-ellipsis-o',\n 'comment-ellipsis',\n 'comment-o',\n 'comment',\n 'comments-o',\n 'comments',\n 'compile',\n 'compress-square',\n 'compress',\n 'connect-o',\n 'connect',\n 'controller',\n 'copy-o',\n 'copy',\n 'copyright',\n 'corner-lower-left',\n 'corner-lower-right',\n 'corner-upper-left',\n 'corner-upper-right',\n 'credit-card',\n 'crop',\n 'cross-cutlery',\n 'crosshairs',\n 'css',\n 'ctrl-a',\n 'ctrl',\n 'cube',\n 'cubes',\n 'curly-brackets',\n 'cursor-o',\n 'cursor',\n 'cutlery',\n 'dashboard',\n 'database',\n 'date-input',\n 'deindent',\n 'del-a',\n 'del',\n 'dental-chair',\n 'desktop',\n 'diamond-o',\n 'diamond',\n 'diasporan-partner',\n 'diploma-scroll',\n 'diploma',\n 'disc',\n 'doctor-briefcase',\n 'doctor',\n 'dollar',\n 'dot-circle',\n 'download-alt',\n 'download',\n 'drop',\n 'edit',\n 'eject',\n 'elastic',\n 'ellipsis-circle-o',\n 'ellipsis-circle',\n 'ellipsis-dots-h',\n 'ellipsis-dots-v',\n 'ellipsis-h',\n 'ellipsis-v',\n 'enter-arrow',\n 'enter',\n 'envelope-o',\n 'envelope-open-o',\n 'envelope-open',\n 'envelope',\n 'envelopes-o',\n 'envelopes',\n 'eraser',\n 'esc-a',\n 'esc',\n 'euro',\n 'exchange',\n 'exclamation-circle-o',\n 'exclamation-circle',\n 'exclamation',\n 'exit-o',\n 'exit',\n 'expand-full',\n 'expand-square',\n 'expand',\n 'external-browser',\n 'external-link',\n 'eye-slash',\n 'eye',\n 'eyedropper',\n 'facebook-square',\n 'facebook',\n 'factory',\n 'family',\n 'fast-backward',\n 'fast-forward',\n 'female',\n 'file-add',\n 'file-code',\n 'file-font',\n 'file-movie',\n 'file-o',\n 'file-picture',\n 'file-presentation',\n 'file-process',\n 'file-refresh',\n 'file-remove',\n 'file-search',\n 'file-sound',\n 'file-start',\n 'file-table',\n 'file-text-o',\n 'file-text',\n 'file-tree-small',\n 'file-tree-sub',\n 'file-tree',\n 'file-zip',\n 'file',\n 'fill',\n 'film',\n 'filter',\n 'fire',\n 'flag-checkered',\n 'flag-o',\n 'flag',\n 'flash',\n 'flask',\n 'flight-landing',\n 'flight-takeoff',\n 'flip-h',\n 'flip-v',\n 'folder-add',\n 'folder-o',\n 'folder-open-o',\n 'folder-open',\n 'folder-remove',\n 'folder-search',\n 'folder',\n 'font',\n 'form',\n 'forward',\n 'frown-o',\n 'funcion',\n 'funnel',\n 'gamepad',\n 'gavel',\n 'gift',\n 'glass',\n 'glasses',\n 'globe-wire',\n 'globe',\n 'golf',\n 'google-plus-square',\n 'google-plus',\n 'grab',\n 'grid-bevel',\n 'grid-big-o',\n 'grid-big',\n 'grid-h',\n 'grid-small-o',\n 'grid-small',\n 'grid-v',\n 'grid',\n 'group',\n 'hammer',\n 'hand',\n 'handle-corner',\n 'hands-up',\n 'handshake',\n 'harddrive-o',\n 'harddrive',\n 'hash',\n 'header',\n 'headphones',\n 'headset',\n 'health-card',\n 'heart-o',\n 'heart',\n 'home-o',\n 'home',\n 'hospital',\n 'hourglass-empty',\n 'hourglass-end',\n 'hourglass-start',\n 'hourglass',\n 'inbox',\n 'indent',\n 'info-circle-o',\n 'info-circle',\n 'info',\n 'input',\n 'insert',\n 'institution',\n 'invoice',\n 'italic',\n 'key-o',\n 'key',\n 'keyboard-o',\n 'keyboard',\n 'laptop',\n 'layout',\n 'level-down-bold',\n 'level-down',\n 'level-left-bold',\n 'level-left',\n 'level-right-bold',\n 'level-right',\n 'level-up-bold',\n 'level-up',\n 'lifebuoy',\n 'lightbulb',\n 'line-bar-chart',\n 'line-chart',\n 'line-h',\n 'line-v',\n 'lines-list',\n 'lines',\n 'link',\n 'list-ol',\n 'list-select',\n 'list-ul',\n 'list',\n 'location-arrow-circle-o',\n 'location-arrow-circle',\n 'location-arrow',\n 'lock',\n 'magic',\n 'magnet',\n 'mailbox',\n 'male',\n 'map-marker',\n 'margin-bottom',\n 'margin-left',\n 'margin-right',\n 'margin-top',\n 'margin',\n 'medal',\n 'megaphone',\n 'meh-o',\n 'menu',\n 'microphone',\n 'mini-partner',\n 'minus-circle-o',\n 'minus-circle',\n 'minus-square-o',\n 'minus',\n 'mobile-browser',\n 'mobile-retro',\n 'mobile',\n 'modal-list',\n 'modal',\n 'money-deposit',\n 'money-exchange',\n 'money-withdraw',\n 'money',\n 'moon-o',\n 'moon',\n 'morning',\n 'movie',\n 'music',\n 'mute',\n 'native-button',\n 'newspaper',\n 'notebook',\n 'number-count',\n 'nurse',\n 'office',\n 'open-book',\n 'option-a',\n 'option',\n 'options',\n 'orientation',\n 'out',\n 'outbox',\n 'package',\n 'padding-bottom',\n 'padding-left',\n 'padding-right',\n 'padding-top',\n 'padding',\n 'paint-roll',\n 'paintbrush',\n 'palette',\n 'panel',\n 'paperclip',\n 'paperplane-o',\n 'paperplane',\n 'paragraph',\n 'partner',\n 'password',\n 'paste',\n 'pause',\n 'pencil',\n 'phone-landline',\n 'phone',\n 'picture',\n 'pie-bar-chart',\n 'pie-chart',\n 'piggy-bank-coin',\n 'piggy-bank',\n 'pill',\n 'pills',\n 'pin-post',\n 'pin',\n 'play-circle-o',\n 'play-circle',\n 'play',\n 'plug',\n 'plus-circle-o',\n 'plus-circle',\n 'plus-minus',\n 'plus-square-o',\n 'plus',\n 'pointer',\n 'power-off',\n 'presentation',\n 'print',\n 'progressbar',\n 'puzzle-piece',\n 'pyramid-chart',\n 'qrcode',\n 'question-circle-o',\n 'question-circle',\n 'question',\n 'quote-left',\n 'quote-right',\n 'random',\n 'raster-lower-left',\n 'raster',\n 'records',\n 'recycle',\n 'refresh',\n 'reply-all',\n 'reply',\n 'resize-h',\n 'resize-v',\n 'retweet',\n 'rhombus',\n 'road-branch',\n 'road-branches',\n 'road-split',\n 'road',\n 'rocket',\n 'rotate-left',\n 'rotate-right',\n 'rss-square',\n 'rss',\n 'safe-lock',\n 'safe',\n 'scale-unbalance',\n 'scale',\n 'scatter-chart',\n 'scissors',\n 'screwdriver',\n 'search-minus',\n 'search-plus',\n 'search',\n 'select',\n 'server',\n 'share-square',\n 'share',\n 'shield',\n 'shift-arrow',\n 'shift',\n 'shop',\n 'sign-in-alt',\n 'sign-in',\n 'sign-out-alt',\n 'sign-out',\n 'signal',\n 'sitemap',\n 'slider',\n 'sliders',\n 'smiley-o',\n 'sort',\n 'sound-disable',\n 'spark-line',\n 'specialist',\n 'spinner-arc',\n 'spinner-third',\n 'spinner',\n 'spline-area-chart',\n 'spline-chart',\n 'split-h',\n 'split-v',\n 'split',\n 'spoon',\n 'square-shadow',\n 'star-half-left-o',\n 'star-half-left',\n 'star-half-right-o',\n 'star-half-right',\n 'star-o',\n 'star',\n 'start-cog',\n 'step-backward',\n 'step-forward',\n 'stethoscope',\n 'stock',\n 'stop-cog',\n 'stop',\n 'stopwatch',\n 'storage',\n 'strikethrough',\n 'subscript',\n 'suitcase',\n 'sun-down',\n 'sun-o',\n 'sun-rise',\n 'superscript',\n 'sword',\n 'tab-a',\n 'tab',\n 'table',\n 'tablet',\n 'tabs',\n 'tag',\n 'tags',\n 'tasks',\n 'taxi',\n 'teeth',\n 'terminal',\n 'text-height',\n 'text-input',\n 'text-label',\n 'text-width',\n 'thin-square',\n 'thumbs-down-o',\n 'thumbs-down',\n 'thumbs-up-o',\n 'thumbs-up',\n 'ticket',\n 'time-backward',\n 'time-forward',\n 'timer',\n 'toolbox',\n 'tools',\n 'tooth',\n 'touch',\n 'train',\n 'trash',\n 'tree-table',\n 'trending-down',\n 'trending-up',\n 'trophy',\n 'truck',\n 'twin-col-select',\n 'twitter-square',\n 'twitter',\n 'umbrella',\n 'underline',\n 'unlink',\n 'unlock',\n 'upload-alt',\n 'upload',\n 'user-card',\n 'user-check',\n 'user-clock',\n 'user-heart',\n 'user-star',\n 'user',\n 'users',\n 'vaadin-h',\n 'vaadin-v',\n 'viewport',\n 'vimeo-square',\n 'vimeo',\n 'volume-down',\n 'volume-off',\n 'volume-up',\n 'volume',\n 'wallet',\n 'warehouse',\n 'warning',\n 'workplace',\n 'wrench',\n 'youtube-square',\n 'youtube',\n] as const;\n\n/**\n * Union of every icon id in {@link ICON_NAMES}.\n */\nexport type IconName = (typeof ICON_NAMES)[number];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAOA;;;;;;;;AAQG;MACU,0BAA0B,GAAG,IAAI,cAAc,CAC1D,4BAA4B,EAC5B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,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B;IAChB,SAAS;IACT,UAAU;IACV,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,MAAM;IACN,OAAO;IACP,UAAU;IACV,UAAU;IACV,UAAU;IACV,cAAc;IACd,OAAO;IACP,aAAa;IACb,YAAY;IACZ,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,SAAS;IACT,WAAW;IACX,QAAQ;IACR,gBAAgB;IAChB,SAAS;;;AC1oBX;;AAEG;;;;"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# @africanies/africanies-theme
|
|
2
|
-
|
|
3
|
-
AFRICANIES design tokens (Tailwind preset), light/dark {@link ThemeService}, and shipping-mode accent helpers ({@link ModeColorService}).
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @africanies/africanies-theme @africanies/africanies-storage @africanies/africanies-core
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Tailwind
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
// tailwind.config.js
|
|
15
|
-
module.exports = {
|
|
16
|
-
presets: [require('@africanies/africanies-theme/tailwind-preset')],
|
|
17
|
-
content: [
|
|
18
|
-
'./src/**/*.{html,ts}',
|
|
19
|
-
'./node_modules/@africanies/africanies-ui/**/*.{js,mjs}',
|
|
20
|
-
],
|
|
21
|
-
};
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
> The preset file is published as `tailwind-preset.cjs` (package is ESM) but resolved via the `./tailwind-preset` export above.
|
|
25
|
-
|
|
26
|
-
See [THEME.md](./THEME.md) for the full palette, provisional typography scale, and legacy `$border-gray` mapping notes.
|
|
27
|
-
|
|
28
|
-
## ThemeService
|
|
29
|
-
|
|
30
|
-
```ts
|
|
31
|
-
import { inject, provideAppInitializer } from '@angular/core';
|
|
32
|
-
import { ThemeService } from '@africanies/africanies-theme';
|
|
33
|
-
|
|
34
|
-
provideAppInitializer(() => {
|
|
35
|
-
inject(ThemeService);
|
|
36
|
-
});
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## ModeColorService
|
|
40
|
-
|
|
41
|
-
```ts
|
|
42
|
-
const modeColor = inject(ModeColorService);
|
|
43
|
-
const { text, bg, bgSubtle } = modeColor.classes();
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Class strings are literals so Tailwind does not purge them.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"africanies-africanies-theme.mjs","sources":["../../../../libs/africanies-theme/src/lib/mode-color.safelist.ts","../../../../libs/africanies-theme/src/lib/mode-color.service.ts","../../../../libs/africanies-theme/src/lib/theme.service.ts","../../../../libs/africanies-theme/src/africanies-africanies-theme.ts"],"sourcesContent":["/**\n * Tailwind safelist side-effect for shipping-mode color utilities.\n *\n * WHY this file exists: JIT/content scanning only keeps class names that appear\n * as *literal strings* in scanned sources. {@link ModeColorService} already\n * returns these literals, but keeping a dedicated comment list makes the\n * contract obvious for consumers who configure `safelist` or purge plugins.\n *\n * Do not rename these strings without updating ModeColorService and THEME.md.\n *\n * SFN (export / green):\n * text-export bg-export bg-export-subtle bg-export-light border-export\n * hover:bg-export-light hover:bg-export-subtle dark:bg-export/15 dark:hover:bg-export/15\n * dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)] dark:bg-export dark:text-export dark:border-export\n *\n * STN (import / orange):\n * text-import bg-import bg-import-subtle bg-import-light border-import\n * hover:bg-import-light hover:bg-import-subtle dark:bg-import/15 dark:hover:bg-import/15\n * dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)] dark:bg-import dark:text-import dark:border-import\n */\nexport const MODE_COLOR_SAFELIST = [\n 'text-export',\n 'bg-export',\n 'bg-export-subtle',\n 'bg-export-light',\n 'border-export',\n 'hover:bg-export-light',\n 'hover:bg-export-subtle',\n 'dark:bg-export/15',\n 'dark:hover:bg-export/15',\n 'dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)]',\n 'dark:bg-export',\n 'dark:text-export',\n 'dark:border-export',\n 'text-import',\n 'bg-import',\n 'bg-import-subtle',\n 'bg-import-light',\n 'border-import',\n 'hover:bg-import-light',\n 'hover:bg-import-subtle',\n 'dark:bg-import/15',\n 'dark:hover:bg-import/15',\n 'dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)]',\n 'dark:bg-import',\n 'dark:text-import',\n 'dark:border-import',\n] as const;\n","import { computed, inject, Injectable } from '@angular/core';\n\nimport { ShippingModeService } from '@africanies/africanies-core';\n\n/**\n * Tailwind class bundle for the active shipping mode (SFN export / STN import).\n *\n * Use these for **primary** product chrome: CTAs, selected controls, progress,\n * and accent text. Semantic colors (danger / warning) stay mode-independent.\n */\nexport interface ModeColorClasses {\n /** Text color utility, e.g. `text-export`. */\n text: string;\n /** Solid background utility, e.g. `bg-export`. */\n bg: string;\n /** Soft background utility, e.g. `bg-export-subtle`. */\n bgSubtle: string;\n /** Border matching the mode accent, e.g. `border-export`. */\n border: string;\n /**\n * Filled primary CTA — `variant=\"primary\"` on buttons.\n * Includes hover utility as a literal so Tailwind keeps it.\n */\n primary: string;\n /**\n * Transparent / text-only CTA — `variant=\"ghost-primary\"` on buttons.\n * Mode accent text + soft hover fill.\n */\n ghostPrimary: string;\n /**\n * Soft highlight for selected / active rows (works in dark mode).\n * Dark uses a translucent tint — fine over solid surfaces, not for\n * sticky overlays (see {@link softSolid}).\n */\n soft: string;\n /**\n * Opaque soft fill — same tint as {@link soft}, but dark mode mixes into\n * ink so scrolled content cannot show through (sticky table headers/cells).\n */\n softSolid: string;\n /**\n * Soft hover highlight for menus and lists.\n */\n softHover: string;\n /**\n * Active nav leaf / collapsed rail — solid mode fill + white text.\n */\n activeFill: string;\n /**\n * Stroked secondary CTA — white fill, mode border + text (portal `.btn-stroked`).\n */\n stroked: string;\n}\n\n/**\n * Maps {@link ShippingModeService} to mode-accent Tailwind classes.\n *\n * - **SFN** → export green is primary\n * - **STN** → import orange is primary\n *\n * WHY literal class strings: Tailwind's scanner cannot see dynamically built\n * names like `` `text-${token}` ``. Returning full literals (`text-export`, …)\n * keeps utilities in the compiled CSS. See {@link MODE_COLOR_SAFELIST}.\n *\n * @example\n * ```html\n * @let colors = modeColor.classes();\n * <button type=\"button\" [class]=\"colors.primary\">Save</button>\n * <span [class]=\"colors.text\">Mode accent</span>\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ModeColorService {\n private readonly shippingMode = inject(ShippingModeService);\n\n /**\n * Mode-dependent utility classes. Recomputes when shipping mode changes.\n */\n readonly classes = computed<ModeColorClasses>(() => {\n // Literal strings required for Tailwind content detection — do not interpolate.\n if (this.shippingMode.mode() === 'sfn') {\n return {\n text: 'text-export',\n bg: 'bg-export',\n bgSubtle: 'bg-export-subtle',\n border: 'border-export',\n primary:\n 'bg-export text-white border-transparent hover:bg-export-light',\n ghostPrimary:\n 'bg-transparent text-export border-transparent hover:bg-export-subtle dark:hover:bg-export/15',\n soft: 'bg-export-subtle dark:bg-export/15',\n softSolid:\n 'bg-export-subtle dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)]',\n softHover: 'hover:bg-export-subtle dark:hover:bg-export/15',\n activeFill:\n 'bg-export text-white border-transparent dark:bg-export dark:text-white',\n stroked:\n 'bg-white text-export border-export hover:bg-export-subtle dark:bg-ink-950 dark:text-export dark:border-export dark:hover:bg-export/15',\n };\n }\n return {\n text: 'text-import',\n bg: 'bg-import',\n bgSubtle: 'bg-import-subtle',\n border: 'border-import',\n primary:\n 'bg-import text-white border-transparent hover:bg-import-light',\n ghostPrimary:\n 'bg-transparent text-import border-transparent hover:bg-import-subtle dark:hover:bg-import/15',\n soft: 'bg-import-subtle dark:bg-import/15',\n softSolid:\n 'bg-import-subtle dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)]',\n softHover: 'hover:bg-import-subtle dark:hover:bg-import/15',\n activeFill:\n 'bg-import text-white border-transparent dark:bg-import dark:text-white',\n stroked:\n 'bg-white text-import border-import hover:bg-import-subtle dark:bg-ink-950 dark:text-import dark:border-import dark:hover:bg-import/15',\n };\n });\n}\n","import { DOCUMENT } from '@angular/common';\nimport { inject, Injectable, signal } from '@angular/core';\n\nimport { AFRICANIES_THEME_KEY, STORAGE_TOKEN } from '@africanies/africanies-storage';\n\nimport type { Theme } from './theme.types';\n\n/**\n * Application light/dark theme preference.\n *\n * WHY signals (not BehaviorSubject): theme is synchronous UI state read from\n * templates and other services; a signal avoids RxJS subscription boilerplate\n * and matches Angular 22 change detection. Persistence goes through\n * {@link STORAGE_TOKEN} so tests can swap storage without touching `localStorage`.\n *\n * Applies the Tailwind `darkMode: 'class'` contract by toggling `dark` on\n * `document.documentElement`, and sets `color-scheme` so native UI (date\n * pickers, scrollbars, form controls) matches the app theme — class-based\n * dark mode alone does not restyle browser chrome.\n *\n * @example\n * ```ts\n * // app.config.ts\n * import { inject, provideAppInitializer } from '@angular/core';\n * import { ThemeService } from '@africanies/africanies-theme';\n *\n * export const appConfig = {\n * providers: [\n * provideAppInitializer(() => {\n * inject(ThemeService); // applies stored / system theme once\n * }),\n * ],\n * };\n *\n * // In a component\n * const theme = inject(ThemeService);\n * theme.toggle();\n * theme.setTheme('dark');\n * const current = theme.theme(); // 'light' | 'dark'\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ThemeService {\n private readonly storage = inject(STORAGE_TOKEN);\n private readonly document = inject(DOCUMENT);\n\n /**\n * Current theme. Prefer reading via `theme()` in templates / computed values\n * rather than caching the string, so dark-class consumers stay in sync.\n */\n readonly theme = signal<Theme>(this.resolveInitialTheme());\n\n constructor() {\n this.applyToDocument(this.theme());\n }\n\n /**\n * Sets and persists the theme, updating the `dark` class and `color-scheme`\n * on `<html>`.\n *\n * @param theme - Absolute preference to store.\n */\n setTheme(theme: Theme): void {\n this.theme.set(theme);\n this.applyToDocument(theme);\n try {\n this.storage.set(AFRICANIES_THEME_KEY, theme);\n } catch {\n // Persistence failure must not block the in-session visual toggle —\n // private browsing / quota issues are transient for theme preference.\n }\n }\n\n /**\n * Flips between light and dark.\n *\n * @returns The theme after the toggle.\n */\n toggle(): Theme {\n const next: Theme = this.theme() === 'light' ? 'dark' : 'light';\n this.setTheme(next);\n return next;\n }\n\n private resolveInitialTheme(): Theme {\n try {\n const stored = this.storage.get<Theme>(AFRICANIES_THEME_KEY);\n if (stored === 'light' || stored === 'dark') {\n return stored;\n }\n } catch {\n // Fall through to system preference when storage is unavailable.\n }\n return this.prefersDark() ? 'dark' : 'light';\n }\n\n private prefersDark(): boolean {\n const win = this.document.defaultView;\n return !!win?.matchMedia?.('(prefers-color-scheme: dark)').matches;\n }\n\n private applyToDocument(theme: Theme): void {\n const root = this.document.documentElement;\n if (theme === 'dark') {\n root.classList.add('dark');\n } else {\n root.classList.remove('dark');\n }\n // Native date/time pickers follow `color-scheme`, not Tailwind's `dark` class.\n root.style.colorScheme = theme;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AACI,MAAM,mBAAmB,GAAG;IACjC,aAAa;IACb,WAAW;IACX,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,uBAAuB;IACvB,wBAAwB;IACxB,mBAAmB;IACnB,yBAAyB;IACzB,kDAAkD;IAClD,gBAAgB;IAChB,kBAAkB;IAClB,oBAAoB;IACpB,aAAa;IACb,WAAW;IACX,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,uBAAuB;IACvB,wBAAwB;IACxB,mBAAmB;IACnB,yBAAyB;IACzB,kDAAkD;IAClD,gBAAgB;IAChB,kBAAkB;IAClB,oBAAoB;;;ACQtB;;;;;;;;;;;;;;;;AAgBG;MAEU,gBAAgB,CAAA;AACV,IAAA,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAE3D;;AAEG;AACM,IAAA,OAAO,GAAG,QAAQ,CAAmB,MAAK;;QA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,UAAU,GAAG,8BAA8B,CAAC,CAAC,OAAO;IACpE;AAEQ,IAAA,eAAe,CAAC,KAAY,EAAA;AAClC,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe;AAC1C,QAAA,IAAI,KAAK,KAAK,MAAM,EAAE;AACpB,YAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC;QAC5B;aAAO;AACL,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;QAC/B;;AAEA,QAAA,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK;IAChC;uGApEW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA;;2FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACzClC;;AAEG;;;;"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@africanies/africanies-theme",
|
|
3
|
-
"version": "0.0.2",
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^22.0.0",
|
|
6
|
-
"@angular/core": "^22.0.0",
|
|
7
|
-
"@africanies/africanies-core": ">=0.0.2 <0.1.0",
|
|
8
|
-
"@africanies/africanies-storage": ">=0.0.1 <0.1.0"
|
|
9
|
-
},
|
|
10
|
-
"sideEffects": false,
|
|
11
|
-
"publishConfig": {
|
|
12
|
-
"access": "public"
|
|
13
|
-
},
|
|
14
|
-
"exports": {
|
|
15
|
-
"./tailwind-preset": "./tailwind-preset.cjs",
|
|
16
|
-
"./package.json": {
|
|
17
|
-
"default": "./package.json"
|
|
18
|
-
},
|
|
19
|
-
".": {
|
|
20
|
-
"types": "./types/africanies-africanies-theme.d.ts",
|
|
21
|
-
"default": "./fesm2022/africanies-africanies-theme.mjs"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"files": [
|
|
25
|
-
"**/*",
|
|
26
|
-
"tailwind-preset.cjs",
|
|
27
|
-
"THEME.md"
|
|
28
|
-
],
|
|
29
|
-
"module": "fesm2022/africanies-africanies-theme.mjs",
|
|
30
|
-
"typings": "types/africanies-africanies-theme.d.ts",
|
|
31
|
-
"type": "module",
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"tslib": "^2.3.0"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# @africanies/africanies-core
|
|
2
|
-
|
|
3
|
-
API and app-wiring layer for the AFRICANIES Web SDK: SDK config, HTTP client,
|
|
4
|
-
shipping mode, mode-region metadata, TanStack Query default helpers, and
|
|
5
|
-
route-driven overlay registration.
|
|
6
|
-
|
|
7
|
-
## Install peers
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# Published on npm (@africanies scope)
|
|
11
|
-
npm install @africanies/africanies-core @africanies/africanies-models @africanies/africanies-storage
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Peer dependencies: `@angular/common`, `@angular/core`, `@angular/router`,
|
|
15
|
-
`rxjs`, `@africanies/africanies-models`, `@africanies/africanies-storage`.
|
|
16
|
-
|
|
17
|
-
## Quick start
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
import { ApplicationConfig } from '@angular/core';
|
|
21
|
-
import {
|
|
22
|
-
provideAfricaniesSdk,
|
|
23
|
-
provideAfricaniesHttpClient,
|
|
24
|
-
provideOverlayRoutes,
|
|
25
|
-
createAfricaniesQueryClientDefaults,
|
|
26
|
-
} from '@africanies/africanies-core';
|
|
27
|
-
|
|
28
|
-
export const appConfig: ApplicationConfig = {
|
|
29
|
-
providers: [
|
|
30
|
-
provideAfricaniesSdk({ baseUrl: 'https://api.example.com', timeout: 30_000 }),
|
|
31
|
-
provideAfricaniesHttpClient(),
|
|
32
|
-
// optional extras:
|
|
33
|
-
// provideAfricaniesHttpClient({ interceptors: [correlationInterceptor] }),
|
|
34
|
-
// optional: provideOverlayRoutes([{ paramKey: 'modal', routes: { ... } }]),
|
|
35
|
-
],
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// TanStack Query (app dependency — pin exact experimental version):
|
|
39
|
-
// new QueryClient({ defaultOptions: createAfricaniesQueryClientDefaults() })
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Modules
|
|
43
|
-
|
|
44
|
-
| Area | Exports |
|
|
45
|
-
|------|---------|
|
|
46
|
-
| Config | `provideAfricaniesSdk`, `AFRICANIES_SDK_CONFIG`, `httpToasts` (`'off'` \| `'errors'` \| `'all'`) |
|
|
47
|
-
| Auth | `AuthService` (`forgot`), `isValidEmail`, `AuthTokenService` (`set` / `clear` / `get`) |
|
|
48
|
-
| Shipping | `ShippingModeService` (tab-scoped via `sessionStorage`), `shipmentModeInterceptor`, per-request `ApiRequestOptions.shippingMode` / `withShippingMode` |
|
|
49
|
-
| HTTP | `provideAfricaniesHttpClient`, `ApiClient` (auto-tags `withToast` from config / `ApiRequestOptions.toast`; optional `shippingMode` per call; HTTP failures → `Error` with formatted `.message`), `withToast`, `withShippingMode`, `httpToastInterceptor`, `normalize` (lifts Laravel validation bags into `errors` + joined `message`), `formatApiErrorMessage` (used internally; rare for hosts), `fieldErrorsMap`, `authInterceptor` |
|
|
50
|
-
| Query | `createAfricaniesQueryClientDefaults`, `provideAfricaniesQueryDefaults`, `listFetchKind` (body loader on first load / STN↔SFN; keep rows on focus / Refresh / pager) |
|
|
51
|
-
| Mode | `ModeConfigService`, `provideModeConfig`, `MODE_CONFIG_PATH` |
|
|
52
|
-
| Country | `CountryService`, `countryFlagUrl` / `mapCountrySelectOptions` (flagcdn.com), `COUNTRY_READ_PATH`, mappers |
|
|
53
|
-
| Service | `ServiceService` (`readPage` / `readAll` / `readById`), `SERVICE_READ_PATH` (`/public/service/read`), mappers |
|
|
54
|
-
| Document | `DocumentService` (`readPage` / `readAll` / `readById`), `DOCUMENT_READ_PATH` (`/public/document/read`) — preview via `file_ref` on by-id |
|
|
55
|
-
| Plan | `PlanService` (`readPage` / `readAll` / `readById`), `PLAN_READ_PATH` (`/public/plan/read`), mappers |
|
|
56
|
-
| Currency | `CurrencyService` (`readPage` / `readAll` / `readById`, `create` / `update` / `remove`), `CURRENCY_*_PATH`, mappers |
|
|
57
|
-
| Payment method | `PaymentMethodService` (`readPage` / `readAll` / `readById`, `update`), `PAYMENT_METHOD_READ_PATH` / `PAYMENT_METHOD_UPDATE_PATH`, mappers |
|
|
58
|
-
| Shipment method | `ShipmentMethodService` (`readPage` / `readAll` / `readById`), `SHIPMENT_METHOD_READ_PATH`, mappers |
|
|
59
|
-
| Warehouse | `WarehouseService` (`readPage` / `readAll` / `readById`), `WAREHOUSE_READ_PATH`, mappers |
|
|
60
|
-
| Zone | `ZoneService` (`readPage` / `readAll` / `readById`), `ZONE_READ_PATH`, mappers |
|
|
61
|
-
| Product | `ProductService` (`readPage` / `readAll` / `readById`), `PRODUCT_READ_PATH`, mappers |
|
|
62
|
-
| User | `UserService` (`me`, `changePassword`, `logoutFromAllSessions`), `USER_PATH`, `mapUser` (bare `/user` body; needs `AuthTokenService.set`) |
|
|
63
|
-
| Notification | `NotificationService` (`readPage` / `readAll` / `readOne`), `NOTIFICATION_READ_PATH`, `mapNotification` / `mapNotificationInboxItem` |
|
|
64
|
-
| File | `FileService` (`read` / `readMultiple` → `POST /file/read`), `FILE_READ_PATH`, `mapFileRead` / `mapFileReadList` |
|
|
65
|
-
| Overlay | `provideOverlayRoutes`, `RouteOverlayService`, `MODAL_SERVICE`, `DRAWER_SERVICE` |
|
|
66
|
-
| Filters | `FilterOptionsResolver` (`resolveField` lazy in drawer), `mergeFilterOptionLists`, warehouse/method mappers |
|
|
67
|
-
| Browser | `copyToClipboard`, `downloadCsv` / `csvCell` (UTF-8 CSV download) |
|
|
68
|
-
|
|
69
|
-
List-style GETs follow `ResourceId`: `null` (paginated), `'all'` (full dump), `number` (single).
|
|
70
|
-
|
|
71
|
-
| Filter `optionsSource` | SDK resolver |
|
|
72
|
-
|------------------------|--------------|
|
|
73
|
-
| `warehouses` | Lazy `FilterOptionsResolver.resolveField` → `WarehouseService.readAll()` |
|
|
74
|
-
| `shipmentMethods` | Lazy `FilterOptionsResolver.resolveField` → `ShipmentMethodService.readAll()` |
|
|
75
|
-
| `shipmentManifests` | Host `optionLists` (no built-in service yet) |
|
|
76
|
-
|
|
77
|
-
`MODAL_SERVICE` / `DRAWER_SERVICE` are tokens only — implementations ship in
|
|
78
|
-
`@africanies/africanies-ui` to avoid circular dependencies.
|
|
79
|
-
|
|
80
|
-
## Build / test
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
npx nx build africanies-core
|
|
84
|
-
npx nx test africanies-core
|
|
85
|
-
```
|