@memberjunction/ng-base-types 1.8.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/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +5 -0
- package/dist/public-api.js.map +1 -0
- package/dist/types.d.ts +34 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +33 -0
- package/dist/types.js.map +1 -0
- package/package.json +32 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BaseEntity } from "@memberjunction/core";
|
|
2
|
+
/**
|
|
3
|
+
* Enum used for common events coordination throughout various types of application components and forms
|
|
4
|
+
*/
|
|
5
|
+
export declare const BaseFormComponentEventCodes: {
|
|
6
|
+
readonly BASE_CODE: "BaseFormComponent_Event";
|
|
7
|
+
readonly EDITING_COMPLETE: "EDITING_COMPLETE";
|
|
8
|
+
readonly REVERT_PENDING_CHANGES: "REVERT_PENDING_CHANGES";
|
|
9
|
+
readonly POPULATE_PENDING_RECORDS: "POPULATE_PENDING_RECORDS";
|
|
10
|
+
};
|
|
11
|
+
export type BaseFormComponentEventCodes = typeof BaseFormComponentEventCodes[keyof typeof BaseFormComponentEventCodes];
|
|
12
|
+
/**
|
|
13
|
+
* Base type for events emitted by classes that interact with the Form Component architecture
|
|
14
|
+
*/
|
|
15
|
+
export declare class BaseFormComponentEvent {
|
|
16
|
+
subEventCode: string;
|
|
17
|
+
elementRef: any;
|
|
18
|
+
returnValue: any;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Specialized type of event that is emitted when a form component is telling everyone that editing is complete
|
|
22
|
+
*/
|
|
23
|
+
export declare class FormEditingCompleteEvent extends BaseFormComponentEvent {
|
|
24
|
+
subEventCode: string;
|
|
25
|
+
pendingChanges: PendingRecordItem[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Type that is used for building an array of pending records that need to be saved or deleted by the Form architecture that sub-components have been editing during an edit cycle
|
|
29
|
+
*/
|
|
30
|
+
export declare class PendingRecordItem {
|
|
31
|
+
entityObject: BaseEntity;
|
|
32
|
+
action: 'save' | 'delete';
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;CAK9B,CAAA;AACV,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAC;AAEvH;;GAEG;AACH,qBAAa,sBAAsB;IAC/B,YAAY,EAAG,MAAM,CAAA;IACrB,UAAU,EAAE,GAAG,CAAA;IACf,WAAW,EAAE,GAAG,CAAA;CACnB;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,sBAAsB;IAChE,YAAY,EAAE,MAAM,CAAgD;IACpE,cAAc,EAAE,iBAAiB,EAAE,CAAM;CAC5C;AAED;;GAEG;AACH,qBAAa,iBAAiB;IAC1B,YAAY,EAAG,UAAU,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAU;CACtC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum used for common events coordination throughout various types of application components and forms
|
|
3
|
+
*/
|
|
4
|
+
export const BaseFormComponentEventCodes = {
|
|
5
|
+
BASE_CODE: 'BaseFormComponent_Event',
|
|
6
|
+
EDITING_COMPLETE: 'EDITING_COMPLETE',
|
|
7
|
+
REVERT_PENDING_CHANGES: 'REVERT_PENDING_CHANGES',
|
|
8
|
+
POPULATE_PENDING_RECORDS: 'POPULATE_PENDING_RECORDS'
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Base type for events emitted by classes that interact with the Form Component architecture
|
|
12
|
+
*/
|
|
13
|
+
export class BaseFormComponentEvent {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Specialized type of event that is emitted when a form component is telling everyone that editing is complete
|
|
17
|
+
*/
|
|
18
|
+
export class FormEditingCompleteEvent extends BaseFormComponentEvent {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.subEventCode = BaseFormComponentEventCodes.EDITING_COMPLETE;
|
|
22
|
+
this.pendingChanges = [];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Type that is used for building an array of pending records that need to be saved or deleted by the Form architecture that sub-components have been editing during an edit cycle
|
|
27
|
+
*/
|
|
28
|
+
export class PendingRecordItem {
|
|
29
|
+
constructor() {
|
|
30
|
+
this.action = 'save';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,SAAS,EAAE,yBAAyB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,sBAAsB,EAAE,wBAAwB;IAChD,wBAAwB,EAAE,0BAA0B;CAC9C,CAAA;AAGV;;GAEG;AACH,MAAM,OAAO,sBAAsB;CAIlC;AAED;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,sBAAsB;IAApE;;QACI,iBAAY,GAAW,2BAA2B,CAAC,gBAAgB,CAAC;QACpE,mBAAc,GAAwB,EAAE,CAAC;IAC7C,CAAC;CAAA;AAED;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAA9B;QAEI,WAAM,GAAsB,MAAM,CAAC;IACvC,CAAC;CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@memberjunction/ng-base-types",
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"description": "MemberJunction: Simple types that are used across many generic Angular UI components for coordination",
|
|
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
|
+
},
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@angular/compiler": "18.0.2",
|
|
19
|
+
"@angular/compiler-cli": "18.0.2"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@angular/common": "18.0.2",
|
|
23
|
+
"@angular/core": "18.0.2"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@memberjunction/core-entities": "1.8.0",
|
|
27
|
+
"@memberjunction/global": "1.8.0",
|
|
28
|
+
"@memberjunction/core": "1.8.0",
|
|
29
|
+
"tslib": "^2.3.0"
|
|
30
|
+
},
|
|
31
|
+
"sideEffects": false
|
|
32
|
+
}
|