@memberjunction/ng-shared-generic 0.0.1 → 2.122.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/lib/loading/loading.component.d.ts +57 -0
- package/dist/lib/loading/loading.component.d.ts.map +1 -0
- package/dist/lib/loading/loading.component.js +96 -0
- package/dist/lib/loading/loading.component.js.map +1 -0
- package/dist/lib/module.d.ts +9 -0
- package/dist/lib/module.d.ts.map +1 -0
- package/dist/lib/module.js +25 -0
- package/dist/lib/module.js.map +1 -0
- package/dist/lib/recent-access.service.d.ts +71 -0
- package/dist/lib/recent-access.service.d.ts.map +1 -0
- package/dist/lib/recent-access.service.js +199 -0
- package/dist/lib/recent-access.service.js.map +1 -0
- package/dist/public-api.d.ts +4 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +10 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +35 -6
- package/README.md +0 -45
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* MJ Loading Component - Displays an animated MJ logo with optional text.
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - SVG logo with pulse animation
|
|
7
|
+
* - Sizes to fit container (use CSS on host element)
|
|
8
|
+
* - Optional loading text
|
|
9
|
+
* - Customizable animation
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <!-- Basic usage (fills container) -->
|
|
14
|
+
* <mj-loading></mj-loading>
|
|
15
|
+
*
|
|
16
|
+
* <!-- With custom text -->
|
|
17
|
+
* <mj-loading text="Loading data..."></mj-loading>
|
|
18
|
+
*
|
|
19
|
+
* <!-- No text -->
|
|
20
|
+
* <mj-loading [showText]="false"></mj-loading>
|
|
21
|
+
*
|
|
22
|
+
* <!-- Fixed size container -->
|
|
23
|
+
* <div style="width: 200px; height: 150px;">
|
|
24
|
+
* <mj-loading text="Please wait..."></mj-loading>
|
|
25
|
+
* </div>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class LoadingComponent {
|
|
29
|
+
/**
|
|
30
|
+
* Text to display below the loading animation.
|
|
31
|
+
* Set to empty string or use showText=false to hide text.
|
|
32
|
+
*/
|
|
33
|
+
text: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether to show the text below the logo.
|
|
36
|
+
* When false, only the animated logo is shown.
|
|
37
|
+
*/
|
|
38
|
+
showText: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Animation duration in seconds.
|
|
41
|
+
* Default is 1.5 seconds for the pulse animation.
|
|
42
|
+
*/
|
|
43
|
+
animationDuration: number;
|
|
44
|
+
/**
|
|
45
|
+
* Size preset for quick sizing.
|
|
46
|
+
* - 'small': 40x22px logo
|
|
47
|
+
* - 'medium': 80x45px logo (default)
|
|
48
|
+
* - 'large': 120x67px logo
|
|
49
|
+
* - 'auto': fills container
|
|
50
|
+
*/
|
|
51
|
+
size: 'small' | 'medium' | 'large' | 'auto';
|
|
52
|
+
get logoClass(): string;
|
|
53
|
+
get animationStyle(): string;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingComponent, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingComponent, "mj-loading", never, { "text": { "alias": "text"; "required": false; }; "showText": { "alias": "showText"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, false, never>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=loading.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading.component.d.ts","sourceRoot":"","sources":["../../../src/lib/loading/loading.component.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAKa,gBAAgB;IAC3B;;;OAGG;IACM,IAAI,SAAgB;IAE7B;;;OAGG;IACM,QAAQ,UAAQ;IAEzB;;;OAGG;IACM,iBAAiB,SAAO;IAEjC;;;;;;OAMG;IACM,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAU;IAE9D,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,cAAc,IAAI,MAAM,CAE3B;yCAlCU,gBAAgB;2CAAhB,gBAAgB;CAmC5B"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
function LoadingComponent_p_2_Template(rf, ctx) { if (rf & 1) {
|
|
5
|
+
i0.ɵɵelementStart(0, "p", 2);
|
|
6
|
+
i0.ɵɵtext(1);
|
|
7
|
+
i0.ɵɵelementEnd();
|
|
8
|
+
} if (rf & 2) {
|
|
9
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
10
|
+
i0.ɵɵadvance();
|
|
11
|
+
i0.ɵɵtextInterpolate(ctx_r0.text);
|
|
12
|
+
} }
|
|
13
|
+
/**
|
|
14
|
+
* MJ Loading Component - Displays an animated MJ logo with optional text.
|
|
15
|
+
*
|
|
16
|
+
* Features:
|
|
17
|
+
* - SVG logo with pulse animation
|
|
18
|
+
* - Sizes to fit container (use CSS on host element)
|
|
19
|
+
* - Optional loading text
|
|
20
|
+
* - Customizable animation
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```html
|
|
24
|
+
* <!-- Basic usage (fills container) -->
|
|
25
|
+
* <mj-loading></mj-loading>
|
|
26
|
+
*
|
|
27
|
+
* <!-- With custom text -->
|
|
28
|
+
* <mj-loading text="Loading data..."></mj-loading>
|
|
29
|
+
*
|
|
30
|
+
* <!-- No text -->
|
|
31
|
+
* <mj-loading [showText]="false"></mj-loading>
|
|
32
|
+
*
|
|
33
|
+
* <!-- Fixed size container -->
|
|
34
|
+
* <div style="width: 200px; height: 150px;">
|
|
35
|
+
* <mj-loading text="Please wait..."></mj-loading>
|
|
36
|
+
* </div>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export class LoadingComponent {
|
|
40
|
+
/**
|
|
41
|
+
* Text to display below the loading animation.
|
|
42
|
+
* Set to empty string or use showText=false to hide text.
|
|
43
|
+
*/
|
|
44
|
+
text = 'Loading...';
|
|
45
|
+
/**
|
|
46
|
+
* Whether to show the text below the logo.
|
|
47
|
+
* When false, only the animated logo is shown.
|
|
48
|
+
*/
|
|
49
|
+
showText = true;
|
|
50
|
+
/**
|
|
51
|
+
* Animation duration in seconds.
|
|
52
|
+
* Default is 1.5 seconds for the pulse animation.
|
|
53
|
+
*/
|
|
54
|
+
animationDuration = 1.5;
|
|
55
|
+
/**
|
|
56
|
+
* Size preset for quick sizing.
|
|
57
|
+
* - 'small': 40x22px logo
|
|
58
|
+
* - 'medium': 80x45px logo (default)
|
|
59
|
+
* - 'large': 120x67px logo
|
|
60
|
+
* - 'auto': fills container
|
|
61
|
+
*/
|
|
62
|
+
size = 'auto';
|
|
63
|
+
get logoClass() {
|
|
64
|
+
return `mj-loading-logo size-${this.size}`;
|
|
65
|
+
}
|
|
66
|
+
get animationStyle() {
|
|
67
|
+
return `animation-duration: ${this.animationDuration}s`;
|
|
68
|
+
}
|
|
69
|
+
static ɵfac = function LoadingComponent_Factory(t) { return new (t || LoadingComponent)(); };
|
|
70
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LoadingComponent, selectors: [["mj-loading"]], inputs: { text: "text", showText: "showText", animationDuration: "animationDuration", size: "size" }, decls: 3, vars: 5, consts: [[1, "mj-loading-container"], ["class", "mj-loading-text", 4, "ngIf"], [1, "mj-loading-text"]], template: function LoadingComponent_Template(rf, ctx) { if (rf & 1) {
|
|
71
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
72
|
+
i0.ɵɵelement(1, "div");
|
|
73
|
+
i0.ɵɵtemplate(2, LoadingComponent_p_2_Template, 2, 1, "p", 1);
|
|
74
|
+
i0.ɵɵelementEnd();
|
|
75
|
+
} if (rf & 2) {
|
|
76
|
+
i0.ɵɵadvance();
|
|
77
|
+
i0.ɵɵstyleMap(ctx.animationStyle);
|
|
78
|
+
i0.ɵɵclassMap(ctx.logoClass);
|
|
79
|
+
i0.ɵɵadvance();
|
|
80
|
+
i0.ɵɵproperty("ngIf", ctx.showText && ctx.text);
|
|
81
|
+
} }, dependencies: [i1.NgIf], styles: ["[_nghost-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n}\n\n.mj-loading-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 16px;\n width: 100%;\n height: 100%;\n}\n\n\n\n.mj-loading-logo[_ngcontent-%COMP%] {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='230' height='128' viewBox='0 0 230 128'%3E%3Cpath d='M0 0 C1.197 0.668 2.394 1.336 3.592 2.004 C12.234 6.837 20.792 11.805 29.327 16.824 C37.26 21.476 45.269 25.98 53.312 30.438 C53.91 30.769 54.507 31.1 55.122 31.441 C61.234 34.87 61.234 34.87 67.438 38.125 C69.709 37.16 69.709 37.16 72.258 35.652 C73.255 35.09 74.253 34.527 75.281 33.948 C76.364 33.325 77.447 32.703 78.562 32.062 C79.685 31.426 80.808 30.789 81.965 30.133 C90.435 25.322 98.84 20.401 107.239 15.469 C118.242 9.027 129.394 2.857 140.566 -3.286 C142.41 -4.306 144.248 -5.338 146.079 -6.382 C146.869 -6.832 147.659 -7.282 148.473 -7.746 C149.148 -8.136 149.824 -8.526 150.52 -8.927 C156.448 -11.856 163.036 -11.676 169.188 -9.625 C175.638 -6.152 178.915 -2.712 181.438 4.125 C181.951 7.259 181.946 10.308 181.892 13.479 C181.892 14.377 181.893 15.276 181.893 16.201 C181.891 19.145 181.86 22.088 181.828 25.031 C181.821 27.082 181.815 29.134 181.811 31.185 C181.796 36.564 181.757 41.943 181.712 47.322 C181.671 52.819 181.653 58.316 181.633 63.812 C181.59 74.584 181.522 85.354 181.438 96.125 C178.573 94.739 175.729 93.326 172.901 91.867 C170.644 90.732 168.349 89.671 166.018 88.7 C162.628 87.127 160.12 85.736 157.438 83.125 C155.741 78.082 155.893 73.244 156.047 68.004 C156.047 66.534 156.041 65.064 156.031 63.595 C156.018 59.745 156.076 55.899 156.15 52.049 C156.213 48.114 156.207 44.18 156.207 40.244 C156.217 32.536 156.303 24.832 156.438 17.125 C152.485 19.335 148.534 21.546 144.582 23.758 C143.476 24.376 142.37 24.995 141.231 25.632 C131.895 30.857 122.601 36.151 113.321 41.472 C107.737 44.673 102.15 47.868 96.562 51.062 C95.965 51.404 95.367 51.746 94.751 52.098 C86.826 56.629 78.889 61.14 70.938 65.625 C62.527 70.37 54.133 75.144 45.75 79.938 C45.166 80.271 44.581 80.605 43.979 80.95 C37.987 84.375 31.996 87.803 26.011 91.241 C14.366 97.93 2.707 104.594 -9.062 111.062 C-9.97 111.565 -10.878 112.067 -11.814 112.585 C-12.649 113.04 -13.484 113.496 -14.344 113.965 C-15.066 114.36 -15.789 114.756 -16.533 115.164 C-22.269 117.881 -28.602 117.949 -34.625 116.125 C-39.398 114.15 -42.881 110.491 -45.562 106.125 C-45.562 104.805 -45.562 103.485 -45.562 102.125 C-45.022 101.835 -44.481 101.545 -43.924 101.246 C-32.122 94.897 -20.456 88.363 -8.907 81.566 C-0.017 76.35 8.975 71.333 18.003 66.362 C24.427 62.82 30.777 59.186 37.065 55.408 C39.438 54.125 39.438 54.125 41.438 54.125 C41.438 53.465 41.438 52.805 41.438 52.125 C40.704 51.843 39.971 51.561 39.216 51.271 C36.702 50.234 34.368 49.093 31.98 47.797 C30.7 47.102 30.7 47.102 29.395 46.394 C28.481 45.892 27.567 45.391 26.625 44.875 C25.666 44.351 24.707 43.826 23.719 43.286 C14.477 38.202 5.37 32.897 -3.719 27.547 C-8.103 24.968 -12.509 22.431 -16.928 19.911 C-17.89 19.362 -17.89 19.362 -18.871 18.802 C-20.435 17.909 -21.999 17.017 -23.562 16.125 C-23.525 16.942 -23.487 17.759 -23.448 18.601 C-23.106 26.338 -22.848 34.071 -22.682 41.814 C-22.593 45.794 -22.474 49.768 -22.28 53.745 C-21.06 79.461 -21.06 79.461 -25.205 85.53 C-29.148 89.11 -33.517 90.996 -38.581 92.49 C-41.159 93.316 -43.282 94.688 -45.562 96.125 C-46.222 96.125 -46.882 96.125 -47.562 96.125 C-47.655 84.546 -47.726 72.967 -47.77 61.388 C-47.791 56.01 -47.819 50.633 -47.864 45.256 C-47.908 40.062 -47.932 34.869 -47.942 29.675 C-47.949 27.698 -47.964 25.721 -47.985 23.744 C-48.015 20.965 -48.018 18.187 -48.017 15.408 C-48.031 14.599 -48.045 13.79 -48.06 12.956 C-48.013 6.348 -46.391 0.196 -41.823 -4.764 C-27.895 -17.466 -13.817 -7.747 0 0 Z' fill='%23264FAF' transform='translate(47.5625,10.875)'/%3E%3Cpath d='M0 0 C2.051 0.961 2.051 0.961 4.098 2.16 C5.278 2.843 5.278 2.843 6.481 3.541 C7.333 4.043 8.185 4.545 9.062 5.062 C10.954 6.16 12.846 7.258 14.738 8.355 C16.255 9.24 16.255 9.24 17.803 10.142 C22.848 13.074 27.913 15.969 32.979 18.863 C34.753 19.877 36.525 20.892 38.297 21.907 C44.243 25.311 50.205 28.681 56.203 31.992 C57.347 32.625 58.491 33.258 59.669 33.911 C61.837 35.108 64.008 36.299 66.183 37.484 C67.154 38.02 68.125 38.557 69.125 39.109 C69.973 39.573 70.821 40.037 71.695 40.515 C74.149 42.096 76.015 43.87 78 46 C74.984 51.808 72.395 55.457 66.25 58.25 C54.159 61.04 44.857 55.778 34.625 49.75 C32.781 48.681 30.938 47.612 29.094 46.543 C28.114 45.972 27.134 45.402 26.125 44.814 C21.068 41.878 15.989 38.98 10.91 36.082 C9.13 35.065 7.35 34.048 5.57 33.03 C-5.598 26.648 -16.794 20.315 -28 14 C-28 13.34 -28 12.68 -28 12 C-24.284 9.789 -20.551 7.61 -16.812 5.438 C-15.757 4.809 -14.702 4.181 -13.615 3.533 C-12.083 2.649 -12.083 2.649 -10.52 1.746 C-9.582 1.196 -8.645 0.646 -7.679 0.08 C-4.518 -1.194 -3.196 -1.069 0 0 Z' fill='%23264FAF' transform='translate(150,69)'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n animation: _ngcontent-%COMP%_mj-loading-pulse 1.5s ease-in-out infinite;\n flex-shrink: 0;\n}\n\n\n\n.mj-loading-logo.size-small[_ngcontent-%COMP%] {\n width: 40px;\n height: 22px;\n}\n\n.mj-loading-logo.size-medium[_ngcontent-%COMP%] {\n width: 80px;\n height: 45px;\n}\n\n.mj-loading-logo.size-large[_ngcontent-%COMP%] {\n width: 120px;\n height: 67px;\n}\n\n.mj-loading-logo.size-auto[_ngcontent-%COMP%] {\n \n\n width: 100%;\n height: 100%;\n max-width: 200px;\n max-height: 112px;\n min-width: 40px;\n min-height: 22px;\n}\n\n\n\n.mj-loading-text[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n font-weight: 500;\n color: #757575;\n text-align: center;\n}\n\n\n\n@keyframes _ngcontent-%COMP%_mj-loading-pulse {\n 0%, 100% {\n opacity: 0.4;\n transform: scale(0.95);\n }\n 50% {\n opacity: 1;\n transform: scale(1);\n }\n}"] });
|
|
82
|
+
}
|
|
83
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingComponent, [{
|
|
84
|
+
type: Component,
|
|
85
|
+
args: [{ selector: 'mj-loading', template: "<div class=\"mj-loading-container\">\n <div [class]=\"logoClass\" [style]=\"animationStyle\"></div>\n <p class=\"mj-loading-text\" *ngIf=\"showText && text\">{{ text }}</p>\n</div>\n", styles: [":host {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n}\n\n.mj-loading-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 16px;\n width: 100%;\n height: 100%;\n}\n\n/* MJ Logo - inline SVG as data URI */\n.mj-loading-logo {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='230' height='128' viewBox='0 0 230 128'%3E%3Cpath d='M0 0 C1.197 0.668 2.394 1.336 3.592 2.004 C12.234 6.837 20.792 11.805 29.327 16.824 C37.26 21.476 45.269 25.98 53.312 30.438 C53.91 30.769 54.507 31.1 55.122 31.441 C61.234 34.87 61.234 34.87 67.438 38.125 C69.709 37.16 69.709 37.16 72.258 35.652 C73.255 35.09 74.253 34.527 75.281 33.948 C76.364 33.325 77.447 32.703 78.562 32.062 C79.685 31.426 80.808 30.789 81.965 30.133 C90.435 25.322 98.84 20.401 107.239 15.469 C118.242 9.027 129.394 2.857 140.566 -3.286 C142.41 -4.306 144.248 -5.338 146.079 -6.382 C146.869 -6.832 147.659 -7.282 148.473 -7.746 C149.148 -8.136 149.824 -8.526 150.52 -8.927 C156.448 -11.856 163.036 -11.676 169.188 -9.625 C175.638 -6.152 178.915 -2.712 181.438 4.125 C181.951 7.259 181.946 10.308 181.892 13.479 C181.892 14.377 181.893 15.276 181.893 16.201 C181.891 19.145 181.86 22.088 181.828 25.031 C181.821 27.082 181.815 29.134 181.811 31.185 C181.796 36.564 181.757 41.943 181.712 47.322 C181.671 52.819 181.653 58.316 181.633 63.812 C181.59 74.584 181.522 85.354 181.438 96.125 C178.573 94.739 175.729 93.326 172.901 91.867 C170.644 90.732 168.349 89.671 166.018 88.7 C162.628 87.127 160.12 85.736 157.438 83.125 C155.741 78.082 155.893 73.244 156.047 68.004 C156.047 66.534 156.041 65.064 156.031 63.595 C156.018 59.745 156.076 55.899 156.15 52.049 C156.213 48.114 156.207 44.18 156.207 40.244 C156.217 32.536 156.303 24.832 156.438 17.125 C152.485 19.335 148.534 21.546 144.582 23.758 C143.476 24.376 142.37 24.995 141.231 25.632 C131.895 30.857 122.601 36.151 113.321 41.472 C107.737 44.673 102.15 47.868 96.562 51.062 C95.965 51.404 95.367 51.746 94.751 52.098 C86.826 56.629 78.889 61.14 70.938 65.625 C62.527 70.37 54.133 75.144 45.75 79.938 C45.166 80.271 44.581 80.605 43.979 80.95 C37.987 84.375 31.996 87.803 26.011 91.241 C14.366 97.93 2.707 104.594 -9.062 111.062 C-9.97 111.565 -10.878 112.067 -11.814 112.585 C-12.649 113.04 -13.484 113.496 -14.344 113.965 C-15.066 114.36 -15.789 114.756 -16.533 115.164 C-22.269 117.881 -28.602 117.949 -34.625 116.125 C-39.398 114.15 -42.881 110.491 -45.562 106.125 C-45.562 104.805 -45.562 103.485 -45.562 102.125 C-45.022 101.835 -44.481 101.545 -43.924 101.246 C-32.122 94.897 -20.456 88.363 -8.907 81.566 C-0.017 76.35 8.975 71.333 18.003 66.362 C24.427 62.82 30.777 59.186 37.065 55.408 C39.438 54.125 39.438 54.125 41.438 54.125 C41.438 53.465 41.438 52.805 41.438 52.125 C40.704 51.843 39.971 51.561 39.216 51.271 C36.702 50.234 34.368 49.093 31.98 47.797 C30.7 47.102 30.7 47.102 29.395 46.394 C28.481 45.892 27.567 45.391 26.625 44.875 C25.666 44.351 24.707 43.826 23.719 43.286 C14.477 38.202 5.37 32.897 -3.719 27.547 C-8.103 24.968 -12.509 22.431 -16.928 19.911 C-17.89 19.362 -17.89 19.362 -18.871 18.802 C-20.435 17.909 -21.999 17.017 -23.562 16.125 C-23.525 16.942 -23.487 17.759 -23.448 18.601 C-23.106 26.338 -22.848 34.071 -22.682 41.814 C-22.593 45.794 -22.474 49.768 -22.28 53.745 C-21.06 79.461 -21.06 79.461 -25.205 85.53 C-29.148 89.11 -33.517 90.996 -38.581 92.49 C-41.159 93.316 -43.282 94.688 -45.562 96.125 C-46.222 96.125 -46.882 96.125 -47.562 96.125 C-47.655 84.546 -47.726 72.967 -47.77 61.388 C-47.791 56.01 -47.819 50.633 -47.864 45.256 C-47.908 40.062 -47.932 34.869 -47.942 29.675 C-47.949 27.698 -47.964 25.721 -47.985 23.744 C-48.015 20.965 -48.018 18.187 -48.017 15.408 C-48.031 14.599 -48.045 13.79 -48.06 12.956 C-48.013 6.348 -46.391 0.196 -41.823 -4.764 C-27.895 -17.466 -13.817 -7.747 0 0 Z' fill='%23264FAF' transform='translate(47.5625,10.875)'/%3E%3Cpath d='M0 0 C2.051 0.961 2.051 0.961 4.098 2.16 C5.278 2.843 5.278 2.843 6.481 3.541 C7.333 4.043 8.185 4.545 9.062 5.062 C10.954 6.16 12.846 7.258 14.738 8.355 C16.255 9.24 16.255 9.24 17.803 10.142 C22.848 13.074 27.913 15.969 32.979 18.863 C34.753 19.877 36.525 20.892 38.297 21.907 C44.243 25.311 50.205 28.681 56.203 31.992 C57.347 32.625 58.491 33.258 59.669 33.911 C61.837 35.108 64.008 36.299 66.183 37.484 C67.154 38.02 68.125 38.557 69.125 39.109 C69.973 39.573 70.821 40.037 71.695 40.515 C74.149 42.096 76.015 43.87 78 46 C74.984 51.808 72.395 55.457 66.25 58.25 C54.159 61.04 44.857 55.778 34.625 49.75 C32.781 48.681 30.938 47.612 29.094 46.543 C28.114 45.972 27.134 45.402 26.125 44.814 C21.068 41.878 15.989 38.98 10.91 36.082 C9.13 35.065 7.35 34.048 5.57 33.03 C-5.598 26.648 -16.794 20.315 -28 14 C-28 13.34 -28 12.68 -28 12 C-24.284 9.789 -20.551 7.61 -16.812 5.438 C-15.757 4.809 -14.702 4.181 -13.615 3.533 C-12.083 2.649 -12.083 2.649 -10.52 1.746 C-9.582 1.196 -8.645 0.646 -7.679 0.08 C-4.518 -1.194 -3.196 -1.069 0 0 Z' fill='%23264FAF' transform='translate(150,69)'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n animation: mj-loading-pulse 1.5s ease-in-out infinite;\n flex-shrink: 0;\n}\n\n/* Size presets */\n.mj-loading-logo.size-small {\n width: 40px;\n height: 22px;\n}\n\n.mj-loading-logo.size-medium {\n width: 80px;\n height: 45px;\n}\n\n.mj-loading-logo.size-large {\n width: 120px;\n height: 67px;\n}\n\n.mj-loading-logo.size-auto {\n /* Auto size - takes up available space while maintaining aspect ratio */\n width: 100%;\n height: 100%;\n max-width: 200px;\n max-height: 112px;\n min-width: 40px;\n min-height: 22px;\n}\n\n/* Loading text */\n.mj-loading-text {\n margin: 0;\n font-size: 14px;\n font-weight: 500;\n color: #757575;\n text-align: center;\n}\n\n/* Pulse animation */\n@keyframes mj-loading-pulse {\n 0%, 100% {\n opacity: 0.4;\n transform: scale(0.95);\n }\n 50% {\n opacity: 1;\n transform: scale(1);\n }\n}\n"] }]
|
|
86
|
+
}], null, { text: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}], showText: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}], animationDuration: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], size: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}] }); })();
|
|
95
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LoadingComponent, { className: "LoadingComponent", filePath: "src/lib/loading/loading.component.ts", lineNumber: 34 }); })();
|
|
96
|
+
//# sourceMappingURL=loading.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading.component.js","sourceRoot":"","sources":["../../../src/lib/loading/loading.component.ts","../../../src/lib/loading/loading.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;;;ICE/C,4BAAoD;IAAA,YAAU;IAAA,iBAAI;;;IAAd,cAAU;IAAV,iCAAU;;ADAhE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAMH,MAAM,OAAO,gBAAgB;IAC3B;;;OAGG;IACM,IAAI,GAAG,YAAY,CAAC;IAE7B;;;OAGG;IACM,QAAQ,GAAG,IAAI,CAAC;IAEzB;;;OAGG;IACM,iBAAiB,GAAG,GAAG,CAAC;IAEjC;;;;;;OAMG;IACM,IAAI,GAA0C,MAAM,CAAC;IAE9D,IAAI,SAAS;QACX,OAAO,wBAAwB,IAAI,CAAC,IAAI,EAAE,CAAC;IAC7C,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,uBAAuB,IAAI,CAAC,iBAAiB,GAAG,CAAC;IAC1D,CAAC;0EAlCU,gBAAgB;6DAAhB,gBAAgB;YCjC7B,8BAAkC;YAChC,sBAAwD;YACxD,6DAAoD;YACtD,iBAAM;;YAFqB,cAAwB;YAAxB,iCAAwB;YAA5C,4BAAmB;YACI,cAAsB;YAAtB,+CAAsB;;;iFD+BvC,gBAAgB;cAL5B,SAAS;2BACE,YAAY;gBASb,IAAI;kBAAZ,KAAK;YAMG,QAAQ;kBAAhB,KAAK;YAMG,iBAAiB;kBAAzB,KAAK;YASG,IAAI;kBAAZ,KAAK;;kFA1BK,gBAAgB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./loading/loading.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class SharedGenericModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SharedGenericModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedGenericModule, [typeof i1.LoadingComponent], [typeof i2.CommonModule], [typeof i1.LoadingComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SharedGenericModule>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":";;;AAKA,qBAWa,mBAAmB;yCAAnB,mBAAmB;0CAAnB,mBAAmB;0CAAnB,mBAAmB;CAAI"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { LoadingComponent } from './loading/loading.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class SharedGenericModule {
|
|
6
|
+
static ɵfac = function SharedGenericModule_Factory(t) { return new (t || SharedGenericModule)(); };
|
|
7
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: SharedGenericModule });
|
|
8
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule] });
|
|
9
|
+
}
|
|
10
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SharedGenericModule, [{
|
|
11
|
+
type: NgModule,
|
|
12
|
+
args: [{
|
|
13
|
+
declarations: [
|
|
14
|
+
LoadingComponent
|
|
15
|
+
],
|
|
16
|
+
imports: [
|
|
17
|
+
CommonModule
|
|
18
|
+
],
|
|
19
|
+
exports: [
|
|
20
|
+
LoadingComponent
|
|
21
|
+
]
|
|
22
|
+
}]
|
|
23
|
+
}], null, null); })();
|
|
24
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SharedGenericModule, { declarations: [LoadingComponent], imports: [CommonModule], exports: [LoadingComponent] }); })();
|
|
25
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;;AAa/D,MAAM,OAAO,mBAAmB;6EAAnB,mBAAmB;4DAAnB,mBAAmB;gEAN5B,YAAY;;iFAMH,mBAAmB;cAX/B,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,gBAAgB;iBACjB;gBACD,OAAO,EAAE;oBACP,YAAY;iBACb;gBACD,OAAO,EAAE;oBACP,gBAAgB;iBACjB;aACF;;wFACY,mBAAmB,mBAT5B,gBAAgB,aAGhB,YAAY,aAGZ,gBAAgB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { CompositeKey } from '@memberjunction/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Represents a recently accessed resource
|
|
6
|
+
*/
|
|
7
|
+
export interface RecentAccessItem {
|
|
8
|
+
id: string;
|
|
9
|
+
entityId: string;
|
|
10
|
+
entityName: string;
|
|
11
|
+
recordId: string;
|
|
12
|
+
recordName?: string;
|
|
13
|
+
latestAt: Date;
|
|
14
|
+
totalCount: number;
|
|
15
|
+
/** Resource type for special handling (record, view, dashboard, artifact) */
|
|
16
|
+
resourceType: 'record' | 'view' | 'dashboard' | 'artifact' | 'report';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Service for tracking and retrieving recently accessed resources.
|
|
20
|
+
* Uses the User Record Logs entity to persist access history.
|
|
21
|
+
*/
|
|
22
|
+
export declare class RecentAccessService {
|
|
23
|
+
private static _instance;
|
|
24
|
+
private _recentItems$;
|
|
25
|
+
private _isLoading$;
|
|
26
|
+
private _isLoaded;
|
|
27
|
+
constructor();
|
|
28
|
+
static get Instance(): RecentAccessService;
|
|
29
|
+
/**
|
|
30
|
+
* Observable of recent access items, sorted by most recent first
|
|
31
|
+
*/
|
|
32
|
+
get RecentItems(): Observable<RecentAccessItem[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Current value of recent items
|
|
35
|
+
*/
|
|
36
|
+
get RecentItemsValue(): RecentAccessItem[];
|
|
37
|
+
/**
|
|
38
|
+
* Observable loading state
|
|
39
|
+
*/
|
|
40
|
+
get IsLoading(): Observable<boolean>;
|
|
41
|
+
/**
|
|
42
|
+
* Logs access to a record. Creates or updates the User Record Log entry.
|
|
43
|
+
* This is a fire-and-forget operation - errors are logged but don't interrupt the user.
|
|
44
|
+
*
|
|
45
|
+
* @param entityName - The name of the entity being accessed
|
|
46
|
+
* @param recordId - The record ID (single value or CompositeKey string)
|
|
47
|
+
* @param resourceType - The type of resource being accessed
|
|
48
|
+
*/
|
|
49
|
+
logAccess(entityName: string, recordId: string | CompositeKey, resourceType?: 'record' | 'view' | 'dashboard' | 'artifact' | 'report'): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Loads recent access items for the current user.
|
|
52
|
+
* @param maxItems - Maximum number of items to return (default 15)
|
|
53
|
+
* @param forceRefresh - Force refresh even if already loaded
|
|
54
|
+
*/
|
|
55
|
+
loadRecentItems(maxItems?: number, forceRefresh?: boolean): Promise<RecentAccessItem[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Refresh recent items in background
|
|
58
|
+
*/
|
|
59
|
+
refreshRecentItems(): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Determines the resource type based on entity name
|
|
62
|
+
*/
|
|
63
|
+
private determineResourceType;
|
|
64
|
+
/**
|
|
65
|
+
* Clears the cached recent items (useful for logout)
|
|
66
|
+
*/
|
|
67
|
+
clearCache(): void;
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RecentAccessService, never>;
|
|
69
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RecentAccessService>;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=recent-access.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recent-access.service.d.ts","sourceRoot":"","sources":["../../src/lib/recent-access.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,YAAY,EAAY,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAAmB,UAAU,EAAE,MAAM,MAAM,CAAC;;AAEnD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,IAAI,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,YAAY,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAC;CACvE;AAED;;;GAGG;AACH,qBAGa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAsB;IAC9C,OAAO,CAAC,aAAa,CAA+C;IACpE,OAAO,CAAC,WAAW,CAAuC;IAC1D,OAAO,CAAC,SAAS,CAAS;;IAS1B,WAAkB,QAAQ,IAAI,mBAAmB,CAEhD;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAEvD;IAED;;OAEG;IACH,IAAW,gBAAgB,IAAI,gBAAgB,EAAE,CAEhD;IAED;;OAEG;IACH,IAAW,SAAS,IAAI,UAAU,CAAC,OAAO,CAAC,CAE1C;IAED;;;;;;;OAOG;IACU,SAAS,CACpB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GAAG,YAAY,EAC/B,YAAY,GAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,QAAmB,GAC/E,OAAO,CAAC,IAAI,CAAC;IA8DhB;;;;OAIG;IACU,eAAe,CAAC,QAAQ,GAAE,MAAW,EAAE,YAAY,GAAE,OAAe,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAwD/G;;OAEG;IACU,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIhD;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAmB7B;;OAEG;IACI,UAAU,IAAI,IAAI;yCA7Md,mBAAmB;6CAAnB,mBAAmB;CAiN/B"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Metadata, RunView, CompositeKey, LogError } from '@memberjunction/core';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Service for tracking and retrieving recently accessed resources.
|
|
7
|
+
* Uses the User Record Logs entity to persist access history.
|
|
8
|
+
*/
|
|
9
|
+
export class RecentAccessService {
|
|
10
|
+
static _instance;
|
|
11
|
+
_recentItems$ = new BehaviorSubject([]);
|
|
12
|
+
_isLoading$ = new BehaviorSubject(false);
|
|
13
|
+
_isLoaded = false;
|
|
14
|
+
constructor() {
|
|
15
|
+
if (RecentAccessService._instance) {
|
|
16
|
+
return RecentAccessService._instance;
|
|
17
|
+
}
|
|
18
|
+
RecentAccessService._instance = this;
|
|
19
|
+
}
|
|
20
|
+
static get Instance() {
|
|
21
|
+
return RecentAccessService._instance;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Observable of recent access items, sorted by most recent first
|
|
25
|
+
*/
|
|
26
|
+
get RecentItems() {
|
|
27
|
+
return this._recentItems$.asObservable();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Current value of recent items
|
|
31
|
+
*/
|
|
32
|
+
get RecentItemsValue() {
|
|
33
|
+
return this._recentItems$.value;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Observable loading state
|
|
37
|
+
*/
|
|
38
|
+
get IsLoading() {
|
|
39
|
+
return this._isLoading$.asObservable();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Logs access to a record. Creates or updates the User Record Log entry.
|
|
43
|
+
* This is a fire-and-forget operation - errors are logged but don't interrupt the user.
|
|
44
|
+
*
|
|
45
|
+
* @param entityName - The name of the entity being accessed
|
|
46
|
+
* @param recordId - The record ID (single value or CompositeKey string)
|
|
47
|
+
* @param resourceType - The type of resource being accessed
|
|
48
|
+
*/
|
|
49
|
+
async logAccess(entityName, recordId, resourceType = 'record') {
|
|
50
|
+
try {
|
|
51
|
+
const md = new Metadata();
|
|
52
|
+
const entityInfo = md.Entities.find(e => e.Name === entityName);
|
|
53
|
+
if (!entityInfo) {
|
|
54
|
+
console.warn(`RecentAccessService: Entity "${entityName}" not found in metadata`);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
// Convert CompositeKey to string if needed
|
|
58
|
+
const recordIdString = recordId instanceof CompositeKey
|
|
59
|
+
? recordId.Values(',') // Values() returns joined string with specified delimiter
|
|
60
|
+
: recordId;
|
|
61
|
+
// Check if we already have a log entry for this user/entity/record combination
|
|
62
|
+
const rv = new RunView();
|
|
63
|
+
const existingResult = await rv.RunView({
|
|
64
|
+
EntityName: 'User Record Logs',
|
|
65
|
+
ExtraFilter: `UserID='${md.CurrentUser.ID}' AND EntityID='${entityInfo.ID}' AND RecordID='${recordIdString}'`,
|
|
66
|
+
ResultType: 'entity_object',
|
|
67
|
+
MaxRows: 1
|
|
68
|
+
});
|
|
69
|
+
if (!existingResult.Success) {
|
|
70
|
+
console.error('RecentAccessService: Failed to check existing log', existingResult.ErrorMessage);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (existingResult.Results && existingResult.Results.length > 0) {
|
|
74
|
+
// Update existing entry
|
|
75
|
+
const existing = existingResult.Results[0];
|
|
76
|
+
existing.LatestAt = new Date();
|
|
77
|
+
existing.TotalCount = (existing.TotalCount || 0) + 1;
|
|
78
|
+
const saveResult = await existing.Save();
|
|
79
|
+
if (!saveResult) {
|
|
80
|
+
console.error('RecentAccessService: Failed to update log entry');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
// Create new entry
|
|
85
|
+
const newLog = await md.GetEntityObject('User Record Logs');
|
|
86
|
+
newLog.UserID = md.CurrentUser.ID;
|
|
87
|
+
newLog.EntityID = entityInfo.ID;
|
|
88
|
+
newLog.RecordID = recordIdString;
|
|
89
|
+
// EarliestAt and LatestAt have default values of getdate() in the DB
|
|
90
|
+
// TotalCount defaults to 0, so we set it to 1
|
|
91
|
+
newLog.TotalCount = 1;
|
|
92
|
+
const saveResult = await newLog.Save();
|
|
93
|
+
if (!saveResult) {
|
|
94
|
+
console.error('RecentAccessService: Failed to create log entry');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// Refresh the recent items list in background
|
|
98
|
+
this.refreshRecentItems();
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
// Don't throw - this is non-critical functionality
|
|
102
|
+
console.error('RecentAccessService: Error logging access', error);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Loads recent access items for the current user.
|
|
107
|
+
* @param maxItems - Maximum number of items to return (default 15)
|
|
108
|
+
* @param forceRefresh - Force refresh even if already loaded
|
|
109
|
+
*/
|
|
110
|
+
async loadRecentItems(maxItems = 15, forceRefresh = false) {
|
|
111
|
+
if (this._isLoaded && !forceRefresh) {
|
|
112
|
+
return this._recentItems$.value;
|
|
113
|
+
}
|
|
114
|
+
try {
|
|
115
|
+
this._isLoading$.next(true);
|
|
116
|
+
const md = new Metadata();
|
|
117
|
+
const rv = new RunView();
|
|
118
|
+
const result = await rv.RunView({
|
|
119
|
+
EntityName: 'User Record Logs',
|
|
120
|
+
ExtraFilter: `UserID='${md.CurrentUser.ID}'`,
|
|
121
|
+
OrderBy: 'LatestAt DESC',
|
|
122
|
+
MaxRows: maxItems,
|
|
123
|
+
ResultType: 'entity_object'
|
|
124
|
+
});
|
|
125
|
+
if (!result.Success) {
|
|
126
|
+
console.error('RecentAccessService: Failed to load recent items', result.ErrorMessage);
|
|
127
|
+
return [];
|
|
128
|
+
}
|
|
129
|
+
const items = [];
|
|
130
|
+
for (const log of result.Results || []) {
|
|
131
|
+
const entityInfo = md.Entities.find(e => e.ID === log.EntityID);
|
|
132
|
+
if (!entityInfo)
|
|
133
|
+
continue;
|
|
134
|
+
// Determine resource type based on entity name
|
|
135
|
+
const resourceType = this.determineResourceType(entityInfo.Name);
|
|
136
|
+
items.push({
|
|
137
|
+
id: log.ID,
|
|
138
|
+
entityId: log.EntityID,
|
|
139
|
+
entityName: entityInfo.Name,
|
|
140
|
+
recordId: log.RecordID,
|
|
141
|
+
latestAt: log.LatestAt,
|
|
142
|
+
totalCount: log.TotalCount,
|
|
143
|
+
resourceType
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
this._recentItems$.next(items);
|
|
147
|
+
this._isLoaded = true;
|
|
148
|
+
return items;
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
LogError('RecentAccessService: Error loading recent items', undefined, error);
|
|
152
|
+
return [];
|
|
153
|
+
}
|
|
154
|
+
finally {
|
|
155
|
+
this._isLoading$.next(false);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Refresh recent items in background
|
|
160
|
+
*/
|
|
161
|
+
async refreshRecentItems() {
|
|
162
|
+
await this.loadRecentItems(15, true);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Determines the resource type based on entity name
|
|
166
|
+
*/
|
|
167
|
+
determineResourceType(entityName) {
|
|
168
|
+
const normalizedName = entityName.toLowerCase();
|
|
169
|
+
if (normalizedName === 'user views') {
|
|
170
|
+
return 'view';
|
|
171
|
+
}
|
|
172
|
+
if (normalizedName === 'dashboards') {
|
|
173
|
+
return 'dashboard';
|
|
174
|
+
}
|
|
175
|
+
if (normalizedName === 'mj: conversation artifacts' || normalizedName === 'conversation artifacts') {
|
|
176
|
+
return 'artifact';
|
|
177
|
+
}
|
|
178
|
+
if (normalizedName === 'reports') {
|
|
179
|
+
return 'report';
|
|
180
|
+
}
|
|
181
|
+
return 'record';
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Clears the cached recent items (useful for logout)
|
|
185
|
+
*/
|
|
186
|
+
clearCache() {
|
|
187
|
+
this._recentItems$.next([]);
|
|
188
|
+
this._isLoaded = false;
|
|
189
|
+
}
|
|
190
|
+
static ɵfac = function RecentAccessService_Factory(t) { return new (t || RecentAccessService)(); };
|
|
191
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: RecentAccessService, factory: RecentAccessService.ɵfac, providedIn: 'root' });
|
|
192
|
+
}
|
|
193
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RecentAccessService, [{
|
|
194
|
+
type: Injectable,
|
|
195
|
+
args: [{
|
|
196
|
+
providedIn: 'root'
|
|
197
|
+
}]
|
|
198
|
+
}], () => [], null); })();
|
|
199
|
+
//# sourceMappingURL=recent-access.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recent-access.service.js","sourceRoot":"","sources":["../../src/lib/recent-access.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAAE,eAAe,EAAc,MAAM,MAAM,CAAC;;AAiBnD;;;GAGG;AAIH,MAAM,OAAO,mBAAmB;IACtB,MAAM,CAAC,SAAS,CAAsB;IACtC,aAAa,GAAG,IAAI,eAAe,CAAqB,EAAE,CAAC,CAAC;IAC5D,WAAW,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;IAClD,SAAS,GAAG,KAAK,CAAC;IAE1B;QACE,IAAI,mBAAmB,CAAC,SAAS,EAAE,CAAC;YAClC,OAAO,mBAAmB,CAAC,SAAS,CAAC;QACvC,CAAC;QACD,mBAAmB,CAAC,SAAS,GAAG,IAAI,CAAC;IACvC,CAAC;IAEM,MAAM,KAAK,QAAQ;QACxB,OAAO,mBAAmB,CAAC,SAAS,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;IAC3C,CAAC;IAED;;OAEG;IACH,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;IAClC,CAAC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NU,mBAAmB;gEAAnB,mBAAmB,WAAnB,mBAAmB,mBAFlB,MAAM;;iFAEP,mBAAmB;cAH/B,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAKA,cAAc,cAAc,CAAC;AAG7B,cAAc,6BAA6B,CAAC;AAG5C,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface for @memberjunction/ng-shared-generic
|
|
3
|
+
*/
|
|
4
|
+
// Module
|
|
5
|
+
export * from './lib/module';
|
|
6
|
+
// Services
|
|
7
|
+
export * from './lib/recent-access.service';
|
|
8
|
+
// Components
|
|
9
|
+
export * from './lib/loading/loading.component';
|
|
10
|
+
//# sourceMappingURL=public-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,cAAc,cAAc,CAAC;AAE7B,WAAW;AACX,cAAc,6BAA6B,CAAC;AAE5C,aAAa;AACb,cAAc,iCAAiC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-shared-generic",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.122.0",
|
|
4
|
+
"description": "MemberJunction: Generic Angular Shared Package - utility services and reusable elements used in any Angular application.",
|
|
5
|
+
"main": "./dist/public-api.js",
|
|
6
|
+
"typings": "./dist/public-api.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"build": "ngc"
|
|
13
|
+
},
|
|
5
14
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
"MemberJunction",
|
|
16
|
+
"Angular"
|
|
17
|
+
],
|
|
18
|
+
"author": "",
|
|
19
|
+
"license": "ISC",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@angular/compiler": "18.0.2",
|
|
22
|
+
"@angular/compiler-cli": "18.0.2"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@angular/common": "18.0.2",
|
|
26
|
+
"@angular/core": "18.0.2",
|
|
27
|
+
"rxjs": "^7.8.1"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@memberjunction/core": "2.122.0",
|
|
31
|
+
"@memberjunction/core-entities": "2.122.0",
|
|
32
|
+
"tslib": "^2.3.0"
|
|
33
|
+
},
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/MemberJunction/MJ"
|
|
38
|
+
}
|
|
10
39
|
}
|
package/README.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# @memberjunction/ng-shared-generic
|
|
2
|
-
|
|
3
|
-
## ⚠️ IMPORTANT NOTICE ⚠️
|
|
4
|
-
|
|
5
|
-
**This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
|
|
6
|
-
|
|
7
|
-
This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
This package exists to:
|
|
12
|
-
1. Configure OIDC trusted publishing for the package name `@memberjunction/ng-shared-generic`
|
|
13
|
-
2. Enable secure, token-less publishing from CI/CD workflows
|
|
14
|
-
3. Establish provenance for packages published under this name
|
|
15
|
-
|
|
16
|
-
## What is OIDC Trusted Publishing?
|
|
17
|
-
|
|
18
|
-
OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
|
|
19
|
-
|
|
20
|
-
## Setup Instructions
|
|
21
|
-
|
|
22
|
-
To properly configure OIDC trusted publishing for this package:
|
|
23
|
-
|
|
24
|
-
1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
|
|
25
|
-
2. Configure the trusted publisher (e.g., GitHub Actions)
|
|
26
|
-
3. Specify the repository and workflow that should be allowed to publish
|
|
27
|
-
4. Use the configured workflow to publish your actual package
|
|
28
|
-
|
|
29
|
-
## DO NOT USE THIS PACKAGE
|
|
30
|
-
|
|
31
|
-
This package is a placeholder for OIDC configuration only. It:
|
|
32
|
-
- Contains no executable code
|
|
33
|
-
- Provides no functionality
|
|
34
|
-
- Should not be installed as a dependency
|
|
35
|
-
- Exists only for administrative purposes
|
|
36
|
-
|
|
37
|
-
## More Information
|
|
38
|
-
|
|
39
|
-
For more details about npm's trusted publishing feature, see:
|
|
40
|
-
- [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
|
|
41
|
-
- [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
**Maintained for OIDC setup purposes only**
|