@memberjunction/ng-dashboards 6.2.0-edge.4 → 6.2.0-edge.6
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/README.md +28 -0
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +15 -7
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +7 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +209 -57
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +12 -11
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +15 -15
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -1
- package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
- package/dist/AI/components/execution-monitoring.component.js +28 -16
- package/dist/AI/components/execution-monitoring.component.js.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +30 -6
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.d.ts +1 -1
- package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +15 -7
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/sensitive-fields.d.ts +58 -0
- package/dist/AI/components/vectors/sensitive-fields.d.ts.map +1 -0
- package/dist/AI/components/vectors/sensitive-fields.js +251 -0
- package/dist/AI/components/vectors/sensitive-fields.js.map +1 -0
- package/dist/AI/components/vectors/vector-document-rules.d.ts +139 -0
- package/dist/AI/components/vectors/vector-document-rules.d.ts.map +1 -0
- package/dist/AI/components/vectors/vector-document-rules.js +182 -0
- package/dist/AI/components/vectors/vector-document-rules.js.map +1 -0
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts +83 -14
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +546 -271
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-store-selection.d.ts +32 -0
- package/dist/AI/components/vectors/vector-store-selection.d.ts.map +1 -0
- package/dist/AI/components/vectors/vector-store-selection.js +57 -0
- package/dist/AI/components/vectors/vector-store-selection.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts +236 -0
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.js +374 -0
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts +195 -0
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js +2910 -0
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js.map +1 -0
- package/dist/ChiefOfStaff/index.d.ts +3 -0
- package/dist/ChiefOfStaff/index.d.ts.map +1 -0
- package/dist/ChiefOfStaff/index.js +3 -0
- package/dist/ChiefOfStaff/index.js.map +1 -0
- package/dist/Communication/communication-agent-context.d.ts +11 -1
- package/dist/Communication/communication-agent-context.d.ts.map +1 -1
- package/dist/Communication/communication-agent-context.js +15 -0
- package/dist/Communication/communication-agent-context.js.map +1 -1
- package/dist/Communication/communication-dashboard.component.d.ts.map +1 -1
- package/dist/Communication/communication-dashboard.component.js +5 -0
- package/dist/Communication/communication-dashboard.component.js.map +1 -1
- package/dist/Communication/communication-logs-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-logs-resource.component.js +2 -1
- package/dist/Communication/communication-logs-resource.component.js.map +1 -1
- package/dist/Communication/communication-monitor-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-monitor-resource.component.js +23 -18
- package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
- package/dist/Communication/communication-providers-resource.component.d.ts +27 -1
- package/dist/Communication/communication-providers-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-providers-resource.component.js +722 -78
- package/dist/Communication/communication-providers-resource.component.js.map +1 -1
- package/dist/Communication/communication-runs-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-runs-resource.component.js +11 -10
- package/dist/Communication/communication-runs-resource.component.js.map +1 -1
- package/dist/DashboardEditor/dashboard-editor.component.d.ts +17 -2
- package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -1
- package/dist/DashboardEditor/dashboard-editor.component.js +94 -43
- package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +49 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +220 -55
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DataExplorer/models/explorer-state.interface.d.ts +2 -0
- package/dist/DataExplorer/models/explorer-state.interface.d.ts.map +1 -1
- package/dist/DataExplorer/models/explorer-state.interface.js.map +1 -1
- package/dist/DevTools/app-state-inspector.component.d.ts.map +1 -1
- package/dist/DevTools/app-state-inspector.component.js +1 -0
- package/dist/DevTools/app-state-inspector.component.js.map +1 -1
- package/dist/DevTools/class-registry.component.d.ts.map +1 -1
- package/dist/DevTools/class-registry.component.js +1 -0
- package/dist/DevTools/class-registry.component.js.map +1 -1
- package/dist/DevTools/event-monitor.component.d.ts.map +1 -1
- package/dist/DevTools/event-monitor.component.js +2 -0
- package/dist/DevTools/event-monitor.component.js.map +1 -1
- package/dist/DevTools/graphql-console.component.d.ts.map +1 -1
- package/dist/DevTools/graphql-console.component.js.map +1 -1
- package/dist/DevTools/grid-width-lab.component.d.ts.map +1 -1
- package/dist/DevTools/grid-width-lab.component.js +1 -0
- package/dist/DevTools/grid-width-lab.component.js.map +1 -1
- package/dist/DevTools/layout-inspector.component.d.ts.map +1 -1
- package/dist/DevTools/layout-inspector.component.js +1 -0
- package/dist/DevTools/layout-inspector.component.js.map +1 -1
- package/dist/DevTools/lazy-module-status.component.d.ts.map +1 -1
- package/dist/DevTools/lazy-module-status.component.js +1 -0
- package/dist/DevTools/lazy-module-status.component.js.map +1 -1
- package/dist/DevTools/settings-explorer.component.d.ts.map +1 -1
- package/dist/DevTools/settings-explorer.component.js +1 -0
- package/dist/DevTools/settings-explorer.component.js.map +1 -1
- package/dist/DevTools/tab-strip-lab.component.d.ts.map +1 -1
- package/dist/DevTools/tab-strip-lab.component.js +1 -0
- package/dist/DevTools/tab-strip-lab.component.js.map +1 -1
- package/dist/EntityAdmin/entity-admin-dashboard.component.d.ts +5 -0
- package/dist/EntityAdmin/entity-admin-dashboard.component.d.ts.map +1 -1
- package/dist/EntityAdmin/entity-admin-dashboard.component.js +8 -5
- package/dist/EntityAdmin/entity-admin-dashboard.component.js.map +1 -1
- package/dist/Integration/components/overview/overview.component.js +2 -2
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js +2 -2
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js.map +1 -1
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipeline.engine.d.ts +11 -1
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipeline.engine.d.ts.map +1 -1
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipeline.engine.js +24 -2
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipeline.engine.js.map +1 -1
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.d.ts +16 -2
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.d.ts.map +1 -1
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.js +87 -33
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.js.map +1 -1
- package/dist/LoginStudio/login-studio-inspector.component.d.ts +130 -0
- package/dist/LoginStudio/login-studio-inspector.component.d.ts.map +1 -0
- package/dist/LoginStudio/login-studio-inspector.component.js +781 -0
- package/dist/LoginStudio/login-studio-inspector.component.js.map +1 -0
- package/dist/LoginStudio/login-studio-resource.component.d.ts +161 -0
- package/dist/LoginStudio/login-studio-resource.component.d.ts.map +1 -0
- package/dist/LoginStudio/login-studio-resource.component.js +890 -0
- package/dist/LoginStudio/login-studio-resource.component.js.map +1 -0
- package/dist/MCP/mcp-dashboard.component.d.ts +24 -4
- package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
- package/dist/MCP/mcp-dashboard.component.js +118 -65
- package/dist/MCP/mcp-dashboard.component.js.map +1 -1
- package/dist/PredictiveStudio/business-predictions.view-models.d.ts +1 -1
- package/dist/PredictiveStudio/business-predictions.view-models.d.ts.map +1 -1
- package/dist/PredictiveStudio/business-predictions.view-models.js +3 -3
- package/dist/PredictiveStudio/business-predictions.view-models.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-experiments.component.d.ts +6 -63
- package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-experiments.component.js +256 -521
- package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts +0 -18
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +122 -249
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts +5 -9
- package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipelines.component.js +98 -130
- package/dist/PredictiveStudio/components/ps-pipelines.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts +53 -4
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +335 -326
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts +19 -0
- package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts.map +1 -0
- package/dist/PredictiveStudio/components/ps-row-drivers.component.js +85 -0
- package/dist/PredictiveStudio/components/ps-row-drivers.component.js.map +1 -0
- package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts +19 -1
- package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts.map +1 -1
- package/dist/PredictiveStudio/engine/predictive-studio.engine.js +51 -2
- package/dist/PredictiveStudio/engine/predictive-studio.engine.js.map +1 -1
- package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts +3 -1
- package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts.map +1 -1
- package/dist/PredictiveStudio/predictive-studio-agent-context.js +3 -0
- package/dist/PredictiveStudio/predictive-studio-agent-context.js.map +1 -1
- package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts +27 -4
- package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts.map +1 -1
- package/dist/PredictiveStudio/predictive-studio-score-history.service.js +94 -61
- package/dist/PredictiveStudio/predictive-studio-score-history.service.js.map +1 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts +29 -5
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +185 -103
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
- package/dist/PredictiveStudio/resources/ps-studio-resource.component.js +1 -1
- package/dist/PredictiveStudio/resources/ps-studio-resource.component.js.map +1 -1
- package/dist/Workflows/components/workflow-runs-resource.component.js +4 -4
- package/dist/Workflows/components/workflow-runs-resource.component.js.map +1 -1
- package/dist/ai-dashboards.module.d.ts +22 -21
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +8 -2
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/core-dashboards.module.d.ts +2 -1
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +11 -3
- package/dist/core-dashboards.module.js.map +1 -1
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +4 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +72 -69
- package/dist/PredictiveStudio/at-risk.view-models.d.ts +0 -120
- package/dist/PredictiveStudio/at-risk.view-models.d.ts.map +0 -1
- package/dist/PredictiveStudio/at-risk.view-models.js +0 -261
- package/dist/PredictiveStudio/at-risk.view-models.js.map +0 -1
- package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts +0 -109
- package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts.map +0 -1
- package/dist/PredictiveStudio/components/ps-confirm-modal.component.js +0 -323
- package/dist/PredictiveStudio/components/ps-confirm-modal.component.js.map +0 -1
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts +0 -137
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts.map +0 -1
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js +0 -826
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"at-risk.view-models.js","sourceRoot":"","sources":["../../src/PredictiveStudio/at-risk.view-models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAE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AAE,CAAC,CAAC,CAAC;AACpD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,IAAI;SACR,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;SACtB,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;SAC1B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE;SACN,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC","sourcesContent":["/**\n * Pure derivations for the business workspace's **ranked at-risk list** — turning a model's per-record\n * scoring results (`MJ: Process Run Details` payloads) into a \"who to focus on\" list sorted by risk, and\n * the model's global feature importance into plain-language \"what's driving this\" drivers.\n *\n * Honest about the gap: MJ stores only GLOBAL feature importance (not per-record/SHAP), so we surface the\n * top global drivers once for the whole prediction rather than fabricating per-member attribution.\n *\n * Framework-free + deterministic → unit-tested with no Angular.\n */\n\nimport {\n type OutcomeConfig,\n resolveScoreBand,\n} from '@memberjunction/predictive-studio-core';\n\n/** A scored record in the at-risk list. */\nexport interface AtRiskRow {\n recordId: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /**\n * Human-readable label for the record (e.g. the member's name/email), resolved from the model's\n * target entity. Null until resolved; the UI falls back to {@link recordId} so the row is never blank.\n */\n label: string | null; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** 0–1 prediction score (probability / risk). */\n score: number; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** Risk as a 0–100 integer, for display. */\n riskPct: number; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** Predicted class label, when present (classification). */\n class: string | null; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** Risk band, for color / filtering. */\n band: 'high' | 'medium' | 'low' | string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** Qualitative status label (e.g. \"High\", \"Critical\", \"Low Risk\"). */\n status?: string; // case-violation-ok-legacy-back-compat: optional, and the old name is also read off a value the checker cannot type; renaming it stays assignable and silently yields undefined\n /** Semantic badge color. */\n badgeColor?: string; // case-violation-ok-legacy-back-compat: optional, and the old name is also read off a value the checker cannot type; renaming it stays assignable and silently yields undefined\n /** Icon class. */\n icon?: string; // case-violation-ok-legacy-back-compat: optional, and the old name is also read off a value the checker cannot type; renaming it stays assignable and silently yields undefined\n /**\n * Top signed per-record drivers behind THIS row's prediction (P1-5), humanized + one-hot-collapsed for\n * display. `up: true` pushed the risk up, `false` down. Null when the model doesn't produce per-record\n * attribution (tree/ensemble/multiclass) — the UI then shows the model's global drivers instead.\n */\n drivers: RowDriver[] | null; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n}\n\n/** A humanized, signed per-record driver for the at-risk row's inline \"why\". */\nexport interface RowDriver {\n /** Display label (humanized, one-hot base collapsed). */\n label: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** Signed contribution magnitude for this row. */\n value: number; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n /** Whether this pushed the risk UP (value > 0) or down. */\n up: boolean; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n}\n\n/** Parse + humanize the raw per-record `drivers` (post-preprocessing `feature`/`value`) into {@link RowDriver}s. */\nexport function ParseRowDrivers(raw: unknown): RowDriver[] | null {\n if (!Array.isArray(raw) || raw.length === 0) return null;\n const out: RowDriver[] = [];\n for (const d of raw as Array<{ feature?: unknown; value?: unknown; importance?: unknown; weight?: unknown }>) {\n const feature = typeof d?.feature === 'string' ? d.feature : '';\n const rawVal = typeof d?.value === 'number' ? d.value : typeof d?.importance === 'number' ? d.importance : typeof d?.weight === 'number' ? d.weight : NaN;\n const value = Number(rawVal);\n if (!feature || !Number.isFinite(value)) continue;\n // Keep the one-hot category: for a per-record \"why\", the category IS the story — \"Membership Type =\n // Student lowers risk\" is actionable where a collapsed \"Membership Type\" is close to meaningless.\n // (Collapsing across categories is only right for GLOBAL importance — see topGlobalDrivers.)\n out.push({ label: HumanizeFeatureName(feature), value, up: value > 0 });\n }\n return out.length > 0 ? out : null;\n}\n\n/** @deprecated Use {@link ParseRowDrivers}. */\nexport function parseRowDrivers(raw: unknown): RowDriver[] | null {\n return ParseRowDrivers(raw);\n}\n\n/**\n * Build a human-readable label for a record from its (simple) row of the target entity — preferring a\n * single `Name`, else `FirstName`+`LastName`, else `Email`, else any first non-empty string field.\n * Returns null when nothing usable is found (caller falls back to the record id).\n */\nexport function LabelFromRecord(row: Record<string, unknown> | undefined | null): string | null {\n if (!row) return null;\n const str = (v: unknown): string => (typeof v === 'string' ? v.trim() : '');\n const member = str(row['MemberName'] || row['Member'] || row['FullName']);\n if (member) return member;\n const name = str(row['Name']);\n if (name) return name;\n const full = `${str(row['FirstName'])} ${str(row['LastName'])}`.trim();\n const email = str(row['Email']);\n if (full && email) return `${full} (${email})`;\n if (full) return full;\n if (email) return email;\n for (const v of Object.values(row)) {\n const s = str(v);\n if (s && s.length <= 120) return s;\n }\n return null;\n}\n\n/** @deprecated Use {@link LabelFromRecord}. */\nexport function labelFromRecord(row: Record<string, unknown> | undefined | null): string | null {\n return LabelFromRecord(row);\n}\n\n/** The raw per-record detail the list is built from (a slice of `MJ: Process Run Details`). */\nexport interface RunDetailLike {\n recordId: string; // case-violation-ok-legacy-back-compat: the old name is also read off a value typed `any`, where a rename would compile and silently return undefined\n ResultPayload?: string | null;\n}\n\n/** Options for parsing predictions into at-risk rows. */\nexport interface ParseAtRiskOptions {\n /**\n * When true, the model predicts probability of a positive outcome (e.g. `P(Renewed)`).\n * Churn / adverse risk is therefore inverted: `riskScore = 1.0 - score`.\n * High score (0.99) -> Low Risk (1%, green). Low score (0.10) -> High Risk (90%, red).\n */\n InvertedRisk?: boolean;\n /**\n * Configured outcome metadata for the model (labels, thresholds, colors, icons).\n * When provided, `resolveScoreBand()` evaluates the dynamic band, status, badgeColor, and icon.\n */\n OutcomeConfig?: OutcomeConfig;\n}\n\n/** Result of detecting whether a model is a renewal model and what its output score represents. */\nexport interface RenewalPolarityResult {\n IsRenewalModel: boolean;\n /**\n * True if `score` represents adverse lapse risk (P(Lapse) / Churn Risk), e.g. 0.01 = 1% risk.\n * False if `score` represents positive outcome probability (P(Renewed)), e.g. 0.99 = 99% renewal chance.\n */\n ScoreIsLapseRisk: boolean;\n}\n\n/**\n * Robustly inspects model metadata and sample scoring payloads to determine:\n * 1. Whether this is a renewal/retention/churn model (`isRenewalModel`)\n * 2. Whether the raw payload `score` represents adverse lapse risk (P(Lapse)) or positive outcome (P(Renewed))\n */\nexport function ResolveRenewalPolarity(\n rawPayloads: Array<string | null | undefined>,\n targetVariable?: string | null,\n modelName?: string | null,\n): RenewalPolarityResult {\n const target = (targetVariable ?? '').toLowerCase();\n const name = (modelName ?? '').toLowerCase();\n const isTargetRenewal =\n target.includes('renew') ||\n target.includes('lapse') ||\n target.includes('retention') ||\n target.includes('churn') ||\n target === 'status' ||\n name.includes('renew') ||\n name.includes('retention') ||\n name.includes('churn');\n\n let hasRenewalKeywords = false;\n const sampleScoresForRenewed: number[] = [];\n\n for (const p of rawPayloads.slice(0, 50)) {\n if (!p) continue;\n if (\n p.includes('\"Renewed\"') ||\n p.includes('\"renewed\"') ||\n p.includes('\"Lapsed\"') ||\n p.includes('\"lapsed\"') ||\n p.includes('Renewal Risk')\n ) {\n hasRenewalKeywords = true;\n }\n try {\n const parsed = JSON.parse(p);\n const out = (parsed.output ?? parsed) as { score?: number; class?: string };\n if (typeof out.score === 'number' && typeof out.class === 'string') {\n const cls = out.class.toLowerCase();\n if (cls === 'renewed' || cls === 'active') {\n sampleScoresForRenewed.push(out.score);\n }\n }\n } catch {\n // skip invalid json\n }\n }\n\n const isRenewalModel = isTargetRenewal || hasRenewalKeywords;\n if (!isRenewalModel) {\n return { IsRenewalModel: false, ScoreIsLapseRisk: false };\n }\n\n if (sampleScoresForRenewed.length > 0) {\n const avg = sampleScoresForRenewed.reduce((a, b) => a + b, 0) / sampleScoresForRenewed.length;\n // If members predicted 'Renewed' have small scores (< 0.5), the score represents Lapse Risk (P(Lapse))\n return { IsRenewalModel: true, ScoreIsLapseRisk: avg < 0.5 };\n }\n\n // Fallback: target or name containing \"risk\", \"lapse\", or \"churn\" outputs lapse probability\n const scoreIsLapseRisk =\n target.includes('risk') ||\n target.includes('lapse') ||\n target.includes('churn') ||\n name.includes('risk') ||\n name.includes('churn');\n return { IsRenewalModel: true, ScoreIsLapseRisk: scoreIsLapseRisk };\n}\n\n/** @deprecated Use {@link ResolveRenewalPolarity}. */\nexport function resolveRenewalPolarity(\n rawPayloads: Array<string | null | undefined>,\n targetVariable?: string | null,\n modelName?: string | null,\n): RenewalPolarityResult {\n return ResolveRenewalPolarity(rawPayloads, targetVariable, modelName);\n}\n\nfunction bandFor(score: number): AtRiskRow['band'] {\n return score >= 0.7 ? 'high' : score >= 0.4 ? 'medium' : 'low';\n}\n\n/** Parse + rank the per-record predictions into the at-risk list (highest risk first). */\nexport function ParseAtRiskRows(details: RunDetailLike[], options?: ParseAtRiskOptions): AtRiskRow[] {\n const rows: AtRiskRow[] = [];\n const isInverted = options?.InvertedRisk === true;\n const outcomeConfig = options?.OutcomeConfig;\n\n for (const d of details) {\n if (!d.ResultPayload) continue;\n let parsed: {\n score?: number;\n class?: string;\n status?: string;\n band?: string;\n badgeColor?: string;\n icon?: string;\n drivers?: unknown;\n output?: {\n score?: number;\n class?: string;\n status?: string;\n band?: string;\n badgeColor?: string;\n icon?: string;\n drivers?: unknown;\n };\n };\n try {\n parsed = JSON.parse(d.ResultPayload);\n } catch {\n continue;\n }\n // Write-back runs nest the prediction under `output`; generic runs carry it at the top level.\n const p = parsed.output ?? parsed;\n if (typeof p.score !== 'number' || !Number.isFinite(p.score)) continue;\n const score = p.score;\n const effectiveRisk = isInverted ? Math.max(0, Math.min(1, 1 - score)) : score;\n const riskPct = Math.round(effectiveRisk * 100);\n\n let bandKey: string;\n let status: string | undefined = p.status;\n let badgeColor: string | undefined = p.badgeColor;\n let icon: string | undefined = p.icon;\n\n if (outcomeConfig) {\n const resolved = resolveScoreBand(score, outcomeConfig);\n if (resolved) {\n bandKey = resolved.Key;\n status = status ?? resolved.Label;\n badgeColor = badgeColor ?? resolved.BadgeColor;\n icon = icon ?? resolved.Icon;\n } else {\n bandKey = p.band ?? bandFor(effectiveRisk);\n }\n } else if (p.band) {\n bandKey = p.band;\n } else {\n bandKey = bandFor(effectiveRisk);\n }\n\n rows.push({\n recordId: d.recordId,\n label: null,\n score,\n riskPct,\n class: p.class ?? null,\n band: bandKey,\n status,\n badgeColor,\n icon,\n drivers: ParseRowDrivers(p.drivers),\n });\n }\n return rows.sort((a, b) => b.riskPct - a.riskPct);\n}\n\n/** @deprecated Use {@link ParseAtRiskRows}. */\nexport function parseAtRiskRows(details: RunDetailLike[], options?: ParseAtRiskOptions): AtRiskRow[] {\n return ParseAtRiskRows(details, options);\n}\n\n/**\n * The top plain-language drivers for the whole prediction, from the model's global feature importance.\n * Accepts the object form (`{\"MembershipType=Student\": 0.9, ...}`) or the array form\n * (`[{feature, importance}]`), strips one-hot `=value` suffixes, de-duplicates, and returns the\n * highest-importance feature names — so a business user sees \"what's driving this\", not raw weights.\n */\nexport function TopGlobalDrivers(featureImportanceJson: string | null | undefined, n = 3): string[] {\n if (!featureImportanceJson) return [];\n let parsed: unknown;\n try {\n parsed = JSON.parse(featureImportanceJson);\n } catch {\n return [];\n }\n const pairs: Array<{ name: string; weight: number }> = [];\n if (Array.isArray(parsed)) {\n for (const e of parsed as Array<Record<string, unknown>>) {\n const name = (e.feature ?? e.name) as string | undefined;\n const weight = (e.importance ?? e.value) as number | undefined;\n if (typeof name === 'string' && typeof weight === 'number') pairs.push({ name, weight: Math.abs(weight) });\n }\n } else if (parsed && typeof parsed === 'object') {\n for (const [name, weight] of Object.entries(parsed as Record<string, unknown>)) {\n if (typeof weight === 'number') pairs.push({ name, weight: Math.abs(weight) });\n }\n }\n // Collapse one-hot columns (\"Feature=Value\" → \"Feature\"), keeping each feature's max weight.\n const byFeature = new Map<string, number>();\n for (const { name, weight } of pairs) {\n const base = name.split('=')[0].trim();\n if (!base) continue;\n byFeature.set(base, Math.max(byFeature.get(base) ?? 0, weight));\n }\n return [...byFeature.entries()].sort((a, b) => b[1] - a[1]).slice(0, n).map(([name]) => HumanizeFeatureName(name));\n}\n\n/** @deprecated Use {@link TopGlobalDrivers}. */\nexport function topGlobalDrivers(featureImportanceJson: string | null | undefined, n = 3): string[] {\n return TopGlobalDrivers(featureImportanceJson, n);\n}\n\n/**\n * Turn a raw feature/column name into a readable label — `RetentionOverdueInvoices` → `Retention Overdue\n * Invoices`, `overdue_invoices` → `Overdue Invoices`, and a one-hot `MembershipType=Student` →\n * `Membership Type = Student`. Splits camelCase + snake/kebab, spaces one-hot `=`, collapses whitespace,\n * and capitalizes the first letter. Already-spaced labels pass through unchanged.\n */\nexport function HumanizeFeatureName(name: string): string {\n return name\n .replace(/[_-]+/g, ' ')\n .replace(/([a-z0-9])([A-Z])/g, '$1 $2')\n .replace(/\\s*=\\s*/g, ' = ')\n .replace(/\\s+/g, ' ')\n .trim()\n .replace(/^\\w/, (c) => c.toUpperCase());\n}\n\n/** @deprecated Use {@link HumanizeFeatureName}. */\nexport function humanizeFeatureName(name: string): string {\n return HumanizeFeatureName(name);\n}\n"]}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/** Visual variant of the confirm modal — drives the header icon-tile color. */
|
|
4
|
-
export type PSConfirmVariant = 'info' | 'warn' | 'danger';
|
|
5
|
-
/**
|
|
6
|
-
* Small, reusable confirmation modal for Predictive Studio's real mutations (model promote/archive,
|
|
7
|
-
* experiment pause/cancel). Renders a token-styled backdrop + card with a title, a rich message
|
|
8
|
-
* (projected via `<ng-content>`), an optional reason textarea, and a left-aligned primary confirm
|
|
9
|
-
* button followed by Cancel (MJ button-placement convention). The host owns visibility and the
|
|
10
|
-
* confirm/cancel handlers; this component is purely presentational + emits the captured reason.
|
|
11
|
-
*
|
|
12
|
-
* While `busy` is true the confirm button shows a spinner and both buttons disable, giving the
|
|
13
|
-
* in-flight Remote Op a clear, non-dismissable feel.
|
|
14
|
-
*/
|
|
15
|
-
export declare class PSConfirmModalComponent {
|
|
16
|
-
/** Modal heading. */
|
|
17
|
-
Title: string;
|
|
18
|
-
/** @deprecated Use {@link Title}. */
|
|
19
|
-
set title(value: PSConfirmModalComponent['Title']);
|
|
20
|
-
/** @deprecated Use {@link Title}. */
|
|
21
|
-
get title(): PSConfirmModalComponent['Title'];
|
|
22
|
-
/** Header icon-tile Font Awesome class. */
|
|
23
|
-
Icon: string;
|
|
24
|
-
/** @deprecated Use {@link Icon}. */
|
|
25
|
-
set icon(value: PSConfirmModalComponent['Icon']);
|
|
26
|
-
/** @deprecated Use {@link Icon}. */
|
|
27
|
-
get icon(): PSConfirmModalComponent['Icon'];
|
|
28
|
-
/** Confirm-button Font Awesome class (shown when not busy). */
|
|
29
|
-
ConfirmIcon: string;
|
|
30
|
-
/** @deprecated Use {@link ConfirmIcon}. */
|
|
31
|
-
set confirmIcon(value: PSConfirmModalComponent['ConfirmIcon']);
|
|
32
|
-
/** @deprecated Use {@link ConfirmIcon}. */
|
|
33
|
-
get confirmIcon(): PSConfirmModalComponent['ConfirmIcon'];
|
|
34
|
-
/** Confirm-button label. */
|
|
35
|
-
ConfirmLabel: string;
|
|
36
|
-
/** @deprecated Use {@link ConfirmLabel}. */
|
|
37
|
-
set confirmLabel(value: PSConfirmModalComponent['ConfirmLabel']);
|
|
38
|
-
/** @deprecated Use {@link ConfirmLabel}. */
|
|
39
|
-
get confirmLabel(): PSConfirmModalComponent['ConfirmLabel'];
|
|
40
|
-
/** Visual variant (info / warn / danger). */
|
|
41
|
-
Variant: PSConfirmVariant;
|
|
42
|
-
/** @deprecated Use {@link Variant}. */
|
|
43
|
-
set variant(value: PSConfirmVariant);
|
|
44
|
-
/** @deprecated Use {@link Variant}. */
|
|
45
|
-
get variant(): PSConfirmVariant;
|
|
46
|
-
/** When true, render the reason textarea. */
|
|
47
|
-
ShowReason: boolean;
|
|
48
|
-
/** @deprecated Use {@link ShowReason}. */
|
|
49
|
-
set showReason(value: PSConfirmModalComponent['ShowReason']);
|
|
50
|
-
/** @deprecated Use {@link ShowReason}. */
|
|
51
|
-
get showReason(): PSConfirmModalComponent['ShowReason'];
|
|
52
|
-
/** When true, the confirm button stays disabled until a non-empty reason is entered. */
|
|
53
|
-
ReasonRequired: boolean;
|
|
54
|
-
/** @deprecated Use {@link ReasonRequired}. */
|
|
55
|
-
set reasonRequired(value: PSConfirmModalComponent['ReasonRequired']);
|
|
56
|
-
/** @deprecated Use {@link ReasonRequired}. */
|
|
57
|
-
get reasonRequired(): PSConfirmModalComponent['ReasonRequired'];
|
|
58
|
-
/** Reason field label. */
|
|
59
|
-
ReasonLabel: string;
|
|
60
|
-
/** @deprecated Use {@link ReasonLabel}. */
|
|
61
|
-
set reasonLabel(value: PSConfirmModalComponent['ReasonLabel']);
|
|
62
|
-
/** @deprecated Use {@link ReasonLabel}. */
|
|
63
|
-
get reasonLabel(): PSConfirmModalComponent['ReasonLabel'];
|
|
64
|
-
/** Reason field placeholder. */
|
|
65
|
-
ReasonPlaceholder: string;
|
|
66
|
-
/** @deprecated Use {@link ReasonPlaceholder}. */
|
|
67
|
-
set reasonPlaceholder(value: PSConfirmModalComponent['ReasonPlaceholder']);
|
|
68
|
-
/** @deprecated Use {@link ReasonPlaceholder}. */
|
|
69
|
-
get reasonPlaceholder(): PSConfirmModalComponent['ReasonPlaceholder'];
|
|
70
|
-
/** In-flight flag — disables the buttons + shows the confirm spinner. */
|
|
71
|
-
Busy: boolean;
|
|
72
|
-
/** @deprecated Use {@link Busy}. */
|
|
73
|
-
set busy(value: PSConfirmModalComponent['Busy']);
|
|
74
|
-
/** @deprecated Use {@link Busy}. */
|
|
75
|
-
get busy(): PSConfirmModalComponent['Busy'];
|
|
76
|
-
/** The captured reason (two-way via the textarea). */
|
|
77
|
-
Reason: string;
|
|
78
|
-
/** @deprecated Use {@link Reason}. */
|
|
79
|
-
get reason(): string;
|
|
80
|
-
/** @deprecated Use {@link Reason}. */
|
|
81
|
-
set reason(value: string);
|
|
82
|
-
/** Emitted with the trimmed reason when the user confirms. */
|
|
83
|
-
Confirmed: EventEmitter<string>;
|
|
84
|
-
/**
|
|
85
|
-
* @deprecated Use {@link Confirmed}.
|
|
86
|
-
*
|
|
87
|
-
* The same emitter under the old binding name, so a template still binding
|
|
88
|
-
* (confirmed) keeps working. Must stay AFTER Confirmed: class fields
|
|
89
|
-
* initialise in order, and the other way round this captures undefined.
|
|
90
|
-
*/
|
|
91
|
-
confirmed: EventEmitter<string>;
|
|
92
|
-
/** Emitted when the user cancels (button or backdrop). */
|
|
93
|
-
Cancelled: EventEmitter<void>;
|
|
94
|
-
/**
|
|
95
|
-
* @deprecated Use {@link Cancelled}.
|
|
96
|
-
*
|
|
97
|
-
* The same emitter under the old binding name, so a template still binding
|
|
98
|
-
* (cancelled) keeps working. Must stay AFTER Cancelled: class fields
|
|
99
|
-
* initialise in order, and the other way round this captures undefined.
|
|
100
|
-
*/
|
|
101
|
-
cancelled: EventEmitter<void>;
|
|
102
|
-
/** Backdrop click cancels — unless an operation is in flight. */
|
|
103
|
-
OnBackdrop(): void;
|
|
104
|
-
/** @deprecated Use {@link OnBackdrop}. */
|
|
105
|
-
onBackdrop(): void;
|
|
106
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PSConfirmModalComponent, never>;
|
|
107
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PSConfirmModalComponent, "ps-confirm-modal", never, { "Title": { "alias": "Title"; "required": false; }; "title": { "alias": "title"; "required": false; }; "Icon": { "alias": "Icon"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "ConfirmIcon": { "alias": "ConfirmIcon"; "required": false; }; "confirmIcon": { "alias": "confirmIcon"; "required": false; }; "ConfirmLabel": { "alias": "ConfirmLabel"; "required": false; }; "confirmLabel": { "alias": "confirmLabel"; "required": false; }; "Variant": { "alias": "Variant"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "ShowReason": { "alias": "ShowReason"; "required": false; }; "showReason": { "alias": "showReason"; "required": false; }; "ReasonRequired": { "alias": "ReasonRequired"; "required": false; }; "reasonRequired": { "alias": "reasonRequired"; "required": false; }; "ReasonLabel": { "alias": "ReasonLabel"; "required": false; }; "reasonLabel": { "alias": "reasonLabel"; "required": false; }; "ReasonPlaceholder": { "alias": "ReasonPlaceholder"; "required": false; }; "reasonPlaceholder": { "alias": "reasonPlaceholder"; "required": false; }; "Busy": { "alias": "Busy"; "required": false; }; "busy": { "alias": "busy"; "required": false; }; }, { "Confirmed": "Confirmed"; "confirmed": "confirmed"; "Cancelled": "Cancelled"; "cancelled": "cancelled"; }, never, ["*"], true, never>;
|
|
108
|
-
}
|
|
109
|
-
//# sourceMappingURL=ps-confirm-modal.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ps-confirm-modal.component.d.ts","sourceRoot":"","sources":["../../../src/PredictiveStudio/components/ps-confirm-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAoC,MAAM,eAAe,CAAC;;AAK1F,+EAA+E;AAC/E,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ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AC,KAAK,EAAE,uBAAuB,CAAC,gBAAgB,CAAC,EAE3E;IACD,8CAA8C;IAC9C,IAAI,cAAc,IAAI,uBAAuB,CAAC,gBAAgB,CAAC,CAE9D;IACD,0BAA0B;IACjB,WAAW,SAAY;IAEhC,2CAA2C;IAC3C,IAAa,WAAW,CAAC,KAAK,EAAE,uBAAuB,CAAC,aAAa,CAAC,EAErE;IACD,2CAA2C;IAC3C,IAAI,WAAW,IAAI,uBAAuB,CAAC,aAAa,CAAC,CAExD;IACD,gCAAgC;IACvB,iBAAiB,SAA2B;IAErD,iDAAiD;IACjD,IAAa,iBAAiB,CAAC,KAAK,EAAE,uBAAuB,CAAC,mBAAmB,CAAC,EAEjF;IACD,iDAAiD;IACjD,IAAI,iBAAiB,IAAI,uBAAuB,CAAC,mBAAmB,CAAC,CAEpE;IACD,yEAAyE;IAChE,IAAI,UAAS;IAEtB,oCAAoC;IACpC,IAAa,IAAI,CAAC,KAAK,EAAE,uBAAuB,CAAC,MAAM,CAAC,EAEvD;IACD,oCAAoC;IACpC,IAAI,IAAI,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAE1C;IAED,sDAAsD;IAC/C,MAAM,SAAM;IAEnB,sCAAsC;IACtC,IAAW,MAAM,WAEhB;IACD,sCAAsC;IACtC,IAAW,MAAM,CAAC,KAAK,QAAA,EAEtB;IAED,8DAA8D;IACpD,SAAS,uBAA8B;IAEjD;;;;;;OAMG;IACO,SAAS,uBAAkB;IACrC,0DAA0D;IAChD,SAAS,qBAA4B;IAE/C;;;;;;OAMG;IACO,SAAS,qBAAkB;IAErC,iEAAiE;IAC1D,UAAU,IAAI,IAAI;IAIzB,0CAA0C;IACnC,UAAU,IAAI,IAAI;yCAzJd,uBAAuB;2CAAvB,uBAAuB;CA4JnC"}
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FormsModule } from '@angular/forms';
|
|
4
|
-
import { MJButtonDirective } from '@memberjunction/ng-ui-components';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@angular/forms";
|
|
7
|
-
const _c0 = ["*"];
|
|
8
|
-
function PSConfirmModalComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
9
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
10
|
-
i0.ɵɵelementStart(0, "div", 5)(1, "label");
|
|
11
|
-
i0.ɵɵtext(2);
|
|
12
|
-
i0.ɵɵelementEnd();
|
|
13
|
-
i0.ɵɵelementStart(3, "textarea", 12);
|
|
14
|
-
i0.ɵɵtwoWayListener("ngModelChange", function PSConfirmModalComponent_Conditional_9_Template_textarea_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.reason, $event) || (ctx_r1.reason = $event); return i0.ɵɵresetView($event); });
|
|
15
|
-
i0.ɵɵelementEnd()();
|
|
16
|
-
} if (rf & 2) {
|
|
17
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
18
|
-
i0.ɵɵadvance(2);
|
|
19
|
-
i0.ɵɵtextInterpolate2("", ctx_r1.reasonLabel, "", ctx_r1.reasonRequired ? " *" : "");
|
|
20
|
-
i0.ɵɵadvance();
|
|
21
|
-
i0.ɵɵproperty("placeholder", ctx_r1.reasonPlaceholder);
|
|
22
|
-
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.reason);
|
|
23
|
-
i0.ɵɵproperty("disabled", ctx_r1.busy);
|
|
24
|
-
} }
|
|
25
|
-
function PSConfirmModalComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
-
i0.ɵɵelement(0, "i", 8);
|
|
27
|
-
} }
|
|
28
|
-
function PSConfirmModalComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
-
i0.ɵɵelement(0, "i");
|
|
30
|
-
} if (rf & 2) {
|
|
31
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
32
|
-
i0.ɵɵclassMap(ctx_r1.confirmIcon);
|
|
33
|
-
} }
|
|
34
|
-
/**
|
|
35
|
-
* Small, reusable confirmation modal for Predictive Studio's real mutations (model promote/archive,
|
|
36
|
-
* experiment pause/cancel). Renders a token-styled backdrop + card with a title, a rich message
|
|
37
|
-
* (projected via `<ng-content>`), an optional reason textarea, and a left-aligned primary confirm
|
|
38
|
-
* button followed by Cancel (MJ button-placement convention). The host owns visibility and the
|
|
39
|
-
* confirm/cancel handlers; this component is purely presentational + emits the captured reason.
|
|
40
|
-
*
|
|
41
|
-
* While `busy` is true the confirm button shows a spinner and both buttons disable, giving the
|
|
42
|
-
* in-flight Remote Op a clear, non-dismissable feel.
|
|
43
|
-
*/
|
|
44
|
-
export class PSConfirmModalComponent {
|
|
45
|
-
/** Modal heading. */
|
|
46
|
-
Title = 'Confirm';
|
|
47
|
-
/** @deprecated Use {@link Title}. */
|
|
48
|
-
set title(value) {
|
|
49
|
-
this.Title = value;
|
|
50
|
-
}
|
|
51
|
-
/** @deprecated Use {@link Title}. */
|
|
52
|
-
get title() {
|
|
53
|
-
return this.Title;
|
|
54
|
-
}
|
|
55
|
-
/** Header icon-tile Font Awesome class. */
|
|
56
|
-
Icon = 'fa-solid fa-circle-question';
|
|
57
|
-
/** @deprecated Use {@link Icon}. */
|
|
58
|
-
set icon(value) {
|
|
59
|
-
this.Icon = value;
|
|
60
|
-
}
|
|
61
|
-
/** @deprecated Use {@link Icon}. */
|
|
62
|
-
get icon() {
|
|
63
|
-
return this.Icon;
|
|
64
|
-
}
|
|
65
|
-
/** Confirm-button Font Awesome class (shown when not busy). */
|
|
66
|
-
ConfirmIcon = 'fa-solid fa-check';
|
|
67
|
-
/** @deprecated Use {@link ConfirmIcon}. */
|
|
68
|
-
set confirmIcon(value) {
|
|
69
|
-
this.ConfirmIcon = value;
|
|
70
|
-
}
|
|
71
|
-
/** @deprecated Use {@link ConfirmIcon}. */
|
|
72
|
-
get confirmIcon() {
|
|
73
|
-
return this.ConfirmIcon;
|
|
74
|
-
}
|
|
75
|
-
/** Confirm-button label. */
|
|
76
|
-
ConfirmLabel = 'Confirm';
|
|
77
|
-
/** @deprecated Use {@link ConfirmLabel}. */
|
|
78
|
-
set confirmLabel(value) {
|
|
79
|
-
this.ConfirmLabel = value;
|
|
80
|
-
}
|
|
81
|
-
/** @deprecated Use {@link ConfirmLabel}. */
|
|
82
|
-
get confirmLabel() {
|
|
83
|
-
return this.ConfirmLabel;
|
|
84
|
-
}
|
|
85
|
-
/** Visual variant (info / warn / danger). */
|
|
86
|
-
Variant = 'info';
|
|
87
|
-
/** @deprecated Use {@link Variant}. */
|
|
88
|
-
set variant(value) {
|
|
89
|
-
this.Variant = value;
|
|
90
|
-
}
|
|
91
|
-
/** @deprecated Use {@link Variant}. */
|
|
92
|
-
get variant() {
|
|
93
|
-
return this.Variant;
|
|
94
|
-
}
|
|
95
|
-
/** When true, render the reason textarea. */
|
|
96
|
-
ShowReason = false;
|
|
97
|
-
/** @deprecated Use {@link ShowReason}. */
|
|
98
|
-
set showReason(value) {
|
|
99
|
-
this.ShowReason = value;
|
|
100
|
-
}
|
|
101
|
-
/** @deprecated Use {@link ShowReason}. */
|
|
102
|
-
get showReason() {
|
|
103
|
-
return this.ShowReason;
|
|
104
|
-
}
|
|
105
|
-
/** When true, the confirm button stays disabled until a non-empty reason is entered. */
|
|
106
|
-
ReasonRequired = false;
|
|
107
|
-
/** @deprecated Use {@link ReasonRequired}. */
|
|
108
|
-
set reasonRequired(value) {
|
|
109
|
-
this.ReasonRequired = value;
|
|
110
|
-
}
|
|
111
|
-
/** @deprecated Use {@link ReasonRequired}. */
|
|
112
|
-
get reasonRequired() {
|
|
113
|
-
return this.ReasonRequired;
|
|
114
|
-
}
|
|
115
|
-
/** Reason field label. */
|
|
116
|
-
ReasonLabel = 'Reason';
|
|
117
|
-
/** @deprecated Use {@link ReasonLabel}. */
|
|
118
|
-
set reasonLabel(value) {
|
|
119
|
-
this.ReasonLabel = value;
|
|
120
|
-
}
|
|
121
|
-
/** @deprecated Use {@link ReasonLabel}. */
|
|
122
|
-
get reasonLabel() {
|
|
123
|
-
return this.ReasonLabel;
|
|
124
|
-
}
|
|
125
|
-
/** Reason field placeholder. */
|
|
126
|
-
ReasonPlaceholder = 'Add an optional note…';
|
|
127
|
-
/** @deprecated Use {@link ReasonPlaceholder}. */
|
|
128
|
-
set reasonPlaceholder(value) {
|
|
129
|
-
this.ReasonPlaceholder = value;
|
|
130
|
-
}
|
|
131
|
-
/** @deprecated Use {@link ReasonPlaceholder}. */
|
|
132
|
-
get reasonPlaceholder() {
|
|
133
|
-
return this.ReasonPlaceholder;
|
|
134
|
-
}
|
|
135
|
-
/** In-flight flag — disables the buttons + shows the confirm spinner. */
|
|
136
|
-
Busy = false;
|
|
137
|
-
/** @deprecated Use {@link Busy}. */
|
|
138
|
-
set busy(value) {
|
|
139
|
-
this.Busy = value;
|
|
140
|
-
}
|
|
141
|
-
/** @deprecated Use {@link Busy}. */
|
|
142
|
-
get busy() {
|
|
143
|
-
return this.Busy;
|
|
144
|
-
}
|
|
145
|
-
/** The captured reason (two-way via the textarea). */
|
|
146
|
-
Reason = '';
|
|
147
|
-
/** @deprecated Use {@link Reason}. */
|
|
148
|
-
get reason() {
|
|
149
|
-
return this.Reason;
|
|
150
|
-
}
|
|
151
|
-
/** @deprecated Use {@link Reason}. */
|
|
152
|
-
set reason(value) {
|
|
153
|
-
this.Reason = value;
|
|
154
|
-
}
|
|
155
|
-
/** Emitted with the trimmed reason when the user confirms. */
|
|
156
|
-
Confirmed = new EventEmitter();
|
|
157
|
-
/**
|
|
158
|
-
* @deprecated Use {@link Confirmed}.
|
|
159
|
-
*
|
|
160
|
-
* The same emitter under the old binding name, so a template still binding
|
|
161
|
-
* (confirmed) keeps working. Must stay AFTER Confirmed: class fields
|
|
162
|
-
* initialise in order, and the other way round this captures undefined.
|
|
163
|
-
*/
|
|
164
|
-
confirmed = this.Confirmed;
|
|
165
|
-
/** Emitted when the user cancels (button or backdrop). */
|
|
166
|
-
Cancelled = new EventEmitter();
|
|
167
|
-
/**
|
|
168
|
-
* @deprecated Use {@link Cancelled}.
|
|
169
|
-
*
|
|
170
|
-
* The same emitter under the old binding name, so a template still binding
|
|
171
|
-
* (cancelled) keeps working. Must stay AFTER Cancelled: class fields
|
|
172
|
-
* initialise in order, and the other way round this captures undefined.
|
|
173
|
-
*/
|
|
174
|
-
cancelled = this.Cancelled;
|
|
175
|
-
/** Backdrop click cancels — unless an operation is in flight. */
|
|
176
|
-
OnBackdrop() {
|
|
177
|
-
if (!this.Busy)
|
|
178
|
-
this.Cancelled.emit();
|
|
179
|
-
}
|
|
180
|
-
/** @deprecated Use {@link OnBackdrop}. */
|
|
181
|
-
onBackdrop() {
|
|
182
|
-
return this.OnBackdrop();
|
|
183
|
-
}
|
|
184
|
-
static ɵfac = function PSConfirmModalComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PSConfirmModalComponent)(); };
|
|
185
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PSConfirmModalComponent, selectors: [["ps-confirm-modal"]], inputs: { Title: "Title", title: "title", Icon: "Icon", icon: "icon", ConfirmIcon: "ConfirmIcon", confirmIcon: "confirmIcon", ConfirmLabel: "ConfirmLabel", confirmLabel: "confirmLabel", Variant: "Variant", variant: "variant", ShowReason: "ShowReason", showReason: "showReason", ReasonRequired: "ReasonRequired", reasonRequired: "reasonRequired", ReasonLabel: "ReasonLabel", reasonLabel: "reasonLabel", ReasonPlaceholder: "ReasonPlaceholder", reasonPlaceholder: "reasonPlaceholder", Busy: "Busy", busy: "busy" }, outputs: { Confirmed: "Confirmed", confirmed: "confirmed", Cancelled: "Cancelled", cancelled: "cancelled" }, ngContentSelectors: _c0, decls: 18, vars: 13, consts: [["data-testid", "ps-confirm-modal", 1, "ps-modal-backdrop", 3, "click"], [1, "ps-modal", 3, "click"], [1, "ps-modal-head"], [1, "ico"], [1, "ps-modal-body"], [1, "ps-field"], [1, "ps-modal-foot"], ["mjButton", "", "size", "sm", "data-testid", "ps-confirm-ok", 3, "click", "variant", "disabled"], [1, "fa-solid", "fa-circle-notch", "fa-spin"], [3, "class"], [1, "ps-spacer"], ["mjButton", "", "variant", "secondary", "size", "sm", "data-testid", "ps-confirm-cancel", 3, "click", "disabled"], ["rows", "3", "data-testid", "ps-confirm-reason", 1, "ps-input", 3, "ngModelChange", "placeholder", "ngModel", "disabled"]], template: function PSConfirmModalComponent_Template(rf, ctx) { if (rf & 1) {
|
|
186
|
-
i0.ɵɵprojectionDef();
|
|
187
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
188
|
-
i0.ɵɵlistener("click", function PSConfirmModalComponent_Template_div_click_0_listener() { return ctx.onBackdrop(); });
|
|
189
|
-
i0.ɵɵelementStart(1, "div", 1);
|
|
190
|
-
i0.ɵɵlistener("click", function PSConfirmModalComponent_Template_div_click_1_listener($event) { return $event.stopPropagation(); });
|
|
191
|
-
i0.ɵɵelementStart(2, "div", 2)(3, "span", 3);
|
|
192
|
-
i0.ɵɵelement(4, "i");
|
|
193
|
-
i0.ɵɵelementEnd();
|
|
194
|
-
i0.ɵɵelementStart(5, "h3");
|
|
195
|
-
i0.ɵɵtext(6);
|
|
196
|
-
i0.ɵɵelementEnd()();
|
|
197
|
-
i0.ɵɵelementStart(7, "div", 4);
|
|
198
|
-
i0.ɵɵprojection(8);
|
|
199
|
-
i0.ɵɵconditionalCreate(9, PSConfirmModalComponent_Conditional_9_Template, 4, 5, "div", 5);
|
|
200
|
-
i0.ɵɵelementEnd();
|
|
201
|
-
i0.ɵɵelementStart(10, "div", 6)(11, "button", 7);
|
|
202
|
-
i0.ɵɵlistener("click", function PSConfirmModalComponent_Template_button_click_11_listener() { return ctx.confirmed.emit(ctx.reason.trim()); });
|
|
203
|
-
i0.ɵɵconditionalCreate(12, PSConfirmModalComponent_Conditional_12_Template, 1, 0, "i", 8)(13, PSConfirmModalComponent_Conditional_13_Template, 1, 2, "i", 9);
|
|
204
|
-
i0.ɵɵtext(14);
|
|
205
|
-
i0.ɵɵelementEnd();
|
|
206
|
-
i0.ɵɵelement(15, "span", 10);
|
|
207
|
-
i0.ɵɵelementStart(16, "button", 11);
|
|
208
|
-
i0.ɵɵlistener("click", function PSConfirmModalComponent_Template_button_click_16_listener() { return ctx.cancelled.emit(); });
|
|
209
|
-
i0.ɵɵtext(17, " Cancel ");
|
|
210
|
-
i0.ɵɵelementEnd()()()();
|
|
211
|
-
} if (rf & 2) {
|
|
212
|
-
i0.ɵɵadvance(2);
|
|
213
|
-
i0.ɵɵclassProp("warn", ctx.variant === "warn")("danger", ctx.variant === "danger");
|
|
214
|
-
i0.ɵɵadvance(2);
|
|
215
|
-
i0.ɵɵclassMap(ctx.icon);
|
|
216
|
-
i0.ɵɵadvance(2);
|
|
217
|
-
i0.ɵɵtextInterpolate(ctx.title);
|
|
218
|
-
i0.ɵɵadvance(3);
|
|
219
|
-
i0.ɵɵconditional(ctx.showReason ? 9 : -1);
|
|
220
|
-
i0.ɵɵadvance(2);
|
|
221
|
-
i0.ɵɵproperty("variant", ctx.variant === "danger" ? "danger" : "primary")("disabled", ctx.busy || ctx.reasonRequired && !ctx.reason.trim());
|
|
222
|
-
i0.ɵɵadvance();
|
|
223
|
-
i0.ɵɵconditional(ctx.busy ? 12 : 13);
|
|
224
|
-
i0.ɵɵadvance(2);
|
|
225
|
-
i0.ɵɵtextInterpolate1(" ", ctx.confirmLabel, " ");
|
|
226
|
-
i0.ɵɵadvance(2);
|
|
227
|
-
i0.ɵɵproperty("disabled", ctx.busy);
|
|
228
|
-
} }, dependencies: [CommonModule, FormsModule, i1.DefaultValueAccessor, i1.NgControlStatus, i1.NgModel, MJButtonDirective], styles: ["/* ============================================================================\n Predictive Studio \u2014 shared panel styles (design-token compliant)\n Maps the mockup design system onto MemberJunction semantic --mj-* tokens.\n Loaded by every PS panel component (styleUrls) under ViewEncapsulation.None,\n so the class names are global within the PS dashboard subtree.\n No hardcoded colors except the intentional categorical node/algorithm palette\n (declared once as --ps-* custom props below) which must stay distinct across\n light/dark to remain readable as diagram accents.\n ============================================================================ */\n\n/* Categorical accents for DAG node types + algorithm chips. These are\n data-visualization colors that must remain distinct regardless of theme\n (allowed exception #3 in the design-token rules). */\n.ps-panel {\n --ps-node-source: #6b7280;\n --ps-node-feature: #2050c8;\n --ps-node-embedding: #7b3ff0;\n --ps-node-target: #1f9d57;\n --ps-node-algorithm: #d98213;\n /* budget-gauge categorical accents (reuse the node palette so light/dark stay distinct) */\n --ps-gauge-cost: var(--ps-node-algorithm);\n --ps-gauge-iterations: var(--ps-node-feature);\n}\n\n.ps-panel {\n display: block;\n height: 100%;\n}\n\n/* ---- generic layout helpers ---- */\n.ps-row { display: flex; gap: 16px; }\n.ps-col { display: flex; flex-direction: column; gap: 16px; }\n.ps-wrap { flex-wrap: wrap; }\n.ps-spacer { flex: 1; }\n.ps-muted { color: var(--mj-text-muted); }\n.ps-small { font-size: 12.5px; }\n.ps-mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; }\n.ps-section-title {\n font-size: 12px; text-transform: uppercase; letter-spacing: .06em;\n color: var(--mj-text-muted); margin: 4px 0 2px; font-weight: 700;\n}\n\n/* ---- cards ---- */\n.ps-card {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n overflow: hidden;\n}\n.ps-card-head {\n display: flex; align-items: center; gap: 10px;\n padding: 14px 16px; border-bottom: 1px solid var(--mj-border-subtle);\n}\n.ps-card-head h3 { font-size: 14.5px; margin: 0; font-weight: 650; color: var(--mj-text-primary); }\n.ps-card-body { padding: 16px; }\n\n/* ---- KPI tiles ---- */\n.ps-kpi {\n background: var(--mj-bg-surface); border: 1px solid var(--mj-border-default);\n border-radius: 8px; padding: 16px 18px;\n}\n.ps-kpi .label { font-size: 12px; color: var(--mj-text-muted); font-weight: 600; }\n.ps-kpi .val { font-size: 26px; font-weight: 720; letter-spacing: -.02em; margin-top: 2px; color: var(--mj-text-primary); }\n\n/* ---- badges ---- */\n.ps-badge {\n display: inline-flex; align-items: center; gap: 5px;\n padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; line-height: 1.7;\n}\n.ps-badge.gray { background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n.ps-badge.blue { background: var(--mj-status-info-bg); color: var(--mj-status-info-text); }\n.ps-badge.green { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n.ps-badge.amber { background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n.ps-badge.red { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n.ps-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }\n\n/* recommendation-level chips (the ranking matrix payoff) */\n.ps-lvl {\n display: inline-flex; align-items: center; justify-content: center;\n min-width: 92px; padding: 4px 10px; border-radius: 7px;\n font-weight: 650; font-size: 11.5px; color: var(--mj-text-inverse);\n}\n.ps-lvl-Primary { background: var(--mj-status-success); }\n.ps-lvl-Strong { background: var(--mj-status-info); }\n.ps-lvl-Viable { background: var(--mj-status-warning); }\n.ps-lvl-Weak { background: var(--mj-text-disabled); }\n.ps-lvl-NotRecommended { background: var(--mj-bg-surface-sunken); color: var(--mj-text-muted); }\n\n/* ---- tags ---- */\n.ps-tag {\n display: inline-block; padding: 2px 8px; border-radius: 6px;\n background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary);\n font-size: 11.5px; font-weight: 600;\n}\n.ps-tag.muted { opacity: .6; }\n.ps-divider { height: 1px; background: var(--mj-border-subtle); margin: 8px 0; }\n\n/* ---- tables ---- */\n.ps-table { width: 100%; border-collapse: collapse; font-size: 13px; }\n.ps-table th {\n text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;\n color: var(--mj-text-muted); font-weight: 700; padding: 9px 12px;\n border-bottom: 1px solid var(--mj-border-default);\n}\n.ps-table td { padding: 11px 12px; border-bottom: 1px solid var(--mj-border-subtle); color: var(--mj-text-primary); }\n.ps-table tr:hover td { background: var(--mj-bg-surface-hover); }\n.ps-table .num { text-align: right; font-variant-numeric: tabular-nums; }\n\n.ps-rank {\n width: 22px; height: 22px; border-radius: 6px; background: var(--mj-bg-surface-sunken);\n display: inline-grid; place-items: center; font-weight: 700; font-size: 11.5px; color: var(--mj-text-secondary);\n}\n.ps-rank.gold { background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n\n/* ---- progress bars ---- */\n.ps-bar { height: 8px; border-radius: 999px; background: var(--mj-bg-surface-sunken); overflow: hidden; }\n.ps-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--mj-brand-primary); }\n.ps-bar.warn > span { background: var(--mj-status-warning); }\n.ps-bar.run > span { background: var(--mj-brand-primary); }\n\n.ps-fbar { display: grid; grid-template-columns: minmax(150px, 1.3fr) 2fr 56px; align-items: center; gap: 14px; padding: 8px 0; }\n.ps-fbar + .ps-fbar { border-top: 1px solid var(--mj-border-subtle); }\n.ps-fbar .track { height: 10px; border-radius: var(--mj-radius-full); background: var(--mj-bg-surface-sunken); overflow: hidden; }\n.ps-fbar .track > span { display: block; height: 100%; border-radius: var(--mj-radius-full); background: var(--mj-brand-primary); }\n.ps-fbar .track > span.warn { background: var(--mj-status-warning); }\n.ps-fbar .name { color: var(--mj-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ps-fbar > .ps-mono { text-align: right; color: var(--mj-text-secondary); font-variant-numeric: tabular-nums; }\n\n/* gauge */\n.ps-gauge {\n position: relative; width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto;\n background: conic-gradient(var(--ps-gauge-color, var(--mj-brand-primary)) calc(var(--ps-p, 40) * 1%), var(--mj-bg-surface-sunken) 0);\n display: grid; place-items: center;\n}\n.ps-gauge::after { content: ''; position: absolute; inset: 9px; background: var(--mj-bg-surface); border-radius: 50%; }\n.ps-gauge .g-val { position: relative; font-weight: 720; font-size: 14px; color: var(--mj-text-primary); }\n\n/* warning / info callouts */\n.ps-callout { display: flex; gap: 11px; padding: 12px 14px; border-radius: 10px; border: 1px solid; }\n.ps-callout.warn { background: var(--mj-status-warning-bg); border-color: var(--mj-status-warning-border); color: var(--mj-status-warning-text); }\n.ps-callout.info { background: var(--mj-status-info-bg); border-color: var(--mj-status-info-border); color: var(--mj-status-info-text); }\n.ps-callout.success { background: var(--mj-status-success-bg); border-color: var(--mj-status-success-border); color: var(--mj-status-success-text); }\n.ps-callout i { font-size: 16px; margin-top: 1px; }\n\n/* lifecycle stepper */\n.ps-stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }\n.ps-step { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mj-text-muted); }\n.ps-step .pip {\n width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--mj-border-strong);\n display: grid; place-items: center; font-size: 11px;\n}\n.ps-step.done { color: var(--mj-status-success-text); }\n.ps-step.done .pip { background: var(--mj-status-success); border-color: var(--mj-status-success); color: var(--mj-text-inverse); }\n.ps-step.curr { color: var(--mj-brand-primary); }\n.ps-step.curr .pip { border-color: var(--mj-brand-primary); color: var(--mj-brand-primary); }\n.ps-step .ln { width: 26px; height: 2px; background: var(--mj-border-strong); }\n\n/* ---- DAG flow canvas ---- */\n.ps-flow {\n position: relative;\n background:\n linear-gradient(var(--mj-border-subtle) 1px, transparent 1px) 0 0 / 22px 22px,\n linear-gradient(90deg, var(--mj-border-subtle) 1px, transparent 1px) 0 0 / 22px 22px,\n var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default); border-radius: 10px;\n min-height: 620px; overflow: hidden;\n}\n.ps-node {\n position: absolute; width: 190px; background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-strong); border-left-width: 3px; border-radius: 8px;\n cursor: pointer;\n}\n.ps-node .nh {\n display: flex; align-items: center; gap: 8px; padding: 9px 11px;\n border-bottom: 1px solid var(--mj-border-subtle); font-weight: 650; font-size: 12.5px; color: var(--mj-text-primary);\n}\n.ps-node .nh i.tile {\n width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center;\n color: var(--mj-text-inverse); font-size: 12px; flex: 0 0 auto;\n}\n.ps-node .nh .ps-tag { margin-left: auto; }\n.ps-node .nb { padding: 9px 11px; font-size: 12px; color: var(--mj-text-secondary); }\n.ps-node .nb-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }\n.ps-node .nb-row .k { color: var(--mj-text-muted); }\n.ps-node.src { border-left-color: var(--ps-node-source); }\n.ps-node.src .nh i.tile { background: var(--ps-node-source); }\n.ps-node.feat { border-left-color: var(--ps-node-feature); }\n.ps-node.feat .nh i.tile { background: var(--ps-node-feature); }\n.ps-node.emb { border-left-color: var(--ps-node-embedding); }\n.ps-node.emb .nh i.tile { background: var(--ps-node-embedding); }\n.ps-node.target { border-left-color: var(--ps-node-target); }\n.ps-node.target .nh i.tile { background: var(--ps-node-target); }\n.ps-node.algo { border-left-color: var(--ps-node-algorithm); }\n.ps-node.algo .nh i.tile { background: var(--ps-node-algorithm); }\n.ps-node.output { border-left-color: var(--mj-status-success); }\n.ps-node.output .nh i.tile { background: var(--mj-status-success); }\n.ps-node.selected {\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 18%, transparent);\n}\n.ps-node .port {\n position: absolute; width: 11px; height: 11px; border-radius: 50%;\n background: var(--mj-bg-surface); border: 2px solid var(--mj-brand-primary);\n top: 50%; transform: translateY(-50%);\n}\n.ps-node .port.in { left: -6px; }\n.ps-node .port.out { right: -6px; }\nsvg.ps-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }\nsvg.ps-edges path { stroke: color-mix(in srgb, var(--mj-brand-primary) 45%, transparent); stroke-width: 2; fill: none; }\n\n/* palette chips */\n.ps-pchip {\n display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 8px;\n border: 1px dashed var(--mj-border-strong); background: var(--mj-bg-surface);\n font-size: 12.5px; font-weight: 600; color: var(--mj-text-secondary); cursor: grab;\n}\n.ps-pchip i { font-size: 12px; color: var(--mj-text-inverse); width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; }\n.ps-pchip.s i { background: var(--ps-node-source); }\n.ps-pchip.f i { background: var(--ps-node-feature); }\n.ps-pchip.e i { background: var(--ps-node-embedding); }\n.ps-pchip.t i { background: var(--ps-node-target); }\n.ps-pchip.a i { background: var(--ps-node-algorithm); }\n\n/* segmented control */\n.ps-seg { display: inline-flex; border: 1px solid var(--mj-border-default); border-radius: 8px; overflow: hidden; }\n.ps-seg button {\n border: none; background: var(--mj-bg-surface); color: var(--mj-text-secondary);\n padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;\n border-right: 1px solid var(--mj-border-default);\n}\n.ps-seg button:last-child { border-right: none; }\n.ps-seg button.on { background: var(--mj-brand-primary); color: var(--mj-text-inverse); }\n\n/* field control */\n.ps-field { margin-bottom: 14px; }\n.ps-field > label {\n display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;\n color: var(--mj-text-muted); font-weight: 700; margin-bottom: 6px;\n}\n.ps-input {\n width: 100%; padding: 8px 10px; border: 1px solid var(--mj-border-default);\n border-radius: 6px; font-size: 13px; background: var(--mj-bg-surface); color: var(--mj-text-primary);\n box-sizing: border-box;\n}\n.ps-input:focus { outline: none; border-color: var(--mj-brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 12%, transparent); }\n\n/* loading container */\n.ps-loading { display: flex; align-items: center; justify-content: center; padding: 60px 0; }\n\n/* ---- empty / prompt states ---- */\n.ps-empty {\n display: flex; flex-direction: column; align-items: center; justify-content: center;\n text-align: center; gap: 10px; padding: 56px 24px; color: var(--mj-text-muted);\n}\n.ps-empty .ps-empty-ico {\n width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;\n background: var(--mj-bg-surface-sunken); color: var(--mj-text-disabled); font-size: 24px;\n}\n.ps-empty h3 { margin: 4px 0 0; font-size: 16px; font-weight: 650; color: var(--mj-text-secondary); }\n.ps-empty p { margin: 0; max-width: 420px; font-size: 13px; line-height: 1.5; }\n\n/* ---- confirm modal ---- */\n.ps-modal-backdrop {\n position: fixed; inset: 0; z-index: 1000;\n background: var(--mj-bg-overlay);\n display: flex; align-items: center; justify-content: center; padding: 24px;\n}\n.ps-modal {\n width: 100%; max-width: 480px; background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default); border-radius: 14px;\n box-shadow: var(--mj-shadow-lg, var(--mj-shadow-sm)); overflow: hidden;\n}\n.ps-modal-head {\n display: flex; align-items: center; gap: 12px; padding: 18px 20px;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n.ps-modal-head .ico {\n width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;\n font-size: 16px; flex: 0 0 auto;\n background: var(--mj-status-info-bg); color: var(--mj-status-info-text);\n}\n.ps-modal-head.warn .ico { background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n.ps-modal-head.danger .ico { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n.ps-modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 650; color: var(--mj-text-primary); }\n.ps-modal-body { padding: 18px 20px; font-size: 13.5px; line-height: 1.55; color: var(--mj-text-secondary); }\n.ps-modal-body .ps-field { margin-top: 14px; margin-bottom: 0; }\n.ps-modal-foot {\n display: flex; align-items: center; gap: 10px; padding: 14px 20px;\n border-top: 1px solid var(--mj-border-subtle); background: var(--mj-bg-surface-card);\n}\n.ps-modal-foot .ps-spacer { flex: 1; }\n"], encapsulation: 2 });
|
|
229
|
-
}
|
|
230
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PSConfirmModalComponent, [{
|
|
231
|
-
type: Component,
|
|
232
|
-
args: [{ standalone: true, selector: 'ps-confirm-modal', imports: [CommonModule, FormsModule, MJButtonDirective], encapsulation: ViewEncapsulation.None, template: `
|
|
233
|
-
<div class="ps-modal-backdrop" data-testid="ps-confirm-modal" (click)="onBackdrop()">
|
|
234
|
-
<div class="ps-modal" (click)="$event.stopPropagation()">
|
|
235
|
-
<div class="ps-modal-head" [class.warn]="variant === 'warn'" [class.danger]="variant === 'danger'">
|
|
236
|
-
<span class="ico"><i [class]="icon"></i></span>
|
|
237
|
-
<h3>{{ title }}</h3>
|
|
238
|
-
</div>
|
|
239
|
-
<div class="ps-modal-body">
|
|
240
|
-
<ng-content></ng-content>
|
|
241
|
-
@if (showReason) {
|
|
242
|
-
<div class="ps-field">
|
|
243
|
-
<label>{{ reasonLabel }}{{ reasonRequired ? ' *' : '' }}</label>
|
|
244
|
-
<textarea
|
|
245
|
-
class="ps-input"
|
|
246
|
-
rows="3"
|
|
247
|
-
data-testid="ps-confirm-reason"
|
|
248
|
-
[placeholder]="reasonPlaceholder"
|
|
249
|
-
[(ngModel)]="reason"
|
|
250
|
-
[disabled]="busy"></textarea>
|
|
251
|
-
</div>
|
|
252
|
-
}
|
|
253
|
-
</div>
|
|
254
|
-
<div class="ps-modal-foot">
|
|
255
|
-
<button
|
|
256
|
-
mjButton
|
|
257
|
-
[variant]="variant === 'danger' ? 'danger' : 'primary'"
|
|
258
|
-
size="sm"
|
|
259
|
-
data-testid="ps-confirm-ok"
|
|
260
|
-
[disabled]="busy || (reasonRequired && !reason.trim())"
|
|
261
|
-
(click)="confirmed.emit(reason.trim())">
|
|
262
|
-
@if (busy) { <i class="fa-solid fa-circle-notch fa-spin"></i> } @else { <i [class]="confirmIcon"></i> }
|
|
263
|
-
{{ confirmLabel }}
|
|
264
|
-
</button>
|
|
265
|
-
<span class="ps-spacer"></span>
|
|
266
|
-
<button mjButton variant="secondary" size="sm" data-testid="ps-confirm-cancel" [disabled]="busy" (click)="cancelled.emit()">
|
|
267
|
-
Cancel
|
|
268
|
-
</button>
|
|
269
|
-
</div>
|
|
270
|
-
</div>
|
|
271
|
-
</div>
|
|
272
|
-
`, styles: ["/* ============================================================================\n Predictive Studio \u2014 shared panel styles (design-token compliant)\n Maps the mockup design system onto MemberJunction semantic --mj-* tokens.\n Loaded by every PS panel component (styleUrls) under ViewEncapsulation.None,\n so the class names are global within the PS dashboard subtree.\n No hardcoded colors except the intentional categorical node/algorithm palette\n (declared once as --ps-* custom props below) which must stay distinct across\n light/dark to remain readable as diagram accents.\n ============================================================================ */\n\n/* Categorical accents for DAG node types + algorithm chips. These are\n data-visualization colors that must remain distinct regardless of theme\n (allowed exception #3 in the design-token rules). */\n.ps-panel {\n --ps-node-source: #6b7280;\n --ps-node-feature: #2050c8;\n --ps-node-embedding: #7b3ff0;\n --ps-node-target: #1f9d57;\n --ps-node-algorithm: #d98213;\n /* budget-gauge categorical accents (reuse the node palette so light/dark stay distinct) */\n --ps-gauge-cost: var(--ps-node-algorithm);\n --ps-gauge-iterations: var(--ps-node-feature);\n}\n\n.ps-panel {\n display: block;\n height: 100%;\n}\n\n/* ---- generic layout helpers ---- */\n.ps-row { display: flex; gap: 16px; }\n.ps-col { display: flex; flex-direction: column; gap: 16px; }\n.ps-wrap { flex-wrap: wrap; }\n.ps-spacer { flex: 1; }\n.ps-muted { color: var(--mj-text-muted); }\n.ps-small { font-size: 12.5px; }\n.ps-mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; }\n.ps-section-title {\n font-size: 12px; text-transform: uppercase; letter-spacing: .06em;\n color: var(--mj-text-muted); margin: 4px 0 2px; font-weight: 700;\n}\n\n/* ---- cards ---- */\n.ps-card {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n overflow: hidden;\n}\n.ps-card-head {\n display: flex; align-items: center; gap: 10px;\n padding: 14px 16px; border-bottom: 1px solid var(--mj-border-subtle);\n}\n.ps-card-head h3 { font-size: 14.5px; margin: 0; font-weight: 650; color: var(--mj-text-primary); }\n.ps-card-body { padding: 16px; }\n\n/* ---- KPI tiles ---- */\n.ps-kpi {\n background: var(--mj-bg-surface); border: 1px solid var(--mj-border-default);\n border-radius: 8px; padding: 16px 18px;\n}\n.ps-kpi .label { font-size: 12px; color: var(--mj-text-muted); font-weight: 600; }\n.ps-kpi .val { font-size: 26px; font-weight: 720; letter-spacing: -.02em; margin-top: 2px; color: var(--mj-text-primary); }\n\n/* ---- badges ---- */\n.ps-badge {\n display: inline-flex; align-items: center; gap: 5px;\n padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; line-height: 1.7;\n}\n.ps-badge.gray { background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n.ps-badge.blue { background: var(--mj-status-info-bg); color: var(--mj-status-info-text); }\n.ps-badge.green { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n.ps-badge.amber { background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n.ps-badge.red { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n.ps-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }\n\n/* recommendation-level chips (the ranking matrix payoff) */\n.ps-lvl {\n display: inline-flex; align-items: center; justify-content: center;\n min-width: 92px; padding: 4px 10px; border-radius: 7px;\n font-weight: 650; font-size: 11.5px; color: var(--mj-text-inverse);\n}\n.ps-lvl-Primary { background: var(--mj-status-success); }\n.ps-lvl-Strong { background: var(--mj-status-info); }\n.ps-lvl-Viable { background: var(--mj-status-warning); }\n.ps-lvl-Weak { background: var(--mj-text-disabled); }\n.ps-lvl-NotRecommended { background: var(--mj-bg-surface-sunken); color: var(--mj-text-muted); }\n\n/* ---- tags ---- */\n.ps-tag {\n display: inline-block; padding: 2px 8px; border-radius: 6px;\n background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary);\n font-size: 11.5px; font-weight: 600;\n}\n.ps-tag.muted { opacity: .6; }\n.ps-divider { height: 1px; background: var(--mj-border-subtle); margin: 8px 0; }\n\n/* ---- tables ---- */\n.ps-table { width: 100%; border-collapse: collapse; font-size: 13px; }\n.ps-table th {\n text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;\n color: var(--mj-text-muted); font-weight: 700; padding: 9px 12px;\n border-bottom: 1px solid var(--mj-border-default);\n}\n.ps-table td { padding: 11px 12px; border-bottom: 1px solid var(--mj-border-subtle); color: var(--mj-text-primary); }\n.ps-table tr:hover td { background: var(--mj-bg-surface-hover); }\n.ps-table .num { text-align: right; font-variant-numeric: tabular-nums; }\n\n.ps-rank {\n width: 22px; height: 22px; border-radius: 6px; background: var(--mj-bg-surface-sunken);\n display: inline-grid; place-items: center; font-weight: 700; font-size: 11.5px; color: var(--mj-text-secondary);\n}\n.ps-rank.gold { background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n\n/* ---- progress bars ---- */\n.ps-bar { height: 8px; border-radius: 999px; background: var(--mj-bg-surface-sunken); overflow: hidden; }\n.ps-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--mj-brand-primary); }\n.ps-bar.warn > span { background: var(--mj-status-warning); }\n.ps-bar.run > span { background: var(--mj-brand-primary); }\n\n.ps-fbar { display: grid; grid-template-columns: minmax(150px, 1.3fr) 2fr 56px; align-items: center; gap: 14px; padding: 8px 0; }\n.ps-fbar + .ps-fbar { border-top: 1px solid var(--mj-border-subtle); }\n.ps-fbar .track { height: 10px; border-radius: var(--mj-radius-full); background: var(--mj-bg-surface-sunken); overflow: hidden; }\n.ps-fbar .track > span { display: block; height: 100%; border-radius: var(--mj-radius-full); background: var(--mj-brand-primary); }\n.ps-fbar .track > span.warn { background: var(--mj-status-warning); }\n.ps-fbar .name { color: var(--mj-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ps-fbar > .ps-mono { text-align: right; color: var(--mj-text-secondary); font-variant-numeric: tabular-nums; }\n\n/* gauge */\n.ps-gauge {\n position: relative; width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto;\n background: conic-gradient(var(--ps-gauge-color, var(--mj-brand-primary)) calc(var(--ps-p, 40) * 1%), var(--mj-bg-surface-sunken) 0);\n display: grid; place-items: center;\n}\n.ps-gauge::after { content: ''; position: absolute; inset: 9px; background: var(--mj-bg-surface); border-radius: 50%; }\n.ps-gauge .g-val { position: relative; font-weight: 720; font-size: 14px; color: var(--mj-text-primary); }\n\n/* warning / info callouts */\n.ps-callout { display: flex; gap: 11px; padding: 12px 14px; border-radius: 10px; border: 1px solid; }\n.ps-callout.warn { background: var(--mj-status-warning-bg); border-color: var(--mj-status-warning-border); color: var(--mj-status-warning-text); }\n.ps-callout.info { background: var(--mj-status-info-bg); border-color: var(--mj-status-info-border); color: var(--mj-status-info-text); }\n.ps-callout.success { background: var(--mj-status-success-bg); border-color: var(--mj-status-success-border); color: var(--mj-status-success-text); }\n.ps-callout i { font-size: 16px; margin-top: 1px; }\n\n/* lifecycle stepper */\n.ps-stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }\n.ps-step { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mj-text-muted); }\n.ps-step .pip {\n width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--mj-border-strong);\n display: grid; place-items: center; font-size: 11px;\n}\n.ps-step.done { color: var(--mj-status-success-text); }\n.ps-step.done .pip { background: var(--mj-status-success); border-color: var(--mj-status-success); color: var(--mj-text-inverse); }\n.ps-step.curr { color: var(--mj-brand-primary); }\n.ps-step.curr .pip { border-color: var(--mj-brand-primary); color: var(--mj-brand-primary); }\n.ps-step .ln { width: 26px; height: 2px; background: var(--mj-border-strong); }\n\n/* ---- DAG flow canvas ---- */\n.ps-flow {\n position: relative;\n background:\n linear-gradient(var(--mj-border-subtle) 1px, transparent 1px) 0 0 / 22px 22px,\n linear-gradient(90deg, var(--mj-border-subtle) 1px, transparent 1px) 0 0 / 22px 22px,\n var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default); border-radius: 10px;\n min-height: 620px; overflow: hidden;\n}\n.ps-node {\n position: absolute; width: 190px; background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-strong); border-left-width: 3px; border-radius: 8px;\n cursor: pointer;\n}\n.ps-node .nh {\n display: flex; align-items: center; gap: 8px; padding: 9px 11px;\n border-bottom: 1px solid var(--mj-border-subtle); font-weight: 650; font-size: 12.5px; color: var(--mj-text-primary);\n}\n.ps-node .nh i.tile {\n width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center;\n color: var(--mj-text-inverse); font-size: 12px; flex: 0 0 auto;\n}\n.ps-node .nh .ps-tag { margin-left: auto; }\n.ps-node .nb { padding: 9px 11px; font-size: 12px; color: var(--mj-text-secondary); }\n.ps-node .nb-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }\n.ps-node .nb-row .k { color: var(--mj-text-muted); }\n.ps-node.src { border-left-color: var(--ps-node-source); }\n.ps-node.src .nh i.tile { background: var(--ps-node-source); }\n.ps-node.feat { border-left-color: var(--ps-node-feature); }\n.ps-node.feat .nh i.tile { background: var(--ps-node-feature); }\n.ps-node.emb { border-left-color: var(--ps-node-embedding); }\n.ps-node.emb .nh i.tile { background: var(--ps-node-embedding); }\n.ps-node.target { border-left-color: var(--ps-node-target); }\n.ps-node.target .nh i.tile { background: var(--ps-node-target); }\n.ps-node.algo { border-left-color: var(--ps-node-algorithm); }\n.ps-node.algo .nh i.tile { background: var(--ps-node-algorithm); }\n.ps-node.output { border-left-color: var(--mj-status-success); }\n.ps-node.output .nh i.tile { background: var(--mj-status-success); }\n.ps-node.selected {\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 18%, transparent);\n}\n.ps-node .port {\n position: absolute; width: 11px; height: 11px; border-radius: 50%;\n background: var(--mj-bg-surface); border: 2px solid var(--mj-brand-primary);\n top: 50%; transform: translateY(-50%);\n}\n.ps-node .port.in { left: -6px; }\n.ps-node .port.out { right: -6px; }\nsvg.ps-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }\nsvg.ps-edges path { stroke: color-mix(in srgb, var(--mj-brand-primary) 45%, transparent); stroke-width: 2; fill: none; }\n\n/* palette chips */\n.ps-pchip {\n display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 8px;\n border: 1px dashed var(--mj-border-strong); background: var(--mj-bg-surface);\n font-size: 12.5px; font-weight: 600; color: var(--mj-text-secondary); cursor: grab;\n}\n.ps-pchip i { font-size: 12px; color: var(--mj-text-inverse); width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; }\n.ps-pchip.s i { background: var(--ps-node-source); }\n.ps-pchip.f i { background: var(--ps-node-feature); }\n.ps-pchip.e i { background: var(--ps-node-embedding); }\n.ps-pchip.t i { background: var(--ps-node-target); }\n.ps-pchip.a i { background: var(--ps-node-algorithm); }\n\n/* segmented control */\n.ps-seg { display: inline-flex; border: 1px solid var(--mj-border-default); border-radius: 8px; overflow: hidden; }\n.ps-seg button {\n border: none; background: var(--mj-bg-surface); color: var(--mj-text-secondary);\n padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;\n border-right: 1px solid var(--mj-border-default);\n}\n.ps-seg button:last-child { border-right: none; }\n.ps-seg button.on { background: var(--mj-brand-primary); color: var(--mj-text-inverse); }\n\n/* field control */\n.ps-field { margin-bottom: 14px; }\n.ps-field > label {\n display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;\n color: var(--mj-text-muted); font-weight: 700; margin-bottom: 6px;\n}\n.ps-input {\n width: 100%; padding: 8px 10px; border: 1px solid var(--mj-border-default);\n border-radius: 6px; font-size: 13px; background: var(--mj-bg-surface); color: var(--mj-text-primary);\n box-sizing: border-box;\n}\n.ps-input:focus { outline: none; border-color: var(--mj-brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 12%, transparent); }\n\n/* loading container */\n.ps-loading { display: flex; align-items: center; justify-content: center; padding: 60px 0; }\n\n/* ---- empty / prompt states ---- */\n.ps-empty {\n display: flex; flex-direction: column; align-items: center; justify-content: center;\n text-align: center; gap: 10px; padding: 56px 24px; color: var(--mj-text-muted);\n}\n.ps-empty .ps-empty-ico {\n width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;\n background: var(--mj-bg-surface-sunken); color: var(--mj-text-disabled); font-size: 24px;\n}\n.ps-empty h3 { margin: 4px 0 0; font-size: 16px; font-weight: 650; color: var(--mj-text-secondary); }\n.ps-empty p { margin: 0; max-width: 420px; font-size: 13px; line-height: 1.5; }\n\n/* ---- confirm modal ---- */\n.ps-modal-backdrop {\n position: fixed; inset: 0; z-index: 1000;\n background: var(--mj-bg-overlay);\n display: flex; align-items: center; justify-content: center; padding: 24px;\n}\n.ps-modal {\n width: 100%; max-width: 480px; background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default); border-radius: 14px;\n box-shadow: var(--mj-shadow-lg, var(--mj-shadow-sm)); overflow: hidden;\n}\n.ps-modal-head {\n display: flex; align-items: center; gap: 12px; padding: 18px 20px;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n.ps-modal-head .ico {\n width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;\n font-size: 16px; flex: 0 0 auto;\n background: var(--mj-status-info-bg); color: var(--mj-status-info-text);\n}\n.ps-modal-head.warn .ico { background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n.ps-modal-head.danger .ico { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n.ps-modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 650; color: var(--mj-text-primary); }\n.ps-modal-body { padding: 18px 20px; font-size: 13.5px; line-height: 1.55; color: var(--mj-text-secondary); }\n.ps-modal-body .ps-field { margin-top: 14px; margin-bottom: 0; }\n.ps-modal-foot {\n display: flex; align-items: center; gap: 10px; padding: 14px 20px;\n border-top: 1px solid var(--mj-border-subtle); background: var(--mj-bg-surface-card);\n}\n.ps-modal-foot .ps-spacer { flex: 1; }\n"] }]
|
|
273
|
-
}], null, { Title: [{
|
|
274
|
-
type: Input
|
|
275
|
-
}], title: [{
|
|
276
|
-
type: Input
|
|
277
|
-
}], Icon: [{
|
|
278
|
-
type: Input
|
|
279
|
-
}], icon: [{
|
|
280
|
-
type: Input
|
|
281
|
-
}], ConfirmIcon: [{
|
|
282
|
-
type: Input
|
|
283
|
-
}], confirmIcon: [{
|
|
284
|
-
type: Input
|
|
285
|
-
}], ConfirmLabel: [{
|
|
286
|
-
type: Input
|
|
287
|
-
}], confirmLabel: [{
|
|
288
|
-
type: Input
|
|
289
|
-
}], Variant: [{
|
|
290
|
-
type: Input
|
|
291
|
-
}], variant: [{
|
|
292
|
-
type: Input
|
|
293
|
-
}], ShowReason: [{
|
|
294
|
-
type: Input
|
|
295
|
-
}], showReason: [{
|
|
296
|
-
type: Input
|
|
297
|
-
}], ReasonRequired: [{
|
|
298
|
-
type: Input
|
|
299
|
-
}], reasonRequired: [{
|
|
300
|
-
type: Input
|
|
301
|
-
}], ReasonLabel: [{
|
|
302
|
-
type: Input
|
|
303
|
-
}], reasonLabel: [{
|
|
304
|
-
type: Input
|
|
305
|
-
}], ReasonPlaceholder: [{
|
|
306
|
-
type: Input
|
|
307
|
-
}], reasonPlaceholder: [{
|
|
308
|
-
type: Input
|
|
309
|
-
}], Busy: [{
|
|
310
|
-
type: Input
|
|
311
|
-
}], busy: [{
|
|
312
|
-
type: Input
|
|
313
|
-
}], Confirmed: [{
|
|
314
|
-
type: Output
|
|
315
|
-
}], confirmed: [{
|
|
316
|
-
type: Output
|
|
317
|
-
}], Cancelled: [{
|
|
318
|
-
type: Output
|
|
319
|
-
}], cancelled: [{
|
|
320
|
-
type: Output
|
|
321
|
-
}] }); })();
|
|
322
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PSConfirmModalComponent, { className: "PSConfirmModalComponent", filePath: "src/PredictiveStudio/components/ps-confirm-modal.component.ts", lineNumber: 67 }); })();
|
|
323
|
-
//# sourceMappingURL=ps-confirm-modal.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ps-confirm-modal.component.js","sourceRoot":"","sources":["../../../src/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Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MJButtonDirective } from '@memberjunction/ng-ui-components';\n\n/** Visual variant of the confirm modal — drives the header icon-tile color. */\nexport type PSConfirmVariant = 'info' | 'warn' | 'danger';\n\n/**\n * Small, reusable confirmation modal for Predictive Studio's real mutations (model promote/archive,\n * experiment pause/cancel). Renders a token-styled backdrop + card with a title, a rich message\n * (projected via `<ng-content>`), an optional reason textarea, and a left-aligned primary confirm\n * button followed by Cancel (MJ button-placement convention). The host owns visibility and the\n * confirm/cancel handlers; this component is purely presentational + emits the captured reason.\n *\n * While `busy` is true the confirm button shows a spinner and both buttons disable, giving the\n * in-flight Remote Op a clear, non-dismissable feel.\n */\n@Component({\n standalone: true,\n selector: 'ps-confirm-modal',\n imports: [CommonModule, FormsModule, MJButtonDirective],\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['../predictive-studio.shared.css'],\n template: `\n <div class=\"ps-modal-backdrop\" data-testid=\"ps-confirm-modal\" (click)=\"onBackdrop()\">\n <div class=\"ps-modal\" (click)=\"$event.stopPropagation()\">\n <div class=\"ps-modal-head\" [class.warn]=\"variant === 'warn'\" [class.danger]=\"variant === 'danger'\">\n <span class=\"ico\"><i [class]=\"icon\"></i></span>\n <h3>{{ title }}</h3>\n </div>\n <div class=\"ps-modal-body\">\n <ng-content></ng-content>\n @if (showReason) {\n <div class=\"ps-field\">\n <label>{{ reasonLabel }}{{ reasonRequired ? ' *' : '' }}</label>\n <textarea\n class=\"ps-input\"\n rows=\"3\"\n data-testid=\"ps-confirm-reason\"\n [placeholder]=\"reasonPlaceholder\"\n [(ngModel)]=\"reason\"\n [disabled]=\"busy\"></textarea>\n </div>\n }\n </div>\n <div class=\"ps-modal-foot\">\n <button\n mjButton\n [variant]=\"variant === 'danger' ? 'danger' : 'primary'\"\n size=\"sm\"\n data-testid=\"ps-confirm-ok\"\n [disabled]=\"busy || (reasonRequired && !reason.trim())\"\n (click)=\"confirmed.emit(reason.trim())\">\n @if (busy) { <i class=\"fa-solid fa-circle-notch fa-spin\"></i> } @else { <i [class]=\"confirmIcon\"></i> }\n {{ confirmLabel }}\n </button>\n <span class=\"ps-spacer\"></span>\n <button mjButton variant=\"secondary\" size=\"sm\" data-testid=\"ps-confirm-cancel\" [disabled]=\"busy\" (click)=\"cancelled.emit()\">\n Cancel\n </button>\n </div>\n </div>\n </div>\n `,\n})\nexport class PSConfirmModalComponent {\n /** Modal heading. */\n @Input() Title = 'Confirm';\n\n /** @deprecated Use {@link Title}. */\n @Input() set title(value: PSConfirmModalComponent['Title']) {\n this.Title = value;\n }\n /** @deprecated Use {@link Title}. */\n get title(): PSConfirmModalComponent['Title'] {\n return this.Title;\n }\n /** Header icon-tile Font Awesome class. */\n @Input() Icon = 'fa-solid fa-circle-question';\n\n /** @deprecated Use {@link Icon}. */\n @Input() set icon(value: PSConfirmModalComponent['Icon']) {\n this.Icon = value;\n }\n /** @deprecated Use {@link Icon}. */\n get icon(): PSConfirmModalComponent['Icon'] {\n return this.Icon;\n }\n /** Confirm-button Font Awesome class (shown when not busy). */\n @Input() ConfirmIcon = 'fa-solid fa-check';\n\n /** @deprecated Use {@link ConfirmIcon}. */\n @Input() set confirmIcon(value: PSConfirmModalComponent['ConfirmIcon']) {\n this.ConfirmIcon = value;\n }\n /** @deprecated Use {@link ConfirmIcon}. */\n get confirmIcon(): PSConfirmModalComponent['ConfirmIcon'] {\n return this.ConfirmIcon;\n }\n /** Confirm-button label. */\n @Input() ConfirmLabel = 'Confirm';\n\n /** @deprecated Use {@link ConfirmLabel}. */\n @Input() set confirmLabel(value: PSConfirmModalComponent['ConfirmLabel']) {\n this.ConfirmLabel = value;\n }\n /** @deprecated Use {@link ConfirmLabel}. */\n get confirmLabel(): PSConfirmModalComponent['ConfirmLabel'] {\n return this.ConfirmLabel;\n }\n /** Visual variant (info / warn / danger). */\n @Input() Variant: PSConfirmVariant = 'info';\n\n /** @deprecated Use {@link Variant}. */\n @Input() set variant(value: PSConfirmVariant) {\n this.Variant = value;\n }\n /** @deprecated Use {@link Variant}. */\n get variant(): PSConfirmVariant {\n return this.Variant;\n }\n /** When true, render the reason textarea. */\n @Input() ShowReason = false;\n\n /** @deprecated Use {@link ShowReason}. */\n @Input() set showReason(value: PSConfirmModalComponent['ShowReason']) {\n this.ShowReason = value;\n }\n /** @deprecated Use {@link ShowReason}. */\n get showReason(): PSConfirmModalComponent['ShowReason'] {\n return this.ShowReason;\n }\n /** When true, the confirm button stays disabled until a non-empty reason is entered. */\n @Input() ReasonRequired = false;\n\n /** @deprecated Use {@link ReasonRequired}. */\n @Input() set reasonRequired(value: PSConfirmModalComponent['ReasonRequired']) {\n this.ReasonRequired = value;\n }\n /** @deprecated Use {@link ReasonRequired}. */\n get reasonRequired(): PSConfirmModalComponent['ReasonRequired'] {\n return this.ReasonRequired;\n }\n /** Reason field label. */\n @Input() ReasonLabel = 'Reason';\n\n /** @deprecated Use {@link ReasonLabel}. */\n @Input() set reasonLabel(value: PSConfirmModalComponent['ReasonLabel']) {\n this.ReasonLabel = value;\n }\n /** @deprecated Use {@link ReasonLabel}. */\n get reasonLabel(): PSConfirmModalComponent['ReasonLabel'] {\n return this.ReasonLabel;\n }\n /** Reason field placeholder. */\n @Input() ReasonPlaceholder = 'Add an optional note…';\n\n /** @deprecated Use {@link ReasonPlaceholder}. */\n @Input() set reasonPlaceholder(value: PSConfirmModalComponent['ReasonPlaceholder']) {\n this.ReasonPlaceholder = value;\n }\n /** @deprecated Use {@link ReasonPlaceholder}. */\n get reasonPlaceholder(): PSConfirmModalComponent['ReasonPlaceholder'] {\n return this.ReasonPlaceholder;\n }\n /** In-flight flag — disables the buttons + shows the confirm spinner. */\n @Input() Busy = false;\n\n /** @deprecated Use {@link Busy}. */\n @Input() set busy(value: PSConfirmModalComponent['Busy']) {\n this.Busy = value;\n }\n /** @deprecated Use {@link Busy}. */\n get busy(): PSConfirmModalComponent['Busy'] {\n return this.Busy;\n }\n\n /** The captured reason (two-way via the textarea). */\n public Reason = '';\n\n /** @deprecated Use {@link Reason}. */\n public get reason() {\n return this.Reason;\n }\n /** @deprecated Use {@link Reason}. */\n public set reason(value) {\n this.Reason = value;\n }\n\n /** Emitted with the trimmed reason when the user confirms. */\n @Output() Confirmed = new EventEmitter<string>();\n\n /**\n * @deprecated Use {@link Confirmed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (confirmed) keeps working. Must stay AFTER Confirmed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() confirmed = this.Confirmed;\n /** Emitted when the user cancels (button or backdrop). */\n @Output() Cancelled = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Cancelled}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (cancelled) keeps working. Must stay AFTER Cancelled: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() cancelled = this.Cancelled;\n\n /** Backdrop click cancels — unless an operation is in flight. */\n public OnBackdrop(): void {\n if (!this.Busy) this.Cancelled.emit();\n }\n\n /** @deprecated Use {@link OnBackdrop}. */\n public onBackdrop(): void {\n return this.OnBackdrop();\n }\n}\n"]}
|