@memberjunction/ng-core-entity-forms 6.2.0-edge.0 → 6.2.0-edge.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/custom/AIAgentCategories/ai-agent-category-overview.panel.d.ts +1 -1
- package/dist/lib/custom/AIAgentCategories/ai-agent-category-overview.panel.js +2 -2
- package/dist/lib/custom/AIAgentCategories/ai-agent-category-overview.panel.js.map +1 -1
- package/dist/lib/custom/AIAgentSessions/ai-agent-session-form.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts +90 -16
- package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/add-action-dialog.component.js +218 -70
- package/dist/lib/custom/AIAgents/add-action-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts +1 -0
- package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/agent-form-tabs.js +2 -0
- package/dist/lib/custom/AIAgents/agent-form-tabs.js.map +1 -1
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts +80 -16
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js +146 -46
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +329 -27
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js +1322 -783
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts +76 -0
- package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-management.service.js +77 -33
- package/dist/lib/custom/AIAgents/ai-agent-management.service.js.map +1 -1
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts +69 -15
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js +182 -74
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts +105 -25
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js +272 -112
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.d.ts +32 -6
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.js +71 -19
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/new-agent-dialog.service.d.ts +10 -0
- package/dist/lib/custom/AIAgents/new-agent-dialog.service.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/new-agent-dialog.service.js +27 -7
- package/dist/lib/custom/AIAgents/new-agent-dialog.service.js.map +1 -1
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts +65 -15
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js +152 -52
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts +81 -15
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js +145 -45
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts +71 -17
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js +175 -67
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts +173 -27
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +385 -93
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -1
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts +64 -4
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js +129 -29
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +260 -27
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +694 -252
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts +10 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js +17 -9
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js.map +1 -1
- package/dist/lib/custom/AIPrompts/pending-records.d.ts +11 -0
- package/dist/lib/custom/AIPrompts/pending-records.d.ts.map +1 -0
- package/dist/lib/custom/AIPrompts/pending-records.js +21 -0
- package/dist/lib/custom/AIPrompts/pending-records.js.map +1 -0
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts +74 -16
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js +174 -58
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js.map +1 -1
- package/dist/lib/custom/Actions/action-execution-log-form.component.d.ts +108 -14
- package/dist/lib/custom/Actions/action-execution-log-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Actions/action-execution-log-form.component.js +258 -70
- package/dist/lib/custom/Actions/action-execution-log-form.component.js.map +1 -1
- package/dist/lib/custom/Actions/action-form.component.d.ts +198 -14
- package/dist/lib/custom/Actions/action-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Actions/action-form.component.js +387 -107
- package/dist/lib/custom/Actions/action-form.component.js.map +1 -1
- package/dist/lib/custom/BridgeProviders/bridge-provider-features.d.ts +12 -6
- package/dist/lib/custom/BridgeProviders/bridge-provider-features.d.ts.map +1 -1
- package/dist/lib/custom/BridgeProviders/bridge-provider-features.js +41 -29
- package/dist/lib/custom/BridgeProviders/bridge-provider-features.js.map +1 -1
- package/dist/lib/custom/BridgeProviders/bridge-provider-form.component.js +14 -14
- package/dist/lib/custom/BridgeProviders/bridge-provider-form.component.js.map +1 -1
- package/dist/lib/custom/Companies/company-overview.panel.d.ts +1 -1
- package/dist/lib/custom/Companies/company-overview.panel.js +2 -2
- package/dist/lib/custom/Companies/company-overview.panel.js.map +1 -1
- package/dist/lib/custom/Conversations/conversation-overview.panel.d.ts +1 -1
- package/dist/lib/custom/Conversations/conversation-overview.panel.js +2 -2
- package/dist/lib/custom/Conversations/conversation-overview.panel.js.map +1 -1
- package/dist/lib/custom/Employees/employee-overview.panel.d.ts +1 -1
- package/dist/lib/custom/Employees/employee-overview.panel.js +2 -2
- package/dist/lib/custom/Employees/employee-overview.panel.js.map +1 -1
- package/dist/lib/custom/Entities/entity-form.component.d.ts +217 -29
- package/dist/lib/custom/Entities/entity-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Entities/entity-form.component.js +734 -285
- package/dist/lib/custom/Entities/entity-form.component.js.map +1 -1
- package/dist/lib/custom/EntityActions/entityaction.form.component.d.ts +5 -1
- package/dist/lib/custom/EntityActions/entityaction.form.component.d.ts.map +1 -1
- package/dist/lib/custom/EntityActions/entityaction.form.component.js +10 -2
- package/dist/lib/custom/EntityActions/entityaction.form.component.js.map +1 -1
- package/dist/lib/custom/Files/file-form.component.d.ts +1 -1
- package/dist/lib/custom/Files/file-form.component.js +2 -2
- package/dist/lib/custom/Files/file-form.component.js.map +1 -1
- package/dist/lib/custom/Lists/list-form.component.d.ts +300 -36
- package/dist/lib/custom/Lists/list-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Lists/list-form.component.js +664 -208
- package/dist/lib/custom/Lists/list-form.component.js.map +1 -1
- package/dist/lib/custom/MLModels/ml-model-view-models.d.ts +31 -0
- package/dist/lib/custom/MLModels/ml-model-view-models.d.ts.map +1 -1
- package/dist/lib/custom/MLModels/ml-model-view-models.js +52 -16
- package/dist/lib/custom/MLModels/ml-model-view-models.js.map +1 -1
- package/dist/lib/custom/MLModels/ps-model-detail.component.d.ts +107 -10
- package/dist/lib/custom/MLModels/ps-model-detail.component.d.ts.map +1 -1
- package/dist/lib/custom/MLModels/ps-model-detail.component.js +291 -101
- package/dist/lib/custom/MLModels/ps-model-detail.component.js.map +1 -1
- package/dist/lib/custom/Queries/query-form.component.d.ts +201 -26
- package/dist/lib/custom/Queries/query-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Queries/query-form.component.js +429 -109
- package/dist/lib/custom/Queries/query-form.component.js.map +1 -1
- package/dist/lib/custom/Queries/query-run-dialog.component.d.ts +107 -14
- package/dist/lib/custom/Queries/query-run-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/Queries/query-run-dialog.component.js +249 -79
- package/dist/lib/custom/Queries/query-run-dialog.component.js.map +1 -1
- package/dist/lib/custom/RecordProcesses/record-process-form.component.d.ts +129 -4
- package/dist/lib/custom/RecordProcesses/record-process-form.component.d.ts.map +1 -1
- package/dist/lib/custom/RecordProcesses/record-process-form.component.js +904 -90
- package/dist/lib/custom/RecordProcesses/record-process-form.component.js.map +1 -1
- package/dist/lib/custom/Rubrics/evaluation-form.component.d.ts +37 -0
- package/dist/lib/custom/Rubrics/evaluation-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/evaluation-form.component.js +399 -0
- package/dist/lib/custom/Rubrics/evaluation-form.component.js.map +1 -0
- package/dist/lib/custom/Rubrics/record-forms.component.d.ts +69 -0
- package/dist/lib/custom/Rubrics/record-forms.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/record-forms.component.js +587 -0
- package/dist/lib/custom/Rubrics/record-forms.component.js.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.d.ts +67 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.js +534 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.js.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.d.ts +25 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.js +299 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.js.map +1 -0
- package/dist/lib/custom/Rubrics/scale-form.component.d.ts +31 -0
- package/dist/lib/custom/Rubrics/scale-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/scale-form.component.js +395 -0
- package/dist/lib/custom/Rubrics/scale-form.component.js.map +1 -0
- package/dist/lib/custom/SearchScopes/searchscope-form.component.d.ts +1 -1
- package/dist/lib/custom/SearchScopes/searchscope-form.component.js +4 -4
- package/dist/lib/custom/SearchScopes/searchscope-form.component.js.map +1 -1
- package/dist/lib/custom/SessionBridges/session-bridge-form.component.js.map +1 -1
- package/dist/lib/custom/Templates/template-param-dialog.component.d.ts +77 -13
- package/dist/lib/custom/Templates/template-param-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/Templates/template-param-dialog.component.js +196 -78
- package/dist/lib/custom/Templates/template-param-dialog.component.js.map +1 -1
- package/dist/lib/custom/Templates/template-params-grid.component.d.ts +49 -7
- package/dist/lib/custom/Templates/template-params-grid.component.d.ts.map +1 -1
- package/dist/lib/custom/Templates/template-params-grid.component.js +132 -44
- package/dist/lib/custom/Templates/template-params-grid.component.js.map +1 -1
- package/dist/lib/custom/Templates/templates-form.component.d.ts +153 -19
- package/dist/lib/custom/Templates/templates-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Templates/templates-form.component.js +434 -217
- package/dist/lib/custom/Templates/templates-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/entity-link-pill.component.d.ts +24 -4
- package/dist/lib/custom/Tests/entity-link-pill.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/entity-link-pill.component.js +64 -20
- package/dist/lib/custom/Tests/entity-link-pill.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-form.component.d.ts +223 -27
- package/dist/lib/custom/Tests/test-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-form.component.js +951 -530
- package/dist/lib/custom/Tests/test-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-run-checks.d.ts +2 -0
- package/dist/lib/custom/Tests/test-run-checks.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-run-checks.js +5 -1
- package/dist/lib/custom/Tests/test-run-checks.js.map +1 -1
- package/dist/lib/custom/Tests/test-run-feedback-form.component.d.ts +2 -0
- package/dist/lib/custom/Tests/test-run-feedback-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-run-feedback-form.component.js +5 -1
- package/dist/lib/custom/Tests/test-run-feedback-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-run-form.component.d.ts +146 -18
- package/dist/lib/custom/Tests/test-run-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-run-form.component.js +362 -106
- package/dist/lib/custom/Tests/test-run-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-suite-form.component.d.ts +395 -47
- package/dist/lib/custom/Tests/test-suite-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-suite-form.component.js +1719 -1007
- package/dist/lib/custom/Tests/test-suite-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-suite-run-form.component.d.ts +214 -26
- package/dist/lib/custom/Tests/test-suite-run-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-suite-run-form.component.js +535 -159
- package/dist/lib/custom/Tests/test-suite-run-form.component.js.map +1 -1
- package/dist/lib/custom/Users/user-overview.panel.d.ts +1 -1
- package/dist/lib/custom/Users/user-overview.panel.js +3 -3
- package/dist/lib/custom/Users/user-overview.panel.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts +208 -29
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js +446 -138
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.d.ts +6 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.js +16 -4
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.d.ts +50 -6
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.js +84 -12
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts +89 -5
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js +216 -70
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.d.ts +62 -3
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js +140 -42
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts +81 -10
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js +165 -37
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts +140 -15
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +326 -100
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.d.ts +101 -15
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.js +281 -97
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.d.ts +43 -25
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js +100 -64
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.d.ts +14 -2
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.js +71 -53
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.d.ts +14 -2
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.js +70 -52
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.d.ts +8 -0
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.js +22 -6
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.d.ts +24 -2
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.js +91 -59
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.d.ts +10 -2
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.js +33 -17
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.d.ts +2 -0
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.js +34 -30
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.d.ts +14 -2
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.js +69 -51
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.js.map +1 -1
- package/dist/lib/custom/custom-forms.module.d.ts +56 -48
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +60 -0
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts +38 -12
- package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/shared/entity-selector-dialog.component.js +103 -51
- package/dist/lib/custom/shared/entity-selector-dialog.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js +61 -43
- package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.js +74 -0
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js +37 -19
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.js +78 -52
- package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIVendor/mjaivendor.form.component.js +76 -74
- package/dist/lib/generated/Entities/MJAIVendor/mjaivendor.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js +156 -84
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.js +62 -0
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.js +24 -6
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJProject/mjproject.form.component.js +27 -25
- package/dist/lib/generated/Entities/MJProject/mjproject.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.js +24 -16
- package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.js +107 -0
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.js +74 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.js +135 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.js +87 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.js +107 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.js +155 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.js +62 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.js +183 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.js +120 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.js +107 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.js +103 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.js +171 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJTest/mjtest.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJTest/mjtest.form.component.js +24 -16
- package/dist/lib/generated/Entities/MJTest/mjtest.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJTestSuite/mjtestsuite.form.component.js +27 -25
- package/dist/lib/generated/Entities/MJTestSuite/mjtestsuite.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.js +19 -11
- package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js +209 -119
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js.map +1 -1
- package/dist/lib/generated/generated-forms.module.d.ts +436 -422
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +44 -2
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.d.ts +5 -1
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.d.ts.map +1 -1
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.js +11 -3
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.js.map +1 -1
- package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.d.ts +2 -0
- package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.d.ts.map +1 -1
- package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.js +16 -12
- package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.js.map +1 -1
- package/dist/lib/panels/content-sources/website-crawler-settings.panel.d.ts +1 -1
- package/dist/lib/panels/content-sources/website-crawler-settings.panel.js +2 -2
- package/dist/lib/panels/content-sources/website-crawler-settings.panel.js.map +1 -1
- package/dist/lib/panels/model-predictions/model-prediction.logic.d.ts +45 -19
- package/dist/lib/panels/model-predictions/model-prediction.logic.d.ts.map +1 -1
- package/dist/lib/panels/model-predictions/model-prediction.logic.js +95 -43
- package/dist/lib/panels/model-predictions/model-prediction.logic.js.map +1 -1
- package/dist/lib/panels/model-predictions/model-prediction.panel.d.ts +20 -16
- package/dist/lib/panels/model-predictions/model-prediction.panel.d.ts.map +1 -1
- package/dist/lib/panels/model-predictions/model-prediction.panel.js +73 -65
- package/dist/lib/panels/model-predictions/model-prediction.panel.js.map +1 -1
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.d.ts +116 -0
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.d.ts.map +1 -0
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.js +820 -0
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.js.map +1 -0
- package/dist/lib/shared/components/template-editor.component.d.ts +158 -15
- package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -1
- package/dist/lib/shared/components/template-editor.component.js +389 -127
- package/dist/lib/shared/components/template-editor.component.js.map +1 -1
- package/dist/public-api.d.ts +5 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +5 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +47 -42
|
@@ -108,6 +108,14 @@ let AISkillSharingPanel = class AISkillSharingPanel extends BaseFormPanel {
|
|
|
108
108
|
this.IsExporting = false;
|
|
109
109
|
this.IsImporting = false;
|
|
110
110
|
}
|
|
111
|
+
/** @deprecated Use {@link ImportFileInput}. */
|
|
112
|
+
get importFileInput() {
|
|
113
|
+
return this.ImportFileInput;
|
|
114
|
+
}
|
|
115
|
+
/** @deprecated Use {@link ImportFileInput}. */
|
|
116
|
+
set importFileInput(value) {
|
|
117
|
+
this.ImportFileInput = value;
|
|
118
|
+
}
|
|
111
119
|
/**
|
|
112
120
|
* Whether the current user may manage this skill's permission grid (per-user / per-role
|
|
113
121
|
* View/Run/Edit/Delete on the skill). `BaseFormPanel` has no Provider input (the panel slot
|
|
@@ -159,7 +167,7 @@ let AISkillSharingPanel = class AISkillSharingPanel extends BaseFormPanel {
|
|
|
159
167
|
}
|
|
160
168
|
/** Opens the hidden file input; the actual import happens in `OnImportFileSelected`. */
|
|
161
169
|
TriggerImport() {
|
|
162
|
-
this.
|
|
170
|
+
this.ImportFileInput?.nativeElement.click();
|
|
163
171
|
}
|
|
164
172
|
async OnImportFileSelected(event) {
|
|
165
173
|
const input = event.target;
|
|
@@ -207,7 +215,7 @@ let AISkillSharingPanel = class AISkillSharingPanel extends BaseFormPanel {
|
|
|
207
215
|
i0.ɵɵviewQuery(_c0, 5);
|
|
208
216
|
} if (rf & 2) {
|
|
209
217
|
let _t;
|
|
210
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.
|
|
218
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ImportFileInput = _t.first);
|
|
211
219
|
} }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 4, consts: [["importFileInput", ""], ["SectionKey", "aiSkillSharing", "SectionName", "Sharing & Portability", "Icon", "fa fa-share-nodes", 3, "Form", "FormContext"], [1, "ai-skill-sharing-hint"], [1, "ai-skill-sharing-actions"], [3, "Skill"], ["mjButton", "", "variant", "secondary", "size", "sm"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "click", "disabled"], ["type", "file", "accept", ".md,.SKILL.md,text/markdown", 1, "ai-skill-sharing-file-input", 3, "change"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "click"], [1, "fa-solid", "fa-shield-halved"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-file-export"], [1, "fa-solid", "fa-file-import"], [3, "Closed", "Skill"]], template: function AISkillSharingPanel_Template(rf, ctx) { if (rf & 1) {
|
|
212
220
|
i0.ɵɵelementStart(0, "mj-collapsible-panel", 1);
|
|
213
221
|
i0.ɵɵconditionalCreate(1, AISkillSharingPanel_Conditional_1_Template, 2, 0, "p", 2)(2, AISkillSharingPanel_Conditional_2_Template, 10, 5, "div", 3);
|
|
@@ -232,7 +240,7 @@ export { AISkillSharingPanel };
|
|
|
232
240
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AISkillSharingPanel, [{
|
|
233
241
|
type: Component,
|
|
234
242
|
args: [{ standalone: false, selector: 'mj-ai-skill-sharing-panel', template: "<mj-collapsible-panel\n SectionKey=\"aiSkillSharing\"\n SectionName=\"Sharing & Portability\"\n Icon=\"fa fa-share-nodes\"\n [Form]=\"FormComponent\"\n [FormContext]=\"FormContext\">\n\n @if (!CanExportImport) {\n <p class=\"ai-skill-sharing-hint\">Save this skill first to share it or export/import SKILL.md.</p>\n } @else {\n <div class=\"ai-skill-sharing-actions\">\n @if (CanShareSkills) {\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"OpenPermissionsDialog()\">\n <i class=\"fa-solid fa-shield-halved\"></i> Manage Permissions\n </button>\n }\n\n <button mjButton variant=\"secondary\" size=\"sm\" [disabled]=\"IsExporting\" (click)=\"ExportMarkdown()\">\n @if (IsExporting) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Exporting\u2026\n } @else {\n <i class=\"fa-solid fa-file-export\"></i> Export SKILL.md\n }\n </button>\n\n <button mjButton variant=\"secondary\" size=\"sm\" [disabled]=\"IsImporting\" (click)=\"TriggerImport()\">\n @if (IsImporting) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Importing\u2026\n } @else {\n <i class=\"fa-solid fa-file-import\"></i> Import SKILL.md\n }\n </button>\n <input #importFileInput type=\"file\" accept=\".md,.SKILL.md,text/markdown\" class=\"ai-skill-sharing-file-input\" (change)=\"OnImportFileSelected($event)\" />\n </div>\n }\n</mj-collapsible-panel>\n\n@if (PermissionsDialogVisible) {\n <mj-skill-permissions-dialog\n [Skill]=\"Record\"\n (Closed)=\"OnPermissionsDialogClosed()\">\n </mj-skill-permissions-dialog>\n}\n", styles: [".ai-skill-sharing-hint {\n color: var(--mj-text-muted);\n font-size: 0.875rem;\n margin: 0;\n}\n\n.ai-skill-sharing-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n align-items: center;\n}\n\n.ai-skill-sharing-file-input {\n display: none;\n}\n"] }]
|
|
235
|
-
}], null, {
|
|
243
|
+
}], null, { ImportFileInput: [{
|
|
236
244
|
type: ViewChild,
|
|
237
245
|
args: ['importFileInput']
|
|
238
246
|
}] }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-skill-sharing-panel.component.js","sourceRoot":"","sources":["../../../../src/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.ts","../../../../src/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAExE,iGAAiG;AACjG,+FAA+F;AAC/F,mEAAmE;AACnE,OAAO,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC/G,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;;;ICDjE,4BAAiC;IAAA,4EAA4D;IAAA,iBAAI;;;;IAIzF,iCAAiF;IAAlC,sMAAS,8BAAuB,KAAC;IAC5E,uBAAyC;IAAC,oCAC9C;IAAA,iBAAS;;;IAKL,wBAA2C;IAAC,iCAChD;;;IACI,wBAAuC;IAAC,iCAC5C;;;IAKI,wBAA2C;IAAC,iCAChD;;;IACI,wBAAuC;IAAC,iCAC5C;;;;IApBR,8BAAsC;IAClC,sGAAsB;IAMtB,iCAAmG;IAA3B,uLAAS,uBAAgB,KAAC;IAG5F,AAFF,yFAAmB,mEAEV;IAGb,iBAAS;IAET,iCAAkG;IAA1B,uLAAS,sBAAe,KAAC;IAG3F,AAFF,y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AOW,mBAAmB,CAoI/B;;iFApIY,mBAAmB;cAN/B,SAAS;6BACM,KAAK,YACP,2BAA2B;;kBAKpC,SAAS;mBAAC,iBAAiB;;kFADnB,mBAAmB","sourcesContent":["import { Component, ViewChild, ElementRef } from '@angular/core';\nimport { RegisterClassEx } from '@memberjunction/global';\nimport { BaseFormPanel } from '@memberjunction/ng-base-forms';\nimport { Metadata, AuthorizationEvaluator } from '@memberjunction/core';\nimport { MJAISkillEntity } from '@memberjunction/core-entities';\n// CodeGen-generated Remote Operation classes for AISkill.ExportMarkdown / AISkill.ImportMarkdown\n// (see metadata/remote-operations/.remote-operations.json) — requires `mj codegen` to have run\n// against the migration that seeds them before this file compiles.\nimport { AISkillExportMarkdownOperation, AISkillImportMarkdownOperation } from '@memberjunction/core-entities';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\n\n/** `MJ: Authorizations.Name` gating the Manage Permissions action — seeded in metadata/authorizations/.agent-skills.json. */\nconst CAN_SHARE_SKILLS_AUTH_NAME = 'Can Share Skills';\n\n/**\n * Adds Manage Permissions / Export SKILL.md / Import SKILL.md actions to the generated\n * `MJ: AI Skills` form via the BaseFormPanel slot system (Pattern 1 — see PANELS.md) rather than a\n * full custom form override, since the generated form's field panels and related-entity grids are\n * otherwise fine as-is.\n *\n * - Manage Permissions opens the dedicated `<mj-skill-permissions-dialog>` (from\n * `@memberjunction/ng-agents`), which reads/writes the dedicated `MJ: AI Skill Permissions`\n * table (per-user / per-role View/Run/Edit/Delete) — the same open-by-default, dedicated-table\n * model AI Agents use. It is gated behind the \"Can Share Skills\" authorization; authoring/using\n * your own skills never requires it.\n * - Export/Import call the `AISkill.ExportMarkdown` / `AISkill.ImportMarkdown` Remote Operations\n * (typed, provider-routed — see guides/REMOTE_OPERATIONS_GUIDE.md), which wrap\n * `SkillImportExportService` in `@memberjunction/ai-agents` server-side.\n */\n@RegisterClassEx(BaseFormPanel, {\n key: 'ai-skills:sharing-portability',\n skipNullKeyWarning: true,\n metadata: { entity: 'MJ: AI Skills', slot: 'after-fields', sortKey: 50 },\n})\n@Component({\n standalone: false,\n selector: 'mj-ai-skill-sharing-panel',\n templateUrl: './ai-skill-sharing-panel.component.html',\n styleUrls: ['./ai-skill-sharing-panel.component.css'],\n})\nexport class AISkillSharingPanel extends BaseFormPanel<MJAISkillEntity> {\n @ViewChild('importFileInput') importFileInput!: ElementRef<HTMLInputElement>;\n\n public PermissionsDialogVisible = false;\n\n public IsExporting = false;\n public IsImporting = false;\n\n /**\n * Whether the current user may manage this skill's permission grid (per-user / per-role\n * View/Run/Edit/Delete on the skill). `BaseFormPanel` has no Provider input (the panel slot\n * system doesn't thread one through yet), so this uses the global default provider —\n * consistent with the rest of the not-yet-multi-provider-migrated panel system today.\n */\n public get CanShareSkills(): boolean {\n const md = Metadata.Provider; // global-provider-ok: BaseFormPanel slots have no Provider input; panel system is single-provider today\n if (!md?.CurrentUser) {\n return false;\n }\n const auth = md.Authorizations?.find(a => a.Name === CAN_SHARE_SKILLS_AUTH_NAME);\n if (!auth) {\n return false;\n }\n try {\n return new AuthorizationEvaluator().CurrentUserCanExecuteWithAncestors(auth, md);\n } catch {\n return false;\n }\n }\n\n public get CanExportImport(): boolean {\n return !!this.Record?.IsSaved;\n }\n\n public OpenPermissionsDialog(): void {\n this.PermissionsDialogVisible = true;\n }\n\n public OnPermissionsDialogClosed(): void {\n this.PermissionsDialogVisible = false;\n }\n\n public async ExportMarkdown(): Promise<void> {\n this.IsExporting = true;\n try {\n const result = await new AISkillExportMarkdownOperation().Execute(\n { skillID: this.Record.ID },\n { provider: Metadata.Provider } // global-provider-ok: BaseFormPanel slots have no Provider input; panel system is single-provider today\n );\n if (!result.Success || !result.Output) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Export failed: ${result.ErrorMessage ?? 'unknown error'}`,\n 'error',\n 5000\n );\n return;\n }\n this.downloadTextFile(result.Output.markdown, `${result.Output.suggestedFileName}.SKILL.md`);\n } catch (error) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Export failed: ${(error as Error).message}`,\n 'error',\n 5000\n );\n } finally {\n this.IsExporting = false;\n }\n }\n\n /** Opens the hidden file input; the actual import happens in `OnImportFileSelected`. */\n public TriggerImport(): void {\n this.importFileInput?.nativeElement.click();\n }\n\n public async OnImportFileSelected(event: Event): Promise<void> {\n const input = event.target as HTMLInputElement;\n const file = input.files?.[0];\n input.value = ''; // allow re-selecting the same file next time\n if (!file) {\n return;\n }\n\n this.IsImporting = true;\n try {\n const markdownText = await file.text();\n const result = await new AISkillImportMarkdownOperation().Execute(\n { markdownText, updateSkillID: this.Record.ID },\n { provider: Metadata.Provider } // global-provider-ok: BaseFormPanel slots have no Provider input; panel system is single-provider today\n );\n if (!result.Success || !result.Output) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Import failed: ${result.ErrorMessage ?? 'unknown error'}`,\n 'error',\n 5000\n );\n return;\n }\n if (result.Output.warnings.length > 0) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Imported \"${result.Output.skillName}\" with ${result.Output.warnings.length} warning(s): ${result.Output.warnings.join('; ')}`,\n 'warning',\n 8000\n );\n } else {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Imported \"${result.Output.skillName}\".`,\n 'success',\n 3000\n );\n }\n // Refresh this record's fields (Instructions/Description/Category may have changed).\n await this.Record.Load(this.Record.ID);\n } catch (error) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Import failed: ${(error as Error).message}`,\n 'error',\n 5000\n );\n } finally {\n this.IsImporting = false;\n }\n }\n\n private downloadTextFile(text: string, fileName: string): void {\n const blob = new Blob([text], { type: 'text/markdown' });\n const url = URL.createObjectURL(blob);\n const anchor = document.createElement('a');\n anchor.href = url;\n anchor.download = fileName;\n anchor.click();\n URL.revokeObjectURL(url);\n }\n}\n","<mj-collapsible-panel\n SectionKey=\"aiSkillSharing\"\n SectionName=\"Sharing & Portability\"\n Icon=\"fa fa-share-nodes\"\n [Form]=\"FormComponent\"\n [FormContext]=\"FormContext\">\n\n @if (!CanExportImport) {\n <p class=\"ai-skill-sharing-hint\">Save this skill first to share it or export/import SKILL.md.</p>\n } @else {\n <div class=\"ai-skill-sharing-actions\">\n @if (CanShareSkills) {\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"OpenPermissionsDialog()\">\n <i class=\"fa-solid fa-shield-halved\"></i> Manage Permissions\n </button>\n }\n\n <button mjButton variant=\"secondary\" size=\"sm\" [disabled]=\"IsExporting\" (click)=\"ExportMarkdown()\">\n @if (IsExporting) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Exporting…\n } @else {\n <i class=\"fa-solid fa-file-export\"></i> Export SKILL.md\n }\n </button>\n\n <button mjButton variant=\"secondary\" size=\"sm\" [disabled]=\"IsImporting\" (click)=\"TriggerImport()\">\n @if (IsImporting) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Importing…\n } @else {\n <i class=\"fa-solid fa-file-import\"></i> Import SKILL.md\n }\n </button>\n <input #importFileInput type=\"file\" accept=\".md,.SKILL.md,text/markdown\" class=\"ai-skill-sharing-file-input\" (change)=\"OnImportFileSelected($event)\" />\n </div>\n }\n</mj-collapsible-panel>\n\n@if (PermissionsDialogVisible) {\n <mj-skill-permissions-dialog\n [Skill]=\"Record\"\n (Closed)=\"OnPermissionsDialogClosed()\">\n </mj-skill-permissions-dialog>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ai-skill-sharing-panel.component.js","sourceRoot":"","sources":["../../../../src/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.ts","../../../../src/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,sBAAsB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AE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;QACzD,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAC3C,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC;QAClB,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC3B,MAAM,CAAC,KAAK,EAAE,CAAC;QACf,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;gQA5IQ,mBAAmB,yBAAnB,mBAAmB;oEAAnB,mBAAmB;;;;;;YCxChC,+CAKgC;YAI1B,AAFF,mFAAwB,gEAEf;YA0Bb,iBAAuB;YAEvB,6GAAgC;;YAhC5B,AADA,wCAAsB,gCACK;YAE3B,cA2BC;YA3BD,8CA2BC;YAGL,eAKC;YALD,uDAKC;;;ADFY,mBAAmB;IAX/B,eAAe,CAAC,aAAa,EAAE;QAC5B,GAAG,EAAE,+BAA+B;QACpC,kBAAkB,EAAE,IAAI;QACxB,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,EAAE;KAC3E,CAAC;GAOW,mBAAmB,CA6I/B;;iFA7IY,mBAAmB;cAN/B,SAAS;6BACM,KAAK,YACP,2BAA2B;;kBAKpC,SAAS;mBAAC,iBAAiB;;kFADnB,mBAAmB","sourcesContent":["import { Component, ViewChild, ElementRef } from '@angular/core';\nimport { RegisterClassEx } from '@memberjunction/global';\nimport { BaseFormPanel } from '@memberjunction/ng-base-forms';\nimport { Metadata, AuthorizationEvaluator } from '@memberjunction/core';\nimport { MJAISkillEntity } from '@memberjunction/core-entities';\n// CodeGen-generated Remote Operation classes for AISkill.ExportMarkdown / AISkill.ImportMarkdown\n// (see metadata/remote-operations/.remote-operations.json) — requires `mj codegen` to have run\n// against the migration that seeds them before this file compiles.\nimport { AISkillExportMarkdownOperation, AISkillImportMarkdownOperation } from '@memberjunction/core-entities';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\n\n/** `MJ: Authorizations.Name` gating the Manage Permissions action — seeded in metadata/authorizations/.agent-skills.json. */\nconst CAN_SHARE_SKILLS_AUTH_NAME = 'Can Share Skills';\n\n/**\n * Adds Manage Permissions / Export SKILL.md / Import SKILL.md actions to the generated\n * `MJ: AI Skills` form via the BaseFormPanel slot system (Pattern 1 — see PANELS.md) rather than a\n * full custom form override, since the generated form's field panels and related-entity grids are\n * otherwise fine as-is.\n *\n * - Manage Permissions opens the dedicated `<mj-skill-permissions-dialog>` (from\n * `@memberjunction/ng-agents`), which reads/writes the dedicated `MJ: AI Skill Permissions`\n * table (per-user / per-role View/Run/Edit/Delete) — the same open-by-default, dedicated-table\n * model AI Agents use. It is gated behind the \"Can Share Skills\" authorization; authoring/using\n * your own skills never requires it.\n * - Export/Import call the `AISkill.ExportMarkdown` / `AISkill.ImportMarkdown` Remote Operations\n * (typed, provider-routed — see guides/REMOTE_OPERATIONS_GUIDE.md), which wrap\n * `SkillImportExportService` in `@memberjunction/ai-agents` server-side.\n */\n@RegisterClassEx(BaseFormPanel, {\n key: 'ai-skills:sharing-portability',\n skipNullKeyWarning: true,\n metadata: { entity: 'MJ: AI Skills', slot: 'after-fields', sortKey: 50 },\n})\n@Component({\n standalone: false,\n selector: 'mj-ai-skill-sharing-panel',\n templateUrl: './ai-skill-sharing-panel.component.html',\n styleUrls: ['./ai-skill-sharing-panel.component.css'],\n})\nexport class AISkillSharingPanel extends BaseFormPanel<MJAISkillEntity> {\n @ViewChild('importFileInput') ImportFileInput!: ElementRef<HTMLInputElement>;\n\n /** @deprecated Use {@link ImportFileInput}. */\n get importFileInput(): ElementRef<HTMLInputElement> {\n return this.ImportFileInput;\n }\n /** @deprecated Use {@link ImportFileInput}. */\n set importFileInput(value: ElementRef<HTMLInputElement>) {\n this.ImportFileInput = value;\n }\n\n public PermissionsDialogVisible = false;\n\n public IsExporting = false;\n public IsImporting = false;\n\n /**\n * Whether the current user may manage this skill's permission grid (per-user / per-role\n * View/Run/Edit/Delete on the skill). `BaseFormPanel` has no Provider input (the panel slot\n * system doesn't thread one through yet), so this uses the global default provider —\n * consistent with the rest of the not-yet-multi-provider-migrated panel system today.\n */\n public get CanShareSkills(): boolean {\n const md = Metadata.Provider; // global-provider-ok: BaseFormPanel slots have no Provider input; panel system is single-provider today\n if (!md?.CurrentUser) {\n return false;\n }\n const auth = md.Authorizations?.find(a => a.Name === CAN_SHARE_SKILLS_AUTH_NAME);\n if (!auth) {\n return false;\n }\n try {\n return new AuthorizationEvaluator().CurrentUserCanExecuteWithAncestors(auth, md);\n } catch {\n return false;\n }\n }\n\n public get CanExportImport(): boolean {\n return !!this.Record?.IsSaved;\n }\n\n public OpenPermissionsDialog(): void {\n this.PermissionsDialogVisible = true;\n }\n\n public OnPermissionsDialogClosed(): void {\n this.PermissionsDialogVisible = false;\n }\n\n public async ExportMarkdown(): Promise<void> {\n this.IsExporting = true;\n try {\n const result = await new AISkillExportMarkdownOperation().Execute(\n { skillID: this.Record.ID },\n { provider: Metadata.Provider } // global-provider-ok: BaseFormPanel slots have no Provider input; panel system is single-provider today\n );\n if (!result.Success || !result.Output) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Export failed: ${result.ErrorMessage ?? 'unknown error'}`,\n 'error',\n 5000\n );\n return;\n }\n this.downloadTextFile(result.Output.markdown, `${result.Output.suggestedFileName}.SKILL.md`);\n } catch (error) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Export failed: ${(error as Error).message}`,\n 'error',\n 5000\n );\n } finally {\n this.IsExporting = false;\n }\n }\n\n /** Opens the hidden file input; the actual import happens in `OnImportFileSelected`. */\n public TriggerImport(): void {\n this.ImportFileInput?.nativeElement.click();\n }\n\n public async OnImportFileSelected(event: Event): Promise<void> {\n const input = event.target as HTMLInputElement;\n const file = input.files?.[0];\n input.value = ''; // allow re-selecting the same file next time\n if (!file) {\n return;\n }\n\n this.IsImporting = true;\n try {\n const markdownText = await file.text();\n const result = await new AISkillImportMarkdownOperation().Execute(\n { markdownText, updateSkillID: this.Record.ID },\n { provider: Metadata.Provider } // global-provider-ok: BaseFormPanel slots have no Provider input; panel system is single-provider today\n );\n if (!result.Success || !result.Output) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Import failed: ${result.ErrorMessage ?? 'unknown error'}`,\n 'error',\n 5000\n );\n return;\n }\n if (result.Output.warnings.length > 0) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Imported \"${result.Output.skillName}\" with ${result.Output.warnings.length} warning(s): ${result.Output.warnings.join('; ')}`,\n 'warning',\n 8000\n );\n } else {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Imported \"${result.Output.skillName}\".`,\n 'success',\n 3000\n );\n }\n // Refresh this record's fields (Instructions/Description/Category may have changed).\n await this.Record.Load(this.Record.ID);\n } catch (error) {\n MJNotificationService.Instance.CreateSimpleNotification(\n `Import failed: ${(error as Error).message}`,\n 'error',\n 5000\n );\n } finally {\n this.IsImporting = false;\n }\n }\n\n private downloadTextFile(text: string, fileName: string): void {\n const blob = new Blob([text], { type: 'text/markdown' });\n const url = URL.createObjectURL(blob);\n const anchor = document.createElement('a');\n anchor.href = url;\n anchor.download = fileName;\n anchor.click();\n URL.revokeObjectURL(url);\n }\n}\n","<mj-collapsible-panel\n SectionKey=\"aiSkillSharing\"\n SectionName=\"Sharing & Portability\"\n Icon=\"fa fa-share-nodes\"\n [Form]=\"FormComponent\"\n [FormContext]=\"FormContext\">\n\n @if (!CanExportImport) {\n <p class=\"ai-skill-sharing-hint\">Save this skill first to share it or export/import SKILL.md.</p>\n } @else {\n <div class=\"ai-skill-sharing-actions\">\n @if (CanShareSkills) {\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"OpenPermissionsDialog()\">\n <i class=\"fa-solid fa-shield-halved\"></i> Manage Permissions\n </button>\n }\n\n <button mjButton variant=\"secondary\" size=\"sm\" [disabled]=\"IsExporting\" (click)=\"ExportMarkdown()\">\n @if (IsExporting) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Exporting…\n } @else {\n <i class=\"fa-solid fa-file-export\"></i> Export SKILL.md\n }\n </button>\n\n <button mjButton variant=\"secondary\" size=\"sm\" [disabled]=\"IsImporting\" (click)=\"TriggerImport()\">\n @if (IsImporting) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Importing…\n } @else {\n <i class=\"fa-solid fa-file-import\"></i> Import SKILL.md\n }\n </button>\n <input #importFileInput type=\"file\" accept=\".md,.SKILL.md,text/markdown\" class=\"ai-skill-sharing-file-input\" (change)=\"OnImportFileSelected($event)\" />\n </div>\n }\n</mj-collapsible-panel>\n\n@if (PermissionsDialogVisible) {\n <mj-skill-permissions-dialog\n [Skill]=\"Record\"\n (Closed)=\"OnPermissionsDialogClosed()\">\n </mj-skill-permissions-dialog>\n}\n"]}
|
|
@@ -24,6 +24,8 @@ export declare class TagPipelineConfigurationPanel extends BaseFormPanel<MJConte
|
|
|
24
24
|
readonly TaxonomyModes: TaxonomyModeOption[];
|
|
25
25
|
/** Read the typed Configuration object — never null, defaults applied where the JSON didn't supply them. */
|
|
26
26
|
get Config(): MJContentSourceEntity_IContentSourceConfiguration;
|
|
27
|
+
SetConfig(patch: Partial<MJContentSourceEntity_IContentSourceConfiguration>): void;
|
|
28
|
+
/** @deprecated Use {@link SetConfig}. */
|
|
27
29
|
setConfig(patch: Partial<MJContentSourceEntity_IContentSourceConfiguration>): void;
|
|
28
30
|
get CurrentMode(): TaxonomyModeJson;
|
|
29
31
|
SetMode(mode: TaxonomyModeJson): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-pipeline-configuration.panel.d.ts","sourceRoot":"","sources":["../../../../src/lib/panels/content-sources/tag-pipeline-configuration.panel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,iDAAiD,EAAE,MAAM,+BAA+B,CAAC;;AAEzH,KAAK,gBAAgB,GAAG,WAAW,CAAC,iDAAiD,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAE1G,UAAU,kBAAkB;IACxB,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;GAWG;AACH,qBAea,6BAA8B,SAAQ,aAAa,CAAC,qBAAqB,CAAC;IACnF,SAAgB,aAAa,EAAE,kBAAkB,EAAE,CAIjD;IAEF,4GAA4G;IAC5G,IAAW,MAAM,IAAI,iDAAiD,CAErE;IAEM,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,iDAAiD,CAAC,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"tag-pipeline-configuration.panel.d.ts","sourceRoot":"","sources":["../../../../src/lib/panels/content-sources/tag-pipeline-configuration.panel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,iDAAiD,EAAE,MAAM,+BAA+B,CAAC;;AAEzH,KAAK,gBAAgB,GAAG,WAAW,CAAC,iDAAiD,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAE1G,UAAU,kBAAkB;IACxB,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;GAWG;AACH,qBAea,6BAA8B,SAAQ,aAAa,CAAC,qBAAqB,CAAC;IACnF,SAAgB,aAAa,EAAE,kBAAkB,EAAE,CAIjD;IAEF,4GAA4G;IAC5G,IAAW,MAAM,IAAI,iDAAiD,CAErE;IAEM,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,iDAAiD,CAAC,GAAG,IAAI;IAOz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E7C;IACD,IAAW,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EAEtD;IAED;;;OAGG;IACH,OAAO,CAAC,uBAAuB;yCAvHtB,6BAA6B;2CAA7B,6BAA6B;CAiIzC;AAED,uEAAuE;AACvE,wBAAgB,iCAAiC,IAAI,IAAI,CAAuB"}
|
|
@@ -91,19 +91,23 @@ let TagPipelineConfigurationPanel = class TagPipelineConfigurationPanel extends
|
|
|
91
91
|
get Config() {
|
|
92
92
|
return this.Record?.ConfigurationObject ?? {};
|
|
93
93
|
}
|
|
94
|
-
|
|
94
|
+
SetConfig(patch) {
|
|
95
95
|
if (!this.Record)
|
|
96
96
|
return;
|
|
97
97
|
const current = this.Record.ConfigurationObject ?? {};
|
|
98
98
|
const merged = { ...current, ...patch };
|
|
99
99
|
this.Record.ConfigurationObject = merged;
|
|
100
100
|
}
|
|
101
|
+
/** @deprecated Use {@link SetConfig}. */
|
|
102
|
+
setConfig(patch) {
|
|
103
|
+
return this.SetConfig(patch);
|
|
104
|
+
}
|
|
101
105
|
// ---------- Mode -------------------------------------------------------
|
|
102
106
|
get CurrentMode() {
|
|
103
107
|
return this.Config.TagTaxonomyMode ?? 'auto-grow';
|
|
104
108
|
}
|
|
105
109
|
SetMode(mode) {
|
|
106
|
-
this.
|
|
110
|
+
this.SetConfig({ TagTaxonomyMode: mode });
|
|
107
111
|
}
|
|
108
112
|
// ---------- Thresholds -------------------------------------------------
|
|
109
113
|
get MatchThresholdValue() {
|
|
@@ -115,14 +119,14 @@ let TagPipelineConfigurationPanel = class TagPipelineConfigurationPanel extends
|
|
|
115
119
|
const patch = { TagMatchThreshold: clamped };
|
|
116
120
|
if (cur == null || cur >= clamped)
|
|
117
121
|
patch.SuggestThreshold = Math.max(0, clamped - 0.05);
|
|
118
|
-
this.
|
|
122
|
+
this.SetConfig(patch);
|
|
119
123
|
}
|
|
120
124
|
get SuggestThresholdValue() {
|
|
121
125
|
return this.Config.SuggestThreshold ?? Math.max(0, this.MatchThresholdValue - 0.05);
|
|
122
126
|
}
|
|
123
127
|
set SuggestThresholdValue(v) {
|
|
124
128
|
const clamped = Math.max(0, Math.min(this.MatchThresholdValue, Number(v) || 0));
|
|
125
|
-
this.
|
|
129
|
+
this.SetConfig({ SuggestThreshold: clamped });
|
|
126
130
|
}
|
|
127
131
|
get ThresholdValidationMessage() {
|
|
128
132
|
const m = this.Config.TagMatchThreshold;
|
|
@@ -137,50 +141,50 @@ let TagPipelineConfigurationPanel = class TagPipelineConfigurationPanel extends
|
|
|
137
141
|
return this.Config.TagRootID ?? null;
|
|
138
142
|
}
|
|
139
143
|
set TagRootIDValue(v) {
|
|
140
|
-
this.
|
|
144
|
+
this.SetConfig({ TagRootID: v ?? null });
|
|
141
145
|
}
|
|
142
146
|
get ShareTaxonomyValue() {
|
|
143
147
|
return this.Config.ShareTaxonomyWithLLM !== false; // default true
|
|
144
148
|
}
|
|
145
149
|
set ShareTaxonomyValue(v) {
|
|
146
|
-
this.
|
|
150
|
+
this.SetConfig({ ShareTaxonomyWithLLM: v });
|
|
147
151
|
}
|
|
148
152
|
get EnableVectorizationValue() {
|
|
149
153
|
return this.Config.EnableVectorization !== false; // default true
|
|
150
154
|
}
|
|
151
155
|
set EnableVectorizationValue(v) {
|
|
152
|
-
this.
|
|
156
|
+
this.SetConfig({ EnableVectorization: v });
|
|
153
157
|
}
|
|
154
158
|
// ---------- Budgets ----------------------------------------------------
|
|
155
159
|
get MaxItemsPerRunValue() {
|
|
156
160
|
return this.Config.MaxItemsPerRun ?? null;
|
|
157
161
|
}
|
|
158
162
|
set MaxItemsPerRunValue(v) {
|
|
159
|
-
this.
|
|
163
|
+
this.SetConfig({ MaxItemsPerRun: this.normalizeNullableNumber(v) });
|
|
160
164
|
}
|
|
161
165
|
get MaxNewTagsPerRunValue() {
|
|
162
166
|
return this.Config.MaxNewTagsPerRun ?? null;
|
|
163
167
|
}
|
|
164
168
|
set MaxNewTagsPerRunValue(v) {
|
|
165
|
-
this.
|
|
169
|
+
this.SetConfig({ MaxNewTagsPerRun: this.normalizeNullableNumber(v) });
|
|
166
170
|
}
|
|
167
171
|
get MaxNewTagsPerItemValue() {
|
|
168
172
|
return this.Config.MaxNewTagsPerItem ?? null;
|
|
169
173
|
}
|
|
170
174
|
set MaxNewTagsPerItemValue(v) {
|
|
171
|
-
this.
|
|
175
|
+
this.SetConfig({ MaxNewTagsPerItem: this.normalizeNullableNumber(v) });
|
|
172
176
|
}
|
|
173
177
|
get MaxTokensPerRunValue() {
|
|
174
178
|
return this.Config.MaxTokensPerRun ?? null;
|
|
175
179
|
}
|
|
176
180
|
set MaxTokensPerRunValue(v) {
|
|
177
|
-
this.
|
|
181
|
+
this.SetConfig({ MaxTokensPerRun: this.normalizeNullableNumber(v) });
|
|
178
182
|
}
|
|
179
183
|
get MaxCostPerRunValue() {
|
|
180
184
|
return this.Config.MaxCostPerRun ?? null;
|
|
181
185
|
}
|
|
182
186
|
set MaxCostPerRunValue(v) {
|
|
183
|
-
this.
|
|
187
|
+
this.SetConfig({ MaxCostPerRun: this.normalizeNullableNumber(v) });
|
|
184
188
|
}
|
|
185
189
|
/**
|
|
186
190
|
* Coerce a possibly-blank input into a typed number. Returning undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-pipeline-configuration.panel.js","sourceRoot":"","sources":["../../../../src/lib/panels/content-sources/tag-pipeline-configuration.panel.ts","../../../../src/lib/panels/content-sources/tag-pipeline-configuration.panel.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;ICSlD,+BAEkD;IAA7C,+NAAoB,0BAAgB,GAAG,IAAI,KAAC;IAC7C,oBAAwC;IACxC,+BAAgB;IAAA,YAAa;IAAA,iBAAM;IACnC,+BAAkB;IAAA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5HY,6BAA6B;cANzC,SAAS;6BACM,KAAK,YACP,qCAAqC;;kFAItC,6BAA6B;AA8H1C,uEAAuE;AACvE,MAAM,UAAU,iCAAiC,KAA8B,CAAC","sourcesContent":["import { Component } from '@angular/core';\nimport { RegisterClassEx } from '@memberjunction/global';\nimport { BaseFormPanel } from '@memberjunction/ng-base-forms';\nimport { MJContentSourceEntity, MJContentSourceEntity_IContentSourceConfiguration } from '@memberjunction/core-entities';\n\ntype TaxonomyModeJson = NonNullable<MJContentSourceEntity_IContentSourceConfiguration['TagTaxonomyMode']>;\n\ninterface TaxonomyModeOption {\n value: TaxonomyModeJson;\n label: string;\n icon: string;\n desc: string;\n}\n\n/**\n * Tag Pipeline Configuration panel — the typed `IContentSourceConfiguration`\n * knobs (mode, thresholds, scope, taxonomy sharing, vectorization toggle, and\n * the five run-budget caps) surfaced as a dense form.\n *\n * Self-registers against the `after-fields` slot for `MJ: Content Sources`.\n * The slot host mounts it dynamically — no consumer template edits required.\n *\n * Also usable as a plain Angular component (composition pattern) — embed\n * directly in any custom UI (e.g. a dashboard quick-edit dialog) by binding\n * `[Record]` to the entity record and (optionally) `[FormComponent]`.\n */\n@RegisterClassEx(BaseFormPanel, {\n key: 'content-sources:tag-pipeline-configuration',\n skipNullKeyWarning: true,\n metadata: {\n entity: 'MJ: Content Sources',\n slot: 'after-fields',\n sortKey: 100,\n },\n})\n@Component({\n standalone: false,\n selector: 'mj-tag-pipeline-configuration-panel',\n templateUrl: './tag-pipeline-configuration.panel.html',\n styleUrls: ['./tag-pipeline-configuration.panel.css'],\n})\nexport class TagPipelineConfigurationPanel extends BaseFormPanel<MJContentSourceEntity> {\n public readonly TaxonomyModes: TaxonomyModeOption[] = [\n { value: 'constrained', label: 'Constrained', icon: 'fa-lock', desc: 'Curated only — every novel name → suggestion queue.' },\n { value: 'auto-grow', label: 'AutoGrow', icon: 'fa-seedling', desc: 'Bounded auto-creation under TagRoot, gated by per-tag governance.' },\n { value: 'free-flow', label: 'FreeFlow', icon: 'fa-water', desc: 'Anything goes — auto-create root-level tags as needed.' },\n ];\n\n /** Read the typed Configuration object — never null, defaults applied where the JSON didn't supply them. */\n public get Config(): MJContentSourceEntity_IContentSourceConfiguration {\n return this.Record?.ConfigurationObject ?? {};\n }\n\n public setConfig(patch: Partial<MJContentSourceEntity_IContentSourceConfiguration>): void {\n if (!this.Record) return;\n const current = this.Record.ConfigurationObject ?? {};\n const merged: MJContentSourceEntity_IContentSourceConfiguration = { ...current, ...patch };\n this.Record.ConfigurationObject = merged;\n }\n\n // ---------- Mode -------------------------------------------------------\n\n public get CurrentMode(): TaxonomyModeJson {\n return this.Config.TagTaxonomyMode ?? 'auto-grow';\n }\n public SetMode(mode: TaxonomyModeJson): void {\n this.setConfig({ TagTaxonomyMode: mode });\n }\n\n // ---------- Thresholds -------------------------------------------------\n\n public get MatchThresholdValue(): number {\n return this.Config.TagMatchThreshold ?? 0.85;\n }\n public set MatchThresholdValue(v: number) {\n const clamped = Math.max(0, Math.min(1, Number(v) || 0));\n const cur = this.Config.SuggestThreshold;\n const patch: Partial<MJContentSourceEntity_IContentSourceConfiguration> = { TagMatchThreshold: clamped };\n if (cur == null || cur >= clamped) patch.SuggestThreshold = Math.max(0, clamped - 0.05);\n this.setConfig(patch);\n }\n public get SuggestThresholdValue(): number {\n return this.Config.SuggestThreshold ?? Math.max(0, this.MatchThresholdValue - 0.05);\n }\n public set SuggestThresholdValue(v: number) {\n const clamped = Math.max(0, Math.min(this.MatchThresholdValue, Number(v) || 0));\n this.setConfig({ SuggestThreshold: clamped });\n }\n public get ThresholdValidationMessage(): string | null {\n const m = this.Config.TagMatchThreshold;\n const s = this.Config.SuggestThreshold;\n if (m != null && s != null && s >= m) {\n return 'SuggestThreshold must be lower than MatchThreshold.';\n }\n return null;\n }\n\n // ---------- Tag root + share-with-LLM ----------------------------------\n\n public get TagRootIDValue(): string | null {\n return this.Config.TagRootID ?? null;\n }\n public set TagRootIDValue(v: string | null) {\n this.setConfig({ TagRootID: v ?? null });\n }\n public get ShareTaxonomyValue(): boolean {\n return this.Config.ShareTaxonomyWithLLM !== false; // default true\n }\n public set ShareTaxonomyValue(v: boolean) {\n this.setConfig({ ShareTaxonomyWithLLM: v });\n }\n public get EnableVectorizationValue(): boolean {\n return this.Config.EnableVectorization !== false; // default true\n }\n public set EnableVectorizationValue(v: boolean) {\n this.setConfig({ EnableVectorization: v });\n }\n\n // ---------- Budgets ----------------------------------------------------\n\n public get MaxItemsPerRunValue(): number | null {\n return this.Config.MaxItemsPerRun ?? null;\n }\n public set MaxItemsPerRunValue(v: number | string | null) {\n this.setConfig({ MaxItemsPerRun: this.normalizeNullableNumber(v) });\n }\n public get MaxNewTagsPerRunValue(): number | null {\n return this.Config.MaxNewTagsPerRun ?? null;\n }\n public set MaxNewTagsPerRunValue(v: number | string | null) {\n this.setConfig({ MaxNewTagsPerRun: this.normalizeNullableNumber(v) });\n }\n public get MaxNewTagsPerItemValue(): number | null {\n return this.Config.MaxNewTagsPerItem ?? null;\n }\n public set MaxNewTagsPerItemValue(v: number | string | null) {\n this.setConfig({ MaxNewTagsPerItem: this.normalizeNullableNumber(v) });\n }\n public get MaxTokensPerRunValue(): number | null {\n return this.Config.MaxTokensPerRun ?? null;\n }\n public set MaxTokensPerRunValue(v: number | string | null) {\n this.setConfig({ MaxTokensPerRun: this.normalizeNullableNumber(v) });\n }\n public get MaxCostPerRunValue(): number | null {\n return this.Config.MaxCostPerRun ?? null;\n }\n public set MaxCostPerRunValue(v: number | string | null) {\n this.setConfig({ MaxCostPerRun: this.normalizeNullableNumber(v) });\n }\n\n /**\n * Coerce a possibly-blank input into a typed number. Returning undefined\n * deletes the key from the persisted JSON when the setConfig spread is applied.\n */\n private normalizeNullableNumber(v: number | string | null | undefined): number | undefined {\n if (v == null) return undefined;\n if (typeof v === 'string') {\n const trimmed = v.trim();\n if (trimmed === '') return undefined;\n const n = Number(trimmed);\n return Number.isFinite(n) ? n : undefined;\n }\n return Number.isFinite(v) ? v : undefined;\n }\n}\n\n/** Tree-shake guard — call this from the consuming module's loader. */\nexport function LoadTagPipelineConfigurationPanel(): void { /* no-op marker */ }\n","<mj-collapsible-panel\n SectionKey=\"tagPipelineConfiguration\"\n SectionName=\"Tag Pipeline Configuration\"\n Icon=\"fa fa-sliders-h\"\n [Form]=\"FormComponent\"\n [FormContext]=\"FormContext\">\n\n <!-- 1. Taxonomy mode -->\n <h4 class=\"cs-section-header\">Taxonomy mode</h4>\n <div class=\"cs-mode-grid\">\n @for (m of TaxonomyModes; track m.value) {\n <div class=\"cs-mode-card\"\n [class.selected]=\"CurrentMode === m.value\"\n (click)=\"EditMode ? SetMode(m.value) : null\">\n <i class=\"fa-solid {{ m.icon }} ic\"></i>\n <div class=\"nm\">{{ m.label }}</div>\n <div class=\"desc\">{{ m.desc }}</div>\n </div>\n }\n </div>\n\n <!-- 2. Scope & root -->\n <h4 class=\"cs-section-header\">Scope & tag root</h4>\n <div class=\"cs-grid\">\n <div class=\"cs-field\">\n <label>Tag root (TagRootID)</label>\n <input class=\"cs-input\" [disabled]=\"!EditMode\"\n [ngModel]=\"TagRootIDValue\"\n (ngModelChange)=\"TagRootIDValue = $event\" />\n <span class=\"hint\">Restricts the LLM's visible taxonomy + auto-grow target. Leave blank for full taxonomy.</span>\n </div>\n <div class=\"cs-field\">\n <label>Embedding model (legacy ContentSource field)</label>\n <input class=\"cs-input\" disabled [value]=\"Record?.EmbeddingModelID || '—'\" />\n <span class=\"hint\">Set in the AI & Indexing section above.</span>\n </div>\n </div>\n\n <div class=\"cs-toggle-row\">\n <div class=\"label\">\n <span class=\"t\">Share full taxonomy with the LLM</span>\n <span class=\"d\">When on, the LLM prompt includes the visible (scope-filtered) taxonomy. Larger taxonomies → higher token cost.</span>\n </div>\n <div class=\"cs-switch\" [class.on]=\"ShareTaxonomyValue\"\n (click)=\"EditMode ? (ShareTaxonomyValue = !ShareTaxonomyValue) : null\"></div>\n </div>\n <div class=\"cs-toggle-row\">\n <div class=\"label\">\n <span class=\"t\">Vectorize new content</span>\n <span class=\"d\">When off, this source skips vectorization (autotagger still runs).</span>\n </div>\n <div class=\"cs-switch\" [class.on]=\"EnableVectorizationValue\"\n (click)=\"EditMode ? (EnableVectorizationValue = !EnableVectorizationValue) : null\"></div>\n </div>\n\n <!-- 3. Thresholds -->\n <h4 class=\"cs-section-header\">Thresholds</h4>\n <div class=\"cs-threshold-pair\">\n <div class=\"cs-grid\">\n <div class=\"cs-field\">\n <label>MatchThreshold (auto-apply)</label>\n <input type=\"range\" class=\"cs-slider\" min=\"0.50\" max=\"1.00\" step=\"0.01\"\n [disabled]=\"!EditMode\"\n [ngModel]=\"MatchThresholdValue\"\n (ngModelChange)=\"MatchThresholdValue = $event\" />\n <div class=\"cs-slider-row\"><span>0.50</span><span class=\"cur\">{{ MatchThresholdValue | number: '1.2-2' }}</span><span>1.00</span></div>\n </div>\n <div class=\"cs-field\">\n <label>SuggestThreshold (route to inbox)</label>\n <input type=\"range\" class=\"cs-slider\" min=\"0.50\" max=\"1.00\" step=\"0.01\"\n [disabled]=\"!EditMode\"\n [ngModel]=\"SuggestThresholdValue\"\n (ngModelChange)=\"SuggestThresholdValue = $event\" />\n <div class=\"cs-slider-row\"><span>0.50</span><span class=\"cur\">{{ SuggestThresholdValue | number: '1.2-2' }}</span><span>1.00</span></div>\n </div>\n </div>\n @if (ThresholdValidationMessage) {\n <div class=\"cs-validation\"><i class=\"fa-solid fa-circle-exclamation\"></i> {{ ThresholdValidationMessage }}</div>\n } @else {\n <div class=\"cs-nudge\">\n Scores ≥ <strong>{{ MatchThresholdValue | number: '1.2-2' }}</strong> auto-apply.\n Scores in <strong>[{{ SuggestThresholdValue | number: '1.2-2' }}, {{ MatchThresholdValue | number: '1.2-2' }})</strong> route to the suggestion inbox.\n Below that, the run falls through to handleNoMatch.\n </div>\n }\n </div>\n\n <!-- 4. Volume + cost budgets -->\n <h4 class=\"cs-section-header\">\n Volume & cost budgets\n <span class=\"cs-section-header-note\">When a budget is hit the run pauses (resumes on next start).</span>\n </h4>\n\n <div class=\"cs-primary-budget\">\n <div class=\"cs-field cs-field-primary\">\n <label>Max items / run</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxItemsPerRunValue ?? ''\"\n (ngModelChange)=\"MaxItemsPerRunValue = $event\"\n placeholder=\"unlimited\" />\n <span class=\"hint\">Caps the number of content items handed to the LLM. Skipped (unchanged) items don't count. Paused work resumes on the next run — the change-detection short-circuit skips already-tagged pages, so re-crawl only wastes HTTP, not LLM cycles.</span>\n </div>\n </div>\n\n <div class=\"cs-grid four\">\n <div class=\"cs-field\">\n <label>Max new tags / run</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxNewTagsPerRunValue ?? ''\"\n (ngModelChange)=\"MaxNewTagsPerRunValue = $event\"\n placeholder=\"unlimited\" />\n <span class=\"hint\">across all items</span>\n </div>\n <div class=\"cs-field\">\n <label>Max new tags / item</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxNewTagsPerItemValue ?? ''\"\n (ngModelChange)=\"MaxNewTagsPerItemValue = $event\"\n placeholder=\"unlimited\" />\n <span class=\"hint\">extras → suggestions</span>\n </div>\n <div class=\"cs-field\">\n <label>Max tokens / run</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxTokensPerRunValue ?? ''\"\n (ngModelChange)=\"MaxTokensPerRunValue = $event\"\n placeholder=\"unlimited\" />\n <span class=\"hint\">across all LLM calls</span>\n </div>\n <div class=\"cs-field\">\n <label>Max cost / run (USD)</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" step=\"0.01\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxCostPerRunValue ?? ''\"\n (ngModelChange)=\"MaxCostPerRunValue = $event\"\n placeholder=\"unlimited\" />\n <span class=\"hint\">$ stops the run</span>\n </div>\n </div>\n</mj-collapsible-panel>\n"]}
|
|
1
|
+
{"version":3,"file":"tag-pipeline-configuration.panel.js","sourceRoot":"","sources":["../../../../src/lib/panels/content-sources/tag-pipeline-configuration.panel.ts","../../../../src/lib/panels/content-sources/tag-pipeline-configuration.panel.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;ICSlD,+BAEkD;IAA7C,+NAAoB,0BAAgB,GAAG,IAAI,KAAC;IAC7C,oBAAwC;IACxC,+BAAgB;IAAA,YAAa;IAAA,iBAAM;IACnC,+BAAkB;IAAA,YAAY;IAClC,AADkC,iBAAM,EAClC;;;;IALD,6DAA0C;IAExC,cAAgC;IAAhC,cAAA,gDAAgC,CAAA;IACnB,eAAa;IAAb,gCAAa;IACX,eAAY;IAAZ,+BAAY;;;IA6DlC,+BAA2B;IAAA,wBAA8C;IAAC,YAAgC;IAAA,iBAAM;;;IAAtC,eAAgC;IAAhC,6DAAgC;;;IAE1G,+BAAsB;IAClB,+BAAS;IAAA,8BAAQ;IAAA,YAA2C;;IAAA,iBAAS;IAAC,uCAC5D;IAAA,8BAAQ;IAAA,YAA4F;;;IAAA,iBAAS;IAAC,qGAE5H;IAAA,iBAAM;;;IAHe,eAA2C;IAA3C,+EAA2C;IAC1C,eAA4F;IAA5F,6JAA4F;;ADnE9H;;;;;;;;;;;GAWG;AAgBI,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,aAAoC;IAAhF;;QACa,kBAAa,GAAyB;YAClD,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,qDAAqD,EAAE;YAC5H,EAAE,KAAK,EAAE,WAAW,EAAI,KAAK,EAAE,UAAU,EAAK,IAAI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,wCAAsB,oCACS;YAEwB,eAA2C;YAA3C,8EAA2C;YAKlG,eAAsB;YACtB,AADA,wCAAsB,sCACW;YAEsB,eAA6C;YAA7C,gFAA6C;YAGnH,eAQC;YARD,0DAQC;YAYiD,gBAAsB;YAC7D,AADuC,wCAAsB,0CACxB;YAUE,eAAsB;YAC7D,AADuC,wCAAsB,4CACtB;YAOA,eAAsB;YAC7D,AADuC,wCAAsB,6CACrB;YAOD,eAAsB;YAC7D,AADuC,wCAAsB,2CACvB;YAOa,eAAsB;YACzE,AADmD,wCAAsB,yCACrC;;;AD3F1C,6BAA6B;IAfzC,eAAe,CAAC,aAAa,EAAE;QAC5B,GAAG,EAAE,4CAA4C;QACjD,kBAAkB,EAAE,IAAI;QACxB,QAAQ,EAAE;YACN,MAAM,EAAE,qBAAqB;YAC7B,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,GAAG;SACf;KACJ,CAAC;GAOW,6BAA6B,CAiIzC;;iFAjIY,6BAA6B;cANzC,SAAS;6BACM,KAAK,YACP,qCAAqC;;kFAItC,6BAA6B;AAmI1C,uEAAuE;AACvE,MAAM,UAAU,iCAAiC,KAA8B,CAAC","sourcesContent":["import { Component } from '@angular/core';\nimport { RegisterClassEx } from '@memberjunction/global';\nimport { BaseFormPanel } from '@memberjunction/ng-base-forms';\nimport { MJContentSourceEntity, MJContentSourceEntity_IContentSourceConfiguration } from '@memberjunction/core-entities';\n\ntype TaxonomyModeJson = NonNullable<MJContentSourceEntity_IContentSourceConfiguration['TagTaxonomyMode']>;\n\ninterface TaxonomyModeOption {\n value: TaxonomyModeJson;\n label: string;\n icon: string;\n desc: string;\n}\n\n/**\n * Tag Pipeline Configuration panel — the typed `IContentSourceConfiguration`\n * knobs (mode, thresholds, scope, taxonomy sharing, vectorization toggle, and\n * the five run-budget caps) surfaced as a dense form.\n *\n * Self-registers against the `after-fields` slot for `MJ: Content Sources`.\n * The slot host mounts it dynamically — no consumer template edits required.\n *\n * Also usable as a plain Angular component (composition pattern) — embed\n * directly in any custom UI (e.g. a dashboard quick-edit dialog) by binding\n * `[Record]` to the entity record and (optionally) `[FormComponent]`.\n */\n@RegisterClassEx(BaseFormPanel, {\n key: 'content-sources:tag-pipeline-configuration',\n skipNullKeyWarning: true,\n metadata: {\n entity: 'MJ: Content Sources',\n slot: 'after-fields',\n sortKey: 100,\n },\n})\n@Component({\n standalone: false,\n selector: 'mj-tag-pipeline-configuration-panel',\n templateUrl: './tag-pipeline-configuration.panel.html',\n styleUrls: ['./tag-pipeline-configuration.panel.css'],\n})\nexport class TagPipelineConfigurationPanel extends BaseFormPanel<MJContentSourceEntity> {\n public readonly TaxonomyModes: TaxonomyModeOption[] = [\n { value: 'constrained', label: 'Constrained', icon: 'fa-lock', desc: 'Curated only — every novel name → suggestion queue.' },\n { value: 'auto-grow', label: 'AutoGrow', icon: 'fa-seedling', desc: 'Bounded auto-creation under TagRoot, gated by per-tag governance.' },\n { value: 'free-flow', label: 'FreeFlow', icon: 'fa-water', desc: 'Anything goes — auto-create root-level tags as needed.' },\n ];\n\n /** Read the typed Configuration object — never null, defaults applied where the JSON didn't supply them. */\n public get Config(): MJContentSourceEntity_IContentSourceConfiguration {\n return this.Record?.ConfigurationObject ?? {};\n }\n\n public SetConfig(patch: Partial<MJContentSourceEntity_IContentSourceConfiguration>): void {\n if (!this.Record) return;\n const current = this.Record.ConfigurationObject ?? {};\n const merged: MJContentSourceEntity_IContentSourceConfiguration = { ...current, ...patch };\n this.Record.ConfigurationObject = merged;\n }\n\n /** @deprecated Use {@link SetConfig}. */\n public setConfig(patch: Partial<MJContentSourceEntity_IContentSourceConfiguration>): void {\n return this.SetConfig(patch);\n }\n\n // ---------- Mode -------------------------------------------------------\n\n public get CurrentMode(): TaxonomyModeJson {\n return this.Config.TagTaxonomyMode ?? 'auto-grow';\n }\n public SetMode(mode: TaxonomyModeJson): void {\n this.SetConfig({ TagTaxonomyMode: mode });\n }\n\n // ---------- Thresholds -------------------------------------------------\n\n public get MatchThresholdValue(): number {\n return this.Config.TagMatchThreshold ?? 0.85;\n }\n public set MatchThresholdValue(v: number) {\n const clamped = Math.max(0, Math.min(1, Number(v) || 0));\n const cur = this.Config.SuggestThreshold;\n const patch: Partial<MJContentSourceEntity_IContentSourceConfiguration> = { TagMatchThreshold: clamped };\n if (cur == null || cur >= clamped) patch.SuggestThreshold = Math.max(0, clamped - 0.05);\n this.SetConfig(patch);\n }\n public get SuggestThresholdValue(): number {\n return this.Config.SuggestThreshold ?? Math.max(0, this.MatchThresholdValue - 0.05);\n }\n public set SuggestThresholdValue(v: number) {\n const clamped = Math.max(0, Math.min(this.MatchThresholdValue, Number(v) || 0));\n this.SetConfig({ SuggestThreshold: clamped });\n }\n public get ThresholdValidationMessage(): string | null {\n const m = this.Config.TagMatchThreshold;\n const s = this.Config.SuggestThreshold;\n if (m != null && s != null && s >= m) {\n return 'SuggestThreshold must be lower than MatchThreshold.';\n }\n return null;\n }\n\n // ---------- Tag root + share-with-LLM ----------------------------------\n\n public get TagRootIDValue(): string | null {\n return this.Config.TagRootID ?? null;\n }\n public set TagRootIDValue(v: string | null) {\n this.SetConfig({ TagRootID: v ?? null });\n }\n public get ShareTaxonomyValue(): boolean {\n return this.Config.ShareTaxonomyWithLLM !== false; // default true\n }\n public set ShareTaxonomyValue(v: boolean) {\n this.SetConfig({ ShareTaxonomyWithLLM: v });\n }\n public get EnableVectorizationValue(): boolean {\n return this.Config.EnableVectorization !== false; // default true\n }\n public set EnableVectorizationValue(v: boolean) {\n this.SetConfig({ EnableVectorization: v });\n }\n\n // ---------- Budgets ----------------------------------------------------\n\n public get MaxItemsPerRunValue(): number | null {\n return this.Config.MaxItemsPerRun ?? null;\n }\n public set MaxItemsPerRunValue(v: number | string | null) {\n this.SetConfig({ MaxItemsPerRun: this.normalizeNullableNumber(v) });\n }\n public get MaxNewTagsPerRunValue(): number | null {\n return this.Config.MaxNewTagsPerRun ?? null;\n }\n public set MaxNewTagsPerRunValue(v: number | string | null) {\n this.SetConfig({ MaxNewTagsPerRun: this.normalizeNullableNumber(v) });\n }\n public get MaxNewTagsPerItemValue(): number | null {\n return this.Config.MaxNewTagsPerItem ?? null;\n }\n public set MaxNewTagsPerItemValue(v: number | string | null) {\n this.SetConfig({ MaxNewTagsPerItem: this.normalizeNullableNumber(v) });\n }\n public get MaxTokensPerRunValue(): number | null {\n return this.Config.MaxTokensPerRun ?? null;\n }\n public set MaxTokensPerRunValue(v: number | string | null) {\n this.SetConfig({ MaxTokensPerRun: this.normalizeNullableNumber(v) });\n }\n public get MaxCostPerRunValue(): number | null {\n return this.Config.MaxCostPerRun ?? null;\n }\n public set MaxCostPerRunValue(v: number | string | null) {\n this.SetConfig({ MaxCostPerRun: this.normalizeNullableNumber(v) });\n }\n\n /**\n * Coerce a possibly-blank input into a typed number. Returning undefined\n * deletes the key from the persisted JSON when the setConfig spread is applied.\n */\n private normalizeNullableNumber(v: number | string | null | undefined): number | undefined {\n if (v == null) return undefined;\n if (typeof v === 'string') {\n const trimmed = v.trim();\n if (trimmed === '') return undefined;\n const n = Number(trimmed);\n return Number.isFinite(n) ? n : undefined;\n }\n return Number.isFinite(v) ? v : undefined;\n }\n}\n\n/** Tree-shake guard — call this from the consuming module's loader. */\nexport function LoadTagPipelineConfigurationPanel(): void { /* no-op marker */ }\n","<mj-collapsible-panel\n SectionKey=\"tagPipelineConfiguration\"\n SectionName=\"Tag Pipeline Configuration\"\n Icon=\"fa fa-sliders-h\"\n [Form]=\"FormComponent\"\n [FormContext]=\"FormContext\">\n\n <!-- 1. Taxonomy mode -->\n <h4 class=\"cs-section-header\">Taxonomy mode</h4>\n <div class=\"cs-mode-grid\">\n @for (m of TaxonomyModes; track m.value) {\n <div class=\"cs-mode-card\"\n [class.selected]=\"CurrentMode === m.value\"\n (click)=\"EditMode ? SetMode(m.value) : null\">\n <i class=\"fa-solid {{ m.icon }} ic\"></i>\n <div class=\"nm\">{{ m.label }}</div>\n <div class=\"desc\">{{ m.desc }}</div>\n </div>\n }\n </div>\n\n <!-- 2. Scope & root -->\n <h4 class=\"cs-section-header\">Scope & tag root</h4>\n <div class=\"cs-grid\">\n <div class=\"cs-field\">\n <label>Tag root (TagRootID)</label>\n <input class=\"cs-input\" [disabled]=\"!EditMode\"\n [ngModel]=\"TagRootIDValue\"\n (ngModelChange)=\"TagRootIDValue = $event\" />\n <span class=\"hint\">Restricts the LLM's visible taxonomy + auto-grow target. Leave blank for full taxonomy.</span>\n </div>\n <div class=\"cs-field\">\n <label>Embedding model (legacy ContentSource field)</label>\n <input class=\"cs-input\" disabled [value]=\"Record?.EmbeddingModelID || '—'\" />\n <span class=\"hint\">Set in the AI & Indexing section above.</span>\n </div>\n </div>\n\n <div class=\"cs-toggle-row\">\n <div class=\"label\">\n <span class=\"t\">Share full taxonomy with the LLM</span>\n <span class=\"d\">When on, the LLM prompt includes the visible (scope-filtered) taxonomy. Larger taxonomies → higher token cost.</span>\n </div>\n <div class=\"cs-switch\" [class.on]=\"ShareTaxonomyValue\"\n (click)=\"EditMode ? (ShareTaxonomyValue = !ShareTaxonomyValue) : null\"></div>\n </div>\n <div class=\"cs-toggle-row\">\n <div class=\"label\">\n <span class=\"t\">Vectorize new content</span>\n <span class=\"d\">When off, this source skips vectorization (autotagger still runs).</span>\n </div>\n <div class=\"cs-switch\" [class.on]=\"EnableVectorizationValue\"\n (click)=\"EditMode ? (EnableVectorizationValue = !EnableVectorizationValue) : null\"></div>\n </div>\n\n <!-- 3. Thresholds -->\n <h4 class=\"cs-section-header\">Thresholds</h4>\n <div class=\"cs-threshold-pair\">\n <div class=\"cs-grid\">\n <div class=\"cs-field\">\n <label>MatchThreshold (auto-apply)</label>\n <input type=\"range\" class=\"cs-slider\" min=\"0.50\" max=\"1.00\" step=\"0.01\"\n [disabled]=\"!EditMode\"\n [ngModel]=\"MatchThresholdValue\"\n (ngModelChange)=\"MatchThresholdValue = $event\" />\n <div class=\"cs-slider-row\"><span>0.50</span><span class=\"cur\">{{ MatchThresholdValue | number: '1.2-2' }}</span><span>1.00</span></div>\n </div>\n <div class=\"cs-field\">\n <label>SuggestThreshold (route to inbox)</label>\n <input type=\"range\" class=\"cs-slider\" min=\"0.50\" max=\"1.00\" step=\"0.01\"\n [disabled]=\"!EditMode\"\n [ngModel]=\"SuggestThresholdValue\"\n (ngModelChange)=\"SuggestThresholdValue = $event\" />\n <div class=\"cs-slider-row\"><span>0.50</span><span class=\"cur\">{{ SuggestThresholdValue | number: '1.2-2' }}</span><span>1.00</span></div>\n </div>\n </div>\n @if (ThresholdValidationMessage) {\n <div class=\"cs-validation\"><i class=\"fa-solid fa-circle-exclamation\"></i> {{ ThresholdValidationMessage }}</div>\n } @else {\n <div class=\"cs-nudge\">\n Scores ≥ <strong>{{ MatchThresholdValue | number: '1.2-2' }}</strong> auto-apply.\n Scores in <strong>[{{ SuggestThresholdValue | number: '1.2-2' }}, {{ MatchThresholdValue | number: '1.2-2' }})</strong> route to the suggestion inbox.\n Below that, the run falls through to handleNoMatch.\n </div>\n }\n </div>\n\n <!-- 4. Volume + cost budgets -->\n <h4 class=\"cs-section-header\">\n Volume & cost budgets\n <span class=\"cs-section-header-note\">When a budget is hit the run pauses (resumes on next start).</span>\n </h4>\n\n <div class=\"cs-primary-budget\">\n <div class=\"cs-field cs-field-primary\">\n <label>Max items / run</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxItemsPerRunValue ?? ''\"\n (ngModelChange)=\"MaxItemsPerRunValue = $event\"\n placeholder=\"unlimited\" />\n <span class=\"hint\">Caps the number of content items handed to the LLM. Skipped (unchanged) items don't count. Paused work resumes on the next run — the change-detection short-circuit skips already-tagged pages, so re-crawl only wastes HTTP, not LLM cycles.</span>\n </div>\n </div>\n\n <div class=\"cs-grid four\">\n <div class=\"cs-field\">\n <label>Max new tags / run</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxNewTagsPerRunValue ?? ''\"\n (ngModelChange)=\"MaxNewTagsPerRunValue = $event\"\n placeholder=\"unlimited\" />\n <span class=\"hint\">across all items</span>\n </div>\n <div class=\"cs-field\">\n <label>Max new tags / item</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxNewTagsPerItemValue ?? ''\"\n (ngModelChange)=\"MaxNewTagsPerItemValue = $event\"\n placeholder=\"unlimited\" />\n <span class=\"hint\">extras → suggestions</span>\n </div>\n <div class=\"cs-field\">\n <label>Max tokens / run</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxTokensPerRunValue ?? ''\"\n (ngModelChange)=\"MaxTokensPerRunValue = $event\"\n placeholder=\"unlimited\" />\n <span class=\"hint\">across all LLM calls</span>\n </div>\n <div class=\"cs-field\">\n <label>Max cost / run (USD)</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" step=\"0.01\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxCostPerRunValue ?? ''\"\n (ngModelChange)=\"MaxCostPerRunValue = $event\"\n placeholder=\"unlimited\" />\n <span class=\"hint\">$ stops the run</span>\n </div>\n </div>\n</mj-collapsible-panel>\n"]}
|
|
@@ -15,7 +15,7 @@ import * as i0 from "@angular/core";
|
|
|
15
15
|
export declare class WebsiteCrawlerSettingsPanel extends BaseFormPanel<MJContentSourceEntity> {
|
|
16
16
|
/** Hide the panel for non-Website source types — keeps the slot registration generic. */
|
|
17
17
|
get IsWebsiteSourceType(): boolean;
|
|
18
|
-
private get
|
|
18
|
+
private get config();
|
|
19
19
|
/** Return the typed Website sub-object, defaulted to {} so getters can read freely. */
|
|
20
20
|
get WebsiteConfig(): MJContentSourceEntity_IContentSourceWebsiteConfiguration;
|
|
21
21
|
private setConfig;
|
|
@@ -112,12 +112,12 @@ let WebsiteCrawlerSettingsPanel = class WebsiteCrawlerSettingsPanel extends Base
|
|
|
112
112
|
const typeName = this.Record?.ContentSourceType;
|
|
113
113
|
return typeName != null && typeName.trim().toLowerCase() === 'website';
|
|
114
114
|
}
|
|
115
|
-
get
|
|
115
|
+
get config() {
|
|
116
116
|
return this.Record?.ConfigurationObject ?? {};
|
|
117
117
|
}
|
|
118
118
|
/** Return the typed Website sub-object, defaulted to {} so getters can read freely. */
|
|
119
119
|
get WebsiteConfig() {
|
|
120
|
-
return this.
|
|
120
|
+
return this.config.Website ?? {};
|
|
121
121
|
}
|
|
122
122
|
setConfig(patch) {
|
|
123
123
|
if (!this.Record)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-crawler-settings.panel.js","sourceRoot":"","sources":["../../../../src/lib/panels/content-sources/website-crawler-settings.panel.ts","../../../../src/lib/panels/content-sources/website-crawler-settings.panel.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;;;;ICgClD,+BAA4B;IAAA,wBAA8C;IAAC,YAAiC;IAAA,iBAAO;;;IAAxC,eAAiC;IAAjC,8DAAiC;;;IAE5G,+BAAmB;IAAA,8GAA8F;IAAA,iBAAO;;;;IA1BxH,AADJ,AADJ,AAPJ,+CAKgC,aAEP,aACK,YACX;IAAA,yBAAS;IAAA,iBAAQ;IACxB,gCAGmC;IAD5B,sPAAwC;IAF/C,iBAGmC;IACnC,+BAAmB;IAAA,uDAAuC;IAAA,4BAAM;IAAA,iBAAC;IAAA,iBAAO;IAAC,wCAAsB;IAAA,6BAAM;IAAA,kBAAC;IAAA,iBAAO;IAAC,uHAAqG;IACvN,AADuN,iBAAO,EACxN;IAEF,AADJ,+BAAsB,aACX;IAAA,yBAAQ;IAAA,iBAAQ;IACvB,iCAG8C;IADvC,sPAAuC;IAF9C,iBAG8C;IAC9C,gCAAmB;IAAA,0HAAyG;IAEpI,AADI,AADgI,iBAAO,EACjI,EACJ;IAGF,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AAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QAAC,CAAC;IACzF,CAAC;IAEO,uBAAuB,CAAC,CAAqC;QACjE,IAAI,CAAC,IAAI,IAAI;YAAE,OAAO,SAAS,CAAC;QAChC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;YACxB,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;YACzB,IAAI,OAAO,KAAK,EAAE;gBAAE,OAAO,SAAS,CAAC;YACrC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;YAC1B,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC9C,CAAC;QACD,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9C,CAAC;gSA3FQ,2BAA2B,yBAA3B,2BAA2B;oEAA3B,2BAA2B;YCrCxC,gHAA2B;;YAA3B,kDAyDC;;;ADpBY,2BAA2B;IAjBvC,eAAe,CAAC,aAAa,EAAE;QAC5B,GAAG,EAAE,0CAA0C;QAC/C,kBAAkB,EAAE,IAAI;QACxB,QAAQ,EAAE;YACN,MAAM,EAAE,qBAAqB;YAC7B,IAAI,EAAE,cAAc;YACpB,oEAAoE;YACpE,kEAAkE;YAClE,OAAO,EAAE,EAAE;SACd;KACJ,CAAC;GAOW,2BAA2B,CA4FvC;;iFA5FY,2BAA2B;cANvC,SAAS;6BACM,KAAK,YACP,mCAAmC;;kFAIpC,2BAA2B;AA8FxC,uEAAuE;AACvE,MAAM,UAAU,+BAA+B,KAA8B,CAAC","sourcesContent":["import { Component } from '@angular/core';\nimport { RegisterClassEx } from '@memberjunction/global';\nimport { BaseFormPanel } from '@memberjunction/ng-base-forms';\nimport {\n MJContentSourceEntity,\n MJContentSourceEntity_IContentSourceConfiguration,\n MJContentSourceEntity_IContentSourceWebsiteConfiguration,\n} from '@memberjunction/core-entities';\n\n/**\n * Website Crawler Settings panel — surfaces the typed `Configuration.Website`\n * sub-object (MaxDepth, RootURL, URLPattern, crawl flags) as a dense form.\n * Only meaningful when ContentSourceType = \"Website\"; the panel silently\n * renders nothing for other source types so it can register against the\n * generic ContentSource slot without conditional templates upstream.\n *\n * Future pluggability: as more source types grow typed config (RSS, Cloud\n * Storage, etc.), each gets its own panel registered against the same slot,\n * each self-gating on ContentSourceType. The slot host doesn't need to know.\n */\n@RegisterClassEx(BaseFormPanel, {\n key: 'content-sources:website-crawler-settings',\n skipNullKeyWarning: true,\n metadata: {\n entity: 'MJ: Content Sources',\n slot: 'after-fields',\n // Lower sortKey than Tag Pipeline (100) so the source-type-specific\n // crawler knobs render BELOW the broadly-applicable budget knobs.\n sortKey: 80,\n },\n})\n@Component({\n standalone: false,\n selector: 'mj-website-crawler-settings-panel',\n templateUrl: './website-crawler-settings.panel.html',\n styleUrls: ['./tag-pipeline-configuration.panel.css'],\n})\nexport class WebsiteCrawlerSettingsPanel extends BaseFormPanel<MJContentSourceEntity> {\n /** Hide the panel for non-Website source types — keeps the slot registration generic. */\n public get IsWebsiteSourceType(): boolean {\n const typeName = this.Record?.ContentSourceType;\n return typeName != null && typeName.trim().toLowerCase() === 'website';\n }\n\n private get Config(): MJContentSourceEntity_IContentSourceConfiguration {\n return this.Record?.ConfigurationObject ?? {};\n }\n\n /** Return the typed Website sub-object, defaulted to {} so getters can read freely. */\n public get WebsiteConfig(): MJContentSourceEntity_IContentSourceWebsiteConfiguration {\n return this.Config.Website ?? {};\n }\n\n private setConfig(patch: Partial<MJContentSourceEntity_IContentSourceConfiguration>): void {\n if (!this.Record) return;\n const current = this.Record.ConfigurationObject ?? {};\n const merged: MJContentSourceEntity_IContentSourceConfiguration = { ...current, ...patch };\n this.Record.ConfigurationObject = merged;\n }\n\n private setWebsite(patch: Partial<MJContentSourceEntity_IContentSourceWebsiteConfiguration>): void {\n // Spread for the typed merge, then explicitly remove keys whose patched\n // value was undefined so we don't persist `\"key\": undefined` artifacts.\n const merged: MJContentSourceEntity_IContentSourceWebsiteConfiguration = { ...this.WebsiteConfig, ...patch };\n for (const key of Object.keys(patch) as Array<keyof MJContentSourceEntity_IContentSourceWebsiteConfiguration>) {\n if (patch[key] === undefined) {\n delete merged[key];\n }\n }\n this.setConfig({ Website: merged });\n }\n\n public get MaxDepthValue(): number | null {\n return this.WebsiteConfig.MaxDepth ?? null;\n }\n public set MaxDepthValue(v: number | string | null) {\n this.setWebsite({ MaxDepth: this.normalizeNullableNumber(v) });\n }\n\n public get CrawlSitesInLowerLevelDomainValue(): boolean {\n // Default true — matches the autotagger's runtime default.\n return this.WebsiteConfig.CrawlSitesInLowerLevelDomain !== false;\n }\n public set CrawlSitesInLowerLevelDomainValue(v: boolean) {\n this.setWebsite({ CrawlSitesInLowerLevelDomain: v });\n }\n\n public get CrawlOtherSitesInTopLevelDomainValue(): boolean {\n // Default false — matches the autotagger's runtime default.\n return this.WebsiteConfig.CrawlOtherSitesInTopLevelDomain === true;\n }\n public set CrawlOtherSitesInTopLevelDomainValue(v: boolean) {\n this.setWebsite({ CrawlOtherSitesInTopLevelDomain: v });\n }\n\n public get URLPatternValue(): string {\n return this.WebsiteConfig.URLPattern ?? '';\n }\n public set URLPatternValue(v: string | null | undefined) {\n const trimmed = (v ?? '').trim();\n this.setWebsite({ URLPattern: trimmed === '' ? undefined : trimmed });\n }\n\n public get RootURLValue(): string {\n return this.WebsiteConfig.RootURL ?? '';\n }\n public set RootURLValue(v: string | null | undefined) {\n const trimmed = (v ?? '').trim();\n this.setWebsite({ RootURL: trimmed === '' ? undefined : trimmed });\n }\n\n /** Live validation: a non-empty URLPattern must be a valid JavaScript regex. */\n public get URLPatternValidationMessage(): string | null {\n const v = this.URLPatternValue;\n if (!v) return null;\n try { new RegExp(v); return null; }\n catch (e) { return `Invalid regex — ${e instanceof Error ? e.message : String(e)}`; }\n }\n\n private normalizeNullableNumber(v: number | string | null | undefined): number | undefined {\n if (v == null) return undefined;\n if (typeof v === 'string') {\n const trimmed = v.trim();\n if (trimmed === '') return undefined;\n const n = Number(trimmed);\n return Number.isFinite(n) ? n : undefined;\n }\n return Number.isFinite(v) ? v : undefined;\n }\n}\n\n/** Tree-shake guard — call this from the consuming module's loader. */\nexport function LoadWebsiteCrawlerSettingsPanel(): void { /* no-op marker */ }\n","@if (IsWebsiteSourceType) {\n<mj-collapsible-panel\n SectionKey=\"websiteCrawlerSettings\"\n SectionName=\"Website Crawler Settings\"\n Icon=\"fa fa-globe\"\n [Form]=\"FormComponent\"\n [FormContext]=\"FormContext\">\n\n <div class=\"cs-grid\">\n <div class=\"cs-field\">\n <label>Max depth</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" max=\"10\" step=\"1\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxDepthValue ?? ''\"\n (ngModelChange)=\"MaxDepthValue = $event\"\n placeholder=\"2 (default)\" />\n <span class=\"hint\">Recursion ceiling for in-domain links. <code>0</code> = just the start URL. <code>2</code> (default) = root + sections + content pages. Higher values multiply with the 1-second per-page delay.</span>\n </div>\n <div class=\"cs-field\">\n <label>Root URL</label>\n <input class=\"cs-input\" type=\"text\" [disabled]=\"!EditMode\"\n [ngModel]=\"RootURLValue\"\n (ngModelChange)=\"RootURLValue = $event\"\n placeholder=\"derived from start URL\" />\n <span class=\"hint\">URL prefix used for the in-domain check. Leave blank to derive from the parent directory of the seed URL.</span>\n </div>\n </div>\n\n <div class=\"cs-field\" style=\"margin-top: 8px;\">\n <label>URL pattern (regex)</label>\n <input class=\"cs-input\" type=\"text\" [disabled]=\"!EditMode\"\n [ngModel]=\"URLPatternValue\"\n (ngModelChange)=\"URLPatternValue = $event\"\n placeholder=\"e.g. ^https://example\\.com/blog/.*\" />\n @if (URLPatternValidationMessage) {\n <span class=\"cs-validation\"><i class=\"fa-solid fa-circle-exclamation\"></i> {{ URLPatternValidationMessage }}</span>\n } @else {\n <span class=\"hint\">Only URLs matching this regex are added to the visited set. Leave blank to include everything.</span>\n }\n </div>\n\n <div class=\"cs-toggle-row\" style=\"margin-top: 12px;\">\n <div class=\"label\">\n <span class=\"t\">Crawl sites in lower-level domain</span>\n <span class=\"d\">When on (default), the depth-aware recursive crawler runs. Turn off to crawl only the seed page.</span>\n </div>\n <div class=\"cs-switch\" [class.on]=\"CrawlSitesInLowerLevelDomainValue\"\n (click)=\"EditMode ? (CrawlSitesInLowerLevelDomainValue = !CrawlSitesInLowerLevelDomainValue) : null\"></div>\n </div>\n <div class=\"cs-toggle-row\">\n <div class=\"label\">\n <span class=\"t\">Crawl other sites in top-level domain</span>\n <span class=\"d\">When on, also adds sibling-path URLs found on the seed page (single-pass, no recursion). Off by default to avoid accidental fan-out.</span>\n </div>\n <div class=\"cs-switch\" [class.on]=\"CrawlOtherSitesInTopLevelDomainValue\"\n (click)=\"EditMode ? (CrawlOtherSitesInTopLevelDomainValue = !CrawlOtherSitesInTopLevelDomainValue) : null\"></div>\n </div>\n</mj-collapsible-panel>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"website-crawler-settings.panel.js","sourceRoot":"","sources":["../../../../src/lib/panels/content-sources/website-crawler-settings.panel.ts","../../../../src/lib/panels/content-sources/website-crawler-settings.panel.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;;;;ICgClD,+BAA4B;IAAA,wBAA8C;IAAC,YAAiC;IAAA,iBAAO;;;IAAxC,eAAiC;IAAjC,8DAAiC;;;IAE5G,+BAAmB;IAAA,8GAA8F;IAAA,iBAAO;;;;IA1BxH,AADJ,AADJ,AAPJ,+CAKgC,aAEP,aACK,YACX;IAAA,yBAAS;IAAA,iBAAQ;IACxB,gCAGmC;IAD5B,sPAAwC;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B,oEAAoE;YACpE,kEAAkE;YAClE,OAAO,EAAE,EAAE;SACd;KACJ,CAAC;GAOW,2BAA2B,CA4FvC;;iFA5FY,2BAA2B;cANvC,SAAS;6BACM,KAAK,YACP,mCAAmC;;kFAIpC,2BAA2B;AA8FxC,uEAAuE;AACvE,MAAM,UAAU,+BAA+B,KAA8B,CAAC","sourcesContent":["import { Component } from '@angular/core';\nimport { RegisterClassEx } from '@memberjunction/global';\nimport { BaseFormPanel } from '@memberjunction/ng-base-forms';\nimport {\n MJContentSourceEntity,\n MJContentSourceEntity_IContentSourceConfiguration,\n MJContentSourceEntity_IContentSourceWebsiteConfiguration,\n} from '@memberjunction/core-entities';\n\n/**\n * Website Crawler Settings panel — surfaces the typed `Configuration.Website`\n * sub-object (MaxDepth, RootURL, URLPattern, crawl flags) as a dense form.\n * Only meaningful when ContentSourceType = \"Website\"; the panel silently\n * renders nothing for other source types so it can register against the\n * generic ContentSource slot without conditional templates upstream.\n *\n * Future pluggability: as more source types grow typed config (RSS, Cloud\n * Storage, etc.), each gets its own panel registered against the same slot,\n * each self-gating on ContentSourceType. The slot host doesn't need to know.\n */\n@RegisterClassEx(BaseFormPanel, {\n key: 'content-sources:website-crawler-settings',\n skipNullKeyWarning: true,\n metadata: {\n entity: 'MJ: Content Sources',\n slot: 'after-fields',\n // Lower sortKey than Tag Pipeline (100) so the source-type-specific\n // crawler knobs render BELOW the broadly-applicable budget knobs.\n sortKey: 80,\n },\n})\n@Component({\n standalone: false,\n selector: 'mj-website-crawler-settings-panel',\n templateUrl: './website-crawler-settings.panel.html',\n styleUrls: ['./tag-pipeline-configuration.panel.css'],\n})\nexport class WebsiteCrawlerSettingsPanel extends BaseFormPanel<MJContentSourceEntity> {\n /** Hide the panel for non-Website source types — keeps the slot registration generic. */\n public get IsWebsiteSourceType(): boolean {\n const typeName = this.Record?.ContentSourceType;\n return typeName != null && typeName.trim().toLowerCase() === 'website';\n }\n\n private get config(): MJContentSourceEntity_IContentSourceConfiguration {\n return this.Record?.ConfigurationObject ?? {};\n }\n\n /** Return the typed Website sub-object, defaulted to {} so getters can read freely. */\n public get WebsiteConfig(): MJContentSourceEntity_IContentSourceWebsiteConfiguration {\n return this.config.Website ?? {};\n }\n\n private setConfig(patch: Partial<MJContentSourceEntity_IContentSourceConfiguration>): void {\n if (!this.Record) return;\n const current = this.Record.ConfigurationObject ?? {};\n const merged: MJContentSourceEntity_IContentSourceConfiguration = { ...current, ...patch };\n this.Record.ConfigurationObject = merged;\n }\n\n private setWebsite(patch: Partial<MJContentSourceEntity_IContentSourceWebsiteConfiguration>): void {\n // Spread for the typed merge, then explicitly remove keys whose patched\n // value was undefined so we don't persist `\"key\": undefined` artifacts.\n const merged: MJContentSourceEntity_IContentSourceWebsiteConfiguration = { ...this.WebsiteConfig, ...patch };\n for (const key of Object.keys(patch) as Array<keyof MJContentSourceEntity_IContentSourceWebsiteConfiguration>) {\n if (patch[key] === undefined) {\n delete merged[key];\n }\n }\n this.setConfig({ Website: merged });\n }\n\n public get MaxDepthValue(): number | null {\n return this.WebsiteConfig.MaxDepth ?? null;\n }\n public set MaxDepthValue(v: number | string | null) {\n this.setWebsite({ MaxDepth: this.normalizeNullableNumber(v) });\n }\n\n public get CrawlSitesInLowerLevelDomainValue(): boolean {\n // Default true — matches the autotagger's runtime default.\n return this.WebsiteConfig.CrawlSitesInLowerLevelDomain !== false;\n }\n public set CrawlSitesInLowerLevelDomainValue(v: boolean) {\n this.setWebsite({ CrawlSitesInLowerLevelDomain: v });\n }\n\n public get CrawlOtherSitesInTopLevelDomainValue(): boolean {\n // Default false — matches the autotagger's runtime default.\n return this.WebsiteConfig.CrawlOtherSitesInTopLevelDomain === true;\n }\n public set CrawlOtherSitesInTopLevelDomainValue(v: boolean) {\n this.setWebsite({ CrawlOtherSitesInTopLevelDomain: v });\n }\n\n public get URLPatternValue(): string {\n return this.WebsiteConfig.URLPattern ?? '';\n }\n public set URLPatternValue(v: string | null | undefined) {\n const trimmed = (v ?? '').trim();\n this.setWebsite({ URLPattern: trimmed === '' ? undefined : trimmed });\n }\n\n public get RootURLValue(): string {\n return this.WebsiteConfig.RootURL ?? '';\n }\n public set RootURLValue(v: string | null | undefined) {\n const trimmed = (v ?? '').trim();\n this.setWebsite({ RootURL: trimmed === '' ? undefined : trimmed });\n }\n\n /** Live validation: a non-empty URLPattern must be a valid JavaScript regex. */\n public get URLPatternValidationMessage(): string | null {\n const v = this.URLPatternValue;\n if (!v) return null;\n try { new RegExp(v); return null; }\n catch (e) { return `Invalid regex — ${e instanceof Error ? e.message : String(e)}`; }\n }\n\n private normalizeNullableNumber(v: number | string | null | undefined): number | undefined {\n if (v == null) return undefined;\n if (typeof v === 'string') {\n const trimmed = v.trim();\n if (trimmed === '') return undefined;\n const n = Number(trimmed);\n return Number.isFinite(n) ? n : undefined;\n }\n return Number.isFinite(v) ? v : undefined;\n }\n}\n\n/** Tree-shake guard — call this from the consuming module's loader. */\nexport function LoadWebsiteCrawlerSettingsPanel(): void { /* no-op marker */ }\n","@if (IsWebsiteSourceType) {\n<mj-collapsible-panel\n SectionKey=\"websiteCrawlerSettings\"\n SectionName=\"Website Crawler Settings\"\n Icon=\"fa fa-globe\"\n [Form]=\"FormComponent\"\n [FormContext]=\"FormContext\">\n\n <div class=\"cs-grid\">\n <div class=\"cs-field\">\n <label>Max depth</label>\n <input class=\"cs-input\" type=\"number\" min=\"0\" max=\"10\" step=\"1\" [disabled]=\"!EditMode\"\n [ngModel]=\"MaxDepthValue ?? ''\"\n (ngModelChange)=\"MaxDepthValue = $event\"\n placeholder=\"2 (default)\" />\n <span class=\"hint\">Recursion ceiling for in-domain links. <code>0</code> = just the start URL. <code>2</code> (default) = root + sections + content pages. Higher values multiply with the 1-second per-page delay.</span>\n </div>\n <div class=\"cs-field\">\n <label>Root URL</label>\n <input class=\"cs-input\" type=\"text\" [disabled]=\"!EditMode\"\n [ngModel]=\"RootURLValue\"\n (ngModelChange)=\"RootURLValue = $event\"\n placeholder=\"derived from start URL\" />\n <span class=\"hint\">URL prefix used for the in-domain check. Leave blank to derive from the parent directory of the seed URL.</span>\n </div>\n </div>\n\n <div class=\"cs-field\" style=\"margin-top: 8px;\">\n <label>URL pattern (regex)</label>\n <input class=\"cs-input\" type=\"text\" [disabled]=\"!EditMode\"\n [ngModel]=\"URLPatternValue\"\n (ngModelChange)=\"URLPatternValue = $event\"\n placeholder=\"e.g. ^https://example\\.com/blog/.*\" />\n @if (URLPatternValidationMessage) {\n <span class=\"cs-validation\"><i class=\"fa-solid fa-circle-exclamation\"></i> {{ URLPatternValidationMessage }}</span>\n } @else {\n <span class=\"hint\">Only URLs matching this regex are added to the visited set. Leave blank to include everything.</span>\n }\n </div>\n\n <div class=\"cs-toggle-row\" style=\"margin-top: 12px;\">\n <div class=\"label\">\n <span class=\"t\">Crawl sites in lower-level domain</span>\n <span class=\"d\">When on (default), the depth-aware recursive crawler runs. Turn off to crawl only the seed page.</span>\n </div>\n <div class=\"cs-switch\" [class.on]=\"CrawlSitesInLowerLevelDomainValue\"\n (click)=\"EditMode ? (CrawlSitesInLowerLevelDomainValue = !CrawlSitesInLowerLevelDomainValue) : null\"></div>\n </div>\n <div class=\"cs-toggle-row\">\n <div class=\"label\">\n <span class=\"t\">Crawl other sites in top-level domain</span>\n <span class=\"d\">When on, also adds sibling-path URLs found on the seed page (single-pass, no recursion). Off by default to avoid accidental fan-out.</span>\n </div>\n <div class=\"cs-switch\" [class.on]=\"CrawlOtherSitesInTopLevelDomainValue\"\n (click)=\"EditMode ? (CrawlOtherSitesInTopLevelDomainValue = !CrawlOtherSitesInTopLevelDomainValue) : null\"></div>\n </div>\n</mj-collapsible-panel>\n}\n"]}
|