@genesislcap/foundation-entity-management 14.41.1 → 14.41.2-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.
@@ -151,7 +151,7 @@
151
151
  {
152
152
  "kind": "variable",
153
153
  "name": "template",
154
- "default": "html<EntityManagement>`\n <div class=\"container\">\n <slot name=\"header\" part=\"header\">${defaultHeader}</slot>\n <entity-list\n title=${(x) => x.title}\n persist-column-state-key=${(x) => x.persistColumnStateKey}\n size-columns-to-fit=${(x) => x.sizeColumnsToFit}\n enable-filter-bar=${(x) => x.enableFilterBar}\n resourceName=${(x) => x.resourceName}\n :deleteEvent=${(x) => x.deleteEvent}\n :updateEvent=${(x) => x.updateEvent}\n :columns=${(x) => x.columns}\n :datasourceConfig=${(x) => x.datasourceConfig}\n data-test-id=\"entity-list\"\n >\n <slot name=\"header\" slot=\"header\">${defaultHeader}</slot>\n </entity-list>\n <zero-modal\n ${ref('editEntityModal')}\n position=${(x) => x.modalPosition}\n :onCloseCallback=${(x) => x.closeModal.bind(x)}\n data-test-id=\"edit-entity-modal\"\n >\n <div slot=\"top\" data-test-id=\"dialog-title\">${(x) => x.editDialogTitle}</div>\n\n <slot name=\"edit\">\n ${when(\n (x) => x.editModalVisible,\n html<EntityManagement>`\n <foundation-form\n part=\"form\"\n resourceName=${(x) => x.formResourceName}\n :data=${(x) => x.editedEntity}\n :uischema=${(x) => x.formUiSchema}\n @submit-success=${(x, c) => x.submitEntityChanges(c.event as CustomEvent)}\n @submit-failure=${(x, c) =>\n x.errorSnack((c.event as CustomEvent<{ errors: MessageError[] }>).detail.errors)}\n ></foundation-form>\n `\n )}\n </slot>\n </zero-modal>\n </div>\n`",
154
+ "default": "html<EntityManagement>`\n <div class=\"container\">\n <slot name=\"header\" part=\"header\">${defaultHeader}</slot>\n <entity-list\n title=${(x) => x.title}\n persist-column-state-key=${(x) => x.persistColumnStateKey}\n size-columns-to-fit=${(x) => x.sizeColumnsToFit}\n enable-filter-bar=${(x) => x.enableFilterBar}\n resourceName=${(x) => x.resourceName}\n :deleteEvent=${(x) => x.deleteEvent}\n :updateEvent=${(x) => x.updateEvent}\n :gridOptions=${(x) => x.gridOptions}\n :columns=${(x) => x.columns}\n :datasourceConfig=${(x) => x.datasourceConfig}\n data-test-id=\"entity-list\"\n hide-edit=${(x) => x.hideEdit}\n hide-delete=${(x) => x.hideDelete}\n >\n <slot name=\"header\" slot=\"header\">${defaultHeader}</slot>\n </entity-list>\n <zero-modal\n ${ref('editEntityModal')}\n position=${(x) => x.modalPosition}\n :onCloseCallback=${(x) => x.closeModal.bind(x)}\n data-test-id=\"edit-entity-modal\"\n >\n <div slot=\"top\" data-test-id=\"dialog-title\">${(x) => x.editDialogTitle}</div>\n\n <slot name=\"edit\">\n ${when(\n (x) => x.editModalVisible,\n html<EntityManagement>`\n <foundation-form\n part=\"form\"\n ${ref('editEntityForm')}\n resourceName=${(x) => x.formResourceName}\n :data=${(x) => x.editedEntity}\n :uischema=${(x) => x.formUiSchema}\n @submit-success=${(x, c) => x.submitEntityChanges(c.event as CustomEvent)}\n @submit-failure=${(x, c) =>\n x.errorSnack((c.event as CustomEvent<{ errors: MessageError[] }>).detail.errors)}\n ></foundation-form>\n `\n )}\n </slot>\n </zero-modal>\n </div>\n`",
155
155
  "description": "Defines the html of the entity component as a ViewTemplate object"
156
156
  }
157
157
  ],
@@ -269,6 +269,15 @@
269
269
  "description": "This attribute controls whether and how the entity manager stores the state of the columns when the user edits them. Omit this attribute to disable the functionality, set it to a unique value to enable it.",
270
270
  "privacy": "public"
271
271
  },
272
+ {
273
+ "kind": "field",
274
+ "name": "gridOptions",
275
+ "type": {
276
+ "text": "GridOptions"
277
+ },
278
+ "description": "GridOptions to be passed down from application",
279
+ "privacy": "public"
280
+ },
272
281
  {
273
282
  "kind": "field",
274
283
  "name": "columns",
@@ -368,6 +377,14 @@
368
377
  },
369
378
  "privacy": "public"
370
379
  },
380
+ {
381
+ "kind": "field",
382
+ "name": "editEntityForm",
383
+ "type": {
384
+ "text": "Form"
385
+ },
386
+ "privacy": "public"
387
+ },
371
388
  {
372
389
  "kind": "field",
373
390
  "name": "sizeColumnsToFit",
@@ -389,6 +406,22 @@
389
406
  "text": "boolean"
390
407
  }
391
408
  },
409
+ {
410
+ "kind": "field",
411
+ "name": "hideEdit",
412
+ "type": {
413
+ "text": "boolean"
414
+ },
415
+ "default": "false"
416
+ },
417
+ {
418
+ "kind": "field",
419
+ "name": "hideDelete",
420
+ "type": {
421
+ "text": "boolean"
422
+ },
423
+ "default": "false"
424
+ },
392
425
  {
393
426
  "kind": "field",
394
427
  "name": "modalPosition",
@@ -443,6 +476,19 @@
443
476
  "name": "closeModal",
444
477
  "privacy": "public"
445
478
  },
479
+ {
480
+ "kind": "method",
481
+ "name": "criteriaChanged",
482
+ "privacy": "public",
483
+ "parameters": [
484
+ {
485
+ "name": "e",
486
+ "type": {
487
+ "text": "CustomEvent<string>"
488
+ }
489
+ }
490
+ ]
491
+ },
446
492
  {
447
493
  "kind": "method",
448
494
  "name": "confirmDelete"
@@ -545,6 +591,22 @@
545
591
  },
546
592
  "fieldName": "enableCellFlashing"
547
593
  },
