@memberjunction/ng-base-forms 6.1.4 → 6.2.0-edge.1
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/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +43 -40
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/base-form-section-info.js +5 -5
- package/dist/lib/base-form-section-info.js.map +1 -1
- package/dist/lib/chrome/resolve-form-chrome.d.ts.map +1 -1
- package/dist/lib/chrome/resolve-form-chrome.js +22 -12
- package/dist/lib/chrome/resolve-form-chrome.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts +24 -13
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +233 -182
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/explorer-entity-data-grid.component.d.ts +32 -2
- package/dist/lib/explorer-entity-data-grid.component.d.ts.map +1 -1
- package/dist/lib/explorer-entity-data-grid.component.js +54 -13
- package/dist/lib/explorer-entity-data-grid.component.js.map +1 -1
- package/dist/lib/field/default-fk-lookup-strategy.d.ts +60 -0
- package/dist/lib/field/default-fk-lookup-strategy.d.ts.map +1 -0
- package/dist/lib/field/default-fk-lookup-strategy.js +173 -0
- package/dist/lib/field/default-fk-lookup-strategy.js.map +1 -0
- package/dist/lib/field/fk-lookup-strategy.d.ts +124 -0
- package/dist/lib/field/fk-lookup-strategy.d.ts.map +1 -0
- package/dist/lib/field/fk-lookup-strategy.js +97 -0
- package/dist/lib/field/fk-lookup-strategy.js.map +1 -0
- package/dist/lib/field/fk-search-utils.d.ts +33 -2
- package/dist/lib/field/fk-search-utils.d.ts.map +1 -1
- package/dist/lib/field/fk-search-utils.js +56 -3
- package/dist/lib/field/fk-search-utils.js.map +1 -1
- package/dist/lib/field/form-field.component.d.ts +166 -11
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +742 -338
- package/dist/lib/field/form-field.component.js.map +1 -1
- package/dist/lib/field/linked-field-options.d.ts +16 -0
- package/dist/lib/field/linked-field-options.d.ts.map +1 -1
- package/dist/lib/field/linked-field-options.js +17 -0
- package/dist/lib/field/linked-field-options.js.map +1 -1
- package/dist/lib/form-state.service.d.ts +58 -0
- package/dist/lib/form-state.service.d.ts.map +1 -1
- package/dist/lib/form-state.service.js +156 -40
- package/dist/lib/form-state.service.js.map +1 -1
- package/dist/lib/host/entity-form-host.component.d.ts +10 -2
- package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
- package/dist/lib/host/entity-form-host.component.js +24 -8
- package/dist/lib/host/entity-form-host.component.js.map +1 -1
- package/dist/lib/interactive-form/interactive-form.component.d.ts +16 -4
- package/dist/lib/interactive-form/interactive-form.component.d.ts.map +1 -1
- package/dist/lib/interactive-form/interactive-form.component.js +38 -12
- package/dist/lib/interactive-form/interactive-form.component.js.map +1 -1
- package/dist/lib/isa-related-panel/isa-related-card.component.d.ts +3 -3
- package/dist/lib/isa-related-panel/isa-related-card.component.d.ts.map +1 -1
- package/dist/lib/isa-related-panel/isa-related-card.component.js +12 -8
- package/dist/lib/isa-related-panel/isa-related-card.component.js.map +1 -1
- package/dist/lib/isa-related-panel/isa-related-panel.component.d.ts +3 -3
- package/dist/lib/isa-related-panel/isa-related-panel.component.d.ts.map +1 -1
- package/dist/lib/isa-related-panel/isa-related-panel.component.js +24 -7
- package/dist/lib/isa-related-panel/isa-related-panel.component.js.map +1 -1
- package/dist/lib/overlays/form-slide-in.component.d.ts +2 -0
- package/dist/lib/overlays/form-slide-in.component.d.ts.map +1 -1
- package/dist/lib/overlays/form-slide-in.component.js +5 -1
- package/dist/lib/overlays/form-slide-in.component.js.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts +72 -9
- package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.js +185 -43
- package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
- package/dist/lib/panel-slot/base-form-panel.d.ts +2 -0
- package/dist/lib/panel-slot/base-form-panel.d.ts.map +1 -1
- package/dist/lib/panel-slot/base-form-panel.js +5 -1
- package/dist/lib/panel-slot/base-form-panel.js.map +1 -1
- package/dist/lib/panel-slot/form-contribution.d.ts +12 -0
- package/dist/lib/panel-slot/form-contribution.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-contribution.js +43 -10
- package/dist/lib/panel-slot/form-contribution.js.map +1 -1
- package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts +10 -0
- package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-slot-coordinator.service.js +25 -5
- package/dist/lib/panel-slot/form-slot-coordinator.service.js.map +1 -1
- package/dist/lib/panel-slot/related-entity-grid-panel.component.d.ts +2 -0
- package/dist/lib/panel-slot/related-entity-grid-panel.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/related-entity-grid-panel.component.js +5 -1
- package/dist/lib/panel-slot/related-entity-grid-panel.component.js.map +1 -1
- package/dist/lib/section-indicators/form-section-field-host.d.ts +53 -0
- package/dist/lib/section-indicators/form-section-field-host.d.ts.map +1 -0
- package/dist/lib/section-indicators/form-section-field-host.js +23 -0
- package/dist/lib/section-indicators/form-section-field-host.js.map +1 -0
- package/dist/lib/section-loader-component.d.ts +5 -1
- package/dist/lib/section-loader-component.d.ts.map +1 -1
- package/dist/lib/section-loader-component.js +13 -5
- package/dist/lib/section-loader-component.js.map +1 -1
- package/dist/lib/section-manager/section-manager.component.d.ts +2 -2
- package/dist/lib/section-manager/section-manager.component.js +6 -6
- package/dist/lib/section-manager/section-manager.component.js.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.d.ts +5 -5
- package/dist/lib/toolbar/form-toolbar.component.js +22 -22
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/form-types.d.ts +2 -0
- package/dist/lib/types/form-types.d.ts.map +1 -1
- package/dist/lib/types/form-types.js +5 -1
- package/dist/lib/types/form-types.js.map +1 -1
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +18 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-slide-in.component.js","sourceRoot":"","sources":["../../../src/lib/overlays/form-slide-in.component.ts","../../../src/lib/overlays/form-slide-in.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;;;;;IC2B1D,AADF,8BAAqC,gBAC4C;IAAxB,0LAAS,oBAAa,KAAC;IAAC,YAAoB;IAAA,iBAAS;IAC5G,iCAA0D;IAArB,0LAAS,iBAAU,KAAC;IAAC,YAAsB;IAClF,AADkF,iBAAS,EACrF;;;IAF+B,cAAmB;IAAnB,wCAAmB;IAAyB,cAAoB;IAApB,2CAAoB;IAClF,cAAmB;IAAnB,wCAAmB;IAAsB,cAAsB;IAAtB,6CAAsB;;AD1BxF;;;;;;;;;;;;;;;;;GAiBG;AAQH,MAAM,OAAO,sBAAuB,SAAQ,eAAe;IACzD,+EAA+E;IACtE,OAAO,GAAG,GAAG,CAAC;IACvB,2CAA2C;IAClC,SAAS,GAAG,IAAI,CAAC;IAE1B,4EAA4E;IAC5E,IAAuB,YAAY,KAAK,OAAO,mBAAmB,CAAC,CAAC,CAAC;IAErE,mEAAmE;IAC3D,WAAW,GAAkB,IAAI,CAAC;IAE1C,QAAQ;QACN,uEAAuE;QACvE,6DAA6D;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,IAAI,IAAI,CAAC;QAC5E,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YAClF,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3C,IAAI,EAAE,GAAG,CAAC;gBAAE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAChC,CAAC;IACH,CAAC;IAED,qFAAqF;IACrF,cAAc,CAAC,KAAa;QAC1B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,cAAc,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9F,CAAC;IACH,CAAC;IAEO,QAAQ,CAAC,MAAc;QAC7B,OAAO,wBAAwB,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;IACxD,CAAC;
|
|
1
|
+
{"version":3,"file":"form-slide-in.component.js","sourceRoot":"","sources":["../../../src/lib/overlays/form-slide-in.component.ts","../../../src/lib/overlays/form-slide-in.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CA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Y,EAAE,eAAe,gCAAE,qBAAqB,EAAE,iBAAiB;;iFAItE,sBAAsB;cAPlC,SAAS;6BACI,IAAI,YACN,kBAAkB,WACnB,CAAC,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,CAAC;;kBAMjF,KAAK;;kBAEL,KAAK;;kFAJK,sBAAsB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MjSlidePanelComponent, MJButtonDirective } from '@memberjunction/ng-ui-components';\nimport { UserInfoEngine } from '@memberjunction/core-entities';\n\nimport { BaseFormsModule } from '../../module';\nimport { BaseFormOverlay } from './base-form-overlay';\nimport { SLIDEIN_FORM_CONFIG } from '../types/entity-form-config';\n\n/**\n * Opens any MemberJunction entity form inside a right-edge slide-in panel.\n *\n * Wraps {@link MjEntityFormHostComponent} in `<mj-slide-panel>` (resizable) with\n * a sticky Save/Cancel footer. Defaults to {@link SLIDEIN_FORM_CONFIG} (no in-form\n * toolbar, related grids hidden, full-width body, in-form links inert).\n *\n * Standalone — import it directly:\n * ```typescript\n * import { MjFormSlideInComponent } from '@memberjunction/ng-base-forms';\n * ```\n *\n * @example Declarative\n * ```html\n * <mj-form-slide-in [EntityName]=\"'MJ: Credentials'\" [Record]=\"cred\"\n * [(Visible)]=\"open\" (Saved)=\"refresh()\"></mj-form-slide-in>\n * ```\n */\n@Component({\n standalone: true,\n selector: 'mj-form-slide-in',\n imports: [CommonModule, BaseFormsModule, MjSlidePanelComponent, MJButtonDirective],\n templateUrl: './form-slide-in.component.html',\n styleUrls: ['./form-slide-in.component.css'],\n})\nexport class MjFormSlideInComponent extends BaseFormOverlay implements OnInit {\n /** Initial panel width in px (resizable by the user; persisted per-entity). */\n @Input() WidthPx = 720;\n /** Whether the panel is user-resizable. */\n @Input() Resizable = true;\n\n /** Form config. Defaults to the slide-in preset; consumers can override. */\n protected override get PresetConfig() { return SLIDEIN_FORM_CONFIG; }\n\n /** Entity used to scope the persisted width (resolved on init). */\n private widthEntity: string | null = null;\n\n ngOnInit(): void {\n // Resolve the entity up-front so we can restore the user's saved width\n // before the panel animates in (avoids a mid-render resize).\n this.widthEntity = this.EntityName ?? this.Record?.EntityInfo?.Name ?? null;\n if (this.widthEntity) {\n const saved = UserInfoEngine.Instance.GetSetting(this.widthKey(this.widthEntity));\n const px = saved ? parseInt(saved, 10) : 0;\n if (px > 0) this.WidthPx = px;\n }\n }\n\n /** Persist the user's resize, scoped per-entity (cross-device via User Settings). */\n OnWidthChanged(width: number): void {\n this.WidthPx = width;\n if (this.widthEntity) {\n UserInfoEngine.Instance.SetSettingDebounced(this.widthKey(this.widthEntity), String(width));\n }\n }\n\n /** @deprecated Use {@link OnWidthChanged}. */\n onWidthChanged(width: number): void {\n return this.OnWidthChanged(width);\n }\n\n private widthKey(entity: string): string {\n return `mj.formSlideIn.width.${entity.toLowerCase()}`;\n }\n}\n","<mj-slide-panel\n Mode=\"slide\"\n [Visible]=\"Visible\"\n [Title]=\"effectiveTitle\"\n [Resizable]=\"Resizable\"\n [WidthPx]=\"WidthPx\"\n (WidthChanged)=\"onWidthChanged($event)\"\n (Closed)=\"onCancel()\">\n\n <div class=\"mj-form-slide-in-layout\">\n <div class=\"mj-form-slide-in-body\">\n <mj-entity-form-host #host\n [EntityName]=\"EntityName\"\n [PrimaryKey]=\"effectivePrimaryKey!\"\n [Record]=\"Record\"\n [NewRecordValues]=\"NewRecordValues\"\n [SectionName]=\"SectionName\"\n [EditMode]=\"EditMode\"\n [Config]=\"EffectiveConfig\"\n [Provider]=\"Provider\"\n (Saved)=\"onHostSaved($event)\"\n (Dismissed)=\"onHostDismissed()\"\n (FormCreated)=\"onFormCreated($event)\"\n (Navigate)=\"Navigate.emit($event)\"\n (Notification)=\"Notification.emit($event)\"\n (RecordDeleted)=\"RecordDeleted.emit($event)\"\n (RecordSaveFailed)=\"RecordSaveFailed.emit($event)\"\n (ValidationFailed)=\"ValidationFailed.emit($event)\"\n (LoadError)=\"LoadError.emit($event)\">\n </mj-entity-form-host>\n </div>\n\n @if (ShowFooter) {\n <div class=\"mj-form-slide-in-footer\">\n <button mjButton variant=\"primary\" [disabled]=\"saving\" (click)=\"onSaveClick()\">{{ SaveButtonText }}</button>\n <button mjButton [disabled]=\"saving\" (click)=\"onCancel()\">{{ CancelButtonText }}</button>\n </div>\n }\n </div>\n</mj-slide-panel>\n"]}
|
|
@@ -4,6 +4,7 @@ import { FormNavigationEvent } from '../types/navigation-events';
|
|
|
4
4
|
import { MjFormFieldComponent } from '../field/form-field.component';
|
|
5
5
|
import { CompositeKey } from '@memberjunction/core';
|
|
6
6
|
import { type FormSectionIndicatorSource } from '../section-indicators/form-section-indicator-coordinator.service';
|
|
7
|
+
import { type FormSectionFieldHost } from '../section-indicators/form-section-field-host';
|
|
7
8
|
import { type FormSectionIndicators, type ParsedValidationSource } from '../section-indicators/form-section-indicators';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
@@ -21,10 +22,21 @@ import * as i0 from "@angular/core";
|
|
|
21
22
|
* - Inheritable "Inherited from X" badge with navigation event
|
|
22
23
|
* - Row count badge for related entity sections
|
|
23
24
|
* - Section indicators: an unsaved-changes dot and an invalid-field count derived
|
|
24
|
-
* live from the
|
|
25
|
+
* live from the section's `mj-form-field`s (plus anything a custom section
|
|
25
26
|
* supplies through `[Indicators]`), published to the form's chrome rail
|
|
26
27
|
* through {@link FormSectionIndicatorCoordinator}
|
|
27
28
|
*
|
|
29
|
+
* **Which fields belong to the section.** Two sources, unioned: the `@ContentChildren`
|
|
30
|
+
* query over projected content, and fields that registered themselves through
|
|
31
|
+
* {@link FORM_SECTION_FIELD_HOST}, which this panel provides. The content query
|
|
32
|
+
* cannot see a field declared inside a child component's own template (a widget
|
|
33
|
+
* projected into the panel), and a section that saw none of its fields reported no
|
|
34
|
+
* required-and-empty count, claimed none of the failed save's field errors, and so
|
|
35
|
+
* never badged on the rail. The injector follows the element tree across view
|
|
36
|
+
* boundaries, so the registered set covers exactly those fields. A registered field
|
|
37
|
+
* counts only while its element is physically inside this panel, which keeps a field
|
|
38
|
+
* created in an overlay that happened to inherit this injector from being counted.
|
|
39
|
+
*
|
|
28
40
|
* @example
|
|
29
41
|
* ```html
|
|
30
42
|
* <mj-collapsible-panel
|
|
@@ -40,7 +52,7 @@ import * as i0 from "@angular/core";
|
|
|
40
52
|
* </mj-collapsible-panel>
|
|
41
53
|
* ```
|
|
42
54
|
*/
|
|
43
|
-
export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, AfterContentInit, AfterViewInit, OnDestroy, FormSectionIndicatorSource {
|
|
55
|
+
export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, AfterContentInit, AfterViewInit, OnDestroy, FormSectionIndicatorSource, FormSectionFieldHost {
|
|
44
56
|
private cdr;
|
|
45
57
|
private elementRef;
|
|
46
58
|
private ngZone;
|
|
@@ -124,6 +136,28 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
124
136
|
PanelDrop: EventEmitter<PanelDropEvent>;
|
|
125
137
|
Navigate: EventEmitter<FormNavigationEvent>;
|
|
126
138
|
FieldComponents: QueryList<MjFormFieldComponent>;
|
|
139
|
+
/**
|
|
140
|
+
* Fields that found this panel through {@link FORM_SECTION_FIELD_HOST} — those the content
|
|
141
|
+
* query cannot see because a component view sits between them and the panel. Keyed by
|
|
142
|
+
* instance; the value is the edit subscription that keeps the rail live for that field.
|
|
143
|
+
*/
|
|
144
|
+
private readonly hostedFields;
|
|
145
|
+
/**
|
|
146
|
+
* Bumped whenever the hosted set changes or a hosted field reports an input change. Every
|
|
147
|
+
* reader of the field set touches it, so the views that read this section (its own host
|
|
148
|
+
* bindings, the rail) become dependents Angular re-runs before its no-changes check when a
|
|
149
|
+
* hosted field — refreshed AFTER those views in the same pass — changes underneath them. See
|
|
150
|
+
* {@link FormSectionFieldHost.NotifyFieldChanged}.
|
|
151
|
+
*/
|
|
152
|
+
private readonly hostedFieldsVersion;
|
|
153
|
+
/**
|
|
154
|
+
* Memo behind {@link allFields}. Every real `mj-form-field` reaches this panel through the
|
|
155
|
+
* injector — projected ones included — so the hosted set is the section's whole field list, and
|
|
156
|
+
* the union is read several times per change-detection pass (three host bindings, the header,
|
|
157
|
+
* hide-when-empty, the rail). Recomputed only when the hosted set or a hosted field's inputs
|
|
158
|
+
* change (the signal) or the content query is replaced or resized.
|
|
159
|
+
*/
|
|
160
|
+
private fieldsMemo;
|
|
127
161
|
DisplayName: string;
|
|
128
162
|
FieldNames: string;
|
|
129
163
|
IsVisible: boolean;
|
|
@@ -168,6 +202,28 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
168
202
|
get Collapsible(): boolean;
|
|
169
203
|
/** Whether the panel is expanded (delegates to form state; always true when not collapsible) */
|
|
170
204
|
get Expanded(): boolean;
|
|
205
|
+
/** {@link FormSectionFieldHost} — a field rendered inside this section, at any view depth. */
|
|
206
|
+
RegisterField(field: MjFormFieldComponent): void;
|
|
207
|
+
/** {@link FormSectionFieldHost} */
|
|
208
|
+
UnregisterField(field: MjFormFieldComponent): void;
|
|
209
|
+
/** {@link FormSectionFieldHost} */
|
|
210
|
+
NotifyFieldChanged(field: MjFormFieldComponent): void;
|
|
211
|
+
private onFieldSetChanged;
|
|
212
|
+
/**
|
|
213
|
+
* Searchable display names of every field, read live rather than from the {@link FieldNames}
|
|
214
|
+
* cache — only needed once a hosted field exists, because its name lands after registration
|
|
215
|
+
* (see {@link refreshFieldNames}).
|
|
216
|
+
*/
|
|
217
|
+
private liveFieldNames;
|
|
218
|
+
/**
|
|
219
|
+
* Every `mj-form-field` this section fronts: the projected ones the content query found, plus
|
|
220
|
+
* the injector-registered ones that have bound their inputs and whose element is inside this
|
|
221
|
+
* panel. Unbound fields are left out because a field with no inputs reports itself hidden and
|
|
222
|
+
* not required-and-empty, which is not information about the section. The containment check
|
|
223
|
+
* is what stops a field created in an overlay, with this panel's injector as its ancestor, from
|
|
224
|
+
* counting against a section it is not displayed in. Memoized — see {@link fieldsMemo}.
|
|
225
|
+
*/
|
|
226
|
+
private allFields;
|
|
171
227
|
/**
|
|
172
228
|
* Live state of this section: fields edited since the last save, fields that are
|
|
173
229
|
* invalid or required-and-empty, and fields carrying warnings. Derived from the
|
|
@@ -227,7 +283,7 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
227
283
|
OnDrop(event: DragEvent): void;
|
|
228
284
|
OnDragStart(event: DragEvent): void;
|
|
229
285
|
OnDragEnd(): void;
|
|
230
|
-
private
|
|
286
|
+
private reorderSections;
|
|
231
287
|
/**
|
|
232
288
|
* Field panels whose only children are empty/hidden (e.g. leftover
|
|
233
289
|
* `Details` with just unused geo columns) should not take space.
|
|
@@ -241,23 +297,30 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
241
297
|
MatchesSearch(term: string): boolean;
|
|
242
298
|
private hasRenderableContent;
|
|
243
299
|
private isHiddenByChrome;
|
|
244
|
-
private
|
|
300
|
+
private updateFieldNames;
|
|
301
|
+
/**
|
|
302
|
+
* Rebuild the searchable field-name string from the current field set. Rebuilt on structural
|
|
303
|
+
* changes only; a hosted field's DisplayName is bound after it registers (its inputs land on its
|
|
304
|
+
* own view's first pass), so search also reads names live through {@link liveFieldNames}
|
|
305
|
+
* rather than relying on this cache alone.
|
|
306
|
+
*/
|
|
307
|
+
private refreshFieldNames;
|
|
245
308
|
/**
|
|
246
309
|
* Subscribes to Navigate events from all child form-field components
|
|
247
310
|
* and relays them through this panel's Navigate output. Also listens for
|
|
248
311
|
* value edits so the section indicators (and the rail reading them) refresh
|
|
249
312
|
* on the same tick as the keystroke rather than on the container's next poll.
|
|
250
313
|
*/
|
|
251
|
-
private
|
|
314
|
+
private subscribeToFieldNavigateEvents;
|
|
252
315
|
/**
|
|
253
316
|
* Sets up a ResizeObserver on the panel content div for related-entity panels.
|
|
254
317
|
* When the user drags the CSS resize handle, we persist the new height.
|
|
255
318
|
*/
|
|
256
|
-
private
|
|
319
|
+
private setupResizeObserver;
|
|
257
320
|
/**
|
|
258
321
|
* Debounces height persistence so we don't write to DB on every resize frame.
|
|
259
322
|
*/
|
|
260
|
-
private
|
|
323
|
+
private debouncePersistHeight;
|
|
261
324
|
/**
|
|
262
325
|
* True when this panel projects form fields and field-level security denies the user EVERY one
|
|
263
326
|
* of them.
|
|
@@ -267,8 +330,8 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
267
330
|
* sections field security has nothing to say about. "No fields" and "no readable fields" are
|
|
268
331
|
* different states and only the second one should hide the section.
|
|
269
332
|
*/
|
|
270
|
-
private get
|
|
271
|
-
private
|
|
333
|
+
private get allProjectedFieldsDenied();
|
|
334
|
+
private updateVisibilityAndHighlighting;
|
|
272
335
|
static ɵfac: i0.ɵɵFactoryDeclaration<MjCollapsiblePanelComponent, never>;
|
|
273
336
|
static ɵcmp: i0.ɵɵComponentDeclaration<MjCollapsiblePanelComponent, "mj-collapsible-panel", never, { "SectionKey": { "alias": "SectionKey"; "required": false; }; "Indicators": { "alias": "Indicators"; "required": false; }; "ValidationSources": { "alias": "ValidationSources"; "required": false; }; "SectionName": { "alias": "SectionName"; "required": false; }; "Icon": { "alias": "Icon"; "required": false; }; "Form": { "alias": "Form"; "required": false; }; "FormContext": { "alias": "FormContext"; "required": false; }; "Variant": { "alias": "Variant"; "required": false; }; "BadgeCount": { "alias": "BadgeCount"; "required": false; }; "DefaultExpanded": { "alias": "DefaultExpanded"; "required": false; }; "InheritedFromEntity": { "alias": "InheritedFromEntity"; "required": false; }; "InheritedRecordPrimaryKey": { "alias": "InheritedRecordPrimaryKey"; "required": false; }; "Hidden": { "alias": "Hidden"; "required": false; }; "_deprecatedSectionKey": { "alias": "sectionKey"; "required": false; }; "_deprecatedSectionName": { "alias": "sectionName"; "required": false; }; "_deprecatedIcon": { "alias": "icon"; "required": false; }; "_deprecatedForm": { "alias": "form"; "required": false; }; "_deprecatedFormContext": { "alias": "formContext"; "required": false; }; }, { "DragStarted": "DragStarted"; "DragEnded": "DragEnded"; "PanelDrop": "PanelDrop"; "Navigate": "Navigate"; }, ["FieldComponents"], ["*"], false, never>;
|
|
274
337
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/panel/collapsible-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAEtC,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAC3D,SAAS,EAE3B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EAAmC,KAAK,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AACpJ,OAAO,EAQL,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAE5B,MAAM,+CAA+C,CAAC;;AAEvD
|
|
1
|
+
{"version":3,"file":"collapsible-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/panel/collapsible-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAEtC,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAC3D,SAAS,EAE3B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,YAAY,E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