@genesislcap/foundation-entity-management 14.26.4 → 14.26.5-canary.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.
Files changed (29) hide show
  1. package/dist/custom-elements.json +264 -190
  2. package/dist/dts/entities/entities.d.ts +20 -4
  3. package/dist/dts/entities/entities.d.ts.map +1 -1
  4. package/dist/dts/entities/entities.styles.d.ts.map +1 -1
  5. package/dist/dts/entities/entities.template.d.ts.map +1 -1
  6. package/dist/dts/list/list.d.ts +0 -2
  7. package/dist/dts/list/list.d.ts.map +1 -1
  8. package/dist/dts/list/list.styles.d.ts.map +1 -1
  9. package/dist/dts/list/list.template.d.ts +0 -23
  10. package/dist/dts/list/list.template.d.ts.map +1 -1
  11. package/dist/dts/utils/index.d.ts +26 -0
  12. package/dist/dts/utils/index.d.ts.map +1 -1
  13. package/dist/esm/entities/entities.js +31 -9
  14. package/dist/esm/entities/entities.styles.js +6 -0
  15. package/dist/esm/entities/entities.template.js +17 -3
  16. package/dist/esm/list/list.js +2 -7
  17. package/dist/esm/list/list.styles.js +0 -6
  18. package/dist/esm/list/list.template.js +0 -35
  19. package/dist/esm/utils/index.js +25 -0
  20. package/dist/foundation-entity-management.api.json +114 -0
  21. package/dist/foundation-entity-management.d.ts +47 -4
  22. package/docs/api/foundation-entity-management.buttoncellrenderer.md +34 -0
  23. package/docs/api/foundation-entity-management.entitymanagement.defaultentityvalues.md +11 -0
  24. package/docs/api/foundation-entity-management.entitymanagement.editentityform.md +11 -0
  25. package/docs/api/foundation-entity-management.entitymanagement.md +3 -0
  26. package/docs/api/foundation-entity-management.entitymanagement.modalposition.md +13 -0
  27. package/docs/api/foundation-entity-management.md +1 -0
  28. package/docs/api-report.md +33 -0
  29. package/package.json +13 -13
