@memberjunction/ng-base-forms 6.2.0-edge.1 → 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 +166 -1
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +296 -20
- 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 +261 -5
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +1180 -371
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.d.ts +150 -0
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.d.ts.map +1 -0
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.js +263 -0
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.js.map +1 -0
- package/dist/lib/field/form-field.component.d.ts +22 -0
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +51 -6
- package/dist/lib/field/form-field.component.js.map +1 -1
- package/dist/lib/form-field-edit.coordinator.d.ts +25 -0
- package/dist/lib/form-field-edit.coordinator.d.ts.map +1 -0
- package/dist/lib/form-field-edit.coordinator.js +27 -0
- package/dist/lib/form-field-edit.coordinator.js.map +1 -0
- 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 +129 -2
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +974 -307
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/form-events.d.ts +6 -0
- package/dist/lib/types/form-events.d.ts.map +1 -1
- package/dist/lib/types/form-events.js +6 -0
- package/dist/lib/types/form-events.js.map +1 -1
- package/dist/lib/types/form-toolbar-item.d.ts +20 -1
- package/dist/lib/types/form-toolbar-item.d.ts.map +1 -1
- package/dist/lib/types/form-toolbar-item.js.map +1 -1
- package/dist/lib/types/form-types.d.ts +13 -0
- package/dist/lib/types/form-types.d.ts.map +1 -1
- package/dist/lib/types/form-types.js.map +1 -1
- package/dist/lib/types/toolbar-config.d.ts +16 -0
- package/dist/lib/types/toolbar-config.d.ts.map +1 -1
- package/dist/lib/types/toolbar-config.js +3 -0
- package/dist/lib/types/toolbar-config.js.map +1 -1
- package/dist/module.d.ts +29 -22
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +50 -8
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +22 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +24 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +20 -18
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import type { MjButtonVariant } from '@memberjunction/ng-ui-components';
|
|
3
|
+
import { type CompositeKey, type EntityInfo, type IMetadataProvider } from '@memberjunction/core';
|
|
4
|
+
import type { FormLifecycleStatus, FormScope } from '@memberjunction/core-entities';
|
|
5
|
+
import type { FormContributionSpec } from '@memberjunction/interactive-component-types/forms';
|
|
6
|
+
import { type FormPanelFormItem, type FormPanelCompiledRow, type FormPanelInventoryGroup, type FormPanelInventoryItem, type FormPanelStockGridRow } from './form-panel-inventory';
|
|
7
|
+
import { type FormPlacementContext, type FormPlacementDecision, type FormPlacementRelated, type FormPlacementState } from '../apply/form-placement';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* "Manage this form" — the one place to manage what is on an entity's form.
|
|
11
|
+
*
|
|
12
|
+
* Lists the full custom forms available to the user and the panels on the form, grouped by who
|
|
13
|
+
* each belongs to, because that decides what the user may do: anything to their own, hide what
|
|
14
|
+
* is shared with them, nothing to a grid a relationship draws. Holders of the Manage Form
|
|
15
|
+
* Defaults authorization also get Publish and Audience, which change what other people see.
|
|
16
|
+
*
|
|
17
|
+
* Every write goes through the admin service to the server, where the entity subclasses enforce
|
|
18
|
+
* the same rule this drawer uses to decide what to draw.
|
|
19
|
+
*/
|
|
20
|
+
export declare class MjPanelManagerComponent implements OnChanges {
|
|
21
|
+
private readonly cdr;
|
|
22
|
+
private readonly admin;
|
|
23
|
+
private readonly probe;
|
|
24
|
+
private readonly host;
|
|
25
|
+
/** What held focus before the drawer opened, and gets it back when the drawer closes. */
|
|
26
|
+
private drawerOpener;
|
|
27
|
+
/** What held focus before the placement dialog or the audience chooser opened over the list. */
|
|
28
|
+
private layerOpener;
|
|
29
|
+
/** True while the drawer is open and holds the keyboard. Off before focus goes back out on close. */
|
|
30
|
+
private trapping;
|
|
31
|
+
Visible: boolean;
|
|
32
|
+
/** The entity whose form is being managed. */
|
|
33
|
+
Entity: EntityInfo | null;
|
|
34
|
+
/** Compiled `BaseFormPanel` registrations on this entity, for the inventory. */
|
|
35
|
+
Compiled: readonly FormPanelCompiledRow[];
|
|
36
|
+
/** Relationships the container fills a grid in for. */
|
|
37
|
+
StockGrids: readonly FormPanelStockGridRow[];
|
|
38
|
+
/** Whether a full custom form owns this body, which holds everything else back. */
|
|
39
|
+
FullCustomForm: boolean;
|
|
40
|
+
/** Section and rail titles by key, so a claim reads as a name. */
|
|
41
|
+
TitleByKey: ReadonlyMap<string, string>;
|
|
42
|
+
/** Related grids on this form, so editing can still offer to take one over. */
|
|
43
|
+
Related: readonly FormPlacementRelated[];
|
|
44
|
+
Provider: IMetadataProvider | null;
|
|
45
|
+
/** The full custom forms the toolbar picker offers, in its order. */
|
|
46
|
+
Variants: ReadonlyArray<{
|
|
47
|
+
ID: string;
|
|
48
|
+
Label: string;
|
|
49
|
+
}>;
|
|
50
|
+
/** The form this user sees now; null when it is the generated form. */
|
|
51
|
+
CurrentFormID: string | null;
|
|
52
|
+
/** The record the form is showing, for the placement dialog's preview. Null for a new record. */
|
|
53
|
+
RecordKey: CompositeKey | null;
|
|
54
|
+
/** A row was switched or removed, so the form has to resolve again. */
|
|
55
|
+
Changed: EventEmitter<void>;
|
|
56
|
+
/** The user chose a different full custom form, or the generated form (null). */
|
|
57
|
+
FormChosen: EventEmitter<string | null>;
|
|
58
|
+
Closed: EventEmitter<void>;
|
|
59
|
+
Items: FormPanelInventoryItem[];
|
|
60
|
+
/** The full custom forms and the generated form, for the Form group. */
|
|
61
|
+
Forms: FormPanelFormItem[];
|
|
62
|
+
/** Whether this user may publish to a role or to everyone. */
|
|
63
|
+
CanPublish: boolean;
|
|
64
|
+
/** The item whose audience is being chosen, or null. */
|
|
65
|
+
Publishing: {
|
|
66
|
+
Kind: 'panel' | 'form';
|
|
67
|
+
ID: string;
|
|
68
|
+
Title: string;
|
|
69
|
+
/** What the item is now. Publishing turns it on, which the chooser says first. */
|
|
70
|
+
Status: string;
|
|
71
|
+
Scope: FormScope;
|
|
72
|
+
RoleID: string | null;
|
|
73
|
+
} | null;
|
|
74
|
+
/** The list, under headings. */
|
|
75
|
+
Groups: FormPanelInventoryGroup[];
|
|
76
|
+
/** The row being re-placed, or null. */
|
|
77
|
+
Editing: FormPanelInventoryItem | null;
|
|
78
|
+
/** What the placement dialog opens on while editing. */
|
|
79
|
+
EditContext: FormPlacementContext | null;
|
|
80
|
+
/** The component the panel being edited renders, for the placement preview. */
|
|
81
|
+
EditComponentID: string | null;
|
|
82
|
+
EditProposal: FormContributionSpec | null;
|
|
83
|
+
/** Who sees the panel being edited, for the placement dialog to state. */
|
|
84
|
+
EditVisibleTo: string;
|
|
85
|
+
/** What the panel being edited is now: on, a draft, or off. */
|
|
86
|
+
EditStatus: FormLifecycleStatus;
|
|
87
|
+
/** ID of the row a write is running on, so only its buttons go quiet. */
|
|
88
|
+
Busy: string | null;
|
|
89
|
+
/** ID of the row awaiting a second press to confirm removal. */
|
|
90
|
+
Confirming: string | null;
|
|
91
|
+
Error: string;
|
|
92
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
93
|
+
get Summary(): string;
|
|
94
|
+
get EntityName(): string;
|
|
95
|
+
get IsEmpty(): boolean;
|
|
96
|
+
/** Whether there is more than the generated form to choose from. */
|
|
97
|
+
get HasCustomForms(): boolean;
|
|
98
|
+
/** Rebuild the list from the engine's current rows. */
|
|
99
|
+
Refresh(): void;
|
|
100
|
+
private get provider();
|
|
101
|
+
/** The rows behind the list, so an edit can read the placement back. */
|
|
102
|
+
private rows;
|
|
103
|
+
/**
|
|
104
|
+
* Open the placement dialog on a row that is already on the form.
|
|
105
|
+
*
|
|
106
|
+
* Editing in place is what "remove it and add it again" was standing in for. The
|
|
107
|
+
* dialog probes the form for itself, so the only context assembled here is what a
|
|
108
|
+
* probe cannot know: the related grids and the other panels already installed.
|
|
109
|
+
*/
|
|
110
|
+
OnEdit(item: FormPanelInventoryItem): void;
|
|
111
|
+
/**
|
|
112
|
+
* Seed the dialog with the row's own placement rather than a blank one.
|
|
113
|
+
*
|
|
114
|
+
* Recomputed against the dialog's context each time it asks, not replayed: the dialog
|
|
115
|
+
* probes the form after it opens, so the first seed runs against a context with no
|
|
116
|
+
* sections, slots or rail in it and a stored claim would not match anything yet.
|
|
117
|
+
*/
|
|
118
|
+
SeedEdit: (dialog: {
|
|
119
|
+
State: FormPlacementState;
|
|
120
|
+
Context: FormPlacementContext;
|
|
121
|
+
}) => void;
|
|
122
|
+
OnEditApplied(decision: FormPlacementDecision): Promise<void>;
|
|
123
|
+
/** Clicking the backdrop closes the dialog; clicking the dialog itself does not. */
|
|
124
|
+
OnEditScrimClick(event: MouseEvent): void;
|
|
125
|
+
/** A contribution row as the placement dialog lists it: its key, position and order. */
|
|
126
|
+
private existingFrom;
|
|
127
|
+
/** A contribution row's key, or empty when the row has none. */
|
|
128
|
+
private contributionKeyOf;
|
|
129
|
+
CloseEdit(): void;
|
|
130
|
+
OnToggle(item: FormPanelInventoryItem): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Removal takes two presses on the same button rather than a second dialog. The drawer
|
|
133
|
+
* is already over the form, and a confirm dialog over a drawer over a form leaves the
|
|
134
|
+
* user two layers from the thing they are changing.
|
|
135
|
+
*/
|
|
136
|
+
OnRemove(item: FormPanelInventoryItem): Promise<void>;
|
|
137
|
+
/** Quiet until the first press; solid red while it waits for the second. */
|
|
138
|
+
RemoveVariant(item: FormPanelInventoryItem): MjButtonVariant;
|
|
139
|
+
RemoveLabel(item: FormPanelInventoryItem): string;
|
|
140
|
+
ToggleLabel(item: FormPanelInventoryItem): string;
|
|
141
|
+
/** Hide a panel for this user. Nobody else is affected. */
|
|
142
|
+
OnHide(item: FormPanelInventoryItem): void;
|
|
143
|
+
/** Bring back a panel this user hid. */
|
|
144
|
+
OnShow(item: FormPanelInventoryItem): void;
|
|
145
|
+
/** Switch to another full custom form, or back to the generated form. */
|
|
146
|
+
OnUseForm(form: FormPanelFormItem): void;
|
|
147
|
+
/** Open the audience chooser on a panel. */
|
|
148
|
+
OnPublishPanel(item: FormPanelInventoryItem): void;
|
|
149
|
+
/** Open the audience chooser on a full custom form. */
|
|
150
|
+
OnPublishForm(form: FormPanelFormItem): void;
|
|
151
|
+
private openAudience;
|
|
152
|
+
/** The roles a holder may publish to. */
|
|
153
|
+
get RoleOptions(): ReadonlyArray<{
|
|
154
|
+
ID: string;
|
|
155
|
+
Name: string;
|
|
156
|
+
}>;
|
|
157
|
+
/**
|
|
158
|
+
* What publishing will do, stated before it is done.
|
|
159
|
+
*
|
|
160
|
+
* Changing what other people see should never be a surprise, so the consequence is spelled
|
|
161
|
+
* out in the terms the publisher chose — which people, and on which records. Publishing turns
|
|
162
|
+
* the item on, so a draft or an item that is off says it will go live.
|
|
163
|
+
*/
|
|
164
|
+
get AudienceConsequence(): string;
|
|
165
|
+
/** Whether the chosen audience is complete enough to publish. */
|
|
166
|
+
get CanConfirmAudience(): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Publishes with the chosen audience. The Publish button that opened the chooser is disabled
|
|
169
|
+
* while the write runs, so focus waits on the drawer and goes back to the button afterwards,
|
|
170
|
+
* when it is still there and enabled.
|
|
171
|
+
*/
|
|
172
|
+
ConfirmAudience(): Promise<void>;
|
|
173
|
+
CancelAudience(): void;
|
|
174
|
+
/** The audience label for a scope, as the chooser's options read it. */
|
|
175
|
+
AudienceOption(scope: FormScope): string;
|
|
176
|
+
OnClose(): void;
|
|
177
|
+
OnOverlayClick(event: MouseEvent): void;
|
|
178
|
+
/**
|
|
179
|
+
* Keys pressed anywhere while the drawer is open, so they still reach it when the focused
|
|
180
|
+
* button was removed or disabled and focus fell to the page. Escape closes the top layer: the
|
|
181
|
+
* placement dialog, then the audience chooser, then the drawer. Tab and Shift+Tab wrap at the
|
|
182
|
+
* ends of that layer and bring focus back into it. Keys pressed in another overlay or modal,
|
|
183
|
+
* such as the icon picker's grid, are left to it.
|
|
184
|
+
*/
|
|
185
|
+
OnKeydown(event: KeyboardEvent): void;
|
|
186
|
+
/** Focus that moves to the page behind the drawer is brought back into it. */
|
|
187
|
+
OnFocusIn(event: FocusEvent): void;
|
|
188
|
+
/**
|
|
189
|
+
* True for an element outside the drawer that another overlay or modal owns: a CDK overlay
|
|
190
|
+
* (the icon picker's grid) or a dialog marked `aria-modal`. Those handle their own keys and focus.
|
|
191
|
+
*/
|
|
192
|
+
private belongsElsewhere;
|
|
193
|
+
/** Wraps Tab at the first and last stop of the top layer, and brings focus back into it. */
|
|
194
|
+
private keepFocusInside;
|
|
195
|
+
/**
|
|
196
|
+
* Puts focus back inside the drawer when it is not there: on the drawer itself, or on the first
|
|
197
|
+
* stop of the placement dialog or audience chooser when one is open.
|
|
198
|
+
*/
|
|
199
|
+
private focusTopLayer;
|
|
200
|
+
/**
|
|
201
|
+
* After the list redraws, keeps focus in the drawer. A write or a hide can remove or disable
|
|
202
|
+
* the focused button, which drops focus to the page. `preferred` gets focus back when it is
|
|
203
|
+
* still there and enabled.
|
|
204
|
+
*/
|
|
205
|
+
private refocusAfterRender;
|
|
206
|
+
private drawerElement;
|
|
207
|
+
/**
|
|
208
|
+
* Whether the drawer is on screen. A drawer left open on a tab that is now in the background
|
|
209
|
+
* is still in the page, hidden, and must not take keys or focus from the tab in front.
|
|
210
|
+
*/
|
|
211
|
+
private drawerShown;
|
|
212
|
+
/** The layer that holds focus: the placement dialog, else the audience chooser, else the drawer. */
|
|
213
|
+
private topLayer;
|
|
214
|
+
/** Moves focus to the first stop inside `selector` once the view has drawn it. */
|
|
215
|
+
private focusLater;
|
|
216
|
+
/** Gives focus back to what held it before the drawer, or one of its layers, opened. */
|
|
217
|
+
private restoreFocus;
|
|
218
|
+
private focusedElement;
|
|
219
|
+
/**
|
|
220
|
+
* Runs one write on a row, with only that row's buttons quiet meanwhile, then keeps focus in
|
|
221
|
+
* the drawer, on `focusAfter` when it is still there and enabled.
|
|
222
|
+
*/
|
|
223
|
+
private run;
|
|
224
|
+
/**
|
|
225
|
+
* After a change to what is on the form: drop the placement dialog's reading of it, rebuild
|
|
226
|
+
* the list, tell the form to resolve again, and keep focus in the drawer.
|
|
227
|
+
*/
|
|
228
|
+
private afterChange;
|
|
229
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MjPanelManagerComponent, never>;
|
|
230
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MjPanelManagerComponent, "mj-panel-manager", never, { "Visible": { "alias": "Visible"; "required": false; }; "Entity": { "alias": "Entity"; "required": false; }; "Compiled": { "alias": "Compiled"; "required": false; }; "StockGrids": { "alias": "StockGrids"; "required": false; }; "FullCustomForm": { "alias": "FullCustomForm"; "required": false; }; "TitleByKey": { "alias": "TitleByKey"; "required": false; }; "Related": { "alias": "Related"; "required": false; }; "Provider": { "alias": "Provider"; "required": false; }; "Variants": { "alias": "Variants"; "required": false; }; "CurrentFormID": { "alias": "CurrentFormID"; "required": false; }; "RecordKey": { "alias": "RecordKey"; "required": false; }; }, { "Changed": "Changed"; "FormChosen": "FormChosen"; "Closed": "Closed"; }, never, never, false, never>;
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=panel-manager.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-manager.component.d.ts","sourceRoot":"","sources":["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