@genesislcap/foundation-entity-management 14.398.0 → 14.400.0

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.
@@ -565,6 +565,16 @@
565
565
  "description": "This attribute controls whether to enable the search-bar.",
566
566
  "privacy": "public"
567
567
  },
568
+ {
569
+ "kind": "field",
570
+ "name": "enableAiCriteriaSearch",
571
+ "type": {
572
+ "text": "boolean"
573
+ },
574
+ "default": "false",
575
+ "description": "Enables AI criteria search component. When true, fetches field metadata from resourceName and renders the AI search bar.",
576
+ "privacy": "public"
577
+ },
568
578
  {
569
579
  "kind": "field",
570
580
  "name": "headerCaseType",
@@ -1092,6 +1102,15 @@
1092
1102
  "description": "This attribute controls whether to enable the search-bar.",
1093
1103
  "fieldName": "enableSearchBar"
1094
1104
  },
1105
+ {
1106
+ "name": "enable-ai-criteria-search",
1107
+ "type": {
1108
+ "text": "boolean"
1109
+ },
1110
+ "default": "false",
1111
+ "description": "Enables AI criteria search component. When true, fetches field metadata from resourceName and renders the AI search bar.",
1112
+ "fieldName": "enableAiCriteriaSearch"
1113
+ },
1095
1114
  {
1096
1115
  "name": "header-case-type",
1097
1116
  "type": {
@@ -1730,6 +1749,20 @@
1730
1749
  "module": "src/entities/entities.ts"
1731
1750
  }
1732
1751
  },
1752
+ {
1753
+ "kind": "field",
1754
+ "name": "enableAiCriteriaSearch",
1755
+ "type": {
1756
+ "text": "boolean"
1757
+ },
1758
+ "default": "false",
1759
+ "description": "Enables AI criteria search component. When true, fetches field metadata from resourceName and renders the AI search bar.",
1760
+ "privacy": "public",
1761
+ "inheritedFrom": {
1762
+ "name": "EntityManagement",
1763
+ "module": "src/entities/entities.ts"
1764
+ }
1765
+ },
1733
1766
  {
1734
1767
  "kind": "field",
1735
1768
  "name": "headerCaseType",
@@ -2412,6 +2445,19 @@
2412
2445
  "module": "src/entities/entities.ts"
2413
2446
  }
2414
2447
  },
