@africanies/angular-web-sdk 0.1.6 → 0.1.8
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/{17491371155400585077 → 13466509747676776487}/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +139 -51
- package/.nx/cache/13466509747676776487/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -0
- package/.nx/cache/{17491371155400585077 → 13466509747676776487}/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +14 -11
- package/.nx/cache/{17499961385238663835 → 14995846848874973576}/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +83 -63
- package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
- package/.nx/cache/{17499961385238663835 → 14995846848874973576}/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +22 -19
- package/.nx/cache/{12276756491762927325 → 15302120112746851896}/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +34 -6
- package/.nx/cache/15302120112746851896/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
- package/.nx/cache/{12276756491762927325 → 15302120112746851896}/dist/libs/africanies-theme/tailwind-preset.cjs +104 -19
- package/.nx/cache/{12276756491762927325 → 15302120112746851896}/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +21 -2
- package/.nx/cache/18393832731522001121/dist/libs/africanies-core/README.md +85 -0
- package/.nx/cache/18393832731522001121/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +4634 -0
- package/.nx/cache/18393832731522001121/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -0
- package/.nx/cache/18393832731522001121/dist/libs/africanies-core/package.json +31 -0
- package/.nx/cache/18393832731522001121/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +2743 -0
- package/.nx/cache/5151121439688073678/dist/libs/africanies-icons/README.md +69 -0
- package/.nx/cache/5151121439688073678/dist/libs/africanies-icons/assets/icons.sprite.svg +1851 -0
- package/.nx/cache/5151121439688073678/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs +833 -0
- package/.nx/cache/5151121439688073678/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs.map +1 -0
- package/.nx/cache/5151121439688073678/dist/libs/africanies-icons/package.json +30 -0
- package/.nx/cache/5151121439688073678/dist/libs/africanies-icons/types/africanies-africanies-icons.d.ts +108 -0
- package/.nx/cache/{4082520855419352840 → 6673686859704879504}/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +12 -2
- package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
- package/.nx/cache/{4082520855419352840 → 6673686859704879504}/dist/libs/africanies-theme/tailwind-preset.cjs +16 -7
- package/.nx/cache/{4082520855419352840 → 6673686859704879504}/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +11 -3
- package/.nx/cache/877026836685850193/dist/libs/africanies-models/README.md +60 -0
- package/.nx/cache/877026836685850193/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs +613 -0
- package/.nx/cache/877026836685850193/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs.map +1 -0
- package/.nx/cache/877026836685850193/dist/libs/africanies-models/package.json +23 -0
- package/.nx/cache/877026836685850193/dist/libs/africanies-models/types/africanies-africanies-models.d.ts +1452 -0
- package/.nx/cache/{3314955264390318442 → 9406544675747598148}/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +866 -632
- package/.nx/cache/9406544675747598148/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
- package/.nx/cache/{3314955264390318442 → 9406544675747598148}/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +170 -130
- package/.nx/cache/run.json +42 -42
- package/.nx/cache/terminalOutputs/{17491371155400585077 → 13466509747676776487} +1 -1
- package/.nx/cache/terminalOutputs/14995846848874973576 +21 -0
- package/.nx/cache/terminalOutputs/{3017748574492080228 → 15149466893522345489} +16 -7
- package/.nx/cache/terminalOutputs/{4082520855419352840 → 15302120112746851896} +1 -1
- package/.nx/cache/terminalOutputs/{8648260256613557249 → 15835338512221847842} +18 -8
- package/.nx/cache/terminalOutputs/17960163310445607219 +6 -0
- package/.nx/cache/terminalOutputs/18393832731522001121 +21 -0
- package/.nx/cache/terminalOutputs/{3314955264390318442 → 5151121439688073678} +6 -6
- package/.nx/cache/terminalOutputs/{12276756491762927325 → 6673686859704879504} +2 -2
- package/.nx/cache/terminalOutputs/7462873189468732296 +17 -0
- package/.nx/cache/terminalOutputs/8032148447904822353 +185 -0
- package/.nx/cache/terminalOutputs/877026836685850193 +21 -0
- package/.nx/cache/terminalOutputs/9406544675747598148 +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 +3962 -0
- package/.nx/workspace-data/d/server-process.json +2 -2
- package/.nx/workspace-data/file-map.json +3102 -3036
- package/.nx/workspace-data/nx_files.nxt +0 -0
- package/.nx/workspace-data/project-graph.json +7 -2
- package/apps/playground/src/app/pages/button-page.ts +5 -3
- package/apps/playground/src/app/pages/feedback-page.ts +1 -1
- package/apps/playground/src/app/pages/home-page.ts +1 -1
- package/apps/playground/src/app/pages/icons-page.ts +3 -3
- package/apps/playground/src/app/pages/lecture-page.ts +3 -3
- package/apps/playground/src/app/pages/models-page.ts +1 -1
- package/apps/playground/src/app/pages/overlay-demos.ts +1 -1
- package/apps/playground/src/app/pages/tokens-page.ts +29 -11
- package/apps/playground/src/app/pages/usecases/onboarding-login.page.ts +1 -1
- package/apps/playground/src/app/pages/usecases/onboarding-reset-password.page.ts +1 -1
- package/apps/playground/src/app/pages/usecases/shipment-detail.page.ts +1 -1
- package/apps/playground/src/app/pages/viewport-preview.component.ts +1 -1
- package/apps/playground/src/app/snippets/button.snippets.ts +4 -3
- package/apps/playground/src/app/snippets/filters.snippets.ts +10 -0
- package/apps/playground/src/index.html +6 -0
- package/apps/playground/src/styles.css +4 -5
- package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +131 -8
- package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -1
- package/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +8 -6
- package/dist/libs/africanies-icons/assets/icons.sprite.svg +7 -0
- package/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs +1 -0
- package/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs.map +1 -1
- package/dist/libs/africanies-icons/types/africanies-africanies-icons.d.ts +2 -2
- package/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs +22 -8
- package/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs.map +1 -1
- package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +30 -8
- package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -1
- package/dist/libs/africanies-theme/tailwind-preset.cjs +89 -12
- package/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +14 -4
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +765 -615
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -1
- package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +148 -115
- package/libs/africanies-core/src/index.ts +1 -0
- package/libs/africanies-core/src/lib/notification/index.ts +1 -1
- package/libs/africanies-core/src/lib/notification/notification-link.spec.ts +40 -7
- package/libs/africanies-core/src/lib/notification/notification-link.ts +143 -7
- package/libs/africanies-icons/src/assets/icons.sprite.svg +7 -0
- package/libs/africanies-icons/src/lib/icon-name.ts +1 -0
- package/libs/africanies-models/src/lib/filters/configs/seed-configs.ts +22 -8
- package/libs/africanies-theme/src/lib/mode-color.safelist.ts +20 -2
- package/libs/africanies-theme/src/lib/mode-color.service.spec.ts +55 -0
- package/libs/africanies-theme/src/lib/mode-color.service.ts +23 -7
- package/libs/africanies-theme/tailwind-preset.cjs +89 -12
- package/libs/africanies-ui/src/lib/action-menu/action-menu.component.ts +3 -3
- package/libs/africanies-ui/src/lib/alert/alert.component.ts +4 -4
- package/libs/africanies-ui/src/lib/avatar/avatar-menu.component.ts +2 -2
- package/libs/africanies-ui/src/lib/button/button.component.spec.ts +7 -7
- package/libs/africanies-ui/src/lib/button/button.component.ts +10 -6
- package/libs/africanies-ui/src/lib/chip/chip.component.ts +4 -4
- package/libs/africanies-ui/src/lib/content-stack/content-stack.component.ts +1 -1
- package/libs/africanies-ui/src/lib/feedback/empty-state.component.ts +1 -1
- package/libs/africanies-ui/src/lib/feedback/error-indicator.component.ts +3 -3
- package/libs/africanies-ui/src/lib/feedback/error-state.component.ts +3 -3
- package/libs/africanies-ui/src/lib/filters/filter-drawer.panel.ts +44 -27
- package/libs/africanies-ui/src/lib/forms/checkbox/checkbox.component.ts +2 -1
- package/libs/africanies-ui/src/lib/forms/file-upload/file-preview.dialog.ts +2 -2
- package/libs/africanies-ui/src/lib/forms/file-upload/file-upload.component.ts +5 -5
- package/libs/africanies-ui/src/lib/forms/form-field.classes.ts +37 -7
- package/libs/africanies-ui/src/lib/forms/otp-input/otp-input.component.ts +2 -1
- package/libs/africanies-ui/src/lib/forms/radio/radio.component.ts +2 -1
- package/libs/africanies-ui/src/lib/forms/select/select.component.ts +2 -2
- package/libs/africanies-ui/src/lib/forms/toggle/toggle.component.ts +1 -1
- package/libs/africanies-ui/src/lib/image/image.component.ts +1 -1
- package/libs/africanies-ui/src/lib/info-popover/info-popover.component.ts +2 -2
- package/libs/africanies-ui/src/lib/layout/app-shell-content-header.component.ts +1 -1
- package/libs/africanies-ui/src/lib/layout/app-shell-header.component.ts +6 -6
- package/libs/africanies-ui/src/lib/layout/app-shell.component.html +2 -2
- package/libs/africanies-ui/src/lib/layout/app-shell.component.ts +5 -5
- package/libs/africanies-ui/src/lib/navigation/shipping-mode-switch/shipping-mode-switch.component.ts +4 -4
- package/libs/africanies-ui/src/lib/navigation/side-nav/africanies-side-nav.component.html +21 -13
- package/libs/africanies-ui/src/lib/navigation/side-nav/africanies-side-nav.component.ts +23 -13
- package/libs/africanies-ui/src/lib/notifications/notification-drawer.panel.ts +27 -14
- package/libs/africanies-ui/src/lib/overlay/confirm-dialog.component.ts +2 -2
- package/libs/africanies-ui/src/lib/overlay/drawer.service.ts +3 -3
- package/libs/africanies-ui/src/lib/overlay/modal.service.ts +4 -4
- package/libs/africanies-ui/src/lib/overlay/overlay-frame.component.ts +1 -1
- package/libs/africanies-ui/src/lib/pagination/pagination.component.ts +4 -4
- package/libs/africanies-ui/src/lib/stepper/stepper.component.ts +7 -7
- package/libs/africanies-ui/src/lib/table/table-column.ts +9 -0
- package/libs/africanies-ui/src/lib/table/table.component.spec.ts +99 -0
- package/libs/africanies-ui/src/lib/table/table.component.ts +75 -33
- package/libs/africanies-ui/src/lib/toast/toast-host.component.ts +4 -4
- package/libs/africanies-ui/src/lib/toast/toast-item.component.ts +7 -7
- package/package.json +1 -1
- package/svg/hand-coins.svg +9 -0
- package/.nx/cache/12276756491762927325/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +0 -1
- package/.nx/cache/17491371155400585077/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +0 -1
- package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +0 -1
- package/.nx/cache/3314955264390318442/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +0 -1
- package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +0 -1
- package/.nx/cache/terminalOutputs/17499961385238663835 +0 -21
- /package/.nx/cache/{17491371155400585077 → 13466509747676776487}/dist/libs/africanies-core/README.md +0 -0
- /package/.nx/cache/{17491371155400585077 → 13466509747676776487}/dist/libs/africanies-core/package.json +0 -0
- /package/.nx/cache/{17499961385238663835 → 14995846848874973576}/dist/libs/africanies-ui/README.md +0 -0
- /package/.nx/cache/{17499961385238663835 → 14995846848874973576}/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- /package/.nx/cache/{17499961385238663835 → 14995846848874973576}/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- /package/.nx/cache/{17499961385238663835 → 14995846848874973576}/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +0 -0
- /package/.nx/cache/{17499961385238663835 → 14995846848874973576}/dist/libs/africanies-ui/assets/carriers/dhl.svg +0 -0
- /package/.nx/cache/{17499961385238663835 → 14995846848874973576}/dist/libs/africanies-ui/package.json +0 -0
- /package/.nx/cache/{12276756491762927325 → 15302120112746851896}/dist/libs/africanies-theme/README.md +0 -0
- /package/.nx/cache/{12276756491762927325 → 15302120112746851896}/dist/libs/africanies-theme/package.json +0 -0
- /package/.nx/cache/{4082520855419352840 → 6673686859704879504}/dist/libs/africanies-theme/README.md +0 -0
- /package/.nx/cache/{4082520855419352840 → 6673686859704879504}/dist/libs/africanies-theme/package.json +0 -0
- /package/.nx/cache/{3314955264390318442 → 9406544675747598148}/dist/libs/africanies-ui/README.md +0 -0
- /package/.nx/cache/{3314955264390318442 → 9406544675747598148}/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- /package/.nx/cache/{3314955264390318442 → 9406544675747598148}/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- /package/.nx/cache/{3314955264390318442 → 9406544675747598148}/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +0 -0
- /package/.nx/cache/{3314955264390318442 → 9406544675747598148}/dist/libs/africanies-ui/assets/carriers/dhl.svg +0 -0
- /package/.nx/cache/{3314955264390318442 → 9406544675747598148}/dist/libs/africanies-ui/package.json +0 -0
- /package/.nx/cache/terminalOutputs/{16279119293212733518 → 14005735098959303198} +0 -0
- /package/.nx/cache/terminalOutputs/{7126777490381568487 → 1446890025183346611} +0 -0
- /package/.nx/cache/terminalOutputs/{9408529484792607601 → 6337357866566791975} +0 -0
|
Binary file
|
|
@@ -826,7 +826,7 @@
|
|
|
826
826
|
"targetGroups": {},
|
|
827
827
|
"js": {
|
|
828
828
|
"packageName": "@africanies/angular-web-sdk",
|
|
829
|
-
"packageVersion": "0.1.
|
|
829
|
+
"packageVersion": "0.1.8",
|
|
830
830
|
"isInPackageManagerWorkspaces": true
|
|
831
831
|
}
|
|
832
832
|
},
|
|
@@ -17328,6 +17328,11 @@
|
|
|
17328
17328
|
"target": "africanies-storage",
|
|
17329
17329
|
"type": "static"
|
|
17330
17330
|
},
|
|
17331
|
+
{
|
|
17332
|
+
"source": "africanies-theme",
|
|
17333
|
+
"target": "africanies-models",
|
|
17334
|
+
"type": "static"
|
|
17335
|
+
},
|
|
17331
17336
|
{
|
|
17332
17337
|
"source": "africanies-theme",
|
|
17333
17338
|
"target": "npm:jest-preset-angular",
|
|
@@ -42090,5 +42095,5 @@
|
|
|
42090
42095
|
},
|
|
42091
42096
|
"version": "6.0",
|
|
42092
42097
|
"errors": [],
|
|
42093
|
-
"computedAt":
|
|
42098
|
+
"computedAt": 1788654115229
|
|
42094
42099
|
}
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
<app-demo-section
|
|
49
49
|
title="Variants"
|
|
50
50
|
hint="Pick the visual weight for the action. Primary and ghost-primary are mode-colored — flip STN/SFN in the sidebar to see them change."
|
|
51
|
-
badge="
|
|
51
|
+
badge="8"
|
|
52
52
|
[code]="variantsCode"
|
|
53
53
|
>
|
|
54
54
|
<div class="flex flex-wrap items-end gap-6">
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
<africanies-icon name="airplane" [size]="16" />
|
|
114
114
|
Create shipment
|
|
115
115
|
</button>
|
|
116
|
-
<button africanies-button type="button" variant="
|
|
116
|
+
<button africanies-button type="button" variant="flat">
|
|
117
117
|
<africanies-icon name="adjust" [size]="16" />
|
|
118
118
|
Filters
|
|
119
119
|
</button>
|
|
@@ -216,7 +216,7 @@ import {
|
|
|
216
216
|
<p class="m-0 text-caption text-neutral-600">Draft · Lagos → London</p>
|
|
217
217
|
</div>
|
|
218
218
|
<div class="flex flex-wrap gap-2">
|
|
219
|
-
<button africanies-button type="button" variant="
|
|
219
|
+
<button africanies-button type="button" variant="flat" size="sm">Cancel</button>
|
|
220
220
|
<button africanies-button type="button" variant="secondary" size="sm">Save draft</button>
|
|
221
221
|
<button africanies-button type="button" variant="primary" size="sm">Submit</button>
|
|
222
222
|
</div>
|
|
@@ -229,6 +229,7 @@ export class ButtonPage {
|
|
|
229
229
|
protected readonly variants: ButtonVariant[] = [
|
|
230
230
|
'primary',
|
|
231
231
|
'secondary',
|
|
232
|
+
'flat',
|
|
232
233
|
'ghost',
|
|
233
234
|
'ghost-primary',
|
|
234
235
|
'ghost-danger',
|
|
@@ -239,6 +240,7 @@ export class ButtonPage {
|
|
|
239
240
|
protected readonly labels: Record<ButtonVariant, string> = {
|
|
240
241
|
primary: 'Save shipment',
|
|
241
242
|
secondary: 'Save draft',
|
|
243
|
+
flat: 'Filters',
|
|
242
244
|
ghost: 'Cancel',
|
|
243
245
|
'ghost-primary': 'Add row',
|
|
244
246
|
'ghost-danger': 'Remove',
|
|
@@ -230,7 +230,7 @@ const SUCCESS_ROWS: DemoShipment[] = [
|
|
|
230
230
|
class="rounded-md px-3 py-1.5 text-body-sm transition-colors duration-150"
|
|
231
231
|
[class]="
|
|
232
232
|
demo() === kind
|
|
233
|
-
? 'bg-white text-ink shadow-sm dark:bg-ink dark:text-white'
|
|
233
|
+
? 'bg-white text-ink shadow-sm dark:bg-ink-950 dark:text-white'
|
|
234
234
|
: 'text-neutral-600 hover:text-ink dark:text-neutral-400 dark:hover:text-white'
|
|
235
235
|
"
|
|
236
236
|
[attr.aria-selected]="demo() === kind"
|
|
@@ -94,7 +94,7 @@ interface CatalogCard {
|
|
|
94
94
|
@for (card of cards; track card.path) {
|
|
95
95
|
<a
|
|
96
96
|
[routerLink]="card.path"
|
|
97
|
-
class="flex flex-col gap-4 rounded-xl border border-border bg-white p-5 no-underline transition-colors hover:border-neutral-400 dark:border-white/10 dark:bg-ink dark:hover:border-white/25"
|
|
97
|
+
class="flex flex-col gap-4 rounded-xl border border-border bg-white p-5 no-underline transition-colors hover:border-neutral-400 dark:border-white/10 dark:bg-ink-950 dark:hover:border-white/25"
|
|
98
98
|
>
|
|
99
99
|
<div class="flex items-center justify-between">
|
|
100
100
|
<span
|
|
@@ -38,7 +38,7 @@ import { ICONS_USAGE } from '../snippets';
|
|
|
38
38
|
@for (sample of samples; track sample) {
|
|
39
39
|
<button
|
|
40
40
|
type="button"
|
|
41
|
-
class="inline-flex items-center justify-center rounded-lg border border-border bg-white p-2.5 transition hover:border-neutral-400 dark:border-white/10 dark:bg-ink dark:hover:border-white/25"
|
|
41
|
+
class="inline-flex items-center justify-center rounded-lg border border-border bg-white p-2.5 transition hover:border-neutral-400 dark:border-white/10 dark:bg-ink-950 dark:hover:border-white/25"
|
|
42
42
|
[attr.aria-label]="'Copy snippet for ' + sample"
|
|
43
43
|
[title]="'Copy <africanies-icon name="' + sample + '" />'"
|
|
44
44
|
(click)="copySnippet(sample)"
|
|
@@ -55,7 +55,7 @@ import { ICONS_USAGE } from '../snippets';
|
|
|
55
55
|
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
|
56
56
|
<input
|
|
57
57
|
type="search"
|
|
58
|
-
class="w-full max-w-md rounded-xl border border-border bg-white px-4 py-2.5 text-body text-ink outline-none ring-export/30 transition focus:ring-2 dark:border-white/15 dark:bg-ink dark:text-white"
|
|
58
|
+
class="w-full max-w-md rounded-xl border border-border bg-white px-4 py-2.5 text-body text-ink outline-none ring-export/30 transition focus:ring-2 dark:border-white/15 dark:bg-ink-950 dark:text-white"
|
|
59
59
|
placeholder="Filter by name…"
|
|
60
60
|
[value]="query()"
|
|
61
61
|
(input)="query.set($any($event.target).value)"
|
|
@@ -77,7 +77,7 @@ import { ICONS_USAGE } from '../snippets';
|
|
|
77
77
|
@for (name of filtered(); track name) {
|
|
78
78
|
<button
|
|
79
79
|
type="button"
|
|
80
|
-
class="group flex flex-col items-center gap-2.5 rounded-xl border border-border bg-white px-2 py-3.5 text-ink transition duration-150 hover:-translate-y-0.5 hover:border-neutral-400 hover:shadow-sm dark:border-white/10 dark:bg-ink dark:text-white dark:hover:border-white/25"
|
|
80
|
+
class="group flex flex-col items-center gap-2.5 rounded-xl border border-border bg-white px-2 py-3.5 text-ink transition duration-150 hover:-translate-y-0.5 hover:border-neutral-400 hover:shadow-sm dark:border-white/10 dark:bg-ink-950 dark:text-white dark:hover:border-white/25"
|
|
81
81
|
[attr.aria-label]="'Copy snippet for ' + name"
|
|
82
82
|
[title]="'Copy <africanies-icon name="' + name + '" />'"
|
|
83
83
|
(click)="copySnippet(name)"
|
|
@@ -42,7 +42,7 @@ import { PageHeaderComponent } from '../shared/page-header.component';
|
|
|
42
42
|
/>
|
|
43
43
|
|
|
44
44
|
<section
|
|
45
|
-
class="rounded-xl border border-border bg-white p-5 dark:border-white/10 dark:bg-ink sm:p-6"
|
|
45
|
+
class="rounded-xl border border-border bg-white p-5 dark:border-white/10 dark:bg-ink-950 sm:p-6"
|
|
46
46
|
>
|
|
47
47
|
<h2 class="m-0 text-heading-3 text-ink dark:text-white">
|
|
48
48
|
Category abbreviations
|
|
@@ -75,7 +75,7 @@ import { PageHeaderComponent } from '../shared/page-header.component';
|
|
|
75
75
|
</section>
|
|
76
76
|
|
|
77
77
|
<section
|
|
78
|
-
class="rounded-xl border border-border bg-white p-5 dark:border-white/10 dark:bg-ink sm:p-6"
|
|
78
|
+
class="rounded-xl border border-border bg-white p-5 dark:border-white/10 dark:bg-ink-950 sm:p-6"
|
|
79
79
|
>
|
|
80
80
|
<h2 class="m-0 text-heading-3 text-ink dark:text-white">On this page</h2>
|
|
81
81
|
<p class="mt-2 mb-4 text-body-sm text-neutral-600 dark:text-neutral-400">
|
|
@@ -114,7 +114,7 @@ import { PageHeaderComponent } from '../shared/page-header.component';
|
|
|
114
114
|
@for (entry of entriesFor(category); track entry.id) {
|
|
115
115
|
<article
|
|
116
116
|
[id]="entry.id"
|
|
117
|
-
class="scroll-mt-24 rounded-xl border border-border bg-white p-5 dark:border-white/10 dark:bg-ink sm:p-6"
|
|
117
|
+
class="scroll-mt-24 rounded-xl border border-border bg-white p-5 dark:border-white/10 dark:bg-ink-950 sm:p-6"
|
|
118
118
|
[class.ring-2]="activeId() === entry.id"
|
|
119
119
|
[class.ring-export]="activeId() === entry.id"
|
|
120
120
|
>
|
|
@@ -96,7 +96,7 @@ interface ModelCategory {
|
|
|
96
96
|
<div class="grid gap-4">
|
|
97
97
|
@for (entry of group.models; track entry.name) {
|
|
98
98
|
<article
|
|
99
|
-
class="flex flex-col gap-3 rounded-xl border border-border bg-white p-4 dark:border-white/10 dark:bg-ink sm:p-5"
|
|
99
|
+
class="flex flex-col gap-3 rounded-xl border border-border bg-white p-4 dark:border-white/10 dark:bg-ink-950 sm:p-5"
|
|
100
100
|
>
|
|
101
101
|
<div
|
|
102
102
|
class="flex flex-wrap items-baseline justify-between gap-2"
|
|
@@ -60,7 +60,7 @@ export interface DemoDrawerData {
|
|
|
60
60
|
Note
|
|
61
61
|
</span>
|
|
62
62
|
<input
|
|
63
|
-
class="rounded-md border border-border bg-white px-3 py-2 text-body text-ink outline-none focus:border-neutral-400 dark:border-white/15 dark:bg-ink dark:text-white"
|
|
63
|
+
class="rounded-md border border-border bg-white px-3 py-2 text-body text-ink outline-none focus:border-neutral-400 dark:border-white/15 dark:bg-ink-950 dark:text-white"
|
|
64
64
|
type="text"
|
|
65
65
|
[value]="note"
|
|
66
66
|
(input)="note = $any($event.target).value"
|
|
@@ -65,7 +65,7 @@ interface TokenSwatch {
|
|
|
65
65
|
class="h-20 border-b border-border dark:border-white/10"
|
|
66
66
|
[class]="token.bgClass"
|
|
67
67
|
></div>
|
|
68
|
-
<div class="bg-white px-3 py-2.5 dark:bg-ink">
|
|
68
|
+
<div class="bg-white px-3 py-2.5 dark:bg-ink-surface">
|
|
69
69
|
<p class="m-0 text-body-sm font-medium text-ink dark:text-white">
|
|
70
70
|
{{ token.name }}
|
|
71
71
|
</p>
|
|
@@ -177,34 +177,52 @@ export class TokensPage {
|
|
|
177
177
|
protected readonly colors: TokenSwatch[] = [
|
|
178
178
|
{ name: 'black', bgClass: 'bg-black', hex: '#000000', group: 'Core' },
|
|
179
179
|
{ name: 'white', bgClass: 'bg-white', hex: '#ffffff', group: 'Core' },
|
|
180
|
-
{ name: 'ink', bgClass: 'bg-ink', hex: '#
|
|
180
|
+
{ name: 'ink', bgClass: 'bg-ink', hex: '#172033', group: 'Core' },
|
|
181
181
|
{ name: 'ink-blue', bgClass: 'bg-ink-blue', hex: '#192a3e', group: 'Core' },
|
|
182
|
-
{ name: 'ink-brand', bgClass: 'bg-ink-brand', hex: '#
|
|
182
|
+
{ name: 'ink-brand', bgClass: 'bg-ink-brand', hex: '#172033', group: 'Core' },
|
|
183
|
+
{ name: 'ink-surface', bgClass: 'bg-ink-surface', hex: '#212529', group: 'Core' },
|
|
183
184
|
{ name: 'ink-950', bgClass: 'bg-ink-950', hex: '#272729', group: 'Core' },
|
|
184
|
-
{ name: '
|
|
185
|
-
{ name: 'neutral-
|
|
186
|
-
{ name: 'neutral-600', bgClass: 'bg-neutral-600', hex: '#
|
|
187
|
-
{ name: 'border', bgClass: 'bg-border', hex: '#
|
|
185
|
+
{ name: 'surface', bgClass: 'bg-surface', hex: '#ffffff', group: 'Neutral' },
|
|
186
|
+
{ name: 'neutral-500', bgClass: 'bg-neutral-500', hex: '#667185', group: 'Neutral' },
|
|
187
|
+
{ name: 'neutral-600', bgClass: 'bg-neutral-600', hex: '#526071', group: 'Neutral' },
|
|
188
|
+
{ name: 'border', bgClass: 'bg-border', hex: '#dde3ea', group: 'Neutral' },
|
|
189
|
+
{ name: 'border-strong', bgClass: 'bg-border-strong', hex: '#c4cdd8', group: 'Neutral' },
|
|
190
|
+
{ name: 'control', bgClass: 'bg-control', hex: '#8793a3', group: 'Neutral' },
|
|
191
|
+
{ name: 'focus', bgClass: 'bg-focus', hex: '#175cd3', group: 'Neutral' },
|
|
192
|
+
{
|
|
193
|
+
name: 'background-chrome',
|
|
194
|
+
bgClass: 'bg-background-chrome',
|
|
195
|
+
hex: '#f4f6f8',
|
|
196
|
+
group: 'Neutral',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: 'background-well',
|
|
200
|
+
bgClass: 'bg-background-well',
|
|
201
|
+
hex: '#eef2f6',
|
|
202
|
+
group: 'Neutral',
|
|
203
|
+
},
|
|
188
204
|
{
|
|
189
205
|
name: 'background-welcome',
|
|
190
206
|
bgClass: 'bg-background-welcome',
|
|
191
|
-
hex: '#
|
|
207
|
+
hex: '#f8fafc',
|
|
192
208
|
group: 'Neutral',
|
|
193
209
|
},
|
|
194
210
|
{ name: 'export', bgClass: 'bg-export', hex: '#1cbd5d', group: 'Export (SFN)' },
|
|
211
|
+
{ name: 'export-strong', bgClass: 'bg-export-strong', hex: '#0b7a3e', group: 'Export (SFN)' },
|
|
195
212
|
{ name: 'export-light', bgClass: 'bg-export-light', hex: '#24dc6d', group: 'Export (SFN)' },
|
|
196
213
|
{ name: 'export-subtle', bgClass: 'bg-export-subtle', hex: '#e4fff3', group: 'Export (SFN)' },
|
|
197
|
-
{ name: 'export-tint', bgClass: 'bg-export-tint', hex: '#f2fff8', group: 'Export (SFN)' },
|
|
198
214
|
{ name: 'import', bgClass: 'bg-import', hex: '#f08829', group: 'Import (STN)' },
|
|
215
|
+
{ name: 'import-strong', bgClass: 'bg-import-strong', hex: '#9a4b0b', group: 'Import (STN)' },
|
|
199
216
|
{ name: 'import-light', bgClass: 'bg-import-light', hex: '#ffa95b', group: 'Import (STN)' },
|
|
200
217
|
{ name: 'import-subtle', bgClass: 'bg-import-subtle', hex: '#fffcef', group: 'Import (STN)' },
|
|
201
218
|
{ name: 'danger', bgClass: 'bg-danger', hex: '#ff001c', group: 'Feedback' },
|
|
202
|
-
{ name: 'danger-dark', bgClass: 'bg-danger-dark', hex: '#
|
|
219
|
+
{ name: 'danger-dark', bgClass: 'bg-danger-dark', hex: '#b4233c', group: 'Feedback' },
|
|
203
220
|
{ name: 'danger-strong', bgClass: 'bg-danger-strong', hex: '#C00B19', group: 'Feedback' },
|
|
204
221
|
{ name: 'danger-subtle', bgClass: 'bg-danger-subtle', hex: '#FFF2F2', group: 'Feedback' },
|
|
205
222
|
{ name: 'warning', bgClass: 'bg-warning', hex: '#DBB316', group: 'Feedback' },
|
|
206
|
-
{ name: 'warning-dark', bgClass: 'bg-warning-dark', hex: '#
|
|
223
|
+
{ name: 'warning-dark', bgClass: 'bg-warning-dark', hex: '#8a5a00', group: 'Feedback' },
|
|
207
224
|
{ name: 'warning-subtle', bgClass: 'bg-warning-subtle', hex: '#FFF6E6', group: 'Feedback' },
|
|
225
|
+
{ name: 'info', bgClass: 'bg-info', hex: '#175cd3', group: 'Feedback' },
|
|
208
226
|
];
|
|
209
227
|
|
|
210
228
|
protected colorsIn(group: string): TokenSwatch[] {
|
|
@@ -27,7 +27,7 @@ import { PageHeaderComponent } from '../../shared/page-header.component';
|
|
|
27
27
|
/>
|
|
28
28
|
|
|
29
29
|
<form
|
|
30
|
-
class="flex flex-col gap-4 rounded-xl border border-border bg-white p-6 dark:border-white/10 dark:bg-ink"
|
|
30
|
+
class="flex flex-col gap-4 rounded-xl border border-border bg-white p-6 dark:border-white/10 dark:bg-ink-950"
|
|
31
31
|
(submit)="$event.preventDefault()"
|
|
32
32
|
>
|
|
33
33
|
<africanies-text-input
|
|
@@ -36,7 +36,7 @@ import { playgroundErrorMessage } from '../../shared/playground-notify';
|
|
|
36
36
|
/>
|
|
37
37
|
|
|
38
38
|
<form
|
|
39
|
-
class="flex flex-col gap-4 rounded-xl border border-border bg-white p-6 dark:border-white/10 dark:bg-ink"
|
|
39
|
+
class="flex flex-col gap-4 rounded-xl border border-border bg-white p-6 dark:border-white/10 dark:bg-ink-950"
|
|
40
40
|
(submit)="$event.preventDefault(); save()"
|
|
41
41
|
>
|
|
42
42
|
@if (errorMessage(); as err) {
|
|
@@ -36,7 +36,7 @@ import { findUsecaseShipment } from './shipment-data';
|
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
<dl
|
|
39
|
-
class="grid gap-4 rounded-xl border border-border bg-white px-5 py-4 sm:grid-cols-3 dark:border-white/10 dark:bg-ink"
|
|
39
|
+
class="grid gap-4 rounded-xl border border-border bg-white px-5 py-4 sm:grid-cols-3 dark:border-white/10 dark:bg-ink-950"
|
|
40
40
|
>
|
|
41
41
|
<div>
|
|
42
42
|
<dt class="text-caption text-neutral-500">Origin</dt>
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
imports: [AppShellComponent, SideNavComponent],
|
|
20
20
|
template: `
|
|
21
21
|
<div
|
|
22
|
-
class="mx-auto overflow-hidden rounded-xl border border-border bg-white shadow-sm dark:border-white/10 dark:bg-ink"
|
|
22
|
+
class="mx-auto overflow-hidden rounded-xl border border-border bg-white shadow-sm dark:border-white/10 dark:bg-ink-950"
|
|
23
23
|
[class]="frameClass()"
|
|
24
24
|
>
|
|
25
25
|
<africanies-app-shell
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
export /**
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
const BUTTON_VARIANTS = `//
|
|
7
|
-
// from ModeColorService
|
|
8
|
-
// ghost stays neutral (Cancel); ghost-primary is a mode-colored text button.
|
|
6
|
+
const BUTTON_VARIANTS = `// Variants. Primary / ghost-primary / secondary (stroked) pick up SFN green /
|
|
7
|
+
// STN orange from ModeColorService. flat is neutral chrome (Cancel, Filters).
|
|
9
8
|
|
|
10
9
|
import { Component } from '@angular/core';
|
|
11
10
|
import {
|
|
@@ -34,6 +33,7 @@ export class ShipmentActionsComponent {
|
|
|
34
33
|
protected readonly variants: ButtonVariant[] = [
|
|
35
34
|
'primary',
|
|
36
35
|
'secondary',
|
|
36
|
+
'flat',
|
|
37
37
|
'ghost',
|
|
38
38
|
'ghost-primary',
|
|
39
39
|
'ghost-danger',
|
|
@@ -44,6 +44,7 @@ export class ShipmentActionsComponent {
|
|
|
44
44
|
protected readonly labels: Record<ButtonVariant, string> = {
|
|
45
45
|
primary: 'Save shipment',
|
|
46
46
|
secondary: 'Save draft',
|
|
47
|
+
flat: 'Filters',
|
|
47
48
|
ghost: 'Cancel',
|
|
48
49
|
'ghost-primary': 'Add row',
|
|
49
50
|
'ghost-danger': 'Remove',
|
|
@@ -248,6 +248,16 @@ export const updateShipmentsFilterConfig: ModuleFilterConfigModel = {
|
|
|
248
248
|
{ value: '0', label: 'No' },
|
|
249
249
|
],
|
|
250
250
|
},
|
|
251
|
+
{
|
|
252
|
+
key: 'pay_later',
|
|
253
|
+
label: 'Pay Later',
|
|
254
|
+
type: 'enum',
|
|
255
|
+
exclusive: true,
|
|
256
|
+
options: [
|
|
257
|
+
{ value: 'credit', label: 'Credit' },
|
|
258
|
+
{ value: 'debit', label: 'Debit' },
|
|
259
|
+
],
|
|
260
|
+
},
|
|
251
261
|
],
|
|
252
262
|
};
|
|
253
263
|
`;
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
type="image/png"
|
|
15
15
|
href="assets/africanies-ui/brand/africanies-logo-mini.png"
|
|
16
16
|
/>
|
|
17
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
18
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
19
|
+
<link
|
|
20
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
|
|
21
|
+
rel="stylesheet"
|
|
22
|
+
/>
|
|
17
23
|
</head>
|
|
18
24
|
<body>
|
|
19
25
|
<app-root></app-root>
|
|
@@ -12,12 +12,11 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/*
|
|
15
|
-
* Playground light canvas —
|
|
16
|
-
* (#f9fafb) so long catalog sessions feel less glare-y. Demo cards stay white.
|
|
15
|
+
* Playground light canvas — portal page chrome (#f6f7f9). Demo cards stay white.
|
|
17
16
|
*/
|
|
18
17
|
:root {
|
|
19
|
-
--pg-canvas: #
|
|
20
|
-
--pg-chrome: #
|
|
18
|
+
--pg-canvas: #f6f7f9;
|
|
19
|
+
--pg-chrome: #f0f2f5;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
body {
|
|
@@ -229,7 +228,7 @@
|
|
|
229
228
|
}
|
|
230
229
|
|
|
231
230
|
.pg-lecture-scroll-top {
|
|
232
|
-
@apply fixed bottom-6 right-6 z-40 flex size-11 items-center justify-center rounded-full border border-border bg-white text-ink shadow-md hover:border-export hover:text-export dark:border-white/15 dark:bg-ink dark:text-white dark:hover:border-export-light dark:hover:text-export-light;
|
|
231
|
+
@apply fixed bottom-6 right-6 z-40 flex size-11 items-center justify-center rounded-full border border-border bg-white text-ink shadow-md hover:border-export hover:text-export dark:border-white/15 dark:bg-ink-surface dark:text-white dark:hover:border-export-light dark:hover:text-export-light;
|
|
233
232
|
opacity: 0;
|
|
234
233
|
pointer-events: none;
|
|
235
234
|
transform: translateY(1rem) scale(0.92);
|
|
@@ -3765,22 +3765,58 @@ const SHIPMENT_APP_BY_MODE = {
|
|
|
3765
3765
|
stn: 'shiptonaija',
|
|
3766
3766
|
sfn: 'shipfromnaija',
|
|
3767
3767
|
};
|
|
3768
|
+
const QUERY_SHIPMENT_APP = 'shipment_app';
|
|
3769
|
+
const LEGACY_PORTAL_HOST = /^(?:test-)?(?:admin|customer)-(?:export|import)\.africaniestest\.com$/i;
|
|
3770
|
+
/** Signed export downloads and other hosts that must not be rewritten in-app. */
|
|
3771
|
+
function isNotificationExternalLink(link) {
|
|
3772
|
+
const trimmed = decodeNotificationLink(link).trim();
|
|
3773
|
+
if (!trimmed) {
|
|
3774
|
+
return false;
|
|
3775
|
+
}
|
|
3776
|
+
try {
|
|
3777
|
+
const url = new URL(trimmed);
|
|
3778
|
+
if (/\.(xlsx|xls|csv)(\?|$)/i.test(url.pathname)) {
|
|
3779
|
+
return true;
|
|
3780
|
+
}
|
|
3781
|
+
if (/\.amazonaws\.com$/i.test(url.hostname)) {
|
|
3782
|
+
return true;
|
|
3783
|
+
}
|
|
3784
|
+
return !isLegacyPortalHost(url.hostname);
|
|
3785
|
+
}
|
|
3786
|
+
catch {
|
|
3787
|
+
return false;
|
|
3788
|
+
}
|
|
3789
|
+
}
|
|
3768
3790
|
/**
|
|
3769
|
-
* Rewrite a notification
|
|
3791
|
+
* Rewrite a notification href for the active {@link ShippingMode}.
|
|
3770
3792
|
*
|
|
3771
|
-
*
|
|
3772
|
-
*
|
|
3773
|
-
*
|
|
3774
|
-
*
|
|
3793
|
+
* - Export / download URLs (S3, spreadsheets) pass through unchanged (no `shipment_app`).
|
|
3794
|
+
* - Legacy portal hosts become relative `/portal/...` paths with query preserved.
|
|
3795
|
+
* - When the notification already includes `shipment_app`, it is kept as-is.
|
|
3796
|
+
* - Otherwise classic host / `shipment_app` rewriting applies for portal URLs.
|
|
3775
3797
|
*/
|
|
3776
3798
|
function resolveNotificationLinkForMode(link, mode) {
|
|
3777
|
-
const trimmed = asString(link).trim();
|
|
3799
|
+
const trimmed = decodeNotificationLink(asString(link)).trim();
|
|
3778
3800
|
if (!trimmed) {
|
|
3779
3801
|
return trimmed;
|
|
3780
3802
|
}
|
|
3803
|
+
if (isNotificationExternalLink(trimmed)) {
|
|
3804
|
+
return stripShipmentAppFromLink(trimmed);
|
|
3805
|
+
}
|
|
3806
|
+
const relativePortal = toRelativePortalNotificationLink(trimmed);
|
|
3807
|
+
if (relativePortal && hasShipmentAppQuery(relativePortal)) {
|
|
3808
|
+
return relativePortal;
|
|
3809
|
+
}
|
|
3810
|
+
const relative = normalizeRelativePortalLink(trimmed);
|
|
3811
|
+
if (relative && hasShipmentAppQuery(relative)) {
|
|
3812
|
+
return relative;
|
|
3813
|
+
}
|
|
3781
3814
|
try {
|
|
3782
3815
|
const url = new URL(trimmed);
|
|
3783
|
-
url.searchParams.
|
|
3816
|
+
if (url.searchParams.has(QUERY_SHIPMENT_APP)) {
|
|
3817
|
+
return trimmed;
|
|
3818
|
+
}
|
|
3819
|
+
url.searchParams.set(QUERY_SHIPMENT_APP, SHIPMENT_APP_BY_MODE[mode]);
|
|
3784
3820
|
url.hostname = rewriteNotificationHostForMode(url.hostname, mode);
|
|
3785
3821
|
return url.toString();
|
|
3786
3822
|
}
|
|
@@ -3795,6 +3831,9 @@ function rewriteNotificationHostForMode(hostname, mode) {
|
|
|
3795
3831
|
return hostname.replace(/-import/i, '-export');
|
|
3796
3832
|
}
|
|
3797
3833
|
function rewriteNotificationLinkFallback(link, mode) {
|
|
3834
|
+
if (hasShipmentAppQuery(link)) {
|
|
3835
|
+
return link;
|
|
3836
|
+
}
|
|
3798
3837
|
let out = link.replace(/shipment_app=(?:shipfromnaija|shiptonaija)/gi, `shipment_app=${SHIPMENT_APP_BY_MODE[mode]}`);
|
|
3799
3838
|
if (!/shipment_app=/i.test(out)) {
|
|
3800
3839
|
const joiner = out.includes('?') ? '&' : '?';
|
|
@@ -3805,6 +3844,90 @@ function rewriteNotificationLinkFallback(link, mode) {
|
|
|
3805
3844
|
}
|
|
3806
3845
|
return out.replace(/-import/gi, '-export');
|
|
3807
3846
|
}
|
|
3847
|
+
function toRelativePortalNotificationLink(link) {
|
|
3848
|
+
try {
|
|
3849
|
+
const url = new URL(link);
|
|
3850
|
+
if (!isLegacyPortalHost(url.hostname)) {
|
|
3851
|
+
return null;
|
|
3852
|
+
}
|
|
3853
|
+
let path = url.pathname.replace(/^\/+/, '');
|
|
3854
|
+
if (path.startsWith('ng/portal/')) {
|
|
3855
|
+
path = path.slice('ng/'.length);
|
|
3856
|
+
}
|
|
3857
|
+
if (!path.startsWith('portal/') && path !== 'portal') {
|
|
3858
|
+
return null;
|
|
3859
|
+
}
|
|
3860
|
+
const query = url.searchParams.toString();
|
|
3861
|
+
return `/${path}${query ? `?${query}` : ''}`;
|
|
3862
|
+
}
|
|
3863
|
+
catch {
|
|
3864
|
+
return null;
|
|
3865
|
+
}
|
|
3866
|
+
}
|
|
3867
|
+
function normalizeRelativePortalLink(link) {
|
|
3868
|
+
let path = link.split('?')[0]?.split('#')[0] ?? '';
|
|
3869
|
+
const query = link.includes('?') ? link.slice(link.indexOf('?')) : '';
|
|
3870
|
+
path = path.replace(/^\/+/, '');
|
|
3871
|
+
if (path.startsWith('ng/portal/')) {
|
|
3872
|
+
path = path.slice('ng/'.length);
|
|
3873
|
+
}
|
|
3874
|
+
if (!path.startsWith('portal/') && path !== 'portal') {
|
|
3875
|
+
return null;
|
|
3876
|
+
}
|
|
3877
|
+
return `/${path}${query}`;
|
|
3878
|
+
}
|
|
3879
|
+
function stripShipmentAppFromLink(link) {
|
|
3880
|
+
const trimmed = link.trim();
|
|
3881
|
+
if (!trimmed) {
|
|
3882
|
+
return trimmed;
|
|
3883
|
+
}
|
|
3884
|
+
try {
|
|
3885
|
+
const url = new URL(trimmed);
|
|
3886
|
+
if (!url.searchParams.has(QUERY_SHIPMENT_APP)) {
|
|
3887
|
+
return trimmed;
|
|
3888
|
+
}
|
|
3889
|
+
url.searchParams.delete(QUERY_SHIPMENT_APP);
|
|
3890
|
+
return url.toString();
|
|
3891
|
+
}
|
|
3892
|
+
catch {
|
|
3893
|
+
const params = new URLSearchParams(trimmed.includes('?') ? trimmed.slice(trimmed.indexOf('?') + 1) : '');
|
|
3894
|
+
if (!params.has(QUERY_SHIPMENT_APP)) {
|
|
3895
|
+
return trimmed;
|
|
3896
|
+
}
|
|
3897
|
+
params.delete(QUERY_SHIPMENT_APP);
|
|
3898
|
+
const query = params.toString();
|
|
3899
|
+
const base = trimmed.split('?')[0] ?? trimmed;
|
|
3900
|
+
return query ? `${base}?${query}` : base;
|
|
3901
|
+
}
|
|
3902
|
+
}
|
|
3903
|
+
function hasShipmentAppQuery(link) {
|
|
3904
|
+
try {
|
|
3905
|
+
const query = link.includes('?') ? link.slice(link.indexOf('?') + 1) : '';
|
|
3906
|
+
return new URLSearchParams(query).has(QUERY_SHIPMENT_APP);
|
|
3907
|
+
}
|
|
3908
|
+
catch {
|
|
3909
|
+
return /(?:^|[?&])shipment_app=/i.test(link);
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
function decodeNotificationLink(link) {
|
|
3913
|
+
let value = (link ?? '').trim();
|
|
3914
|
+
if (!value.includes('%')) {
|
|
3915
|
+
return value;
|
|
3916
|
+
}
|
|
3917
|
+
try {
|
|
3918
|
+
const decoded = decodeURIComponent(value);
|
|
3919
|
+
if (decoded !== value) {
|
|
3920
|
+
value = decoded;
|
|
3921
|
+
}
|
|
3922
|
+
}
|
|
3923
|
+
catch {
|
|
3924
|
+
// Keep original when not valid URI encoding.
|
|
3925
|
+
}
|
|
3926
|
+
return value;
|
|
3927
|
+
}
|
|
3928
|
+
function isLegacyPortalHost(hostname) {
|
|
3929
|
+
return LEGACY_PORTAL_HOST.test(hostname);
|
|
3930
|
+
}
|
|
3808
3931
|
|
|
3809
3932
|
/**
|
|
3810
3933
|
* File utility reads (`POST /file/read`).
|
|
@@ -4507,5 +4630,5 @@ function downloadCsv(options) {
|
|
|
4507
4630
|
* Generated bundle index. Do not edit.
|
|
4508
4631
|
*/
|
|
4509
4632
|
|
|
4510
|
-
export { AFRICANIES_HTTP_TOAST, AFRICANIES_SDK_CONFIG, AUTH_FORGOT_PASSWORD_PATH, ApiClient, AuthService, AuthTokenService, COUNTRY_FLAG_CDN_BASE, COUNTRY_READ_PATH, CURRENCY_CREATE_PATH, CURRENCY_DELETE_PATH, CURRENCY_READ_PATH, CURRENCY_UPDATE_PATH, CountryService, CurrencyService, DOCUMENT_READ_PATH, DRAWER_SERVICE, DocumentService, FILE_READ_MULTIPLE_PARAM, FILE_READ_PATH, FileService, FilterOptionsResolver, HttpResponseCache, MODAL_SERVICE, MODE_CONFIG_PATH, ModeConfigService, NOTIFICATION_READ_PATH, NOTIFICATION_UPDATE_PATH, NotificationService, OVERLAY_ROUTE_CONFIGS, PAYMENT_METHOD_READ_PATH, PAYMENT_METHOD_UPDATE_PATH, PLAN_READ_PATH, PRODUCT_READ_PATH, PaymentMethodService, PlanService, ProductService, RouteOverlayService, SERVICE_READ_PATH, SHIPMENT_METHOD_READ_PATH, SHIPPING_MODE_OVERRIDE, ServiceService, ShipmentMethodService, ShippingModeService, TOAST_HTTP_OPTIONS, USER_CHANGE_PASSWORD_PATH, USER_LOGOUT_FROM_ALL_SESSIONS_PATH, USER_PATH, UserService, WAREHOUSE_READ_PATH, WarehouseService, ZONE_READ_PATH, ZoneService, asArray, asBoolean, asNullableBoolean, asNullableFlag01, asNullableNumber, asNullableString, asNumber, asRecord, asShippingMode$1 as asShippingMode, asString, authInterceptor, buildResourcePath, buildResourceQueryParams, collectFilterOptionsSources, collectResolvableSelectFields, copyToClipboard, countryFlagUrl, createAfricaniesQueryClientDefaults, csvCell, downloadCsv, fieldErrorsMap, formatApiErrorMessage, httpToastInterceptor, isLaravelValidationBag, isValidEmail, joinApiErrorMessages, listFetchKind, mapApiJsonList, mapApiJsonValue, mapArray, mapCountry, mapCountryList, mapCountrySelectOptions, mapCountryState, mapCurrency, mapCurrencyList, mapCurrencyPaymentMethod, mapCurrencyPaymentMethodPivot, mapDocument, mapDocumentList, mapFileRead, mapFileReadList, mapLaravelValidationBag, mapList, mapModeConfigData, mapNotification, mapNotificationInboxItem, mapNotificationList, mapNotificationPayload, mapPaymentMethod, mapPaymentMethodCurrency, mapPaymentMethodList, mapPlan, mapPlanList, mapPlanPackage, mapProduct, mapProductList, mapResourcePayload, mapService, mapServiceList, mapShipmentMethod, mapShipmentMethodFilterOptions, mapShipmentMethodList, mapShipmentMethodZoneLink, mapShipmentMethodZonePage, mapShipmentZone, mapUser, mapUserAccountManager, mapUserBusinessAccount, mapUserCountry, mapUserCountryState, mapUserGatewayPayload, mapUserPaymentPayload, mapUserPlan, mapUserPlanPackage, mapUserStateLabel, mapUserSubscription, mapWarehouse, mapWarehouseCountry, mapWarehouseFilterOptions, mapWarehouseList, mapWarehouseState, mapZone, mapZoneList, mergeFilterOptionLists, normalize, normalizePagination, provideAfricaniesHttpClient, provideAfricaniesQueryDefaults, provideAfricaniesSdk, provideModeConfig, provideOverlayRoutes, resolveModeRegionConfig, resolveNotificationLinkForMode, resourceCacheTtlMs, shipmentModeInterceptor, toCsvString, toCurrencyCreateBody, toCurrencyDeleteBody, toCurrencyFlag01, toCurrencyUpdateBody, toFlag01, toPaymentMethodFlag01, toPaymentMethodUpdateBody, unwrapLaravelPaginator, withShippingMode, withToast };
|
|
4633
|
+
export { AFRICANIES_HTTP_TOAST, AFRICANIES_SDK_CONFIG, AUTH_FORGOT_PASSWORD_PATH, ApiClient, AuthService, AuthTokenService, COUNTRY_FLAG_CDN_BASE, COUNTRY_READ_PATH, CURRENCY_CREATE_PATH, CURRENCY_DELETE_PATH, CURRENCY_READ_PATH, CURRENCY_UPDATE_PATH, CountryService, CurrencyService, DOCUMENT_READ_PATH, DRAWER_SERVICE, DocumentService, FILE_READ_MULTIPLE_PARAM, FILE_READ_PATH, FileService, FilterOptionsResolver, HttpResponseCache, MODAL_SERVICE, MODE_CONFIG_PATH, ModeConfigService, NOTIFICATION_READ_PATH, NOTIFICATION_UPDATE_PATH, NotificationService, OVERLAY_ROUTE_CONFIGS, PAYMENT_METHOD_READ_PATH, PAYMENT_METHOD_UPDATE_PATH, PLAN_READ_PATH, PRODUCT_READ_PATH, PaymentMethodService, PlanService, ProductService, RouteOverlayService, SERVICE_READ_PATH, SHIPMENT_METHOD_READ_PATH, SHIPPING_MODE_OVERRIDE, ServiceService, ShipmentMethodService, ShippingModeService, TOAST_HTTP_OPTIONS, USER_CHANGE_PASSWORD_PATH, USER_LOGOUT_FROM_ALL_SESSIONS_PATH, USER_PATH, UserService, WAREHOUSE_READ_PATH, WarehouseService, ZONE_READ_PATH, ZoneService, asArray, asBoolean, asNullableBoolean, asNullableFlag01, asNullableNumber, asNullableString, asNumber, asRecord, asShippingMode$1 as asShippingMode, asString, authInterceptor, buildResourcePath, buildResourceQueryParams, collectFilterOptionsSources, collectResolvableSelectFields, copyToClipboard, countryFlagUrl, createAfricaniesQueryClientDefaults, csvCell, downloadCsv, fieldErrorsMap, formatApiErrorMessage, httpToastInterceptor, isLaravelValidationBag, isNotificationExternalLink, isValidEmail, joinApiErrorMessages, listFetchKind, mapApiJsonList, mapApiJsonValue, mapArray, mapCountry, mapCountryList, mapCountrySelectOptions, mapCountryState, mapCurrency, mapCurrencyList, mapCurrencyPaymentMethod, mapCurrencyPaymentMethodPivot, mapDocument, mapDocumentList, mapFileRead, mapFileReadList, mapLaravelValidationBag, mapList, mapModeConfigData, mapNotification, mapNotificationInboxItem, mapNotificationList, mapNotificationPayload, mapPaymentMethod, mapPaymentMethodCurrency, mapPaymentMethodList, mapPlan, mapPlanList, mapPlanPackage, mapProduct, mapProductList, mapResourcePayload, mapService, mapServiceList, mapShipmentMethod, mapShipmentMethodFilterOptions, mapShipmentMethodList, mapShipmentMethodZoneLink, mapShipmentMethodZonePage, mapShipmentZone, mapUser, mapUserAccountManager, mapUserBusinessAccount, mapUserCountry, mapUserCountryState, mapUserGatewayPayload, mapUserPaymentPayload, mapUserPlan, mapUserPlanPackage, mapUserStateLabel, mapUserSubscription, mapWarehouse, mapWarehouseCountry, mapWarehouseFilterOptions, mapWarehouseList, mapWarehouseState, mapZone, mapZoneList, mergeFilterOptionLists, normalize, normalizePagination, provideAfricaniesHttpClient, provideAfricaniesQueryDefaults, provideAfricaniesSdk, provideModeConfig, provideOverlayRoutes, resolveModeRegionConfig, resolveNotificationLinkForMode, resourceCacheTtlMs, shipmentModeInterceptor, toCsvString, toCurrencyCreateBody, toCurrencyDeleteBody, toCurrencyFlag01, toCurrencyUpdateBody, toFlag01, toPaymentMethodFlag01, toPaymentMethodUpdateBody, unwrapLaravelPaginator, withShippingMode, withToast };
|
|
4511
4634
|
//# sourceMappingURL=africanies-africanies-core.mjs.map
|