@@ -14,7 +14,6 @@ export declare class List extends FASTElement {
14
14
  columns: ColDef[];
15
15
  datasourceConfig: DatasourceConfiguration;
16
16
  actionButtonsConfig: any[];
17
- createEvent: string;
18
17
  deleteEvent: string;
19
18
  updateEvent: string;
20
19
  connectedCallback(): void;
@@ -22,7 +21,6 @@ export declare class List extends FASTElement {
22
21
  private handleFilterChanged;
23
22
  private handleFilterCleared;
24
23
  private select;
25
- create(): void;
26
24
  private edit;
27
25
  delete(e: any): Promise<void>;
28
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/list/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,EAAuB,WAAW,EAAc,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAI/D,qBAKa,IAAK,SAAQ,WAAW;IAC7B,YAAY,EAAE,MAAM,CAAM;IAC1B,KAAK,EAAE,MAAM,CAAM;IACwB,qBAAqB,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,OAAO,CAAC;IACnF,IAAI,EAAG,WAAW,CAAC;IACnB,UAAU,EAAG,wBAAwB,CAAC;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,mBAAmB,QAAM;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IAEhC,iBAAiB;IA4BjB,oBAAoB,IAAI,IAAI;IAQ5B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,MAAM;IAIP,MAAM;IAIb,OAAO,CAAC,IAAI,CAEV;IAEI,MAAM,CAAC,CAAC,KAAA;CAGf"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/list/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,EAAuB,WAAW,EAAc,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAK/D,qBAKa,IAAK,SAAQ,WAAW;IAC7B,YAAY,EAAE,MAAM,CAAM;IAC1B,KAAK,EAAE,MAAM,CAAM;IACwB,qBAAqB,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,OAAO,CAAC;IACnF,IAAI,EAAG,WAAW,CAAC;IACnB,UAAU,EAAG,wBAAwB,CAAC;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,mBAAmB,QAAM;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IAEhC,iBAAiB;IA4BjB,oBAAoB,IAAI,IAAI;IAQ5B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,IAAI,CAEV;IAEI,MAAM,CAAC,CAAC,KAAA;CAGf"}
@@ -1 +1 @@
1
- {"version":3,"file":"list.styles.d.ts","sourceRoot":"","sources":["../../../src/list/list.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,iDAyBtB,CAAC"}
1
+ {"version":3,"file":"list.styles.d.ts","sourceRoot":"","sources":["../../../src/list/list.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,iDAmBtB,CAAC"}
@@ -1,26 +1,3 @@
1
1
  import { List } from './list';
2
- export declare const buttonCellRenderer: (title: any, clickHandler: any) => {
3
- width: number;
4
- pinned: string;
5
- enableCellChangeFlash: boolean;
6
- cellStyle: {
7
- padding: string;
8
- lineHeight: string;
9
- };
10
- filter: boolean;
11
- suppressFiltersToolPanel: boolean;
12
- suppressColumnsToolPanel: boolean;
13
- headerName: string;
14
- minWidth: number;
15
- maxWidth: number;
16
- cellRendererSelector: (params: any) => {
17
- component: string;
18
- params: {
19
- actionClick: any;
20
- actionName: any;
21
- appearance: string;
22
- };
23
- };
24
- };
25
2
  export declare const listTemplate: import("@microsoft/fast-element").ViewTemplate<List, any>;
26
3
  //# sourceMappingURL=list.template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.template.d.ts","sourceRoot":"","sources":["../../../src/list/list.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;CAsB7B,CAAC;AAEH,eAAO,MAAM,YAAY,2DAkExB,CAAC"}
1
+ {"version":3,"file":"list.template.d.ts","sourceRoot":"","sources":["../../../src/list/list.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAO,MAAM,YAAY,2DAkDxB,CAAC"}
@@ -1,3 +1,29 @@
1
1
  export * from './formatting';
2
2
  export * from './logger';
3
+ /**
4
+ * @public
5
+ */
6
+ export declare const buttonCellRenderer: (title: any, clickHandler: any) => {
7
+ width: number;
8
+ pinned: string;
9
+ enableCellChangeFlash: boolean;
10
+ cellStyle: {
11
+ padding: string;
12
+ lineHeight: string;
13
+ };
14
+ filter: boolean;
15
+ suppressFiltersToolPanel: boolean;
16
+ suppressColumnsToolPanel: boolean;
17
+ headerName: string;
18
+ minWidth: number;
19
+ maxWidth: number;
20
+ cellRendererSelector: (params: any) => {
21
+ component: string;
22
+ params: {
23
+ actionClick: any;
24
+ actionName: any;
25
+ appearance: string;
26
+ };
27
+ };
28
+ };
3
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;CAsB7B,CAAC"}
@@ -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
  *
@@ -80,6 +85,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
80
85
  if (this.deleteEvent) {
81
86
  this.addEventListener('delete-entity', this.deleteEntity);
82
87
  }
88
+ this.addEventListener('create-entity', this.createEntity);
83
89
  this.addEventListener('edit-entity', this.editEntity);
84
90
  this.addEventListener('read-entity', this.readEntity);
85
91
  });
@@ -97,6 +103,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
97
103
  copy.formResourceName = structuredClone(this.formResourceName);
98
104
  copy.formUiSchema = structuredClone(this.formUiSchema);
99
105
  copy.updateFormUiSchema = structuredClone(this.updateFormUiSchema);
106
+ copy.defaultEntityValues = structuredClone(this.defaultEntityValues);
100
107
  // this.columns[number] might contain a function, so can't use structuredClone
101
108
  copy.columns = this.columns ? [...this.columns].map((x) => (Object.assign({}, x))) : this.columns;
102
109
  return copy;
@@ -114,19 +121,30 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
114
121
  this.closeModal();
115
122
  });
116
123
  }
124
+ /**
125
+ * Show the entity create form
126
+ * @internal
127
+ */
128
+ createEntity() {
129
+ this.editDialogTitle = `Add ${this.entityLabel}`;
130
+ this.formUiSchema = this.createFormUiSchema;
131
+ this.formResourceName = this.createEvent;
132
+ this.editedEntity = Object.assign({}, this.defaultEntityValues);
133
+ this.editModalVisible = true;
134
+ }
117
135
  /**
118
136
  * 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
137
  *
120
138
  * @param e - CustomEvent where `e.detail` is used to deduce whether to edit or add an entity.
121
139
  * @internal
122
140
  */