2448
+ {
2449
+ "name": "enable-ai-criteria-search",
2450
+ "type": {
2451
+ "text": "boolean"
2452
+ },
2453
+ "default": "false",
2454
+ "description": "Enables AI criteria search component. When true, fetches field metadata from resourceName and renders the AI search bar.",
2455
+ "fieldName": "enableAiCriteriaSearch",
2456
+ "inheritedFrom": {
2457
+ "name": "EntityManagement",
2458
+ "module": "src/entities/entities.ts"
2459
+ }
2460
+ },
2415
2461
  {
2416
2462
  "name": "header-case-type",
2417
2463
  "type": {
@@ -1,5 +1,6 @@
1
1
  import { ColDef, GridOptions, SelectionChangedEvent } from '@ag-grid-community/core';
2
2
  import { Connect, DatasourceOptions, MessageError } from '@genesislcap/foundation-comms';
3
+ import type { MetadataDetail } from '@genesislcap/foundation-comms';
3
4
  import type { UiSchema } from '@genesislcap/foundation-forms';
4
5
  import { RendererEntry } from '@genesislcap/foundation-forms';
5
6
  import { type NotificationStructure } from '@genesislcap/foundation-notifications';
@@ -104,15 +105,7 @@ declare const EntityManagement_base: (new (...args: any[]) => {
104
105
  slot: string;
105
106
  readonly tagName: string;
106
107
  attachShadow(init: ShadowRootInit): ShadowRoot;
107
- checkVisibility(options
108
- /**
109
- * If true, will enable row flashing for all rows for `add` transactions
110
- * @public
111
- */
112
- ? /**
113
- * If true, will enable row flashing for all rows for `add` transactions
114
- * @public
115
- */: CheckVisibilityOptions): boolean;
108
+ checkVisibility(options?: CheckVisibilityOptions): boolean;
116
109
  closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K];
117
110
  closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K];
118
111
  closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K];
@@ -740,6 +733,16 @@ export declare class EntityManagement extends EntityManagement_base {
740
733
  * @public
741
734
  */
742
735
  enableSearchBar: boolean;
736
+ /**
737
+ * Enables AI criteria search component. When true, fetches field metadata from resourceName and renders the AI search bar.
738
+ * @public
739
+ */
740
+ enableAiCriteriaSearch: boolean;
741
+ /**
742
+ * Field metadata for AI criteria search, populated from resource metadata when enableAiCriteriaSearch is true.
743
+ * @internal
744
+ */
745
+ aiCriteriaSearchFieldMetadata: MetadataDetail[];
743
746
  /**
744
747
  * The case type to use for the header names. If not set, the default CONSTANT_CASE will be used.
745
748
  * @remarks Can be one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.
@@ -792,6 +795,11 @@ export declare class EntityManagement extends EntityManagement_base {
792
795
  * @internal
793
796
  */
794
797
  private searchBarCriteria;
798
+ /**
799
+ * Stores the current AI criteria search criteria (from slot="criteria-search")
800
+ * @internal
801
+ */
802
+ private aiCriteriaSearchCriteria;
795
803
  /**
796
804
  * Determines where the modal dialog will appear on screen
797
805
  * @public
@@ -999,10 +1007,10 @@ export declare class EntityManagement extends EntityManagement_base {
999
1007
  */
1000
1008
  disconnectedCallback(): Promise<void>;
1001
1009
  /**
1002
- * Gets the default searchBarConfig if the user has not created their own.
1010
+ * Loads metadata from resource and populates searchBarConfig and/or aiCriteriaSearchFieldMetadata.
1003
1011
  * @internal
1004
1012
  */
1005
- private getDefaultSearchBarConfig;
1013
+ private loadMetadata;
1006
1014
  /**
1007
1015
  * Override the deepClone method to ensure that observable attributes are cloned
1008
1016
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../../src/entities/entities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EACL,OAAO,EACP,iBAAiB,EAEjB,YAAY,EAEb,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAa,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,eAAe,EAEf,KAAK,EACL,cAAc,EACf,M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;IA6BjC,gBAAgB;IACV,eAAe;CAkCtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"entities.template.d.ts","sourceRoot":"","sources":["../../../src/entities/entities.template.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiB,gBAAgB,EAAc,MAAM,UAAU,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAuEnD;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,MAAM,EACd,UAAU,gBAAgB,0EAmD3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,0EAiBpD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,0EAQ1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,0EAY5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,0EAwBlD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,0EA8GjD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,QAAQ,uEAEpB,CAAC"}
1
+ {"version":3,"file":"entities.template.d.ts","sourceRoot":"","sources":["../../../src/entities/entities.template.ts"],"names":[],"mappings":"AAMA,OAAO,EAAiB,gBAAgB,EAAc,MAAM,UAAU,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAuEnD;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,MAAM,EACd,UAAU,gBAAgB,0EAmD3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,0EAiBpD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,0EAQ1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,0EAqB5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,0EAwBlD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,0EA8GjD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,QAAQ,uEAEpB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { __awaiter, __decorate, __rest } from "tslib";
2
- import { Connect, defaultDatasourceConfig, ResourceType, } from '@genesislcap/foundation-comms';
2
+ import { Connect, defaultDatasourceConfig, extractFieldDefinitions, ResourceType, } from '@genesislcap/foundation-comms';
3
3
  import { renderers } from '@genesislcap/foundation-forms';
4
4
  import { showNotification, showNotificationDialog, } from '@genesislcap/foundation-notifications';
5
5
  import { formatDateTimestamp, formatDateTimeTimestamp, LifecycleMixin, } from '@genesislcap/foundation-utils';
@@ -157,6 +157,16 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(GenesisElem
157
157
  * @public
158
158
  */
159
159
  this.enableSearchBar = false;
160
+ /**
161
+ * Enables AI criteria search component. When true, fetches field metadata from resourceName and renders the AI search bar.
162
+ * @public
163
+ */
164
+ this.enableAiCriteriaSearch = false;
165
+ /**
166
+ * Field metadata for AI criteria search, populated from resource metadata when enableAiCriteriaSearch is true.
167
+ * @internal
168
+ */
169
+ this.aiCriteriaSearchFieldMetadata = [];
160
170
  /**
161
171
  * Allows configuration of the search bar component, if not provided it would build configuration based on columns in the grid
162
172
  * * @internal
@@ -188,6 +198,11 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(GenesisElem
188
198
  * @internal
189
199
  */
190
200
  this.searchBarCriteria = '';
201
+ /**
202
+ * Stores the current AI criteria search criteria (from slot="criteria-search")
203
+ * @internal
204
+ */
205
+ this.aiCriteriaSearchCriteria = '';
191
206
  /**
192
207
  * Determines where the modal dialog will appear on screen
193
208
  * @public
@@ -602,8 +617,8 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(GenesisElem
602
617
  this.addEventListener('submit-failure', this.submitFailureNotification);
603
618
  this.addEventListener('selectionChange', this.searchChanged);
604
619
  this.addEventListener('custom-action', this.handleCustomActionEvent);
605
- if (!this.searchBarConfig) {
606
- this.getDefaultSearchBarConfig();
620
+ if (!this.searchBarConfig || this.enableAiCriteriaSearch) {
621
+ this.loadMetadata();
607
622
  }
608
623
  if (this.crudMenuStyle.includes('actions-')) {
609
624
  this.generateCrudActionsMenu();
@@ -638,10 +653,10 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(GenesisElem
638
653
  });
639
654
  }
640
655
  /**
641
- * Gets the default searchBarConfig if the user has not created their own.
656
+ * Loads metadata from resource and populates searchBarConfig and/or aiCriteriaSearchFieldMetadata.
642
657
  * @internal
643
658
  */
644
- getDefaultSearchBarConfig() {
659
+ loadMetadata() {
645
660
  return __awaiter(this, void 0, void 0, function* () {
646
661
  const meta = yield this.connect
647
662
  .getMetadata(this.resourceName)
@@ -649,12 +664,17 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(GenesisElem
649
664
  if (!meta) {
650
665
  return;
651
666
  }
652
- const changeCaseByType = changeCase[this.headerCaseType];
653
- if (this.columns) {
654
- this.searchBarConfig = getSearchBarColumnsConfig(this.columns, meta, changeCaseByType);
667
+ if (!this.searchBarConfig) {
668
+ const changeCaseByType = changeCase[this.headerCaseType];
669
+ if (this.columns) {
670
+ this.searchBarConfig = getSearchBarColumnsConfig(this.columns, meta, changeCaseByType);
671
+ }
672
+ else {
673
+ this.searchBarConfig = getSearchBarMetaConfig(meta, changeCaseByType);
674
+ }
655
675
  }
656
- else {
657
- this.searchBarConfig = getSearchBarMetaConfig(meta, changeCaseByType);
676
+ if (this.enableAiCriteriaSearch) {
677
+ this.aiCriteriaSearchFieldMetadata = extractFieldDefinitions(meta);
658
678
  }
659
679
  });
660
680
  }
@@ -835,17 +855,29 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(GenesisElem
835
855
  this.updateCombinedCriteria();
836
856
  }
837
857
  criteriaChanged(e) {
838
- this.searchBarCriteria = e.detail || '';
858
+ var _a;
859
+ const target = e.target;
860
+ const isAiCriteriaSearch = (_a = target === null || target === void 0 ? void 0 : target.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes('ai-criteria-search');
861
+ if (isAiCriteriaSearch) {
862
+ this.aiCriteriaSearchCriteria = e.detail || '';
863
+ }
864
+ else {
865
+ this.searchBarCriteria = e.detail || '';
866
+ }
839
867
  this.updateCombinedCriteria();
840
868
  }
841
869
  updateCombinedCriteria() {
842
870
  var _a;
843
871
  const searchCriteria = this.searchBarCriteria || '';
872
+ const aiCriteria = this.aiCriteriaSearchCriteria || '';
844
873
  const filterCriteria = this.filtersCriteria || '';
845
874
  let combined = this.baseCriteria || '';
846
875
  if (searchCriteria) {
847
876
  combined = combined ? `(${combined}) && (${searchCriteria})` : searchCriteria;
848
877
  }
878
+ if (aiCriteria) {
879
+ combined = combined ? `(${combined}) && (${aiCriteria})` : aiCriteria;
880
+ }
849
881
  if (filterCriteria) {
850
882
  combined = combined ? `(${combined}) && (${filterCriteria})` : filterCriteria;
851
883
  }
@@ -1276,6 +1308,12 @@ __decorate([
1276
1308
  __decorate([
1277
1309
  attr({ mode: 'boolean', attribute: 'enable-search-bar' })
1278
1310
  ], EntityManagement.prototype, "enableSearchBar", void 0);
1311
+ __decorate([
1312
+ attr({ mode: 'boolean', attribute: 'enable-ai-criteria-search' })
1313
+ ], EntityManagement.prototype, "enableAiCriteriaSearch", void 0);
1314
+ __decorate([
1315
+ observable
1316
+ ], EntityManagement.prototype, "aiCriteriaSearchFieldMetadata", void 0);
1279
1317
  __decorate([
1280
1318
  attr({ attribute: 'header-case-type' })
1281
1319
  ], EntityManagement.prototype, "headerCaseType", void 0);
@@ -1303,6 +1341,9 @@ __decorate([
1303
1341
  __decorate([
1304
1342
  observable
1305
1343
  ], EntityManagement.prototype, "searchBarCriteria", void 0);
1344
+ __decorate([
1345
+ observable
1346
+ ], EntityManagement.prototype, "aiCriteriaSearchCriteria", void 0);
1306
1347
  __decorate([
1307
1348
  attr({ attribute: 'modal-position' })
1308
1349
  ], EntityManagement.prototype, "modalPosition", void 0);
@@ -1,3 +1,4 @@
1
+ import { isAIFeatureEnabled } from '@genesislcap/foundation-ai';
1
2
  import { Form } from '@genesislcap/foundation-forms';
2
3
  import { avoidTreeShaking, sync } from '@genesislcap/foundation-utils';
3
4
  import { html, ref, when, repeat } from '@genesislcap/web-core';
@@ -127,6 +128,12 @@ export const headerTemplate = (prefix) => html `
127
128
  <${prefix}-search-bar
128
129
  :options="${(x) => x.searchBarConfig}"
129
130
  ></${prefix}-search-bar>
131
+ `)}
132
+ ${when((x) => x.enableAiCriteriaSearch && isAIFeatureEnabled(), html `
133
+ <${prefix}-ai-criteria-search
134
+ :fieldMetadata=${(x) => x.aiCriteriaSearchFieldMetadata}
135
+ placeholder="Describe your search criteria in natural language..."
136
+ ></${prefix}-ai-criteria-search>
130
137
  `)}
131
138
  ${exportHeader(prefix)} ${headerCrudAreaTemplate(prefix)}
132
139
  </div>
@@ -1784,6 +1784,36 @@
1784
1784
  "isProtected": false,
1785
1785
  "isAbstract": false
1786
1786
  },
1787
+ {
1788
+ "kind": "Property",
1789
+ "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#enableAiCriteriaSearch:member",
1790
+ "docComment": "/**\n * Enables AI criteria search component. When true, fetches field metadata from resourceName and renders the AI search bar.\n *\n * @public\n */\n",
1791
+ "excerptTokens": [
1792
+ {
1793
+ "kind": "Content",
1794
+ "text": "enableAiCriteriaSearch: "
1795
+ },
1796
+ {
1797
+ "kind": "Content",
1798
+ "text": "boolean"
1799
+ },
1800
+ {
1801
+ "kind": "Content",
1802
+ "text": ";"
1803
+ }
1804
+ ],
1805
+ "isReadonly": false,
1806
+ "isOptional": false,
1807
+ "releaseTag": "Public",
1808
+ "name": "enableAiCriteriaSearch",
1809
+ "propertyTypeTokenRange": {
1810
+ "startIndex": 1,
1811
+ "endIndex": 2
1812
+ },
1813
+ "isStatic": false,
1814
+ "isProtected": false,
1815
+ "isAbstract": false
1816
+ },
1787
1817
  {
1788
1818
  "kind": "Property",
1789
1819
  "canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#enableCellFlashing:member",
@@ -20,6 +20,7 @@ import { InterfaceSymbol } from '@microsoft/fast-foundation';
20
20
  import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
21
21
  import { Logger } from '@genesislcap/foundation-logger';
22
22
  import { MessageError } from '@genesislcap/foundation-comms';
23
+ import type { MetadataDetail } from '@genesislcap/foundation-comms';
23
24
  import { Modal } from '@genesislcap/foundation-ui';
24
25
  import { NotificationStructure } from '@genesislcap/foundation-notifications';
25
26
  import { PartialFASTElementDefinition } from '@microsoft/fast-element';
@@ -488,6 +489,16 @@ export declare class EntityManagement extends EntityManagement_base {
488
489
  * @public
489
490
  */
490
491
  enableSearchBar: boolean;
492
+ /**
493
+ * Enables AI criteria search component. When true, fetches field metadata from resourceName and renders the AI search bar.
494
+ * @public
495
+ */
496
+ enableAiCriteriaSearch: boolean;
497
+ /**
498
+ * Field metadata for AI criteria search, populated from resource metadata when enableAiCriteriaSearch is true.
499
+ * @internal
500
+ */
501
+ aiCriteriaSearchFieldMetadata: MetadataDetail[];
491
502
  /**
492
503
  * The case type to use for the header names. If not set, the default CONSTANT_CASE will be used.
493
504
  * @remarks Can be one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.
@@ -540,6 +551,11 @@ export declare class EntityManagement extends EntityManagement_base {
540
551
  * @internal
541
552
  */
542
553
  private searchBarCriteria;
554
+ /**
555
+ * Stores the current AI criteria search criteria (from slot="criteria-search")
556
+ * @internal
557
+ */
558
+ private aiCriteriaSearchCriteria;
543
559
  /**
544
560
  * Determines where the modal dialog will appear on screen
545
561
  * @public
@@ -747,10 +763,10 @@ export declare class EntityManagement extends EntityManagement_base {
747
763
  */
748
764
  disconnectedCallback(): Promise<void>;
749
765
  /**
750
- * Gets the default searchBarConfig if the user has not created their own.
766
+ * Loads metadata from resource and populates searchBarConfig and/or aiCriteriaSearchFieldMetadata.
751
767
  * @internal
752
768
  */
753
- private getDefaultSearchBarConfig;
769
+ private loadMetadata;
754
770
  /**
755
771
  * Override the deepClone method to ensure that observable attributes are cloned
756
772
  * @internal
@@ -941,15 +957,7 @@ declare const EntityManagement_base: (new (...args: any[]) => {
941
957
  slot: string;
942
958
  readonly tagName: string;
943
959
  attachShadow(init: ShadowRootInit): ShadowRoot;
944
- checkVisibility(options
945
- /**
946
- * If true, will enable row flashing for all rows for `add` transactions
947
- * @public
948
- */
949
- ? /**
950
- * If true, will enable row flashing for all rows for `add` transactions
951
- * @public
952
- */: CheckVisibilityOptions): boolean;
960
+ checkVisibility(options?: CheckVisibilityOptions): boolean;
953
961
  closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K];
954
962
  closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K];
955
963
  closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K];
@@ -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; [enableAiCriteriaSearch](./foundation-entity-management.entitymanagement.enableaicriteriasearch.md)
4
+
5
+ ## EntityManagement.enableAiCriteriaSearch property
6
+
7
+ Enables AI criteria search component. When true, fetches field metadata from resourceName and renders the AI search bar.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ enableAiCriteriaSearch: boolean;
13
+ ```
@@ -301,6 +301,25 @@ string
301
301
  Name of the event handler on the Genesis server which handles deleting the entity
302
302
 
303
303
 
304
+ </td></tr>
305
+ <tr><td>
306
+
307
+ [enableAiCriteriaSearch](./foundation-entity-management.entitymanagement.enableaicriteriasearch.md)
308
+
309
+
310
+ </td><td>
311
+
312
+
313
+ </td><td>
314
+
315
+ boolean
316
+
317
+
318
+ </td><td>
319
+
320
+ Enables AI criteria search component. When true, fetches field metadata from resourceName and renders the AI search bar.
321
+
322
+
304
323
  </td></tr>
305
324
  <tr><td>
306
325
 
@@ -26,6 +26,7 @@ import { InterfaceSymbol } from '@microsoft/fast-foundation';
26
26
  import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
27
27
  import { Logger } from '@genesislcap/foundation-logger';
28
28
  import { MessageError } from '@genesislcap/foundation-comms';
29
+ import type { MetadataDetail } from '@genesislcap/foundation-comms';
29
30
  import { Modal } from '@genesislcap/foundation-ui';
30
31
  import { NotificationStructure } from '@genesislcap/foundation-notifications';
31
32
  import { PartialFASTElementDefinition } from '@microsoft/fast-element';
@@ -180,6 +181,8 @@ export const ENTITY_NAME: InterfaceSymbol<string>;
180
181
  export class EntityManagement extends EntityManagement_base {
181
182
  // @internal
182
183
  activeCustomAction: CustomActionState | null;
184
+ // @internal
185
+ aiCriteriaSearchFieldMetadata: MetadataDetail[];
183
186
  approvalMessageLabel: string;
184
187
  // @internal
185
188
  asyncAdd: boolean;
@@ -247,6 +250,7 @@ export class EntityManagement extends EntityManagement_base {
247
250
  editModalVisible: boolean;
248
251
  // @internal
249
252
  emitCrud(action: 'create' | 'edit' | 'delete'): void;
253
+ enableAiCriteriaSearch: boolean;
250
254
  enableCellFlashing: boolean;
251
255
  enableCsvExport: {
252
256
  buttonName?: string;
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.398.0",
4
+ "version": "14.400.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -54,31 +54,32 @@
54
54
  }
55
55
  },
56
56
  "devDependencies": {
57
- "@genesislcap/foundation-testing": "14.398.0",
58
- "@genesislcap/genx": "14.398.0",
59
- "@genesislcap/rollup-builder": "14.398.0",
60
- "@genesislcap/ts-builder": "14.398.0",
61
- "@genesislcap/uvu-playwright-builder": "14.398.0",
62
- "@genesislcap/vite-builder": "14.398.0",
63
- "@genesislcap/webpack-builder": "14.398.0"
57
+ "@genesislcap/foundation-testing": "14.400.0",
58
+ "@genesislcap/genx": "14.400.0",
59
+ "@genesislcap/rollup-builder": "14.400.0",
60
+ "@genesislcap/ts-builder": "14.400.0",
61
+ "@genesislcap/uvu-playwright-builder": "14.400.0",
62
+ "@genesislcap/vite-builder": "14.400.0",
63
+ "@genesislcap/webpack-builder": "14.400.0"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@ag-grid-community/core": "29.2.0"
67
67
  },
68
68
  "dependencies": {
69
- "@genesislcap/foundation-comms": "14.398.0",
70
- "@genesislcap/foundation-errors": "14.398.0",
71
- "@genesislcap/foundation-events": "14.398.0",
72
- "@genesislcap/foundation-forms": "14.398.0",
73
- "@genesislcap/foundation-logger": "14.398.0",
74
- "@genesislcap/foundation-login": "14.398.0",
75
- "@genesislcap/foundation-notifications": "14.398.0",
76
- "@genesislcap/foundation-ui": "14.398.0",
77
- "@genesislcap/foundation-utils": "14.398.0",
78
- "@genesislcap/foundation-zero": "14.398.0",
79
- "@genesislcap/foundation-zero-grid-pro": "14.398.0",
80
- "@genesislcap/grid-pro": "14.398.0",
81
- "@genesislcap/web-core": "14.398.0",
69
+ "@genesislcap/foundation-ai": "14.400.0",
70
+ "@genesislcap/foundation-comms": "14.400.0",
71
+ "@genesislcap/foundation-errors": "14.400.0",
72
+ "@genesislcap/foundation-events": "14.400.0",
73
+ "@genesislcap/foundation-forms": "14.400.0",
74
+ "@genesislcap/foundation-logger": "14.400.0",
75
+ "@genesislcap/foundation-login": "14.400.0",
76
+ "@genesislcap/foundation-notifications": "14.400.0",
77
+ "@genesislcap/foundation-ui": "14.400.0",
78
+ "@genesislcap/foundation-utils": "14.400.0",
79
+ "@genesislcap/foundation-zero": "14.400.0",
80
+ "@genesislcap/foundation-zero-grid-pro": "14.400.0",
81
+ "@genesislcap/grid-pro": "14.400.0",
82
+ "@genesislcap/web-core": "14.400.0",
82
83
  "change-case": "^4.1.2"
83
84
  },
84
85
  "repository": {
@@ -90,5 +91,5 @@
90
91
  "access": "public"
91
92
  },
92
93
  "customElements": "dist/custom-elements.json",
93
- "gitHead": "d9c0d13f49958e386d339075078dc15561455c18"
94
+ "gitHead": "e95f4522e1f30ffbd0d7ac427199da5cc7df7de8"
94
95
  }