xt-plugin-sample 0.4.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/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # SamplePlugin
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.1.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project sample-plugin` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project sample-plugin`.
8
+ > Note: Don't forget to add `--project sample-plugin` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build sample-plugin` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build sample-plugin`, go to the dist folder `cd dist/sample-plugin` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test sample-plugin` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
@@ -0,0 +1,117 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, inject, Injector, signal, computed, runInInjectionContext } from '@angular/core';
3
+ import { XtSimpleComponent, XtCompositeComponent, XtRenderSubComponent } from 'xt-components';
4
+ import * as i1 from '@angular/forms';
5
+ import { ReactiveFormsModule } from '@angular/forms';
6
+ import * as i3 from 'primeng/inputnumber';
7
+ import { InputNumberModule } from 'primeng/inputnumber';
8
+ import * as i1$1 from '@angular/common';
9
+ import { CommonModule } from '@angular/common';
10
+ import * as i2 from 'primeng/inputtext';
11
+ import { InputTextModule } from 'primeng/inputtext';
12
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
13
+
14
+ class SampleHelloComponent extends XtSimpleComponent {
15
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SampleHelloComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
16
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: SampleHelloComponent, isStandalone: true, selector: "xt-sample-hello", usesInheritance: true, ngImport: i0, template: "<p>Hello {{getValue()}}</p>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17
+ }
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SampleHelloComponent, decorators: [{
19
+ type: Component,
20
+ args: [{ selector: 'xt-sample-hello', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p>Hello {{getValue()}}</p>\n" }]
21
+ }] });
22
+
23
+ class SampleCurrencyComponent extends XtSimpleComponent {
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SampleCurrencyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
25
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: SampleCurrencyComponent, isStandalone: true, selector: "xt-sample-currency", usesInheritance: true, ngImport: i0, template: "@if (isInForm() ) {\n <ng-container [formGroup]=\"formGroup()\">\n <input type=\"text\" pInputText [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" />\n </ng-container>\n} @else {\n {{ context().displayValue() }}\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: InputNumberModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
26
+ }
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SampleCurrencyComponent, decorators: [{
28
+ type: Component,
29
+ args: [{ selector: 'xt-sample-currency', standalone: true, imports: [CommonModule, InputNumberModule, ReactiveFormsModule, InputTextModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isInForm() ) {\n <ng-container [formGroup]=\"formGroup()\">\n <input type=\"text\" pInputText [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" />\n </ng-container>\n} @else {\n {{ context().displayValue() }}\n}\n" }]
30
+ }] });
31
+
32
+ class SampleMoneyComponent extends XtCompositeComponent {
33
+ constructor() {
34
+ super(...arguments);
35
+ this.injector = inject(Injector);
36
+ // Force a recalculation of currency
37
+ this.recalculate = signal(true);
38
+ this.currency = computed(() => {
39
+ // console.debug("Calculating currency in XtMoneyComponent");
40
+ this.recalculate();
41
+ const value = this.context().value();
42
+ if (value == null)
43
+ return undefined;
44
+ return value.currency;
45
+ });
46
+ this.amount = computed(() => {
47
+ return this.context().displayValue()?.amount;
48
+ });
49
+ }
50
+ ngOnInit() {
51
+ // console.debug("XtMoneyComponent ngOnInit");
52
+ const amountCtrl = this.manageFormControl('amount');
53
+ // Make sure the display is updated whenever the value change in the formgroup
54
+ runInInjectionContext(this.injector, () => {
55
+ if (amountCtrl?.parent != null) {
56
+ amountCtrl.parent.valueChanges.pipe(takeUntilDestroyed()).subscribe({
57
+ next: value => {
58
+ // Is the value a known currency ?
59
+ if (Intl.supportedValuesOf('currency').indexOf(value.currency) > -1) {
60
+ this.recalculate.set(!this.recalculate());
61
+ }
62
+ }
63
+ });
64
+ }
65
+ });
66
+ }
67
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SampleMoneyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
68
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: SampleMoneyComponent, isStandalone: true, selector: "xt-sample-money", usesInheritance: true, ngImport: i0, template: "@if (isInForm() ) {\n @let cur = currency();\n <ng-container [formGroup]=\"formGroup()\">\n <xt-render-sub [context]=\"subContext('currency', 'sampleCurrency')\" />\n @if (cur != null) {\n <p-inputNumber mode=\"currency\" [currency]=\"cur\" formControlName=\"amount\" />\n } @else {\n <p-inputNumber mode=\"decimal\" formControlName=\"amount\" />\n }\n </ng-container>\n} @else {\n @let displayAmount = amount();\n @if (displayAmount) {\n {{ displayAmount | currency : currency() }}\n }\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: XtRenderSubComponent, selector: "xt-render-sub", inputs: ["context", "componentType"], outputs: ["outputs"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i3.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled", "fluid"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SampleMoneyComponent, decorators: [{
71
+ type: Component,
72
+ args: [{ selector: 'xt-sample-money', standalone: true, imports: [CommonModule, ReactiveFormsModule, XtRenderSubComponent, InputNumberModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isInForm() ) {\n @let cur = currency();\n <ng-container [formGroup]=\"formGroup()\">\n <xt-render-sub [context]=\"subContext('currency', 'sampleCurrency')\" />\n @if (cur != null) {\n <p-inputNumber mode=\"currency\" [currency]=\"cur\" formControlName=\"amount\" />\n } @else {\n <p-inputNumber mode=\"decimal\" formControlName=\"amount\" />\n }\n </ng-container>\n} @else {\n @let displayAmount = amount();\n @if (displayAmount) {\n {{ displayAmount | currency : currency() }}\n }\n}\n" }]
73
+ }] });
74
+
75
+ function registerSamplePlugin(resolverService) {
76
+ console.info('Registering Plugin Sample');
77
+ resolverService.registerPlugin({
78
+ name: 'PluginSample',
79
+ components: [
80
+ {
81
+ componentName: 'SampleHello',
82
+ componentClass: SampleHelloComponent,
83
+ typesHandled: ['sampleHello']
84
+ },
85
+ {
86
+ componentName: 'SampleCurrency',
87
+ componentClass: SampleCurrencyComponent,
88
+ typesHandled: ['sampleCurrency']
89
+ },
90
+ {
91
+ componentName: 'SampleMoney',
92
+ componentClass: SampleMoneyComponent,
93
+ typesHandled: ['sampleMoney']
94
+ },
95
+ ],
96
+ types: {
97
+ sampleHello: 'string',
98
+ sampleCurrency: 'string',
99
+ sampleMoney: {
100
+ amount: 'number',
101
+ currency: 'sampleCurrency'
102
+ }
103
+ }
104
+ });
105
+ return true;
106
+ }
107
+
108
+ /*
109
+ * Public API Surface of sample-plugin
110
+ */
111
+
112
+ /**
113
+ * Generated bundle index. Do not edit.
114
+ */
115
+
116
+ export { SampleCurrencyComponent, SampleHelloComponent, SampleMoneyComponent, registerSamplePlugin };
117
+ //# sourceMappingURL=xt-plugin-sample.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xt-plugin-sample.mjs","sources":["../../../projects/sample/src/lib/hello/sample-hello.component.ts","../../../projects/sample/src/lib/hello/sample-hello.component.html","../../../projects/sample/src/lib/currency/sample-currency.component.ts","../../../projects/sample/src/lib/currency/sample-currency.component.html","../../../projects/sample/src/lib/money/sample-money.component.ts","../../../projects/sample/src/lib/money/sample-money.component.html","../../../projects/sample/src/lib/register.ts","../../../projects/sample/src/public-api.ts","../../../projects/sample/src/xt-plugin-sample.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport {XtSimpleComponent} from 'xt-components';\n\n@Component({\n selector: 'xt-sample-hello',\n standalone: true,\n imports: [],\n templateUrl: './sample-hello.component.html',\n styleUrl: './sample-hello.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n\n})\nexport class SampleHelloComponent extends XtSimpleComponent<string>{\n\n}\n","<p>Hello {{getValue()}}</p>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { InputNumberModule } from 'primeng/inputnumber';\nimport { XtSimpleComponent } from 'xt-components';\nimport { CommonModule } from '@angular/common';\nimport { InputTextModule } from 'primeng/inputtext';\n\n@Component({\n selector: 'xt-sample-currency',\n standalone: true,\n imports: [CommonModule, InputNumberModule, ReactiveFormsModule, InputTextModule],\n templateUrl: './sample-currency.component.html',\n styleUrl: './sample-currency.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SampleCurrencyComponent extends XtSimpleComponent {\n}\n","@if (isInForm() ) {\n <ng-container [formGroup]=\"formGroup()\">\n <input type=\"text\" pInputText [name]=\"componentNameInForm ()\" [formControlName]=\"formControlName()\" />\n </ng-container>\n} @else {\n {{ context().displayValue() }}\n}\n","import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n Injector,\n OnInit,\n runInInjectionContext,\n signal\n} from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { SampleMoney } from './sample-money.model';\nimport { XtCompositeComponent, XtRenderSubComponent } from 'xt-components';\nimport { InputNumberModule } from 'primeng/inputnumber';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\n@Component({\n selector: 'xt-sample-money',\n standalone: true,\n imports: [CommonModule, ReactiveFormsModule, XtRenderSubComponent, InputNumberModule],\n templateUrl: './sample-money.component.html',\n styleUrl: './sample-money.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n\n})\nexport class SampleMoneyComponent extends XtCompositeComponent<SampleMoney> implements OnInit {\n injector = inject(Injector);\n\n // Force a recalculation of currency\n recalculate = signal<boolean>(true);\n\n currency= computed<string|undefined>( () => {\n // console.debug(\"Calculating currency in XtMoneyComponent\");\n this.recalculate();\n const value = this.context().value();\n if (value==null) return undefined;\n return value.currency;\n });\n\n amount = computed<number|undefined>(()=> {\n return this.context().displayValue()?.amount;\n })\n\n ngOnInit(): void {\n// console.debug(\"XtMoneyComponent ngOnInit\");\n const amountCtrl = this.manageFormControl('amount');\n\n // Make sure the display is updated whenever the value change in the formgroup\n runInInjectionContext(this.injector, () => {\n if (amountCtrl?.parent!=null) {\n amountCtrl.parent.valueChanges.pipe(takeUntilDestroyed()).subscribe({\n next: value => {\n // Is the value a known currency ?\n if (Intl.supportedValuesOf('currency').indexOf(value.currency) > -1) {\n this.recalculate.set(!this.recalculate());\n }\n }\n });\n }\n });\n }\n}\n","@if (isInForm() ) {\n @let cur = currency();\n <ng-container [formGroup]=\"formGroup()\">\n <xt-render-sub [context]=\"subContext('currency', 'sampleCurrency')\" />\n @if (cur != null) {\n <p-inputNumber mode=\"currency\" [currency]=\"cur\" formControlName=\"amount\" />\n } @else {\n <p-inputNumber mode=\"decimal\" formControlName=\"amount\" />\n }\n </ng-container>\n} @else {\n @let displayAmount = amount();\n @if (displayAmount) {\n {{ displayAmount | currency : currency() }}\n }\n}\n","import { XtResolverService } from 'xt-components';\nimport { SampleCurrencyComponent } from './currency/sample-currency.component';\nimport { SampleHelloComponent } from './hello/sample-hello.component';\nimport { SampleMoneyComponent } from './money/sample-money.component';\n\nexport function registerSamplePlugin (resolverService:XtResolverService):boolean {\n console.info ('Registering Plugin Sample');\n resolverService.registerPlugin ({\n name:'PluginSample',\n components: [\n {\n componentName:'SampleHello',\n componentClass:SampleHelloComponent,\n typesHandled: ['sampleHello']\n },\n {\n componentName:'SampleCurrency',\n componentClass:SampleCurrencyComponent,\n typesHandled: ['sampleCurrency']\n },\n {\n componentName:'SampleMoney',\n componentClass:SampleMoneyComponent,\n typesHandled: ['sampleMoney']\n },\n ],\n types:\n {\n sampleHello:'string',\n sampleCurrency:'string',\n sampleMoney:{\n amount: 'number',\n currency: 'sampleCurrency'\n }\n }\n });\n return true;\n}\n","/*\n * Public API Surface of sample-plugin\n */\nexport * from './lib/hello/sample-hello.component';\nexport * from './lib/currency/sample-currency.component';\nexport * from './lib/money/sample-money.component';\nexport * from './lib/money/sample-money.model';\nexport * from './lib/register';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;AAYM,MAAO,oBAAqB,SAAQ,iBAAyB,CAAA;8GAAtD,oBAAoB,EAAA,IAAA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,cAAc,EAAC,uBAAuB;gBACtC,YAAY,EAAE,CAAC,gBAAgB;AAClC,aAAA;AACD,YAAA;AACI,gBAAA,aAAa,EAAC,aAAa;AAC3B,gBAAA,cAAc,EAAC,oBAAoB;gBACnC,YAAY,EAAE,CAAC,aAAa;AAC/B,aAAA;AACJ,SAAA;AACD,QAAA,KAAK,EACD;AACI,YAAA,WAAW,EAAC,QAAQ;AACpB,YAAA,cAAc,EAAC,QAAQ;AACvB,YAAA,WAAW,EAAC;AACV,gBAAA,MAAM,EAAE,QAAQ;AAChB,gBAAA,QAAQ,EAAE;AACX;AACN;AACN,KAAA,CAAC;AACF,IAAA,OAAO,IAAI;AACf;;ACrCA;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="xt-plugin-sample" />
5
+ export * from './public-api';
@@ -0,0 +1,6 @@
1
+ import { XtSimpleComponent } from 'xt-components';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SampleCurrencyComponent extends XtSimpleComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<SampleCurrencyComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<SampleCurrencyComponent, "xt-sample-currency", never, {}, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { XtSimpleComponent } from 'xt-components';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SampleHelloComponent extends XtSimpleComponent<string> {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<SampleHelloComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<SampleHelloComponent, "xt-sample-hello", never, {}, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,13 @@
1
+ import { Injector, OnInit } from '@angular/core';
2
+ import { SampleMoney } from './sample-money.model';
3
+ import { XtCompositeComponent } from 'xt-components';
4
+ import * as i0 from "@angular/core";
5
+ export declare class SampleMoneyComponent extends XtCompositeComponent<SampleMoney> implements OnInit {
6
+ injector: Injector;
7
+ recalculate: import("@angular/core").WritableSignal<boolean>;
8
+ currency: import("@angular/core").Signal<string | undefined>;
9
+ amount: import("@angular/core").Signal<number | undefined>;
10
+ ngOnInit(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SampleMoneyComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<SampleMoneyComponent, "xt-sample-money", never, {}, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,4 @@
1
+ export type SampleMoney = {
2
+ amount: number;
3
+ currency: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ import { XtResolverService } from 'xt-components';
2
+ export declare function registerSamplePlugin(resolverService: XtResolverService): boolean;
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "xt-plugin-sample",
3
+ "version": "0.4.0",
4
+ "peerDependencies": {
5
+ "@angular/animations": "^19.0.5",
6
+ "@angular/common": "^19.0.5",
7
+ "@angular/compiler": "^19.0.5",
8
+ "@angular/core": "^19.0.5",
9
+ "@angular/forms": "^19.0.5",
10
+ "@angular/platform-browser": "^19.0.5",
11
+ "@angular/platform-browser-dynamic": "^19.0.5",
12
+ "@angular/router": "^19.0.5",
13
+ "xt-components": "workspace:^",
14
+ "rxjs": "^7.8.0",
15
+ "primeng": "^19.0.2",
16
+ "primeicons": "^7.0.0"
17
+ },
18
+ "dependencies": {
19
+ "tslib": "^2.3.0"
20
+ },
21
+ "sideEffects": false,
22
+ "module": "fesm2022/xt-plugin-sample.mjs",
23
+ "typings": "index.d.ts",
24
+ "exports": {
25
+ "./package.json": {
26
+ "default": "./package.json"
27
+ },
28
+ ".": {
29
+ "types": "./index.d.ts",
30
+ "default": "./fesm2022/xt-plugin-sample.mjs"
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,5 @@
1
+ export * from './lib/hello/sample-hello.component';
2
+ export * from './lib/currency/sample-currency.component';
3
+ export * from './lib/money/sample-money.component';
4
+ export * from './lib/money/sample-money.model';
5
+ export * from './lib/register';