594
+ {
595
+ "name": "hide-edit",
596
+ "type": {
597
+ "text": "boolean"
598
+ },
599
+ "default": "false",
600
+ "fieldName": "hideEdit"
601
+ },
602
+ {
603
+ "name": "hide-delete",
604
+ "type": {
605
+ "text": "boolean"
606
+ },
607
+ "default": "false",
608
+ "fieldName": "hideDelete"
609
+ },
548
610
  {
549
611
  "name": "modal-position",
550
612
  "type": {
@@ -711,7 +773,7 @@
711
773
  {
712
774
  "kind": "variable",
713
775
  "name": "listTemplate",
714
- "default": "html<List>`\n <div class=\"container\">\n ${when(\n (x) => x.enableFilterBar,\n html<List>`\n <zero-filter-bar\n resource=${(x) => x.resourceName}\n only=${(x) => x.columns?.map((colDef) => colDef.field).filter((field) => !!field)}\n labels=${(x) => x.columns?.map((colDef) => colDef.headerName || '')}\n target=\"datasource\"\n ></zero-filter-bar>\n `\n )}\n <zero-grid-pro\n ${ref('grid')}\n auto-cell-renderer-by-type\n rowSelection=\"single\"\n rowHeight=\"36\"\n headerHeight=\"36\"\n persist-column-state-key=${(x) => x.persistColumnStateKey}\n ?only-template-col-defs=${(x) => !!x.columns}\n suppressCellFocus=\"true\"\n suppressRowDeselection=\"true\"\n enable-cell-flashing=${(x) => x.enableCellFlashing}\n >\n <grid-pro-genesis-datasource\n ${ref('datasource')}\n resource-name=${(x) => x.resourceName}\n criteria=${(x) => x.datasourceConfig?.criteria}\n fields=${(x) => x.datasourceConfig?.fields}\n is-snapshot=${(x) => x.datasourceConfig?.isSnapshot}\n max-rows=${(x) => x.datasourceConfig?.maxRows}\n max-view=${(x) => x.datasourceConfig?.maxView}\n order-by=${(x) => x.datasourceConfig?.orderBy}\n reverse=${(x) => x.datasourceConfig?.reverse}\n ></grid-pro-genesis-datasource>\n ${repeat(\n (x) => x.columns,\n html`\n <grid-pro-column :definition=${(x) => x}></grid-pro-column>\n `\n )}\n ${repeat(\n (x) => x.actionButtonsConfig,\n html`\n <grid-pro-column :definition=${(x) => x}></grid-pro-column>\n `\n )}\n </zero-grid-pro>\n </div>\n`"
776
+ "default": "html<List>`\n <div class=\"container\">\n ${when(\n (x) => x.enableFilterBar,\n html<List>`\n <zero-filter-bar\n resource=${(x) => x.resourceName}\n only=${(x) => x.columns?.map((colDef) => colDef.field).filter((field) => !!field)}\n labels=${(x) => x.columns?.map((colDef) => colDef.headerName || '')}\n target=\"datasource\"\n ></zero-filter-bar>\n `\n )}\n <zero-grid-pro\n ${ref('grid')}\n auto-cell-renderer-by-type\n rowSelection=\"single\"\n rowHeight=\"36\"\n headerHeight=\"36\"\n persist-column-state-key=${(x) => x.persistColumnStateKey}\n ?only-template-col-defs=${(x) => !!x.columns}\n suppressCellFocus=\"true\"\n suppressRowDeselection=\"true\"\n enable-cell-flashing=${(x) => x.enableCellFlashing}\n >\n <grid-pro-genesis-datasource\n ${ref('datasource')}\n :deferredGridOptions=${(x) => x.gridOptions}\n resource-name=${(x) => x.resourceName}\n criteria=${(x) => x.datasourceConfig?.criteria}\n fields=${(x) => x.datasourceConfig?.fields}\n is-snapshot=${(x) => x.datasourceConfig?.isSnapshot}\n max-rows=${(x) => x.datasourceConfig?.maxRows}\n max-view=${(x) => x.datasourceConfig?.maxView}\n order-by=${(x) => x.datasourceConfig?.orderBy}\n reverse=${(x) => x.datasourceConfig?.reverse}\n ></grid-pro-genesis-datasource>\n ${repeat(\n (x) => x.columns,\n html`\n <grid-pro-column :definition=${(x) => x}></grid-pro-column>\n `\n )}\n ${repeat(\n (x) => x.actionButtonsConfig,\n html`\n <grid-pro-column :definition=${(x) => x}></grid-pro-column>\n `\n )}\n </zero-grid-pro>\n </div>\n`"
715
777
  }
716
778
  ],
717
779
  "exports": [
@@ -778,6 +840,22 @@
778
840
  "text": "boolean"
779
841
  }
780
842
  },
843
+ {
844
+ "kind": "field",
845
+ "name": "hideEdit",
846
+ "type": {
847
+ "text": "boolean"
848
+ },
849
+ "default": "false"
850
+ },
851
+ {
852
+ "kind": "field",
853
+ "name": "hideDelete",
854
+ "type": {
855
+ "text": "boolean"
856
+ },
857
+ "default": "false"
858
+ },
781
859
  {
782
860
  "kind": "field",
783
861
  "name": "grid",
@@ -794,6 +872,13 @@
794
872
  },
795
873
  "privacy": "public"
796
874
  },
875
+ {
876
+ "kind": "field",
877
+ "name": "gridOptions",
878
+ "type": {
879
+ "text": "GridOptions"
880
+ }
881
+ },
797
882
  {
798
883
  "kind": "field",
799
884
  "name": "columns",
@@ -919,6 +1004,22 @@
919
1004
  "text": "boolean"
920
1005
  },
921
1006
  "fieldName": "enableCellFlashing"
1007
+ },
1008
+ {
1009
+ "name": "hide-edit",
1010
+ "type": {
1011
+ "text": "boolean"
1012
+ },
1013
+ "default": "false",
1014
+ "fieldName": "hideEdit"
1015
+ },
1016
+ {
1017
+ "name": "hide-delete",
1018
+ "type": {
1019
+ "text": "boolean"
1020
+ },
1021
+ "default": "false",
1022
+ "fieldName": "hideDelete"
922
1023
  }
923
1024
  ],
924
1025
  "superclass": {
@@ -1317,6 +1418,19 @@
1317
1418
  "module": "src/entities/entities.ts"
1318
1419
  }
1319
1420
  },
