@mj-biz-apps/contracts-ng 0.1.0

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 (94) hide show
  1. package/LICENSE +183 -0
  2. package/dist/lib/data/entity-names.d.ts +29 -0
  3. package/dist/lib/data/entity-names.d.ts.map +1 -0
  4. package/dist/lib/data/entity-names.js +29 -0
  5. package/dist/lib/data/entity-names.js.map +1 -0
  6. package/dist/lib/data/provider.d.ts +44 -0
  7. package/dist/lib/data/provider.d.ts.map +1 -0
  8. package/dist/lib/data/provider.js +48 -0
  9. package/dist/lib/data/provider.js.map +1 -0
  10. package/dist/lib/directives/fk-navigate.directive.d.ts +63 -0
  11. package/dist/lib/directives/fk-navigate.directive.d.ts.map +1 -0
  12. package/dist/lib/directives/fk-navigate.directive.js +99 -0
  13. package/dist/lib/directives/fk-navigate.directive.js.map +1 -0
  14. package/dist/lib/form-panels/contract.panels.d.ts +124 -0
  15. package/dist/lib/form-panels/contract.panels.d.ts.map +1 -0
  16. package/dist/lib/form-panels/contract.panels.js +1167 -0
  17. package/dist/lib/form-panels/contract.panels.js.map +1 -0
  18. package/dist/lib/form-panels/organization.panels.d.ts +23 -0
  19. package/dist/lib/form-panels/organization.panels.d.ts.map +1 -0
  20. package/dist/lib/form-panels/organization.panels.js +118 -0
  21. package/dist/lib/form-panels/organization.panels.js.map +1 -0
  22. package/dist/lib/form-panels/record-files.panel.d.ts +151 -0
  23. package/dist/lib/form-panels/record-files.panel.d.ts.map +1 -0
  24. package/dist/lib/form-panels/record-files.panel.js +1046 -0
  25. package/dist/lib/form-panels/record-files.panel.js.map +1 -0
  26. package/dist/lib/form-panels/supersede.panel.d.ts +68 -0
  27. package/dist/lib/form-panels/supersede.panel.d.ts.map +1 -0
  28. package/dist/lib/form-panels/supersede.panel.js +415 -0
  29. package/dist/lib/form-panels/supersede.panel.js.map +1 -0
  30. package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.d.ts +10 -0
  31. package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.d.ts.map +1 -0
  32. package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.js +196 -0
  33. package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.js.map +1 -0
  34. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.d.ts +10 -0
  35. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.d.ts.map +1 -0
  36. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.js +120 -0
  37. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.js.map +1 -0
  38. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.d.ts +10 -0
  39. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.d.ts.map +1 -0
  40. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.js +79 -0
  41. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.js.map +1 -0
  42. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.d.ts +10 -0
  43. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.d.ts.map +1 -0
  44. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.js +79 -0
  45. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.js.map +1 -0
  46. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.d.ts +10 -0
  47. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.d.ts.map +1 -0
  48. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.js +86 -0
  49. package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.js.map +1 -0
  50. package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.d.ts +10 -0
  51. package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.d.ts.map +1 -0
  52. package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.js +100 -0
  53. package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.js.map +1 -0
  54. package/dist/lib/generated/generated-forms.module.d.ts +23 -0
  55. package/dist/lib/generated/generated-forms.module.d.ts.map +1 -0
  56. package/dist/lib/generated/generated-forms.module.js +78 -0
  57. package/dist/lib/generated/generated-forms.module.js.map +1 -0
  58. package/dist/lib/pages/configuration.page.d.ts +83 -0
  59. package/dist/lib/pages/configuration.page.d.ts.map +1 -0
  60. package/dist/lib/pages/configuration.page.js +240 -0
  61. package/dist/lib/pages/configuration.page.js.map +1 -0
  62. package/dist/lib/pages/contract-grid.page.d.ts +169 -0
  63. package/dist/lib/pages/contract-grid.page.d.ts.map +1 -0
  64. package/dist/lib/pages/contract-grid.page.js +487 -0
  65. package/dist/lib/pages/contract-grid.page.js.map +1 -0
  66. package/dist/lib/pages/contracts-dashboard.page.d.ts +56 -0
  67. package/dist/lib/pages/contracts-dashboard.page.d.ts.map +1 -0
  68. package/dist/lib/pages/contracts-dashboard.page.js +215 -0
  69. package/dist/lib/pages/contracts-dashboard.page.js.map +1 -0
  70. package/dist/lib/pages/modifications.page.d.ts +96 -0
  71. package/dist/lib/pages/modifications.page.d.ts.map +1 -0
  72. package/dist/lib/pages/modifications.page.js +243 -0
  73. package/dist/lib/pages/modifications.page.js.map +1 -0
  74. package/dist/lib/pages/templates.page.d.ts +120 -0
  75. package/dist/lib/pages/templates.page.d.ts.map +1 -0
  76. package/dist/lib/pages/templates.page.js +258 -0
  77. package/dist/lib/pages/templates.page.js.map +1 -0
  78. package/dist/lib/sections/contracts-sections.component.d.ts +112 -0
  79. package/dist/lib/sections/contracts-sections.component.d.ts.map +1 -0
  80. package/dist/lib/sections/contracts-sections.component.js +412 -0
  81. package/dist/lib/sections/contracts-sections.component.js.map +1 -0
  82. package/dist/lib/sections/section-nav.model.d.ts +78 -0
  83. package/dist/lib/sections/section-nav.model.d.ts.map +1 -0
  84. package/dist/lib/sections/section-nav.model.js +110 -0
  85. package/dist/lib/sections/section-nav.model.js.map +1 -0
  86. package/dist/lib/sections/section-shell.component.d.ts +73 -0
  87. package/dist/lib/sections/section-shell.component.d.ts.map +1 -0
  88. package/dist/lib/sections/section-shell.component.js +170 -0
  89. package/dist/lib/sections/section-shell.component.js.map +1 -0
  90. package/dist/public-api.d.ts +44 -0
  91. package/dist/public-api.d.ts.map +1 -0
  92. package/dist/public-api.js +105 -0
  93. package/dist/public-api.js.map +1 -0
  94. package/package.json +50 -0
