@memberjunction/ng-entity-form-dialog 2.112.0 → 2.113.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ Display only a specific section of a form:
|
|
|
104
104
|
|
|
105
105
|
```typescript
|
|
106
106
|
import { Component } from '@angular/core';
|
|
107
|
-
import { BaseEntity, Metadata } from '@memberjunction/
|
|
107
|
+
import { BaseEntity, Metadata } from '@memberjunction/core';
|
|
108
108
|
|
|
109
109
|
@Component({
|
|
110
110
|
selector: 'app-user-management',
|
|
@@ -155,24 +155,24 @@ export class UserManagementComponent {
|
|
|
155
155
|
|
|
156
156
|
### Input Properties
|
|
157
157
|
|
|
158
|
-
| Property
|
|
159
|
-
|
|
160
|
-
| `Title`
|
|
161
|
-
| `ShowSaveButton`
|
|
162
|
-
| `ShowCancelButton`
|
|
163
|
-
| `Width`
|
|
164
|
-
| `Height`
|
|
165
|
-
| `Mode`
|
|
166
|
-
| `SectionName`
|
|
167
|
-
| `Record`
|
|
168
|
-
| `HandleSave`
|
|
169
|
-
| `AutoRevertOnCancel` | `boolean`
|
|
170
|
-
| `Visible`
|
|
158
|
+
| Property | Type | Default | Description |
|
|
159
|
+
|----------|------|---------|-------------|
|
|
160
|
+
| `Title` | `string` | `''` | The title displayed in the dialog header |
|
|
161
|
+
| `ShowSaveButton` | `boolean` | `true` | Whether to display the Save button |
|
|
162
|
+
| `ShowCancelButton` | `boolean` | `true` | Whether to display the Cancel button |
|
|
163
|
+
| `Width` | `number` | `800` | Initial dialog width in pixels |
|
|
164
|
+
| `Height` | `number` | `600` | Initial dialog height in pixels |
|
|
165
|
+
| `Mode` | `'complete' \| 'section'` | `'complete'` | Display mode - entire form or specific section |
|
|
166
|
+
| `SectionName` | `string` | `''` | The section name to display (required when Mode is 'section') |
|
|
167
|
+
| `Record` | `BaseEntity \| null` | `null` | The entity record to edit (required) |
|
|
168
|
+
| `HandleSave` | `boolean` | `true` | Automatically save the record when Save is clicked |
|
|
169
|
+
| `AutoRevertOnCancel` | `boolean` | `true` | Automatically revert changes when Cancel is clicked |
|
|
170
|
+
| `Visible` | `boolean` | `false` | Controls dialog visibility |
|
|
171
171
|
|
|
172
172
|
### Output Events
|
|
173
173
|
|
|
174
|
-
| Event
|
|
175
|
-
|
|
174
|
+
| Event | Type | Description |
|
|
175
|
+
|-------|------|-------------|
|
|
176
176
|
| `DialogClosed` | `EventEmitter<'Save' \| 'Cancel'>` | Emitted when the dialog is closed with the action taken |
|
|
177
177
|
|
|
178
178
|
### Public Methods
|
|
@@ -257,4 +257,4 @@ To build the package:
|
|
|
257
257
|
npm run build
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
The package uses Angular's `ngc` compiler and outputs to the `dist` directory.
|
|
260
|
+
The package uses Angular's `ngc` compiler and outputs to the `dist` directory.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ViewContainerRef, EventEmitter } from '@angular/core';
|
|
2
|
-
import { BaseEntity } from '@memberjunction/
|
|
2
|
+
import { BaseEntity } from '@memberjunction/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* This dialog will display the form for a given entity. Using the configuration settings you can display the entire form
|
|
@@ -156,7 +156,7 @@ export class EntityFormDialogComponent {
|
|
|
156
156
|
this.Visible = false;
|
|
157
157
|
if (this.Record) {
|
|
158
158
|
if (this.HandleSave && status === 'Save') {
|
|
159
|
-
if (!
|
|
159
|
+
if (!await this.Record.Save()) {
|
|
160
160
|
SharedService.Instance.CreateSimpleNotification(`Error saving ${this.Record.EntityInfo.Name} record, rolling back changes`, 'error');
|
|
161
161
|
this.Record.Revert();
|
|
162
162
|
}
|
|
@@ -210,5 +210,5 @@ export class EntityFormDialogComponent {
|
|
|
210
210
|
type: ViewChild,
|
|
211
211
|
args: ['dynamicFormContainer', { read: ViewContainerRef }]
|
|
212
212
|
}] }); })();
|
|
213
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityFormDialogComponent, { className: "EntityFormDialogComponent", filePath: "src/lib/entity-form-dialog/entity-form-dialog.component.ts", lineNumber:
|
|
213
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityFormDialogComponent, { className: "EntityFormDialogComponent", filePath: "src/lib/entity-form-dialog/entity-form-dialog.component.ts", lineNumber: 19 }); })();
|
|
214
214
|
//# sourceMappingURL=entity-form-dialog.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-form-dialog.component.js","sourceRoot":"","sources":["../../../src/lib/entity-form-dialog/entity-form-dialog.component.ts","../../../src/lib/entity-form-dialog/entity-form-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGpG,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"entity-form-dialog.component.js","sourceRoot":"","sources":["../../../src/lib/entity-form-dialog/entity-form-dialog.component.ts","../../../src/lib/entity-form-dialog/entity-form-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGpG,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAqB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;ICEpF,iCAA+F;IAApD,+NAAS,mBAAY,MAAM,CAAC,KAAC;IAAuB,oBAAI;IAAA,iBAAS;;;;IAC5G,iCAA6E;IAAhC,+NAAS,mBAAY,QAAQ,CAAC,KAAC;IAAC,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WAAW;kBAAnB,KAAK;YAIG,MAAM;kBAAd,KAAK;YAKG,UAAU;kBAAlB,KAAK;YAIG,kBAAkB;kBAA1B,KAAK;YAKI,YAAY;kBAArB,MAAM;YAOH,OAAO;kBADV,KAAK;YAcyD,SAAS;kBAAvE,SAAS;mBAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;;kFApElD,yBAAyB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-entity-form-dialog",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.113.1",
|
|
4
4
|
"description": "MemberJunction: Dialog component that is able to display a form for display and/or editing for any record from any entity in MemberJunction.",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -25,11 +25,12 @@
|
|
|
25
25
|
"@angular/router": "18.0.2"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@memberjunction/core-entities": "2.
|
|
29
|
-
"@memberjunction/global": "2.
|
|
30
|
-
"@memberjunction/
|
|
31
|
-
"@memberjunction/ng-
|
|
32
|
-
"@memberjunction/ng-
|
|
28
|
+
"@memberjunction/core-entities": "2.113.1",
|
|
29
|
+
"@memberjunction/global": "2.113.1",
|
|
30
|
+
"@memberjunction/core": "2.113.1",
|
|
31
|
+
"@memberjunction/ng-container-directives": "2.113.1",
|
|
32
|
+
"@memberjunction/ng-shared": "2.113.1",
|
|
33
|
+
"@memberjunction/ng-base-forms": "2.113.1",
|
|
33
34
|
"@progress/kendo-angular-buttons": "16.2.0",
|
|
34
35
|
"@progress/kendo-angular-dialog": "16.2.0",
|
|
35
36
|
"tslib": "^2.3.0"
|