@memberjunction/ng-shared 1.2.1 → 1.3.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.
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EntityInfo, PrimaryKeyValue } from '@memberjunction/core';
|
|
2
1
|
import { ResourceTypeEntity, UserNotificationEntity, ViewColumnInfo } from '@memberjunction/core-entities';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
3
|
import { NotificationService } from "@progress/kendo-angular-notification";
|
|
@@ -25,8 +24,6 @@ export declare class SharedService {
|
|
|
25
24
|
ResourceTypeByID(id: number): ResourceTypeEntity | undefined;
|
|
26
25
|
ResourceTypeByName(name: string): ResourceTypeEntity | undefined;
|
|
27
26
|
static RefreshData(): Promise<void>;
|
|
28
|
-
static GeneratePrimaryKeyValueString(pkVals: PrimaryKeyValue[]): string;
|
|
29
|
-
static ParsePrimaryKeys(entity: EntityInfo, routeSegment: string): PrimaryKeyValue[];
|
|
30
27
|
FormatColumnValue(col: ViewColumnInfo, value: any, maxLength?: number, trailingChars?: string): any;
|
|
31
28
|
ConvertMarkdownStringToHtmlList(listType: HtmlListType, text: string): string;
|
|
32
29
|
InvokeManualResize(delay?: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.service.d.ts","sourceRoot":"","sources":["../../src/lib/shared.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.service.d.ts","sourceRoot":"","sources":["../../src/lib/shared.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG3G,OAAO,EAAW,UAAU,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAwB,MAAM,sCAAsC,CAAC;;AAEjG,qBAGa,aAAa;IAOZ,OAAO,CAAC,mBAAmB;IANvC,OAAO,CAAC,MAAM,CAAC,SA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WAAkB,2BAA2B,IAAI,MAAM,CAEtD;IAED;;;;;;;;OAQG;IACU,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAAE,qBAAqB,EAAE,GAAG,GAAG,IAAI,GAAG,OAAO,CAAC,sBAAsB,CAAC;WAyB/K,wBAAwB;IAmB5C;;;;;OAKG;IACI,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAkB,EAAE,SAAS,CAAC,EAAE,MAAM;IAkBzI,OAAO,CAAC,gBAAgB,CAOvB;IACD;;;;OAIG;IACI,iCAAiC,CAAC,gBAAgB,EAAE,MAAM;IAQjE;;;;OAIG;IACI,iCAAiC,CAAC,oBAAoB,EAAE,MAAM;yCA/S1D,aAAa;6CAAb,aAAa;CAsTzB;AAED,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAG1E,eAAO,MAAM,UAAU;;;;;;;;;;;;CAYb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -126,24 +126,28 @@ export class SharedService {
|
|
|
126
126
|
SharedService.RefreshUserNotifications(); // also call this initially when refreshing the dataset...
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
/*
|
|
130
|
+
public static GenerateKeyValuePairString(pkVals: KeyValuePair[]): string {
|
|
131
|
+
return pkVals.map(pk => pk.FieldName + '|' + pk.Value).join('||');
|
|
131
132
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
133
|
+
*/
|
|
134
|
+
/*
|
|
135
|
+
public static ParsePrimaryKeys(entity: EntityInfo, routeSegment: string): KeyValuePair[] {
|
|
136
|
+
if (!routeSegment.includes('|')) {
|
|
137
|
+
// If not, return a single element array with a default field name
|
|
138
|
+
return [{ FieldName: entity.PrimaryKey.Name, Value: routeSegment }];
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
const parts = routeSegment.split('||');
|
|
142
|
+
const pkVals: KeyValuePair[] = [];
|
|
143
|
+
for (let p of parts) {
|
|
144
|
+
const kv = p.split('|');
|
|
145
|
+
pkVals.push({ FieldName: kv[0], Value: kv[1] });
|
|
145
146
|
}
|
|
147
|
+
return pkVals;
|
|
148
|
+
}
|
|
146
149
|
}
|
|
150
|
+
*/
|
|
147
151
|
FormatColumnValue(col, value, maxLength = 0, trailingChars = "...") {
|
|
148
152
|
if (value === null || value === undefined)
|
|
149
153
|
return value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "MemberJunction: Angular Shared Package - utility functions and other reusable elements used across other MJ Angular packages",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@angular/core": "~17.2.2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@memberjunction/core": "~1.
|
|
30
|
-
"@memberjunction/graphql-dataprovider": "~1.
|
|
29
|
+
"@memberjunction/core": "~1.3.0",
|
|
30
|
+
"@memberjunction/graphql-dataprovider": "~1.3.0",
|
|
31
31
|
"@progress/kendo-angular-notification": "~15.1.0",
|
|
32
32
|
"tslib": "^2.3.0"
|
|
33
33
|
},
|