@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
package/LICENSE
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
License text copyright (c) 2024 MariaDB plc, All Rights Reserved.
|
|
4
|
+
"Business Source License" is a trademark of MariaDB plc.
|
|
5
|
+
|
|
6
|
+
-----------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
Parameters
|
|
9
|
+
|
|
10
|
+
Licensor: Blue Cypress, Inc.
|
|
11
|
+
|
|
12
|
+
Licensed Work: MemberJunction.
|
|
13
|
+
The Licensed Work is (c) 2023-2026 Blue Cypress, Inc.
|
|
14
|
+
|
|
15
|
+
Additional Use Grant: Subject to the terms of this License, Licensor grants
|
|
16
|
+
you the following additional rights to make Production
|
|
17
|
+
Use of the Licensed Work.
|
|
18
|
+
|
|
19
|
+
1. Internal Use
|
|
20
|
+
|
|
21
|
+
You may make production use of the Licensed Work for
|
|
22
|
+
your own internal business or organizational operations.
|
|
23
|
+
|
|
24
|
+
2. Nonprofit Use
|
|
25
|
+
|
|
26
|
+
If you are a Nonprofit, you may make production use of
|
|
27
|
+
the Licensed Work for the operations and activities of
|
|
28
|
+
your Organizational Family.
|
|
29
|
+
|
|
30
|
+
3. MemberJunction Certified Program Use
|
|
31
|
+
|
|
32
|
+
If you are authorized by Licensor under the
|
|
33
|
+
MemberJunction Certified Program to provide professional
|
|
34
|
+
services using the Licensed Work, you may make
|
|
35
|
+
production use of the Licensed Work in providing such
|
|
36
|
+
professional services to a client, provided that:
|
|
37
|
+
|
|
38
|
+
(a) the Licensed Work is deployed in, and the applicable
|
|
39
|
+
production use occurs within, an environment owned,
|
|
40
|
+
leased, licensed, subscribed to, or otherwise controlled
|
|
41
|
+
by that client; and
|
|
42
|
+
|
|
43
|
+
(b) the production use is for that client's own internal
|
|
44
|
+
business or organizational operations or is otherwise
|
|
45
|
+
independently permitted to that client under this
|
|
46
|
+
Additional Use Grant.
|
|
47
|
+
|
|
48
|
+
4. Definitions Applicable to the Additional Use Grant
|
|
49
|
+
|
|
50
|
+
"Affiliate" means, with respect to a specified Person,
|
|
51
|
+
any other Person that directly or indirectly Controls,
|
|
52
|
+
is Controlled by, or is under common Control with such
|
|
53
|
+
specified Person.
|
|
54
|
+
|
|
55
|
+
"Control" (including the terms "Controls," "Controlled
|
|
56
|
+
by," and "under common Control with") means the direct
|
|
57
|
+
or indirect possession of the power to direct or cause
|
|
58
|
+
the direction of the management and policies of a
|
|
59
|
+
Person, whether through ownership of voting interests,
|
|
60
|
+
by contract, or otherwise.
|
|
61
|
+
|
|
62
|
+
"Organizational Family" means, with respect to a Person,
|
|
63
|
+
(a) such Person and its Affiliates, and (b) any
|
|
64
|
+
nonprofit organization, governmental entity, chapter,
|
|
65
|
+
division, local affiliate, regional affiliate, state
|
|
66
|
+
affiliate, national affiliate, or other entity that is
|
|
67
|
+
formally affiliated with such Person through governing
|
|
68
|
+
documents, a charter, bylaws, a membership agreement, or
|
|
69
|
+
another written organizational instrument, and is
|
|
70
|
+
recognized under such documents as part of the same
|
|
71
|
+
organizational structure.
|
|
72
|
+
|
|
73
|
+
"Nonprofit" means a Person recognized by the Internal
|
|
74
|
+
Revenue Service as exempt from federal income taxation
|
|
75
|
+
under Section 501(c)(3), 501(c)(4), 501(c)(5), or
|
|
76
|
+
501(c)(6) of the Internal Revenue Code, or a foreign
|
|
77
|
+
organization recognized under substantially equivalent
|
|
78
|
+
laws.
|
|
79
|
+
|
|
80
|
+
A Person claiming eligibility as a Nonprofit shall, upon
|
|
81
|
+
Licensor's reasonable request, provide documentation
|
|
82
|
+
reasonably sufficient to demonstrate that it qualifies
|
|
83
|
+
as a Nonprofit. If such Person materially misrepresents,
|
|
84
|
+
or is unable to demonstrate, its qualification as a
|
|
85
|
+
Nonprofit, the rights granted to such Person under
|
|
86
|
+
Section 2 of this Additional Use Grant shall terminate.
|
|
87
|
+
|
|
88
|
+
"MemberJunction Certified Program" means Licensor's
|
|
89
|
+
then-current program for certifying and authorizing a
|
|
90
|
+
Person to provide professional services using the
|
|
91
|
+
Licensed Work.
|
|
92
|
+
|
|
93
|
+
"Person" means any individual, corporation, limited
|
|
94
|
+
liability company, partnership, association, nonprofit
|
|
95
|
+
organization, governmental entity, or other legal or
|
|
96
|
+
organizational entity.
|
|
97
|
+
|
|
98
|
+
Change Date: Four (4) years from the date the Licensed Work is first
|
|
99
|
+
made available.
|
|
100
|
+
|
|
101
|
+
Change License: MIT License.
|
|
102
|
+
|
|
103
|
+
For information about alternative licensing arrangements for the Licensed
|
|
104
|
+
Work, please contact Blue Cypress, Inc.
|
|
105
|
+
|
|
106
|
+
-----------------------------------------------------------------------------
|
|
107
|
+
|
|
108
|
+
Terms
|
|
109
|
+
|
|
110
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
111
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
112
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
113
|
+
production use.
|
|
114
|
+
|
|
115
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
116
|
+
available distribution of a specific version of the Licensed Work under this
|
|
117
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
118
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
119
|
+
above terminate.
|
|
120
|
+
|
|
121
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
122
|
+
currently in effect as described in this License, you must purchase a
|
|
123
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
124
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
125
|
+
|
|
126
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
127
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
128
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
129
|
+
for each version of the Licensed Work released by Licensor.
|
|
130
|
+
|
|
131
|
+
You must conspicuously display this License on each original or modified copy
|
|
132
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
133
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
134
|
+
License apply to your use of that work.
|
|
135
|
+
|
|
136
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
137
|
+
terminate your rights under this License for the current and all other
|
|
138
|
+
versions of the Licensed Work.
|
|
139
|
+
|
|
140
|
+
This License does not grant you any right in any trademark or logo of
|
|
141
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
142
|
+
Licensor as expressly required by this License).
|
|
143
|
+
|
|
144
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
145
|
+
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
146
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
147
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
148
|
+
TITLE.
|
|
149
|
+
|
|
150
|
+
MariaDB hereby grants you permission to use this License's text to license
|
|
151
|
+
your works, and to refer to it using the trademark "Business Source License",
|
|
152
|
+
as long as you comply with the Covenants of Licensor below.
|
|
153
|
+
|
|
154
|
+
-----------------------------------------------------------------------------
|
|
155
|
+
|
|
156
|
+
Covenants of Licensor
|
|
157
|
+
|
|
158
|
+
In consideration of the right to use this License's text and the "Business
|
|
159
|
+
Source License" name and trademark, Licensor covenants to MariaDB, and to all
|
|
160
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
161
|
+
|
|
162
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
163
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
164
|
+
where "compatible" means that software provided under the Change License
|
|
165
|
+
can be included in a program with software provided under GPL Version 2.0
|
|
166
|
+
or a later version. Licensor may specify additional Change Licenses without
|
|
167
|
+
limitation.
|
|
168
|
+
|
|
169
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
170
|
+
impose any additional restriction on the right granted in this License, as
|
|
171
|
+
the Additional Use Grant; or (b) insert the text "None".
|
|
172
|
+
|
|
173
|
+
3. To specify a Change Date.
|
|
174
|
+
|
|
175
|
+
4. Not to modify this License in any other way.
|
|
176
|
+
|
|
177
|
+
-----------------------------------------------------------------------------
|
|
178
|
+
|
|
179
|
+
Notice
|
|
180
|
+
|
|
181
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
182
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
183
|
+
under an Open Source License, as stated in this License.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Entity names as constants, in one place.
|
|
3
|
+
*
|
|
4
|
+
* MJ addresses entities by NAME as a string — `RunView({ EntityName: '…' })`,
|
|
5
|
+
* `GetEntityObject('…')`, `@RegisterClass(BaseEntity, '…')`. A typo in one of those does not fail to
|
|
6
|
+
* compile; it fails at runtime, usually as an empty grid rather than an error, which is the hardest
|
|
7
|
+
* shape of bug to see. The prefix (`MJ_BizApps_Contracts: `) also comes from `mj.config.cjs`
|
|
8
|
+
* `NameRulesBySchema`, so it is a convention that could change — in one place it is a rename, scattered
|
|
9
|
+
* through templates it is an archaeology exercise.
|
|
10
|
+
*
|
|
11
|
+
* @module @mj-biz-apps/contracts-ng
|
|
12
|
+
*/
|
|
13
|
+
/** Every entity this app owns. */
|
|
14
|
+
export declare const MJC_ENTITIES: {
|
|
15
|
+
readonly Contract: "MJ_BizApps_Contracts: Contracts";
|
|
16
|
+
readonly ContractType: "MJ_BizApps_Contracts: Contract Types";
|
|
17
|
+
readonly ContractTemplate: "MJ_BizApps_Contracts: Contract Templates";
|
|
18
|
+
readonly ContractTemplateType: "MJ_BizApps_Contracts: Contract Template Types";
|
|
19
|
+
readonly ContractTemplateProvision: "MJ_BizApps_Contracts: Contract Template Provisions";
|
|
20
|
+
readonly ContractTemplateModification: "MJ_BizApps_Contracts: Contract Template Modifications";
|
|
21
|
+
};
|
|
22
|
+
/** Entities in OTHER apps that contracts reads. Named here so a cross-app rename is one edit. */
|
|
23
|
+
export declare const MJC_FOREIGN_ENTITIES: {
|
|
24
|
+
readonly Organization: "MJ_BizApps_Common: Organizations";
|
|
25
|
+
readonly Person: "MJ_BizApps_Common: People";
|
|
26
|
+
/** MJ CORE's Company, not accounting's — verified against __mj.EntityRelationship. */
|
|
27
|
+
readonly Company: "MJ: Companies";
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=entity-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-names.d.ts","sourceRoot":"","sources":["../../../src/lib/data/entity-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,kCAAkC;AAClC,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AAEX,iGAAiG;AACjG,eAAO,MAAM,oBAAoB;;;IAG7B,sFAAsF;;CAEhF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Entity names as constants, in one place.
|
|
3
|
+
*
|
|
4
|
+
* MJ addresses entities by NAME as a string — `RunView({ EntityName: '…' })`,
|
|
5
|
+
* `GetEntityObject('…')`, `@RegisterClass(BaseEntity, '…')`. A typo in one of those does not fail to
|
|
6
|
+
* compile; it fails at runtime, usually as an empty grid rather than an error, which is the hardest
|
|
7
|
+
* shape of bug to see. The prefix (`MJ_BizApps_Contracts: `) also comes from `mj.config.cjs`
|
|
8
|
+
* `NameRulesBySchema`, so it is a convention that could change — in one place it is a rename, scattered
|
|
9
|
+
* through templates it is an archaeology exercise.
|
|
10
|
+
*
|
|
11
|
+
* @module @mj-biz-apps/contracts-ng
|
|
12
|
+
*/
|
|
13
|
+
/** Every entity this app owns. */
|
|
14
|
+
export const MJC_ENTITIES = {
|
|
15
|
+
Contract: 'MJ_BizApps_Contracts: Contracts',
|
|
16
|
+
ContractType: 'MJ_BizApps_Contracts: Contract Types',
|
|
17
|
+
ContractTemplate: 'MJ_BizApps_Contracts: Contract Templates',
|
|
18
|
+
ContractTemplateType: 'MJ_BizApps_Contracts: Contract Template Types',
|
|
19
|
+
ContractTemplateProvision: 'MJ_BizApps_Contracts: Contract Template Provisions',
|
|
20
|
+
ContractTemplateModification: 'MJ_BizApps_Contracts: Contract Template Modifications',
|
|
21
|
+
};
|
|
22
|
+
/** Entities in OTHER apps that contracts reads. Named here so a cross-app rename is one edit. */
|
|
23
|
+
export const MJC_FOREIGN_ENTITIES = {
|
|
24
|
+
Organization: 'MJ_BizApps_Common: Organizations',
|
|
25
|
+
Person: 'MJ_BizApps_Common: People',
|
|
26
|
+
/** MJ CORE's Company, not accounting's — verified against __mj.EntityRelationship. */
|
|
27
|
+
Company: 'MJ: Companies',
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=entity-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-names.js","sourceRoot":"","sources":["../../../src/lib/data/entity-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,kCAAkC;AAClC,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,QAAQ,EAAE,iCAAiC;IAC3C,YAAY,EAAE,sCAAsC;IACpD,gBAAgB,EAAE,0CAA0C;IAC5D,oBAAoB,EAAE,+CAA+C;IACrE,yBAAyB,EAAE,oDAAoD;IAC/E,4BAA4B,EAAE,uDAAuD;CAC/E,CAAC;AAEX,iGAAiG;AACjG,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,YAAY,EAAE,kCAAkC;IAChD,MAAM,EAAE,2BAA2B;IACnC,sFAAsF;IACtF,OAAO,EAAE,eAAe;CAClB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Provider scoping, stated once (D-25).
|
|
3
|
+
*
|
|
4
|
+
* THE RULE: every data access is provider-scoped. A bare `new RunView()` / `new Metadata()` uses the
|
|
5
|
+
* global provider, which is correct only by coincidence — in a host with more than one provider (a
|
|
6
|
+
* different connection, a different user's context, a server-side call) it silently reads the wrong
|
|
7
|
+
* database, and the failure is a wrong ANSWER rather than an error.
|
|
8
|
+
*
|
|
9
|
+
* Where each context gets its provider from:
|
|
10
|
+
*
|
|
11
|
+
* · server subclasses / engines → `this.ProviderToUse` (BaseEntity supplies it)
|
|
12
|
+
* · form panels → `FormComponent.ProviderToUse` — the host form's, so a panel reads
|
|
13
|
+
* from the same place the record it is showing came from
|
|
14
|
+
* · standalone editors → an `@Input() Provider`, falling back to `Metadata.Provider`
|
|
15
|
+
* · anything else → `RunView.FromMetadataProvider(Metadata.Provider)`
|
|
16
|
+
*
|
|
17
|
+
* The helpers below exist so the last two are one call rather than a repeated expression: a pattern
|
|
18
|
+
* copied into fifteen places is a pattern that is wrong in one of them.
|
|
19
|
+
*
|
|
20
|
+
* MJ's own code uses `RunView.FromMetadataProvider(this.ProviderToUse)` in exactly this way
|
|
21
|
+
* (`base-form-component.ts`), so this is the platform's idiom, not ours.
|
|
22
|
+
*
|
|
23
|
+
* @module @mj-biz-apps/contracts-ng
|
|
24
|
+
*/
|
|
25
|
+
import { Metadata, RunView, type IMetadataProvider } from '@memberjunction/core';
|
|
26
|
+
/**
|
|
27
|
+
* A `RunView` scoped to `provider`, or to the ambient provider when none is supplied.
|
|
28
|
+
*
|
|
29
|
+
* The fallback is deliberate and is NOT the same thing as a bare `new RunView()`: it names the
|
|
30
|
+
* provider it is falling back to, so the choice is visible at the call site and a reviewer can see
|
|
31
|
+
* whether a scoped one was available.
|
|
32
|
+
*/
|
|
33
|
+
export declare function ScopedRunView(provider?: IMetadataProvider | null): RunView;
|
|
34
|
+
/**
|
|
35
|
+
* A `Metadata` façade for entity construction, scoped the same way.
|
|
36
|
+
*
|
|
37
|
+
* `Metadata` has no provider constructor argument — `GetEntityObject` takes a context USER, and the
|
|
38
|
+
* provider is resolved from `Metadata.Provider`. So this returns a plain instance and exists to mark
|
|
39
|
+
* the intent at the call site: the caller has considered scoping and this is a context where the
|
|
40
|
+
* ambient provider is the right one. Where a scoped provider IS reachable (a server subclass, a form
|
|
41
|
+
* panel), construct through it instead — `provider.GetEntityObject(...)`.
|
|
42
|
+
*/
|
|
43
|
+
export declare function AmbientMetadata(): Metadata;
|
|
44
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/lib/data/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEjF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,CAAC,EAAE,iBAAiB,GAAG,IAAI,GAAG,OAAO,CAE1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,IAAI,QAAQ,CAE1C"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Provider scoping, stated once (D-25).
|
|
3
|
+
*
|
|
4
|
+
* THE RULE: every data access is provider-scoped. A bare `new RunView()` / `new Metadata()` uses the
|
|
5
|
+
* global provider, which is correct only by coincidence — in a host with more than one provider (a
|
|
6
|
+
* different connection, a different user's context, a server-side call) it silently reads the wrong
|
|
7
|
+
* database, and the failure is a wrong ANSWER rather than an error.
|
|
8
|
+
*
|
|
9
|
+
* Where each context gets its provider from:
|
|
10
|
+
*
|
|
11
|
+
* · server subclasses / engines → `this.ProviderToUse` (BaseEntity supplies it)
|
|
12
|
+
* · form panels → `FormComponent.ProviderToUse` — the host form's, so a panel reads
|
|
13
|
+
* from the same place the record it is showing came from
|
|
14
|
+
* · standalone editors → an `@Input() Provider`, falling back to `Metadata.Provider`
|
|
15
|
+
* · anything else → `RunView.FromMetadataProvider(Metadata.Provider)`
|
|
16
|
+
*
|
|
17
|
+
* The helpers below exist so the last two are one call rather than a repeated expression: a pattern
|
|
18
|
+
* copied into fifteen places is a pattern that is wrong in one of them.
|
|
19
|
+
*
|
|
20
|
+
* MJ's own code uses `RunView.FromMetadataProvider(this.ProviderToUse)` in exactly this way
|
|
21
|
+
* (`base-form-component.ts`), so this is the platform's idiom, not ours.
|
|
22
|
+
*
|
|
23
|
+
* @module @mj-biz-apps/contracts-ng
|
|
24
|
+
*/
|
|
25
|
+
import { Metadata, RunView } from '@memberjunction/core';
|
|
26
|
+
/**
|
|
27
|
+
* A `RunView` scoped to `provider`, or to the ambient provider when none is supplied.
|
|
28
|
+
*
|
|
29
|
+
* The fallback is deliberate and is NOT the same thing as a bare `new RunView()`: it names the
|
|
30
|
+
* provider it is falling back to, so the choice is visible at the call site and a reviewer can see
|
|
31
|
+
* whether a scoped one was available.
|
|
32
|
+
*/
|
|
33
|
+
export function ScopedRunView(provider) {
|
|
34
|
+
return RunView.FromMetadataProvider(provider ?? Metadata.Provider);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A `Metadata` façade for entity construction, scoped the same way.
|
|
38
|
+
*
|
|
39
|
+
* `Metadata` has no provider constructor argument — `GetEntityObject` takes a context USER, and the
|
|
40
|
+
* provider is resolved from `Metadata.Provider`. So this returns a plain instance and exists to mark
|
|
41
|
+
* the intent at the call site: the caller has considered scoping and this is a context where the
|
|
42
|
+
* ambient provider is the right one. Where a scoped provider IS reachable (a server subclass, a form
|
|
43
|
+
* panel), construct through it instead — `provider.GetEntityObject(...)`.
|
|
44
|
+
*/
|
|
45
|
+
export function AmbientMetadata() {
|
|
46
|
+
return new Metadata();
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/lib/data/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAA0B,MAAM,sBAAsB,CAAC;AAEjF;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,QAAmC;IAC7D,OAAO,OAAO,CAAC,oBAAoB,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACvE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe;IAC3B,OAAO,IAAI,QAAQ,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Make the grid's foreign-key links actually open the record they point at.
|
|
3
|
+
*
|
|
4
|
+
* THE DEFECT THIS EXISTS TO WORK AROUND (MJ, not ours). `mj-entity-data-grid` renders every FK cell as
|
|
5
|
+
* an anchor (`.cell-fk-link`, blue + underlined), detects the click, and emits `ForeignKeyClick` with
|
|
6
|
+
* the related entity and the FK value — see `entity-data-grid.component.ts` → `onAgCellClicked`. But
|
|
7
|
+
* `mj-explorer-entity-data-grid`, the wrapper the forms + our pages use, **never binds that output and
|
|
8
|
+
* declares no equivalent of its own** (verified in `explorer-entity-data-grid.component.ts`: the inner
|
|
9
|
+
* grid's template binds `AfterRowDoubleClick`, `AfterRowClick`, `AfterDataLoad` and
|
|
10
|
+
* `NewRecordTabRequested`, and nothing else). So the cell LOOKS like a link, the grid does its half of
|
|
11
|
+
* the work, and the event dies inside the wrapper. Every FK link in every wrapper-hosted grid is inert.
|
|
12
|
+
*
|
|
13
|
+
* That is a silent-failure UI bug of the worst kind — the affordance advertises navigation that cannot
|
|
14
|
+
* happen — and it is why Marcelo hit it immediately on the modifications grid.
|
|
15
|
+
*
|
|
16
|
+
* WHY A DIRECTIVE, and why this is not a DOM hack. The wrapper exposes the inner grid publicly
|
|
17
|
+
* (`@ViewChild('innerGrid') innerGrid!: EntityDataGridComponent`), so a directive on the same host
|
|
18
|
+
* element can inject the wrapper and subscribe to the inner component's own `@Output`. We use MJ's
|
|
19
|
+
* public API and MJ's own event — we do not reach into the DOM, re-parse the `data-*` attributes, or
|
|
20
|
+
* re-implement the hit test. When the wrapper grows a real `ForeignKeyClick` output, deleting this
|
|
21
|
+
* file and binding it is a one-line change with identical behaviour.
|
|
22
|
+
*
|
|
23
|
+
* The navigation itself mirrors MJ's own canonical handler
|
|
24
|
+
* (`grid-view-renderer.component.ts` → `onForeignKeyClick`): prefer the event's `relatedEntityName`,
|
|
25
|
+
* else resolve the name from `relatedEntityId` through metadata.
|
|
26
|
+
*
|
|
27
|
+
* FILED: see `plans/WORKAROUNDS.md` — this belongs upstream, as an output on the wrapper.
|
|
28
|
+
*
|
|
29
|
+
* @module @mj-biz-apps/contracts-ng
|
|
30
|
+
*/
|
|
31
|
+
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
32
|
+
import * as i0 from "@angular/core";
|
|
33
|
+
export declare class MJCFkNavigateDirective implements AfterViewInit, OnDestroy {
|
|
34
|
+
private readonly grid;
|
|
35
|
+
private readonly navigation;
|
|
36
|
+
/**
|
|
37
|
+
* Typed structurally rather than as an rxjs `Subscription`: this package does not declare rxjs as a
|
|
38
|
+
* dependency (Angular brings it transitively), and importing a type from an undeclared package is
|
|
39
|
+
* how a build breaks the first time the hoisting changes. `unsubscribe()` is all we use.
|
|
40
|
+
*/
|
|
41
|
+
private sub;
|
|
42
|
+
/**
|
|
43
|
+
* Subscribe after the view exists, because `innerGrid` is a `@ViewChild` on the wrapper and is
|
|
44
|
+
* undefined until then. One retry on a microtask covers the case where the wrapper's own
|
|
45
|
+
* `AfterViewInit` has not yet run — directive and component hook order on the same host is not
|
|
46
|
+
* something to rely on.
|
|
47
|
+
*/
|
|
48
|
+
ngAfterViewInit(): void;
|
|
49
|
+
private subscribe;
|
|
50
|
+
/**
|
|
51
|
+
* Open the related record.
|
|
52
|
+
*
|
|
53
|
+
* The FK event carries a bare value, not a key, so the primary-key FIELD NAME comes from the
|
|
54
|
+
* related entity's metadata rather than being assumed to be `ID`. It is `ID` for every entity in
|
|
55
|
+
* this app, but assuming it would break the first time this directive met a natural-key entity —
|
|
56
|
+
* and it would break as a wrong-record navigation, not an error.
|
|
57
|
+
*/
|
|
58
|
+
private open;
|
|
59
|
+
ngOnDestroy(): void;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJCFkNavigateDirective, never>;
|
|
61
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MJCFkNavigateDirective, "[mjcFkNavigate]", never, {}, {}, never, never, true, never>;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=fk-navigate.directive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fk-navigate.directive.d.ts","sourceRoot":"","sources":["../../../src/lib/directives/fk-navigate.directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,aAAa,EAAa,SAAS,EAAU,MAAM,eAAe,CAAC;;AAM5E,qBAIa,sBAAuB,YAAW,aAAa,EAAE,SAAS;IACnE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA2D;IAChF,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA6B;IACxD;;;;OAIG;IACH,OAAO,CAAC,GAAG,CAAwC;IAEnD;;;;;OAKG;IACI,eAAe,IAAI,IAAI;IAK9B,OAAO,CAAC,SAAS;IAQjB;;;;;;;OAOG;IACH,OAAO,CAAC,IAAI;IAYL,WAAW,IAAI,IAAI;yCAjDjB,sBAAsB;2CAAtB,sBAAsB;CAqDlC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Make the grid's foreign-key links actually open the record they point at.
|
|
3
|
+
*
|
|
4
|
+
* THE DEFECT THIS EXISTS TO WORK AROUND (MJ, not ours). `mj-entity-data-grid` renders every FK cell as
|
|
5
|
+
* an anchor (`.cell-fk-link`, blue + underlined), detects the click, and emits `ForeignKeyClick` with
|
|
6
|
+
* the related entity and the FK value — see `entity-data-grid.component.ts` → `onAgCellClicked`. But
|
|
7
|
+
* `mj-explorer-entity-data-grid`, the wrapper the forms + our pages use, **never binds that output and
|
|
8
|
+
* declares no equivalent of its own** (verified in `explorer-entity-data-grid.component.ts`: the inner
|
|
9
|
+
* grid's template binds `AfterRowDoubleClick`, `AfterRowClick`, `AfterDataLoad` and
|
|
10
|
+
* `NewRecordTabRequested`, and nothing else). So the cell LOOKS like a link, the grid does its half of
|
|
11
|
+
* the work, and the event dies inside the wrapper. Every FK link in every wrapper-hosted grid is inert.
|
|
12
|
+
*
|
|
13
|
+
* That is a silent-failure UI bug of the worst kind — the affordance advertises navigation that cannot
|
|
14
|
+
* happen — and it is why Marcelo hit it immediately on the modifications grid.
|
|
15
|
+
*
|
|
16
|
+
* WHY A DIRECTIVE, and why this is not a DOM hack. The wrapper exposes the inner grid publicly
|
|
17
|
+
* (`@ViewChild('innerGrid') innerGrid!: EntityDataGridComponent`), so a directive on the same host
|
|
18
|
+
* element can inject the wrapper and subscribe to the inner component's own `@Output`. We use MJ's
|
|
19
|
+
* public API and MJ's own event — we do not reach into the DOM, re-parse the `data-*` attributes, or
|
|
20
|
+
* re-implement the hit test. When the wrapper grows a real `ForeignKeyClick` output, deleting this
|
|
21
|
+
* file and binding it is a one-line change with identical behaviour.
|
|
22
|
+
*
|
|
23
|
+
* The navigation itself mirrors MJ's own canonical handler
|
|
24
|
+
* (`grid-view-renderer.component.ts` → `onForeignKeyClick`): prefer the event's `relatedEntityName`,
|
|
25
|
+
* else resolve the name from `relatedEntityId` through metadata.
|
|
26
|
+
*
|
|
27
|
+
* FILED: see `plans/WORKAROUNDS.md` — this belongs upstream, as an output on the wrapper.
|
|
28
|
+
*
|
|
29
|
+
* @module @mj-biz-apps/contracts-ng
|
|
30
|
+
*/
|
|
31
|
+
import { Directive, inject } from '@angular/core';
|
|
32
|
+
import { CompositeKey } from '@memberjunction/core';
|
|
33
|
+
import { ExplorerEntityDataGridComponent } from '@memberjunction/ng-base-forms';
|
|
34
|
+
import { NavigationService } from '@memberjunction/ng-shared';
|
|
35
|
+
import { AmbientMetadata } from '../data/provider';
|
|
36
|
+
import * as i0 from "@angular/core";
|
|
37
|
+
export class MJCFkNavigateDirective {
|
|
38
|
+
grid = inject(ExplorerEntityDataGridComponent, { host: true });
|
|
39
|
+
navigation = inject(NavigationService);
|
|
40
|
+
/**
|
|
41
|
+
* Typed structurally rather than as an rxjs `Subscription`: this package does not declare rxjs as a
|
|
42
|
+
* dependency (Angular brings it transitively), and importing a type from an undeclared package is
|
|
43
|
+
* how a build breaks the first time the hoisting changes. `unsubscribe()` is all we use.
|
|
44
|
+
*/
|
|
45
|
+
sub = null;
|
|
46
|
+
/**
|
|
47
|
+
* Subscribe after the view exists, because `innerGrid` is a `@ViewChild` on the wrapper and is
|
|
48
|
+
* undefined until then. One retry on a microtask covers the case where the wrapper's own
|
|
49
|
+
* `AfterViewInit` has not yet run — directive and component hook order on the same host is not
|
|
50
|
+
* something to rely on.
|
|
51
|
+
*/
|
|
52
|
+
ngAfterViewInit() {
|
|
53
|
+
if (this.subscribe())
|
|
54
|
+
return;
|
|
55
|
+
void Promise.resolve().then(() => this.subscribe());
|
|
56
|
+
}
|
|
57
|
+
subscribe() {
|
|
58
|
+
if (this.sub)
|
|
59
|
+
return true;
|
|
60
|
+
const inner = this.grid?.innerGrid;
|
|
61
|
+
if (!inner?.ForeignKeyClick)
|
|
62
|
+
return false;
|
|
63
|
+
this.sub = inner.ForeignKeyClick.subscribe((e) => this.open(e));
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Open the related record.
|
|
68
|
+
*
|
|
69
|
+
* The FK event carries a bare value, not a key, so the primary-key FIELD NAME comes from the
|
|
70
|
+
* related entity's metadata rather than being assumed to be `ID`. It is `ID` for every entity in
|
|
71
|
+
* this app, but assuming it would break the first time this directive met a natural-key entity —
|
|
72
|
+
* and it would break as a wrong-record navigation, not an error.
|
|
73
|
+
*/
|
|
74
|
+
open(e) {
|
|
75
|
+
if (!e?.recordId)
|
|
76
|
+
return;
|
|
77
|
+
const md = AmbientMetadata();
|
|
78
|
+
const entity = (e.relatedEntityName ? md.Entities.find((x) => x.Name === e.relatedEntityName) : undefined) ??
|
|
79
|
+
md.Entities.find((x) => x.ID === e.relatedEntityId);
|
|
80
|
+
if (!entity)
|
|
81
|
+
return;
|
|
82
|
+
const pkField = entity.PrimaryKeys?.[0]?.Name ?? 'ID';
|
|
83
|
+
this.navigation.OpenEntityRecord(entity.Name, CompositeKey.FromKeyValuePair(pkField, e.recordId));
|
|
84
|
+
}
|
|
85
|
+
ngOnDestroy() {
|
|
86
|
+
this.sub?.unsubscribe();
|
|
87
|
+
this.sub = null;
|
|
88
|
+
}
|
|
89
|
+
static ɵfac = function MJCFkNavigateDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJCFkNavigateDirective)(); };
|
|
90
|
+
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: MJCFkNavigateDirective, selectors: [["", "mjcFkNavigate", ""]] });
|
|
91
|
+
}
|
|
92
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJCFkNavigateDirective, [{
|
|
93
|
+
type: Directive,
|
|
94
|
+
args: [{
|
|
95
|
+
selector: '[mjcFkNavigate]',
|
|
96
|
+
standalone: true,
|
|
97
|
+
}]
|
|
98
|
+
}], null, null); })();
|
|
99
|
+
//# sourceMappingURL=fk-navigate.directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fk-navigate.directive.js","sourceRoot":"","sources":["../../../src/lib/directives/fk-navigate.directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAiB,SAAS,EAAa,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;;AAMnD,MAAM,OAAO,sBAAsB;IACd,IAAI,GAAG,MAAM,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/D,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACxD;;;;OAIG;IACK,GAAG,GAAmC,IAAI,CAAC;IAEnD;;;;;OAKG;IACI,eAAe;QAClB,IAAI,IAAI,CAAC,SAAS,EAAE;YAAE,OAAO;QAC7B,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACxD,CAAC;IAEO,SAAS;QACb,IAAI,IAAI,CAAC,GAAG;YAAE,OAAO,IAAI,CAAC;QAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;QACnC,IAAI,CAAC,KAAK,EAAE,eAAe;YAAE,OAAO,KAAK,CAAC;QAC1C,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACK,IAAI,CAAC,CAA4E;QACrF,IAAI,CAAC,CAAC,EAAE,QAAQ;YAAE,OAAO;QACzB,MAAM,EAAE,GAAG,eAAe,EAAE,CAAC;QAC7B,MAAM,MAAM,GACR,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAC3F,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,eAAe,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,IAAI,CAAC;QACtD,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtG,CAAC;IAEM,WAAW;QACd,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,CAAC;QACxB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;IACpB,CAAC;gHApDQ,sBAAsB;6DAAtB,sBAAsB;;iFAAtB,sBAAsB;cAJlC,SAAS;eAAC;gBACP,QAAQ,EAAE,iBAAiB;gBAC3B,UAAU,EAAE,IAAI;aACnB"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { BaseFormPanel } from '@memberjunction/ng-base-forms';
|
|
2
|
+
import { type HierarchyTreeConfig, type HierarchyNodeEvent } from '@memberjunction/ng-hierarchy-tree';
|
|
3
|
+
import { ContractEntity, type ContractState } from '@mj-biz-apps/contracts-entities';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class MJCContractHeroPanel extends BaseFormPanel<ContractEntity> {
|
|
6
|
+
/**
|
|
7
|
+
* The human name for this agreement: its description, falling back to the number.
|
|
8
|
+
*
|
|
9
|
+
* The mockup's hero title is a descriptive line ("Sidecar — Learning Hub, 2-year"), not the contract
|
|
10
|
+
* number — the number is already in the meta row directly beneath, and repeating it as the headline
|
|
11
|
+
* wastes the one place a reader looks first.
|
|
12
|
+
*/
|
|
13
|
+
get Title(): string;
|
|
14
|
+
/**
|
|
15
|
+
* READ from the view's derived column. Application code does not re-derive state (Marcelo,
|
|
16
|
+
* 2026-08-19) — the view is the single authority, and `DeriveContractState()` is now for tests
|
|
17
|
+
* and the equivalence harness only.
|
|
18
|
+
*
|
|
19
|
+
* This panel used to re-derive it in the browser so the chip tracked UNSAVED date edits. That
|
|
20
|
+
* bought a live-updating chip and cost the thing worth more: a second implementation that could
|
|
21
|
+
* disagree with the view, which is exactly what happened — the two diverged on the termination
|
|
22
|
+
* boundary and no test could see it. The chip now shows what is PERSISTED, which is also the
|
|
23
|
+
* more honest claim: a state chip that reacts to an unsaved date is asserting something no
|
|
24
|
+
* query would agree with until the record is saved.
|
|
25
|
+
*
|
|
26
|
+
* A never-saved record has no column value, and `Draft` is not a guess there — it is what the
|
|
27
|
+
* view's own `ELSE` branch returns for a row with no dates, which is every new contract.
|
|
28
|
+
*/
|
|
29
|
+
get State(): ContractState;
|
|
30
|
+
get StateChipClass(): string;
|
|
31
|
+
get TypeName(): string;
|
|
32
|
+
get CustomerName(): string;
|
|
33
|
+
get CompanyName(): string;
|
|
34
|
+
get ContactName(): string;
|
|
35
|
+
get TemplateName(): string;
|
|
36
|
+
get CreatingEntityName(): string;
|
|
37
|
+
get IsAwaitingDocument(): boolean;
|
|
38
|
+
get DaysToEnd(): number | null;
|
|
39
|
+
/** "in 16 months" reads better than "in 487 days" past a couple of months — the mockup's phrasing. */
|
|
40
|
+
get EndsInText(): string;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJCContractHeroPanel, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJCContractHeroPanel, "mjc-contract-hero-panel", never, {}, {}, never, never, true, never>;
|
|
43
|
+
}
|
|
44
|
+
export declare class MJCContractRenewalPanel extends BaseFormPanel<ContractEntity> {
|
|
45
|
+
/**
|
|
46
|
+
* Write a field through the typed entity. Named `Set` rather than bound with two-way `[(ngModel)]`
|
|
47
|
+
* so the write goes through one place — a two-way binding on `Record.X` works but gives no hook for
|
|
48
|
+
* the dirty notification the form toolbar needs.
|
|
49
|
+
*/
|
|
50
|
+
Set(field: 'AutoRenew' | 'RenewalNoticeDays' | 'CancellationWindowDays' | 'AnnualIncreasePercent', value: unknown): void;
|
|
51
|
+
/** The authoritative view column — unlike State, nobody wants this tracking a half-typed edit. */
|
|
52
|
+
get NoticeDeadline(): Date | null;
|
|
53
|
+
get InCancellationWindow(): boolean;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJCContractRenewalPanel, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJCContractRenewalPanel, "mjc-contract-renewal-panel", never, {}, {}, never, never, true, never>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The four dates, with the one piece of interpretation a reader needs.
|
|
59
|
+
*
|
|
60
|
+
* Exists as a panel for the same two reasons as Renewal terms: it earns a rail entry by REPLACING a
|
|
61
|
+
* named field section (a replaced section is not "leftover", so left-nav does not fold it into
|
|
62
|
+
* Details), and it can say things the generated field list cannot — that an executed date before the
|
|
63
|
+
* effective date is normal, and that a terminated date is a fact rather than a projection.
|
|
64
|
+
*
|
|
65
|
+
* The generated form renders these as datetime inputs with a time component (`7/19/2025, 7:00:00 PM`)
|
|
66
|
+
* because the underlying columns are `date` but the default control is a datetime picker. They are
|
|
67
|
+
* calendar dates — a contract does not start at 7pm — so this panel renders them as dates.
|
|
68
|
+
*/
|
|
69
|
+
export declare class MJCContractDatesPanel extends BaseFormPanel<ContractEntity> {
|
|
70
|
+
/** `<input type="date">` needs `yyyy-MM-dd`; the entity hands back a Date or an ISO string. */
|
|
71
|
+
AsInput(v: Date | string | null | undefined): string;
|
|
72
|
+
SetDate(field: 'ExecutedDate' | 'EffectiveDate' | 'EndDate' | 'TerminatedDate', value: string): void;
|
|
73
|
+
get EndsInText(): string;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJCContractDatesPanel, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJCContractDatesPanel, "mjc-contract-dates-panel", never, {}, {}, never, never, true, never>;
|
|
76
|
+
}
|
|
77
|
+
export declare class MJCContractLineagePanel extends BaseFormPanel<ContractEntity> {
|
|
78
|
+
private readonly cdr;
|
|
79
|
+
private readonly navigation;
|
|
80
|
+
/**
|
|
81
|
+
* The whole tree, declared rather than fetched.
|
|
82
|
+
*
|
|
83
|
+
* `ParentContractID` is an ordinary self-referential hierarchy, so MJ's tree does the recursive
|
|
84
|
+
* read, the expand/collapse state, the search box and — the part that matters — turns each node
|
|
85
|
+
* into something you can OPEN. The hand-rolled table this replaces could show a change order's
|
|
86
|
+
* number but gave no way to get to it, which is most of what a person wants from a lineage panel.
|
|
87
|
+
*
|
|
88
|
+
* NO `ExtraFilter`, deliberately — the component does the scoping better than a filter could. Given
|
|
89
|
+
* the whole entity plus `ActiveRecordID`, it focuses this contract's subtree on its own (the header
|
|
90
|
+
* reads "Focusing subtree: CTR-…") and offers "View Full Hierarchy" to widen. A filter rooted at
|
|
91
|
+
* the current record would hard-hide the parent a change order needs to show ABOVE it, with no way
|
|
92
|
+
* back out. Ordering is by contract number so siblings read in the order they were issued.
|
|
93
|
+
*/
|
|
94
|
+
get TreeConfig(): HierarchyTreeConfig;
|
|
95
|
+
/** Whether anything hangs beneath this contract — drives the empty state, nothing else. */
|
|
96
|
+
HasChildren: boolean;
|
|
97
|
+
private loadStarted;
|
|
98
|
+
/**
|
|
99
|
+
* Open the contract a node stands for.
|
|
100
|
+
*
|
|
101
|
+
* The node carries a real `CompositeKey`, so this does not have to guess that the primary key is
|
|
102
|
+
* called `ID` — the same reasoning as `MJCFkNavigateDirective`, which would break on the first
|
|
103
|
+
* natural-key entity it met, and would break as a WRONG-RECORD navigation rather than an error.
|
|
104
|
+
*/
|
|
105
|
+
OpenNode(e: HierarchyNodeEvent): void;
|
|
106
|
+
get ParentName(): string;
|
|
107
|
+
get Count(): number | undefined;
|
|
108
|
+
/** Direct children, for the badge. The TREE renders the hierarchy; this is just the count. */
|
|
109
|
+
ChildCount: number;
|
|
110
|
+
/**
|
|
111
|
+
* Read the children ONCE, lazily on first template read.
|
|
112
|
+
*
|
|
113
|
+
* `BaseFormPanel` has no lifecycle hook of its own and the slot host sets `Record` before view init,
|
|
114
|
+
* so the first template read is the earliest reliable moment. Read as a table rather than an
|
|
115
|
+
* embedded grid: a grid inside a panel inside a rail section is three nested scroll contexts, and
|
|
116
|
+
* the mockup renders four columns of read-only facts, which is a table.
|
|
117
|
+
*/
|
|
118
|
+
private ensureLoaded;
|
|
119
|
+
private load;
|
|
120
|
+
private scopedRunView;
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJCContractLineagePanel, never>;
|
|
122
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJCContractLineagePanel, "mjc-contract-lineage-panel", never, {}, {}, never, never, true, never>;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=contract.panels.d.ts.map
|