@memberjunction/ng-entity-viewer 5.39.0 → 5.40.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.
Files changed (79) hide show
  1. package/dist/__tests__/view-types.test.d.ts +2 -0
  2. package/dist/__tests__/view-types.test.d.ts.map +1 -0
  3. package/dist/__tests__/view-types.test.js +102 -0
  4. package/dist/__tests__/view-types.test.js.map +1 -0
  5. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
  6. package/dist/lib/entity-data-grid/entity-data-grid.component.js +8 -0
  7. package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
  8. package/dist/lib/entity-viewer/entity-viewer.component.d.ts +356 -341
  9. package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -1
  10. package/dist/lib/entity-viewer/entity-viewer.component.js +993 -1097
  11. package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -1
  12. package/dist/lib/view-config-panel/view-config-panel.component.d.ts +126 -126
  13. package/dist/lib/view-config-panel/view-config-panel.component.js +635 -635
  14. package/dist/lib/view-config-panel/view-config-panel.component.js.map +1 -1
  15. package/dist/lib/view-selector/view-selector.component.d.ts +226 -0
  16. package/dist/lib/view-selector/view-selector.component.d.ts.map +1 -0
  17. package/dist/lib/view-selector/view-selector.component.js +861 -0
  18. package/dist/lib/view-selector/view-selector.component.js.map +1 -0
  19. package/dist/lib/view-type-switcher/view-type-switcher.component.d.ts +114 -0
  20. package/dist/lib/view-type-switcher/view-type-switcher.component.d.ts.map +1 -0
  21. package/dist/lib/view-type-switcher/view-type-switcher.component.js +209 -0
  22. package/dist/lib/view-type-switcher/view-type-switcher.component.js.map +1 -0
  23. package/dist/lib/view-types/descriptors/cards-view-type.d.ts +18 -0
  24. package/dist/lib/view-types/descriptors/cards-view-type.d.ts.map +1 -0
  25. package/dist/lib/view-types/descriptors/cards-view-type.js +31 -0
  26. package/dist/lib/view-types/descriptors/cards-view-type.js.map +1 -0
  27. package/dist/lib/view-types/descriptors/grid-view-type.d.ts +17 -0
  28. package/dist/lib/view-types/descriptors/grid-view-type.d.ts.map +1 -0
  29. package/dist/lib/view-types/descriptors/grid-view-type.js +30 -0
  30. package/dist/lib/view-types/descriptors/grid-view-type.js.map +1 -0
  31. package/dist/lib/view-types/descriptors/map-view-type.d.ts +21 -0
  32. package/dist/lib/view-types/descriptors/map-view-type.d.ts.map +1 -0
  33. package/dist/lib/view-types/descriptors/map-view-type.js +35 -0
  34. package/dist/lib/view-types/descriptors/map-view-type.js.map +1 -0
  35. package/dist/lib/view-types/descriptors/timeline-view-type.d.ts +22 -0
  36. package/dist/lib/view-types/descriptors/timeline-view-type.d.ts.map +1 -0
  37. package/dist/lib/view-types/descriptors/timeline-view-type.js +40 -0
  38. package/dist/lib/view-types/descriptors/timeline-view-type.js.map +1 -0
  39. package/dist/lib/view-types/index.d.ts +20 -0
  40. package/dist/lib/view-types/index.d.ts.map +1 -0
  41. package/dist/lib/view-types/index.js +29 -0
  42. package/dist/lib/view-types/index.js.map +1 -0
  43. package/dist/lib/view-types/renderers/cards-view-renderer.component.d.ts +93 -0
  44. package/dist/lib/view-types/renderers/cards-view-renderer.component.d.ts.map +1 -0
  45. package/dist/lib/view-types/renderers/cards-view-renderer.component.js +144 -0
  46. package/dist/lib/view-types/renderers/cards-view-renderer.component.js.map +1 -0
  47. package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts +273 -0
  48. package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts.map +1 -0
  49. package/dist/lib/view-types/renderers/grid-view-renderer.component.js +558 -0
  50. package/dist/lib/view-types/renderers/grid-view-renderer.component.js.map +1 -0
  51. package/dist/lib/view-types/renderers/map-view-renderer.component.d.ts +135 -0
  52. package/dist/lib/view-types/renderers/map-view-renderer.component.d.ts.map +1 -0
  53. package/dist/lib/view-types/renderers/map-view-renderer.component.js +216 -0
  54. package/dist/lib/view-types/renderers/map-view-renderer.component.js.map +1 -0
  55. package/dist/lib/view-types/renderers/timeline-view-renderer.component.d.ts +176 -0
  56. package/dist/lib/view-types/renderers/timeline-view-renderer.component.d.ts.map +1 -0
  57. package/dist/lib/view-types/renderers/timeline-view-renderer.component.js +535 -0
  58. package/dist/lib/view-types/renderers/timeline-view-renderer.component.js.map +1 -0
  59. package/dist/lib/view-types/view-type.contracts.d.ts +235 -0
  60. package/dist/lib/view-types/view-type.contracts.d.ts.map +1 -0
  61. package/dist/lib/view-types/view-type.contracts.js +51 -0
  62. package/dist/lib/view-types/view-type.contracts.js.map +1 -0
  63. package/dist/lib/view-types/view-type.engine.d.ts +76 -0
  64. package/dist/lib/view-types/view-type.engine.d.ts.map +1 -0
  65. package/dist/lib/view-types/view-type.engine.js +138 -0
  66. package/dist/lib/view-types/view-type.engine.js.map +1 -0
  67. package/dist/lib/view-workspace/view-workspace.component.d.ts +451 -0
  68. package/dist/lib/view-workspace/view-workspace.component.d.ts.map +1 -0
  69. package/dist/lib/view-workspace/view-workspace.component.js +1212 -0
  70. package/dist/lib/view-workspace/view-workspace.component.js.map +1 -0
  71. package/dist/module.d.ts +20 -11
  72. package/dist/module.d.ts.map +1 -1
  73. package/dist/module.js +50 -8
  74. package/dist/module.js.map +1 -1
  75. package/dist/public-api.d.ts +8 -0
  76. package/dist/public-api.d.ts.map +1 -1
  77. package/dist/public-api.js +14 -0
  78. package/dist/public-api.js.map +1 -1
  79. package/package.json +16 -15
