@isaiahiroko/tilmart-ngx-apps-admin 0.2.0 → 0.2.2

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 (107) hide show
  1. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-articles.module-OeLRnPwN.mjs → isaiahiroko-tilmart-ngx-apps-admin-articles.module-Cpx9BZcg.mjs} +5 -5
  2. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-articles.module-OeLRnPwN.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-articles.module-Cpx9BZcg.mjs.map} +1 -1
  3. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-attribute-templates.module-CwQnW1cH.mjs +239 -0
  4. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-attribute-templates.module-CwQnW1cH.mjs.map +1 -0
  5. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-audit.module-C9gvw8X2.mjs → isaiahiroko-tilmart-ngx-apps-admin-audit.module-D5YaCThD.mjs} +6 -6
  6. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-audit.module-C9gvw8X2.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-audit.module-D5YaCThD.mjs.map} +1 -1
  7. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-banners.module-KSapnx6Y.mjs +76 -0
  8. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-banners.module-KSapnx6Y.mjs.map +1 -0
  9. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-brands.module-7I0ni-tQ.mjs +70 -0
  10. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-brands.module-7I0ni-tQ.mjs.map +1 -0
  11. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-DoxDNaNn.mjs +538 -0
  12. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-DoxDNaNn.mjs.map +1 -0
  13. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-categories.module-OTUfenf0.mjs +94 -0
  14. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-categories.module-OTUfenf0.mjs.map +1 -0
  15. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-claims.module-Dk9mz7Wj.mjs +137 -0
  16. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-claims.module-Dk9mz7Wj.mjs.map +1 -0
  17. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-compatibility-rules.module-xN-JUWwp.mjs → isaiahiroko-tilmart-ngx-apps-admin-compatibility-rules.module-JiFnNJj_.mjs} +6 -6
  18. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-compatibility-rules.module-xN-JUWwp.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-compatibility-rules.module-JiFnNJj_.mjs.map} +1 -1
  19. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-content.module-DLdKAUqc.mjs → isaiahiroko-tilmart-ngx-apps-admin-content.module-Bx6Zj0WX.mjs} +5 -5
  20. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-content.module-DLdKAUqc.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-content.module-Bx6Zj0WX.mjs.map} +1 -1
  21. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-CoRh6Hxq.mjs +85 -0
  22. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-CoRh6Hxq.mjs.map +1 -0
  23. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-customers.module-CslGiOdq.mjs +123 -0
  24. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-customers.module-CslGiOdq.mjs.map +1 -0
  25. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-data-quality.module-Bfgh3zE5.mjs → isaiahiroko-tilmart-ngx-apps-admin-data-quality.module-CvFmMoJe.mjs} +6 -6
  26. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-data-quality.module-Bfgh3zE5.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-data-quality.module-CvFmMoJe.mjs.map} +1 -1
  27. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-data-requests.module-C6tPNlup.mjs → isaiahiroko-tilmart-ngx-apps-admin-data-requests.module-CuZwNVPO.mjs} +6 -6
  28. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-data-requests.module-C6tPNlup.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-data-requests.module-CuZwNVPO.mjs.map} +1 -1
  29. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-flash-sales.module-BPRnC17l.mjs +83 -0
  30. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-flash-sales.module-BPRnC17l.mjs.map +1 -0
  31. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-homepage.module-BZ3UmxE3.mjs → isaiahiroko-tilmart-ngx-apps-admin-homepage.module-vtAoIwSu.mjs} +5 -5
  32. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-homepage.module-BZ3UmxE3.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-homepage.module-vtAoIwSu.mjs.map} +1 -1
  33. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-inbox.module-BZDTa1L-.mjs → isaiahiroko-tilmart-ngx-apps-admin-inbox.module-CRkfjWQT.mjs} +6 -6
  34. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-inbox.module-BZDTa1L-.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-inbox.module-CRkfjWQT.mjs.map} +1 -1
  35. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-list-page.base-Cl7JZ-Tp.mjs +66 -0
  36. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-list-page.base-Cl7JZ-Tp.mjs.map +1 -0
  37. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-macros.module-BO4bdER2.mjs → isaiahiroko-tilmart-ngx-apps-admin-macros.module-CElxL9W4.mjs} +5 -5
  38. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-macros.module-BO4bdER2.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-macros.module-CElxL9W4.mjs.map} +1 -1
  39. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-moderation.module-CZOCrias.mjs → isaiahiroko-tilmart-ngx-apps-admin-moderation.module-PGmFX7nk.mjs} +6 -6
  40. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-moderation.module-CZOCrias.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-moderation.module-PGmFX7nk.mjs.map} +1 -1
  41. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-navigation.module-DoKzzRgn.mjs → isaiahiroko-tilmart-ngx-apps-admin-navigation.module-De1Cvqqa.mjs} +6 -6
  42. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-navigation.module-DoKzzRgn.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-navigation.module-De1Cvqqa.mjs.map} +1 -1
  43. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-order-board.module-DIOjhptn.mjs → isaiahiroko-tilmart-ngx-apps-admin-order-board.module-CmLNiEEP.mjs} +4 -4
  44. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-order-board.module-DIOjhptn.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-order-board.module-CmLNiEEP.mjs.map} +1 -1
  45. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-orders.module-Ddw49QW0.mjs → isaiahiroko-tilmart-ngx-apps-admin-orders.module-Cfeb0QjH.mjs} +15 -33
  46. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-orders.module-Cfeb0QjH.mjs.map +1 -0
  47. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-payments.module-DstLDYM7.mjs +114 -0
  48. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-payments.module-DstLDYM7.mjs.map +1 -0
  49. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-DG03OY1q.mjs +94 -0
  50. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-DG03OY1q.mjs.map +1 -0
  51. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-queues.module-K-zYYVFy.mjs → isaiahiroko-tilmart-ngx-apps-admin-queues.module-D7iLwX0A.mjs} +6 -6
  52. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-queues.module-K-zYYVFy.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-queues.module-D7iLwX0A.mjs.map} +1 -1
  53. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-oQw5Xo5T.mjs +78 -0
  54. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-oQw5Xo5T.mjs.map +1 -0
  55. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-referrals.module-QLNhuh7q.mjs → isaiahiroko-tilmart-ngx-apps-admin-referrals.module-BIAY4L_u.mjs} +9 -34
  56. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-referrals.module-BIAY4L_u.mjs.map +1 -0
  57. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-reports.module-DBZov0We.mjs → isaiahiroko-tilmart-ngx-apps-admin-reports.module-DORiIVLQ.mjs} +5 -5
  58. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-reports.module-DBZov0We.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-reports.module-DORiIVLQ.mjs.map} +1 -1
  59. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-returns.module-C9Iu9CX6.mjs +163 -0
  60. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-returns.module-C9Iu9CX6.mjs.map +1 -0
  61. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-CGBBHwId.mjs +81 -0
  62. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-CGBBHwId.mjs.map +1 -0
  63. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-settings.module-Cz6xPNwB.mjs +318 -0
  64. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-settings.module-Cz6xPNwB.mjs.map +1 -0
  65. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-shipments.module-XuaOKr8v.mjs → isaiahiroko-tilmart-ngx-apps-admin-shipments.module-Cs5CLamm.mjs} +13 -32
  66. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-shipments.module-Cs5CLamm.mjs.map +1 -0
  67. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-simple-crud.base-C8SPw14H.mjs +140 -0
  68. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-simple-crud.base-C8SPw14H.mjs.map +1 -0
  69. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-Bt9W1oGR.mjs +102 -0
  70. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-Bt9W1oGR.mjs.map +1 -0
  71. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-trace.module-Pwr-82Rc.mjs → isaiahiroko-tilmart-ngx-apps-admin-trace.module-9sRlGZCC.mjs} +6 -6
  72. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-trace.module-Pwr-82Rc.mjs.map → isaiahiroko-tilmart-ngx-apps-admin-trace.module-9sRlGZCC.mjs.map} +1 -1
  73. package/fesm2022/{isaiahiroko-tilmart-ngx-apps-admin-users.module-Bx_7fI2g.mjs → isaiahiroko-tilmart-ngx-apps-admin-users.module-C31RJJJ_.mjs} +9 -34
  74. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-users.module-C31RJJJ_.mjs.map +1 -0
  75. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin.mjs +96 -72
  76. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin.mjs.map +1 -1
  77. package/package.json +1 -1
  78. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-baskets.module-_lHPl1dT.mjs +0 -294
  79. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-baskets.module-_lHPl1dT.mjs.map +0 -1
  80. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-Bvx2tVOi.mjs +0 -224
  81. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-catalog.module-Bvx2tVOi.mjs.map +0 -1
  82. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-claims.module-Ccsd8Yx3.mjs +0 -106
  83. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-claims.module-Ccsd8Yx3.mjs.map +0 -1
  84. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-CQNCSlsd.mjs +0 -106
  85. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-coupons.module-CQNCSlsd.mjs.map +0 -1
  86. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-customers.module-12XdV9zo.mjs +0 -106
  87. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-customers.module-12XdV9zo.mjs.map +0 -1
  88. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-orders.module-Ddw49QW0.mjs.map +0 -1
  89. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-payments.module-BhqAtTZs.mjs +0 -106
  90. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-payments.module-BhqAtTZs.mjs.map +0 -1
  91. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-procurement.module-qXW-g0pf.mjs +0 -274
  92. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-procurement.module-qXW-g0pf.mjs.map +0 -1
  93. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-DG9uTDqX.mjs +0 -106
  94. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-promotions.module-DG9uTDqX.mjs.map +0 -1
  95. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-Hm2dO_bC.mjs +0 -106
  96. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-redirects.module-Hm2dO_bC.mjs.map +0 -1
  97. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-referrals.module-QLNhuh7q.mjs.map +0 -1
  98. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-returns.module-Bd2gdo6_.mjs +0 -106
  99. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-returns.module-Bd2gdo6_.mjs.map +0 -1
  100. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-BkVY06ci.mjs +0 -105
  101. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-routes.module-BkVY06ci.mjs.map +0 -1
  102. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-settings.module-DKeZTldO.mjs +0 -222
  103. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-settings.module-DKeZTldO.mjs.map +0 -1
  104. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-shipments.module-XuaOKr8v.mjs.map +0 -1
  105. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-DYiAkF7E.mjs +0 -107
  106. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-stock.module-DYiAkF7E.mjs.map +0 -1
  107. package/fesm2022/isaiahiroko-tilmart-ngx-apps-admin-users.module-Bx_7fI2g.mjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, NgModule } from '@angular/core';
3
- import * as i1$2 from '@angular/router';
3
+ import * as i1$1 from '@angular/router';
4
4
  import { RouterModule } from '@angular/router';
5
5
  import { BaseDirective, using, notify, SharedModule } from '@thescaffold/ngx-core';
6
- import * as i1$1 from '@thescaffold/ngx-ui';
6
+ import * as i2 from '@thescaffold/ngx-ui';
7
7
  import { ElementsModule } from '@thescaffold/ngx-ui';
8
8
  import { takeUntil, firstValueFrom } from 'rxjs';
9
- import * as i2 from '@angular/common';
9
+ import * as i3 from '@angular/common';
10
10
  import * as i1 from '@angular/forms';
11
11
 
