@alauda-fe/common
Version:
Alauda frontend team common codes.
535 lines • 63 kB
JavaScript
import { ButtonModule, IconModule, rgbColor, TooltipModule } from '@alauda/ui';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { AsyncPipe, NgForOf, NgIf, NgTemplateOutlet } from '@angular/common';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, Directive, EventEmitter, Injector, Input, Output, QueryList, TemplateRef, } from '@angular/core';
import { FormArray, FormGroup, FormGroupDirective, NgForm, } from '@angular/forms';
import { debounceTime, EMPTY, map, merge, startWith, Subject } from 'rxjs';
import { PurePipe } from '../../core/pipes/pure.pipe';
import { EFFECT_DIRECTIVE_MODULE } from '../../effect-directive/module';
import { TranslateModule } from '../../translate/public-api';
import { ZeroStateComponent } from '../../widget/zero-state/zero-state.component';
import * as i0 from "@angular/core";
import * as i1 from "@alauda/ui";
import * as i2 from "../../translate/translate.pipe";
import * as i3 from "@angular/cdk/drag-drop";
import * as i4 from "../../effect-directive/e2e-attribute-binding.directive";
const _c0 = (a0, a1) => ({ $implicit: a0, index: a1 });
function ArrayFormTableComponent_thead_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function ArrayFormTableComponent_thead_1_th_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "th", 7);
} }
function ArrayFormTableComponent_thead_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "thead")(1, "tr");
i0.ɵɵtemplate(2, ArrayFormTableComponent_thead_1_ng_container_2_Template, 1, 0, "ng-container", 5)(3, ArrayFormTableComponent_thead_1_th_3_Template, 1, 0, "th", 6);
i0.ɵɵelementEnd()();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext();
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.headerTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r0.readonly && ctx_r0.minRow !== ctx_r0.maxRow);
} }
function ArrayFormTableComponent_ng_container_3_tr_1_ng_container_5_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function ArrayFormTableComponent_ng_container_3_tr_1_td_6_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function ArrayFormTableComponent_ng_container_3_tr_1_td_6_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, ArrayFormTableComponent_ng_container_3_tr_1_td_6_ng_container_1_ng_container_1_Template, 1, 0, "ng-container", 13);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r1 = i0.ɵɵnextContext(3);
const row_r3 = ctx_r1.$implicit;
const index_r4 = ctx_r1.index;
const ctx_r0 = i0.ɵɵnextContext();
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.rowControlTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c0, row_r3, index_r4));
} }
function ArrayFormTableComponent_ng_container_3_tr_1_td_6_button_3_Template(rf, ctx) { if (rf & 1) {
const _r5 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "button", 17);
i0.ɵɵlistener("click", function ArrayFormTableComponent_ng_container_3_tr_1_td_6_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const index_r4 = i0.ɵɵnextContext(3).index; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.remove.emit(index_r4)); });
i0.ɵɵelement(1, "aui-icon", 18);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext(4);
i0.ɵɵproperty("disabled", (ctx_r0.rows == null ? null : ctx_r0.rows.length) <= ctx_r0.minRow)("square", true)("plain", true);
} }
function ArrayFormTableComponent_ng_container_3_tr_1_td_6_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "td", 7);
i0.ɵɵtemplate(1, ArrayFormTableComponent_ng_container_3_tr_1_td_6_ng_container_1_Template, 2, 5, "ng-container", 1);
i0.ɵɵelementStart(2, "div", 15);
i0.ɵɵtemplate(3, ArrayFormTableComponent_ng_container_3_tr_1_td_6_button_3_Template, 2, 3, "button", 16);
i0.ɵɵelementEnd()();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext(3);
i0.ɵɵclassProp("acl-array-form-table__action-col-divider", ctx_r0.actionColumnDivider);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", ctx_r0.rowControlTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("auiTooltip", ctx_r0.minRowTooltip)("auiTooltipDisabled", (ctx_r0.rows == null ? null : ctx_r0.rows.length) > ctx_r0.minRow || !ctx_r0.minRowTooltip);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r0.rowControlTemplate);
} }
function ArrayFormTableComponent_ng_container_3_tr_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "tr", 10);
i0.ɵɵpipe(1, "pure");
i0.ɵɵpipe(2, "async");
i0.ɵɵelementStart(3, "td", 11);
i0.ɵɵelement(4, "aui-icon", 12);
i0.ɵɵelementEnd();
i0.ɵɵtemplate(5, ArrayFormTableComponent_ng_container_3_tr_1_ng_container_5_Template, 1, 0, "ng-container", 13)(6, ArrayFormTableComponent_ng_container_3_tr_1_td_6_Template, 4, 6, "td", 14);
i0.ɵɵelementEnd();
} if (rf & 2) {
const rowTemplate_r6 = ctx.$implicit;
const templateIndex_r7 = ctx.index;
const ctx_r1 = i0.ɵɵnextContext();
const row_r3 = ctx_r1.$implicit;
const index_r4 = ctx_r1.index;
const ctx_r0 = i0.ɵɵnextContext();
i0.ɵɵclassProp("acl-array-form-table__row-error", i0.ɵɵpipeBind1(2, 10, i0.ɵɵpipeBind2(1, 7, row_r3, ctx_r0.shouldShowRowError)));
i0.ɵɵattribute("rowtemplateindex", templateIndex_r7);
i0.ɵɵadvance(3);
i0.ɵɵproperty("hidden", !ctx_r0.enableDrop);
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngTemplateOutlet", rowTemplate_r6)("ngTemplateOutletContext", i0.ɵɵpureFunction2(12, _c0, row_r3, index_r4));
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", templateIndex_r7 === 0 && !ctx_r0.readonly && ctx_r0.minRow !== ctx_r0.maxRow);
} }
function ArrayFormTableComponent_ng_container_3_tr_2_ng_container_5_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function ArrayFormTableComponent_ng_container_3_tr_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "tr", 11);
i0.ɵɵpipe(1, "pure");
i0.ɵɵpipe(2, "async");
i0.ɵɵpipe(3, "pure");
i0.ɵɵpipe(4, "async");
i0.ɵɵtemplate(5, ArrayFormTableComponent_ng_container_3_tr_2_ng_container_5_Template, 1, 0, "ng-container", 13);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r1 = i0.ɵɵnextContext();
const row_r3 = ctx_r1.$implicit;
const index_r4 = ctx_r1.index;
const ctx_r0 = i0.ɵɵnextContext();
i0.ɵɵclassProp("acl-array-form-table__row-error", i0.ɵɵpipeBind1(2, 8, i0.ɵɵpipeBind2(1, 5, row_r3, ctx_r0.shouldShowRowError)));
i0.ɵɵproperty("hidden", !i0.ɵɵpipeBind1(4, 13, i0.ɵɵpipeBind2(3, 10, row_r3, ctx_r0.shouldShowRowError)));
i0.ɵɵadvance(5);
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.rowErrorTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction2(15, _c0, row_r3, index_r4));
} }
function ArrayFormTableComponent_ng_container_3_ng_container_3_Conditional_3_ng_container_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function ArrayFormTableComponent_ng_container_3_ng_container_3_Conditional_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, ArrayFormTableComponent_ng_container_3_ng_container_3_Conditional_3_ng_container_0_Template, 1, 0, "ng-container", 5);
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext(3);
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.separatorTemplate);
} }
function ArrayFormTableComponent_ng_container_3_ng_container_3_Conditional_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "div", 21);
} }
function ArrayFormTableComponent_ng_container_3_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵelementStart(1, "tr", 19)(2, "td", 20);
i0.ɵɵtemplate(3, ArrayFormTableComponent_ng_container_3_ng_container_3_Conditional_3_Template, 1, 1, "ng-container")(4, ArrayFormTableComponent_ng_container_3_ng_container_3_Conditional_4_Template, 1, 0, "div", 21);
i0.ɵɵelementEnd()();
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext(2);
i0.ɵɵadvance(3);
i0.ɵɵconditional(ctx_r0.separatorTemplate ? 3 : 4);
} }
function ArrayFormTableComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, ArrayFormTableComponent_ng_container_3_tr_1_Template, 7, 15, "tr", 8)(2, ArrayFormTableComponent_ng_container_3_tr_2_Template, 6, 18, "tr", 9)(3, ArrayFormTableComponent_ng_container_3_ng_container_3_Template, 5, 1, "ng-container", 1);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const index_r4 = ctx.index;
const ctx_r0 = i0.ɵɵnextContext();
i0.ɵɵadvance();
i0.ɵɵproperty("ngForOf", ctx_r0.rowTemplates);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", ctx_r0.rowErrorTemplate && !ctx_r0.readonly);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", (ctx_r0.rowSeparator || ctx_r0.separatorTemplate) && (ctx_r0.rows == null ? null : ctx_r0.rows.length) > 1 && index_r4 !== (ctx_r0.rows == null ? null : ctx_r0.rows.length) - 1);
} }
function ArrayFormTableComponent_tr_4_acl_zero_state_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "acl-zero-state", 24);
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext(2);
i0.ɵɵproperty("showEmptyIcon", false)("zeroState", true)("resourceName", ctx_r0.resourceName)("resourceNameTranslated", ctx_r0.resourceNameTranslated)("minHeight", 48);
} }
function ArrayFormTableComponent_tr_4_ng_container_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function ArrayFormTableComponent_tr_4_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, ArrayFormTableComponent_tr_4_ng_container_3_ng_container_1_Template, 1, 0, "ng-container", 5);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext(2);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.zeroStateTemplate);
} }
function ArrayFormTableComponent_tr_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "tr")(1, "td", 22);
i0.ɵɵtemplate(2, ArrayFormTableComponent_tr_4_acl_zero_state_2_Template, 1, 5, "acl-zero-state", 23)(3, ArrayFormTableComponent_tr_4_ng_container_3_Template, 2, 1, "ng-container", 1);
i0.ɵɵelementEnd()();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext();
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngIf", !ctx_r0.zeroStateTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", ctx_r0.zeroStateTemplate);
} }
function ArrayFormTableComponent_tr_5_ng_container_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function ArrayFormTableComponent_tr_5_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, ArrayFormTableComponent_tr_5_ng_container_3_ng_container_1_Template, 1, 0, "ng-container", 5);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext(2);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.footerTemplate);
} }
function ArrayFormTableComponent_tr_5_div_4_Template(rf, ctx) { if (rf & 1) {
const _r8 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 28)(1, "button", 29);
i0.ɵɵlistener("click", function ArrayFormTableComponent_tr_5_div_4_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.add.emit()); });
i0.ɵɵelement(2, "aui-icon", 30);
i0.ɵɵtext(3);
i0.ɵɵpipe(4, "translate");
i0.ɵɵelementEnd()();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext(2);
i0.ɵɵproperty("auiTooltip", ctx_r0.maxRowTooltip)("auiTooltipDisabled", (ctx_r0.rows == null ? null : ctx_r0.rows.length) < ctx_r0.maxRow || !ctx_r0.maxRowTooltip);
i0.ɵɵadvance();
i0.ɵɵproperty("plain", true)("disabled", (ctx_r0.rows == null ? null : ctx_r0.rows.length) >= ctx_r0.maxRow || ctx_r0.addDisabled);
i0.ɵɵadvance(2);
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 5, "add"), " ");
} }
function ArrayFormTableComponent_tr_5_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "tr", 25)(1, "td", 20)(2, "div", 26);
i0.ɵɵtemplate(3, ArrayFormTableComponent_tr_5_ng_container_3_Template, 2, 1, "ng-container", 1)(4, ArrayFormTableComponent_tr_5_div_4_Template, 5, 7, "div", 27);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext();
i0.ɵɵadvance(3);
i0.ɵɵproperty("ngIf", ctx_r0.footerTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r0.footerTemplate);
} }
export const ARRAY_TABLE_FORM_ERROR_BG = rgbColor('r-6');
export const rowBackgroundColorFn = ({ invalid, }) => (invalid ? ARRAY_TABLE_FORM_ERROR_BG : '');
export const noShowRowError = () => false;
export class ArrayFormTableHeaderDirective {
constructor(templateRef) {
this.templateRef = templateRef;
}
static { this.ɵfac = function ArrayFormTableHeaderDirective_Factory(t) { return new (t || ArrayFormTableHeaderDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef)); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ArrayFormTableHeaderDirective, selectors: [["", "aclArrayFormTableHeader", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArrayFormTableHeaderDirective, [{
type: Directive,
args: [{
selector: '[aclArrayFormTableHeader]',
standalone: true,
}]
}], () => [{ type: i0.TemplateRef }], null); })();
export class ArrayFormTableRowErrorDirective {
constructor(templateRef) {
this.templateRef = templateRef;
}
static { this.ɵfac = function ArrayFormTableRowErrorDirective_Factory(t) { return new (t || ArrayFormTableRowErrorDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef)); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ArrayFormTableRowErrorDirective, selectors: [["", "aclArrayFormTableRowError", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArrayFormTableRowErrorDirective, [{
type: Directive,
args: [{
selector: '[aclArrayFormTableRowError]',
standalone: true,
}]
}], () => [{ type: i0.TemplateRef }], null); })();
export class ArrayFormTableRowDirective {
constructor(templateRef) {
this.templateRef = templateRef;
}
static { this.ɵfac = function ArrayFormTableRowDirective_Factory(t) { return new (t || ArrayFormTableRowDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef)); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ArrayFormTableRowDirective, selectors: [["", "aclArrayFormTableRow", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArrayFormTableRowDirective, [{
type: Directive,
args: [{
selector: '[aclArrayFormTableRow]',
standalone: true,
}]
}], () => [{ type: i0.TemplateRef }], null); })();
export class ArrayFormTableZeroStateDirective {
constructor(templateRef) {
this.templateRef = templateRef;
}
static { this.ɵfac = function ArrayFormTableZeroStateDirective_Factory(t) { return new (t || ArrayFormTableZeroStateDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef)); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ArrayFormTableZeroStateDirective, selectors: [["", "aclArrayFormTableZeroState", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArrayFormTableZeroStateDirective, [{
type: Directive,
args: [{
selector: '[aclArrayFormTableZeroState]',
standalone: true,
}]
}], () => [{ type: i0.TemplateRef }], null); })();
export class ArrayFormTableRowControlDirective {
constructor(templateRef) {
this.templateRef = templateRef;
}
static { this.ɵfac = function ArrayFormTableRowControlDirective_Factory(t) { return new (t || ArrayFormTableRowControlDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef)); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ArrayFormTableRowControlDirective, selectors: [["", "aclArrayFormTableRowControl", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArrayFormTableRowControlDirective, [{
type: Directive,
args: [{
selector: '[aclArrayFormTableRowControl]',
standalone: true,
}]
}], () => [{ type: i0.TemplateRef }], null); })();
export class ArrayFormTableRowSeparatorDirective {
constructor(templateRef) {
this.templateRef = templateRef;
}
static { this.ɵfac = function ArrayFormTableRowSeparatorDirective_Factory(t) { return new (t || ArrayFormTableRowSeparatorDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef)); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ArrayFormTableRowSeparatorDirective, selectors: [["", "aclArrayFormTableRowSeparator", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArrayFormTableRowSeparatorDirective, [{
type: Directive,
args: [{
selector: '[aclArrayFormTableRowSeparator]',
standalone: true,
}]
}], () => [{ type: i0.TemplateRef }], null); })();
export class ArrayFormTableFooterDirective {
constructor(templateRef) {
this.templateRef = templateRef;
}
static { this.ɵfac = function ArrayFormTableFooterDirective_Factory(t) { return new (t || ArrayFormTableFooterDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef)); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ArrayFormTableFooterDirective, selectors: [["", "aclArrayFormTableFooter", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArrayFormTableFooterDirective, [{
type: Directive,
args: [{
selector: '[aclArrayFormTableFooter]',
standalone: true,
}]
}], () => [{ type: i0.TemplateRef }], null); })();
// 递归验证 control 是否有问题,group 内部可能会有嵌套的情况
function _isFormControlInvalid(control) {
if (control instanceof FormGroup || control instanceof FormArray) {
return ((control.dirty && !!control.errors) ||
Object.values(control.controls).some(_isFormControlInvalid));
}
return control.dirty && control.invalid;
}
export class ArrayFormTableComponent {
get formDirective() {
return (this.injector.get(FormGroupDirective, null) ||
this.injector.get(NgForm, null));
}
/**
* 自定义是否展示错误内容
* 例如 control 是 FormGroup,只有在内部子 control 错误时才需要展示错误内容
*/
showRowError(control, formDirective) {
if (formDirective) {
return (control.invalid &&
(formDirective.submitted || _isFormControlInvalid(control)));
}
return false;
}
/**
* @deprecated use {@link showRowError} instead
*/
rowBackgroundColorFn(control, formDirective) {
return this.showRowError(control, formDirective)
? ARRAY_TABLE_FORM_ERROR_BG
: null;
}
constructor(injector) {
this.injector = injector;
/**
* 行之间的分隔区域,默认关闭
*/
this.rowSeparator = false;
this.resourceName = null;
this.add = new EventEmitter();
this.remove = new EventEmitter(); // Returns the index to be removed
this.readonly = false;
this.addDisabled = false;
this.actionColumnDivider = false;
this.showZeroState = true;
this.minRow = 0;
this.minRowTooltip = '';
this.maxRow = Infinity;
this.maxRowTooltip = '';
this.enableDrop = false;
this.rowDrop = new EventEmitter();
this.destroy$$ = new Subject();
this.cdr = this.injector.get(ChangeDetectorRef);
this.shouldShowRowError = (control) => {
const { statusChanges = EMPTY, status } = control;
return (this.formDirective
? merge(statusChanges, this.formDirective.ngSubmit)
: statusChanges).pipe(startWith(status), debounceTime(0), map(() => this.showRowError(control, this.formDirective)));
};
}
ngOnDestroy() {
this.destroy$$.next();
this.destroy$$.complete();
}
drop(event) {
this.rowDrop.emit(event);
}
static { this.ɵfac = function ArrayFormTableComponent_Factory(t) { return new (t || ArrayFormTableComponent)(i0.ɵɵdirectiveInject(i0.Injector)); }; }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ArrayFormTableComponent, selectors: [["acl-array-form-table"]], contentQueries: function ArrayFormTableComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
i0.ɵɵcontentQuery(dirIndex, ArrayFormTableHeaderDirective, 7, TemplateRef);
i0.ɵɵcontentQuery(dirIndex, ArrayFormTableRowErrorDirective, 5, TemplateRef);
i0.ɵɵcontentQuery(dirIndex, ArrayFormTableRowControlDirective, 7, TemplateRef);
i0.ɵɵcontentQuery(dirIndex, ArrayFormTableFooterDirective, 7, TemplateRef);
i0.ɵɵcontentQuery(dirIndex, ArrayFormTableZeroStateDirective, 5, TemplateRef);
i0.ɵɵcontentQuery(dirIndex, ArrayFormTableRowSeparatorDirective, 5, TemplateRef);
i0.ɵɵcontentQuery(dirIndex, FormGroupDirective, 5);
i0.ɵɵcontentQuery(dirIndex, ArrayFormTableRowDirective, 4, TemplateRef);
} if (rf & 2) {
let _t;
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerTemplate = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rowErrorTemplate = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rowControlTemplate = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.footerTemplate = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.zeroStateTemplate = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.separatorTemplate = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ngFormGroupDirective = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rowTemplates = _t);
} }, inputs: { rowSeparator: "rowSeparator", rows: "rows", resourceName: "resourceName", resourceNameTranslated: "resourceNameTranslated", readonly: "readonly", addDisabled: "addDisabled", actionColumnDivider: "actionColumnDivider", showZeroState: "showZeroState", showRowError: "showRowError", rowBackgroundColorFn: "rowBackgroundColorFn", minRow: "minRow", minRowTooltip: "minRowTooltip", maxRow: "maxRow", maxRowTooltip: "maxRowTooltip", enableDrop: "enableDrop" }, outputs: { add: "add", remove: "remove", rowDrop: "rowDrop" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 6, vars: 6, consts: [[1, "acl-array-form-table"], [4, "ngIf"], ["cdkDropList", "", 3, "cdkDropListDropped"], [4, "ngFor", "ngForOf"], ["class", "acl-array-form-table--row-action", 4, "ngIf"], [4, "ngTemplateOutlet"], ["class", "acl-array-form-table__action-col", 4, "ngIf"], [1, "acl-array-form-table__action-col"], ["cdkDrag", "", 3, "acl-array-form-table__row-error", 4, "ngFor", "ngForOf"], [3, "acl-array-form-table__row-error", "hidden", 4, "ngIf"], ["cdkDrag", ""], [3, "hidden"], ["icon", "move", "cdkDragHandle", "", 1, "tw-ml-8"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], ["class", "acl-array-form-table__action-col", 3, "acl-array-form-table__action-col-divider", 4, "ngIf"], [3, "auiTooltip", "auiTooltipDisabled"], ["aui-button", "text", "type", "button", 3, "disabled", "square", "plain", "click", 4, "ngIf"], ["aui-button", "text", "type", "button", 3, "click", "disabled", "square", "plain"], ["icon", "minus_circle"], [1, "acl-array-form-table__separator"], ["colspan", "100"], [1, "tw-h-[8px]"], ["colspan", "100", 2, "padding", "unset"], [3, "showEmptyIcon", "zeroState", "resourceName", "resourceNameTranslated", "minHeight", 4, "ngIf"], [3, "showEmptyIcon", "zeroState", "resourceName", "resourceNameTranslated", "minHeight"], [1, "acl-array-form-table--row-action"], [1, "acl-array-form-table__bottom-control-buttons"], ["class", "tw-flex tw-w-full", 3, "auiTooltip", "auiTooltipDisabled", 4, "ngIf"], [1, "tw-flex", "tw-w-full", 3, "auiTooltip", "auiTooltipDisabled"], ["aui-button", "primary", "type", "button", "size", "mini", 3, "click", "plain", "disabled"], ["icon", "plus_circle"]], template: function ArrayFormTableComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "table", 0);
i0.ɵɵtemplate(1, ArrayFormTableComponent_thead_1_Template, 4, 2, "thead", 1);
i0.ɵɵelementStart(2, "tbody", 2);
i0.ɵɵlistener("cdkDropListDropped", function ArrayFormTableComponent_Template_tbody_cdkDropListDropped_2_listener($event) { return ctx.drop($event); });
i0.ɵɵtemplate(3, ArrayFormTableComponent_ng_container_3_Template, 4, 3, "ng-container", 3)(4, ArrayFormTableComponent_tr_4_Template, 4, 2, "tr", 1)(5, ArrayFormTableComponent_tr_5_Template, 5, 2, "tr", 4);
i0.ɵɵelementEnd()();
} if (rf & 2) {
i0.ɵɵclassProp("acl-array-form-table__readonly-mode", ctx.readonly);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", ctx.headerTemplate);
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngForOf", ctx.rows);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", (!ctx.rows || ctx.rows.length === 0) && ctx.showZeroState);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx.readonly && ctx.minRow !== ctx.maxRow);
} }, dependencies: [NgTemplateOutlet,
TooltipModule, i1.TooltipDirective, ZeroStateComponent,
ButtonModule, i1.ButtonComponent, IconModule, i1.IconComponent, NgIf,
NgForOf,
PurePipe,
AsyncPipe,
TranslateModule, i2.TranslatePipe, DragDropModule, i3.CdkDropList, i3.CdkDrag, i3.CdkDragHandle, i4.E2eAttributeBindingDirective], encapsulation: 2 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArrayFormTableComponent, [{
type: Component,
args: [{ selector: 'acl-array-form-table', changeDetection: ChangeDetectionStrategy.Default, imports: [
NgTemplateOutlet,
TooltipModule,
ZeroStateComponent,
ButtonModule,
IconModule,
NgIf,
NgForOf,
PurePipe,
AsyncPipe,
TranslateModule,
DragDropModule,
...EFFECT_DIRECTIVE_MODULE,
], standalone: true, template: "<table\n class=\"acl-array-form-table\"\n [class.acl-array-form-table__readonly-mode]=\"readonly\"\n>\n <thead *ngIf=\"headerTemplate\">\n <tr>\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n <th\n *ngIf=\"!readonly && minRow !== maxRow\"\n class=\"acl-array-form-table__action-col\"\n ></th>\n </tr>\n </thead>\n <tbody\n cdkDropList\n (cdkDropListDropped)=\"drop($event)\"\n >\n <ng-container *ngFor=\"let row of rows; let index = index\">\n <tr\n *ngFor=\"let rowTemplate of rowTemplates; let templateIndex = index\"\n cdkDrag\n [class.acl-array-form-table__row-error]=\"\n row | pure: shouldShowRowError | async\n \"\n [attr.rowtemplateindex]=\"templateIndex\"\n >\n <td [hidden]=\"!enableDrop\">\n <aui-icon\n class=\"tw-ml-8\"\n icon=\"move\"\n cdkDragHandle\n ></aui-icon>\n </td>\n <ng-container\n *ngTemplateOutlet=\"\n rowTemplate;\n context: { $implicit: row, index: index }\n \"\n ></ng-container>\n <td\n *ngIf=\"templateIndex === 0 && !readonly && minRow !== maxRow\"\n class=\"acl-array-form-table__action-col\"\n [class.acl-array-form-table__action-col-divider]=\"actionColumnDivider\"\n >\n <ng-container *ngIf=\"rowControlTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n rowControlTemplate;\n context: { $implicit: row, index: index }\n \"\n ></ng-container>\n </ng-container>\n <div\n [auiTooltip]=\"minRowTooltip\"\n [auiTooltipDisabled]=\"rows?.length > minRow || !minRowTooltip\"\n >\n <button\n *ngIf=\"!rowControlTemplate\"\n aui-button=\"text\"\n type=\"button\"\n [disabled]=\"rows?.length <= minRow\"\n [square]=\"true\"\n [plain]=\"true\"\n (click)=\"remove.emit(index)\"\n >\n <aui-icon icon=\"minus_circle\"></aui-icon>\n </button>\n </div>\n </td>\n </tr>\n\n <tr\n *ngIf=\"rowErrorTemplate && !readonly\"\n [class.acl-array-form-table__row-error]=\"\n row | pure: shouldShowRowError | async\n \"\n [hidden]=\"!(row | pure: shouldShowRowError | async)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowErrorTemplate;\n context: { $implicit: row, index: index }\n \"\n ></ng-container>\n </tr>\n <ng-container\n *ngIf=\"\n (rowSeparator || separatorTemplate) &&\n rows?.length > 1 &&\n index !== rows?.length - 1\n \"\n >\n <tr class=\"acl-array-form-table__separator\">\n <td colspan=\"100\">\n @if (separatorTemplate) {\n <ng-container\n *ngTemplateOutlet=\"separatorTemplate\"\n ></ng-container>\n } @else {\n <div class=\"tw-h-[8px]\"></div>\n }\n </td>\n </tr>\n </ng-container>\n </ng-container>\n\n <tr *ngIf=\"(!rows || rows.length === 0) && showZeroState\">\n <td\n colspan=\"100\"\n style=\"padding: unset\"\n >\n <acl-zero-state\n *ngIf=\"!zeroStateTemplate\"\n [showEmptyIcon]=\"false\"\n [zeroState]=\"true\"\n [resourceName]=\"resourceName\"\n [resourceNameTranslated]=\"resourceNameTranslated\"\n [minHeight]=\"48\"\n ></acl-zero-state>\n\n <ng-container *ngIf=\"zeroStateTemplate\">\n <ng-container *ngTemplateOutlet=\"zeroStateTemplate\"></ng-container>\n </ng-container>\n </td>\n </tr>\n\n <tr\n *ngIf=\"!readonly && minRow !== maxRow\"\n class=\"acl-array-form-table--row-action\"\n >\n <td colspan=\"100\">\n <div class=\"acl-array-form-table__bottom-control-buttons\">\n <ng-container *ngIf=\"footerTemplate\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </ng-container>\n <div\n *ngIf=\"!footerTemplate\"\n class=\"tw-flex tw-w-full\"\n [auiTooltip]=\"maxRowTooltip\"\n [auiTooltipDisabled]=\"rows?.length < maxRow || !maxRowTooltip\"\n >\n <button\n aui-button=\"primary\"\n type=\"button\"\n [plain]=\"true\"\n size=\"mini\"\n (click)=\"add.emit()\"\n [disabled]=\"rows?.length >= maxRow || addDisabled\"\n >\n <aui-icon icon=\"plus_circle\"></aui-icon>\n {{ 'add' | translate }}\n </button>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n</table>\n" }]
}], () => [{ type: i0.Injector }], { headerTemplate: [{
type: ContentChild,
args: [ArrayFormTableHeaderDirective, {
read: TemplateRef,
static: true,
}]
}], rowTemplates: [{
type: ContentChildren,
args: [ArrayFormTableRowDirective, { read: TemplateRef }]
}], rowErrorTemplate: [{
type: ContentChild,
args: [ArrayFormTableRowErrorDirective, { read: TemplateRef }]
}], rowControlTemplate: [{
type: ContentChild,
args: [ArrayFormTableRowControlDirective, {
read: TemplateRef,
static: true,
}]
}], footerTemplate: [{
type: ContentChild,
args: [ArrayFormTableFooterDirective, {
read: TemplateRef,
static: true,
}]
}], zeroStateTemplate: [{
type: ContentChild,
args: [ArrayFormTableZeroStateDirective, {
read: TemplateRef,
static: false,
}]
}], separatorTemplate: [{
type: ContentChild,
args: [ArrayFormTableRowSeparatorDirective, {
read: TemplateRef,
static: false,
}]
}], rowSeparator: [{
type: Input
}], ngFormGroupDirective: [{
type: ContentChild,
args: [FormGroupDirective, { static: false }]
}], rows: [{
type: Input
}], resourceName: [{
type: Input
}], resourceNameTranslated: [{
type: Input
}], add: [{
type: Output
}], remove: [{
type: Output
}], readonly: [{
type: Input
}], addDisabled: [{
type: Input
}], actionColumnDivider: [{
type: Input
}], showZeroState: [{
type: Input
}], showRowError: [{
type: Input
}], rowBackgroundColorFn: [{
type: Input
}], minRow: [{
type: Input
}], minRowTooltip: [{
type: Input
}], maxRow: [{
type: Input
}], maxRowTooltip: [{
type: Input
}], enableDrop: [{
type: Input
}], rowDrop: [{
type: Output
}] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ArrayFormTableComponent, { className: "ArrayFormTableComponent" }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21tb24vc3JjL2FycmF5LWZvcm0tdGFibGUvZm9ybS9jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbW1vbi9zcmMvYXJyYXktZm9ybS10YWJsZS9mb3JtL3RlbXBsYXRlLmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxVQUFVLEVBQUUsUUFBUSxFQUFFLGFBQWEsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUMvRSxPQUFPLEVBQWUsY0FBYyxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDckUsT0FBTyxFQUFFLFNBQVMsRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLGdCQUFnQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDN0UsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixpQkFBaUIsRUFDakIsU0FBUyxFQUNULFlBQVksRUFDWixlQUFlLEVBQ2YsU0FBUyxFQUNULFlBQVksRUFD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