@africanies/angular-web-sdk 0.1.3 → 0.1.4

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.
Files changed (42) hide show
  1. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/README.md +68 -0
  2. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
  3. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
  4. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +5 -0
  5. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/assets/carriers/dhl.svg +7 -0
  6. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +19375 -0
  7. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
  8. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/package.json +35 -0
  9. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +5490 -0
  10. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/README.md +46 -0
  11. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +221 -0
  12. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
  13. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/package.json +35 -0
  14. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/tailwind-preset.cjs +253 -0
  15. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +166 -0
  16. package/.nx/cache/run.json +36 -36
  17. package/.nx/cache/terminalOutputs/16279119293212733518 +6 -0
  18. package/.nx/cache/terminalOutputs/17499961385238663835 +21 -0
  19. package/.nx/cache/terminalOutputs/4082520855419352840 +21 -0
  20. package/.nx/cache/terminalOutputs/7126777490381568487 +32 -0
  21. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db +0 -0
  22. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-shm +0 -0
  23. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-wal +0 -0
  24. package/.nx/workspace-data/d/daemon.log +1637 -0
  25. package/.nx/workspace-data/d/server-process.json +2 -2
  26. package/.nx/workspace-data/file-map.json +1157 -1192
  27. package/.nx/workspace-data/nx_files.nxt +0 -0
  28. package/.nx/workspace-data/project-graph.json +2 -2
  29. package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +6 -0
  30. package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -1
  31. package/dist/libs/africanies-theme/tailwind-preset.cjs +15 -7
  32. package/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +10 -1
  33. package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +138 -54
  34. package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -1
  35. package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +21 -14
  36. package/libs/africanies-theme/src/lib/mode-color.safelist.ts +4 -0
  37. package/libs/africanies-theme/src/lib/mode-color.service.ts +11 -0
  38. package/libs/africanies-theme/tailwind-preset.cjs +15 -7
  39. package/libs/africanies-ui/src/lib/layout/header-weather.spec.ts +111 -6
  40. package/libs/africanies-ui/src/lib/layout/header-weather.ts +104 -8
  41. package/libs/africanies-ui/src/lib/table/table.component.ts +67 -44
  42. package/package.json +1 -1
