@africanies/angular-web-sdk 0.1.10 → 0.1.11
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/14892813664845064572/dist/libs/africanies-ui/README.md +68 -0
- package/.nx/cache/14892813664845064572/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
- package/.nx/cache/14892813664845064572/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
- package/.nx/cache/14892813664845064572/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +5 -0
- package/.nx/cache/14892813664845064572/dist/libs/africanies-ui/assets/carriers/dhl.svg +7 -0
- package/.nx/cache/14892813664845064572/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +20013 -0
- package/.nx/cache/14892813664845064572/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
- package/.nx/cache/14892813664845064572/dist/libs/africanies-ui/package.json +35 -0
- package/.nx/cache/14892813664845064572/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +5617 -0
- package/.nx/cache/run.json +16 -16
- package/.nx/cache/terminalOutputs/14892813664845064572 +21 -0
- package/.nx/cache/terminalOutputs/17909810599991457481 +40 -0
- package/.nx/cache/terminalOutputs/2927637324428060203 +42 -0
- package/.nx/cache/terminalOutputs/4787481949164239892 +8 -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 +2377 -0
- package/.nx/workspace-data/d/server-process.json +2 -2
- package/.nx/workspace-data/file-map.json +3465 -3469
- package/.nx/workspace-data/nx_files.nxt +0 -0
- package/.nx/workspace-data/project-graph.json +2 -2
- package/README.md +0 -17
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +149 -134
- package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -1
- package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +14 -13
- package/libs/africanies-ui/src/lib/navigation/shipping-mode-switch/shipping-mode-switch.component.spec.ts +15 -0
- package/libs/africanies-ui/src/lib/navigation/shipping-mode-switch/shipping-mode-switch.component.ts +6 -3
- package/libs/africanies-ui/src/lib/table/table.component.ts +70 -65
- package/package.json +1 -1
|
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.11",
|
|
830
830
|
"isInPackageManagerWorkspaces": true
|
|
831
831
|
}
|
|
832
832
|
},
|
|
@@ -42095,5 +42095,5 @@
|
|
|
42095
42095
|
},
|
|
42096
42096
|
"version": "6.0",
|
|
42097
42097
|
"errors": [],
|
|
42098
|
-
"computedAt":
|
|
42098
|
+
"computedAt": 1788962337694
|
|
42099
42099
|
}
|
package/README.md
CHANGED
|
@@ -26,23 +26,6 @@ npm install @africanies/africanies-core @africanies/africanies-models @africanie
|
|
|
26
26
|
@africanies/africanies-theme @africanies/africanies-icons @africanies/africanies-ui
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
### Migrating from `@aies/*`
|
|
30
|
-
|
|
31
|
-
If a consuming app still references the old scope, update in one pass:
|
|
32
|
-
|
|
33
|
-
| Before | After |
|
|
34
|
-
| --- | --- |
|
|
35
|
-
| GitHub Packages `.npmrc` lines | Remove — packages install from npmjs.org |
|
|
36
|
-
| `@aies/aies-core` (etc.) | `@africanies/africanies-core` (etc.) |
|
|
37
|
-
| `provideAiesSdk` | `provideAfricaniesSdk` |
|
|
38
|
-
| `provideAiesHttpClient` | `provideAfricaniesHttpClient` |
|
|
39
|
-
| `provideAiesUiOverlays` | `provideAfricaniesUiOverlays` |
|
|
40
|
-
| `provideAiesToasts` | `provideAfricaniesToasts` |
|
|
41
|
-
| `<aies-button>` / `aiesCellDef` | `<africanies-button>` / `africaniesCellDef` |
|
|
42
|
-
| Storage keys `aies.theme`, `aies.accessToken`, … | `africanies.theme`, `africanies.accessToken`, … |
|
|
43
|
-
|
|
44
|
-
Publish current versions from this repo to npm (`nx release publish`; see [CONTRIBUTING](./CONTRIBUTING.md)) before pointing production apps at the new names.
|
|
45
|
-
|
|
46
29
|
## Quickstart
|
|
47
30
|
|
|
48
31
|
Wire these in `app.config.ts`. Each provider turns on one slice of the SDK:
|
|
@@ -13773,9 +13773,12 @@ class ShippingModeSwitchComponent {
|
|
|
13773
13773
|
>
|
|
13774
13774
|
Shipping mode
|
|
13775
13775
|
</p>
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
|
|
13776
|
+
<!-- STN / SFN chip only when the tiles are collapsed — open panel already shows both modes. -->
|
|
13777
|
+
@if (!panelOpen()) {
|
|
13778
|
+
<africanies-chip [variant]="modeChipVariant()" size="sm">
|
|
13779
|
+
{{ modeChipLabel() }}
|
|
13780
|
+
</africanies-chip>
|
|
13781
|
+
}
|
|
13779
13782
|
<span class="min-w-0 flex-1" aria-hidden="true"></span>
|
|
13780
13783
|
<button
|
|
13781
13784
|
type="button"
|
|
@@ -13915,9 +13918,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
13915
13918
|
>
|
|
13916
13919
|
Shipping mode
|
|
13917
13920
|
</p>
|
|
13918
|
-
|
|
13919
|
-
|
|
13920
|
-
|
|
13921
|
+
<!-- STN / SFN chip only when the tiles are collapsed — open panel already shows both modes. -->
|
|
13922
|
+
@if (!panelOpen()) {
|
|
13923
|
+
<africanies-chip [variant]="modeChipVariant()" size="sm">
|
|
13924
|
+
{{ modeChipLabel() }}
|
|
13925
|
+
</africanies-chip>
|
|
13926
|
+
}
|
|
13921
13927
|
<span class="min-w-0 flex-1" aria-hidden="true"></span>
|
|
13922
13928
|
<button
|
|
13923
13929
|
type="button"
|
|
@@ -18014,8 +18020,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
18014
18020
|
* `<ng-template africaniesCellDef="key">` templates. Columns without a matching
|
|
18015
18021
|
* template fall back to rendering `row[key]` as plain text.
|
|
18016
18022
|
*
|
|
18017
|
-
* Optional toolbar: top-left **shipping mode** segment
|
|
18018
|
-
* `[showShippingMode]="false"` to
|
|
18023
|
+
* Optional toolbar: top-left **shipping mode** segment on its own row above
|
|
18024
|
+
* Refresh / Filter / Export (on by default; `[showShippingMode]="false"` to
|
|
18025
|
+
* hide) and **Refresh** (`showRefresh` →
|
|
18019
18026
|
* {@link refreshClick}). Refresh is hidden while
|
|
18020
18027
|
* the body shows empty or error — those states expose Retry instead.
|
|
18021
18028
|
* While {@link refreshing} is true the rows stay on screen — the refresh icon
|
|
@@ -18635,71 +18642,75 @@ class TableComponent {
|
|
|
18635
18642
|
showFilter() ||
|
|
18636
18643
|
showExport()
|
|
18637
18644
|
) {
|
|
18638
|
-
<div class="flex
|
|
18639
|
-
|
|
18640
|
-
|
|
18641
|
-
|
|
18642
|
-
|
|
18643
|
-
|
|
18644
|
-
|
|
18645
|
-
|
|
18646
|
-
|
|
18647
|
-
|
|
18648
|
-
|
|
18649
|
-
|
|
18650
|
-
<
|
|
18651
|
-
|
|
18652
|
-
|
|
18653
|
-
|
|
18654
|
-
|
|
18655
|
-
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
|
|
18659
|
-
|
|
18660
|
-
name="refresh"
|
|
18661
|
-
[size]="16"
|
|
18662
|
-
[class]="refreshing() ? 'animate-spin' : ''"
|
|
18663
|
-
/>
|
|
18664
|
-
{{ refreshLabel() }}
|
|
18665
|
-
</button>
|
|
18666
|
-
}
|
|
18667
|
-
</div>
|
|
18668
|
-
<div class="flex items-center gap-2">
|
|
18669
|
-
@if (showFilter()) {
|
|
18670
|
-
<button
|
|
18671
|
-
africanies-button
|
|
18672
|
-
type="button"
|
|
18673
|
-
variant="flat"
|
|
18674
|
-
size="sm"
|
|
18675
|
-
[attr.aria-label]="filterLabel()"
|
|
18676
|
-
(click)="filterClick.emit()"
|
|
18677
|
-
>
|
|
18678
|
-
<africanies-icon name="filter" [size]="16" />
|
|
18679
|
-
{{ filterLabel() }}
|
|
18680
|
-
@if (filterCount() > 0) {
|
|
18681
|
-
<span
|
|
18682
|
-
class="inline-flex min-w-5 items-center justify-center rounded-full bg-ink px-1.5 py-0.5 text-caption font-semibold tabular-nums text-white dark:bg-white dark:text-ink"
|
|
18645
|
+
<div class="flex w-full min-w-0 flex-col gap-3">
|
|
18646
|
+
@if (showShippingMode()) {
|
|
18647
|
+
<africanies-segment
|
|
18648
|
+
class="min-w-0 self-start"
|
|
18649
|
+
[items]="shippingModeItems"
|
|
18650
|
+
[activeId]="shippingModeActiveId()"
|
|
18651
|
+
ariaLabel="Shipping mode"
|
|
18652
|
+
(activeIdChange)="onShippingModeChange($event)"
|
|
18653
|
+
/>
|
|
18654
|
+
}
|
|
18655
|
+
@if (showToolbarRefresh() || showFilter() || showExport()) {
|
|
18656
|
+
<div class="flex flex-wrap items-center justify-between gap-2">
|
|
18657
|
+
<div class="flex min-w-0 flex-wrap items-center gap-2">
|
|
18658
|
+
@if (showToolbarRefresh()) {
|
|
18659
|
+
<button
|
|
18660
|
+
africanies-button
|
|
18661
|
+
type="button"
|
|
18662
|
+
variant="flat"
|
|
18663
|
+
size="sm"
|
|
18664
|
+
[disabled]="loading() || refreshing()"
|
|
18665
|
+
[attr.aria-label]="refreshLabel()"
|
|
18666
|
+
(click)="refreshClick.emit()"
|
|
18683
18667
|
>
|
|
18684
|
-
|
|
18685
|
-
|
|
18668
|
+
<africanies-icon
|
|
18669
|
+
name="refresh"
|
|
18670
|
+
[size]="16"
|
|
18671
|
+
[class]="refreshing() ? 'animate-spin' : ''"
|
|
18672
|
+
/>
|
|
18673
|
+
{{ refreshLabel() }}
|
|
18674
|
+
</button>
|
|
18686
18675
|
}
|
|
18687
|
-
</
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
|
|
18697
|
-
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
|
|
18676
|
+
</div>
|
|
18677
|
+
<div class="flex items-center gap-2">
|
|
18678
|
+
@if (showFilter()) {
|
|
18679
|
+
<button
|
|
18680
|
+
africanies-button
|
|
18681
|
+
type="button"
|
|
18682
|
+
variant="flat"
|
|
18683
|
+
size="sm"
|
|
18684
|
+
[attr.aria-label]="filterLabel()"
|
|
18685
|
+
(click)="filterClick.emit()"
|
|
18686
|
+
>
|
|
18687
|
+
<africanies-icon name="filter" [size]="16" />
|
|
18688
|
+
{{ filterLabel() }}
|
|
18689
|
+
@if (filterCount() > 0) {
|
|
18690
|
+
<span
|
|
18691
|
+
class="inline-flex min-w-5 items-center justify-center rounded-full bg-ink px-1.5 py-0.5 text-caption font-semibold tabular-nums text-white dark:bg-white dark:text-ink"
|
|
18692
|
+
>
|
|
18693
|
+
{{ filterCount() }}
|
|
18694
|
+
</span>
|
|
18695
|
+
}
|
|
18696
|
+
</button>
|
|
18697
|
+
}
|
|
18698
|
+
@if (showExport()) {
|
|
18699
|
+
<button
|
|
18700
|
+
africanies-button
|
|
18701
|
+
type="button"
|
|
18702
|
+
variant="flat"
|
|
18703
|
+
size="sm"
|
|
18704
|
+
[attr.aria-label]="exportLabel()"
|
|
18705
|
+
(click)="exportClick.emit()"
|
|
18706
|
+
>
|
|
18707
|
+
<africanies-icon name="download" [size]="16" />
|
|
18708
|
+
{{ exportLabel() }}
|
|
18709
|
+
</button>
|
|
18710
|
+
}
|
|
18711
|
+
</div>
|
|
18712
|
+
</div>
|
|
18713
|
+
}
|
|
18703
18714
|
</div>
|
|
18704
18715
|
}
|
|
18705
18716
|
|
|
@@ -18977,71 +18988,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
18977
18988
|
showFilter() ||
|
|
18978
18989
|
showExport()
|
|
18979
18990
|
) {
|
|
18980
|
-
<div class="flex
|
|
18981
|
-
|
|
18982
|
-
|
|
18983
|
-
|
|
18984
|
-
|
|
18985
|
-
|
|
18986
|
-
|
|
18987
|
-
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
18992
|
-
<
|
|
18993
|
-
|
|
18994
|
-
|
|
18995
|
-
|
|
18996
|
-
|
|
18997
|
-
|
|
18998
|
-
|
|
18999
|
-
|
|
19000
|
-
|
|
19001
|
-
|
|
19002
|
-
name="refresh"
|
|
19003
|
-
[size]="16"
|
|
19004
|
-
[class]="refreshing() ? 'animate-spin' : ''"
|
|
19005
|
-
/>
|
|
19006
|
-
{{ refreshLabel() }}
|
|
19007
|
-
</button>
|
|
19008
|
-
}
|
|
19009
|
-
</div>
|
|
19010
|
-
<div class="flex items-center gap-2">
|
|
19011
|
-
@if (showFilter()) {
|
|
19012
|
-
<button
|
|
19013
|
-
africanies-button
|
|
19014
|
-
type="button"
|
|
19015
|
-
variant="flat"
|
|
19016
|
-
size="sm"
|
|
19017
|
-
[attr.aria-label]="filterLabel()"
|
|
19018
|
-
(click)="filterClick.emit()"
|
|
19019
|
-
>
|
|
19020
|
-
<africanies-icon name="filter" [size]="16" />
|
|
19021
|
-
{{ filterLabel() }}
|
|
19022
|
-
@if (filterCount() > 0) {
|
|
19023
|
-
<span
|
|
19024
|
-
class="inline-flex min-w-5 items-center justify-center rounded-full bg-ink px-1.5 py-0.5 text-caption font-semibold tabular-nums text-white dark:bg-white dark:text-ink"
|
|
18991
|
+
<div class="flex w-full min-w-0 flex-col gap-3">
|
|
18992
|
+
@if (showShippingMode()) {
|
|
18993
|
+
<africanies-segment
|
|
18994
|
+
class="min-w-0 self-start"
|
|
18995
|
+
[items]="shippingModeItems"
|
|
18996
|
+
[activeId]="shippingModeActiveId()"
|
|
18997
|
+
ariaLabel="Shipping mode"
|
|
18998
|
+
(activeIdChange)="onShippingModeChange($event)"
|
|
18999
|
+
/>
|
|
19000
|
+
}
|
|
19001
|
+
@if (showToolbarRefresh() || showFilter() || showExport()) {
|
|
19002
|
+
<div class="flex flex-wrap items-center justify-between gap-2">
|
|
19003
|
+
<div class="flex min-w-0 flex-wrap items-center gap-2">
|
|
19004
|
+
@if (showToolbarRefresh()) {
|
|
19005
|
+
<button
|
|
19006
|
+
africanies-button
|
|
19007
|
+
type="button"
|
|
19008
|
+
variant="flat"
|
|
19009
|
+
size="sm"
|
|
19010
|
+
[disabled]="loading() || refreshing()"
|
|
19011
|
+
[attr.aria-label]="refreshLabel()"
|
|
19012
|
+
(click)="refreshClick.emit()"
|
|
19025
19013
|
>
|
|
19026
|
-
|
|
19027
|
-
|
|
19014
|
+
<africanies-icon
|
|
19015
|
+
name="refresh"
|
|
19016
|
+
[size]="16"
|
|
19017
|
+
[class]="refreshing() ? 'animate-spin' : ''"
|
|
19018
|
+
/>
|
|
19019
|
+
{{ refreshLabel() }}
|
|
19020
|
+
</button>
|
|
19028
19021
|
}
|
|
19029
|
-
</
|
|
19030
|
-
|
|
19031
|
-
|
|
19032
|
-
|
|
19033
|
-
|
|
19034
|
-
|
|
19035
|
-
|
|
19036
|
-
|
|
19037
|
-
|
|
19038
|
-
|
|
19039
|
-
|
|
19040
|
-
|
|
19041
|
-
|
|
19042
|
-
|
|
19043
|
-
|
|
19044
|
-
|
|
19022
|
+
</div>
|
|
19023
|
+
<div class="flex items-center gap-2">
|
|
19024
|
+
@if (showFilter()) {
|
|
19025
|
+
<button
|
|
19026
|
+
africanies-button
|
|
19027
|
+
type="button"
|
|
19028
|
+
variant="flat"
|
|
19029
|
+
size="sm"
|
|
19030
|
+
[attr.aria-label]="filterLabel()"
|
|
19031
|
+
(click)="filterClick.emit()"
|
|
19032
|
+
>
|
|
19033
|
+
<africanies-icon name="filter" [size]="16" />
|
|
19034
|
+
{{ filterLabel() }}
|
|
19035
|
+
@if (filterCount() > 0) {
|
|
19036
|
+
<span
|
|
19037
|
+
class="inline-flex min-w-5 items-center justify-center rounded-full bg-ink px-1.5 py-0.5 text-caption font-semibold tabular-nums text-white dark:bg-white dark:text-ink"
|
|
19038
|
+
>
|
|
19039
|
+
{{ filterCount() }}
|
|
19040
|
+
</span>
|
|
19041
|
+
}
|
|
19042
|
+
</button>
|
|
19043
|
+
}
|
|
19044
|
+
@if (showExport()) {
|
|
19045
|
+
<button
|
|
19046
|
+
africanies-button
|
|
19047
|
+
type="button"
|
|
19048
|
+
variant="flat"
|
|
19049
|
+
size="sm"
|
|
19050
|
+
[attr.aria-label]="exportLabel()"
|
|
19051
|
+
(click)="exportClick.emit()"
|
|
19052
|
+
>
|
|
19053
|
+
<africanies-icon name="download" [size]="16" />
|
|
19054
|
+
{{ exportLabel() }}
|
|
19055
|
+
</button>
|
|
19056
|
+
}
|
|
19057
|
+
</div>
|
|
19058
|
+
</div>
|
|
19059
|
+
}
|
|
19045
19060
|
</div>
|
|
19046
19061
|
}
|
|
19047
19062
|
|