1421
+ {
1422
+ "kind": "field",
1423
+ "name": "gridOptions",
1424
+ "type": {
1425
+ "text": "GridOptions"
1426
+ },
1427
+ "description": "GridOptions to be passed down from application",
1428
+ "privacy": "public",
1429
+ "inheritedFrom": {
1430
+ "name": "EntityManagement",
1431
+ "module": "src/entities/entities.ts"
1432
+ }
1433
+ },
1320
1434
  {
1321
1435
  "kind": "field",
1322
1436
  "name": "columns",
@@ -1446,6 +1560,18 @@
1446
1560
  "module": "src/entities/entities.ts"
1447
1561
  }
1448
1562
  },
1563
+ {
1564
+ "kind": "field",
1565
+ "name": "editEntityForm",
1566
+ "type": {
1567
+ "text": "Form"
1568
+ },
1569
+ "privacy": "public",
1570
+ "inheritedFrom": {
1571
+ "name": "EntityManagement",
1572
+ "module": "src/entities/entities.ts"
1573
+ }
1574
+ },
1449
1575
  {
1450
1576
  "kind": "field",
1451
1577
  "name": "sizeColumnsToFit",
@@ -1479,6 +1605,30 @@
1479
1605
  "module": "src/entities/entities.ts"
1480
1606
  }
1481
1607
  },
1608
+ {
1609
+ "kind": "field",
1610
+ "name": "hideEdit",
1611
+ "type": {
1612
+ "text": "boolean"
1613
+ },
1614
+ "default": "false",
1615
+ "inheritedFrom": {
1616
+ "name": "EntityManagement",
1617
+ "module": "src/entities/entities.ts"
1618
+ }
1619
+ },
1620
+ {
1621
+ "kind": "field",
1622
+ "name": "hideDelete",
1623
+ "type": {
1624
+ "text": "boolean"
1625
+ },
1626
+ "default": "false",
1627
+ "inheritedFrom": {
1628
+ "name": "EntityManagement",
1629
+ "module": "src/entities/entities.ts"
1630
+ }
1631
+ },
1482
1632
  {
1483
1633
  "kind": "field",
1484
1634
  "name": "modalPosition",
@@ -1553,6 +1703,23 @@
1553
1703
  "module": "src/entities/entities.ts"
1554
1704
  }
1555
1705
  },
1706
+ {
1707
+ "kind": "method",
1708
+ "name": "criteriaChanged",
1709
+ "privacy": "public",
1710
+ "parameters": [
1711
+ {
1712
+ "name": "e",
1713
+ "type": {
1714
+ "text": "CustomEvent<string>"
1715
+ }
1716
+ }
1717
+ ],
1718
+ "inheritedFrom": {
1719
+ "name": "EntityManagement",
1720
+ "module": "src/entities/entities.ts"
1721
+ }
1722
+ },
1556
1723
  {
1557
1724
  "kind": "method",
1558
1725
  "name": "showDeleteConfirmation",
@@ -1709,6 +1876,30 @@
1709
1876
  "module": "src/entities/entities.ts"
1710
1877
  }
1711
1878
  },
