@pepperi-addons/ngx-lib 0.4.0-angular14.45 → 0.4.0-angular14.48
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/chips/chips.component.d.ts +88 -0
- package/chips/chips.component.theme.scss +58 -0
- package/chips/chips.model.d.ts +9 -0
- package/chips/chips.module.d.ts +20 -0
- package/chips/chips.service.d.ts +14 -0
- package/{chip → chips}/index.d.ts +1 -1
- package/chips/public-api.d.ts +3 -0
- package/core/common/model/wapi.model.d.ts +1 -0
- package/core/customization/customization.model.d.ts +3 -0
- package/esm2020/chips/chips.component.mjs +139 -0
- package/esm2020/chips/chips.model.mjs +2 -0
- package/esm2020/chips/chips.module.mjs +81 -0
- package/esm2020/chips/chips.service.mjs +40 -0
- package/esm2020/chips/pepperi-addons-ngx-lib-chips.mjs +5 -0
- package/esm2020/chips/public-api.mjs +7 -0
- package/esm2020/core/common/model/wapi.model.mjs +1 -1
- package/esm2020/core/common/services/utilities.service.mjs +14 -6
- package/esm2020/core/customization/customization.model.mjs +5 -1
- package/esm2020/form/field-generator.component.mjs +3 -3
- package/esm2020/form/form.component.mjs +4 -2
- package/esm2020/form/internal-field-generator.component.mjs +3 -3
- package/esm2020/form/internal-form.component.mjs +4 -2
- package/esm2020/quantity-selector/quantity-selector.component.mjs +24 -4
- package/esm2020/remote-loader/addon-block-loader.component.mjs +18 -8
- package/esm2020/remote-loader/remote-loader.model.mjs +1 -1
- package/esm2020/remote-loader/remote-loader.module.mjs +5 -1
- package/esm2020/remote-loader/remote-loader.service.mjs +12 -4
- package/esm2020/textbox/textbox.component.mjs +18 -4
- package/fesm2015/pepperi-addons-ngx-lib-chips.mjs +264 -0
- package/fesm2015/pepperi-addons-ngx-lib-chips.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs +10 -6
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs +23 -3
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +32 -8
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +17 -3
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib.mjs +19 -5
- package/fesm2015/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-chips.mjs +264 -0
- package/fesm2020/pepperi-addons-ngx-lib-chips.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs +10 -6
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs +23 -3
- package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs +30 -8
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs +17 -3
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib.mjs +17 -5
- package/fesm2020/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/package.json +8 -16
- package/quantity-selector/quantity-selector.component.d.ts +7 -1
- package/remote-loader/addon-block-loader.component.d.ts +5 -2
- package/remote-loader/remote-loader.model.d.ts +2 -1
- package/remote-loader/remote-loader.module.d.ts +5 -4
- package/src/assets/i18n/en.ngx-lib.json +3 -0
- package/textbox/textbox.component.d.ts +6 -2
- package/chip/chip.component.d.ts +0 -18
- package/chip/chip.module.d.ts +0 -19
- package/chip/public-api.d.ts +0 -2
- package/esm2020/chip/chip.component.mjs +0 -36
- package/esm2020/chip/chip.module.mjs +0 -60
- package/esm2020/chip/pepperi-addons-ngx-lib-chip.mjs +0 -5
- package/esm2020/chip/public-api.mjs +0 -6
- package/esm2020/plugin/pepperi-addons-ngx-lib-plugin.mjs +0 -5
- package/esm2020/plugin/plugin-proxy.component.mjs +0 -98
- package/esm2020/plugin/plugin.model.mjs +0 -2
- package/esm2020/plugin/public-api.mjs +0 -6
- package/fesm2015/pepperi-addons-ngx-lib-chip.mjs +0 -104
- package/fesm2015/pepperi-addons-ngx-lib-chip.mjs.map +0 -1
- package/fesm2015/pepperi-addons-ngx-lib-plugin.mjs +0 -115
- package/fesm2015/pepperi-addons-ngx-lib-plugin.mjs.map +0 -1
- package/fesm2020/pepperi-addons-ngx-lib-chip.mjs +0 -104
- package/fesm2020/pepperi-addons-ngx-lib-chip.mjs.map +0 -1
- package/fesm2020/pepperi-addons-ngx-lib-plugin.mjs +0 -109
- package/fesm2020/pepperi-addons-ngx-lib-plugin.mjs.map +0 -1
- package/plugin/index.d.ts +0 -5
- package/plugin/plugin-proxy.component.d.ts +0 -25
- package/plugin/plugin.model.d.ts +0 -6
- package/plugin/public-api.d.ts +0 -2
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { __awaiter } from 'tslib';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { EventEmitter, ViewContainerRef, Component, ViewChild, Input, Output } from '@angular/core';
|
|
4
|
-
import { loadRemoteModule } from '@angular-architects/module-federation';
|
|
5
|
-
import * as i1 from '@pepperi-addons/ngx-lib';
|
|
6
|
-
|
|
7
|
-
// declare let __webpack_public_path__;
|
|
8
|
-
class PepPluginProxyComponent {
|
|
9
|
-
constructor(pepAddonService) {
|
|
10
|
-
this.pepAddonService = pepAddonService;
|
|
11
|
-
this._options = null;
|
|
12
|
-
// This is the data passed by the API Design documentation.
|
|
13
|
-
this._hostObject = null;
|
|
14
|
-
this.hostEvents = new EventEmitter();
|
|
15
|
-
this.load = new EventEmitter();
|
|
16
|
-
}
|
|
17
|
-
set options(value) {
|
|
18
|
-
this._options = value;
|
|
19
|
-
if (value) {
|
|
20
|
-
this.loadModule();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
get options() {
|
|
24
|
-
return this._options;
|
|
25
|
-
}
|
|
26
|
-
set hostObject(value) {
|
|
27
|
-
this._hostObject = value;
|
|
28
|
-
this.setHostComponentIntoComponentRef();
|
|
29
|
-
}
|
|
30
|
-
get hostObject() {
|
|
31
|
-
return this._hostObject;
|
|
32
|
-
}
|
|
33
|
-
setHostComponentIntoComponentRef() {
|
|
34
|
-
var _a;
|
|
35
|
-
if (this.hostObject && ((_a = this.compRef) === null || _a === void 0 ? void 0 : _a.instance)) {
|
|
36
|
-
this.compRef.instance['hostObject'] = this.hostObject;
|
|
37
|
-
// TODO: Check if this is needed?? if not remove this.
|
|
38
|
-
// if (this.compRef?.instance?.ngOnChanges) {
|
|
39
|
-
// this.compRef.instance.ngOnChanges(this.hostObject);
|
|
40
|
-
// }
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
loadModule() {
|
|
44
|
-
var _a, _b, _c;
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
this.viewContainer.clear();
|
|
47
|
-
debugger;
|
|
48
|
-
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.addonId) && (this.options.type === 'module' || this.options.type === 'script')) {
|
|
49
|
-
const lastSlashIndex = ((_b = this.options.remoteEntry) === null || _b === void 0 ? void 0 : _b.lastIndexOf('/')) || -1;
|
|
50
|
-
if (lastSlashIndex > 0) {
|
|
51
|
-
// const publicPathArr = this.options.remoteEntry?.split('/');
|
|
52
|
-
// const publicPath = publicPathArr.slice(0, publicPathArr.length - 1).join('/')+'/';
|
|
53
|
-
// __webpack_public_path__ = publicPath;
|
|
54
|
-
const publicPath = this.options.remoteEntry.substring(0, lastSlashIndex + 1);
|
|
55
|
-
this.pepAddonService.setAddonStaticFolder(publicPath, this.options.addonId);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const componentType = yield loadRemoteModule(this.options).then(m => m[this.options.componentName]);
|
|
59
|
-
this.compRef = this.viewContainer.createComponent(componentType);
|
|
60
|
-
if (this.compRef) {
|
|
61
|
-
this.setHostComponentIntoComponentRef();
|
|
62
|
-
this.hostEvents$ = (_c = this.compRef.instance['hostEvents']) === null || _c === void 0 ? void 0 : _c.subscribe((e) => {
|
|
63
|
-
this.hostEvents.emit(e);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
this.load.emit();
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
ngOnChanges() {
|
|
70
|
-
}
|
|
71
|
-
ngOnDestroy() {
|
|
72
|
-
var _a, _b;
|
|
73
|
-
if (this.hostEvents$) {
|
|
74
|
-
this.hostEvents$.unsubscribe();
|
|
75
|
-
}
|
|
76
|
-
(_a = this.compRef) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
77
|
-
(_b = this.viewContainer) === null || _b === void 0 ? void 0 : _b.clear();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
PepPluginProxyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepPluginProxyComponent, deps: [{ token: i1.PepAddonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
81
|
-
PepPluginProxyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepPluginProxyComponent, isStandalone: true, selector: "pep-plugin-proxy", inputs: { options: "options", hostObject: "hostObject" }, outputs: { hostEvents: "hostEvents", load: "load" }, viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["placeHolder"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
82
|
-
<ng-container #placeHolder></ng-container>
|
|
83
|
-
`, isInline: true });
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepPluginProxyComponent, decorators: [{
|
|
85
|
-
type: Component,
|
|
86
|
-
args: [{
|
|
87
|
-
standalone: true,
|
|
88
|
-
selector: 'pep-plugin-proxy',
|
|
89
|
-
template: `
|
|
90
|
-
<ng-container #placeHolder></ng-container>
|
|
91
|
-
`
|
|
92
|
-
}]
|
|
93
|
-
}], ctorParameters: function () { return [{ type: i1.PepAddonService }]; }, propDecorators: { viewContainer: [{
|
|
94
|
-
type: ViewChild,
|
|
95
|
-
args: ['placeHolder', { read: ViewContainerRef, static: true }]
|
|
96
|
-
}], options: [{
|
|
97
|
-
type: Input
|
|
98
|
-
}], hostObject: [{
|
|
99
|
-
type: Input
|
|
100
|
-
}], hostEvents: [{
|
|
101
|
-
type: Output
|
|
102
|
-
}], load: [{
|
|
103
|
-
type: Output
|
|
104
|
-
}] } });
|
|
105
|
-
|
|
106
|
-
/*
|
|
107
|
-
* Public API Surface of ngx-lib/plugin
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Generated bundle index. Do not edit.
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
export { PepPluginProxyComponent };
|
|
115
|
-
//# sourceMappingURL=pepperi-addons-ngx-lib-plugin.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-plugin.mjs","sources":["../../../projects/ngx-lib/plugin/plugin-proxy.component.ts","../../../projects/ngx-lib/plugin/public-api.ts","../../../projects/ngx-lib/plugin/pepperi-addons-ngx-lib-plugin.ts"],"sourcesContent":["import { Component, ComponentRef, EventEmitter, Input, OnChanges, OnDestroy, Output, ViewChild, ViewContainerRef } from '@angular/core';\nimport { loadRemoteModule } from '@angular-architects/module-federation';\nimport { PepAddonService } from '@pepperi-addons/ngx-lib';\nimport { PepPluginOptions } from './plugin.model';\nimport { Subscription } from 'rxjs';\n// declare let __webpack_public_path__;\n\n@Component({\n standalone: true,\n selector: 'pep-plugin-proxy',\n template: `\n <ng-container #placeHolder></ng-container>\n `\n})\nexport class PepPluginProxyComponent implements OnChanges, OnDestroy {\n @ViewChild('placeHolder', { read: ViewContainerRef, static: true })\n viewContainer: ViewContainerRef;\n \n private _options: PepPluginOptions = null;\n @Input()\n set options(value: PepPluginOptions) {\n this._options = value;\n if (value) {\n this.loadModule();\n }\n }\n get options(): PepPluginOptions {\n return this._options;\n }\n\n // This is the data passed by the API Design documentation.\n private _hostObject: any = null;\n @Input()\n set hostObject(value: any) { \n this._hostObject = value;\n this.setHostComponentIntoComponentRef();\n }\n get hostObject(): any {\n return this._hostObject;\n }\n\n @Output() hostEvents: EventEmitter<any> = new EventEmitter();\n @Output() load: EventEmitter<any> = new EventEmitter();\n\n private compRef: ComponentRef<any>;\n private hostEvents$: Subscription;\n\n constructor(\n private pepAddonService: PepAddonService,\n ) { }\n\n private setHostComponentIntoComponentRef() {\n if (this.hostObject && this.compRef?.instance) {\n this.compRef.instance['hostObject'] = this.hostObject;\n\n // TODO: Check if this is needed?? if not remove this.\n // if (this.compRef?.instance?.ngOnChanges) {\n // this.compRef.instance.ngOnChanges(this.hostObject);\n // }\n }\n }\n\n private async loadModule() {\n this.viewContainer.clear();\n \n debugger;\n \n if (this.options?.addonId && (this.options.type === 'module' || this.options.type === 'script')) {\n \n const lastSlashIndex = this.options.remoteEntry?.lastIndexOf('/') || -1;\n if (lastSlashIndex > 0) {\n // const publicPathArr = this.options.remoteEntry?.split('/');\n // const publicPath = publicPathArr.slice(0, publicPathArr.length - 1).join('/')+'/';\n // __webpack_public_path__ = publicPath;\n \n const publicPath = this.options.remoteEntry.substring(0, lastSlashIndex + 1);\n this.pepAddonService.setAddonStaticFolder(publicPath, this.options.addonId);\n }\n }\n\n const componentType = await loadRemoteModule(this.options).then(m => m[this.options.componentName]);\n this.compRef = this.viewContainer.createComponent(componentType);\n \n if (this.compRef) {\n this.setHostComponentIntoComponentRef();\n \n this.hostEvents$ = this.compRef.instance['hostEvents']?.subscribe((e: any) => {\n this.hostEvents.emit(e)\n });\n }\n\n this.load.emit();\n }\n\n ngOnChanges() {\n }\n \n ngOnDestroy(): void {\n if (this.hostEvents$) {\n this.hostEvents$.unsubscribe();\n }\n\n this.compRef?.destroy();\n this.viewContainer?.clear();\n }\n}\n\n","/*\r\n * Public API Surface of ngx-lib/plugin\r\n */\r\nexport * from './plugin-proxy.component';\r\nexport * from './plugin.model';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAKA;MASa,uBAAuB,CAAA;AAiChC,IAAA,WAAA,CACY,eAAgC,EAAA;AAAhC,QAAA,IAAe,CAAA,eAAA,GAAf,eAAe,CAAiB;AA9BpC,QAAA,IAAQ,CAAA,QAAA,GAAqB,IAAI,CAAC;;AAalC,QAAA,IAAW,CAAA,WAAA,GAAQ,IAAI,CAAC;AAUtB,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAE,CAAC;AACpD,QAAA,IAAA,CAAA,IAAI,GAAuB,IAAI,YAAY,EAAE,CAAC;KAOnD;IA9BL,IACI,OAAO,CAAC,KAAuB,EAAA;AAC/B,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;AACtB,QAAA,IAAI,KAAK,EAAE;YACP,IAAI,CAAC,UAAU,EAAE,CAAC;AACrB,SAAA;KACJ;AACD,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;KACxB;IAID,IACI,UAAU,CAAC,KAAU,EAAA;AACrB,QAAA,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,gCAAgC,EAAE,CAAC;KAC3C;AACD,IAAA,IAAI,UAAU,GAAA;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;KAC3B;IAYO,gCAAgC,GAAA;;QACpC,IAAI,IAAI,CAAC,UAAU,KAAI,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,QAAQ,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AAA,EAAA,SAAA,EAAA,CAAA,aAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EACE,gBAAgB,EALxC,MAAA,EAAA,IAAA,EAAA,CAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;AAET,IAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FAEQ,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,CAAA;;AAET,IAAA,CAAA;iBACJ,CAAA;sGAGG,aAAa,EAAA,CAAA;sBADZ,SAAS;uBAAC,aAAa,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;gBAK9D,OAAO,EAAA,CAAA;sBADV,KAAK;gBAcF,UAAU,EAAA,CAAA;sBADb,KAAK;gBASI,UAAU,EAAA,CAAA;sBAAnB,MAAM;gBACG,IAAI,EAAA,CAAA;sBAAb,MAAM;;;AC1CX;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { MatCommonModule } from '@angular/material/core';
|
|
6
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
7
|
-
import { MatChipsModule } from '@angular/material/chips';
|
|
8
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
-
import { PepNgxLibModule } from '@pepperi-addons/ngx-lib';
|
|
10
|
-
import * as i1 from '@pepperi-addons/ngx-lib/icon';
|
|
11
|
-
import { pepIconSystemBolt, PepIconModule } from '@pepperi-addons/ngx-lib/icon';
|
|
12
|
-
import { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';
|
|
13
|
-
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
14
|
-
|
|
15
|
-
class PepChipComponent {
|
|
16
|
-
constructor() {
|
|
17
|
-
this.addOnBlur = true;
|
|
18
|
-
this.separatorKeysCodes = [ENTER, COMMA];
|
|
19
|
-
this.fruits = [{ name: 'Lemon' }, { name: 'Lime' }, { name: 'Apple' }];
|
|
20
|
-
}
|
|
21
|
-
ngOnInit() {
|
|
22
|
-
}
|
|
23
|
-
ngOnDestroy() {
|
|
24
|
-
}
|
|
25
|
-
add(event) {
|
|
26
|
-
const value = (event.value || '').trim();
|
|
27
|
-
// Add our fruit
|
|
28
|
-
if (value) {
|
|
29
|
-
this.fruits.push({ name: value });
|
|
30
|
-
}
|
|
31
|
-
// Clear the input value
|
|
32
|
-
event.chipInput.clear();
|
|
33
|
-
}
|
|
34
|
-
remove(fruit) {
|
|
35
|
-
const index = this.fruits.indexOf(fruit);
|
|
36
|
-
if (index >= 0) {
|
|
37
|
-
this.fruits.splice(index, 1);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
PepChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
-
PepChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepChipComponent, selector: "pep-checkbox", ngImport: i0, template: "<!-- <mat-form-field class=\"example-chip-list\" appearance=\"fill\">\n <mat-label>Favorite Fruits</mat-label>\n <mat-chip-list #chipList aria-label=\"Fruit selection\">\n <mat-chip *ngFor=\"let fruit of fruits\" (removed)=\"remove(fruit)\">\n {{fruit.name}}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n <input placeholder=\"New fruit...\"\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"add($event)\">\n </mat-chip-list>\n </mat-form-field> -->", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipComponent, decorators: [{
|
|
44
|
-
type: Component,
|
|
45
|
-
args: [{ selector: 'pep-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- <mat-form-field class=\"example-chip-list\" appearance=\"fill\">\n <mat-label>Favorite Fruits</mat-label>\n <mat-chip-list #chipList aria-label=\"Fruit selection\">\n <mat-chip *ngFor=\"let fruit of fruits\" (removed)=\"remove(fruit)\">\n {{fruit.name}}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n <input placeholder=\"New fruit...\"\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"add($event)\">\n </mat-chip-list>\n </mat-form-field> -->" }]
|
|
46
|
-
}], ctorParameters: function () { return []; } });
|
|
47
|
-
|
|
48
|
-
class PepChipModule {
|
|
49
|
-
constructor(pepIconRegistry) {
|
|
50
|
-
this.pepIconRegistry = pepIconRegistry;
|
|
51
|
-
this.pepIconRegistry.registerIcons([pepIconSystemBolt]);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
PepChipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipModule, deps: [{ token: i1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
55
|
-
PepChipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepChipModule, declarations: [PepChipComponent], imports: [CommonModule,
|
|
56
|
-
ReactiveFormsModule,
|
|
57
|
-
// Material modules
|
|
58
|
-
MatCommonModule,
|
|
59
|
-
MatFormFieldModule,
|
|
60
|
-
MatChipsModule,
|
|
61
|
-
MatIconModule,
|
|
62
|
-
PepNgxLibModule,
|
|
63
|
-
PepIconModule,
|
|
64
|
-
PepFieldTitleModule], exports: [PepChipComponent] });
|
|
65
|
-
PepChipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipModule, imports: [CommonModule,
|
|
66
|
-
ReactiveFormsModule,
|
|
67
|
-
// Material modules
|
|
68
|
-
MatCommonModule,
|
|
69
|
-
MatFormFieldModule,
|
|
70
|
-
MatChipsModule,
|
|
71
|
-
MatIconModule,
|
|
72
|
-
PepNgxLibModule,
|
|
73
|
-
PepIconModule,
|
|
74
|
-
PepFieldTitleModule] });
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepChipModule, decorators: [{
|
|
76
|
-
type: NgModule,
|
|
77
|
-
args: [{
|
|
78
|
-
declarations: [PepChipComponent],
|
|
79
|
-
imports: [
|
|
80
|
-
CommonModule,
|
|
81
|
-
ReactiveFormsModule,
|
|
82
|
-
// Material modules
|
|
83
|
-
MatCommonModule,
|
|
84
|
-
MatFormFieldModule,
|
|
85
|
-
MatChipsModule,
|
|
86
|
-
MatIconModule,
|
|
87
|
-
PepNgxLibModule,
|
|
88
|
-
PepIconModule,
|
|
89
|
-
PepFieldTitleModule,
|
|
90
|
-
],
|
|
91
|
-
exports: [PepChipComponent]
|
|
92
|
-
}]
|
|
93
|
-
}], ctorParameters: function () { return [{ type: i1.PepIconRegistry }]; } });
|
|
94
|
-
|
|
95
|
-
/*
|
|
96
|
-
* Public API Surface of ngx-lib/chip
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Generated bundle index. Do not edit.
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
export { PepChipComponent, PepChipModule };
|
|
104
|
-
//# sourceMappingURL=pepperi-addons-ngx-lib-chip.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-chip.mjs","sources":["../../../projects/ngx-lib/chip/chip.component.ts","../../../projects/ngx-lib/chip/chip.component.html","../../../projects/ngx-lib/chip/chip.module.ts","../../../projects/ngx-lib/chip/public-api.ts","../../../projects/ngx-lib/chip/pepperi-addons-ngx-lib-chip.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnDestroy,\n Renderer2,\n ElementRef,\n Optional,\n OnChanges,\n} from '@angular/core';\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\nimport { MatChipInputEvent } from '@angular/material/chips';\n\nexport interface Fruit {\n name: string;\n}\n\n@Component({\n selector: 'pep-checkbox',\n templateUrl: './chip.component.html',\n styleUrls: ['./chip.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PepChipComponent implements OnInit, OnDestroy {\n addOnBlur = true;\n readonly separatorKeysCodes = [ENTER, COMMA] as const;\n fruits: Fruit[] = [{ name: 'Lemon' }, { name: 'Lime' }, { name: 'Apple' }];\n\n constructor() {\n\n }\n\n ngOnInit(): void {\n\n }\n\n ngOnDestroy(): void {\n\n }\n\n add(event: MatChipInputEvent): void {\n const value = (event.value || '').trim();\n\n // Add our fruit\n if (value) {\n this.fruits.push({ name: value });\n }\n\n // Clear the input value\n event.chipInput!.clear();\n }\n\n remove(fruit: Fruit): void {\n const index = this.fruits.indexOf(fruit);\n\n if (index >= 0) {\n this.fruits.splice(index, 1);\n }\n } \n}","<!-- <mat-form-field class=\"example-chip-list\" appearance=\"fill\">\n <mat-label>Favorite Fruits</mat-label>\n <mat-chip-list #chipList aria-label=\"Fruit selection\">\n <mat-chip *ngFor=\"let fruit of fruits\" (removed)=\"remove(fruit)\">\n {{fruit.name}}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n <input placeholder=\"New fruit...\"\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"add($event)\">\n </mat-chip-list>\n </mat-form-field> -->","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemBolt,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\n\nimport { PepChipComponent } from './chip.component';\n\n@NgModule({\n declarations: [PepChipComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules\n MatCommonModule,\n MatFormFieldModule,\n MatChipsModule,\n MatIconModule,\n\n PepNgxLibModule,\n PepIconModule,\n PepFieldTitleModule,\n ],\n exports: [PepChipComponent] \n})\nexport class PepChipModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([pepIconSystemBolt]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/chip\n */\nexport * from './chip.module';\nexport * from './chip.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA0Ba,gBAAgB,CAAA;AAKzB,IAAA,WAAA,GAAA;QAJA,IAAS,CAAA,SAAA,GAAG,IAAI,CAAC;AACR,QAAA,IAAA,CAAA,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAA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;AAC9B,iBAAA,CAAA;;;ACnCD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, ViewContainerRef, Component, ViewChild, Input, Output } from '@angular/core';
|
|
3
|
-
import { loadRemoteModule } from '@angular-architects/module-federation';
|
|
4
|
-
import * as i1 from '@pepperi-addons/ngx-lib';
|
|
5
|
-
|
|
6
|
-
// declare let __webpack_public_path__;
|
|
7
|
-
class PepPluginProxyComponent {
|
|
8
|
-
constructor(pepAddonService) {
|
|
9
|
-
this.pepAddonService = pepAddonService;
|
|
10
|
-
this._options = null;
|
|
11
|
-
// This is the data passed by the API Design documentation.
|
|
12
|
-
this._hostObject = null;
|
|
13
|
-
this.hostEvents = new EventEmitter();
|
|
14
|
-
this.load = new EventEmitter();
|
|
15
|
-
}
|
|
16
|
-
set options(value) {
|
|
17
|
-
this._options = value;
|
|
18
|
-
if (value) {
|
|
19
|
-
this.loadModule();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
get options() {
|
|
23
|
-
return this._options;
|
|
24
|
-
}
|
|
25
|
-
set hostObject(value) {
|
|
26
|
-
this._hostObject = value;
|
|
27
|
-
this.setHostComponentIntoComponentRef();
|
|
28
|
-
}
|
|
29
|
-
get hostObject() {
|
|
30
|
-
return this._hostObject;
|
|
31
|
-
}
|
|
32
|
-
setHostComponentIntoComponentRef() {
|
|
33
|
-
if (this.hostObject && this.compRef?.instance) {
|
|
34
|
-
this.compRef.instance['hostObject'] = this.hostObject;
|
|
35
|
-
// TODO: Check if this is needed?? if not remove this.
|
|
36
|
-
// if (this.compRef?.instance?.ngOnChanges) {
|
|
37
|
-
// this.compRef.instance.ngOnChanges(this.hostObject);
|
|
38
|
-
// }
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
async loadModule() {
|
|
42
|
-
this.viewContainer.clear();
|
|
43
|
-
debugger;
|
|
44
|
-
if (this.options?.addonId && (this.options.type === 'module' || this.options.type === 'script')) {
|
|
45
|
-
const lastSlashIndex = this.options.remoteEntry?.lastIndexOf('/') || -1;
|
|
46
|
-
if (lastSlashIndex > 0) {
|
|
47
|
-
// const publicPathArr = this.options.remoteEntry?.split('/');
|
|
48
|
-
// const publicPath = publicPathArr.slice(0, publicPathArr.length - 1).join('/')+'/';
|
|
49
|
-
// __webpack_public_path__ = publicPath;
|
|
50
|
-
const publicPath = this.options.remoteEntry.substring(0, lastSlashIndex + 1);
|
|
51
|
-
this.pepAddonService.setAddonStaticFolder(publicPath, this.options.addonId);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const componentType = await loadRemoteModule(this.options).then(m => m[this.options.componentName]);
|
|
55
|
-
this.compRef = this.viewContainer.createComponent(componentType);
|
|
56
|
-
if (this.compRef) {
|
|
57
|
-
this.setHostComponentIntoComponentRef();
|
|
58
|
-
this.hostEvents$ = this.compRef.instance['hostEvents']?.subscribe((e) => {
|
|
59
|
-
this.hostEvents.emit(e);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
this.load.emit();
|
|
63
|
-
}
|
|
64
|
-
ngOnChanges() {
|
|
65
|
-
}
|
|
66
|
-
ngOnDestroy() {
|
|
67
|
-
if (this.hostEvents$) {
|
|
68
|
-
this.hostEvents$.unsubscribe();
|
|
69
|
-
}
|
|
70
|
-
this.compRef?.destroy();
|
|
71
|
-
this.viewContainer?.clear();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
PepPluginProxyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepPluginProxyComponent, deps: [{ token: i1.PepAddonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
75
|
-
PepPluginProxyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepPluginProxyComponent, isStandalone: true, selector: "pep-plugin-proxy", inputs: { options: "options", hostObject: "hostObject" }, outputs: { hostEvents: "hostEvents", load: "load" }, viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["placeHolder"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
76
|
-
<ng-container #placeHolder></ng-container>
|
|
77
|
-
`, isInline: true });
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepPluginProxyComponent, decorators: [{
|
|
79
|
-
type: Component,
|
|
80
|
-
args: [{
|
|
81
|
-
standalone: true,
|
|
82
|
-
selector: 'pep-plugin-proxy',
|
|
83
|
-
template: `
|
|
84
|
-
<ng-container #placeHolder></ng-container>
|
|
85
|
-
`
|
|
86
|
-
}]
|
|
87
|
-
}], ctorParameters: function () { return [{ type: i1.PepAddonService }]; }, propDecorators: { viewContainer: [{
|
|
88
|
-
type: ViewChild,
|
|
89
|
-
args: ['placeHolder', { read: ViewContainerRef, static: true }]
|
|
90
|
-
}], options: [{
|
|
91
|
-
type: Input
|
|
92
|
-
}], hostObject: [{
|
|
93
|
-
type: Input
|
|
94
|
-
}], hostEvents: [{
|
|
95
|
-
type: Output
|
|
96
|
-
}], load: [{
|
|
97
|
-
type: Output
|
|
98
|
-
}] } });
|
|
99
|
-
|
|
100
|
-
/*
|
|
101
|
-
* Public API Surface of ngx-lib/plugin
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Generated bundle index. Do not edit.
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
export { PepPluginProxyComponent };
|
|
109
|
-
//# sourceMappingURL=pepperi-addons-ngx-lib-plugin.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-plugin.mjs","sources":["../../../projects/ngx-lib/plugin/plugin-proxy.component.ts","../../../projects/ngx-lib/plugin/public-api.ts","../../../projects/ngx-lib/plugin/pepperi-addons-ngx-lib-plugin.ts"],"sourcesContent":["import { Component, ComponentRef, EventEmitter, Input, OnChanges, OnDestroy, Output, ViewChild, ViewContainerRef } from '@angular/core';\nimport { loadRemoteModule } from '@angular-architects/module-federation';\nimport { PepAddonService } from '@pepperi-addons/ngx-lib';\nimport { PepPluginOptions } from './plugin.model';\nimport { Subscription } from 'rxjs';\n// declare let __webpack_public_path__;\n\n@Component({\n standalone: true,\n selector: 'pep-plugin-proxy',\n template: `\n <ng-container #placeHolder></ng-container>\n `\n})\nexport class PepPluginProxyComponent implements OnChanges, OnDestroy {\n @ViewChild('placeHolder', { read: ViewContainerRef, static: true })\n viewContainer: ViewContainerRef;\n \n private _options: PepPluginOptions = null;\n @Input()\n set options(value: PepPluginOptions) {\n this._options = value;\n if (value) {\n this.loadModule();\n }\n }\n get options(): PepPluginOptions {\n return this._options;\n }\n\n // This is the data passed by the API Design documentation.\n private _hostObject: any = null;\n @Input()\n set hostObject(value: any) { \n this._hostObject = value;\n this.setHostComponentIntoComponentRef();\n }\n get hostObject(): any {\n return this._hostObject;\n }\n\n @Output() hostEvents: EventEmitter<any> = new EventEmitter();\n @Output() load: EventEmitter<any> = new EventEmitter();\n\n private compRef: ComponentRef<any>;\n private hostEvents$: Subscription;\n\n constructor(\n private pepAddonService: PepAddonService,\n ) { }\n\n private setHostComponentIntoComponentRef() {\n if (this.hostObject && this.compRef?.instance) {\n this.compRef.instance['hostObject'] = this.hostObject;\n\n // TODO: Check if this is needed?? if not remove this.\n // if (this.compRef?.instance?.ngOnChanges) {\n // this.compRef.instance.ngOnChanges(this.hostObject);\n // }\n }\n }\n\n private async loadModule() {\n this.viewContainer.clear();\n \n debugger;\n \n if (this.options?.addonId && (this.options.type === 'module' || this.options.type === 'script')) {\n \n const lastSlashIndex = this.options.remoteEntry?.lastIndexOf('/') || -1;\n if (lastSlashIndex > 0) {\n // const publicPathArr = this.options.remoteEntry?.split('/');\n // const publicPath = publicPathArr.slice(0, publicPathArr.length - 1).join('/')+'/';\n // __webpack_public_path__ = publicPath;\n \n const publicPath = this.options.remoteEntry.substring(0, lastSlashIndex + 1);\n this.pepAddonService.setAddonStaticFolder(publicPath, this.options.addonId);\n }\n }\n\n const componentType = await loadRemoteModule(this.options).then(m => m[this.options.componentName]);\n this.compRef = this.viewContainer.createComponent(componentType);\n \n if (this.compRef) {\n this.setHostComponentIntoComponentRef();\n \n this.hostEvents$ = this.compRef.instance['hostEvents']?.subscribe((e: any) => {\n this.hostEvents.emit(e)\n });\n }\n\n this.load.emit();\n }\n\n ngOnChanges() {\n }\n \n ngOnDestroy(): void {\n if (this.hostEvents$) {\n this.hostEvents$.unsubscribe();\n }\n\n this.compRef?.destroy();\n this.viewContainer?.clear();\n }\n}\n\n","/*\r\n * Public API Surface of ngx-lib/plugin\r\n */\r\nexport * from './plugin-proxy.component';\r\nexport * from './plugin.model';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAKA;MASa,uBAAuB,CAAA;AAiChC,IAAA,WAAA,CACY,eAAgC,EAAA;QAAhC,IAAe,CAAA,eAAA,GAAf,eAAe,CAAiB;QA9BpC,IAAQ,CAAA,QAAA,GAAqB,IAAI,CAAC;;QAalC,IAAW,CAAA,WAAA,GAAQ,IAAI,CAAC;AAUtB,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAE,CAAC;AACpD,QAAA,IAAA,CAAA,IAAI,GAAuB,IAAI,YAAY,EAAE,CAAC;KAOnD;IA9BL,IACI,OAAO,CAAC,KAAuB,EAAA;AAC/B,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;AACtB,QAAA,IAAI,KAAK,EAAE;YACP,IAAI,CAAC,UAAU,EAAE,CAAC;AACrB,SAAA;KACJ;AACD,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;KACxB;IAID,IACI,UAAU,CAAC,KAAU,EAAA;AACrB,QAAA,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,g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AA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FAEQ,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,CAAA;;AAET,IAAA,CAAA;AACJ,iBAAA,CAAA;sGAGG,aAAa,EAAA,CAAA;sBADZ,SAAS;uBAAC,aAAa,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;gBAK9D,OAAO,EAAA,CAAA;sBADV,KAAK;gBAcF,UAAU,EAAA,CAAA;sBADb,KAAK;gBASI,UAAU,EAAA,CAAA;sBAAnB,MAAM;gBACG,IAAI,EAAA,CAAA;sBAAb,MAAM;;;AC1CX;;AAEG;;ACFH;;AAEG;;;;"}
|
package/plugin/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnDestroy, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { PepAddonService } from '@pepperi-addons/ngx-lib';
|
|
3
|
-
import { PepPluginOptions } from './plugin.model';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class PepPluginProxyComponent implements OnChanges, OnDestroy {
|
|
6
|
-
private pepAddonService;
|
|
7
|
-
viewContainer: ViewContainerRef;
|
|
8
|
-
private _options;
|
|
9
|
-
set options(value: PepPluginOptions);
|
|
10
|
-
get options(): PepPluginOptions;
|
|
11
|
-
private _hostObject;
|
|
12
|
-
set hostObject(value: any);
|
|
13
|
-
get hostObject(): any;
|
|
14
|
-
hostEvents: EventEmitter<any>;
|
|
15
|
-
load: EventEmitter<any>;
|
|
16
|
-
private compRef;
|
|
17
|
-
private hostEvents$;
|
|
18
|
-
constructor(pepAddonService: PepAddonService);
|
|
19
|
-
private setHostComponentIntoComponentRef;
|
|
20
|
-
private loadModule;
|
|
21
|
-
ngOnChanges(): void;
|
|
22
|
-
ngOnDestroy(): void;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PepPluginProxyComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PepPluginProxyComponent, "pep-plugin-proxy", never, { "options": "options"; "hostObject": "hostObject"; }, { "hostEvents": "hostEvents"; "load": "load"; }, never, never, true>;
|
|
25
|
-
}
|
package/plugin/plugin.model.d.ts
DELETED
package/plugin/public-api.d.ts
DELETED