@memberjunction/ng-dashboards 6.1.0-edge.0 → 6.1.0-edge.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.d.ts +3 -3
- package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.js +8 -2
- package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.js.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +7 -7
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +21 -21
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
- package/dist/AI/components/autotagging/components/classify-item-grid.component.js +3 -3
- package/dist/AI/components/autotagging/components/classify-item-grid.component.js.map +1 -1
- package/dist/AI/components/autotagging/shared/classify.format.d.ts +1 -1
- package/dist/AI/components/autotagging/shared/classify.format.d.ts.map +1 -1
- package/dist/AI/components/autotagging/shared/classify.format.js +1 -1
- package/dist/AI/components/autotagging/shared/classify.format.js.map +1 -1
- package/dist/AI/components/autotagging/shared/classify.types.d.ts +6 -6
- package/dist/AI/components/autotagging/shared/classify.types.d.ts.map +1 -1
- package/dist/AI/components/autotagging/shared/classify.types.js.map +1 -1
- package/dist/AI/components/autotagging/tabs/sources-tab.component.d.ts +14 -19
- package/dist/AI/components/autotagging/tabs/sources-tab.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js +53 -77
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.d.ts +15 -20
- package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +51 -77
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts +1 -3
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +22 -43
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-card.component.js +6 -6
- package/dist/Actions/components/explorer/action-card.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-list-item.component.js +3 -3
- package/dist/Actions/components/explorer/action-list-item.component.js.map +1 -1
- package/dist/Actions/index.d.ts +0 -1
- package/dist/Actions/index.d.ts.map +1 -1
- package/dist/Actions/index.js +0 -1
- package/dist/Actions/index.js.map +1 -1
- package/dist/Admin/admin-dev-tools-resource.component.d.ts.map +1 -1
- package/dist/Admin/admin-dev-tools-resource.component.js +14 -0
- package/dist/Admin/admin-dev-tools-resource.component.js.map +1 -1
- package/dist/DevTools/grid-width-lab.component.d.ts +78 -0
- package/dist/DevTools/grid-width-lab.component.d.ts.map +1 -0
- package/dist/DevTools/grid-width-lab.component.js +248 -0
- package/dist/DevTools/grid-width-lab.component.js.map +1 -0
- package/dist/DevTools/index.d.ts +2 -0
- package/dist/DevTools/index.d.ts.map +1 -1
- package/dist/DevTools/index.js +2 -0
- package/dist/DevTools/index.js.map +1 -1
- package/dist/DevTools/tab-strip-lab.component.d.ts +76 -0
- package/dist/DevTools/tab-strip-lab.component.d.ts.map +1 -0
- package/dist/DevTools/tab-strip-lab.component.js +247 -0
- package/dist/DevTools/tab-strip-lab.component.js.map +1 -0
- package/dist/Home/home-dashboard.component.d.ts.map +1 -1
- package/dist/Home/home-dashboard.component.js +0 -6
- package/dist/Home/home-dashboard.component.js.map +1 -1
- package/dist/Integration/components/activity/activity.component.d.ts +4 -4
- package/dist/Integration/components/activity/activity.component.d.ts.map +1 -1
- package/dist/Integration/components/activity/activity.component.js.map +1 -1
- package/dist/Integration/components/mapping-workspace/mapping-workspace.component.d.ts +1 -1
- package/dist/Integration/components/mapping-workspace/mapping-workspace.component.d.ts.map +1 -1
- package/dist/Integration/components/mapping-workspace/mapping-workspace.component.js.map +1 -1
- package/dist/Integration/components/overview/overview.component.d.ts +2 -1
- package/dist/Integration/components/overview/overview.component.d.ts.map +1 -1
- package/dist/Integration/components/overview/overview.component.js +7 -3
- package/dist/Integration/components/overview/overview.component.js.map +1 -1
- package/dist/Integration/components/pipelines/pipelines.component.d.ts +3 -3
- package/dist/Integration/components/pipelines/pipelines.component.d.ts.map +1 -1
- package/dist/Integration/components/pipelines/pipelines.component.js.map +1 -1
- package/dist/Integration/components/visual-editor/visual-editor.component.d.ts +3 -3
- package/dist/Integration/components/visual-editor/visual-editor.component.d.ts.map +1 -1
- package/dist/Integration/components/visual-editor/visual-editor.component.js.map +1 -1
- package/dist/Integration/components/widgets/run-history-panel.component.d.ts +1 -1
- package/dist/Integration/components/widgets/run-history-panel.component.d.ts.map +1 -1
- package/dist/Integration/components/widgets/run-history-panel.component.js.map +1 -1
- package/dist/Integration/services/integration-data.service.d.ts +8 -8
- package/dist/Integration/services/integration-data.service.d.ts.map +1 -1
- package/dist/Integration/services/integration-data.service.js +2 -1
- package/dist/Integration/services/integration-data.service.js.map +1 -1
- package/dist/KnowledgeHub/components/analytics/analytics-resource.component.d.ts.map +1 -1
- package/dist/KnowledgeHub/components/analytics/analytics-resource.component.js +5 -15
- package/dist/KnowledgeHub/components/analytics/analytics-resource.component.js.map +1 -1
- package/dist/Testing/components/testing-explorer.component.d.ts +9 -0
- package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-explorer.component.js +28 -5
- package/dist/Testing/components/testing-explorer.component.js.map +1 -1
- package/dist/VersionHistory/components/labels-resource.component.d.ts.map +1 -1
- package/dist/VersionHistory/components/labels-resource.component.js +7 -4
- package/dist/VersionHistory/components/labels-resource.component.js.map +1 -1
- package/dist/Workflows/components/create-workflow.component.d.ts +91 -0
- package/dist/Workflows/components/create-workflow.component.d.ts.map +1 -0
- package/dist/Workflows/components/create-workflow.component.js +414 -0
- package/dist/Workflows/components/create-workflow.component.js.map +1 -0
- package/dist/Workflows/components/workflow-run-sorting.d.ts +29 -0
- package/dist/Workflows/components/workflow-run-sorting.d.ts.map +1 -0
- package/dist/Workflows/components/workflow-run-sorting.js +59 -0
- package/dist/Workflows/components/workflow-run-sorting.js.map +1 -0
- package/dist/Workflows/components/workflow-runs-resource.component.d.ts +143 -0
- package/dist/Workflows/components/workflow-runs-resource.component.d.ts.map +1 -0
- package/dist/Workflows/components/workflow-runs-resource.component.js +676 -0
- package/dist/Workflows/components/workflow-runs-resource.component.js.map +1 -0
- package/dist/Workflows/components/workflows-resource.component.d.ts +16 -0
- package/dist/Workflows/components/workflows-resource.component.d.ts.map +1 -0
- package/dist/Workflows/components/workflows-resource.component.js +45 -0
- package/dist/Workflows/components/workflows-resource.component.js.map +1 -0
- package/dist/Workflows/workflows-dashboard.component.d.ts +70 -0
- package/dist/Workflows/workflows-dashboard.component.d.ts.map +1 -0
- package/dist/Workflows/workflows-dashboard.component.js +354 -0
- package/dist/Workflows/workflows-dashboard.component.js.map +1 -0
- package/dist/Workflows/workflows.types.d.ts +95 -0
- package/dist/Workflows/workflows.types.d.ts.map +1 -0
- package/dist/Workflows/workflows.types.js +41 -0
- package/dist/Workflows/workflows.types.js.map +1 -0
- package/dist/actions-dashboards.module.d.ts +23 -24
- package/dist/actions-dashboards.module.d.ts.map +1 -1
- package/dist/actions-dashboards.module.js +0 -5
- package/dist/actions-dashboards.module.js.map +1 -1
- package/dist/core-dashboards.module.d.ts +46 -42
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +22 -0
- package/dist/core-dashboards.module.js.map +1 -1
- package/dist/module.d.ts +18 -17
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +7 -0
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +7 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +8 -1
- package/dist/public-api.js.map +1 -1
- package/dist/shared/action-scheduled-job.d.ts +58 -0
- package/dist/shared/action-scheduled-job.d.ts.map +1 -0
- package/dist/shared/action-scheduled-job.js +77 -0
- package/dist/shared/action-scheduled-job.js.map +1 -0
- package/dist/shared/date-cell.d.ts +34 -0
- package/dist/shared/date-cell.d.ts.map +1 -0
- package/dist/shared/date-cell.js +57 -0
- package/dist/shared/date-cell.js.map +1 -0
- package/dist/workflows-dashboards.module.d.ts +40 -0
- package/dist/workflows-dashboards.module.d.ts.map +1 -0
- package/dist/workflows-dashboards.module.js +118 -0
- package/dist/workflows-dashboards.module.js.map +1 -0
- package/package.json +70 -64
- package/dist/Actions/components/scheduled-actions.component.d.ts +0 -16
- package/dist/Actions/components/scheduled-actions.component.d.ts.map +0 -1
- package/dist/Actions/components/scheduled-actions.component.js +0 -57
- package/dist/Actions/components/scheduled-actions.component.js.map +0 -1
|
@@ -145,7 +145,7 @@ export class ClassifyItemGridComponent extends BaseAngularComponent {
|
|
|
145
145
|
{ field: 'TagCount', headerName: 'Tags', width: 90, type: 'numericColumn' },
|
|
146
146
|
{ field: 'TaggingStatus', headerName: 'Status', width: 130 },
|
|
147
147
|
{ field: 'UpdatedAt', headerName: 'Updated', width: 160, sort: 'desc',
|
|
148
|
-
comparator: (_a, _b, nodeA, nodeB) => (nodeA.data?.UpdatedAtRaw ??
|
|
148
|
+
comparator: (_a, _b, nodeA, nodeB) => (nodeA.data?.UpdatedAtRaw ?? 0) - (nodeB.data?.UpdatedAtRaw ?? 0) },
|
|
149
149
|
];
|
|
150
150
|
OnGridReady(event) {
|
|
151
151
|
this.gridApi = event.api;
|
|
@@ -255,7 +255,7 @@ export class ClassifyItemGridComponent extends BaseAngularComponent {
|
|
|
255
255
|
}
|
|
256
256
|
toRow(r, tagCounts) {
|
|
257
257
|
const id = r['ID'];
|
|
258
|
-
const updatedAt = r['__mj_UpdatedAt'] ??
|
|
258
|
+
const updatedAt = r['__mj_UpdatedAt'] ?? null;
|
|
259
259
|
return {
|
|
260
260
|
ID: id,
|
|
261
261
|
DisplayName: deriveDisplayName({ Name: r['Name'], Description: r['Description'] }),
|
|
@@ -264,7 +264,7 @@ export class ClassifyItemGridComponent extends BaseAngularComponent {
|
|
|
264
264
|
EmbeddingStatus: r['EmbeddingStatus'] ?? '',
|
|
265
265
|
TaggingStatus: r['TaggingStatus'] ?? '',
|
|
266
266
|
UpdatedAt: updatedAt ? formatDate(updatedAt) : '—',
|
|
267
|
-
UpdatedAtRaw: updatedAt,
|
|
267
|
+
UpdatedAtRaw: updatedAt ? new Date(updatedAt).getTime() : 0,
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
270
|
applyRows(rows, total) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify-item-grid.component.js","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/components/classify-item-grid.component.ts","../../../../../src/AI/components/autotagging/components/classify-item-grid.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,iBAAiB,EACjB,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAKH,cAAc,EACd,kBAAkB,EAElB,WAAW,GAEd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;;;;;;IChCtE,gCAA8D;;;IAE9D,oCAA6F;;;IAkBrF,uBAA2C;IAAC,+BAC9C;;;IACE,uBAAwC;IAAC,2BAC3C;;;;IALF,iCAA+F;IAAhD,4MAAS,iBAAU,KAAC;IAG/D,AAFF,6GAAqB,uFAEZ;IAGX,iBAAS;;;IAN2D,+CAA0B;IAC5F,cAIC;IAJD,8CAIC;;;;IAnBP,0CAQsC;IAApC,AADA,oNAAa,0BAAmB,KAAC,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AC;QACvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;IAED,8EAA8E;IACtE,mBAAmB,CAAC,GAAa,EAAE,MAAM,GAAG,IAAI;QACpD,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpE,OAAO,GAAG,MAAM,QAAQ,MAAM,GAAG,CAAC;IACtC,CAAC;iRA5OQ,yBAAyB,yBAAzB,yBAAyB;6DAAzB,yBAAyB;YC7CtC,8BAAsB;YAKlB,AAFA,AAFF,kGAAsC,gFAEN,2DAEvB;YAyBX,iBAAM;;YA7BJ,cA4BC;YA5BD,4FA4BC;;;iFDgBU,yBAAyB;cANrC,SAAS;6BACM,KAAK,YACP,oBAAoB;;kBAe7B,KAAK;;kBAaL,KAAK;;kBAWL,MAAM;;kFAnCE,yBAAyB","sourcesContent":["/**\n * @fileoverview Classify · Content Item Grid (Phase 4 audit/analytics).\n *\n * Thin, reusable AG Grid listing of content items in one of two modes:\n * - scoped to a single pipeline run via `[RunID]` (items processed in that run), or\n * - all items (when `[RunID]` is null).\n *\n * Read-only: uses `ResultType:'simple'` + an explicit narrow `Fields` list, and a\n * load-more / page-size widening approach mirroring the host dashboard. Selecting a\n * row bubbles `(ItemSelected)` UP — this component owns no navigation (the host owns\n * NavigationService and opens the drilldown).\n */\nimport {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n inject,\n} from '@angular/core';\nimport { RunView } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport {\n ColDef,\n GridApi,\n GridOptions,\n GridReadyEvent,\n ModuleRegistry,\n AllCommunityModule,\n Theme,\n themeAlpine,\n RowClickedEvent,\n} from 'ag-grid-community';\nimport { ClassifyItemGridRow } from '../shared/classify.types';\nimport { deriveDisplayName, formatDate } from '../shared/classify.format';\n\n// Register AG Grid community modules once (idempotent across grids in the bundle).\nModuleRegistry.registerModules([AllCommunityModule]);\n\n@Component({\n standalone: false,\n selector: 'classify-item-grid',\n templateUrl: './classify-item-grid.component.html',\n styleUrls: ['./classify-item-grid.component.css'],\n})\nexport class ClassifyItemGridComponent extends BaseAngularComponent {\n private cdr = inject(ChangeDetectorRef);\n\n /** One page worth of additional rows fetched when \"Load more\" is clicked. */\n private static readonly PAGE_SIZE = 100;\n\n /**\n * When set, scope the grid to items processed by this pipeline run. When null,\n * show all content items. Re-fetches on change (setter pattern, not ngOnChanges).\n */\n private _runID: string | null = null;\n @Input()\n set RunID(value: string | null) {\n if (value === this._runID) return;\n this._runID = value;\n this._pageSize = ClassifyItemGridComponent.PAGE_SIZE;\n void this.loadItems();\n }\n get RunID(): string | null {\n return this._runID;\n }\n\n /** When true, the grid loads its data on init. Lets a parent defer the query until the section is shown. */\n private _autoLoad = true;\n @Input()\n set AutoLoad(value: boolean) {\n const was = this._autoLoad;\n this._autoLoad = value;\n if (value && !was && !this._loaded) void this.loadItems();\n }\n get AutoLoad(): boolean {\n return this._autoLoad;\n }\n\n /** Emits the selected content item's ID when a row is clicked. */\n @Output() ItemSelected = new EventEmitter<string>();\n\n public Rows: ClassifyItemGridRow[] = [];\n public IsLoading = false;\n public IsLoadingMore = false;\n public TotalCount = 0;\n\n private _loaded = false;\n private _pageSize = ClassifyItemGridComponent.PAGE_SIZE;\n private gridApi: GridApi | null = null;\n\n public get HasMore(): boolean {\n return this.TotalCount > this.Rows.length;\n }\n\n // ── AG Grid configuration ──\n\n public Theme: Theme = themeAlpine.withParams({\n backgroundColor: 'var(--mj-bg-surface)',\n foregroundColor: 'var(--mj-text-primary)',\n textColor: 'var(--mj-text-primary)',\n borderColor: 'var(--mj-border-default)',\n chromeBackgroundColor: 'var(--mj-bg-surface-card)',\n headerBackgroundColor: 'var(--mj-bg-surface-card)',\n headerTextColor: 'var(--mj-text-secondary)',\n cellTextColor: 'var(--mj-text-primary)',\n subtleTextColor: 'var(--mj-text-muted)',\n dataBackgroundColor: 'var(--mj-bg-surface)',\n oddRowBackgroundColor: 'var(--mj-bg-surface-card)',\n rowHoverColor: 'var(--mj-bg-surface-hover, color-mix(in srgb, var(--mj-brand-primary) 5%, var(--mj-bg-surface)))',\n selectedRowBackgroundColor: 'color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface))',\n accentColor: 'var(--mj-brand-primary)',\n borderRadius: 'var(--mj-radius-sm)',\n browserColorScheme: 'inherit',\n });\n\n public GridOptions: GridOptions<ClassifyItemGridRow> = {\n animateRows: true,\n rowHeight: 36,\n headerHeight: 40,\n suppressCellFocus: true,\n enableCellTextSelection: true,\n suppressNoRowsOverlay: true,\n };\n\n public DefaultColDef: ColDef = {\n sortable: true,\n resizable: true,\n minWidth: 80,\n };\n\n public ColumnDefs: ColDef<ClassifyItemGridRow>[] = [\n { field: 'DisplayName', headerName: 'Item', flex: 2, minWidth: 220, tooltipField: 'DisplayName' },\n { field: 'SourceName', headerName: 'Source', flex: 1, minWidth: 140 },\n { field: 'TagCount', headerName: 'Tags', width: 90, type: 'numericColumn' },\n { field: 'TaggingStatus', headerName: 'Status', width: 130 },\n { field: 'UpdatedAt', headerName: 'Updated', width: 160, sort: 'desc',\n comparator: (_a, _b, nodeA, nodeB) =>\n (nodeA.data?.UpdatedAtRaw ?? '').localeCompare(nodeB.data?.UpdatedAtRaw ?? '') },\n ];\n\n public OnGridReady(event: GridReadyEvent<ClassifyItemGridRow>): void {\n this.gridApi = event.api;\n this.gridApi.setGridOption('rowData', this.Rows);\n }\n\n public OnRowClicked(event: RowClickedEvent<ClassifyItemGridRow>): void {\n if (event.data) this.ItemSelected.emit(event.data.ID);\n }\n\n /** Public refresh entry point (parent toolbar / load-more handler). */\n public async Reload(): Promise<void> {\n this._pageSize = ClassifyItemGridComponent.PAGE_SIZE;\n await this.loadItems();\n }\n\n public async LoadMore(): Promise<void> {\n if (this.IsLoadingMore || !this.HasMore) return;\n this.IsLoadingMore = true;\n this.cdr.detectChanges();\n this._pageSize += ClassifyItemGridComponent.PAGE_SIZE;\n await this.loadItems();\n this.IsLoadingMore = false;\n this.cdr.detectChanges();\n }\n\n private async loadItems(): Promise<void> {\n if (!this._autoLoad) return;\n this.IsLoading = true;\n this.cdr.detectChanges();\n\n // When scoped to a run, resolve the run's source + time window so we can\n // constrain the item query. There is no per-item run join table in the\n // schema, so we scope by ContentSource + the run's processing window\n // (same time-correlation basis the rest of the pipeline uses).\n let extraFilter = '';\n if (this._runID) {\n const scope = await this.resolveRunScope(this._runID);\n if (scope === null) {\n this.applyRows([], 0);\n return;\n }\n extraFilter = scope;\n }\n\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<Record<string, unknown>>({\n EntityName: 'MJ: Content Items',\n ExtraFilter: extraFilter,\n OrderBy: '__mj_UpdatedAt DESC',\n MaxRows: this._pageSize,\n StartRow: 0,\n ResultType: 'simple',\n Fields: ['ID', 'Name', 'Description', 'ContentSource', 'TaggingStatus', 'EmbeddingStatus', '__mj_UpdatedAt'],\n }, this.ProviderToUse.CurrentUser);\n\n if (!result.Success) {\n this.applyRows([], 0);\n return;\n }\n\n const tagCounts = await this.loadTagCounts(result.Results.map(r => r['ID'] as string));\n const rows = result.Results.map(r => this.toRow(r, tagCounts));\n this.applyRows(rows, result.TotalRowCount);\n }\n\n /**\n * Build the item-level filter that scopes to a pipeline run: the run's\n * ContentSource, optionally bounded by the run's processing window. Returns\n * null on a hard failure (so the caller short-circuits to an empty grid).\n */\n private async resolveRunScope(runID: string): Promise<string | null> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<{ SourceID: string; StartTime: string | null; EndTime: string | null }>({\n EntityName: 'MJ: Content Process Runs',\n ExtraFilter: `ID='${runID}'`,\n Fields: ['SourceID', 'StartTime', 'EndTime'],\n ResultType: 'simple',\n }, this.ProviderToUse.CurrentUser);\n if (!result.Success || result.Results.length === 0) return null;\n\n const run = result.Results[0];\n const fragments = [`ContentSourceID='${run.SourceID.replace(/'/g, '')}'`];\n if (run.StartTime) fragments.push(`__mj_UpdatedAt >= '${this.toSqlDate(run.StartTime)}'`);\n if (run.EndTime) fragments.push(`__mj_UpdatedAt <= '${this.toSqlDate(run.EndTime)}'`);\n return fragments.join(' AND ');\n }\n\n /** Format an ISO date value for a SQL string literal (UTC, no tz suffix surprises). */\n private toSqlDate(value: string): string {\n const d = new Date(value);\n return isNaN(d.getTime()) ? value.replace(/'/g, '') : d.toISOString().replace('T', ' ').replace('Z', '');\n }\n\n /** Count tags per item for the visible page (one RunView, aggregated client-side). */\n private async loadTagCounts(itemIDs: string[]): Promise<Map<string, number>> {\n const counts = new Map<string, number>();\n if (itemIDs.length === 0) return counts;\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<{ ItemID: string }>({\n EntityName: 'MJ: Content Item Tags',\n ExtraFilter: this.buildItemIDInFilter(itemIDs, 'ItemID'),\n Fields: ['ItemID'],\n ResultType: 'simple',\n }, this.ProviderToUse.CurrentUser);\n if (result.Success) {\n for (const r of result.Results) {\n counts.set(r.ItemID, (counts.get(r.ItemID) ?? 0) + 1);\n }\n }\n return counts;\n }\n\n private toRow(r: Record<string, unknown>, tagCounts: Map<string, number>): ClassifyItemGridRow {\n const id = r['ID'] as string;\n const updatedAt = (r['__mj_UpdatedAt'] as string) ?? '';\n return {\n ID: id,\n DisplayName: deriveDisplayName({ Name: r['Name'] as string | null, Description: r['Description'] as string | null }),\n SourceName: (r['ContentSource'] as string) ?? 'Unknown',\n TagCount: tagCounts.get(id) ?? 0,\n EmbeddingStatus: (r['EmbeddingStatus'] as string) ?? '',\n TaggingStatus: (r['TaggingStatus'] as string) ?? '',\n UpdatedAt: updatedAt ? formatDate(updatedAt) : '—',\n UpdatedAtRaw: updatedAt,\n };\n }\n\n private applyRows(rows: ClassifyItemGridRow[], total: number): void {\n this.Rows = rows;\n this.TotalCount = total;\n this.IsLoading = false;\n this._loaded = true;\n this.gridApi?.setGridOption('rowData', rows);\n this.cdr.detectChanges();\n }\n\n /** Build an `IN (...)` filter from item IDs, defensively stripping quotes. */\n private buildItemIDInFilter(ids: string[], column = 'ID'): string {\n const quoted = ids.map(id => `'${id.replace(/'/g, '')}'`).join(',');\n return `${column} IN (${quoted})`;\n }\n}\n","<div class=\"cig-wrap\">\n @if (IsLoading && Rows.length === 0) {\n <mj-loading text=\"Loading items...\" size=\"small\"></mj-loading>\n } @else if (Rows.length === 0) {\n <mj-empty-state class=\"cig-empty\" Icon=\"fa-solid fa-inbox\" Title=\"No content items found.\" />\n } @else {\n <ag-grid-angular\n class=\"cig-grid\"\n [theme]=\"Theme\"\n [columnDefs]=\"ColumnDefs\"\n [defaultColDef]=\"DefaultColDef\"\n [gridOptions]=\"GridOptions\"\n [rowData]=\"Rows\"\n (gridReady)=\"OnGridReady($event)\"\n (rowClicked)=\"OnRowClicked($event)\">\n </ag-grid-angular>\n\n <div class=\"cig-footer\">\n <span class=\"cig-count\">Showing {{ Rows.length }} of {{ TotalCount }} items</span>\n @if (HasMore) {\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"LoadMore()\" [disabled]=\"IsLoadingMore\">\n @if (IsLoadingMore) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading…\n } @else {\n <i class=\"fa-solid fa-chevron-down\"></i> Load more\n }\n </button>\n }\n </div>\n }\n</div>\n"]}
|
|
1
|
+
{"version":3,"file":"classify-item-grid.component.js","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/components/classify-item-grid.component.ts","../../../../../src/AI/components/autotagging/components/classify-item-grid.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACH,SAAS,EACT,KAAK,EACL,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sB;YAKlB,AAFA,AAFF,kGAAsC,gFAEN,2DAEvB;YAyBX,iBAAM;;YA7BJ,cA4BC;YA5BD,4FA4BC;;;iFDgBU,yBAAyB;cANrC,SAAS;6BACM,KAAK,YACP,oBAAoB;;kBAe7B,KAAK;;kBAaL,KAAK;;kBAWL,MAAM;;kFAnCE,yBAAyB","sourcesContent":["/**\n * @fileoverview Classify · Content Item Grid (Phase 4 audit/analytics).\n *\n * Thin, reusable AG Grid listing of content items in one of two modes:\n * - scoped to a single pipeline run via `[RunID]` (items processed in that run), or\n * - all items (when `[RunID]` is null).\n *\n * Read-only: uses `ResultType:'simple'` + an explicit narrow `Fields` list, and a\n * load-more / page-size widening approach mirroring the host dashboard. Selecting a\n * row bubbles `(ItemSelected)` UP — this component owns no navigation (the host owns\n * NavigationService and opens the drilldown).\n */\nimport {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n inject,\n} from '@angular/core';\nimport { RunView } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport {\n ColDef,\n GridApi,\n GridOptions,\n GridReadyEvent,\n ModuleRegistry,\n AllCommunityModule,\n Theme,\n themeAlpine,\n RowClickedEvent,\n} from 'ag-grid-community';\nimport { ClassifyItemGridRow } from '../shared/classify.types';\nimport { deriveDisplayName, formatDate } from '../shared/classify.format';\n\n// Register AG Grid community modules once (idempotent across grids in the bundle).\nModuleRegistry.registerModules([AllCommunityModule]);\n\n@Component({\n standalone: false,\n selector: 'classify-item-grid',\n templateUrl: './classify-item-grid.component.html',\n styleUrls: ['./classify-item-grid.component.css'],\n})\nexport class ClassifyItemGridComponent extends BaseAngularComponent {\n private cdr = inject(ChangeDetectorRef);\n\n /** One page worth of additional rows fetched when \"Load more\" is clicked. */\n private static readonly PAGE_SIZE = 100;\n\n /**\n * When set, scope the grid to items processed by this pipeline run. When null,\n * show all content items. Re-fetches on change (setter pattern, not ngOnChanges).\n */\n private _runID: string | null = null;\n @Input()\n set RunID(value: string | null) {\n if (value === this._runID) return;\n this._runID = value;\n this._pageSize = ClassifyItemGridComponent.PAGE_SIZE;\n void this.loadItems();\n }\n get RunID(): string | null {\n return this._runID;\n }\n\n /** When true, the grid loads its data on init. Lets a parent defer the query until the section is shown. */\n private _autoLoad = true;\n @Input()\n set AutoLoad(value: boolean) {\n const was = this._autoLoad;\n this._autoLoad = value;\n if (value && !was && !this._loaded) void this.loadItems();\n }\n get AutoLoad(): boolean {\n return this._autoLoad;\n }\n\n /** Emits the selected content item's ID when a row is clicked. */\n @Output() ItemSelected = new EventEmitter<string>();\n\n public Rows: ClassifyItemGridRow[] = [];\n public IsLoading = false;\n public IsLoadingMore = false;\n public TotalCount = 0;\n\n private _loaded = false;\n private _pageSize = ClassifyItemGridComponent.PAGE_SIZE;\n private gridApi: GridApi | null = null;\n\n public get HasMore(): boolean {\n return this.TotalCount > this.Rows.length;\n }\n\n // ── AG Grid configuration ──\n\n public Theme: Theme = themeAlpine.withParams({\n backgroundColor: 'var(--mj-bg-surface)',\n foregroundColor: 'var(--mj-text-primary)',\n textColor: 'var(--mj-text-primary)',\n borderColor: 'var(--mj-border-default)',\n chromeBackgroundColor: 'var(--mj-bg-surface-card)',\n headerBackgroundColor: 'var(--mj-bg-surface-card)',\n headerTextColor: 'var(--mj-text-secondary)',\n cellTextColor: 'var(--mj-text-primary)',\n subtleTextColor: 'var(--mj-text-muted)',\n dataBackgroundColor: 'var(--mj-bg-surface)',\n oddRowBackgroundColor: 'var(--mj-bg-surface-card)',\n rowHoverColor: 'var(--mj-bg-surface-hover, color-mix(in srgb, var(--mj-brand-primary) 5%, var(--mj-bg-surface)))',\n selectedRowBackgroundColor: 'color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface))',\n accentColor: 'var(--mj-brand-primary)',\n borderRadius: 'var(--mj-radius-sm)',\n browserColorScheme: 'inherit',\n });\n\n public GridOptions: GridOptions<ClassifyItemGridRow> = {\n animateRows: true,\n rowHeight: 36,\n headerHeight: 40,\n suppressCellFocus: true,\n enableCellTextSelection: true,\n suppressNoRowsOverlay: true,\n };\n\n public DefaultColDef: ColDef = {\n sortable: true,\n resizable: true,\n minWidth: 80,\n };\n\n public ColumnDefs: ColDef<ClassifyItemGridRow>[] = [\n { field: 'DisplayName', headerName: 'Item', flex: 2, minWidth: 220, tooltipField: 'DisplayName' },\n { field: 'SourceName', headerName: 'Source', flex: 1, minWidth: 140 },\n { field: 'TagCount', headerName: 'Tags', width: 90, type: 'numericColumn' },\n { field: 'TaggingStatus', headerName: 'Status', width: 130 },\n { field: 'UpdatedAt', headerName: 'Updated', width: 160, sort: 'desc',\n comparator: (_a, _b, nodeA, nodeB) =>\n (nodeA.data?.UpdatedAtRaw ?? 0) - (nodeB.data?.UpdatedAtRaw ?? 0) },\n ];\n\n public OnGridReady(event: GridReadyEvent<ClassifyItemGridRow>): void {\n this.gridApi = event.api;\n this.gridApi.setGridOption('rowData', this.Rows);\n }\n\n public OnRowClicked(event: RowClickedEvent<ClassifyItemGridRow>): void {\n if (event.data) this.ItemSelected.emit(event.data.ID);\n }\n\n /** Public refresh entry point (parent toolbar / load-more handler). */\n public async Reload(): Promise<void> {\n this._pageSize = ClassifyItemGridComponent.PAGE_SIZE;\n await this.loadItems();\n }\n\n public async LoadMore(): Promise<void> {\n if (this.IsLoadingMore || !this.HasMore) return;\n this.IsLoadingMore = true;\n this.cdr.detectChanges();\n this._pageSize += ClassifyItemGridComponent.PAGE_SIZE;\n await this.loadItems();\n this.IsLoadingMore = false;\n this.cdr.detectChanges();\n }\n\n private async loadItems(): Promise<void> {\n if (!this._autoLoad) return;\n this.IsLoading = true;\n this.cdr.detectChanges();\n\n // When scoped to a run, resolve the run's source + time window so we can\n // constrain the item query. There is no per-item run join table in the\n // schema, so we scope by ContentSource + the run's processing window\n // (same time-correlation basis the rest of the pipeline uses).\n let extraFilter = '';\n if (this._runID) {\n const scope = await this.resolveRunScope(this._runID);\n if (scope === null) {\n this.applyRows([], 0);\n return;\n }\n extraFilter = scope;\n }\n\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<Record<string, unknown>>({\n EntityName: 'MJ: Content Items',\n ExtraFilter: extraFilter,\n OrderBy: '__mj_UpdatedAt DESC',\n MaxRows: this._pageSize,\n StartRow: 0,\n ResultType: 'simple',\n Fields: ['ID', 'Name', 'Description', 'ContentSource', 'TaggingStatus', 'EmbeddingStatus', '__mj_UpdatedAt'],\n }, this.ProviderToUse.CurrentUser);\n\n if (!result.Success) {\n this.applyRows([], 0);\n return;\n }\n\n const tagCounts = await this.loadTagCounts(result.Results.map(r => r['ID'] as string));\n const rows = result.Results.map(r => this.toRow(r, tagCounts));\n this.applyRows(rows, result.TotalRowCount);\n }\n\n /**\n * Build the item-level filter that scopes to a pipeline run: the run's\n * ContentSource, optionally bounded by the run's processing window. Returns\n * null on a hard failure (so the caller short-circuits to an empty grid).\n */\n private async resolveRunScope(runID: string): Promise<string | null> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<{ SourceID: string; StartTime: string | null; EndTime: string | null }>({\n EntityName: 'MJ: Content Process Runs',\n ExtraFilter: `ID='${runID}'`,\n Fields: ['SourceID', 'StartTime', 'EndTime'],\n ResultType: 'simple',\n }, this.ProviderToUse.CurrentUser);\n if (!result.Success || result.Results.length === 0) return null;\n\n const run = result.Results[0];\n const fragments = [`ContentSourceID='${run.SourceID.replace(/'/g, '')}'`];\n if (run.StartTime) fragments.push(`__mj_UpdatedAt >= '${this.toSqlDate(run.StartTime)}'`);\n if (run.EndTime) fragments.push(`__mj_UpdatedAt <= '${this.toSqlDate(run.EndTime)}'`);\n return fragments.join(' AND ');\n }\n\n /** Format an ISO date value for a SQL string literal (UTC, no tz suffix surprises). */\n private toSqlDate(value: string): string {\n const d = new Date(value);\n return isNaN(d.getTime()) ? value.replace(/'/g, '') : d.toISOString().replace('T', ' ').replace('Z', '');\n }\n\n /** Count tags per item for the visible page (one RunView, aggregated client-side). */\n private async loadTagCounts(itemIDs: string[]): Promise<Map<string, number>> {\n const counts = new Map<string, number>();\n if (itemIDs.length === 0) return counts;\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<{ ItemID: string }>({\n EntityName: 'MJ: Content Item Tags',\n ExtraFilter: this.buildItemIDInFilter(itemIDs, 'ItemID'),\n Fields: ['ItemID'],\n ResultType: 'simple',\n }, this.ProviderToUse.CurrentUser);\n if (result.Success) {\n for (const r of result.Results) {\n counts.set(r.ItemID, (counts.get(r.ItemID) ?? 0) + 1);\n }\n }\n return counts;\n }\n\n private toRow(r: Record<string, unknown>, tagCounts: Map<string, number>): ClassifyItemGridRow {\n const id = r['ID'] as string;\n const updatedAt = (r['__mj_UpdatedAt'] as Date | string | null) ?? null;\n return {\n ID: id,\n DisplayName: deriveDisplayName({ Name: r['Name'] as string | null, Description: r['Description'] as string | null }),\n SourceName: (r['ContentSource'] as string) ?? 'Unknown',\n TagCount: tagCounts.get(id) ?? 0,\n EmbeddingStatus: (r['EmbeddingStatus'] as string) ?? '',\n TaggingStatus: (r['TaggingStatus'] as string) ?? '',\n UpdatedAt: updatedAt ? formatDate(updatedAt) : '—',\n UpdatedAtRaw: updatedAt ? new Date(updatedAt).getTime() : 0,\n };\n }\n\n private applyRows(rows: ClassifyItemGridRow[], total: number): void {\n this.Rows = rows;\n this.TotalCount = total;\n this.IsLoading = false;\n this._loaded = true;\n this.gridApi?.setGridOption('rowData', rows);\n this.cdr.detectChanges();\n }\n\n /** Build an `IN (...)` filter from item IDs, defensively stripping quotes. */\n private buildItemIDInFilter(ids: string[], column = 'ID'): string {\n const quoted = ids.map(id => `'${id.replace(/'/g, '')}'`).join(',');\n return `${column} IN (${quoted})`;\n }\n}\n","<div class=\"cig-wrap\">\n @if (IsLoading && Rows.length === 0) {\n <mj-loading text=\"Loading items...\" size=\"small\"></mj-loading>\n } @else if (Rows.length === 0) {\n <mj-empty-state class=\"cig-empty\" Icon=\"fa-solid fa-inbox\" Title=\"No content items found.\" />\n } @else {\n <ag-grid-angular\n class=\"cig-grid\"\n [theme]=\"Theme\"\n [columnDefs]=\"ColumnDefs\"\n [defaultColDef]=\"DefaultColDef\"\n [gridOptions]=\"GridOptions\"\n [rowData]=\"Rows\"\n (gridReady)=\"OnGridReady($event)\"\n (rowClicked)=\"OnRowClicked($event)\">\n </ag-grid-angular>\n\n <div class=\"cig-footer\">\n <span class=\"cig-count\">Showing {{ Rows.length }} of {{ TotalCount }} items</span>\n @if (HasMore) {\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"LoadMore()\" [disabled]=\"IsLoadingMore\">\n @if (IsLoadingMore) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading…\n } @else {\n <i class=\"fa-solid fa-chevron-down\"></i> Load more\n }\n </button>\n }\n </div>\n }\n</div>\n"]}
|
|
@@ -30,7 +30,7 @@ export declare function tagFontSize(weight: number): string;
|
|
|
30
30
|
/** Short date (e.g. "Mar 5"). Returns '' on parse failure. */
|
|
31
31
|
export declare function formatShortDate(dateStr: string): string;
|
|
32
32
|
/** Date + time (e.g. "Mar 5, 2:05 PM"). Echoes the input on parse failure. */
|
|
33
|
-
export declare function formatDate(dateStr: string): string;
|
|
33
|
+
export declare function formatDate(dateStr: Date | string): string;
|
|
34
34
|
/** Human-friendly elapsed duration between two ISO timestamps; open-ended if `end` is null. */
|
|
35
35
|
export declare function computeDuration(start: string | null, end: string | null): string;
|
|
36
36
|
/** Normalize a raw run status to one of the canonical display labels. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.format.d.ts","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/shared/classify.format.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,wDAAwD;AACxD,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,CAYrG;AAgCD,kEAAkE;AAClE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIvD;AAED,mEAAmE;AACnE,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED,8EAA8E;AAC9E,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"classify.format.d.ts","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/shared/classify.format.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,wDAAwD;AACxD,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,CAYrG;AAgCD,kEAAkE;AAClE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIvD;AAED,mEAAmE;AACnE,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED,8EAA8E;AAC9E,wBAAgB,UAAU,CAAC,OAAO,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAMzD;AAED,+FAA+F;AAC/F,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAUhF;AAED,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMpD;AAED,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAS1D;AAED,wFAAwF;AACxF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,YAAY,EAAE,CAyBtF;AAMD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQxD"}
|
|
@@ -86,7 +86,7 @@ export function formatDate(dateStr) {
|
|
|
86
86
|
return new Date(dateStr).toLocaleDateString('en-US', { month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' });
|
|
87
87
|
}
|
|
88
88
|
catch {
|
|
89
|
-
return dateStr;
|
|
89
|
+
return String(dateStr);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
/** Human-friendly elapsed duration between two ISO timestamps; open-ended if `end` is null. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.format.js","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/shared/classify.format.ts"],"names":[],"mappings":"AAOA,wDAAwD;AACxD,MAAM,UAAU,YAAY,CAAC,CAAS;IAClC,OAAO,CAAC,CAAC,cAAc,EAAE,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAA2D;IACzF,MAAM,IAAI,GAAG,IAAI,EAAE,IAA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AAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACtC,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACzD,MAAM,CAAC,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC7C,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED,qEAAqE;AACrE,SAAS,eAAe,CAAC,GAAW;IAChC,MAAM,KAAK,GAA2B;QAClC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS;QAC5C,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ;QAChD,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ;QAC9B,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS;QAClD,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ;QACtD,KAAK,EAAE,UAAU;KACpB,CAAC;IACF,OAAO,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,IAAI,GAAG,CAAC;AAC3C,CAAC","sourcesContent":["/**\n * @fileoverview Pure formatting/mapping helpers for the Classify (autotagging) sub-app.\n * Extracted from the former monolith so host + tabs share one implementation (DRY).\n * All functions are stateless — no `this`, no DI — so they're safe to import anywhere.\n */\nimport { RunDetailRow } from './classify.types';\n\n/** Locale-formatted integer (e.g. 12345 → \"12,345\"). */\nexport function formatNumber(n: number): string {\n return n.toLocaleString();\n}\n\n/**\n * Derive a human-meaningful display name for a content item.\n *\n * Entity-sourced content items now carry a real per-record `Name` (the source\n * entity's name field — e.g. \"GPT-4\"), so we prefer `Name` directly. Only when a\n * Name is missing (or is a generic source-name placeholder) do we fall back to\n * the first meaningful line of the LLM-generated `Description` to keep rows\n * distinguishable, then to a placeholder.\n *\n * Pure/stateless — safe to call from any render site.\n */\nexport function deriveDisplayName(item: { Name?: string | null; Description?: string | null }): string {\n const name = item?.Name?.trim();\n if (name) {\n return name.length > DISPLAY_NAME_MAX_LEN\n ? `${name.slice(0, DISPLAY_NAME_MAX_LEN).trimEnd()}…`\n : name;\n }\n\n const fromDescription = firstMeaningfulLine(item?.Description);\n if (fromDescription) return fromDescription;\n\n return '(Untitled)';\n}\n\n/** Max length of a derived display name before it is truncated with an ellipsis. */\nconst DISPLAY_NAME_MAX_LEN = 80;\n\n/**\n * Returns the first non-empty, markdown-stripped line of a description, clamped\n * to DISPLAY_NAME_MAX_LEN characters. Returns null when nothing meaningful remains.\n */\nfunction firstMeaningfulLine(description: string | null | undefined): string | null {\n if (!description) return null;\n\n for (const rawLine of description.split(/\\r?\\n/)) {\n const cleaned = stripMarkdown(rawLine);\n if (cleaned.length === 0) continue;\n return cleaned.length > DISPLAY_NAME_MAX_LEN\n ? `${cleaned.slice(0, DISPLAY_NAME_MAX_LEN).trimEnd()}…`\n : cleaned;\n }\n return null;\n}\n\n/** Strip leading markdown markers (#, *, -, >, backticks) and collapse whitespace. */\nfunction stripMarkdown(line: string): string {\n return line\n .replace(/^[#>\\s]*/g, '') // leading heading / blockquote markers + space\n .replace(/^[-*+]\\s+/, '') // leading bullet markers\n .replace(/[`*_~]/g, '') // inline emphasis / code markers\n .replace(/\\s+/g, ' ') // collapse runs of whitespace\n .trim();\n}\n\n/** Compact token count (e.g. 1500 → \"2K\", 2_400_000 → \"2.4M\"). */\nexport function formatTokenCount(tokens: number): string {\n if (tokens >= 1000000) return `${(tokens / 1000000).toFixed(1)}M`;\n if (tokens >= 1000) return `${(tokens / 1000).toFixed(0)}K`;\n return String(tokens);\n}\n\n/** Weight (0.0–1.0) as a percentage string (e.g. 0.42 → \"42%\"). */\nexport function formatWeight(weight: number): string {\n return `${Math.round(weight * 100)}%`;\n}\n\n/** Font size in rem for a tag chip based on weight (0.0–1.0), clamped to 0.7–1.0rem. */\nexport function tagFontSize(weight: number): string {\n const min = 0.7;\n const max = 1.0;\n return `${min + (max - min) * Math.min(1, Math.max(0, weight))}rem`;\n}\n\n/** Short date (e.g. \"Mar 5\"). Returns '' on parse failure. */\nexport function formatShortDate(dateStr: string): string {\n try {\n return new Date(dateStr).toLocaleDateString('en-US', { month: 'short', day: 'numeric' });\n } catch {\n return '';\n }\n}\n\n/** Date + time (e.g. \"Mar 5, 2:05 PM\"). Echoes the input on parse failure. */\nexport function formatDate(dateStr: string): string {\n try {\n return new Date(dateStr).toLocaleDateString('en-US', { month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' });\n } catch {\n return dateStr;\n }\n}\n\n/** Human-friendly elapsed duration between two ISO timestamps; open-ended if `end` is null. */\nexport function computeDuration(start: string | null, end: string | null): string {\n if (!start) return '—';\n const s = new Date(start);\n const e = end ? new Date(end) : new Date();\n const ms = e.getTime() - s.getTime();\n if (ms < 1000) return `${ms}ms`;\n if (ms < 60000) return `${Math.round(ms / 1000)}s`;\n const mins = Math.floor(ms / 60000);\n const secs = Math.round((ms % 60000) / 1000);\n return `${mins}m ${secs}s`;\n}\n\n/** Normalize a raw run status to one of the canonical display labels. */\nexport function displayStatus(status: string): string {\n const lower = status.toLowerCase();\n if (lower === 'complete' || lower === 'completed' || lower === 'done') return 'Complete';\n if (lower === 'error' || lower === 'failed') return 'Failed';\n if (lower === 'running' || lower === 'processing') return 'Running';\n return status;\n}\n\n/** Font Awesome icon class for a content source type name. */\nexport function getSourceTypeIcon(typeName: string): string {\n const iconMap: Record<string, string> = {\n 'Web': 'fa-solid fa-globe', 'Web Crawler': 'fa-solid fa-globe',\n 'API': 'fa-solid fa-plug', 'Database': 'fa-solid fa-database',\n 'File': 'fa-solid fa-file-alt', 'Email': 'fa-solid fa-envelope',\n 'RSS': 'fa-solid fa-rss', 'RSS Feed': 'fa-solid fa-rss',\n 'CMS': 'fa-solid fa-newspaper', 'PDF': 'fa-solid fa-file-pdf'\n };\n return iconMap[typeName] ?? 'fa-solid fa-folder';\n}\n\n/** Map raw `MJ: Content Process Run Details` rows to typed RunDetailRow view models. */\nexport function mapRunDetailRecords(records: Record<string, unknown>[]): RunDetailRow[] {\n return records.map(d => {\n const status = String(d['Status'] || 'Pending');\n const statusLower = status.toLowerCase();\n const isFailed = statusLower === 'failed' || statusLower === 'error';\n const isRunning = statusLower === 'running' || statusLower === 'processing';\n const startTime = d['StartTime'] ? new Date(String(d['StartTime'])) : null;\n const endTime = d['EndTime'] ? new Date(String(d['EndTime'])) : null;\n const durationMs = startTime && endTime ? endTime.getTime() - startTime.getTime() : 0;\n const durationStr = durationMs > 60000 ? `${Math.round(durationMs / 60000)}m` : `${Math.round(durationMs / 1000)}s`;\n\n return {\n SourceName: String(d['ContentSource'] || 'Unknown'),\n SourceType: String(d['ContentSourceType'] || ''),\n Status: displayStatus(status),\n StatusClass: isFailed ? 'failed' : isRunning ? 'running' : 'complete',\n ItemsProcessed: Number(d['ItemsProcessed'] || 0),\n ItemsTagged: Number(d['ItemsTagged'] || 0),\n ItemsVectorized: Number(d['ItemsVectorized'] || 0),\n ErrorCount: Number(d['ErrorCount'] || 0),\n TotalTokens: Number(d['TotalTokensUsed'] || 0),\n TotalCost: Number(d['TotalCost'] || 0),\n Duration: durationStr,\n };\n });\n}\n\n// ================================================================\n// Cron-to-Human-Readable Utility\n// ================================================================\n\n/**\n * Converts a 5-part or 6-part cron expression to a human-readable English string.\n *\n * Handles common patterns:\n * `0 * * * *` -> \"Every hour\"\n * `0 2 * * *` -> \"Daily at 2:00 AM\"\n * `0 2 * * 1` -> \"Weekly on Monday at 2:00 AM\"\n * `star/15 * * * *` -> \"Every 15 minutes\" (where star = asterisk)\n * `0 0 1 * *` -> \"Monthly on day 1 at 12:00 AM\"\n *\n * Falls back to returning the raw cron string for unrecognized patterns.\n *\n * @param cron A cron expression string (5 or 6 parts)\n * @returns A human-readable description or the raw cron if unrecognized\n */\nexport function CronToHumanReadable(cron: string): string {\n if (!cron) return 'No schedule';\n\n const parts = cron.trim().split(/\\s+/);\n const p = parseCronParts(parts);\n if (!p) return cron;\n\n return formatCronParts(p) ?? cron;\n}\n\n/** Internal cron field tuple */\ninterface CronFields {\n Minute: string;\n Hour: string;\n DayOfMonth: string;\n Month: string;\n DayOfWeek: string;\n}\n\n/**\n * Parses 5-part or 6-part cron expressions into normalized fields.\n * 6-part expressions have a leading seconds field that is discarded.\n */\nfunction parseCronParts(parts: string[]): CronFields | null {\n if (parts.length === 5) {\n return { Minute: parts[0], Hour: parts[1], DayOfMonth: parts[2], Month: parts[3], DayOfWeek: parts[4] };\n }\n if (parts.length === 6) {\n return { Minute: parts[1], Hour: parts[2], DayOfMonth: parts[3], Month: parts[4], DayOfWeek: parts[5] };\n }\n return null;\n}\n\n/**\n * Attempts to map parsed cron fields to a human-readable string.\n * Returns null when the pattern is not recognized.\n */\nfunction formatCronParts(p: CronFields): string | null {\n // Every N minutes: */N * * * *\n if (p.Minute.startsWith('*/') && p.Hour === '*' && p.DayOfMonth === '*' && p.Month === '*' && p.DayOfWeek === '*') {\n const interval = parseInt(p.Minute.slice(2), 10);\n if (interval === 1) return 'Every minute';\n return `Every ${interval} minutes`;\n }\n\n // Every hour at minute M: M * * * *\n if (!p.Minute.includes('*') && !p.Minute.includes('/') && p.Hour === '*' && p.DayOfMonth === '*' && p.Month === '*' && p.DayOfWeek === '*') {\n return 'Every hour';\n }\n\n // Every N hours: 0 */N * * *\n if (!p.Minute.includes('*') && !p.Minute.includes('/') && p.Hour.startsWith('*/') && p.DayOfMonth === '*') {\n const interval = parseInt(p.Hour.slice(2), 10);\n if (interval === 1) return 'Every hour';\n return `Every ${interval} hours`;\n }\n\n // Specific hour + minute with wildcard or specific day fields\n if (!p.Minute.includes('*') && !p.Minute.includes('/') &&\n !p.Hour.includes('*') && !p.Hour.includes('/') &&\n p.Month === '*') {\n\n const hour = parseInt(p.Hour, 10);\n const minute = parseInt(p.Minute, 10);\n const timeStr = formatTimeOfDay(hour, minute);\n\n // Weekly: specific day of week\n if (p.DayOfWeek !== '*' && p.DayOfMonth === '*') {\n const dayName = dayOfWeekToName(p.DayOfWeek);\n return `Weekly on ${dayName} at ${timeStr}`;\n }\n\n // Monthly: specific day of month\n if (p.DayOfMonth !== '*' && p.DayOfWeek === '*') {\n return `Monthly on day ${p.DayOfMonth} at ${timeStr}`;\n }\n\n // Daily\n if (p.DayOfMonth === '*' && p.DayOfWeek === '*') {\n return `Daily at ${timeStr}`;\n }\n }\n\n return null;\n}\n\n/** Formats hour and minute to 12-hour AM/PM time string */\nfunction formatTimeOfDay(hour: number, minute: number): string {\n const ampm = hour >= 12 ? 'PM' : 'AM';\n const h = hour === 0 ? 12 : hour > 12 ? hour - 12 : hour;\n const m = minute.toString().padStart(2, '0');\n return `${h}:${m} ${ampm}`;\n}\n\n/** Maps day-of-week cron values (0-7 or SUN-SAT) to English names */\nfunction dayOfWeekToName(dow: string): string {\n const names: Record<string, string> = {\n '0': 'Sunday', '1': 'Monday', '2': 'Tuesday',\n '3': 'Wednesday', '4': 'Thursday', '5': 'Friday',\n '6': 'Saturday', '7': 'Sunday',\n 'SUN': 'Sunday', 'MON': 'Monday', 'TUE': 'Tuesday',\n 'WED': 'Wednesday', 'THU': 'Thursday', 'FRI': 'Friday',\n 'SAT': 'Saturday',\n };\n return names[dow.toUpperCase()] ?? dow;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"classify.format.js","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/shared/classify.format.ts"],"names":[],"mappings":"AAOA,wDAAwD;AACxD,MAAM,UAAU,YAAY,CAAC,CAAS;IAClC,OAAO,CAAC,CAAC,cAAc,EAAE,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAA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AC,IAAY,EAAE,MAAc;IACjD,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACtC,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACzD,MAAM,CAAC,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC7C,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED,qEAAqE;AACrE,SAAS,eAAe,CAAC,GAAW;IAChC,MAAM,KAAK,GAA2B;QAClC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS;QAC5C,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ;QAChD,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ;QAC9B,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS;QAClD,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ;QACtD,KAAK,EAAE,UAAU;KACpB,CAAC;IACF,OAAO,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,IAAI,GAAG,CAAC;AAC3C,CAAC","sourcesContent":["/**\n * @fileoverview Pure formatting/mapping helpers for the Classify (autotagging) sub-app.\n * Extracted from the former monolith so host + tabs share one implementation (DRY).\n * All functions are stateless — no `this`, no DI — so they're safe to import anywhere.\n */\nimport { RunDetailRow } from './classify.types';\n\n/** Locale-formatted integer (e.g. 12345 → \"12,345\"). */\nexport function formatNumber(n: number): string {\n return n.toLocaleString();\n}\n\n/**\n * Derive a human-meaningful display name for a content item.\n *\n * Entity-sourced content items now carry a real per-record `Name` (the source\n * entity's name field — e.g. \"GPT-4\"), so we prefer `Name` directly. Only when a\n * Name is missing (or is a generic source-name placeholder) do we fall back to\n * the first meaningful line of the LLM-generated `Description` to keep rows\n * distinguishable, then to a placeholder.\n *\n * Pure/stateless — safe to call from any render site.\n */\nexport function deriveDisplayName(item: { Name?: string | null; Description?: string | null }): string {\n const name = item?.Name?.trim();\n if (name) {\n return name.length > DISPLAY_NAME_MAX_LEN\n ? `${name.slice(0, DISPLAY_NAME_MAX_LEN).trimEnd()}…`\n : name;\n }\n\n const fromDescription = firstMeaningfulLine(item?.Description);\n if (fromDescription) return fromDescription;\n\n return '(Untitled)';\n}\n\n/** Max length of a derived display name before it is truncated with an ellipsis. */\nconst DISPLAY_NAME_MAX_LEN = 80;\n\n/**\n * Returns the first non-empty, markdown-stripped line of a description, clamped\n * to DISPLAY_NAME_MAX_LEN characters. Returns null when nothing meaningful remains.\n */\nfunction firstMeaningfulLine(description: string | null | undefined): string | null {\n if (!description) return null;\n\n for (const rawLine of description.split(/\\r?\\n/)) {\n const cleaned = stripMarkdown(rawLine);\n if (cleaned.length === 0) continue;\n return cleaned.length > DISPLAY_NAME_MAX_LEN\n ? `${cleaned.slice(0, DISPLAY_NAME_MAX_LEN).trimEnd()}…`\n : cleaned;\n }\n return null;\n}\n\n/** Strip leading markdown markers (#, *, -, >, backticks) and collapse whitespace. */\nfunction stripMarkdown(line: string): string {\n return line\n .replace(/^[#>\\s]*/g, '') // leading heading / blockquote markers + space\n .replace(/^[-*+]\\s+/, '') // leading bullet markers\n .replace(/[`*_~]/g, '') // inline emphasis / code markers\n .replace(/\\s+/g, ' ') // collapse runs of whitespace\n .trim();\n}\n\n/** Compact token count (e.g. 1500 → \"2K\", 2_400_000 → \"2.4M\"). */\nexport function formatTokenCount(tokens: number): string {\n if (tokens >= 1000000) return `${(tokens / 1000000).toFixed(1)}M`;\n if (tokens >= 1000) return `${(tokens / 1000).toFixed(0)}K`;\n return String(tokens);\n}\n\n/** Weight (0.0–1.0) as a percentage string (e.g. 0.42 → \"42%\"). */\nexport function formatWeight(weight: number): string {\n return `${Math.round(weight * 100)}%`;\n}\n\n/** Font size in rem for a tag chip based on weight (0.0–1.0), clamped to 0.7–1.0rem. */\nexport function tagFontSize(weight: number): string {\n const min = 0.7;\n const max = 1.0;\n return `${min + (max - min) * Math.min(1, Math.max(0, weight))}rem`;\n}\n\n/** Short date (e.g. \"Mar 5\"). Returns '' on parse failure. */\nexport function formatShortDate(dateStr: string): string {\n try {\n return new Date(dateStr).toLocaleDateString('en-US', { month: 'short', day: 'numeric' });\n } catch {\n return '';\n }\n}\n\n/** Date + time (e.g. \"Mar 5, 2:05 PM\"). Echoes the input on parse failure. */\nexport function formatDate(dateStr: Date | string): string {\n try {\n return new Date(dateStr).toLocaleDateString('en-US', { month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' });\n } catch {\n return String(dateStr);\n }\n}\n\n/** Human-friendly elapsed duration between two ISO timestamps; open-ended if `end` is null. */\nexport function computeDuration(start: string | null, end: string | null): string {\n if (!start) return '—';\n const s = new Date(start);\n const e = end ? new Date(end) : new Date();\n const ms = e.getTime() - s.getTime();\n if (ms < 1000) return `${ms}ms`;\n if (ms < 60000) return `${Math.round(ms / 1000)}s`;\n const mins = Math.floor(ms / 60000);\n const secs = Math.round((ms % 60000) / 1000);\n return `${mins}m ${secs}s`;\n}\n\n/** Normalize a raw run status to one of the canonical display labels. */\nexport function displayStatus(status: string): string {\n const lower = status.toLowerCase();\n if (lower === 'complete' || lower === 'completed' || lower === 'done') return 'Complete';\n if (lower === 'error' || lower === 'failed') return 'Failed';\n if (lower === 'running' || lower === 'processing') return 'Running';\n return status;\n}\n\n/** Font Awesome icon class for a content source type name. */\nexport function getSourceTypeIcon(typeName: string): string {\n const iconMap: Record<string, string> = {\n 'Web': 'fa-solid fa-globe', 'Web Crawler': 'fa-solid fa-globe',\n 'API': 'fa-solid fa-plug', 'Database': 'fa-solid fa-database',\n 'File': 'fa-solid fa-file-alt', 'Email': 'fa-solid fa-envelope',\n 'RSS': 'fa-solid fa-rss', 'RSS Feed': 'fa-solid fa-rss',\n 'CMS': 'fa-solid fa-newspaper', 'PDF': 'fa-solid fa-file-pdf'\n };\n return iconMap[typeName] ?? 'fa-solid fa-folder';\n}\n\n/** Map raw `MJ: Content Process Run Details` rows to typed RunDetailRow view models. */\nexport function mapRunDetailRecords(records: Record<string, unknown>[]): RunDetailRow[] {\n return records.map(d => {\n const status = String(d['Status'] || 'Pending');\n const statusLower = status.toLowerCase();\n const isFailed = statusLower === 'failed' || statusLower === 'error';\n const isRunning = statusLower === 'running' || statusLower === 'processing';\n const startTime = d['StartTime'] ? new Date(String(d['StartTime'])) : null;\n const endTime = d['EndTime'] ? new Date(String(d['EndTime'])) : null;\n const durationMs = startTime && endTime ? endTime.getTime() - startTime.getTime() : 0;\n const durationStr = durationMs > 60000 ? `${Math.round(durationMs / 60000)}m` : `${Math.round(durationMs / 1000)}s`;\n\n return {\n SourceName: String(d['ContentSource'] || 'Unknown'),\n SourceType: String(d['ContentSourceType'] || ''),\n Status: displayStatus(status),\n StatusClass: isFailed ? 'failed' : isRunning ? 'running' : 'complete',\n ItemsProcessed: Number(d['ItemsProcessed'] || 0),\n ItemsTagged: Number(d['ItemsTagged'] || 0),\n ItemsVectorized: Number(d['ItemsVectorized'] || 0),\n ErrorCount: Number(d['ErrorCount'] || 0),\n TotalTokens: Number(d['TotalTokensUsed'] || 0),\n TotalCost: Number(d['TotalCost'] || 0),\n Duration: durationStr,\n };\n });\n}\n\n// ================================================================\n// Cron-to-Human-Readable Utility\n// ================================================================\n\n/**\n * Converts a 5-part or 6-part cron expression to a human-readable English string.\n *\n * Handles common patterns:\n * `0 * * * *` -> \"Every hour\"\n * `0 2 * * *` -> \"Daily at 2:00 AM\"\n * `0 2 * * 1` -> \"Weekly on Monday at 2:00 AM\"\n * `star/15 * * * *` -> \"Every 15 minutes\" (where star = asterisk)\n * `0 0 1 * *` -> \"Monthly on day 1 at 12:00 AM\"\n *\n * Falls back to returning the raw cron string for unrecognized patterns.\n *\n * @param cron A cron expression string (5 or 6 parts)\n * @returns A human-readable description or the raw cron if unrecognized\n */\nexport function CronToHumanReadable(cron: string): string {\n if (!cron) return 'No schedule';\n\n const parts = cron.trim().split(/\\s+/);\n const p = parseCronParts(parts);\n if (!p) return cron;\n\n return formatCronParts(p) ?? cron;\n}\n\n/** Internal cron field tuple */\ninterface CronFields {\n Minute: string;\n Hour: string;\n DayOfMonth: string;\n Month: string;\n DayOfWeek: string;\n}\n\n/**\n * Parses 5-part or 6-part cron expressions into normalized fields.\n * 6-part expressions have a leading seconds field that is discarded.\n */\nfunction parseCronParts(parts: string[]): CronFields | null {\n if (parts.length === 5) {\n return { Minute: parts[0], Hour: parts[1], DayOfMonth: parts[2], Month: parts[3], DayOfWeek: parts[4] };\n }\n if (parts.length === 6) {\n return { Minute: parts[1], Hour: parts[2], DayOfMonth: parts[3], Month: parts[4], DayOfWeek: parts[5] };\n }\n return null;\n}\n\n/**\n * Attempts to map parsed cron fields to a human-readable string.\n * Returns null when the pattern is not recognized.\n */\nfunction formatCronParts(p: CronFields): string | null {\n // Every N minutes: */N * * * *\n if (p.Minute.startsWith('*/') && p.Hour === '*' && p.DayOfMonth === '*' && p.Month === '*' && p.DayOfWeek === '*') {\n const interval = parseInt(p.Minute.slice(2), 10);\n if (interval === 1) return 'Every minute';\n return `Every ${interval} minutes`;\n }\n\n // Every hour at minute M: M * * * *\n if (!p.Minute.includes('*') && !p.Minute.includes('/') && p.Hour === '*' && p.DayOfMonth === '*' && p.Month === '*' && p.DayOfWeek === '*') {\n return 'Every hour';\n }\n\n // Every N hours: 0 */N * * *\n if (!p.Minute.includes('*') && !p.Minute.includes('/') && p.Hour.startsWith('*/') && p.DayOfMonth === '*') {\n const interval = parseInt(p.Hour.slice(2), 10);\n if (interval === 1) return 'Every hour';\n return `Every ${interval} hours`;\n }\n\n // Specific hour + minute with wildcard or specific day fields\n if (!p.Minute.includes('*') && !p.Minute.includes('/') &&\n !p.Hour.includes('*') && !p.Hour.includes('/') &&\n p.Month === '*') {\n\n const hour = parseInt(p.Hour, 10);\n const minute = parseInt(p.Minute, 10);\n const timeStr = formatTimeOfDay(hour, minute);\n\n // Weekly: specific day of week\n if (p.DayOfWeek !== '*' && p.DayOfMonth === '*') {\n const dayName = dayOfWeekToName(p.DayOfWeek);\n return `Weekly on ${dayName} at ${timeStr}`;\n }\n\n // Monthly: specific day of month\n if (p.DayOfMonth !== '*' && p.DayOfWeek === '*') {\n return `Monthly on day ${p.DayOfMonth} at ${timeStr}`;\n }\n\n // Daily\n if (p.DayOfMonth === '*' && p.DayOfWeek === '*') {\n return `Daily at ${timeStr}`;\n }\n }\n\n return null;\n}\n\n/** Formats hour and minute to 12-hour AM/PM time string */\nfunction formatTimeOfDay(hour: number, minute: number): string {\n const ampm = hour >= 12 ? 'PM' : 'AM';\n const h = hour === 0 ? 12 : hour > 12 ? hour - 12 : hour;\n const m = minute.toString().padStart(2, '0');\n return `${h}:${m} ${ampm}`;\n}\n\n/** Maps day-of-week cron values (0-7 or SUN-SAT) to English names */\nfunction dayOfWeekToName(dow: string): string {\n const names: Record<string, string> = {\n '0': 'Sunday', '1': 'Monday', '2': 'Tuesday',\n '3': 'Wednesday', '4': 'Thursday', '5': 'Friday',\n '6': 'Saturday', '7': 'Sunday',\n 'SUN': 'Sunday', 'MON': 'Monday', 'TUE': 'Tuesday',\n 'WED': 'Wednesday', 'THU': 'Thursday', 'FRI': 'Friday',\n 'SAT': 'Saturday',\n };\n return names[dow.toUpperCase()] ?? dow;\n}\n"]}
|
|
@@ -59,10 +59,10 @@ export interface SourceCard {
|
|
|
59
59
|
EntityID: string;
|
|
60
60
|
EntityDocumentID: string;
|
|
61
61
|
RequiresFileType: boolean;
|
|
62
|
-
/** FK to
|
|
63
|
-
|
|
64
|
-
/** Denormalized name of the linked
|
|
65
|
-
|
|
62
|
+
/** FK to the Scheduled Job that runs this source, null if no schedule configured */
|
|
63
|
+
ScheduledJobID: string | null;
|
|
64
|
+
/** Denormalized name of the linked Scheduled Job */
|
|
65
|
+
ScheduledJobName: string | null;
|
|
66
66
|
/** Human-readable schedule description (parsed from cron) */
|
|
67
67
|
ScheduleDescription: string | null;
|
|
68
68
|
}
|
|
@@ -269,8 +269,8 @@ export interface ClassifyItemGridRow {
|
|
|
269
269
|
EmbeddingStatus: string;
|
|
270
270
|
TaggingStatus: string;
|
|
271
271
|
UpdatedAt: string;
|
|
272
|
-
/**
|
|
273
|
-
UpdatedAtRaw:
|
|
272
|
+
/** Epoch-ms timestamp used for sorting (the grid renders UpdatedAt formatted); 0 when absent. */
|
|
273
|
+
UpdatedAtRaw: number;
|
|
274
274
|
}
|
|
275
275
|
/**
|
|
276
276
|
* A single tag on a content item, enriched with the LLM provenance fields
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.types.d.ts","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/shared/classify.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAI9G,MAAM,WAAW,OAAO;IACpB,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAA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+
{"version":3,"file":"classify.types.d.ts","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/shared/classify.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAI9G,MAAM,WAAW,OAAO;IACpB,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,GAAG,YAAY,GAAG,OAAO,CAAC;CAC/C;AAED,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;CAChD;AAED,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI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C;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,eAAe,EAAE,MAAM,CAAC;IACxB,+DAA+D;IAC/D,aAAa,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.types.js","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/shared/classify.types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * @fileoverview Shared types & interfaces for the Classify (autotagging) sub-app.\n * Extracted verbatim from the former monolith so host, tabs, and dialogs share one contract.\n */\n\n// ── Tab type ──\n\nexport type TabName = 'pipeline' | 'sources' | 'types' | 'tags' | 'taxonomy' | 'inbox' | 'health' | 'history';\n\n// ── Interfaces ──\n\nexport interface NavItem {\n Tab: TabName;\n Icon: string;\n Label: string;\n BadgeText: string;\n BadgeClass: string;\n}\n\nexport interface KPIMetric {\n Label: string;\n Value: number;\n Icon: string;\n Trend: string;\n TrendUp: boolean;\n}\n\nexport interface PipelineStageInfo {\n Name: string;\n Icon: string;\n Status: 'idle' | 'active' | 'complete';\n Count: string;\n}\n\nexport interface FeedItem {\n Name: string;\n SourceName: string;\n Tags: string[];\n TimeAgo: string;\n Status: 'complete' | 'processing' | 'error';\n}\n\nexport interface SourceMini {\n ID: string;\n Name: string;\n Icon: string;\n Meta: string;\n StatusClass: 'active' | 'error' | 'inactive';\n}\n\nexport interface SourceCard {\n ID: string;\n Name: string;\n SourceTypeName: string;\n ContentTypeName: string;\n FileTypeName: string;\n Icon: string;\n StatusClass: 'active' | 'error' | 'inactive';\n StatusLabel: string;\n URL: string;\n ItemCount: number;\n TagCount: number;\n AvgTags: string;\n LastRunAgo: string;\n ContentSourceTypeID: string;\n ContentTypeID: string;\n ContentFileTypeID: string;\n EmbeddingModelID: string;\n VectorIndexID: string;\n EntityID: string;\n EntityDocumentID: string;\n RequiresFileType: boolean;\n /** FK to ScheduledAction entity, null if no schedule configured */\n ScheduledActionID: string | null;\n /** Denormalized name of the linked ScheduledAction */\n ScheduledActionName: string | null;\n /** Human-readable schedule description (parsed from cron) */\n ScheduleDescription: string | null;\n}\n\nexport interface ContentTypeCard {\n ID: string;\n Name: string;\n Description: string;\n AIModelName: string;\n AIModelID: string;\n MinTags: number;\n MaxTags: number;\n SourcesUsing: number;\n ItemsTagged: number;\n RangeLeftPct: number;\n RangeRightPct: number;\n EmbeddingModelID: string;\n VectorIndexID: string;\n}\n\nexport interface TagRow {\n Tag: string;\n UsageCount: number;\n AvgWeight: number;\n BarWidthPct: number;\n TopSource: string;\n FirstSeen: string;\n}\n\nexport interface TagCloudItem {\n Tag: string;\n AvgWeight: number;\n SizeClass: 'large' | '' | 'small';\n}\n\nexport interface TagBySource {\n SourceName: string;\n Count: number;\n}\n\nexport interface RunHistoryRow {\n ID: string;\n Status: string;\n StatusClass: string;\n SourceName: string;\n StartedDisplay: string;\n Duration: string;\n Items: string;\n Tags: string;\n Errors: string;\n ErrorClass: string;\n}\n\nexport interface DropdownOption {\n ID: string;\n Name: string;\n}\n\n/** G3: Content item duplicate pair for review */\nexport interface ContentDuplicateRow {\n ID: string;\n ItemAName: string;\n ItemASource: string;\n ItemBName: string;\n ItemBSource: string;\n SimilarityScore: number;\n DetectionMethod: string;\n Status: 'Pending' | 'Confirmed' | 'Dismissed' | 'Merged';\n}\n\n/** D2/D3/D8: Per-source detail row for a specific pipeline run */\nexport interface RunDetailRow {\n SourceName: string;\n SourceType: string;\n Status: string;\n StatusClass: string;\n ItemsProcessed: number;\n ItemsTagged: number;\n ItemsVectorized: number;\n ErrorCount: number;\n TotalTokens: number;\n TotalCost: number;\n Duration: string;\n}\n\n// ── Taxonomy Governance interfaces ──\n\nexport type TaxonomySubTab = 'tree' | 'duplicates' | 'orphans' | 'treemap' | 'audit';\n\nexport interface TaxTreeNode {\n ID: string;\n Name: string;\n DisplayName: string;\n Description: string;\n ParentID: string | null;\n Depth: number;\n Children: TaxTreeNode[];\n ItemCount: number;\n AvgWeight: number;\n HealthColor: 'green' | 'yellow' | 'red';\n IsExpanded: boolean;\n IsSelected: boolean;\n FirstSeen: string;\n}\n\nexport interface TaxDuplicatePair {\n TagA: string;\n TagB: string;\n TagAID: string;\n TagBID: string;\n Similarity: number;\n SeverityClass: 'high' | 'moderate';\n /** True when multiple Tag records share the same name (case-insensitive) */\n IsExactDuplicate: boolean;\n /** How many Tag records share this exact name (only set when IsExactDuplicate) */\n ExactDuplicateCount: number;\n /** All Tag IDs sharing the exact name (only set when IsExactDuplicate) */\n AllIDs: string[];\n}\n\nexport interface TaxOrphanCard {\n ID: string;\n Name: string;\n UsageCount: number;\n AvgWeight: number;\n FirstSeen: string;\n LastSeen: string;\n IsSelected: boolean;\n}\n\nexport interface TaxTreemapCell {\n ID: string;\n Name: string;\n ItemCount: number;\n ColorClass: string;\n RowSpan: number;\n}\n\n/** Supported audit action types — matches DB Action values (lowercased) */\nexport type TaxAuditAction = 'created' | 'merged' | 'moved' | 'deleted' | 'renamed' | 'deprecated' | 'descriptionchanged' | 'reactivated' | 'split';\n\nexport interface TaxAuditEvent {\n Type: TaxAuditAction;\n Description: string;\n TagRef: string;\n User: string;\n Timestamp: string;\n DayHeader: string;\n}\n\nexport interface TaxHealthStat {\n Total: number;\n Healthy: number;\n NeedAttention: number;\n Orphaned: number;\n Duplicates: number;\n}\n\nexport interface WeightedTag {\n Tag: string;\n Weight: number;\n}\n\n/** Status value for embedding or tagging pipeline phases */\nexport type ItemPipelineStatus = 'Complete' | 'Processing' | 'Failed' | 'Pending';\n\nexport interface ContentItemDetail {\n ID: string;\n Name: string;\n SourceName: string;\n SourceTypeName: string;\n ContentTypeName: string;\n FileTypeName: string;\n URL: string;\n TextContent: string;\n Checksum: string;\n Tags: WeightedTag[];\n CreatedAt: string;\n UpdatedAt: string;\n ContentSourceID: string;\n ContentSourceTypeID: string;\n StatusDot: 'complete' | 'processing' | 'error';\n TagCount: number;\n /** Whether this source type uses content/file type (false for Entity sources) */\n RequiresContentType: boolean;\n /** Entity record ID if source is entity type (for direct entity navigation) */\n EntityRecordID: string | null;\n /** Entity name if source is entity type */\n EntityName: string | null;\n /** Embedding pipeline status for this content item */\n EmbeddingStatus: ItemPipelineStatus;\n /** Tagging pipeline status for this content item */\n TaggingStatus: ItemPipelineStatus;\n}\n\nexport interface SourceDetailInfo {\n ID: string;\n Name: string;\n SourceTypeName: string;\n FileTypeName: string;\n ContentTypeName: string;\n RequiresFileType: boolean;\n StatusClass: 'active' | 'error' | 'inactive';\n StatusLabel: string;\n Icon: string;\n URL: string;\n EmbeddingModelName: string;\n VectorIndexName: string;\n ItemCount: number;\n TagCount: number;\n AvgTags: string;\n LastRunAgo: string;\n ErrorCount: number;\n ContentItems: ContentItemDetail[];\n RunHistory: RunHistoryRow[];\n}\n\n// ── Phase 4: Audit / Analytics ──\n\n/**\n * A single content-item row shown in {@link ClassifyItemGridComponent}. Built from\n * a narrow `ResultType:'simple'` projection of `MJ: Content Items` — no BaseEntity.\n */\nexport interface ClassifyItemGridRow {\n ID: string;\n DisplayName: string;\n SourceName: string;\n TagCount: number;\n EmbeddingStatus: string;\n TaggingStatus: string;\n UpdatedAt: string;\n /** Raw ISO timestamp used for sorting (the grid renders UpdatedAt formatted). */\n UpdatedAtRaw: string;\n}\n\n/**\n * A single tag on a content item, enriched with the LLM provenance fields\n * (Reasoning + AIPromptRunID) surfaced in {@link ClassifyItemDrilldownComponent}.\n */\nexport interface ClassifyDrilldownTag {\n Tag: string;\n Weight: number;\n /** The LLM's justification for this tag, when captured at extraction time. */\n Reasoning: string | null;\n /** FK to the AI Prompt Run that produced this tag (provenance link). */\n AIPromptRunID: string | null;\n CreatedAt: string;\n}\n\n/** A single provenance fact shown in the drilldown's Provenance section. */\nexport interface ClassifyProvenanceFact {\n Label: string;\n Value: string;\n Icon: string;\n /** Optional record reference the user can open (entity + id). */\n RecordEntity?: string;\n RecordID?: string;\n}\n\n/** A single audit-trail entry shown in the drilldown's Audit section. */\nexport interface ClassifyAuditEntry {\n Label: string;\n Timestamp: string;\n Icon: string;\n}\n\n// ── Slide-in form mode ──\n\nexport type FormMode = 'none' | 'add-source' | 'edit-source' | 'add-type' | 'edit-type';\n\n// ── Dry-run preview ──\n\n/** Per-disposition tally for the dry-run summary line. */\nexport interface DryRunDispositionCount {\n AutoApply: number;\n RouteToInbox: number;\n CreateNew: number;\n Reject: number;\n}\n\n/** Illustrative token/cost estimate shown on the dry-run preview banner. */\nexport interface DryRunEstimate {\n ItemsSampled: number;\n /** Rough total token estimate (clearly marked illustrative in the UI). */\n EstimatedTokens: number;\n /** Rough dollar cost estimate derived from EstimatedTokens. */\n EstimatedCost: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"classify.types.js","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/shared/classify.types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * @fileoverview Shared types & interfaces for the Classify (autotagging) sub-app.\n * Extracted verbatim from the former monolith so host, tabs, and dialogs share one contract.\n */\n\n// ── Tab type ──\n\nexport type TabName = 'pipeline' | 'sources' | 'types' | 'tags' | 'taxonomy' | 'inbox' | 'health' | 'history';\n\n// ── Interfaces ──\n\nexport interface NavItem {\n Tab: TabName;\n Icon: string;\n Label: string;\n BadgeText: string;\n BadgeClass: string;\n}\n\nexport interface KPIMetric {\n Label: string;\n Value: number;\n Icon: string;\n Trend: string;\n TrendUp: boolean;\n}\n\nexport interface PipelineStageInfo {\n Name: string;\n Icon: string;\n Status: 'idle' | 'active' | 'complete';\n Count: string;\n}\n\nexport interface FeedItem {\n Name: string;\n SourceName: string;\n Tags: string[];\n TimeAgo: string;\n Status: 'complete' | 'processing' | 'error';\n}\n\nexport interface SourceMini {\n ID: string;\n Name: string;\n Icon: string;\n Meta: string;\n StatusClass: 'active' | 'error' | 'inactive';\n}\n\nexport interface SourceCard {\n ID: string;\n Name: string;\n SourceTypeName: string;\n ContentTypeName: string;\n FileTypeName: string;\n Icon: string;\n StatusClass: 'active' | 'error' | 'inactive';\n StatusLabel: string;\n URL: string;\n ItemCount: number;\n TagCount: number;\n AvgTags: string;\n LastRunAgo: string;\n ContentSourceTypeID: string;\n ContentTypeID: string;\n ContentFileTypeID: string;\n EmbeddingModelID: string;\n VectorIndexID: string;\n EntityID: string;\n EntityDocumentID: string;\n RequiresFileType: boolean;\n /** FK to the Scheduled Job that runs this source, null if no schedule configured */\n ScheduledJobID: string | null;\n /** Denormalized name of the linked Scheduled Job */\n ScheduledJobName: string | null;\n /** Human-readable schedule description (parsed from cron) */\n ScheduleDescription: string | null;\n}\n\nexport interface ContentTypeCard {\n ID: string;\n Name: string;\n Description: string;\n AIModelName: string;\n AIModelID: string;\n MinTags: number;\n MaxTags: number;\n SourcesUsing: number;\n ItemsTagged: number;\n RangeLeftPct: number;\n RangeRightPct: number;\n EmbeddingModelID: string;\n VectorIndexID: string;\n}\n\nexport interface TagRow {\n Tag: string;\n UsageCount: number;\n AvgWeight: number;\n BarWidthPct: number;\n TopSource: string;\n FirstSeen: string;\n}\n\nexport interface TagCloudItem {\n Tag: string;\n AvgWeight: number;\n SizeClass: 'large' | '' | 'small';\n}\n\nexport interface TagBySource {\n SourceName: string;\n Count: number;\n}\n\nexport interface RunHistoryRow {\n ID: string;\n Status: string;\n StatusClass: string;\n SourceName: string;\n StartedDisplay: string;\n Duration: string;\n Items: string;\n Tags: string;\n Errors: string;\n ErrorClass: string;\n}\n\nexport interface DropdownOption {\n ID: string;\n Name: string;\n}\n\n/** G3: Content item duplicate pair for review */\nexport interface ContentDuplicateRow {\n ID: string;\n ItemAName: string;\n ItemASource: string;\n ItemBName: string;\n ItemBSource: string;\n SimilarityScore: number;\n DetectionMethod: string;\n Status: 'Pending' | 'Confirmed' | 'Dismissed' | 'Merged';\n}\n\n/** D2/D3/D8: Per-source detail row for a specific pipeline run */\nexport interface RunDetailRow {\n SourceName: string;\n SourceType: string;\n Status: string;\n StatusClass: string;\n ItemsProcessed: number;\n ItemsTagged: number;\n ItemsVectorized: number;\n ErrorCount: number;\n TotalTokens: number;\n TotalCost: number;\n Duration: string;\n}\n\n// ── Taxonomy Governance interfaces ──\n\nexport type TaxonomySubTab = 'tree' | 'duplicates' | 'orphans' | 'treemap' | 'audit';\n\nexport interface TaxTreeNode {\n ID: string;\n Name: string;\n DisplayName: string;\n Description: string;\n ParentID: string | null;\n Depth: number;\n Children: TaxTreeNode[];\n ItemCount: number;\n AvgWeight: number;\n HealthColor: 'green' | 'yellow' | 'red';\n IsExpanded: boolean;\n IsSelected: boolean;\n FirstSeen: string;\n}\n\nexport interface TaxDuplicatePair {\n TagA: string;\n TagB: string;\n TagAID: string;\n TagBID: string;\n Similarity: number;\n SeverityClass: 'high' | 'moderate';\n /** True when multiple Tag records share the same name (case-insensitive) */\n IsExactDuplicate: boolean;\n /** How many Tag records share this exact name (only set when IsExactDuplicate) */\n ExactDuplicateCount: number;\n /** All Tag IDs sharing the exact name (only set when IsExactDuplicate) */\n AllIDs: string[];\n}\n\nexport interface TaxOrphanCard {\n ID: string;\n Name: string;\n UsageCount: number;\n AvgWeight: number;\n FirstSeen: string;\n LastSeen: string;\n IsSelected: boolean;\n}\n\nexport interface TaxTreemapCell {\n ID: string;\n Name: string;\n ItemCount: number;\n ColorClass: string;\n RowSpan: number;\n}\n\n/** Supported audit action types — matches DB Action values (lowercased) */\nexport type TaxAuditAction = 'created' | 'merged' | 'moved' | 'deleted' | 'renamed' | 'deprecated' | 'descriptionchanged' | 'reactivated' | 'split';\n\nexport interface TaxAuditEvent {\n Type: TaxAuditAction;\n Description: string;\n TagRef: string;\n User: string;\n Timestamp: string;\n DayHeader: string;\n}\n\nexport interface TaxHealthStat {\n Total: number;\n Healthy: number;\n NeedAttention: number;\n Orphaned: number;\n Duplicates: number;\n}\n\nexport interface WeightedTag {\n Tag: string;\n Weight: number;\n}\n\n/** Status value for embedding or tagging pipeline phases */\nexport type ItemPipelineStatus = 'Complete' | 'Processing' | 'Failed' | 'Pending';\n\nexport interface ContentItemDetail {\n ID: string;\n Name: string;\n SourceName: string;\n SourceTypeName: string;\n ContentTypeName: string;\n FileTypeName: string;\n URL: string;\n TextContent: string;\n Checksum: string;\n Tags: WeightedTag[];\n CreatedAt: string;\n UpdatedAt: string;\n ContentSourceID: string;\n ContentSourceTypeID: string;\n StatusDot: 'complete' | 'processing' | 'error';\n TagCount: number;\n /** Whether this source type uses content/file type (false for Entity sources) */\n RequiresContentType: boolean;\n /** Entity record ID if source is entity type (for direct entity navigation) */\n EntityRecordID: string | null;\n /** Entity name if source is entity type */\n EntityName: string | null;\n /** Embedding pipeline status for this content item */\n EmbeddingStatus: ItemPipelineStatus;\n /** Tagging pipeline status for this content item */\n TaggingStatus: ItemPipelineStatus;\n}\n\nexport interface SourceDetailInfo {\n ID: string;\n Name: string;\n SourceTypeName: string;\n FileTypeName: string;\n ContentTypeName: string;\n RequiresFileType: boolean;\n StatusClass: 'active' | 'error' | 'inactive';\n StatusLabel: string;\n Icon: string;\n URL: string;\n EmbeddingModelName: string;\n VectorIndexName: string;\n ItemCount: number;\n TagCount: number;\n AvgTags: string;\n LastRunAgo: string;\n ErrorCount: number;\n ContentItems: ContentItemDetail[];\n RunHistory: RunHistoryRow[];\n}\n\n// ── Phase 4: Audit / Analytics ──\n\n/**\n * A single content-item row shown in {@link ClassifyItemGridComponent}. Built from\n * a narrow `ResultType:'simple'` projection of `MJ: Content Items` — no BaseEntity.\n */\nexport interface ClassifyItemGridRow {\n ID: string;\n DisplayName: string;\n SourceName: string;\n TagCount: number;\n EmbeddingStatus: string;\n TaggingStatus: string;\n UpdatedAt: string;\n /** Epoch-ms timestamp used for sorting (the grid renders UpdatedAt formatted); 0 when absent. */\n UpdatedAtRaw: number;\n}\n\n/**\n * A single tag on a content item, enriched with the LLM provenance fields\n * (Reasoning + AIPromptRunID) surfaced in {@link ClassifyItemDrilldownComponent}.\n */\nexport interface ClassifyDrilldownTag {\n Tag: string;\n Weight: number;\n /** The LLM's justification for this tag, when captured at extraction time. */\n Reasoning: string | null;\n /** FK to the AI Prompt Run that produced this tag (provenance link). */\n AIPromptRunID: string | null;\n CreatedAt: string;\n}\n\n/** A single provenance fact shown in the drilldown's Provenance section. */\nexport interface ClassifyProvenanceFact {\n Label: string;\n Value: string;\n Icon: string;\n /** Optional record reference the user can open (entity + id). */\n RecordEntity?: string;\n RecordID?: string;\n}\n\n/** A single audit-trail entry shown in the drilldown's Audit section. */\nexport interface ClassifyAuditEntry {\n Label: string;\n Timestamp: string;\n Icon: string;\n}\n\n// ── Slide-in form mode ──\n\nexport type FormMode = 'none' | 'add-source' | 'edit-source' | 'add-type' | 'edit-type';\n\n// ── Dry-run preview ──\n\n/** Per-disposition tally for the dry-run summary line. */\nexport interface DryRunDispositionCount {\n AutoApply: number;\n RouteToInbox: number;\n CreateNew: number;\n Reject: number;\n}\n\n/** Illustrative token/cost estimate shown on the dry-run preview banner. */\nexport interface DryRunEstimate {\n ItemsSampled: number;\n /** Rough total token estimate (clearly marked illustrative in the UI). */\n EstimatedTokens: number;\n /** Rough dollar cost estimate derived from EstimatedTokens. */\n EstimatedCost: number;\n}\n"]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Self-contained sub-page: owns its header-interior, the source cards grid,
|
|
5
5
|
* the per-source detail slide-in, and the quick-schedule dialog. Receives the
|
|
6
6
|
* shared raw data needed to build the cards (sources, items, tags, runs, and
|
|
7
|
-
* the cached
|
|
7
|
+
* the cached Scheduled Job + EntityRecordDocument lookups) from the host
|
|
8
8
|
* orchestrator via `@Input()`. Cross-tab concerns — opening the add/edit slide-in
|
|
9
9
|
* form, running the pipeline, opening a content-item detail, and reloading the
|
|
10
10
|
* shared source list after a mutation — bubble up via `@Output()`.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { EventEmitter } from '@angular/core';
|
|
16
16
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
17
|
-
import {
|
|
17
|
+
import { MJScheduledJobEntity } from '@memberjunction/core-entities';
|
|
18
18
|
import { SourceCard, SourceDetailInfo, ContentItemDetail, ItemPipelineStatus } from '../shared/classify.types';
|
|
19
19
|
import { formatNumber } from '../shared/classify.format';
|
|
20
20
|
import * as i0 from "@angular/core";
|
|
@@ -45,10 +45,10 @@ export declare class ClassifySourcesTabComponent extends BaseAngularComponent {
|
|
|
45
45
|
private _totalTagCount;
|
|
46
46
|
set TotalTagCount(value: number);
|
|
47
47
|
get TotalTagCount(): number;
|
|
48
|
-
/** Cached
|
|
49
|
-
private
|
|
50
|
-
set
|
|
51
|
-
get
|
|
48
|
+
/** Cached Scheduled Job entities, keyed by normalized ID, supplied by the host. */
|
|
49
|
+
private _scheduledJobs;
|
|
50
|
+
set ScheduledJobs(value: Map<string, MJScheduledJobEntity>);
|
|
51
|
+
get ScheduledJobs(): Map<string, MJScheduledJobEntity>;
|
|
52
52
|
/** Cache: EntityRecordDocument ID → RecordID, supplied by the host. */
|
|
53
53
|
private _entityRecordDocCache;
|
|
54
54
|
set EntityRecordDocCache(value: Map<string, string>);
|
|
@@ -120,21 +120,21 @@ export declare class ClassifySourcesTabComponent extends BaseAngularComponent {
|
|
|
120
120
|
private inferPipelineStatuses;
|
|
121
121
|
private mapStatusString;
|
|
122
122
|
formatRelativeTime(dateStr: string | null | undefined): string;
|
|
123
|
-
/** Looks up the cron expression for a cached
|
|
124
|
-
private
|
|
123
|
+
/** Looks up the cron expression for a cached Scheduled Job by ID */
|
|
124
|
+
private getScheduledJobCron;
|
|
125
125
|
/** Returns the CSS class for a pipeline status badge color */
|
|
126
126
|
GetStatusBadgeClass(status: ItemPipelineStatus): string;
|
|
127
127
|
DeleteSource(card: SourceCard): Promise<void>;
|
|
128
128
|
OpenScheduleDialog(card: SourceCard): void;
|
|
129
129
|
CloseScheduleDialog(): void;
|
|
130
130
|
/**
|
|
131
|
-
* Saves a new
|
|
132
|
-
* ContentSource.
|
|
131
|
+
* Saves a new Scheduled Job (type: Action) for the current source, links it via
|
|
132
|
+
* ContentSource.ScheduledJobID, and creates the default action params
|
|
133
133
|
* for the Autotag and Vectorize action.
|
|
134
134
|
*/
|
|
135
135
|
SaveSchedule(): Promise<void>;
|
|
136
136
|
/**
|
|
137
|
-
* Removes the schedule from a source card by unlinking the
|
|
137
|
+
* Removes the schedule from a source card by unlinking the ScheduledJobID.
|
|
138
138
|
*/
|
|
139
139
|
RemoveSchedule(card: SourceCard): Promise<void>;
|
|
140
140
|
/** Returns the human-readable schedule description for a source card. */
|
|
@@ -144,13 +144,8 @@ export declare class ClassifySourcesTabComponent extends BaseAngularComponent {
|
|
|
144
144
|
/** Finds the Action ID for "Autotag and Vectorize Content" by querying actions */
|
|
145
145
|
private findAutotagActionID;
|
|
146
146
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*/
|
|
150
|
-
private createSourceIDParam;
|
|
151
|
-
/**
|
|
152
|
-
* Links (or unlinks) a ScheduledAction to a ContentSource by updating
|
|
153
|
-
* the ContentSource.ScheduledActionID field.
|
|
147
|
+
* Links (or unlinks) a Scheduled Job to a ContentSource by updating
|
|
148
|
+
* the ContentSource.ScheduledJobID field.
|
|
154
149
|
*/
|
|
155
150
|
private linkScheduleToSource;
|
|
156
151
|
OpenSourceDetail(card: SourceCard): Promise<void>;
|
|
@@ -173,6 +168,6 @@ export declare class ClassifySourcesTabComponent extends BaseAngularComponent {
|
|
|
173
168
|
private loadContentItemsForSource;
|
|
174
169
|
private loadRunHistoryForSource;
|
|
175
170
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClassifySourcesTabComponent, never>;
|
|
176
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ClassifySourcesTabComponent, "classify-sources-tab", never, { "Sources": { "alias": "Sources"; "required": false; }; "Items": { "alias": "Items"; "required": false; }; "Tags": { "alias": "Tags"; "required": false; }; "Runs": { "alias": "Runs"; "required": false; }; "TotalItemCount": { "alias": "TotalItemCount"; "required": false; }; "TotalTagCount": { "alias": "TotalTagCount"; "required": false; }; "
|
|
171
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClassifySourcesTabComponent, "classify-sources-tab", never, { "Sources": { "alias": "Sources"; "required": false; }; "Items": { "alias": "Items"; "required": false; }; "Tags": { "alias": "Tags"; "required": false; }; "Runs": { "alias": "Runs"; "required": false; }; "TotalItemCount": { "alias": "TotalItemCount"; "required": false; }; "TotalTagCount": { "alias": "TotalTagCount"; "required": false; }; "ScheduledJobs": { "alias": "ScheduledJobs"; "required": false; }; "EntityRecordDocCache": { "alias": "EntityRecordDocCache"; "required": false; }; }, { "AddSourceRequested": "AddSourceRequested"; "AddSourceGuidedRequested": "AddSourceGuidedRequested"; "EditSourceRequested": "EditSourceRequested"; "RunSourceRequested": "RunSourceRequested"; "OpenContentItemRequested": "OpenContentItemRequested"; "DataChanged": "DataChanged"; }, never, never, false, never>;
|
|
177
172
|
}
|
|
178
173
|
//# sourceMappingURL=sources-tab.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sources-tab.component.d.ts","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/tabs/sources-tab.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAgC,YAAY,EAAyB,MAAM,eAAe,CAAC;AAGlG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAIrE,OAAO,EAA8B,
|
|
1
|
+
{"version":3,"file":"sources-tab.component.d.ts","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/tabs/sources-tab.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAgC,YAAY,EAAyB,MAAM,eAAe,CAAC;AAGlG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAIrE,OAAO,EAA8B,oBAAoB,EAAyB,MAAM,+BAA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