@memberjunction/ng-explorer-core 6.2.0-edge.0 → 6.2.0-edge.1
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/app-routing.module.d.ts +23 -1
- package/dist/app-routing.module.d.ts.map +1 -1
- package/dist/app-routing.module.js +50 -14
- package/dist/app-routing.module.js.map +1 -1
- package/dist/lib/command-palette/command-palette.component.d.ts +7 -1
- package/dist/lib/command-palette/command-palette.component.d.ts.map +1 -1
- package/dist/lib/command-palette/command-palette.component.js +28 -14
- package/dist/lib/command-palette/command-palette.component.js.map +1 -1
- package/dist/lib/conversation-feedback/conversation-feedback.d.ts +103 -13
- package/dist/lib/conversation-feedback/conversation-feedback.d.ts.map +1 -1
- package/dist/lib/conversation-feedback/conversation-feedback.js +219 -67
- package/dist/lib/conversation-feedback/conversation-feedback.js.map +1 -1
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.d.ts +64 -10
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.d.ts.map +1 -1
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js +172 -66
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js.map +1 -1
- package/dist/lib/generic/resource-container-component.d.ts +19 -5
- package/dist/lib/generic/resource-container-component.d.ts.map +1 -1
- package/dist/lib/generic/resource-container-component.js +43 -13
- package/dist/lib/generic/resource-container-component.js.map +1 -1
- package/dist/lib/guards/entities.guard.d.ts +4 -0
- package/dist/lib/guards/entities.guard.d.ts.map +1 -1
- package/dist/lib/guards/entities.guard.js +10 -2
- package/dist/lib/guards/entities.guard.js.map +1 -1
- package/dist/lib/identity-claims/claim-redeem.component.d.ts +4 -0
- package/dist/lib/identity-claims/claim-redeem.component.d.ts.map +1 -1
- package/dist/lib/identity-claims/claim-redeem.component.js +10 -2
- package/dist/lib/identity-claims/claim-redeem.component.js.map +1 -1
- package/dist/lib/oauth/oauth-callback.component.d.ts +4 -0
- package/dist/lib/oauth/oauth-callback.component.d.ts.map +1 -1
- package/dist/lib/oauth/oauth-callback.component.js +10 -2
- package/dist/lib/oauth/oauth-callback.component.js.map +1 -1
- package/dist/lib/profile/profile-dialog.component.d.ts.map +1 -1
- package/dist/lib/profile/profile-dialog.component.js +194 -191
- package/dist/lib/profile/profile-dialog.component.js.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts +20 -2
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.js +33 -9
- package/dist/lib/resource-wrappers/artifact-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts +80 -10
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js +168 -56
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +186 -23
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +500 -177
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-deeplink-params.d.ts +2 -0
- package/dist/lib/resource-wrappers/chat-deeplink-params.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-deeplink-params.js +5 -1
- package/dist/lib/resource-wrappers/chat-deeplink-params.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-search-routing.d.ts +25 -0
- package/dist/lib/resource-wrappers/chat-search-routing.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/chat-search-routing.js +24 -0
- package/dist/lib/resource-wrappers/chat-search-routing.js.map +1 -0
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts +14 -2
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.js +32 -8
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts +54 -8
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.js +138 -46
- package/dist/lib/resource-wrappers/dashboard-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts +223 -30
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js +438 -118
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts +7 -3
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.js +23 -15
- package/dist/lib/resource-wrappers/search-results-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.d.ts +68 -10
- package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +178 -62
- package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
- package/dist/lib/services/startup-validation.service.d.ts +4 -0
- package/dist/lib/services/startup-validation.service.d.ts.map +1 -1
- package/dist/lib/services/startup-validation.service.js +10 -2
- package/dist/lib/services/startup-validation.service.js.map +1 -1
- package/dist/lib/services/system-validation.service.d.ts +13 -1
- package/dist/lib/services/system-validation.service.d.ts.map +1 -1
- package/dist/lib/services/system-validation.service.js +29 -5
- package/dist/lib/services/system-validation.service.js.map +1 -1
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.d.ts +54 -4
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.d.ts.map +1 -1
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.js +130 -40
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.js.map +1 -1
- package/dist/lib/shell/components/header/app-nav.component.d.ts +29 -1
- package/dist/lib/shell/components/header/app-nav.component.d.ts.map +1 -1
- package/dist/lib/shell/components/header/app-nav.component.js +56 -12
- package/dist/lib/shell/components/header/app-nav.component.js.map +1 -1
- package/dist/lib/shell/components/header/app-switcher.component.d.ts +33 -5
- package/dist/lib/shell/components/header/app-switcher.component.d.ts.map +1 -1
- package/dist/lib/shell/components/header/app-switcher.component.js +85 -29
- package/dist/lib/shell/components/header/app-switcher.component.js.map +1 -1
- package/dist/lib/shell/components/record-open/record-origin-crumb.component.js +1 -1
- package/dist/lib/shell/components/record-open/record-origin-crumb.component.js.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts +50 -6
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.js +95 -22
- package/dist/lib/shell/components/tabs/component-cache-manager.js.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts +91 -9
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.js +257 -101
- package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
- package/dist/lib/shell/loading-themes.d.ts +16 -12
- package/dist/lib/shell/loading-themes.d.ts.map +1 -1
- package/dist/lib/shell/loading-themes.js +145 -137
- package/dist/lib/shell/loading-themes.js.map +1 -1
- package/dist/lib/shell/readiness-beacon.d.ts +2 -0
- package/dist/lib/shell/readiness-beacon.d.ts.map +1 -1
- package/dist/lib/shell/readiness-beacon.js +5 -1
- package/dist/lib/shell/readiness-beacon.js.map +1 -1
- package/dist/lib/shell/services/about-dialog.service.d.ts +6 -0
- package/dist/lib/shell/services/about-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/about-dialog.service.js +16 -4
- package/dist/lib/shell/services/about-dialog.service.js.map +1 -1
- package/dist/lib/shell/services/profile-dialog.service.d.ts +6 -0
- package/dist/lib/shell/services/profile-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/profile-dialog.service.js +16 -4
- package/dist/lib/shell/services/profile-dialog.service.js.map +1 -1
- package/dist/lib/shell/services/user-sharing-center-dialog.service.d.ts +6 -0
- package/dist/lib/shell/services/user-sharing-center-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/user-sharing-center-dialog.service.js +15 -3
- package/dist/lib/shell/services/user-sharing-center-dialog.service.js.map +1 -1
- package/dist/lib/shell/shell.component.d.ts +262 -39
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +688 -292
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts +64 -8
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +129 -37
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.d.ts +26 -2
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +48 -10
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts +84 -6
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +133 -29
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts +173 -23
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.js +383 -109
- package/dist/lib/single-dashboard/single-dashboard.component.js.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts +383 -55
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.js +962 -326
- package/dist/lib/single-list-detail/single-list-detail.component.js.map +1 -1
- package/dist/lib/single-query/single-query.component.d.ts +22 -2
- package/dist/lib/single-query/single-query.component.d.ts.map +1 -1
- package/dist/lib/single-query/single-query.component.js +40 -10
- package/dist/lib/single-query/single-query.component.js.map +1 -1
- package/dist/lib/single-record/single-record.component.d.ts +41 -3
- package/dist/lib/single-record/single-record.component.d.ts.map +1 -1
- package/dist/lib/single-record/single-record.component.js +71 -11
- package/dist/lib/single-record/single-record.component.js.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.d.ts +23 -3
- package/dist/lib/single-search-result/single-search-result.component.d.ts.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.js +42 -12
- package/dist/lib/single-search-result/single-search-result.component.js.map +1 -1
- package/dist/lib/system-validation/system-validation-banner.component.d.ts +12 -2
- package/dist/lib/system-validation/system-validation-banner.component.d.ts.map +1 -1
- package/dist/lib/system-validation/system-validation-banner.component.js +25 -5
- package/dist/lib/system-validation/system-validation-banner.component.js.map +1 -1
- package/dist/lib/user-menu/user-menu.types.d.ts +4 -0
- package/dist/lib/user-menu/user-menu.types.d.ts.map +1 -1
- package/dist/lib/user-menu/user-menu.types.js +10 -2
- package/dist/lib/user-menu/user-menu.types.js.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.d.ts +59 -7
- package/dist/lib/user-notifications/user-notifications.component.d.ts.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.js +151 -47
- package/dist/lib/user-notifications/user-notifications.component.js.map +1 -1
- package/dist/lib/user-profile/user-profile.component.d.ts +3 -2
- package/dist/lib/user-profile/user-profile.component.d.ts.map +1 -1
- package/dist/lib/user-profile/user-profile.component.js +5 -4
- package/dist/lib/user-profile/user-profile.component.js.map +1 -1
- package/package.json +52 -52
|
@@ -5,31 +5,87 @@ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class AddItemComponent extends BaseAngularComponent implements OnInit {
|
|
7
7
|
private sharedService;
|
|
8
|
+
OnClose: EventEmitter<any>;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use {@link OnClose}.
|
|
11
|
+
*
|
|
12
|
+
* The same emitter under the old binding name, so a template still binding
|
|
13
|
+
* (onClose) keeps working. Must stay AFTER OnClose: class fields
|
|
14
|
+
* initialise in order, and the other way round this captures undefined.
|
|
15
|
+
*/
|
|
8
16
|
onClose: EventEmitter<any>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
SelectedResource: MJResourceTypeEntity | null;
|
|
18
|
+
/** @deprecated Use {@link SelectedResource}. */
|
|
19
|
+
set selectedResource(value: MJResourceTypeEntity | null);
|
|
20
|
+
/** @deprecated Use {@link SelectedResource}. */
|
|
21
|
+
get selectedResource(): MJResourceTypeEntity | null;
|
|
22
|
+
Showloader: boolean;
|
|
23
|
+
/** @deprecated Use {@link Showloader}. */
|
|
24
|
+
get showloader(): boolean;
|
|
25
|
+
/** @deprecated Use {@link Showloader}. */
|
|
26
|
+
set showloader(value: boolean);
|
|
27
|
+
ResourceType: any;
|
|
28
|
+
/** @deprecated Use {@link ResourceType}. */
|
|
29
|
+
get resourceType(): any;
|
|
30
|
+
/** @deprecated Use {@link ResourceType}. */
|
|
31
|
+
set resourceType(value: any);
|
|
32
|
+
SelectedEntity: any;
|
|
33
|
+
/** @deprecated Use {@link SelectedEntity}. */
|
|
34
|
+
get selectedEntity(): any;
|
|
35
|
+
/** @deprecated Use {@link SelectedEntity}. */
|
|
36
|
+
set selectedEntity(value: any);
|
|
37
|
+
SelectedView: any;
|
|
38
|
+
/** @deprecated Use {@link SelectedView}. */
|
|
39
|
+
get selectedView(): any;
|
|
40
|
+
/** @deprecated Use {@link SelectedView}. */
|
|
41
|
+
set selectedView(value: any);
|
|
42
|
+
SelectedViewMode: string;
|
|
43
|
+
/** @deprecated Use {@link SelectedViewMode}. */
|
|
44
|
+
get selectedViewMode(): string;
|
|
45
|
+
/** @deprecated Use {@link SelectedViewMode}. */
|
|
46
|
+
set selectedViewMode(value: string);
|
|
47
|
+
ViewModeOptions: {
|
|
16
48
|
label: string;
|
|
17
49
|
value: string;
|
|
18
50
|
icon: string;
|
|
19
51
|
}[];
|
|
52
|
+
/** @deprecated Use {@link ViewModeOptions}. */
|
|
53
|
+
get viewModeOptions(): {
|
|
54
|
+
label: string;
|
|
55
|
+
value: string;
|
|
56
|
+
icon: string;
|
|
57
|
+
}[];
|
|
58
|
+
/** @deprecated Use {@link ViewModeOptions}. */
|
|
59
|
+
set viewModeOptions(value: {
|
|
60
|
+
label: string;
|
|
61
|
+
value: string;
|
|
62
|
+
icon: string;
|
|
63
|
+
}[]);
|
|
20
64
|
Entities: any[];
|
|
21
65
|
Views: any[];
|
|
22
66
|
get ResourceTypes(): any[];
|
|
23
67
|
private get md();
|
|
24
68
|
constructor(sharedService: SharedService);
|
|
25
69
|
ngOnInit(): void;
|
|
70
|
+
OnResourceTypeChange(event: any): Promise<void>;
|
|
71
|
+
/** @deprecated Use {@link OnResourceTypeChange}. */
|
|
26
72
|
onResourceTypeChange(event: any): Promise<void>;
|
|
73
|
+
GetViews(): Promise<void>;
|
|
74
|
+
/** @deprecated Use {@link GetViews}. */
|
|
27
75
|
getViews(): Promise<void>;
|
|
76
|
+
OnEntityChange(event: any): void;
|
|
77
|
+
/** @deprecated Use {@link OnEntityChange}. */
|
|
28
78
|
onEntityChange(event: any): void;
|
|
79
|
+
OnViewChange(event: any): void;
|
|
80
|
+
/** @deprecated Use {@link OnViewChange}. */
|
|
29
81
|
onViewChange(event: any): void;
|
|
82
|
+
AddItem(): void;
|
|
83
|
+
/** @deprecated Use {@link AddItem}. */
|
|
30
84
|
addItem(): void;
|
|
85
|
+
CloseDialog(): void;
|
|
86
|
+
/** @deprecated Use {@link CloseDialog}. */
|
|
31
87
|
closeDialog(): void;
|
|
32
88
|
static ɵfac: i0.ɵɵFactoryDeclaration<AddItemComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AddItemComponent, "app-add-item-dialog", never, { "selectedResource": { "alias": "selectedResource"; "required": false; }; }, { "onClose": "onClose"; }, never, never, false, never>;
|
|
89
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AddItemComponent, "app-add-item-dialog", never, { "SelectedResource": { "alias": "SelectedResource"; "required": false; }; "selectedResource": { "alias": "selectedResource"; "required": false; }; }, { "OnClose": "OnClose"; "onClose": "onClose"; }, never, never, false, never>;
|
|
34
90
|
}
|
|
35
91
|
//# sourceMappingURL=add-item.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-item.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/add-item/add-item.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAS,MAAM,EAAU,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAE,oBAAoB,EAAW,MAAM,+BAA+B,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;AACrE,qBAMa,gBAAiB,SAAQ,oBAAqB,YAAW,MAAM;
|
|
1
|
+
{"version":3,"file":"add-item.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/add-item/add-item.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAS,MAAM,EAAU,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAE,oBAAoB,EAAW,MAAM,+BAA+B,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;AACrE,qBAMa,gBAAiB,SAAQ,oBAAqB,YAAW,MAAM;IA4F9D,OAAO,CAAC,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EAAE,CAEhC;IACD,OAAO,KAAK,EAAE,GAAiC;gBAC3B,aAAa,EAAE,aAAa;IAGhD,QAAQ,IAAI,IAAI;IASV,oBAAoB,CAAC,KAAK,EAAE,GAAG;IAKrC,oDAAoD;IAC9C,oBAAoB,CAAC,KAAK,EAAE,GAAG;IAI/B,QAAQ;IAed,wCAAwC;IAClC,QAAQ;IAId,cAAc,CAAC,KAAK,EAAE,GAAG;IAMzB,8CAA8C;IAC9C,cAAc,CAAC,KAAK,EAAE,GAAG;IAIzB,YAAY,CAAC,KAAK,EAAE,GAAG;IAIvB,4CAA4C;IAC5C,YAAY,CAAC,KAAK,EAAE,GAAG;IAIhB,OAAO;IAwCd,uCAAuC;IAChC,OAAO;IAId,WAAW;IAIX,2CAA2C;IAC3C,WAAW;yCA5MA,gBAAgB;2CAAhB,gBAAgB;CA+M5B"}
|
|
@@ -70,19 +70,83 @@ function AddItemComponent_Case_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
70
70
|
} }
|
|
71
71
|
export class AddItemComponent extends BaseAngularComponent {
|
|
72
72
|
sharedService;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
OnClose = new EventEmitter();
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated Use {@link OnClose}.
|
|
76
|
+
*
|
|
77
|
+
* The same emitter under the old binding name, so a template still binding
|
|
78
|
+
* (onClose) keeps working. Must stay AFTER OnClose: class fields
|
|
79
|
+
* initialise in order, and the other way round this captures undefined.
|
|
80
|
+
*/
|
|
81
|
+
onClose = this.OnClose;
|
|
82
|
+
SelectedResource;
|
|
83
|
+
/** @deprecated Use {@link SelectedResource}. */
|
|
84
|
+
set selectedResource(value) {
|
|
85
|
+
this.SelectedResource = value;
|
|
86
|
+
}
|
|
87
|
+
/** @deprecated Use {@link SelectedResource}. */
|
|
88
|
+
get selectedResource() {
|
|
89
|
+
return this.SelectedResource;
|
|
90
|
+
}
|
|
91
|
+
Showloader = false;
|
|
92
|
+
/** @deprecated Use {@link Showloader}. */
|
|
93
|
+
get showloader() {
|
|
94
|
+
return this.Showloader;
|
|
95
|
+
}
|
|
96
|
+
/** @deprecated Use {@link Showloader}. */
|
|
97
|
+
set showloader(value) {
|
|
98
|
+
this.Showloader = value;
|
|
99
|
+
}
|
|
100
|
+
ResourceType = null;
|
|
101
|
+
/** @deprecated Use {@link ResourceType}. */
|
|
102
|
+
get resourceType() {
|
|
103
|
+
return this.ResourceType;
|
|
104
|
+
}
|
|
105
|
+
/** @deprecated Use {@link ResourceType}. */
|
|
106
|
+
set resourceType(value) {
|
|
107
|
+
this.ResourceType = value;
|
|
108
|
+
}
|
|
109
|
+
SelectedEntity = null;
|
|
110
|
+
/** @deprecated Use {@link SelectedEntity}. */
|
|
111
|
+
get selectedEntity() {
|
|
112
|
+
return this.SelectedEntity;
|
|
113
|
+
}
|
|
114
|
+
/** @deprecated Use {@link SelectedEntity}. */
|
|
115
|
+
set selectedEntity(value) {
|
|
116
|
+
this.SelectedEntity = value;
|
|
117
|
+
}
|
|
118
|
+
SelectedView = null;
|
|
119
|
+
/** @deprecated Use {@link SelectedView}. */
|
|
120
|
+
get selectedView() {
|
|
121
|
+
return this.SelectedView;
|
|
122
|
+
}
|
|
123
|
+
/** @deprecated Use {@link SelectedView}. */
|
|
124
|
+
set selectedView(value) {
|
|
125
|
+
this.SelectedView = value;
|
|
126
|
+
}
|
|
127
|
+
SelectedViewMode = 'grid';
|
|
128
|
+
/** @deprecated Use {@link SelectedViewMode}. */
|
|
129
|
+
get selectedViewMode() {
|
|
130
|
+
return this.SelectedViewMode;
|
|
131
|
+
}
|
|
132
|
+
/** @deprecated Use {@link SelectedViewMode}. */
|
|
133
|
+
set selectedViewMode(value) {
|
|
134
|
+
this.SelectedViewMode = value;
|
|
135
|
+
}
|
|
136
|
+
ViewModeOptions = [
|
|
81
137
|
{ label: 'Grid', value: 'grid', icon: 'fa-solid fa-list' },
|
|
82
138
|
{ label: 'Cards', value: 'cards', icon: 'fa-solid fa-grip' },
|
|
83
139
|
{ label: 'Timeline', value: 'timeline', icon: 'fa-solid fa-timeline' },
|
|
84
140
|
{ label: 'Map', value: 'map', icon: 'fa-solid fa-map' }
|
|
85
141
|
];
|
|
142
|
+
/** @deprecated Use {@link ViewModeOptions}. */
|
|
143
|
+
get viewModeOptions() {
|
|
144
|
+
return this.ViewModeOptions;
|
|
145
|
+
}
|
|
146
|
+
/** @deprecated Use {@link ViewModeOptions}. */
|
|
147
|
+
set viewModeOptions(value) {
|
|
148
|
+
this.ViewModeOptions = value;
|
|
149
|
+
}
|
|
86
150
|
Entities = [];
|
|
87
151
|
Views = [];
|
|
88
152
|
get ResourceTypes() {
|
|
@@ -94,52 +158,68 @@ export class AddItemComponent extends BaseAngularComponent {
|
|
|
94
158
|
this.sharedService = sharedService;
|
|
95
159
|
}
|
|
96
160
|
ngOnInit() {
|
|
97
|
-
this.
|
|
98
|
-
this.
|
|
161
|
+
this.ResourceType = this.SelectedResource || SharedService.Instance.ViewResourceType;
|
|
162
|
+
this.OnResourceTypeChange(this.ResourceType);
|
|
99
163
|
// Sort entities alphabetically by name
|
|
100
164
|
this.Entities = [...this.md.Entities].sort((a, b) => a.Name.localeCompare(b.Name));
|
|
101
165
|
}
|
|
166
|
+
async OnResourceTypeChange(event) {
|
|
167
|
+
this.ResourceType = event;
|
|
168
|
+
this.SelectedEntity = null;
|
|
169
|
+
}
|
|
170
|
+
/** @deprecated Use {@link OnResourceTypeChange}. */
|
|
102
171
|
async onResourceTypeChange(event) {
|
|
103
|
-
this.
|
|
104
|
-
this.selectedEntity = null;
|
|
172
|
+
return this.OnResourceTypeChange(event);
|
|
105
173
|
}
|
|
106
|
-
async
|
|
107
|
-
if (!this.
|
|
174
|
+
async GetViews() {
|
|
175
|
+
if (!this.SelectedEntity)
|
|
108
176
|
return;
|
|
109
|
-
this.
|
|
110
|
-
this.Views = await ViewInfo.GetViewsForUser(this.
|
|
177
|
+
this.Showloader = true;
|
|
178
|
+
this.Views = await ViewInfo.GetViewsForUser(this.SelectedEntity.ID);
|
|
111
179
|
// Sort views alphabetically
|
|
112
180
|
if (this.Views && this.Views.length) {
|
|
113
181
|
this.Views = this.Views.sort((a, b) => a.Name.localeCompare(b.Name));
|
|
114
182
|
}
|
|
115
183
|
// Always set showloader to false when done, even if no views found
|
|
116
|
-
this.
|
|
184
|
+
this.Showloader = false;
|
|
117
185
|
}
|
|
186
|
+
/** @deprecated Use {@link GetViews}. */
|
|
187
|
+
async getViews() {
|
|
188
|
+
return this.GetViews();
|
|
189
|
+
}
|
|
190
|
+
OnEntityChange(event) {
|
|
191
|
+
this.SelectedEntity = event;
|
|
192
|
+
this.SelectedView = null;
|
|
193
|
+
this.GetViews();
|
|
194
|
+
}
|
|
195
|
+
/** @deprecated Use {@link OnEntityChange}. */
|
|
118
196
|
onEntityChange(event) {
|
|
119
|
-
this.
|
|
120
|
-
|
|
121
|
-
|
|
197
|
+
return this.OnEntityChange(event);
|
|
198
|
+
}
|
|
199
|
+
OnViewChange(event) {
|
|
200
|
+
this.SelectedView = event;
|
|
122
201
|
}
|
|
202
|
+
/** @deprecated Use {@link OnViewChange}. */
|
|
123
203
|
onViewChange(event) {
|
|
124
|
-
this.
|
|
204
|
+
return this.OnViewChange(event);
|
|
125
205
|
}
|
|
126
|
-
|
|
206
|
+
AddItem() {
|
|
127
207
|
// For views, allow "Default View" (no specific view selected) when an entity is chosen
|
|
128
|
-
const isViewResource = this.
|
|
129
|
-
const isDefaultView = isViewResource && this.
|
|
130
|
-
if (!this.
|
|
208
|
+
const isViewResource = this.ResourceType?.Name === 'UserViews' || this.ResourceType?.Entity === 'MJ: User Views';
|
|
209
|
+
const isDefaultView = isViewResource && this.SelectedEntity && !this.SelectedView;
|
|
210
|
+
if (!this.SelectedView && !isDefaultView) {
|
|
131
211
|
this.sharedService.CreateSimpleNotification('Please select an item to add', 'warning', 2000);
|
|
132
212
|
return;
|
|
133
213
|
}
|
|
134
|
-
const name = this.
|
|
135
|
-
const id = this.
|
|
214
|
+
const name = this.SelectedView?.Name || (isDefaultView ? `${this.SelectedEntity.Name} (Default View)` : null);
|
|
215
|
+
const id = this.SelectedView?.ID || null;
|
|
136
216
|
// Build configuration — include viewMode for view resources
|
|
137
217
|
const configuration = {};
|
|
138
|
-
if (isViewResource && this.
|
|
139
|
-
configuration['viewMode'] = this.
|
|
218
|
+
if (isViewResource && this.SelectedViewMode && this.SelectedViewMode !== 'grid') {
|
|
219
|
+
configuration['viewMode'] = this.SelectedViewMode;
|
|
140
220
|
}
|
|
141
|
-
if (isDefaultView && this.
|
|
142
|
-
configuration['Entity'] = this.
|
|
221
|
+
if (isDefaultView && this.SelectedEntity) {
|
|
222
|
+
configuration['Entity'] = this.SelectedEntity.Name;
|
|
143
223
|
}
|
|
144
224
|
const dashboardItem = {
|
|
145
225
|
title: name ? name : 'New Item',
|
|
@@ -148,20 +228,28 @@ export class AddItemComponent extends BaseAngularComponent {
|
|
|
148
228
|
colSpan: 2,
|
|
149
229
|
ResourceData: new ResourceData({
|
|
150
230
|
Name: name,
|
|
151
|
-
ResourceType: this.
|
|
152
|
-
ResourceTypeID: this.
|
|
231
|
+
ResourceType: this.ResourceType.Name,
|
|
232
|
+
ResourceTypeID: this.ResourceType.ID,
|
|
153
233
|
ResourceRecordID: id,
|
|
154
234
|
Configuration: configuration
|
|
155
235
|
}),
|
|
156
236
|
};
|
|
157
237
|
this.sharedService.CreateSimpleNotification(`Added "${name}" to dashboard`, 'success', 2000);
|
|
158
|
-
this.
|
|
238
|
+
this.OnClose.emit(dashboardItem);
|
|
239
|
+
}
|
|
240
|
+
/** @deprecated Use {@link AddItem}. */
|
|
241
|
+
addItem() {
|
|
242
|
+
return this.AddItem();
|
|
159
243
|
}
|
|
244
|
+
CloseDialog() {
|
|
245
|
+
this.OnClose.emit();
|
|
246
|
+
}
|
|
247
|
+
/** @deprecated Use {@link CloseDialog}. */
|
|
160
248
|
closeDialog() {
|
|
161
|
-
this.
|
|
249
|
+
return this.CloseDialog();
|
|
162
250
|
}
|
|
163
251
|
static ɵfac = function AddItemComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AddItemComponent)(i0.ɵɵdirectiveInject(i1.SharedService)); };
|
|
164
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AddItemComponent, selectors: [["app-add-item-dialog"]], inputs: { selectedResource: "selectedResource" }, outputs: { onClose: "onClose" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 15, vars: 10, consts: [[1, "k-overlay"], ["Title", "Add Item to Dashboard", 3, "Close", "Visible", "Width", "MinHeight", "MinWidth", "Resizable"], [1, "k-d-flex", "k-flex-col", "resource-wrap"], [3, "ValueChange", "ngModelChange", "Data", "TextField", "ValueField", "ngModel"], [1, "user-view-wrap"], [1, "k-actions", "k-actions-end", "popup-actions", "customBtn"], ["mjButton", "", "variant", "primary", 3, "click"], [1, "fa-solid", "fa-check"], ["mjButton", "", "variant", "outline", 3, "click"], ["size", "medium", 3, "showText"], [3, "ngModelChange", "Data", "TextField", "ValueField", "ngModel"], [1, "optional-hint"]], template: function AddItemComponent_Template(rf, ctx) { if (rf & 1) {
|
|
252
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AddItemComponent, selectors: [["app-add-item-dialog"]], inputs: { SelectedResource: "SelectedResource", selectedResource: "selectedResource" }, outputs: { OnClose: "OnClose", onClose: "onClose" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 15, vars: 10, consts: [[1, "k-overlay"], ["Title", "Add Item to Dashboard", 3, "Close", "Visible", "Width", "MinHeight", "MinWidth", "Resizable"], [1, "k-d-flex", "k-flex-col", "resource-wrap"], [3, "ValueChange", "ngModelChange", "Data", "TextField", "ValueField", "ngModel"], [1, "user-view-wrap"], [1, "k-actions", "k-actions-end", "popup-actions", "customBtn"], ["mjButton", "", "variant", "primary", 3, "click"], [1, "fa-solid", "fa-check"], ["mjButton", "", "variant", "outline", 3, "click"], ["size", "medium", 3, "showText"], [3, "ngModelChange", "Data", "TextField", "ValueField", "ngModel"], [1, "optional-hint"]], template: function AddItemComponent_Template(rf, ctx) { if (rf & 1) {
|
|
165
253
|
i0.ɵɵelement(0, "div", 0);
|
|
166
254
|
i0.ɵɵelementStart(1, "mj-window", 1);
|
|
167
255
|
i0.ɵɵlistener("Close", function AddItemComponent_Template_mj_window_Close_1_listener() { return ctx.closeDialog(); });
|
|
@@ -198,8 +286,12 @@ export class AddItemComponent extends BaseAngularComponent {
|
|
|
198
286
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddItemComponent, [{
|
|
199
287
|
type: Component,
|
|
200
288
|
args: [{ standalone: false, selector: 'app-add-item-dialog', template: "<div class=\"k-overlay\"></div>\n<mj-window [Visible]=\"true\" [Width]=\"500\" [MinHeight]=\"300\" [MinWidth]=\"400\" [Resizable]=\"true\" (Close)=\"closeDialog()\"\n Title=\"Add Item to Dashboard\">\n <div class=\"k-d-flex k-flex-col resource-wrap\">\n <label>Resource Type\n <br />\n <mj-dropdown [Data]=\"ResourceTypes\" [TextField]=\"'DisplayName'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onResourceTypeChange($any($event))\" [(ngModel)]=\"resourceType\">\n </mj-dropdown>\n </label>\n <div class=\"user-view-wrap\">\n @switch (resourceType.Entity ) {\n @case ('MJ: User Views') {\n <label>Entity\n <br />\n <mj-dropdown [Data]=\"Entities\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onEntityChange($any($event))\" [(ngModel)]=\"selectedEntity\">\n </mj-dropdown>\n </label>\n @if (selectedEntity && !showloader) {\n @if (Views.length) {\n <label>View\n <span class=\"optional-hint\">(optional \u2014 leave blank for default)</span>\n <br />\n <mj-dropdown [Data]=\"Views\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onViewChange($any($event))\" [(ngModel)]=\"selectedView\">\n </mj-dropdown>\n </label>\n }\n <!-- View Mode Selector -->\n <label>View Mode\n <br />\n <mj-dropdown [Data]=\"viewModeOptions\" [TextField]=\"'label'\" [ValueField]=\"'value'\"\n [(ngModel)]=\"selectedViewMode\">\n </mj-dropdown>\n </label>\n }\n @if (selectedEntity && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n }\n }\n </div>\n </div>\n <div class=\"k-actions k-actions-end popup-actions customBtn\">\n <button mjButton variant=\"primary\" (click)=\"addItem()\">\n <span class=\"fa-solid fa-check\"></span> Add\n </button>\n <button mjButton variant=\"outline\" (click)=\"closeDialog()\">Cancel</button>\n </div>\n</mj-window>\n", styles: [".popup-actions {\n width: 100%;\n padding: 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n}\n::ng-deep .modal-body-wrap .k-window-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n padding: 0;\n}\n.resource-wrap {\n flex: 1;\n padding: 24px;\n margin: 16px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n.user-view-wrap {\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n::ng-deep .resource-wrap .k-label {\n color: var(--mj-text-secondary);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n}\n::ng-deep .resource-wrap .k-dropdownlist {\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: transparent;\n line-height: 32px;\n margin: 0;\n}\n::ng-deep .customBtn button {\n flex: 1;\n border-radius: 10px;\n line-height: 34px;\n}\n\n.optional-hint {\n font-size: 11px;\n color: var(--mj-text-muted);\n font-weight: 400;\n margin-left: 4px;\n}\n\n"] }]
|
|
201
|
-
}], () => [{ type: i1.SharedService }], {
|
|
289
|
+
}], () => [{ type: i1.SharedService }], { OnClose: [{
|
|
290
|
+
type: Output
|
|
291
|
+
}], onClose: [{
|
|
202
292
|
type: Output
|
|
293
|
+
}], SelectedResource: [{
|
|
294
|
+
type: Input
|
|
203
295
|
}], selectedResource: [{
|
|
204
296
|
type: Input
|
|
205
297
|
}] }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-item.component.js","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/add-item/add-item.component.ts","../../../../../src/lib/single-dashboard/Components/add-item/add-item.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAwB,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;ICevD,6BAAO;IAAA,qBACL;IAAA,gCAA4B;IAAA,yDAAoC;IAAA,iBAAO;IACvE,qBAAM;IACN,sCACwE;IAAtE,iOAAe,2BAA0B,KAAC;IAAC,4UAA0B;IAEzE,AADE,iBAAc,EACR;;;IAHO,eAAc;IAAsB,AAArB,AAAf,mCAAc,qBAAqB,oBAAoB;IACvB,mDAA0B;;;;IAL3E,sGAAoB;IAUpB,6BAAO;IAAA,0BACL;IAAA,qBAAM;IACN,uCACiC;IAA/B,sUAA8B;IAElC,AADE,iBAAc,EACR;;;IAfR,8CAQC;IAIc,eAAwB;IAAuB,AAAtB,AAAzB,6CAAwB,sBAAsB,uBAAuB;IAChF,uDAA8B;;;IAKlC,gCAA0D;;IAA9C,gCAAkB;;;;IAzBhC,6BAAO;IAAA,uBACL;IAAA,qBAAM;IACN,sCAC4E;IAA1E,oMAAe,6BAA4B,KAAC;IAAC,mTAA4B;IAE7E,AADE,iBAAc,EACR;IACR,+EAAqC;IAkBrC,gGAAoC;;;IAtBrB,eA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I,KAAK,YACP,qBAAqB;;kBAK9B,MAAM;;kBACN,KAAK;;kFAFK,gBAAgB","sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Metadata, RunView } from '@memberjunction/core';\nimport { MJResourceTypeEntity, ViewInfo} from '@memberjunction/core-entities';\nimport { ResourceData } from '@memberjunction/core-entities';\nimport { SharedService } from '@memberjunction/ng-shared';\n\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n@Component({\n standalone: false,\n selector: 'app-add-item-dialog',\n templateUrl: './add-item.component.html',\n styleUrls: ['./add-item.component.css']\n})\nexport class AddItemComponent extends BaseAngularComponent implements OnInit {\n @Output() onClose = new EventEmitter<any>();\n @Input() selectedResource!:MJResourceTypeEntity | null;\n public showloader: boolean = false;\n public resourceType: any = null;\n public selectedEntity: any = null;\n public selectedView: any = null;\n public selectedViewMode: string = 'grid';\n public viewModeOptions = [\n { label: 'Grid', value: 'grid', icon: 'fa-solid fa-list' },\n { label: 'Cards', value: 'cards', icon: 'fa-solid fa-grip' },\n { label: 'Timeline', value: 'timeline', icon: 'fa-solid fa-timeline' },\n { label: 'Map', value: 'map', icon: 'fa-solid fa-map' }\n ];\n public Entities: any[] = [];\n public Views: any[] = [];\n public get ResourceTypes(): any[] {\n return SharedService.Instance.ResourceTypes.filter((rt: any) => rt.Name !== 'Dashboards' && rt.Name !== 'Records');\n }\n private get md() { return this.ProviderToUse; }\n constructor(private sharedService: SharedService) {\n super(); }\n\n ngOnInit(): void {\n this.resourceType = this.selectedResource || SharedService.Instance.ViewResourceType;\n this.onResourceTypeChange(this.resourceType);\n // Sort entities alphabetically by name\n this.Entities = [...this.md.Entities].sort((a, b) => \n a.Name.localeCompare(b.Name)\n );\n }\n\n async onResourceTypeChange(event: any) {\n this.resourceType = event;\n this.selectedEntity = null;\n }\n\n async getViews() {\n if (!this.selectedEntity) return;\n \n this.showloader = true;\n this.Views = await ViewInfo.GetViewsForUser(this.selectedEntity.ID);\n \n // Sort views alphabetically\n if (this.Views && this.Views.length) {\n this.Views = this.Views.sort((a, b) => a.Name.localeCompare(b.Name));\n }\n \n // Always set showloader to false when done, even if no views found\n this.showloader = false;\n }\n\n onEntityChange(event: any) {\n this.selectedEntity = event;\n this.selectedView = null;\n this.getViews();\n }\n\n onViewChange(event: any) {\n this.selectedView = event;\n }\n\n public addItem() {\n // For views, allow \"Default View\" (no specific view selected) when an entity is chosen\n const isViewResource = this.resourceType?.Name === 'UserViews' || this.resourceType?.Entity === 'MJ: User Views';\n const isDefaultView = isViewResource && this.selectedEntity && !this.selectedView;\n\n if (!this.selectedView && !isDefaultView) {\n this.sharedService.CreateSimpleNotification('Please select an item to add', 'warning', 2000);\n return;\n }\n\n const name = this.selectedView?.Name || (isDefaultView ? `${this.selectedEntity.Name} (Default View)` : null);\n const id = this.selectedView?.ID || null;\n\n // Build configuration — include viewMode for view resources\n const configuration: Record<string, unknown> = {};\n if (isViewResource && this.selectedViewMode && this.selectedViewMode !== 'grid') {\n configuration['viewMode'] = this.selectedViewMode;\n }\n if (isDefaultView && this.selectedEntity) {\n configuration['Entity'] = this.selectedEntity.Name;\n }\n\n const dashboardItem = {\n title: name ? name : 'New Item',\n col: 1,\n rowSpan: 3,\n colSpan: 2,\n ResourceData: new ResourceData({\n Name: name,\n ResourceType: this.resourceType.Name,\n ResourceTypeID: this.resourceType.ID,\n ResourceRecordID: id,\n Configuration: configuration\n }),\n };\n\n this.sharedService.CreateSimpleNotification(`Added \"${name}\" to dashboard`, 'success', 2000);\n this.onClose.emit(dashboardItem);\n }\n\n closeDialog() {\n this.onClose.emit();\n }\n}\n","<div class=\"k-overlay\"></div>\n<mj-window [Visible]=\"true\" [Width]=\"500\" [MinHeight]=\"300\" [MinWidth]=\"400\" [Resizable]=\"true\" (Close)=\"closeDialog()\"\n Title=\"Add Item to Dashboard\">\n <div class=\"k-d-flex k-flex-col resource-wrap\">\n <label>Resource Type\n <br />\n <mj-dropdown [Data]=\"ResourceTypes\" [TextField]=\"'DisplayName'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onResourceTypeChange($any($event))\" [(ngModel)]=\"resourceType\">\n </mj-dropdown>\n </label>\n <div class=\"user-view-wrap\">\n @switch (resourceType.Entity ) {\n @case ('MJ: User Views') {\n <label>Entity\n <br />\n <mj-dropdown [Data]=\"Entities\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onEntityChange($any($event))\" [(ngModel)]=\"selectedEntity\">\n </mj-dropdown>\n </label>\n @if (selectedEntity && !showloader) {\n @if (Views.length) {\n <label>View\n <span class=\"optional-hint\">(optional — leave blank for default)</span>\n <br />\n <mj-dropdown [Data]=\"Views\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onViewChange($any($event))\" [(ngModel)]=\"selectedView\">\n </mj-dropdown>\n </label>\n }\n <!-- View Mode Selector -->\n <label>View Mode\n <br />\n <mj-dropdown [Data]=\"viewModeOptions\" [TextField]=\"'label'\" [ValueField]=\"'value'\"\n [(ngModel)]=\"selectedViewMode\">\n </mj-dropdown>\n </label>\n }\n @if (selectedEntity && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n }\n }\n </div>\n </div>\n <div class=\"k-actions k-actions-end popup-actions customBtn\">\n <button mjButton variant=\"primary\" (click)=\"addItem()\">\n <span class=\"fa-solid fa-check\"></span> Add\n </button>\n <button mjButton variant=\"outline\" (click)=\"closeDialog()\">Cancel</button>\n </div>\n</mj-window>\n"]}
|
|
1
|
+
{"version":3,"file":"add-item.component.js","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/add-item/add-item.component.ts","../../../../../src/lib/single-dashboard/Components/add-item/add-item.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAwB,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,YAAY,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YAjDD,cAAgB;YAAkD,AAAjB,AAAlB,AAAd,AAAjB,8BAAgB,cAAc,kBAAkB,iBAAiB,mBAAmB;YAK5E,eAAsB;YAA6B,AAA5B,AAAvB,wCAAsB,4BAA4B,oBAAoB;YAC9B,gDAA0B;YAI/E,eA8BC;YA9BD,yDAAA,gBAAgB,UA8Bf;;;iFD5BM,gBAAgB;cAN5B,SAAS;6BACI,KAAK,YACP,qBAAqB;;kBAK9B,MAAM;;kBASN,MAAM;;kBACN,KAAK;;kBAGL,KAAK;;kFAdK,gBAAgB","sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Metadata, RunView } from '@memberjunction/core';\nimport { MJResourceTypeEntity, ViewInfo} from '@memberjunction/core-entities';\nimport { ResourceData } from '@memberjunction/core-entities';\nimport { SharedService } from '@memberjunction/ng-shared';\n\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n@Component({\n standalone: false,\n selector: 'app-add-item-dialog',\n templateUrl: './add-item.component.html',\n styleUrls: ['./add-item.component.css']\n})\nexport class AddItemComponent extends BaseAngularComponent implements OnInit {\n @Output() OnClose = new EventEmitter<any>();\n\n /**\n * @deprecated Use {@link OnClose}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (onClose) keeps working. Must stay AFTER OnClose: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() onClose = this.OnClose;\n @Input() SelectedResource!:MJResourceTypeEntity | null;\n\n /** @deprecated Use {@link SelectedResource}. */\n @Input() set selectedResource(value: MJResourceTypeEntity | null) {\n this.SelectedResource = value;\n }\n /** @deprecated Use {@link SelectedResource}. */\n get selectedResource(): MJResourceTypeEntity | null {\n return this.SelectedResource;\n }\n public Showloader: boolean = false;\n\n /** @deprecated Use {@link Showloader}. */\n public get showloader(): boolean {\n return this.Showloader;\n }\n /** @deprecated Use {@link Showloader}. */\n public set showloader(value: boolean) {\n this.Showloader = value;\n }\n public ResourceType: any = null;\n\n /** @deprecated Use {@link ResourceType}. */\n public get resourceType(): any {\n return this.ResourceType;\n }\n /** @deprecated Use {@link ResourceType}. */\n public set resourceType(value: any) {\n this.ResourceType = value;\n }\n public SelectedEntity: any = null;\n\n /** @deprecated Use {@link SelectedEntity}. */\n public get selectedEntity(): any {\n return this.SelectedEntity;\n }\n /** @deprecated Use {@link SelectedEntity}. */\n public set selectedEntity(value: any) {\n this.SelectedEntity = value;\n }\n public SelectedView: any = null;\n\n /** @deprecated Use {@link SelectedView}. */\n public get selectedView(): any {\n return this.SelectedView;\n }\n /** @deprecated Use {@link SelectedView}. */\n public set selectedView(value: any) {\n this.SelectedView = value;\n }\n public SelectedViewMode: string = 'grid';\n\n /** @deprecated Use {@link SelectedViewMode}. */\n public get selectedViewMode(): string {\n return this.SelectedViewMode;\n }\n /** @deprecated Use {@link SelectedViewMode}. */\n public set selectedViewMode(value: string) {\n this.SelectedViewMode = value;\n }\n public ViewModeOptions = [\n { label: 'Grid', value: 'grid', icon: 'fa-solid fa-list' },\n { label: 'Cards', value: 'cards', icon: 'fa-solid fa-grip' },\n { label: 'Timeline', value: 'timeline', icon: 'fa-solid fa-timeline' },\n { label: 'Map', value: 'map', icon: 'fa-solid fa-map' }\n ];\n\n /** @deprecated Use {@link ViewModeOptions}. */\n public get viewModeOptions() {\n return this.ViewModeOptions;\n }\n /** @deprecated Use {@link ViewModeOptions}. */\n public set viewModeOptions(value) {\n this.ViewModeOptions = value;\n }\n public Entities: any[] = [];\n public Views: any[] = [];\n public get ResourceTypes(): any[] {\n return SharedService.Instance.ResourceTypes.filter((rt: any) => rt.Name !== 'Dashboards' && rt.Name !== 'Records');\n }\n private get md() { return this.ProviderToUse; }\n constructor(private sharedService: SharedService) {\n super(); }\n\n ngOnInit(): void {\n this.ResourceType = this.SelectedResource || SharedService.Instance.ViewResourceType;\n this.OnResourceTypeChange(this.ResourceType);\n // Sort entities alphabetically by name\n this.Entities = [...this.md.Entities].sort((a, b) => \n a.Name.localeCompare(b.Name)\n );\n }\n\n async OnResourceTypeChange(event: any) {\n this.ResourceType = event;\n this.SelectedEntity = null;\n }\n\n /** @deprecated Use {@link OnResourceTypeChange}. */\n async onResourceTypeChange(event: any) {\n return this.OnResourceTypeChange(event);\n }\n\n async GetViews() {\n if (!this.SelectedEntity) return;\n \n this.Showloader = true;\n this.Views = await ViewInfo.GetViewsForUser(this.SelectedEntity.ID);\n \n // Sort views alphabetically\n if (this.Views && this.Views.length) {\n this.Views = this.Views.sort((a, b) => a.Name.localeCompare(b.Name));\n }\n \n // Always set showloader to false when done, even if no views found\n this.Showloader = false;\n }\n\n /** @deprecated Use {@link GetViews}. */\n async getViews() {\n return this.GetViews();\n }\n\n OnEntityChange(event: any) {\n this.SelectedEntity = event;\n this.SelectedView = null;\n this.GetViews();\n }\n\n /** @deprecated Use {@link OnEntityChange}. */\n onEntityChange(event: any) {\n return this.OnEntityChange(event);\n }\n\n OnViewChange(event: any) {\n this.SelectedView = event;\n }\n\n /** @deprecated Use {@link OnViewChange}. */\n onViewChange(event: any) {\n return this.OnViewChange(event);\n }\n\n public AddItem() {\n // For views, allow \"Default View\" (no specific view selected) when an entity is chosen\n const isViewResource = this.ResourceType?.Name === 'UserViews' || this.ResourceType?.Entity === 'MJ: User Views';\n const isDefaultView = isViewResource && this.SelectedEntity && !this.SelectedView;\n\n if (!this.SelectedView && !isDefaultView) {\n this.sharedService.CreateSimpleNotification('Please select an item to add', 'warning', 2000);\n return;\n }\n\n const name = this.SelectedView?.Name || (isDefaultView ? `${this.SelectedEntity.Name} (Default View)` : null);\n const id = this.SelectedView?.ID || null;\n\n // Build configuration — include viewMode for view resources\n const configuration: Record<string, unknown> = {};\n if (isViewResource && this.SelectedViewMode && this.SelectedViewMode !== 'grid') {\n configuration['viewMode'] = this.SelectedViewMode;\n }\n if (isDefaultView && this.SelectedEntity) {\n configuration['Entity'] = this.SelectedEntity.Name;\n }\n\n const dashboardItem = {\n title: name ? name : 'New Item',\n col: 1,\n rowSpan: 3,\n colSpan: 2,\n ResourceData: new ResourceData({\n Name: name,\n ResourceType: this.ResourceType.Name,\n ResourceTypeID: this.ResourceType.ID,\n ResourceRecordID: id,\n Configuration: configuration\n }),\n };\n\n this.sharedService.CreateSimpleNotification(`Added \"${name}\" to dashboard`, 'success', 2000);\n this.OnClose.emit(dashboardItem);\n }\n\n /** @deprecated Use {@link AddItem}. */\n public addItem() {\n return this.AddItem();\n }\n\n CloseDialog() {\n this.OnClose.emit();\n }\n\n /** @deprecated Use {@link CloseDialog}. */\n closeDialog() {\n return this.CloseDialog();\n }\n}\n","<div class=\"k-overlay\"></div>\n<mj-window [Visible]=\"true\" [Width]=\"500\" [MinHeight]=\"300\" [MinWidth]=\"400\" [Resizable]=\"true\" (Close)=\"closeDialog()\"\n Title=\"Add Item to Dashboard\">\n <div class=\"k-d-flex k-flex-col resource-wrap\">\n <label>Resource Type\n <br />\n <mj-dropdown [Data]=\"ResourceTypes\" [TextField]=\"'DisplayName'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onResourceTypeChange($any($event))\" [(ngModel)]=\"resourceType\">\n </mj-dropdown>\n </label>\n <div class=\"user-view-wrap\">\n @switch (resourceType.Entity ) {\n @case ('MJ: User Views') {\n <label>Entity\n <br />\n <mj-dropdown [Data]=\"Entities\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onEntityChange($any($event))\" [(ngModel)]=\"selectedEntity\">\n </mj-dropdown>\n </label>\n @if (selectedEntity && !showloader) {\n @if (Views.length) {\n <label>View\n <span class=\"optional-hint\">(optional — leave blank for default)</span>\n <br />\n <mj-dropdown [Data]=\"Views\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onViewChange($any($event))\" [(ngModel)]=\"selectedView\">\n </mj-dropdown>\n </label>\n }\n <!-- View Mode Selector -->\n <label>View Mode\n <br />\n <mj-dropdown [Data]=\"viewModeOptions\" [TextField]=\"'label'\" [ValueField]=\"'value'\"\n [(ngModel)]=\"selectedViewMode\">\n </mj-dropdown>\n </label>\n }\n @if (selectedEntity && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n }\n }\n </div>\n </div>\n <div class=\"k-actions k-actions-end popup-actions customBtn\">\n <button mjButton variant=\"primary\" (click)=\"addItem()\">\n <span class=\"fa-solid fa-check\"></span> Add\n </button>\n <button mjButton variant=\"outline\" (click)=\"closeDialog()\">Cancel</button>\n </div>\n</mj-window>\n"]}
|
|
@@ -2,13 +2,37 @@ import { EventEmitter, OnInit } from '@angular/core';
|
|
|
2
2
|
import { DashboardItem } from '../../single-dashboard.component';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class DeleteItemComponent implements OnInit {
|
|
5
|
+
OnClose: EventEmitter<any>;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use {@link OnClose}.
|
|
8
|
+
*
|
|
9
|
+
* The same emitter under the old binding name, so a template still binding
|
|
10
|
+
* (onClose) keeps working. Must stay AFTER OnClose: class fields
|
|
11
|
+
* initialise in order, and the other way round this captures undefined.
|
|
12
|
+
*/
|
|
5
13
|
onClose: EventEmitter<any>;
|
|
14
|
+
RemoveDashboardItem: EventEmitter<any>;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use {@link RemoveDashboardItem}.
|
|
17
|
+
*
|
|
18
|
+
* The same emitter under the old binding name, so a template still binding
|
|
19
|
+
* (removeDashboardItem) keeps working. Must stay AFTER RemoveDashboardItem: class fields
|
|
20
|
+
* initialise in order, and the other way round this captures undefined.
|
|
21
|
+
*/
|
|
6
22
|
removeDashboardItem: EventEmitter<any>;
|
|
7
|
-
|
|
23
|
+
DashboardItem: DashboardItem | null;
|
|
24
|
+
/** @deprecated Use {@link DashboardItem}. */
|
|
25
|
+
set dashboardItem(value: DashboardItem | null);
|
|
26
|
+
/** @deprecated Use {@link DashboardItem}. */
|
|
27
|
+
get dashboardItem(): DashboardItem | null;
|
|
8
28
|
ngOnInit(): void;
|
|
29
|
+
ConfirmDeleteItem(): void;
|
|
30
|
+
/** @deprecated Use {@link ConfirmDeleteItem}. */
|
|
9
31
|
confirmDeleteItem(): void;
|
|
32
|
+
CloseDialog(): void;
|
|
33
|
+
/** @deprecated Use {@link CloseDialog}. */
|
|
10
34
|
closeDialog(): void;
|
|
11
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<DeleteItemComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DeleteItemComponent, "app-delete-item-dialog", never, { "dashboardItem": { "alias": "dashboardItem"; "required": false; }; }, { "onClose": "onClose"; "removeDashboardItem": "removeDashboardItem"; }, never, never, false, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DeleteItemComponent, "app-delete-item-dialog", never, { "DashboardItem": { "alias": "DashboardItem"; "required": false; }; "dashboardItem": { "alias": "dashboardItem"; "required": false; }; }, { "OnClose": "OnClose"; "onClose": "onClose"; "RemoveDashboardItem": "RemoveDashboardItem"; "removeDashboardItem": "removeDashboardItem"; }, never, never, false, never>;
|
|
13
37
|
}
|
|
14
38
|
//# sourceMappingURL=delete-item.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-item.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/delete-item/delete-item.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAS,MAAM,EAAU,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;;AAEjE,qBAMa,mBAAoB,YAAW,MAAM;IACtC,OAAO,oBAA2B;
|
|
1
|
+
{"version":3,"file":"delete-item.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/delete-item/delete-item.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAS,MAAM,EAAU,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;;AAEjE,qBAMa,mBAAoB,YAAW,MAAM;IACtC,OAAO,oBAA2B;IAE5C;;;;;;OAMG;IACO,OAAO,oBAAgB;IACvB,mBAAmB,oBAA2B;IAExD;;;;;;OAMG;IACO,mBAAmB,oBAA4B;IAChD,aAAa,EAAI,aAAa,GAAG,IAAI,CAAC;IAE/C,6CAA6C;IAC7C,IAAa,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,EAErD;IACD,6CAA6C;IAC7C,IAAI,aAAa,IAAI,aAAa,GAAG,IAAI,CAExC;IAED,QAAQ,IAAI,IAAI;IAIT,iBAAiB,IAAI,IAAI;IAWhC,iDAAiD;IAC1C,iBAAiB,IAAI,IAAI;IAIzB,WAAW,IAAI,IAAI;IAI1B,2CAA2C;IACpC,WAAW,IAAI,IAAI;yCAzDf,mBAAmB;2CAAnB,mBAAmB;CA4D/B"}
|
|
@@ -2,25 +2,57 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "@memberjunction/ng-ui-components";
|
|
4
4
|
export class DeleteItemComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
OnClose = new EventEmitter();
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use {@link OnClose}.
|
|
8
|
+
*
|
|
9
|
+
* The same emitter under the old binding name, so a template still binding
|
|
10
|
+
* (onClose) keeps working. Must stay AFTER OnClose: class fields
|
|
11
|
+
* initialise in order, and the other way round this captures undefined.
|
|
12
|
+
*/
|
|
13
|
+
onClose = this.OnClose;
|
|
14
|
+
RemoveDashboardItem = new EventEmitter();
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use {@link RemoveDashboardItem}.
|
|
17
|
+
*
|
|
18
|
+
* The same emitter under the old binding name, so a template still binding
|
|
19
|
+
* (removeDashboardItem) keeps working. Must stay AFTER RemoveDashboardItem: class fields
|
|
20
|
+
* initialise in order, and the other way round this captures undefined.
|
|
21
|
+
*/
|
|
22
|
+
removeDashboardItem = this.RemoveDashboardItem;
|
|
23
|
+
DashboardItem;
|
|
24
|
+
/** @deprecated Use {@link DashboardItem}. */
|
|
25
|
+
set dashboardItem(value) {
|
|
26
|
+
this.DashboardItem = value;
|
|
27
|
+
}
|
|
28
|
+
/** @deprecated Use {@link DashboardItem}. */
|
|
29
|
+
get dashboardItem() {
|
|
30
|
+
return this.DashboardItem;
|
|
31
|
+
}
|
|
8
32
|
ngOnInit() {
|
|
9
33
|
}
|
|
10
|
-
|
|
11
|
-
if (this.
|
|
12
|
-
this.
|
|
34
|
+
ConfirmDeleteItem() {
|
|
35
|
+
if (this.DashboardItem) {
|
|
36
|
+
this.RemoveDashboardItem.emit(this.DashboardItem);
|
|
13
37
|
}
|
|
14
38
|
else {
|
|
15
39
|
console.log("item is null");
|
|
16
40
|
}
|
|
17
|
-
this.
|
|
41
|
+
this.OnClose.emit();
|
|
42
|
+
}
|
|
43
|
+
/** @deprecated Use {@link ConfirmDeleteItem}. */
|
|
44
|
+
confirmDeleteItem() {
|
|
45
|
+
return this.ConfirmDeleteItem();
|
|
18
46
|
}
|
|
47
|
+
CloseDialog() {
|
|
48
|
+
this.OnClose.emit();
|
|
49
|
+
}
|
|
50
|
+
/** @deprecated Use {@link CloseDialog}. */
|
|
19
51
|
closeDialog() {
|
|
20
|
-
this.
|
|
52
|
+
return this.CloseDialog();
|
|
21
53
|
}
|
|
22
54
|
static ɵfac = function DeleteItemComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DeleteItemComponent)(); };
|
|
23
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DeleteItemComponent, selectors: [["app-delete-item-dialog"]], inputs: { dashboardItem: "dashboardItem" }, outputs: { onClose: "onClose", removeDashboardItem: "removeDashboardItem" }, standalone: false, decls: 13, vars: 2, consts: [[3, "Close", "Visible"], [1, "k-m-7.5", "k-text-center"], ["mjButton", "", "variant", "primary", 3, "click"], [1, "fa-solid", "fa-check"], ["mjButton", "", 3, "click"], [1, "fa-solid", "fa-xmark"]], template: function DeleteItemComponent_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DeleteItemComponent, selectors: [["app-delete-item-dialog"]], inputs: { DashboardItem: "DashboardItem", dashboardItem: "dashboardItem" }, outputs: { OnClose: "OnClose", onClose: "onClose", RemoveDashboardItem: "RemoveDashboardItem", removeDashboardItem: "removeDashboardItem" }, standalone: false, decls: 13, vars: 2, consts: [[3, "Close", "Visible"], [1, "k-m-7.5", "k-text-center"], ["mjButton", "", "variant", "primary", 3, "click"], [1, "fa-solid", "fa-check"], ["mjButton", "", 3, "click"], [1, "fa-solid", "fa-xmark"]], template: function DeleteItemComponent_Template(rf, ctx) { if (rf & 1) {
|
|
24
56
|
i0.ɵɵelementStart(0, "mj-dialog", 0);
|
|
25
57
|
i0.ɵɵlistener("Close", function DeleteItemComponent_Template_mj_dialog_Close_0_listener() { return ctx.closeDialog(); });
|
|
26
58
|
i0.ɵɵelementStart(1, "p", 1);
|
|
@@ -49,10 +81,16 @@ export class DeleteItemComponent {
|
|
|
49
81
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DeleteItemComponent, [{
|
|
50
82
|
type: Component,
|
|
51
83
|
args: [{ standalone: false, selector: 'app-delete-item-dialog', template: "<mj-dialog [Visible]=\"true\" (Close)=\"closeDialog()\">\n <p class=\"k-m-7.5 k-text-center\">\n Are you sure you want to delete <b>{{dashboardItem?.title}}</b>?\n </p>\n <mj-dialog-actions>\n <button mjButton variant=\"primary\" (click)=\"confirmDeleteItem()\">\n <span class=\"fa-solid fa-check\"></span> Yes\n </button>\n <button mjButton (click)=\"closeDialog()\">\n <span class=\"fa-solid fa-xmark\"></span> No\n </button>\n </mj-dialog-actions>\n</mj-dialog>\n", styles: [".popup-actions {\n width: 100%;\n padding: 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n }\n ::ng-deep .modal-body-wrap .k-window-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n padding: 0;\n }\n .resource-wrap {\n flex: 1;\n padding: 24px;\n margin: 16px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n .user-view-wrap {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n ::ng-deep .resource-wrap .k-label {\n color: var(--mj-text-secondary);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n }\n ::ng-deep .resource-wrap .k-dropdownlist {\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: transparent;\n line-height: 32px;\n margin: 0;\n }\n"] }]
|
|
52
|
-
}], null, {
|
|
84
|
+
}], null, { OnClose: [{
|
|
85
|
+
type: Output
|
|
86
|
+
}], onClose: [{
|
|
87
|
+
type: Output
|
|
88
|
+
}], RemoveDashboardItem: [{
|
|
53
89
|
type: Output
|
|
54
90
|
}], removeDashboardItem: [{
|
|
55
91
|
type: Output
|
|
92
|
+
}], DashboardItem: [{
|
|
93
|
+
type: Input
|
|
56
94
|
}], dashboardItem: [{
|
|
57
95
|
type: Input
|
|
58
96
|
}] }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-item.component.js","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/delete-item/delete-item.component.ts","../../../../../src/lib/single-dashboard/Components/delete-item/delete-item.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;;;AAS/E,MAAM,OAAO,mBAAmB;IACpB,OAAO,GAAG,IAAI,YAAY,EAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"delete-item.component.js","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/delete-item/delete-item.component.ts","../../../../../src/lib/single-dashboard/Components/delete-item/delete-item.component.html"],"names":[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AAA,iBAAI;YAEA,AADJ,yCAAmB,gBACkD;YAA9B,gGAAS,uBAAmB,IAAC;YAC5D,0BAAuC;YAAC,qBAC5C;YAAA,iBAAS;YACT,kCAAyC;YAAxB,iGAAS,iBAAa,IAAC;YACpC,2BAAuC;YAAC,qBAC5C;YAER,AADI,AADI,iBAAS,EACO,EACZ;;YAZD,8BAAgB;YAEgB,eAAwB;YAAxB,gFAAwB;;;iFDOtD,mBAAmB;cAN/B,SAAS;6BACI,KAAK,YACP,wBAAwB;;kBAKjC,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBACN,KAAK;;kBAGL,KAAK;;kFAxBK,mBAAmB","sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { DashboardItem } from '../../single-dashboard.component';\n\n@Component({\n standalone: false,\n selector: 'app-delete-item-dialog',\n templateUrl: './delete-item.component.html',\n styleUrls: ['./delete-item.component.css']\n})\nexport class DeleteItemComponent implements OnInit {\n @Output() OnClose = new EventEmitter<any>();\n\n /**\n * @deprecated Use {@link OnClose}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (onClose) keeps working. Must stay AFTER OnClose: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() onClose = this.OnClose;\n @Output() RemoveDashboardItem = new EventEmitter<any>();\n\n /**\n * @deprecated Use {@link RemoveDashboardItem}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (removeDashboardItem) keeps working. Must stay AFTER RemoveDashboardItem: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() removeDashboardItem = this.RemoveDashboardItem;\n @Input() DashboardItem! : DashboardItem | null;\n\n /** @deprecated Use {@link DashboardItem}. */\n @Input() set dashboardItem(value: DashboardItem | null) {\n this.DashboardItem = value;\n }\n /** @deprecated Use {@link DashboardItem}. */\n get dashboardItem(): DashboardItem | null {\n return this.DashboardItem;\n }\n\n ngOnInit(): void {\n\n }\n\n public ConfirmDeleteItem(): void {\n if(this.DashboardItem){\n this.RemoveDashboardItem.emit(this.DashboardItem);\n }\n else{\n console.log(\"item is null\");\n }\n\n this.OnClose.emit();\n }\n\n /** @deprecated Use {@link ConfirmDeleteItem}. */\n public confirmDeleteItem(): void {\n return this.ConfirmDeleteItem();\n }\n\n public CloseDialog(): void {\n this.OnClose.emit();\n }\n\n /** @deprecated Use {@link CloseDialog}. */\n public closeDialog(): void {\n return this.CloseDialog();\n }\n}\n","<mj-dialog [Visible]=\"true\" (Close)=\"closeDialog()\">\n <p class=\"k-m-7.5 k-text-center\">\n Are you sure you want to delete <b>{{dashboardItem?.title}}</b>?\n </p>\n <mj-dialog-actions>\n <button mjButton variant=\"primary\" (click)=\"confirmDeleteItem()\">\n <span class=\"fa-solid fa-check\"></span> Yes\n </button>\n <button mjButton (click)=\"closeDialog()\">\n <span class=\"fa-solid fa-xmark\"></span> No\n </button>\n </mj-dialog-actions>\n</mj-dialog>\n"]}
|