@africanies/angular-web-sdk 0.1.1 → 0.1.3

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 (116) hide show
  1. package/.angular/cache/22.0.9/playground/.tsbuildinfo +1 -1
  2. package/.angular/cache/22.0.9/playground/angular-compiler.db +0 -0
  3. package/.angular/cache/22.0.9/playground/angular-compiler.db-lock +0 -0
  4. package/.github/workflows/deploy-demo.yml +63 -0
  5. package/.nx/cache/12276756491762927325/dist/libs/africanies-theme/README.md +46 -0
  6. package/.nx/cache/12276756491762927325/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +215 -0
  7. package/.nx/cache/12276756491762927325/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
  8. package/.nx/cache/12276756491762927325/dist/libs/africanies-theme/package.json +35 -0
  9. package/.nx/cache/12276756491762927325/dist/libs/africanies-theme/tailwind-preset.cjs +245 -0
  10. package/.nx/cache/12276756491762927325/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +157 -0
  11. package/.nx/cache/17491371155400585077/dist/libs/africanies-core/README.md +85 -0
  12. package/.nx/cache/17491371155400585077/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +4546 -0
  13. package/.nx/cache/17491371155400585077/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -0
  14. package/.nx/cache/17491371155400585077/dist/libs/africanies-core/package.json +31 -0
  15. package/.nx/cache/17491371155400585077/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +2740 -0
  16. package/.nx/cache/3314955264390318442/dist/libs/africanies-ui/README.md +68 -0
  17. package/.nx/cache/3314955264390318442/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
  18. package/.nx/cache/3314955264390318442/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
  19. package/.nx/cache/3314955264390318442/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +5 -0
  20. package/.nx/cache/3314955264390318442/dist/libs/africanies-ui/assets/carriers/dhl.svg +7 -0
  21. package/.nx/cache/3314955264390318442/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +19291 -0
  22. package/.nx/cache/3314955264390318442/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
  23. package/.nx/cache/3314955264390318442/dist/libs/africanies-ui/package.json +35 -0
  24. package/.nx/cache/3314955264390318442/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +5483 -0
  25. package/.nx/cache/run.json +38 -38
  26. package/.nx/cache/terminalOutputs/12276756491762927325 +21 -0
  27. package/.nx/cache/terminalOutputs/13524438527920092277 +196 -21
  28. package/.nx/cache/terminalOutputs/14153928176747262656 +45 -21
  29. package/.nx/cache/terminalOutputs/14416694322692463866 +108 -21
  30. package/.nx/cache/terminalOutputs/15255861479705594703 +51 -21
  31. package/.nx/cache/terminalOutputs/17491371155400585077 +21 -0
  32. package/.nx/cache/terminalOutputs/18132311043100376919 +315 -21
  33. package/.nx/cache/terminalOutputs/2436781291243085315 +8 -0
  34. package/.nx/cache/terminalOutputs/3017748574492080228 +28 -0
  35. package/.nx/cache/terminalOutputs/3314955264390318442 +21 -0
  36. package/.nx/cache/terminalOutputs/6664915487114632770 +44 -21
  37. package/.nx/cache/terminalOutputs/8648260256613557249 +173 -0
  38. package/.nx/cache/terminalOutputs/8767335728598176888 +37 -0
  39. package/.nx/cache/terminalOutputs/9408529484792607601 +6 -0
  40. package/.nx/cache/terminalOutputs/9739655320223921719 +47 -0
  41. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db +0 -0
  42. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-shm +0 -0
  43. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-wal +0 -0
  44. package/.nx/workspace-data/d/daemon.log +3026 -0
  45. package/.nx/workspace-data/d/server-process.json +2 -2
  46. package/.nx/workspace-data/file-map.json +3268 -3262
  47. package/.nx/workspace-data/nx_files.nxt +0 -0
  48. package/.nx/workspace-data/project-graph.json +9 -9
  49. package/.nx/workspace-data/project-graph.lock +0 -0
  50. package/.pnpm-store/v11/index.db +0 -0
  51. package/README.md +13 -1
  52. package/apps/playground/src/app/app.config.ts +28 -3
  53. package/apps/playground/src/app/snippets/action-menu.snippets.ts +1 -0
  54. package/dist/apps/playground/3rdpartylicenses.txt +415 -0
  55. package/dist/apps/playground/browser/assets/africanies-icons/icons.sprite.svg +1844 -0
  56. package/dist/apps/playground/browser/assets/africanies-ui/brand/africanies-logo-mini.png +0 -0
  57. package/dist/apps/playground/browser/assets/africanies-ui/brand/africanies-logo.png +0 -0
  58. package/dist/apps/playground/browser/assets/africanies-ui/brand/africanies-logo.svg +5 -0
  59. package/dist/apps/playground/browser/assets/africanies-ui/carriers/dhl.svg +7 -0
  60. package/dist/apps/playground/browser/chunk--VJ6U9Ev.js +2 -0
  61. package/dist/apps/playground/browser/chunk-B1QVY0hA.js +1 -0
  62. package/dist/apps/playground/browser/chunk-BHI7MG2Y.js +1 -0
  63. package/dist/apps/playground/browser/chunk-BJ5IK8Re.js +1 -0
  64. package/dist/apps/playground/browser/chunk-BOSfyWK2.js +1 -0
  65. package/dist/apps/playground/browser/chunk-BYPboEAg.js +1 -0
  66. package/dist/apps/playground/browser/chunk-BZBRtbFJ.js +1 -0
  67. package/dist/apps/playground/browser/chunk-BdrGkq40.js +1 -0
  68. package/dist/apps/playground/browser/chunk-Bej5a2xR.js +1 -0
  69. package/dist/apps/playground/browser/chunk-Bg3QC1eL.js +1 -0
  70. package/dist/apps/playground/browser/chunk-BsnTz1m5.js +1 -0
  71. package/dist/apps/playground/browser/chunk-C5kLunTi.js +1 -0
  72. package/dist/apps/playground/browser/chunk-C6tu3y81.js +1 -0
  73. package/dist/apps/playground/browser/chunk-C96WSpFp.js +1 -0
  74. package/dist/apps/playground/browser/chunk-CCnOVzbz.js +2 -0
  75. package/dist/apps/playground/browser/chunk-CERmZ9We.js +1 -0
  76. package/dist/apps/playground/browser/chunk-CZBTrY_H.js +68 -0
  77. package/dist/apps/playground/browser/chunk-Cg7brw6x.js +4070 -0
  78. package/dist/apps/playground/browser/chunk-CjTyStrr.js +1 -0
  79. package/dist/apps/playground/browser/chunk-CjYlnYC7.js +1 -0
  80. package/dist/apps/playground/browser/chunk-ClSUoZp8.js +292 -0
  81. package/dist/apps/playground/browser/chunk-CsrxfMap.js +1 -0
  82. package/dist/apps/playground/browser/chunk-CtndMAe2.js +1 -0
  83. package/dist/apps/playground/browser/chunk-Cy-ZOZI8.js +1 -0
  84. package/dist/apps/playground/browser/chunk-D3-jrtyv.js +1 -0
  85. package/dist/apps/playground/browser/chunk-D3vgrlDF.js +1 -0
  86. package/dist/apps/playground/browser/chunk-D48aVVTv.js +1 -0
  87. package/dist/apps/playground/browser/chunk-D4V3eSCv.js +1 -0
  88. package/dist/apps/playground/browser/chunk-DK715t6D.js +1 -0
  89. package/dist/apps/playground/browser/chunk-DUkct7WP.js +1 -0
  90. package/dist/apps/playground/browser/chunk-Y9ccR-I6.js +1 -0
  91. package/dist/apps/playground/browser/chunk-lfUHaltX.js +1 -0
  92. package/dist/apps/playground/browser/favicon.ico +0 -0
  93. package/dist/apps/playground/browser/index.html +14 -0
  94. package/dist/apps/playground/browser/main-WEJC3BLT.js +148 -0
  95. package/dist/apps/playground/browser/styles-4FSELHYD.css +1 -0
  96. package/dist/apps/playground/prerendered-routes.json +3 -0
  97. package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +1 -1
  98. package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -1
  99. package/dist/libs/africanies-core/package.json +3 -3
  100. package/dist/libs/africanies-theme/package.json +3 -3
  101. package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +318 -115
  102. package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -1
  103. package/dist/libs/africanies-ui/package.json +5 -5
  104. package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +92 -19
  105. package/libs/africanies-core/package.json +3 -3
  106. package/libs/africanies-core/src/lib/payment-method/payment-method.mapper.spec.ts +15 -0
  107. package/libs/africanies-core/src/lib/payment-method/payment-method.mapper.ts +1 -2
  108. package/libs/africanies-theme/package.json +3 -3
  109. package/libs/africanies-ui/package.json +5 -5
  110. package/libs/africanies-ui/src/index.ts +6 -0
  111. package/libs/africanies-ui/src/lib/accordion/accordion.component.ts +135 -0
  112. package/libs/africanies-ui/src/lib/accordion/index.ts +7 -0
  113. package/libs/africanies-ui/src/lib/action-menu/action-menu.component.ts +84 -17
  114. package/libs/africanies-ui/src/lib/action-menu/menu-item.ts +19 -2
  115. package/libs/africanies-ui/src/lib/modules/africanies-feedback.module.ts +3 -1
  116. package/package.json +31 -8
