@memberjunction/ng-dashboards 5.27.0 → 5.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Home/action-pin-config-dialog.component.d.ts +60 -0
- package/dist/Home/action-pin-config-dialog.component.d.ts.map +1 -0
- package/dist/Home/action-pin-config-dialog.component.js +396 -0
- package/dist/Home/action-pin-config-dialog.component.js.map +1 -0
- package/dist/Home/action-pin-runner-dialog.component.d.ts +39 -0
- package/dist/Home/action-pin-runner-dialog.component.d.ts.map +1 -0
- package/dist/Home/action-pin-runner-dialog.component.js +285 -0
- package/dist/Home/action-pin-runner-dialog.component.js.map +1 -0
- package/dist/Home/home-dashboard.component.d.ts +26 -0
- package/dist/Home/home-dashboard.component.d.ts.map +1 -1
- package/dist/Home/home-dashboard.component.js +671 -462
- package/dist/Home/home-dashboard.component.js.map +1 -1
- package/dist/Integration/components/connections/connections.component.d.ts +27 -1
- package/dist/Integration/components/connections/connections.component.d.ts.map +1 -1
- package/dist/Integration/components/connections/connections.component.js +819 -445
- package/dist/Integration/components/connections/connections.component.js.map +1 -1
- package/dist/Integration/services/integration-data.service.d.ts +9 -1
- package/dist/Integration/services/integration-data.service.d.ts.map +1 -1
- package/dist/Integration/services/integration-data.service.js +24 -4
- package/dist/Integration/services/integration-data.service.js.map +1 -1
- package/dist/core-dashboards.module.d.ts +32 -30
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +6 -0
- package/dist/core-dashboards.module.js.map +1 -1
- package/package.json +48 -48
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* One row in the param configuration table — either a preset-value or a runtime-prompted param.
|
|
5
|
+
*/
|
|
6
|
+
export interface ActionPinParamConfig {
|
|
7
|
+
Name: string;
|
|
8
|
+
Description: string;
|
|
9
|
+
IsRequired: boolean;
|
|
10
|
+
DefaultValue: string;
|
|
11
|
+
Mode: 'preset' | 'runtime';
|
|
12
|
+
PresetValue: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Payload returned when the user saves the dialog.
|
|
16
|
+
*/
|
|
17
|
+
export interface ActionPinConfigResult {
|
|
18
|
+
Action: 'save' | 'cancel';
|
|
19
|
+
Pin?: {
|
|
20
|
+
DisplayName: string;
|
|
21
|
+
ActionID: string;
|
|
22
|
+
ActionName: string;
|
|
23
|
+
AccentColor: string;
|
|
24
|
+
FaIcon: string;
|
|
25
|
+
PresetParams: Record<string, string>;
|
|
26
|
+
RuntimeParamNames: string[];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export declare class ActionPinConfigDialogComponent implements OnChanges {
|
|
30
|
+
private cdr;
|
|
31
|
+
Visible: boolean;
|
|
32
|
+
ActionID: string | null;
|
|
33
|
+
ActionName: string | null;
|
|
34
|
+
ActionDescription: string | null;
|
|
35
|
+
Result: EventEmitter<ActionPinConfigResult>;
|
|
36
|
+
readonly ColorPalette: {
|
|
37
|
+
name: string;
|
|
38
|
+
value: string;
|
|
39
|
+
}[];
|
|
40
|
+
readonly FaIconPalette: string[];
|
|
41
|
+
DisplayName: string;
|
|
42
|
+
AccentColor: string;
|
|
43
|
+
FaIcon: string;
|
|
44
|
+
Params: ActionPinParamConfig[];
|
|
45
|
+
IsLoadingParams: boolean;
|
|
46
|
+
ErrorMessage: string | null;
|
|
47
|
+
constructor(cdr: ChangeDetectorRef);
|
|
48
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
49
|
+
private resetState;
|
|
50
|
+
private loadParams;
|
|
51
|
+
SelectColor(hex: string): void;
|
|
52
|
+
SelectFaIcon(icon: string): void;
|
|
53
|
+
SetParamMode(param: ActionPinParamConfig, mode: 'preset' | 'runtime'): void;
|
|
54
|
+
CanSave(): boolean;
|
|
55
|
+
Save(): void;
|
|
56
|
+
Cancel(): void;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionPinConfigDialogComponent, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionPinConfigDialogComponent, "mj-action-pin-config-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; "ActionID": { "alias": "ActionID"; "required": false; }; "ActionName": { "alias": "ActionName"; "required": false; }; "ActionDescription": { "alias": "ActionDescription"; "required": false; }; }, { "Result": "Result"; }, never, never, false, never>;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=action-pin-config-dialog.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-pin-config-dialog.component.d.ts","sourceRoot":"","sources":["../../src/Home/action-pin-config-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAqB,MAAM,eAAe,CAAC;;AAIvI;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1B,GAAG,CAAC,EAAE;QACF,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACrC,iBAAiB,EAAE,MAAM,EAAE,CAAC;KAC/B,CAAC;CACL;AA0BD,qBAOa,8BAA+B,YAAW,SAAS;IAmBhD,OAAO,CAAC,GAAG;IAlBd,OAAO,UAAS;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IACjC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAQ;IACvC,MAAM,sCAA6C;IAE7D,SAAgB,YAAY;;;QAAiB;IAC7C,SAAgB,aAAa,WAAmB;IAEzC,WAAW,SAAM;IACjB,WAAW,EAAE,MAAM,CAA0B;IAC7C,MAAM,SAAsB;IAE5B,MAAM,EAAE,oBAAoB,EAAE,CAAM;IAEpC,eAAe,UAAS;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;gBAEtB,GAAG,EAAE,iBAAiB;IAE1C,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAOzC,OAAO,CAAC,UAAU;YASJ,UAAU;IAgCxB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK9B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKhC,YAAY,CAAC,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI;IAK3E,OAAO,IAAI,OAAO;IAQlB,IAAI,IAAI,IAAI;IAyBZ,MAAM,IAAI,IAAI;yCArHL,8BAA8B;2CAA9B,8BAA8B;CAwH1C"}
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { RunView } from '@memberjunction/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/forms";
|
|
5
|
+
const _forTrack0 = ($index, $item) => $item.value;
|
|
6
|
+
const _forTrack1 = ($index, $item) => $item.Name;
|
|
7
|
+
function ActionPinConfigDialogComponent_Conditional_0_For_30_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
8
|
+
i0.ɵɵelement(0, "i", 29);
|
|
9
|
+
} }
|
|
10
|
+
function ActionPinConfigDialogComponent_Conditional_0_For_30_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
12
|
+
i0.ɵɵelementStart(0, "button", 28);
|
|
13
|
+
i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_For_30_Template_button_click_0_listener() { const c_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SelectColor(c_r4.value)); });
|
|
14
|
+
i0.ɵɵconditionalCreate(1, ActionPinConfigDialogComponent_Conditional_0_For_30_Conditional_1_Template, 1, 0, "i", 29);
|
|
15
|
+
i0.ɵɵelementEnd();
|
|
16
|
+
} if (rf & 2) {
|
|
17
|
+
const c_r4 = ctx.$implicit;
|
|
18
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
19
|
+
i0.ɵɵstyleProp("background", c_r4.value);
|
|
20
|
+
i0.ɵɵclassProp("selected", ctx_r1.AccentColor === c_r4.value);
|
|
21
|
+
i0.ɵɵattribute("aria-label", c_r4.name);
|
|
22
|
+
i0.ɵɵadvance();
|
|
23
|
+
i0.ɵɵconditional(ctx_r1.AccentColor === c_r4.value ? 1 : -1);
|
|
24
|
+
} }
|
|
25
|
+
function ActionPinConfigDialogComponent_Conditional_0_For_36_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
27
|
+
i0.ɵɵelementStart(0, "button", 30);
|
|
28
|
+
i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_For_36_Template_button_click_0_listener() { const icon_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SelectFaIcon(icon_r6)); });
|
|
29
|
+
i0.ɵɵelement(1, "i");
|
|
30
|
+
i0.ɵɵelementEnd();
|
|
31
|
+
} if (rf & 2) {
|
|
32
|
+
const icon_r6 = ctx.$implicit;
|
|
33
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
34
|
+
i0.ɵɵclassProp("selected", ctx_r1.FaIcon === icon_r6);
|
|
35
|
+
i0.ɵɵadvance();
|
|
36
|
+
i0.ɵɵclassMap(icon_r6);
|
|
37
|
+
} }
|
|
38
|
+
function ActionPinConfigDialogComponent_Conditional_0_Conditional_40_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
+
i0.ɵɵelementStart(0, "div", 22);
|
|
40
|
+
i0.ɵɵelement(1, "i", 31);
|
|
41
|
+
i0.ɵɵtext(2, " Loading parameters\u2026 ");
|
|
42
|
+
i0.ɵɵelementEnd();
|
|
43
|
+
} }
|
|
44
|
+
function ActionPinConfigDialogComponent_Conditional_0_Conditional_41_Template(rf, ctx) { if (rf & 1) {
|
|
45
|
+
i0.ɵɵelementStart(0, "div", 23);
|
|
46
|
+
i0.ɵɵtext(1, "This action takes no input parameters.");
|
|
47
|
+
i0.ɵɵelementEnd();
|
|
48
|
+
} }
|
|
49
|
+
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
50
|
+
i0.ɵɵelementStart(0, "span", 37);
|
|
51
|
+
i0.ɵɵtext(1, "required");
|
|
52
|
+
i0.ɵɵelementEnd();
|
|
53
|
+
} }
|
|
54
|
+
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
+
i0.ɵɵelementStart(0, "div", 38);
|
|
56
|
+
i0.ɵɵtext(1);
|
|
57
|
+
i0.ɵɵelementEnd();
|
|
58
|
+
} if (rf & 2) {
|
|
59
|
+
const p_r8 = i0.ɵɵnextContext().$implicit;
|
|
60
|
+
i0.ɵɵadvance();
|
|
61
|
+
i0.ɵɵtextInterpolate(p_r8.Description);
|
|
62
|
+
} }
|
|
63
|
+
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
64
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
65
|
+
i0.ɵɵelementStart(0, "input", 45);
|
|
66
|
+
i0.ɵɵtwoWayListener("ngModelChange", function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_16_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r9); const p_r8 = i0.ɵɵnextContext().$implicit; i0.ɵɵtwoWayBindingSet(p_r8.PresetValue, $event) || (p_r8.PresetValue = $event); return i0.ɵɵresetView($event); });
|
|
67
|
+
i0.ɵɵelementEnd();
|
|
68
|
+
} if (rf & 2) {
|
|
69
|
+
const p_r8 = i0.ɵɵnextContext().$implicit;
|
|
70
|
+
i0.ɵɵtwoWayProperty("ngModel", p_r8.PresetValue);
|
|
71
|
+
i0.ɵɵproperty("placeholder", p_r8.DefaultValue || "Preset value");
|
|
72
|
+
} }
|
|
73
|
+
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
74
|
+
i0.ɵɵelementStart(0, "span", 44);
|
|
75
|
+
i0.ɵɵelement(1, "i", 46);
|
|
76
|
+
i0.ɵɵtext(2, " Asked at click time ");
|
|
77
|
+
i0.ɵɵelementEnd();
|
|
78
|
+
} }
|
|
79
|
+
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
80
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
81
|
+
i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 36);
|
|
82
|
+
i0.ɵɵtext(3);
|
|
83
|
+
i0.ɵɵconditionalCreate(4, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_4_Template, 2, 0, "span", 37);
|
|
84
|
+
i0.ɵɵelementEnd();
|
|
85
|
+
i0.ɵɵconditionalCreate(5, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_5_Template, 2, 1, "div", 38);
|
|
86
|
+
i0.ɵɵelementEnd();
|
|
87
|
+
i0.ɵɵelementStart(6, "div", 39)(7, "label", 40)(8, "input", 41);
|
|
88
|
+
i0.ɵɵlistener("change", function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Template_input_change_8_listener() { const p_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SetParamMode(p_r8, "preset")); });
|
|
89
|
+
i0.ɵɵelementEnd();
|
|
90
|
+
i0.ɵɵelementStart(9, "span");
|
|
91
|
+
i0.ɵɵtext(10, "Preset");
|
|
92
|
+
i0.ɵɵelementEnd()();
|
|
93
|
+
i0.ɵɵelementStart(11, "label", 40)(12, "input", 41);
|
|
94
|
+
i0.ɵɵlistener("change", function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Template_input_change_12_listener() { const p_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SetParamMode(p_r8, "runtime")); });
|
|
95
|
+
i0.ɵɵelementEnd();
|
|
96
|
+
i0.ɵɵelementStart(13, "span");
|
|
97
|
+
i0.ɵɵtext(14, "Prompt");
|
|
98
|
+
i0.ɵɵelementEnd()()();
|
|
99
|
+
i0.ɵɵelementStart(15, "div", 42);
|
|
100
|
+
i0.ɵɵconditionalCreate(16, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_16_Template, 1, 2, "input", 43)(17, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_17_Template, 3, 0, "span", 44);
|
|
101
|
+
i0.ɵɵelementEnd()();
|
|
102
|
+
} if (rf & 2) {
|
|
103
|
+
const p_r8 = ctx.$implicit;
|
|
104
|
+
i0.ɵɵadvance(3);
|
|
105
|
+
i0.ɵɵtextInterpolate1(" ", p_r8.Name, " ");
|
|
106
|
+
i0.ɵɵadvance();
|
|
107
|
+
i0.ɵɵconditional(p_r8.IsRequired ? 4 : -1);
|
|
108
|
+
i0.ɵɵadvance();
|
|
109
|
+
i0.ɵɵconditional(p_r8.Description ? 5 : -1);
|
|
110
|
+
i0.ɵɵadvance(2);
|
|
111
|
+
i0.ɵɵclassProp("selected", p_r8.Mode === "preset");
|
|
112
|
+
i0.ɵɵadvance();
|
|
113
|
+
i0.ɵɵproperty("name", "mode-" + p_r8.Name)("checked", p_r8.Mode === "preset");
|
|
114
|
+
i0.ɵɵadvance(3);
|
|
115
|
+
i0.ɵɵclassProp("selected", p_r8.Mode === "runtime");
|
|
116
|
+
i0.ɵɵadvance();
|
|
117
|
+
i0.ɵɵproperty("name", "mode-" + p_r8.Name)("checked", p_r8.Mode === "runtime");
|
|
118
|
+
i0.ɵɵadvance(4);
|
|
119
|
+
i0.ɵɵconditional(p_r8.Mode === "preset" ? 16 : 17);
|
|
120
|
+
} }
|
|
121
|
+
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_Template(rf, ctx) { if (rf & 1) {
|
|
122
|
+
i0.ɵɵelementStart(0, "div", 32);
|
|
123
|
+
i0.ɵɵtext(1, " Choose which parameters are ");
|
|
124
|
+
i0.ɵɵelementStart(2, "strong");
|
|
125
|
+
i0.ɵɵtext(3, "preset");
|
|
126
|
+
i0.ɵɵelementEnd();
|
|
127
|
+
i0.ɵɵtext(4, " (baked into the pin) vs. ");
|
|
128
|
+
i0.ɵɵelementStart(5, "strong");
|
|
129
|
+
i0.ɵɵtext(6, "prompted at runtime");
|
|
130
|
+
i0.ɵɵelementEnd();
|
|
131
|
+
i0.ɵɵtext(7, " each time the pin is clicked. ");
|
|
132
|
+
i0.ɵɵelementEnd();
|
|
133
|
+
i0.ɵɵelementStart(8, "div", 33);
|
|
134
|
+
i0.ɵɵrepeaterCreate(9, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Template, 18, 12, "div", 34, _forTrack1);
|
|
135
|
+
i0.ɵɵelementEnd();
|
|
136
|
+
} if (rf & 2) {
|
|
137
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
138
|
+
i0.ɵɵadvance(9);
|
|
139
|
+
i0.ɵɵrepeater(ctx_r1.Params);
|
|
140
|
+
} }
|
|
141
|
+
function ActionPinConfigDialogComponent_Conditional_0_Conditional_43_Template(rf, ctx) { if (rf & 1) {
|
|
142
|
+
i0.ɵɵelementStart(0, "div", 24);
|
|
143
|
+
i0.ɵɵelement(1, "i", 47);
|
|
144
|
+
i0.ɵɵtext(2);
|
|
145
|
+
i0.ɵɵelementEnd();
|
|
146
|
+
} if (rf & 2) {
|
|
147
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
148
|
+
i0.ɵɵadvance(2);
|
|
149
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.ErrorMessage, " ");
|
|
150
|
+
} }
|
|
151
|
+
function ActionPinConfigDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
152
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
153
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
154
|
+
i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Cancel()); });
|
|
155
|
+
i0.ɵɵelementEnd();
|
|
156
|
+
i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "h3", 3);
|
|
157
|
+
i0.ɵɵelement(4, "i", 4);
|
|
158
|
+
i0.ɵɵtext(5, " Pin Action ");
|
|
159
|
+
i0.ɵɵelementEnd();
|
|
160
|
+
i0.ɵɵelementStart(6, "button", 5);
|
|
161
|
+
i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Cancel()); });
|
|
162
|
+
i0.ɵɵelement(7, "i", 6);
|
|
163
|
+
i0.ɵɵelementEnd()();
|
|
164
|
+
i0.ɵɵelementStart(8, "div", 7)(9, "div", 8);
|
|
165
|
+
i0.ɵɵelement(10, "i", 9);
|
|
166
|
+
i0.ɵɵelementStart(11, "span");
|
|
167
|
+
i0.ɵɵtext(12);
|
|
168
|
+
i0.ɵɵelementEnd()();
|
|
169
|
+
i0.ɵɵelementStart(13, "div", 10)(14, "div", 11)(15, "div", 12);
|
|
170
|
+
i0.ɵɵelement(16, "i");
|
|
171
|
+
i0.ɵɵelementEnd();
|
|
172
|
+
i0.ɵɵelementStart(17, "div", 13);
|
|
173
|
+
i0.ɵɵtext(18);
|
|
174
|
+
i0.ɵɵelementEnd()();
|
|
175
|
+
i0.ɵɵelementStart(19, "div", 14);
|
|
176
|
+
i0.ɵɵtext(20, "Live preview of how your pin will look on Home");
|
|
177
|
+
i0.ɵɵelementEnd()();
|
|
178
|
+
i0.ɵɵelementStart(21, "div", 15)(22, "label", 16);
|
|
179
|
+
i0.ɵɵtext(23, "Pin title");
|
|
180
|
+
i0.ɵɵelementEnd();
|
|
181
|
+
i0.ɵɵelementStart(24, "input", 17);
|
|
182
|
+
i0.ɵɵtwoWayListener("ngModelChange", function ActionPinConfigDialogComponent_Conditional_0_Template_input_ngModelChange_24_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.DisplayName, $event) || (ctx_r1.DisplayName = $event); return i0.ɵɵresetView($event); });
|
|
183
|
+
i0.ɵɵelementEnd()();
|
|
184
|
+
i0.ɵɵelementStart(25, "div", 15)(26, "label");
|
|
185
|
+
i0.ɵɵtext(27, "Accent color");
|
|
186
|
+
i0.ɵɵelementEnd();
|
|
187
|
+
i0.ɵɵelementStart(28, "div", 18);
|
|
188
|
+
i0.ɵɵrepeaterCreate(29, ActionPinConfigDialogComponent_Conditional_0_For_30_Template, 2, 6, "button", 19, _forTrack0);
|
|
189
|
+
i0.ɵɵelementEnd()();
|
|
190
|
+
i0.ɵɵelementStart(31, "div", 15)(32, "label");
|
|
191
|
+
i0.ɵɵtext(33, "Icon");
|
|
192
|
+
i0.ɵɵelementEnd();
|
|
193
|
+
i0.ɵɵelementStart(34, "div", 20);
|
|
194
|
+
i0.ɵɵrepeaterCreate(35, ActionPinConfigDialogComponent_Conditional_0_For_36_Template, 2, 4, "button", 21, i0.ɵɵrepeaterTrackByIdentity);
|
|
195
|
+
i0.ɵɵelementEnd()();
|
|
196
|
+
i0.ɵɵelementStart(37, "div", 15)(38, "label");
|
|
197
|
+
i0.ɵɵtext(39, "Parameters");
|
|
198
|
+
i0.ɵɵelementEnd();
|
|
199
|
+
i0.ɵɵconditionalCreate(40, ActionPinConfigDialogComponent_Conditional_0_Conditional_40_Template, 3, 0, "div", 22)(41, ActionPinConfigDialogComponent_Conditional_0_Conditional_41_Template, 2, 0, "div", 23)(42, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_Template, 11, 0);
|
|
200
|
+
i0.ɵɵelementEnd();
|
|
201
|
+
i0.ɵɵconditionalCreate(43, ActionPinConfigDialogComponent_Conditional_0_Conditional_43_Template, 3, 1, "div", 24);
|
|
202
|
+
i0.ɵɵelementEnd();
|
|
203
|
+
i0.ɵɵelementStart(44, "div", 25)(45, "button", 26);
|
|
204
|
+
i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_Template_button_click_45_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Save()); });
|
|
205
|
+
i0.ɵɵelement(46, "i", 4);
|
|
206
|
+
i0.ɵɵtext(47, " Pin to Home ");
|
|
207
|
+
i0.ɵɵelementEnd();
|
|
208
|
+
i0.ɵɵelementStart(48, "button", 27);
|
|
209
|
+
i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_Template_button_click_48_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Cancel()); });
|
|
210
|
+
i0.ɵɵtext(49, " Cancel ");
|
|
211
|
+
i0.ɵɵelementEnd()()();
|
|
212
|
+
} if (rf & 2) {
|
|
213
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
214
|
+
i0.ɵɵadvance(12);
|
|
215
|
+
i0.ɵɵtextInterpolate(ctx_r1.ActionName);
|
|
216
|
+
i0.ɵɵadvance(2);
|
|
217
|
+
i0.ɵɵstyleProp("background", "linear-gradient(135deg, " + ctx_r1.AccentColor + " 0%, " + ctx_r1.AccentColor + "cc 100%)");
|
|
218
|
+
i0.ɵɵadvance(2);
|
|
219
|
+
i0.ɵɵclassMap(ctx_r1.FaIcon);
|
|
220
|
+
i0.ɵɵadvance(2);
|
|
221
|
+
i0.ɵɵtextInterpolate(ctx_r1.DisplayName || "Untitled pin");
|
|
222
|
+
i0.ɵɵadvance(6);
|
|
223
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.DisplayName);
|
|
224
|
+
i0.ɵɵadvance(5);
|
|
225
|
+
i0.ɵɵrepeater(ctx_r1.ColorPalette);
|
|
226
|
+
i0.ɵɵadvance(6);
|
|
227
|
+
i0.ɵɵrepeater(ctx_r1.FaIconPalette);
|
|
228
|
+
i0.ɵɵadvance(5);
|
|
229
|
+
i0.ɵɵconditional(ctx_r1.IsLoadingParams ? 40 : ctx_r1.Params.length === 0 ? 41 : 42);
|
|
230
|
+
i0.ɵɵadvance(3);
|
|
231
|
+
i0.ɵɵconditional(ctx_r1.ErrorMessage ? 43 : -1);
|
|
232
|
+
i0.ɵɵadvance(2);
|
|
233
|
+
i0.ɵɵproperty("disabled", !ctx_r1.CanSave());
|
|
234
|
+
} }
|
|
235
|
+
const COLOR_PALETTE = [
|
|
236
|
+
{ name: 'Indigo', value: '#4F46E5' },
|
|
237
|
+
{ name: 'Emerald', value: '#10B981' },
|
|
238
|
+
{ name: 'Rose', value: '#F43F5E' },
|
|
239
|
+
{ name: 'Amber', value: '#F59E0B' },
|
|
240
|
+
{ name: 'Sky', value: '#0EA5E9' },
|
|
241
|
+
{ name: 'Violet', value: '#8B5CF6' },
|
|
242
|
+
{ name: 'Teal', value: '#14B8A6' },
|
|
243
|
+
{ name: 'Slate', value: '#475569' }
|
|
244
|
+
];
|
|
245
|
+
const FA_ICON_PALETTE = [
|
|
246
|
+
'fa-solid fa-bolt', 'fa-solid fa-rocket', 'fa-solid fa-wand-magic-sparkles',
|
|
247
|
+
'fa-solid fa-robot', 'fa-solid fa-gears', 'fa-solid fa-play',
|
|
248
|
+
'fa-solid fa-bullhorn', 'fa-solid fa-envelope', 'fa-solid fa-chart-line',
|
|
249
|
+
'fa-solid fa-file-export', 'fa-solid fa-file-import', 'fa-solid fa-database',
|
|
250
|
+
'fa-solid fa-code', 'fa-solid fa-terminal', 'fa-solid fa-paper-plane',
|
|
251
|
+
'fa-solid fa-camera', 'fa-solid fa-image', 'fa-solid fa-bell',
|
|
252
|
+
'fa-solid fa-flag', 'fa-solid fa-star', 'fa-solid fa-heart',
|
|
253
|
+
'fa-solid fa-bookmark', 'fa-solid fa-tag', 'fa-solid fa-lightbulb',
|
|
254
|
+
'fa-solid fa-brain', 'fa-solid fa-microchip', 'fa-solid fa-server',
|
|
255
|
+
'fa-solid fa-cloud', 'fa-solid fa-cube', 'fa-solid fa-thumbtack'
|
|
256
|
+
];
|
|
257
|
+
export class ActionPinConfigDialogComponent {
|
|
258
|
+
cdr;
|
|
259
|
+
Visible = false;
|
|
260
|
+
ActionID = null;
|
|
261
|
+
ActionName = null;
|
|
262
|
+
ActionDescription = null;
|
|
263
|
+
Result = new EventEmitter();
|
|
264
|
+
ColorPalette = COLOR_PALETTE;
|
|
265
|
+
FaIconPalette = FA_ICON_PALETTE;
|
|
266
|
+
DisplayName = '';
|
|
267
|
+
AccentColor = COLOR_PALETTE[0].value;
|
|
268
|
+
FaIcon = FA_ICON_PALETTE[0];
|
|
269
|
+
Params = [];
|
|
270
|
+
IsLoadingParams = false;
|
|
271
|
+
ErrorMessage = null;
|
|
272
|
+
constructor(cdr) {
|
|
273
|
+
this.cdr = cdr;
|
|
274
|
+
}
|
|
275
|
+
ngOnChanges(changes) {
|
|
276
|
+
if (changes['Visible'] && this.Visible && this.ActionID) {
|
|
277
|
+
this.resetState();
|
|
278
|
+
this.loadParams();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
resetState() {
|
|
282
|
+
this.DisplayName = this.ActionName ?? '';
|
|
283
|
+
this.AccentColor = COLOR_PALETTE[0].value;
|
|
284
|
+
this.FaIcon = FA_ICON_PALETTE[0];
|
|
285
|
+
this.Params = [];
|
|
286
|
+
this.ErrorMessage = null;
|
|
287
|
+
this.IsLoadingParams = false;
|
|
288
|
+
}
|
|
289
|
+
async loadParams() {
|
|
290
|
+
if (!this.ActionID)
|
|
291
|
+
return;
|
|
292
|
+
this.IsLoadingParams = true;
|
|
293
|
+
this.cdr.markForCheck();
|
|
294
|
+
try {
|
|
295
|
+
const rv = new RunView();
|
|
296
|
+
const result = await rv.RunView({
|
|
297
|
+
EntityName: 'MJ: Action Params',
|
|
298
|
+
ExtraFilter: `ActionID='${this.ActionID}' AND (Type='Input' OR Type='Both')`,
|
|
299
|
+
OrderBy: 'Name',
|
|
300
|
+
ResultType: 'entity_object'
|
|
301
|
+
});
|
|
302
|
+
if (!result.Success) {
|
|
303
|
+
this.ErrorMessage = `Could not load parameters: ${result.ErrorMessage}`;
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
this.Params = (result.Results ?? []).map(p => ({
|
|
307
|
+
Name: p.Name,
|
|
308
|
+
Description: p.Description ?? '',
|
|
309
|
+
IsRequired: p.IsRequired,
|
|
310
|
+
DefaultValue: p.DefaultValue ?? '',
|
|
311
|
+
Mode: p.IsRequired ? 'preset' : 'runtime',
|
|
312
|
+
PresetValue: p.DefaultValue ?? ''
|
|
313
|
+
}));
|
|
314
|
+
}
|
|
315
|
+
catch (err) {
|
|
316
|
+
this.ErrorMessage = `Failed to load action parameters: ${err.message}`;
|
|
317
|
+
}
|
|
318
|
+
finally {
|
|
319
|
+
this.IsLoadingParams = false;
|
|
320
|
+
this.cdr.markForCheck();
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
SelectColor(hex) {
|
|
324
|
+
this.AccentColor = hex;
|
|
325
|
+
this.cdr.markForCheck();
|
|
326
|
+
}
|
|
327
|
+
SelectFaIcon(icon) {
|
|
328
|
+
this.FaIcon = icon;
|
|
329
|
+
this.cdr.markForCheck();
|
|
330
|
+
}
|
|
331
|
+
SetParamMode(param, mode) {
|
|
332
|
+
param.Mode = mode;
|
|
333
|
+
this.cdr.markForCheck();
|
|
334
|
+
}
|
|
335
|
+
CanSave() {
|
|
336
|
+
if (!this.DisplayName.trim())
|
|
337
|
+
return false;
|
|
338
|
+
for (const p of this.Params) {
|
|
339
|
+
if (p.Mode === 'preset' && p.IsRequired && !p.PresetValue.trim())
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
return true;
|
|
343
|
+
}
|
|
344
|
+
Save() {
|
|
345
|
+
if (!this.CanSave() || !this.ActionID || !this.ActionName)
|
|
346
|
+
return;
|
|
347
|
+
const presetParams = {};
|
|
348
|
+
const runtimeParamNames = [];
|
|
349
|
+
for (const p of this.Params) {
|
|
350
|
+
if (p.Mode === 'preset') {
|
|
351
|
+
if (p.PresetValue.trim() !== '')
|
|
352
|
+
presetParams[p.Name] = p.PresetValue;
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
runtimeParamNames.push(p.Name);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
this.Result.emit({
|
|
359
|
+
Action: 'save',
|
|
360
|
+
Pin: {
|
|
361
|
+
DisplayName: this.DisplayName.trim(),
|
|
362
|
+
ActionID: this.ActionID,
|
|
363
|
+
ActionName: this.ActionName,
|
|
364
|
+
AccentColor: this.AccentColor,
|
|
365
|
+
FaIcon: this.FaIcon,
|
|
366
|
+
PresetParams: presetParams,
|
|
367
|
+
RuntimeParamNames: runtimeParamNames
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
Cancel() {
|
|
372
|
+
this.Result.emit({ Action: 'cancel' });
|
|
373
|
+
}
|
|
374
|
+
static ɵfac = function ActionPinConfigDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActionPinConfigDialogComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
375
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ActionPinConfigDialogComponent, selectors: [["mj-action-pin-config-dialog"]], inputs: { Visible: "Visible", ActionID: "ActionID", ActionName: "ActionName", ActionDescription: "ActionDescription" }, outputs: { Result: "Result" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[1, "apc-backdrop", 3, "click"], ["role", "dialog", "aria-modal", "true", "aria-labelledby", "apc-title", 1, "apc-dialog"], [1, "apc-header"], ["id", "apc-title"], [1, "fa-solid", "fa-thumbtack"], ["aria-label", "Close", 1, "apc-close", 3, "click"], [1, "fa-solid", "fa-xmark"], [1, "apc-body"], [1, "apc-action-chip"], [1, "fa-solid", "fa-bolt"], [1, "apc-preview"], [1, "apc-preview-card"], [1, "apc-preview-icon"], [1, "apc-preview-title"], [1, "apc-preview-hint"], [1, "apc-field"], ["for", "apc-name"], ["id", "apc-name", "type", "text", "placeholder", "e.g. Run Weekly Sales Report", 1, "mj-input", 3, "ngModelChange", "ngModel"], [1, "apc-color-grid"], ["type", "button", 1, "apc-color-swatch", 3, "selected", "background"], [1, "apc-icon-grid"], ["type", "button", 1, "apc-icon-swatch", 3, "selected"], [1, "apc-params-loading"], [1, "apc-params-empty"], [1, "apc-error"], [1, "apc-footer"], ["type", "button", 1, "apc-btn", "primary", 3, "click", "disabled"], ["type", "button", 1, "apc-btn", 3, "click"], ["type", "button", 1, "apc-color-swatch", 3, "click"], [1, "fa-solid", "fa-check"], ["type", "button", 1, "apc-icon-swatch", 3, "click"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "apc-params-help"], [1, "apc-params-table"], [1, "apc-param-row"], [1, "apc-param-info"], [1, "apc-param-name"], [1, "apc-param-req"], [1, "apc-param-desc"], [1, "apc-param-mode"], [1, "apc-mode-option"], ["type", "radio", 3, "change", "name", "checked"], [1, "apc-param-value"], ["type", "text", 1, "mj-input", 3, "ngModel", "placeholder"], [1, "apc-runtime-hint"], ["type", "text", 1, "mj-input", 3, "ngModelChange", "ngModel", "placeholder"], [1, "fa-solid", "fa-keyboard"], [1, "fa-solid", "fa-triangle-exclamation"]], template: function ActionPinConfigDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
376
|
+
i0.ɵɵconditionalCreate(0, ActionPinConfigDialogComponent_Conditional_0_Template, 50, 10);
|
|
377
|
+
} if (rf & 2) {
|
|
378
|
+
i0.ɵɵconditional(ctx.Visible ? 0 : -1);
|
|
379
|
+
} }, dependencies: [i1.DefaultValueAccessor, i1.NgControlStatus, i1.NgModel], styles: [".apc-backdrop {\n position: fixed;\n inset: 0;\n background: var(--mj-bg-overlay);\n z-index: 9000;\n animation: apc-fade-in 0.15s ease;\n}\n\n.apc-dialog {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 9001;\n width: min(640px, calc(100vw - 32px));\n max-height: calc(100vh - 48px);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n border: 1px solid var(--mj-border-default);\n border-radius: 12px;\n box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);\n display: flex;\n flex-direction: column;\n animation: apc-pop-in 0.18s ease;\n}\n\n@keyframes apc-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes apc-pop-in {\n from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); }\n to { opacity: 1; transform: translate(-50%, -50%) scale(1); }\n}\n\n.apc-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.apc-header h3 {\n margin: 0;\n font-size: 17px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 10px;\n color: var(--mj-text-primary);\n}\n\n.apc-header h3 i {\n color: var(--mj-brand-primary);\n}\n\n.apc-close {\n background: transparent;\n border: none;\n color: var(--mj-text-muted);\n font-size: 16px;\n cursor: pointer;\n padding: 6px 10px;\n border-radius: 6px;\n}\n\n.apc-close:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.apc-body {\n padding: 20px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n\n.apc-action-chip {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 999px;\n font-size: 13px;\n color: var(--mj-text-secondary);\n align-self: flex-start;\n}\n\n.apc-action-chip i {\n color: var(--mj-brand-primary);\n}\n\n.apc-preview {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n\n.apc-preview-card {\n width: 180px;\n height: 120px;\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n color: var(--mj-text-inverse, white);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n transition: transform 0.15s ease;\n}\n\n.apc-preview-icon {\n font-size: 34px;\n line-height: 1;\n color: var(--mj-text-inverse, white);\n}\n\n.apc-preview-title {\n font-size: 13px;\n font-weight: 600;\n text-align: center;\n padding: 0 12px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.apc-preview-hint {\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.apc-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.apc-field > label {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n}\n\n.apc-color-grid {\n display: grid;\n grid-template-columns: repeat(8, 1fr);\n gap: 8px;\n}\n\n.apc-color-swatch {\n width: 100%;\n aspect-ratio: 1;\n border-radius: 8px;\n border: 2px solid transparent;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-inverse, white);\n font-size: 12px;\n transition: transform 0.1s ease;\n}\n\n.apc-color-swatch:hover {\n transform: scale(1.08);\n}\n\n.apc-color-swatch.selected {\n border-color: var(--mj-text-primary);\n box-shadow: 0 0 0 2px var(--mj-bg-surface), 0 0 0 4px var(--mj-text-primary);\n}\n\n.apc-icon-grid {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n gap: 6px;\n max-height: 180px;\n overflow-y: auto;\n padding: 4px;\n border: 1px solid var(--mj-border-subtle);\n border-radius: 8px;\n background: var(--mj-bg-surface-sunken);\n}\n\n.apc-icon-swatch {\n aspect-ratio: 1;\n background: var(--mj-bg-surface);\n border: 1px solid transparent;\n border-radius: 6px;\n color: var(--mj-text-secondary);\n cursor: pointer;\n font-size: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.1s ease;\n}\n\n.apc-icon-swatch:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.apc-icon-swatch.selected {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n}\n\n.apc-params-loading,\n.apc-params-empty {\n padding: 16px;\n text-align: center;\n font-size: 13px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n}\n\n.apc-params-help {\n font-size: 12px;\n color: var(--mj-text-muted);\n margin-bottom: 4px;\n}\n\n.apc-params-help strong {\n color: var(--mj-text-secondary);\n}\n\n.apc-params-table {\n display: flex;\n flex-direction: column;\n gap: 6px;\n max-height: 260px;\n overflow-y: auto;\n padding-right: 4px;\n}\n\n.apc-param-row {\n display: grid;\n grid-template-columns: 1fr 160px 1fr;\n gap: 10px;\n align-items: center;\n padding: 10px 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n}\n\n.apc-param-name {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.apc-param-req {\n font-size: 10px;\n font-weight: 500;\n padding: 1px 6px;\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n border-radius: 3px;\n text-transform: uppercase;\n letter-spacing: 0.4px;\n}\n\n.apc-param-desc {\n font-size: 11px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n line-height: 1.4;\n}\n\n.apc-param-mode {\n display: flex;\n gap: 4px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n padding: 2px;\n}\n\n.apc-mode-option {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 11px;\n font-weight: 500;\n color: var(--mj-text-muted);\n cursor: pointer;\n transition: all 0.1s ease;\n}\n\n.apc-mode-option input {\n display: none;\n}\n\n.apc-mode-option.selected {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse, white);\n}\n\n.apc-runtime-hint {\n font-size: 11px;\n color: var(--mj-text-muted);\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-style: italic;\n}\n\n.apc-error {\n padding: 10px 12px;\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error-text);\n border: 1px solid var(--mj-status-error-border);\n border-radius: 6px;\n font-size: 13px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.apc-footer {\n display: flex;\n gap: 8px;\n padding: 14px 20px;\n border-top: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n border-bottom-left-radius: 12px;\n border-bottom-right-radius: 12px;\n}\n\n.apc-btn {\n padding: 8px 16px;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n\n.apc-btn:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover);\n}\n\n.apc-btn.primary {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse, white);\n border-color: var(--mj-brand-primary);\n}\n\n.apc-btn.primary:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.apc-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n"], encapsulation: 2 });
|
|
380
|
+
}
|
|
381
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActionPinConfigDialogComponent, [{
|
|
382
|
+
type: Component,
|
|
383
|
+
args: [{ standalone: false, selector: 'mj-action-pin-config-dialog', encapsulation: ViewEncapsulation.None, template: "@if (Visible) {\n <div class=\"apc-backdrop\" (click)=\"Cancel()\"></div>\n <div class=\"apc-dialog\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"apc-title\">\n <div class=\"apc-header\">\n <h3 id=\"apc-title\">\n <i class=\"fa-solid fa-thumbtack\"></i>\n Pin Action\n </h3>\n <button class=\"apc-close\" (click)=\"Cancel()\" aria-label=\"Close\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n\n <div class=\"apc-body\">\n <div class=\"apc-action-chip\">\n <i class=\"fa-solid fa-bolt\"></i>\n <span>{{ ActionName }}</span>\n </div>\n\n <div class=\"apc-preview\">\n <div class=\"apc-preview-card\" [style.background]=\"'linear-gradient(135deg, ' + AccentColor + ' 0%, ' + AccentColor + 'cc 100%)'\">\n <div class=\"apc-preview-icon\">\n <i [class]=\"FaIcon\"></i>\n </div>\n <div class=\"apc-preview-title\">{{ DisplayName || 'Untitled pin' }}</div>\n </div>\n <div class=\"apc-preview-hint\">Live preview of how your pin will look on Home</div>\n </div>\n\n <div class=\"apc-field\">\n <label for=\"apc-name\">Pin title</label>\n <input id=\"apc-name\" type=\"text\" class=\"mj-input\"\n [(ngModel)]=\"DisplayName\"\n placeholder=\"e.g. Run Weekly Sales Report\" />\n </div>\n\n <div class=\"apc-field\">\n <label>Accent color</label>\n <div class=\"apc-color-grid\">\n @for (c of ColorPalette; track c.value) {\n <button type=\"button\"\n class=\"apc-color-swatch\"\n [class.selected]=\"AccentColor === c.value\"\n [style.background]=\"c.value\"\n [attr.aria-label]=\"c.name\"\n (click)=\"SelectColor(c.value)\">\n @if (AccentColor === c.value) {\n <i class=\"fa-solid fa-check\"></i>\n }\n </button>\n }\n </div>\n </div>\n\n <div class=\"apc-field\">\n <label>Icon</label>\n <div class=\"apc-icon-grid\">\n @for (icon of FaIconPalette; track icon) {\n <button type=\"button\"\n class=\"apc-icon-swatch\"\n [class.selected]=\"FaIcon === icon\"\n (click)=\"SelectFaIcon(icon)\">\n <i [class]=\"icon\"></i>\n </button>\n }\n </div>\n </div>\n\n <div class=\"apc-field\">\n <label>Parameters</label>\n @if (IsLoadingParams) {\n <div class=\"apc-params-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading parameters\u2026\n </div>\n } @else if (Params.length === 0) {\n <div class=\"apc-params-empty\">This action takes no input parameters.</div>\n } @else {\n <div class=\"apc-params-help\">\n Choose which parameters are <strong>preset</strong> (baked into the pin) vs.\n <strong>prompted at runtime</strong> each time the pin is clicked.\n </div>\n <div class=\"apc-params-table\">\n @for (p of Params; track p.Name) {\n <div class=\"apc-param-row\">\n <div class=\"apc-param-info\">\n <div class=\"apc-param-name\">\n {{ p.Name }}\n @if (p.IsRequired) { <span class=\"apc-param-req\">required</span> }\n </div>\n @if (p.Description) {\n <div class=\"apc-param-desc\">{{ p.Description }}</div>\n }\n </div>\n <div class=\"apc-param-mode\">\n <label class=\"apc-mode-option\" [class.selected]=\"p.Mode === 'preset'\">\n <input type=\"radio\"\n [name]=\"'mode-' + p.Name\"\n [checked]=\"p.Mode === 'preset'\"\n (change)=\"SetParamMode(p, 'preset')\" />\n <span>Preset</span>\n </label>\n <label class=\"apc-mode-option\" [class.selected]=\"p.Mode === 'runtime'\">\n <input type=\"radio\"\n [name]=\"'mode-' + p.Name\"\n [checked]=\"p.Mode === 'runtime'\"\n (change)=\"SetParamMode(p, 'runtime')\" />\n <span>Prompt</span>\n </label>\n </div>\n <div class=\"apc-param-value\">\n @if (p.Mode === 'preset') {\n <input type=\"text\" class=\"mj-input\"\n [(ngModel)]=\"p.PresetValue\"\n [placeholder]=\"p.DefaultValue || 'Preset value'\" />\n } @else {\n <span class=\"apc-runtime-hint\">\n <i class=\"fa-solid fa-keyboard\"></i> Asked at click time\n </span>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n\n @if (ErrorMessage) {\n <div class=\"apc-error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i> {{ ErrorMessage }}\n </div>\n }\n </div>\n\n <div class=\"apc-footer\">\n <button type=\"button\" class=\"apc-btn primary\"\n [disabled]=\"!CanSave()\"\n (click)=\"Save()\">\n <i class=\"fa-solid fa-thumbtack\"></i> Pin to Home\n </button>\n <button type=\"button\" class=\"apc-btn\" (click)=\"Cancel()\">\n Cancel\n </button>\n </div>\n </div>\n}\n", styles: [".apc-backdrop {\n position: fixed;\n inset: 0;\n background: var(--mj-bg-overlay);\n z-index: 9000;\n animation: apc-fade-in 0.15s ease;\n}\n\n.apc-dialog {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 9001;\n width: min(640px, calc(100vw - 32px));\n max-height: calc(100vh - 48px);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n border: 1px solid var(--mj-border-default);\n border-radius: 12px;\n box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);\n display: flex;\n flex-direction: column;\n animation: apc-pop-in 0.18s ease;\n}\n\n@keyframes apc-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes apc-pop-in {\n from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); }\n to { opacity: 1; transform: translate(-50%, -50%) scale(1); }\n}\n\n.apc-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.apc-header h3 {\n margin: 0;\n font-size: 17px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 10px;\n color: var(--mj-text-primary);\n}\n\n.apc-header h3 i {\n color: var(--mj-brand-primary);\n}\n\n.apc-close {\n background: transparent;\n border: none;\n color: var(--mj-text-muted);\n font-size: 16px;\n cursor: pointer;\n padding: 6px 10px;\n border-radius: 6px;\n}\n\n.apc-close:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.apc-body {\n padding: 20px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n\n.apc-action-chip {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 999px;\n font-size: 13px;\n color: var(--mj-text-secondary);\n align-self: flex-start;\n}\n\n.apc-action-chip i {\n color: var(--mj-brand-primary);\n}\n\n.apc-preview {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n\n.apc-preview-card {\n width: 180px;\n height: 120px;\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n color: var(--mj-text-inverse, white);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n transition: transform 0.15s ease;\n}\n\n.apc-preview-icon {\n font-size: 34px;\n line-height: 1;\n color: var(--mj-text-inverse, white);\n}\n\n.apc-preview-title {\n font-size: 13px;\n font-weight: 600;\n text-align: center;\n padding: 0 12px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.apc-preview-hint {\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.apc-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.apc-field > label {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n}\n\n.apc-color-grid {\n display: grid;\n grid-template-columns: repeat(8, 1fr);\n gap: 8px;\n}\n\n.apc-color-swatch {\n width: 100%;\n aspect-ratio: 1;\n border-radius: 8px;\n border: 2px solid transparent;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-inverse, white);\n font-size: 12px;\n transition: transform 0.1s ease;\n}\n\n.apc-color-swatch:hover {\n transform: scale(1.08);\n}\n\n.apc-color-swatch.selected {\n border-color: var(--mj-text-primary);\n box-shadow: 0 0 0 2px var(--mj-bg-surface), 0 0 0 4px var(--mj-text-primary);\n}\n\n.apc-icon-grid {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n gap: 6px;\n max-height: 180px;\n overflow-y: auto;\n padding: 4px;\n border: 1px solid var(--mj-border-subtle);\n border-radius: 8px;\n background: var(--mj-bg-surface-sunken);\n}\n\n.apc-icon-swatch {\n aspect-ratio: 1;\n background: var(--mj-bg-surface);\n border: 1px solid transparent;\n border-radius: 6px;\n color: var(--mj-text-secondary);\n cursor: pointer;\n font-size: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.1s ease;\n}\n\n.apc-icon-swatch:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.apc-icon-swatch.selected {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n}\n\n.apc-params-loading,\n.apc-params-empty {\n padding: 16px;\n text-align: center;\n font-size: 13px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n}\n\n.apc-params-help {\n font-size: 12px;\n color: var(--mj-text-muted);\n margin-bottom: 4px;\n}\n\n.apc-params-help strong {\n color: var(--mj-text-secondary);\n}\n\n.apc-params-table {\n display: flex;\n flex-direction: column;\n gap: 6px;\n max-height: 260px;\n overflow-y: auto;\n padding-right: 4px;\n}\n\n.apc-param-row {\n display: grid;\n grid-template-columns: 1fr 160px 1fr;\n gap: 10px;\n align-items: center;\n padding: 10px 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n}\n\n.apc-param-name {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.apc-param-req {\n font-size: 10px;\n font-weight: 500;\n padding: 1px 6px;\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n border-radius: 3px;\n text-transform: uppercase;\n letter-spacing: 0.4px;\n}\n\n.apc-param-desc {\n font-size: 11px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n line-height: 1.4;\n}\n\n.apc-param-mode {\n display: flex;\n gap: 4px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n padding: 2px;\n}\n\n.apc-mode-option {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 11px;\n font-weight: 500;\n color: var(--mj-text-muted);\n cursor: pointer;\n transition: all 0.1s ease;\n}\n\n.apc-mode-option input {\n display: none;\n}\n\n.apc-mode-option.selected {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse, white);\n}\n\n.apc-runtime-hint {\n font-size: 11px;\n color: var(--mj-text-muted);\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-style: italic;\n}\n\n.apc-error {\n padding: 10px 12px;\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error-text);\n border: 1px solid var(--mj-status-error-border);\n border-radius: 6px;\n font-size: 13px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.apc-footer {\n display: flex;\n gap: 8px;\n padding: 14px 20px;\n border-top: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n border-bottom-left-radius: 12px;\n border-bottom-right-radius: 12px;\n}\n\n.apc-btn {\n padding: 8px 16px;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n\n.apc-btn:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover);\n}\n\n.apc-btn.primary {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse, white);\n border-color: var(--mj-brand-primary);\n}\n\n.apc-btn.primary:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.apc-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n"] }]
|
|
384
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { Visible: [{
|
|
385
|
+
type: Input
|
|
386
|
+
}], ActionID: [{
|
|
387
|
+
type: Input
|
|
388
|
+
}], ActionName: [{
|
|
389
|
+
type: Input
|
|
390
|
+
}], ActionDescription: [{
|
|
391
|
+
type: Input
|
|
392
|
+
}], Result: [{
|
|
393
|
+
type: Output
|
|
394
|
+
}] }); })();
|
|
395
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActionPinConfigDialogComponent, { className: "ActionPinConfigDialogComponent", filePath: "src/Home/action-pin-config-dialog.component.ts", lineNumber: 64 }); })();
|
|
396
|
+
//# sourceMappingURL=action-pin-config-dialog.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-pin-config-dialog.component.js","sourceRoot":"","sources":["../../src/Home/action-pin-config-dialog.component.ts","../../src/Home/action-pin-config-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAA+C,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvI,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;;;;;;IC8C/B,wBAAiC;;;;IAPrC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EAAE,CAAC;QACvC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC1B,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACtB,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE;oBAAE,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC;YAC1E,CAAC;iBAAM,CAAC;gBACJ,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACb,MAAM,EAAE,MAAM;YACd,GAAG,EAAE;gBACD,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;gBACpC,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,YAAY,EAAE,YAAY;gBAC1B,iBAAiB,EAAE,iBAAiB;aACvC;SACJ,CAAC,CAAC;IACP,CAAC;IAED,MAAM;QACF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3C,CAAC;wHAvHQ,8BAA8B;6DAA9B,8BAA8B;YC/D3C,wFAAe;;YAAf,sCAgJC;;;iFDjFY,8BAA8B;cAP1C,SAAS;6BACM,KAAK,YACP,6BAA6B,iBAGxB,iBAAiB,CAAC,IAAI;;kBAGpC,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kFALE,8BAA8B","sourcesContent":["import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges, ChangeDetectorRef, ViewEncapsulation } from '@angular/core';\nimport { RunView } from '@memberjunction/core';\nimport { MJActionParamEntity } from '@memberjunction/core-entities';\n\n/**\n * One row in the param configuration table — either a preset-value or a runtime-prompted param.\n */\nexport interface ActionPinParamConfig {\n Name: string;\n Description: string;\n IsRequired: boolean;\n DefaultValue: string;\n Mode: 'preset' | 'runtime';\n PresetValue: string;\n}\n\n/**\n * Payload returned when the user saves the dialog.\n */\nexport interface ActionPinConfigResult {\n Action: 'save' | 'cancel';\n Pin?: {\n DisplayName: string;\n ActionID: string;\n ActionName: string;\n AccentColor: string;\n FaIcon: string;\n PresetParams: Record<string, string>;\n RuntimeParamNames: string[];\n };\n}\n\nconst COLOR_PALETTE = [\n { name: 'Indigo', value: '#4F46E5' },\n { name: 'Emerald', value: '#10B981' },\n { name: 'Rose', value: '#F43F5E' },\n { name: 'Amber', value: '#F59E0B' },\n { name: 'Sky', value: '#0EA5E9' },\n { name: 'Violet', value: '#8B5CF6' },\n { name: 'Teal', value: '#14B8A6' },\n { name: 'Slate', value: '#475569' }\n];\n\nconst FA_ICON_PALETTE = [\n 'fa-solid fa-bolt', 'fa-solid fa-rocket', 'fa-solid fa-wand-magic-sparkles',\n 'fa-solid fa-robot', 'fa-solid fa-gears', 'fa-solid fa-play',\n 'fa-solid fa-bullhorn', 'fa-solid fa-envelope', 'fa-solid fa-chart-line',\n 'fa-solid fa-file-export', 'fa-solid fa-file-import', 'fa-solid fa-database',\n 'fa-solid fa-code', 'fa-solid fa-terminal', 'fa-solid fa-paper-plane',\n 'fa-solid fa-camera', 'fa-solid fa-image', 'fa-solid fa-bell',\n 'fa-solid fa-flag', 'fa-solid fa-star', 'fa-solid fa-heart',\n 'fa-solid fa-bookmark', 'fa-solid fa-tag', 'fa-solid fa-lightbulb',\n 'fa-solid fa-brain', 'fa-solid fa-microchip', 'fa-solid fa-server',\n 'fa-solid fa-cloud', 'fa-solid fa-cube', 'fa-solid fa-thumbtack'\n];\n\n@Component({\n standalone: false,\n selector: 'mj-action-pin-config-dialog',\n templateUrl: './action-pin-config-dialog.component.html',\n styleUrls: ['./action-pin-config-dialog.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class ActionPinConfigDialogComponent implements OnChanges {\n @Input() Visible = false;\n @Input() ActionID: string | null = null;\n @Input() ActionName: string | null = null;\n @Input() ActionDescription: string | null = null;\n @Output() Result = new EventEmitter<ActionPinConfigResult>();\n\n public readonly ColorPalette = COLOR_PALETTE;\n public readonly FaIconPalette = FA_ICON_PALETTE;\n\n public DisplayName = '';\n public AccentColor: string = COLOR_PALETTE[0].value;\n public FaIcon = FA_ICON_PALETTE[0];\n\n public Params: ActionPinParamConfig[] = [];\n\n public IsLoadingParams = false;\n public ErrorMessage: string | null = null;\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['Visible'] && this.Visible && this.ActionID) {\n this.resetState();\n this.loadParams();\n }\n }\n\n private resetState(): void {\n this.DisplayName = this.ActionName ?? '';\n this.AccentColor = COLOR_PALETTE[0].value;\n this.FaIcon = FA_ICON_PALETTE[0];\n this.Params = [];\n this.ErrorMessage = null;\n this.IsLoadingParams = false;\n }\n\n private async loadParams(): Promise<void> {\n if (!this.ActionID) return;\n this.IsLoadingParams = true;\n this.cdr.markForCheck();\n try {\n const rv = new RunView();\n const result = await rv.RunView<MJActionParamEntity>({\n EntityName: 'MJ: Action Params',\n ExtraFilter: `ActionID='${this.ActionID}' AND (Type='Input' OR Type='Both')`,\n OrderBy: 'Name',\n ResultType: 'entity_object'\n });\n if (!result.Success) {\n this.ErrorMessage = `Could not load parameters: ${result.ErrorMessage}`;\n return;\n }\n this.Params = (result.Results ?? []).map(p => ({\n Name: p.Name,\n Description: p.Description ?? '',\n IsRequired: p.IsRequired,\n DefaultValue: p.DefaultValue ?? '',\n Mode: p.IsRequired ? 'preset' : 'runtime',\n PresetValue: p.DefaultValue ?? ''\n }));\n } catch (err) {\n this.ErrorMessage = `Failed to load action parameters: ${(err as Error).message}`;\n } finally {\n this.IsLoadingParams = false;\n this.cdr.markForCheck();\n }\n }\n\n SelectColor(hex: string): void {\n this.AccentColor = hex;\n this.cdr.markForCheck();\n }\n\n SelectFaIcon(icon: string): void {\n this.FaIcon = icon;\n this.cdr.markForCheck();\n }\n\n SetParamMode(param: ActionPinParamConfig, mode: 'preset' | 'runtime'): void {\n param.Mode = mode;\n this.cdr.markForCheck();\n }\n\n CanSave(): boolean {\n if (!this.DisplayName.trim()) return false;\n for (const p of this.Params) {\n if (p.Mode === 'preset' && p.IsRequired && !p.PresetValue.trim()) return false;\n }\n return true;\n }\n\n Save(): void {\n if (!this.CanSave() || !this.ActionID || !this.ActionName) return;\n const presetParams: Record<string, string> = {};\n const runtimeParamNames: string[] = [];\n for (const p of this.Params) {\n if (p.Mode === 'preset') {\n if (p.PresetValue.trim() !== '') presetParams[p.Name] = p.PresetValue;\n } else {\n runtimeParamNames.push(p.Name);\n }\n }\n this.Result.emit({\n Action: 'save',\n Pin: {\n DisplayName: this.DisplayName.trim(),\n ActionID: this.ActionID,\n ActionName: this.ActionName,\n AccentColor: this.AccentColor,\n FaIcon: this.FaIcon,\n PresetParams: presetParams,\n RuntimeParamNames: runtimeParamNames\n }\n });\n }\n\n Cancel(): void {\n this.Result.emit({ Action: 'cancel' });\n }\n}\n","@if (Visible) {\n <div class=\"apc-backdrop\" (click)=\"Cancel()\"></div>\n <div class=\"apc-dialog\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"apc-title\">\n <div class=\"apc-header\">\n <h3 id=\"apc-title\">\n <i class=\"fa-solid fa-thumbtack\"></i>\n Pin Action\n </h3>\n <button class=\"apc-close\" (click)=\"Cancel()\" aria-label=\"Close\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n\n <div class=\"apc-body\">\n <div class=\"apc-action-chip\">\n <i class=\"fa-solid fa-bolt\"></i>\n <span>{{ ActionName }}</span>\n </div>\n\n <div class=\"apc-preview\">\n <div class=\"apc-preview-card\" [style.background]=\"'linear-gradient(135deg, ' + AccentColor + ' 0%, ' + AccentColor + 'cc 100%)'\">\n <div class=\"apc-preview-icon\">\n <i [class]=\"FaIcon\"></i>\n </div>\n <div class=\"apc-preview-title\">{{ DisplayName || 'Untitled pin' }}</div>\n </div>\n <div class=\"apc-preview-hint\">Live preview of how your pin will look on Home</div>\n </div>\n\n <div class=\"apc-field\">\n <label for=\"apc-name\">Pin title</label>\n <input id=\"apc-name\" type=\"text\" class=\"mj-input\"\n [(ngModel)]=\"DisplayName\"\n placeholder=\"e.g. Run Weekly Sales Report\" />\n </div>\n\n <div class=\"apc-field\">\n <label>Accent color</label>\n <div class=\"apc-color-grid\">\n @for (c of ColorPalette; track c.value) {\n <button type=\"button\"\n class=\"apc-color-swatch\"\n [class.selected]=\"AccentColor === c.value\"\n [style.background]=\"c.value\"\n [attr.aria-label]=\"c.name\"\n (click)=\"SelectColor(c.value)\">\n @if (AccentColor === c.value) {\n <i class=\"fa-solid fa-check\"></i>\n }\n </button>\n }\n </div>\n </div>\n\n <div class=\"apc-field\">\n <label>Icon</label>\n <div class=\"apc-icon-grid\">\n @for (icon of FaIconPalette; track icon) {\n <button type=\"button\"\n class=\"apc-icon-swatch\"\n [class.selected]=\"FaIcon === icon\"\n (click)=\"SelectFaIcon(icon)\">\n <i [class]=\"icon\"></i>\n </button>\n }\n </div>\n </div>\n\n <div class=\"apc-field\">\n <label>Parameters</label>\n @if (IsLoadingParams) {\n <div class=\"apc-params-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading parameters…\n </div>\n } @else if (Params.length === 0) {\n <div class=\"apc-params-empty\">This action takes no input parameters.</div>\n } @else {\n <div class=\"apc-params-help\">\n Choose which parameters are <strong>preset</strong> (baked into the pin) vs.\n <strong>prompted at runtime</strong> each time the pin is clicked.\n </div>\n <div class=\"apc-params-table\">\n @for (p of Params; track p.Name) {\n <div class=\"apc-param-row\">\n <div class=\"apc-param-info\">\n <div class=\"apc-param-name\">\n {{ p.Name }}\n @if (p.IsRequired) { <span class=\"apc-param-req\">required</span> }\n </div>\n @if (p.Description) {\n <div class=\"apc-param-desc\">{{ p.Description }}</div>\n }\n </div>\n <div class=\"apc-param-mode\">\n <label class=\"apc-mode-option\" [class.selected]=\"p.Mode === 'preset'\">\n <input type=\"radio\"\n [name]=\"'mode-' + p.Name\"\n [checked]=\"p.Mode === 'preset'\"\n (change)=\"SetParamMode(p, 'preset')\" />\n <span>Preset</span>\n </label>\n <label class=\"apc-mode-option\" [class.selected]=\"p.Mode === 'runtime'\">\n <input type=\"radio\"\n [name]=\"'mode-' + p.Name\"\n [checked]=\"p.Mode === 'runtime'\"\n (change)=\"SetParamMode(p, 'runtime')\" />\n <span>Prompt</span>\n </label>\n </div>\n <div class=\"apc-param-value\">\n @if (p.Mode === 'preset') {\n <input type=\"text\" class=\"mj-input\"\n [(ngModel)]=\"p.PresetValue\"\n [placeholder]=\"p.DefaultValue || 'Preset value'\" />\n } @else {\n <span class=\"apc-runtime-hint\">\n <i class=\"fa-solid fa-keyboard\"></i> Asked at click time\n </span>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n\n @if (ErrorMessage) {\n <div class=\"apc-error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i> {{ ErrorMessage }}\n </div>\n }\n </div>\n\n <div class=\"apc-footer\">\n <button type=\"button\" class=\"apc-btn primary\"\n [disabled]=\"!CanSave()\"\n (click)=\"Save()\">\n <i class=\"fa-solid fa-thumbtack\"></i> Pin to Home\n </button>\n <button type=\"button\" class=\"apc-btn\" (click)=\"Cancel()\">\n Cancel\n </button>\n </div>\n </div>\n}\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { HomeAppPinnedItem } from '@memberjunction/ng-shared';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Result emitted after the action finishes (or the dialog is cancelled).
|
|
6
|
+
*/
|
|
7
|
+
export interface ActionPinRunResult {
|
|
8
|
+
Closed: true;
|
|
9
|
+
}
|
|
10
|
+
interface RuntimeField {
|
|
11
|
+
Name: string;
|
|
12
|
+
Value: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class ActionPinRunnerDialogComponent implements OnChanges {
|
|
15
|
+
private cdr;
|
|
16
|
+
Visible: boolean;
|
|
17
|
+
Pin: HomeAppPinnedItem | null;
|
|
18
|
+
Result: EventEmitter<ActionPinRunResult>;
|
|
19
|
+
RuntimeFields: RuntimeField[];
|
|
20
|
+
IsRunning: boolean;
|
|
21
|
+
RunSucceeded: boolean | null;
|
|
22
|
+
ResultMessage: string | null;
|
|
23
|
+
ErrorMessage: string | null;
|
|
24
|
+
constructor(cdr: ChangeDetectorRef);
|
|
25
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
26
|
+
private getConfig;
|
|
27
|
+
private initFromPin;
|
|
28
|
+
get AccentColor(): string;
|
|
29
|
+
get FaIcon(): string;
|
|
30
|
+
get ActionName(): string;
|
|
31
|
+
CanRun(): boolean;
|
|
32
|
+
Run(): Promise<void>;
|
|
33
|
+
private buildActionParams;
|
|
34
|
+
Close(): void;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionPinRunnerDialogComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionPinRunnerDialogComponent, "mj-action-pin-runner-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; "Pin": { "alias": "Pin"; "required": false; }; }, { "Result": "Result"; }, never, never, false, never>;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=action-pin-runner-dialog.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-pin-runner-dialog.component.d.ts","sourceRoot":"","sources":["../../src/Home/action-pin-runner-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAqB,MAAM,eAAe,CAAC;AAIvI,OAAO,EAAE,iBAAiB,EAA0B,MAAM,2BAA2B,CAAC;;AAEtF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,IAAI,CAAC;CAChB;AAED,UAAU,YAAY;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,qBAOa,8BAA+B,YAAW,SAAS;IAWhD,OAAO,CAAC,GAAG;IAVd,OAAO,UAAS;IAChB,GAAG,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IACpC,MAAM,mCAA0C;IAEnD,aAAa,EAAE,YAAY,EAAE,CAAM;IACnC,SAAS,UAAS;IAClB,YAAY,EAAE,OAAO,GAAG,IAAI,CAAQ;IACpC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAQ;IACpC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;gBAEtB,GAAG,EAAE,iBAAiB;IAE1C,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMzC,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,WAAW;IAUnB,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,MAAM,IAAI,OAAO;IAOX,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA8B1B,OAAO,CAAC,iBAAiB;IAazB,KAAK,IAAI,IAAI;yCAhGJ,8BAA8B;2CAA9B,8BAA8B;CAoG1C"}
|