@memberjunction/ng-base-forms 6.2.0-edge.6 → 6.2.0-edge.8
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 +10 -0
- package/dist/lib/apply/form-placement-preview.component.d.ts.map +1 -1
- package/dist/lib/apply/form-placement-preview.component.js +1 -0
- package/dist/lib/apply/form-placement-preview.component.js.map +1 -1
- package/dist/lib/base-form-component.d.ts +15 -2
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +18 -8
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/chrome/form-chrome-coordinator.service.d.ts.map +1 -1
- package/dist/lib/chrome/form-chrome-coordinator.service.js +4 -1
- package/dist/lib/chrome/form-chrome-coordinator.service.js.map +1 -1
- package/dist/lib/chrome/phone-viewport.d.ts +15 -0
- package/dist/lib/chrome/phone-viewport.d.ts.map +1 -0
- package/dist/lib/chrome/phone-viewport.js +28 -0
- package/dist/lib/chrome/phone-viewport.js.map +1 -0
- package/dist/lib/comments/form-record-comments-coordinator.service.d.ts +159 -0
- package/dist/lib/comments/form-record-comments-coordinator.service.d.ts.map +1 -0
- package/dist/lib/comments/form-record-comments-coordinator.service.js +421 -0
- package/dist/lib/comments/form-record-comments-coordinator.service.js.map +1 -0
- package/dist/lib/comments/record-comments.component.d.ts +205 -0
- package/dist/lib/comments/record-comments.component.d.ts.map +1 -0
- package/dist/lib/comments/record-comments.component.js +2019 -0
- package/dist/lib/comments/record-comments.component.js.map +1 -0
- package/dist/lib/container/record-form-container.component.d.ts +47 -1
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +877 -316
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/field/default-fk-lookup-strategy.d.ts.map +1 -1
- package/dist/lib/field/default-fk-lookup-strategy.js +14 -6
- package/dist/lib/field/default-fk-lookup-strategy.js.map +1 -1
- package/dist/lib/field/fk-lookup-strategy.d.ts +11 -0
- package/dist/lib/field/fk-lookup-strategy.d.ts.map +1 -1
- package/dist/lib/field/fk-lookup-strategy.js +10 -0
- package/dist/lib/field/fk-lookup-strategy.js.map +1 -1
- package/dist/lib/field/fk-search-utils.d.ts +17 -0
- package/dist/lib/field/fk-search-utils.d.ts.map +1 -1
- package/dist/lib/field/fk-search-utils.js +29 -0
- package/dist/lib/field/fk-search-utils.js.map +1 -1
- package/dist/lib/field/form-field.component.d.ts +35 -1
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +631 -446
- package/dist/lib/field/form-field.component.js.map +1 -1
- package/dist/lib/host/entity-form-host.component.d.ts +6 -0
- package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
- package/dist/lib/host/entity-form-host.component.js +17 -3
- package/dist/lib/host/entity-form-host.component.js.map +1 -1
- package/dist/lib/interactive-form/interactive-form.component.d.ts.map +1 -1
- package/dist/lib/interactive-form/interactive-form.component.js +1 -0
- package/dist/lib/interactive-form/interactive-form.component.js.map +1 -1
- package/dist/lib/links/record-links.component.d.ts +6 -0
- package/dist/lib/links/record-links.component.d.ts.map +1 -1
- package/dist/lib/links/record-links.component.js +30 -7
- package/dist/lib/links/record-links.component.js.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts +5 -0
- package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.js +109 -30
- package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
- package/dist/lib/preview-popover/record-preview-popover.component.d.ts +8 -1
- package/dist/lib/preview-popover/record-preview-popover.component.d.ts.map +1 -1
- package/dist/lib/preview-popover/record-preview-popover.component.js +33 -9
- package/dist/lib/preview-popover/record-preview-popover.component.js.map +1 -1
- package/dist/lib/related-grid-height.d.ts +2 -2
- package/dist/lib/related-grid-height.d.ts.map +1 -1
- package/dist/lib/related-grid-height.js +2 -2
- package/dist/lib/related-grid-height.js.map +1 -1
- package/dist/lib/section-indicators/form-section-indicators.d.ts +4 -0
- package/dist/lib/section-indicators/form-section-indicators.d.ts.map +1 -1
- package/dist/lib/section-indicators/form-section-indicators.js +15 -1
- package/dist/lib/section-indicators/form-section-indicators.js.map +1 -1
- package/dist/lib/toolbar/actions/record-comments-toolbar-action.d.ts +17 -0
- package/dist/lib/toolbar/actions/record-comments-toolbar-action.d.ts.map +1 -0
- package/dist/lib/toolbar/actions/record-comments-toolbar-action.js +52 -0
- package/dist/lib/toolbar/actions/record-comments-toolbar-action.js.map +1 -0
- package/dist/lib/toolbar/base-form-toolbar-action.d.ts +9 -0
- package/dist/lib/toolbar/base-form-toolbar-action.d.ts.map +1 -1
- package/dist/lib/toolbar/base-form-toolbar-action.js.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.d.ts +107 -2
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +927 -415
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/form-toolbar-item.d.ts +1 -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 +8 -0
- package/dist/lib/types/form-types.d.ts.map +1 -1
- package/dist/lib/types/form-types.js.map +1 -1
- package/dist/lib/types/toolbar-config.d.ts +2 -0
- package/dist/lib/types/toolbar-config.d.ts.map +1 -1
- package/dist/lib/types/toolbar-config.js.map +1 -1
- package/dist/module.d.ts +15 -14
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +15 -5
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -240,9 +240,19 @@ export class CustomPersonPreviewPopoverComponent extends MjRecordPreviewPopoverC
|
|
|
240
240
|
}
|
|
241
241
|
```
|
|
242
242
|
|
|
243
|
+
## Anchored Record Comments (`<mj-record-comments>`)
|
|
244
|
+
|
|
245
|
+
Every saved record form automatically provides threaded conversations (`MJ: Conversations` + `MJ: Conversation Details`) anchored at the **Record**, **Field**, **Section**, **Group (Left-Nav Tab)**, or **Contribution** level:
|
|
246
|
+
|
|
247
|
+
- **Form Toolbar Action (`RecordCommentsToolbarAction`, key `'comments'`)**: Displays the total open comment count across the record and toggles the slide-over Record Comments Drawer.
|
|
248
|
+
- **Field-Level Trigger & Badge (`<mj-form-field>`)**: Shows an inline comment count badge on fields with active threads (or a hover trigger to start a thread), capturing a `quotedValue` snapshot of the field's value at the time of commenting. Fields with open comments are never collapsed away as empty in read mode.
|
|
249
|
+
- **Section & Left-Nav Rail Rollup (`<mj-collapsible-panel>`, `<mj-record-form-container>`, `FormSectionIndicators`)**: Open field and section comments roll up into section header chips and left-nav group badges. Clicking any anchor chip in the drawer or popover expands the target group/section, scrolls the field into view, and pulses it.
|
|
250
|
+
- **RLS & FLS Security + `@Mention` Notifications**: Enforces Row-Level Security and Field-Level Security (including write-time restricted-field classification and `AnchorMetadataObject.restrictedFields` stamping) and dispatches `MJ: User Notifications` on `@mention` only to users permitted to read both the record and the anchored/referenced fields.
|
|
251
|
+
|
|
243
252
|
## Related docs
|
|
244
253
|
|
|
245
254
|
- **Architecture (read first):** [/guides/FORMS_ARCHITECTURE_GUIDE.md](../../../../guides/FORMS_ARCHITECTURE_GUIDE.md)
|
|
255
|
+
- **Anchored Conversations & Record Commenting:** [/guides/ANCHORED_CONVERSATIONS_AND_RECORD_COMMENTS_GUIDE.md](../../../../guides/ANCHORED_CONVERSATIONS_AND_RECORD_COMMENTS_GUIDE.md)
|
|
246
256
|
- **Inject custom sections into a form:** [PANELS.md](./PANELS.md)
|
|
247
257
|
- **Form chrome (rail / More / inclusion):** [Forms Architecture §7d](../../../../guides/FORMS_ARCHITECTURE_GUIDE.md#7d-form-chrome--accordion-left-nav-and-more)
|
|
248
258
|
- **Pluggable toolbar actions & Record Links:** [Forms Architecture §7e–§7g](../../../../guides/FORMS_ARCHITECTURE_GUIDE.md#7e-pluggable-form-toolbar-actions-baseformtoolbaraction--registerformtoolbaraction)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-placement-preview.component.d.ts","sourceRoot":"","sources":["../../../src/lib/apply/form-placement-preview.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EAA4C,YAAY,EAAiB,SAAS,EAElG,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAsC,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAC9F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAEjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;;AAUpE;;;;;;;;;;;GAWG;AACH,qBAUa,+BAAgC,SAAQ,oBAAqB,YAAW,aAAa,EAAE,SAAS;IACzG;;;OAGG;IACH,gBAAuB,eAAe,QAAQ;IAE9C,sFAAsF;IACtF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAS;IAEhD,sEAAsE;IACtE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAO;IAE9C,IACI,UAAU,CAAC,KAAK,EAAE,MAAM,EAK3B;IACD,IAAI,UAAU,IAAI,MAAM,CAA6B;IAErD;;;OAGG;IACH,IACI,SAAS,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,EAGvC;IAED,qCAAqC;IACrC,IACI,IAAI,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,EAG1C;IAED,mEAAmE;IACnE,IACI,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAGrC;IAED,+EAA+E;IAC/E,IACI,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,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"file":"form-placement-preview.component.d.ts","sourceRoot":"","sources":["../../../src/lib/apply/form-placement-preview.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EAA4C,YAAY,EAAiB,SAAS,EAElG,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAsC,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAC9F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAEjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;;AAUpE;;;;;;;;;;;GAWG;AACH,qBAUa,+BAAgC,SAAQ,oBAAqB,YAAW,aAAa,EAAE,SAAS;IACzG;;;OAGG;IACH,gBAAuB,eAAe,QAAQ;IAE9C,sFAAsF;IACtF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAS;IAEhD,sEAAsE;IACtE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAO;IAE9C,IACI,UAAU,CAAC,KAAK,EAAE,MAAM,EAK3B;IACD,IAAI,UAAU,IAAI,MAAM,CAA6B;IAErD;;;OAGG;IACH,IACI,SAAS,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,EAGvC;IAED,qCAAqC;IACrC,IACI,IAAI,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,EAG1C;IAED,mEAAmE;IACnE,IACI,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAGrC;IAED,+EAA+E;IAC/E,IACI,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,EAGjD;IAED,wFAAwF;IACxF,IACI,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAGxC;IAED,2EAA2E;IACjE,MAAM,qBAA4B;IAEH,OAAO,CAAC,QAAQ,CAA2B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A+B;CA0P3C"}
|
|
@@ -210,6 +210,7 @@ export class MjFormPlacementPreviewComponent extends BaseAngularComponent {
|
|
|
210
210
|
Fields: nameField && !keyFields.includes(nameField) ? [...keyFields, nameField] : keyFields,
|
|
211
211
|
OrderBy: nameField ? `${nameField} ASC` : '__mj_CreatedAt DESC',
|
|
212
212
|
MaxRows: 1,
|
|
213
|
+
SkipTotalRowCount: true,
|
|
213
214
|
ResultType: 'simple',
|
|
214
215
|
}, provider.CurrentUser);
|
|
215
216
|
const row = result.Success ? result.Results?.[0] : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-placement-preview.component.js","sourceRoot":"","sources":["../../../src/lib/apply/form-placement-preview.component.ts","../../../src/lib/apply/form-placement-preview.component.html"],"names":[],"mappings":"AAAA,OAAO,EACY,iBAAiB,EAAE,SAAS,EAAc,YAAY,EAAE,KAAK,EAAE,MAAM,EAAa,MAAM,EACvG,SAAS,EAAE,MAAM,GACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAmB,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAE/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;;;;;;;ICTvD,4BAAwB;IAAA,uBAAkD;IAAC,YAAiB;IAAA,iBAAI;;;IAArB,eAAiB;IAAjB,8CAAiB;;;;IASxF,8CAO8B;IAA5B,AADA,8NAAgB,iBAAU,KAAC,2MACd,oBAAa,KAAC;IAC7B,iBAAsB;;;IAHpB,AADA,AADA,AADA,AADA,0CAAqB,iCACI,iCACA,mBACP,6BACG;;;IAQzB,8BAA2B;IACzB,gCAA+D;IACjE,iBAAM;;ADbV,qGAAqG;AACrG,SAAS,gBAAgB;IACrB,MAAM,KAAK,GAAG,IAAI,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AK,YACP,2BAA2B,aAG1B;oBACP,EAAE,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,oBAAoB,EAAE,EAAE;oBACjF,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE;iBAC9D;;kBAeA,KAAK;;kBAaL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAOL,MAAM;;kBAEN,SAAS;mBAAC,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;kBACtC,SAAS;mBAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;kFAhE3B,+BAA+B","sourcesContent":["import {\n AfterViewInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, NgZone, OnDestroy, Output,\n ViewChild, inject,\n} from '@angular/core';\nimport { CompositeKey, LogError, RunView, type EntityInfo } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport type { FormContributionSpec } from '@memberjunction/interactive-component-types/forms';\nimport type { ComponentSpec } from '@memberjunction/interactive-component-types';\nimport { FORM_PLACEMENT_PREVIEW, FormPlacementPreview } from '../panel-slot/placement-preview';\nimport type { EntityFormConfig } from '../types/entity-form-config';\nimport { FormStateService } from '../form-state.service';\n\n/** A form state of its own for the preview, kept in memory, so the user's real form is untouched. */\nfunction previewFormState(): FormStateService {\n const state = new FormStateService();\n state.Persist = false;\n return state;\n}\n\n/**\n * The entity's real form, scaled down, with the placement dialog's panel drawn on it.\n *\n * The form is rendered by the same host every other surface uses, with a\n * {@link FormPlacementPreview} provided to it, so the form itself places the unsaved panel,\n * hides what it replaces and gives it a rail item.\n *\n * Read-only: the form is `inert` and every answer is made in the dialog's controls. The form\n * shows the rail tab the panel is on; the preview scrolls to it. It has a form state of its own,\n * held in memory, so opening that tab and its sections changes neither the user's saved form state\n * nor the real form open behind the dialog.\n */\n@Component({\n standalone: false,\n selector: 'mj-form-placement-preview',\n templateUrl: './form-placement-preview.component.html',\n styleUrls: ['./form-placement-preview.component.css'],\n providers: [\n { provide: FORM_PLACEMENT_PREVIEW, useFactory: () => new FormPlacementPreview() },\n { provide: FormStateService, useFactory: previewFormState },\n ],\n})\nexport class MjFormPlacementPreviewComponent extends BaseAngularComponent implements AfterViewInit, OnDestroy {\n /**\n * The narrowest width the form is laid out at. A narrower column shows it scaled down; a\n * wider one shows it at its real size, never enlarged.\n */\n public static readonly MIN_STAGE_WIDTH = 1100;\n\n /** A form that never finishes loading must not leave the dialog without a preview. */\n private static readonly LOAD_TIMEOUT_MS = 10000;\n\n /** How long the answers must be still before the panel is redrawn. */\n private static readonly REDRAW_DELAY_MS = 150;\n\n @Input()\n set EntityName(value: string) {\n const changed = value !== this._entityName;\n this._entityName = value;\n this.showSpec();\n if (changed) this.queueResolveRecord();\n }\n get EntityName(): string { return this._entityName; }\n\n /**\n * The record to show. Null shows a sample: the entity's first record, as Form Builder's\n * preview picks it, or a new empty record when the entity has none.\n */\n @Input()\n set RecordKey(value: CompositeKey | null) {\n this._recordKey = value;\n this.queueResolveRecord();\n }\n\n /** The panel to draw on the form. */\n @Input()\n set Spec(value: FormContributionSpec | null) {\n this._spec = value;\n this.showSpec();\n }\n\n /** The saved row the panel is an edit of, left off the preview. */\n @Input()\n set ReplacesRowID(value: string | null) {\n this._replacesRowID = value;\n this.showSpec();\n }\n\n /** The panel's component, not saved yet. Drawn in place of the placeholder. */\n @Input()\n set PanelComponentSpec(value: ComponentSpec | null) {\n this._componentSpec = value;\n this.showSpec();\n }\n\n /** The saved component of the panel being edited. Drawn in place of the placeholder. */\n @Input()\n set PanelComponentID(value: string | null) {\n this._componentID = value;\n this.showSpec();\n }\n\n /** The form did not render, so the dialog should show its list instead. */\n @Output() Failed = new EventEmitter<void>();\n\n @ViewChild('viewport', { static: true }) private viewport!: ElementRef<HTMLElement>;\n @ViewChild('stage', { static: true }) private stage!: ElementRef<HTMLElement>;\n\n public PrimaryKey = new CompositeKey();\n /** False until the record to show is known, so the form is drawn once, not blank and then again. */\n public RecordResolved = false;\n /** Which record the preview shows, in words. */\n public RecordLabel = '';\n public readonly FormConfig: EntityFormConfig = { Toolbar: null, EnableRecordLinks: false };\n public Scale = 1;\n public StageWidth = MjFormPlacementPreviewComponent.MIN_STAGE_WIDTH;\n public StageHeight = 0;\n public Loaded = false;\n\n private _entityName = '';\n private _recordKey: CompositeKey | null = null;\n private resolveRun = 0;\n private resolveQueued = false;\n private _spec: FormContributionSpec | null = null;\n private _replacesRowID: string | null = null;\n private _componentSpec: ComponentSpec | null = null;\n private _componentID: string | null = null;\n private resizeObserver: ResizeObserver | null = null;\n private mutationObserver: MutationObserver | null = null;\n private frame = 0;\n private loadTimer: ReturnType<typeof setTimeout> | null = null;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private sizeSignature = '';\n /** Set after each redraw, until the panel has been brought into view. */\n private revealPending = false;\n\n private readonly preview = inject(FORM_PLACEMENT_PREVIEW);\n private readonly zone = inject(NgZone);\n private readonly cdr = inject(ChangeDetectorRef);\n\n public ngAfterViewInit(): void {\n this.zone.runOutsideAngular(() => {\n this.resizeObserver = new ResizeObserver(() => this.scheduleMeasure());\n this.resizeObserver.observe(this.viewport.nativeElement);\n this.resizeObserver.observe(this.stage.nativeElement);\n this.mutationObserver = new MutationObserver(() => this.scheduleMeasure());\n this.mutationObserver.observe(this.stage.nativeElement, {\n childList: true, subtree: true, attributes: true, attributeFilter: ['class', 'style', 'hidden'],\n });\n });\n this.loadTimer = setTimeout(() => { if (!this.Loaded) this.Failed.emit(); }, MjFormPlacementPreviewComponent.LOAD_TIMEOUT_MS);\n }\n\n public ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n this.mutationObserver?.disconnect();\n if (this.frame) cancelAnimationFrame(this.frame);\n if (this.loadTimer) clearTimeout(this.loadTimer);\n if (this.showTimer) clearTimeout(this.showTimer);\n }\n\n public OnLoaded(): void {\n this.Loaded = true;\n if (this.loadTimer) clearTimeout(this.loadTimer);\n this.scheduleMeasure();\n }\n\n public OnLoadError(): void {\n this.Failed.emit();\n }\n\n /**\n * Resolves the record once the current round of input changes is over, so the entity and the\n * record key arriving together look up a sample record once.\n */\n private queueResolveRecord(): void {\n if (this.resolveQueued) return;\n this.resolveQueued = true;\n queueMicrotask(() => {\n this.resolveQueued = false;\n void this.resolveRecord();\n });\n }\n\n /** Settles which record the form shows, then lets the form draw. */\n private async resolveRecord(): Promise<void> {\n const run = ++this.resolveRun;\n this.RecordResolved = false;\n this.Loaded = false;\n const entity = this._entityName ? this.ProviderToUse?.EntityByName(this._entityName) : undefined;\n let key = this._recordKey;\n let label = key ? 'Showing the record you have open' : '';\n if (!key && entity) {\n const sample = await this.sampleRecord(entity);\n if (run !== this.resolveRun) return;\n key = sample?.Key ?? null;\n label = sample ? `Showing ${sample.Label}, a sample record` : 'Showing a new, empty record — this entity has no records yet';\n }\n this.PrimaryKey = key ?? new CompositeKey();\n this.RecordLabel = label;\n this.RecordResolved = !!this._entityName;\n this.cdr.markForCheck();\n }\n\n /**\n * The entity's first record, ordered the way Form Builder's preview orders it: by name when\n * the entity has a name field, so every user sees the same one, else newest first.\n */\n private async sampleRecord(entity: EntityInfo): Promise<{ Key: CompositeKey; Label: string } | null> {\n const provider = this.ProviderToUse;\n if (!provider) return null;\n const nameField = entity.NameField?.Name;\n const keyFields = entity.PrimaryKeys.map((pk) => pk.Name);\n try {\n const result = await RunView.FromMetadataProvider(provider).RunView<Record<string, unknown>>({\n EntityName: entity.Name,\n Fields: nameField && !keyFields.includes(nameField) ? [...keyFields, nameField] : keyFields,\n OrderBy: nameField ? `${nameField} ASC` : '__mj_CreatedAt DESC',\n MaxRows: 1,\n ResultType: 'simple',\n }, provider.CurrentUser);\n const row = result.Success ? result.Results?.[0] : undefined;\n if (!row) return null;\n const key = CompositeKey.FromEntityRecord(entity, row);\n const name = nameField ? String(row[nameField] ?? '').trim() : '';\n return { Key: key, Label: name ? `“${name}”` : 'the first record' };\n } catch (err) {\n LogError(`MjFormPlacementPreviewComponent: sample record for ${entity.Name} failed: ${err instanceof Error ? err.message : String(err)}`);\n return null;\n }\n }\n\n /**\n * Redraws the panel on the form, shortly after the last change. Each redraw remounts the\n * panel's component, so typing a label must not remount it on every key.\n */\n private showSpec(): void {\n if (this.showTimer) clearTimeout(this.showTimer);\n this.showTimer = setTimeout(() => {\n this.showTimer = null;\n const component = this._componentSpec || this._componentID\n ? { Spec: this._componentSpec, ComponentID: this._componentID }\n : null;\n this.preview.Show(this.EntityName, this._spec, this._replacesRowID, component);\n this.revealPending = true;\n this.scheduleMeasure();\n }, MjFormPlacementPreviewComponent.REDRAW_DELAY_MS);\n }\n\n private scheduleMeasure(): void {\n if (this.frame) return;\n this.frame = requestAnimationFrame(() => {\n this.frame = 0;\n this.measure();\n });\n }\n\n /** Fit the stage to the viewport, then keep the panel in view. Enters Angular only on a change. */\n private measure(): void {\n const viewport = this.viewport.nativeElement;\n const stage = this.stage.nativeElement;\n const available = viewport.clientWidth;\n const width = available > 0 ? Math.max(MjFormPlacementPreviewComponent.MIN_STAGE_WIDTH, available) : this.StageWidth;\n const scale = available > 0 ? available / width : this.Scale;\n const height = stage.offsetHeight * scale;\n if (this.Loaded && this.revealPending) this.revealPanel(stage);\n const signature = `${width}|${scale}|${height}`;\n if (signature === this.sizeSignature) return;\n this.sizeSignature = signature;\n this.zone.run(() => {\n this.StageWidth = width;\n this.Scale = scale;\n this.StageHeight = height;\n this.cdr.markForCheck();\n });\n }\n\n /**\n * Scrolls the panel into view once it draws after a redraw.\n *\n * On a form with a side rail the form itself shows the tab that holds the panel; this only\n * waits for it to draw and then brings it into view.\n */\n private revealPanel(stage: HTMLElement): void {\n const panel = stage.querySelector<HTMLElement>('[data-placement-preview]');\n if (!panel) return;\n const box = (panel.querySelector('mj-collapsible-panel') ?? panel).getBoundingClientRect();\n if (box.width === 0 && box.height === 0) return;\n this.revealPending = false;\n panel.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n }\n}\n","@if (RecordLabel) {\n <p class=\"mj-pp-record\"><i class=\"fa-solid fa-eye\" aria-hidden=\"true\"></i> {{ RecordLabel }}</p>\n}\n<div class=\"mj-pp-viewport\" #viewport [style.height.px]=\"StageHeight\">\n <div class=\"mj-pp-stage\" #stage inert\n [style.width.px]=\"StageWidth\"\n [style.transform]=\"'scale(' + Scale + ')'\">\n @if (RecordResolved) {\n <!-- Read-only: a preview shows the form as it reads, and an empty required field in\n edit mode would paint the whole form with validation errors. -->\n <mj-entity-form-host\n [Provider]=\"Provider\"\n [EntityName]=\"EntityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [EditMode]=\"false\"\n [Config]=\"FormConfig\"\n (LoadComplete)=\"OnLoaded()\"\n (LoadError)=\"OnLoadError()\">\n </mj-entity-form-host>\n }\n </div>\n\n @if (!Loaded) {\n <div class=\"mj-pp-loading\">\n <mj-loading text=\"Drawing the form…\" size=\"small\"></mj-loading>\n </div>\n }\n</div>\n"]}
|
|
1
|
+
{"version":3,"file":"form-placement-preview.component.js","sourceRoot":"","sources":["../../../src/lib/apply/form-placement-preview.component.ts","../../../src/lib/apply/form-placement-preview.component.html"],"names":[],"mappings":"AAAA,OAAO,EACY,iBAAiB,EAAE,SAAS,EAAc,YAAY,EAAE,KAAK,EAAE,MAAM,EAAa,MAAM,EACvG,SAAS,EAAE,MAAM,GACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAmB,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAE/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;;;;;;;ICTvD,4BAAwB;IAAA,uBAAkD;IAAC,YAAiB;IAAA,iBAAI;;;IAArB,eAAiB;IAAjB,8CAAiB;;;;IASxF,8CAO8B;I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AmB;YAIjB,AADF,iCAAsE,gBAGpB;YAC9C,iHAAsB;YAaxB,iBAAM;YAEN,iGAAe;YAKjB,iBAAM;;YA3BN,0CAEC;YACqC,cAA+B;YAA/B,+CAA+B;YAE9D,eAA6B;YAC7B,AADA,6CAA6B,yCACa;YAC7C,eAYC;YAZD,6CAYC;YAGH,cAIC;YAJD,sCAIC;;;iFDeU,+BAA+B;cAV3C,SAAS;6BACM,KAAK,YACP,2BAA2B,aAG1B;oBACP,EAAE,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,oBAAoB,EAAE,EAAE;oBACjF,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE;iBAC9D;;kBAeA,KAAK;;kBAaL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAOL,MAAM;;kBAEN,SAAS;mBAAC,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;kBACtC,SAAS;mBAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;kFAhE3B,+BAA+B","sourcesContent":["import {\n AfterViewInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, NgZone, OnDestroy, Output,\n ViewChild, inject,\n} from '@angular/core';\nimport { CompositeKey, LogError, RunView, type EntityInfo } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport type { FormContributionSpec } from '@memberjunction/interactive-component-types/forms';\nimport type { ComponentSpec } from '@memberjunction/interactive-component-types';\nimport { FORM_PLACEMENT_PREVIEW, FormPlacementPreview } from '../panel-slot/placement-preview';\nimport type { EntityFormConfig } from '../types/entity-form-config';\nimport { FormStateService } from '../form-state.service';\n\n/** A form state of its own for the preview, kept in memory, so the user's real form is untouched. */\nfunction previewFormState(): FormStateService {\n const state = new FormStateService();\n state.Persist = false;\n return state;\n}\n\n/**\n * The entity's real form, scaled down, with the placement dialog's panel drawn on it.\n *\n * The form is rendered by the same host every other surface uses, with a\n * {@link FormPlacementPreview} provided to it, so the form itself places the unsaved panel,\n * hides what it replaces and gives it a rail item.\n *\n * Read-only: the form is `inert` and every answer is made in the dialog's controls. The form\n * shows the rail tab the panel is on; the preview scrolls to it. It has a form state of its own,\n * held in memory, so opening that tab and its sections changes neither the user's saved form state\n * nor the real form open behind the dialog.\n */\n@Component({\n standalone: false,\n selector: 'mj-form-placement-preview',\n templateUrl: './form-placement-preview.component.html',\n styleUrls: ['./form-placement-preview.component.css'],\n providers: [\n { provide: FORM_PLACEMENT_PREVIEW, useFactory: () => new FormPlacementPreview() },\n { provide: FormStateService, useFactory: previewFormState },\n ],\n})\nexport class MjFormPlacementPreviewComponent extends BaseAngularComponent implements AfterViewInit, OnDestroy {\n /**\n * The narrowest width the form is laid out at. A narrower column shows it scaled down; a\n * wider one shows it at its real size, never enlarged.\n */\n public static readonly MIN_STAGE_WIDTH = 1100;\n\n /** A form that never finishes loading must not leave the dialog without a preview. */\n private static readonly LOAD_TIMEOUT_MS = 10000;\n\n /** How long the answers must be still before the panel is redrawn. */\n private static readonly REDRAW_DELAY_MS = 150;\n\n @Input()\n set EntityName(value: string) {\n const changed = value !== this._entityName;\n this._entityName = value;\n this.showSpec();\n if (changed) this.queueResolveRecord();\n }\n get EntityName(): string { return this._entityName; }\n\n /**\n * The record to show. Null shows a sample: the entity's first record, as Form Builder's\n * preview picks it, or a new empty record when the entity has none.\n */\n @Input()\n set RecordKey(value: CompositeKey | null) {\n this._recordKey = value;\n this.queueResolveRecord();\n }\n\n /** The panel to draw on the form. */\n @Input()\n set Spec(value: FormContributionSpec | null) {\n this._spec = value;\n this.showSpec();\n }\n\n /** The saved row the panel is an edit of, left off the preview. */\n @Input()\n set ReplacesRowID(value: string | null) {\n this._replacesRowID = value;\n this.showSpec();\n }\n\n /** The panel's component, not saved yet. Drawn in place of the placeholder. */\n @Input()\n set PanelComponentSpec(value: ComponentSpec | null) {\n this._componentSpec = value;\n this.showSpec();\n }\n\n /** The saved component of the panel being edited. Drawn in place of the placeholder. */\n @Input()\n set PanelComponentID(value: string | null) {\n this._componentID = value;\n this.showSpec();\n }\n\n /** The form did not render, so the dialog should show its list instead. */\n @Output() Failed = new EventEmitter<void>();\n\n @ViewChild('viewport', { static: true }) private viewport!: ElementRef<HTMLElement>;\n @ViewChild('stage', { static: true }) private stage!: ElementRef<HTMLElement>;\n\n public PrimaryKey = new CompositeKey();\n /** False until the record to show is known, so the form is drawn once, not blank and then again. */\n public RecordResolved = false;\n /** Which record the preview shows, in words. */\n public RecordLabel = '';\n public readonly FormConfig: EntityFormConfig = { Toolbar: null, EnableRecordLinks: false };\n public Scale = 1;\n public StageWidth = MjFormPlacementPreviewComponent.MIN_STAGE_WIDTH;\n public StageHeight = 0;\n public Loaded = false;\n\n private _entityName = '';\n private _recordKey: CompositeKey | null = null;\n private resolveRun = 0;\n private resolveQueued = false;\n private _spec: FormContributionSpec | null = null;\n private _replacesRowID: string | null = null;\n private _componentSpec: ComponentSpec | null = null;\n private _componentID: string | null = null;\n private resizeObserver: ResizeObserver | null = null;\n private mutationObserver: MutationObserver | null = null;\n private frame = 0;\n private loadTimer: ReturnType<typeof setTimeout> | null = null;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private sizeSignature = '';\n /** Set after each redraw, until the panel has been brought into view. */\n private revealPending = false;\n\n private readonly preview = inject(FORM_PLACEMENT_PREVIEW);\n private readonly zone = inject(NgZone);\n private readonly cdr = inject(ChangeDetectorRef);\n\n public ngAfterViewInit(): void {\n this.zone.runOutsideAngular(() => {\n this.resizeObserver = new ResizeObserver(() => this.scheduleMeasure());\n this.resizeObserver.observe(this.viewport.nativeElement);\n this.resizeObserver.observe(this.stage.nativeElement);\n this.mutationObserver = new MutationObserver(() => this.scheduleMeasure());\n this.mutationObserver.observe(this.stage.nativeElement, {\n childList: true, subtree: true, attributes: true, attributeFilter: ['class', 'style', 'hidden'],\n });\n });\n this.loadTimer = setTimeout(() => { if (!this.Loaded) this.Failed.emit(); }, MjFormPlacementPreviewComponent.LOAD_TIMEOUT_MS);\n }\n\n public ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n this.mutationObserver?.disconnect();\n if (this.frame) cancelAnimationFrame(this.frame);\n if (this.loadTimer) clearTimeout(this.loadTimer);\n if (this.showTimer) clearTimeout(this.showTimer);\n }\n\n public OnLoaded(): void {\n this.Loaded = true;\n if (this.loadTimer) clearTimeout(this.loadTimer);\n this.scheduleMeasure();\n }\n\n public OnLoadError(): void {\n this.Failed.emit();\n }\n\n /**\n * Resolves the record once the current round of input changes is over, so the entity and the\n * record key arriving together look up a sample record once.\n */\n private queueResolveRecord(): void {\n if (this.resolveQueued) return;\n this.resolveQueued = true;\n queueMicrotask(() => {\n this.resolveQueued = false;\n void this.resolveRecord();\n });\n }\n\n /** Settles which record the form shows, then lets the form draw. */\n private async resolveRecord(): Promise<void> {\n const run = ++this.resolveRun;\n this.RecordResolved = false;\n this.Loaded = false;\n const entity = this._entityName ? this.ProviderToUse?.EntityByName(this._entityName) : undefined;\n let key = this._recordKey;\n let label = key ? 'Showing the record you have open' : '';\n if (!key && entity) {\n const sample = await this.sampleRecord(entity);\n if (run !== this.resolveRun) return;\n key = sample?.Key ?? null;\n label = sample ? `Showing ${sample.Label}, a sample record` : 'Showing a new, empty record — this entity has no records yet';\n }\n this.PrimaryKey = key ?? new CompositeKey();\n this.RecordLabel = label;\n this.RecordResolved = !!this._entityName;\n this.cdr.markForCheck();\n }\n\n /**\n * The entity's first record, ordered the way Form Builder's preview orders it: by name when\n * the entity has a name field, so every user sees the same one, else newest first.\n */\n private async sampleRecord(entity: EntityInfo): Promise<{ Key: CompositeKey; Label: string } | null> {\n const provider = this.ProviderToUse;\n if (!provider) return null;\n const nameField = entity.NameField?.Name;\n const keyFields = entity.PrimaryKeys.map((pk) => pk.Name);\n try {\n const result = await RunView.FromMetadataProvider(provider).RunView<Record<string, unknown>>({\n EntityName: entity.Name,\n Fields: nameField && !keyFields.includes(nameField) ? [...keyFields, nameField] : keyFields,\n OrderBy: nameField ? `${nameField} ASC` : '__mj_CreatedAt DESC',\n MaxRows: 1,\n SkipTotalRowCount: true,\n ResultType: 'simple',\n }, provider.CurrentUser);\n const row = result.Success ? result.Results?.[0] : undefined;\n if (!row) return null;\n const key = CompositeKey.FromEntityRecord(entity, row);\n const name = nameField ? String(row[nameField] ?? '').trim() : '';\n return { Key: key, Label: name ? `“${name}”` : 'the first record' };\n } catch (err) {\n LogError(`MjFormPlacementPreviewComponent: sample record for ${entity.Name} failed: ${err instanceof Error ? err.message : String(err)}`);\n return null;\n }\n }\n\n /**\n * Redraws the panel on the form, shortly after the last change. Each redraw remounts the\n * panel's component, so typing a label must not remount it on every key.\n */\n private showSpec(): void {\n if (this.showTimer) clearTimeout(this.showTimer);\n this.showTimer = setTimeout(() => {\n this.showTimer = null;\n const component = this._componentSpec || this._componentID\n ? { Spec: this._componentSpec, ComponentID: this._componentID }\n : null;\n this.preview.Show(this.EntityName, this._spec, this._replacesRowID, component);\n this.revealPending = true;\n this.scheduleMeasure();\n }, MjFormPlacementPreviewComponent.REDRAW_DELAY_MS);\n }\n\n private scheduleMeasure(): void {\n if (this.frame) return;\n this.frame = requestAnimationFrame(() => {\n this.frame = 0;\n this.measure();\n });\n }\n\n /** Fit the stage to the viewport, then keep the panel in view. Enters Angular only on a change. */\n private measure(): void {\n const viewport = this.viewport.nativeElement;\n const stage = this.stage.nativeElement;\n const available = viewport.clientWidth;\n const width = available > 0 ? Math.max(MjFormPlacementPreviewComponent.MIN_STAGE_WIDTH, available) : this.StageWidth;\n const scale = available > 0 ? available / width : this.Scale;\n const height = stage.offsetHeight * scale;\n if (this.Loaded && this.revealPending) this.revealPanel(stage);\n const signature = `${width}|${scale}|${height}`;\n if (signature === this.sizeSignature) return;\n this.sizeSignature = signature;\n this.zone.run(() => {\n this.StageWidth = width;\n this.Scale = scale;\n this.StageHeight = height;\n this.cdr.markForCheck();\n });\n }\n\n /**\n * Scrolls the panel into view once it draws after a redraw.\n *\n * On a form with a side rail the form itself shows the tab that holds the panel; this only\n * waits for it to draw and then brings it into view.\n */\n private revealPanel(stage: HTMLElement): void {\n const panel = stage.querySelector<HTMLElement>('[data-placement-preview]');\n if (!panel) return;\n const box = (panel.querySelector('mj-collapsible-panel') ?? panel).getBoundingClientRect();\n if (box.width === 0 && box.height === 0) return;\n this.revealPending = false;\n panel.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n }\n}\n","@if (RecordLabel) {\n <p class=\"mj-pp-record\"><i class=\"fa-solid fa-eye\" aria-hidden=\"true\"></i> {{ RecordLabel }}</p>\n}\n<div class=\"mj-pp-viewport\" #viewport [style.height.px]=\"StageHeight\">\n <div class=\"mj-pp-stage\" #stage inert\n [style.width.px]=\"StageWidth\"\n [style.transform]=\"'scale(' + Scale + ')'\">\n @if (RecordResolved) {\n <!-- Read-only: a preview shows the form as it reads, and an empty required field in\n edit mode would paint the whole form with validation errors. -->\n <mj-entity-form-host\n [Provider]=\"Provider\"\n [EntityName]=\"EntityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [EditMode]=\"false\"\n [Config]=\"FormConfig\"\n (LoadComplete)=\"OnLoaded()\"\n (LoadError)=\"OnLoadError()\">\n </mj-entity-form-host>\n }\n </div>\n\n @if (!Loaded) {\n <div class=\"mj-pp-loading\">\n <mj-loading text=\"Drawing the form…\" size=\"small\"></mj-loading>\n </div>\n }\n</div>\n"]}
|
|
@@ -9,12 +9,17 @@ import type { FormCompositionSnapshot } from './chrome/form-composition-snapshot
|
|
|
9
9
|
import { BaseFormSectionInfo } from './base-form-section-info';
|
|
10
10
|
import { MjCollapsiblePanelComponent } from './panel/collapsible-panel.component';
|
|
11
11
|
import { FormNavigationEvent } from './types/navigation-events';
|
|
12
|
-
import { FormContext, FormNotificationEvent, RecordSavedEvent, RecordRefreshedEvent, RecordDeletedEvent, RecordSaveFailedEvent, RecordDeleteFailedEvent, ValidationFailedEvent } from './types/form-types';
|
|
12
|
+
import { FormContext, FormModeSwitch, FormNotificationEvent, RecordSavedEvent, RecordRefreshedEvent, RecordDeletedEvent, RecordSaveFailedEvent, RecordDeleteFailedEvent, ValidationFailedEvent } from './types/form-types';
|
|
13
13
|
import { FormStateService } from './form-state.service';
|
|
14
14
|
import { EntityFormConfig } from './types/entity-form-config';
|
|
15
15
|
import { FormToolbarItemConfig, FormToolbarItemKey, FormToolbarItemClickEventArgs } from './types/form-toolbar-item';
|
|
16
16
|
import { DuplicateEntryCheckController, type DuplicateEntryCheckValue } from './duplicate-entry-check/duplicate-entry-check';
|
|
17
17
|
import * as i0 from "@angular/core";
|
|
18
|
+
/** Options for {@link BaseFormComponent.RefreshRecord}. */
|
|
19
|
+
export interface RefreshRecordOptions {
|
|
20
|
+
/** Show the "Record refreshed" notification after a successful reload. Default true. */
|
|
21
|
+
ShowSuccessNotification?: boolean;
|
|
22
|
+
}
|
|
18
23
|
/**
|
|
19
24
|
* Abstract base class for all entity record forms in MemberJunction.
|
|
20
25
|
*
|
|
@@ -73,6 +78,12 @@ export declare abstract class BaseFormComponent extends BaseRecordComponent impl
|
|
|
73
78
|
* doesn't need to subscribe — assignment is enough.
|
|
74
79
|
*/
|
|
75
80
|
OnVariantChanged: (variantID: string | null) => void;
|
|
81
|
+
/**
|
|
82
|
+
* Callback supplied by `MjEntityFormHostComponent` when the entity has both a
|
|
83
|
+
* custom form and a CodeGen standard form, allowing the toolbar's phone View
|
|
84
|
+
* sheet to switch between them.
|
|
85
|
+
*/
|
|
86
|
+
FormModeSwitch: FormModeSwitch | null;
|
|
76
87
|
isHistoryDialogOpen: boolean;
|
|
77
88
|
IsTagsPanelOpen: boolean;
|
|
78
89
|
TagCount: number;
|
|
@@ -306,9 +317,11 @@ export declare abstract class BaseFormComponent extends BaseRecordComponent impl
|
|
|
306
317
|
* record. Related-entity grids are notified via the form container's
|
|
307
318
|
* {@link FormRecordRefreshCoordinator} after this emits {@link RecordRefreshed}.
|
|
308
319
|
*
|
|
320
|
+
* @param options `ShowSuccessNotification: false` skips the "Record refreshed" notification;
|
|
321
|
+
* failure notifications still show.
|
|
309
322
|
* @returns true if the record was reloaded from the database.
|
|
310
323
|
*/
|
|
311
|
-
RefreshRecord(): Promise<boolean>;
|
|
324
|
+
RefreshRecord(options?: RefreshRecordOptions): Promise<boolean>;
|
|
312
325
|
private canRefreshRecord;
|
|
313
326
|
private executeRecordRefresh;
|
|
314
327
|
private reloadFavoriteStatusAfterRefresh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-form-component.d.ts","sourceRoot":"","sources":["../../src/lib/base-form-component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,MAAM,EAAE,SAAS,EAClB,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAC9C,YAAY,EACrB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,oBAAoB,EAC9D,sBAAsB,EAAE,oBAAoB,EAAE,iCAAiC,EACrE,aAAa,EACvB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACzH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAE/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,W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AAM;IAOhC,oBAAoB,IAAI,MAAM;IAI9B,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAIxC,aAAa,IAAI,MAAM;IAI9B;;;;;;;;;;OAUG;IACI,uBAAuB,IAAI,UAAU,GAAG,YAAY;IAIpD,gBAAgB,IAAI,UAAU,GAAG,YAAY;IAQ7C,gBAAgB,CAAC,SAAS,EAAE,UAAU,GAAG,YAAY,GAAG,IAAI;IAO5D,mBAAmB,IAAI,IAAI;IAW3B,eAAe,IAAI,MAAM,EAAE;IAW3B,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI;IAO7C,iBAAiB,IAAI,IAAI;IAOzB,qBAAqB,IAAI,OAAO;IAQhC,kBAAkB,IAAI,MAAM,EAAE;IAM9B,wBAAwB,IAAI,MAAM,EAAE;IAMpC,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,EAAE,qBAAqB,EAAE,MAAM,EAAE,GAAG,IAAI;IAOrF,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAMzD;;;;;;;OAOG;IACI,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAS9D;;;;OAIG;IACI,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAIvD;;;;OAIG;IACU,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAsB/C;;;OAGG;IACU,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/C;;;OAGG;IACI,kBAAkB,IAAI,IAAI;IAIjC;;;OAGG;IACI,yBAAyB,IAAI,IAAI;yCA7oDpB,iBAAiB;2CAAjB,iBAAiB;CAmpDtC"}
|
|
@@ -70,6 +70,12 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
70
70
|
OnVariantChanged = (_id) => {
|
|
71
71
|
// host installs the real handler post-construction
|
|
72
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* Callback supplied by `MjEntityFormHostComponent` when the entity has both a
|
|
75
|
+
* custom form and a CodeGen standard form, allowing the toolbar's phone View
|
|
76
|
+
* sheet to switch between them.
|
|
77
|
+
*/
|
|
78
|
+
FormModeSwitch = null;
|
|
73
79
|
isHistoryDialogOpen = false;
|
|
74
80
|
IsTagsPanelOpen = false;
|
|
75
81
|
TagCount = 0;
|
|
@@ -576,16 +582,18 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
576
582
|
* record. Related-entity grids are notified via the form container's
|
|
577
583
|
* {@link FormRecordRefreshCoordinator} after this emits {@link RecordRefreshed}.
|
|
578
584
|
*
|
|
585
|
+
* @param options `ShowSuccessNotification: false` skips the "Record refreshed" notification;
|
|
586
|
+
* failure notifications still show.
|
|
579
587
|
* @returns true if the record was reloaded from the database.
|
|
580
588
|
*/
|
|
581
|
-
async RefreshRecord() {
|
|
589
|
+
async RefreshRecord(options) {
|
|
582
590
|
if (!this.canRefreshRecord()) {
|
|
583
591
|
return false;
|
|
584
592
|
}
|
|
585
593
|
this.IsRefreshing = true;
|
|
586
594
|
this.cdr.markForCheck();
|
|
587
595
|
try {
|
|
588
|
-
return await this.executeRecordRefresh();
|
|
596
|
+
return await this.executeRecordRefresh(options?.ShowSuccessNotification ?? true);
|
|
589
597
|
}
|
|
590
598
|
finally {
|
|
591
599
|
this.IsRefreshing = false;
|
|
@@ -595,7 +603,7 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
595
603
|
canRefreshRecord() {
|
|
596
604
|
return !!this.record && this.record.IsSaved && !this.EditMode;
|
|
597
605
|
}
|
|
598
|
-
async executeRecordRefresh() {
|
|
606
|
+
async executeRecordRefresh(showSuccessNotification) {
|
|
599
607
|
const record = this.record;
|
|
600
608
|
if (!record) {
|
|
601
609
|
return false;
|
|
@@ -611,11 +619,13 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
611
619
|
return false;
|
|
612
620
|
}
|
|
613
621
|
await this.reloadFavoriteStatusAfterRefresh(record);
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
622
|
+
if (showSuccessNotification) {
|
|
623
|
+
this.Notification.emit({
|
|
624
|
+
Message: 'Record refreshed from database',
|
|
625
|
+
Type: 'info',
|
|
626
|
+
Duration: 2000,
|
|
627
|
+
});
|
|
628
|
+
}
|
|
619
629
|
this.RecordRefreshed.emit({
|
|
620
630
|
EntityName: record.EntityInfo.Name,
|
|
621
631
|
Record: record,
|