123
- editEntity(e) {
141
+ editEntity({ detail }) {
124
142
  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) {
129
- const _a = e.detail, { ROW_REF } = _a, formData = __rest(_a, ["ROW_REF"]);
143
+ this.editDialogTitle = `Edit ${this.entityLabel}`;
144
+ this.formUiSchema = this.updateFormUiSchema;
145
+ this.formResourceName = this.updateEvent;
146
+ if (detail) {
147
+ const { ROW_REF } = detail, formData = __rest(detail, ["ROW_REF"]);
130
148
  this.editedEntity = formData;
131
149
  if (this.readEventFn) {
132
150
  const readEntityReq = yield this.readEventFn(formData);
@@ -139,9 +157,6 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
139
157
  this.editedEntity = Object.assign(Object.assign({}, this.editedEntity), readEventReq.REPLY[0]);
140
158
  }
141
159
  }
142
- else {
143
- this.editedEntity = {};
144
- }
145
160
  this.editModalVisible = true;
146
161
  });
147
162
  }
@@ -153,6 +168,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
153
168
  closeModal() {
154
169
  this.readonly = false;
155
170
  this.editModalVisible = false;
171
+ this.editEntityForm.reset();
156
172
  }
157
173
  /**
158
174
  * Handler for deleting the entity. Added as an event listener on the class when receiving the `delete-entity` event.
@@ -292,6 +308,9 @@ __decorate([
292
308
  __decorate([
293
309
  observable
294
310
  ], EntityManagement.prototype, "submitting", void 0);
311
+ __decorate([
312
+ observable
313
+ ], EntityManagement.prototype, "defaultEntityValues", void 0);
295
314
  __decorate([
296
315
  observable
297
316
  ], EntityManagement.prototype, "editDialogTitle", void 0);
@@ -307,6 +326,9 @@ __decorate([
307
326
  __decorate([
308
327
  attr({ mode: 'boolean', attribute: 'enable-cell-flashing' })
309
328
  ], EntityManagement.prototype, "enableCellFlashing", void 0);
329
+ __decorate([
330
+ attr({ attribute: 'modal-position' })
331
+ ], EntityManagement.prototype, "modalPosition", void 0);
310
332
  EntityManagement = __decorate([
311
333
  customElement({
312
334
  name: 'entity-management',
@@ -29,4 +29,10 @@ export const styles = css `
29
29
  .title {
30
30
  margin-left: 1px;
31
31
  }
32
+
33
+ :host::part(header) {
34
+ display: flex;
35
+ justify-content: space-between;
36
+ align-items: center;
37
+ }
32
38
  `;
@@ -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.createEntity()}>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
- ></entity-list>
34
+ >
35
+ <slot name="header" slot="header">${defaultHeader}</slot>
36
+ </entity-list>
25
37
  <zero-modal
26
38
  ${ref('editEntityModal')}
27
- position="right"
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}
@@ -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 { buttonCellRenderer, listTemplate } from './list.template';
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);
@@ -18,10 +18,4 @@ export const listStyles = css `
18
18
  height: inherit;
19
19
  width: 100%;
20
20
  }
21
-
22
- .heading {
23
- display: flex;
24
- justify-content: space-between;
25
- align-items: center;
26
- }
27
21
  `;
@@ -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
@@ -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",
@@ -493,6 +516,36 @@
493
516
  "isAbstract": false,
494
517
  "name": "deepClone"
495
518
  },
519
+ {
520
+ "kind": "Property",
521
+ "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#defaultEntityValues:member",
522
+ "docComment": "",
523
+ "excerptTokens": [
524
+ {
525
+ "kind": "Content",
526
+ "text": "defaultEntityValues: "
527
+ },
528
+ {
529
+ "kind": "Content",
530
+ "text": "any"
531
+ },
532
+ {
533
+ "kind": "Content",
534
+ "text": ";"
535
+ }
536
+ ],
537
+ "isReadonly": false,
538
+ "isOptional": false,
539
+ "releaseTag": "Public",
540
+ "name": "defaultEntityValues",
541
+ "propertyTypeTokenRange": {
542
+ "startIndex": 1,
543
+ "endIndex": 2
544
+ },
545
+ "isStatic": false,
546
+ "isProtected": false,
547
+ "isAbstract": false
548
+ },
496
549
  {
497
550
  "kind": "Property",
498
551
  "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#deleteEvent:member",
@@ -583,6 +636,37 @@
583
636
  "isProtected": false,
584
637
  "isAbstract": false
585
638
  },
639
+ {
640
+ "kind": "Property",
641
+ "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#editEntityForm:member",
642
+ "docComment": "",
643
+ "excerptTokens": [
644
+ {
645
+ "kind": "Content",
646
+ "text": "editEntityForm: "
647
+ },
648
+ {
649
+ "kind": "Reference",
650
+ "text": "Form",
651
+ "canonicalReference": "@genesislcap/foundation-forms!Form:class"
652
+ },
653
+ {
654
+ "kind": "Content",
655
+ "text": ";"
656
+ }
657
+ ],
658
+ "isReadonly": false,
659
+ "isOptional": false,
660
+ "releaseTag": "Public",
661
+ "name": "editEntityForm",
662
+ "propertyTypeTokenRange": {
663
+ "startIndex": 1,
664
+ "endIndex": 2
665
+ },
666
+ "isStatic": false,
667
+ "isProtected": false,
668
+ "isAbstract": false
669
+ },
586
670
  {
587
671
  "kind": "Property",
588
672
  "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#editEntityModal:member",
@@ -794,6 +878,36 @@
794
878
  "isProtected": false,
795
879
  "isAbstract": false
796
880
  },
881
+ {
882
+ "kind": "Property",
883
+ "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#modalPosition:member",
884
+ "docComment": "/**\n * Determines where the modal dialog will appear on screen\n *\n * @public\n */\n",
885
+ "excerptTokens": [
886
+ {
887
+ "kind": "Content",
888
+ "text": "modalPosition: "
889
+ },
890
+ {
891
+ "kind": "Content",
892
+ "text": "'centre' | 'left' | 'right'"
893
+ },
894
+ {
895
+ "kind": "Content",
896
+ "text": ";"
897
+ }
898
+ ],
899
+ "isReadonly": false,
900
+ "isOptional": false,
901
+ "releaseTag": "Public",
902
+ "name": "modalPosition",
903
+ "propertyTypeTokenRange": {
904
+ "startIndex": 1,
905
+ "endIndex": 2
906
+ },
907
+ "isStatic": false,
908
+ "isProtected": false,
909
+ "isAbstract": false
910
+ },
797
911
  {
798
912
  "kind": "Property",
799
913
  "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
@@ -202,6 +237,11 @@ export declare class EntityManagement extends EntityManagement_base {
202
237
  * @internal
203
238
  */
204
239
  private selectEntity;
240
+ /**
241
+ * Show the entity create form
242
+ * @internal
243
+ */
244
+ createEntity(): void;
205
245
  /**
206
246
  * 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.
207
247
  *
@@ -239,10 +279,7 @@ declare const EntityManagement_base: (new (...args: any[]) => {
239
279
  readonly shouldRunConnect: boolean;
240
280
  "__#1@#_tryFindContainingLayout"(e: Element): FoundationLayoutContainer | LayoutCacheContainer | DOMContainer;
241
281
  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
- */
282
+ readonly $fastController: Controller;
246
283
  $emit(type: string, detail?: any, options?: Omit<CustomEventInit<any>, "detail">): boolean | void;
247
284
  disconnectedCallback(): void;
248
285
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
@@ -376,6 +413,12 @@ declare const EntityManagement_base: (new (...args: any[]) => {
376
413
  readonly DOCUMENT_POSITION_DISCONNECTED: number;
377
414
  readonly DOCUMENT_POSITION_FOLLOWING: number;
378
415
  readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
416
+ /**
417
+ * Handler for deleting the entity. Added as an event listener on the class when receiving the `delete-entity` event.
418
+ *
419
+ * @param e - CustomEvent where `e.detail` contains data to update the selectedEntity reference with the entity to delete.
420
+ * @internal
421
+ */
379
422
  readonly DOCUMENT_POSITION_PRECEDING: number;
380
423
  readonly DOCUMENT_TYPE_NODE: number;
381
424
  readonly ELEMENT_NODE: number;
@@ -0,0 +1,34 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-entity-management](./foundation-entity-management.md) &gt; [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,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-entity-management](./foundation-entity-management.md) &gt; [EntityManagement](./foundation-entity-management.entitymanagement.md) &gt; [defaultEntityValues](./foundation-entity-management.entitymanagement.defaultentityvalues.md)
4
+
5
+ ## EntityManagement.defaultEntityValues property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ defaultEntityValues: any;
11
+ ```