@@ -0,0 +1,412 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ /**
8
+ * @fileoverview The three Explorer tabs.
9
+ *
10
+ * Each class is registered `@RegisterClass(BaseResourceComponent, '<DriverClass>')` under the name the
11
+ * Application's `DefaultNavItems` reference (`metadata/applications/.contracts-application.json`), which
12
+ * is what makes these plug into MJ Explorer with no host-side wiring: Explorer reads the nav metadata,
13
+ * asks the class factory for the driver class, and mounts it as a tab. BOTH HALVES ARE REQUIRED —
14
+ * metadata without a registered class renders a dead tab, a registered class without metadata never
15
+ * appears.
16
+ *
17
+ * Each section is deliberately thin. It owns three things — its rail, which sub-page is showing, and
18
+ * remembering that across sessions — and delegates the frame to {@link MJCSectionShellComponent} and the
19
+ * content to page components.
20
+ *
21
+ * SUB-PAGE HOSTING: pages are created once and CACHED, so switching rails and coming back does not
22
+ * discard a part-filled form or re-run every count query.
23
+ *
24
+ * @module @mj-biz-apps/contracts-ng
25
+ */
26
+ import { ChangeDetectorRef, Component, ViewChild, ViewContainerRef, inject, } from '@angular/core';
27
+ import { CommonModule } from '@angular/common';
28
+ import { RegisterClass } from '@memberjunction/global';
29
+ import { BaseResourceComponent } from '@memberjunction/ng-shared';
30
+ import { MJCSectionShellComponent } from './section-shell.component';
31
+ import { BuildLeftNavSections, CONFIGURATION_SUB_PAGES, CONTRACTS_SUB_PAGES, TEMPLATES_SUB_PAGES, } from './section-nav.model';
32
+ import { MJC_ENTITIES } from '../data/entity-names';
33
+ import { ScopedRunView } from '../data/provider';
34
+ import { MJCAllContractsPageComponent, MJCAwaitingDocumentsPageComponent, MJCRenewalsPageComponent, } from '../pages/contract-grid.page';
35
+ import { MJCModificationsPageComponent } from '../pages/modifications.page';
36
+ import { MJCContractsDashboardPageComponent } from '../pages/contracts-dashboard.page';
37
+ import { MJCAgreementVersionsPageComponent, MJCAllProvisionsPageComponent } from '../pages/templates.page';
38
+ import { MJCContractTypesPageComponent, MJCTemplateTypesPageComponent, } from '../pages/configuration.page';
39
+ import * as i0 from "@angular/core";
40
+ const _c0 = ["pageHost"];
41
+ /** Shared skeleton for all three sections. */
42
+ export class MJCSectionBaseComponent extends BaseResourceComponent {
43
+ /** Where a sub-page is created. Declared once, inherited by all three. */
44
+ pageHost;
45
+ cdr = inject(ChangeDetectorRef);
46
+ NavSections = [];
47
+ ActivePageId = null;
48
+ IsLoading = false;
49
+ LoadError = null;
50
+ badges = {};
51
+ mounted = new Map();
52
+ ngOnInit() {
53
+ super.ngOnInit();
54
+ this.NavSections = BuildLeftNavSections(this.subPages, this.badges);
55
+ this.ActivePageId = this.restorePageId();
56
+ // MACROTASK, NOT MICROTASK, and this is load-bearing. The host view must exist before a page
57
+ // can be created into it, AND the page must be created outside the change-detection pass
58
+ // running now. queueMicrotask drains before the CD cycle finishes, so the page is constructed
59
+ // inside this turn; its async ngOnInit then resolves between Angular's check pass and its
60
+ // dev-mode verify pass, which is NG0100 — and NG0100 ABORTS the rest of that update with
61
+ // nothing scheduling another tick. The result is a screen frozen on its pre-fetch render: a
62
+ // dashboard showing zeroes against a database full of rows, which looks like a quiet day
63
+ // rather than a bug. Orders debugged exactly this; inheriting the fix is cheaper than
64
+ // rediscovering it.
65
+ setTimeout(async () => {
66
+ try {
67
+ await this.showPage(this.ActivePageId);
68
+ await this.refreshBadges();
69
+ }
70
+ finally {
71
+ // ALWAYS signal, even on failure. Explorer's loading screen BLOCKS on this; a resource
72
+ // that never signals is carried by a 15-second watchdog that logs a warning naming the
73
+ // class and fails open. Fifteen seconds of blank screen on every visit is not a
74
+ // fallback to rely on, and `finally` means a thrown page load degrades to an empty
75
+ // pane rather than a hung app.
76
+ this.NotifyLoadComplete();
77
+ this.cdr.detectChanges();
78
+ }
79
+ });
80
+ }
81
+ /** Rail click handler. */
82
+ async OnPageSelected(pageId) {
83
+ this.ActivePageId = pageId;
84
+ this.persistPageId(pageId);
85
+ this.LoadError = null;
86
+ await this.showPage(pageId);
87
+ this.cdr.detectChanges();
88
+ }
89
+ /**
90
+ * Mount a page, reusing the instance if it has been shown before.
91
+ *
92
+ * Cached views are DETACHED rather than destroyed, which is what preserves state across a trip to
93
+ * another rail item.
94
+ */
95
+ async showPage(pageId) {
96
+ const host = this.pageHost;
97
+ if (!host)
98
+ return;
99
+ host.detach();
100
+ const cached = this.mounted.get(pageId);
101
+ if (cached) {
102
+ host.insert(cached.hostView);
103
+ return;
104
+ }
105
+ const type = this.resolvePage(pageId);
106
+ if (!type) {
107
+ const label = this.subPages.find((p) => p.Id === pageId)?.Label ?? pageId;
108
+ this.LoadError = `${label} is not built yet.`;
109
+ return;
110
+ }
111
+ const ref = host.createComponent(type);
112
+ // A page that wants to move the rail asks; it does not route itself. Wired by DUCK TYPING
113
+ // rather than a shared interface because the pages are otherwise independent of the section,
114
+ // and an interface would make every page import the shell's world just to emit a string.
115
+ const instance = ref.instance;
116
+ instance.NavigateToPage?.subscribe((id) => void this.OnPageSelected(id));
117
+ this.mounted.set(pageId, ref);
118
+ ref.changeDetectorRef.detectChanges();
119
+ }
120
+ /**
121
+ * Badge counts for the rail. Overridden by the section that has badges; the others inherit a no-op
122
+ * rather than each declaring an empty method.
123
+ */
124
+ async refreshBadges() {
125
+ /* no badges by default */
126
+ }
127
+ /** First page in the rail — the fallback when nothing is remembered. */
128
+ get defaultPageId() {
129
+ return this.subPages[0]?.Id ?? '';
130
+ }
131
+ /**
132
+ * Restore the last page this user was on. Guarded, and falls back to the default rather than
133
+ * throwing: an unknown id means the rail was renamed since the preference was written, and
134
+ * stranding someone on a blank tab because of a rename is the wrong trade.
135
+ */
136
+ restorePageId() {
137
+ try {
138
+ const saved = globalThis.localStorage?.getItem(this.preferenceKey);
139
+ if (saved && this.subPages.some((p) => p.Id === saved))
140
+ return saved;
141
+ }
142
+ catch {
143
+ /* storage unavailable — the default is a fine answer */
144
+ }
145
+ return this.defaultPageId;
146
+ }
147
+ persistPageId(pageId) {
148
+ try {
149
+ globalThis.localStorage?.setItem(this.preferenceKey, pageId);
150
+ }
151
+ catch {
152
+ /* preferences simply do not persist */
153
+ }
154
+ }
155
+ async GetResourceDisplayName(_data) {
156
+ return this.sectionTitle;
157
+ }
158
+ async GetResourceIconClass(_data) {
159
+ return this.sectionIcon;
160
+ }
161
+ ngOnDestroy() {
162
+ for (const ref of this.mounted.values())
163
+ ref.destroy();
164
+ this.mounted.clear();
165
+ // PLAIN CALL, not `super.ngOnDestroy?.()`. The optional-call form is valid TypeScript and
166
+ // esbuild fails to PARSE the bundle it produces — "SyntaxError: 'super' keyword unexpected
167
+ // here" — which kills the whole chunk, so every section and panel in this package silently
168
+ // fails to register and the app renders no nav tab at all. Found by driving Explorer in a real
169
+ // browser; nothing in the type-check or the build catches it. BaseResourceComponent declares
170
+ // ngOnDestroy concretely, so the guard bought nothing anyway.
171
+ super.ngOnDestroy();
172
+ }
173
+ static ɵfac = /*@__PURE__*/ (() => { let ɵMJCSectionBaseComponent_BaseFactory; return function MJCSectionBaseComponent_Factory(__ngFactoryType__) { return (ɵMJCSectionBaseComponent_BaseFactory || (ɵMJCSectionBaseComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MJCSectionBaseComponent)))(__ngFactoryType__ || MJCSectionBaseComponent); }; })();
174
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJCSectionBaseComponent, selectors: [["ng-component"]], viewQuery: function MJCSectionBaseComponent_Query(rf, ctx) { if (rf & 1) {
175
+ i0.ɵɵviewQuery(_c0, 5, ViewContainerRef);
176
+ } if (rf & 2) {
177
+ let _t;
178
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.pageHost = _t.first);
179
+ } }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function MJCSectionBaseComponent_Template(rf, ctx) { }, encapsulation: 2 });
180
+ }
181
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJCSectionBaseComponent, [{
182
+ type: Component,
183
+ args: [{ template: '' }]
184
+ }], null, { pageHost: [{
185
+ type: ViewChild,
186
+ args: ['pageHost', { read: ViewContainerRef, static: false }]
187
+ }] }); })();
188
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJCSectionBaseComponent, { className: "MJCSectionBaseComponent", filePath: "lib/sections/contracts-sections.component.ts", lineNumber: 63 }); })();
189
+ /* ────────────────────────────────────────────────────────────────────────────
190
+ * Contracts — the default tab
191
+ * ──────────────────────────────────────────────────────────────────────────── */
192
+ let ContractsSectionResource = class ContractsSectionResource extends MJCSectionBaseComponent {
193
+ get subPages() {
194
+ return CONTRACTS_SUB_PAGES;
195
+ }
196
+ get preferenceKey() {
197
+ return 'mjc.section.contracts.page';
198
+ }
199
+ get sectionTitle() {
200
+ return 'Contracts';
201
+ }
202
+ get sectionIcon() {
203
+ return 'fa-solid fa-file-signature';
204
+ }
205
+ resolvePage(pageId) {
206
+ switch (pageId) {
207
+ case 'dashboard':
208
+ return MJCContractsDashboardPageComponent;
209
+ case 'list':
210
+ return MJCAllContractsPageComponent;
211
+ case 'renewals':
212
+ return MJCRenewalsPageComponent;
213
+ case 'awaiting':
214
+ return MJCAwaitingDocumentsPageComponent;
215
+ case 'modifications':
216
+ return MJCModificationsPageComponent;
217
+ default:
218
+ return null;
219
+ }
220
+ }
221
+ /**
222
+ * The three work counts, read from the same derived columns the worklists filter on — so a badge
223
+ * cannot promise work the page then fails to show.
224
+ *
225
+ * A count that fails is left UNSET rather than zeroed: `BuildLeftNavSections` omits a falsy badge,
226
+ * so an unreadable count renders no badge at all instead of a "0" that says "nothing to do here".
227
+ */
228
+ async refreshBadges() {
229
+ const rv = ScopedRunView();
230
+ const count = async (filter) => {
231
+ try {
232
+ const r = await rv.RunView({ EntityName: MJC_ENTITIES.Contract, ExtraFilter: filter, MaxRows: 1 });
233
+ return r?.TotalRowCount ?? 0;
234
+ }
235
+ catch {
236
+ return undefined;
237
+ }
238
+ };
239
+ const [renewals, awaiting, modified] = await Promise.all([
240
+ count(`State IN ('Active','Executed') AND RenewalNoticeDeadline IS NOT NULL ` +
241
+ `AND RenewalNoticeDeadline >= CAST(GETUTCDATE() AS date) ` +
242
+ `AND RenewalNoticeDeadline <= DATEADD(day, 120, CAST(GETUTCDATE() AS date))`),
243
+ count('IsAwaitingDocument = 1'),
244
+ count('HasModifications = 1'),
245
+ ]);
246
+ this.badges = { RenewalsDue: renewals, AwaitingDocuments: awaiting, Modified: modified };
247
+ this.NavSections = BuildLeftNavSections(this.subPages, this.badges);
248
+ }
249
+ static ɵfac = /*@__PURE__*/ (() => { let ɵContractsSectionResource_BaseFactory; return function ContractsSectionResource_Factory(__ngFactoryType__) { return (ɵContractsSectionResource_BaseFactory || (ɵContractsSectionResource_BaseFactory = i0.ɵɵgetInheritedFactory(ContractsSectionResource)))(__ngFactoryType__ || ContractsSectionResource); }; })();
250
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContractsSectionResource, selectors: [["mjc-contracts-section"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [["pageHost", ""], ["Title", "Contracts", "Icon", "fa-solid fa-file-signature", "Subtitle", "What we agreed, and where the paper is", 3, "PageSelected", "NavSections", "ActivePageId", "Loading", "Error"]], template: function ContractsSectionResource_Template(rf, ctx) { if (rf & 1) {
251
+ const _r1 = i0.ɵɵgetCurrentView();
252
+ i0.ɵɵelementStart(0, "mjc-section-shell", 1);
253
+ i0.ɵɵlistener("PageSelected", function ContractsSectionResource_Template_mjc_section_shell_PageSelected_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnPageSelected($event)); });
254
+ i0.ɵɵelementContainer(1, null, 0);
255
+ i0.ɵɵelementEnd();
256
+ } if (rf & 2) {
257
+ i0.ɵɵproperty("NavSections", ctx.NavSections)("ActivePageId", ctx.ActivePageId)("Loading", ctx.IsLoading)("Error", ctx.LoadError);
258
+ } }, dependencies: [CommonModule, MJCSectionShellComponent], encapsulation: 2 });
259
+ };
260
+ ContractsSectionResource = __decorate([
261
+ RegisterClass(BaseResourceComponent, 'ContractsSectionResource')
262
+ ], ContractsSectionResource);
263
+ export { ContractsSectionResource };
264
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContractsSectionResource, [{
265
+ type: Component,
266
+ args: [{
267
+ selector: 'mjc-contracts-section',
268
+ standalone: true,
269
+ imports: [CommonModule, MJCSectionShellComponent],
270
+ template: `
271
+ <mjc-section-shell
272
+ Title="Contracts"
273
+ Icon="fa-solid fa-file-signature"
274
+ Subtitle="What we agreed, and where the paper is"
275
+ [NavSections]="NavSections"
276
+ [ActivePageId]="ActivePageId"
277
+ [Loading]="IsLoading"
278
+ [Error]="LoadError"
279
+ (PageSelected)="OnPageSelected($event)">
280
+ <ng-container #pageHost />
281
+ </mjc-section-shell>
282
+ `,
283
+ }]
284
+ }], null, null); })();
285
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ContractsSectionResource, { className: "ContractsSectionResource", filePath: "lib/sections/contracts-sections.component.ts", lineNumber: 244 }); })();
286
+ /* ────────────────────────────────────────────────────────────────────────────
287
+ * Templates
288
+ * ──────────────────────────────────────────────────────────────────────────── */
289
+ let ContractsTemplatesSectionResource = class ContractsTemplatesSectionResource extends MJCSectionBaseComponent {
290
+ get subPages() {
291
+ return TEMPLATES_SUB_PAGES;
292
+ }
293
+ get preferenceKey() {
294
+ return 'mjc.section.templates.page';
295
+ }
296
+ get sectionTitle() {
297
+ return 'Templates';
298
+ }
299
+ get sectionIcon() {
300
+ return 'fa-solid fa-file-lines';
301
+ }
302
+ resolvePage(pageId) {
303
+ switch (pageId) {
304
+ case 'versions':
305
+ return MJCAgreementVersionsPageComponent;
306
+ case 'provisions':
307
+ return MJCAllProvisionsPageComponent;
308
+ default:
309
+ return null;
310
+ }
311
+ }
312
+ static ɵfac = /*@__PURE__*/ (() => { let ɵContractsTemplatesSectionResource_BaseFactory; return function ContractsTemplatesSectionResource_Factory(__ngFactoryType__) { return (ɵContractsTemplatesSectionResource_BaseFactory || (ɵContractsTemplatesSectionResource_BaseFactory = i0.ɵɵgetInheritedFactory(ContractsTemplatesSectionResource)))(__ngFactoryType__ || ContractsTemplatesSectionResource); }; })();
313
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContractsTemplatesSectionResource, selectors: [["mjc-templates-section"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [["pageHost", ""], ["Title", "Templates", "Icon", "fa-solid fa-file-lines", "Subtitle", "The standard terms, version by version", 3, "PageSelected", "NavSections", "ActivePageId", "Loading", "Error"]], template: function ContractsTemplatesSectionResource_Template(rf, ctx) { if (rf & 1) {
314
+ const _r1 = i0.ɵɵgetCurrentView();
315
+ i0.ɵɵelementStart(0, "mjc-section-shell", 1);
316
+ i0.ɵɵlistener("PageSelected", function ContractsTemplatesSectionResource_Template_mjc_section_shell_PageSelected_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnPageSelected($event)); });
317
+ i0.ɵɵelementContainer(1, null, 0);
318
+ i0.ɵɵelementEnd();
319
+ } if (rf & 2) {
320
+ i0.ɵɵproperty("NavSections", ctx.NavSections)("ActivePageId", ctx.ActivePageId)("Loading", ctx.IsLoading)("Error", ctx.LoadError);
321
+ } }, dependencies: [CommonModule, MJCSectionShellComponent], encapsulation: 2 });
322
+ };
323
+ ContractsTemplatesSectionResource = __decorate([
324
+ RegisterClass(BaseResourceComponent, 'ContractsTemplatesSectionResource')
325
+ ], ContractsTemplatesSectionResource);
326
+ export { ContractsTemplatesSectionResource };
327
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContractsTemplatesSectionResource, [{
328
+ type: Component,
329
+ args: [{
330
+ selector: 'mjc-templates-section',
331
+ standalone: true,
332
+ imports: [CommonModule, MJCSectionShellComponent],
333
+ template: `
334
+ <mjc-section-shell
335
+ Title="Templates"
336
+ Icon="fa-solid fa-file-lines"
337
+ Subtitle="The standard terms, version by version"
338
+ [NavSections]="NavSections"
339
+ [ActivePageId]="ActivePageId"
340
+ [Loading]="IsLoading"
341
+ [Error]="LoadError"
342
+ (PageSelected)="OnPageSelected($event)">
343
+ <ng-container #pageHost />
344
+ </mjc-section-shell>
345
+ `,
346
+ }]
347
+ }], null, null); })();
348
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ContractsTemplatesSectionResource, { className: "ContractsTemplatesSectionResource", filePath: "lib/sections/contracts-sections.component.ts", lineNumber: 331 }); })();
349
+ /* ────────────────────────────────────────────────────────────────────────────
350
+ * Configuration
351
+ * ──────────────────────────────────────────────────────────────────────────── */
352
+ let ContractsConfigurationSectionResource = class ContractsConfigurationSectionResource extends MJCSectionBaseComponent {
353
+ get subPages() {
354
+ return CONFIGURATION_SUB_PAGES;
355
+ }
356
+ get preferenceKey() {
357
+ return 'mjc.section.configuration.page';
358
+ }
359
+ get sectionTitle() {
360
+ return 'Configuration';
361
+ }
362
+ get sectionIcon() {
363
+ return 'fa-solid fa-sliders';
364
+ }
365
+ resolvePage(pageId) {
366
+ switch (pageId) {
367
+ case 'contract-types':
368
+ return MJCContractTypesPageComponent;
369
+ case 'template-types':
370
+ return MJCTemplateTypesPageComponent;
371
+ default:
372
+ return null;
373
+ }
374
+ }
375
+ static ɵfac = /*@__PURE__*/ (() => { let ɵContractsConfigurationSectionResource_BaseFactory; return function ContractsConfigurationSectionResource_Factory(__ngFactoryType__) { return (ɵContractsConfigurationSectionResource_BaseFactory || (ɵContractsConfigurationSectionResource_BaseFactory = i0.ɵɵgetInheritedFactory(ContractsConfigurationSectionResource)))(__ngFactoryType__ || ContractsConfigurationSectionResource); }; })();
376
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContractsConfigurationSectionResource, selectors: [["mjc-configuration-section"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [["pageHost", ""], ["Title", "Configuration", "Icon", "fa-solid fa-sliders", "Subtitle", "The vocabularies every contract inherits", 3, "PageSelected", "NavSections", "ActivePageId", "Loading", "Error"]], template: function ContractsConfigurationSectionResource_Template(rf, ctx) { if (rf & 1) {
377
+ const _r1 = i0.ɵɵgetCurrentView();
378
+ i0.ɵɵelementStart(0, "mjc-section-shell", 1);
379
+ i0.ɵɵlistener("PageSelected", function ContractsConfigurationSectionResource_Template_mjc_section_shell_PageSelected_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnPageSelected($event)); });
380
+ i0.ɵɵelementContainer(1, null, 0);
381
+ i0.ɵɵelementEnd();
382
+ } if (rf & 2) {
383
+ i0.ɵɵproperty("NavSections", ctx.NavSections)("ActivePageId", ctx.ActivePageId)("Loading", ctx.IsLoading)("Error", ctx.LoadError);
384
+ } }, dependencies: [CommonModule, MJCSectionShellComponent], encapsulation: 2 });
385
+ };
386
+ ContractsConfigurationSectionResource = __decorate([
387
+ RegisterClass(BaseResourceComponent, 'ContractsConfigurationSectionResource')
388
+ ], ContractsConfigurationSectionResource);
389
+ export { ContractsConfigurationSectionResource };
390
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContractsConfigurationSectionResource, [{
391
+ type: Component,
392
+ args: [{
393
+ selector: 'mjc-configuration-section',
394
+ standalone: true,
395
+ imports: [CommonModule, MJCSectionShellComponent],
396
+ template: `
397
+ <mjc-section-shell
398
+ Title="Configuration"
399
+ Icon="fa-solid fa-sliders"
400
+ Subtitle="The vocabularies every contract inherits"
401
+ [NavSections]="NavSections"
402
+ [ActivePageId]="ActivePageId"
403
+ [Loading]="IsLoading"
404
+ [Error]="LoadError"
405
+ (PageSelected)="OnPageSelected($event)">
406
+ <ng-container #pageHost />
407
+ </mjc-section-shell>
408
+ `,
409
+ }]
410
+ }], null, null); })();
411
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ContractsConfigurationSectionResource, { className: "ContractsConfigurationSectionResource", filePath: "lib/sections/contracts-sections.component.ts", lineNumber: 380 }); })();
412
+ //# sourceMappingURL=contracts-sections.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts-sections.component.js","sourceRoot":"","sources":["../../../src/lib/sections/contracts-sections.component.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACH,iBAAiB,EACjB,SAAS,EAGT,SAAS,EACT,gBAAgB,EAChB,MAAM,GAET,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAIlE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EACH,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,GAGtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EACH,4BAA4B,EAC5B,iCAAiC,EACjC,wBAAwB,GAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,iCAAiC,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EACH,6BAA6B,EAC7B,6BAA6B,GAChC,MAAM,6BAA6B,CAAC;;;AAErC,8CAA8C;AAE9C,MAAM,OAAgB,uBAAwB,SAAQ,qBAAqB;IACvE,0EAA0E;IAEhE,QAAQ,CAAoB;IAEnB,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAE5C,WAAW,GAAuB,EAAE,CAAC;IACrC,YAAY,GAAkB,IAAI,CAAC;IACnC,SAAS,GAAG,KAAK,CAAC;IAClB,SAAS,GAAkB,IAAI,CAAC;IAE7B,MAAM,G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B,0BAAsB,KAAC;YACvC,iCAA0B;YAC9B,iBAAoB;;YAHhB,AADA,AADA,AADA,6CAA2B,kCACE,0BACR,wBACF;4BATjB,YAAY,EAAE,wBAAwB;;AAevC,qCAAqC;IAnBjD,aAAa,CAAC,qBAAqB,EAAE,uCAAuC,CAAC;GAmBjE,qCAAqC,CAwBjD;;iFAxBY,qCAAqC;cAlBjD,SAAS;eAAC;gBACP,QAAQ,EAAE,2BAA2B;gBACrC,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,YAAY,EAAE,wBAAwB,CAAC;gBACjD,QAAQ,EAAE;;;;;;;;;;;;KAYT;aACJ;;kFACY,qCAAqC"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * @fileoverview The information architecture, as data.
3
+ *
4
+ * Three sections organised by JOB, each a top tab in the Contracts Application
5
+ * (`metadata/applications/.contracts-application.json`) and each owning a LEFT rail over its own
6
+ * sub-pages. MJ's rule: top nav ACROSS sections, left nav WITHIN one.
7
+ *
8
+ * Declaring the rails here rather than inside each component keeps the whole IA readable in one file,
9
+ * puts badge counts in one place, and makes the nav testable without instantiating Angular.
10
+ *
11
+ * WHY THREE AND NOT V1'S THREE. v1's were Contracts / Billing / Setup, and Billing was a peer because
12
+ * "what failed to bill and why" is a different job done by different people. The rebuild deleted
13
+ * billing, so Templates takes the slot — registering the next Master Agreement version and curating
14
+ * its clause list is rare, finance-adjacent legal work, and it has to be findable because the
15
+ * provision list is a PREREQUISITE: nobody can record a modification until it exists.
16
+ *
17
+ * @module @mj-biz-apps/contracts-ng
18
+ */
19
+ import type { MJLeftNavSection } from '@memberjunction/ng-ui-components';
20
+ /** A sub-page within a section. `Id` is what the rail emits and what the section stores as state. */
21
+ export interface MJCSubPage {
22
+ /** Stable key. Persisted as user state, so renaming one resets people's place. */
23
+ Id: string;
24
+ Label: string;
25
+ /** Font Awesome class. */
26
+ Icon: string;
27
+ /** Optional muted second line in the rail. */
28
+ Description?: string;
29
+ /** Rail group header. Items sharing a group render under one heading. */
30
+ Group?: string;
31
+ }
32
+ /**
33
+ * Counts the rails surface as badges, supplied by the section from live data.
34
+ *
35
+ * All three are questions about WORK, not totals: how many contracts need a decision this quarter,
36
+ * how many are missing paper they should have, how many deviations exist. A badge that counted "all
37
+ * contracts" would be a number nobody acts on.
38
+ */
39
+ export interface MJCNavBadges {
40
+ /** Contracts whose renewal-notice deadline falls inside the default window. */
41
+ RenewalsDue?: number;
42
+ /** Contracts whose type expects an executed document and none is linked. */
43
+ AwaitingDocuments?: number;
44
+ /** Contracts carrying at least one recorded modification. */
45
+ Modified?: number;
46
+ }
47
+ /**
48
+ * Contracts — the agreements themselves.
49
+ *
50
+ * Renewals and Awaiting documents are grouped under "Work" because both are worklists: a filtered
51
+ * view of the same list with something to DO about each row. They are rail items rather than sections
52
+ * because they answer questions about contracts, and both are derived-column filters over the same
53
+ * base view — which is exactly why `IsAwaitingDocument` is derived rather than a stored worklist flag.
54
+ */
55
+ export declare const CONTRACTS_SUB_PAGES: MJCSubPage[];
56
+ /**
57
+ * Templates — the standard terms, and the clauses that make them up.
58
+ *
59
+ * The rail says "All templates". It used to say "Agreement versions", on the reasoning that a row
60
+ * here is one DATED version of the Master Agreement, never edited in place (signed contracts
61
+ * reference it), and that the word "template" invites editing. Marcelo overruled that on
62
+ * 2026-08-19: the section is already called Templates, so a child item naming a different noun
63
+ * makes the reader work out that the two are the same thing. Parallel with "All provisions"
64
+ * below, and with "All contracts" in the Contracts rail — "All <the thing>" is this app's word
65
+ * for the unfiltered list. The don't-edit-in-place rule is enforced by the schema and stated on
66
+ * the page, which is where it belongs rather than in a nav label.
67
+ */
68
+ export declare const TEMPLATES_SUB_PAGES: MJCSubPage[];
69
+ /** Configuration — the small vocabularies every contract inherits. */
70
+ export declare const CONFIGURATION_SUB_PAGES: MJCSubPage[];
71
+ /**
72
+ * Turn a page list into the `MJLeftNavSection[]` `<mj-left-nav>` consumes, grouping by `Group`.
73
+ *
74
+ * A zero badge is OMITTED rather than rendered as "0": a badge means "there is something here", and a
75
+ * grey zero trains people to ignore the badge that matters. Same rule as orders.
76
+ */
77
+ export declare function BuildLeftNavSections(pages: MJCSubPage[], badges?: MJCNavBadges): MJLeftNavSection[];
78
+ //# sourceMappingURL=section-nav.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-nav.model.d.ts","sourceRoot":"","sources":["../../../src/lib/sections/section-nav.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,qGAAqG;AACrG,MAAM,WAAW,UAAU;IACvB,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IACzB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAMD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAAU,EAM3C,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAAU,EAG3C,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,EAAE,UAAU,EAG/C,CAAC;AAoBF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,MAAM,GAAE,YAAiB,GAAG,gBAAgB,EAAE,CA4BvG"}
@@ -0,0 +1,110 @@
1
+ /**
2
+ * @fileoverview The information architecture, as data.
3
+ *
4
+ * Three sections organised by JOB, each a top tab in the Contracts Application
5
+ * (`metadata/applications/.contracts-application.json`) and each owning a LEFT rail over its own
6
+ * sub-pages. MJ's rule: top nav ACROSS sections, left nav WITHIN one.
7
+ *
8
+ * Declaring the rails here rather than inside each component keeps the whole IA readable in one file,
9
+ * puts badge counts in one place, and makes the nav testable without instantiating Angular.
10
+ *
11
+ * WHY THREE AND NOT V1'S THREE. v1's were Contracts / Billing / Setup, and Billing was a peer because
12
+ * "what failed to bill and why" is a different job done by different people. The rebuild deleted
13
+ * billing, so Templates takes the slot — registering the next Master Agreement version and curating
14
+ * its clause list is rare, finance-adjacent legal work, and it has to be findable because the
15
+ * provision list is a PREREQUISITE: nobody can record a modification until it exists.
16
+ *
17
+ * @module @mj-biz-apps/contracts-ng
18
+ */
19
+ /* ────────────────────────────────────────────────────────────────────────────
20
+ * The three rails
21
+ * ──────────────────────────────────────────────────────────────────────────── */
22
+ /**
23
+ * Contracts — the agreements themselves.
24
+ *
25
+ * Renewals and Awaiting documents are grouped under "Work" because both are worklists: a filtered
26
+ * view of the same list with something to DO about each row. They are rail items rather than sections
27
+ * because they answer questions about contracts, and both are derived-column filters over the same
28
+ * base view — which is exactly why `IsAwaitingDocument` is derived rather than a stored worklist flag.
29
+ */
30
+ export const CONTRACTS_SUB_PAGES = [
31
+ { Id: 'dashboard', Label: 'Dashboard', Icon: 'fa-solid fa-gauge-high', Description: 'What needs attention' },
32
+ { Id: 'list', Label: 'All contracts', Icon: 'fa-solid fa-table-list' },
33
+ { Id: 'renewals', Label: 'Renewals & expiry', Icon: 'fa-solid fa-hourglass-half', Group: 'Work' },
34
+ { Id: 'awaiting', Label: 'Awaiting documents', Icon: 'fa-solid fa-file-circle-question', Group: 'Work' },
35
+ { Id: 'modifications', Label: 'Modifications', Icon: 'fa-solid fa-pen-ruler', Group: 'Work', Description: 'Every deviation, across contracts' },
36
+ ];
37
+ /**
38
+ * Templates — the standard terms, and the clauses that make them up.
39
+ *
40
+ * The rail says "All templates". It used to say "Agreement versions", on the reasoning that a row
41
+ * here is one DATED version of the Master Agreement, never edited in place (signed contracts
42
+ * reference it), and that the word "template" invites editing. Marcelo overruled that on
43
+ * 2026-08-19: the section is already called Templates, so a child item naming a different noun
44
+ * makes the reader work out that the two are the same thing. Parallel with "All provisions"
45
+ * below, and with "All contracts" in the Contracts rail — "All <the thing>" is this app's word
46
+ * for the unfiltered list. The don't-edit-in-place rule is enforced by the schema and stated on
47
+ * the page, which is where it belongs rather than in a nav label.
48
+ */
49
+ export const TEMPLATES_SUB_PAGES = [
50
+ { Id: 'versions', Label: 'All templates', Icon: 'fa-solid fa-file-lines', Description: 'One row per published MA' },
51
+ { Id: 'provisions', Label: 'All provisions', Icon: 'fa-solid fa-list-ol', Description: 'Every clause, across versions' },
52
+ ];
53
+ /** Configuration — the small vocabularies every contract inherits. */
54
+ export const CONFIGURATION_SUB_PAGES = [
55
+ { Id: 'contract-types', Label: 'Contract types', Icon: 'fa-solid fa-tags' },
56
+ { Id: 'template-types', Label: 'Template types', Icon: 'fa-solid fa-sitemap' },
57
+ ];
58
+ /* ────────────────────────────────────────────────────────────────────────────
59
+ * Rendering
60
+ * ──────────────────────────────────────────────────────────────────────────── */
61
+ /** Which badge, if any, belongs on a given sub-page. */
62
+ function badgeFor(pageId, badges) {
63
+ switch (pageId) {
64
+ case 'renewals':
65
+ return badges.RenewalsDue;
66
+ case 'awaiting':
67
+ return badges.AwaitingDocuments;
68
+ case 'modifications':
69
+ return badges.Modified;
70
+ default:
71
+ return undefined;
72
+ }
73
+ }
74
+ /**
75
+ * Turn a page list into the `MJLeftNavSection[]` `<mj-left-nav>` consumes, grouping by `Group`.
76
+ *
77
+ * A zero badge is OMITTED rather than rendered as "0": a badge means "there is something here", and a
78
+ * grey zero trains people to ignore the badge that matters. Same rule as orders.
79
+ */
80
+ export function BuildLeftNavSections(pages, badges = {}) {
81
+ const sections = [];
82
+ // Insertion order matters: ungrouped items lead, then each group in the order it first appears,
83
+ // which is the order the author wrote them in.
84
+ const byGroup = new Map();
85
+ for (const page of pages) {
86
+ const key = page.Group ?? '';
87
+ const list = byGroup.get(key);
88
+ if (list)
89
+ list.push(page);
90
+ else
91
+ byGroup.set(key, [page]);
92
+ }
93
+ for (const [group, groupPages] of byGroup) {
94
+ sections.push({
95
+ label: group || undefined,
96
+ items: groupPages.map((page) => {
97
+ const badge = badgeFor(page.Id, badges);
98
+ return {
99
+ id: page.Id,
100
+ label: page.Label,
101
+ icon: page.Icon,
102
+ description: page.Description,
103
+ ...(badge ? { badge } : {}),
104
+ };
105
+ }),
106
+ });
107
+ }
108
+ return sections;
109
+ }
110
+ //# sourceMappingURL=section-nav.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-nav.model.js","sourceRoot":"","sources":["../../../src/lib/sections/section-nav.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAiCH;;kFAEkF;AAElF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAiB;IAC7C,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,wBAAwB,EAAE,WAAW,EAAE,sBAAsB,EAAE;IAC5G,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,wBAAwB,EAAE;IACtE,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,4BAA4B,EAAE,KAAK,EAAE,MAAM,EAAE;IACjG,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,kCAAkC,EAAE,KAAK,EAAE,MAAM,EAAE;IACxG,EAAE,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,mCAAmC,EAAE;CAClJ,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,M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