@memberjunction/ng-base-forms 5.37.0 → 5.39.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/README.md +53 -0
- package/dist/lib/base-form-component.d.ts +46 -0
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +68 -2
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts +77 -1
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +157 -39
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/field/fk-search-utils.d.ts +31 -0
- package/dist/lib/field/fk-search-utils.d.ts.map +1 -0
- package/dist/lib/field/fk-search-utils.js +47 -0
- package/dist/lib/field/fk-search-utils.js.map +1 -0
- package/dist/lib/field/form-field.component.d.ts +401 -6
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +1646 -214
- package/dist/lib/field/form-field.component.js.map +1 -1
- package/dist/lib/field/linked-field-options.d.ts +76 -0
- package/dist/lib/field/linked-field-options.d.ts.map +1 -0
- package/dist/lib/field/linked-field-options.js +80 -0
- package/dist/lib/field/linked-field-options.js.map +1 -0
- package/dist/lib/host/entity-form-host.component.d.ts +159 -0
- package/dist/lib/host/entity-form-host.component.d.ts.map +1 -0
- package/dist/lib/host/entity-form-host.component.js +539 -0
- package/dist/lib/host/entity-form-host.component.js.map +1 -0
- package/dist/lib/interactive-form/interactive-form.component.d.ts +181 -0
- package/dist/lib/interactive-form/interactive-form.component.d.ts.map +1 -0
- package/dist/lib/interactive-form/interactive-form.component.js +560 -0
- package/dist/lib/interactive-form/interactive-form.component.js.map +1 -0
- package/dist/lib/isa-related-panel/isa-related-card.component.js +2 -2
- package/dist/lib/overlays/base-form-overlay.d.ts +114 -0
- package/dist/lib/overlays/base-form-overlay.d.ts.map +1 -0
- package/dist/lib/overlays/base-form-overlay.js +227 -0
- package/dist/lib/overlays/base-form-overlay.js.map +1 -0
- package/dist/lib/overlays/form-dialog.component.d.ts +35 -0
- package/dist/lib/overlays/form-dialog.component.d.ts.map +1 -0
- package/dist/lib/overlays/form-dialog.component.js +92 -0
- package/dist/lib/overlays/form-dialog.component.js.map +1 -0
- package/dist/lib/overlays/form-presenter.service.d.ts +37 -0
- package/dist/lib/overlays/form-presenter.service.d.ts.map +1 -0
- package/dist/lib/overlays/form-presenter.service.js +130 -0
- package/dist/lib/overlays/form-presenter.service.js.map +1 -0
- package/dist/lib/overlays/form-presenter.types.d.ts +65 -0
- package/dist/lib/overlays/form-presenter.types.d.ts.map +1 -0
- package/dist/lib/overlays/form-presenter.types.js +25 -0
- package/dist/lib/overlays/form-presenter.types.js.map +1 -0
- package/dist/lib/overlays/form-slide-in.component.d.ts +38 -0
- package/dist/lib/overlays/form-slide-in.component.d.ts.map +1 -0
- package/dist/lib/overlays/form-slide-in.component.js +106 -0
- package/dist/lib/overlays/form-slide-in.component.js.map +1 -0
- package/dist/lib/overlays/form-window.component.d.ts +32 -0
- package/dist/lib/overlays/form-window.component.d.ts.map +1 -0
- package/dist/lib/overlays/form-window.component.js +93 -0
- package/dist/lib/overlays/form-window.component.js.map +1 -0
- package/dist/lib/panel/collapsible-panel.component.d.ts +19 -2
- package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.js +70 -13
- package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
- package/dist/lib/panel-slot/base-form-panel.d.ts +97 -0
- package/dist/lib/panel-slot/base-form-panel.d.ts.map +1 -0
- package/dist/lib/panel-slot/base-form-panel.js +64 -0
- package/dist/lib/panel-slot/base-form-panel.js.map +1 -0
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts +78 -0
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts.map +1 -0
- package/dist/lib/panel-slot/form-panel-slot.component.js +227 -0
- package/dist/lib/panel-slot/form-panel-slot.component.js.map +1 -0
- package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts +57 -0
- package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts.map +1 -0
- package/dist/lib/panel-slot/form-slot-coordinator.service.js +104 -0
- package/dist/lib/panel-slot/form-slot-coordinator.service.js.map +1 -0
- package/dist/lib/resolver/form-resolver.service.d.ts +139 -0
- package/dist/lib/resolver/form-resolver.service.d.ts.map +1 -0
- package/dist/lib/resolver/form-resolver.service.js +235 -0
- package/dist/lib/resolver/form-resolver.service.js.map +1 -0
- package/dist/lib/section-manager/section-manager.component.js +2 -2
- package/dist/lib/toolbar/form-toolbar.component.d.ts +56 -1
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +294 -136
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/entity-form-config.d.ts +125 -0
- package/dist/lib/types/entity-form-config.d.ts.map +1 -0
- package/dist/lib/types/entity-form-config.js +75 -0
- package/dist/lib/types/entity-form-config.js.map +1 -0
- package/dist/lib/types/form-types.d.ts +24 -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/navigation-events.d.ts +64 -2
- package/dist/lib/types/navigation-events.d.ts.map +1 -1
- package/dist/lib/types/navigation-events.js.map +1 -1
- package/dist/lib/types/toolbar-config.d.ts +11 -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 +14 -7
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +40 -7
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +15 -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 +17 -11
- package/dist/__tests__/sanity.test.d.ts +0 -2
- package/dist/__tests__/sanity.test.d.ts.map +0 -1
- package/dist/__tests__/sanity.test.js +0 -12
- package/dist/__tests__/sanity.test.js.map +0 -1
- package/dist/__tests__/tag-count-badge.test.d.ts +0 -2
- package/dist/__tests__/tag-count-badge.test.d.ts.map +0 -1
- package/dist/__tests__/tag-count-badge.test.js +0 -70
- package/dist/__tests__/tag-count-badge.test.js.map +0 -1
- package/dist/lib/__tests__/base-forms.test.d.ts +0 -2
- package/dist/lib/__tests__/base-forms.test.d.ts.map +0 -1
- package/dist/lib/__tests__/base-forms.test.js +0 -256
- package/dist/lib/__tests__/base-forms.test.js.map +0 -1
|
@@ -10,6 +10,17 @@ import { BeforeSaveEventArgs, BeforeDeleteEventArgs, BeforeCancelEventArgs, Befo
|
|
|
10
10
|
import { BaseFormComponent } from '../base-form-component';
|
|
11
11
|
import { RestoreVersionEvent } from '@memberjunction/ng-record-changes';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
|
+
/**
|
|
14
|
+
* Display shape for the variant picker. Kept minimal so the Generic
|
|
15
|
+
* container doesn't pull in resolver types; the Explorer-level component
|
|
16
|
+
* that owns the resolver shapes its rows into this.
|
|
17
|
+
*/
|
|
18
|
+
export interface VariantPickerItem {
|
|
19
|
+
ID: string;
|
|
20
|
+
Label: string;
|
|
21
|
+
Scope: 'User' | 'Role' | 'Global';
|
|
22
|
+
Status: 'Active' | 'Pending' | 'Inactive';
|
|
23
|
+
}
|
|
13
24
|
/**
|
|
14
25
|
* Top-level container that composes the toolbar, content slots, and sticky behavior.
|
|
15
26
|
*
|
|
@@ -83,6 +94,24 @@ export declare class MjRecordFormContainerComponent extends BaseAngularComponent
|
|
|
83
94
|
IsSaving: boolean;
|
|
84
95
|
ToolbarConfig: FormToolbarConfig;
|
|
85
96
|
WidthMode: FormWidthMode;
|
|
97
|
+
/**
|
|
98
|
+
* Variants available for this entity record. When more than one variant is
|
|
99
|
+
* provided, a compact picker appears between the toolbar and the form body
|
|
100
|
+
* letting the user switch which form is rendered. Empty / single-variant
|
|
101
|
+
* lists hide the picker entirely.
|
|
102
|
+
*
|
|
103
|
+
* Each item is a plain object — we don't take a hard dep on the resolver's
|
|
104
|
+
* row type from here (this is a Generic component; the Explorer-level
|
|
105
|
+
* single-record component shapes the resolver row into this minimal form).
|
|
106
|
+
*/
|
|
107
|
+
Variants: VariantPickerItem[];
|
|
108
|
+
/**
|
|
109
|
+
* Override ID currently rendered. The picker highlights this entry. May be
|
|
110
|
+
* null when the active form is a class-based @RegisterClass form (no
|
|
111
|
+
* override is currently active) — in that case the picker still appears
|
|
112
|
+
* with "Default form" as the leading row.
|
|
113
|
+
*/
|
|
114
|
+
CurrentVariantID: string | null;
|
|
86
115
|
/** Emitted for all navigation actions (the host app maps these to its routing) */
|
|
87
116
|
Navigate: EventEmitter<FormNavigationEvent>;
|
|
88
117
|
/** Emitted when edit mode changes (only in standalone mode; FormComponent mode handled internally) */
|
|
@@ -113,6 +142,14 @@ export declare class MjRecordFormContainerComponent extends BaseAngularComponent
|
|
|
113
142
|
ShowChangesRequested: EventEmitter<void>;
|
|
114
143
|
/** Emitted when a custom toolbar button is clicked */
|
|
115
144
|
CustomButtonClick: EventEmitter<CustomToolbarButtonClickEventArgs>;
|
|
145
|
+
/**
|
|
146
|
+
* Emitted when the user chooses a different form variant from the picker.
|
|
147
|
+
* Carries the selected variant's override ID, or null when the user picks
|
|
148
|
+
* the "Default form" row. The host is responsible for persisting the choice
|
|
149
|
+
* (via FormResolverService.SetSelectedVariant) and reloading the record so
|
|
150
|
+
* the new form mounts.
|
|
151
|
+
*/
|
|
152
|
+
VariantChange: EventEmitter<string | null>;
|
|
116
153
|
Panels: QueryList<MjCollapsiblePanelComponent>;
|
|
117
154
|
/** Typed accessor for the form component reference */
|
|
118
155
|
private get fc();
|
|
@@ -127,6 +164,20 @@ export declare class MjRecordFormContainerComponent extends BaseAngularComponent
|
|
|
127
164
|
get EffectiveDirtyFieldNames(): string[];
|
|
128
165
|
get EffectiveIsSaving(): boolean;
|
|
129
166
|
get EffectiveWidthMode(): FormWidthMode;
|
|
167
|
+
/**
|
|
168
|
+
* Whether the in-form toolbar renders at all. Driven by the form's
|
|
169
|
+
* `Config.Toolbar`: an explicit `null` (the dialog/slide-in default) hides
|
|
170
|
+
* the entire toolbar so the surrounding chrome can own Save/Cancel/title.
|
|
171
|
+
* Any other value (undefined or a partial config) keeps the toolbar.
|
|
172
|
+
*/
|
|
173
|
+
get EffectiveShowToolbar(): boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Effective toolbar config: the bound `ToolbarConfig` (or the default)
|
|
176
|
+
* with the form's `Config.Toolbar` partial merged on top. This is the
|
|
177
|
+
* no-regeneration bridge — generated templates never bind `[Config]`,
|
|
178
|
+
* yet per-instance toolbar tweaks still take effect through `fc.Config`.
|
|
179
|
+
*/
|
|
180
|
+
get EffectiveToolbarConfig(): FormToolbarConfig;
|
|
130
181
|
get EffectiveSearchFilter(): string;
|
|
131
182
|
get EffectiveShowEmptyFields(): boolean;
|
|
132
183
|
get EffectiveHasCustomSectionOrder(): boolean;
|
|
@@ -227,11 +278,36 @@ export declare class MjRecordFormContainerComponent extends BaseAngularComponent
|
|
|
227
278
|
OnShowEmptyFieldsChange(show: boolean): void;
|
|
228
279
|
OnWidthModeChange(mode: FormWidthMode): void;
|
|
229
280
|
OnResetSectionOrder(): void;
|
|
281
|
+
/** Whether the variant dropdown menu is currently open. Toggled by the
|
|
282
|
+
* control's click handler; closed on blur or after a row is picked. */
|
|
283
|
+
_variantMenuOpen: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Effective variants — prefer the form component's list (set by the host
|
|
286
|
+
* resolver) when present, fall back to the directly-bound @Input. This
|
|
287
|
+
* means generated form templates don't need to bind [Variants] explicitly;
|
|
288
|
+
* the host populates `instance.Variants` post-construction and the
|
|
289
|
+
* container reads it through this accessor.
|
|
290
|
+
*/
|
|
291
|
+
get EffectiveVariants(): VariantPickerItem[];
|
|
292
|
+
get EffectiveCurrentVariantID(): string | null;
|
|
293
|
+
/** Whether to show the variant picker at all. Hidden when the entity has
|
|
294
|
+
* zero or one applicable variant — there's nothing to switch between. */
|
|
295
|
+
get ShowVariantPicker(): boolean;
|
|
296
|
+
/** Label for the currently-selected variant (or "Default form" if none). */
|
|
297
|
+
get CurrentVariantLabel(): string;
|
|
298
|
+
/** Compact subtitle: scope + status, e.g. "User · Active". */
|
|
299
|
+
variantSubtitle(v: VariantPickerItem): string;
|
|
300
|
+
/**
|
|
301
|
+
* User picked an item from the variant menu. If the host installed a
|
|
302
|
+
* handler via `instance.OnVariantChanged`, call it; otherwise emit the
|
|
303
|
+
* VariantChange event for standalone consumers.
|
|
304
|
+
*/
|
|
305
|
+
OnVariantPicked(variantID: string | null): void;
|
|
230
306
|
OnManageSections(): void;
|
|
231
307
|
OnSectionOrderChange(newOrder: string[]): void;
|
|
232
308
|
OnSectionManagerReset(): void;
|
|
233
309
|
OnSectionManagerClosed(): void;
|
|
234
310
|
static ɵfac: i0.ɵɵFactoryDeclaration<MjRecordFormContainerComponent, never>;
|
|
235
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MjRecordFormContainerComponent, "mj-record-form-container", never, { "Record": { "alias": "Record"; "required": false; }; "FormComponent": { "alias": "FormComponent"; "required": false; }; "EntityInfo": { "alias": "EntityInfo"; "required": false; }; "EditMode": { "alias": "EditMode"; "required": false; }; "UserCanEdit": { "alias": "UserCanEdit"; "required": false; }; "UserCanDelete": { "alias": "UserCanDelete"; "required": false; }; "IsFavorite": { "alias": "IsFavorite"; "required": false; }; "FavoriteInitDone": { "alias": "FavoriteInitDone"; "required": false; }; "IsDirty": { "alias": "IsDirty"; "required": false; }; "DirtyFieldNames": { "alias": "DirtyFieldNames"; "required": false; }; "ListCount": { "alias": "ListCount"; "required": false; }; "IsSaving": { "alias": "IsSaving"; "required": false; }; "ToolbarConfig": { "alias": "ToolbarConfig"; "required": false; }; "WidthMode": { "alias": "WidthMode"; "required": false; }; }, { "Navigate": "Navigate"; "EditModeChange": "EditModeChange"; "BeforeSave": "BeforeSave"; "SaveRequested": "SaveRequested"; "BeforeCancel": "BeforeCancel"; "CancelRequested": "CancelRequested"; "BeforeDelete": "BeforeDelete"; "DeleteRequested": "DeleteRequested"; "FavoriteToggled": "FavoriteToggled"; "BeforeHistoryView": "BeforeHistoryView"; "HistoryRequested": "HistoryRequested"; "BeforeListManagement": "BeforeListManagement"; "ListManagementRequested": "ListManagementRequested"; "ShowChangesRequested": "ShowChangesRequested"; "CustomButtonClick": "CustomButtonClick"; }, ["Panels"], ["[before-toolbar]", "*"], false, never>;
|
|
311
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MjRecordFormContainerComponent, "mj-record-form-container", never, { "Record": { "alias": "Record"; "required": false; }; "FormComponent": { "alias": "FormComponent"; "required": false; }; "EntityInfo": { "alias": "EntityInfo"; "required": false; }; "EditMode": { "alias": "EditMode"; "required": false; }; "UserCanEdit": { "alias": "UserCanEdit"; "required": false; }; "UserCanDelete": { "alias": "UserCanDelete"; "required": false; }; "IsFavorite": { "alias": "IsFavorite"; "required": false; }; "FavoriteInitDone": { "alias": "FavoriteInitDone"; "required": false; }; "IsDirty": { "alias": "IsDirty"; "required": false; }; "DirtyFieldNames": { "alias": "DirtyFieldNames"; "required": false; }; "ListCount": { "alias": "ListCount"; "required": false; }; "IsSaving": { "alias": "IsSaving"; "required": false; }; "ToolbarConfig": { "alias": "ToolbarConfig"; "required": false; }; "WidthMode": { "alias": "WidthMode"; "required": false; }; "Variants": { "alias": "Variants"; "required": false; }; "CurrentVariantID": { "alias": "CurrentVariantID"; "required": false; }; }, { "Navigate": "Navigate"; "EditModeChange": "EditModeChange"; "BeforeSave": "BeforeSave"; "SaveRequested": "SaveRequested"; "BeforeCancel": "BeforeCancel"; "CancelRequested": "CancelRequested"; "BeforeDelete": "BeforeDelete"; "DeleteRequested": "DeleteRequested"; "FavoriteToggled": "FavoriteToggled"; "BeforeHistoryView": "BeforeHistoryView"; "HistoryRequested": "HistoryRequested"; "BeforeListManagement": "BeforeListManagement"; "ListManagementRequested": "ListManagementRequested"; "ShowChangesRequested": "ShowChangesRequested"; "CustomButtonClick": "CustomButtonClick"; "VariantChange": "VariantChange"; }, ["Panels"], ["[before-toolbar]", "*"], false, never>;
|
|
236
312
|
}
|
|
237
313
|
//# sourceMappingURL=record-form-container.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-form-container.component.d.ts","sourceRoot":"","sources":["../../../src/lib/container/record-form-container.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAErB,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAExD,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAgB,UAAU,EAAqB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"record-form-container.component.d.ts","sourceRoot":"","sources":["../../../src/lib/container/record-form-container.component.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, inject, NgZone, ContentChildren, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
2
2
|
import { CompositeKey, RunView } from '@memberjunction/core';
|
|
3
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
3
4
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
4
5
|
import { UserInfoEngine } from '@memberjunction/core-entities';
|
|
5
6
|
import { Subject } from 'rxjs';
|
|
6
7
|
import { takeUntil } from 'rxjs/operators';
|
|
7
8
|
import { DEFAULT_TOOLBAR_CONFIG } from '../types/toolbar-config';
|
|
9
|
+
import { ResolveFormShowToolbar, ResolveFormToolbarConfig } from '../types/entity-form-config';
|
|
8
10
|
import { MjCollapsiblePanelComponent } from '../panel/collapsible-panel.component';
|
|
9
11
|
import { BeforeHistoryViewEventArgs, BeforeListManagementEventArgs } from '../types/form-events';
|
|
10
12
|
import { RecordChangesComponent } from '@memberjunction/ng-record-changes';
|
|
11
13
|
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
14
|
+
import { FormSlotCoordinator } from '../panel-slot/form-slot-coordinator.service';
|
|
12
15
|
import * as i0 from "@angular/core";
|
|
13
16
|
import * as i1 from "@memberjunction/ng-record-changes";
|
|
14
17
|
import * as i2 from "@memberjunction/ng-list-management";
|
|
@@ -16,19 +19,35 @@ import * as i3 from "@memberjunction/ng-record-tags";
|
|
|
16
19
|
import * as i4 from "../toolbar/form-toolbar.component";
|
|
17
20
|
import * as i5 from "../section-manager/section-manager.component";
|
|
18
21
|
import * as i6 from "../isa-related-panel/isa-related-panel.component";
|
|
22
|
+
import * as i7 from "../panel-slot/form-panel-slot.component";
|
|
19
23
|
const _c0 = [[["", "before-toolbar", ""]], "*"];
|
|
20
24
|
const _c1 = ["[before-toolbar]", "*"];
|
|
21
25
|
const _c2 = a0 => [a0];
|
|
22
26
|
const _c3 = (a0, a1, a2) => ({ mode: "manage", entityId: a0, entityName: a1, recordIds: a2, allowCreate: true });
|
|
23
|
-
function
|
|
27
|
+
function MjRecordFormContainerComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
24
28
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
25
|
-
i0.ɵɵelementStart(0, "
|
|
26
|
-
i0.ɵɵ
|
|
29
|
+
i0.ɵɵelementStart(0, "mj-form-toolbar", 12);
|
|
30
|
+
i0.ɵɵlistener("Navigate", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_Navigate_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnNavigate($event)); })("EditModeChange", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_EditModeChange_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnEditModeChange($event)); })("BeforeSave", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_BeforeSave_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.BeforeSave.emit($event)); })("SaveRequested", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_SaveRequested_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnSaveRequested()); })("BeforeCancel", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_BeforeCancel_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.BeforeCancel.emit($event)); })("CancelRequested", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_CancelRequested_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnCancelRequested()); })("BeforeDelete", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_BeforeDelete_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.BeforeDelete.emit($event)); })("DeleteRequested", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_DeleteRequested_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDeleteRequested()); })("FavoriteToggled", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_FavoriteToggled_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnFavoriteToggled()); })("BeforeHistoryView", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_BeforeHistoryView_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.BeforeHistoryView.emit($event)); })("HistoryRequested", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_HistoryRequested_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnHistoryRequested()); })("BeforeListManagement", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_BeforeListManagement_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.BeforeListManagement.emit($event)); })("ListManagementRequested", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_ListManagementRequested_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnListManagementRequested()); })("ShowChangesRequested", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_ShowChangesRequested_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnShowChangesRequested()); })("CustomButtonClick", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_CustomButtonClick_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CustomButtonClick.emit($event)); })("FilterChange", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_FilterChange_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnFilterChange($event)); })("ExpandAllRequested", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_ExpandAllRequested_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnExpandAll()); })("CollapseAllRequested", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_CollapseAllRequested_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnCollapseAll()); })("ShowEmptyFieldsChange", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_ShowEmptyFieldsChange_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnShowEmptyFieldsChange($event)); })("WidthModeChange", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_WidthModeChange_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnWidthModeChange($event)); })("ResetSectionOrderRequested", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_ResetSectionOrderRequested_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnResetSectionOrder()); })("ManageSectionsRequested", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_ManageSectionsRequested_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnManageSections()); })("TagsPanelToggled", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_TagsPanelToggled_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnTagsPanelToggled()); })("VariantPicked", function MjRecordFormContainerComponent_Conditional_1_Template_mj_form_toolbar_VariantPicked_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnVariantPicked($event)); });
|
|
27
31
|
i0.ɵɵelementEnd();
|
|
28
|
-
|
|
32
|
+
} if (rf & 2) {
|
|
33
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
34
|
+
i0.ɵɵproperty("Record", ctx_r1.EffectiveRecord)("EditMode", ctx_r1.EffectiveEditMode)("UserCanEdit", ctx_r1.EffectiveUserCanEdit)("UserCanDelete", ctx_r1.EffectiveUserCanDelete)("IsFavorite", ctx_r1.EffectiveIsFavorite)("FavoriteInitDone", ctx_r1.EffectiveFavoriteInitDone)("IsDirty", ctx_r1.EffectiveIsDirty)("DirtyFieldNames", ctx_r1.EffectiveDirtyFieldNames)("ListCount", ctx_r1.ListCount)("TagCount", ctx_r1.TagCount)("VersionCount", ctx_r1.VersionCount)("EntityInfo", ctx_r1.EffectiveEntityInfo)("Config", ctx_r1.EffectiveToolbarConfig)("IsSaving", ctx_r1.EffectiveIsSaving)("VisibleSectionCount", ctx_r1.VisibleSectionCount)("TotalSectionCount", ctx_r1.TotalSectionCount)("ExpandedSectionCount", ctx_r1.ExpandedSectionCount)("SearchFilter", ctx_r1.EffectiveSearchFilter)("ShowEmptyFields", ctx_r1.EffectiveShowEmptyFields)("WidthMode", ctx_r1.EffectiveWidthMode)("HasCustomSectionOrder", ctx_r1.EffectiveHasCustomSectionOrder)("Variants", ctx_r1.EffectiveVariants)("CurrentVariantID", ctx_r1.EffectiveCurrentVariantID);
|
|
35
|
+
} }
|
|
36
|
+
function MjRecordFormContainerComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
37
|
+
i0.ɵɵelement(0, "mj-form-panel-slot", 5);
|
|
38
|
+
} if (rf & 2) {
|
|
39
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
40
|
+
i0.ɵɵproperty("Entity", ctx_r1.Record.EntityInfo.Name)("Record", ctx_r1.Record)("FormComponent", ctx_r1.FormComponent);
|
|
41
|
+
} }
|
|
42
|
+
function MjRecordFormContainerComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
43
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
44
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "div", 13);
|
|
45
|
+
i0.ɵɵelement(2, "i", 14);
|
|
46
|
+
i0.ɵɵelementEnd();
|
|
47
|
+
i0.ɵɵelementStart(3, "h3", 15);
|
|
29
48
|
i0.ɵɵtext(4, "No sections found");
|
|
30
49
|
i0.ɵɵelementEnd();
|
|
31
|
-
i0.ɵɵelementStart(5, "p",
|
|
50
|
+
i0.ɵɵelementStart(5, "p", 16);
|
|
32
51
|
i0.ɵɵtext(6, " No sections match \"");
|
|
33
52
|
i0.ɵɵelementStart(7, "strong");
|
|
34
53
|
i0.ɵɵtext(8);
|
|
@@ -36,8 +55,8 @@ function MjRecordFormContainerComponent_Conditional_7_Template(rf, ctx) { if (rf
|
|
|
36
55
|
i0.ɵɵtext(9, "\". ");
|
|
37
56
|
i0.ɵɵelement(10, "br");
|
|
38
57
|
i0.ɵɵtext(11, "Try a different search term or ");
|
|
39
|
-
i0.ɵɵelementStart(12, "a",
|
|
40
|
-
i0.ɵɵlistener("click", function
|
|
58
|
+
i0.ɵɵelementStart(12, "a", 17);
|
|
59
|
+
i0.ɵɵlistener("click", function MjRecordFormContainerComponent_Conditional_8_Template_a_click_12_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); ctx_r1.OnFilterChange(""); return i0.ɵɵresetView($event.preventDefault()); });
|
|
41
60
|
i0.ɵɵtext(13, "clear the search");
|
|
42
61
|
i0.ɵɵelementEnd();
|
|
43
62
|
i0.ɵɵtext(14, ". ");
|
|
@@ -47,28 +66,28 @@ function MjRecordFormContainerComponent_Conditional_7_Template(rf, ctx) { if (rf
|
|
|
47
66
|
i0.ɵɵadvance(8);
|
|
48
67
|
i0.ɵɵtextInterpolate(ctx_r1.EffectiveSearchFilter);
|
|
49
68
|
} }
|
|
50
|
-
function
|
|
51
|
-
const
|
|
52
|
-
i0.ɵɵelementStart(0, "mj-record-changes",
|
|
53
|
-
i0.ɵɵlistener("RestoreRequested", function
|
|
69
|
+
function MjRecordFormContainerComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
70
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
71
|
+
i0.ɵɵelementStart(0, "mj-record-changes", 18);
|
|
72
|
+
i0.ɵɵlistener("RestoreRequested", function MjRecordFormContainerComponent_Conditional_10_Template_mj_record_changes_RestoreRequested_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnRestoreRequested($event)); })("dialogClosed", function MjRecordFormContainerComponent_Conditional_10_Template_mj_record_changes_dialogClosed_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnRecordChangesClosed()); });
|
|
54
73
|
i0.ɵɵelementEnd();
|
|
55
74
|
} if (rf & 2) {
|
|
56
75
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
57
76
|
i0.ɵɵproperty("record", ctx_r1.EffectiveRecord)("AllowRestore", ctx_r1.EffectiveUserCanEdit);
|
|
58
77
|
} }
|
|
59
|
-
function
|
|
60
|
-
const
|
|
61
|
-
i0.ɵɵelementStart(0, "mj-record-tags",
|
|
62
|
-
i0.ɵɵlistener("PanelClosed", function
|
|
78
|
+
function MjRecordFormContainerComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
79
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
80
|
+
i0.ɵɵelementStart(0, "mj-record-tags", 19);
|
|
81
|
+
i0.ɵɵlistener("PanelClosed", function MjRecordFormContainerComponent_Conditional_11_Template_mj_record_tags_PanelClosed_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnTagsPanelClosed()); })("TagCountChanged", function MjRecordFormContainerComponent_Conditional_11_Template_mj_record_tags_TagCountChanged_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnTagCountChanged($event)); })("RecordNavigate", function MjRecordFormContainerComponent_Conditional_11_Template_mj_record_tags_RecordNavigate_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnTagsRecordNavigate($event)); })("WidthChanged", function MjRecordFormContainerComponent_Conditional_11_Template_mj_record_tags_WidthChanged_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnTagsPanelWidthChanged($event)); });
|
|
63
82
|
i0.ɵɵelementEnd();
|
|
64
83
|
} if (rf & 2) {
|
|
65
84
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
66
85
|
i0.ɵɵproperty("Record", ctx_r1.EffectiveRecord)("WidthPx", ctx_r1.TagsPanelWidth);
|
|
67
86
|
} }
|
|
68
|
-
function
|
|
69
|
-
const
|
|
70
|
-
i0.ɵɵelementStart(0, "mj-list-management-dialog",
|
|
71
|
-
i0.ɵɵlistener("complete", function
|
|
87
|
+
function MjRecordFormContainerComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
88
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
89
|
+
i0.ɵɵelementStart(0, "mj-list-management-dialog", 20);
|
|
90
|
+
i0.ɵɵlistener("complete", function MjRecordFormContainerComponent_Conditional_12_Template_mj_list_management_dialog_complete_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnListManagementClosed()); })("cancel", function MjRecordFormContainerComponent_Conditional_12_Template_mj_list_management_dialog_cancel_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnListManagementClosed()); });
|
|
72
91
|
i0.ɵɵelementEnd();
|
|
73
92
|
} if (rf & 2) {
|
|
74
93
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -150,6 +169,24 @@ export class MjRecordFormContainerComponent extends BaseAngularComponent {
|
|
|
150
169
|
IsSaving = false;
|
|
151
170
|
ToolbarConfig = DEFAULT_TOOLBAR_CONFIG;
|
|
152
171
|
WidthMode = 'centered';
|
|
172
|
+
/**
|
|
173
|
+
* Variants available for this entity record. When more than one variant is
|
|
174
|
+
* provided, a compact picker appears between the toolbar and the form body
|
|
175
|
+
* letting the user switch which form is rendered. Empty / single-variant
|
|
176
|
+
* lists hide the picker entirely.
|
|
177
|
+
*
|
|
178
|
+
* Each item is a plain object — we don't take a hard dep on the resolver's
|
|
179
|
+
* row type from here (this is a Generic component; the Explorer-level
|
|
180
|
+
* single-record component shapes the resolver row into this minimal form).
|
|
181
|
+
*/
|
|
182
|
+
Variants = [];
|
|
183
|
+
/**
|
|
184
|
+
* Override ID currently rendered. The picker highlights this entry. May be
|
|
185
|
+
* null when the active form is a class-based @RegisterClass form (no
|
|
186
|
+
* override is currently active) — in that case the picker still appears
|
|
187
|
+
* with "Default form" as the leading row.
|
|
188
|
+
*/
|
|
189
|
+
CurrentVariantID = null;
|
|
153
190
|
// ---- Outputs ----
|
|
154
191
|
/** Emitted for all navigation actions (the host app maps these to its routing) */
|
|
155
192
|
Navigate = new EventEmitter();
|
|
@@ -181,6 +218,14 @@ export class MjRecordFormContainerComponent extends BaseAngularComponent {
|
|
|
181
218
|
ShowChangesRequested = new EventEmitter();
|
|
182
219
|
/** Emitted when a custom toolbar button is clicked */
|
|
183
220
|
CustomButtonClick = new EventEmitter();
|
|
221
|
+
/**
|
|
222
|
+
* Emitted when the user chooses a different form variant from the picker.
|
|
223
|
+
* Carries the selected variant's override ID, or null when the user picks
|
|
224
|
+
* the "Default form" row. The host is responsible for persisting the choice
|
|
225
|
+
* (via FormResolverService.SetSelectedVariant) and reloading the record so
|
|
226
|
+
* the new form mounts.
|
|
227
|
+
*/
|
|
228
|
+
VariantChange = new EventEmitter();
|
|
184
229
|
// ---- Content Children ----
|
|
185
230
|
Panels;
|
|
186
231
|
// ---- FormComponent accessor ----
|
|
@@ -231,6 +276,24 @@ export class MjRecordFormContainerComponent extends BaseAngularComponent {
|
|
|
231
276
|
}
|
|
232
277
|
return this.WidthMode;
|
|
233
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* Whether the in-form toolbar renders at all. Driven by the form's
|
|
281
|
+
* `Config.Toolbar`: an explicit `null` (the dialog/slide-in default) hides
|
|
282
|
+
* the entire toolbar so the surrounding chrome can own Save/Cancel/title.
|
|
283
|
+
* Any other value (undefined or a partial config) keeps the toolbar.
|
|
284
|
+
*/
|
|
285
|
+
get EffectiveShowToolbar() {
|
|
286
|
+
return ResolveFormShowToolbar(this.fc?.Config);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Effective toolbar config: the bound `ToolbarConfig` (or the default)
|
|
290
|
+
* with the form's `Config.Toolbar` partial merged on top. This is the
|
|
291
|
+
* no-regeneration bridge — generated templates never bind `[Config]`,
|
|
292
|
+
* yet per-instance toolbar tweaks still take effect through `fc.Config`.
|
|
293
|
+
*/
|
|
294
|
+
get EffectiveToolbarConfig() {
|
|
295
|
+
return ResolveFormToolbarConfig(this.ToolbarConfig ?? DEFAULT_TOOLBAR_CONFIG, this.fc?.Config);
|
|
296
|
+
}
|
|
234
297
|
get EffectiveSearchFilter() {
|
|
235
298
|
return this.fc?.searchFilter ?? '';
|
|
236
299
|
}
|
|
@@ -682,6 +745,54 @@ export class MjRecordFormContainerComponent extends BaseAngularComponent {
|
|
|
682
745
|
this.cdr.markForCheck();
|
|
683
746
|
}
|
|
684
747
|
}
|
|
748
|
+
// ---- Variant picker ----
|
|
749
|
+
/** Whether the variant dropdown menu is currently open. Toggled by the
|
|
750
|
+
* control's click handler; closed on blur or after a row is picked. */
|
|
751
|
+
_variantMenuOpen = false;
|
|
752
|
+
/**
|
|
753
|
+
* Effective variants — prefer the form component's list (set by the host
|
|
754
|
+
* resolver) when present, fall back to the directly-bound @Input. This
|
|
755
|
+
* means generated form templates don't need to bind [Variants] explicitly;
|
|
756
|
+
* the host populates `instance.Variants` post-construction and the
|
|
757
|
+
* container reads it through this accessor.
|
|
758
|
+
*/
|
|
759
|
+
get EffectiveVariants() {
|
|
760
|
+
return this.fc?.Variants
|
|
761
|
+
?? this.Variants
|
|
762
|
+
?? [];
|
|
763
|
+
}
|
|
764
|
+
get EffectiveCurrentVariantID() {
|
|
765
|
+
return this.fc?.CurrentVariantID ?? this.CurrentVariantID;
|
|
766
|
+
}
|
|
767
|
+
/** Whether to show the variant picker at all. Hidden when the entity has
|
|
768
|
+
* zero or one applicable variant — there's nothing to switch between. */
|
|
769
|
+
get ShowVariantPicker() {
|
|
770
|
+
return (this.EffectiveVariants?.length ?? 0) > 1;
|
|
771
|
+
}
|
|
772
|
+
/** Label for the currently-selected variant (or "Default form" if none). */
|
|
773
|
+
get CurrentVariantLabel() {
|
|
774
|
+
const v = this.EffectiveVariants?.find(x => UUIDsEqual(x.ID, this.EffectiveCurrentVariantID));
|
|
775
|
+
return v?.Label ?? 'Default form';
|
|
776
|
+
}
|
|
777
|
+
/** Compact subtitle: scope + status, e.g. "User · Active". */
|
|
778
|
+
variantSubtitle(v) {
|
|
779
|
+
return `${v.Scope} · ${v.Status}`;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* User picked an item from the variant menu. If the host installed a
|
|
783
|
+
* handler via `instance.OnVariantChanged`, call it; otherwise emit the
|
|
784
|
+
* VariantChange event for standalone consumers.
|
|
785
|
+
*/
|
|
786
|
+
OnVariantPicked(variantID) {
|
|
787
|
+
if (variantID === this.EffectiveCurrentVariantID)
|
|
788
|
+
return;
|
|
789
|
+
if (this.fc && typeof this.fc.OnVariantChanged === 'function') {
|
|
790
|
+
this.fc.OnVariantChanged(variantID);
|
|
791
|
+
}
|
|
792
|
+
else {
|
|
793
|
+
this.VariantChange.emit(variantID);
|
|
794
|
+
}
|
|
795
|
+
}
|
|
685
796
|
// ---- Section Manager Handlers ----
|
|
686
797
|
OnManageSections() {
|
|
687
798
|
this.ShowSectionManager = true;
|
|
@@ -711,47 +822,48 @@ export class MjRecordFormContainerComponent extends BaseAngularComponent {
|
|
|
711
822
|
} if (rf & 2) {
|
|
712
823
|
let _t;
|
|
713
824
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recordChangesDrawer = _t.first);
|
|
714
|
-
} }, inputs: { Record: "Record", FormComponent: "FormComponent", EntityInfo: "EntityInfo", EditMode: "EditMode", UserCanEdit: "UserCanEdit", UserCanDelete: "UserCanDelete", IsFavorite: "IsFavorite", FavoriteInitDone: "FavoriteInitDone", IsDirty: "IsDirty", DirtyFieldNames: "DirtyFieldNames", ListCount: "ListCount", IsSaving: "IsSaving", ToolbarConfig: "ToolbarConfig", WidthMode: "WidthMode" }, outputs: { Navigate: "Navigate", EditModeChange: "EditModeChange", BeforeSave: "BeforeSave", SaveRequested: "SaveRequested", BeforeCancel: "BeforeCancel", CancelRequested: "CancelRequested", BeforeDelete: "BeforeDelete", DeleteRequested: "DeleteRequested", FavoriteToggled: "FavoriteToggled", BeforeHistoryView: "BeforeHistoryView", HistoryRequested: "HistoryRequested", BeforeListManagement: "BeforeListManagement", ListManagementRequested: "ListManagementRequested", ShowChangesRequested: "ShowChangesRequested", CustomButtonClick: "CustomButtonClick" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1, decls:
|
|
825
|
+
} }, inputs: { Record: "Record", FormComponent: "FormComponent", EntityInfo: "EntityInfo", EditMode: "EditMode", UserCanEdit: "UserCanEdit", UserCanDelete: "UserCanDelete", IsFavorite: "IsFavorite", FavoriteInitDone: "FavoriteInitDone", IsDirty: "IsDirty", DirtyFieldNames: "DirtyFieldNames", ListCount: "ListCount", IsSaving: "IsSaving", ToolbarConfig: "ToolbarConfig", WidthMode: "WidthMode", Variants: "Variants", CurrentVariantID: "CurrentVariantID" }, outputs: { Navigate: "Navigate", EditModeChange: "EditModeChange", BeforeSave: "BeforeSave", SaveRequested: "SaveRequested", BeforeCancel: "BeforeCancel", CancelRequested: "CancelRequested", BeforeDelete: "BeforeDelete", DeleteRequested: "DeleteRequested", FavoriteToggled: "FavoriteToggled", BeforeHistoryView: "BeforeHistoryView", HistoryRequested: "HistoryRequested", BeforeListManagement: "BeforeListManagement", ListManagementRequested: "ListManagementRequested", ShowChangesRequested: "ShowChangesRequested", CustomButtonClick: "CustomButtonClick", VariantChange: "VariantChange" }, standalone: false, features: [i0.ɵɵProvidersFeature([FormSlotCoordinator]), i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1, decls: 14, vars: 18, consts: [[3, "Record", "EditMode", "UserCanEdit", "UserCanDelete", "IsFavorite", "FavoriteInitDone", "IsDirty", "DirtyFieldNames", "ListCount", "TagCount", "VersionCount", "EntityInfo", "Config", "IsSaving", "VisibleSectionCount", "TotalSectionCount", "ExpandedSectionCount", "SearchFilter", "ShowEmptyFields", "WidthMode", "HasCustomSectionOrder", "Variants", "CurrentVariantID"], [1, "mj-forms-scroll-area"], [1, "mj-forms-panels-container"], [1, "mj-forms-layout-row"], [1, "mj-forms-all-panels"], ["Slot", "after-everything", 3, "Entity", "Record", "FormComponent"], [1, "mj-forms-empty-search-state"], [3, "Navigate", "Record", "EditMode", "Collapsed"], [3, "record", "AllowRestore"], [3, "Record", "WidthPx"], [3, "visible", "config"], [3, "SectionOrderChange", "ResetRequested", "Closed", "Sections", "SectionOrder", "Visible"], [3, "Navigate", "EditModeChange", "BeforeSave", "SaveRequested", "BeforeCancel", "CancelRequested", "BeforeDelete", "DeleteRequested", "FavoriteToggled", "BeforeHistoryView", "HistoryRequested", "BeforeListManagement", "ListManagementRequested", "ShowChangesRequested", "CustomButtonClick", "FilterChange", "ExpandAllRequested", "CollapseAllRequested", "ShowEmptyFieldsChange", "WidthModeChange", "ResetSectionOrderRequested", "ManageSectionsRequested", "TagsPanelToggled", "VariantPicked", "Record", "EditMode", "UserCanEdit", "UserCanDelete", "IsFavorite", "FavoriteInitDone", "IsDirty", "DirtyFieldNames", "ListCount", "TagCount", "VersionCount", "EntityInfo", "Config", "IsSaving", "VisibleSectionCount", "TotalSectionCount", "ExpandedSectionCount", "SearchFilter", "ShowEmptyFields", "WidthMode", "HasCustomSectionOrder", "Variants", "CurrentVariantID"], [1, "mj-forms-empty-search-icon"], [1, "fa-solid", "fa-magnifying-glass"], [1, "mj-forms-empty-search-title"], [1, "mj-forms-empty-search-message"], ["href", "#", 1, "mj-forms-empty-search-link", 3, "click"], [3, "RestoreRequested", "dialogClosed", "record", "AllowRestore"], [3, "PanelClosed", "TagCountChanged", "RecordNavigate", "WidthChanged", "Record", "WidthPx"], [3, "complete", "cancel", "visible", "config"]], template: function MjRecordFormContainerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
715
826
|
i0.ɵɵprojectionDef(_c0);
|
|
716
827
|
i0.ɵɵprojection(0);
|
|
717
|
-
i0.ɵɵ
|
|
718
|
-
i0.ɵɵlistener("Navigate", function MjRecordFormContainerComponent_Template_mj_form_toolbar_Navigate_1_listener($event) { return ctx.OnNavigate($event); })("EditModeChange", function MjRecordFormContainerComponent_Template_mj_form_toolbar_EditModeChange_1_listener($event) { return ctx.OnEditModeChange($event); })("BeforeSave", function MjRecordFormContainerComponent_Template_mj_form_toolbar_BeforeSave_1_listener($event) { return ctx.BeforeSave.emit($event); })("SaveRequested", function MjRecordFormContainerComponent_Template_mj_form_toolbar_SaveRequested_1_listener() { return ctx.OnSaveRequested(); })("BeforeCancel", function MjRecordFormContainerComponent_Template_mj_form_toolbar_BeforeCancel_1_listener($event) { return ctx.BeforeCancel.emit($event); })("CancelRequested", function MjRecordFormContainerComponent_Template_mj_form_toolbar_CancelRequested_1_listener() { return ctx.OnCancelRequested(); })("BeforeDelete", function MjRecordFormContainerComponent_Template_mj_form_toolbar_BeforeDelete_1_listener($event) { return ctx.BeforeDelete.emit($event); })("DeleteRequested", function MjRecordFormContainerComponent_Template_mj_form_toolbar_DeleteRequested_1_listener() { return ctx.OnDeleteRequested(); })("FavoriteToggled", function MjRecordFormContainerComponent_Template_mj_form_toolbar_FavoriteToggled_1_listener() { return ctx.OnFavoriteToggled(); })("BeforeHistoryView", function MjRecordFormContainerComponent_Template_mj_form_toolbar_BeforeHistoryView_1_listener($event) { return ctx.BeforeHistoryView.emit($event); })("HistoryRequested", function MjRecordFormContainerComponent_Template_mj_form_toolbar_HistoryRequested_1_listener() { return ctx.OnHistoryRequested(); })("BeforeListManagement", function MjRecordFormContainerComponent_Template_mj_form_toolbar_BeforeListManagement_1_listener($event) { return ctx.BeforeListManagement.emit($event); })("ListManagementRequested", function MjRecordFormContainerComponent_Template_mj_form_toolbar_ListManagementRequested_1_listener() { return ctx.OnListManagementRequested(); })("ShowChangesRequested", function MjRecordFormContainerComponent_Template_mj_form_toolbar_ShowChangesRequested_1_listener() { return ctx.OnShowChangesRequested(); })("CustomButtonClick", function MjRecordFormContainerComponent_Template_mj_form_toolbar_CustomButtonClick_1_listener($event) { return ctx.CustomButtonClick.emit($event); })("FilterChange", function MjRecordFormContainerComponent_Template_mj_form_toolbar_FilterChange_1_listener($event) { return ctx.OnFilterChange($event); })("ExpandAllRequested", function MjRecordFormContainerComponent_Template_mj_form_toolbar_ExpandAllRequested_1_listener() { return ctx.OnExpandAll(); })("CollapseAllRequested", function MjRecordFormContainerComponent_Template_mj_form_toolbar_CollapseAllRequested_1_listener() { return ctx.OnCollapseAll(); })("ShowEmptyFieldsChange", function MjRecordFormContainerComponent_Template_mj_form_toolbar_ShowEmptyFieldsChange_1_listener($event) { return ctx.OnShowEmptyFieldsChange($event); })("WidthModeChange", function MjRecordFormContainerComponent_Template_mj_form_toolbar_WidthModeChange_1_listener($event) { return ctx.OnWidthModeChange($event); })("ResetSectionOrderRequested", function MjRecordFormContainerComponent_Template_mj_form_toolbar_ResetSectionOrderRequested_1_listener() { return ctx.OnResetSectionOrder(); })("ManageSectionsRequested", function MjRecordFormContainerComponent_Template_mj_form_toolbar_ManageSectionsRequested_1_listener() { return ctx.OnManageSections(); })("TagsPanelToggled", function MjRecordFormContainerComponent_Template_mj_form_toolbar_TagsPanelToggled_1_listener() { return ctx.OnTagsPanelToggled(); });
|
|
719
|
-
i0.ɵɵelementEnd();
|
|
828
|
+
i0.ɵɵconditionalCreate(1, MjRecordFormContainerComponent_Conditional_1_Template, 1, 23, "mj-form-toolbar", 0);
|
|
720
829
|
i0.ɵɵelementStart(2, "div", 1)(3, "div", 2)(4, "div", 3)(5, "div", 4);
|
|
721
830
|
i0.ɵɵprojection(6, 1);
|
|
722
|
-
i0.ɵɵconditionalCreate(7, MjRecordFormContainerComponent_Conditional_7_Template,
|
|
831
|
+
i0.ɵɵconditionalCreate(7, MjRecordFormContainerComponent_Conditional_7_Template, 1, 3, "mj-form-panel-slot", 5);
|
|
832
|
+
i0.ɵɵconditionalCreate(8, MjRecordFormContainerComponent_Conditional_8_Template, 15, 1, "div", 6);
|
|
723
833
|
i0.ɵɵelementEnd();
|
|
724
|
-
i0.ɵɵelementStart(
|
|
725
|
-
i0.ɵɵlistener("Navigate", function
|
|
834
|
+
i0.ɵɵelementStart(9, "mj-isa-related-panel", 7);
|
|
835
|
+
i0.ɵɵlistener("Navigate", function MjRecordFormContainerComponent_Template_mj_isa_related_panel_Navigate_9_listener($event) { return ctx.OnNavigate($event); });
|
|
726
836
|
i0.ɵɵelementEnd()()()();
|
|
727
|
-
i0.ɵɵconditionalCreate(
|
|
728
|
-
i0.ɵɵconditionalCreate(
|
|
729
|
-
i0.ɵɵconditionalCreate(
|
|
730
|
-
i0.ɵɵelementStart(
|
|
731
|
-
i0.ɵɵlistener("SectionOrderChange", function
|
|
837
|
+
i0.ɵɵconditionalCreate(10, MjRecordFormContainerComponent_Conditional_10_Template, 1, 2, "mj-record-changes", 8);
|
|
838
|
+
i0.ɵɵconditionalCreate(11, MjRecordFormContainerComponent_Conditional_11_Template, 1, 2, "mj-record-tags", 9);
|
|
839
|
+
i0.ɵɵconditionalCreate(12, MjRecordFormContainerComponent_Conditional_12_Template, 1, 8, "mj-list-management-dialog", 10);
|
|
840
|
+
i0.ɵɵelementStart(13, "mj-section-manager", 11);
|
|
841
|
+
i0.ɵɵlistener("SectionOrderChange", function MjRecordFormContainerComponent_Template_mj_section_manager_SectionOrderChange_13_listener($event) { return ctx.OnSectionOrderChange($event); })("ResetRequested", function MjRecordFormContainerComponent_Template_mj_section_manager_ResetRequested_13_listener() { return ctx.OnSectionManagerReset(); })("Closed", function MjRecordFormContainerComponent_Template_mj_section_manager_Closed_13_listener() { return ctx.OnSectionManagerClosed(); });
|
|
732
842
|
i0.ɵɵelementEnd();
|
|
733
843
|
} if (rf & 2) {
|
|
734
844
|
i0.ɵɵadvance();
|
|
735
|
-
i0.ɵɵ
|
|
845
|
+
i0.ɵɵconditional(ctx.EffectiveShowToolbar ? 1 : -1);
|
|
736
846
|
i0.ɵɵadvance(2);
|
|
737
847
|
i0.ɵɵclassProp("mj-forms-panels--full-width", ctx.EffectiveWidthMode === "full-width")("mj-forms-panels--edit-mode", ctx.EffectiveEditMode)("mj-forms-panels--has-isa-panel", ctx.HasIsaRelatedItems);
|
|
738
848
|
i0.ɵɵadvance(4);
|
|
739
|
-
i0.ɵɵconditional(ctx.
|
|
849
|
+
i0.ɵɵconditional(ctx.Record && ctx.FormComponent ? 7 : -1);
|
|
850
|
+
i0.ɵɵadvance();
|
|
851
|
+
i0.ɵɵconditional(ctx.EffectiveSearchFilter && ctx.VisibleSectionCount === 0 ? 8 : -1);
|
|
740
852
|
i0.ɵɵadvance();
|
|
741
853
|
i0.ɵɵproperty("Record", ctx.EffectiveRecord)("EditMode", ctx.EffectiveEditMode)("Collapsed", ctx.EffectiveWidthMode === "full-width");
|
|
742
854
|
i0.ɵɵadvance();
|
|
743
|
-
i0.ɵɵconditional(ctx.ShowRecordChanges && ctx.EffectiveRecord ?
|
|
855
|
+
i0.ɵɵconditional(ctx.ShowRecordChanges && ctx.EffectiveRecord ? 10 : -1);
|
|
744
856
|
i0.ɵɵadvance();
|
|
745
|
-
i0.ɵɵconditional(ctx.ShowTagsPanel && ctx.EffectiveRecord ?
|
|
857
|
+
i0.ɵɵconditional(ctx.ShowTagsPanel && ctx.EffectiveRecord ? 11 : -1);
|
|
746
858
|
i0.ɵɵadvance();
|
|
747
|
-
i0.ɵɵconditional(ctx.ShowListManagement && ctx.EffectiveRecord ?
|
|
859
|
+
i0.ɵɵconditional(ctx.ShowListManagement && ctx.EffectiveRecord ? 12 : -1);
|
|
748
860
|
i0.ɵɵadvance();
|
|
749
861
|
i0.ɵɵproperty("Sections", ctx.SectionManagerItems)("SectionOrder", ctx.SectionManagerOrder)("Visible", ctx.ShowSectionManager);
|
|
750
|
-
} }, dependencies: [i1.RecordChangesComponent, i2.ListManagementDialogComponent, i3.RecordTagsComponent, i4.MjFormToolbarComponent, i5.MjSectionManagerComponent, i6.MjIsaRelatedPanelComponent], styles: ["/* ============================================\n RECORD FORM CONTAINER \u2014 uses global --mj-* design tokens\n Top-level wrapper: toolbar + scrollable content\n ============================================ */\nmj-record-form-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n/* ViewEncapsulation.None fallback \u2014 ensure the element itself constrains overflow */\nmj-record-form-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n/* ============================================\n SCROLL AREA (full-width so mouse wheel works anywhere)\n ============================================ */\n.mj-forms-scroll-area {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n background: var(--mj-bg-page);\n}\n\n/* ============================================\n PANELS CONTAINER (centered content within scroll area)\n ============================================ */\n.mj-forms-panels-container {\n padding: 24px 32px 48px;\n max-width: 920px;\n margin: 0 auto;\n width: 100%;\n box-sizing: border-box;\n}\n\n/* Widen max-width when ISA side panel is present */\n.mj-forms-panels--has-isa-panel {\n max-width: 1240px;\n}\n\n.mj-forms-panels--full-width {\n max-width: none;\n padding-left: 24px;\n padding-right: 24px;\n}\n\n/* Flex row layout: form panels + optional ISA side panel */\n.mj-forms-layout-row {\n display: flex;\n gap: 20px;\n align-items: flex-start;\n}\n\n/* All panels in a single flex container \u2014 CSS order drives sequencing */\n.mj-forms-all-panels {\n display: flex;\n flex-direction: column;\n gap: 16px;\n flex: 1;\n min-width: 0;\n}\n\n/* Hide related entity panels in edit mode (variant host class on mj-collapsible-panel) */\n.mj-forms-panels--edit-mode .mj-panel--related-entity {\n display: none;\n}\n\n/* ============================================\n EMPTY SEARCH STATE\n ============================================ */\n.mj-forms-empty-search-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 80px 24px;\n text-align: center;\n min-height: 400px;\n}\n\n.mj-forms-empty-search-icon {\n width: 80px;\n height: 80px;\n border-radius: var(--mj-radius-full);\n background: var(--mj-bg-surface-sunken);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 24px;\n}\n\n.mj-forms-empty-search-icon i {\n font-size: 32px;\n color: var(--mj-text-muted);\n}\n\n.mj-forms-empty-search-title {\n font-size: var(--mj-text-xl);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-primary);\n margin: 0 0 12px 0;\n}\n\n.mj-forms-empty-search-message {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n line-height: 1.6;\n max-width: 400px;\n margin: 0;\n}\n\n.mj-forms-empty-search-message strong {\n color: var(--mj-text-primary);\n font-weight: var(--mj-font-semibold);\n}\n\n.mj-forms-empty-search-link {\n color: var(--mj-brand-primary);\n text-decoration: none;\n font-weight: var(--mj-font-medium);\n}\n\n.mj-forms-empty-search-link:hover {\n text-decoration: underline;\n}\n\n/* ============================================\n RESPONSIVE\n ============================================ */\n@media (max-width: 768px) {\n .mj-forms-panels-container {\n padding: 16px 12px 32px;\n }\n}\n"], encapsulation: 2, changeDetection: 0 });
|
|
862
|
+
} }, dependencies: [i1.RecordChangesComponent, i2.ListManagementDialogComponent, i3.RecordTagsComponent, i4.MjFormToolbarComponent, i5.MjSectionManagerComponent, i6.MjIsaRelatedPanelComponent, i7.FormPanelSlotComponent], styles: ["/* ============================================\n RECORD FORM CONTAINER \u2014 uses global --mj-* design tokens\n Top-level wrapper: toolbar + scrollable content\n ============================================ */\nmj-record-form-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n/* ViewEncapsulation.None fallback \u2014 ensure the element itself constrains overflow */\nmj-record-form-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n/* ============================================\n SCROLL AREA (full-width so mouse wheel works anywhere)\n ============================================ */\n.mj-forms-scroll-area {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n background: var(--mj-bg-page);\n}\n\n/* ============================================\n PANELS CONTAINER (centered content within scroll area)\n ============================================ */\n.mj-forms-panels-container {\n padding: 24px 32px 48px;\n max-width: 920px;\n margin: 0 auto;\n width: 100%;\n box-sizing: border-box;\n}\n\n/* Widen max-width when ISA side panel is present */\n.mj-forms-panels--has-isa-panel {\n max-width: 1240px;\n}\n\n.mj-forms-panels--full-width {\n max-width: none;\n padding-left: 24px;\n padding-right: 24px;\n}\n\n/* Flex row layout: form panels + optional ISA side panel */\n.mj-forms-layout-row {\n display: flex;\n gap: 20px;\n align-items: flex-start;\n}\n\n/* All panels in a single flex container \u2014 CSS order drives sequencing */\n.mj-forms-all-panels {\n display: flex;\n flex-direction: column;\n gap: 16px;\n flex: 1;\n min-width: 0;\n}\n\n/* Hide related entity panels in edit mode (variant host class on mj-collapsible-panel) */\n.mj-forms-panels--edit-mode .mj-panel--related-entity {\n display: none;\n}\n\n/* ============================================\n EMPTY SEARCH STATE\n ============================================ */\n.mj-forms-empty-search-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 80px 24px;\n text-align: center;\n min-height: 400px;\n}\n\n.mj-forms-empty-search-icon {\n width: 80px;\n height: 80px;\n border-radius: var(--mj-radius-full);\n background: var(--mj-bg-surface-sunken);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 24px;\n}\n\n.mj-forms-empty-search-icon i {\n font-size: 32px;\n color: var(--mj-text-muted);\n}\n\n.mj-forms-empty-search-title {\n font-size: var(--mj-text-xl);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-primary);\n margin: 0 0 12px 0;\n}\n\n.mj-forms-empty-search-message {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n line-height: 1.6;\n max-width: 400px;\n margin: 0;\n}\n\n.mj-forms-empty-search-message strong {\n color: var(--mj-text-primary);\n font-weight: var(--mj-font-semibold);\n}\n\n.mj-forms-empty-search-link {\n color: var(--mj-brand-primary);\n text-decoration: none;\n font-weight: var(--mj-font-medium);\n}\n\n.mj-forms-empty-search-link:hover {\n text-decoration: underline;\n}\n\n/* ============================================\n RESPONSIVE\n ============================================ */\n@media (max-width: 768px) {\n .mj-forms-panels-container {\n padding: 16px 12px 32px;\n }\n}\n\n/* ====================================================================\n VARIANT PICKER \u2014 between toolbar and form body\n Compact \"Form: <name> \u25BE\" row that appears when more than one variant\n is applicable for the current entity record.\n ==================================================================== */\n\n.mj-form-variant-picker {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 6px 18px;\n background: var(--mj-bg-surface-card);\n border-bottom: 1px solid var(--mj-border-default);\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n.mj-form-variant-picker-icon {\n color: var(--mj-brand-primary);\n font-size: 12px;\n}\n.mj-form-variant-picker-label {\n font-weight: 600;\n color: var(--mj-text-secondary);\n}\n.mj-form-variant-picker-control {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 8px);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n cursor: pointer;\n outline: none;\n user-select: none;\n min-width: 160px;\n}\n.mj-form-variant-picker-control:hover,\n.mj-form-variant-picker-control:focus,\n.mj-form-variant-picker-control.open {\n border-color: var(--mj-border-focus);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n.mj-form-variant-picker-current {\n font-weight: 600;\n flex: 1;\n}\n.mj-form-variant-picker-menu {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n z-index: 50;\n min-width: 280px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 8px);\n box-shadow: var(--mj-shadow-md, 0 4px 12px rgba(15, 23, 42, 0.08));\n padding: 4px;\n max-height: 320px;\n overflow: auto;\n}\n.mj-form-variant-picker-row {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n border-radius: 6px;\n cursor: pointer;\n}\n.mj-form-variant-picker-row:hover {\n background: var(--mj-bg-surface-hover);\n}\n.mj-form-variant-picker-row.current {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n}\n.mj-form-variant-picker-row.inactive {\n opacity: 0.7;\n}\n.mj-form-variant-picker-row-main {\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n min-width: 0;\n}\n.mj-form-variant-picker-row-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.mj-form-variant-picker-row-sub {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n.mj-form-variant-picker-check {\n color: var(--mj-brand-primary);\n font-size: 11px;\n}\n\n/* Retrospective fix #8 \u2014 visually distinguish the Default row from variants. */\n.mj-form-variant-picker-row.mj-form-variant-picker-default {\n border-bottom: 1px dashed var(--mj-border-default);\n margin-bottom: 4px;\n padding-bottom: 10px;\n}\n.mj-form-variant-picker-default-tag {\n color: var(--mj-text-muted);\n font-weight: 400;\n font-size: 11px;\n margin-left: 4px;\n}\n"], encapsulation: 2, changeDetection: 0 });
|
|
751
863
|
}
|
|
752
864
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjRecordFormContainerComponent, [{
|
|
753
865
|
type: Component,
|
|
754
|
-
args: [{ standalone: false, selector: 'mj-record-form-container', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!-- ============================================\n BEFORE-TOOLBAR SLOT\n ============================================ -->\n<ng-content select=\"[before-toolbar]\"></ng-content>\n\n<!-- ============================================\n TOOLBAR (bridges FormComponent state \u2192 toolbar inputs)\n ============================================ -->\n<mj-form-toolbar\n [Record]=\"EffectiveRecord\"\n [EditMode]=\"EffectiveEditMode\"\n [UserCanEdit]=\"EffectiveUserCanEdit\"\n [UserCanDelete]=\"EffectiveUserCanDelete\"\n [IsFavorite]=\"EffectiveIsFavorite\"\n [FavoriteInitDone]=\"EffectiveFavoriteInitDone\"\n [IsDirty]=\"EffectiveIsDirty\"\n [DirtyFieldNames]=\"EffectiveDirtyFieldNames\"\n [ListCount]=\"ListCount\"\n [TagCount]=\"TagCount\"\n [VersionCount]=\"VersionCount\"\n [EntityInfo]=\"EffectiveEntityInfo\"\n [Config]=\"ToolbarConfig\"\n [IsSaving]=\"EffectiveIsSaving\"\n [VisibleSectionCount]=\"VisibleSectionCount\"\n [TotalSectionCount]=\"TotalSectionCount\"\n [ExpandedSectionCount]=\"ExpandedSectionCount\"\n [SearchFilter]=\"EffectiveSearchFilter\"\n [ShowEmptyFields]=\"EffectiveShowEmptyFields\"\n [WidthMode]=\"EffectiveWidthMode\"\n [HasCustomSectionOrder]=\"EffectiveHasCustomSectionOrder\"\n (Navigate)=\"OnNavigate($event)\"\n (EditModeChange)=\"OnEditModeChange($event)\"\n (BeforeSave)=\"BeforeSave.emit($event)\"\n (SaveRequested)=\"OnSaveRequested()\"\n (BeforeCancel)=\"BeforeCancel.emit($event)\"\n (CancelRequested)=\"OnCancelRequested()\"\n (BeforeDelete)=\"BeforeDelete.emit($event)\"\n (DeleteRequested)=\"OnDeleteRequested()\"\n (FavoriteToggled)=\"OnFavoriteToggled()\"\n (BeforeHistoryView)=\"BeforeHistoryView.emit($event)\"\n (HistoryRequested)=\"OnHistoryRequested()\"\n (BeforeListManagement)=\"BeforeListManagement.emit($event)\"\n (ListManagementRequested)=\"OnListManagementRequested()\"\n (ShowChangesRequested)=\"OnShowChangesRequested()\"\n (CustomButtonClick)=\"CustomButtonClick.emit($event)\"\n (FilterChange)=\"OnFilterChange($event)\"\n (ExpandAllRequested)=\"OnExpandAll()\"\n (CollapseAllRequested)=\"OnCollapseAll()\"\n (ShowEmptyFieldsChange)=\"OnShowEmptyFieldsChange($event)\"\n (WidthModeChange)=\"OnWidthModeChange($event)\"\n (ResetSectionOrderRequested)=\"OnResetSectionOrder()\"\n (ManageSectionsRequested)=\"OnManageSections()\"\n (TagsPanelToggled)=\"OnTagsPanelToggled()\">\n</mj-form-toolbar>\n\n<!-- ============================================\n SCROLL AREA (full-width so mouse wheel works anywhere)\n ============================================ -->\n<div class=\"mj-forms-scroll-area\">\n <div class=\"mj-forms-panels-container\"\n [class.mj-forms-panels--full-width]=\"EffectiveWidthMode === 'full-width'\"\n [class.mj-forms-panels--edit-mode]=\"EffectiveEditMode\"\n [class.mj-forms-panels--has-isa-panel]=\"HasIsaRelatedItems\">\n <!-- Flex row: form panels on left, ISA side panel on right -->\n <div class=\"mj-forms-layout-row\">\n <!-- All panels in a single flex container \u2014 CSS order drives sequencing -->\n <div class=\"mj-forms-all-panels\">\n <ng-content></ng-content>\n\n <!-- Empty state when no sections match search -->\n @if (EffectiveSearchFilter && VisibleSectionCount === 0) {\n <div class=\"mj-forms-empty-search-state\">\n <div class=\"mj-forms-empty-search-icon\">\n <i class=\"fa-solid fa-magnifying-glass\"></i>\n </div>\n <h3 class=\"mj-forms-empty-search-title\">No sections found</h3>\n <p class=\"mj-forms-empty-search-message\">\n No sections match \"<strong>{{ EffectiveSearchFilter }}</strong>\".\n <br>Try a different search term or <a href=\"#\" (click)=\"OnFilterChange(''); $event.preventDefault()\" class=\"mj-forms-empty-search-link\">clear the search</a>.\n </p>\n </div>\n }\n </div>\n\n <!-- IS-A Related Records Side Panel -->\n <mj-isa-related-panel\n [Record]=\"EffectiveRecord\"\n [EditMode]=\"EffectiveEditMode\"\n [Collapsed]=\"EffectiveWidthMode === 'full-width'\"\n (Navigate)=\"OnNavigate($event)\">\n </mj-isa-related-panel>\n </div>\n </div>\n</div>\n\n<!-- ============================================\n RECORD CHANGES DRAWER (shown when history button clicked)\n ============================================ -->\n@if (ShowRecordChanges && EffectiveRecord) {\n <mj-record-changes\n [record]=\"EffectiveRecord\"\n [AllowRestore]=\"EffectiveUserCanEdit\"\n (RestoreRequested)=\"OnRestoreRequested($event)\"\n (dialogClosed)=\"OnRecordChangesClosed()\">\n </mj-record-changes>\n}\n\n<!-- ============================================\n TAGS PANEL (shown when tags button clicked)\n ============================================ -->\n@if (ShowTagsPanel && EffectiveRecord) {\n <mj-record-tags\n [Record]=\"EffectiveRecord\"\n [WidthPx]=\"TagsPanelWidth\"\n (PanelClosed)=\"OnTagsPanelClosed()\"\n (TagCountChanged)=\"OnTagCountChanged($event)\"\n (RecordNavigate)=\"OnTagsRecordNavigate($event)\"\n (WidthChanged)=\"OnTagsPanelWidthChanged($event)\">\n </mj-record-tags>\n}\n\n<!-- ============================================\n LIST MANAGEMENT DIALOG (shown when lists button clicked)\n ============================================ -->\n@if (ShowListManagement && EffectiveRecord) {\n <mj-list-management-dialog\n [visible]=\"ShowListManagement\"\n [config]=\"{\n mode: 'manage',\n entityId: EffectiveRecord.EntityInfo.ID,\n entityName: EffectiveRecord.EntityInfo.Name,\n recordIds: [EffectiveRecord.PrimaryKey.Values()[0]],\n allowCreate: true\n }\"\n (complete)=\"OnListManagementClosed()\"\n (cancel)=\"OnListManagementClosed()\">\n </mj-list-management-dialog>\n}\n\n<!-- ============================================\n SECTION MANAGER DRAWER (shown when manage-sections button clicked)\n ============================================ -->\n<mj-section-manager\n [Sections]=\"SectionManagerItems\"\n [SectionOrder]=\"SectionManagerOrder\"\n [Visible]=\"ShowSectionManager\"\n (SectionOrderChange)=\"OnSectionOrderChange($event)\"\n (ResetRequested)=\"OnSectionManagerReset()\"\n (Closed)=\"OnSectionManagerClosed()\">\n</mj-section-manager>\n", styles: ["/* ============================================\n RECORD FORM CONTAINER \u2014 uses global --mj-* design tokens\n Top-level wrapper: toolbar + scrollable content\n ============================================ */\nmj-record-form-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n/* ViewEncapsulation.None fallback \u2014 ensure the element itself constrains overflow */\nmj-record-form-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n/* ============================================\n SCROLL AREA (full-width so mouse wheel works anywhere)\n ============================================ */\n.mj-forms-scroll-area {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n background: var(--mj-bg-page);\n}\n\n/* ============================================\n PANELS CONTAINER (centered content within scroll area)\n ============================================ */\n.mj-forms-panels-container {\n padding: 24px 32px 48px;\n max-width: 920px;\n margin: 0 auto;\n width: 100%;\n box-sizing: border-box;\n}\n\n/* Widen max-width when ISA side panel is present */\n.mj-forms-panels--has-isa-panel {\n max-width: 1240px;\n}\n\n.mj-forms-panels--full-width {\n max-width: none;\n padding-left: 24px;\n padding-right: 24px;\n}\n\n/* Flex row layout: form panels + optional ISA side panel */\n.mj-forms-layout-row {\n display: flex;\n gap: 20px;\n align-items: flex-start;\n}\n\n/* All panels in a single flex container \u2014 CSS order drives sequencing */\n.mj-forms-all-panels {\n display: flex;\n flex-direction: column;\n gap: 16px;\n flex: 1;\n min-width: 0;\n}\n\n/* Hide related entity panels in edit mode (variant host class on mj-collapsible-panel) */\n.mj-forms-panels--edit-mode .mj-panel--related-entity {\n display: none;\n}\n\n/* ============================================\n EMPTY SEARCH STATE\n ============================================ */\n.mj-forms-empty-search-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 80px 24px;\n text-align: center;\n min-height: 400px;\n}\n\n.mj-forms-empty-search-icon {\n width: 80px;\n height: 80px;\n border-radius: var(--mj-radius-full);\n background: var(--mj-bg-surface-sunken);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 24px;\n}\n\n.mj-forms-empty-search-icon i {\n font-size: 32px;\n color: var(--mj-text-muted);\n}\n\n.mj-forms-empty-search-title {\n font-size: var(--mj-text-xl);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-primary);\n margin: 0 0 12px 0;\n}\n\n.mj-forms-empty-search-message {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n line-height: 1.6;\n max-width: 400px;\n margin: 0;\n}\n\n.mj-forms-empty-search-message strong {\n color: var(--mj-text-primary);\n font-weight: var(--mj-font-semibold);\n}\n\n.mj-forms-empty-search-link {\n color: var(--mj-brand-primary);\n text-decoration: none;\n font-weight: var(--mj-font-medium);\n}\n\n.mj-forms-empty-search-link:hover {\n text-decoration: underline;\n}\n\n/* ============================================\n RESPONSIVE\n ============================================ */\n@media (max-width: 768px) {\n .mj-forms-panels-container {\n padding: 16px 12px 32px;\n }\n}\n"] }]
|
|
866
|
+
args: [{ standalone: false, selector: 'mj-record-form-container', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [FormSlotCoordinator], template: "<!-- ============================================\n BEFORE-TOOLBAR SLOT\n ============================================ -->\n<ng-content select=\"[before-toolbar]\"></ng-content>\n\n<!-- ============================================\n TOOLBAR (bridges FormComponent state \u2192 toolbar inputs)\n Hidden entirely when Config.Toolbar === null (dialog/slide-in surfaces).\n ============================================ -->\n@if (EffectiveShowToolbar) {\n<mj-form-toolbar\n [Record]=\"EffectiveRecord\"\n [EditMode]=\"EffectiveEditMode\"\n [UserCanEdit]=\"EffectiveUserCanEdit\"\n [UserCanDelete]=\"EffectiveUserCanDelete\"\n [IsFavorite]=\"EffectiveIsFavorite\"\n [FavoriteInitDone]=\"EffectiveFavoriteInitDone\"\n [IsDirty]=\"EffectiveIsDirty\"\n [DirtyFieldNames]=\"EffectiveDirtyFieldNames\"\n [ListCount]=\"ListCount\"\n [TagCount]=\"TagCount\"\n [VersionCount]=\"VersionCount\"\n [EntityInfo]=\"EffectiveEntityInfo\"\n [Config]=\"EffectiveToolbarConfig\"\n [IsSaving]=\"EffectiveIsSaving\"\n [VisibleSectionCount]=\"VisibleSectionCount\"\n [TotalSectionCount]=\"TotalSectionCount\"\n [ExpandedSectionCount]=\"ExpandedSectionCount\"\n [SearchFilter]=\"EffectiveSearchFilter\"\n [ShowEmptyFields]=\"EffectiveShowEmptyFields\"\n [WidthMode]=\"EffectiveWidthMode\"\n [HasCustomSectionOrder]=\"EffectiveHasCustomSectionOrder\"\n [Variants]=\"EffectiveVariants\"\n [CurrentVariantID]=\"EffectiveCurrentVariantID\"\n (Navigate)=\"OnNavigate($event)\"\n (EditModeChange)=\"OnEditModeChange($event)\"\n (BeforeSave)=\"BeforeSave.emit($event)\"\n (SaveRequested)=\"OnSaveRequested()\"\n (BeforeCancel)=\"BeforeCancel.emit($event)\"\n (CancelRequested)=\"OnCancelRequested()\"\n (BeforeDelete)=\"BeforeDelete.emit($event)\"\n (DeleteRequested)=\"OnDeleteRequested()\"\n (FavoriteToggled)=\"OnFavoriteToggled()\"\n (BeforeHistoryView)=\"BeforeHistoryView.emit($event)\"\n (HistoryRequested)=\"OnHistoryRequested()\"\n (BeforeListManagement)=\"BeforeListManagement.emit($event)\"\n (ListManagementRequested)=\"OnListManagementRequested()\"\n (ShowChangesRequested)=\"OnShowChangesRequested()\"\n (CustomButtonClick)=\"CustomButtonClick.emit($event)\"\n (FilterChange)=\"OnFilterChange($event)\"\n (ExpandAllRequested)=\"OnExpandAll()\"\n (CollapseAllRequested)=\"OnCollapseAll()\"\n (ShowEmptyFieldsChange)=\"OnShowEmptyFieldsChange($event)\"\n (WidthModeChange)=\"OnWidthModeChange($event)\"\n (ResetSectionOrderRequested)=\"OnResetSectionOrder()\"\n (ManageSectionsRequested)=\"OnManageSections()\"\n (TagsPanelToggled)=\"OnTagsPanelToggled()\"\n (VariantPicked)=\"OnVariantPicked($event)\">\n</mj-form-toolbar>\n}\n\n<!-- ============================================\n SCROLL AREA (full-width so mouse wheel works anywhere)\n Variant picker is now embedded in <mj-form-toolbar> as a right-side\n button \u2014 see the [Variants]/[CurrentVariantID] inputs + (VariantPicked)\n output on the toolbar above. Inline strip was removed.\n ============================================ -->\n<div class=\"mj-forms-scroll-area\">\n <div class=\"mj-forms-panels-container\"\n [class.mj-forms-panels--full-width]=\"EffectiveWidthMode === 'full-width'\"\n [class.mj-forms-panels--edit-mode]=\"EffectiveEditMode\"\n [class.mj-forms-panels--has-isa-panel]=\"HasIsaRelatedItems\">\n <!-- Flex row: form panels on left, ISA side panel on right -->\n <div class=\"mj-forms-layout-row\">\n <!-- All panels in a single flex container \u2014 CSS order drives sequencing -->\n <div class=\"mj-forms-all-panels\">\n <ng-content></ng-content>\n\n <!--\n Container-provided fallback slot. ALWAYS present \u2014 last in document\n order \u2014 so any panel whose registered slot isn't found in the current\n form falls through here via FormSlotCoordinator's chain. Downstream\n consumers that haven't rerun CodeGen against the slot-emitting\n template still see every panel; they just render at the bottom\n instead of at their preferred position.\n -->\n @if (Record && FormComponent) {\n <mj-form-panel-slot\n [Entity]=\"Record.EntityInfo.Name\"\n Slot=\"after-everything\"\n [Record]=\"Record\"\n [FormComponent]=\"FormComponent\">\n </mj-form-panel-slot>\n }\n\n <!-- Empty state when no sections match search -->\n @if (EffectiveSearchFilter && VisibleSectionCount === 0) {\n <div class=\"mj-forms-empty-search-state\">\n <div class=\"mj-forms-empty-search-icon\">\n <i class=\"fa-solid fa-magnifying-glass\"></i>\n </div>\n <h3 class=\"mj-forms-empty-search-title\">No sections found</h3>\n <p class=\"mj-forms-empty-search-message\">\n No sections match \"<strong>{{ EffectiveSearchFilter }}</strong>\".\n <br>Try a different search term or <a href=\"#\" (click)=\"OnFilterChange(''); $event.preventDefault()\" class=\"mj-forms-empty-search-link\">clear the search</a>.\n </p>\n </div>\n }\n </div>\n\n <!-- IS-A Related Records Side Panel -->\n <mj-isa-related-panel\n [Record]=\"EffectiveRecord\"\n [EditMode]=\"EffectiveEditMode\"\n [Collapsed]=\"EffectiveWidthMode === 'full-width'\"\n (Navigate)=\"OnNavigate($event)\">\n </mj-isa-related-panel>\n </div>\n </div>\n</div>\n\n<!-- ============================================\n RECORD CHANGES DRAWER (shown when history button clicked)\n ============================================ -->\n@if (ShowRecordChanges && EffectiveRecord) {\n <mj-record-changes\n [record]=\"EffectiveRecord\"\n [AllowRestore]=\"EffectiveUserCanEdit\"\n (RestoreRequested)=\"OnRestoreRequested($event)\"\n (dialogClosed)=\"OnRecordChangesClosed()\">\n </mj-record-changes>\n}\n\n<!-- ============================================\n TAGS PANEL (shown when tags button clicked)\n ============================================ -->\n@if (ShowTagsPanel && EffectiveRecord) {\n <mj-record-tags\n [Record]=\"EffectiveRecord\"\n [WidthPx]=\"TagsPanelWidth\"\n (PanelClosed)=\"OnTagsPanelClosed()\"\n (TagCountChanged)=\"OnTagCountChanged($event)\"\n (RecordNavigate)=\"OnTagsRecordNavigate($event)\"\n (WidthChanged)=\"OnTagsPanelWidthChanged($event)\">\n </mj-record-tags>\n}\n\n<!-- ============================================\n LIST MANAGEMENT DIALOG (shown when lists button clicked)\n ============================================ -->\n@if (ShowListManagement && EffectiveRecord) {\n <mj-list-management-dialog\n [visible]=\"ShowListManagement\"\n [config]=\"{\n mode: 'manage',\n entityId: EffectiveRecord.EntityInfo.ID,\n entityName: EffectiveRecord.EntityInfo.Name,\n recordIds: [EffectiveRecord.PrimaryKey.Values()[0]],\n allowCreate: true\n }\"\n (complete)=\"OnListManagementClosed()\"\n (cancel)=\"OnListManagementClosed()\">\n </mj-list-management-dialog>\n}\n\n<!-- ============================================\n SECTION MANAGER DRAWER (shown when manage-sections button clicked)\n ============================================ -->\n<mj-section-manager\n [Sections]=\"SectionManagerItems\"\n [SectionOrder]=\"SectionManagerOrder\"\n [Visible]=\"ShowSectionManager\"\n (SectionOrderChange)=\"OnSectionOrderChange($event)\"\n (ResetRequested)=\"OnSectionManagerReset()\"\n (Closed)=\"OnSectionManagerClosed()\">\n</mj-section-manager>\n", styles: ["/* ============================================\n RECORD FORM CONTAINER \u2014 uses global --mj-* design tokens\n Top-level wrapper: toolbar + scrollable content\n ============================================ */\nmj-record-form-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n/* ViewEncapsulation.None fallback \u2014 ensure the element itself constrains overflow */\nmj-record-form-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n/* ============================================\n SCROLL AREA (full-width so mouse wheel works anywhere)\n ============================================ */\n.mj-forms-scroll-area {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n background: var(--mj-bg-page);\n}\n\n/* ============================================\n PANELS CONTAINER (centered content within scroll area)\n ============================================ */\n.mj-forms-panels-container {\n padding: 24px 32px 48px;\n max-width: 920px;\n margin: 0 auto;\n width: 100%;\n box-sizing: border-box;\n}\n\n/* Widen max-width when ISA side panel is present */\n.mj-forms-panels--has-isa-panel {\n max-width: 1240px;\n}\n\n.mj-forms-panels--full-width {\n max-width: none;\n padding-left: 24px;\n padding-right: 24px;\n}\n\n/* Flex row layout: form panels + optional ISA side panel */\n.mj-forms-layout-row {\n display: flex;\n gap: 20px;\n align-items: flex-start;\n}\n\n/* All panels in a single flex container \u2014 CSS order drives sequencing */\n.mj-forms-all-panels {\n display: flex;\n flex-direction: column;\n gap: 16px;\n flex: 1;\n min-width: 0;\n}\n\n/* Hide related entity panels in edit mode (variant host class on mj-collapsible-panel) */\n.mj-forms-panels--edit-mode .mj-panel--related-entity {\n display: none;\n}\n\n/* ============================================\n EMPTY SEARCH STATE\n ============================================ */\n.mj-forms-empty-search-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 80px 24px;\n text-align: center;\n min-height: 400px;\n}\n\n.mj-forms-empty-search-icon {\n width: 80px;\n height: 80px;\n border-radius: var(--mj-radius-full);\n background: var(--mj-bg-surface-sunken);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 24px;\n}\n\n.mj-forms-empty-search-icon i {\n font-size: 32px;\n color: var(--mj-text-muted);\n}\n\n.mj-forms-empty-search-title {\n font-size: var(--mj-text-xl);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-primary);\n margin: 0 0 12px 0;\n}\n\n.mj-forms-empty-search-message {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n line-height: 1.6;\n max-width: 400px;\n margin: 0;\n}\n\n.mj-forms-empty-search-message strong {\n color: var(--mj-text-primary);\n font-weight: var(--mj-font-semibold);\n}\n\n.mj-forms-empty-search-link {\n color: var(--mj-brand-primary);\n text-decoration: none;\n font-weight: var(--mj-font-medium);\n}\n\n.mj-forms-empty-search-link:hover {\n text-decoration: underline;\n}\n\n/* ============================================\n RESPONSIVE\n ============================================ */\n@media (max-width: 768px) {\n .mj-forms-panels-container {\n padding: 16px 12px 32px;\n }\n}\n\n/* ====================================================================\n VARIANT PICKER \u2014 between toolbar and form body\n Compact \"Form: <name> \u25BE\" row that appears when more than one variant\n is applicable for the current entity record.\n ==================================================================== */\n\n.mj-form-variant-picker {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 6px 18px;\n background: var(--mj-bg-surface-card);\n border-bottom: 1px solid var(--mj-border-default);\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n.mj-form-variant-picker-icon {\n color: var(--mj-brand-primary);\n font-size: 12px;\n}\n.mj-form-variant-picker-label {\n font-weight: 600;\n color: var(--mj-text-secondary);\n}\n.mj-form-variant-picker-control {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 8px);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n cursor: pointer;\n outline: none;\n user-select: none;\n min-width: 160px;\n}\n.mj-form-variant-picker-control:hover,\n.mj-form-variant-picker-control:focus,\n.mj-form-variant-picker-control.open {\n border-color: var(--mj-border-focus);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n.mj-form-variant-picker-current {\n font-weight: 600;\n flex: 1;\n}\n.mj-form-variant-picker-menu {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n z-index: 50;\n min-width: 280px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 8px);\n box-shadow: var(--mj-shadow-md, 0 4px 12px rgba(15, 23, 42, 0.08));\n padding: 4px;\n max-height: 320px;\n overflow: auto;\n}\n.mj-form-variant-picker-row {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n border-radius: 6px;\n cursor: pointer;\n}\n.mj-form-variant-picker-row:hover {\n background: var(--mj-bg-surface-hover);\n}\n.mj-form-variant-picker-row.current {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n}\n.mj-form-variant-picker-row.inactive {\n opacity: 0.7;\n}\n.mj-form-variant-picker-row-main {\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n min-width: 0;\n}\n.mj-form-variant-picker-row-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.mj-form-variant-picker-row-sub {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n.mj-form-variant-picker-check {\n color: var(--mj-brand-primary);\n font-size: 11px;\n}\n\n/* Retrospective fix #8 \u2014 visually distinguish the Default row from variants. */\n.mj-form-variant-picker-row.mj-form-variant-picker-default {\n border-bottom: 1px dashed var(--mj-border-default);\n margin-bottom: 4px;\n padding-bottom: 10px;\n}\n.mj-form-variant-picker-default-tag {\n color: var(--mj-text-muted);\n font-weight: 400;\n font-size: 11px;\n margin-left: 4px;\n}\n"] }]
|
|
755
867
|
}], null, { recordChangesDrawer: [{
|
|
756
868
|
type: ViewChild,
|
|
757
869
|
args: [RecordChangesComponent]
|
|
@@ -783,6 +895,10 @@ export class MjRecordFormContainerComponent extends BaseAngularComponent {
|
|
|
783
895
|
type: Input
|
|
784
896
|
}], WidthMode: [{
|
|
785
897
|
type: Input
|
|
898
|
+
}], Variants: [{
|
|
899
|
+
type: Input
|
|
900
|
+
}], CurrentVariantID: [{
|
|
901
|
+
type: Input
|
|
786
902
|
}], Navigate: [{
|
|
787
903
|
type: Output
|
|
788
904
|
}], EditModeChange: [{
|
|
@@ -813,9 +929,11 @@ export class MjRecordFormContainerComponent extends BaseAngularComponent {
|
|
|
813
929
|
type: Output
|
|
814
930
|
}], CustomButtonClick: [{
|
|
815
931
|
type: Output
|
|
932
|
+
}], VariantChange: [{
|
|
933
|
+
type: Output
|
|
816
934
|
}], Panels: [{
|
|
817
935
|
type: ContentChildren,
|
|
818
936
|
args: [MjCollapsiblePanelComponent, { descendants: true }]
|
|
819
937
|
}] }); })();
|
|
820
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjRecordFormContainerComponent, { className: "MjRecordFormContainerComponent", filePath: "src/lib/container/record-form-container.component.ts", lineNumber:
|
|
938
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjRecordFormContainerComponent, { className: "MjRecordFormContainerComponent", filePath: "src/lib/container/record-form-container.component.ts", lineNumber: 85 }); })();
|
|
821
939
|
//# sourceMappingURL=record-form-container.component.js.map
|