1879
+ {
1880
+ "name": "hide-edit",
1881
+ "type": {
1882
+ "text": "boolean"
1883
+ },
1884
+ "default": "false",
1885
+ "fieldName": "hideEdit",
1886
+ "inheritedFrom": {
1887
+ "name": "EntityManagement",
1888
+ "module": "src/entities/entities.ts"
1889
+ }
1890
+ },
1891
+ {
1892
+ "name": "hide-delete",
1893
+ "type": {
1894
+ "text": "boolean"
1895
+ },
1896
+ "default": "false",
1897
+ "fieldName": "hideDelete",
1898
+ "inheritedFrom": {
1899
+ "name": "EntityManagement",
1900
+ "module": "src/entities/entities.ts"
1901
+ }
1902
+ },
1712
1903
  {
1713
1904
  "name": "modal-position",
1714
1905
  "type": {
@@ -1,6 +1,7 @@
1
- import type { ColDef } from '@ag-grid-community/core';
1
+ import { ColDef, GridOptions } from '@ag-grid-community/core';
2
2
  import { Connect, DatasourceOptions, MessageError } from '@genesislcap/foundation-comms';
3
3
  import { FASTElement } from '@microsoft/fast-element';
4
+ import { Form } from '@genesislcap/foundation-forms';
4
5
  /**
5
6
  * The attribute which is set to configure the resource that the entity manager is working with
6
7
  *
@@ -75,6 +76,10 @@ declare const EntityManagement_base: (new (...args: any[]) => {
75
76
  readonly scrollHeight: number;
76
77
  scrollLeft: number;
77
78
  scrollTop: number;
79
+ /**
80
+ * Disables the form while enabled to stop the user dispatching a large number of duplicate events
81
+ * @public
82
+ */
78
83
  readonly scrollWidth: number;
79
84
  readonly shadowRoot: ShadowRoot;
80
85
  slot: string;
@@ -137,6 +142,11 @@ declare const EntityManagement_base: (new (...args: any[]) => {
137
142
  readonly parentElement: HTMLElement;
138
143
  readonly parentNode: ParentNode;
139
144
  readonly previousSibling: ChildNode;
145
+ /**
146
+ * Show the entity create form
147
+ * Sets the initial value on the form to be defaultEntityValues if present.
148
+ * @internal
149
+ */
140
150
  textContent: string;
141
151
  appendChild<T_1 extends Node>(node: T_1): T_1;
142
152
  compareDocumentPosition(other: Node): number;
@@ -208,10 +218,6 @@ declare const EntityManagement_base: (new (...args: any[]) => {
208
218
  ariaSort: string;
209
219
  ariaValueMax: string;
210
220
  ariaValueMin: string;
211
- /**
212
- * Show notifications if the executed event returned an error.
213
- * @internal
214
- */
215
221
  ariaValueNow: string;
216
222
  ariaValueText: string;
217
223
  role: string;
@@ -227,6 +233,10 @@ declare const EntityManagement_base: (new (...args: any[]) => {
227
233
  readonly childElementCount: number;
228
234
  readonly children: HTMLCollection;
229
235
  readonly firstElementChild: Element;
236
+ /**
237
+ * Show notifications if the executed event returned an error.
238
+ * @internal
239
+ */
230
240
  readonly lastElementChild: Element;
231
241
  append(...nodes: (string | Node)[]): void;
232
242
  prepend(...nodes: (string | Node)[]): void;
@@ -436,6 +446,11 @@ export declare class EntityManagement extends EntityManagement_base {
436
446
  * @public
437
447
  */
438
448
  persistColumnStateKey: string;
449
+ /**
450
+ * GridOptions to be passed down from application
451
+ * @public
452
+ */
453
+ gridOptions: GridOptions;
439
454
  /**
440
455
  * Array which holds the column definitions.
441
456
  * @public
@@ -481,9 +496,12 @@ export declare class EntityManagement extends EntityManagement_base {
481
496
  editModalVisible: boolean;
482
497
  editModalVisibleChanged(): void;
483
498
  editEntityModal: any;
499
+ editEntityForm: Form;
484
500
  sizeColumnsToFit: boolean;
485
501
  enableFilterBar: boolean;
486
502
  enableCellFlashing: boolean;
503
+ hideEdit: boolean;
504
+ hideDelete: boolean;
487
505
  /**
488
506
  * Determines where the modal dialog will appear on screen
489
507
  * @public
@@ -530,6 +548,7 @@ export declare class EntityManagement extends EntityManagement_base {
530
548
  private editEntity;
531
549
  private readEntity;
532
550
  closeModal(): void;
551
+ criteriaChanged(e: CustomEvent<string>): void;
533
552
  /**
534
553
  * Handler for deleting the entity. Added as an event listener on the class when receiving the `delete-entity` event.
535
554
  *
@@ -1 +1 @@
1
- {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../../src/entities/entities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AASzF,OAAO,EAAuB,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAKvF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,iBAAiB,EAAE,cAAc,GAAG,SAAS,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8UxF;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/UL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAKa,gBAAiB,SAAQ,qBAA2B;IAC/D;;;;;;;OAOG;IACM,SAAS,CAAC,OAAO,EAAG,OAAO,CAAC;IAErC;;;OAGG;IACG,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,M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E,OAAO,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAS;IACxB,UAAU,EAAE,OAAO,CAAS;IAEjF;;;OAGG;IACoC,aAAa,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAW;IAE5F;;;OAGG;IACG,iBAAiB;IAcvB;;;OAGG;IACM,SAAS,IAAI,IAAI;IAe1B;;;;;;;OAOG;IACU,mBAAmB,CAAC,CAAC,EAAE,WAAW;IAI/C;;;;;OAKG;IACH,OAAO,CAAC,YAAY,CAElB;IAEF;;;;OAIG;IACI,YAAY;IASnB;;;;;OAKG;YACW,UAAU;IA4BxB,OAAO,CAAC,UAAU;IAMX,UAAU;IAMV,eAAe,CAAC,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;IAI7C;;;;;OAKG;IACG,YAAY,CAAC,CAAC,EAAE,WAAW;IAK3B,aAAa;IAoBnB,OAAO,CAAC,sBAAsB;IAgB9B;;;OAGG;IACI,WAAW,CAAC,OAAO,KAAA;IAuB1B;;OAEG;IACI,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE;CAexC"}
@@ -1 +1 @@
1
- {"version":3,"file":"entities.template.d.ts","sourceRoot":"","sources":["../../../src/entities/entities.template.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAmB9C;;;GAGG;AACH,eAAO,MAAM,QAAQ,uEA2CpB,CAAC"}
1
+ {"version":3,"file":"entities.template.d.ts","sourceRoot":"","sources":["../../../src/entities/entities.template.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAmB9C;;;GAGG;AACH,eAAO,MAAM,QAAQ,uEA+CpB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ColDef } from '@ag-grid-community/core';
1
+ import type { ColDef, GridOptions } from '@ag-grid-community/core';
2
2
  import { GridProGenesisDatasource, ZeroGridPro } from '@genesislcap/foundation-zero-grid-pro';
3
3
  import { FASTElement } from '@microsoft/fast-element';
4
4
  import { DatasourceConfiguration } from '../entities/entities';
@@ -9,8 +9,11 @@ export declare class List extends FASTElement {
9
9
  sizeColumnsToFit: boolean;
10
10
  enableFilterBar: boolean;
11
11
  enableCellFlashing: boolean;
12
+ hideEdit: boolean;
13
+ hideDelete: boolean;
12
14
  grid: ZeroGridPro;
13
15
  datasource: GridProGenesisDatasource;
16
+ gridOptions: GridOptions;
14
17
  columns: ColDef[];
15
18
  datasourceConfig: DatasourceConfiguration;
16
19
  actionButtonsConfig: any[];
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/list/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,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
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/list/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEnE,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;IACvC,QAAQ,EAAE,OAAO,CAAS;IACxB,UAAU,EAAE,OAAO,CAAS;IAC1E,IAAI,EAAG,WAAW,CAAC;IACnB,UAAU,EAAG,wBAAwB,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,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.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
+ {"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,2DAmDxB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { __awaiter, __decorate, __rest } from "tslib";
2
2
  import { Connect } from '@genesislcap/foundation-comms';
3
3
  import { ErrorBoundaryEvent, getErrorBuilder, getErrorDialogBuilder, getNotificationBuilder, getSnackbarBuilder, } from '@genesislcap/foundation-errors';
4
+ import { showDialog } from '@genesislcap/foundation-errors';
4
5
  import { LifecycleMixin } from '@genesislcap/foundation-utils';
5
6
  import { attr, customElement, FASTElement, observable } from '@microsoft/fast-element';
6
7
  import { getErrorFormat, logger } from '../utils';
@@ -46,6 +47,8 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
46
47
  */
47
48
  this.entityLabel = '';
48
49
  this.editModalVisible = false;
50
+ this.hideEdit = false;
51
+ this.hideDelete = false;
49
52
  /**
50
53
  * Determines where the modal dialog will appear on screen
51
54
  * @public
@@ -88,6 +91,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
88
91
  this.addEventListener('create-entity', this.createEntity);
89
92
  this.addEventListener('edit-entity', this.editEntity);
90
93
  this.addEventListener('read-entity', this.readEntity);
94
+ this.addEventListener('criteria-changed', this.criteriaChanged);
91
95
  });
92
96
  }
93
97
  /**
@@ -158,6 +162,9 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
158
162
  this.editedEntity = Object.assign(Object.assign({}, this.editedEntity), readEventReq.REPLY[0]);
159
163
  }
160
164
  }
165
+ else {
166
+ this.editedEntity = Object.assign({}, this.defaultEntityValues);
167
+ }
161
168
  this.editModalVisible = true;
162
169
  });
163
170
  }
@@ -167,9 +174,13 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
167
174
  this.editDialogTitle = '';
168
175
  }
169
176
  closeModal() {
177
+ this.editEntityForm.reset();
170
178
  this.readonly = false;
171
179
  this.editModalVisible = false;
172
180
  }
181
+ criteriaChanged(e) {
182
+ this.datasourceConfig = Object.assign(Object.assign({}, this.datasourceConfig), { criteria: e.detail });
183
+ }
173
184
  /**
174
185
  * Handler for deleting the entity. Added as an event listener on the class when receiving the `delete-entity` event.
175
186
  *
@@ -204,14 +215,14 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
204
215
  });
205
216
  }
206
217
  showDeleteConfirmation() {
207
- this.$emit(ErrorBoundaryEvent.ERROR_BOUNDARY_EVENT, getErrorBuilder()
218
+ showDialog(getErrorBuilder()
208
219
  .withTitle(`Confirm Delete`)
209
220
  .withErrorDetails('Do you really want to delete this entity?')
210
221
  .withDialog(getErrorDialogBuilder()
211
222
  .withDismissingAction({ label: 'Dismiss', action: () => (this.selectedEntity = null) })
212
223
  .withConfirmingAction({ label: 'Confirm', action: () => this.confirmDelete() })
213
224
  .build())
214
- .build());
225
+ .build(), 'zero');
215
226
  }
216
227
  /**
217
228
  * Show notifications if the executed event returned an error.
@@ -281,6 +292,9 @@ __decorate([
281
292
  __decorate([
282
293
  attr({ attribute: 'persist-column-state-key' })
283
294
  ], EntityManagement.prototype, "persistColumnStateKey", void 0);
295
+ __decorate([
296
+ observable
297
+ ], EntityManagement.prototype, "gridOptions", void 0);
284
298
  __decorate([
285
299
  observable
286
300
  ], EntityManagement.prototype, "columns", void 0);
@@ -326,6 +340,12 @@ __decorate([
326
340
  __decorate([
327
341
  attr({ mode: 'boolean', attribute: 'enable-cell-flashing' })
328
342
  ], EntityManagement.prototype, "enableCellFlashing", void 0);
343
+ __decorate([
344
+ attr({ mode: 'boolean', attribute: 'hide-edit' })
345
+ ], EntityManagement.prototype, "hideEdit", void 0);
346
+ __decorate([
347
+ attr({ mode: 'boolean', attribute: 'hide-delete' })
348
+ ], EntityManagement.prototype, "hideDelete", void 0);
329
349
  __decorate([
330
350
  attr({ attribute: 'modal-position' })
331
351
  ], EntityManagement.prototype, "modalPosition", void 0);
@@ -28,9 +28,12 @@ export const template = html `
28
28
  resourceName=${(x) => x.resourceName}
29
29
  :deleteEvent=${(x) => x.deleteEvent}
30
30
  :updateEvent=${(x) => x.updateEvent}
31
+ :gridOptions=${(x) => x.gridOptions}
31
32
  :columns=${(x) => x.columns}
32
33
  :datasourceConfig=${(x) => x.datasourceConfig}
33
34
  data-test-id="entity-list"
35
+ hide-edit=${(x) => x.hideEdit}
36
+ hide-delete=${(x) => x.hideDelete}
34
37
  >
35
38
  <slot name="header" slot="header">${defaultHeader}</slot>
36
39
  </entity-list>
@@ -46,6 +49,7 @@ export const template = html `
46
49
  ${when((x) => x.editModalVisible, html `
47
50
  <foundation-form
48
51
  part="form"
52
+ ${ref('editEntityForm')}
49
53
  resourceName=${(x) => x.formResourceName}
50
54
  :data=${(x) => x.editedEntity}
51
55
  :uischema=${(x) => x.formUiSchema}
@@ -9,6 +9,8 @@ let List = class List extends FASTElement {
9
9
  super(...arguments);
10
10
  this.resourceName = '';
11
11
  this.title = '';
12
+ this.hideEdit = false;
13
+ this.hideDelete = false;
12
14
  this.actionButtonsConfig = [];
13
15
  this.edit = (e) => {
14
16
  this.$emit('edit-entity', e);
@@ -24,10 +26,10 @@ let List = class List extends FASTElement {
24
26
  });
25
27
  this.grid.gridApi.addEventListener('rowClicked', (e) => this.select(e));
26
28
  this.actionButtonsConfig = [];
27
- if (this.deleteEvent) {
29
+ if (this.deleteEvent && !this.hideDelete) {
28
30
  this.actionButtonsConfig.push(buttonCellRenderer('Delete', (e) => this.delete(e)));
29
31
  }
30
- if (this.updateEvent) {
32
+ if (this.updateEvent && !this.hideEdit) {
31
33
  this.actionButtonsConfig.push(buttonCellRenderer('Edit', this.edit));
32
34
  }
33
35
  if (this.enableFilterBar) {
@@ -81,6 +83,15 @@ __decorate([
81
83
  __decorate([
82
84
  attr({ mode: 'boolean', attribute: 'enable-cell-flashing' })
83
85
  ], List.prototype, "enableCellFlashing", void 0);
86
+ __decorate([
87
+ attr({ mode: 'boolean', attribute: 'hide-edit' })
88
+ ], List.prototype, "hideEdit", void 0);
89
+ __decorate([
90
+ attr({ mode: 'boolean', attribute: 'hide-delete' })
91
+ ], List.prototype, "hideDelete", void 0);
92
+ __decorate([
93
+ observable
94
+ ], List.prototype, "gridOptions", void 0);
84
95
  __decorate([
85
96
  observable
86
97
  ], List.prototype, "columns", void 0);
@@ -23,6 +23,7 @@ export const listTemplate = html `
23
23
  >
24
24
  <grid-pro-genesis-datasource
25
25
  ${ref('datasource')}
26
+ :deferredGridOptions=${(x) => x.gridOptions}
26
27
  resource-name=${(x) => x.resourceName}
27
28
  criteria=${(x) => { var _a; return (_a = x.datasourceConfig) === null || _a === void 0 ? void 0 : _a.criteria; }}
28
29
  fields=${(x) => { var _a; return (_a = x.datasourceConfig) === null || _a === void 0 ? void 0 : _a.fields; }}
@@ -453,6 +453,59 @@
453
453
  "isProtected": false,
454
454
  "isAbstract": false
455
455
  },
456
+ {
457
+ "kind": "Method",
458
+ "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#criteriaChanged:member(1)",
459
+ "docComment": "",
460
+ "excerptTokens": [
461
+ {
462
+ "kind": "Content",
463
+ "text": "criteriaChanged(e: "
464
+ },
465
+ {
466
+ "kind": "Reference",
467
+ "text": "CustomEvent",
468
+ "canonicalReference": "!CustomEvent:interface"
469
+ },
470
+ {
471
+ "kind": "Content",
472
+ "text": "<string>"
473
+ },
474
+ {
475
+ "kind": "Content",
476
+ "text": "): "
477
+ },
478
+ {
479
+ "kind": "Content",
480
+ "text": "void"
481
+ },
482
+ {
483
+ "kind": "Content",
484
+ "text": ";"
485
+ }
486
+ ],
487
+ "isStatic": false,
488
+ "returnTypeTokenRange": {
489
+ "startIndex": 4,
490
+ "endIndex": 5
491
+ },
492
+ "releaseTag": "Public",
493
+ "isProtected": false,
494
+ "overloadIndex": 1,
495
+ "parameters": [
496
+ {
497
+ "parameterName": "e",
498
+ "parameterTypeTokenRange": {
499
+ "startIndex": 1,
500
+ "endIndex": 3
501
+ },
502
+ "isOptional": false
503
+ }
504
+ ],
505
+ "isOptional": false,
506
+ "isAbstract": false,
507
+ "name": "criteriaChanged"
508
+ },
456
509
  {
457
510
  "kind": "Property",
458
511
  "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#datasourceConfig:member",
@@ -636,6 +689,37 @@
636
689
  "isProtected": false,
637
690
  "isAbstract": false
638
691
  },
692
+ {
693
+ "kind": "Property",
694
+ "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#editEntityForm:member",
695
+ "docComment": "",
696
+ "excerptTokens": [
697
+ {
698
+ "kind": "Content",
699
+ "text": "editEntityForm: "
700
+ },
701
+ {
702
+ "kind": "Reference",
703
+ "text": "Form",
704
+ "canonicalReference": "@genesislcap/foundation-forms!Form:class"
705
+ },
706
+ {
707
+ "kind": "Content",
708
+ "text": ";"
709
+ }
710
+ ],
711
+ "isReadonly": false,
712
+ "isOptional": false,
713
+ "releaseTag": "Public",
714
+ "name": "editEntityForm",
715
+ "propertyTypeTokenRange": {
716
+ "startIndex": 1,
717
+ "endIndex": 2
718
+ },
719
+ "isStatic": false,
720
+ "isProtected": false,
721
+ "isAbstract": false
722
+ },
639
723
  {
640
724
  "kind": "Property",
641
725
  "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#editEntityModal:member",
@@ -847,6 +931,97 @@
847
931
  "isProtected": false,
848
932
  "isAbstract": false
849
933
  },
934
+ {
935
+ "kind": "Property",
936
+ "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#gridOptions:member",
937
+ "docComment": "/**\n * GridOptions to be passed down from application\n *\n * @public\n */\n",
938
+ "excerptTokens": [
939
+ {
940
+ "kind": "Content",
941
+ "text": "gridOptions: "
942
+ },
943
+ {
944
+ "kind": "Reference",
945
+ "text": "GridOptions",
946
+ "canonicalReference": "@ag-grid-community/core!GridOptions:interface"
947
+ },
948
+ {
949
+ "kind": "Content",
950
+ "text": ";"
951
+ }
952
+ ],
953
+ "isReadonly": false,
954
+ "isOptional": false,
955
+ "releaseTag": "Public",
956
+ "name": "gridOptions",
957
+ "propertyTypeTokenRange": {
958
+ "startIndex": 1,
959
+ "endIndex": 2
960
+ },
961
+ "isStatic": false,
962
+ "isProtected": false,
963
+ "isAbstract": false
964
+ },
965
+ {
966
+ "kind": "Property",
967
+ "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#hideDelete:member",
968
+ "docComment": "",
969
+ "excerptTokens": [
970
+ {
971
+ "kind": "Content",
972
+ "text": "hideDelete: "
973
+ },
974
+ {
975
+ "kind": "Content",
976
+ "text": "boolean"
977
+ },
978
+ {
979
+ "kind": "Content",
980
+ "text": ";"
981
+ }
982
+ ],
983
+ "isReadonly": false,
984
+ "isOptional": false,
985
+ "releaseTag": "Public",
986
+ "name": "hideDelete",
987
+ "propertyTypeTokenRange": {
988
+ "startIndex": 1,
989
+ "endIndex": 2
990
+ },
991
+ "isStatic": false,
992
+ "isProtected": false,
993
+ "isAbstract": false
994
+ },
995
+ {
996
+ "kind": "Property",
997
+ "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#hideEdit:member",
998
+ "docComment": "",
999
+ "excerptTokens": [
1000
+ {
1001
+ "kind": "Content",
1002
+ "text": "hideEdit: "
1003
+ },
1004
+ {
1005
+ "kind": "Content",
1006
+ "text": "boolean"
1007
+ },
1008
+ {
1009
+ "kind": "Content",
1010
+ "text": ";"
1011
+ }
1012
+ ],
1013
+ "isReadonly": false,
1014
+ "isOptional": false,
1015
+ "releaseTag": "Public",
1016
+ "name": "hideEdit",
1017
+ "propertyTypeTokenRange": {
1018
+ "startIndex": 1,
1019
+ "endIndex": 2
1020
+ },
1021
+ "isStatic": false,
1022
+ "isProtected": false,
1023
+ "isAbstract": false
1024
+ },
850
1025
  {
851
1026
  "kind": "Property",
852
1027
  "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#modalPosition:member",
@@ -1,5 +1,5 @@
1
1
  import { Auth } from '@genesislcap/foundation-comms';
2
- import type { ColDef } from '@ag-grid-community/core';
2
+ import { ColDef } from '@ag-grid-community/core';
3
3
  import { Connect } from '@genesislcap/foundation-comms';
4
4
  import { Constructable } from '@microsoft/fast-element';
5
5
  import { Container } from '@microsoft/fast-foundation';
@@ -7,8 +7,10 @@ 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';
13
+ import { GridOptions } from '@ag-grid-community/core';
12
14
  import { GridProRendererTypes } from '@genesislcap/foundation-zero-grid-pro';
13
15
  import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
14
16
  import { Logger } from '@genesislcap/foundation-utils';
@@ -156,6 +158,11 @@ export declare class EntityManagement extends EntityManagement_base {
156
158
  * @public
157
159
  */
158
160
  persistColumnStateKey: string;
161
+ /**
162
+ * GridOptions to be passed down from application
163
+ * @public
164
+ */
165
+ gridOptions: GridOptions;
159
166
  /**
160
167
  * Array which holds the column definitions.
161
168
  * @public
@@ -201,9 +208,12 @@ export declare class EntityManagement extends EntityManagement_base {
201
208
  editModalVisible: boolean;
202
209
  editModalVisibleChanged(): void;
203
210
  editEntityModal: any;
211
+ editEntityForm: Form;
204
212
  sizeColumnsToFit: boolean;
205
213
  enableFilterBar: boolean;
206
214
  enableCellFlashing: boolean;
215
+ hideEdit: boolean;
216
+ hideDelete: boolean;
207
217
  /**
208
218
  * Determines where the modal dialog will appear on screen
209
219
  * @public
@@ -250,6 +260,7 @@ export declare class EntityManagement extends EntityManagement_base {
250
260
  private editEntity;
251
261
  private readEntity;
252
262
  closeModal(): void;
263
+ criteriaChanged(e: CustomEvent<string>): void;
253
264
  /**
254
265
  * Handler for deleting the entity. Added as an event listener on the class when receiving the `delete-entity` event.
255
266
  *
@@ -325,6 +336,10 @@ declare const EntityManagement_base: (new (...args: any[]) => {
325
336
  readonly scrollHeight: number;
326
337
  scrollLeft: number;
327
338
  scrollTop: number;
339
+ /**
340
+ * Disables the form while enabled to stop the user dispatching a large number of duplicate events
341
+ * @public
342
+ */
328
343
  readonly scrollWidth: number;
329
344
  readonly shadowRoot: ShadowRoot;
330
345
  slot: string;
@@ -387,6 +402,11 @@ declare const EntityManagement_base: (new (...args: any[]) => {
387
402
  readonly parentElement: HTMLElement;
388
403
  readonly parentNode: ParentNode;
389
404
  readonly previousSibling: ChildNode;
405
+ /**
406
+ * Show the entity create form
407
+ * Sets the initial value on the form to be defaultEntityValues if present.
408
+ * @internal
409
+ */
390
410
  textContent: string;
391
411
  appendChild<T_1 extends Node>(node: T_1): T_1;
392
412
  compareDocumentPosition(other: Node): number;
@@ -458,10 +478,6 @@ declare const EntityManagement_base: (new (...args: any[]) => {
458
478
  ariaSort: string;
459
479
  ariaValueMax: string;
460
480
  ariaValueMin: string;
461
- /**
462
- * Show notifications if the executed event returned an error.
463
- * @internal
464
- */
465
481
  ariaValueNow: string;
466
482
  ariaValueText: string;
467
483
  role: string;
@@ -477,6 +493,10 @@ declare const EntityManagement_base: (new (...args: any[]) => {
477
493
  readonly childElementCount: number;
478
494
  readonly children: HTMLCollection;
479
495
  readonly firstElementChild: Element;
496
+ /**
497
+ * Show notifications if the executed event returned an error.
498
+ * @internal
499
+ */
480
500
  readonly lastElementChild: Element;
481
501
  append(...nodes: (string | Node)[]): void;
482
502
  prepend(...nodes: (string | Node)[]): void;
@@ -0,0 +1,22 @@
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; [criteriaChanged](./foundation-entity-management.entitymanagement.criteriachanged.md)
4
+
5
+ ## EntityManagement.criteriaChanged() method
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ criteriaChanged(e: CustomEvent<string>): void;
11
+ ```
12
+
13
+ ## Parameters
14
+
15
+ | Parameter | Type | Description |
16
+ | --- | --- | --- |
17
+ | e | CustomEvent&lt;string&gt; | |
18
+
19
+ **Returns:**
20
+
21
+ void
22
+
@@ -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; [editEntityForm](./foundation-entity-management.entitymanagement.editentityform.md)
4
+
5
+ ## EntityManagement.editEntityForm property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ editEntityForm: Form;
11
+ ```
@@ -0,0 +1,13 @@
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; [gridOptions](./foundation-entity-management.entitymanagement.gridoptions.md)
4
+
5
+ ## EntityManagement.gridOptions property
6
+
7
+ GridOptions to be passed down from application
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ gridOptions: GridOptions;
13
+ ```
@@ -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; [hideDelete](./foundation-entity-management.entitymanagement.hidedelete.md)
4
+
5
+ ## EntityManagement.hideDelete property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ hideDelete: boolean;
11
+ ```
@@ -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; [hideEdit](./foundation-entity-management.entitymanagement.hideedit.md)
4
+
5
+ ## EntityManagement.hideEdit property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ hideEdit: boolean;
11
+ ```
@@ -45,12 +45,16 @@ Where:<br /> - the title of the grid is `Counterparty Management`<br /> - the na
45
45
  | [deleteEvent](./foundation-entity-management.entitymanagement.deleteevent.md) | | string | Name of the event handler on the Genesis server which handles deleting the entity |
46
46
  | [editDialogTitle](./foundation-entity-management.entitymanagement.editdialogtitle.md) | | string | String which contains the text of the popup modal when the user is adding or editing an entity |
47
47
  | [editedEntity](./foundation-entity-management.entitymanagement.editedentity.md) | | any | Disables the form while enabled to stop the user dispatching a large number of duplicate events |
48
+ | [editEntityForm](./foundation-entity-management.entitymanagement.editentityform.md) | | Form | |
48
49
  | [editEntityModal](./foundation-entity-management.entitymanagement.editentitymodal.md) | | any | |
49
50
  | [editModalVisible](./foundation-entity-management.entitymanagement.editmodalvisible.md) | | boolean | |
50
51
  | [enableCellFlashing](./foundation-entity-management.entitymanagement.enablecellflashing.md) | | boolean | |
51
52
  | [enableFilterBar](./foundation-entity-management.entitymanagement.enablefilterbar.md) | | boolean | |
52
53
  | [entityLabel](./foundation-entity-management.entitymanagement.entitylabel.md) | | string | Label for the entity which has usages such as being shown in the title of the modal wen editing the entity |
53
54
  | [formUiSchema](./foundation-entity-management.entitymanagement.formuischema.md) | | any | |
55
+ | [gridOptions](./foundation-entity-management.entitymanagement.gridoptions.md) | | GridOptions | GridOptions to be passed down from application |
56
+ | [hideDelete](./foundation-entity-management.entitymanagement.hidedelete.md) | | boolean | |
57
+ | [hideEdit](./foundation-entity-management.entitymanagement.hideedit.md) | | boolean | |
54
58
  | [modalPosition](./foundation-entity-management.entitymanagement.modalposition.md) | | 'centre' \| 'left' \| 'right' | Determines where the modal dialog will appear on screen |
55
59
  | [persistColumnStateKey](./foundation-entity-management.entitymanagement.persistcolumnstatekey.md) | | string | This attribute controls whether and how the entity manager stores the state of the columns when the user edits them. Omit this attribute to disable the functionality, set it to a unique value to enable it. |
56
60
  | [readEvent](./foundation-entity-management.entitymanagement.readevent.md) | | string | |
@@ -70,6 +74,7 @@ Where:<br /> - the title of the grid is `Counterparty Management`<br /> - the na
70
74
  | --- | --- | --- |
71
75
  | [closeModal()](./foundation-entity-management.entitymanagement.closemodal.md) | | |
72
76
  | [confirmDelete()](./foundation-entity-management.entitymanagement.confirmdelete.md) | | |
77
+ | [criteriaChanged(e)](./foundation-entity-management.entitymanagement.criteriachanged.md) | | |
73
78
  | [deepClone()](./foundation-entity-management.entitymanagement.deepclone.md) | | Override the deepClone method to ensure that observable attributes are cloned |
74
79
  | [editModalVisibleChanged()](./foundation-entity-management.entitymanagement.editmodalvisiblechanged.md) | | |
75
80
  | [submitEntityChanges(e)](./foundation-entity-management.entitymanagement.submitentitychanges.md) | | Event handler for when the user submits the action for the currently open form, either editing or adding the entity |
@@ -5,7 +5,7 @@
5
5
  ```ts
6
6
 
7
7
  import { Auth } from '@genesislcap/foundation-comms';
8
- import type { ColDef } from '@ag-grid-community/core';
8
+ import { ColDef } from '@ag-grid-community/core';
9
9
  import { Connect } from '@genesislcap/foundation-comms';
10
10
  import { Constructable } from '@microsoft/fast-element';
11
11
  import { Container } from '@microsoft/fast-foundation';
@@ -13,8 +13,10 @@ import { Controller } from '@microsoft/fast-element';
13
13
  import { DatasourceOptions } from '@genesislcap/foundation-comms';
14
14
  import { DOMContainer } from '@genesislcap/foundation-utils';
15
15
  import { FASTElement } from '@microsoft/fast-element';
16
+ import { Form } from '@genesislcap/foundation-forms';
16
17
  import { FoundationAnalytics } from '@genesislcap/foundation-comms';
17
18
  import { FoundationLayoutContainer } from '@genesislcap/foundation-utils';
19
+ import { GridOptions } from '@ag-grid-community/core';
18
20
  import { GridProRendererTypes } from '@genesislcap/foundation-zero-grid-pro';
19
21
  import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
20
22
  import { Logger } from '@genesislcap/foundation-utils';
@@ -74,6 +76,8 @@ export class EntityManagement extends EntityManagement_base {
74
76
  createEvent: string;
75
77
  // (undocumented)
76
78
  createFormUiSchema: any;
79
+ // (undocumented)
80
+ criteriaChanged(e: CustomEvent<string>): void;
77
81
  datasourceConfig: DatasourceConfiguration;
78
82
  deepClone(): Node;
79
83
  // (undocumented)
@@ -84,6 +88,8 @@ export class EntityManagement extends EntityManagement_base {
84
88
  editDialogTitle: string;
85
89
  editedEntity: any;
86
90
  // (undocumented)
91
+ editEntityForm: Form;
92
+ // (undocumented)
87
93
  editEntityModal: any;
88
94
  // (undocumented)
89
95
  editModalVisible: boolean;
@@ -102,6 +108,11 @@ export class EntityManagement extends EntityManagement_base {
102
108
  formResourceName: string;
103
109
  // (undocumented)
104
110
  formUiSchema: any;
111
+ gridOptions: GridOptions;
112
+ // (undocumented)
113
+ hideDelete: boolean;
114
+ // (undocumented)
115
+ hideEdit: boolean;
105
116
  modalPosition: 'centre' | 'left' | 'right';
106
117
  persistColumnStateKey: string;
107
118
  // (undocumented)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-entity-management",
3
3
  "description": "Genesis Foundation Entity Management",
4
- "version": "14.41.1",
4
+ "version": "14.41.2-bny.2",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -41,21 +41,21 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@genesislcap/foundation-login": "^14.40.0",
44
- "@genesislcap/foundation-testing": "^14.41.1",
45
- "@genesislcap/genx": "^14.41.1",
44
+ "@genesislcap/foundation-testing": "14.41.2-bny.2",
45
+ "@genesislcap/genx": "14.41.2-bny.2",
46
46
  "bulma": "^0.9.3"
47
47
  },
48
48
  "dependencies": {
49
49
  "@ag-grid-community/core": "29.2.0",
50
- "@genesislcap/foundation-comms": "^14.41.1",
51
- "@genesislcap/foundation-errors": "^14.41.1",
52
- "@genesislcap/foundation-forms": "^14.41.1",
53
- "@genesislcap/foundation-login": "^14.41.1",
54
- "@genesislcap/foundation-ui": "^14.41.1",
55
- "@genesislcap/foundation-utils": "^14.41.1",
56
- "@genesislcap/foundation-zero": "^14.41.1",
57
- "@genesislcap/foundation-zero-grid-pro": "^14.41.1",
58
- "@genesislcap/grid-pro": "^14.41.1",
50
+ "@genesislcap/foundation-comms": "14.41.2-bny.2",
51
+ "@genesislcap/foundation-errors": "14.41.2-bny.2",
52
+ "@genesislcap/foundation-forms": "14.41.2-bny.2",
53
+ "@genesislcap/foundation-login": "14.41.2-bny.2",
54
+ "@genesislcap/foundation-ui": "14.41.2-bny.2",
55
+ "@genesislcap/foundation-utils": "14.41.2-bny.2",
56
+ "@genesislcap/foundation-zero": "14.41.2-bny.2",
57
+ "@genesislcap/foundation-zero-grid-pro": "14.41.2-bny.2",
58
+ "@genesislcap/grid-pro": "14.41.2-bny.2",
59
59
  "@microsoft/fast-components": "^2.21.3",
60
60
  "@microsoft/fast-element": "^1.7.0",
61
61
  "@microsoft/fast-foundation": "^2.33.2",
@@ -71,5 +71,5 @@
71
71
  "access": "public"
72
72
  },
73
73
  "customElements": "dist/custom-elements.json",
74
- "gitHead": "7a446acc63c677800d4acbba0e7cd169178c5a3c"
74
+ "gitHead": "4796266e66246b813f0f96b8617cd9df1d6ec891"
75
75
  }