12
12
  const LOCATIONS = [
@@ -250,7 +250,7 @@ class NavigationComponent extends BaseDirective {
250
250
  return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}`;
251
251
  }
252
252
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NavigationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
253
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: NavigationComponent, isStandalone: false, selector: "x-navigation", usesInheritance: true, ngImport: i0, template: "<div class=\"x-nav-head\">\n <div class=\"x-nav-title\">Navigation</div>\n <div class=\"x-nav-sub\">Storefront menus \u2014 the shell consumes the <code>header_primary</code> menu.</div>\n</div>\n\n@if (loading) {\n <x-element-loader></x-element-loader>\n} @else {\n <div class=\"x-nav-layout\">\n <aside class=\"x-nav-list\">\n <div class=\"x-nav-new\">\n <select [(ngModel)]=\"newMenuLocation\">\n @for (l of locations; track l) { <option [value]=\"l\">{{ l }}</option> }\n </select>\n <input type=\"text\" placeholder=\"Menu name\" [(ngModel)]=\"newMenuName\" />\n <button type=\"button\" (click)=\"createMenu()\">Add menu</button>\n </div>\n @for (m of menus; track m.id) {\n <button\n type=\"button\"\n class=\"x-nav-list-item\"\n [class.x-nav-list-active]=\"selected?.id === m.id\"\n (click)=\"select(m)\"\n >\n <span class=\"x-nav-list-title\">{{ m.name }}</span>\n <span class=\"x-nav-list-meta\">{{ m.location }}</span>\n </button>\n } @empty {\n <div class=\"x-nav-empty\">No menus yet.</div>\n }\n </aside>\n\n <section class=\"x-nav-editor\">\n @if (!selected) {\n <div class=\"x-nav-empty\">Pick a menu, or add one.</div>\n } @else {\n <div class=\"x-nav-editor-head\">\n <span>{{ selected.name }} \u2014 <code>{{ selected.location }}</code></span>\n <span>\n <button type=\"button\" class=\"x-nav-btn\" (click)=\"addItem()\">Add link</button>\n <button type=\"button\" class=\"x-nav-btn x-nav-danger\" (click)=\"deleteMenu()\">Delete menu</button>\n </span>\n </div>\n\n @if (!topLevel.length) {\n <div class=\"x-nav-empty\">No links yet.</div>\n } @else {\n <div class=\"x-nav-items\">\n @for (item of topLevel; track item.id; let i = $index) {\n <div\n class=\"x-nav-item\"\n [class.x-nav-item-off]=\"!item.enabled\"\n draggable=\"true\"\n (dragstart)=\"onDragStart(i)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop(i)\"\n >\n <div class=\"x-nav-item-row\">\n <span class=\"x-nav-grip\">\u283F</span>\n <div class=\"x-nav-order\">\n <button type=\"button\" (click)=\"moveItem(i, -1)\" [disabled]=\"i === 0\">\u25B2</button>\n <button type=\"button\" (click)=\"moveItem(i, 1)\" [disabled]=\"i === topLevel.length - 1\">\u25BC</button>\n </div>\n <span class=\"x-nav-item-label\">{{ item.label }}</span>\n <span class=\"x-nav-item-url\">{{ item.url }}</span>\n <span class=\"x-nav-item-actions\">\n <button type=\"button\" class=\"x-nav-toggle\" (click)=\"toggleItem(item)\">{{ item.enabled ? 'On' : 'Off' }}</button>\n <button type=\"button\" class=\"x-nav-link\" (click)=\"editItem(item)\">Edit</button>\n <button type=\"button\" class=\"x-nav-link x-nav-danger\" (click)=\"removeItem(item)\">Delete</button>\n </span>\n </div>\n\n @for (child of childrenOf(item.id); track child.id) {\n <div class=\"x-nav-child\" [class.x-nav-item-off]=\"!child.enabled\">\n <span class=\"x-nav-child-label\">\u21B3 {{ child.label }}</span>\n <span class=\"x-nav-item-url\">{{ child.url }}</span>\n <span class=\"x-nav-item-actions\">\n <button type=\"button\" class=\"x-nav-toggle\" (click)=\"toggleItem(child)\">{{ child.enabled ? 'On' : 'Off' }}</button>\n <button type=\"button\" class=\"x-nav-link\" (click)=\"editItem(child)\">Edit</button>\n <button type=\"button\" class=\"x-nav-link x-nav-danger\" (click)=\"removeItem(child)\">Delete</button>\n </span>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (editingItem) {\n <ng-container *ngTemplateOutlet=\"itemForm\"></ng-container>\n }\n }\n </section>\n </div>\n}\n\n<ng-template #itemForm>\n <div class=\"x-nav-form\">\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">Label<input type=\"text\" [(ngModel)]=\"itemModel.label\" /></label>\n <label class=\"x-nav-f\">URL<input type=\"text\" [(ngModel)]=\"itemModel.url\" placeholder=\"/c/solar-panels\" /></label>\n </div>\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">\n Parent\n <select [(ngModel)]=\"itemModel.parentId\">\n <option value=\"\">\u2014 top level \u2014</option>\n @for (p of parentOptions; track p.id) { <option [value]=\"p.id\">{{ p.label }}</option> }\n </select>\n </label>\n <label class=\"x-nav-f\">Icon<input type=\"text\" [(ngModel)]=\"itemModel.icon\" /></label>\n <label class=\"x-nav-f x-nav-check\">\n <input type=\"checkbox\" [(ngModel)]=\"itemModel.openInNewTab\" /> New tab\n </label>\n </div>\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">Starts<input type=\"datetime-local\" [(ngModel)]=\"itemModel.startsAt\" /></label>\n <label class=\"x-nav-f\">Ends<input type=\"datetime-local\" [(ngModel)]=\"itemModel.endsAt\" /></label>\n </div>\n <div class=\"x-nav-form-actions\">\n <button type=\"button\" class=\"x-nav-btn x-nav-btn-primary\" (click)=\"saveItem()\">Save link</button>\n <button type=\"button\" class=\"x-nav-btn\" (click)=\"cancelItemEdit()\">Cancel</button>\n </div>\n </div>\n</ng-template>\n\n<style>\n .x-nav-head { margin-bottom: 20px; }\n .x-nav-title { font-size: 24px; font-weight: 800; color: var(--color-text); }\n .x-nav-sub { font-size: 13.5px; color: var(--color-text-muted); margin-top: 2px; }\n .x-nav-sub code, .x-nav-editor-head code { font-family: var(--font-mono); font-size: 12px; }\n .x-nav-empty { font-size: 14px; color: var(--color-text-muted); padding: 12px 0; }\n .x-nav-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }\n .x-nav-list { display: flex; flex-direction: column; gap: 6px; }\n .x-nav-new { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }\n .x-nav-new select, .x-nav-new input, .x-nav-f input, .x-nav-f select {\n border: 1px solid var(--color-border); border-radius: var(--radius-md);\n padding: 6px 10px; font-size: 13px; background: var(--color-surface); color: var(--color-text);\n }\n .x-nav-new button, .x-nav-btn {\n border: 1px solid var(--color-border); background: transparent; border-radius: var(--radius-md);\n padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--color-text-muted);\n }\n .x-nav-btn-primary { border-color: var(--color-accent); color: var(--color-accent-hover); }\n .x-nav-danger { color: var(--color-danger, #c0362c); }\n .x-nav-list-item {\n text-align: left; border: 1px solid var(--color-border); border-radius: var(--radius-md);\n background: var(--color-surface); padding: 8px 10px; cursor: pointer;\n display: flex; flex-direction: column; gap: 2px;\n }\n .x-nav-list-active { border-color: var(--color-accent); }\n .x-nav-list-title { font-size: 13px; font-weight: 700; color: var(--color-text); }\n .x-nav-list-meta { font-size: 11px; color: var(--color-text-muted); }\n .x-nav-editor { min-width: 0; }\n .x-nav-editor-head {\n display: flex; justify-content: space-between; align-items: center;\n font-size: 13px; font-weight: 700; color: var(--color-text); margin-bottom: 12px;\n }\n .x-nav-editor-head button { margin-left: 6px; }\n .x-nav-items { display: flex; flex-direction: column; gap: 8px; }\n .x-nav-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 10px 12px; }\n .x-nav-item-off { opacity: 0.5; }\n .x-nav-item-row, .x-nav-child { display: flex; align-items: center; gap: 10px; }\n .x-nav-child { padding: 6px 0 0 28px; font-size: 12.5px; }\n .x-nav-grip { cursor: grab; color: var(--color-text-muted); }\n .x-nav-order { display: flex; flex-direction: column; }\n .x-nav-order button { border: 0; background: transparent; cursor: pointer; color: var(--color-text-muted); font-size: 10px; line-height: 1.1; padding: 1px 3px; }\n .x-nav-order button:disabled { opacity: 0.3; }\n .x-nav-item-label, .x-nav-child-label { font-weight: 700; font-size: 13px; }\n .x-nav-item-url { font-size: 11.5px; color: var(--color-text-muted); font-family: var(--font-mono); flex: 1; }\n .x-nav-item-actions { display: flex; gap: 8px; align-items: center; }\n .x-nav-toggle { border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: transparent; padding: 3px 10px; font-size: 11.5px; font-weight: 700; cursor: pointer; color: var(--color-text-muted); }\n .x-nav-link { border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--color-accent-hover); }\n .x-nav-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 10px; }\n .x-nav-f { display: flex; flex-direction: column; gap: 4px; flex: 1; font-size: 11.5px; color: var(--color-text-muted); font-weight: 700; }\n .x-nav-check { flex-direction: row; align-items: center; gap: 6px; }\n .x-nav-f-row { display: flex; gap: 10px; }\n .x-nav-form-actions { display: flex; gap: 8px; }\n</style>\n", styles: [".x-nav-head{margin-bottom:20px}.x-nav-title{font-size:24px;font-weight:800;color:var(--color-text)}.x-nav-sub{font-size:13.5px;color:var(--color-text-muted);margin-top:2px}.x-nav-sub code,.x-nav-editor-head code{font-family:var(--font-mono);font-size:12px}.x-nav-empty{font-size:14px;color:var(--color-text-muted);padding:12px 0}.x-nav-layout{display:grid;grid-template-columns:240px 1fr;gap:20px;align-items:start}.x-nav-list{display:flex;flex-direction:column;gap:6px}.x-nav-new{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}.x-nav-new select,.x-nav-new input,.x-nav-f input,.x-nav-f select{border:1px solid var(--color-border);border-radius:var(--radius-md);padding:6px 10px;font-size:13px;background:var(--color-surface);color:var(--color-text)}.x-nav-new button,.x-nav-btn{border:1px solid var(--color-border);background:transparent;border-radius:var(--radius-md);padding:6px 14px;font-size:12.5px;font-weight:700;cursor:pointer;color:var(--color-text-muted)}.x-nav-btn-primary{border-color:var(--color-accent);color:var(--color-accent-hover)}.x-nav-danger{color:var(--color-danger, #c0362c)}.x-nav-list-item{text-align:left;border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);padding:8px 10px;cursor:pointer;display:flex;flex-direction:column;gap:2px}.x-nav-list-active{border-color:var(--color-accent)}.x-nav-list-title{font-size:13px;font-weight:700;color:var(--color-text)}.x-nav-list-meta{font-size:11px;color:var(--color-text-muted)}.x-nav-editor{min-width:0}.x-nav-editor-head{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:700;color:var(--color-text);margin-bottom:12px}.x-nav-editor-head button{margin-left:6px}.x-nav-items{display:flex;flex-direction:column;gap:8px}.x-nav-item{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:10px 12px}.x-nav-item-off{opacity:.5}.x-nav-item-row,.x-nav-child{display:flex;align-items:center;gap:10px}.x-nav-child{padding:6px 0 0 28px;font-size:12.5px}.x-nav-grip{cursor:grab;color:var(--color-text-muted)}.x-nav-order{display:flex;flex-direction:column}.x-nav-order button{border:0;background:transparent;cursor:pointer;color:var(--color-text-muted);font-size:10px;line-height:1.1;padding:1px 3px}.x-nav-order button:disabled{opacity:.3}.x-nav-item-label,.x-nav-child-label{font-weight:700;font-size:13px}.x-nav-item-url{font-size:11.5px;color:var(--color-text-muted);font-family:var(--font-mono);flex:1}.x-nav-item-actions{display:flex;gap:8px;align-items:center}.x-nav-toggle{border:1px solid var(--color-border);border-radius:var(--radius-sm);background:transparent;padding:3px 10px;font-size:11.5px;font-weight:700;cursor:pointer;color:var(--color-text-muted)}.x-nav-link{border:0;background:transparent;cursor:pointer;font-size:12px;font-weight:700;color:var(--color-accent-hover)}.x-nav-form{margin-top:12px;padding-top:12px;border-top:1px solid var(--color-border);display:flex;flex-direction:column;gap:10px}.x-nav-f{display:flex;flex-direction:column;gap:4px;flex:1;font-size:11.5px;color:var(--color-text-muted);font-weight:700}.x-nav-check{flex-direction:row;align-items:center;gap:6px}.x-nav-f-row{display:flex;gap:10px}.x-nav-form-actions{display:flex;gap:8px}\n"], dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }] }); }
253
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: NavigationComponent, isStandalone: false, selector: "x-navigation", usesInheritance: true, ngImport: i0, template: "<div class=\"x-nav-head\">\n <div class=\"x-nav-title\">Navigation</div>\n <div class=\"x-nav-sub\">Storefront menus \u2014 the shell consumes the <code>header_primary</code> menu.</div>\n</div>\n\n@if (loading) {\n <x-element-loader></x-element-loader>\n} @else {\n <div class=\"x-nav-layout\">\n <aside class=\"x-nav-list\">\n <div class=\"x-nav-new\">\n <select [(ngModel)]=\"newMenuLocation\">\n @for (l of locations; track l) { <option [value]=\"l\">{{ l }}</option> }\n </select>\n <input type=\"text\" placeholder=\"Menu name\" [(ngModel)]=\"newMenuName\" />\n <button type=\"button\" (click)=\"createMenu()\">Add menu</button>\n </div>\n @for (m of menus; track m.id) {\n <button\n type=\"button\"\n class=\"x-nav-list-item\"\n [class.x-nav-list-active]=\"selected?.id === m.id\"\n (click)=\"select(m)\"\n >\n <span class=\"x-nav-list-title\">{{ m.name }}</span>\n <span class=\"x-nav-list-meta\">{{ m.location }}</span>\n </button>\n } @empty {\n <div class=\"x-nav-empty\">No menus yet.</div>\n }\n </aside>\n\n <section class=\"x-nav-editor\">\n @if (!selected) {\n <div class=\"x-nav-empty\">Pick a menu, or add one.</div>\n } @else {\n <div class=\"x-nav-editor-head\">\n <span>{{ selected.name }} \u2014 <code>{{ selected.location }}</code></span>\n <span>\n <button type=\"button\" class=\"x-nav-btn\" (click)=\"addItem()\">Add link</button>\n <button type=\"button\" class=\"x-nav-btn x-nav-danger\" (click)=\"deleteMenu()\">Delete menu</button>\n </span>\n </div>\n\n @if (!topLevel.length) {\n <div class=\"x-nav-empty\">No links yet.</div>\n } @else {\n <div class=\"x-nav-items\">\n @for (item of topLevel; track item.id; let i = $index) {\n <div\n class=\"x-nav-item\"\n [class.x-nav-item-off]=\"!item.enabled\"\n draggable=\"true\"\n (dragstart)=\"onDragStart(i)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop(i)\"\n >\n <div class=\"x-nav-item-row\">\n <span class=\"x-nav-grip\">\u283F</span>\n <div class=\"x-nav-order\">\n <button type=\"button\" (click)=\"moveItem(i, -1)\" [disabled]=\"i === 0\">\u25B2</button>\n <button type=\"button\" (click)=\"moveItem(i, 1)\" [disabled]=\"i === topLevel.length - 1\">\u25BC</button>\n </div>\n <span class=\"x-nav-item-label\">{{ item.label }}</span>\n <span class=\"x-nav-item-url\">{{ item.url }}</span>\n <span class=\"x-nav-item-actions\">\n <button type=\"button\" class=\"x-nav-toggle\" (click)=\"toggleItem(item)\">{{ item.enabled ? 'On' : 'Off' }}</button>\n <button type=\"button\" class=\"x-nav-link\" (click)=\"editItem(item)\">Edit</button>\n <button type=\"button\" class=\"x-nav-link x-nav-danger\" (click)=\"removeItem(item)\">Delete</button>\n </span>\n </div>\n\n @for (child of childrenOf(item.id); track child.id) {\n <div class=\"x-nav-child\" [class.x-nav-item-off]=\"!child.enabled\">\n <span class=\"x-nav-child-label\">\u21B3 {{ child.label }}</span>\n <span class=\"x-nav-item-url\">{{ child.url }}</span>\n <span class=\"x-nav-item-actions\">\n <button type=\"button\" class=\"x-nav-toggle\" (click)=\"toggleItem(child)\">{{ child.enabled ? 'On' : 'Off' }}</button>\n <button type=\"button\" class=\"x-nav-link\" (click)=\"editItem(child)\">Edit</button>\n <button type=\"button\" class=\"x-nav-link x-nav-danger\" (click)=\"removeItem(child)\">Delete</button>\n </span>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (editingItem) {\n <ng-container *ngTemplateOutlet=\"itemForm\"></ng-container>\n }\n }\n </section>\n </div>\n}\n\n<ng-template #itemForm>\n <div class=\"x-nav-form\">\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">Label<input type=\"text\" [(ngModel)]=\"itemModel.label\" /></label>\n <label class=\"x-nav-f\">URL<input type=\"text\" [(ngModel)]=\"itemModel.url\" placeholder=\"/c/solar-panels\" /></label>\n </div>\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">\n Parent\n <select [(ngModel)]=\"itemModel.parentId\">\n <option value=\"\">\u2014 top level \u2014</option>\n @for (p of parentOptions; track p.id) { <option [value]=\"p.id\">{{ p.label }}</option> }\n </select>\n </label>\n <label class=\"x-nav-f\">Icon<input type=\"text\" [(ngModel)]=\"itemModel.icon\" /></label>\n <label class=\"x-nav-f x-nav-check\">\n <input type=\"checkbox\" [(ngModel)]=\"itemModel.openInNewTab\" /> New tab\n </label>\n </div>\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">Starts<input type=\"datetime-local\" [(ngModel)]=\"itemModel.startsAt\" /></label>\n <label class=\"x-nav-f\">Ends<input type=\"datetime-local\" [(ngModel)]=\"itemModel.endsAt\" /></label>\n </div>\n <div class=\"x-nav-form-actions\">\n <button type=\"button\" class=\"x-nav-btn x-nav-btn-primary\" (click)=\"saveItem()\">Save link</button>\n <button type=\"button\" class=\"x-nav-btn\" (click)=\"cancelItemEdit()\">Cancel</button>\n </div>\n </div>\n</ng-template>\n\n<style>\n .x-nav-head { margin-bottom: 20px; }\n .x-nav-title { font-size: 24px; font-weight: 800; color: var(--color-text); }\n .x-nav-sub { font-size: 13.5px; color: var(--color-text-muted); margin-top: 2px; }\n .x-nav-sub code, .x-nav-editor-head code { font-family: var(--font-mono); font-size: 12px; }\n .x-nav-empty { font-size: 14px; color: var(--color-text-muted); padding: 12px 0; }\n .x-nav-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }\n .x-nav-list { display: flex; flex-direction: column; gap: 6px; }\n .x-nav-new { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }\n .x-nav-new select, .x-nav-new input, .x-nav-f input, .x-nav-f select {\n border: 1px solid var(--color-border); border-radius: var(--radius-md);\n padding: 6px 10px; font-size: 13px; background: var(--color-surface); color: var(--color-text);\n }\n .x-nav-new button, .x-nav-btn {\n border: 1px solid var(--color-border); background: transparent; border-radius: var(--radius-md);\n padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--color-text-muted);\n }\n .x-nav-btn-primary { border-color: var(--color-accent); color: var(--color-accent-hover); }\n .x-nav-danger { color: var(--color-danger, #c0362c); }\n .x-nav-list-item {\n text-align: left; border: 1px solid var(--color-border); border-radius: var(--radius-md);\n background: var(--color-surface); padding: 8px 10px; cursor: pointer;\n display: flex; flex-direction: column; gap: 2px;\n }\n .x-nav-list-active { border-color: var(--color-accent); }\n .x-nav-list-title { font-size: 13px; font-weight: 700; color: var(--color-text); }\n .x-nav-list-meta { font-size: 11px; color: var(--color-text-muted); }\n .x-nav-editor { min-width: 0; }\n .x-nav-editor-head {\n display: flex; justify-content: space-between; align-items: center;\n font-size: 13px; font-weight: 700; color: var(--color-text); margin-bottom: 12px;\n }\n .x-nav-editor-head button { margin-left: 6px; }\n .x-nav-items { display: flex; flex-direction: column; gap: 8px; }\n .x-nav-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 10px 12px; }\n .x-nav-item-off { opacity: 0.5; }\n .x-nav-item-row, .x-nav-child { display: flex; align-items: center; gap: 10px; }\n .x-nav-child { padding: 6px 0 0 28px; font-size: 12.5px; }\n .x-nav-grip { cursor: grab; color: var(--color-text-muted); }\n .x-nav-order { display: flex; flex-direction: column; }\n .x-nav-order button { border: 0; background: transparent; cursor: pointer; color: var(--color-text-muted); font-size: 10px; line-height: 1.1; padding: 1px 3px; }\n .x-nav-order button:disabled { opacity: 0.3; }\n .x-nav-item-label, .x-nav-child-label { font-weight: 700; font-size: 13px; }\n .x-nav-item-url { font-size: 11.5px; color: var(--color-text-muted); font-family: var(--font-mono); flex: 1; }\n .x-nav-item-actions { display: flex; gap: 8px; align-items: center; }\n .x-nav-toggle { border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: transparent; padding: 3px 10px; font-size: 11.5px; font-weight: 700; cursor: pointer; color: var(--color-text-muted); }\n .x-nav-link { border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--color-accent-hover); }\n .x-nav-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 10px; }\n .x-nav-f { display: flex; flex-direction: column; gap: 4px; flex: 1; font-size: 11.5px; color: var(--color-text-muted); font-weight: 700; }\n .x-nav-check { flex-direction: row; align-items: center; gap: 6px; }\n .x-nav-f-row { display: flex; gap: 10px; }\n .x-nav-form-actions { display: flex; gap: 8px; }\n</style>\n", styles: [".x-nav-head{margin-bottom:20px}.x-nav-title{font-size:24px;font-weight:800;color:var(--color-text)}.x-nav-sub{font-size:13.5px;color:var(--color-text-muted);margin-top:2px}.x-nav-sub code,.x-nav-editor-head code{font-family:var(--font-mono);font-size:12px}.x-nav-empty{font-size:14px;color:var(--color-text-muted);padding:12px 0}.x-nav-layout{display:grid;grid-template-columns:240px 1fr;gap:20px;align-items:start}.x-nav-list{display:flex;flex-direction:column;gap:6px}.x-nav-new{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}.x-nav-new select,.x-nav-new input,.x-nav-f input,.x-nav-f select{border:1px solid var(--color-border);border-radius:var(--radius-md);padding:6px 10px;font-size:13px;background:var(--color-surface);color:var(--color-text)}.x-nav-new button,.x-nav-btn{border:1px solid var(--color-border);background:transparent;border-radius:var(--radius-md);padding:6px 14px;font-size:12.5px;font-weight:700;cursor:pointer;color:var(--color-text-muted)}.x-nav-btn-primary{border-color:var(--color-accent);color:var(--color-accent-hover)}.x-nav-danger{color:var(--color-danger, #c0362c)}.x-nav-list-item{text-align:left;border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);padding:8px 10px;cursor:pointer;display:flex;flex-direction:column;gap:2px}.x-nav-list-active{border-color:var(--color-accent)}.x-nav-list-title{font-size:13px;font-weight:700;color:var(--color-text)}.x-nav-list-meta{font-size:11px;color:var(--color-text-muted)}.x-nav-editor{min-width:0}.x-nav-editor-head{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:700;color:var(--color-text);margin-bottom:12px}.x-nav-editor-head button{margin-left:6px}.x-nav-items{display:flex;flex-direction:column;gap:8px}.x-nav-item{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:10px 12px}.x-nav-item-off{opacity:.5}.x-nav-item-row,.x-nav-child{display:flex;align-items:center;gap:10px}.x-nav-child{padding:6px 0 0 28px;font-size:12.5px}.x-nav-grip{cursor:grab;color:var(--color-text-muted)}.x-nav-order{display:flex;flex-direction:column}.x-nav-order button{border:0;background:transparent;cursor:pointer;color:var(--color-text-muted);font-size:10px;line-height:1.1;padding:1px 3px}.x-nav-order button:disabled{opacity:.3}.x-nav-item-label,.x-nav-child-label{font-weight:700;font-size:13px}.x-nav-item-url{font-size:11.5px;color:var(--color-text-muted);font-family:var(--font-mono);flex:1}.x-nav-item-actions{display:flex;gap:8px;align-items:center}.x-nav-toggle{border:1px solid var(--color-border);border-radius:var(--radius-sm);background:transparent;padding:3px 10px;font-size:11.5px;font-weight:700;cursor:pointer;color:var(--color-text-muted)}.x-nav-link{border:0;background:transparent;cursor:pointer;font-size:12px;font-weight:700;color:var(--color-accent-hover)}.x-nav-form{margin-top:12px;padding-top:12px;border-top:1px solid var(--color-border);display:flex;flex-direction:column;gap:10px}.x-nav-f{display:flex;flex-direction:column;gap:4px;flex:1;font-size:11.5px;color:var(--color-text-muted);font-weight:700}.x-nav-check{flex-direction:row;align-items:center;gap:6px}.x-nav-f-row{display:flex;gap:10px}.x-nav-form-actions{display:flex;gap:8px}\n"], dependencies: [{ kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }] }); }
254
254
  }
255
255
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NavigationComponent, decorators: [{
256
256
  type: Component,
@@ -260,7 +260,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
260
260
  class NavigationModule {
261
261
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
262
262
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.16", ngImport: i0, type: NavigationModule, declarations: [NavigationComponent], imports: [SharedModule,
263
- ElementsModule, i1$2.RouterModule] }); }
263
+ ElementsModule, i1$1.RouterModule] }); }
264
264
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NavigationModule, imports: [SharedModule,
265
265
  ElementsModule,
266
266
  RouterModule.forChild([{ path: '', component: NavigationComponent }])] }); }
@@ -278,4 +278,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
278
278
  }] });
279
279
 
280
280
  export { NavigationModule };
281
- //# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-navigation.module-DoKzzRgn.mjs.map
281
+ //# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-navigation.module-De1Cvqqa.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-navigation.module-DoKzzRgn.mjs","sources":["../../../projects/admin/src/lib/pages/navigation/navigation.component.ts","../../../projects/admin/src/lib/pages/navigation/navigation.component.html","../../../projects/admin/src/lib/pages/navigation/navigation.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseDirective, notify, using } from '@thescaffold/ngx-core';\nimport { firstValueFrom, takeUntil } from 'rxjs';\n\ninterface MenuVm {\n id: string;\n location: string;\n name: string;\n enabled: boolean;\n}\n\ninterface ItemVm {\n id: string;\n menuId: string;\n label: string;\n url: string;\n position: number;\n parentId?: string;\n icon?: string;\n openInNewTab: boolean;\n startsAt?: string;\n endsAt?: string;\n enabled: boolean;\n}\n\nconst LOCATIONS = [\n 'header_primary',\n 'header_secondary',\n 'footer',\n 'mobile_drawer',\n 'utility_bar',\n];\n\n// P6.12, CMS-03 — the ops navigation editor. Menus (one per location) and\n// their items: label, url, nesting (`parentId`), schedule and order. The\n// storefront shell consumes `header_primary` (P6.12 shell wiring).\n@Component({\n standalone: false,\n selector: 'x-navigation',\n templateUrl: './navigation.component.html',\n})\nexport class NavigationComponent extends BaseDirective {\n private readonly menuSource = this.apiService.on('apps/commerce/navigation-menu');\n private readonly itemSource = this.apiService.on('apps/commerce/navigation-item');\n\n readonly locations = LOCATIONS;\n\n loading = true;\n menus: MenuVm[] = [];\n selected?: MenuVm;\n items: ItemVm[] = [];\n\n newMenuLocation = LOCATIONS[0];\n newMenuName = '';\n\n editingItem?: ItemVm;\n itemModel: {\n label: string;\n url: string;\n parentId: string;\n icon: string;\n openInNewTab: boolean;\n startsAt: string;\n endsAt: string;\n } = this.blankItem();\n\n private dragIndex: number | null = null;\n\n override init = () => {\n this.load();\n };\n\n get topLevel(): ItemVm[] {\n return this.items\n .filter((i) => !i.parentId)\n .sort((a, b) => a.position - b.position);\n }\n\n childrenOf(parentId: string): ItemVm[] {\n return this.items\n .filter((i) => i.parentId === parentId)\n .sort((a, b) => a.position - b.position);\n }\n\n get parentOptions(): ItemVm[] {\n // Only top-level items can be parents (one level of nesting).\n return this.items.filter((i) => !i.parentId && i.id !== this.editingItem?.id);\n }\n\n load(): void {\n this.loading = true;\n this.menuSource\n .getMany({ perPage: 100 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(\n using((res: any) => {\n this.menus = (res?.data ?? []).sort((a: any, b: any) =>\n String(a.location).localeCompare(String(b.location)),\n );\n this.loading = false;\n if (this.selected) {\n this.selected = this.menus.find((m) => m.id === this.selected!.id);\n }\n }),\n );\n }\n\n async createMenu(): Promise<void> {\n const name = this.newMenuName.trim();\n if (!name) return;\n try {\n const res: any = await firstValueFrom(\n this.menuSource.create({\n location: this.newMenuLocation,\n name,\n enabled: true,\n } as any),\n );\n this.newMenuName = '';\n notify('Menu created.', undefined, 'success');\n this.load();\n if (res?.data?.id) setTimeout(() => this.select({ ...res.data }), 200);\n } catch {\n notify('Could not create the menu.', undefined, 'error');\n }\n }\n\n select(menu: MenuVm): void {\n this.selected = menu;\n this.editingItem = undefined;\n this.loadItems();\n }\n\n async deleteMenu(): Promise<void> {\n if (!this.selected) return;\n try {\n await firstValueFrom(this.menuSource.remove(this.selected.id));\n this.selected = undefined;\n this.items = [];\n notify('Menu deleted.', undefined, 'success');\n this.load();\n } catch {\n notify('Could not delete the menu.', undefined, 'error');\n }\n }\n\n private loadItems(): void {\n if (!this.selected) return;\n this.itemSource\n .getMany({ menuId: this.selected.id, perPage: 200 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(\n using((res: any) => {\n this.items = ((res?.data ?? []) as ItemVm[]).filter(\n (i) => i.menuId === this.selected!.id,\n );\n }),\n );\n }\n\n async addItem(): Promise<void> {\n if (!this.selected) return;\n try {\n await firstValueFrom(\n this.itemSource.create({\n menuId: this.selected.id,\n label: 'New link',\n url: '/',\n position: this.topLevel.length,\n enabled: true,\n } as any),\n );\n this.loadItems();\n } catch {\n notify('Could not add the item.', undefined, 'error');\n }\n }\n\n editItem(item: ItemVm): void {\n this.editingItem = item;\n this.itemModel = {\n label: item.label,\n url: typeof item.url === 'string' ? item.url : '',\n parentId: item.parentId ?? '',\n icon: item.icon ?? '',\n openInNewTab: !!item.openInNewTab,\n startsAt: this.toLocal(item.startsAt),\n endsAt: this.toLocal(item.endsAt),\n };\n }\n\n cancelItemEdit(): void {\n this.editingItem = undefined;\n this.itemModel = this.blankItem();\n }\n\n async saveItem(): Promise<void> {\n if (!this.editingItem) return;\n try {\n await firstValueFrom(\n this.itemSource.update(this.editingItem.id, {\n label: this.itemModel.label.trim() || 'Link',\n url: this.itemModel.url.trim() || '/',\n parentId: this.itemModel.parentId || null,\n icon: this.itemModel.icon.trim() || undefined,\n openInNewTab: this.itemModel.openInNewTab,\n startsAt: this.itemModel.startsAt ? new Date(this.itemModel.startsAt).toISOString() : null,\n endsAt: this.itemModel.endsAt ? new Date(this.itemModel.endsAt).toISOString() : null,\n } as any),\n );\n notify('Item saved.', undefined, 'success');\n this.cancelItemEdit();\n this.loadItems();\n } catch {\n notify('Could not save the item.', undefined, 'error');\n }\n }\n\n async toggleItem(item: ItemVm): Promise<void> {\n const next = !item.enabled;\n try {\n await firstValueFrom(this.itemSource.update(item.id, { enabled: next } as any));\n item.enabled = next;\n } catch {\n notify('Could not update the item.', undefined, 'error');\n }\n }\n\n async removeItem(item: ItemVm): Promise<void> {\n try {\n // Detach any children first so they don't dangle.\n await Promise.all(\n this.childrenOf(item.id).map((child) =>\n firstValueFrom(this.itemSource.update(child.id, { parentId: null } as any)),\n ),\n );\n await firstValueFrom(this.itemSource.remove(item.id));\n this.items = this.items.filter((i) => i.id !== item.id);\n if (this.editingItem?.id === item.id) this.cancelItemEdit();\n notify('Item removed.', undefined, 'success');\n } catch {\n notify('Could not remove the item.', undefined, 'error');\n }\n }\n\n onDragStart(index: number): void {\n this.dragIndex = index;\n }\n\n onDragOver(event: DragEvent): void {\n event.preventDefault();\n }\n\n onDrop(targetIndex: number): void {\n if (this.dragIndex === null || this.dragIndex === targetIndex) return;\n const ordered = this.topLevel;\n const [moved] = ordered.splice(this.dragIndex, 1);\n ordered.splice(targetIndex, 0, moved);\n this.dragIndex = null;\n void this.persistOrder(ordered);\n }\n\n moveItem(index: number, dir: -1 | 1): void {\n const ordered = this.topLevel;\n const target = index + dir;\n if (target < 0 || target >= ordered.length) return;\n [ordered[index], ordered[target]] = [ordered[target], ordered[index]];\n void this.persistOrder(ordered);\n }\n\n private async persistOrder(ordered: ItemVm[]): Promise<void> {\n const changed: ItemVm[] = [];\n ordered.forEach((item, i) => {\n if (item.position !== i) {\n item.position = i;\n changed.push(item);\n }\n });\n try {\n await Promise.all(\n changed.map((item) =>\n firstValueFrom(this.itemSource.update(item.id, { position: item.position } as any)),\n ),\n );\n } catch {\n notify('Could not save the new order.', undefined, 'error');\n this.loadItems();\n }\n }\n\n private blankItem() {\n return {\n label: '',\n url: '',\n parentId: '',\n icon: '',\n openInNewTab: false,\n startsAt: '',\n endsAt: '',\n };\n }\n\n private toLocal(iso?: string): string {\n if (!iso) return '';\n const d = new Date(iso);\n if (Number.isNaN(d.getTime())) return '';\n const pad = (n: number) => String(n).padStart(2, '0');\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}`;\n }\n}\n","<div class=\"x-nav-head\">\n <div class=\"x-nav-title\">Navigation</div>\n <div class=\"x-nav-sub\">Storefront menus — the shell consumes the <code>header_primary</code> menu.</div>\n</div>\n\n@if (loading) {\n <x-element-loader></x-element-loader>\n} @else {\n <div class=\"x-nav-layout\">\n <aside class=\"x-nav-list\">\n <div class=\"x-nav-new\">\n <select [(ngModel)]=\"newMenuLocation\">\n @for (l of locations; track l) { <option [value]=\"l\">{{ l }}</option> }\n </select>\n <input type=\"text\" placeholder=\"Menu name\" [(ngModel)]=\"newMenuName\" />\n <button type=\"button\" (click)=\"createMenu()\">Add menu</button>\n </div>\n @for (m of menus; track m.id) {\n <button\n type=\"button\"\n class=\"x-nav-list-item\"\n [class.x-nav-list-active]=\"selected?.id === m.id\"\n (click)=\"select(m)\"\n >\n <span class=\"x-nav-list-title\">{{ m.name }}</span>\n <span class=\"x-nav-list-meta\">{{ m.location }}</span>\n </button>\n } @empty {\n <div class=\"x-nav-empty\">No menus yet.</div>\n }\n </aside>\n\n <section class=\"x-nav-editor\">\n @if (!selected) {\n <div class=\"x-nav-empty\">Pick a menu, or add one.</div>\n } @else {\n <div class=\"x-nav-editor-head\">\n <span>{{ selected.name }} — <code>{{ selected.location }}</code></span>\n <span>\n <button type=\"button\" class=\"x-nav-btn\" (click)=\"addItem()\">Add link</button>\n <button type=\"button\" class=\"x-nav-btn x-nav-danger\" (click)=\"deleteMenu()\">Delete menu</button>\n </span>\n </div>\n\n @if (!topLevel.length) {\n <div class=\"x-nav-empty\">No links yet.</div>\n } @else {\n <div class=\"x-nav-items\">\n @for (item of topLevel; track item.id; let i = $index) {\n <div\n class=\"x-nav-item\"\n [class.x-nav-item-off]=\"!item.enabled\"\n draggable=\"true\"\n (dragstart)=\"onDragStart(i)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop(i)\"\n >\n <div class=\"x-nav-item-row\">\n <span class=\"x-nav-grip\">⠿</span>\n <div class=\"x-nav-order\">\n <button type=\"button\" (click)=\"moveItem(i, -1)\" [disabled]=\"i === 0\">▲</button>\n <button type=\"button\" (click)=\"moveItem(i, 1)\" [disabled]=\"i === topLevel.length - 1\">▼</button>\n </div>\n <span class=\"x-nav-item-label\">{{ item.label }}</span>\n <span class=\"x-nav-item-url\">{{ item.url }}</span>\n <span class=\"x-nav-item-actions\">\n <button type=\"button\" class=\"x-nav-toggle\" (click)=\"toggleItem(item)\">{{ item.enabled ? 'On' : 'Off' }}</button>\n <button type=\"button\" class=\"x-nav-link\" (click)=\"editItem(item)\">Edit</button>\n <button type=\"button\" class=\"x-nav-link x-nav-danger\" (click)=\"removeItem(item)\">Delete</button>\n </span>\n </div>\n\n @for (child of childrenOf(item.id); track child.id) {\n <div class=\"x-nav-child\" [class.x-nav-item-off]=\"!child.enabled\">\n <span class=\"x-nav-child-label\">↳ {{ child.label }}</span>\n <span class=\"x-nav-item-url\">{{ child.url }}</span>\n <span class=\"x-nav-item-actions\">\n <button type=\"button\" class=\"x-nav-toggle\" (click)=\"toggleItem(child)\">{{ child.enabled ? 'On' : 'Off' }}</button>\n <button type=\"button\" class=\"x-nav-link\" (click)=\"editItem(child)\">Edit</button>\n <button type=\"button\" class=\"x-nav-link x-nav-danger\" (click)=\"removeItem(child)\">Delete</button>\n </span>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (editingItem) {\n <ng-container *ngTemplateOutlet=\"itemForm\"></ng-container>\n }\n }\n </section>\n </div>\n}\n\n<ng-template #itemForm>\n <div class=\"x-nav-form\">\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">Label<input type=\"text\" [(ngModel)]=\"itemModel.label\" /></label>\n <label class=\"x-nav-f\">URL<input type=\"text\" [(ngModel)]=\"itemModel.url\" placeholder=\"/c/solar-panels\" /></label>\n </div>\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">\n Parent\n <select [(ngModel)]=\"itemModel.parentId\">\n <option value=\"\">— top level —</option>\n @for (p of parentOptions; track p.id) { <option [value]=\"p.id\">{{ p.label }}</option> }\n </select>\n </label>\n <label class=\"x-nav-f\">Icon<input type=\"text\" [(ngModel)]=\"itemModel.icon\" /></label>\n <label class=\"x-nav-f x-nav-check\">\n <input type=\"checkbox\" [(ngModel)]=\"itemModel.openInNewTab\" /> New tab\n </label>\n </div>\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">Starts<input type=\"datetime-local\" [(ngModel)]=\"itemModel.startsAt\" /></label>\n <label class=\"x-nav-f\">Ends<input type=\"datetime-local\" [(ngModel)]=\"itemModel.endsAt\" /></label>\n </div>\n <div class=\"x-nav-form-actions\">\n <button type=\"button\" class=\"x-nav-btn x-nav-btn-primary\" (click)=\"saveItem()\">Save link</button>\n <button type=\"button\" class=\"x-nav-btn\" (click)=\"cancelItemEdit()\">Cancel</button>\n </div>\n </div>\n</ng-template>\n\n<style>\n .x-nav-head { margin-bottom: 20px; }\n .x-nav-title { font-size: 24px; font-weight: 800; color: var(--color-text); }\n .x-nav-sub { font-size: 13.5px; color: var(--color-text-muted); margin-top: 2px; }\n .x-nav-sub code, .x-nav-editor-head code { font-family: var(--font-mono); font-size: 12px; }\n .x-nav-empty { font-size: 14px; color: var(--color-text-muted); padding: 12px 0; }\n .x-nav-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }\n .x-nav-list { display: flex; flex-direction: column; gap: 6px; }\n .x-nav-new { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }\n .x-nav-new select, .x-nav-new input, .x-nav-f input, .x-nav-f select {\n border: 1px solid var(--color-border); border-radius: var(--radius-md);\n padding: 6px 10px; font-size: 13px; background: var(--color-surface); color: var(--color-text);\n }\n .x-nav-new button, .x-nav-btn {\n border: 1px solid var(--color-border); background: transparent; border-radius: var(--radius-md);\n padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--color-text-muted);\n }\n .x-nav-btn-primary { border-color: var(--color-accent); color: var(--color-accent-hover); }\n .x-nav-danger { color: var(--color-danger, #c0362c); }\n .x-nav-list-item {\n text-align: left; border: 1px solid var(--color-border); border-radius: var(--radius-md);\n background: var(--color-surface); padding: 8px 10px; cursor: pointer;\n display: flex; flex-direction: column; gap: 2px;\n }\n .x-nav-list-active { border-color: var(--color-accent); }\n .x-nav-list-title { font-size: 13px; font-weight: 700; color: var(--color-text); }\n .x-nav-list-meta { font-size: 11px; color: var(--color-text-muted); }\n .x-nav-editor { min-width: 0; }\n .x-nav-editor-head {\n display: flex; justify-content: space-between; align-items: center;\n font-size: 13px; font-weight: 700; color: var(--color-text); margin-bottom: 12px;\n }\n .x-nav-editor-head button { margin-left: 6px; }\n .x-nav-items { display: flex; flex-direction: column; gap: 8px; }\n .x-nav-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 10px 12px; }\n .x-nav-item-off { opacity: 0.5; }\n .x-nav-item-row, .x-nav-child { display: flex; align-items: center; gap: 10px; }\n .x-nav-child { padding: 6px 0 0 28px; font-size: 12.5px; }\n .x-nav-grip { cursor: grab; color: var(--color-text-muted); }\n .x-nav-order { display: flex; flex-direction: column; }\n .x-nav-order button { border: 0; background: transparent; cursor: pointer; color: var(--color-text-muted); font-size: 10px; line-height: 1.1; padding: 1px 3px; }\n .x-nav-order button:disabled { opacity: 0.3; }\n .x-nav-item-label, .x-nav-child-label { font-weight: 700; font-size: 13px; }\n .x-nav-item-url { font-size: 11.5px; color: var(--color-text-muted); font-family: var(--font-mono); flex: 1; }\n .x-nav-item-actions { display: flex; gap: 8px; align-items: center; }\n .x-nav-toggle { border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: transparent; padding: 3px 10px; font-size: 11.5px; font-weight: 700; cursor: pointer; color: var(--color-text-muted); }\n .x-nav-link { border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--color-accent-hover); }\n .x-nav-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 10px; }\n .x-nav-f { display: flex; flex-direction: column; gap: 4px; flex: 1; font-size: 11.5px; color: var(--color-text-muted); font-weight: 700; }\n .x-nav-check { flex-direction: row; align-items: center; gap: 6px; }\n .x-nav-f-row { display: flex; gap: 10px; }\n .x-nav-form-actions { display: flex; gap: 8px; }\n</style>\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@thescaffold/ngx-core';\nimport { ElementsModule } from '@thescaffold/ngx-ui';\nimport { NavigationComponent } from './navigation.component';\n\n@NgModule({\n declarations: [NavigationComponent],\n imports: [\n SharedModule,\n ElementsModule,\n RouterModule.forChild([{ path: '', component: NavigationComponent }]),\n ],\n})\nexport class NavigationModule {}\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;AAyBA,MAAM,SAAS,GAAG;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,QAAQ;IACR,eAAe;IACf,aAAa;CACd;AAED;AACA;AACA;AAMM,MAAO,mBAAoB,SAAQ,aAAa,CAAA;AALtD,IAAA,WAAA,GAAA;;QAMmB,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,+BAA+B,CAAC;Q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E,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;AACd,wBAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;AACtE,qBAAA;AACF,iBAAA;;;;;"}
1
+ {"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-navigation.module-De1Cvqqa.mjs","sources":["../../../projects/admin/src/lib/pages/navigation/navigation.component.ts","../../../projects/admin/src/lib/pages/navigation/navigation.component.html","../../../projects/admin/src/lib/pages/navigation/navigation.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseDirective, notify, using } from '@thescaffold/ngx-core';\nimport { firstValueFrom, takeUntil } from 'rxjs';\n\ninterface MenuVm {\n id: string;\n location: string;\n name: string;\n enabled: boolean;\n}\n\ninterface ItemVm {\n id: string;\n menuId: string;\n label: string;\n url: string;\n position: number;\n parentId?: string;\n icon?: string;\n openInNewTab: boolean;\n startsAt?: string;\n endsAt?: string;\n enabled: boolean;\n}\n\nconst LOCATIONS = [\n 'header_primary',\n 'header_secondary',\n 'footer',\n 'mobile_drawer',\n 'utility_bar',\n];\n\n// P6.12, CMS-03 — the ops navigation editor. Menus (one per location) and\n// their items: label, url, nesting (`parentId`), schedule and order. The\n// storefront shell consumes `header_primary` (P6.12 shell wiring).\n@Component({\n standalone: false,\n selector: 'x-navigation',\n templateUrl: './navigation.component.html',\n})\nexport class NavigationComponent extends BaseDirective {\n private readonly menuSource = this.apiService.on('apps/commerce/navigation-menu');\n private readonly itemSource = this.apiService.on('apps/commerce/navigation-item');\n\n readonly locations = LOCATIONS;\n\n loading = true;\n menus: MenuVm[] = [];\n selected?: MenuVm;\n items: ItemVm[] = [];\n\n newMenuLocation = LOCATIONS[0];\n newMenuName = '';\n\n editingItem?: ItemVm;\n itemModel: {\n label: string;\n url: string;\n parentId: string;\n icon: string;\n openInNewTab: boolean;\n startsAt: string;\n endsAt: string;\n } = this.blankItem();\n\n private dragIndex: number | null = null;\n\n override init = () => {\n this.load();\n };\n\n get topLevel(): ItemVm[] {\n return this.items\n .filter((i) => !i.parentId)\n .sort((a, b) => a.position - b.position);\n }\n\n childrenOf(parentId: string): ItemVm[] {\n return this.items\n .filter((i) => i.parentId === parentId)\n .sort((a, b) => a.position - b.position);\n }\n\n get parentOptions(): ItemVm[] {\n // Only top-level items can be parents (one level of nesting).\n return this.items.filter((i) => !i.parentId && i.id !== this.editingItem?.id);\n }\n\n load(): void {\n this.loading = true;\n this.menuSource\n .getMany({ perPage: 100 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(\n using((res: any) => {\n this.menus = (res?.data ?? []).sort((a: any, b: any) =>\n String(a.location).localeCompare(String(b.location)),\n );\n this.loading = false;\n if (this.selected) {\n this.selected = this.menus.find((m) => m.id === this.selected!.id);\n }\n }),\n );\n }\n\n async createMenu(): Promise<void> {\n const name = this.newMenuName.trim();\n if (!name) return;\n try {\n const res: any = await firstValueFrom(\n this.menuSource.create({\n location: this.newMenuLocation,\n name,\n enabled: true,\n } as any),\n );\n this.newMenuName = '';\n notify('Menu created.', undefined, 'success');\n this.load();\n if (res?.data?.id) setTimeout(() => this.select({ ...res.data }), 200);\n } catch {\n notify('Could not create the menu.', undefined, 'error');\n }\n }\n\n select(menu: MenuVm): void {\n this.selected = menu;\n this.editingItem = undefined;\n this.loadItems();\n }\n\n async deleteMenu(): Promise<void> {\n if (!this.selected) return;\n try {\n await firstValueFrom(this.menuSource.remove(this.selected.id));\n this.selected = undefined;\n this.items = [];\n notify('Menu deleted.', undefined, 'success');\n this.load();\n } catch {\n notify('Could not delete the menu.', undefined, 'error');\n }\n }\n\n private loadItems(): void {\n if (!this.selected) return;\n this.itemSource\n .getMany({ menuId: this.selected.id, perPage: 200 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(\n using((res: any) => {\n this.items = ((res?.data ?? []) as ItemVm[]).filter(\n (i) => i.menuId === this.selected!.id,\n );\n }),\n );\n }\n\n async addItem(): Promise<void> {\n if (!this.selected) return;\n try {\n await firstValueFrom(\n this.itemSource.create({\n menuId: this.selected.id,\n label: 'New link',\n url: '/',\n position: this.topLevel.length,\n enabled: true,\n } as any),\n );\n this.loadItems();\n } catch {\n notify('Could not add the item.', undefined, 'error');\n }\n }\n\n editItem(item: ItemVm): void {\n this.editingItem = item;\n this.itemModel = {\n label: item.label,\n url: typeof item.url === 'string' ? item.url : '',\n parentId: item.parentId ?? '',\n icon: item.icon ?? '',\n openInNewTab: !!item.openInNewTab,\n startsAt: this.toLocal(item.startsAt),\n endsAt: this.toLocal(item.endsAt),\n };\n }\n\n cancelItemEdit(): void {\n this.editingItem = undefined;\n this.itemModel = this.blankItem();\n }\n\n async saveItem(): Promise<void> {\n if (!this.editingItem) return;\n try {\n await firstValueFrom(\n this.itemSource.update(this.editingItem.id, {\n label: this.itemModel.label.trim() || 'Link',\n url: this.itemModel.url.trim() || '/',\n parentId: this.itemModel.parentId || null,\n icon: this.itemModel.icon.trim() || undefined,\n openInNewTab: this.itemModel.openInNewTab,\n startsAt: this.itemModel.startsAt ? new Date(this.itemModel.startsAt).toISOString() : null,\n endsAt: this.itemModel.endsAt ? new Date(this.itemModel.endsAt).toISOString() : null,\n } as any),\n );\n notify('Item saved.', undefined, 'success');\n this.cancelItemEdit();\n this.loadItems();\n } catch {\n notify('Could not save the item.', undefined, 'error');\n }\n }\n\n async toggleItem(item: ItemVm): Promise<void> {\n const next = !item.enabled;\n try {\n await firstValueFrom(this.itemSource.update(item.id, { enabled: next } as any));\n item.enabled = next;\n } catch {\n notify('Could not update the item.', undefined, 'error');\n }\n }\n\n async removeItem(item: ItemVm): Promise<void> {\n try {\n // Detach any children first so they don't dangle.\n await Promise.all(\n this.childrenOf(item.id).map((child) =>\n firstValueFrom(this.itemSource.update(child.id, { parentId: null } as any)),\n ),\n );\n await firstValueFrom(this.itemSource.remove(item.id));\n this.items = this.items.filter((i) => i.id !== item.id);\n if (this.editingItem?.id === item.id) this.cancelItemEdit();\n notify('Item removed.', undefined, 'success');\n } catch {\n notify('Could not remove the item.', undefined, 'error');\n }\n }\n\n onDragStart(index: number): void {\n this.dragIndex = index;\n }\n\n onDragOver(event: DragEvent): void {\n event.preventDefault();\n }\n\n onDrop(targetIndex: number): void {\n if (this.dragIndex === null || this.dragIndex === targetIndex) return;\n const ordered = this.topLevel;\n const [moved] = ordered.splice(this.dragIndex, 1);\n ordered.splice(targetIndex, 0, moved);\n this.dragIndex = null;\n void this.persistOrder(ordered);\n }\n\n moveItem(index: number, dir: -1 | 1): void {\n const ordered = this.topLevel;\n const target = index + dir;\n if (target < 0 || target >= ordered.length) return;\n [ordered[index], ordered[target]] = [ordered[target], ordered[index]];\n void this.persistOrder(ordered);\n }\n\n private async persistOrder(ordered: ItemVm[]): Promise<void> {\n const changed: ItemVm[] = [];\n ordered.forEach((item, i) => {\n if (item.position !== i) {\n item.position = i;\n changed.push(item);\n }\n });\n try {\n await Promise.all(\n changed.map((item) =>\n firstValueFrom(this.itemSource.update(item.id, { position: item.position } as any)),\n ),\n );\n } catch {\n notify('Could not save the new order.', undefined, 'error');\n this.loadItems();\n }\n }\n\n private blankItem() {\n return {\n label: '',\n url: '',\n parentId: '',\n icon: '',\n openInNewTab: false,\n startsAt: '',\n endsAt: '',\n };\n }\n\n private toLocal(iso?: string): string {\n if (!iso) return '';\n const d = new Date(iso);\n if (Number.isNaN(d.getTime())) return '';\n const pad = (n: number) => String(n).padStart(2, '0');\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}`;\n }\n}\n","<div class=\"x-nav-head\">\n <div class=\"x-nav-title\">Navigation</div>\n <div class=\"x-nav-sub\">Storefront menus — the shell consumes the <code>header_primary</code> menu.</div>\n</div>\n\n@if (loading) {\n <x-element-loader></x-element-loader>\n} @else {\n <div class=\"x-nav-layout\">\n <aside class=\"x-nav-list\">\n <div class=\"x-nav-new\">\n <select [(ngModel)]=\"newMenuLocation\">\n @for (l of locations; track l) { <option [value]=\"l\">{{ l }}</option> }\n </select>\n <input type=\"text\" placeholder=\"Menu name\" [(ngModel)]=\"newMenuName\" />\n <button type=\"button\" (click)=\"createMenu()\">Add menu</button>\n </div>\n @for (m of menus; track m.id) {\n <button\n type=\"button\"\n class=\"x-nav-list-item\"\n [class.x-nav-list-active]=\"selected?.id === m.id\"\n (click)=\"select(m)\"\n >\n <span class=\"x-nav-list-title\">{{ m.name }}</span>\n <span class=\"x-nav-list-meta\">{{ m.location }}</span>\n </button>\n } @empty {\n <div class=\"x-nav-empty\">No menus yet.</div>\n }\n </aside>\n\n <section class=\"x-nav-editor\">\n @if (!selected) {\n <div class=\"x-nav-empty\">Pick a menu, or add one.</div>\n } @else {\n <div class=\"x-nav-editor-head\">\n <span>{{ selected.name }} — <code>{{ selected.location }}</code></span>\n <span>\n <button type=\"button\" class=\"x-nav-btn\" (click)=\"addItem()\">Add link</button>\n <button type=\"button\" class=\"x-nav-btn x-nav-danger\" (click)=\"deleteMenu()\">Delete menu</button>\n </span>\n </div>\n\n @if (!topLevel.length) {\n <div class=\"x-nav-empty\">No links yet.</div>\n } @else {\n <div class=\"x-nav-items\">\n @for (item of topLevel; track item.id; let i = $index) {\n <div\n class=\"x-nav-item\"\n [class.x-nav-item-off]=\"!item.enabled\"\n draggable=\"true\"\n (dragstart)=\"onDragStart(i)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop(i)\"\n >\n <div class=\"x-nav-item-row\">\n <span class=\"x-nav-grip\">⠿</span>\n <div class=\"x-nav-order\">\n <button type=\"button\" (click)=\"moveItem(i, -1)\" [disabled]=\"i === 0\">▲</button>\n <button type=\"button\" (click)=\"moveItem(i, 1)\" [disabled]=\"i === topLevel.length - 1\">▼</button>\n </div>\n <span class=\"x-nav-item-label\">{{ item.label }}</span>\n <span class=\"x-nav-item-url\">{{ item.url }}</span>\n <span class=\"x-nav-item-actions\">\n <button type=\"button\" class=\"x-nav-toggle\" (click)=\"toggleItem(item)\">{{ item.enabled ? 'On' : 'Off' }}</button>\n <button type=\"button\" class=\"x-nav-link\" (click)=\"editItem(item)\">Edit</button>\n <button type=\"button\" class=\"x-nav-link x-nav-danger\" (click)=\"removeItem(item)\">Delete</button>\n </span>\n </div>\n\n @for (child of childrenOf(item.id); track child.id) {\n <div class=\"x-nav-child\" [class.x-nav-item-off]=\"!child.enabled\">\n <span class=\"x-nav-child-label\">↳ {{ child.label }}</span>\n <span class=\"x-nav-item-url\">{{ child.url }}</span>\n <span class=\"x-nav-item-actions\">\n <button type=\"button\" class=\"x-nav-toggle\" (click)=\"toggleItem(child)\">{{ child.enabled ? 'On' : 'Off' }}</button>\n <button type=\"button\" class=\"x-nav-link\" (click)=\"editItem(child)\">Edit</button>\n <button type=\"button\" class=\"x-nav-link x-nav-danger\" (click)=\"removeItem(child)\">Delete</button>\n </span>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (editingItem) {\n <ng-container *ngTemplateOutlet=\"itemForm\"></ng-container>\n }\n }\n </section>\n </div>\n}\n\n<ng-template #itemForm>\n <div class=\"x-nav-form\">\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">Label<input type=\"text\" [(ngModel)]=\"itemModel.label\" /></label>\n <label class=\"x-nav-f\">URL<input type=\"text\" [(ngModel)]=\"itemModel.url\" placeholder=\"/c/solar-panels\" /></label>\n </div>\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">\n Parent\n <select [(ngModel)]=\"itemModel.parentId\">\n <option value=\"\">— top level —</option>\n @for (p of parentOptions; track p.id) { <option [value]=\"p.id\">{{ p.label }}</option> }\n </select>\n </label>\n <label class=\"x-nav-f\">Icon<input type=\"text\" [(ngModel)]=\"itemModel.icon\" /></label>\n <label class=\"x-nav-f x-nav-check\">\n <input type=\"checkbox\" [(ngModel)]=\"itemModel.openInNewTab\" /> New tab\n </label>\n </div>\n <div class=\"x-nav-f-row\">\n <label class=\"x-nav-f\">Starts<input type=\"datetime-local\" [(ngModel)]=\"itemModel.startsAt\" /></label>\n <label class=\"x-nav-f\">Ends<input type=\"datetime-local\" [(ngModel)]=\"itemModel.endsAt\" /></label>\n </div>\n <div class=\"x-nav-form-actions\">\n <button type=\"button\" class=\"x-nav-btn x-nav-btn-primary\" (click)=\"saveItem()\">Save link</button>\n <button type=\"button\" class=\"x-nav-btn\" (click)=\"cancelItemEdit()\">Cancel</button>\n </div>\n </div>\n</ng-template>\n\n<style>\n .x-nav-head { margin-bottom: 20px; }\n .x-nav-title { font-size: 24px; font-weight: 800; color: var(--color-text); }\n .x-nav-sub { font-size: 13.5px; color: var(--color-text-muted); margin-top: 2px; }\n .x-nav-sub code, .x-nav-editor-head code { font-family: var(--font-mono); font-size: 12px; }\n .x-nav-empty { font-size: 14px; color: var(--color-text-muted); padding: 12px 0; }\n .x-nav-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }\n .x-nav-list { display: flex; flex-direction: column; gap: 6px; }\n .x-nav-new { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }\n .x-nav-new select, .x-nav-new input, .x-nav-f input, .x-nav-f select {\n border: 1px solid var(--color-border); border-radius: var(--radius-md);\n padding: 6px 10px; font-size: 13px; background: var(--color-surface); color: var(--color-text);\n }\n .x-nav-new button, .x-nav-btn {\n border: 1px solid var(--color-border); background: transparent; border-radius: var(--radius-md);\n padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--color-text-muted);\n }\n .x-nav-btn-primary { border-color: var(--color-accent); color: var(--color-accent-hover); }\n .x-nav-danger { color: var(--color-danger, #c0362c); }\n .x-nav-list-item {\n text-align: left; border: 1px solid var(--color-border); border-radius: var(--radius-md);\n background: var(--color-surface); padding: 8px 10px; cursor: pointer;\n display: flex; flex-direction: column; gap: 2px;\n }\n .x-nav-list-active { border-color: var(--color-accent); }\n .x-nav-list-title { font-size: 13px; font-weight: 700; color: var(--color-text); }\n .x-nav-list-meta { font-size: 11px; color: var(--color-text-muted); }\n .x-nav-editor { min-width: 0; }\n .x-nav-editor-head {\n display: flex; justify-content: space-between; align-items: center;\n font-size: 13px; font-weight: 700; color: var(--color-text); margin-bottom: 12px;\n }\n .x-nav-editor-head button { margin-left: 6px; }\n .x-nav-items { display: flex; flex-direction: column; gap: 8px; }\n .x-nav-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 10px 12px; }\n .x-nav-item-off { opacity: 0.5; }\n .x-nav-item-row, .x-nav-child { display: flex; align-items: center; gap: 10px; }\n .x-nav-child { padding: 6px 0 0 28px; font-size: 12.5px; }\n .x-nav-grip { cursor: grab; color: var(--color-text-muted); }\n .x-nav-order { display: flex; flex-direction: column; }\n .x-nav-order button { border: 0; background: transparent; cursor: pointer; color: var(--color-text-muted); font-size: 10px; line-height: 1.1; padding: 1px 3px; }\n .x-nav-order button:disabled { opacity: 0.3; }\n .x-nav-item-label, .x-nav-child-label { font-weight: 700; font-size: 13px; }\n .x-nav-item-url { font-size: 11.5px; color: var(--color-text-muted); font-family: var(--font-mono); flex: 1; }\n .x-nav-item-actions { display: flex; gap: 8px; align-items: center; }\n .x-nav-toggle { border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: transparent; padding: 3px 10px; font-size: 11.5px; font-weight: 700; cursor: pointer; color: var(--color-text-muted); }\n .x-nav-link { border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--color-accent-hover); }\n .x-nav-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 10px; }\n .x-nav-f { display: flex; flex-direction: column; gap: 4px; flex: 1; font-size: 11.5px; color: var(--color-text-muted); font-weight: 700; }\n .x-nav-check { flex-direction: row; align-items: center; gap: 6px; }\n .x-nav-f-row { display: flex; gap: 10px; }\n .x-nav-form-actions { display: flex; gap: 8px; }\n</style>\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@thescaffold/ngx-core';\nimport { ElementsModule } from '@thescaffold/ngx-ui';\nimport { NavigationComponent } from './navigation.component';\n\n@NgModule({\n declarations: [NavigationComponent],\n imports: [\n SharedModule,\n ElementsModule,\n RouterModule.forChild([{ path: '', component: NavigationComponent }]),\n ],\n})\nexport class NavigationModule {}\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;AAyBA,MAAM,SAAS,GAAG;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,QAAQ;IACR,eAAe;IACf,aAAa;CACd;AAED;AACA;AACA;AAMM,MAAO,mBAAoB,SAAQ,aAAa,CAAA;AALtD,IAAA,WAAA,GAAA;;QAMmB,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,+BAA+B,CAAC;QAChE,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,+BAA+B,CAAC;QAExE,IAAA,CAAA,SAAS,GAAG,SAAS;QAE9B,IAAA,CAAA,OAAO,GAAG,IAAI;QACd,IAAA,CAAA,KAAK,GAAa,EAAE;QAEpB,IAAA,CAAA,KAAK,GAAa,EAAE;AAEpB,QAAA,IAAA,CAAA,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC;QAC9B,IAAA,CAAA,WAAW,GAAG,EAAE;AAGhB,QAAA,IAAA,CAAA,SAAS,GAQL,IAAI,CAAC,SAAS,EAAE;QAEZ,IAAA,CAAA,SAAS,GAAkB,IAAI;QAE9B,IAAA,CAAA,IAAI,GAAG,MAAK;YACnB,IAAI,CAAC,IAAI,EAAE;AACb,QAAA,CAAC;AA+OF,IAAA;AA7OC,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC;aACT,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ;AACzB,aAAA,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;IAC5C;A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AAc,EAAAF,IAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAIL,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YALzB,YAAY;YACZ,cAAc;AACd,YAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAG5D,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAR5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;AACd,wBAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;AACtE,qBAAA;AACF,iBAAA;;;;;"}
@@ -3,10 +3,10 @@ import { Component, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/router';
4
4
  import { RouterModule } from '@angular/router';
5
5
  import { BaseDirective, using, SharedModule } from '@thescaffold/ngx-core';
6
- import * as i1$1 from '@thescaffold/ngx-ui';
6
+ import * as i2 from '@thescaffold/ngx-ui';
7
7
  import { ElementsModule } from '@thescaffold/ngx-ui';
8
8
  import { BehaviorSubject, takeUntil } from 'rxjs';
9
- import * as i2 from '@angular/common';
9
+ import * as i3 from '@angular/common';
10
10
 
11
11
  // ORD-12 — the ops work queues. Each column is a stage of the order
12
12
  // lifecycle a team acts on; cards carry an age so a stale one stands out
@@ -84,7 +84,7 @@ class OrderBoardComponent extends BaseDirective {
84
84
  return `${Math.floor(hours / 24)}d`;
85
85
  }
86
86
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: OrderBoardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
87
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: OrderBoardComponent, isStandalone: false, selector: "x-order-board", usesInheritance: true, ngImport: i0, template: "<div class=\"x-page-head\">\n <div class=\"x-page-title\">Order board</div>\n <div class=\"x-page-subtitle\">Every open order by ops queue (ORD-12). Cards are oldest-first.</div>\n</div>\n\n@if (columns$ | async; as columns) {\n <div class=\"x-board\">\n @for (col of columns; track col.key) {\n <div class=\"x-board-col\">\n <div class=\"x-board-col-head\">\n <span>{{ col.label }}</span>\n <span class=\"x-board-col-count\">{{ col.cards.length }}</span>\n </div>\n <div class=\"x-board-col-body\">\n @for (card of col.cards; track card.id) {\n <a class=\"x-order-card\" [routerLink]=\"['../orders']\" [queryParams]=\"{ q: card.orderNumber }\">\n <div class=\"x-order-card-row\">\n <span class=\"x-order-card-num\">{{ card.orderNumber }}</span>\n <span class=\"x-order-card-age\" [class.stale]=\"card.ageHours >= 48\">{{ card.ageLabel }}</span>\n </div>\n <div class=\"x-order-card-total\">{{ card.totalLabel }}</div>\n </a>\n } @empty {\n <div class=\"x-board-col-empty\">None</div>\n }\n </div>\n </div>\n }\n </div>\n} @else {\n <x-element-loader></x-element-loader>\n}\n", styles: [".x-page-head{margin-bottom:20px}.x-page-title{font-size:24px;font-weight:800;color:var(--color-text)}.x-page-subtitle{font-size:13.5px;color:var(--color-text-muted);margin-top:2px}.x-board{display:flex;gap:14px;overflow-x:auto;padding-bottom:12px}.x-board-col{flex:0 0 230px;background:var(--color-surface-2, var(--color-surface));border:1px solid var(--color-border);border-radius:10px;display:flex;flex-direction:column;max-height:calc(100vh - 180px)}.x-board-col-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--color-text-muted)}.x-board-col-count{background:var(--color-surface);border:1px solid var(--color-border);border-radius:10px;padding:1px 7px;font-size:11px}.x-board-col-body{display:flex;flex-direction:column;gap:8px;padding:0 10px 10px;overflow-y:auto}.x-board-col-empty{font-size:12px;color:var(--color-text-muted);padding:8px 4px;text-align:center}.x-order-card{display:block;text-decoration:none;background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;padding:10px 12px}.x-order-card-row{display:flex;justify-content:space-between;align-items:baseline}.x-order-card-num{font-family:var(--font-mono);font-size:12px;color:var(--color-text)}.x-order-card-age{font-size:11px;color:var(--color-text-muted)}.x-order-card-age.stale{color:var(--color-danger);font-weight:700}.x-order-card-total{font-size:13px;font-weight:800;color:var(--color-text);margin-top:6px}\n"], dependencies: [{ kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1$1.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
87
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: OrderBoardComponent, isStandalone: false, selector: "x-order-board", usesInheritance: true, ngImport: i0, template: "<div class=\"x-page-head\">\n <div class=\"x-page-title\">Order board</div>\n <div class=\"x-page-subtitle\">Every open order by ops queue (ORD-12). Cards are oldest-first.</div>\n</div>\n\n@if (columns$ | async; as columns) {\n <div class=\"x-board\">\n @for (col of columns; track col.key) {\n <div class=\"x-board-col\">\n <div class=\"x-board-col-head\">\n <span>{{ col.label }}</span>\n <span class=\"x-board-col-count\">{{ col.cards.length }}</span>\n </div>\n <div class=\"x-board-col-body\">\n @for (card of col.cards; track card.id) {\n <a class=\"x-order-card\" [routerLink]=\"['../orders']\" [queryParams]=\"{ q: card.orderNumber }\">\n <div class=\"x-order-card-row\">\n <span class=\"x-order-card-num\">{{ card.orderNumber }}</span>\n <span class=\"x-order-card-age\" [class.stale]=\"card.ageHours >= 48\">{{ card.ageLabel }}</span>\n </div>\n <div class=\"x-order-card-total\">{{ card.totalLabel }}</div>\n </a>\n } @empty {\n <div class=\"x-board-col-empty\">None</div>\n }\n </div>\n </div>\n }\n </div>\n} @else {\n <x-element-loader></x-element-loader>\n}\n", styles: [".x-page-head{margin-bottom:20px}.x-page-title{font-size:24px;font-weight:800;color:var(--color-text)}.x-page-subtitle{font-size:13.5px;color:var(--color-text-muted);margin-top:2px}.x-board{display:flex;gap:14px;overflow-x:auto;padding-bottom:12px}.x-board-col{flex:0 0 230px;background:var(--color-surface-2, var(--color-surface));border:1px solid var(--color-border);border-radius:10px;display:flex;flex-direction:column;max-height:calc(100vh - 180px)}.x-board-col-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--color-text-muted)}.x-board-col-count{background:var(--color-surface);border:1px solid var(--color-border);border-radius:10px;padding:1px 7px;font-size:11px}.x-board-col-body{display:flex;flex-direction:column;gap:8px;padding:0 10px 10px;overflow-y:auto}.x-board-col-empty{font-size:12px;color:var(--color-text-muted);padding:8px 4px;text-align:center}.x-order-card{display:block;text-decoration:none;background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;padding:10px 12px}.x-order-card-row{display:flex;justify-content:space-between;align-items:baseline}.x-order-card-num{font-family:var(--font-mono);font-size:12px;color:var(--color-text)}.x-order-card-age{font-size:11px;color:var(--color-text-muted)}.x-order-card-age.stale{color:var(--color-danger);font-weight:700}.x-order-card-total{font-size:13px;font-weight:800;color:var(--color-text);margin-top:6px}\n"], dependencies: [{ kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i2.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
88
88
  }
89
89
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: OrderBoardComponent, decorators: [{
90
90
  type: Component,
@@ -112,4 +112,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
112
112
  }] });
113
113
 
114
114
  export { OrderBoardModule };
115
- //# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-order-board.module-DIOjhptn.mjs.map
115
+ //# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-order-board.module-CmLNiEEP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-order-board.module-DIOjhptn.mjs","sources":["../../../projects/admin/src/lib/pages/order-board/order-board.component.ts","../../../projects/admin/src/lib/pages/order-board/order-board.component.html","../../../projects/admin/src/lib/pages/order-board/order-board.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseDirective, using } from '@thescaffold/ngx-core';\nimport { BehaviorSubject, takeUntil } from 'rxjs';\n\n// ORD-12 — the ops work queues. Each column is a stage of the order\n// lifecycle a team acts on; cards carry an age so a stale one stands out\n// (a crude SLA cue until per-queue SLA timers + assignment land in P7).\nconst QUEUES: { key: string; label: string; statuses: string[] }[] = [\n { key: 'awaiting_payment', label: 'Awaiting payment', statuses: ['pending_payment', 'on_hold'] },\n { key: 'new', label: 'New — to confirm', statuses: ['payment_received', 'confirmed'] },\n { key: 'processing', label: 'Being prepared', statuses: ['processing', 'partially_fulfilled'] },\n {\n key: 'ready',\n label: 'Ready to ship / pick',\n statuses: ['ready_to_ship', 'ready_for_pickup'],\n },\n {\n key: 'in_transit',\n label: 'In transit',\n statuses: ['dispatched', 'out_for_delivery'],\n },\n { key: 'exceptions', label: 'Delivery exceptions', statuses: ['failed_delivery'] },\n {\n key: 'returns',\n label: 'Returns in flight',\n statuses: ['return_in_flight', 'returned'],\n },\n { key: 'done', label: 'Delivered / done', statuses: ['delivered', 'completed'] },\n];\n\nfunction naira(amount: number, currency = 'NGN'): string {\n return `${currency} ${Math.round(amount).toLocaleString('en-US')}`;\n}\n\ninterface CardVm {\n id: string;\n orderNumber: string;\n totalLabel: string;\n ageLabel: string;\n ageHours: number;\n status: string;\n}\n\ninterface ColumnVm {\n key: string;\n label: string;\n cards: CardVm[];\n}\n\n@Component({\n standalone: false,\n selector: 'x-order-board',\n templateUrl: './order-board.component.html',\n styleUrl: './order-board.component.scss',\n})\nexport class OrderBoardComponent extends BaseDirective {\n readonly columns$ = new BehaviorSubject<ColumnVm[] | null>(null);\n\n override init = () => {\n this.apiService\n .on('apps/commerce/order')\n .getMany({ page: 1, perPage: 400 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(\n using(({ data }: { data: any[] }) => {\n const byQueue = new Map<string, CardVm[]>();\n const now = Date.now();\n for (const order of data ?? []) {\n const queue = QUEUES.find((q) => q.statuses.includes(order.status));\n if (!queue) continue;\n const placed = order.placedAt ?? order.createdAt;\n const ageHours = placed\n ? Math.max(0, (now - new Date(placed).getTime()) / 3_600_000)\n : 0;\n const card: CardVm = {\n id: order.id,\n orderNumber: order.orderNumber,\n totalLabel: naira(Number(order.grandTotal ?? 0), order.currency),\n ageHours,\n ageLabel: this.ageLabel(ageHours),\n status: order.status,\n };\n const list = byQueue.get(queue.key) ?? [];\n list.push(card);\n byQueue.set(queue.key, list);\n }\n this.columns$.next(\n QUEUES.map((q) => ({\n key: q.key,\n label: q.label,\n cards: (byQueue.get(q.key) ?? []).sort((a, b) => b.ageHours - a.ageHours),\n })),\n );\n }),\n );\n };\n\n private ageLabel(hours: number): string {\n if (hours < 1) return 'just now';\n if (hours < 24) return `${Math.floor(hours)}h`;\n return `${Math.floor(hours / 24)}d`;\n }\n}\n","<div class=\"x-page-head\">\n <div class=\"x-page-title\">Order board</div>\n <div class=\"x-page-subtitle\">Every open order by ops queue (ORD-12). Cards are oldest-first.</div>\n</div>\n\n@if (columns$ | async; as columns) {\n <div class=\"x-board\">\n @for (col of columns; track col.key) {\n <div class=\"x-board-col\">\n <div class=\"x-board-col-head\">\n <span>{{ col.label }}</span>\n <span class=\"x-board-col-count\">{{ col.cards.length }}</span>\n </div>\n <div class=\"x-board-col-body\">\n @for (card of col.cards; track card.id) {\n <a class=\"x-order-card\" [routerLink]=\"['../orders']\" [queryParams]=\"{ q: card.orderNumber }\">\n <div class=\"x-order-card-row\">\n <span class=\"x-order-card-num\">{{ card.orderNumber }}</span>\n <span class=\"x-order-card-age\" [class.stale]=\"card.ageHours >= 48\">{{ card.ageLabel }}</span>\n </div>\n <div class=\"x-order-card-total\">{{ card.totalLabel }}</div>\n </a>\n } @empty {\n <div class=\"x-board-col-empty\">None</div>\n }\n </div>\n </div>\n }\n </div>\n} @else {\n <x-element-loader></x-element-loader>\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@thescaffold/ngx-core';\nimport { ElementsModule } from '@thescaffold/ngx-ui';\nimport { OrderBoardComponent } from './order-board.component';\n\n@NgModule({\n declarations: [OrderBoardComponent],\n imports: [\n SharedModule,\n ElementsModule,\n RouterModule.forChild([{ path: '', component: OrderBoardComponent }]),\n ],\n})\nexport class OrderBoardModule {}\n"],"names":["i2","i3"],"mappings":";;;;;;;;;;AAIA;AACA;AACA;AACA,MAAM,MAAM,GAAyD;AACnE,IAAA,EAAE,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAAE;AAChG,IAAA,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,CAAC,kBAAkB,EAAE,WAAW,CAAC,EAAE;AACtF,IAAA,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,qBAAqB,CAAC,EAAE;AAC/F,IAAA;AACE,QAAA,GAAG,EAAE,OAAO;AACZ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,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;AACtE,qBAAA;AACF,iBAAA;;;;;"}
1
+ {"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-order-board.module-CmLNiEEP.mjs","sources":["../../../projects/admin/src/lib/pages/order-board/order-board.component.ts","../../../projects/admin/src/lib/pages/order-board/order-board.component.html","../../../projects/admin/src/lib/pages/order-board/order-board.module.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseDirective, using } from '@thescaffold/ngx-core';\nimport { BehaviorSubject, takeUntil } from 'rxjs';\n\n// ORD-12 — the ops work queues. Each column is a stage of the order\n// lifecycle a team acts on; cards carry an age so a stale one stands out\n// (a crude SLA cue until per-queue SLA timers + assignment land in P7).\nconst QUEUES: { key: string; label: string; statuses: string[] }[] = [\n { key: 'awaiting_payment', label: 'Awaiting payment', statuses: ['pending_payment', 'on_hold'] },\n { key: 'new', label: 'New — to confirm', statuses: ['payment_received', 'confirmed'] },\n { key: 'processing', label: 'Being prepared', statuses: ['processing', 'partially_fulfilled'] },\n {\n key: 'ready',\n label: 'Ready to ship / pick',\n statuses: ['ready_to_ship', 'ready_for_pickup'],\n },\n {\n key: 'in_transit',\n label: 'In transit',\n statuses: ['dispatched', 'out_for_delivery'],\n },\n { key: 'exceptions', label: 'Delivery exceptions', statuses: ['failed_delivery'] },\n {\n key: 'returns',\n label: 'Returns in flight',\n statuses: ['return_in_flight', 'returned'],\n },\n { key: 'done', label: 'Delivered / done', statuses: ['delivered', 'completed'] },\n];\n\nfunction naira(amount: number, currency = 'NGN'): string {\n return `${currency} ${Math.round(amount).toLocaleString('en-US')}`;\n}\n\ninterface CardVm {\n id: string;\n orderNumber: string;\n totalLabel: string;\n ageLabel: string;\n ageHours: number;\n status: string;\n}\n\ninterface ColumnVm {\n key: string;\n label: string;\n cards: CardVm[];\n}\n\n@Component({\n standalone: false,\n selector: 'x-order-board',\n templateUrl: './order-board.component.html',\n styleUrl: './order-board.component.scss',\n})\nexport class OrderBoardComponent extends BaseDirective {\n readonly columns$ = new BehaviorSubject<ColumnVm[] | null>(null);\n\n override init = () => {\n this.apiService\n .on('apps/commerce/order')\n .getMany({ page: 1, perPage: 400 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(\n using(({ data }: { data: any[] }) => {\n const byQueue = new Map<string, CardVm[]>();\n const now = Date.now();\n for (const order of data ?? []) {\n const queue = QUEUES.find((q) => q.statuses.includes(order.status));\n if (!queue) continue;\n const placed = order.placedAt ?? order.createdAt;\n const ageHours = placed\n ? Math.max(0, (now - new Date(placed).getTime()) / 3_600_000)\n : 0;\n const card: CardVm = {\n id: order.id,\n orderNumber: order.orderNumber,\n totalLabel: naira(Number(order.grandTotal ?? 0), order.currency),\n ageHours,\n ageLabel: this.ageLabel(ageHours),\n status: order.status,\n };\n const list = byQueue.get(queue.key) ?? [];\n list.push(card);\n byQueue.set(queue.key, list);\n }\n this.columns$.next(\n QUEUES.map((q) => ({\n key: q.key,\n label: q.label,\n cards: (byQueue.get(q.key) ?? []).sort((a, b) => b.ageHours - a.ageHours),\n })),\n );\n }),\n );\n };\n\n private ageLabel(hours: number): string {\n if (hours < 1) return 'just now';\n if (hours < 24) return `${Math.floor(hours)}h`;\n return `${Math.floor(hours / 24)}d`;\n }\n}\n","<div class=\"x-page-head\">\n <div class=\"x-page-title\">Order board</div>\n <div class=\"x-page-subtitle\">Every open order by ops queue (ORD-12). Cards are oldest-first.</div>\n</div>\n\n@if (columns$ | async; as columns) {\n <div class=\"x-board\">\n @for (col of columns; track col.key) {\n <div class=\"x-board-col\">\n <div class=\"x-board-col-head\">\n <span>{{ col.label }}</span>\n <span class=\"x-board-col-count\">{{ col.cards.length }}</span>\n </div>\n <div class=\"x-board-col-body\">\n @for (card of col.cards; track card.id) {\n <a class=\"x-order-card\" [routerLink]=\"['../orders']\" [queryParams]=\"{ q: card.orderNumber }\">\n <div class=\"x-order-card-row\">\n <span class=\"x-order-card-num\">{{ card.orderNumber }}</span>\n <span class=\"x-order-card-age\" [class.stale]=\"card.ageHours >= 48\">{{ card.ageLabel }}</span>\n </div>\n <div class=\"x-order-card-total\">{{ card.totalLabel }}</div>\n </a>\n } @empty {\n <div class=\"x-board-col-empty\">None</div>\n }\n </div>\n </div>\n }\n </div>\n} @else {\n <x-element-loader></x-element-loader>\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@thescaffold/ngx-core';\nimport { ElementsModule } from '@thescaffold/ngx-ui';\nimport { OrderBoardComponent } from './order-board.component';\n\n@NgModule({\n declarations: [OrderBoardComponent],\n imports: [\n SharedModule,\n ElementsModule,\n RouterModule.forChild([{ path: '', component: OrderBoardComponent }]),\n ],\n})\nexport class OrderBoardModule {}\n"],"names":[],"mappings":";;;;;;;;;;AAIA;AACA;AACA;AACA,MAAM,MAAM,GAAyD;AACnE,IAAA,EAAE,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAAE;AAChG,IAAA,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,CAAC,kBAAkB,EAAE,WAAW,CAAC,EAAE;AACtF,IAAA,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,qBAAqB,CAAC,EAAE;AAC/F,IAAA;AACE,QAAA,GAAG,EAAE,OAAO;AACZ,QAAA,KAAK,EAAE,sBAAsB;AAC7B,QAAA,QAAQ,EAAE,CAAC,eAAe,EAAE,kBAAkB,CAAC;AAChD,KAAA;AACD,IAAA;AACE,QAAA,GAAG,EAAE,YAAY;AACjB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,QAAQ,EAAE,CAAC,YAAY,EAAE,kBAAkB,CAAC;AAC7C,KAAA;AACD,IAAA,EAAE,GAAG,EAAE,YAAY,E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I,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,KAAK,YACP,eAAe,EAAA,QAAA,EAAA,yvCAAA,EAAA,MAAA,EAAA,CAAA,+/CAAA,CAAA,EAAA;;;MErCd,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAhB,gBAAgB,EAAA,YAAA,EAAA,CAPZ,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAEhC,YAAY;YACZ,cAAc,EAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAIL,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YALzB,YAAY;YACZ,cAAc;AACd,YAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAG5D,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAR5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;AACd,wBAAA,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;AACtE,qBAAA;AACF,iBAAA;;;;;"}
@@ -2,11 +2,12 @@ import * as i0 from '@angular/core';
2
2
  import { inject, TemplateRef, ViewChild, Component, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/router';
4
4
  import { ActivatedRoute, RouterModule } from '@angular/router';
5
- import { BaseDirective, using, notify, titleCase, SharedModule } from '@thescaffold/ngx-core';
6
- import * as i1$1 from '@thescaffold/ngx-ui';
5
+ import { using, notify, SharedModule } from '@thescaffold/ngx-core';
6
+ import * as i2 from '@thescaffold/ngx-ui';
7
7
  import { FlyoutService, ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';
8
- import { BehaviorSubject, takeUntil, map } from 'rxjs';
9
- import * as i2 from '@angular/common';
8
+ import { takeUntil } from 'rxjs';
9
+ import { L as ListPageDirective } from './isaiahiroko-tilmart-ngx-apps-admin-list-page.base-Cl7JZ-Tp.mjs';
10
+ import * as i3 from '@angular/common';
10
11
 
11
12
  function naira(amount, currency = 'NGN') {
12
13
  return `${currency} ${Math.round(amount).toLocaleString('en-US')}`;
@@ -22,12 +23,13 @@ const ACTIONS = {
22
23
  processing: [{ to: 'cancelled', label: 'Cancel' }],
23
24
  pending_payment: [{ to: 'cancelled', label: 'Cancel' }],
24
25
  };
25
- class OrdersComponent extends BaseDirective {
26
+ class OrdersComponent extends ListPageDirective {
26
27
  constructor() {
27
28
  super(...arguments);
28
29
  this.flyoutService = inject(FlyoutService);
29
30
  this.route = inject(ActivatedRoute);
30
- this.orderSource = this.apiService.on('apps/commerce/order');
31
+ this.pluralName = 'orders';
32
+ this.dataSource = this.apiService.on('apps/commerce/order');
31
33
  this.lineSource = this.apiService.on('apps/commerce/order-line');
32
34
  this.historySource = this.apiService.on('apps/commerce/order-status-history');
33
35
  this.paymentSource = this.apiService.on('apps/commerce/payment');
@@ -39,10 +41,6 @@ class OrdersComponent extends BaseDirective {
39
41
  { key: 'paidLabel', value: 'Paid' },
40
42
  { key: 'placedAt', value: 'Placed', type: 'date' },
41
43
  ];
42
- this.page = 1;
43
- this.perPage = 25;
44
- this.query = '';
45
- this.list$ = new BehaviorSubject(null);
46
44
  this.detail = null;
47
45
  this.detailActions = [];
48
46
  this.naira = naira;
@@ -51,15 +49,6 @@ class OrdersComponent extends BaseDirective {
51
49
  this.list();
52
50
  };
53
51
  }
54
- list(page = this.page, perPage = this.perPage) {
55
- const params = { page, perPage };
56
- if (this.query)
57
- params.query = this.query;
58
- this.orderSource
59
- .getMany(params)
60
- .pipe(takeUntil(this.$), map((response) => this.toCollection(response)))
61
- .subscribe(using((data) => this.list$.next(data)));
62
- }
63
52
  view(item) {
64
53
  this.detail = null;
65
54
  this.detailActions = ACTIONS[item.status] ?? [];
@@ -126,29 +115,22 @@ class OrdersComponent extends BaseDirective {
126
115
  this.list();
127
116
  }));
128
117
  }
129
- toCollection(response) {
130
- const rows = (response?.data ?? []).map((order) => ({
118
+ mapRow(order) {
119
+ return {
131
120
  ...order,
132
121
  grandTotalLabel: naira(Number(order.grandTotal ?? 0), order.currency),
133
122
  paidLabel: naira(Number(order.amountPaid ?? 0), order.currency),
134
- }));
123
+ };
124
+ }
125
+ extraCollectionFields() {
135
126
  return {
136
- title: titleCase('orders'),
137
- columns: this.columns,
138
- rows,
139
- hasHeaders: true,
140
- hasTextFilter: true,
141
- page: response?.meta?.current_page,
142
- perPage: response?.meta?.per_page,
143
- total: response?.meta?.total,
144
- onPage: (page) => this.list(page),
145
127
  links: {
146
128
  secondary: [{ title: 'View', fn: (_link, item) => this.view(item) }],
147
129
  },
148
130
  };
149
131
  }
150
132
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: OrdersComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
151
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: OrdersComponent, isStandalone: false, selector: "x-orders", viewQueries: [{ propertyName: "detailFlyout", first: true, predicate: ["detailFlyout"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"x-page-head\">\n <div class=\"x-page-title\">Orders</div>\n <div class=\"x-page-subtitle\">Every order \u2014 search, drill in, move it forward.</div>\n</div>\n\n@if (list$ | async; as list) {\n <x-webget-collection [data]=\"list\"></x-webget-collection>\n} @else {\n <x-element-loader></x-element-loader>\n}\n\n<ng-template #detailFlyout>\n <x-webget-flyout [data]=\"{ title: 'Order detail' }\">\n <div class=\"p-4 d-flex flex-column gap-3\">\n @if (detail) {\n <div>\n <div class=\"fw-bold font-monospace\">\n {{ detail.orderNumber }}\n <a\n class=\"small ms-2\"\n [routerLink]=\"['/admin/trace']\"\n [queryParams]=\"{ ref: detail.orderNumber }\"\n >full trace \u2192</a>\n </div>\n <span class=\"badge text-bg-light border mt-1\">{{ detail.status }}</span>\n @if (detail.businessName) {\n <div class=\"text-secondary small mt-1\">Invoice to: {{ detail.businessName }}</div>\n }\n @if (detail.recipientName) {\n <div class=\"text-secondary small\">Recipient: {{ detail.recipientName }} \u00B7 {{ detail.recipientPhone }}</div>\n }\n </div>\n\n @if (detailActions.length) {\n <div class=\"d-flex flex-wrap gap-2\">\n @for (action of detailActions; track action.to) {\n <button type=\"button\" class=\"btn btn-sm btn-outline-dark\" (click)=\"transition(action.to)\">\n {{ action.label }}\n </button>\n }\n </div>\n }\n\n <table class=\"table table-sm\">\n <thead><tr><th>Item</th><th>Qty</th><th class=\"text-end\">Amount</th></tr></thead>\n <tbody>\n @for (line of detail.lines; track line.id) {\n <tr>\n <td>{{ line.nameSnapshot || line.variantId }}</td>\n <td>{{ line.quantity }}</td>\n <td class=\"text-end\">{{ naira(line.unitPrice * line.quantity, detail.currency) }}</td>\n </tr>\n } @empty {\n <tr><td colspan=\"3\" class=\"text-secondary\">No lines.</td></tr>\n }\n </tbody>\n </table>\n\n <div class=\"small\">\n <div class=\"d-flex justify-content-between\"><span>Subtotal</span><span>{{ naira(detail.subtotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between\"><span>Delivery</span><span>{{ naira(detail.deliveryTotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between\"><span>VAT (incl.)</span><span>{{ naira(detail.taxTotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between fw-bold\"><span>Total</span><span>{{ naira(detail.grandTotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between\"><span>Paid</span><span>{{ naira(detail.amountPaid, detail.currency) }}</span></div>\n @if (detail.codAmountDue > 0) {\n <div class=\"d-flex justify-content-between text-warning\"><span>Due on delivery</span><span>{{ naira(detail.codAmountDue, detail.currency) }}</span></div>\n }\n </div>\n\n <hr class=\"my-1\" />\n <div>\n <div class=\"fw-bold small mb-1\">Payments</div>\n @for (payment of detail.payments; track payment.id) {\n <div class=\"small text-secondary\">\n {{ payment.provider }} \u00B7 {{ payment.method || 'card' }} \u00B7 {{ payment.status }}\n \u00B7 {{ naira(payment.amount, payment.currency) }}\n </div>\n } @empty {\n <div class=\"small text-secondary\">None.</div>\n }\n </div>\n\n <div>\n <div class=\"fw-bold small mb-1\">Shipments</div>\n @for (shipment of detail.shipments; track shipment.id) {\n <div class=\"small text-secondary\">\n {{ shipment.status }}@if (shipment.trackingRef) { \u00B7 {{ shipment.trackingRef }} }\n </div>\n } @empty {\n <div class=\"small text-secondary\">None yet \u2014 create one on the Shipments page.</div>\n }\n </div>\n\n <div>\n <div class=\"fw-bold small mb-1\">History</div>\n @for (row of detail.history; track row.id) {\n <div class=\"small text-secondary\">\n {{ row.toStatus }} \u00B7 {{ row.createdAt | date: 'MMM d, h:mm a' }}\n @if (row.reason) { \u2014 {{ row.reason }} }\n </div>\n } @empty {\n <div class=\"small text-secondary\">No transitions recorded.</div>\n }\n </div>\n } @else {\n <x-element-loader></x-element-loader>\n }\n </div>\n </x-webget-flyout>\n</ng-template>\n", styles: [".x-page-head{margin-bottom:20px}.x-page-title{font-size:24px;font-weight:800;color:var(--color-text)}.x-page-subtitle{font-size:13.5px;color:var(--color-text-muted);margin-top:2px}\n"], dependencies: [{ kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1$1.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "component", type: i1$1.CollectionComponent, selector: "x-webget-collection", inputs: ["data"], outputs: ["search", "filter", "refresh", "select", "page", "show"] }, { kind: "component", type: i1$1.FlyoutComponent, selector: "x-webget-flyout", inputs: ["data"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DatePipe, name: "date" }] }); }
133
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: OrdersComponent, isStandalone: false, selector: "x-orders", viewQueries: [{ propertyName: "detailFlyout", first: true, predicate: ["detailFlyout"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"x-page-head\">\n <div class=\"x-page-title\">Orders</div>\n <div class=\"x-page-subtitle\">Every order \u2014 search, drill in, move it forward.</div>\n</div>\n\n@if (list$ | async; as list) {\n <x-webget-collection [data]=\"list\"></x-webget-collection>\n} @else {\n <x-element-loader></x-element-loader>\n}\n\n<ng-template #detailFlyout>\n <x-webget-flyout [data]=\"{ title: 'Order detail' }\">\n <div class=\"p-4 d-flex flex-column gap-3\">\n @if (detail) {\n <div>\n <div class=\"fw-bold font-monospace\">\n {{ detail.orderNumber }}\n <a\n class=\"small ms-2\"\n [routerLink]=\"['/admin/trace']\"\n [queryParams]=\"{ ref: detail.orderNumber }\"\n >full trace \u2192</a>\n </div>\n <span class=\"badge text-bg-light border mt-1\">{{ detail.status }}</span>\n @if (detail.businessName) {\n <div class=\"text-secondary small mt-1\">Invoice to: {{ detail.businessName }}</div>\n }\n @if (detail.recipientName) {\n <div class=\"text-secondary small\">Recipient: {{ detail.recipientName }} \u00B7 {{ detail.recipientPhone }}</div>\n }\n </div>\n\n @if (detailActions.length) {\n <div class=\"d-flex flex-wrap gap-2\">\n @for (action of detailActions; track action.to) {\n <button type=\"button\" class=\"btn btn-sm btn-outline-dark\" (click)=\"transition(action.to)\">\n {{ action.label }}\n </button>\n }\n </div>\n }\n\n <table class=\"table table-sm\">\n <thead><tr><th>Item</th><th>Qty</th><th class=\"text-end\">Amount</th></tr></thead>\n <tbody>\n @for (line of detail.lines; track line.id) {\n <tr>\n <td>{{ line.nameSnapshot || line.variantId }}</td>\n <td>{{ line.quantity }}</td>\n <td class=\"text-end\">{{ naira(line.unitPrice * line.quantity, detail.currency) }}</td>\n </tr>\n } @empty {\n <tr><td colspan=\"3\" class=\"text-secondary\">No lines.</td></tr>\n }\n </tbody>\n </table>\n\n <div class=\"small\">\n <div class=\"d-flex justify-content-between\"><span>Subtotal</span><span>{{ naira(detail.subtotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between\"><span>Delivery</span><span>{{ naira(detail.deliveryTotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between\"><span>VAT (incl.)</span><span>{{ naira(detail.taxTotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between fw-bold\"><span>Total</span><span>{{ naira(detail.grandTotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between\"><span>Paid</span><span>{{ naira(detail.amountPaid, detail.currency) }}</span></div>\n @if (detail.codAmountDue > 0) {\n <div class=\"d-flex justify-content-between text-warning\"><span>Due on delivery</span><span>{{ naira(detail.codAmountDue, detail.currency) }}</span></div>\n }\n </div>\n\n <hr class=\"my-1\" />\n <div>\n <div class=\"fw-bold small mb-1\">Payments</div>\n @for (payment of detail.payments; track payment.id) {\n <div class=\"small text-secondary\">\n {{ payment.provider }} \u00B7 {{ payment.method || 'card' }} \u00B7 {{ payment.status }}\n \u00B7 {{ naira(payment.amount, payment.currency) }}\n </div>\n } @empty {\n <div class=\"small text-secondary\">None.</div>\n }\n </div>\n\n <div>\n <div class=\"fw-bold small mb-1\">Shipments</div>\n @for (shipment of detail.shipments; track shipment.id) {\n <div class=\"small text-secondary\">\n {{ shipment.status }}@if (shipment.trackingRef) { \u00B7 {{ shipment.trackingRef }} }\n </div>\n } @empty {\n <div class=\"small text-secondary\">None yet \u2014 create one on the Shipments page.</div>\n }\n </div>\n\n <div>\n <div class=\"fw-bold small mb-1\">History</div>\n @for (row of detail.history; track row.id) {\n <div class=\"small text-secondary\">\n {{ row.toStatus }} \u00B7 {{ row.createdAt | date: 'MMM d, h:mm a' }}\n @if (row.reason) { \u2014 {{ row.reason }} }\n </div>\n } @empty {\n <div class=\"small text-secondary\">No transitions recorded.</div>\n }\n </div>\n } @else {\n <x-element-loader></x-element-loader>\n }\n </div>\n </x-webget-flyout>\n</ng-template>\n", styles: [".x-page-head{margin-bottom:20px}.x-page-title{font-size:24px;font-weight:800;color:var(--color-text)}.x-page-subtitle{font-size:13.5px;color:var(--color-text-muted);margin-top:2px}\n"], dependencies: [{ kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i2.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "component", type: i2.CollectionComponent, selector: "x-webget-collection", inputs: ["data"], outputs: ["search", "filter", "refresh", "select", "page", "show"] }, { kind: "component", type: i2.FlyoutComponent, selector: "x-webget-flyout", inputs: ["data"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.DatePipe, name: "date" }] }); }
152
134
  }
153
135
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: OrdersComponent, decorators: [{
154
136
  type: Component,
@@ -182,4 +164,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
182
164
  }] });
183
165
 
184
166
  export { OrdersModule };
185
- //# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-orders.module-Ddw49QW0.mjs.map
167
+ //# sourceMappingURL=isaiahiroko-tilmart-ngx-apps-admin-orders.module-Cfeb0QjH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isaiahiroko-tilmart-ngx-apps-admin-orders.module-Cfeb0QjH.mjs","sources":["../../../projects/admin/src/lib/pages/orders/orders.component.ts","../../../projects/admin/src/lib/pages/orders/orders.component.html","../../../projects/admin/src/lib/pages/orders/orders.module.ts"],"sourcesContent":["import { Component, TemplateRef, ViewChild, inject } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { notify, using } from '@thescaffold/ngx-core';\nimport { FlyoutService } from '@thescaffold/ngx-ui';\nimport { takeUntil } from 'rxjs';\nimport { ListPageDirective } from '../_shared/list-page.base';\n\nfunction naira(amount: number, currency = 'NGN'): string {\n return `${currency} ${Math.round(amount).toLocaleString('en-US')}`;\n}\n\n// Ops action buttons per current status — each entry is a permitted\n// `OrderWorkflow.transition` target. Matches the PRD Appendix B matrix;\n// fulfilment-driven statuses (dispatched, delivered, …) are set by the\n// Shipments page, not here.\nconst ACTIONS: Record<string, { to: string; label: string }[]> = {\n payment_received: [{ to: 'confirmed', label: 'Confirm' }, { to: 'on_hold', label: 'Hold' }],\n on_hold: [{ to: 'confirmed', label: 'Release' }, { to: 'cancelled', label: 'Cancel' }],\n confirmed: [{ to: 'processing', label: 'Start preparing' }, { to: 'cancelled', label: 'Cancel' }],\n processing: [{ to: 'cancelled', label: 'Cancel' }],\n pending_payment: [{ to: 'cancelled', label: 'Cancel' }],\n};\n\n@Component({\n standalone: false,\n selector: 'x-orders',\n templateUrl: './orders.component.html',\n styleUrl: './orders.component.scss',\n})\nexport class OrdersComponent extends ListPageDirective {\n private readonly flyoutService = inject(FlyoutService);\n private readonly route = inject(ActivatedRoute);\n\n protected pluralName = 'orders';\n protected dataSource = this.apiService.on('apps/commerce/order');\n private readonly lineSource = this.apiService.on('apps/commerce/order-line');\n private readonly historySource = this.apiService.on('apps/commerce/order-status-history');\n private readonly paymentSource = this.apiService.on('apps/commerce/payment');\n private readonly shipmentSource = this.apiService.on('apps/commerce/shipment');\n\n protected columns = [\n { key: 'orderNumber', value: 'Order' },\n { key: 'status', value: 'Status', type: 'class', class: 'badge text-bg-light border' },\n { key: 'grandTotalLabel', value: 'Total' },\n { key: 'paidLabel', value: 'Paid' },\n { key: 'placedAt', value: 'Placed', type: 'date' },\n ];\n\n detail: any = null;\n detailActions: { to: string; label: string }[] = [];\n naira = naira;\n\n @ViewChild('detailFlyout', { read: TemplateRef, static: true })\n detailFlyout!: TemplateRef<any>;\n\n override init = () => {\n this.query = this.route.snapshot.queryParamMap.get('q') ?? '';\n this.list();\n };\n\n view(item: any) {\n this.detail = null;\n this.detailActions = ACTIONS[item.status] ?? [];\n this.flyoutService.open(this.detailFlyout);\n\n this.lineSource\n .getMany({ orderId: item.id, page: 1, perPage: 200 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(\n using(({ data: lines }: { data: any[] }) => {\n this.detail = {\n id: item.id,\n orderNumber: item.orderNumber,\n status: item.status,\n currency: item.currency,\n businessName: item.businessName,\n recipientName: item.recipientName,\n recipientPhone: item.recipientPhone,\n subtotal: Number(item.subtotal ?? 0),\n deliveryTotal: Number(item.deliveryTotal ?? 0),\n taxTotal: Number(item.taxTotal ?? 0),\n grandTotal: Number(item.grandTotal ?? 0),\n amountPaid: Number(item.amountPaid ?? 0),\n codAmountDue: Number(item.codAmountDue ?? 0),\n lines: lines ?? [],\n history: [],\n payments: [],\n shipments: [],\n };\n\n this.historySource\n .getMany({ orderId: item.id, page: 1, perPage: 100 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(using(({ data }: { data: any[] }) => {\n if (this.detail) this.detail.history = data ?? [];\n }));\n this.paymentSource\n .getMany({ orderId: item.id, page: 1, perPage: 20 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(using(({ data }: { data: any[] }) => {\n if (this.detail) this.detail.payments = data ?? [];\n }));\n this.shipmentSource\n .getMany({ orderId: item.id, page: 1, perPage: 50 } as any)\n .pipe(takeUntil(this.$))\n .subscribe(using(({ data }: { data: any[] }) => {\n if (this.detail) this.detail.shipments = data ?? [];\n }));\n }),\n );\n }\n\n transition(to: string) {\n if (!this.detail) return;\n this.apiService\n .post(`apps/commerce/order/${this.detail.id}/transition`, { toStatus: to })\n .pipe(takeUntil(this.$))\n .subscribe(\n using((res: any) => {\n if (res?.status === 'error') {\n notify(res.message || 'That transition is not allowed.', undefined, 'error');\n return;\n }\n notify(`Order moved to ${to.replace(/_/g, ' ')}.`, undefined, 'success');\n this.flyoutService.dismiss();\n this.list();\n }),\n );\n }\n\n protected override mapRow(order: any) {\n return {\n ...order,\n grandTotalLabel: naira(Number(order.grandTotal ?? 0), order.currency),\n paidLabel: naira(Number(order.amountPaid ?? 0), order.currency),\n };\n }\n\n protected override extraCollectionFields() {\n return {\n links: {\n secondary: [{ title: 'View', fn: (_link: any, item: any) => this.view(item) }],\n },\n };\n }\n}\n","<div class=\"x-page-head\">\n <div class=\"x-page-title\">Orders</div>\n <div class=\"x-page-subtitle\">Every order — search, drill in, move it forward.</div>\n</div>\n\n@if (list$ | async; as list) {\n <x-webget-collection [data]=\"list\"></x-webget-collection>\n} @else {\n <x-element-loader></x-element-loader>\n}\n\n<ng-template #detailFlyout>\n <x-webget-flyout [data]=\"{ title: 'Order detail' }\">\n <div class=\"p-4 d-flex flex-column gap-3\">\n @if (detail) {\n <div>\n <div class=\"fw-bold font-monospace\">\n {{ detail.orderNumber }}\n <a\n class=\"small ms-2\"\n [routerLink]=\"['/admin/trace']\"\n [queryParams]=\"{ ref: detail.orderNumber }\"\n >full trace →</a>\n </div>\n <span class=\"badge text-bg-light border mt-1\">{{ detail.status }}</span>\n @if (detail.businessName) {\n <div class=\"text-secondary small mt-1\">Invoice to: {{ detail.businessName }}</div>\n }\n @if (detail.recipientName) {\n <div class=\"text-secondary small\">Recipient: {{ detail.recipientName }} · {{ detail.recipientPhone }}</div>\n }\n </div>\n\n @if (detailActions.length) {\n <div class=\"d-flex flex-wrap gap-2\">\n @for (action of detailActions; track action.to) {\n <button type=\"button\" class=\"btn btn-sm btn-outline-dark\" (click)=\"transition(action.to)\">\n {{ action.label }}\n </button>\n }\n </div>\n }\n\n <table class=\"table table-sm\">\n <thead><tr><th>Item</th><th>Qty</th><th class=\"text-end\">Amount</th></tr></thead>\n <tbody>\n @for (line of detail.lines; track line.id) {\n <tr>\n <td>{{ line.nameSnapshot || line.variantId }}</td>\n <td>{{ line.quantity }}</td>\n <td class=\"text-end\">{{ naira(line.unitPrice * line.quantity, detail.currency) }}</td>\n </tr>\n } @empty {\n <tr><td colspan=\"3\" class=\"text-secondary\">No lines.</td></tr>\n }\n </tbody>\n </table>\n\n <div class=\"small\">\n <div class=\"d-flex justify-content-between\"><span>Subtotal</span><span>{{ naira(detail.subtotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between\"><span>Delivery</span><span>{{ naira(detail.deliveryTotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between\"><span>VAT (incl.)</span><span>{{ naira(detail.taxTotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between fw-bold\"><span>Total</span><span>{{ naira(detail.grandTotal, detail.currency) }}</span></div>\n <div class=\"d-flex justify-content-between\"><span>Paid</span><span>{{ naira(detail.amountPaid, detail.currency) }}</span></div>\n @if (detail.codAmountDue > 0) {\n <div class=\"d-flex justify-content-between text-warning\"><span>Due on delivery</span><span>{{ naira(detail.codAmountDue, detail.currency) }}</span></div>\n }\n </div>\n\n <hr class=\"my-1\" />\n <div>\n <div class=\"fw-bold small mb-1\">Payments</div>\n @for (payment of detail.payments; track payment.id) {\n <div class=\"small text-secondary\">\n {{ payment.provider }} · {{ payment.method || 'card' }} · {{ payment.status }}\n · {{ naira(payment.amount, payment.currency) }}\n </div>\n } @empty {\n <div class=\"small text-secondary\">None.</div>\n }\n </div>\n\n <div>\n <div class=\"fw-bold small mb-1\">Shipments</div>\n @for (shipment of detail.shipments; track shipment.id) {\n <div class=\"small text-secondary\">\n {{ shipment.status }}@if (shipment.trackingRef) { · {{ shipment.trackingRef }} }\n </div>\n } @empty {\n <div class=\"small text-secondary\">None yet — create one on the Shipments page.</div>\n }\n </div>\n\n <div>\n <div class=\"fw-bold small mb-1\">History</div>\n @for (row of detail.history; track row.id) {\n <div class=\"small text-secondary\">\n {{ row.toStatus }} · {{ row.createdAt | date: 'MMM d, h:mm a' }}\n @if (row.reason) { — {{ row.reason }} }\n </div>\n } @empty {\n <div class=\"small text-secondary\">No transitions recorded.</div>\n }\n </div>\n } @else {\n <x-element-loader></x-element-loader>\n }\n </div>\n </x-webget-flyout>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@thescaffold/ngx-core';\nimport { ElementsModule, WebgetsModule } from '@thescaffold/ngx-ui';\nimport { OrdersComponent } from './orders.component';\n\n@NgModule({\n declarations: [OrdersComponent],\n imports: [\n SharedModule,\n ElementsModule,\n WebgetsModule,\n RouterModule.forChild([{ path: '', component: OrdersComponent }]),\n ],\n})\nexport class OrdersModule {}\n"],"names":[],"mappings":";;;;;;;;;;;AAOA,SAAS,KAAK,CAAC,MAAc,EAAE,QAAQ,GAAG,KAAK,EAAA;AAC7C,IAAA,OAAO,CAAA,EAAG,QAAQ,CAAA,CAAA,EAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;AACpE;AAEA;AACA;AACA;AACA;AACA,MAAM,OAAO,GAAoD;IAC/D,gBAAgB,EAAE,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC3F,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IACtF,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IACjG,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