@@ -0,0 +1,166 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ /**
4
+ * Tailwind safelist side-effect for shipping-mode color utilities.
5
+ *
6
+ * WHY this file exists: JIT/content scanning only keeps class names that appear
7
+ * as *literal strings* in scanned sources. {@link ModeColorService} already
8
+ * returns these literals, but keeping a dedicated comment list makes the
9
+ * contract obvious for consumers who configure `safelist` or purge plugins.
10
+ *
11
+ * Do not rename these strings without updating ModeColorService and THEME.md.
12
+ *
13
+ * SFN (export / green):
14
+ * text-export bg-export bg-export-subtle bg-export-light border-export
15
+ * hover:bg-export-light hover:bg-export-subtle dark:bg-export/15 dark:hover:bg-export/15
16
+ * dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)]
17
+ *
18
+ * STN (import / orange):
19
+ * text-import bg-import bg-import-subtle bg-import-light border-import
20
+ * hover:bg-import-light hover:bg-import-subtle dark:bg-import/15 dark:hover:bg-import/15
21
+ * dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)]
22
+ */
23
+ declare const MODE_COLOR_SAFELIST: readonly ["text-export", "bg-export", "bg-export-subtle", "bg-export-light", "border-export", "hover:bg-export-light", "hover:bg-export-subtle", "dark:bg-export/15", "dark:hover:bg-export/15", "dark:bg-[color-mix(in_srgb,#1cbd5d_15%,#212529)]", "text-import", "bg-import", "bg-import-subtle", "bg-import-light", "border-import", "hover:bg-import-light", "hover:bg-import-subtle", "dark:bg-import/15", "dark:hover:bg-import/15", "dark:bg-[color-mix(in_srgb,#f08829_15%,#212529)]"];
24
+
25
+ /**
26
+ * Tailwind class bundle for the active shipping mode (SFN export / STN import).
27
+ *
28
+ * Use these for **primary** product chrome: CTAs, selected controls, progress,
29
+ * and accent text. Semantic colors (danger / warning) stay mode-independent.
30
+ */
31
+ interface ModeColorClasses {
32
+ /** Text color utility, e.g. `text-export`. */
33
+ text: string;
34
+ /** Solid background utility, e.g. `bg-export`. */
35
+ bg: string;
36
+ /** Soft background utility, e.g. `bg-export-subtle`. */
37
+ bgSubtle: string;
38
+ /** Border matching the mode accent, e.g. `border-export`. */
39
+ border: string;
40
+ /**
41
+ * Filled primary CTA — `variant="primary"` on buttons.
42
+ * Includes hover utility as a literal so Tailwind keeps it.
43
+ */
44
+ primary: string;
45
+ /**
46
+ * Transparent / text-only CTA — `variant="ghost-primary"` on buttons.
47
+ * Mode accent text + soft hover fill.
48
+ */
49
+ ghostPrimary: string;
50
+ /**
51
+ * Soft highlight for selected / active rows (works in dark mode).
52
+ * Dark uses a translucent tint — fine over solid surfaces, not for
53
+ * sticky overlays (see {@link softSolid}).
54
+ */
55
+ soft: string;
56
+ /**
57
+ * Opaque soft fill — same tint as {@link soft}, but dark mode mixes into
58
+ * ink so scrolled content cannot show through (sticky table headers/cells).
59
+ */
60
+ softSolid: string;
61
+ /**
62
+ * Soft hover highlight for menus and lists.
63
+ */
64
+ softHover: string;
65
+ }
66
+ /**
67
+ * Maps {@link ShippingModeService} to mode-accent Tailwind classes.
68
+ *
69
+ * - **SFN** → export green is primary
70
+ * - **STN** → import orange is primary
71
+ *
72
+ * WHY literal class strings: Tailwind's scanner cannot see dynamically built
73
+ * names like `` `text-${token}` ``. Returning full literals (`text-export`, …)
74
+ * keeps utilities in the compiled CSS. See {@link MODE_COLOR_SAFELIST}.
75
+ *
76
+ * @example
77
+ * ```html
78
+ * @let colors = modeColor.classes();
79
+ * <button type="button" [class]="colors.primary">Save</button>
80
+ * <span [class]="colors.text">Mode accent</span>
81
+ * ```
82
+ */
83
+ declare class ModeColorService {
84
+ private readonly shippingMode;
85
+ /**
86
+ * Mode-dependent utility classes. Recomputes when shipping mode changes.
87
+ */
88
+ readonly classes: i0.Signal<ModeColorClasses>;
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModeColorService, never>;
90
+ static ɵprov: i0.ɵɵInjectableDeclaration<ModeColorService>;
91
+ }
92
+
93
+ /**
94
+ * Supported UI color schemes for {@link ThemeService}.
95
+ *
96
+ * Kept as a closed string union so storage values and DOM class toggles stay
97
+ * aligned — unknown persisted strings are ignored and fall back to system
98
+ * preference / light.
99
+ */
100
+ type Theme = 'light' | 'dark';
101
+
102
+ /**
103
+ * Application light/dark theme preference.
104
+ *
105
+ * WHY signals (not BehaviorSubject): theme is synchronous UI state read from
106
+ * templates and other services; a signal avoids RxJS subscription boilerplate
107
+ * and matches Angular 22 change detection. Persistence goes through
108
+ * {@link STORAGE_TOKEN} so tests can swap storage without touching `localStorage`.
109
+ *
110
+ * Applies the Tailwind `darkMode: 'class'` contract by toggling `dark` on
111
+ * `document.documentElement`, and sets `color-scheme` so native UI (date
112
+ * pickers, scrollbars, form controls) matches the app theme — class-based
113
+ * dark mode alone does not restyle browser chrome.
114
+ *
115
+ * @example
116
+ * ```ts
117
+ * // app.config.ts
118
+ * import { inject, provideAppInitializer } from '@angular/core';
119
+ * import { ThemeService } from '@africanies/africanies-theme';
120
+ *
121
+ * export const appConfig = {
122
+ * providers: [
123
+ * provideAppInitializer(() => {
124
+ * inject(ThemeService); // applies stored / system theme once
125
+ * }),
126
+ * ],
127
+ * };
128
+ *
129
+ * // In a component
130
+ * const theme = inject(ThemeService);
131
+ * theme.toggle();
132
+ * theme.setTheme('dark');
133
+ * const current = theme.theme(); // 'light' | 'dark'
134
+ * ```
135
+ */
136
+ declare class ThemeService {
137
+ private readonly storage;
138
+ private readonly document;
139
+ /**
140
+ * Current theme. Prefer reading via `theme()` in templates / computed values
141
+ * rather than caching the string, so dark-class consumers stay in sync.
142
+ */
143
+ readonly theme: i0.WritableSignal<Theme>;
144
+ constructor();
145
+ /**
146
+ * Sets and persists the theme, updating the `dark` class and `color-scheme`
147
+ * on `<html>`.
148
+ *
149
+ * @param theme - Absolute preference to store.
150
+ */
151
+ setTheme(theme: Theme): void;
152
+ /**
153
+ * Flips between light and dark.
154
+ *
155
+ * @returns The theme after the toggle.
156
+ */
157
+ toggle(): Theme;
158
+ private resolveInitialTheme;
159
+ private prefersDark;
160
+ private applyToDocument;
161
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
162
+ static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
163
+ }
164
+
165
+ export { MODE_COLOR_SAFELIST, ModeColorService, ThemeService };
166
+ export type { ModeColorClasses, Theme };
@@ -1,73 +1,73 @@
1
1
  {
2
2
  "run": {
3
- "command": "nx run-many -t build --projects=africanies-models,africanies-storage,africanies-core,africanies-theme,africanies-icons,africanies-ui",
4
- "startTime": "2026-08-27T08:54:06.112Z",
5
- "endTime": "2026-08-27T08:54:20.564Z",
3
+ "command": "nx run-many -t lint --parallel=3 --exclude=playground",
4
+ "startTime": "2026-08-28T14:48:23.575Z",
5
+ "endTime": "2026-08-28T14:48:30.782Z",
6
6
  "inner": false
7
7
  },
8
8
  "tasks": [
9
9
  {
10
- "taskId": "africanies-models:build:production",
11
- "target": "build",
10
+ "taskId": "africanies-models:lint",
11
+ "target": "lint",
12
12
  "projectName": "africanies-models",
13
- "hash": "14416694322692463866",
14
- "startTime": "2026-08-27T08:54:06.174Z",
15
- "endTime": "2026-08-27T08:54:06.199Z",
13
+ "hash": "783228502946611950",
14
+ "startTime": "2026-08-28T14:48:24.443Z",
15
+ "endTime": "2026-08-28T14:48:24.443Z",
16
16
  "params": "",
17
17
  "cacheStatus": "local-cache-hit",
18
18
  "status": 0
19
19
  },
20
20
  {
21
- "taskId": "africanies-storage:build:production",
22
- "target": "build",
21
+ "taskId": "africanies-storage:lint",
22
+ "target": "lint",
23
23
  "projectName": "africanies-storage",
24
- "hash": "15255861479705594703",
25
- "startTime": "2026-08-27T08:54:06.174Z",
26
- "endTime": "2026-08-27T08:54:06.199Z",
24
+ "hash": "7412642469886599413",
25
+ "startTime": "2026-08-28T14:48:24.443Z",
26
+ "endTime": "2026-08-28T14:48:24.443Z",
27
27
  "params": "",
28
28
  "cacheStatus": "local-cache-hit",
29
29
  "status": 0
30
30
  },
31
31
  {
32
- "taskId": "africanies-icons:build:production",
33
- "target": "build",
34
- "projectName": "africanies-icons",
35
- "hash": "6664915487114632770",
36
- "startTime": "2026-08-27T08:54:06.174Z",
37
- "endTime": "2026-08-27T08:54:06.199Z",
32
+ "taskId": "africanies-core:lint",
33
+ "target": "lint",
34
+ "projectName": "africanies-core",
35
+ "hash": "8648260256613557249",
36
+ "startTime": "2026-08-28T14:48:24.443Z",
37
+ "endTime": "2026-08-28T14:48:24.443Z",
38
38
  "params": "",
39
39
  "cacheStatus": "local-cache-hit",
40
40
  "status": 0
41
41
  },
42
42
  {
43
- "taskId": "africanies-core:build:production",
44
- "target": "build",
45
- "projectName": "africanies-core",
46
- "hash": "17491371155400585077",
47
- "startTime": "2026-08-27T08:54:06.213Z",
48
- "endTime": "2026-08-27T08:54:10.890Z",
43
+ "taskId": "africanies-icons:lint",
44
+ "target": "lint",
45
+ "projectName": "africanies-icons",
46
+ "hash": "17394769338046050914",
47
+ "startTime": "2026-08-28T14:48:24.443Z",
48
+ "endTime": "2026-08-28T14:48:24.443Z",
49
49
  "params": "",
50
- "cacheStatus": "cache-miss",
50
+ "cacheStatus": "local-cache-hit",
51
51
  "status": 0
52
52
  },
53
53
  {
54
- "taskId": "africanies-theme:build:production",
55
- "target": "build",
54
+ "taskId": "africanies-theme:lint",
55
+ "target": "lint",
56
56
  "projectName": "africanies-theme",
57
- "hash": "12276756491762927325",
58
- "startTime": "2026-08-27T08:54:10.903Z",
59
- "endTime": "2026-08-27T08:54:14.610Z",
57
+ "hash": "16279119293212733518",
58
+ "startTime": "2026-08-28T14:48:24.444Z",
59
+ "endTime": "2026-08-28T14:48:28.867Z",
60
60
  "params": "",
61
61
  "cacheStatus": "cache-miss",
62
62
  "status": 0
63
63
  },
64
64
  {
65
- "taskId": "africanies-ui:build:production",
66
- "target": "build",
65
+ "taskId": "africanies-ui:lint",
66
+ "target": "lint",
67
67
  "projectName": "africanies-ui",
68
- "hash": "3314955264390318442",
69
- "startTime": "2026-08-27T08:54:14.621Z",
70
- "endTime": "2026-08-27T08:54:20.551Z",
68
+ "hash": "7126777490381568487",
69
+ "startTime": "2026-08-28T14:48:24.444Z",
70
+ "endTime": "2026-08-28T14:48:30.779Z",
71
71
  "params": "",
72
72
  "cacheStatus": "cache-miss",
73
73
  "status": 0
@@ -0,0 +1,6 @@
1
+ The `@nx/eslint:lint` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/eslint:convert-to-inferred` to migrate to the `@nx/eslint/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.
2
+
3
+ Linting "africanies-theme"...
4
+
5
+ ✔ All files pass linting
6
+
@@ -0,0 +1,21 @@
1
+ > nx run africanies-ui:build:production
2
+
3
+
4
+ 
5
+ ------------------------------------------------------------------------------
6
+ Building entry point '@africanies/africanies-ui'
7
+ ------------------------------------------------------------------------------
8
+ [?2026h⠋ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠙ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠙ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠹ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠸ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠼ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠴ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠦ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠧ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠇ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠏ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠋ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠙ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠹ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠸ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠼ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠼ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠴ Compiling with Angular sources in partial compilation mode.[?2026l[?2026h⠦ Compiling with Angular sources in partial compilation mode.[?2026l✔ Compiling with Angular sources in partial compilation mode.
9
+ ✔ Generating FESM and DTS bundles
10
+ [?2026h⠋ Copying assets[?2026l✔ Copying assets
11
+ [?2026h⠋ Writing package manifest[?2026l✔ Writing package manifest
12
+ ✔ Built @africanies/africanies-ui
13
+ 
14
+ ------------------------------------------------------------------------------
15
+ Built Angular Package
16
+ - from: /Applications/AngularJS/angular-web-sdk/libs/africanies-ui
17
+ - to: /Applications/AngularJS/angular-web-sdk/dist/libs/africanies-ui
18
+ ------------------------------------------------------------------------------
19
+ 
20
+ Build at: 2026-08-28T14:47:31.636Z - Time: 22305ms
21
+ 
@@ -0,0 +1,21 @@
1
+ > nx run africanies-theme:build:production
2
+
3
+
4
+ 
5
+ ------------------------------------------------------------------------------
6
+ Building entry point '@africanies/africanies-theme'
7
+ ------------------------------------------------------------------------------
8
+ [?2026h⠋ Compiling with Angular sources in partial compilation mode.[?2026l✔ Compiling with Angular sources in partial compilation mode.
9
+ ✔ Generating FESM and DTS bundles
10
+ [?2026h⠋ Copying assets[?2026l✔ Copying assets
11
+ [?2026h⠋ Writing package manifest[?2026l✔ Writing package manifest
12
+ ✔ Built @africanies/africanies-theme
13
+ 
14
+ ------------------------------------------------------------------------------
15
+ Built Angular Package
16
+ - from: /Applications/AngularJS/angular-web-sdk/libs/africanies-theme
17
+ - to: /Applications/AngularJS/angular-web-sdk/dist/libs/africanies-theme
18
+ ------------------------------------------------------------------------------
19
+ 
20
+ Build at: 2026-08-28T14:47:06.848Z - Time: 2417ms
21
+ 
@@ -0,0 +1,32 @@
1
+ The `@nx/eslint:lint` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/eslint:convert-to-inferred` to migrate to the `@nx/eslint/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.
2
+
3
+ Linting "africanies-ui"...
4
+ 
5
+ /Applications/AngularJS/angular-web-sdk/libs/africanies-ui/src/lib/action-menu/action-menu.component.ts
6
+  349:3 warning Missing JSDoc @param "event" declaration jsdoc/require-param
7
+  349:3 warning Missing JSDoc @param "item" declaration jsdoc/require-param
8
+ 
9
+ /Applications/AngularJS/angular-web-sdk/libs/africanies-ui/src/lib/carrier/delivery-vendor-select.ts
10
+  3:3 warning 'deliveryVendorLabel' is defined but never used @typescript-eslint/no-unused-vars
11
+  11:1 warning Missing JSDoc @returns declaration jsdoc/require-returns
12
+  22:1 warning Missing JSDoc @returns declaration jsdoc/require-returns
13
+  38:1 warning Missing JSDoc @returns declaration jsdoc/require-returns
14
+ 
15
+ /Applications/AngularJS/angular-web-sdk/libs/africanies-ui/src/lib/layout/header-weather.spec.ts
16
+  150:54 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
17
+  154:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
18
+ 
19
+ /Applications/AngularJS/angular-web-sdk/libs/africanies-ui/src/lib/layout/header-weather.ts
20
+  212:1 warning Missing JSDoc @param "fetchFn" declaration jsdoc/require-param
21
+  212:1 warning Missing JSDoc @returns declaration jsdoc/require-returns
22
+ 
23
+ /Applications/AngularJS/angular-web-sdk/libs/africanies-ui/src/lib/table/table.component.ts
24
+  640:3 warning Missing JSDoc @returns declaration jsdoc/require-returns
25
+ 
26
+ ✖ 11 problems (0 errors, 11 warnings)
27
+  0 errors and 3 warnings potentially fixable with the `--fix` option.
28
+ 
29
+ ✖ 11 problems (0 errors, 11 warnings)
30
+
31
+ 0 errors and 3 warnings are potentially fixable with the `--fix` option.
32
+