@paperless/angular 0.1.0-alpha.161 → 0.1.0-alpha.162
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/esm2020/lib/directives/index.mjs +4 -1
- package/esm2020/lib/directives/p-table-definition.directive.mjs +52 -0
- package/esm2020/lib/paperless.module.mjs +3 -2
- package/fesm2015/paperless-angular.mjs +102 -54
- package/fesm2015/paperless-angular.mjs.map +1 -1
- package/fesm2020/paperless-angular.mjs +102 -54
- package/fesm2020/paperless-angular.mjs.map +1 -1
- package/lib/directives/index.d.ts +3 -1
- package/lib/directives/p-table-definition.directive.d.ts +20 -0
- package/lib/paperless.module.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, EventEmitter, Input, Output, ViewChild, Directive, HostListener, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, EventEmitter, Input, Output, ViewChild, Directive, HostListener, TemplateRef, ChangeDetectionStrategy, ContentChild, NgModule } from '@angular/core';
|
|
3
3
|
import { FormControl, FormGroup, FormArray, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
4
|
import { __decorate } from 'tslib';
|
|
5
5
|
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
@@ -432,6 +432,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
|
|
|
432
432
|
}]
|
|
433
433
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
434
434
|
|
|
435
|
+
/* eslint-disable */
|
|
436
|
+
const proxyInputs = (Cmp, inputs) => {
|
|
437
|
+
const Prototype = Cmp.prototype;
|
|
438
|
+
inputs.forEach(item => {
|
|
439
|
+
Object.defineProperty(Prototype, item, {
|
|
440
|
+
get() {
|
|
441
|
+
return this.el[item];
|
|
442
|
+
},
|
|
443
|
+
set(val) {
|
|
444
|
+
this.z.runOutsideAngular(() => (this.el[item] = val));
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
};
|
|
449
|
+
const proxyMethods = (Cmp, methods) => {
|
|
450
|
+
const Prototype = Cmp.prototype;
|
|
451
|
+
methods.forEach(methodName => {
|
|
452
|
+
Prototype[methodName] = function () {
|
|
453
|
+
const args = arguments;
|
|
454
|
+
return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));
|
|
455
|
+
};
|
|
456
|
+
});
|
|
457
|
+
};
|
|
458
|
+
const proxyOutputs = (instance, el, events) => {
|
|
459
|
+
events.forEach(eventName => instance[eventName] = fromEvent(el, eventName));
|
|
460
|
+
};
|
|
461
|
+
const defineCustomElement = (tagName, customElement) => {
|
|
462
|
+
if (customElement !== undefined &&
|
|
463
|
+
typeof customElements !== 'undefined' &&
|
|
464
|
+
!customElements.get(tagName)) {
|
|
465
|
+
customElements.define(tagName, customElement);
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
// tslint:disable-next-line: only-arrow-functions
|
|
469
|
+
function ProxyCmp(opts) {
|
|
470
|
+
const decorator = function (cls) {
|
|
471
|
+
const { defineCustomElementFn, inputs, methods } = opts;
|
|
472
|
+
if (defineCustomElementFn !== undefined) {
|
|
473
|
+
defineCustomElementFn();
|
|
474
|
+
}
|
|
475
|
+
if (inputs) {
|
|
476
|
+
proxyInputs(cls, inputs);
|
|
477
|
+
}
|
|
478
|
+
if (methods) {
|
|
479
|
+
proxyMethods(cls, methods);
|
|
480
|
+
}
|
|
481
|
+
return cls;
|
|
482
|
+
};
|
|
483
|
+
return decorator;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
let TableDefinition = class TableDefinition {
|
|
487
|
+
constructor(c, r, z, _vc) {
|
|
488
|
+
this.z = z;
|
|
489
|
+
this._vc = _vc;
|
|
490
|
+
c.detach();
|
|
491
|
+
this.el = r.nativeElement;
|
|
492
|
+
proxyOutputs(this, this.el, ['tableDefinitionChanged']);
|
|
493
|
+
}
|
|
494
|
+
ngOnInit() {
|
|
495
|
+
console.log('Ng On Init');
|
|
496
|
+
console.log(this.templateRef);
|
|
497
|
+
console.log(this.templateRef
|
|
498
|
+
? this._vc.createEmbeddedView(this.templateRef, {
|
|
499
|
+
value: 'test',
|
|
500
|
+
item: { value: 'test' },
|
|
501
|
+
index: 123,
|
|
502
|
+
})
|
|
503
|
+
: null);
|
|
504
|
+
}
|
|
505
|
+
template(data) {
|
|
506
|
+
if (!this.templateRef) {
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
return this._vc.createEmbeddedView(this.templateRef, data);
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
TableDefinition.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TableDefinition, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
513
|
+
TableDefinition.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: TableDefinition, selector: "p-table-definition", inputs: { align: "align", name: "name", path: "path", sizes: "sizes", type: "type" }, queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
514
|
+
TableDefinition = __decorate([
|
|
515
|
+
ProxyCmp({
|
|
516
|
+
defineCustomElementFn: undefined,
|
|
517
|
+
inputs: ['align', 'name', 'path', 'sizes', 'type', 'template'],
|
|
518
|
+
})
|
|
519
|
+
], TableDefinition);
|
|
520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TableDefinition, decorators: [{
|
|
521
|
+
type: Component,
|
|
522
|
+
args: [{
|
|
523
|
+
selector: 'p-table-definition',
|
|
524
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
525
|
+
template: '',
|
|
526
|
+
inputs: ['align', 'name', 'path', 'sizes', 'type'],
|
|
527
|
+
}]
|
|
528
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ViewContainerRef }]; }, propDecorators: { templateRef: [{
|
|
529
|
+
type: ContentChild,
|
|
530
|
+
args: [TemplateRef, { static: false }]
|
|
531
|
+
}] } });
|
|
532
|
+
|
|
435
533
|
class TableFooterDirective extends BaseValueAccessor {
|
|
436
534
|
constructor(el) {
|
|
437
535
|
super(el);
|
|
@@ -616,59 +714,9 @@ const CUSTOM_DIRECTIVES = [
|
|
|
616
714
|
TableFooterDirective,
|
|
617
715
|
TableHeaderDirective,
|
|
618
716
|
TableDirective,
|
|
717
|
+
TableDefinition,
|
|
619
718
|
];
|
|
620
719
|
|
|
621
|
-
/* eslint-disable */
|
|
622
|
-
const proxyInputs = (Cmp, inputs) => {
|
|
623
|
-
const Prototype = Cmp.prototype;
|
|
624
|
-
inputs.forEach(item => {
|
|
625
|
-
Object.defineProperty(Prototype, item, {
|
|
626
|
-
get() {
|
|
627
|
-
return this.el[item];
|
|
628
|
-
},
|
|
629
|
-
set(val) {
|
|
630
|
-
this.z.runOutsideAngular(() => (this.el[item] = val));
|
|
631
|
-
}
|
|
632
|
-
});
|
|
633
|
-
});
|
|
634
|
-
};
|
|
635
|
-
const proxyMethods = (Cmp, methods) => {
|
|
636
|
-
const Prototype = Cmp.prototype;
|
|
637
|
-
methods.forEach(methodName => {
|
|
638
|
-
Prototype[methodName] = function () {
|
|
639
|
-
const args = arguments;
|
|
640
|
-
return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));
|
|
641
|
-
};
|
|
642
|
-
});
|
|
643
|
-
};
|
|
644
|
-
const proxyOutputs = (instance, el, events) => {
|
|
645
|
-
events.forEach(eventName => instance[eventName] = fromEvent(el, eventName));
|
|
646
|
-
};
|
|
647
|
-
const defineCustomElement = (tagName, customElement) => {
|
|
648
|
-
if (customElement !== undefined &&
|
|
649
|
-
typeof customElements !== 'undefined' &&
|
|
650
|
-
!customElements.get(tagName)) {
|
|
651
|
-
customElements.define(tagName, customElement);
|
|
652
|
-
}
|
|
653
|
-
};
|
|
654
|
-
// tslint:disable-next-line: only-arrow-functions
|
|
655
|
-
function ProxyCmp(opts) {
|
|
656
|
-
const decorator = function (cls) {
|
|
657
|
-
const { defineCustomElementFn, inputs, methods } = opts;
|
|
658
|
-
if (defineCustomElementFn !== undefined) {
|
|
659
|
-
defineCustomElementFn();
|
|
660
|
-
}
|
|
661
|
-
if (inputs) {
|
|
662
|
-
proxyInputs(cls, inputs);
|
|
663
|
-
}
|
|
664
|
-
if (methods) {
|
|
665
|
-
proxyMethods(cls, methods);
|
|
666
|
-
}
|
|
667
|
-
return cls;
|
|
668
|
-
};
|
|
669
|
-
return decorator;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
720
|
let PAccordion = class PAccordion {
|
|
673
721
|
constructor(c, r, z) {
|
|
674
722
|
this.z = z;
|
|
@@ -1898,7 +1946,7 @@ const DIRECTIVES = [
|
|
|
1898
1946
|
class PaperlessModule {
|
|
1899
1947
|
}
|
|
1900
1948
|
PaperlessModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PaperlessModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1901
|
-
PaperlessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: PaperlessModule, declarations: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PaginationDirective, PageSizeSelectDirective, TableFooterDirective, TableHeaderDirective, TableDirective], exports: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PaginationDirective, PageSizeSelectDirective, TableFooterDirective, TableHeaderDirective, TableDirective] });
|
|
1949
|
+
PaperlessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: PaperlessModule, declarations: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PaginationDirective, PageSizeSelectDirective, TableFooterDirective, TableHeaderDirective, TableDirective, TableDefinition], exports: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PaginationDirective, PageSizeSelectDirective, TableFooterDirective, TableHeaderDirective, TableDirective, TableDefinition] });
|
|
1902
1950
|
PaperlessModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PaperlessModule });
|
|
1903
1951
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PaperlessModule, decorators: [{
|
|
1904
1952
|
type: NgModule,
|
|
@@ -1916,5 +1964,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
|
|
|
1916
1964
|
* Generated bundle index. Do not edit.
|
|
1917
1965
|
*/
|
|
1918
1966
|
|
|
1919
|
-
export { BaseTableComponent, BaseUploadComponent, BaseValueAccessor, CUSTOM_DIRECTIVES, FormBaseComponent, PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PageSizeSelectDirective, PaginationDirective, PaperlessModule, TableDirective, TableFooterDirective, TableHeaderDirective };
|
|
1967
|
+
export { BaseTableComponent, BaseUploadComponent, BaseValueAccessor, CUSTOM_DIRECTIVES, FormBaseComponent, PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PageSizeSelectDirective, PaginationDirective, PaperlessModule, TableDefinition, TableDirective, TableFooterDirective, TableHeaderDirective };
|
|
1920
1968
|
//# sourceMappingURL=paperless-angular.mjs.map
|