@@ -0,0 +1 @@
1
+ import {e as bo,y as yo,i as vo,H as Ht}from'./chunk-Cg7brw6x.js';import'./chunk-CZBTrY_H.js';import {b}from'./chunk-Cy-ZOZI8.js';import {T,K as ze,N as nt,O as bn,C as Co,I as IE,Z,H as Hs,e as ei,M as MI,a as gc,t as tp,Q as Qy,d as Qf,f as gp,R as Je,S as Ae,g as g$1,c as Zf,i as Ic,V as VE,j as jE,b as HE}from'./main-WEJC3BLT.js';function j(d,r){if(d&1&&(ei(0,"li")(1,"label",12),Zf(2,"input",13),MI(3),gc()()),d&2){let a=r.$implicit;Qy(2),Qf("checked",a==="In transit"),Qy(),Ic(" ",a," ");}}var f=class d{data=T(Je);ref=T(Ae);note="Ready for customs clearance";static \u0275fac=function(a){return new(a||d)};static \u0275cmp=IE({type:d,selectors:[["app-demo-modal-panel"]],hostAttrs:[1,"flex","min-h-0","w-full","flex-col","overflow-hidden"],decls:21,vars:3,consts:[[1,"flex","min-h-0","flex-1","flex-col"],[1,"flex","shrink-0","items-start","justify-between","gap-3","pb-4"],[1,"flex","min-w-0","flex-col","gap-1"],[1,"m-0","text-caption","font-medium","uppercase","tracking-wide","text-neutral-600","dark:text-neutral-400"],[1,"m-0","text-heading-3","text-ink","dark:text-white"],[1,"m-0","text-body-sm","text-neutral-600","dark:text-neutral-400"],["africanies-button","","type","button","variant","ghost","size","sm","aria-label","Close",3,"click"],["name","close",3,"size"],[1,"africanies-overlay-scroll","flex","min-h-0","flex-1","flex-col","gap-5","overflow-y-auto"],[1,"flex","flex-col","gap-1.5"],[1,"text-caption","font-medium","text-neutral-600","dark:text-neutral-400"],["type","text",1,"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",3,"input","value"],[1,"flex","shrink-0","justify-end","gap-2","border-t","border-border","pt-4","dark:border-white/10"],["africanies-button","","type","button","variant","ghost",3,"click"],["africanies-button","","type","button","variant","primary",3,"click"]],template:function(a,i){a&1&&(ei(0,"div",0)(1,"div",1)(2,"div",2)(3,"p",3),MI(4," Modal "),gc(),ei(5,"h2",4),MI(6),gc(),ei(7,"p",5),MI(8," Hosted via ModalService.open \u2014 inject OVERLAY_DATA and AfricaniesOverlayRef to close with a result. "),gc()(),ei(9,"button",6),tp("click",function(){return i.ref.close()}),Zf(10,"africanies-icon",7),gc()(),ei(11,"div",8)(12,"label",9)(13,"span",10),MI(14," Note "),gc(),ei(15,"input",11),tp("input",function(N){return i.note=N.target.value}),gc()()(),ei(16,"div",12)(17,"button",13),tp("click",function(){return i.ref.close()}),MI(18," Cancel "),gc(),ei(19,"button",14),tp("click",function(){return i.ref.close({saved:true,note:i.note})}),MI(20," Save "),gc()()()),a&2&&(Qy(6),Ic(" Edit ",i.data.shipmentRef," "),Qy(4),Qf("size",18),Qy(5),Qf("value",i.note));},dependencies:[Z,g$1],encapsulation:2})},g=class d{data=T(Je);ref=T(Ae);options=["In transit","Delivered","Pending","Exception"];static \u0275fac=function(a){return new(a||d)};static \u0275cmp=IE({type:d,selectors:[["app-demo-drawer-panel"]],hostAttrs:[1,"flex","h-full","min-h-0","flex-col","overflow-hidden"],decls:19,vars:2,consts:[[1,"flex","h-full","min-h-0","flex-col"],[1,"flex","shrink-0","items-start","justify-between","gap-3","pb-4"],[1,"flex","min-w-0","flex-col","gap-1"],[1,"m-0","text-caption","font-medium","uppercase","tracking-wide","text-neutral-600","dark:text-neutral-400"],[1,"m-0","text-heading-3","text-ink","dark:text-white"],[1,"m-0","text-body-sm","text-neutral-600","dark:text-neutral-400"],["africanies-button","","type","button","variant","ghost","size","sm","aria-label","Close",3,"click"],["name","close",3,"size"],[1,"africanies-overlay-scroll","m-0","flex","min-h-0","flex-1","list-none","flex-col","gap-2","overflow-y-auto","p-0"],[1,"mt-auto","flex","justify-end","gap-2","pt-4"],["africanies-button","","type","button","variant","ghost",3,"click"],["africanies-button","","type","button","variant","primary",3,"click"],[1,"flex","cursor-pointer","items-center","gap-2","rounded-md","border","border-border","px-3","py-2","text-body-sm","text-ink","dark:border-white/15","dark:text-white"],["type","checkbox",1,"accent-current",3,"checked"]],template:function(a,i){a&1&&(ei(0,"div",0)(1,"div",1)(2,"div",2)(3,"p",3),MI(4," Drawer "),gc(),ei(5,"h2",4),MI(6),gc(),ei(7,"p",5),MI(8," Same OverlayOpener contract as modals; panel docks to the right. "),gc()(),ei(9,"button",6),tp("click",function(){return i.ref.close()}),Zf(10,"africanies-icon",7),gc()(),ei(11,"ul",8),VE(12,j,4,2,"li",null,jE),gc(),ei(14,"div",9)(15,"button",10),tp("click",function(){return i.ref.close()}),MI(16," Cancel "),gc(),ei(17,"button",11),tp("click",function(){return i.ref.close({applied:true})}),MI(18," Apply "),gc()()()),a&2&&(Qy(6),Ic(" Filters \u2014 ",i.data.facet," "),Qy(4),Qf("size",18),Qy(2),HE(i.options));},dependencies:[Z,g$1],encapsulation:2})};var L=class d{modal=T(ze);drawer=T(nt);confirm=T(bn);modalResult=Co(null);drawerResult=Co(null);confirmResult=Co(null);modalCode=bo;drawerCode=yo;confirmCode=vo;openModal(r){this.modal.open(f,{data:{shipmentRef:"SFN-1042"},dismissible:r}).afterClosed().subscribe(a=>{this.modalResult.set(a?.saved?`Saved \u2014 \u201C${a.note}\u201D`:r?"Dismissed (backdrop / Escape / Cancel)":"Closed via Cancel");});}openWideModal(){this.modal.open(f,{data:{shipmentRef:"SFN-1042"},size:"lg",dismissible:true}).afterClosed().subscribe(r=>{this.modalResult.set(r?.saved?`Saved (lg) \u2014 \u201C${r.note}\u201D`:"Dismissed wide modal");});}openDrawer(r){this.drawer.open(g,{data:{facet:"Status"},dismissible:r}).afterClosed().subscribe(a=>{this.drawerResult.set(a?.applied?"Filters applied":r?"Dismissed (backdrop / Escape / Cancel)":"Closed via Cancel");});}openConfirm(r,a=false){this.confirm.confirm({title:r?"Delete shipment?":"Mark as delivered?",message:r?"This cannot be undone. Related documents stay in archive.":"The consignee will be notified that the shipment is complete.",confirmLabel:r?"Delete":"Mark delivered",cancelLabel:"Cancel",danger:r,dismissible:a}).subscribe(i=>{this.confirmResult.set(i?"Confirmed":"Cancelled");});}static \u0275fac=function(a){return new(a||d)};static \u0275cmp=IE({type:d,selectors:[["app-overlay-page"]],decls:41,vars:6,consts:[[1,"pg-page-enter","flex","flex-col","gap-10"],["eyebrow","Components","title","Overlays"],["description","",1,"m-0","text-body","text-neutral-600","dark:text-neutral-400"],["routerLink","/lecture","fragment","CDK",1,"pg-glossary-link"],["title","Modal","hint","Centered dialog for create/edit flows. Locked by default so users finish or cancel explicitly.","badge","ModalService",3,"code"],[1,"flex","flex-wrap","items-center","gap-3"],["africanies-button","","type","button","variant","primary",3,"click"],["africanies-button","","type","button","variant","secondary",3,"click"],["africanies-button","","type","button","variant","ghost",3,"click"],[1,"m-0","text-body-sm","text-neutral-600","dark:text-neutral-400"],[1,"font-medium","text-ink","dark:text-white"],["title","Drawer","hint","Slide-over panel for filters, details, or secondary forms. Same dismissible rules as modal.","badge","DrawerService",3,"code"],["africanies-button","","type","button",3,"click"],["title","Confirm","hint","Yes/no prompt before destructive or irreversible actions. Prefer this over a custom modal for simple decisions.","badge","ConfirmService",3,"code"],[1,"flex","flex-wrap","gap-3"],["africanies-button","","type","button","variant","danger",3,"click"],[1,"mt-3","m-0","text-body-sm","text-neutral-600","dark:text-neutral-400"]],template:function(a,i){a&1&&(ei(0,"div",0)(1,"app-page-header",1)(2,"p",2),MI(3," Service-driven dialogs for focused tasks: modal (forms), drawer (filters/side panels), and confirm (yes/no). Built on "),ei(4,"a",3),MI(5,"CDK"),gc(),MI(6," Overlay. Closed only by their actions unless you pass dismissible: true for backdrop / Escape. "),gc()(),ei(7,"app-demo-section",4)(8,"div",5)(9,"button",6),tp("click",function(){return i.openModal(false)}),MI(10," Open (locked) "),gc(),ei(11,"button",7),tp("click",function(){return i.openModal(true)}),MI(12," Open (dismissible) "),gc(),ei(13,"button",8),tp("click",function(){return i.openWideModal()}),MI(14," Open (size: lg) "),gc(),ei(15,"p",9),MI(16," Last result: "),ei(17,"span",10),MI(18),gc()()()(),ei(19,"app-demo-section",11)(20,"div",5)(21,"button",7),tp("click",function(){return i.openDrawer(false)}),MI(22," Open (locked) "),gc(),ei(23,"button",12),tp("click",function(){return i.openDrawer(true)}),MI(24," Open (dismissible) "),gc(),ei(25,"p",9),MI(26," Last result: "),ei(27,"span",10),MI(28),gc()()()(),ei(29,"app-demo-section",13)(30,"div",14)(31,"button",12),tp("click",function(){return i.openConfirm(false)}),MI(32," Neutral confirm "),gc(),ei(33,"button",15),tp("click",function(){return i.openConfirm(true)}),MI(34," Destructive confirm "),gc(),ei(35,"button",8),tp("click",function(){return i.openConfirm(false,true)}),MI(36," Dismissible confirm "),gc()(),ei(37,"p",16),MI(38," Last choice: "),ei(39,"span",10),MI(40),gc()()()()),a&2&&(Qy(7),Qf("code",i.modalCode),Qy(11),gp(i.modalResult()??"\u2014"),Qy(),Qf("code",i.drawerCode),Qy(9),gp(i.drawerResult()??"\u2014"),Qy(),Qf("code",i.confirmCode),Qy(11),gp(i.confirmResult()??"\u2014"));},dependencies:[Z,b,Ht,Hs],encapsulation:2})};export{L as OverlayPage};
@@ -0,0 +1 @@
1
+ import {by as ke,bz as un}from'./main-WEJC3BLT.js';function r(t,n){return t instanceof ke&&(t.status===401||t.status===403)?n?.suggestApiToken?"Authentication failed. Paste a valid API token in the header.":"You do not have permission to do that.":un(t)}export{r};
@@ -0,0 +1,292 @@
1
+ import {an as so,H as Ht}from'./chunk-Cg7brw6x.js';import'./chunk-CZBTrY_H.js';import {b}from'./chunk-Cy-ZOZI8.js';import {I as IE,H as Hs,e as ei,c as Zf,M as MI,a as gc,V as VE,Q as Qy,d as Qf,b as HE,J as zf,i as Ic,L as LE,P as PE,X as XE,f as gp}from'./main-WEJC3BLT.js';var k=(t,r)=>r.id,C=(t,r)=>r.name;function w(t,r){if(t&1&&(ei(0,"p",9),MI(1," How to call: "),ei(2,"a",12),MI(3),gc()()),t&2){let e=XE().$implicit;Qy(2),Qf("fragment",e.apiFragment),Qy(),gp(e.apiLabel??"SDK API");}}function x(t,r){if(t&1&&(ei(0,"article",11)(1,"div",13)(2,"h3",14),MI(3),gc(),ei(4,"p",15),MI(5),gc()(),ei(6,"p",3),MI(7),gc(),ei(8,"pre",16)(9,"code"),MI(10),gc()()()),t&2){let e=r.$implicit;Qy(3),Ic(" ",e.name," "),Qy(2),Ic(" ",e.packagePath," "),Qy(2),Ic(" ",e.description," "),Qy(3),gp(e.structure);}}function F(t,r){if(t&1&&(ei(0,"app-demo-section",8),LE(1,w,4,2,"p",9),ei(2,"div",10),VE(3,x,11,4,"article",11,C),gc()()),t&2){let e=r.$implicit;Qf("anchorId",e.id)("title",e.title)("hint",e.hint)("badge",e.models.length+""),Qy(),PE(e.apiFragment?1:-1),Qy(2),HE(e.models);}}function R(t,r){if(t&1&&(ei(0,"section",5)(1,"div",6)(2,"h2",7),MI(3),gc(),ei(4,"p",3),MI(5),gc()(),VE(6,F,5,5,"app-demo-section",8,k),gc()),t&2){let e=r.$implicit;zf("id",e.id),Qy(3),Ic(" ",e.title," "),Qy(2),Ic(" ",e.hint," "),Qy(),HE(e.groups);}}var S=class t{importCode=so;categories=[{id:"core",title:"Core contracts",hint:"Shared envelopes, pagination, async UI state, and shipping mode.",groups:[{id:"api",title:"API envelope",hint:"How every SDK HTTP call is wrapped \u2014 success, data, message, errors, pagination.",models:[{name:"ApiResponseModel<T>",packagePath:"api",description:"Canonical envelope: success, data, message, errors, pagination, status_code.",structure:`interface ApiResponseModel<T> {
2
+ success: boolean;
3
+ message: string | null;
4
+ data: T | null;
5
+ errors: ApiErrorDetailModel[] | null;
6
+ pagination: PaginationMetaModel | null;
7
+ status_code: number | null;
8
+ }`},{name:"ApiErrorDetailModel",packagePath:"api",description:"Field-level or global error detail on failed responses.",structure:`interface ApiErrorDetailModel {
9
+ field: string | null;
10
+ message: string;
11
+ code: string | null;
12
+ }`}]},{id:"pagination",title:"Pagination & ResourceId",hint:"List GET id segments and page metadata \u2014 usage on SDK API \u2192 ResourceId.",apiFragment:"resource-id",apiLabel:"ResourceId",models:[{name:"PaginationMetaModel",packagePath:"api",description:"Response-side slice: current_page, per_page, totals, has_next/previous_page.",structure:`interface PaginationMetaModel {
13
+ current_page: number;
14
+ per_page: number;
15
+ total_items: number;
16
+ total_pages: number;
17
+ has_next_page: boolean;
18
+ has_previous_page: boolean;
19
+ }`},{name:"PaginationQueryParamsModel",packagePath:"api",description:"Request-side page / size / order \u2014 only when ResourceId is null. SDK default size is 15 (UI: 5 / 15 / 30); notifications use 30.",structure:`interface PaginationQueryParamsModel {
20
+ page?: number;
21
+ size?: number;
22
+ order?: string;
23
+ }`},{name:"ResourceId",packagePath:"api",description:"null \u2192 paginated \xB7 'all' \u2192 full dump \xB7 number \u2192 single record.",structure:`type ResourceId = number | 'all' | null;
24
+ // null \u2192 GET {base} (+ page/size/order)
25
+ // 'all' \u2192 GET {base}/all
26
+ // 42 \u2192 GET {base}/42`}]},{id:"async",title:"Async query state",hint:"Snapshot for africanies-async-state \u2014 loading, fetching, error, and data.",models:[{name:"AsyncQueryStateModel<T>",packagePath:"async",description:"data, isLoading, isFetching, isError, error \u2014 map from injectQuery() or fetches.",structure:`interface AsyncQueryStateModel<T> {
27
+ data: T | undefined;
28
+ isLoading: boolean;
29
+ isFetching: boolean;
30
+ isError: boolean;
31
+ error: string | null;
32
+ }`}]},{id:"shipping",title:"Shipping mode",hint:"Import (STN) vs Export (SFN) \u2014 theme accents and x-shipment-mode.",models:[{name:"ShippingMode",packagePath:"shipping",description:"Product mode literal: 'stn' | 'sfn'.",structure:"type ShippingMode = 'stn' | 'sfn';"}]}]},{id:"reference-data",title:"Reference data",hint:"Shapes returned by ResourceId catalog services.",groups:[{id:"country",title:"Countries",hint:"Country list/detail \u2014 ISO codes and nested states.",apiFragment:"country",apiLabel:"CountryService",models:[{name:"CountryModel",packagePath:"country",description:"Country record with ISO codes and nested states from the public utility API.",structure:`interface CountryModel {
33
+ id: number;
34
+ name: string;
35
+ iso3: string;
36
+ iso2: string;
37
+ states: CountryStateModel[];
38
+ }`},{name:"CountryStateModel",packagePath:"country",description:"Subdivision under a country \u2014 wire `state_code`.",structure:`interface CountryStateModel {
39
+ name: string;
40
+ state_code: string;
41
+ }`}]},{id:"service",title:"Services",hint:"Public subscription/add-on catalog \u2014 App Settings Services board.",apiFragment:"service",apiLabel:"ServiceService",models:[{name:"ServiceModel",packagePath:"service",description:"Service catalog record (snake_case) from GET /public/service/read.",structure:`interface ServiceModel {
42
+ id: number;
43
+ name: string;
44
+ description: string | null;
45
+ model: string;
46
+ active: boolean;
47
+ deleted_at: string | null;
48
+ created_at: string | null;
49
+ updated_at: string | null;
50
+ }`}]},{id:"document",title:"Documents",hint:"Catalog by document id \u2014 bind readById preview as doc.file_ref.base_64. Raw file_ref strings \u2192 FileService.",apiFragment:"document",apiLabel:"DocumentService",models:[{name:"DocumentModel",packagePath:"document",description:"GET /public/document/read/{id} \u2014 preview bytes live on nested file_ref.",structure:`interface DocumentModel {
51
+ id: number;
52
+ name: string;
53
+ description: string | null;
54
+ type: string | null;
55
+ active: boolean;
56
+ deleted_at: string | null;
57
+ created_at: string | null;
58
+ updated_at: string | null;
59
+ file_ref: FileReadModel | null;
60
+ }`}]},{id:"plan",title:"Plans",hint:"Public subscription plans with nested packages.",apiFragment:"plan",apiLabel:"PlanService",models:[{name:"PlanModel",packagePath:"plan",description:"Plan catalog record with nested PlanPackageModel rows.",structure:`interface PlanModel {
61
+ id: number;
62
+ name: string;
63
+ active: boolean;
64
+ deleted_at: string | null;
65
+ created_at: string | null;
66
+ updated_at: string | null;
67
+ packages: PlanPackageModel[];
68
+ }`},{name:"PlanPackageModel",packagePath:"plan",description:"Line item under a plan \u2014 pricing tiers and linked company_service_id.",structure:`interface PlanPackageModel {
69
+ id: number;
70
+ plan_id: number | null;
71
+ company_service_id: number | null;
72
+ name: string;
73
+ metrics: string | null;
74
+ volume: number | null;
75
+ discount: string | null;
76
+ model: string | null;
77
+ monthly: string | null;
78
+ quarterly: string | null;
79
+ biannually: string | null;
80
+ annually: string | null;
81
+ active: boolean;
82
+ deleted_at: string | null;
83
+ created_at: string | null;
84
+ updated_at: string | null;
85
+ }`}]},{id:"currency",title:"Currencies",hint:"App Settings currencies \u2014 rates, flags, nested processors, and create/update/delete bodies.",apiFragment:"currency",apiLabel:"CurrencyService",models:[{name:"CurrencyModel",packagePath:"currency",description:"Currency record (snake_case) with wire rate strings and payment methods. is_naira_greater is the same flag as is_local_currency_greater.",structure:`interface CurrencyModel {
86
+ id: number;
87
+ name: string;
88
+ short_code: string;
89
+ division_rate: string;
90
+ multiplication_rate: string;
91
+ is_local_currency_greater: boolean;
92
+ is_naira_greater: boolean;
93
+ active: boolean;
94
+ deleted_at: string | null;
95
+ created_at: string | null;
96
+ updated_at: string | null;
97
+ payment_methods: CurrencyPaymentMethodModel[];
98
+ }`},{name:"CurrencyPaymentMethodModel",packagePath:"currency",description:"Processor attached to a currency (Paystack, Stripe, \u2026) plus pivot ids.",structure:`interface CurrencyPaymentMethodModel {
99
+ id: number;
100
+ name: string;
101
+ model: string;
102
+ active: boolean;
103
+ deleted_at: string | null;
104
+ created_at: string | null;
105
+ updated_at: string | null;
106
+ pivot: CurrencyPaymentMethodPivotModel;
107
+ }`},{name:"CurrencyPaymentMethodPivotModel",packagePath:"currency",description:"Join keys on currency \u2194 payment-method pivots.",structure:`interface CurrencyPaymentMethodPivotModel {
108
+ currency_id: number;
109
+ payment_method_id: number;
110
+ }`},{name:"CurrencyCreateRequestModel",packagePath:"currency",description:'POST /currency/create. name / short_code come from the host currency list. Flags may be boolean or "1" / "0".',structure:`interface CurrencyCreateRequestModel {
111
+ name: string;
112
+ short_code: string;
113
+ multiplication_rate: string;
114
+ division_rate: string;
115
+ active: boolean | CurrencyFlag01;
116
+ is_naira_greater: boolean | CurrencyFlag01;
117
+ payment_method_ids: number[];
118
+ }`},{name:"CurrencyUpdateRequestModel",packagePath:"currency",description:"PUT /currency/update \u2014 id, rates, flags, payment_method_ids. Name and short code are not sent.",structure:`interface CurrencyUpdateRequestModel {
119
+ id: number;
120
+ multiplication_rate: string;
121
+ division_rate: string;
122
+ active: boolean | CurrencyFlag01;
123
+ is_naira_greater: boolean | CurrencyFlag01;
124
+ payment_method_ids: number[];
125
+ }`},{name:"CurrencyDeleteRequestModel",packagePath:"currency",description:"DELETE /currency/delete JSON body. CurrencyService.remove also accepts a bare id.",structure:`interface CurrencyDeleteRequestModel {
126
+ id: number;
127
+ }`}]},{id:"payment-method",title:"Payment methods",hint:"App Settings processors \u2014 read + active toggle only (no create/delete). Nested currencies they accept.",apiFragment:"payment-method",apiLabel:"PaymentMethodService",models:[{name:"PaymentMethodModel",packagePath:"payment-method",description:"Processor record (snake_case) with nested currencies and pivot ids.",structure:`interface PaymentMethodModel {
128
+ id: number;
129
+ name: string;
130
+ model: string;
131
+ active: boolean;
132
+ deleted_at: string | null;
133
+ created_at: string | null;
134
+ updated_at: string | null;
135
+ currencies: PaymentMethodCurrencyModel[];
136
+ }`},{name:"PaymentMethodCurrencyModel",packagePath:"payment-method",description:"Currency nested on a processor \u2014 same rate fields as CurrencyModel plus pivot.",structure:`interface PaymentMethodCurrencyModel {
137
+ id: number;
138
+ name: string;
139
+ short_code: string;
140
+ division_rate: string;
141
+ multiplication_rate: string;
142
+ is_local_currency_greater: boolean;
143
+ is_naira_greater: boolean;
144
+ active: boolean;
145
+ deleted_at: string | null;
146
+ created_at: string | null;
147
+ updated_at: string | null;
148
+ pivot: CurrencyPaymentMethodPivotModel;
149
+ }`},{name:"PaymentMethodUpdateRequestModel",packagePath:"payment-method",description:"PUT /payment_method/update \u2014 id, name, model, active. Name/model are resent from the row; only active is edited (status switch).",structure:`interface PaymentMethodUpdateRequestModel {
150
+ id: number;
151
+ name: string;
152
+ model: string;
153
+ active: boolean | PaymentMethodFlag01;
154
+ }`}]},{id:"shipment-method",title:"Shipment methods / carriers",hint:"Carrier records with delivery windows, limits, and zone pages.",apiFragment:"shipment-method",apiLabel:"ShipmentMethodService",models:[{name:"ShipmentMethodModel",packagePath:"shipment-method",description:"Carrier with delivery windows, weight/dim limits, discounts, and zone_values.",structure:`interface ShipmentMethodModel {
155
+ id: number;
156
+ name: string;
157
+ slug: string;
158
+ mode: ShippingMode;
159
+ sea_only: boolean;
160
+ // \u2026commercial + dimension fields
161
+ zone_values: ShipmentMethodZonePageModel;
162
+ }`},{name:"ShipmentMethodZonePageModel",packagePath:"shipment-method",description:"First Laravel page of zone links on a method (`data` + totals).",structure:`interface ShipmentMethodZonePageModel {
163
+ data: ShipmentMethodZoneLinkModel[];
164
+ current_page: number;
165
+ per_page: number;
166
+ total: number;
167
+ last_page: number;
168
+ }`}]},{id:"warehouse",title:"Warehouses",hint:"Locations with address, charges, and nested country/state.",apiFragment:"warehouse",apiLabel:"WarehouseService",models:[{name:"WarehouseModel",packagePath:"warehouse",description:"Warehouse with address, geo, charges, and nested CountryModel.",structure:`interface WarehouseModel {
169
+ id: number;
170
+ name: string;
171
+ city: string;
172
+ zip_code: string;
173
+ country: CountryModel | null;
174
+ state: WarehouseStateModel | null;
175
+ api_enabled: boolean;
176
+ // \u2026charges, geo, flags
177
+ }`},{name:"WarehouseStateModel",packagePath:"warehouse",description:"Selected subdivision \u2014 wire state_code / country_code.",structure:`interface WarehouseStateModel {
178
+ id: number;
179
+ name: string;
180
+ state_code: string;
181
+ country: string;
182
+ country_code: string;
183
+ }`}]},{id:"zone",title:"Zones",hint:"Shipping zones for routing and pricing.",apiFragment:"zone",apiLabel:"ZoneService",models:[{name:"ZoneModel",packagePath:"zone",description:"Shipping zone record (name, type, active, timestamps).",structure:`interface ZoneModel {
184
+ id: number;
185
+ name: string;
186
+ type: string;
187
+ active: boolean;
188
+ deleted_at: string | null;
189
+ created_at: string | null;
190
+ updated_at: string | null;
191
+ }`}]},{id:"product",title:"Products",hint:"Catalog products \u2014 HS codes and document / ETW labels.",apiFragment:"product",apiLabel:"ProductService",models:[{name:"ProductModel",packagePath:"product",description:"Product record (snake_case) with HS codes and document labels.",structure:`interface ProductModel {
192
+ id: number;
193
+ account_id: number | null;
194
+ product_category_id: number | null;
195
+ hs_code: string;
196
+ hs_code_10: string | null;
197
+ hs_code_8: string | null;
198
+ hs_code_6: string | null;
199
+ name: string;
200
+ value: number;
201
+ usage: number;
202
+ document_ids: number[] | null;
203
+ etw_ids: number[] | null;
204
+ active: boolean;
205
+ is_external: boolean;
206
+ deleted_at: string | null;
207
+ created_at: string | null;
208
+ updated_at: string | null;
209
+ document_details: string[];
210
+ etw_document_details: string[];
211
+ zone_product_required_documents: ApiJsonValue[];
212
+ }`}]}]},{id:"session-config",title:"Session & config",hint:"Auth email flows, authenticated user profile, and STN/SFN region units.",groups:[{id:"auth",title:"Auth",hint:"POST /auth/forgot/password \u2014 email only; backend emails a reset link. This frontend does not handle that link.",apiFragment:"auth",apiLabel:"AuthService",models:[{name:"ForgotPasswordRequestModel",packagePath:"auth",description:"Request body for AuthService.forgot. Response data is typically []. Same call from login and admin user/partner screens.",structure:`interface ForgotPasswordRequestModel {
213
+ email: string;
214
+ }`}]},{id:"user",title:"Current user",hint:"Profile from GET /user after AuthTokenService.set. default_password \u2192 /onboarding/reset-password (change password), not the email-link flow.",apiFragment:"user",apiLabel:"UserService",models:[{name:"UserModel",packagePath:"user",description:"Authenticated profile (snake_case) with nested country and accounts.",structure:`interface UserModel {
215
+ id?: number | null;
216
+ central_id?: string | null;
217
+ name?: string | null;
218
+ first_name?: string | null;
219
+ last_name?: string | null;
220
+ email?: string | null;
221
+ country?: UserCountryModel | null;
222
+ state?: string | null;
223
+ main_region?: string | null;
224
+ shipping_type?: ShippingType | null;
225
+ business_account?: UserBusinessAccountModel | null;
226
+ account_manager?: UserAccountManagerModel | null;
227
+ default_password?: boolean | null;
228
+ // \u2026verification, flags, accounts
229
+ }`},{name:"ChangePasswordRequestModel",packagePath:"user",description:"POST /user/change/password after first login when default_password is set.",structure:`interface ChangePasswordRequestModel {
230
+ current_password: string;
231
+ password: string;
232
+ password_confirmation: string;
233
+ }`},{name:"UserBusinessAccountModel",packagePath:"user",description:"Optional business account with plan + subscription.",structure:`interface UserBusinessAccountModel {
234
+ id?: number | null;
235
+ name?: string | null;
236
+ type?: AccountType | null;
237
+ plan?: UserPlanModel | null;
238
+ subscription?: UserSubscriptionModel | null;
239
+ // \u2026
240
+ }`},{name:"UserCountryModel",packagePath:"user",description:"Country on the profile \u2014 states use state_code.",structure:`interface UserCountryModel {
241
+ id?: number | null;
242
+ name?: string | null;
243
+ iso2?: string | null;
244
+ states?: UserStateModel[] | null;
245
+ }`}]},{id:"notification",title:"Notifications",hint:"Authenticated inbox rows from GET /user/notifications/read/all.",apiFragment:"notification",apiLabel:"NotificationService",models:[{name:"NotificationModel",packagePath:"notification",description:"Laravel database notification with parsed data payload.",structure:`interface NotificationModel {
246
+ id: string;
247
+ type: string;
248
+ notifiable_type: string;
249
+ notifiable_id: number;
250
+ data: NotificationPayloadModel;
251
+ read_at: string | null;
252
+ created_at: string | null;
253
+ updated_at: string | null;
254
+ }`},{name:"NotificationPayloadModel",packagePath:"notification",description:"Parsed JSON from the data column \u2014 title, body, link, image.",structure:`interface NotificationPayloadModel {
255
+ user_id?: number | null;
256
+ title: string;
257
+ body?: string | null;
258
+ link?: string | null;
259
+ image?: string | null;
260
+ external_link?: boolean | null;
261
+ }`},{name:"NotificationInboxItemModel",packagePath:"notification",description:"Compact header/drawer item from mapNotificationInboxItem().",structure:`interface NotificationInboxItemModel {
262
+ id: string;
263
+ title: string;
264
+ body?: string;
265
+ timestamp?: string;
266
+ read?: boolean;
267
+ link?: string;
268
+ external_link?: boolean;
269
+ image?: string | null;
270
+ }`}]},{id:"mode-config",title:"Mode config",hint:"Per-mode region currency and units.",apiFragment:"mode-config",apiLabel:"ModeConfigService",models:[{name:"ModeConfigDataModel",packagePath:"mode",description:"Top-level STN/SFN region, currency, and unit config.",structure:`interface ModeConfigDataModel {
271
+ sfn: ModeSfnConfigModel;
272
+ stn: ModeStnConfigModel;
273
+ }`},{name:"ModeRegionConfigModel",packagePath:"mode",description:"Per-region currency symbol and measurement units.",structure:`interface ModeRegionConfigModel {
274
+ dimension_unit: 'cm' | 'inches';
275
+ mass_unit: 'KG' | 'LBS';
276
+ currency: 'NGN' | 'USD';
277
+ currency_symbol: string;
278
+ }`},{name:"ModeSfnConfigModel",packagePath:"mode",description:"SFN region map \u2014 default + Nigeria (ng).",structure:`interface ModeSfnConfigModel {
279
+ default: ModeRegionConfigModel;
280
+ ng: ModeRegionConfigModel;
281
+ }`},{name:"ModeStnConfigModel",packagePath:"mode",description:"STN region map \u2014 default + us / cn / gb.",structure:`interface ModeStnConfigModel {
282
+ default: ModeRegionConfigModel;
283
+ us: ModeRegionConfigModel;
284
+ cn: ModeRegionConfigModel;
285
+ gb: ModeRegionConfigModel;
286
+ }`}]}]},{id:"files",title:"Files",hint:"Single-object file payload \u2014 not a list.",groups:[{id:"file",title:"File read",hint:"POST /file/read \u2014 data is one FileReadModel.",apiFragment:"file",apiLabel:"FileService",models:[{name:"FileReadRequestModel",packagePath:"file",description:"Request body for FileService.read / readByBody.",structure:`interface FileReadRequestModel {
287
+ ref: string;
288
+ }`},{name:"FileReadModel",packagePath:"file",description:"Envelope data object \u2014 prefer url for downloads; base_64 can be large.",structure:`interface FileReadModel {
289
+ mime_type: string;
290
+ base_64: string;
291
+ url: string;
292
+ }`}]}]}];static \u0275fac=function(e){return new(e||t)};static \u0275cmp=IE({type:t,selectors:[["app-models-page"]],decls:10,vars:1,consts:[[1,"pg-page-enter","flex","flex-col","gap-10"],["eyebrow","Foundation","title","Models","description","TypeScript contracts from @africanies/africanies-models \u2014 field shapes only. Names end in *Model. For paths, ResourceId, and Show code usage, open Foundation \u2192 SDK API."],["title","Import","hint","Pull shapes from @africanies/africanies-models in any app or library. No providers required.",3,"code"],[1,"m-0","text-body-sm","text-neutral-600","dark:text-neutral-400"],["routerLink","/api",1,"font-medium","text-ink","underline-offset-2","hover:underline","dark:text-white"],[1,"flex","flex-col","gap-6"],[1,"flex","flex-col","gap-1","border-b","border-border","pb-3","dark:border-white/10"],[1,"m-0","text-heading-3","text-ink","dark:text-white"],[3,"anchorId","title","hint","badge"],[1,"mb-4","mt-0","text-caption","text-neutral-500","dark:text-neutral-400"],[1,"grid","gap-4"],[1,"flex","flex-col","gap-3","rounded-xl","border","border-border","bg-white","p-4","dark:border-white/10","dark:bg-ink","sm:p-5"],["routerLink","/api",1,"font-medium","text-ink","underline-offset-2","hover:underline","dark:text-white",3,"fragment"],[1,"flex","flex-wrap","items-baseline","justify-between","gap-2"],[1,"m-0","font-mono","text-body","font-medium","text-ink","dark:text-white"],[1,"m-0","text-caption","font-medium","uppercase","tracking-[0.12em]","text-neutral-400"],[1,"m-0","overflow-x-auto","rounded-lg","border","border-border","bg-[#1e1e1e]","p-3","font-mono","text-caption","leading-relaxed","text-[#d4d4d4]","dark:border-white/10"]],template:function(e,p){e&1&&(ei(0,"div",0),Zf(1,"app-page-header",1),ei(2,"app-demo-section",2)(3,"p",3),MI(4," Types only \u2014 no Angular providers. Service calls and snippets live on "),ei(5,"a",4),MI(6,"SDK API"),gc(),MI(7,". "),gc()(),VE(8,R,8,3,"section",5,k),gc()),e&2&&(Qy(2),Qf("code",p.importCode),Qy(6),HE(p.categories));},dependencies:[b,Ht,Hs],encapsulation:2})};export{S as ModelsPage};
@@ -0,0 +1 @@
1
+ import {v as vr,S as Sr,C as Cr,H as Ht}from'./chunk-Cg7brw6x.js';import'./chunk-CZBTrY_H.js';import {b}from'./chunk-Cy-ZOZI8.js';import {C as Co,I as IE,w as wr,e as ei,c as Zf,V as VE,j as jE,a as gc,M as MI,L as LE,Q as Qy,d as Qf,b as HE,P as PE,X as XE,f as gp,i as Ic,G as GE,t as tp,p as Gl,z as zl}from'./main-WEJC3BLT.js';function D(a,p){if(a&1&&(ei(0,"africanies-chip",4),MI(1),gc()),a&2){let e=p.$implicit,n=XE();Qf("variant",e),Qy(),gp(n.labels[e]);}}function F(a,p){if(a&1&&(ei(0,"africanies-chip",16),MI(1),gc(),ei(2,"africanies-chip",17),MI(3),gc()),a&2){let e=p.$implicit;Qf("size",e),Qy(),Ic("Size ",e),Qy(),Qf("size",e),Qy(),Ic("Size ",e);}}function R(a,p){if(a&1){let e=GE();ei(0,"africanies-chip",18),tp("removed",function(){let g=Gl(e).$implicit,N=XE();return zl(N.removeTag(g.id))}),MI(1),gc();}if(a&2){let e=p.$implicit;Qf("variant",e.variant)("removable",true),Qy(),Ic(" ",e.label," ");}}function M(a,p){if(a&1){let e=GE();ei(0,"button",19),tp("click",function(){Gl(e);let g=XE();return zl(g.resetTags())}),MI(1," Restore tags "),gc();}}var z=class a{variants=["neutral","success","warning","danger","export","import"];sizes=["sm","md"];labels={neutral:"Neutral",success:"Delivered",warning:"Pending",danger:"Exception",export:"SFN / export",import:"STN / import"};removableTags=Co([{id:1,label:"Lagos",variant:"export"},{id:2,label:"Exception",variant:"danger"},{id:3,label:"In transit",variant:"import"}]);variantsCode=vr;iconRemoveCode=Sr;tableCode=Cr;removeTag(p){this.removableTags.update(e=>e.filter(n=>n.id!==p));}resetTags(){this.removableTags.set([{id:1,label:"Lagos",variant:"export"},{id:2,label:"Exception",variant:"danger"},{id:3,label:"In transit",variant:"import"}]);}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=IE({type:a,selectors:[["app-chip-page"]],decls:29,vars:4,consts:[[1,"pg-page-enter","flex","flex-col","gap-10"],["eyebrow","Components","title","Chip","description","Small labels for status, category, or tags in tables, filters, and toolbars. Soft fills stay readable in light and dark mode."],["title","Variants","hint","neutral, success, warning, danger, plus export/import for shipping mode. success and export both use the SFN green family.","badge","6",3,"code"],[1,"flex","flex-wrap","items-center","gap-2"],[3,"variant"],["title","Size, icon, removable","hint","sm for dense table cells; md for filter bars. Add an icon for meaning, or removable when the user can clear a tag \u2014 parent owns the list.",3,"code"],[1,"flex","flex-col","gap-4"],["variant","warning","icon","clock"],["variant","success","icon","check-circle"],[3,"variant","removable"],["type","button",1,"text-caption","text-neutral-600","underline","dark:text-neutral-400"],["title","In a table cell","hint","Map your domain status to a ChipVariant in the host component; keep the chip itself presentational.",3,"code"],["variant","success"],["variant","import"],["variant","warning"],["variant","danger"],["variant","export",3,"size"],["variant","import",3,"size"],[3,"removed","variant","removable"],["type","button",1,"text-caption","text-neutral-600","underline","dark:text-neutral-400",3,"click"]],template:function(e,n){e&1&&(ei(0,"div",0),Zf(1,"app-page-header",1),ei(2,"app-demo-section",2)(3,"div",3),VE(4,D,2,2,"africanies-chip",4,jE),gc()(),ei(6,"app-demo-section",5)(7,"div",6)(8,"div",3),VE(9,F,4,4,null,null,jE),gc(),ei(11,"div",3)(12,"africanies-chip",7),MI(13,"Pending review"),gc(),ei(14,"africanies-chip",8),MI(15,"Verified"),gc(),VE(16,R,2,3,"africanies-chip",9,jE),LE(18,M,2,0,"button",10),gc()()(),ei(19,"app-demo-section",11)(20,"div",3)(21,"africanies-chip",12),MI(22,"Delivered"),gc(),ei(23,"africanies-chip",13),MI(24,"In transit"),gc(),ei(25,"africanies-chip",14),MI(26,"Pending"),gc(),ei(27,"africanies-chip",15),MI(28,"Exception"),gc()()()()),e&2&&(Qy(2),Qf("code",n.variantsCode),Qy(2),HE(n.variants),Qy(2),Qf("code",n.iconRemoveCode),Qy(3),HE(n.sizes),Qy(7),HE(n.removableTags()),Qy(2),PE(n.removableTags().length===0?18:-1),Qy(),Qf("code",n.tableCode));},dependencies:[wr,b,Ht],encapsulation:2})};export{z as ChipPage};
@@ -0,0 +1 @@
1
+ var o=["Lagos","Accra","Nairobi","Cairo"],c=["London","Manchester","Dubai","Berlin"],n=[{status:"In transit",shipmentStatus:"in-process"},{status:"Pending",shipmentStatus:"pending"},{status:"Delivered",shipmentStatus:"completed"},{status:"Exception",shipmentStatus:"pending"}],u=[{reference:"STN-1042",origin:"Lagos",destination:"London",route:"Lagos \u2192 London",status:"In transit",shipmentStatus:"in-process",paymentStatus:"paid",trackingNumber:"TN-8000",updated:"2 hours ago"},{reference:"SFN-8811",origin:"Accra",destination:"Manchester",route:"Accra \u2192 Manchester",status:"Pending",shipmentStatus:"pending",paymentStatus:"unpaid",trackingNumber:"TN-8001",updated:"Yesterday"},{reference:"STN-2207",origin:"Nairobi",destination:"Dubai",route:"Nairobi \u2192 Dubai",status:"Delivered",shipmentStatus:"completed",paymentStatus:"paid",trackingNumber:"TN-8002",updated:"3 days ago"},{reference:"SFN-4410",origin:"Cairo",destination:"Berlin",route:"Cairo \u2192 Berlin",status:"Exception",shipmentStatus:"pending",paymentStatus:"unpaid",trackingNumber:"TN-8003",updated:"5 hours ago"}],p=Array.from({length:20},(s,e)=>{let t=e+4,a=o[t%o.length]??"Lagos",i=c[t%c.length]??"London",r=n[t%n.length]??n[0];return {reference:`${t%2===0?"STN":"SFN"}-${3e3+t*19}`,origin:a,destination:i,route:`${a} \u2192 ${i}`,status:r.status,shipmentStatus:r.shipmentStatus,paymentStatus:t%3===0?"unpaid":"paid",trackingNumber:`TN-${8100+t}`,updated:`${t+1} hours ago`}}),d=[...u,...p];function S(s){return d.find(e=>e.reference===s)}export{S,d};
@@ -0,0 +1 @@
1
+ import {k as TP,I as IE,l as tI,n as mc,L as LE,M as MI,y as yc,o as nI,Q as Qy,P as PE,f as gp,X as XE,i as Ic}from'./main-WEJC3BLT.js';var y=[[["","description",""]],[["","actions",""]]],C=["[description]","[actions]"];function E(e,d){if(e&1&&(mc(0,"p",1),MI(1),yc()),e&2){let t=XE();Qy(),gp(t.eyebrow());}}function v(e,d){if(e&1&&(mc(0,"p",5),MI(1),yc()),e&2){let t=XE();Qy(),Ic(" ",t.description()," ");}}var b=class e{eyebrow=TP(null);title=TP.required();description=TP(null);static \u0275fac=function(t){return new(t||e)};static \u0275cmp=IE({type:e,selectors:[["app-page-header"]],inputs:{eyebrow:[1,"eyebrow"],title:[1,"title"],description:[1,"description"]},ngContentSelectors:C,decls:9,vars:3,consts:[[1,"mb-8","flex","flex-col","gap-3","border-b","border-border","pb-6","dark:border-white/10"],[1,"pg-kicker","m-0"],[1,"flex","flex-col","gap-2","sm:flex-row","sm:items-end","sm:justify-between"],[1,"flex","max-w-3xl","flex-col","gap-2"],[1,"m-0","text-heading-2","text-ink","dark:text-white"],[1,"m-0","text-body","text-neutral-600","dark:text-neutral-400"]],template:function(t,l){t&1&&(tI(y),mc(0,"header",0),LE(1,E,2,1,"p",1),mc(2,"div",2)(3,"div",3)(4,"h1",4),MI(5),yc(),LE(6,v,2,1,"p",5),nI(7),yc(),nI(8,1),yc()()),t&2&&(Qy(),PE(l.eyebrow()?1:-1),Qy(4),gp(l.title()),Qy(),PE(l.description()?6:-1));},encapsulation:2})};export{b};
@@ -0,0 +1 @@
1
+ import {d}from'./chunk-CtndMAe2.js';import {ac as Bo,H as Ht}from'./chunk-Cg7brw6x.js';import'./chunk-CZBTrY_H.js';import {b}from'./chunk-Cy-ZOZI8.js';import {T,aO as pt,ah as Ee,af as vn,ag as dt,C as Co,aC as pt$1,am as In,ao as Q,u as QI,an as dn,aj as Zr,I as IE,q as yn,aG as Qt,w as wr,aF as Vr,e as ei,c as Zf,t as tp,aJ as Uf,a as gc,Q as Qy,d as Qf,M as MI,f as gp,X as XE,i as Ic}from'./main-WEJC3BLT.js';function H(i,e){if(i&1&&(ei(0,"span",7),MI(1),gc()),i&2){let t=e.$implicit;Qy(),gp(t.reference);}}function q(i,e){if(i&1&&(ei(0,"africanies-chip",8),MI(1),gc()),i&2){let t=e.$implicit,a=XE();Qf("variant",a.statusVariant(t.status)),Qy(),Ic(" ",t.status," ");}}function O(i,e){if(i&1&&Zf(0,"africanies-action-menu",9),i&2){let t=e.$implicit,a=XE();Qf("items",a.rowActions(t))("ariaLabel","Actions for "+t.reference);}}var S=Zr,V=class i{router=T(pt);route=T(Ee);filterDrawer=T(vn);filterQuery=T(dt);routeCode=Bo;page=Co(1);pageSize=Co(pt$1);filterState=Co(In());constructor(){this.syncFromUrl(),this.route.queryParamMap.pipe(Q()).subscribe(()=>{this.syncFromUrl();});}columns=[{key:"reference",header:"Reference"},{key:"route",header:"Route"},{key:"status",header:"Status"},{key:"actions",header:"",width:"3.5rem"}];rowTrackBy=e=>e.reference;filteredRows=QI(()=>{let e=this.filterState(),t=e.search?.trim().toLowerCase(),a=e.values.shipment_status,r=e.values.payment_status,n=e.values.tracking_number?.trim().toLowerCase();return d.filter(s=>!(t&&!s.reference.toLowerCase().includes(t)&&!s.trackingNumber.toLowerCase().includes(t)||a&&s.shipmentStatus!==a||r&&s.paymentStatus!==r||n&&!s.trackingNumber.toLowerCase().includes(n)))});pageRows=QI(()=>{let e=this.pageSize(),t=(this.page()-1)*e;return this.filteredRows().slice(t,t+e)});meta=QI(()=>{let e=this.pageSize(),t=this.filteredRows().length,a=Math.max(1,Math.ceil(t/e)),r=Math.min(this.page(),a);return {current_page:r,per_page:e,total_items:t,total_pages:a,has_next_page:r<a,has_previous_page:r>1}});activeFilterCount=QI(()=>{let e=dn(this.filterState(),S);return Object.keys(e).filter(t=>t!=="page"&&t!=="size"&&t!=="order"&&t!=="per_page").length});statusVariant(e){switch(e){case "Delivered":return "success";case "Exception":return "danger";case "Pending":return "warning";default:return "neutral"}}rowActions(e){return [{label:"View details",icon:"eye",onClick:()=>{this.router.navigate(["/usecases/shipment",e.reference],{queryParamsHandling:"preserve"});}}]}onPageChange(e){this.page.set(e);}onSizeChange(e){this.pageSize.set(e),this.page.set(1);}openFilters(){this.filterDrawer.open({config:S,state:this.filterState(),title:"Filter shipments"}).afterClosed().subscribe(e=>{e?.applied&&(this.filterState.set(e.state),this.page.set(1));});}syncFromUrl(){let e=this.filterQuery.read(S);this.filterState.set(e),this.page.set(e.page??1),this.pageSize.set(e.size??pt$1);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=IE({type:i,selectors:[["app-shipment-list-page"]],decls:7,vars:7,consts:[[1,"pg-page-enter","flex","flex-col","gap-10"],["eyebrow","Use cases","title","Back button and Breadcrumbs","description","You do not implement Back or breadcrumbs \u2014 they ship with africanies-app-shell. This list also hydrates filters and pagination from the URL, so a shared link (or Back from detail) reopens the same page and criteria."],["title","Example: list to detail","hint","Filter or change page \u2014 the address bar updates. Open \u22EF \u2192 View details, then Back: the same queries return. Paste this list URL in a new tab and it restores too.","badge","built-in",3,"code"],[3,"filterClick","pageChange","sizeChange","columns","rows","meta","showFilter","filterCount","rowTrackBy"],["africaniesCellDef","reference"],["africaniesCellDef","status"],["africaniesCellDef","actions"],[1,"font-medium","text-ink","dark:text-white"],[3,"variant"],[3,"items","ariaLabel"]],template:function(t,a){t&1&&(ei(0,"div",0),Zf(1,"app-page-header",1),ei(2,"app-demo-section",2)(3,"africanies-table",3),tp("filterClick",function(){return a.openFilters()})("pageChange",function(n){return a.onPageChange(n)})("sizeChange",function(n){return a.onSizeChange(n)}),Uf(4,H,2,1,"ng-template",4)(5,q,2,2,"ng-template",5)(6,O,1,2,"ng-template",6),gc()()()),t&2&&(Qy(2),Qf("code",a.routeCode),Qy(),Qf("columns",a.columns)("rows",a.pageRows())("meta",a.meta())("showFilter",true)("filterCount",a.activeFilterCount())("rowTrackBy",a.rowTrackBy));},dependencies:[yn,Qt,wr,Vr,b,Ht],encapsulation:2})};export{V as ShipmentListPage};
@@ -0,0 +1 @@
1
+ import {c as cr,p as pr,d as dr,m as mr,u as ur,f as fr,g as gr,h as hr,b as br,H as Ht}from'./chunk-Cg7brw6x.js';import'./chunk-CZBTrY_H.js';import {b}from'./chunk-Cy-ZOZI8.js';import {C as Co,I as IE,Z,h as br$1,g,e as ei,c as Zf,V as VE,j as jE,a as gc,M as MI,t as tp,Q as Qy,d as Qf,b as HE,i as Ic,k as TP,l as tI,n as mc,o as nI,y as yc,f as gp,X as XE}from'./main-WEJC3BLT.js';var $=["*"],f=class d{label=TP.required();static \u0275fac=function(o){return new(o||d)};static \u0275cmp=IE({type:d,selectors:[["app-variant-label"]],inputs:{label:[1,"label"]},ngContentSelectors:$,decls:4,vars:1,consts:[[1,"flex","flex-col","items-start","gap-2"],[1,"text-caption","text-neutral-600","dark:text-neutral-400"]],template:function(o,i){o&1&&(tI(),mc(0,"div",0),nI(1),mc(2,"span",1),MI(3),yc()()),o&2&&(Qy(3),gp(i.label()));},encapsulation:2})};function j(d,l){if(d&1&&(ei(0,"app-variant-label",4)(1,"button",48),MI(2),gc()()),d&2){let o=l.$implicit,i=XE();Qf("label",o),Qy(),Qf("variant",o),Qy(),gp(i.labels[o]);}}function G(d,l){if(d&1&&(ei(0,"app-variant-label",4)(1,"button",49),MI(2,"Continue"),gc()()),d&2){let o=l.$implicit;Qf("label","size="+o),Qy(),Qf("size",o);}}function W(d,l){if(d&1&&(ei(0,"th",10),MI(1),gc()),d&2){let o=l.$implicit;Qy(),gp(o);}}function X(d,l){if(d&1&&(ei(0,"td",51)(1,"button",52),MI(2," Action "),gc()()),d&2){let o=l.$implicit,i=XE().$implicit;Qy(),Qf("variant",i)("size",o);}}function q(d,l){if(d&1&&(ei(0,"tr",11)(1,"td",50),MI(2),gc(),VE(3,X,3,2,"td",51,jE),gc()),d&2){let o=l.$implicit,i=XE();Qy(2),gp(o),Qy(),HE(i.sizes);}}var A=class d{variants=["primary","secondary","ghost","ghost-primary","ghost-danger","underline","danger"];sizes=["sm","md","lg"];labels={primary:"Save shipment",secondary:"Save draft",ghost:"Cancel","ghost-primary":"Add row","ghost-danger":"Remove",underline:"Learn more",danger:"Delete"};variantsCode=cr;sizesCode=pr;matrixCode=dr;iconsCode=mr;linksCode=ur;disabledCode=fr;loadingCode=gr;contextCode=hr;copyCode=br;copyReference="SFN-1042";copySnippet='<africanies-icon name="airplane" />';saving=Co(false);save(){this.saving.set(true),window.setTimeout(()=>this.saving.set(false),1600);}static \u0275fac=function(o){return new(o||d)};static \u0275cmp=IE({type:d,selectors:[["app-button-page"]],decls:82,vars:20,consts:[[1,"pg-page-enter","flex","flex-col","gap-10"],["eyebrow","Components","title","Button","description","Primary CTAs, secondary actions, and ghost/danger controls. Use the africanies-button attribute on a native button or anchor. Primary and ghost-primary follow shipping mode \u2014 Export (SFN) green or Import (STN) orange."],["title","Variants","hint","Pick the visual weight for the action. Primary and ghost-primary are mode-colored \u2014 flip STN/SFN in the sidebar to see them change.","badge","7",3,"code"],[1,"flex","flex-wrap","items-end","gap-6"],[3,"label"],["title","Sizes","hint","sm for dense toolbars and table actions; md for forms; lg when the button is the main call to action.",3,"code"],["title","Variant \xD7 size matrix","hint","Every variant at every size \u2014 useful when checking density in a toolbar vs a dialog footer.","muted","",3,"code"],[1,"overflow-x-auto"],[1,"w-full","border-collapse","text-left"],[1,"text-caption","text-neutral-600"],[1,"pb-3","pr-4","font-medium"],[1,"border-t","border-border","dark:border-white/10"],["title","With icons","hint","Place an africanies-icon inside the button for create, filter, and similar actions.",3,"code"],[1,"flex","flex-wrap","gap-3"],["africanies-button","","type","button","variant","primary"],["name","airplane",3,"size"],["africanies-button","","type","button","variant","secondary"],["name","adjust",3,"size"],["africanies-button","","type","button","variant","ghost","size","sm"],["name","warehouse",3,"size"],["africanies-button","","type","button","variant","danger","size","sm"],["name","warning",3,"size"],["title","As links","hint","Same styles on <a> when the control should navigate instead of run an action.",3,"code"],["africanies-button","","href","#primary","variant","primary"],["africanies-button","","href","#secondary","variant","secondary","size","sm"],["africanies-button","","href","#ghost","variant","ghost"],["title","Loading","hint","Bind [loading] for in-flight mutations. The circular spinner replaces the label and the control stays the same width.",3,"code"],[1,"flex","flex-wrap","items-center","gap-3"],["africanies-button","","type","button","variant","primary",3,"click","loading"],["africanies-button","","type","button","variant","secondary",3,"loading"],["africanies-button","","type","button","variant","danger","size","sm",3,"loading"],["title","Disabled","hint","Unavailable actions. Native buttons use disabled; anchors use aria-disabled so they stay in the tab order safely.",3,"code"],["africanies-button","","type","button","variant","primary","disabled",""],["africanies-button","","type","button","variant","secondary","disabled",""],["africanies-button","","type","button","variant","ghost","disabled",""],["africanies-button","","type","button","variant","danger","disabled",""],["title","Copy to clipboard","hint","africanies-copy for IDs, tracking numbers, and snippets. Icon-only or labeled; shows a check briefly after a successful copy.",3,"code"],[1,"flex","flex-wrap","items-center","gap-4"],[1,"rounded-md","bg-border/60","px-2.5","py-1.5","font-mono","text-caption","text-ink","dark:bg-white/10","dark:text-white"],["ariaLabel","Copy reference",3,"value"],["label","Copy snippet",3,"value","announce"],["title","In context","hint","Typical page toolbar: primary create on the left, secondary utilities on the right.",3,"code"],[1,"flex","flex-wrap","items-center","justify-between","gap-3","rounded-lg","border","border-border","bg-background-welcome","px-4","py-3","dark:border-white/10","dark:bg-ink-950"],[1,"m-0","text-body","font-medium","text-ink","dark:text-white"],[1,"m-0","text-caption","text-neutral-600"],[1,"flex","flex-wrap","gap-2"],["africanies-button","","type","button","variant","secondary","size","sm"],["africanies-button","","type","button","variant","primary","size","sm"],["africanies-button","","type","button",3,"variant"],["africanies-button","","type","button",3,"size"],[1,"py-3","pr-4","text-body-sm","text-neutral-600"],[1,"py-3","pr-4"],["africanies-button","","type","button",3,"variant","size"]],template:function(o,i){o&1&&(ei(0,"div",0),Zf(1,"app-page-header",1),ei(2,"app-demo-section",2)(3,"div",3),VE(4,j,3,3,"app-variant-label",4,jE),gc()(),ei(6,"app-demo-section",5)(7,"div",3),VE(8,G,3,2,"app-variant-label",4,jE),gc()(),ei(10,"app-demo-section",6)(11,"div",7)(12,"table",8)(13,"thead")(14,"tr",9)(15,"th",10),MI(16,"Variant"),gc(),VE(17,W,2,1,"th",10,jE),gc()(),ei(19,"tbody"),VE(20,q,5,1,"tr",11,jE),gc()()()(),ei(22,"app-demo-section",12)(23,"div",13)(24,"button",14),Zf(25,"africanies-icon",15),MI(26," Create shipment "),gc(),ei(27,"button",16),Zf(28,"africanies-icon",17),MI(29," Filters "),gc(),ei(30,"button",18),Zf(31,"africanies-icon",19),MI(32," Warehouse "),gc(),ei(33,"button",20),Zf(34,"africanies-icon",21),MI(35," Void "),gc()()(),ei(36,"app-demo-section",22)(37,"div",13)(38,"a",23),MI(39,"Primary link"),gc(),ei(40,"a",24),MI(41,"Secondary link"),gc(),ei(42,"a",25),MI(43,"Ghost link"),gc()()(),ei(44,"app-demo-section",26)(45,"div",27)(46,"button",28),tp("click",function(){return i.save()}),MI(47," Save shipment "),gc(),ei(48,"button",29),MI(49," Saving draft "),gc(),ei(50,"button",30),MI(51," Deleting "),gc()()(),ei(52,"app-demo-section",31)(53,"div",13)(54,"button",32),MI(55,"Primary"),gc(),ei(56,"button",33),MI(57,"Secondary"),gc(),ei(58,"button",34),MI(59,"Ghost"),gc(),ei(60,"button",35),MI(61,"Danger"),gc()()(),ei(62,"app-demo-section",36)(63,"div",37)(64,"code",38),MI(65),gc(),Zf(66,"africanies-copy",39)(67,"africanies-copy",40),gc()(),ei(68,"app-demo-section",41)(69,"div",42)(70,"div")(71,"p",43),MI(72,"Shipment SFN-1042"),gc(),ei(73,"p",44),MI(74,"Draft \xB7 Lagos \u2192 London"),gc()(),ei(75,"div",45)(76,"button",18),MI(77,"Cancel"),gc(),ei(78,"button",46),MI(79,"Save draft"),gc(),ei(80,"button",47),MI(81,"Submit"),gc()()()()()),o&2&&(Qy(2),Qf("code",i.variantsCode),Qy(2),HE(i.variants),Qy(2),Qf("code",i.sizesCode),Qy(2),HE(i.sizes),Qy(2),Qf("code",i.matrixCode),Qy(7),HE(i.sizes),Qy(3),HE(i.variants),Qy(2),Qf("code",i.iconsCode),Qy(3),Qf("size",16),Qy(3),Qf("size",16),Qy(3),Qf("size",14),Qy(3),Qf("size",14),Qy(2),Qf("code",i.linksCode),Qy(8),Qf("code",i.loadingCode),Qy(2),Qf("loading",i.saving()),Qy(2),Qf("loading",true),Qy(2),Qf("loading",true),Qy(2),Qf("code",i.disabledCode),Qy(10),Qf("code",i.copyCode),Qy(3),Ic(" ",i.copyReference," "),Qy(),Qf("value",i.copyReference),Qy(),Qf("value",i.copySnippet)("announce",true),Qy(),Qf("code",i.contextCode));},dependencies:[Z,br$1,g,b,Ht,f],encapsulation:2})};export{A as ButtonPage};
@@ -0,0 +1 @@
1
+ import {T as Mo,X as Io,Z as No,H as Ht}from'./chunk-Cg7brw6x.js';import'./chunk-CZBTrY_H.js';import {b}from'./chunk-Cy-ZOZI8.js';import {T,ai as Ke,I as IE,Z,H as Hs,e as ei,M as MI,a as gc,t as tp,Q as Qy,d as Qf}from'./main-WEJC3BLT.js';var S=class d{toast=T(Ke);variantsCode=Mo;stackCode=Io;httpCode=No;showInfo(){this.toast.info("Cutoff is in 2 hours for this lane.","Reminder");}showSuccess(){this.toast.success("Shipment saved","Done");}showWarning(){this.toast.warning("Rates may be outdated. Refresh before quoting.");}showError(){this.toast.error("Could not reach the carrier API.","Request failed");}showManyErrors(){for(let c of ["FedEx","UPS","DHL","USPS","OnTrac","LaserShip","Amazon","XPO"])this.toast.error(`Could not reach ${c}.`,"Request failed");}clearAll(){this.toast.clear();}spamError(){this.toast.error("Warehouse offline","Sync failed");}simulateOk(){this.toast.success("Shipment created");}simulateFail(){this.toast.error("Could not create shipment","Request failed");}simulateSilentOk(){this.toast.info("Finished with withToast({ success: false }) \u2014 no success toast.");}static \u0275fac=function(a){return new(a||d)};static \u0275cmp=IE({type:d,selectors:[["app-toast-page"]],decls:32,vars:3,consts:[[1,"pg-page-enter","flex","flex-col","gap-10"],["eyebrow","Components","title","Toast"],["description","",1,"m-0","text-body","text-neutral-600","dark:text-neutral-400"],["routerLink","/lecture","fragment","CDK",1,"pg-glossary-link"],["title","Variants","hint","info / success auto-dismiss ~4.5s; warning ~8s; error stays until closed. Hover pauses the timer. A long stack scrolls inside the corner instead of running off-screen.",3,"code"],[1,"flex","flex-wrap","gap-2"],["africanies-button","","type","button","variant","secondary",3,"click"],["africanies-button","","type","button",3,"click"],["africanies-button","","type","button","variant","danger",3,"click"],["africanies-button","","type","button","variant","ghost",3,"click"],["title","Collapse","hint","When the same error fires repeatedly, toasts stack into one group with a count instead of flooding the corner.",3,"code"],["title","HTTP tagging","hint","Tag real requests with withToast() so success/error toasts fire automatically. These buttons only simulate that bridge.",3,"code"]],template:function(a,t){a&1&&(ei(0,"div",0)(1,"app-page-header",1)(2,"p",2),MI(3," Short messages in the corner after an action (saved, failed, reminder). Mounted with "),ei(4,"a",3),MI(5,"CDK"),gc(),MI(6," Overlay. Errors stay until dismissed; warnings linger longer; identical messages collapse into one with a count. Enable with provideAfricaniesToasts(). "),gc()(),ei(7,"app-demo-section",4)(8,"div",5)(9,"button",6),tp("click",function(){return t.showInfo()}),MI(10," Info "),gc(),ei(11,"button",7),tp("click",function(){return t.showSuccess()}),MI(12,"Success"),gc(),ei(13,"button",6),tp("click",function(){return t.showWarning()}),MI(14," Warning "),gc(),ei(15,"button",8),tp("click",function(){return t.showError()}),MI(16," Error "),gc(),ei(17,"button",6),tp("click",function(){return t.showManyErrors()}),MI(18," Several errors "),gc(),ei(19,"button",9),tp("click",function(){return t.clearAll()}),MI(20," Clear all "),gc()()(),ei(21,"app-demo-section",10)(22,"button",8),tp("click",function(){return t.spamError()}),MI(23," Repeat same error "),gc()(),ei(24,"app-demo-section",11)(25,"div",5)(26,"button",7),tp("click",function(){return t.simulateOk()}),MI(27," As if success "),gc(),ei(28,"button",8),tp("click",function(){return t.simulateFail()}),MI(29," As if error "),gc(),ei(30,"button",6),tp("click",function(){return t.simulateSilentOk()}),MI(31," Success toast off "),gc()()()()),a&2&&(Qy(7),Qf("code",t.variantsCode),Qy(14),Qf("code",t.stackCode),Qy(3),Qf("code",t.httpCode));},dependencies:[Z,b,Ht,Hs],encapsulation:2})};export{S as ToastPage};
@@ -0,0 +1 @@
1
+ import {l as jr,n as zr,G as Gr,o as Vr,q as qr,r as Hr,K as Kr,W as Wr,$ as $r,Y as Yr,H as Ht}from'./chunk-Cg7brw6x.js';import'./chunk-CZBTrY_H.js';import {b}from'./chunk-Cy-ZOZI8.js';import {C as Co,I as IE,U as Gt,W as ri,Y as yt,_ as Xn,$ as ni,a0 as ii,a1 as ti,a2 as Zn,a3 as Wt,a4 as oi,a5 as $t,g,a6 as Ca,a7 as Ea,e as ei,c as Zf,a8 as Ep,a as gc,M as MI,a9 as AI,t as tp,aa as HI,Q as Qy,d as Qf,ab as vp,F as FI,f as gp,ac as $I,i as Ic,ad as UI,ae as RI}from'./main-WEJC3BLT.js';var Z=()=>["ng","gh","za","ke"],$=(_,c)=>m=>m.file.name,Q=class _{tracking=Co("");reference=Co("");email=Co("not-an-email");locked=Co("WH-LOCKED-01");instructions=Co("");notesError=Co("x".repeat(12));amount=Co(12500);weight=Co(24.5);warehouses=Co([{label:"Lagos Hub",value:"los",prefix:"warehouse",suffix:"globe"},{label:"Accra Depot",value:"acc",prefix:"warehouse"},{label:"Johannesburg FC",value:"jnb",prefix:"warehouse",suffix:"flag"},{label:"Cairo Gateway",value:"cai",prefix:"warehouse"}]);selectedWarehouse=Co(null);tags=Co([{label:"Fragile",value:"fragile",prefix:"warning"},{label:"Priority",value:"priority",prefix:"alarm"},{label:"Bonded",value:"bonded",prefix:"anchor"}]);selectedTags=Co([]);incoterms=[{label:"DDP",value:"ddp"},{label:"DAP",value:"dap"},{label:"EXW",value:"exw"},{label:"FOB",value:"fob"}];selectedIncoterm=Co(null);carriers=[{label:"DHL Express",value:"dhl",prefix:"airplane",suffix:"check-circle"},{label:"FedEx",value:"fedex",prefix:"airplane"},{label:"UPS",value:"ups",prefix:"airplane",suffix:"globe"}];selectedCarrier=Co(null);pickupAddress=Co(null);lastPlaceSelected=Co(null);signature=Co(true);insured=Co(false);terms=Co(false);smsNotify=Co(true);holdAtDepot=Co(false);customsHold=Co(false);customsHoldSaving=Co(false);serviceLevels=[{label:"Economy",value:"economy"},{label:"Standard",value:"standard"},{label:"Express",value:"express"}];serviceLevel=Co("standard");readyDate=Co("2026-08-15");cutoffDate=Co(null);files=Co([]);buttonFiles=Co([]);compactFiles=Co([]);otpCodeValue=Co("");otpPin=Co("");otpError=Co("0000");lastOtpCompleted=Co("");otpResendCount=Co(0);textCode=jr;textareaCode=zr;numberCode=Gr;selectCode=Vr;addressCode=qr;choiceCode=Hr;otpCode=Kr;dateFileCode=Wr;fileUploadCode=$r;liveValuesCode=Yr;onPlaceSelected(c){this.lastPlaceSelected.set(c);}onFiles(c){this.files.set(c);}onButtonFiles(c){this.buttonFiles.set(c);}onCompactFiles(c){this.compactFiles.set(c);}onOtpCompleted(c){this.lastOtpCompleted.set(c);}onOtpResend(){this.otpResendCount.update(c=>c+1);}saveCustomsHold(c){this.customsHoldSaving.set(true),window.setTimeout(()=>{this.customsHold.set(c),this.customsHoldSaving.set(false);},1200);}tagSummary(){let c=this.selectedTags();return c.length?c.map(m=>m.label).join(", "):"\u2014"}static \u0275fac=function(m){return new(m||_)};static \u0275cmp=IE({type:_,selectors:[["app-forms-page"]],decls:105,vars:79,consts:[[1,"pg-page-enter","flex","flex-col","gap-10"],["eyebrow","Components","title","Form controls","description","Shared inputs for product forms: label, hint, field error, prefix/suffix slots, and Angular forms via ControlValueAccessor. Use these instead of one-off HTML fields so spacing and errors stay consistent."],["title","Text input","hint","Single-line text \u2014 plain, with a prefix icon, with a validation error, or disabled.",3,"code"],[1,"grid","gap-5","md:grid-cols-2"],["label","Tracking number","hint","As printed on the airway bill","placeholder","e.g. AWB-12345",3,"valueChange","value"],["label","Reference","placeholder","Optional internal ref",3,"valueChange","value"],["prefix","","name","anchor",3,"size"],["label","Consignee email","error","Enter a valid email address",3,"valueChange","value"],["label","Locked field",3,"valueChange","disabled","value"],["title","Textarea","hint","Multi-line notes and instructions \u2014 same label / hint / error pattern as text input.",3,"code"],["label","Special instructions","hint","Visible to warehouse staff","placeholder","Fragile \u2014 keep upright",3,"valueChange","value"],["label","Notes","error","Notes cannot exceed 500 characters",3,"valueChange","value"],["title","Number input","hint","Numeric values (weight, declared value). Commas are display-only; the bound value stays a number.",3,"code"],["label","Declared value (USD)",3,"valueChange","value"],["prefix",""],["label","Weight","hint","Kilograms",3,"valueChange","value"],["suffix",""],["title","Select","hint","Choose from a list \u2014 searchable, creatable free text, and multi-select for tags and filters.","badge","3 modes",3,"code"],["label","Warehouse",3,"selectedChange","options","searchable","selected"],["prefix","","name","warehouse",3,"size"],["label","Tags",3,"optionsChange","selectedChange","searchable","allowFreeText","multiple","maxSelected","options","selected"],["label","Incoterm","hint","Plain list \u2014 searchable off",3,"selectedChange","options","selected"],["label","Carrier (with error)","error","Select a carrier to continue",3,"selectedChange","options","selected"],["prefix","","name","airplane",3,"size"],["title","Address input","hint","Pickup/delivery address with Google Places suggestions. Set localStorage key africanies.googlePlacesApiKey then reload for live results.",3,"code"],[1,"flex","flex-col","gap-4"],["label","Pickup address","hint","Start typing \u2014 pick a suggestion to fill structured place details","placeholder","Street, city, or landmark",3,"valueChange","placeSelected","countries","value"],["prefix","","name","map-marker",3,"size"],[1,"m-0","max-h-48","overflow-auto","rounded-lg","border","border-border","bg-background-welcome","p-3","font-mono","text-caption","dark:border-white/10","dark:bg-ink-950"],[1,"m-0","text-body-sm","text-neutral-600","dark:text-neutral-400"],[1,"font-mono","text-ink","dark:text-white"],["title","Choice controls","hint","Booleans and single-choice groups \u2014 checkbox, toggle, and radio with the same label / hint / error chrome. Use [loading] on a toggle when the next value must wait on an API.",3,"code"],[1,"grid","gap-6","md:grid-cols-2"],["label","Require signature on delivery",3,"valueChange","value"],["label","Insure this shipment","hint","Adds 0.8% of declared value",3,"valueChange","value"],["label","Accept terms","error","You must accept the terms",3,"valueChange","value"],["label","Notify consignee by SMS",3,"valueChange","value"],["label","Hold at depot",3,"valueChange","value"],["label","Require customs hold","hint","Waits for the API \u2014 the switch does not flip until the save succeeds.",3,"valueChange","value","loading"],["label","Service level",3,"valueChange","options","value"],["title","OTP input","hint","One-time codes and short PINs \u2014 one digit per cell. Paste fills all cells; completed fires when the code is full. variant=masked hides digits.","subtext","value is one string (digits only). Resend runs a cooldown \u2014 listen to (resend) for your API, or hide it with showResend=false.",3,"code"],[1,"flex","flex-col","gap-6"],["label","Verification code","hint","Enter the 6-digit code we sent",3,"valueChange","completed","resend","resendCooldown","value"],["label","4-digit PIN","variant","masked",3,"valueChange","length","showResend","value"],["label","Code with error","error","Invalid or expired code",3,"valueChange","resend","resendCooldown","value"],["title","Date","hint","Single calendar day for ready dates, cutoffs, and similar fields.",3,"code"],["label","Ready date","hint","Local pickup day",3,"valueChange","value"],["label","Cutoff","error","Cutoff must be after ready date",3,"valueChange","value"],["title","File upload","hint","Attach documents and images \u2014 dropzone for multi-file, button for a single pick, compact for dense forms.","subtext","dropzone, button, or compact. Drag files onto any of them. accept filters types and labels the chips. Images preview; other files get an icon + extension. View opens a larger look at the file.",3,"code"],[1,"flex","flex-col","gap-8"],["label","Dropzone \xB7 multi \xB7 images & PDF","hint","Drag files here, or use Camera","accept","image/*,.pdf","variant","dropzone",3,"filesSelected","allowCamera","multiple"],["label","Button \xB7 single image","accept","image/*","variant","button",3,"filesSelected","allowCamera","multiple"],["label","Compact \xB7 docs","accept",".pdf,.doc,.docx,.xlsx","variant","compact",3,"filesSelected","allowCamera","multiple"],["title","Live values","hint","Debug strip for this page \u2014 shows the bound model values as you interact with the controls above.","muted","",3,"code"],[1,"m-0","grid","gap-2","text-body-sm","sm:grid-cols-2"],[1,"text-neutral-600"],[1,"m-0","font-medium","text-ink","dark:text-white"]],template:function(m,e){m&1&&(ei(0,"div",0),Zf(1,"app-page-header",1),ei(2,"app-demo-section",2)(3,"div",3)(4,"africanies-text-input",4),Ep("valueChange",function(t){return AI(e.tracking,t)||(e.tracking=t),t}),gc(),ei(5,"africanies-text-input",5),Ep("valueChange",function(t){return AI(e.reference,t)||(e.reference=t),t}),Zf(6,"africanies-icon",6),gc(),ei(7,"africanies-text-input",7),Ep("valueChange",function(t){return AI(e.email,t)||(e.email=t),t}),gc(),ei(8,"africanies-text-input",8),Ep("valueChange",function(t){return AI(e.locked,t)||(e.locked=t),t}),gc()()(),ei(9,"app-demo-section",9)(10,"div",3)(11,"africanies-textarea",10),Ep("valueChange",function(t){return AI(e.instructions,t)||(e.instructions=t),t}),gc(),ei(12,"africanies-textarea",11),Ep("valueChange",function(t){return AI(e.notesError,t)||(e.notesError=t),t}),gc()()(),ei(13,"app-demo-section",12)(14,"div",3)(15,"africanies-number-input",13),Ep("valueChange",function(t){return AI(e.amount,t)||(e.amount=t),t}),ei(16,"span",14),MI(17,"$"),gc()(),ei(18,"africanies-number-input",15),Ep("valueChange",function(t){return AI(e.weight,t)||(e.weight=t),t}),ei(19,"span",16),MI(20,"kg"),gc()()()(),ei(21,"app-demo-section",17)(22,"div",3)(23,"africanies-select",18),Ep("selectedChange",function(t){return AI(e.selectedWarehouse,t)||(e.selectedWarehouse=t),t}),Zf(24,"africanies-icon",19),gc(),ei(25,"africanies-select",20),Ep("optionsChange",function(t){return AI(e.tags,t)||(e.tags=t),t})("selectedChange",function(t){return AI(e.selectedTags,t)||(e.selectedTags=t),t}),gc(),ei(26,"africanies-select",21),Ep("selectedChange",function(t){return AI(e.selectedIncoterm,t)||(e.selectedIncoterm=t),t}),gc(),ei(27,"africanies-select",22),Ep("selectedChange",function(t){return AI(e.selectedCarrier,t)||(e.selectedCarrier=t),t}),Zf(28,"africanies-icon",23),gc()()(),ei(29,"app-demo-section",24)(30,"div",25)(31,"africanies-address-input",26),Ep("valueChange",function(t){return AI(e.pickupAddress,t)||(e.pickupAddress=t),t}),tp("placeSelected",function(t){return e.onPlaceSelected(t)}),Zf(32,"africanies-icon",27),gc(),ei(33,"pre",28),MI(34),HI(35,"json"),gc(),ei(36,"p",29),MI(37," Last placeSelected: "),ei(38,"span",30),MI(39),gc()()()(),ei(40,"app-demo-section",31)(41,"div",32)(42,"div",25)(43,"africanies-checkbox",33),Ep("valueChange",function(t){return AI(e.signature,t)||(e.signature=t),t}),gc(),ei(44,"africanies-checkbox",34),Ep("valueChange",function(t){return AI(e.insured,t)||(e.insured=t),t}),gc(),ei(45,"africanies-checkbox",35),Ep("valueChange",function(t){return AI(e.terms,t)||(e.terms=t),t}),gc(),ei(46,"africanies-toggle",36),Ep("valueChange",function(t){return AI(e.smsNotify,t)||(e.smsNotify=t),t}),gc(),ei(47,"africanies-toggle",37),Ep("valueChange",function(t){return AI(e.holdAtDepot,t)||(e.holdAtDepot=t),t}),gc(),ei(48,"africanies-toggle",38),tp("valueChange",function(t){return e.saveCustomsHold(t)}),gc()(),ei(49,"africanies-radio",39),Ep("valueChange",function(t){return AI(e.serviceLevel,t)||(e.serviceLevel=t),t}),gc()()(),ei(50,"app-demo-section",40)(51,"div",41)(52,"africanies-otp-input",42),Ep("valueChange",function(t){return AI(e.otpCodeValue,t)||(e.otpCodeValue=t),t}),tp("completed",function(t){return e.onOtpCompleted(t)})("resend",function(){return e.onOtpResend()}),gc(),ei(53,"africanies-otp-input",43),Ep("valueChange",function(t){return AI(e.otpPin,t)||(e.otpPin=t),t}),gc(),ei(54,"africanies-otp-input",44),Ep("valueChange",function(t){return AI(e.otpError,t)||(e.otpError=t),t}),tp("resend",function(){return e.onOtpResend()}),gc(),ei(55,"p",29),MI(56," Last completed: "),ei(57,"span",30),MI(58),gc(),MI(59," \xB7 Resend clicks: "),ei(60,"span",30),MI(61),gc()()()(),ei(62,"app-demo-section",45)(63,"div",3)(64,"africanies-date-picker",46),Ep("valueChange",function(t){return AI(e.readyDate,t)||(e.readyDate=t),t}),gc(),ei(65,"africanies-date-picker",47),Ep("valueChange",function(t){return AI(e.cutoffDate,t)||(e.cutoffDate=t),t}),gc()()(),ei(66,"app-demo-section",48)(67,"div",49)(68,"africanies-file-upload",50),tp("filesSelected",function(t){return e.onFiles(t)}),gc(),ei(69,"div",32)(70,"africanies-file-upload",51),tp("filesSelected",function(t){return e.onButtonFiles(t)}),gc(),ei(71,"africanies-file-upload",52),tp("filesSelected",function(t){return e.onCompactFiles(t)}),gc()()()(),ei(72,"app-demo-section",53)(73,"dl",54)(74,"div")(75,"dt",55),MI(76,"Tracking"),gc(),ei(77,"dd",56),MI(78),gc()(),ei(79,"div")(80,"dt",55),MI(81,"Amount"),gc(),ei(82,"dd",56),MI(83),HI(84,"number"),gc()(),ei(85,"div")(86,"dt",55),MI(87,"Warehouse"),gc(),ei(88,"dd",56),MI(89),gc()(),ei(90,"div")(91,"dt",55),MI(92,"Tags"),gc(),ei(93,"dd",56),MI(94),gc()(),ei(95,"div")(96,"dt",55),MI(97,"Service"),gc(),ei(98,"dd",56),MI(99),gc()(),ei(100,"div")(101,"dt",55),MI(102,"Files"),gc(),ei(103,"dd",56),MI(104),gc()()()()()),m&2&&(Qy(2),Qf("code",e.textCode),Qy(2),vp("value",e.tracking),Qy(),vp("value",e.reference),Qy(),Qf("size",16),Qy(),vp("value",e.email),Qy(),Qf("disabled",true),vp("value",e.locked),Qy(),Qf("code",e.textareaCode),Qy(2),vp("value",e.instructions),Qy(),vp("value",e.notesError),Qy(),Qf("code",e.numberCode),Qy(2),vp("value",e.amount),Qy(3),vp("value",e.weight),Qy(3),Qf("code",e.selectCode),Qy(2),Qf("options",e.warehouses())("searchable",true),vp("selected",e.selectedWarehouse),Qy(),Qf("size",16),Qy(),Qf("searchable",true)("allowFreeText",true)("multiple",true)("maxSelected",4),vp("options",e.tags)("selected",e.selectedTags),Qy(),Qf("options",e.incoterms),vp("selected",e.selectedIncoterm),Qy(),Qf("options",e.carriers),vp("selected",e.selectedCarrier),Qy(),Qf("size",16),Qy(),Qf("code",e.addressCode),Qy(2),Qf("countries",FI(78,Z)),vp("value",e.pickupAddress),Qy(),Qf("size",16),Qy(2),gp($I(35,72,e.pickupAddress())),Qy(5),gp(e.lastPlaceSelected()?.formattedAddress||"\u2014"),Qy(),Qf("code",e.choiceCode),Qy(3),vp("value",e.signature),Qy(),vp("value",e.insured),Qy(),vp("value",e.terms),Qy(),vp("value",e.smsNotify),Qy(),vp("value",e.holdAtDepot),Qy(),Qf("value",e.customsHold())("loading",e.customsHoldSaving()),Qy(),Qf("options",e.serviceLevels),vp("value",e.serviceLevel),Qy(),Qf("code",e.otpCode),Qy(2),Qf("resendCooldown",10),vp("value",e.otpCodeValue),Qy(),Qf("length",4)("showResend",false),vp("value",e.otpPin),Qy(),Qf("resendCooldown",0),vp("value",e.otpError),Qy(4),gp(e.lastOtpCompleted()||"\u2014"),Qy(3),gp(e.otpResendCount()),Qy(),Qf("code",e.dateFileCode),Qy(2),vp("value",e.readyDate),Qy(),vp("value",e.cutoffDate),Qy(),Qf("code",e.fileUploadCode),Qy(2),Qf("allowCamera",true)("multiple",true),Qy(2),Qf("allowCamera",true)("multiple",false),Qy(),Qf("allowCamera",false)("multiple",true),Qy(),Qf("code",e.liveValuesCode),Qy(6),Ic(" ",e.tracking()||"\u2014"," "),Qy(5),Ic(" ",e.amount()===null||e.amount()===void 0?"\u2014":UI(84,74,e.amount(),"1.0-6")," "),Qy(6),Ic(" ",e.selectedWarehouse()?.label??"\u2014"," "),Qy(5),Ic(" ",e.tagSummary()," "),Qy(5),Ic(" ",e.serviceLevel()??"\u2014"," "),Qy(5),Ic(" ",e.files().length?e.files().map(RI(77,$,e)).join(", "):"\u2014"," "));},dependencies:[Gt,ri,yt,Xn,ni,ii,ti,Zn,Wt,oi,$t,g,b,Ht,Ca,Ea],encapsulation:2})};export{Q as FormsPage};
@@ -0,0 +1 @@
1
+ import {B as Bi,U as Ui,j as ji,z as zi,H as Ht}from'./chunk-Cg7brw6x.js';import'./chunk-CZBTrY_H.js';import {b}from'./chunk-Cy-ZOZI8.js';import {C as Co,I as IE,q as yn,s as gt,Z,H as Hs,e as ei,M as MI,a as gc,c as Zf,Q as Qy,d as Qf,f as gp}from'./main-WEJC3BLT.js';var D=class d{lastAction=Co(null);demoItems=[{label:"Open",icon:"eye",onClick:()=>this.lastAction.set("Open")},{label:"Edit",icon:"edit",onClick:()=>this.lastAction.set("Edit")},{label:"Copy reference",icon:"copy",onClick:()=>this.lastAction.set("Copy reference")},{label:"Delete",icon:"trash",danger:true,dividerBefore:true,onClick:()=>this.lastAction.set("Delete")}];variantItems=[{label:"Download PDF",icon:"download",onClick:()=>{}},{label:"Archive",disabled:true,onClick:()=>{}},{label:"Void shipment",icon:"trash",danger:true,dividerBefore:true,onClick:()=>{}}];defaultCode=Bi;customCode=Ui;variantsCode=ji;disabledCode=zi;static \u0275fac=function(r){return new(r||d)};static \u0275cmp=IE({type:d,selectors:[["app-action-menu-page"]],decls:22,vars:10,consts:[[1,"pg-page-enter","flex","flex-col","gap-10"],["eyebrow","Components","title","Action menu"],["description","",1,"m-0","text-body","text-neutral-600","dark:text-neutral-400"],["routerLink","/lecture","fragment","CDK",1,"pg-glossary-link"],["title","Default trigger","hint","Built-in ellipsis \u2014 the usual pattern for table row actions.",3,"code"],[1,"flex","flex-wrap","items-center","gap-4"],[3,"items"],[1,"m-0","text-body-sm","text-neutral-600","dark:text-neutral-400"],[1,"font-medium","text-ink","dark:text-white"],["title","Custom trigger","hint","When ellipsis is not enough \u2014 attach africaniesActionMenuTrigger to your own labeled button.",3,"code"],["ariaLabel","Shipment actions",3,"items"],["type","button","africanies-button","","africaniesActionMenuTrigger","","variant","secondary","size","sm"],["title","Danger, disabled, divider","hint","Mark destructive items with danger, disable unavailable ones, and use dividerBefore to separate groups.",3,"code"],["title","Disabled menu","hint","Disable the whole menu when no actions apply (e.g. row locked or permissions missing).",3,"code"],[3,"items","disabled"]],template:function(r,t){r&1&&(ei(0,"div",0)(1,"app-page-header",1)(2,"p",2),MI(3," Overflow (\u2026) menu for row and toolbar actions that do not deserve a full button. Uses a "),ei(4,"a",3),MI(5,"CDK"),gc(),MI(6," overlay so it is not clipped by table overflow. Default ellipsis trigger, or point africaniesActionMenuTrigger at your own control. "),gc()(),ei(7,"app-demo-section",4)(8,"div",5),Zf(9,"africanies-action-menu",6),ei(10,"p",7),MI(11," Last action: "),ei(12,"span",8),MI(13),gc()()()(),ei(14,"app-demo-section",9)(15,"africanies-action-menu",10)(16,"button",11),MI(17," Actions "),gc()()(),ei(18,"app-demo-section",12),Zf(19,"africanies-action-menu",6),gc(),ei(20,"app-demo-section",13),Zf(21,"africanies-action-menu",14),gc()()),r&2&&(Qy(7),Qf("code",t.defaultCode),Qy(2),Qf("items",t.demoItems),Qy(4),gp(t.lastAction()??"\u2014"),Qy(),Qf("code",t.customCode),Qy(),Qf("items",t.demoItems),Qy(3),Qf("code",t.variantsCode),Qy(),Qf("items",t.variantItems),Qy(),Qf("code",t.disabledCode),Qy(),Qf("items",t.demoItems)("disabled",true));},dependencies:[yn,gt,Z,b,Ht,Hs],encapsulation:2})};export{D as ActionMenuPage};
@@ -0,0 +1 @@
1
+ import {r}from'./chunk-CjYlnYC7.js';import {b}from'./chunk-Cy-ZOZI8.js';import {T,b2 as Ji,b3 as hn,C as Co,u as QI,b1 as lh,I as IE,H as Hs,x as xr,Z,U as Gt,e as ei,c as Zf,t as tp,L as LE,a8 as Ep,a as gc,M as MI,Q as Qy,P as PE,ab as vp,d as Qf,a9 as AI}from'./main-WEJC3BLT.js';function x(r,a){r&1&&Zf(0,"africanies-alert",3),r&2&&Qf("message",a)("dismissible",false);}function E(r,a){r&1&&Zf(0,"africanies-alert",4),r&2&&Qf("message",a)("dismissible",false);}function W(r,a){r&1&&Zf(0,"africanies-alert",5),r&2&&Qf("dismissible",false);}var R=class r$1{users=T(Ji);auth=T(hn);currentPassword=Co("");password=Co("");confirmation=Co("");saving=Co(false);errorMessage=Co(null);successMessage=Co(null);hasToken=QI(()=>this.auth.token()!=null);confirmError=QI(()=>{let a=this.password(),n=this.confirmation();return !n||a===n?null:"Passwords do not match."});canSubmit=QI(()=>{let a=this.currentPassword().trim(),n=this.password().trim(),e=this.confirmation().trim();return this.hasToken()&&!this.saving()&&a!==""&&n!==""&&n===e});async save(){if(this.canSubmit()){this.saving.set(true),this.errorMessage.set(null),this.successMessage.set(null);try{let a=await lh(this.users.changePassword({current_password:this.currentPassword(),password:this.password(),password_confirmation:this.confirmation()}));if(a.success){this.successMessage.set(a.message?.trim()||"Password updated. Continue to the dashboard.");return}this.errorMessage.set(a.message?.trim()||"Could not update password.");}catch(a){this.errorMessage.set(r(a,{suggestApiToken:true}));}finally{this.saving.set(false);}}}static \u0275fac=function(n){return new(n||r$1)};static \u0275cmp=IE({type:r$1,selectors:[["app-onboarding-reset-password-page"]],decls:13,vars:9,consts:[[1,"pg-page-enter","mx-auto","flex","w-full","max-w-lg","flex-col","gap-8"],["eyebrow","Use cases","title","Change default password","description","Product path /onboarding/reset-password. After login, if user.default_password is set, change current \u2192 new via POST /user/change/password, then go to the dashboard. This is not the emailed reset-link flow."],[1,"flex","flex-col","gap-4","rounded-xl","border","border-border","bg-white","p-6","dark:border-white/10","dark:bg-ink",3,"submit"],["variant","danger",3,"message","dismissible"],["variant","success",3,"message","dismissible"],["variant","warning","message","This call needs a bearer token. Paste one in API token, then retry.",3,"dismissible"],["type","password","label","Current password","autocomplete","current-password",3,"valueChange","value"],["type","password","label","New password","autocomplete","new-password",3,"valueChange","value"],["type","password","label","Confirm new password","autocomplete","new-password",3,"valueChange","error","value"],["africanies-button","","type","submit","variant","primary",3,"loading","disabled"],["routerLink","/usecases/onboarding/login",1,"cursor-pointer","text-center","text-body-sm","font-medium","text-ink","underline-offset-2","hover:underline","dark:text-white"]],template:function(n,e){if(n&1&&(ei(0,"div",0),Zf(1,"app-page-header",1),ei(2,"form",2),tp("submit",function(t){return t.preventDefault(),e.save()}),LE(3,x,1,2,"africanies-alert",3),LE(4,E,1,2,"africanies-alert",4),LE(5,W,1,1,"africanies-alert",5),ei(6,"africanies-text-input",6),Ep("valueChange",function(t){return AI(e.currentPassword,t)||(e.currentPassword=t),t}),gc(),ei(7,"africanies-text-input",7),Ep("valueChange",function(t){return AI(e.password,t)||(e.password=t),t}),gc(),ei(8,"africanies-text-input",8),Ep("valueChange",function(t){return AI(e.confirmation,t)||(e.confirmation=t),t}),gc(),ei(9,"button",9),MI(10," Update password "),gc(),ei(11,"a",10),MI(12," Back to login "),gc()()()),n&2){let d,t;Qy(3),PE((d=e.errorMessage())?3:-1,d),Qy(),PE((t=e.successMessage())?4:-1,t),Qy(),PE(e.hasToken()?-1:5),Qy(),vp("value",e.currentPassword),Qy(),vp("value",e.password),Qy(),Qf("error",e.confirmError()),vp("value",e.confirmation),Qy(),Qf("loading",e.saving())("disabled",!e.canSubmit());}},dependencies:[Hs,xr,Z,Gt,b],encapsulation:2})};export{R as OnboardingResetPasswordPage};
@@ -0,0 +1 @@
1
+ import {V as Vi,a as Hi,H as Ht}from'./chunk-Cg7brw6x.js';import'./chunk-CZBTrY_H.js';import {b}from'./chunk-Cy-ZOZI8.js';import {C as Co,I as IE,x as xr,Z,e as ei,c as Zf,V as VE,j as jE,a as gc,L as LE,Q as Qy,d as Qf,b as HE,P as PE,X as XE,G as GE,t as tp,M as MI,p as Gl,z as zl}from'./main-WEJC3BLT.js';function k(n,r){if(n&1&&Zf(0,"africanies-alert",4),n&2){let e=r.$implicit,t=XE();Qf("variant",e)("title",t.titles[e])("message",t.messages[e])("dismissible",false);}}function D(n,r){if(n&1){let e=GE();ei(0,"africanies-alert",10),tp("dismissed",function(){Gl(e);let s=XE();return zl(s.showBanner.set(false))}),ei(1,"button",11),tp("click",function(){Gl(e);let s=XE();return zl(s.onRefresh())}),MI(2," Refresh rates "),gc()();}}function B(n,r){if(n&1){let e=GE();ei(0,"button",12),tp("click",function(){Gl(e);let s=XE();return zl(s.showBanner.set(true))}),MI(1," Show banner again "),gc();}}var P=class n{showBanner=Co(true);variants=["info","success","warning","danger"];titles={info:"Document checklist",success:"Submitted",warning:"Rates may be stale",danger:"Cannot release"};messages={info:"Commercial invoice and packing list are still required.",success:"Shipment SFN-1042 was submitted to the carrier.",warning:"Last rate pull was more than 4 hours ago.",danger:"Customs hold blocks release until documents are approved."};variantsCode=Vi;dismissibleCode=Hi;onRefresh(){this.showBanner.set(false);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=IE({type:n,selectors:[["app-alert-page"]],decls:11,vars:4,consts:[[1,"pg-page-enter","flex","flex-col","gap-10"],["eyebrow","Components","title","Alert","description","Inline banners for page-level notices the user should see (outages, rate warnings, success tips). The parent owns show/hide. Do not use this for failed data fetches \u2014 use ErrorState / AsyncState instead."],["title","Variants","hint","info, success, warning, and danger. Use warning/danger for issues that need attention; they announce as alerts to assistive tech.","badge","4",3,"code"],[1,"flex","flex-col","gap-3"],[3,"variant","title","message","dismissible"],["title","Dismissible","hint","Dismissible by default. Listen to (dismissed) and hide the alert with @if so it stays gone until you bring it back.",3,"code"],[1,"flex","flex-col","gap-4"],["variant","warning","title","Rates outdated","message","Refresh to pull the latest carrier rates before quoting."],["africanies-button","","type","button","variant","secondary","size","sm"],["variant","info","message","This environment is connected to the staging API.",3,"dismissible"],["variant","warning","title","Rates outdated","message","Refresh to pull the latest carrier rates before quoting.",3,"dismissed"],["africanies-button","","type","button","size","sm",1,"mt-2",3,"click"],["africanies-button","","type","button","variant","secondary","size","sm",3,"click"]],template:function(e,t){e&1&&(ei(0,"div",0),Zf(1,"app-page-header",1),ei(2,"app-demo-section",2)(3,"div",3),VE(4,k,1,4,"africanies-alert",4,jE),gc()(),ei(6,"app-demo-section",5)(7,"div",6),LE(8,D,3,0,"africanies-alert",7)(9,B,2,0,"button",8),Zf(10,"africanies-alert",9),gc()()()),e&2&&(Qy(2),Qf("code",t.variantsCode),Qy(2),HE(t.variants),Qy(2),Qf("code",t.dismissibleCode),Qy(2),PE(t.showBanner()?8:9),Qy(2),Qf("dismissible",false));},dependencies:[xr,Z,b,Ht],encapsulation:2})};export{P as AlertPage};
@@ -0,0 +1 @@
1
+ import {ae as oo,H as Ht}from'./chunk-Cg7brw6x.js';import'./chunk-CZBTrY_H.js';import {b}from'./chunk-Cy-ZOZI8.js';import {T,ai as Ke,ba as U,C as Co,u as QI,bb as or,I as IE,g,e as ei,M as MI,a as gc,V as VE,j as jE,t as tp,L as LE,Q as Qy,aN as mp,d as Qf,b as HE,P as PE,G as GE,c as Zf,J as zf,X as XE,i as Ic,f as gp,p as Gl,z as zl}from'./main-WEJC3BLT.js';function A(t,n){if(t&1){let e=GE();ei(0,"button",14),tp("click",function(){let s=Gl(e).$implicit,l=XE();return zl(l.copySnippet(s))}),Zf(1,"africanies-icon",15),gc();}if(t&2){let e=n.$implicit;Qf("title",'Copy <africanies-icon name="'+e+'" />'),zf("aria-label","Copy snippet for "+e),Qy(),Qf("name",e)("size",24);}}function O(t,n){if(t&1&&(ei(0,"p",10),MI(1),gc()),t&2){let e=XE();Qy(),Ic(" Copied ",e.copied()," ");}}function z(t,n){if(t&1){let e=GE();ei(0,"button",16),tp("click",function(){let s=Gl(e).$implicit,l=XE();return zl(l.copySnippet(s))}),ei(1,"span",17),Zf(2,"africanies-icon",15),gc(),ei(3,"span",18),MI(4),gc()();}if(t&2){let e=n.$implicit;Qf("title",'Copy <africanies-icon name="'+e+'" />'),zf("aria-label","Copy snippet for "+e),Qy(2),Qf("name",e)("size",22),Qy(2),gp(e);}}function B(t,n){if(t&1&&(ei(0,"p",13),MI(1),gc()),t&2){let e=XE();Qy(),Ic(" No icons match \u201C",e.query(),"\u201D. ");}}var j=class t{toast=T(Ke);ICON_NAMES=U;query=Co("");copied=Co(null);samples=["airplane","warehouse","warning"];usageCode=oo;filtered=QI(()=>{let n=this.query().trim().toLowerCase();return n?U.filter(e=>e.includes(n)):U});iconSnippet(n){return `<africanies-icon name="${n}" />`}async copySnippet(n){let e=this.iconSnippet(n);if(!await or(e)){this.toast.error("Could not copy to the clipboard."),this.copied.set(null);return}this.copied.set(e),this.toast.success(`Copied ${e}`),window.setTimeout(()=>{this.copied()===e&&this.copied.set(null);},1600);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=IE({type:t,selectors:[["app-icons-page"]],decls:18,vars:6,consts:[[1,"pg-page-enter","flex","flex-col","gap-8"],["eyebrow","Foundation","title","Icons","description","Browse every icon in the shared SVG sprite. Click a tile to copy an africanies-icon usage snippet. Serve the sprite once in your app, then use typed IconName everywhere."],["actions","",1,"flex","flex-col","items-stretch","gap-2","sm:items-end"],[1,"m-0","text-caption","text-neutral-600","dark:text-neutral-400"],["title","Usage","hint","Register the sprite in your app assets, then place africanies-icon wherever you need a glyph. Prefer typed IconName \u2014 never free-string ids.",3,"code"],[1,"flex","flex-wrap","items-center","gap-3","text-ink","dark:text-white"],["type","button",1,"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",3,"title"],[1,"text-body-sm","text-neutral-600","dark:text-neutral-400"],[1,"flex","flex-col","gap-3","sm:flex-row","sm:items-center","sm:justify-between"],["type","search","placeholder","Filter by name\u2026",1,"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",3,"input","value"],["role","status",1,"m-0","max-w-full","truncate","rounded-lg","bg-export-subtle","px-3","py-1.5","font-mono","text-caption","font-medium","text-export","dark:bg-export/15","dark:text-export-light"],[1,"grid","gap-2",2,"grid-template-columns","repeat(auto-fill, minmax(7.25rem, 1fr))"],["type","button",1,"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",3,"title"],[1,"m-0","text-body","text-neutral-600","dark:text-neutral-400"],["type","button",1,"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",3,"click","title"],[3,"name","size"],["type","button",1,"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",3,"click","title"],[1,"inline-flex","h-10","w-10","items-center","justify-center","rounded-lg","bg-background-welcome","text-ink","transition","group-hover:scale-105","dark:bg-ink-950","dark:text-white"],[1,"w-full","truncate","text-center","text-caption"]],template:function(e,r){e&1&&(ei(0,"div",0)(1,"app-page-header",1)(2,"div",2)(3,"p",3),MI(4),gc()()(),ei(5,"app-demo-section",4)(6,"div",5),VE(7,A,2,4,"button",6,jE),ei(9,"span",7),MI(10," Prefer typed IconName \u2014 never free-string icon ids. "),gc()()(),ei(11,"div",8)(12,"input",9),tp("input",function(l){return r.query.set(l.target.value)}),gc(),LE(13,O,2,1,"p",10),gc(),ei(14,"div",11),VE(15,z,5,5,"button",12,jE),gc(),LE(17,B,2,1,"p",13),gc()),e&2&&(Qy(4),mp(" ",r.filtered().length," of ",r.ICON_NAMES.length," shown "),Qy(),Qf("code",r.usageCode),Qy(2),HE(r.samples),Qy(5),Qf("value",r.query()),Qy(),PE(r.copied()?13:-1),Qy(2),HE(r.filtered()),Qy(2),PE(r.filtered().length?-1:17));},dependencies:[g,b,Ht],encapsulation:2})};export{j as IconsPage};
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-beasties-container>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>AFRICANIES Web SDK · Playground</title>
6
+ <base href="/angular-web-sdk/">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+ <meta name="description" content="Shared Angular UI toolkit from African Import Export Solutions — Import (STN) and Export (SFN) components, icons, tokens, and models.">
9
+ <link rel="icon" type="image/png" href="assets/africanies-ui/brand/africanies-logo-mini.png">
10
+ <style>*,:before,:after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}html,body{height:100%}:root{--pg-canvas:#e6ebf1;--pg-chrome:#f2f5f8}body{margin:0;font-family:Arial,sans-serif;--tw-text-opacity:1;color:rgb(33 37 41 / var(--tw-text-opacity, 1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--pg-canvas)}</style><link rel="stylesheet" href="styles-4FSELHYD.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-4FSELHYD.css"></noscript></head>
11
+ <body>
12
+ <app-root></app-root>
13
+ <script src="main-WEJC3BLT.js" type="module"></script></body>
14
+ </html>