@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.
- package/LICENSE +183 -0
- package/dist/lib/data/entity-names.d.ts +29 -0
- package/dist/lib/data/entity-names.d.ts.map +1 -0
- package/dist/lib/data/entity-names.js +29 -0
- package/dist/lib/data/entity-names.js.map +1 -0
- package/dist/lib/data/provider.d.ts +44 -0
- package/dist/lib/data/provider.d.ts.map +1 -0
- package/dist/lib/data/provider.js +48 -0
- package/dist/lib/data/provider.js.map +1 -0
- package/dist/lib/directives/fk-navigate.directive.d.ts +63 -0
- package/dist/lib/directives/fk-navigate.directive.d.ts.map +1 -0
- package/dist/lib/directives/fk-navigate.directive.js +99 -0
- package/dist/lib/directives/fk-navigate.directive.js.map +1 -0
- package/dist/lib/form-panels/contract.panels.d.ts +124 -0
- package/dist/lib/form-panels/contract.panels.d.ts.map +1 -0
- package/dist/lib/form-panels/contract.panels.js +1167 -0
- package/dist/lib/form-panels/contract.panels.js.map +1 -0
- package/dist/lib/form-panels/organization.panels.d.ts +23 -0
- package/dist/lib/form-panels/organization.panels.d.ts.map +1 -0
- package/dist/lib/form-panels/organization.panels.js +118 -0
- package/dist/lib/form-panels/organization.panels.js.map +1 -0
- package/dist/lib/form-panels/record-files.panel.d.ts +151 -0
- package/dist/lib/form-panels/record-files.panel.d.ts.map +1 -0
- package/dist/lib/form-panels/record-files.panel.js +1046 -0
- package/dist/lib/form-panels/record-files.panel.js.map +1 -0
- package/dist/lib/form-panels/supersede.panel.d.ts +68 -0
- package/dist/lib/form-panels/supersede.panel.d.ts.map +1 -0
- package/dist/lib/form-panels/supersede.panel.js +415 -0
- package/dist/lib/form-panels/supersede.panel.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.js +196 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.js +120 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.js +79 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.js +79 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.js +86 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.js +100 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.js.map +1 -0
- package/dist/lib/generated/generated-forms.module.d.ts +23 -0
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -0
- package/dist/lib/generated/generated-forms.module.js +78 -0
- package/dist/lib/generated/generated-forms.module.js.map +1 -0
- package/dist/lib/pages/configuration.page.d.ts +83 -0
- package/dist/lib/pages/configuration.page.d.ts.map +1 -0
- package/dist/lib/pages/configuration.page.js +240 -0
- package/dist/lib/pages/configuration.page.js.map +1 -0
- package/dist/lib/pages/contract-grid.page.d.ts +169 -0
- package/dist/lib/pages/contract-grid.page.d.ts.map +1 -0
- package/dist/lib/pages/contract-grid.page.js +487 -0
- package/dist/lib/pages/contract-grid.page.js.map +1 -0
- package/dist/lib/pages/contracts-dashboard.page.d.ts +56 -0
- package/dist/lib/pages/contracts-dashboard.page.d.ts.map +1 -0
- package/dist/lib/pages/contracts-dashboard.page.js +215 -0
- package/dist/lib/pages/contracts-dashboard.page.js.map +1 -0
- package/dist/lib/pages/modifications.page.d.ts +96 -0
- package/dist/lib/pages/modifications.page.d.ts.map +1 -0
- package/dist/lib/pages/modifications.page.js +243 -0
- package/dist/lib/pages/modifications.page.js.map +1 -0
- package/dist/lib/pages/templates.page.d.ts +120 -0
- package/dist/lib/pages/templates.page.d.ts.map +1 -0
- package/dist/lib/pages/templates.page.js +258 -0
- package/dist/lib/pages/templates.page.js.map +1 -0
- package/dist/lib/sections/contracts-sections.component.d.ts +112 -0
- package/dist/lib/sections/contracts-sections.component.d.ts.map +1 -0
- package/dist/lib/sections/contracts-sections.component.js +412 -0
- package/dist/lib/sections/contracts-sections.component.js.map +1 -0
- package/dist/lib/sections/section-nav.model.d.ts +78 -0
- package/dist/lib/sections/section-nav.model.d.ts.map +1 -0
- package/dist/lib/sections/section-nav.model.js +110 -0
- package/dist/lib/sections/section-nav.model.js.map +1 -0
- package/dist/lib/sections/section-shell.component.d.ts +73 -0
- package/dist/lib/sections/section-shell.component.d.ts.map +1 -0
- package/dist/lib/sections/section-shell.component.js +170 -0
- package/dist/lib/sections/section-shell.component.js.map +1 -0
- package/dist/public-api.d.ts +44 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +105 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The agreement-version registry, and the flat clause list across versions.
|
|
3
|
+
*
|
|
4
|
+
* Item 7's surface. "Agreement versions" rather than "Templates" in the UI, deliberately: a row here is
|
|
5
|
+
* one DATED version of the Master Agreement and is never edited in place, because signed contracts
|
|
6
|
+
* reference it. The word "template" invites editing; "version" does not.
|
|
7
|
+
*
|
|
8
|
+
* The provisions of ONE version are edited on the template's own form, through the `Provisions`
|
|
9
|
+
* collection panel — not here. This page is the registry (which versions exist) plus a flat list
|
|
10
|
+
* (every clause across every version), which is the view you want when answering "what does 4.2 say,
|
|
11
|
+
* and did it change between editions?"
|
|
12
|
+
*
|
|
13
|
+
* @module @mj-biz-apps/contracts-ng
|
|
14
|
+
*/
|
|
15
|
+
import { OnInit } from '@angular/core';
|
|
16
|
+
import { NavigationService } from '@memberjunction/ng-shared';
|
|
17
|
+
import type { CompositeKey } from '@memberjunction/core';
|
|
18
|
+
import type { RunViewParams } from '@memberjunction/core';
|
|
19
|
+
import * as i0 from "@angular/core";
|
|
20
|
+
/** One row per published agreement version. */
|
|
21
|
+
export declare class MJCAgreementVersionsPageComponent implements OnInit {
|
|
22
|
+
private readonly cdr;
|
|
23
|
+
protected readonly navigation: NavigationService;
|
|
24
|
+
/**
|
|
25
|
+
* Open the double-clicked record.
|
|
26
|
+
*
|
|
27
|
+
* THE GRID DOES NOT NAVIGATE ITSELF. `NavigateOnDoubleClick` only controls whether it EMITS
|
|
28
|
+
* `Navigate`; acting on it is the HOST's job. Without this, a double-click merely selected the row
|
|
29
|
+
* — measured in a real browser, where it looked exactly like the grid being broken. Explorer's own
|
|
30
|
+
* host wires this for generated forms; a page hosting the grid inside a BaseResourceComponent must
|
|
31
|
+
* do it itself.
|
|
32
|
+
*/
|
|
33
|
+
OnNavigate(event: {
|
|
34
|
+
Kind?: string;
|
|
35
|
+
EntityName?: string;
|
|
36
|
+
PrimaryKey?: CompositeKey;
|
|
37
|
+
DefaultValues?: Record<string, unknown>;
|
|
38
|
+
}): void;
|
|
39
|
+
Params: RunViewParams | null;
|
|
40
|
+
/**
|
|
41
|
+
* Toolbar affordances that actually work, and one that does not.
|
|
42
|
+
*
|
|
43
|
+
* ⚠ `showFilterToggle` IS A NO-OP, and this comment used to claim the opposite. It is declared on
|
|
44
|
+
* `GridToolbarConfig` (`grid-types.ts:249`) and documented in the entity-viewer README, and it is
|
|
45
|
+
* **read nowhere in MJ** — no template branch renders a filter button. Three sibling hooks are dead
|
|
46
|
+
* the same way: the `AllowColumnFilters` input stores `_allowColumnFilters` and nothing reads it,
|
|
47
|
+
* `_filterState` is declared and never touched, and `defaultColDef.filter` is hardcoded `false`, so
|
|
48
|
+
* AG Grid's per-column filters are off with no input to turn them on. It is left set to `true` here
|
|
49
|
+
* because it costs nothing and is the flag to keep passing if MJ ever wires it up.
|
|
50
|
+
*
|
|
51
|
+
* So the ONLY filtering this page has beyond the pills is `showSearch` — which sets AG Grid's
|
|
52
|
+
* `quickFilterText`, a client-side substring match over the rows already loaded. It is not
|
|
53
|
+
* structured and not server-side. Filtering by date range / category / derived State needs a real
|
|
54
|
+
* filter popover (see `design-docs/ui-design/mockups-v2/renewal-watchlist.html`), which is ours to
|
|
55
|
+
* build; the pills stay regardless, because they encode the QUESTIONS people ask rather than
|
|
56
|
+
* predicates a user would assemble by hand.
|
|
57
|
+
*/
|
|
58
|
+
readonly GridToolbar: {
|
|
59
|
+
showSearch: boolean;
|
|
60
|
+
showFilterToggle: boolean;
|
|
61
|
+
showColumnChooser: boolean;
|
|
62
|
+
showRefresh: boolean;
|
|
63
|
+
showExport: boolean;
|
|
64
|
+
showRowCount: boolean;
|
|
65
|
+
};
|
|
66
|
+
ngOnInit(): void;
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJCAgreementVersionsPageComponent, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJCAgreementVersionsPageComponent, "mjc-agreement-versions-page", never, {}, {}, never, never, true, never>;
|
|
69
|
+
}
|
|
70
|
+
/** Every clause of every version, in canonical order within each. */
|
|
71
|
+
export declare class MJCAllProvisionsPageComponent implements OnInit {
|
|
72
|
+
private readonly cdr;
|
|
73
|
+
protected readonly navigation: NavigationService;
|
|
74
|
+
/**
|
|
75
|
+
* Open the double-clicked record.
|
|
76
|
+
*
|
|
77
|
+
* THE GRID DOES NOT NAVIGATE ITSELF. `NavigateOnDoubleClick` only controls whether it EMITS
|
|
78
|
+
* `Navigate`; acting on it is the HOST's job. Without this, a double-click merely selected the row
|
|
79
|
+
* — measured in a real browser, where it looked exactly like the grid being broken. Explorer's own
|
|
80
|
+
* host wires this for generated forms; a page hosting the grid inside a BaseResourceComponent must
|
|
81
|
+
* do it itself.
|
|
82
|
+
*/
|
|
83
|
+
OnNavigate(event: {
|
|
84
|
+
Kind?: string;
|
|
85
|
+
EntityName?: string;
|
|
86
|
+
PrimaryKey?: CompositeKey;
|
|
87
|
+
DefaultValues?: Record<string, unknown>;
|
|
88
|
+
}): void;
|
|
89
|
+
Params: RunViewParams | null;
|
|
90
|
+
/**
|
|
91
|
+
* Toolbar affordances that actually work, and one that does not.
|
|
92
|
+
*
|
|
93
|
+
* ⚠ `showFilterToggle` IS A NO-OP, and this comment used to claim the opposite. It is declared on
|
|
94
|
+
* `GridToolbarConfig` (`grid-types.ts:249`) and documented in the entity-viewer README, and it is
|
|
95
|
+
* **read nowhere in MJ** — no template branch renders a filter button. Three sibling hooks are dead
|
|
96
|
+
* the same way: the `AllowColumnFilters` input stores `_allowColumnFilters` and nothing reads it,
|
|
97
|
+
* `_filterState` is declared and never touched, and `defaultColDef.filter` is hardcoded `false`, so
|
|
98
|
+
* AG Grid's per-column filters are off with no input to turn them on. It is left set to `true` here
|
|
99
|
+
* because it costs nothing and is the flag to keep passing if MJ ever wires it up.
|
|
100
|
+
*
|
|
101
|
+
* So the ONLY filtering this page has beyond the pills is `showSearch` — which sets AG Grid's
|
|
102
|
+
* `quickFilterText`, a client-side substring match over the rows already loaded. It is not
|
|
103
|
+
* structured and not server-side. Filtering by date range / category / derived State needs a real
|
|
104
|
+
* filter popover (see `design-docs/ui-design/mockups-v2/renewal-watchlist.html`), which is ours to
|
|
105
|
+
* build; the pills stay regardless, because they encode the QUESTIONS people ask rather than
|
|
106
|
+
* predicates a user would assemble by hand.
|
|
107
|
+
*/
|
|
108
|
+
readonly GridToolbar: {
|
|
109
|
+
showSearch: boolean;
|
|
110
|
+
showFilterToggle: boolean;
|
|
111
|
+
showColumnChooser: boolean;
|
|
112
|
+
showRefresh: boolean;
|
|
113
|
+
showExport: boolean;
|
|
114
|
+
showRowCount: boolean;
|
|
115
|
+
};
|
|
116
|
+
ngOnInit(): void;
|
|
117
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJCAllProvisionsPageComponent, never>;
|
|
118
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJCAllProvisionsPageComponent, "mjc-all-provisions-page", never, {}, {}, never, never, true, never>;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=templates.page.d.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AAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC3C,GAAG,IAAI;IAqBD,MAAM,EAAE,aAAa,GAAG,IAAI,CAAQ;IAE3C;;;;;;;;;;;;;;;;;OAiBG;IACH,SAAgB,WAAW;;;;;;;MAOzB;IAGK,QAAQ,IAAI,IAAI;yCArEd,6BAA6B;2CAA7B,6BAA6B;CA8EzC"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The agreement-version registry, and the flat clause list across versions.
|
|
3
|
+
*
|
|
4
|
+
* Item 7's surface. "Agreement versions" rather than "Templates" in the UI, deliberately: a row here is
|
|
5
|
+
* one DATED version of the Master Agreement and is never edited in place, because signed contracts
|
|
6
|
+
* reference it. The word "template" invites editing; "version" does not.
|
|
7
|
+
*
|
|
8
|
+
* The provisions of ONE version are edited on the template's own form, through the `Provisions`
|
|
9
|
+
* collection panel — not here. This page is the registry (which versions exist) plus a flat list
|
|
10
|
+
* (every clause across every version), which is the view you want when answering "what does 4.2 say,
|
|
11
|
+
* and did it change between editions?"
|
|
12
|
+
*
|
|
13
|
+
* @module @mj-biz-apps/contracts-ng
|
|
14
|
+
*/
|
|
15
|
+
import { ChangeDetectorRef, Component, ViewEncapsulation, inject } from '@angular/core';
|
|
16
|
+
import { CommonModule } from '@angular/common';
|
|
17
|
+
import { NavigationService } from '@memberjunction/ng-shared';
|
|
18
|
+
import { BaseFormsModule } from '@memberjunction/ng-base-forms';
|
|
19
|
+
import { MJC_ENTITIES } from '../data/entity-names';
|
|
20
|
+
import { MJCFkNavigateDirective } from '../directives/fk-navigate.directive';
|
|
21
|
+
import * as i0 from "@angular/core";
|
|
22
|
+
import * as i1 from "@memberjunction/ng-base-forms";
|
|
23
|
+
/** One row per published agreement version. */
|
|
24
|
+
export class MJCAgreementVersionsPageComponent {
|
|
25
|
+
cdr = inject(ChangeDetectorRef);
|
|
26
|
+
navigation = inject(NavigationService);
|
|
27
|
+
/**
|
|
28
|
+
* Open the double-clicked record.
|
|
29
|
+
*
|
|
30
|
+
* THE GRID DOES NOT NAVIGATE ITSELF. `NavigateOnDoubleClick` only controls whether it EMITS
|
|
31
|
+
* `Navigate`; acting on it is the HOST's job. Without this, a double-click merely selected the row
|
|
32
|
+
* — measured in a real browser, where it looked exactly like the grid being broken. Explorer's own
|
|
33
|
+
* host wires this for generated forms; a page hosting the grid inside a BaseResourceComponent must
|
|
34
|
+
* do it itself.
|
|
35
|
+
*/
|
|
36
|
+
OnNavigate(event) {
|
|
37
|
+
if (!event?.EntityName)
|
|
38
|
+
return;
|
|
39
|
+
if (event.Kind === 'record' && event.PrimaryKey) {
|
|
40
|
+
this.navigation.OpenEntityRecord(event.EntityName, event.PrimaryKey);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (event.Kind === 'new-record') {
|
|
44
|
+
// TWO kinds, and missing this one meant the toolbar's New button did NOTHING on every grid
|
|
45
|
+
// page — found in the browser, after the double-click bug had already taught me the same
|
|
46
|
+
// lesson about this component. Handling only 'record' silently dropped it.
|
|
47
|
+
//
|
|
48
|
+
// ⚠ `event.DefaultValues` is DISCARDED here, and it has nowhere to go: NavigationOptions
|
|
49
|
+
// carries no default-values field, so `OpenNewEntityRecord` cannot pre-populate. Harmless on
|
|
50
|
+
// these pages (nothing sets NewRecordValues), but it means the Organization agreements
|
|
51
|
+
// panel's pre-linking to the customer will NOT survive a New click routed through here —
|
|
52
|
+
// that panel needs its own affordance, or MJ needs the option. Written down rather than
|
|
53
|
+
// discovered later as "New forgets the customer".
|
|
54
|
+
this.navigation.OpenNewEntityRecord(event.EntityName);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
Params = null;
|
|
58
|
+
/**
|
|
59
|
+
* Toolbar affordances that actually work, and one that does not.
|
|
60
|
+
*
|
|
61
|
+
* ⚠ `showFilterToggle` IS A NO-OP, and this comment used to claim the opposite. It is declared on
|
|
62
|
+
* `GridToolbarConfig` (`grid-types.ts:249`) and documented in the entity-viewer README, and it is
|
|
63
|
+
* **read nowhere in MJ** — no template branch renders a filter button. Three sibling hooks are dead
|
|
64
|
+
* the same way: the `AllowColumnFilters` input stores `_allowColumnFilters` and nothing reads it,
|
|
65
|
+
* `_filterState` is declared and never touched, and `defaultColDef.filter` is hardcoded `false`, so
|
|
66
|
+
* AG Grid's per-column filters are off with no input to turn them on. It is left set to `true` here
|
|
67
|
+
* because it costs nothing and is the flag to keep passing if MJ ever wires it up.
|
|
68
|
+
*
|
|
69
|
+
* So the ONLY filtering this page has beyond the pills is `showSearch` — which sets AG Grid's
|
|
70
|
+
* `quickFilterText`, a client-side substring match over the rows already loaded. It is not
|
|
71
|
+
* structured and not server-side. Filtering by date range / category / derived State needs a real
|
|
72
|
+
* filter popover (see `design-docs/ui-design/mockups-v2/renewal-watchlist.html`), which is ours to
|
|
73
|
+
* build; the pills stay regardless, because they encode the QUESTIONS people ask rather than
|
|
74
|
+
* predicates a user would assemble by hand.
|
|
75
|
+
*/
|
|
76
|
+
GridToolbar = {
|
|
77
|
+
showSearch: true,
|
|
78
|
+
showFilterToggle: true,
|
|
79
|
+
showColumnChooser: true,
|
|
80
|
+
showRefresh: true,
|
|
81
|
+
showExport: true,
|
|
82
|
+
showRowCount: true,
|
|
83
|
+
};
|
|
84
|
+
ngOnInit() {
|
|
85
|
+
this.Params = {
|
|
86
|
+
EntityName: MJC_ENTITIES.ContractTemplate,
|
|
87
|
+
// Newest edition first: the current terms are what people look for.
|
|
88
|
+
OrderBy: 'IntroducedDate DESC',
|
|
89
|
+
};
|
|
90
|
+
this.cdr.detectChanges();
|
|
91
|
+
}
|
|
92
|
+
static ɵfac = function MJCAgreementVersionsPageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJCAgreementVersionsPageComponent)(); };
|
|
93
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJCAgreementVersionsPageComponent, selectors: [["mjc-agreement-versions-page"]], decls: 8, vars: 3, consts: [[1, "mjc-page", "mjc-page--grid"], [1, "mjc-page__intro"], [1, "mjc-grid-fill"], ["mjcFkNavigate", "", 3, "Navigate", "Params", "ShowToolbar", "NavigateOnDoubleClick"]], template: function MJCAgreementVersionsPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
94
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "p", 1);
|
|
95
|
+
i0.ɵɵtext(2, " Every published version of the standard terms. Open one to read and curate its provisions. A new edition is a ");
|
|
96
|
+
i0.ɵɵelementStart(3, "strong");
|
|
97
|
+
i0.ɵɵtext(4, "new row");
|
|
98
|
+
i0.ɵɵelementEnd();
|
|
99
|
+
i0.ɵɵtext(5, " \u2014 an existing version is never rewritten, because contracts already signed against it say they incorporate exactly what it said at the time. ");
|
|
100
|
+
i0.ɵɵelementEnd();
|
|
101
|
+
i0.ɵɵelementStart(6, "div", 2)(7, "mj-explorer-entity-data-grid", 3);
|
|
102
|
+
i0.ɵɵlistener("Navigate", function MJCAgreementVersionsPageComponent_Template_mj_explorer_entity_data_grid_Navigate_7_listener($event) { return ctx.OnNavigate($event); });
|
|
103
|
+
i0.ɵɵelementEnd()()();
|
|
104
|
+
} if (rf & 2) {
|
|
105
|
+
i0.ɵɵadvance(7);
|
|
106
|
+
i0.ɵɵproperty("Params", ctx.Params)("ShowToolbar", true)("NavigateOnDoubleClick", true);
|
|
107
|
+
} }, dependencies: [CommonModule, BaseFormsModule, i1.ExplorerEntityDataGridComponent, MJCFkNavigateDirective], encapsulation: 2 });
|
|
108
|
+
}
|
|
109
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJCAgreementVersionsPageComponent, [{
|
|
110
|
+
type: Component,
|
|
111
|
+
args: [{
|
|
112
|
+
selector: 'mjc-agreement-versions-page',
|
|
113
|
+
standalone: true,
|
|
114
|
+
encapsulation: ViewEncapsulation.None,
|
|
115
|
+
imports: [CommonModule, BaseFormsModule, MJCFkNavigateDirective],
|
|
116
|
+
template: `
|
|
117
|
+
<div class="mjc-page mjc-page--grid">
|
|
118
|
+
<p class="mjc-page__intro">
|
|
119
|
+
Every published version of the standard terms. Open one to read and curate its
|
|
120
|
+
provisions. A new edition is a <strong>new row</strong> — an existing version is never
|
|
121
|
+
rewritten, because contracts already signed against it say they incorporate exactly
|
|
122
|
+
what it said at the time.
|
|
123
|
+
</p>
|
|
124
|
+
<div class="mjc-grid-fill">
|
|
125
|
+
<mj-explorer-entity-data-grid mjcFkNavigate
|
|
126
|
+
[Params]="Params"
|
|
127
|
+
[ShowToolbar]="true"
|
|
128
|
+
[NavigateOnDoubleClick]="true"
|
|
129
|
+
(Navigate)="OnNavigate($event)" />
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
`,
|
|
133
|
+
}]
|
|
134
|
+
}], null, null); })();
|
|
135
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJCAgreementVersionsPageComponent, { className: "MJCAgreementVersionsPageComponent", filePath: "lib/pages/templates.page.ts", lineNumber: 48 }); })();
|
|
136
|
+
/** Every clause of every version, in canonical order within each. */
|
|
137
|
+
export class MJCAllProvisionsPageComponent {
|
|
138
|
+
cdr = inject(ChangeDetectorRef);
|
|
139
|
+
navigation = inject(NavigationService);
|
|
140
|
+
/**
|
|
141
|
+
* Open the double-clicked record.
|
|
142
|
+
*
|
|
143
|
+
* THE GRID DOES NOT NAVIGATE ITSELF. `NavigateOnDoubleClick` only controls whether it EMITS
|
|
144
|
+
* `Navigate`; acting on it is the HOST's job. Without this, a double-click merely selected the row
|
|
145
|
+
* — measured in a real browser, where it looked exactly like the grid being broken. Explorer's own
|
|
146
|
+
* host wires this for generated forms; a page hosting the grid inside a BaseResourceComponent must
|
|
147
|
+
* do it itself.
|
|
148
|
+
*/
|
|
149
|
+
OnNavigate(event) {
|
|
150
|
+
if (!event?.EntityName)
|
|
151
|
+
return;
|
|
152
|
+
if (event.Kind === 'record' && event.PrimaryKey) {
|
|
153
|
+
this.navigation.OpenEntityRecord(event.EntityName, event.PrimaryKey);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (event.Kind === 'new-record') {
|
|
157
|
+
// TWO kinds, and missing this one meant the toolbar's New button did NOTHING on every grid
|
|
158
|
+
// page — found in the browser, after the double-click bug had already taught me the same
|
|
159
|
+
// lesson about this component. Handling only 'record' silently dropped it.
|
|
160
|
+
//
|
|
161
|
+
// ⚠ `event.DefaultValues` is DISCARDED here, and it has nowhere to go: NavigationOptions
|
|
162
|
+
// carries no default-values field, so `OpenNewEntityRecord` cannot pre-populate. Harmless on
|
|
163
|
+
// these pages (nothing sets NewRecordValues), but it means the Organization agreements
|
|
164
|
+
// panel's pre-linking to the customer will NOT survive a New click routed through here —
|
|
165
|
+
// that panel needs its own affordance, or MJ needs the option. Written down rather than
|
|
166
|
+
// discovered later as "New forgets the customer".
|
|
167
|
+
this.navigation.OpenNewEntityRecord(event.EntityName);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
Params = null;
|
|
171
|
+
/**
|
|
172
|
+
* Toolbar affordances that actually work, and one that does not.
|
|
173
|
+
*
|
|
174
|
+
* ⚠ `showFilterToggle` IS A NO-OP, and this comment used to claim the opposite. It is declared on
|
|
175
|
+
* `GridToolbarConfig` (`grid-types.ts:249`) and documented in the entity-viewer README, and it is
|
|
176
|
+
* **read nowhere in MJ** — no template branch renders a filter button. Three sibling hooks are dead
|
|
177
|
+
* the same way: the `AllowColumnFilters` input stores `_allowColumnFilters` and nothing reads it,
|
|
178
|
+
* `_filterState` is declared and never touched, and `defaultColDef.filter` is hardcoded `false`, so
|
|
179
|
+
* AG Grid's per-column filters are off with no input to turn them on. It is left set to `true` here
|
|
180
|
+
* because it costs nothing and is the flag to keep passing if MJ ever wires it up.
|
|
181
|
+
*
|
|
182
|
+
* So the ONLY filtering this page has beyond the pills is `showSearch` — which sets AG Grid's
|
|
183
|
+
* `quickFilterText`, a client-side substring match over the rows already loaded. It is not
|
|
184
|
+
* structured and not server-side. Filtering by date range / category / derived State needs a real
|
|
185
|
+
* filter popover (see `design-docs/ui-design/mockups-v2/renewal-watchlist.html`), which is ours to
|
|
186
|
+
* build; the pills stay regardless, because they encode the QUESTIONS people ask rather than
|
|
187
|
+
* predicates a user would assemble by hand.
|
|
188
|
+
*/
|
|
189
|
+
GridToolbar = {
|
|
190
|
+
showSearch: true,
|
|
191
|
+
showFilterToggle: true,
|
|
192
|
+
showColumnChooser: true,
|
|
193
|
+
showRefresh: true,
|
|
194
|
+
showExport: true,
|
|
195
|
+
showRowCount: true,
|
|
196
|
+
};
|
|
197
|
+
ngOnInit() {
|
|
198
|
+
this.Params = {
|
|
199
|
+
EntityName: MJC_ENTITIES.ContractTemplateProvision,
|
|
200
|
+
// Group by version, then document order within it. The base view carries the template's
|
|
201
|
+
// name column, so grouping by it reads as a name (D-23).
|
|
202
|
+
OrderBy: 'ContractTemplate ASC, ProvisionSortKey ASC',
|
|
203
|
+
};
|
|
204
|
+
this.cdr.detectChanges();
|
|
205
|
+
}
|
|
206
|
+
static ɵfac = function MJCAllProvisionsPageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJCAllProvisionsPageComponent)(); };
|
|
207
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJCAllProvisionsPageComponent, selectors: [["mjc-all-provisions-page"]], decls: 14, vars: 3, consts: [[1, "mjc-page", "mjc-page--grid"], [1, "mjc-page__intro"], [1, "mjc-grid-fill"], ["mjcFkNavigate", "", 3, "Navigate", "Params", "ShowToolbar", "NavigateOnDoubleClick"]], template: function MJCAllProvisionsPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
208
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "p", 1);
|
|
209
|
+
i0.ɵɵtext(2, " Every numbered clause across every agreement version, in document order. Ordered by ");
|
|
210
|
+
i0.ɵɵelementStart(3, "code");
|
|
211
|
+
i0.ɵɵtext(4, "ProvisionSortKey");
|
|
212
|
+
i0.ɵɵelementEnd();
|
|
213
|
+
i0.ɵɵtext(5, ", a collation key derived from the provision number \u2014 sorting on the number itself would put ");
|
|
214
|
+
i0.ɵɵelementStart(6, "code");
|
|
215
|
+
i0.ɵɵtext(7, "1.10");
|
|
216
|
+
i0.ɵɵelementEnd();
|
|
217
|
+
i0.ɵɵtext(8, " before ");
|
|
218
|
+
i0.ɵɵelementStart(9, "code");
|
|
219
|
+
i0.ɵɵtext(10, "1.2");
|
|
220
|
+
i0.ɵɵelementEnd();
|
|
221
|
+
i0.ɵɵtext(11, ", and the Master Agreement's two longest sections are exactly the ones that breaks. ");
|
|
222
|
+
i0.ɵɵelementEnd();
|
|
223
|
+
i0.ɵɵelementStart(12, "div", 2)(13, "mj-explorer-entity-data-grid", 3);
|
|
224
|
+
i0.ɵɵlistener("Navigate", function MJCAllProvisionsPageComponent_Template_mj_explorer_entity_data_grid_Navigate_13_listener($event) { return ctx.OnNavigate($event); });
|
|
225
|
+
i0.ɵɵelementEnd()()();
|
|
226
|
+
} if (rf & 2) {
|
|
227
|
+
i0.ɵɵadvance(13);
|
|
228
|
+
i0.ɵɵproperty("Params", ctx.Params)("ShowToolbar", true)("NavigateOnDoubleClick", true);
|
|
229
|
+
} }, dependencies: [CommonModule, BaseFormsModule, i1.ExplorerEntityDataGridComponent, MJCFkNavigateDirective], encapsulation: 2 });
|
|
230
|
+
}
|
|
231
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJCAllProvisionsPageComponent, [{
|
|
232
|
+
type: Component,
|
|
233
|
+
args: [{
|
|
234
|
+
selector: 'mjc-all-provisions-page',
|
|
235
|
+
standalone: true,
|
|
236
|
+
encapsulation: ViewEncapsulation.None,
|
|
237
|
+
imports: [CommonModule, BaseFormsModule, MJCFkNavigateDirective],
|
|
238
|
+
template: `
|
|
239
|
+
<div class="mjc-page mjc-page--grid">
|
|
240
|
+
<p class="mjc-page__intro">
|
|
241
|
+
Every numbered clause across every agreement version, in document order. Ordered by
|
|
242
|
+
<code>ProvisionSortKey</code>, a collation key derived from the provision number —
|
|
243
|
+
sorting on the number itself would put <code>1.10</code> before <code>1.2</code>,
|
|
244
|
+
and the Master Agreement's two longest sections are exactly the ones that breaks.
|
|
245
|
+
</p>
|
|
246
|
+
<div class="mjc-grid-fill">
|
|
247
|
+
<mj-explorer-entity-data-grid mjcFkNavigate
|
|
248
|
+
[Params]="Params"
|
|
249
|
+
[ShowToolbar]="true"
|
|
250
|
+
[NavigateOnDoubleClick]="true"
|
|
251
|
+
(Navigate)="OnNavigate($event)" />
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
`,
|
|
255
|
+
}]
|
|
256
|
+
}], null, null); })();
|
|
257
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJCAllProvisionsPageComponent, { className: "MJCAllProvisionsPageComponent", filePath: "lib/pages/templates.page.ts", lineNumber: 151 }); })();
|
|
258
|
+
//# sourceMappingURL=templates.page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.page.js","sourceRoot":"","sources":["../../../src/lib/pages/templates.page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAU,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;;;AAE7E,+CAA+C;AAwB/C,MAAM,OAAO,iCAAiC;IACzB,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC9B,UAAU,GAAG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')` under the name the
|
|
5
|
+
* Application's `DefaultNavItems` reference (`metadata/applications/.contracts-application.json`), which
|
|
6
|
+
* is what makes these plug into MJ Explorer with no host-side wiring: Explorer reads the nav metadata,
|
|
7
|
+
* asks the class factory for the driver class, and mounts it as a tab. BOTH HALVES ARE REQUIRED —
|
|
8
|
+
* metadata without a registered class renders a dead tab, a registered class without metadata never
|
|
9
|
+
* appears.
|
|
10
|
+
*
|
|
11
|
+
* Each section is deliberately thin. It owns three things — its rail, which sub-page is showing, and
|
|
12
|
+
* remembering that across sessions — and delegates the frame to {@link MJCSectionShellComponent} and the
|
|
13
|
+
* content to page components.
|
|
14
|
+
*
|
|
15
|
+
* SUB-PAGE HOSTING: pages are created once and CACHED, so switching rails and coming back does not
|
|
16
|
+
* discard a part-filled form or re-run every count query.
|
|
17
|
+
*
|
|
18
|
+
* @module @mj-biz-apps/contracts-ng
|
|
19
|
+
*/
|
|
20
|
+
import { ChangeDetectorRef, OnInit, Type, ViewContainerRef, type ComponentRef } from '@angular/core';
|
|
21
|
+
import { BaseResourceComponent } from '@memberjunction/ng-shared';
|
|
22
|
+
import type { MJLeftNavSection } from '@memberjunction/ng-ui-components';
|
|
23
|
+
import type { ResourceData } from '@memberjunction/core-entities';
|
|
24
|
+
import { type MJCNavBadges, type MJCSubPage } from './section-nav.model';
|
|
25
|
+
import * as i0 from "@angular/core";
|
|
26
|
+
/** Shared skeleton for all three sections. */
|
|
27
|
+
export declare abstract class MJCSectionBaseComponent extends BaseResourceComponent implements OnInit {
|
|
28
|
+
/** Where a sub-page is created. Declared once, inherited by all three. */
|
|
29
|
+
protected pageHost?: ViewContainerRef;
|
|
30
|
+
protected readonly cdr: ChangeDetectorRef;
|
|
31
|
+
NavSections: MJLeftNavSection[];
|
|
32
|
+
ActivePageId: string | null;
|
|
33
|
+
IsLoading: boolean;
|
|
34
|
+
LoadError: string | null;
|
|
35
|
+
protected badges: MJCNavBadges;
|
|
36
|
+
protected readonly mounted: Map<string, ComponentRef<unknown>>;
|
|
37
|
+
protected abstract get subPages(): MJCSubPage[];
|
|
38
|
+
protected abstract get preferenceKey(): string;
|
|
39
|
+
protected abstract get sectionTitle(): string;
|
|
40
|
+
protected abstract get sectionIcon(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Component type for a page id, or null while a page is still to be built. Returning null renders a
|
|
43
|
+
* sentence rather than throwing — a rail item that cannot open is a bug, but a blank pane is a worse
|
|
44
|
+
* one, because it reads as a broken app rather than as work in progress.
|
|
45
|
+
*/
|
|
46
|
+
protected abstract resolvePage(pageId: string): Type<unknown> | null;
|
|
47
|
+
ngOnInit(): void;
|
|
48
|
+
/** Rail click handler. */
|
|
49
|
+
OnPageSelected(pageId: string): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Mount a page, reusing the instance if it has been shown before.
|
|
52
|
+
*
|
|
53
|
+
* Cached views are DETACHED rather than destroyed, which is what preserves state across a trip to
|
|
54
|
+
* another rail item.
|
|
55
|
+
*/
|
|
56
|
+
protected showPage(pageId: string): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Badge counts for the rail. Overridden by the section that has badges; the others inherit a no-op
|
|
59
|
+
* rather than each declaring an empty method.
|
|
60
|
+
*/
|
|
61
|
+
protected refreshBadges(): Promise<void>;
|
|
62
|
+
/** First page in the rail — the fallback when nothing is remembered. */
|
|
63
|
+
protected get defaultPageId(): string;
|
|
64
|
+
/**
|
|
65
|
+
* Restore the last page this user was on. Guarded, and falls back to the default rather than
|
|
66
|
+
* throwing: an unknown id means the rail was renamed since the preference was written, and
|
|
67
|
+
* stranding someone on a blank tab because of a rename is the wrong trade.
|
|
68
|
+
*/
|
|
69
|
+
protected restorePageId(): string;
|
|
70
|
+
protected persistPageId(pageId: string): void;
|
|
71
|
+
GetResourceDisplayName(_data: ResourceData): Promise<string>;
|
|
72
|
+
GetResourceIconClass(_data: ResourceData): Promise<string>;
|
|
73
|
+
ngOnDestroy(): void;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJCSectionBaseComponent, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJCSectionBaseComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
76
|
+
}
|
|
77
|
+
export declare class ContractsSectionResource extends MJCSectionBaseComponent {
|
|
78
|
+
protected get subPages(): MJCSubPage[];
|
|
79
|
+
protected get preferenceKey(): string;
|
|
80
|
+
protected get sectionTitle(): string;
|
|
81
|
+
protected get sectionIcon(): string;
|
|
82
|
+
protected resolvePage(pageId: string): Type<unknown> | null;
|
|
83
|
+
/**
|
|
84
|
+
* The three work counts, read from the same derived columns the worklists filter on — so a badge
|
|
85
|
+
* cannot promise work the page then fails to show.
|
|
86
|
+
*
|
|
87
|
+
* A count that fails is left UNSET rather than zeroed: `BuildLeftNavSections` omits a falsy badge,
|
|
88
|
+
* so an unreadable count renders no badge at all instead of a "0" that says "nothing to do here".
|
|
89
|
+
*/
|
|
90
|
+
protected refreshBadges(): Promise<void>;
|
|
91
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContractsSectionResource, never>;
|
|
92
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContractsSectionResource, "mjc-contracts-section", never, {}, {}, never, never, true, never>;
|
|
93
|
+
}
|
|
94
|
+
export declare class ContractsTemplatesSectionResource extends MJCSectionBaseComponent {
|
|
95
|
+
protected get subPages(): MJCSubPage[];
|
|
96
|
+
protected get preferenceKey(): string;
|
|
97
|
+
protected get sectionTitle(): string;
|
|
98
|
+
protected get sectionIcon(): string;
|
|
99
|
+
protected resolvePage(pageId: string): Type<unknown> | null;
|
|
100
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContractsTemplatesSectionResource, never>;
|
|
101
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContractsTemplatesSectionResource, "mjc-templates-section", never, {}, {}, never, never, true, never>;
|
|
102
|
+
}
|
|
103
|
+
export declare class ContractsConfigurationSectionResource extends MJCSectionBaseComponent {
|
|
104
|
+
protected get subPages(): MJCSubPage[];
|
|
105
|
+
protected get preferenceKey(): string;
|
|
106
|
+
protected get sectionTitle(): string;
|
|
107
|
+
protected get sectionIcon(): string;
|
|
108
|
+
protected resolvePage(pageId: string): Type<unknown> | null;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContractsConfigurationSectionResource, never>;
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContractsConfigurationSectionResource, "mjc-configuration-section", never, {}, {}, never, never, true, never>;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=contracts-sections.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts-sections.component.d.ts","sourceRoot":"","sources":["../../../src/lib/sections/contracts-sections.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACH,iBAAiB,EAEjB,MAAM,EACN,IAAI,EAEJ,gBAAgB,EAEhB,KAAK,YAAY,EACpB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGlE,OAAO,EAKH,KAAK,YAAY,EACjB,KAAK,UAAU,EAClB,MAAM,qBAAqB,CAAC;;AAiB7B,8CAA8C;AAC9C,8BACsB,uBAAwB,SAAQ,qBAAsB,YAAW,MAAM;IACzF,0EAA0E;IAE1E,SAAS,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAEtC,SAAS,CAAC,QAAQ,CAAC,GAAG,oBAA6B;IAE5C,WAAW,EAAE,gBAAgB,EAAE,CAAM;IACrC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,SAAS,UAAS;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEvC,SAAS,CAAC,MAAM,EAAE,YAAY,C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