@genesislcap/foundation-entity-management 14.24.4 → 14.25.0-bny.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +206 -86
- package/dist/dts/entities/entities.d.ts +21 -4
- package/dist/dts/entities/entities.d.ts.map +1 -1
- package/dist/dts/entities/entities.styles.d.ts.map +1 -1
- package/dist/dts/entities/entities.template.d.ts.map +1 -1
- package/dist/dts/list/list.d.ts +0 -2
- package/dist/dts/list/list.d.ts.map +1 -1
- package/dist/dts/list/list.styles.d.ts.map +1 -1
- package/dist/dts/list/list.template.d.ts +0 -23
- package/dist/dts/list/list.template.d.ts.map +1 -1
- package/dist/dts/utils/index.d.ts +26 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/esm/entities/entities.js +28 -5
- package/dist/esm/entities/entities.styles.js +6 -0
- package/dist/esm/entities/entities.template.js +17 -3
- package/dist/esm/list/list.js +2 -7
- package/dist/esm/list/list.styles.js +0 -6
- package/dist/esm/list/list.template.js +0 -35
- package/dist/esm/utils/index.js +25 -0
- package/dist/foundation-entity-management.api.json +198 -0
- package/dist/foundation-entity-management.d.ts +48 -4
- package/docs/api/foundation-entity-management.buttoncellrenderer.md +34 -0
- package/docs/api/foundation-entity-management.entitymanagement.create.md +17 -0
- package/docs/api/foundation-entity-management.entitymanagement.criteriachanged.md +22 -0
- package/docs/api/foundation-entity-management.entitymanagement.defaultentityvalues.md +11 -0
- package/docs/api/foundation-entity-management.entitymanagement.editentityform.md +11 -0
- package/docs/api/foundation-entity-management.entitymanagement.md +5 -0
- package/docs/api/foundation-entity-management.entitymanagement.modalposition.md +13 -0
- package/docs/api/foundation-entity-management.md +1 -0
- package/docs/api-report.md +34 -0
- package/package.json +18 -44
|
@@ -46,6 +46,11 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
46
46
|
*/
|
|
47
47
|
this.entityLabel = '';
|
|
48
48
|
this.editModalVisible = false;
|
|
49
|
+
/**
|
|
50
|
+
* Determines where the modal dialog will appear on screen
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
this.modalPosition = 'right';
|
|
49
54
|
/**
|
|
50
55
|
* Updates the reference to the current entity stored in the class. Added as an event listener on the class when receiving the `rowSelected` event.
|
|
51
56
|
*
|
|
@@ -82,6 +87,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
82
87
|
}
|
|
83
88
|
this.addEventListener('edit-entity', this.editEntity);
|
|
84
89
|
this.addEventListener('read-entity', this.readEntity);
|
|
90
|
+
this.addEventListener('criteria-changed', this.criteriaChanged);
|
|
85
91
|
});
|
|
86
92
|
}
|
|
87
93
|
/**
|
|
@@ -114,6 +120,13 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
114
120
|
this.closeModal();
|
|
115
121
|
});
|
|
116
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Show the entity create form
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
create() {
|
|
128
|
+
this.editEntity();
|
|
129
|
+
}
|
|
117
130
|
/**
|
|
118
131
|
* Sets up and opens the model to either edit or add an entity. Added as an event listener on the class when receiving the `edit-entity` event.
|
|
119
132
|
*
|
|
@@ -122,10 +135,10 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
122
135
|
*/
|
|
123
136
|
editEntity(e) {
|
|
124
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
this.editDialogTitle = `${e.detail ? 'Edit' : 'Add'} ${this.entityLabel}`;
|
|
126
|
-
this.formUiSchema = e.detail ? this.updateFormUiSchema : this.createFormUiSchema;
|
|
127
|
-
this.formResourceName = e.detail ? this.updateEvent : this.createEvent;
|
|
128
|
-
if (e.detail) {
|
|
138
|
+
this.editDialogTitle = `${(e === null || e === void 0 ? void 0 : e.detail) ? 'Edit' : 'Add'} ${this.entityLabel}`;
|
|
139
|
+
this.formUiSchema = (e === null || e === void 0 ? void 0 : e.detail) ? this.updateFormUiSchema : this.createFormUiSchema;
|
|
140
|
+
this.formResourceName = (e === null || e === void 0 ? void 0 : e.detail) ? this.updateEvent : this.createEvent;
|
|
141
|
+
if (e === null || e === void 0 ? void 0 : e.detail) {
|
|
129
142
|
const _a = e.detail, { ROW_REF } = _a, formData = __rest(_a, ["ROW_REF"]);
|
|
130
143
|
this.editedEntity = formData;
|
|
131
144
|
if (this.readEventFn) {
|
|
@@ -140,7 +153,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
140
153
|
}
|
|
141
154
|
}
|
|
142
155
|
else {
|
|
143
|
-
this.editedEntity = {};
|
|
156
|
+
this.editedEntity = Object.assign({}, this.defaultEntityValues);
|
|
144
157
|
}
|
|
145
158
|
this.editModalVisible = true;
|
|
146
159
|
});
|
|
@@ -151,9 +164,13 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
151
164
|
this.editDialogTitle = '';
|
|
152
165
|
}
|
|
153
166
|
closeModal() {
|
|
167
|
+
this.editEntityForm.reset();
|
|
154
168
|
this.readonly = false;
|
|
155
169
|
this.editModalVisible = false;
|
|
156
170
|
}
|
|
171
|
+
criteriaChanged(e) {
|
|
172
|
+
this.datasourceConfig = Object.assign(Object.assign({}, this.datasourceConfig), { criteria: e.detail });
|
|
173
|
+
}
|
|
157
174
|
/**
|
|
158
175
|
* Handler for deleting the entity. Added as an event listener on the class when receiving the `delete-entity` event.
|
|
159
176
|
*
|
|
@@ -292,6 +309,9 @@ __decorate([
|
|
|
292
309
|
__decorate([
|
|
293
310
|
observable
|
|
294
311
|
], EntityManagement.prototype, "submitting", void 0);
|
|
312
|
+
__decorate([
|
|
313
|
+
observable
|
|
314
|
+
], EntityManagement.prototype, "defaultEntityValues", void 0);
|
|
295
315
|
__decorate([
|
|
296
316
|
observable
|
|
297
317
|
], EntityManagement.prototype, "editDialogTitle", void 0);
|
|
@@ -307,6 +327,9 @@ __decorate([
|
|
|
307
327
|
__decorate([
|
|
308
328
|
attr({ mode: 'boolean', attribute: 'enable-cell-flashing' })
|
|
309
329
|
], EntityManagement.prototype, "enableCellFlashing", void 0);
|
|
330
|
+
__decorate([
|
|
331
|
+
attr({ attribute: 'modal-position' })
|
|
332
|
+
], EntityManagement.prototype, "modalPosition", void 0);
|
|
310
333
|
EntityManagement = __decorate([
|
|
311
334
|
customElement({
|
|
312
335
|
name: 'entity-management',
|
|
@@ -3,28 +3,40 @@ import { html, ref, when } from '@microsoft/fast-element';
|
|
|
3
3
|
import { List } from '../list';
|
|
4
4
|
List;
|
|
5
5
|
Form;
|
|
6
|
+
/**
|
|
7
|
+
* Default header for Entity Management screen
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
const defaultHeader = html `
|
|
11
|
+
<h3>${(x) => x.title}</h3>
|
|
12
|
+
${when((x) => x.createEvent, html `
|
|
13
|
+
<zero-button appearance="accent" @click=${(x, y) => x.create()}>Add</zero-button>
|
|
14
|
+
`)}
|
|
15
|
+
`;
|
|
6
16
|
/**
|
|
7
17
|
* Defines the html of the entity component as a ViewTemplate object
|
|
8
18
|
* @typeParam EntityManagement - the {@link EntityManagement | class} the template is defined for
|
|
9
19
|
*/
|
|
10
20
|
export const template = html `
|
|
11
21
|
<div class="container">
|
|
22
|
+
<slot name="header" part="header">${defaultHeader}</slot>
|
|
12
23
|
<entity-list
|
|
13
24
|
title=${(x) => x.title}
|
|
14
25
|
persist-column-state-key=${(x) => x.persistColumnStateKey}
|
|
15
26
|
size-columns-to-fit=${(x) => x.sizeColumnsToFit}
|
|
16
27
|
enable-filter-bar=${(x) => x.enableFilterBar}
|
|
17
28
|
resourceName=${(x) => x.resourceName}
|
|
18
|
-
:createEvent=${(x) => x.createEvent}
|
|
19
29
|
:deleteEvent=${(x) => x.deleteEvent}
|
|
20
30
|
:updateEvent=${(x) => x.updateEvent}
|
|
21
31
|
:columns=${(x) => x.columns}
|
|
22
32
|
:datasourceConfig=${(x) => x.datasourceConfig}
|
|
23
33
|
data-test-id="entity-list"
|
|
24
|
-
|
|
34
|
+
>
|
|
35
|
+
<slot name="header" slot="header">${defaultHeader}</slot>
|
|
36
|
+
</entity-list>
|
|
25
37
|
<zero-modal
|
|
26
38
|
${ref('editEntityModal')}
|
|
27
|
-
position
|
|
39
|
+
position=${(x) => x.modalPosition}
|
|
28
40
|
:onCloseCallback=${(x) => x.closeModal.bind(x)}
|
|
29
41
|
data-test-id="edit-entity-modal"
|
|
30
42
|
>
|
|
@@ -33,6 +45,8 @@ export const template = html `
|
|
|
33
45
|
<slot name="edit">
|
|
34
46
|
${when((x) => x.editModalVisible, html `
|
|
35
47
|
<foundation-form
|
|
48
|
+
part="form"
|
|
49
|
+
${ref('editEntityForm')}
|
|
36
50
|
resourceName=${(x) => x.formResourceName}
|
|
37
51
|
:data=${(x) => x.editedEntity}
|
|
38
52
|
:uischema=${(x) => x.formUiSchema}
|
package/dist/esm/list/list.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { Events } from '@ag-grid-community/core';
|
|
3
3
|
import { attr, customElement, FASTElement, observable } from '@microsoft/fast-element';
|
|
4
|
+
import { buttonCellRenderer } from '../utils';
|
|
4
5
|
import { listStyles } from './list.styles';
|
|
5
|
-
import {
|
|
6
|
+
import { listTemplate } from './list.template';
|
|
6
7
|
let List = class List extends FASTElement {
|
|
7
8
|
constructor() {
|
|
8
9
|
super(...arguments);
|
|
@@ -56,9 +57,6 @@ let List = class List extends FASTElement {
|
|
|
56
57
|
select(e) {
|
|
57
58
|
this.$emit('rowSelected', e);
|
|
58
59
|
}
|
|
59
|
-
create() {
|
|
60
|
-
this.$emit('edit-entity');
|
|
61
|
-
}
|
|
62
60
|
delete(e) {
|
|
63
61
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
62
|
this.$emit('delete-entity', e);
|
|
@@ -92,9 +90,6 @@ __decorate([
|
|
|
92
90
|
__decorate([
|
|
93
91
|
observable
|
|
94
92
|
], List.prototype, "actionButtonsConfig", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
observable
|
|
97
|
-
], List.prototype, "createEvent", void 0);
|
|
98
93
|
__decorate([
|
|
99
94
|
observable
|
|
100
95
|
], List.prototype, "deleteEvent", void 0);
|
|
@@ -1,40 +1,5 @@
|
|
|
1
1
|
import { html, ref, repeat, when } from '@microsoft/fast-element';
|
|
2
|
-
export const buttonCellRenderer = (title, clickHandler) => ({
|
|
3
|
-
width: 100,
|
|
4
|
-
pinned: 'right',
|
|
5
|
-
enableCellChangeFlash: false,
|
|
6
|
-
cellStyle: { padding: '0', lineHeight: '25px' },
|
|
7
|
-
filter: false,
|
|
8
|
-
suppressFiltersToolPanel: true,
|
|
9
|
-
suppressColumnsToolPanel: true,
|
|
10
|
-
headerName: '',
|
|
11
|
-
minWidth: 100,
|
|
12
|
-
maxWidth: 100,
|
|
13
|
-
cellRendererSelector: (params) => params.node.group
|
|
14
|
-
? undefined
|
|
15
|
-
: {
|
|
16
|
-
component: 'action',
|
|
17
|
-
params: {
|
|
18
|
-
actionClick: clickHandler,
|
|
19
|
-
actionName: title,
|
|
20
|
-
appearance: 'accent',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
2
|
export const listTemplate = html `
|
|
25
|
-
<div class="heading">
|
|
26
|
-
<h3 data-test-id="title">${(x) => x.title}</h3>
|
|
27
|
-
${when((x) => x.createEvent, html `
|
|
28
|
-
<zero-button
|
|
29
|
-
appearance="accent"
|
|
30
|
-
@click=${(x) => x.create()}
|
|
31
|
-
?disabled="${(x) => x.addDisabled}"
|
|
32
|
-
data-test-id="button-create"
|
|
33
|
-
>
|
|
34
|
-
Add
|
|
35
|
-
</zero-button>
|
|
36
|
-
`)}
|
|
37
|
-
</div>
|
|
38
3
|
<div class="container">
|
|
39
4
|
${when((x) => x.enableFilterBar, html `
|
|
40
5
|
<zero-filter-bar
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,2 +1,27 @@
|
|
|
1
1
|
export * from './formatting';
|
|
2
2
|
export * from './logger';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const buttonCellRenderer = (title, clickHandler) => ({
|
|
7
|
+
width: 100,
|
|
8
|
+
pinned: 'right',
|
|
9
|
+
enableCellChangeFlash: false,
|
|
10
|
+
cellStyle: { padding: '0', lineHeight: '25px' },
|
|
11
|
+
filter: false,
|
|
12
|
+
suppressFiltersToolPanel: true,
|
|
13
|
+
suppressColumnsToolPanel: true,
|
|
14
|
+
headerName: '',
|
|
15
|
+
minWidth: 100,
|
|
16
|
+
maxWidth: 100,
|
|
17
|
+
cellRendererSelector: (params) => params.node.group
|
|
18
|
+
? undefined
|
|
19
|
+
: {
|
|
20
|
+
component: 'action',
|
|
21
|
+
params: {
|
|
22
|
+
actionClick: clickHandler,
|
|
23
|
+
actionName: title,
|
|
24
|
+
appearance: 'accent',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -172,6 +172,29 @@
|
|
|
172
172
|
"name": "",
|
|
173
173
|
"preserveMemberOrder": false,
|
|
174
174
|
"members": [
|
|
175
|
+
{
|
|
176
|
+
"kind": "Variable",
|
|
177
|
+
"canonicalReference": "@genesislcap/foundation-entity-management!buttonCellRenderer:var",
|
|
178
|
+
"docComment": "/**\n * @public\n */\n",
|
|
179
|
+
"excerptTokens": [
|
|
180
|
+
{
|
|
181
|
+
"kind": "Content",
|
|
182
|
+
"text": "buttonCellRenderer: "
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"kind": "Content",
|
|
186
|
+
"text": "(title: any, clickHandler: any) => {\n width: number;\n pinned: string;\n enableCellChangeFlash: boolean;\n cellStyle: {\n padding: string;\n lineHeight: string;\n };\n filter: boolean;\n suppressFiltersToolPanel: boolean;\n suppressColumnsToolPanel: boolean;\n headerName: string;\n minWidth: number;\n maxWidth: number;\n cellRendererSelector: (params: any) => {\n component: string;\n params: {\n actionClick: any;\n actionName: any;\n appearance: string;\n };\n };\n}"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"fileUrlPath": "src/utils/index.ts",
|
|
190
|
+
"isReadonly": true,
|
|
191
|
+
"releaseTag": "Public",
|
|
192
|
+
"name": "buttonCellRenderer",
|
|
193
|
+
"variableTypeTokenRange": {
|
|
194
|
+
"startIndex": 1,
|
|
195
|
+
"endIndex": 2
|
|
196
|
+
}
|
|
197
|
+
},
|
|
175
198
|
{
|
|
176
199
|
"kind": "TypeAlias",
|
|
177
200
|
"canonicalReference": "@genesislcap/foundation-entity-management!DatasourceConfiguration:type",
|
|
@@ -370,6 +393,37 @@
|
|
|
370
393
|
"isProtected": true,
|
|
371
394
|
"isAbstract": false
|
|
372
395
|
},
|
|
396
|
+
{
|
|
397
|
+
"kind": "Method",
|
|
398
|
+
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#create:member(1)",
|
|
399
|
+
"docComment": "/**\n * Show the entity create form\n *\n * @public\n */\n",
|
|
400
|
+
"excerptTokens": [
|
|
401
|
+
{
|
|
402
|
+
"kind": "Content",
|
|
403
|
+
"text": "create(): "
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"kind": "Content",
|
|
407
|
+
"text": "void"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"kind": "Content",
|
|
411
|
+
"text": ";"
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
"isStatic": false,
|
|
415
|
+
"returnTypeTokenRange": {
|
|
416
|
+
"startIndex": 1,
|
|
417
|
+
"endIndex": 2
|
|
418
|
+
},
|
|
419
|
+
"releaseTag": "Public",
|
|
420
|
+
"isProtected": false,
|
|
421
|
+
"overloadIndex": 1,
|
|
422
|
+
"parameters": [],
|
|
423
|
+
"isOptional": false,
|
|
424
|
+
"isAbstract": false,
|
|
425
|
+
"name": "create"
|
|
426
|
+
},
|
|
373
427
|
{
|
|
374
428
|
"kind": "Property",
|
|
375
429
|
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#createEvent:member",
|
|
@@ -430,6 +484,59 @@
|
|
|
430
484
|
"isProtected": false,
|
|
431
485
|
"isAbstract": false
|
|
432
486
|
},
|
|
487
|
+
{
|
|
488
|
+
"kind": "Method",
|
|
489
|
+
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#criteriaChanged:member(1)",
|
|
490
|
+
"docComment": "",
|
|
491
|
+
"excerptTokens": [
|
|
492
|
+
{
|
|
493
|
+
"kind": "Content",
|
|
494
|
+
"text": "criteriaChanged(e: "
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"kind": "Reference",
|
|
498
|
+
"text": "CustomEvent",
|
|
499
|
+
"canonicalReference": "!CustomEvent:interface"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"kind": "Content",
|
|
503
|
+
"text": "<string>"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"kind": "Content",
|
|
507
|
+
"text": "): "
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"kind": "Content",
|
|
511
|
+
"text": "void"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"kind": "Content",
|
|
515
|
+
"text": ";"
|
|
516
|
+
}
|
|
517
|
+
],
|
|
518
|
+
"isStatic": false,
|
|
519
|
+
"returnTypeTokenRange": {
|
|
520
|
+
"startIndex": 4,
|
|
521
|
+
"endIndex": 5
|
|
522
|
+
},
|
|
523
|
+
"releaseTag": "Public",
|
|
524
|
+
"isProtected": false,
|
|
525
|
+
"overloadIndex": 1,
|
|
526
|
+
"parameters": [
|
|
527
|
+
{
|
|
528
|
+
"parameterName": "e",
|
|
529
|
+
"parameterTypeTokenRange": {
|
|
530
|
+
"startIndex": 1,
|
|
531
|
+
"endIndex": 3
|
|
532
|
+
},
|
|
533
|
+
"isOptional": false
|
|
534
|
+
}
|
|
535
|
+
],
|
|
536
|
+
"isOptional": false,
|
|
537
|
+
"isAbstract": false,
|
|
538
|
+
"name": "criteriaChanged"
|
|
539
|
+
},
|
|
433
540
|
{
|
|
434
541
|
"kind": "Property",
|
|
435
542
|
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#datasourceConfig:member",
|
|
@@ -493,6 +600,36 @@
|
|
|
493
600
|
"isAbstract": false,
|
|
494
601
|
"name": "deepClone"
|
|
495
602
|
},
|
|
603
|
+
{
|
|
604
|
+
"kind": "Property",
|
|
605
|
+
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#defaultEntityValues:member",
|
|
606
|
+
"docComment": "",
|
|
607
|
+
"excerptTokens": [
|
|
608
|
+
{
|
|
609
|
+
"kind": "Content",
|
|
610
|
+
"text": "defaultEntityValues: "
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"kind": "Content",
|
|
614
|
+
"text": "any"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"kind": "Content",
|
|
618
|
+
"text": ";"
|
|
619
|
+
}
|
|
620
|
+
],
|
|
621
|
+
"isReadonly": false,
|
|
622
|
+
"isOptional": false,
|
|
623
|
+
"releaseTag": "Public",
|
|
624
|
+
"name": "defaultEntityValues",
|
|
625
|
+
"propertyTypeTokenRange": {
|
|
626
|
+
"startIndex": 1,
|
|
627
|
+
"endIndex": 2
|
|
628
|
+
},
|
|
629
|
+
"isStatic": false,
|
|
630
|
+
"isProtected": false,
|
|
631
|
+
"isAbstract": false
|
|
632
|
+
},
|
|
496
633
|
{
|
|
497
634
|
"kind": "Property",
|
|
498
635
|
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#deleteEvent:member",
|
|
@@ -583,6 +720,37 @@
|
|
|
583
720
|
"isProtected": false,
|
|
584
721
|
"isAbstract": false
|
|
585
722
|
},
|
|
723
|
+
{
|
|
724
|
+
"kind": "Property",
|
|
725
|
+
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#editEntityForm:member",
|
|
726
|
+
"docComment": "",
|
|
727
|
+
"excerptTokens": [
|
|
728
|
+
{
|
|
729
|
+
"kind": "Content",
|
|
730
|
+
"text": "editEntityForm: "
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"kind": "Reference",
|
|
734
|
+
"text": "Form",
|
|
735
|
+
"canonicalReference": "@genesislcap/foundation-forms!Form:class"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"kind": "Content",
|
|
739
|
+
"text": ";"
|
|
740
|
+
}
|
|
741
|
+
],
|
|
742
|
+
"isReadonly": false,
|
|
743
|
+
"isOptional": false,
|
|
744
|
+
"releaseTag": "Public",
|
|
745
|
+
"name": "editEntityForm",
|
|
746
|
+
"propertyTypeTokenRange": {
|
|
747
|
+
"startIndex": 1,
|
|
748
|
+
"endIndex": 2
|
|
749
|
+
},
|
|
750
|
+
"isStatic": false,
|
|
751
|
+
"isProtected": false,
|
|
752
|
+
"isAbstract": false
|
|
753
|
+
},
|
|
586
754
|
{
|
|
587
755
|
"kind": "Property",
|
|
588
756
|
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#editEntityModal:member",
|
|
@@ -794,6 +962,36 @@
|
|
|
794
962
|
"isProtected": false,
|
|
795
963
|
"isAbstract": false
|
|
796
964
|
},
|
|
965
|
+
{
|
|
966
|
+
"kind": "Property",
|
|
967
|
+
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#modalPosition:member",
|
|
968
|
+
"docComment": "/**\n * Determines where the modal dialog will appear on screen\n *\n * @public\n */\n",
|
|
969
|
+
"excerptTokens": [
|
|
970
|
+
{
|
|
971
|
+
"kind": "Content",
|
|
972
|
+
"text": "modalPosition: "
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
"kind": "Content",
|
|
976
|
+
"text": "'centre' | 'left' | 'right'"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"kind": "Content",
|
|
980
|
+
"text": ";"
|
|
981
|
+
}
|
|
982
|
+
],
|
|
983
|
+
"isReadonly": false,
|
|
984
|
+
"isOptional": false,
|
|
985
|
+
"releaseTag": "Public",
|
|
986
|
+
"name": "modalPosition",
|
|
987
|
+
"propertyTypeTokenRange": {
|
|
988
|
+
"startIndex": 1,
|
|
989
|
+
"endIndex": 2
|
|
990
|
+
},
|
|
991
|
+
"isStatic": false,
|
|
992
|
+
"isProtected": false,
|
|
993
|
+
"isAbstract": false
|
|
994
|
+
},
|
|
797
995
|
{
|
|
798
996
|
"kind": "Property",
|
|
799
997
|
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#persistColumnStateKey:member",
|
|
@@ -7,6 +7,7 @@ import { Controller } from '@microsoft/fast-element';
|
|
|
7
7
|
import { DatasourceOptions } from '@genesislcap/foundation-comms';
|
|
8
8
|
import { DOMContainer } from '@genesislcap/foundation-utils';
|
|
9
9
|
import { FASTElement } from '@microsoft/fast-element';
|
|
10
|
+
import { Form } from '@genesislcap/foundation-forms';
|
|
10
11
|
import { FoundationAnalytics } from '@genesislcap/foundation-comms';
|
|
11
12
|
import { FoundationLayoutContainer } from '@genesislcap/foundation-utils';
|
|
12
13
|
import { GridProRendererTypes } from '@genesislcap/grid-pro';
|
|
@@ -18,6 +19,33 @@ import { RouterConfiguration } from '@microsoft/fast-router';
|
|
|
18
19
|
import { Session } from '@genesislcap/foundation-comms';
|
|
19
20
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
20
21
|
|
|
22
|
+
/**
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export declare const buttonCellRenderer: (title: any, clickHandler: any) => {
|
|
26
|
+
width: number;
|
|
27
|
+
pinned: string;
|
|
28
|
+
enableCellChangeFlash: boolean;
|
|
29
|
+
cellStyle: {
|
|
30
|
+
padding: string;
|
|
31
|
+
lineHeight: string;
|
|
32
|
+
};
|
|
33
|
+
filter: boolean;
|
|
34
|
+
suppressFiltersToolPanel: boolean;
|
|
35
|
+
suppressColumnsToolPanel: boolean;
|
|
36
|
+
headerName: string;
|
|
37
|
+
minWidth: number;
|
|
38
|
+
maxWidth: number;
|
|
39
|
+
cellRendererSelector: (params: any) => {
|
|
40
|
+
component: string;
|
|
41
|
+
params: {
|
|
42
|
+
actionClick: any;
|
|
43
|
+
actionName: any;
|
|
44
|
+
appearance: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
21
49
|
/**
|
|
22
50
|
* The attribute which is set to configure the resource that the entity manager is working with
|
|
23
51
|
*
|
|
@@ -166,6 +194,7 @@ export declare class EntityManagement extends EntityManagement_base {
|
|
|
166
194
|
*/
|
|
167
195
|
editedEntity: any;
|
|
168
196
|
submitting: boolean;
|
|
197
|
+
defaultEntityValues: any;
|
|
169
198
|
/**
|
|
170
199
|
* String which contains the text of the popup modal when the user is adding or editing an entity
|
|
171
200
|
*/
|
|
@@ -173,9 +202,15 @@ export declare class EntityManagement extends EntityManagement_base {
|
|
|
173
202
|
editModalVisible: boolean;
|
|
174
203
|
editModalVisibleChanged(): void;
|
|
175
204
|
editEntityModal: any;
|
|
205
|
+
editEntityForm: Form;
|
|
176
206
|
sizeColumnsToFit: boolean;
|
|
177
207
|
enableFilterBar: boolean;
|
|
178
208
|
enableCellFlashing: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Determines where the modal dialog will appear on screen
|
|
211
|
+
* @public
|
|
212
|
+
*/
|
|
213
|
+
modalPosition: 'centre' | 'left' | 'right';
|
|
179
214
|
/**
|
|
180
215
|
* Set up the web component
|
|
181
216
|
* @internal
|
|
@@ -195,6 +230,11 @@ export declare class EntityManagement extends EntityManagement_base {
|
|
|
195
230
|
* @public
|
|
196
231
|
*/
|
|
197
232
|
submitEntityChanges(e: CustomEvent): Promise<void>;
|
|
233
|
+
/**
|
|
234
|
+
* Show the entity create form
|
|
235
|
+
* @public
|
|
236
|
+
*/
|
|
237
|
+
create(): void;
|
|
198
238
|
/**
|
|
199
239
|
* Updates the reference to the current entity stored in the class. Added as an event listener on the class when receiving the `rowSelected` event.
|
|
200
240
|
*
|
|
@@ -211,6 +251,7 @@ export declare class EntityManagement extends EntityManagement_base {
|
|
|
211
251
|
private editEntity;
|
|
212
252
|
private readEntity;
|
|
213
253
|
closeModal(): void;
|
|
254
|
+
criteriaChanged(e: CustomEvent<string>): void;
|
|
214
255
|
/**
|
|
215
256
|
* Handler for deleting the entity. Added as an event listener on the class when receiving the `delete-entity` event.
|
|
216
257
|
*
|
|
@@ -239,10 +280,7 @@ declare const EntityManagement_base: (new (...args: any[]) => {
|
|
|
239
280
|
readonly shouldRunConnect: boolean;
|
|
240
281
|
"__#1@#_tryFindContainingLayout"(e: Element): FoundationLayoutContainer | LayoutCacheContainer | DOMContainer;
|
|
241
282
|
connectedCallback(): void;
|
|
242
|
-
readonly $fastController: Controller;
|
|
243
|
-
* Label for the entity which has usages such as being shown in the title of the modal wen editing the entity
|
|
244
|
-
* @public
|
|
245
|
-
*/
|
|
283
|
+
readonly $fastController: Controller;
|
|
246
284
|
$emit(type: string, detail?: any, options?: Omit<CustomEventInit<any>, "detail">): boolean | void;
|
|
247
285
|
disconnectedCallback(): void;
|
|
248
286
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
@@ -341,6 +379,12 @@ declare const EntityManagement_base: (new (...args: any[]) => {
|
|
|
341
379
|
webkitMatchesSelector(selectors: string): boolean;
|
|
342
380
|
readonly baseURI: string;
|
|
343
381
|
readonly childNodes: NodeListOf<ChildNode>;
|
|
382
|
+
/**
|
|
383
|
+
* Sets up and opens the model to either edit or add an entity. Added as an event listener on the class when receiving the `edit-entity` event.
|
|
384
|
+
*
|
|
385
|
+
* @param e - CustomEvent where `e.detail` is used to deduce whether to edit or add an entity.
|
|
386
|
+
* @internal
|
|
387
|
+
*/
|
|
344
388
|
readonly firstChild: ChildNode;
|
|
345
389
|
readonly isConnected: boolean;
|
|
346
390
|
readonly lastChild: ChildNode;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-entity-management](./foundation-entity-management.md) > [buttonCellRenderer](./foundation-entity-management.buttoncellrenderer.md)
|
|
4
|
+
|
|
5
|
+
## buttonCellRenderer variable
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**Signature:**
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
buttonCellRenderer: (title: any, clickHandler: any) => {
|
|
12
|
+
width: number;
|
|
13
|
+
pinned: string;
|
|
14
|
+
enableCellChangeFlash: boolean;
|
|
15
|
+
cellStyle: {
|
|
16
|
+
padding: string;
|
|
17
|
+
lineHeight: string;
|
|
18
|
+
};
|
|
19
|
+
filter: boolean;
|
|
20
|
+
suppressFiltersToolPanel: boolean;
|
|
21
|
+
suppressColumnsToolPanel: boolean;
|
|
22
|
+
headerName: string;
|
|
23
|
+
minWidth: number;
|
|
24
|
+
maxWidth: number;
|
|
25
|
+
cellRendererSelector: (params: any) => {
|
|
26
|
+
component: string;
|
|
27
|
+
params: {
|
|
28
|
+
actionClick: any;
|
|
29
|
+
actionName: any;
|
|
30
|
+
appearance: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-entity-management](./foundation-entity-management.md) > [EntityManagement](./foundation-entity-management.entitymanagement.md) > [create](./foundation-entity-management.entitymanagement.create.md)
|
|
4
|
+
|
|
5
|
+
## EntityManagement.create() method
|
|
6
|
+
|
|
7
|
+
Show the entity create form
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
create(): void;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
void
|
|
17
|
+
|