@memberjunction/ng-shared 1.8.0 → 2.0.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.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Base class for all MJ Explorer navigation components - a navigation component is any component that can be displayed from a route
3
+ */
4
+ export declare abstract class BaseNavigationComponent {
5
+ }
6
+ //# sourceMappingURL=base-navigation-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-navigation-component.d.ts","sourceRoot":"","sources":["../../src/lib/base-navigation-component.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,8BAAsB,uBAAuB;CAE5C"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Base class for all MJ Explorer navigation components - a navigation component is any component that can be displayed from a route
3
+ */
4
+ export class BaseNavigationComponent {
5
+ }
@@ -1,5 +1,6 @@
1
1
  import { BaseEntity } from "@memberjunction/core";
2
- export declare abstract class BaseResourceComponent {
2
+ import { BaseNavigationComponent } from "./base-navigation-component";
3
+ export declare abstract class BaseResourceComponent extends BaseNavigationComponent {
3
4
  Data: ResourceData;
4
5
  private _loadComplete;
5
6
  get LoadComplete(): boolean;
@@ -24,7 +25,7 @@ export declare class ResourceData {
24
25
  constructor(data?: any);
25
26
  ID: number;
26
27
  Name: string;
27
- ResourceTypeID: number;
28
+ ResourceTypeID: string;
28
29
  ResourceRecordID: any;
29
30
  Configuration: any;
30
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"base-resource-component.d.ts","sourceRoot":"","sources":["../../src/lib/base-resource-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,8BAAsB,qBAAqB;IAChC,IAAI,EAAE,YAAY,CAAsB;IAE/C,OAAO,CAAC,aAAa,CAAkB;IACvC,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED,OAAO,CAAC,YAAY,CAAkB;IACtC,IAAW,WAAW,IAAI,OAAO,CAEhC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W,YAAY,IAAI,OAAO,CAEjC;IAED,OAAO,CAAC,YAAY,CAAkB;IACtC,IAAW,WAAW,IAAI,OAAO,CAEhC;IAGD,OAAO,CAAC,kBAAkB,CAAa;IACvC,IAAW,iBAAiB,IAAI,GAAG,CAElC;IACD,IAAW,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAEtC;IAED,OAAO,CAAC,iBAAiB,CAAa;IACtC,IAAW,gBAAgB,IAAI,GAAG,CAEjC;IACD,IAAW,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAErC;IAED,OAAO,CAAC,yBAAyB,CAAa;IAC9C,IAAW,wBAAwB,IAAI,GAAG,CAEzC;IACD,IAAW,wBAAwB,CAAC,KAAK,EAAE,GAAG,EAE7C;IAED,SAAS,CAAC,kBAAkB;IAO5B,SAAS,CAAC,iBAAiB;IAS3B,SAAS,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,UAAU;IAO9D,QAAQ,CAAC,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAEpE,QAAQ,CAAC,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;CACrE;AAED,qBAAa,YAAY;gBACT,IAAI,GAAE,GAAU;IASrB,EAAE,EAAG,MAAM,CAAC;IACZ,IAAI,EAAG,MAAM,CAAC;IACd,cAAc,EAAG,MAAM,CAAC;IACxB,gBAAgB,EAAG,GAAG,CAAC;IACvB,aAAa,EAAE,GAAG,CAAC;IAE1B;;OAEG;IACH,IAAW,YAAY,IAAI,MAAM,CAGhC;IACD,IAAW,YAAY,IAAI,MAAM,CAGhC;CACJ"}
@@ -1,6 +1,8 @@
1
1
  import { SharedService } from "./shared.service";
2
- export class BaseResourceComponent {
2
+ import { BaseNavigationComponent } from "./base-navigation-component";
3
+ export class BaseResourceComponent extends BaseNavigationComponent {
3
4
  constructor() {
5
+ super(...arguments);
4
6
  this.Data = new ResourceData();
5
7
  this._loadComplete = false;
6
8
  this._loadStarted = false;
@@ -22,7 +22,7 @@ export declare class SharedService {
22
22
  get DashboardResourceType(): ResourceTypeEntity;
23
23
  get ReportResourceType(): ResourceTypeEntity;
24
24
  get SearchResultsResourceType(): ResourceTypeEntity;
25
- ResourceTypeByID(id: number): ResourceTypeEntity | undefined;
25
+ ResourceTypeByID(id: string): ResourceTypeEntity | undefined;
26
26
  ResourceTypeByName(name: string): ResourceTypeEntity | undefined;
27
27
  static RefreshData(): Promise<void>;
28
28
  FormatColumnValue(col: ViewColumnInfo, value: any, maxLength?: number, trailingChars?: string): any;
@@ -49,7 +49,7 @@ export declare class SharedService {
49
49
  * @param resourceConfiguration Any object, it is converted to a string by JSON.stringify and stored in the database
50
50
  * @returns
51
51
  */
52
- CreateNotification(title: string, message: string, resourceTypeId: number | null, resourceRecordId: number | null, resourceConfiguration: any | null): Promise<UserNotificationEntity>;
52
+ CreateNotification(title: string, message: string, resourceTypeId: string | null, resourceRecordId: number | null, resourceConfiguration: any | null): Promise<UserNotificationEntity>;
53
53
  static RefreshUserNotifications(): Promise<void>;
54
54
  /**
55
55
  * Creates a message that is not saved to the User Notifications table, but is displayed to the user.
@@ -254,8 +254,8 @@ export class SharedService {
254
254
  const md = new Metadata();
255
255
  const result = yield rv.RunView({
256
256
  EntityName: 'User Notifications',
257
- ExtraFilter: 'UserID=' + md.CurrentUser.ID,
258
- OrderBy: 'CreatedAt DESC',
257
+ ExtraFilter: `UserID='${md.CurrentUser.ID}'`,
258
+ OrderBy: '__mj_CreatedAt DESC',
259
259
  ResultType: 'entity_object' /* we want the entity objects, this has a little bit of overhead cost, but since we'll want to be able to modify the unread state it is helpful to have these ready to go */
260
260
  });
261
261
  if (result && result.Success) {
@@ -2,5 +2,6 @@ export * from './lib/urlPipe';
2
2
  export * from './lib/simpleTextFormat';
3
3
  export * from './lib/shared.service';
4
4
  export * from './lib/base-resource-component';
5
+ export * from './lib/base-navigation-component';
5
6
  export * from './module';
6
7
  //# sourceMappingURL=public-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,UAAU,CAAC"}
@@ -5,4 +5,5 @@ export * from './lib/urlPipe';
5
5
  export * from './lib/simpleTextFormat';
6
6
  export * from './lib/shared.service';
7
7
  export * from './lib/base-resource-component';
8
+ export * from './lib/base-navigation-component';
8
9
  export * from './module';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-shared",
3
- "version": "1.8.0",
3
+ "version": "2.0.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": "18.0.2"
27
27
  },
28
28
  "dependencies": {
29
- "@memberjunction/core": "1.8.0",
30
- "@memberjunction/graphql-dataprovider": "1.8.0",
29
+ "@memberjunction/core": "2.0.0",
30
+ "@memberjunction/graphql-dataprovider": "2.0.0",
31
31
  "@progress/kendo-angular-notification": "16.2.0",
32
32
  "tslib": "^2.3.0"
33
33
  },