@@ -0,0 +1,35 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { RegisterClass } from '@memberjunction/global';
8
+ import { BaseViewTypeDescriptor } from '../view-type.contracts';
9
+ import { MapViewRendererComponent } from '../renderers/map-view-renderer.component';
10
+ /**
11
+ * Map view type — renders geocoded records as markers on an interactive map. Available
12
+ * only for entities that support geocoding (lifted from the host's `updateGeoCodingSupport`
13
+ * logic, which checks `entity.SupportsGeoCoding`).
14
+ *
15
+ * Registration key (`DriverClass`) matches the `MJ: View Types` metadata seed:
16
+ * `metadata/view-types/.view-types.json` → "MapViewType".
17
+ */
18
+ let MapViewType = class MapViewType extends BaseViewTypeDescriptor {
19
+ Name = 'MapViewType';
20
+ DisplayName = 'Map';
21
+ Icon = 'fa-solid fa-map-location-dot';
22
+ RendererComponent = MapViewRendererComponent;
23
+ IsAvailableFor(entity, _provider) {
24
+ return !!(entity && entity.SupportsGeoCoding);
25
+ }
26
+ };
27
+ MapViewType = __decorate([
28
+ RegisterClass(BaseViewTypeDescriptor, 'MapViewType')
29
+ ], MapViewType);
30
+ export { MapViewType };
31
+ /** Tree-shaking guard — call from a barrel/module to keep the registration alive. */
32
+ export function LoadMapViewType() {
33
+ // no-op
34
+ }
35
+ //# sourceMappingURL=map-view-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-view-type.js","sourceRoot":"","sources":["../../../../src/lib/view-types/descriptors/map-view-type.ts"],"names":[],"mappings":";;;;;;AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAEpF;;;;;;;GAOG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,sBAAsB;IAC5C,IAAI,GAAG,aAAa,CAAC;IACrB,WAAW,GAAG,KAAK,CAAC;IACpB,IAAI,GAAG,8BAA8B,CAAC;IACtC,iBAAiB,GAAkB,wBAAwB,CAAC;IAE5D,cAAc,CAAC,MAAkB,EAAE,SAA6B;QACvE,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;CACF,CAAA;AATY,WAAW;IADvB,aAAa,CAAC,sBAAsB,EAAE,aAAa,CAAC;GACxC,WAAW,CASvB;;AAED,qFAAqF;AACrF,MAAM,UAAU,eAAe;IAC7B,QAAQ;AACV,CAAC","sourcesContent":["import { Type } from '@angular/core';\nimport { EntityInfo, IMetadataProvider } from '@memberjunction/core';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseViewTypeDescriptor } from '../view-type.contracts';\nimport { MapViewRendererComponent } from '../renderers/map-view-renderer.component';\n\n/**\n * Map view type — renders geocoded records as markers on an interactive map. Available\n * only for entities that support geocoding (lifted from the host's `updateGeoCodingSupport`\n * logic, which checks `entity.SupportsGeoCoding`).\n *\n * Registration key (`DriverClass`) matches the `MJ: View Types` metadata seed:\n * `metadata/view-types/.view-types.json` → \"MapViewType\".\n */\n@RegisterClass(BaseViewTypeDescriptor, 'MapViewType')\nexport class MapViewType extends BaseViewTypeDescriptor {\n readonly Name = 'MapViewType';\n readonly DisplayName = 'Map';\n readonly Icon = 'fa-solid fa-map-location-dot';\n readonly RendererComponent: Type<unknown> = MapViewRendererComponent;\n\n override IsAvailableFor(entity: EntityInfo, _provider?: IMetadataProvider): boolean {\n return !!(entity && entity.SupportsGeoCoding);\n }\n}\n\n/** Tree-shaking guard — call from a barrel/module to keep the registration alive. */\nexport function LoadMapViewType(): void {\n // no-op\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { Type } from '@angular/core';
2
+ import { EntityInfo, IMetadataProvider } from '@memberjunction/core';
3
+ import { BaseViewTypeDescriptor } from '../view-type.contracts';
4
+ /**
5
+ * Timeline view type — plots records along a chronological axis. Available only for
6
+ * entities that expose at least one date field (lifted from the host's `detectDateFields`
7
+ * logic, which considers any field whose `TSType` is `Date`, including `__mj_CreatedAt` /
8
+ * `__mj_UpdatedAt`).
9
+ *
10
+ * Registration key (`DriverClass`) matches the `MJ: View Types` metadata seed:
11
+ * `metadata/view-types/.view-types.json` → "TimelineViewType".
12
+ */
13
+ export declare class TimelineViewType extends BaseViewTypeDescriptor {
14
+ readonly Name = "TimelineViewType";
15
+ readonly DisplayName = "Timeline";
16
+ readonly Icon = "fa-solid fa-timeline";
17
+ readonly RendererComponent: Type<unknown>;
18
+ IsAvailableFor(entity: EntityInfo, _provider?: IMetadataProvider): boolean;
19
+ }
20
+ /** Tree-shaking guard — call from a barrel/module to keep the registration alive. */
21
+ export declare function LoadTimelineViewType(): void;
22
+ //# sourceMappingURL=timeline-view-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-view-type.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/descriptors/timeline-view-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAqB,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAExF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;;;;;;;GAQG;AACH,qBACa,gBAAiB,SAAQ,sBAAsB;IAC1D,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,WAAW,cAAc;IAClC,QAAQ,CAAC,IAAI,0BAA0B;IACvC,QAAQ,CAAC,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAiC;IAEjE,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,iBAAiB,GAAG,OAAO;CAMpF;AAED,qFAAqF;AACrF,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
@@ -0,0 +1,40 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { EntityFieldTSType } from '@memberjunction/core';
8
+ import { RegisterClass } from '@memberjunction/global';
9
+ import { BaseViewTypeDescriptor } from '../view-type.contracts';
10
+ import { TimelineViewRendererComponent } from '../renderers/timeline-view-renderer.component';
11
+ /**
12
+ * Timeline view type — plots records along a chronological axis. Available only for
13
+ * entities that expose at least one date field (lifted from the host's `detectDateFields`
14
+ * logic, which considers any field whose `TSType` is `Date`, including `__mj_CreatedAt` /
15
+ * `__mj_UpdatedAt`).
16
+ *
17
+ * Registration key (`DriverClass`) matches the `MJ: View Types` metadata seed:
18
+ * `metadata/view-types/.view-types.json` → "TimelineViewType".
19
+ */
20
+ let TimelineViewType = class TimelineViewType extends BaseViewTypeDescriptor {
21
+ Name = 'TimelineViewType';
22
+ DisplayName = 'Timeline';
23
+ Icon = 'fa-solid fa-timeline';
24
+ RendererComponent = TimelineViewRendererComponent;
25
+ IsAvailableFor(entity, _provider) {
26
+ if (!entity) {
27
+ return false;
28
+ }
29
+ return entity.Fields.some(f => f.TSType === EntityFieldTSType.Date);
30
+ }
31
+ };
32
+ TimelineViewType = __decorate([
33
+ RegisterClass(BaseViewTypeDescriptor, 'TimelineViewType')
34
+ ], TimelineViewType);
35
+ export { TimelineViewType };
36
+ /** Tree-shaking guard — call from a barrel/module to keep the registration alive. */
37
+ export function LoadTimelineViewType() {
38
+ // no-op
39
+ }
40
+ //# sourceMappingURL=timeline-view-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-view-type.js","sourceRoot":"","sources":["../../../../src/lib/view-types/descriptors/timeline-view-type.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAc,iBAAiB,EAAqB,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAE9F;;;;;;;;GAQG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,sBAAsB;IACjD,IAAI,GAAG,kBAAkB,CAAC;IAC1B,WAAW,GAAG,UAAU,CAAC;IACzB,IAAI,GAAG,sBAAsB,CAAC;IAC9B,iBAAiB,GAAkB,6BAA6B,CAAC;IAEjE,cAAc,CAAC,MAAkB,EAAE,SAA6B;QACvE,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACtE,CAAC;CACF,CAAA;AAZY,gBAAgB;IAD5B,aAAa,CAAC,sBAAsB,EAAE,kBAAkB,CAAC;GAC7C,gBAAgB,CAY5B;;AAED,qFAAqF;AACrF,MAAM,UAAU,oBAAoB;IAClC,QAAQ;AACV,CAAC","sourcesContent":["import { Type } from '@angular/core';\nimport { EntityInfo, EntityFieldTSType, IMetadataProvider } from '@memberjunction/core';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseViewTypeDescriptor } from '../view-type.contracts';\nimport { TimelineViewRendererComponent } from '../renderers/timeline-view-renderer.component';\n\n/**\n * Timeline view type — plots records along a chronological axis. Available only for\n * entities that expose at least one date field (lifted from the host's `detectDateFields`\n * logic, which considers any field whose `TSType` is `Date`, including `__mj_CreatedAt` /\n * `__mj_UpdatedAt`).\n *\n * Registration key (`DriverClass`) matches the `MJ: View Types` metadata seed:\n * `metadata/view-types/.view-types.json` → \"TimelineViewType\".\n */\n@RegisterClass(BaseViewTypeDescriptor, 'TimelineViewType')\nexport class TimelineViewType extends BaseViewTypeDescriptor {\n readonly Name = 'TimelineViewType';\n readonly DisplayName = 'Timeline';\n readonly Icon = 'fa-solid fa-timeline';\n readonly RendererComponent: Type<unknown> = TimelineViewRendererComponent;\n\n override IsAvailableFor(entity: EntityInfo, _provider?: IMetadataProvider): boolean {\n if (!entity) {\n return false;\n }\n return entity.Fields.some(f => f.TSType === EntityFieldTSType.Date);\n }\n}\n\n/** Tree-shaking guard — call from a barrel/module to keep the registration alive. */\nexport function LoadTimelineViewType(): void {\n // no-op\n}\n"]}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * View-Type Plugin Architecture — public surface.
3
+ *
4
+ * Exports the contracts, the engine, and the four built-in descriptors, plus a single
5
+ * {@link LoadViewTypeDescriptors} guard that force-references every concrete descriptor so
6
+ * bundlers (ESBuild/Vite) don't tree-shake their `@RegisterClass` side effects away.
7
+ */
8
+ export * from './view-type.contracts';
9
+ export * from './view-type.engine';
10
+ export * from './descriptors/grid-view-type';
11
+ export * from './descriptors/cards-view-type';
12
+ export * from './descriptors/timeline-view-type';
13
+ export * from './descriptors/map-view-type';
14
+ /**
15
+ * Tree-shaking guard. Call this once (e.g. from the EntityViewer module or a host
16
+ * bootstrap) to guarantee all four built-in view-type descriptors register themselves
17
+ * with the ClassFactory. Safe to call multiple times.
18
+ */
19
+ export declare function LoadViewTypeDescriptors(): void;
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/view-types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAO5C;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAK9C"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * View-Type Plugin Architecture — public surface.
3
+ *
4
+ * Exports the contracts, the engine, and the four built-in descriptors, plus a single
5
+ * {@link LoadViewTypeDescriptors} guard that force-references every concrete descriptor so
6
+ * bundlers (ESBuild/Vite) don't tree-shake their `@RegisterClass` side effects away.
7
+ */
8
+ export * from './view-type.contracts';
9
+ export * from './view-type.engine';
10
+ export * from './descriptors/grid-view-type';
11
+ export * from './descriptors/cards-view-type';
12
+ export * from './descriptors/timeline-view-type';
13
+ export * from './descriptors/map-view-type';
14
+ import { LoadGridViewType } from './descriptors/grid-view-type';
15
+ import { LoadCardsViewType } from './descriptors/cards-view-type';
16
+ import { LoadTimelineViewType } from './descriptors/timeline-view-type';
17
+ import { LoadMapViewType } from './descriptors/map-view-type';
18
+ /**
19
+ * Tree-shaking guard. Call this once (e.g. from the EntityViewer module or a host
20
+ * bootstrap) to guarantee all four built-in view-type descriptors register themselves
21
+ * with the ClassFactory. Safe to call multiple times.
22
+ */
23
+ export function LoadViewTypeDescriptors() {
24
+ LoadGridViewType();
25
+ LoadCardsViewType();
26
+ LoadTimelineViewType();
27
+ LoadMapViewType();
28
+ }
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/view-types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D;;;;GAIG;AACH,MAAM,UAAU,uBAAuB;IACrC,gBAAgB,EAAE,CAAC;IACnB,iBAAiB,EAAE,CAAC;IACpB,oBAAoB,EAAE,CAAC;IACvB,eAAe,EAAE,CAAC;AACpB,CAAC","sourcesContent":["/**\n * View-Type Plugin Architecture — public surface.\n *\n * Exports the contracts, the engine, and the four built-in descriptors, plus a single\n * {@link LoadViewTypeDescriptors} guard that force-references every concrete descriptor so\n * bundlers (ESBuild/Vite) don't tree-shake their `@RegisterClass` side effects away.\n */\nexport * from './view-type.contracts';\nexport * from './view-type.engine';\n\nexport * from './descriptors/grid-view-type';\nexport * from './descriptors/cards-view-type';\nexport * from './descriptors/timeline-view-type';\nexport * from './descriptors/map-view-type';\n\nimport { LoadGridViewType } from './descriptors/grid-view-type';\nimport { LoadCardsViewType } from './descriptors/cards-view-type';\nimport { LoadTimelineViewType } from './descriptors/timeline-view-type';\nimport { LoadMapViewType } from './descriptors/map-view-type';\n\n/**\n * Tree-shaking guard. Call this once (e.g. from the EntityViewer module or a host\n * bootstrap) to guarantee all four built-in view-type descriptors register themselves\n * with the ClassFactory. Safe to call multiple times.\n */\nexport function LoadViewTypeDescriptors(): void {\n LoadGridViewType();\n LoadCardsViewType();\n LoadTimelineViewType();\n LoadMapViewType();\n}\n"]}
@@ -0,0 +1,93 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { EntityInfo } from '@memberjunction/core';
3
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
4
+ import { IViewRenderer } from '../view-type.contracts';
5
+ import { CardTemplate, RecordSelectedEvent, RecordOpenedEvent } from '../../types';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * CardsViewRendererComponent
9
+ * --------------------------
10
+ * The Cards **view type** renderer — a thin {@link IViewRenderer} adapter that hosts the
11
+ * existing {@link EntityCardsComponent} (`<mj-entity-cards>`) inside the entity-viewer's
12
+ * pluggable view-type system. It is the dynamic-mounted plug-in that the `CardsViewType`
13
+ * descriptor points at, replacing the descriptor's previous direct reference to
14
+ * `EntityCardsComponent` (which did not honor the {@link IViewRenderer} contract).
15
+ *
16
+ * The host feeds the standard renderer inputs (`entity` / `records` / `selectedRecordId` /
17
+ * `filterText` / `config`) via `setInput` and listens for `recordSelected` / `recordOpened`.
18
+ * Two extra inputs (`cardTemplate`, `hiddenFieldMatches`) reproduce the host-level bindings
19
+ * that `<mj-entity-cards>` was previously given directly in `entity-viewer.component.html` —
20
+ * the host sets them via a guarded `setInput`.
21
+ *
22
+ * **Payload normalization:** `<mj-entity-cards>` emits the rich {@link RecordSelectedEvent} /
23
+ * {@link RecordOpenedEvent} objects (`{ record, entity, compositeKey }`), but the host's
24
+ * dynamic renderer handler expects the **raw record** and builds the composite key itself.
25
+ * This adapter therefore extracts `.record` and re-emits just that object, matching the
26
+ * other plug-in renderers (e.g. the Cluster renderer emits raw record objects).
27
+ *
28
+ * This is an NgModule-declared (`standalone: false`) component, declared in `EntityViewerModule`
29
+ * alongside {@link EntityCardsComponent} — so it renders `<mj-entity-cards>` directly from the
30
+ * module's compilation scope with no `imports` array and no self-import of the module (the module
31
+ * loads the view-type descriptors, which reference these wrappers, so a wrapper importing the
32
+ * module back would form a runtime import cycle — NG0919).
33
+ *
34
+ * Inputs use the camelCase names mandated by the {@link IViewRenderer} contract (the host
35
+ * binds them by those exact names via `setInput`), rather than MJ's usual PascalCase for public
36
+ * members — mirroring the Cluster renderer.
37
+ */
38
+ export declare class CardsViewRendererComponent extends BaseAngularComponent implements IViewRenderer<Record<string, unknown>> {
39
+ /** The entity whose records are being rendered. */
40
+ entity: EntityInfo | null;
41
+ /** The records to render (already loaded/filtered by the host). */
42
+ records: Record<string, unknown>[];
43
+ /** Primary-key string of the currently selected record, if any. */
44
+ selectedRecordId: string | null;
45
+ /** Active filter text (used by the cards view for match highlighting). */
46
+ filterText: string | null;
47
+ /**
48
+ * View-type-specific configuration. Cards has no per-view config — this is accepted to
49
+ * satisfy the {@link IViewRenderer} contract and is otherwise unused (no-op).
50
+ */
51
+ config: Record<string, unknown>;
52
+ /**
53
+ * Optional custom card template. This is host-level configuration (not stored in the view
54
+ * type's `config`), so the host sets it via a guarded `setInput`. Type matches
55
+ * {@link EntityCardsComponent.cardTemplate}.
56
+ */
57
+ cardTemplate: CardTemplate | null;
58
+ /**
59
+ * Optional map of record primary-key strings → hidden field names that matched the active
60
+ * filter, used by the cards view to flag matches in non-visible fields. Host-level config,
61
+ * set by the host via a guarded `setInput`. Type matches
62
+ * {@link EntityCardsComponent.hiddenFieldMatches}.
63
+ */
64
+ hiddenFieldMatches: Map<string, string>;
65
+ /** Emitted when a record is selected (single click) — payload is the raw record object. */
66
+ recordSelected: EventEmitter<unknown>;
67
+ /** Emitted when a record should be opened (double-click / open) — payload is the raw record object. */
68
+ recordOpened: EventEmitter<unknown>;
69
+ /**
70
+ * Required by {@link IViewRenderer}; the cards view never mutates its own config, so this
71
+ * never emits. Declared so the host's uniform output subscription is satisfied.
72
+ */
73
+ configChanged: EventEmitter<Record<string, unknown>>;
74
+ /**
75
+ * Relay `<mj-entity-cards>`'s selection event, normalizing to the raw record the host
76
+ * expects (the host builds the composite key itself).
77
+ */
78
+ onRecordSelected(event: RecordSelectedEvent): void;
79
+ /**
80
+ * Relay `<mj-entity-cards>`'s open event, normalizing to the raw record the host expects
81
+ * (the host builds the composite key itself).
82
+ */
83
+ onRecordOpened(event: RecordOpenedEvent): void;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<CardsViewRendererComponent, never>;
85
+ static ɵcmp: i0.ɵɵComponentDeclaration<CardsViewRendererComponent, "mj-cards-view-renderer", never, { "entity": { "alias": "entity"; "required": false; }; "records": { "alias": "records"; "required": false; }; "selectedRecordId": { "alias": "selectedRecordId"; "required": false; }; "filterText": { "alias": "filterText"; "required": false; }; "config": { "alias": "config"; "required": false; }; "cardTemplate": { "alias": "cardTemplate"; "required": false; }; "hiddenFieldMatches": { "alias": "hiddenFieldMatches"; "required": false; }; }, { "recordSelected": "recordSelected"; "recordOpened": "recordOpened"; "configChanged": "configChanged"; }, never, never, false, never>;
86
+ }
87
+ /**
88
+ * Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the
89
+ * component in builds that only mount it dynamically via the ClassFactory/descriptor. Mirrors
90
+ * the Cluster renderer's load guard; the parent wires this into a barrel/module load path.
91
+ */
92
+ export declare function LoadCardsViewRenderer(): void;
93
+ //# sourceMappingURL=cards-view-renderer.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards-view-renderer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/cards-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAqB,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;;AAGnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBA2Ba,0BAA2B,SAAQ,oBAAqB,YAAW,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGpH,mDAAmD;IAC1C,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;IAE1C,mEAAmE;IAC1D,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAM;IAEjD,mEAAmE;IAC1D,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEhD,0EAA0E;IACjE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE1C;;;OAGG;IACM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IAI9C;;;;OAIG;IACM,YAAY,EAAE,YAAY,GAAG,IAAI,CAAQ;IAElD;;;;;OAKG;IACM,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAa;IAI7D,2FAA2F;IACjF,cAAc,wBAA+B;IAEvD,uGAAuG;IAC7F,YAAY,wBAA+B;IAErD;;;OAGG;IACO,aAAa,wCAA+C;IAEtE;;;OAGG;IACH,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAIlD;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;yCAhEnC,0BAA0B;2CAA1B,0BAA0B;CAmEtC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C"}
@@ -0,0 +1,144 @@
1
+ import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
2
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "../../entity-cards/entity-cards.component";
5
+ /**
6
+ * CardsViewRendererComponent
7
+ * --------------------------
8
+ * The Cards **view type** renderer — a thin {@link IViewRenderer} adapter that hosts the
9
+ * existing {@link EntityCardsComponent} (`<mj-entity-cards>`) inside the entity-viewer's
10
+ * pluggable view-type system. It is the dynamic-mounted plug-in that the `CardsViewType`
11
+ * descriptor points at, replacing the descriptor's previous direct reference to
12
+ * `EntityCardsComponent` (which did not honor the {@link IViewRenderer} contract).
13
+ *
14
+ * The host feeds the standard renderer inputs (`entity` / `records` / `selectedRecordId` /
15
+ * `filterText` / `config`) via `setInput` and listens for `recordSelected` / `recordOpened`.
16
+ * Two extra inputs (`cardTemplate`, `hiddenFieldMatches`) reproduce the host-level bindings
17
+ * that `<mj-entity-cards>` was previously given directly in `entity-viewer.component.html` —
18
+ * the host sets them via a guarded `setInput`.
19
+ *
20
+ * **Payload normalization:** `<mj-entity-cards>` emits the rich {@link RecordSelectedEvent} /
21
+ * {@link RecordOpenedEvent} objects (`{ record, entity, compositeKey }`), but the host's
22
+ * dynamic renderer handler expects the **raw record** and builds the composite key itself.
23
+ * This adapter therefore extracts `.record` and re-emits just that object, matching the
24
+ * other plug-in renderers (e.g. the Cluster renderer emits raw record objects).
25
+ *
26
+ * This is an NgModule-declared (`standalone: false`) component, declared in `EntityViewerModule`
27
+ * alongside {@link EntityCardsComponent} — so it renders `<mj-entity-cards>` directly from the
28
+ * module's compilation scope with no `imports` array and no self-import of the module (the module
29
+ * loads the view-type descriptors, which reference these wrappers, so a wrapper importing the
30
+ * module back would form a runtime import cycle — NG0919).
31
+ *
32
+ * Inputs use the camelCase names mandated by the {@link IViewRenderer} contract (the host
33
+ * binds them by those exact names via `setInput`), rather than MJ's usual PascalCase for public
34
+ * members — mirroring the Cluster renderer.
35
+ */
36
+ export class CardsViewRendererComponent extends BaseAngularComponent {
37
+ // ---- IViewRenderer inputs (camelCase per the host contract) ----
38
+ /** The entity whose records are being rendered. */
39
+ entity = null;
40
+ /** The records to render (already loaded/filtered by the host). */
41
+ records = [];
42
+ /** Primary-key string of the currently selected record, if any. */
43
+ selectedRecordId = null;
44
+ /** Active filter text (used by the cards view for match highlighting). */
45
+ filterText = null;
46
+ /**
47
+ * View-type-specific configuration. Cards has no per-view config — this is accepted to
48
+ * satisfy the {@link IViewRenderer} contract and is otherwise unused (no-op).
49
+ */
50
+ config = {};
51
+ // ---- Host-level inputs for <mj-entity-cards> (not per-view config) ----
52
+ /**
53
+ * Optional custom card template. This is host-level configuration (not stored in the view
54
+ * type's `config`), so the host sets it via a guarded `setInput`. Type matches
55
+ * {@link EntityCardsComponent.cardTemplate}.
56
+ */
57
+ cardTemplate = null;
58
+ /**
59
+ * Optional map of record primary-key strings → hidden field names that matched the active
60
+ * filter, used by the cards view to flag matches in non-visible fields. Host-level config,
61
+ * set by the host via a guarded `setInput`. Type matches
62
+ * {@link EntityCardsComponent.hiddenFieldMatches}.
63
+ */
64
+ hiddenFieldMatches = new Map();
65
+ // ---- IViewRenderer outputs ----
66
+ /** Emitted when a record is selected (single click) — payload is the raw record object. */
67
+ recordSelected = new EventEmitter();
68
+ /** Emitted when a record should be opened (double-click / open) — payload is the raw record object. */
69
+ recordOpened = new EventEmitter();
70
+ /**
71
+ * Required by {@link IViewRenderer}; the cards view never mutates its own config, so this
72
+ * never emits. Declared so the host's uniform output subscription is satisfied.
73
+ */
74
+ configChanged = new EventEmitter();
75
+ /**
76
+ * Relay `<mj-entity-cards>`'s selection event, normalizing to the raw record the host
77
+ * expects (the host builds the composite key itself).
78
+ */
79
+ onRecordSelected(event) {
80
+ this.recordSelected.emit(event.record);
81
+ }
82
+ /**
83
+ * Relay `<mj-entity-cards>`'s open event, normalizing to the raw record the host expects
84
+ * (the host builds the composite key itself).
85
+ */
86
+ onRecordOpened(event) {
87
+ this.recordOpened.emit(event.record);
88
+ }
89
+ static ɵfac = /*@__PURE__*/ (() => { let ɵCardsViewRendererComponent_BaseFactory; return function CardsViewRendererComponent_Factory(__ngFactoryType__) { return (ɵCardsViewRendererComponent_BaseFactory || (ɵCardsViewRendererComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardsViewRendererComponent)))(__ngFactoryType__ || CardsViewRendererComponent); }; })();
90
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardsViewRendererComponent, selectors: [["mj-cards-view-renderer"]], inputs: { entity: "entity", records: "records", selectedRecordId: "selectedRecordId", filterText: "filterText", config: "config", cardTemplate: "cardTemplate", hiddenFieldMatches: "hiddenFieldMatches" }, outputs: { recordSelected: "recordSelected", recordOpened: "recordOpened", configChanged: "configChanged" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 7, consts: [[3, "recordSelected", "recordOpened", "Provider", "entity", "records", "selectedRecordId", "cardTemplate", "hiddenFieldMatches", "filterText"]], template: function CardsViewRendererComponent_Template(rf, ctx) { if (rf & 1) {
91
+ i0.ɵɵelementStart(0, "mj-entity-cards", 0);
92
+ i0.ɵɵlistener("recordSelected", function CardsViewRendererComponent_Template_mj_entity_cards_recordSelected_0_listener($event) { return ctx.onRecordSelected($event); })("recordOpened", function CardsViewRendererComponent_Template_mj_entity_cards_recordOpened_0_listener($event) { return ctx.onRecordOpened($event); });
93
+ i0.ɵɵelementEnd();
94
+ } if (rf & 2) {
95
+ i0.ɵɵproperty("Provider", ctx.Provider)("entity", ctx.entity)("records", ctx.records)("selectedRecordId", ctx.selectedRecordId)("cardTemplate", ctx.cardTemplate)("hiddenFieldMatches", ctx.hiddenFieldMatches)("filterText", ctx.filterText ?? "");
96
+ } }, dependencies: [i1.EntityCardsComponent], styles: ["\n :host {\n display: block;\n height: 100%;\n }\n "], encapsulation: 2 });
97
+ }
98
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CardsViewRendererComponent, [{
99
+ type: Component,
100
+ args: [{ standalone: false, selector: 'mj-cards-view-renderer', encapsulation: ViewEncapsulation.None, template: `
101
+ <mj-entity-cards
102
+ [Provider]="Provider"
103
+ [entity]="entity"
104
+ [records]="records"
105
+ [selectedRecordId]="selectedRecordId"
106
+ [cardTemplate]="cardTemplate"
107
+ [hiddenFieldMatches]="hiddenFieldMatches"
108
+ [filterText]="filterText ?? ''"
109
+ (recordSelected)="onRecordSelected($event)"
110
+ (recordOpened)="onRecordOpened($event)"
111
+ >
112
+ </mj-entity-cards>
113
+ `, styles: ["\n :host {\n display: block;\n height: 100%;\n }\n "] }]
114
+ }], null, { entity: [{
115
+ type: Input
116
+ }], records: [{
117
+ type: Input
118
+ }], selectedRecordId: [{
119
+ type: Input
120
+ }], filterText: [{
121
+ type: Input
122
+ }], config: [{
123
+ type: Input
124
+ }], cardTemplate: [{
125
+ type: Input
126
+ }], hiddenFieldMatches: [{
127
+ type: Input
128
+ }], recordSelected: [{
129
+ type: Output
130
+ }], recordOpened: [{
131
+ type: Output
132
+ }], configChanged: [{
133
+ type: Output
134
+ }] }); })();
135
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardsViewRendererComponent, { className: "CardsViewRendererComponent", filePath: "src/lib/view-types/renderers/cards-view-renderer.component.ts", lineNumber: 66 }); })();
136
+ /**
137
+ * Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the
138
+ * component in builds that only mount it dynamically via the ClassFactory/descriptor. Mirrors
139
+ * the Cluster renderer's load guard; the parent wires this into a barrel/module load path.
140
+ */
141
+ export function LoadCardsViewRenderer() {
142
+ // no-op; presence prevents tree-shaking of this component
143
+ }
144
+ //# sourceMappingURL=cards-view-renderer.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards-view-renderer.component.js","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/cards-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;AAKrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AA4BH,MAAM,OAAO,0BAA2B,SAAQ,oBAAoB;IAClE,mEAAmE;IAEnE,mDAAmD;IAC1C,MAAM,GAAsB,IAAI,CAAC;IAE1C,mEAAmE;IAC1D,OAAO,GAA8B,EAAE,CAAC;IAEjD,mEAAmE;IAC1D,gBAAgB,GAAkB,IAAI,CAAC;IAEhD,0EAA0E;IACjE,UAAU,GAAkB,IAAI,CAAC;IAE1C;;;OAGG;IACM,MAAM,GAA4B,EAAE,CAAC;IAE9C,0EAA0E;IAE1E;;;;OAIG;IACM,YAAY,GAAwB,IAAI,CAAC;IAElD;;;;;OAKG;IACM,kBAAkB,GAAwB,IAAI,GAAG,EAAE,CAAC;IAE7D,kCAAkC;IAElC,2FAA2F;IACjF,cAAc,GAAG,IAAI,YAAY,EAAW,CAAC;IAEvD,uGAAuG;IAC7F,YAAY,GAAG,IAAI,YAAY,EAAW,CAAC;IAErD;;;OAGG;IACO,aAAa,GAAG,IAAI,YAAY,EAA2B,CAAC;IAEtE;;;OAGG;IACH,gBAAgB,CAAC,KAA0B;QACzC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;;OAGG;IACH,cAAc,CAAC,KAAwB;QACrC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;qRAlEU,0BAA0B,yBAA1B,0BAA0B;6DAA1B,0BAA0B;YAtBnC,0CAUC;YADC,AADA,wIAAkB,4BAAwB,IAAC,uHAC3B,0BAAsB,IAAC;YAEzC,iBAAkB;;YAJhB,AADA,AADA,AADA,AADA,AADA,AADA,uCAAqB,sBACJ,wBACE,0CACkB,kCACR,8CACY,oCACV;;;iFAexB,0BAA0B;cA3BtC,SAAS;6BACI,KAAK,YACP,wBAAwB,iBACnB,iBAAiB,CAAC,IAAI,YAC3B;;;;;;;;;;;;;GAaT;;kBAcA,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAML,KAAK;;kBASL,KAAK;;kBAQL,KAAK;;kBAKL,MAAM;;kBAGN,MAAM;;kBAMN,MAAM;;kFAlDI,0BAA0B;AAqEvC;;;;GAIG;AACH,MAAM,UAAU,qBAAqB;IACnC,0DAA0D;AAC5D,CAAC","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';\nimport { EntityInfo } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { IViewRenderer } from '../view-type.contracts';\nimport { CardTemplate, RecordSelectedEvent, RecordOpenedEvent } from '../../types';\nimport { EntityCardsComponent } from '../../entity-cards/entity-cards.component';\n\n/**\n * CardsViewRendererComponent\n * --------------------------\n * The Cards **view type** renderer — a thin {@link IViewRenderer} adapter that hosts the\n * existing {@link EntityCardsComponent} (`<mj-entity-cards>`) inside the entity-viewer's\n * pluggable view-type system. It is the dynamic-mounted plug-in that the `CardsViewType`\n * descriptor points at, replacing the descriptor's previous direct reference to\n * `EntityCardsComponent` (which did not honor the {@link IViewRenderer} contract).\n *\n * The host feeds the standard renderer inputs (`entity` / `records` / `selectedRecordId` /\n * `filterText` / `config`) via `setInput` and listens for `recordSelected` / `recordOpened`.\n * Two extra inputs (`cardTemplate`, `hiddenFieldMatches`) reproduce the host-level bindings\n * that `<mj-entity-cards>` was previously given directly in `entity-viewer.component.html` —\n * the host sets them via a guarded `setInput`.\n *\n * **Payload normalization:** `<mj-entity-cards>` emits the rich {@link RecordSelectedEvent} /\n * {@link RecordOpenedEvent} objects (`{ record, entity, compositeKey }`), but the host's\n * dynamic renderer handler expects the **raw record** and builds the composite key itself.\n * This adapter therefore extracts `.record` and re-emits just that object, matching the\n * other plug-in renderers (e.g. the Cluster renderer emits raw record objects).\n *\n * This is an NgModule-declared (`standalone: false`) component, declared in `EntityViewerModule`\n * alongside {@link EntityCardsComponent} — so it renders `<mj-entity-cards>` directly from the\n * module's compilation scope with no `imports` array and no self-import of the module (the module\n * loads the view-type descriptors, which reference these wrappers, so a wrapper importing the\n * module back would form a runtime import cycle — NG0919).\n *\n * Inputs use the camelCase names mandated by the {@link IViewRenderer} contract (the host\n * binds them by those exact names via `setInput`), rather than MJ's usual PascalCase for public\n * members — mirroring the Cluster renderer.\n */\n@Component({\n standalone: false,\n selector: 'mj-cards-view-renderer',\n encapsulation: ViewEncapsulation.None,\n template: `\n <mj-entity-cards\n [Provider]=\"Provider\"\n [entity]=\"entity\"\n [records]=\"records\"\n [selectedRecordId]=\"selectedRecordId\"\n [cardTemplate]=\"cardTemplate\"\n [hiddenFieldMatches]=\"hiddenFieldMatches\"\n [filterText]=\"filterText ?? ''\"\n (recordSelected)=\"onRecordSelected($event)\"\n (recordOpened)=\"onRecordOpened($event)\"\n >\n </mj-entity-cards>\n `,\n styles: [\n `\n :host {\n display: block;\n height: 100%;\n }\n `,\n ],\n})\nexport class CardsViewRendererComponent extends BaseAngularComponent implements IViewRenderer<Record<string, unknown>> {\n // ---- IViewRenderer inputs (camelCase per the host contract) ----\n\n /** The entity whose records are being rendered. */\n @Input() entity: EntityInfo | null = null;\n\n /** The records to render (already loaded/filtered by the host). */\n @Input() records: Record<string, unknown>[] = [];\n\n /** Primary-key string of the currently selected record, if any. */\n @Input() selectedRecordId: string | null = null;\n\n /** Active filter text (used by the cards view for match highlighting). */\n @Input() filterText: string | null = null;\n\n /**\n * View-type-specific configuration. Cards has no per-view config — this is accepted to\n * satisfy the {@link IViewRenderer} contract and is otherwise unused (no-op).\n */\n @Input() config: Record<string, unknown> = {};\n\n // ---- Host-level inputs for <mj-entity-cards> (not per-view config) ----\n\n /**\n * Optional custom card template. This is host-level configuration (not stored in the view\n * type's `config`), so the host sets it via a guarded `setInput`. Type matches\n * {@link EntityCardsComponent.cardTemplate}.\n */\n @Input() cardTemplate: CardTemplate | null = null;\n\n /**\n * Optional map of record primary-key strings → hidden field names that matched the active\n * filter, used by the cards view to flag matches in non-visible fields. Host-level config,\n * set by the host via a guarded `setInput`. Type matches\n * {@link EntityCardsComponent.hiddenFieldMatches}.\n */\n @Input() hiddenFieldMatches: Map<string, string> = new Map();\n\n // ---- IViewRenderer outputs ----\n\n /** Emitted when a record is selected (single click) — payload is the raw record object. */\n @Output() recordSelected = new EventEmitter<unknown>();\n\n /** Emitted when a record should be opened (double-click / open) — payload is the raw record object. */\n @Output() recordOpened = new EventEmitter<unknown>();\n\n /**\n * Required by {@link IViewRenderer}; the cards view never mutates its own config, so this\n * never emits. Declared so the host's uniform output subscription is satisfied.\n */\n @Output() configChanged = new EventEmitter<Record<string, unknown>>();\n\n /**\n * Relay `<mj-entity-cards>`'s selection event, normalizing to the raw record the host\n * expects (the host builds the composite key itself).\n */\n onRecordSelected(event: RecordSelectedEvent): void {\n this.recordSelected.emit(event.record);\n }\n\n /**\n * Relay `<mj-entity-cards>`'s open event, normalizing to the raw record the host expects\n * (the host builds the composite key itself).\n */\n onRecordOpened(event: RecordOpenedEvent): void {\n this.recordOpened.emit(event.record);\n }\n}\n\n/**\n * Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the\n * component in builds that only mount it dynamically via the ClassFactory/descriptor. Mirrors\n * the Cluster renderer's load guard; the parent wires this into a barrel/module load path.\n */\nexport function LoadCardsViewRenderer(): void {\n // no-op; presence prevents tree-shaking of this component\n}\n"]}