@coolon/angular-ui-powerups 13.7.20 → 13.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/esm2020/lib/components/cards/card-container/card-container.component.mjs +1 -1
- package/esm2020/lib/components/scroll-container/scroll-container.component.mjs +27 -7
- package/esm2020/lib/components/tables/column/list-propery-column-model.mjs +12 -6
- package/esm2020/lib/components/tables/column/property-column-model.mjs +9 -5
- package/fesm2015/coolon-angular-ui-powerups.mjs +42 -15
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +40 -15
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/scroll-container/scroll-container.component.d.ts +6 -3
- package/lib/components/tables/column/list-propery-column-model.d.ts +4 -3
- package/lib/components/tables/column/property-column-model.d.ts +5 -4
- package/package.json +2 -2
|
@@ -800,17 +800,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImpor
|
|
|
800
800
|
args: ['attr.color']
|
|
801
801
|
}] } });
|
|
802
802
|
|
|
803
|
-
class ScrollContainerComponent {
|
|
804
|
-
constructor() {
|
|
803
|
+
class ScrollContainerComponent extends DisposableComponent {
|
|
804
|
+
constructor() {
|
|
805
|
+
super();
|
|
806
|
+
}
|
|
805
807
|
ngOnInit() {
|
|
806
808
|
}
|
|
807
809
|
}
|
|
808
810
|
ScrollContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: ScrollContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
809
|
-
ScrollContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: ScrollContainerComponent, selector: "aup-scroll-container", ngImport: i0, template: "<div class=\"container\" cdkScrollable>\n
|
|
811
|
+
ScrollContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: ScrollContainerComponent, selector: "aup-scroll-container", inputs: { disableScroll$: "disableScroll$", disableScroll: "disableScroll" }, host: { properties: { "class.disable-scroll": "this.disableScroll" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"scroll-container\" cdkScrollable>\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host:not(.disable-scroll){min-height:0}:host:not(.disable-scroll)>.scroll-container{flex-basis:0;overflow-y:scroll;align-items:stretch}:host>.scroll-container{display:flex;flex-direction:column;flex:1}\n"], directives: [{ type: i1$5.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }] });
|
|
812
|
+
__decorate([
|
|
813
|
+
TrackExternal({ defaultValue: false }),
|
|
814
|
+
__metadata("design:type", ValueModel)
|
|
815
|
+
], ScrollContainerComponent.prototype, "disableScroll$", void 0);
|
|
816
|
+
__decorate([
|
|
817
|
+
StoreInValueModel("disableScroll$"),
|
|
818
|
+
__metadata("design:type", Boolean)
|
|
819
|
+
], ScrollContainerComponent.prototype, "disableScroll", void 0);
|
|
810
820
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: ScrollContainerComponent, decorators: [{
|
|
811
821
|
type: Component,
|
|
812
|
-
args: [{ selector:
|
|
813
|
-
}], ctorParameters: function () { return []; }
|
|
822
|
+
args: [{ selector: "aup-scroll-container", template: "<div class=\"scroll-container\" cdkScrollable>\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host:not(.disable-scroll){min-height:0}:host:not(.disable-scroll)>.scroll-container{flex-basis:0;overflow-y:scroll;align-items:stretch}:host>.scroll-container{display:flex;flex-direction:column;flex:1}\n"] }]
|
|
823
|
+
}], ctorParameters: function () { return []; }, propDecorators: { disableScroll$: [{
|
|
824
|
+
type: Input
|
|
825
|
+
}], disableScroll: [{
|
|
826
|
+
type: Input
|
|
827
|
+
}, {
|
|
828
|
+
type: HostBinding,
|
|
829
|
+
args: ["class.disable-scroll"]
|
|
830
|
+
}] } });
|
|
814
831
|
|
|
815
832
|
/**
|
|
816
833
|
* @example
|
|
@@ -915,7 +932,7 @@ class CardContainerComponent extends AbstractCardContainerComponent {
|
|
|
915
932
|
}
|
|
916
933
|
}
|
|
917
934
|
CardContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: CardContainerComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
918
|
-
CardContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: CardContainerComponent, selector: "aup-card-container", inputs: { columnCount: "columnCount", enabledScroll: "enabledScroll" }, host: { properties: { "class.auto-columns": "this.isAutoColumns", "class.single-column": "this.isSingleColumn" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"header-container\">\n <ng-content select=\"[card-container-header]\"></ng-content>\n</div>\n\n<ng-template #content>\n <div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-command-face *ngIf=\"addCardFace\" [faces]=\"[addCardFace]\"></aup-command-face>\n <aup-icon *ngIf=\"!addCardFace\" icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<div class=\"no-scroll-container\" *ngIf=\"!enabledScroll\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</div>\n\n<aup-scroll-container *ngIf=\"enabledScroll\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</aup-scroll-container>\n\n<div class=\"footer-container\">\n <ng-content select=\"[card-container-footer]\"></ng-content>\n</div>\n\n", styles: [":host{--resolved-card-gap: var(--card-gap, 16px);--resolved-card-width: var(--card-width, 300px);--resolved-card-max-width: var(--card-max-width, auto);--resolved-card-height: var(--card-height, auto);--resolved-card-min-height: var(--card-min-height, auto);--resolved-card-background: var(--card-background, var(--aup-card-container-default-background-color));flex:1;display:flex;flex-direction:column;align-items:stretch;background:var(--resolved-card-background)}:host.auto-columns .card-container{grid-template-columns:repeat(auto-fit,minmax(var(--resolved-card-width),var(--resolved-card-max-width)));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap))}:host:not(.auto-columns) .card-container{grid-template-columns:repeat(var(--aup-card-container-column-count),1fr)}.card-container{display:grid;box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));max-width:100%;grid-auto-rows:minmax(var(--resolved-card-min-height),var(--resolved-card-height));grid-gap:var(--resolved-card-gap)}aup-scroll-container,.no-scroll-container{flex:1}.add-card-container{height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.add-card-container:hover{border-color:transparent;background-color:#fff;color:#0000008a}.add-card-template-container{height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}\n"], components: [{ type: CommandFaceComponent, selector: "aup-command-face", inputs: ["faces", "face", "ignoreIcon", "ignoreText", "includeMissingIconInLayout"] }, { type: IconComponent, selector: "aup-icon", inputs: ["icon"] }, { type: ScrollContainerComponent, selector: "aup-scroll-container" }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
935
|
+
CardContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: CardContainerComponent, selector: "aup-card-container", inputs: { columnCount: "columnCount", enabledScroll: "enabledScroll" }, host: { properties: { "class.auto-columns": "this.isAutoColumns", "class.single-column": "this.isSingleColumn" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"header-container\">\n <ng-content select=\"[card-container-header]\"></ng-content>\n</div>\n\n<ng-template #content>\n <div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-command-face *ngIf=\"addCardFace\" [faces]=\"[addCardFace]\"></aup-command-face>\n <aup-icon *ngIf=\"!addCardFace\" icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<div class=\"no-scroll-container\" *ngIf=\"!enabledScroll\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</div>\n\n<aup-scroll-container *ngIf=\"enabledScroll\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</aup-scroll-container>\n\n<div class=\"footer-container\">\n <ng-content select=\"[card-container-footer]\"></ng-content>\n</div>\n\n", styles: [":host{--resolved-card-gap: var(--card-gap, 16px);--resolved-card-width: var(--card-width, 300px);--resolved-card-max-width: var(--card-max-width, auto);--resolved-card-height: var(--card-height, auto);--resolved-card-min-height: var(--card-min-height, auto);--resolved-card-background: var(--card-background, var(--aup-card-container-default-background-color));flex:1;display:flex;flex-direction:column;align-items:stretch;background:var(--resolved-card-background)}:host.auto-columns .card-container{grid-template-columns:repeat(auto-fit,minmax(var(--resolved-card-width),var(--resolved-card-max-width)));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap))}:host:not(.auto-columns) .card-container{grid-template-columns:repeat(var(--aup-card-container-column-count),1fr)}.card-container{display:grid;box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));max-width:100%;grid-auto-rows:minmax(var(--resolved-card-min-height),var(--resolved-card-height));grid-gap:var(--resolved-card-gap)}aup-scroll-container,.no-scroll-container{flex:1}.add-card-container{height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.add-card-container:hover{border-color:transparent;background-color:#fff;color:#0000008a}.add-card-template-container{height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}\n"], components: [{ type: CommandFaceComponent, selector: "aup-command-face", inputs: ["faces", "face", "ignoreIcon", "ignoreText", "includeMissingIconInLayout"] }, { type: IconComponent, selector: "aup-icon", inputs: ["icon"] }, { type: ScrollContainerComponent, selector: "aup-scroll-container", inputs: ["disableScroll$", "disableScroll"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
919
936
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: CardContainerComponent, decorators: [{
|
|
920
937
|
type: Component,
|
|
921
938
|
args: [{ selector: 'aup-card-container', template: "<div class=\"header-container\">\n <ng-content select=\"[card-container-header]\"></ng-content>\n</div>\n\n<ng-template #content>\n <div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-command-face *ngIf=\"addCardFace\" [faces]=\"[addCardFace]\"></aup-command-face>\n <aup-icon *ngIf=\"!addCardFace\" icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<div class=\"no-scroll-container\" *ngIf=\"!enabledScroll\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</div>\n\n<aup-scroll-container *ngIf=\"enabledScroll\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</aup-scroll-container>\n\n<div class=\"footer-container\">\n <ng-content select=\"[card-container-footer]\"></ng-content>\n</div>\n\n", styles: [":host{--resolved-card-gap: var(--card-gap, 16px);--resolved-card-width: var(--card-width, 300px);--resolved-card-max-width: var(--card-max-width, auto);--resolved-card-height: var(--card-height, auto);--resolved-card-min-height: var(--card-min-height, auto);--resolved-card-background: var(--card-background, var(--aup-card-container-default-background-color));flex:1;display:flex;flex-direction:column;align-items:stretch;background:var(--resolved-card-background)}:host.auto-columns .card-container{grid-template-columns:repeat(auto-fit,minmax(var(--resolved-card-width),var(--resolved-card-max-width)));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap))}:host:not(.auto-columns) .card-container{grid-template-columns:repeat(var(--aup-card-container-column-count),1fr)}.card-container{display:grid;box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));max-width:100%;grid-auto-rows:minmax(var(--resolved-card-min-height),var(--resolved-card-height));grid-gap:var(--resolved-card-gap)}aup-scroll-container,.no-scroll-container{flex:1}.add-card-container{height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.add-card-container:hover{border-color:transparent;background-color:#fff;color:#0000008a}.add-card-template-container{height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}\n"] }]
|
|
@@ -3080,15 +3097,20 @@ class ListPropertyColumnModel extends ColumnModel {
|
|
|
3080
3097
|
constructor(id, property, defaults) {
|
|
3081
3098
|
super(id, defaults);
|
|
3082
3099
|
this.property = property;
|
|
3083
|
-
this.
|
|
3100
|
+
this._defaultSearchTextFormat = value => {
|
|
3101
|
+
const intermediate = (this._userFormat ?? Functions.identity)(value);
|
|
3102
|
+
return Array.isArray(intermediate) ?
|
|
3103
|
+
intermediate.map(v => v?.toString()).join(", ") :
|
|
3104
|
+
intermediate?.toString();
|
|
3105
|
+
};
|
|
3084
3106
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
3085
3107
|
}
|
|
3086
3108
|
cellRenderer(componentType) {
|
|
3087
|
-
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(
|
|
3109
|
+
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(this._defaultSearchTextFormat)), row => row[this.property]);
|
|
3088
3110
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
3089
|
-
|
|
3111
|
+
const rowValue = rowData.row[this.property];
|
|
3090
3112
|
// @ts-ignore Started complaining in ts 4.5.. but I think my logic is correct...
|
|
3091
|
-
component.value = this.
|
|
3113
|
+
component.value = (this._userFormat) ? this._userFormat(rowValue) : rowValue;
|
|
3092
3114
|
}));
|
|
3093
3115
|
return this;
|
|
3094
3116
|
}
|
|
@@ -3109,7 +3131,7 @@ class ListPropertyColumnModel extends ColumnModel {
|
|
|
3109
3131
|
}
|
|
3110
3132
|
format(formatter) {
|
|
3111
3133
|
assert$1.isFunction(formatter);
|
|
3112
|
-
this.
|
|
3134
|
+
this._userFormat = formatter;
|
|
3113
3135
|
return this;
|
|
3114
3136
|
}
|
|
3115
3137
|
selectRowOnClick(selectRowOnClick) {
|
|
@@ -3121,11 +3143,13 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3121
3143
|
constructor(id, property, defaults) {
|
|
3122
3144
|
super(id, defaults);
|
|
3123
3145
|
this.property = property;
|
|
3124
|
-
this.
|
|
3146
|
+
this._defaultSearchTextFormatter = (value) => {
|
|
3147
|
+
return (this._userFormat ?? Functions.identity)(value)?.toString();
|
|
3148
|
+
};
|
|
3125
3149
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
3126
3150
|
}
|
|
3127
3151
|
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
3128
|
-
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(
|
|
3152
|
+
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(this._defaultSearchTextFormatter)), row => row[this.property]);
|
|
3129
3153
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3130
3154
|
if (firstTime) {
|
|
3131
3155
|
if (isFunction$1(onComponentInitOrOptions)) {
|
|
@@ -3137,7 +3161,8 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3137
3161
|
}
|
|
3138
3162
|
}
|
|
3139
3163
|
}
|
|
3140
|
-
|
|
3164
|
+
const rowValue = rowData.row[this.property];
|
|
3165
|
+
component.value = this._userFormat ? this._userFormat(rowValue) : rowValue;
|
|
3141
3166
|
}));
|
|
3142
3167
|
return this;
|
|
3143
3168
|
}
|
|
@@ -3194,7 +3219,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3194
3219
|
}
|
|
3195
3220
|
format(formatter) {
|
|
3196
3221
|
assert$1.isFunction(formatter);
|
|
3197
|
-
this.
|
|
3222
|
+
this._userFormat = formatter;
|
|
3198
3223
|
return this;
|
|
3199
3224
|
}
|
|
3200
3225
|
selectRowOnClick(selectOnRowClick) {
|