@memberjunction/ng-base-forms 6.2.0-edge.2 → 6.2.0-edge.3
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/apply/form-placement-dialog.component.d.ts +266 -0
- package/dist/lib/apply/form-placement-dialog.component.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-dialog.component.js +1522 -0
- package/dist/lib/apply/form-placement-dialog.component.js.map +1 -0
- package/dist/lib/apply/form-placement-order.d.ts +37 -0
- package/dist/lib/apply/form-placement-order.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-order.js +111 -0
- package/dist/lib/apply/form-placement-order.js.map +1 -0
- package/dist/lib/apply/form-placement-preview.component.d.ts +112 -0
- package/dist/lib/apply/form-placement-preview.component.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-preview.component.js +346 -0
- package/dist/lib/apply/form-placement-preview.component.js.map +1 -0
- package/dist/lib/apply/form-placement-text.d.ts +61 -0
- package/dist/lib/apply/form-placement-text.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-text.js +279 -0
- package/dist/lib/apply/form-placement-text.js.map +1 -0
- package/dist/lib/apply/form-placement.d.ts +320 -0
- package/dist/lib/apply/form-placement.d.ts.map +1 -0
- package/dist/lib/apply/form-placement.js +432 -0
- package/dist/lib/apply/form-placement.js.map +1 -0
- package/dist/lib/apply/form-slot-probe.service.d.ts +121 -0
- package/dist/lib/apply/form-slot-probe.service.d.ts.map +1 -0
- package/dist/lib/apply/form-slot-probe.service.js +264 -0
- package/dist/lib/apply/form-slot-probe.service.js.map +1 -0
- package/dist/lib/base-form-component-internals.d.ts +11 -0
- package/dist/lib/base-form-component-internals.d.ts.map +1 -0
- package/dist/lib/base-form-component-internals.js +33 -0
- package/dist/lib/base-form-component-internals.js.map +1 -0
- package/dist/lib/base-form-component.d.ts +132 -1
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +228 -19
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/chrome/form-chrome.d.ts +78 -0
- package/dist/lib/chrome/form-chrome.d.ts.map +1 -1
- package/dist/lib/chrome/form-chrome.js +128 -2
- package/dist/lib/chrome/form-chrome.js.map +1 -1
- package/dist/lib/chrome/form-composition-registry.d.ts +34 -0
- package/dist/lib/chrome/form-composition-registry.d.ts.map +1 -0
- package/dist/lib/chrome/form-composition-registry.js +56 -0
- package/dist/lib/chrome/form-composition-registry.js.map +1 -0
- package/dist/lib/chrome/form-composition-snapshot.d.ts +151 -0
- package/dist/lib/chrome/form-composition-snapshot.d.ts.map +1 -0
- package/dist/lib/chrome/form-composition-snapshot.js +137 -0
- package/dist/lib/chrome/form-composition-snapshot.js.map +1 -0
- package/dist/lib/chrome/resolve-form-chrome.d.ts +15 -0
- package/dist/lib/chrome/resolve-form-chrome.d.ts.map +1 -1
- package/dist/lib/chrome/resolve-form-chrome.js +31 -2
- package/dist/lib/chrome/resolve-form-chrome.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts +240 -5
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +976 -249
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/field/form-field.component.d.ts +17 -0
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +41 -5
- package/dist/lib/field/form-field.component.js.map +1 -1
- package/dist/lib/form-state.service.d.ts +5 -0
- package/dist/lib/form-state.service.d.ts.map +1 -1
- package/dist/lib/form-state.service.js +6 -1
- package/dist/lib/form-state.service.js.map +1 -1
- package/dist/lib/host/entity-form-host.component.d.ts +16 -1
- package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
- package/dist/lib/host/entity-form-host.component.js +27 -6
- package/dist/lib/host/entity-form-host.component.js.map +1 -1
- package/dist/lib/interactive-form/form-panel-host-props.builder.d.ts +24 -0
- package/dist/lib/interactive-form/form-panel-host-props.builder.d.ts.map +1 -0
- package/dist/lib/interactive-form/form-panel-host-props.builder.js +99 -0
- package/dist/lib/interactive-form/form-panel-host-props.builder.js.map +1 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.d.ts +109 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.d.ts.map +1 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.js +424 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.js.map +1 -0
- package/dist/lib/interactive-form/interactive-form.component.d.ts +2 -0
- package/dist/lib/interactive-form/interactive-form.component.d.ts.map +1 -1
- package/dist/lib/interactive-form/interactive-form.component.js +4 -5
- package/dist/lib/interactive-form/interactive-form.component.js.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts +69 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.js +148 -12
- package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
- package/dist/lib/panel-manager/form-audience.d.ts +46 -0
- package/dist/lib/panel-manager/form-audience.d.ts.map +1 -0
- package/dist/lib/panel-manager/form-audience.js +34 -0
- package/dist/lib/panel-manager/form-audience.js.map +1 -0
- package/dist/lib/panel-manager/form-panel-admin.service.d.ts +150 -0
- package/dist/lib/panel-manager/form-panel-admin.service.d.ts.map +1 -0
- package/dist/lib/panel-manager/form-panel-admin.service.js +433 -0
- package/dist/lib/panel-manager/form-panel-admin.service.js.map +1 -0
- package/dist/lib/panel-manager/form-panel-inventory.d.ts +255 -0
- package/dist/lib/panel-manager/form-panel-inventory.d.ts.map +1 -0
- package/dist/lib/panel-manager/form-panel-inventory.js +293 -0
- package/dist/lib/panel-manager/form-panel-inventory.js.map +1 -0
- package/dist/lib/panel-manager/panel-manager.component.d.ts +232 -0
- package/dist/lib/panel-manager/panel-manager.component.d.ts.map +1 -0
- package/dist/lib/panel-manager/panel-manager.component.js +1112 -0
- package/dist/lib/panel-manager/panel-manager.component.js.map +1 -0
- package/dist/lib/panel-slot/base-contribution-panel.d.ts +40 -0
- package/dist/lib/panel-slot/base-contribution-panel.d.ts.map +1 -0
- package/dist/lib/panel-slot/base-contribution-panel.js +55 -0
- package/dist/lib/panel-slot/base-contribution-panel.js.map +1 -0
- package/dist/lib/panel-slot/base-form-panel.d.ts +116 -8
- package/dist/lib/panel-slot/base-form-panel.d.ts.map +1 -1
- package/dist/lib/panel-slot/base-form-panel.js +76 -5
- package/dist/lib/panel-slot/base-form-panel.js.map +1 -1
- package/dist/lib/panel-slot/collect-form-contribution-registrations.d.ts +29 -0
- package/dist/lib/panel-slot/collect-form-contribution-registrations.d.ts.map +1 -0
- package/dist/lib/panel-slot/collect-form-contribution-registrations.js +214 -0
- package/dist/lib/panel-slot/collect-form-contribution-registrations.js.map +1 -0
- package/dist/lib/panel-slot/collect-form-panel-registrations.d.ts +6 -3
- package/dist/lib/panel-slot/collect-form-panel-registrations.d.ts.map +1 -1
- package/dist/lib/panel-slot/collect-form-panel-registrations.js +8 -14
- package/dist/lib/panel-slot/collect-form-panel-registrations.js.map +1 -1
- package/dist/lib/panel-slot/form-contribution.d.ts +170 -7
- package/dist/lib/panel-slot/form-contribution.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-contribution.js +242 -64
- package/dist/lib/panel-slot/form-contribution.js.map +1 -1
- package/dist/lib/panel-slot/form-contributions.component.d.ts +16 -5
- package/dist/lib/panel-slot/form-contributions.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-contributions.component.js +43 -7
- package/dist/lib/panel-slot/form-contributions.component.js.map +1 -1
- package/dist/lib/panel-slot/form-field-panel-slot.component.d.ts +66 -0
- package/dist/lib/panel-slot/form-field-panel-slot.component.d.ts.map +1 -0
- package/dist/lib/panel-slot/form-field-panel-slot.component.js +190 -0
- package/dist/lib/panel-slot/form-field-panel-slot.component.js.map +1 -0
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts +52 -16
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-panel-slot.component.js +190 -66
- package/dist/lib/panel-slot/form-panel-slot.component.js.map +1 -1
- package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts +11 -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 +17 -0
- package/dist/lib/panel-slot/form-slot-coordinator.service.js.map +1 -1
- package/dist/lib/panel-slot/merge-panel-validation.d.ts +7 -0
- package/dist/lib/panel-slot/merge-panel-validation.d.ts.map +1 -0
- package/dist/lib/panel-slot/merge-panel-validation.js +16 -0
- package/dist/lib/panel-slot/merge-panel-validation.js.map +1 -0
- package/dist/lib/panel-slot/mount-form-contribution.d.ts +15 -0
- package/dist/lib/panel-slot/mount-form-contribution.d.ts.map +1 -0
- package/dist/lib/panel-slot/mount-form-contribution.js +37 -0
- package/dist/lib/panel-slot/mount-form-contribution.js.map +1 -0
- package/dist/lib/panel-slot/panel-hides.d.ts +35 -0
- package/dist/lib/panel-slot/panel-hides.d.ts.map +1 -0
- package/dist/lib/panel-slot/panel-hides.js +111 -0
- package/dist/lib/panel-slot/panel-hides.js.map +1 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.d.ts +16 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.d.ts.map +1 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.js +112 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.js.map +1 -0
- package/dist/lib/panel-slot/placement-preview.d.ts +57 -0
- package/dist/lib/panel-slot/placement-preview.d.ts.map +1 -0
- package/dist/lib/panel-slot/placement-preview.js +86 -0
- package/dist/lib/panel-slot/placement-preview.js.map +1 -0
- 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 +10 -3
- package/dist/lib/panel-slot/related-entity-grid-panel.component.js.map +1 -1
- package/dist/lib/panel-slot/slot-order.d.ts +19 -0
- package/dist/lib/panel-slot/slot-order.d.ts.map +1 -0
- package/dist/lib/panel-slot/slot-order.js +53 -0
- package/dist/lib/panel-slot/slot-order.js.map +1 -0
- package/dist/lib/resolver/form-resolver.service.d.ts +4 -2
- package/dist/lib/resolver/form-resolver.service.d.ts.map +1 -1
- package/dist/lib/resolver/form-resolver.service.js +18 -8
- package/dist/lib/resolver/form-resolver.service.js.map +1 -1
- package/dist/lib/resolver/form-variants.d.ts +28 -0
- package/dist/lib/resolver/form-variants.d.ts.map +1 -0
- package/dist/lib/resolver/form-variants.js +40 -0
- package/dist/lib/resolver/form-variants.js.map +1 -0
- package/dist/lib/section-counts/form-section-counts.d.ts +99 -0
- package/dist/lib/section-counts/form-section-counts.d.ts.map +1 -0
- package/dist/lib/section-counts/form-section-counts.js +223 -0
- package/dist/lib/section-counts/form-section-counts.js.map +1 -0
- package/dist/lib/toolbar/form-toolbar.component.d.ts +7 -0
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +194 -128
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/form-types.d.ts +8 -0
- package/dist/lib/types/form-types.d.ts.map +1 -1
- package/dist/lib/types/form-types.js.map +1 -1
- package/dist/module.d.ts +29 -23
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +43 -5
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +20 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +21 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +20 -20
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import type { FormContributionSlot, FormContributionSpec } from '@memberjunction/interactive-component-types/forms';
|
|
3
|
+
import { type FormPlacementContext, type FormPlacementDecision, type FormPlacementDroppedClaim, type FormPlacementSection, type FormPlacementField, type FormPlacementRailItem, type FormPlacementReplaceMode, type FormPlacementSlotChoice, type FormPlacementState } from './form-placement';
|
|
4
|
+
import { type PlacementOrderItem } from './form-placement-order';
|
|
5
|
+
import { CompositeKey } from '@memberjunction/core';
|
|
6
|
+
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
7
|
+
import type { ComponentSpec } from '@memberjunction/interactive-component-types';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Asks where a generated panel should go before anything is written.
|
|
11
|
+
*
|
|
12
|
+
* Presentational by design: it takes the form's composition and the component's own
|
|
13
|
+
* proposal, and emits the answers. It reads nothing and saves nothing, so the host owns
|
|
14
|
+
* both the fetch and the write, and this stays testable without a provider.
|
|
15
|
+
*
|
|
16
|
+
* Scope is not a control here. The create path clamps every contribution to the calling
|
|
17
|
+
* user, deliberately — an agent must not be able to change another person's form — so the
|
|
18
|
+
* dialog states the audience rather than offering a choice it cannot honour. An edit from the
|
|
19
|
+
* Manage drawer keeps the panel's own audience, which the host states through {@link VisibleTo}.
|
|
20
|
+
*/
|
|
21
|
+
export declare class MjFormPlacementDialogComponent extends BaseAngularComponent {
|
|
22
|
+
/** What the form contains. Setting it resets the answers. */
|
|
23
|
+
set Context(value: FormPlacementContext);
|
|
24
|
+
get Context(): FormPlacementContext;
|
|
25
|
+
/**
|
|
26
|
+
* A hook to overwrite the starting answers.
|
|
27
|
+
*
|
|
28
|
+
* Without it the dialog starts from a fixed default. The caller seeds what only it knows:
|
|
29
|
+
* a saved row's placement when editing one, or a generated panel's proposed claims when
|
|
30
|
+
* applying one. It runs once the context, the proposal and the hook are all set, in
|
|
31
|
+
* whatever order they arrive.
|
|
32
|
+
*/
|
|
33
|
+
set SeedState(value: ((dialog: MjFormPlacementDialogComponent) => void) | null);
|
|
34
|
+
get SeedState(): ((dialog: MjFormPlacementDialogComponent) => void) | null;
|
|
35
|
+
/**
|
|
36
|
+
* The component's own registration intent. Identity fields are read from it directly; its
|
|
37
|
+
* claims reach the answers only through `SeedState`.
|
|
38
|
+
*/
|
|
39
|
+
set Proposal(value: FormContributionSpec | null);
|
|
40
|
+
get Proposal(): FormContributionSpec | null;
|
|
41
|
+
/** Name of the component being placed, for the dialog heading. */
|
|
42
|
+
ComponentName: string;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to read the entity's form to find out which positions it offers.
|
|
45
|
+
*
|
|
46
|
+
* On by default: without it the list is the shape CodeGen produces, which is right for
|
|
47
|
+
* a generated form and can be wrong for a hand-written one. A host that already knows
|
|
48
|
+
* the slots, or one with no Angular form to render, turns it off.
|
|
49
|
+
*/
|
|
50
|
+
ProbeForm: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The record the scaled form preview shows. Null shows a new, unsaved record, which is
|
|
53
|
+
* what a dialog opened from a conversation has.
|
|
54
|
+
*/
|
|
55
|
+
RecordKey: CompositeKey | null;
|
|
56
|
+
/** The saved row being edited, which the preview leaves off so it shows only the edit. */
|
|
57
|
+
ReplacesRowID: string | null;
|
|
58
|
+
/** The component being placed, so the preview draws it rather than a placeholder. */
|
|
59
|
+
PanelComponentSpec: ComponentSpec | null;
|
|
60
|
+
/** The saved component of the panel being edited, for the same reason. */
|
|
61
|
+
PanelComponentID: string | null;
|
|
62
|
+
/** Who sees the panel, as the end of "visible to …". The caller alone unless the host says otherwise. */
|
|
63
|
+
VisibleTo: string;
|
|
64
|
+
/** Offers keeping the panel off, for an edit of a panel that is off now. */
|
|
65
|
+
OfferKeepOff: boolean;
|
|
66
|
+
/** The user pressed Apply. */
|
|
67
|
+
Applied: EventEmitter<FormPlacementDecision>;
|
|
68
|
+
/** The user backed out. */
|
|
69
|
+
Cancelled: EventEmitter<void>;
|
|
70
|
+
private _context;
|
|
71
|
+
private _proposal;
|
|
72
|
+
private _seedState;
|
|
73
|
+
private hasContext;
|
|
74
|
+
/** The answers as the seed left them, or null when no seed has run. */
|
|
75
|
+
private seededAnswers;
|
|
76
|
+
/** The fields the seeded answers stand in for. Empty when the seed made no field claim. */
|
|
77
|
+
private seededFieldNames;
|
|
78
|
+
State: FormPlacementState;
|
|
79
|
+
/**
|
|
80
|
+
* A proposal's claim the caller's seed dropped because this form could not confirm it, for
|
|
81
|
+
* the summary to report while the answers do not make that claim. Null when the seed dropped
|
|
82
|
+
* none. The seed sets it; resetting the answers clears it, and so does reading the form's
|
|
83
|
+
* sections, before the seed runs again against them.
|
|
84
|
+
*/
|
|
85
|
+
DroppedProposalClaim: FormPlacementDroppedClaim | null;
|
|
86
|
+
/** Starts the answers from the default, then from the caller's seed when it can run. */
|
|
87
|
+
private resetState;
|
|
88
|
+
/** Runs the caller's seed once the context, the proposal and the seed are all set. */
|
|
89
|
+
private applySeed;
|
|
90
|
+
/** True while the answers are still the ones the seed produced. */
|
|
91
|
+
private get unchangedSinceSeed();
|
|
92
|
+
/**
|
|
93
|
+
* The positions to offer. Once the form's own set is known, a slot it does not emit is
|
|
94
|
+
* not shown: choosing it would silently resolve to the bottom of the form, so it is not
|
|
95
|
+
* a position the user can meaningfully pick.
|
|
96
|
+
*/
|
|
97
|
+
get Slots(): readonly FormPlacementSlotChoice[];
|
|
98
|
+
/** Slots that sit above the field sections, so the preview renders in form order. */
|
|
99
|
+
get SlotsAbove(): readonly FormPlacementSlotChoice[];
|
|
100
|
+
/** The slot between the fields and the related grids. */
|
|
101
|
+
get SlotAfterFields(): FormPlacementSlotChoice | undefined;
|
|
102
|
+
/** Slots that sit below the related grids. */
|
|
103
|
+
get SlotsBelow(): readonly FormPlacementSlotChoice[];
|
|
104
|
+
get Summary(): string;
|
|
105
|
+
/** The answers as they are applied: keeping a panel off counts only where it is offered. */
|
|
106
|
+
private get answers();
|
|
107
|
+
/** When the panel starts: right away, as a draft, or, for a panel that is off, still off. */
|
|
108
|
+
get StartChoice(): 'now' | 'draft' | 'off';
|
|
109
|
+
set StartChoice(value: 'now' | 'draft' | 'off');
|
|
110
|
+
/** Whether this form draws a side rail, so tabs are a thing the user can see. */
|
|
111
|
+
get HasRail(): boolean;
|
|
112
|
+
/** The rail item the panel will appear under, or null when it gets one of its own. */
|
|
113
|
+
get TargetRail(): FormPlacementRailItem | null;
|
|
114
|
+
/** True when the panel will add a rail item rather than join one. */
|
|
115
|
+
get AddsRailItem(): boolean;
|
|
116
|
+
/** True when the panel would carry no header of its own and none from the host. */
|
|
117
|
+
get HasTitle(): boolean;
|
|
118
|
+
/** A form with no field sections has nothing for a panel to hide. */
|
|
119
|
+
get CanReplaceSection(): boolean;
|
|
120
|
+
/** Sections whose fields a panel could stand in for. */
|
|
121
|
+
get FieldSections(): readonly FormPlacementSection[];
|
|
122
|
+
/** The fields of the section the user is choosing from. */
|
|
123
|
+
get FieldChoices(): readonly FormPlacementField[];
|
|
124
|
+
/**
|
|
125
|
+
* Whether standing in for fields is offered.
|
|
126
|
+
*
|
|
127
|
+
* Only when the fields were read off a real form. Derived targets name the entity's
|
|
128
|
+
* fields rather than the ones this form draws, and a claim on a field the form does
|
|
129
|
+
* not draw hides nothing while still reading as applied.
|
|
130
|
+
*/
|
|
131
|
+
get CanReplaceField(): boolean;
|
|
132
|
+
/** The names the claim will carry, kept to fields the chosen section really draws. */
|
|
133
|
+
get ChosenFields(): readonly string[];
|
|
134
|
+
/** Whether this field is in the claim. */
|
|
135
|
+
IsFieldChosen(fieldName: string): boolean;
|
|
136
|
+
/** Add or remove one field from the claim. */
|
|
137
|
+
ToggleField(fieldName: string, chosen: boolean): void;
|
|
138
|
+
/**
|
|
139
|
+
* Switch which section the claim draws from, dropping the fields chosen in the old one.
|
|
140
|
+
*
|
|
141
|
+
* A claim renders at the top of ONE section, so fields from two of them describe a
|
|
142
|
+
* panel with two places to be. Clearing on switch makes that impossible to express
|
|
143
|
+
* rather than something the dialog has to refuse later.
|
|
144
|
+
*/
|
|
145
|
+
SetFieldSection(sectionKey: string): void;
|
|
146
|
+
/** Whether this preview block is the one a field claim lands inside. */
|
|
147
|
+
HostsFieldPanel(sectionKey: string): boolean;
|
|
148
|
+
/** The chosen fields named in a line, for the note beside the choice. */
|
|
149
|
+
get ChosenFieldSummary(): string;
|
|
150
|
+
/** A field claim that names no field claims nothing, so Apply would be a lie. */
|
|
151
|
+
get FieldClaimIsEmpty(): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* True when the form bundles its field sections into a single Details tab, so the
|
|
154
|
+
* section names on offer are the parts of that tab rather than anything the user can
|
|
155
|
+
* point at on screen.
|
|
156
|
+
*/
|
|
157
|
+
get SectionsAreInDetailsTab(): boolean;
|
|
158
|
+
/** How many sections the Details tab is made of, for the option that replaces all of them. */
|
|
159
|
+
get DetailsTabSectionCount(): number;
|
|
160
|
+
/** The tabs a panel may stand in for. Empty means the form shows no rail. */
|
|
161
|
+
get RailTabs(): readonly FormPlacementRailItem[];
|
|
162
|
+
/** Whether standing in for a whole tab is offered at all. */
|
|
163
|
+
get CanReplaceRailTab(): boolean;
|
|
164
|
+
/** How many panels the chosen tab holds, for the note beside the choice. */
|
|
165
|
+
get ChosenRailTabSize(): number;
|
|
166
|
+
/** Whether this preview block will be taken off the form by the current choice. */
|
|
167
|
+
IsReplaced(sectionKey: string): boolean;
|
|
168
|
+
/** Whether the related grid at this position will be taken over. */
|
|
169
|
+
IsRelatedReplaced(index: number): boolean;
|
|
170
|
+
/** Whether every field group in the Details tab is going, so the tab itself is marked. */
|
|
171
|
+
get IsWholeDetailsTabReplaced(): boolean;
|
|
172
|
+
/** One section's label, told apart from the Details tab when they share a name. */
|
|
173
|
+
SectionLabel(section: FormPlacementSection): string;
|
|
174
|
+
/** Whether hiding a section is a guess, because the targets were not read from the form. */
|
|
175
|
+
get SectionTargetsAreDerived(): boolean;
|
|
176
|
+
/**
|
|
177
|
+
* A bare panel carries no chrome and no rail item, so a left-nav form has nowhere to
|
|
178
|
+
* file it and shows it above every section. Worth saying before it is applied.
|
|
179
|
+
*/
|
|
180
|
+
get IsPersistentHero(): boolean;
|
|
181
|
+
/** A bare strip that replaces blocks takes their place in their tab, rather than above every tab. */
|
|
182
|
+
get BareJoinsReplacedTab(): boolean;
|
|
183
|
+
/** A form with no related grids has nothing for a panel to take over. */
|
|
184
|
+
get CanReplaceRelated(): boolean;
|
|
185
|
+
/** A form with no panels on it yet has nothing for this one to stand in for. */
|
|
186
|
+
get CanReplaceContribution(): boolean;
|
|
187
|
+
/** True while the form is being read to find out which positions it offers. */
|
|
188
|
+
Probing: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* True when the list is the shape CodeGen produces rather than this form's own, because
|
|
191
|
+
* reading the form did not answer. A hand-written custom template can differ.
|
|
192
|
+
*/
|
|
193
|
+
get SlotsAreAssumed(): boolean;
|
|
194
|
+
SelectSlot(slot: FormContributionSlot): void;
|
|
195
|
+
/** Refuses a claim the form cannot honour, so the state can never describe a missing target. */
|
|
196
|
+
SetReplaceMode(mode: FormPlacementReplaceMode): void;
|
|
197
|
+
OnApply(): void;
|
|
198
|
+
OnCancel(): void;
|
|
199
|
+
/**
|
|
200
|
+
* Replace the assumed positions and section keys with the form's own.
|
|
201
|
+
*
|
|
202
|
+
* The probe renders the entity's form offscreen, so it costs one hidden form per entity
|
|
203
|
+
* per session and answers for hand-written templates too. A caller that already had the
|
|
204
|
+
* form open has nothing to learn, and a failed probe leaves the assumptions in place.
|
|
205
|
+
*/
|
|
206
|
+
private probeSlots;
|
|
207
|
+
/** True when the scaled form could not be drawn, so the list stands in for it. */
|
|
208
|
+
PreviewFailed: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Whether the real form is shown, scaled, in place of the list.
|
|
211
|
+
*
|
|
212
|
+
* Not for a full custom form, which draws its own body and has no positions to show, and
|
|
213
|
+
* not when the form is not being read at all.
|
|
214
|
+
*/
|
|
215
|
+
get ShowFormPreview(): boolean;
|
|
216
|
+
OnPreviewFailed(): void;
|
|
217
|
+
private previewSpec;
|
|
218
|
+
/**
|
|
219
|
+
* The panel as it would be saved, for the preview to draw.
|
|
220
|
+
*
|
|
221
|
+
* The same object comes back until an answer changes. The preview redraws the form each
|
|
222
|
+
* time this changes identity, and change detection reads it on every pass.
|
|
223
|
+
*/
|
|
224
|
+
get PreviewSpec(): FormContributionSpec;
|
|
225
|
+
/** Stop replacing anything; the panel goes back to its chosen position. */
|
|
226
|
+
ClearReplacement(): void;
|
|
227
|
+
/** One line saying where the panel goes and what it replaces. */
|
|
228
|
+
get PlacementLine(): string;
|
|
229
|
+
/**
|
|
230
|
+
* The panels in the chosen position, top to bottom, this one among them. Only worth showing
|
|
231
|
+
* when there is another panel to order against.
|
|
232
|
+
*/
|
|
233
|
+
get OrderItems(): PlacementOrderItem[];
|
|
234
|
+
get CanMoveUp(): boolean;
|
|
235
|
+
get CanMoveDown(): boolean;
|
|
236
|
+
/** Whether a neighbour is there but the move has no order number to land on. */
|
|
237
|
+
get MoveIsBlocked(): boolean;
|
|
238
|
+
/** Move this panel one place up or down among the panels in its position. */
|
|
239
|
+
MoveInPosition(direction: 'up' | 'down'): void;
|
|
240
|
+
/**
|
|
241
|
+
* The position control's value: a slot name, or `in:<section key>:start|end` for a place
|
|
242
|
+
* inside a section. One control, because "above the fields" and "at the bottom of Details"
|
|
243
|
+
* are answers to the same question.
|
|
244
|
+
*/
|
|
245
|
+
get PositionValue(): string;
|
|
246
|
+
set PositionValue(value: string);
|
|
247
|
+
/** Sections a panel can be placed inside, for the position control. */
|
|
248
|
+
get PlaceableSections(): readonly FormPlacementSection[];
|
|
249
|
+
/** Whether a section is among those the `section` mode stands in for. */
|
|
250
|
+
IsSectionChosen(key: string): boolean;
|
|
251
|
+
/**
|
|
252
|
+
* Add or remove one section from those the panel stands in for. The single key follows the
|
|
253
|
+
* first chosen section, so a one-section claim reads the same as it always has.
|
|
254
|
+
*/
|
|
255
|
+
ToggleSection(key: string, chosen: boolean): void;
|
|
256
|
+
/** A section claim that names no section stands in for nothing, so Apply would be a lie. */
|
|
257
|
+
get SectionClaimIsEmpty(): boolean;
|
|
258
|
+
/** Whether the panel replaces something, so the line offers a way back. */
|
|
259
|
+
get IsReplacing(): boolean;
|
|
260
|
+
private readonly probe;
|
|
261
|
+
private readonly viewContainer;
|
|
262
|
+
private readonly cdr;
|
|
263
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MjFormPlacementDialogComponent, never>;
|
|
264
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MjFormPlacementDialogComponent, "mj-form-placement-dialog", never, { "Context": { "alias": "Context"; "required": false; }; "SeedState": { "alias": "SeedState"; "required": false; }; "Proposal": { "alias": "Proposal"; "required": false; }; "ComponentName": { "alias": "ComponentName"; "required": false; }; "ProbeForm": { "alias": "ProbeForm"; "required": false; }; "RecordKey": { "alias": "RecordKey"; "required": false; }; "ReplacesRowID": { "alias": "ReplacesRowID"; "required": false; }; "PanelComponentSpec": { "alias": "PanelComponentSpec"; "required": false; }; "PanelComponentID": { "alias": "PanelComponentID"; "required": false; }; "VisibleTo": { "alias": "VisibleTo"; "required": false; }; "OfferKeepOff": { "alias": "OfferKeepOff"; "required": false; }; }, { "Applied": "Applied"; "Cancelled": "Cancelled"; }, never, never, false, never>;
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=form-placement-dialog.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-placement-dialog.component.d.ts","sourceRoot":"","sources":["../../../src/lib/apply/form-placement-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,YAAY,EAA2C,MAAM,eAAe,CAAC;AACpH,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AACpH,OAAO,EAiBH,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EAC1B,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjG,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE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