@coolon/angular-ui-powerups 16.1.0-aplpha.151 → 16.1.0-aplpha.152
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/assets/table.scss +1 -1
- package/esm2022/lib/components/components.module.mjs +16 -16
- package/esm2022/lib/components/exports.mjs +4 -4
- package/esm2022/lib/components/loadable-component.mjs +1 -1
- package/esm2022/lib/components/tables/abstract-table-model.mjs +43 -24
- package/esm2022/lib/components/tables/renderer/table-action-column/menu-builder.mjs +2 -0
- package/esm2022/lib/components/tables/renderer/table-action-column/table-action-column.component.mjs +115 -0
- package/esm2022/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu-popup.component.mjs +45 -0
- package/esm2022/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu.component.mjs +71 -0
- package/fesm2022/coolon-angular-ui-powerups.mjs +168 -110
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/components.module.d.ts +4 -4
- package/lib/components/exports.d.ts +3 -3
- package/lib/components/loadable-component.d.ts +2 -2
- package/lib/components/tables/abstract-table-model.d.ts +26 -19
- package/lib/components/tables/renderer/table-action-column/menu-builder.d.ts +5 -0
- package/lib/components/tables/renderer/table-action-column/table-action-column.component.d.ts +30 -0
- package/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu-popup.component.d.ts +19 -0
- package/lib/components/tables/renderer/{table-more-menu/table-more-menu.component.d.ts → table-custom-more-menu/table-custom-more-menu.component.d.ts} +7 -7
- package/package.json +1 -1
- package/esm2022/lib/components/tables/renderer/table-more-menu/table-more-menu-popup/table-more-menu-popup.component.mjs +0 -40
- package/esm2022/lib/components/tables/renderer/table-more-menu/table-more-menu.component.mjs +0 -65
- package/esm2022/lib/components/tables/table-row-menu/table-row-menu.component.mjs +0 -84
- package/lib/components/tables/renderer/table-more-menu/table-more-menu-popup/table-more-menu-popup.component.d.ts +0 -18
- package/lib/components/tables/table-row-menu/table-row-menu.component.d.ts +0 -28
|
@@ -4366,7 +4366,111 @@ class FooterRowModel {
|
|
|
4366
4366
|
})(FooterRowModel || (FooterRowModel = {}));
|
|
4367
4367
|
ProxyRegistry.registerOneTimeBinding(FooterRowModel);
|
|
4368
4368
|
|
|
4369
|
-
class
|
|
4369
|
+
class MenuItemData {
|
|
4370
|
+
factory;
|
|
4371
|
+
face;
|
|
4372
|
+
constructor(factory, face) {
|
|
4373
|
+
this.factory = factory;
|
|
4374
|
+
this.face = face;
|
|
4375
|
+
}
|
|
4376
|
+
}
|
|
4377
|
+
/**
|
|
4378
|
+
*
|
|
4379
|
+
*/
|
|
4380
|
+
class TableActionColumnComponent extends DisposableComponent {
|
|
4381
|
+
value;
|
|
4382
|
+
menu;
|
|
4383
|
+
actions = [];
|
|
4384
|
+
moreActions = [];
|
|
4385
|
+
addCommand(commandFactory, properties) {
|
|
4386
|
+
this.actions.push(new MenuItemData(commandFactory, properties));
|
|
4387
|
+
}
|
|
4388
|
+
addSeparator() {
|
|
4389
|
+
this.actions.push(null);
|
|
4390
|
+
}
|
|
4391
|
+
addMoreMenu(builder) {
|
|
4392
|
+
const self = this;
|
|
4393
|
+
builder({
|
|
4394
|
+
addCommand(factory, face) {
|
|
4395
|
+
self.moreActions.push(new MenuItemData(factory, face));
|
|
4396
|
+
},
|
|
4397
|
+
addSeparator() {
|
|
4398
|
+
self.moreActions.push(null);
|
|
4399
|
+
}
|
|
4400
|
+
});
|
|
4401
|
+
}
|
|
4402
|
+
constructor() {
|
|
4403
|
+
super();
|
|
4404
|
+
}
|
|
4405
|
+
createMoreMenuCommand(item, value) {
|
|
4406
|
+
const { when } = Dsl.disposeWith(this);
|
|
4407
|
+
const command = item.factory.create(value, { disposedWith: this });
|
|
4408
|
+
when(command.busy$).becomesFalsey(() => {
|
|
4409
|
+
this.closeMoreMenu();
|
|
4410
|
+
});
|
|
4411
|
+
return command;
|
|
4412
|
+
}
|
|
4413
|
+
closeMoreMenu() {
|
|
4414
|
+
this.menu.closeMenu();
|
|
4415
|
+
}
|
|
4416
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableActionColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4417
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TableActionColumnComponent, selector: "aup-table-action-column", inputs: { value: "value" }, viewQueries: [{ propertyName: "menu", first: true, predicate: MatMenuTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
4418
|
+
<aup-tool-bar>
|
|
4419
|
+
<ng-container *ngFor="let action of actions">
|
|
4420
|
+
<aup-command *ngIf="action"
|
|
4421
|
+
#comp
|
|
4422
|
+
[command]="action.factory.create(value, {disposedWith: comp})"
|
|
4423
|
+
[face]="action.face"></aup-command>
|
|
4424
|
+
<aup-separator *ngIf="!action"/>
|
|
4425
|
+
</ng-container>
|
|
4426
|
+
</aup-tool-bar>
|
|
4427
|
+
<ng-container *ngIf="moreActions.length > 0">
|
|
4428
|
+
<aup-flex class="flex"/>
|
|
4429
|
+
<aup-more-menu>
|
|
4430
|
+
<ng-container *ngFor="let action of moreActions">
|
|
4431
|
+
<aup-command *ngIf="action"
|
|
4432
|
+
#comp
|
|
4433
|
+
[command]="action.factory.create(value, {disposedWith: comp})"
|
|
4434
|
+
[face]="action.face"></aup-command>
|
|
4435
|
+
<aup-separator *ngIf="!action"/>
|
|
4436
|
+
</ng-container>
|
|
4437
|
+
</aup-more-menu>
|
|
4438
|
+
</ng-container>
|
|
4439
|
+
`, isInline: true, styles: [":host{display:inline-flex;flex-direction:row;align-items:center}:host:last-child{padding-right:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToolBarComponent, selector: "aup-tool-bar" }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace"] }, { kind: "component", type: MoreMenuComponent, selector: "aup-more-menu", inputs: ["tooltip"] }, { kind: "component", type: SeparatorComponent, selector: "aup-separator" }, { kind: "component", type: FlexComponent, selector: "aup-flex" }] });
|
|
4440
|
+
}
|
|
4441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableActionColumnComponent, decorators: [{
|
|
4442
|
+
type: Component,
|
|
4443
|
+
args: [{ selector: 'aup-table-action-column', template: `
|
|
4444
|
+
<aup-tool-bar>
|
|
4445
|
+
<ng-container *ngFor="let action of actions">
|
|
4446
|
+
<aup-command *ngIf="action"
|
|
4447
|
+
#comp
|
|
4448
|
+
[command]="action.factory.create(value, {disposedWith: comp})"
|
|
4449
|
+
[face]="action.face"></aup-command>
|
|
4450
|
+
<aup-separator *ngIf="!action"/>
|
|
4451
|
+
</ng-container>
|
|
4452
|
+
</aup-tool-bar>
|
|
4453
|
+
<ng-container *ngIf="moreActions.length > 0">
|
|
4454
|
+
<aup-flex class="flex"/>
|
|
4455
|
+
<aup-more-menu>
|
|
4456
|
+
<ng-container *ngFor="let action of moreActions">
|
|
4457
|
+
<aup-command *ngIf="action"
|
|
4458
|
+
#comp
|
|
4459
|
+
[command]="action.factory.create(value, {disposedWith: comp})"
|
|
4460
|
+
[face]="action.face"></aup-command>
|
|
4461
|
+
<aup-separator *ngIf="!action"/>
|
|
4462
|
+
</ng-container>
|
|
4463
|
+
</aup-more-menu>
|
|
4464
|
+
</ng-container>
|
|
4465
|
+
`, styles: [":host{display:inline-flex;flex-direction:row;align-items:center}:host:last-child{padding-right:0}\n"] }]
|
|
4466
|
+
}], ctorParameters: function () { return []; }, propDecorators: { value: [{
|
|
4467
|
+
type: Input
|
|
4468
|
+
}], menu: [{
|
|
4469
|
+
type: ViewChild,
|
|
4470
|
+
args: [MatMenuTrigger]
|
|
4471
|
+
}] } });
|
|
4472
|
+
|
|
4473
|
+
class TableCustomMoreMenuComponent extends DisposableComponent {
|
|
4370
4474
|
value$ = new MutableValueModel();
|
|
4371
4475
|
#value_accessor_storage;
|
|
4372
4476
|
get value() { return this.#value_accessor_storage; }
|
|
@@ -4401,23 +4505,29 @@ class TableMoreMenuComponent extends DisposableComponent {
|
|
|
4401
4505
|
get visible$() {
|
|
4402
4506
|
return this._visible$.readonly$;
|
|
4403
4507
|
}
|
|
4404
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type:
|
|
4405
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type:
|
|
4508
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableCustomMoreMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4509
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TableCustomMoreMenuComponent, selector: "aup-table-custom-more-menu", host: { listeners: { "click": "preventDefault($event)" } }, viewQueries: [{ propertyName: "matMenuTrigger", first: true, predicate: MatMenuTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <ng-template matMenuContent [cdkPortalOutlet]=\"popupComponentPortal$.value\" (attached)=\"initialise($event)\"></ng-template>\n</mat-menu>\n\n<button mat-icon-button [matMenuTriggerFor]=\"menu\" data-cy=\"more-menu-trigger\" *ngIf=\"visible$.value\">\n <aup-icon icon=\"mat:more_vert\"></aup-icon>\n</button>\n", styles: [":host{display:inline;text-align:end}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$4.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i2$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i2$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i2$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
4406
4510
|
}
|
|
4407
4511
|
__decorate([
|
|
4408
4512
|
StoreInValueModel(),
|
|
4409
4513
|
__metadata("design:type", Object)
|
|
4410
|
-
],
|
|
4411
|
-
|
|
4514
|
+
], TableCustomMoreMenuComponent.prototype, "value", null);
|
|
4515
|
+
__decorate([
|
|
4516
|
+
Trace(),
|
|
4517
|
+
__metadata("design:type", Function),
|
|
4518
|
+
__metadata("design:paramtypes", [Object]),
|
|
4519
|
+
__metadata("design:returntype", void 0)
|
|
4520
|
+
], TableCustomMoreMenuComponent.prototype, "initialise", null);
|
|
4521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableCustomMoreMenuComponent, decorators: [{
|
|
4412
4522
|
type: Component,
|
|
4413
|
-
args: [{ selector: "aup-table-more-menu", template: "<mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <ng-template matMenuContent [cdkPortalOutlet]=\"popupComponentPortal$.value\"
|
|
4523
|
+
args: [{ selector: "aup-table-custom-more-menu", template: "<mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <ng-template matMenuContent [cdkPortalOutlet]=\"popupComponentPortal$.value\" (attached)=\"initialise($event)\"></ng-template>\n</mat-menu>\n\n<button mat-icon-button [matMenuTriggerFor]=\"menu\" data-cy=\"more-menu-trigger\" *ngIf=\"visible$.value\">\n <aup-icon icon=\"mat:more_vert\"></aup-icon>\n</button>\n", styles: [":host{display:inline;text-align:end}\n"] }]
|
|
4414
4524
|
}], ctorParameters: function () { return []; }, propDecorators: { value: [], matMenuTrigger: [{
|
|
4415
4525
|
type: ViewChild,
|
|
4416
4526
|
args: [MatMenuTrigger]
|
|
4417
4527
|
}], preventDefault: [{
|
|
4418
4528
|
type: HostListener,
|
|
4419
4529
|
args: ["click", ["$event"]]
|
|
4420
|
-
}] } });
|
|
4530
|
+
}], initialise: [] } });
|
|
4421
4531
|
|
|
4422
4532
|
var DefaultArrayFormatter = ColumnTextSearchFormatter.DefaultArrayFormatter;
|
|
4423
4533
|
var DefaultValueFormatter = ColumnTextSearchFormatter.DefaultValueFormatter;
|
|
@@ -4473,16 +4583,16 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
4473
4583
|
this._rowsBeingEdited$ = new MutableListModel([], {
|
|
4474
4584
|
identifiedWith: row => this.identityOf(row)
|
|
4475
4585
|
});
|
|
4476
|
-
this._editorSessionByRowId = chain(this._editorSessions).indexBy(
|
|
4586
|
+
this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');
|
|
4477
4587
|
this.editing$ = chain(this._editorSessions).count().isGreaterThan(0);
|
|
4478
4588
|
this.textSearchPredicate$ = chain(this.visibleColumns$).reduceAll(columns => {
|
|
4479
4589
|
return (row, regex) => {
|
|
4480
4590
|
return (!regex || !!columns.find(c => regex.test(c.getSearchTextFor(row))));
|
|
4481
4591
|
};
|
|
4482
4592
|
});
|
|
4483
|
-
this.selectionColumnModel = new SelectionColumnModel(
|
|
4593
|
+
this.selectionColumnModel = new SelectionColumnModel('selection-column', this.columnManager, () => this.getColumnTextProperties('selection-column'));
|
|
4484
4594
|
this.addColumn(this.selectionColumnModel, { before: null }); // first column
|
|
4485
|
-
this.addRowClass(
|
|
4595
|
+
this.addRowClass('aup-row-selected', row => this.selectionColumnModel.isSelected(row));
|
|
4486
4596
|
this.firstEditableColumn$ = chain(this.columns$).select(c => c.hasEditorPortal()).first();
|
|
4487
4597
|
this.firstVisibleColumn$ = chain(this.visibleColumns$).first();
|
|
4488
4598
|
this.lastVisibleColumn$ = chain(this.visibleColumns$).last();
|
|
@@ -4559,7 +4669,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
4559
4669
|
const { when } = Dsl.disposeWith(editSession);
|
|
4560
4670
|
when(editSession.liveRowValue$).changes((editedValue) => {
|
|
4561
4671
|
this._rowsBeingEdited$.replaceOrPush(editedValue);
|
|
4562
|
-
}, { initialValue:
|
|
4672
|
+
}, { initialValue: 'triggerChangeUnlessNil' });
|
|
4563
4673
|
this._editorSessions.push(editSession);
|
|
4564
4674
|
editSession.onDispose(() => {
|
|
4565
4675
|
this._rowsBeingEdited$.remove(editSession.liveRowValue$.value);
|
|
@@ -4599,7 +4709,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
4599
4709
|
if (isFunction(formFactory)) {
|
|
4600
4710
|
this._createForm = formFactory;
|
|
4601
4711
|
}
|
|
4602
|
-
const columnId =
|
|
4712
|
+
const columnId = 'editControls';
|
|
4603
4713
|
return this.addColumn(new EditorControlColumnModel(columnId, this.columnManager, saveCommandFactory, () => this.getColumnTextProperties(columnId)));
|
|
4604
4714
|
}
|
|
4605
4715
|
addCustomColumn(columnId, dataAccessor) {
|
|
@@ -4608,15 +4718,33 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
4608
4718
|
addComponentColumn(columnId, component, onComponentInitOrOptions) {
|
|
4609
4719
|
return this.addColumn(new CustomValueColumnModel(columnId, this.columnManager, () => this.getColumnTextProperties(columnId), row => row)).cellRenderer(component, onComponentInitOrOptions);
|
|
4610
4720
|
}
|
|
4611
|
-
addMoreMenu(
|
|
4612
|
-
|
|
4721
|
+
addMoreMenu(builder) {
|
|
4722
|
+
// re-using the action column as it much simpler in teh case of just commands
|
|
4723
|
+
return this.addActionColumn((component) => {
|
|
4724
|
+
component.addMoreMenu(builder);
|
|
4725
|
+
}).columnTextProperties({
|
|
4726
|
+
headerText() {
|
|
4727
|
+
return '';
|
|
4728
|
+
}
|
|
4729
|
+
});
|
|
4730
|
+
}
|
|
4731
|
+
/**
|
|
4732
|
+
* Use this method if the more menu popup needs custom components
|
|
4733
|
+
*/
|
|
4734
|
+
addCustomMoreMenu(componentClass, initialiseCallback) {
|
|
4735
|
+
return this.addComponentColumn('custom-more-menu', TableCustomMoreMenuComponent, (component) => {
|
|
4613
4736
|
component.configurePopupComponentType(componentClass, initialiseCallback);
|
|
4614
4737
|
}).columnTextProperties({
|
|
4615
4738
|
headerText() {
|
|
4616
|
-
return
|
|
4739
|
+
return '';
|
|
4617
4740
|
}
|
|
4618
4741
|
});
|
|
4619
4742
|
}
|
|
4743
|
+
addActionColumn(builder) {
|
|
4744
|
+
return this.addComponentColumn("actions", TableActionColumnComponent, (c) => {
|
|
4745
|
+
builder(c);
|
|
4746
|
+
});
|
|
4747
|
+
}
|
|
4620
4748
|
addFooterRow(component, initialiseCallback) {
|
|
4621
4749
|
assert.isNil(this.footerRowModel);
|
|
4622
4750
|
this.footerRowModel = new FooterRowModel.Impl(component, initialiseCallback);
|
|
@@ -5117,10 +5245,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
5117
5245
|
type: Directive
|
|
5118
5246
|
}] });
|
|
5119
5247
|
|
|
5120
|
-
class
|
|
5248
|
+
class TableCustomMoreMenuPopupComponent extends LoadableComponent {
|
|
5121
5249
|
_value$ = this.registerDisposable(new DelegatingValueModel());
|
|
5122
5250
|
_visible$ = this.registerDisposable(new DelegatingValueModel()).withDefault(true);
|
|
5123
5251
|
_closeCommand = this.registerDisposable(new DelegatingCommand());
|
|
5252
|
+
constructor() {
|
|
5253
|
+
super();
|
|
5254
|
+
this.onInit(() => console.log('init'));
|
|
5255
|
+
}
|
|
5124
5256
|
initialise(row$, closeCommand) {
|
|
5125
5257
|
this._value$.setDelegate(row$);
|
|
5126
5258
|
this._closeCommand.setDelegate(closeCommand);
|
|
@@ -5139,93 +5271,19 @@ class TableMoreMenuPopupComponent extends LoadableComponent {
|
|
|
5139
5271
|
return this._value$.readonly$;
|
|
5140
5272
|
}
|
|
5141
5273
|
register(comp) {
|
|
5274
|
+
// ignored
|
|
5142
5275
|
}
|
|
5143
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type:
|
|
5144
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type:
|
|
5145
|
-
{ provide: POPUP_CONTAINER, useValue:
|
|
5276
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableCustomMoreMenuPopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5277
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TableCustomMoreMenuPopupComponent, selector: "aup-table-more-menu-popup", providers: [
|
|
5278
|
+
{ provide: POPUP_CONTAINER, useValue: TableCustomMoreMenuPopupComponent },
|
|
5146
5279
|
], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
5147
5280
|
}
|
|
5148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type:
|
|
5281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableCustomMoreMenuPopupComponent, decorators: [{
|
|
5149
5282
|
type: Component,
|
|
5150
5283
|
args: [{ selector: 'aup-table-more-menu-popup', template: '', providers: [
|
|
5151
|
-
{ provide: POPUP_CONTAINER, useValue:
|
|
5284
|
+
{ provide: POPUP_CONTAINER, useValue: TableCustomMoreMenuPopupComponent },
|
|
5152
5285
|
] }]
|
|
5153
|
-
}] });
|
|
5154
|
-
|
|
5155
|
-
class MenuItemData {
|
|
5156
|
-
factory;
|
|
5157
|
-
face;
|
|
5158
|
-
constructor(factory, face) {
|
|
5159
|
-
this.factory = factory;
|
|
5160
|
-
this.face = face;
|
|
5161
|
-
}
|
|
5162
|
-
}
|
|
5163
|
-
/**
|
|
5164
|
-
*
|
|
5165
|
-
*/
|
|
5166
|
-
class TableRowMenuComponent extends DisposableComponent {
|
|
5167
|
-
value;
|
|
5168
|
-
menu;
|
|
5169
|
-
actions = [];
|
|
5170
|
-
moreActions = [];
|
|
5171
|
-
registerAction(commandFactory, properties) {
|
|
5172
|
-
this.actions.push(new MenuItemData(commandFactory, properties));
|
|
5173
|
-
}
|
|
5174
|
-
registerMoreAction(commandFactory, properties) {
|
|
5175
|
-
this.moreActions.push(new MenuItemData(commandFactory, properties));
|
|
5176
|
-
}
|
|
5177
|
-
constructor() {
|
|
5178
|
-
super();
|
|
5179
|
-
}
|
|
5180
|
-
createMoreMenuCommand(item, value) {
|
|
5181
|
-
const { when } = Dsl.disposeWith(this);
|
|
5182
|
-
const command = item.factory.create(value, { disposedWith: this });
|
|
5183
|
-
when(command.busy$).becomesFalsey(() => {
|
|
5184
|
-
this.closeMoreMenu();
|
|
5185
|
-
});
|
|
5186
|
-
return command;
|
|
5187
|
-
}
|
|
5188
|
-
closeMoreMenu() {
|
|
5189
|
-
this.menu.closeMenu();
|
|
5190
|
-
}
|
|
5191
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableRowMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5192
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TableRowMenuComponent, selector: "aup-table-row-menu", inputs: { value: "value" }, viewQueries: [{ propertyName: "menu", first: true, predicate: MatMenuTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
5193
|
-
<aup-tool-bar>
|
|
5194
|
-
<aup-command *ngFor="let action of actions"
|
|
5195
|
-
#comp
|
|
5196
|
-
[command]="action.factory.create(value, {disposedWith: comp})"
|
|
5197
|
-
[face]="action.face"></aup-command>
|
|
5198
|
-
</aup-tool-bar>
|
|
5199
|
-
<ng-container *ngIf="moreActions.length > 0">
|
|
5200
|
-
<aup-more-menu>
|
|
5201
|
-
<aup-command *ngFor="let action of moreActions" #comp [command]="action.factory.create(value, {disposedWith: comp})"
|
|
5202
|
-
[face]="action.face"></aup-command>
|
|
5203
|
-
</aup-more-menu>
|
|
5204
|
-
</ng-container>
|
|
5205
|
-
`, isInline: true, styles: [":host{display:inline-flex;flex-direction:row;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToolBarComponent, selector: "aup-tool-bar" }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace"] }, { kind: "component", type: MoreMenuComponent, selector: "aup-more-menu", inputs: ["tooltip"] }] });
|
|
5206
|
-
}
|
|
5207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableRowMenuComponent, decorators: [{
|
|
5208
|
-
type: Component,
|
|
5209
|
-
args: [{ selector: 'aup-table-row-menu', template: `
|
|
5210
|
-
<aup-tool-bar>
|
|
5211
|
-
<aup-command *ngFor="let action of actions"
|
|
5212
|
-
#comp
|
|
5213
|
-
[command]="action.factory.create(value, {disposedWith: comp})"
|
|
5214
|
-
[face]="action.face"></aup-command>
|
|
5215
|
-
</aup-tool-bar>
|
|
5216
|
-
<ng-container *ngIf="moreActions.length > 0">
|
|
5217
|
-
<aup-more-menu>
|
|
5218
|
-
<aup-command *ngFor="let action of moreActions" #comp [command]="action.factory.create(value, {disposedWith: comp})"
|
|
5219
|
-
[face]="action.face"></aup-command>
|
|
5220
|
-
</aup-more-menu>
|
|
5221
|
-
</ng-container>
|
|
5222
|
-
`, styles: [":host{display:inline-flex;flex-direction:row;align-items:center}\n"] }]
|
|
5223
|
-
}], ctorParameters: function () { return []; }, propDecorators: { value: [{
|
|
5224
|
-
type: Input
|
|
5225
|
-
}], menu: [{
|
|
5226
|
-
type: ViewChild,
|
|
5227
|
-
args: [MatMenuTrigger]
|
|
5228
|
-
}] } });
|
|
5286
|
+
}], ctorParameters: function () { return []; } });
|
|
5229
5287
|
|
|
5230
5288
|
class TableFilterModel extends GarbageCollector {
|
|
5231
5289
|
_source$ = this.registerDisposable(new DelegatingListModel());
|
|
@@ -6413,7 +6471,7 @@ class ComponentsModule {
|
|
|
6413
6471
|
TableHeaderCellComponent,
|
|
6414
6472
|
IconComponent,
|
|
6415
6473
|
SectionHeaderComponent,
|
|
6416
|
-
|
|
6474
|
+
TableActionColumnComponent,
|
|
6417
6475
|
ToolBarComponent,
|
|
6418
6476
|
CommandComponent,
|
|
6419
6477
|
PopupMenuComponent,
|
|
@@ -6435,8 +6493,8 @@ class ComponentsModule {
|
|
|
6435
6493
|
LoadingContainerComponent,
|
|
6436
6494
|
MarkdownComponent,
|
|
6437
6495
|
TableBodyComponent,
|
|
6438
|
-
|
|
6439
|
-
|
|
6496
|
+
TableCustomMoreMenuComponent,
|
|
6497
|
+
TableCustomMoreMenuPopupComponent,
|
|
6440
6498
|
SearchInputComponent,
|
|
6441
6499
|
TableFooterRow,
|
|
6442
6500
|
FileDownloadComponent,
|
|
@@ -6486,7 +6544,7 @@ class ComponentsModule {
|
|
|
6486
6544
|
ColumnTemplateDirective,
|
|
6487
6545
|
IconComponent,
|
|
6488
6546
|
SectionHeaderComponent,
|
|
6489
|
-
|
|
6547
|
+
TableActionColumnComponent,
|
|
6490
6548
|
ToolBarComponent,
|
|
6491
6549
|
CommandComponent,
|
|
6492
6550
|
PopupMenuComponent,
|
|
@@ -6501,8 +6559,8 @@ class ComponentsModule {
|
|
|
6501
6559
|
LabelledValueComponent,
|
|
6502
6560
|
LoadingContainerComponent,
|
|
6503
6561
|
MarkdownComponent,
|
|
6504
|
-
|
|
6505
|
-
|
|
6562
|
+
TableCustomMoreMenuComponent,
|
|
6563
|
+
TableCustomMoreMenuPopupComponent,
|
|
6506
6564
|
SearchInputComponent,
|
|
6507
6565
|
ButtonRendererComponent] });
|
|
6508
6566
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ComponentsModule, providers: [FocusBindingFactory, MarkdownService], imports: [CommonModule,
|
|
@@ -6588,7 +6646,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
6588
6646
|
TableHeaderCellComponent,
|
|
6589
6647
|
IconComponent,
|
|
6590
6648
|
SectionHeaderComponent,
|
|
6591
|
-
|
|
6649
|
+
TableActionColumnComponent,
|
|
6592
6650
|
ToolBarComponent,
|
|
6593
6651
|
CommandComponent,
|
|
6594
6652
|
PopupMenuComponent,
|
|
@@ -6610,8 +6668,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
6610
6668
|
LoadingContainerComponent,
|
|
6611
6669
|
MarkdownComponent,
|
|
6612
6670
|
TableBodyComponent,
|
|
6613
|
-
|
|
6614
|
-
|
|
6671
|
+
TableCustomMoreMenuComponent,
|
|
6672
|
+
TableCustomMoreMenuPopupComponent,
|
|
6615
6673
|
SearchInputComponent,
|
|
6616
6674
|
TableFooterRow,
|
|
6617
6675
|
FileDownloadComponent,
|
|
@@ -6643,7 +6701,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
6643
6701
|
ColumnTemplateDirective,
|
|
6644
6702
|
IconComponent,
|
|
6645
6703
|
SectionHeaderComponent,
|
|
6646
|
-
|
|
6704
|
+
TableActionColumnComponent,
|
|
6647
6705
|
ToolBarComponent,
|
|
6648
6706
|
CommandComponent,
|
|
6649
6707
|
PopupMenuComponent,
|
|
@@ -6658,8 +6716,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
6658
6716
|
LabelledValueComponent,
|
|
6659
6717
|
LoadingContainerComponent,
|
|
6660
6718
|
MarkdownComponent,
|
|
6661
|
-
|
|
6662
|
-
|
|
6719
|
+
TableCustomMoreMenuComponent,
|
|
6720
|
+
TableCustomMoreMenuPopupComponent,
|
|
6663
6721
|
SearchInputComponent,
|
|
6664
6722
|
ButtonRendererComponent,
|
|
6665
6723
|
],
|
|
@@ -12975,5 +13033,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
12975
13033
|
* Generated bundle index. Do not edit.
|
|
12976
13034
|
*/
|
|
12977
13035
|
|
|
12978
|
-
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractCellRenderer, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityContext, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AlertRendererComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, ButtonRendererComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellFooterPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnManager, ColumnModel, ColumnOrderManager, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, Confirm, ConfirmRendererComponent, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControlsComponent, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FOOTER_CELL_RENDERER_PORTAL, FileDownloadComponent, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, FooterRowModel, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, INTERACTION_CONTEXT, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextProvider, InteractionContextTriggerForDirective, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadableComponent, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceAuthService, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, ResizeObserverDirective, RouteId, ScrollContainerComponent, SearchInputComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, SlideDownInteractionContextComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableBodyComponent, TableCellComponent, TableComponent, TableFilterModel, TableFooterRow, TableHeaderCellComponent, TableModel,
|
|
13036
|
+
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractCellRenderer, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityContext, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AlertRendererComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, ButtonRendererComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellFooterPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnManager, ColumnModel, ColumnOrderManager, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, Confirm, ConfirmRendererComponent, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControlsComponent, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FOOTER_CELL_RENDERER_PORTAL, FileDownloadComponent, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, FooterRowModel, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, INTERACTION_CONTEXT, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextProvider, InteractionContextTriggerForDirective, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadableComponent, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceAuthService, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, ResizeObserverDirective, RouteId, ScrollContainerComponent, SearchInputComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, SlideDownInteractionContextComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableActionColumnComponent, TableBodyComponent, TableCellComponent, TableComponent, TableCustomMoreMenuComponent, TableCustomMoreMenuPopupComponent, TableFilterModel, TableFooterRow, TableHeaderCellComponent, TableModel, TableRowAttributesDirective, TemplateCellRendererPortalRef, TextInputComponent, TextSearchContext, ToolBarComponent, Track, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSegment, VisitSegmentSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, markdownPillExtension, slideDownAndRightOnEnterAnimation, slideDownOnEnterAnimation, slideDownWhenOpenAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
|
|
12979
13037
|
//# sourceMappingURL=coolon-angular-ui-powerups.mjs.map
|