;
+ // let component: XTestRipplePropertyComponent;
+ beforeEach(async () => {
+ fixture = TestBed.createComponent(XTestRipplePropertyComponent);
+ // component = fixture.componentInstance;
fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XRippleDirective));
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('type.', () => {
+ expect(true).toBe(true);
+ });
+ it('duration.', () => {
+ expect(true).toBe(true);
+ });
+ it('disabled.', () => {
+ expect(true).toBe(true);
});
});
});
-
-@Component({
- selector: 'test-x-ripple',
- template: `
-
- 默认按钮
- 主要按钮
- 成功按钮
- 警告按钮
- 危险按钮
- 信息按钮
-
-
- 朴素按钮
- 主要按钮
- 成功按钮
- 警告按钮
- 危险按钮
- 信息按钮
-
-
- 圆角按钮
- 主要按钮
- 成功按钮
- 警告按钮
- 危险按钮
- 信息按钮
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- .row:not(:last-child) {
- margin-bottom: 1rem;
- }
- .row > x-button:not(:first-child) {
- margin-left: 1rem;
- }
- `
- ]
-})
-class TestXRippleDirective {}
diff --git a/lib/ng-nest/ui/select/select.component.spec.ts b/lib/ng-nest/ui/select/select.component.spec.ts
index 18efec5c2..59d445111 100644
--- a/lib/ng-nest/ui/select/select.component.spec.ts
+++ b/lib/ng-nest/ui/select/select.component.spec.ts
@@ -1,42 +1,121 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { Component, DebugElement, ChangeDetectorRef, provideExperimentalZonelessChangeDetection } from '@angular/core';
+import { Component, provideExperimentalZonelessChangeDetection, signal, TemplateRef, viewChild } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { XSelectComponent } from '@ng-nest/ui/select';
-import { FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { XSelectPrefix, XSelectNode } from './select.property';
-import { XRowComponent, XColComponent } from '@ng-nest/ui/layout';
-import { Observable, interval } from 'rxjs';
-import { XData } from '@ng-nest/ui/core';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-
-import { XRadioComponent } from '@ng-nest/ui/radio';
+import { XSelectComponent, XSelectNode, XSelectPrefix } from '@ng-nest/ui/select';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+import { XAlign, XData, XDirection, XJustify, XPlacement, XSize, XTemplate } from '@ng-nest/ui/core';
+
+@Component({
+ standalone: true,
+ imports: [XSelectComponent],
+ template: ` `
+})
+class XTestSelectComponent {}
+
+@Component({
+ standalone: true,
+ imports: [XSelectComponent],
+ template: `
+
+
+
+ {{ node.label }}
+
+
+ before
+ after
+ `
+})
+class XTestSelectPropertyComponent {
+ data = signal>([]);
+ width = signal('');
+ clearable = signal(true);
+ async = signal(false);
+ placement = signal('bottom');
+ multiple = signal(false);
+ selectAll = signal(false);
+ selectAllText = signal('');
+ nodeTpl = signal | null>(null);
+ nodeTemplate = viewChild>('nodeTemplate');
+ bordered = signal(true);
+ portalMaxHeight = signal('12rem');
+ portalWidth = signal('');
+ search = signal(false);
+ caseSensitive = signal(true);
+ debounceTime = signal(200);
+ maxTagCount = signal(-1);
+ maxTagContent = signal('');
+ virtualScroll = signal(false);
+ allowInput = signal(false);
+ size = signal('medium');
+ pointer = signal(false);
+ label = signal('');
+ labelWidth = signal('');
+ labelAlign = signal('start');
+ justify = signal('start');
+ align = signal('start');
+ direction = signal('column');
+ placeholder = signal('');
+ disabled = signal(false);
+ required = signal(false);
+ readonly = signal(false);
+ valueTpl = signal | null>(null);
+ valueTplContext = signal(null);
+ before = signal(null);
+ beforeTemplate = viewChild>('beforeTemplate');
+ after = signal(null);
+ afterTemplate = viewChild>('afterTemplate');
+ pattern = signal(null);
+ message = signal([]);
+ active = signal(false);
+ inputValidator = signal<((value: any) => boolean) | null>(null);
+}
describe(XSelectPrefix, () => {
beforeEach(() => {
TestBed.configureTestingModule({
- declarations: [
- TestXSelectComponent,
- TestXSelectAsyncComponent,
- TestXSelectLabelComponent,
- TestXSelectDisabledComponent,
- TestXSelectRequiredComponent,
- TestXSelectMultipleComponent,
- TestXSelectCustomNodeComponent,
- TestXSelectBorderedComponent,
- TestXSelectSizeComponent
- ],
- imports: [
- BrowserAnimationsModule,
-
- XSelectComponent,
- FormsModule,
- ReactiveFormsModule,
- XRowComponent,
- XColComponent,
- XRadioComponent
- ],
+ imports: [XTestSelectComponent, XTestSelectPropertyComponent],
providers: [
provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
@@ -44,519 +123,141 @@ describe(XSelectPrefix, () => {
]
}).compileComponents();
});
- describe(`default.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
+ describe('default.', () => {
+ let fixture: ComponentFixture;
beforeEach(() => {
- fixture = TestBed.createComponent(TestXSelectComponent);
+ fixture = TestBed.createComponent(XTestSelectComponent);
fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSelectComponent));
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('define.', () => {
+ const com = fixture.debugElement.query(By.directive(XSelectComponent));
+ expect(com).toBeDefined();
});
});
- describe(`async.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSelectAsyncComponent);
+ describe(`input.`, async () => {
+ let fixture: ComponentFixture;
+ // let component: XTestSelectPropertyComponent;
+ beforeEach(async () => {
+ fixture = TestBed.createComponent(XTestSelectPropertyComponent);
+ // component = fixture.componentInstance;
fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSelectComponent));
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('data.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`label.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSelectLabelComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSelectComponent));
+ it('width.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('clearable.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`disabled.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSelectDisabledComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSelectComponent));
+ it('async.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('placement.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`required.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSelectRequiredComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSelectComponent));
+ it('multiple.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('selectAll.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`multiple.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSelectMultipleComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSelectComponent));
+ it('selectAllText.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('nodeTpl.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`custom.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSelectCustomNodeComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSelectComponent));
+ it('bordered.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('portalMaxHeight.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`size.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSelectSizeComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSelectComponent));
+ it('portalWidth.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('search.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`bordered.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSelectBorderedComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSelectComponent));
+ it('caseSensitive.', () => {
+ expect(true).toBe(true);
+ });
+ it('debounceTime.', () => {
+ expect(true).toBe(true);
+ });
+ it('maxTagCount.', () => {
+ expect(true).toBe(true);
+ });
+ it('maxTagContent.', () => {
+ expect(true).toBe(true);
+ });
+ it('virtualScroll.', () => {
+ expect(true).toBe(true);
+ });
+ it('allowInput.', () => {
+ expect(true).toBe(true);
+ });
+ it('size.', () => {
+ expect(true).toBe(true);
+ });
+ it('pointer.', () => {
+ expect(true).toBe(true);
+ });
+ it('label.', () => {
+ expect(true).toBe(true);
+ });
+ it('labelWidth.', () => {
+ expect(true).toBe(true);
+ });
+ it('labelAlign.', () => {
+ expect(true).toBe(true);
+ });
+ it('justify.', () => {
+ expect(true).toBe(true);
+ });
+ it('align.', () => {
+ expect(true).toBe(true);
+ });
+ it('direction.', () => {
+ expect(true).toBe(true);
+ });
+ it('placeholder.', () => {
+ expect(true).toBe(true);
+ });
+ it('disabled.', () => {
+ expect(true).toBe(true);
+ });
+ it('required.', () => {
+ expect(true).toBe(true);
+ });
+ it('readonly.', () => {
+ expect(true).toBe(true);
+ });
+ it('valueTpl.', () => {
+ expect(true).toBe(true);
+ });
+ it('valueTplContext.', () => {
+ expect(true).toBe(true);
+ });
+ it('before.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('after.', () => {
+ expect(true).toBe(true);
+ });
+ it('pattern.', () => {
+ expect(true).toBe(true);
+ });
+ it('message.', () => {
+ expect(true).toBe(true);
+ });
+ it('active.', () => {
+ expect(true).toBe(true);
+ });
+ it('inputValidator.', () => {
+ expect(true).toBe(true);
});
});
});
-
-const data: XData = [
- 'AAAA',
- 'AAA',
- 'BBBB',
- 'CCCC',
- 'DDDD',
- 'EEEE',
- 'FFFF',
- 'GGGG',
- 'HHHH',
- 'IIII',
- 'JJJJ'
-];
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- height: 900px;
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSelectComponent {
- data1 = data;
- data2 = JSON.parse(JSON.stringify(data));
- model1: any;
- model2: any = 'BBBB';
- constructor(public cdr: ChangeDetectorRef) {
- interval(0).subscribe(() => this.cdr.detectChanges());
- }
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row > x-col {
- width: 10rem;
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSelectLabelComponent {
- data = data;
- model: any;
- constructor(public cdr: ChangeDetectorRef) {}
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row > x-col {
- width: 10rem;
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSelectDisabledComponent {
- data = data;
- model = 'DDDD';
- constructor(public cdr: ChangeDetectorRef) {}
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row > x-col {
- width: 10rem;
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSelectRequiredComponent {
- data = data;
- model1: any;
- model2: any;
-}
-
-@Component({
- template: `
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row > x-col {
- width: 10rem;
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSelectAsyncComponent {
- model = 'QQ';
- data = new Observable((x) => {
- // 替换成http请求,或者data直接定义成 Observable 对象
- setTimeout(() => {
- this.model = '钉钉';
- x.next(['QQ', '微信', '钉钉', '微博']);
- x.complete();
- }, 2000);
- });
- constructor(private cdr: ChangeDetectorRef) {}
- change() {
- this.cdr.detectChanges();
- }
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- height: 900px;
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSelectMultipleComponent {
- data1 = data;
- model1: any;
- data2 = JSON.parse(JSON.stringify(data));
- model2 = [
- { id: 'AAAA', label: 'AAAA' },
- { id: 'BBBB', label: 'BBBB' }
- ];
- constructor(public cdr: ChangeDetectorRef) {
- interval(0).subscribe(() => this.cdr.detectChanges());
- }
-}
-
-@Component({
- template: `
-
-
-
-
-
-
- {{ node?.label }}2
-
-
-
-
-
- {{ node?.label }} 2
-
- {{ item.label }} 2
-
-
-
- `,
- styles: [
- `
- :host {
- height: 900px;
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- .select-item {
- line-height: 1.25rem;
- }
- .select-item:not(:first-child):before {
- content: ',';
- }
- `
- ]
-})
-class TestXSelectCustomNodeComponent {
- data1 = data;
- model1: any;
- data2 = JSON.parse(JSON.stringify(data));
- model2: any;
- constructor(public cdr: ChangeDetectorRef) {
- interval(0).subscribe(() => {
- this.cdr.detectChanges();
- });
- }
-
- change(value: any) {
- console.log(value);
- }
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row > x-col > x-select {
- width: 15rem;
- display: block;
- }
- x-row > x-col:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSelectSizeComponent {
- radioData = ['big', 'large', 'medium', 'small', 'mini'];
- size = 'medium';
- data = data;
- constructor(private cdr: ChangeDetectorRef) {}
- change($event: string) {
- console.log($event);
- this.cdr.detectChanges();
- }
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row > x-col > x-select {
- width: 15rem;
- display: block;
- }
- x-row > x-col:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSelectBorderedComponent {
- data = data;
- constructor() {}
-}
diff --git a/lib/ng-nest/ui/skeleton/skeleton.component.spec.ts b/lib/ng-nest/ui/skeleton/skeleton.component.spec.ts
index 63bf43680..35a11c0eb 100644
--- a/lib/ng-nest/ui/skeleton/skeleton.component.spec.ts
+++ b/lib/ng-nest/ui/skeleton/skeleton.component.spec.ts
@@ -1,45 +1,33 @@
-import { XIconComponent } from '@ng-nest/ui/icon';
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import {
- Component,
- DebugElement,
- ChangeDetectorRef,
- ViewEncapsulation,
- provideExperimentalZonelessChangeDetection
-} from '@angular/core';
+import { Component, provideExperimentalZonelessChangeDetection, signal } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { XRowComponent, XColComponent } from '@ng-nest/ui/layout';
-import { XSkeletonComponent } from '@ng-nest/ui/skeleton';
-import { FormsModule } from '@angular/forms';
-import { XSkeletonPrefix, XSkeletonRow } from './skeleton.property';
-import { XButtonComponent } from '@ng-nest/ui/button';
-import { XContainerComponent } from '@ng-nest/ui/container';
-import { XSwitchComponent } from '@ng-nest/ui/switch';
-import { XAvatarComponent } from '@ng-nest/ui/avatar';
-import { XLinkComponent } from '@ng-nest/ui/link';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-
+import { XSkeletonComponent, XSkeletonData, XSkeletonPrefix, XSkeletonRow } from '@ng-nest/ui/skeleton';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+@Component({
+ standalone: true,
+ imports: [XSkeletonComponent],
+ template: ` `
+})
+class XTestSkeletonComponent {}
+
+@Component({
+ standalone: true,
+ imports: [XSkeletonComponent],
+ template: ` `
+})
+class XTestSkeletonPropertyComponent {
+ data = signal(XSkeletonData);
+ loading = signal(true);
+ active = signal(false);
+ border = signal(false);
+}
+
describe(XSkeletonPrefix, () => {
beforeEach(() => {
TestBed.configureTestingModule({
- declarations: [TestXSkeletonComponent],
- imports: [
- BrowserAnimationsModule,
-
- FormsModule,
- XSkeletonComponent,
- XSwitchComponent,
- XButtonComponent,
- XContainerComponent,
- XRowComponent,
- XColComponent,
- XAvatarComponent,
- XIconComponent,
- XLinkComponent
- ],
+ imports: [XTestSkeletonComponent, XTestSkeletonPropertyComponent],
providers: [
provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
@@ -47,197 +35,36 @@ describe(XSkeletonPrefix, () => {
]
}).compileComponents();
});
- describe(`default.`, () => {
- let fixture: ComponentFixture;
- let skeleton: DebugElement;
+ describe('default.', () => {
+ let fixture: ComponentFixture;
beforeEach(() => {
- fixture = TestBed.createComponent(TestXSkeletonComponent);
+ fixture = TestBed.createComponent(XTestSkeletonComponent);
fixture.detectChanges();
- skeleton = fixture.debugElement.query(By.directive(XSkeletonComponent));
});
- it('should create.', () => {
- expect(skeleton).toBeDefined();
+ it('define.', () => {
+ const com = fixture.debugElement.query(By.directive(XSkeletonComponent));
+ expect(com).toBeDefined();
+ });
+ });
+ describe(`input.`, async () => {
+ let fixture: ComponentFixture;
+ // let component: XTestSkeletonPropertyComponent;
+ beforeEach(async () => {
+ fixture = TestBed.createComponent(XTestSkeletonPropertyComponent);
+ // component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+ it('data.', () => {
+ expect(true).toBe(true);
+ });
+ it('loading.', () => {
+ expect(true).toBe(true);
+ });
+ it('active.', () => {
+ expect(true).toBe(true);
+ });
+ it('border.', () => {
+ expect(true).toBe(true);
});
});
});
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
生于忧患,死于安乐
-
- 舜发于畎亩之中,傅说举于版筑之间,胶鬲举于鱼盐之中,管夷吾举于士,孙叔敖举于海,百里奚举于市。故天将降大任于是人也,必先苦其心志,劳其筋骨,饿其体肤,空乏其身,行拂乱其所为,所以动心忍性,曾益其所不能。
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
生于忧患,死于安乐 {{ i + 1 }}
-
- 舜发于畎亩之中,傅说举于版筑之间,胶鬲举于鱼盐之中,管夷吾举于士,孙叔敖举于海,百里奚举于市。故天将降大任于是人也,必先苦其心志,劳其筋骨,饿其体肤,空乏其身,行拂乱其所为,所以动心忍性,曾益其所不能。
-
-
-
-
-
- 18
-
-
- 50
-
-
- 100
-
-
-
- 2020-03-17 22:22
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- .test-skeletion {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- .row:not(:first-child) {
- margin-top: 2rem;
- }
- .row .news li {
- padding-bottom: 1rem;
- }
- .row .news li:not(:first-child) {
- padding-top: 1rem;
- border-top: 0.0625rem solid var(--x-border-200);
- }
- .row .news h3 {
- margin: 0;
- }
- .row .news p {
- margin: 0.5rem 0;
- }
- .row .news .content {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- }
- `
- ],
- encapsulation: ViewEncapsulation.None
-})
-class TestXSkeletonComponent {
- dataCustom: XSkeletonRow[] = [
- {
- flex: true,
- space: '1rem',
- cols: [
- { type: 'avatar', width: '3rem', height: '3rem' },
- {
- rows: [
- { cols: [{ type: 'title', width: '10rem' }] },
- { cols: [{}] },
- { cols: [{}] },
- { cols: [{ span: 16 }] },
- {
- space: '1rem',
- flex: true,
- cols: [
- { width: '3rem' },
- { width: '3rem' },
- { width: '3rem' },
- { type: 'transparent' },
- { width: '9rem' }
- ]
- }
- ]
- },
- { type: 'img', width: '10rem', height: '9rem' }
- ]
- }
- ];
- dataTable: XSkeletonRow[] = [
- {
- flex: true,
- space: '1rem',
- cols: [
- { type: 'title', width: '3rem' },
- { type: 'title', span: 4 },
- { type: 'title', span: 6 },
- { type: 'title', span: 4 },
- { type: 'title', span: 10 }
- ]
- },
- {
- flex: true,
- space: '1rem',
- cols: [{ width: '3rem' }, { span: 4 }, { span: 6 }, { span: 4 }, { span: 10 }]
- },
- {
- flex: true,
- space: '1rem',
- cols: [{ width: '3rem' }, { span: 4 }, { span: 6 }, { span: 4 }, { span: 10 }]
- },
- {
- flex: true,
- space: '1rem',
- cols: [{ width: '3rem' }, { span: 4 }, { span: 6 }, { span: 4 }, { span: 10 }]
- },
- {
- flex: true,
- space: '1rem',
- cols: [{ width: '3rem' }, { span: 4 }, { span: 6 }, { span: 4 }, { span: 10 }]
- }
- ];
- loading = false;
- loadingList = true;
- list = new Array(3).fill({});
- constructor(private cdr: ChangeDetectorRef) {}
- change() {
- this.cdr.detectChanges();
- }
-}
diff --git a/lib/ng-nest/ui/slider-select/slider-select.component.spec.ts b/lib/ng-nest/ui/slider-select/slider-select.component.spec.ts
index 03dd86658..b60547f2e 100644
--- a/lib/ng-nest/ui/slider-select/slider-select.component.spec.ts
+++ b/lib/ng-nest/ui/slider-select/slider-select.component.spec.ts
@@ -1,40 +1,113 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { Component, DebugElement, provideExperimentalZonelessChangeDetection } from '@angular/core';
+import { Component, provideExperimentalZonelessChangeDetection, signal, TemplateRef, viewChild } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { XSliderSelectComponent } from '@ng-nest/ui/slider-select';
-import { FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { XSliderSelectPrefix } from './slider-select.property';
-import { XRowComponent, XColComponent } from '@ng-nest/ui/layout';
-import { XTabsComponent, XTabComponent } from '@ng-nest/ui/tabs';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { XSliderSelectComponent, XSliderSelectMark, XSliderSelectPrefix } from '@ng-nest/ui/slider-select';
import { provideHttpClientTesting } from '@angular/common/http/testing';
-import { XIconComponent } from '@ng-nest/ui/icon';
-import { XButtonComponent } from '@ng-nest/ui/button';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+import { XAlign, XDirection, XJustify, XTemplate } from '@ng-nest/ui/core';
+import { CdkDragEnd, CdkDragMove, CdkDragStart } from '@angular/cdk/drag-drop';
+
+@Component({
+ standalone: true,
+ imports: [XSliderSelectComponent],
+ template: ` `
+})
+class XTestSliderSelectComponent {}
+
+@Component({
+ standalone: true,
+ imports: [XSliderSelectComponent],
+ template: `
+
+
+ `
+})
+class XTestSliderSelectPropertyComponent {
+ min = signal(0);
+ max = signal(100);
+ step = signal(100);
+ precision = signal(null);
+ showTooltip = signal(true);
+ reverse = signal(false);
+ vertical = signal(false);
+ range = signal(false);
+ customButton = signal(null);
+ marks = signal([]);
+ tooltipCustom = signal(null);
+ pointer = signal(false);
+ label = signal('');
+ labelWidth = signal('');
+ labelAlign = signal('start');
+ justify = signal('start');
+ align = signal('start');
+ direction = signal('column');
+ placeholder = signal('');
+ disabled = signal(false);
+ required = signal(false);
+ readonly = signal(false);
+ valueTpl = signal | null>(null);
+ valueTplContext = signal(null);
+ before = signal(null);
+ beforeTemplate = viewChild>('beforeTemplate');
+ after = signal(null);
+ afterTemplate = viewChild>('afterTemplate');
+ pattern = signal(null);
+ message = signal([]);
+ active = signal(false);
+ inputValidator = signal<((value: any) => boolean) | null>(null);
+
+ dragStartEmitResult = signal(null);
+ dragStartEmit(start: CdkDragStart) {
+ this.dragStartEmitResult.set(start);
+ }
+ dragMoveEmitResult = signal(null);
+ dragMoveEmit(move: CdkDragMove) {
+ this.dragMoveEmitResult.set(move);
+ }
+ dragEndEmitResult = signal(null);
+ dragEndEmit(end: CdkDragEnd) {
+ this.dragEndEmitResult.set(end);
+ }
+}
describe(XSliderSelectPrefix, () => {
beforeEach(() => {
TestBed.configureTestingModule({
- declarations: [
- TestXSliderSelectComponent,
- TestXSliderSelectLabelComponent,
- TestXSliderSelectLimitComponent,
- TestXSliderSelectPrecisionComponent,
- TestXSliderSelectDisabledComponent,
- TestXSliderSelectTabsComponent
- ],
- imports: [
- BrowserAnimationsModule,
- XSliderSelectComponent,
- FormsModule,
- ReactiveFormsModule,
- XRowComponent,
- XColComponent,
- XTabsComponent,
- XTabComponent,
- XIconComponent,
- XButtonComponent
- ],
+ imports: [XTestSliderSelectComponent, XTestSliderSelectPropertyComponent],
providers: [
provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
@@ -42,288 +115,114 @@ describe(XSliderSelectPrefix, () => {
]
}).compileComponents();
});
- describe(`default.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
+ describe('default.', () => {
+ let fixture: ComponentFixture;
beforeEach(() => {
- fixture = TestBed.createComponent(TestXSliderSelectComponent);
+ fixture = TestBed.createComponent(XTestSliderSelectComponent);
fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSliderSelectComponent));
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('define.', () => {
+ const com = fixture.debugElement.query(By.directive(XSliderSelectComponent));
+ expect(com).toBeDefined();
});
});
- describe(`label.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSliderSelectLabelComponent);
+ describe(`input.`, async () => {
+ let fixture: ComponentFixture;
+ // let component: XTestSliderSelectPropertyComponent;
+ beforeEach(async () => {
+ fixture = TestBed.createComponent(XTestSliderSelectPropertyComponent);
+ // component = fixture.componentInstance;
fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(TestXSliderSelectLabelComponent));
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('min.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`limit.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSliderSelectLimitComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(TestXSliderSelectLimitComponent));
+ it('max.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('step.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`precision.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSliderSelectPrecisionComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(TestXSliderSelectPrecisionComponent));
+ it('precision.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('showTooltip.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`disabled.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSliderSelectDisabledComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(TestXSliderSelectDisabledComponent));
+ it('reverse.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('vertical.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`tabs.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSliderSelectTabsComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(TestXSliderSelectDisabledComponent));
+ it('range.', () => {
+ expect(true).toBe(true);
+ });
+ it('customButton.', () => {
+ expect(true).toBe(true);
+ });
+ it('marks.', () => {
+ expect(true).toBe(true);
+ });
+ it('tooltipCustom.', () => {
+ expect(true).toBe(true);
+ });
+ it('pointer.', () => {
+ expect(true).toBe(true);
+ });
+ it('label.', () => {
+ expect(true).toBe(true);
+ });
+ it('labelWidth.', () => {
+ expect(true).toBe(true);
+ });
+ it('labelAlign.', () => {
+ expect(true).toBe(true);
+ });
+ it('justify.', () => {
+ expect(true).toBe(true);
+ });
+ it('align.', () => {
+ expect(true).toBe(true);
+ });
+ it('direction.', () => {
+ expect(true).toBe(true);
+ });
+ it('placeholder.', () => {
+ expect(true).toBe(true);
+ });
+ it('disabled.', () => {
+ expect(true).toBe(true);
+ });
+ it('required.', () => {
+ expect(true).toBe(true);
+ });
+ it('readonly.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('valueTpl.', () => {
+ expect(true).toBe(true);
+ });
+ it('valueTplContext.', () => {
+ expect(true).toBe(true);
+ });
+ it('before.', () => {
+ expect(true).toBe(true);
+ });
+ it('after.', () => {
+ expect(true).toBe(true);
+ });
+ it('pattern.', () => {
+ expect(true).toBe(true);
+ });
+ it('message.', () => {
+ expect(true).toBe(true);
+ });
+ it('active.', () => {
+ expect(true).toBe(true);
+ });
+ it('inputValidator.', () => {
+ expect(true).toBe(true);
});
});
});
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSliderSelectComponent {
- model = 60;
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSliderSelectLimitComponent {
- model1 = 0;
- model2 = 0;
- model3 = 0;
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSliderSelectPrecisionComponent {}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSliderSelectLabelComponent {
- model: number = 0;
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSliderSelectDisabledComponent {
- model = 60;
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSliderSelectTabsComponent {
- model1 = 0.3;
- model2 = 0.44;
-}
diff --git a/lib/ng-nest/ui/slider/slider.component.spec.ts b/lib/ng-nest/ui/slider/slider.component.spec.ts
index 993262f3b..fb83a43db 100644
--- a/lib/ng-nest/ui/slider/slider.component.spec.ts
+++ b/lib/ng-nest/ui/slider/slider.component.spec.ts
@@ -1,28 +1,75 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { Component, DebugElement, provideExperimentalZonelessChangeDetection } from '@angular/core';
+import { Component, provideExperimentalZonelessChangeDetection, signal, TemplateRef, viewChild } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { XSliderComponent } from '@ng-nest/ui/slider';
-import { XSliderPrefix, XSliderNode } from './slider.property';
-import { XData } from '@ng-nest/ui/core';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { XIconComponent } from '@ng-nest/ui/icon';
-import { XTabsComponent, XTabComponent } from '@ng-nest/ui/tabs';
-
+import { XSliderComponent, XSliderLayout, XSliderNode, XSliderPrefix, XSliderTrigger } from '@ng-nest/ui/slider';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+import { XDataArray, XJustify, XSize } from '@ng-nest/ui/core';
+
+@Component({
+ standalone: true,
+ imports: [XSliderComponent],
+ template: ` `
+})
+class XTestSliderComponent {}
+
+@Component({
+ standalone: true,
+ imports: [XSliderComponent],
+ template: `
+
+
+
+ {{ node.label }}
+ `
+})
+class XTestSliderPropertyComponent {
+ data = signal>([]);
+ animated = signal(true);
+ activatedIndex = signal(0);
+ trigger = signal('click');
+ layout = signal('row');
+ justify = signal('start');
+ nodeJustify = signal('center');
+ nodeTpl = signal | null>(null);
+ nodeTemplate = viewChild>('nodeTemplate');
+ size = signal('medium');
+ showExpand = signal(false);
+ autoShowArrow = signal(true);
+ expandMaxHeight = signal('15rem');
+ showAnchor = signal(false);
+
+ indexChangeResult = signal(null);
+ indexChange(index: number) {
+ this.indexChangeResult.set(index);
+ }
+
+ nodeChangeResult = signal(null);
+ nodeChange(node: XSliderNode) {
+ this.nodeChangeResult.set(node);
+ }
+}
describe(XSliderPrefix, () => {
beforeEach(() => {
TestBed.configureTestingModule({
- declarations: [TestXSliderComponent],
- imports: [
- XSliderComponent,
-
- BrowserAnimationsModule,
- XIconComponent,
- XTabsComponent,
- XTabComponent
- ],
+ imports: [XTestSliderComponent, XTestSliderPropertyComponent],
providers: [
provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
@@ -30,95 +77,69 @@ describe(XSliderPrefix, () => {
]
}).compileComponents();
});
- describe(`default.`, () => {
- let fixture: ComponentFixture;
- let slider: DebugElement;
+ describe('default.', () => {
+ let fixture: ComponentFixture;
beforeEach(() => {
- fixture = TestBed.createComponent(TestXSliderComponent);
+ fixture = TestBed.createComponent(XTestSliderComponent);
fixture.detectChanges();
- slider = fixture.debugElement.query(By.directive(XSliderComponent));
});
- it('should create.', () => {
- expect(slider).toBeDefined();
+ it('define.', () => {
+ const com = fixture.debugElement.query(By.directive(XSliderComponent));
+ expect(com).toBeDefined();
+ });
+ });
+ describe(`input.`, async () => {
+ let fixture: ComponentFixture;
+ // let component: XTestSliderPropertyComponent;
+ beforeEach(async () => {
+ fixture = TestBed.createComponent(XTestSliderPropertyComponent);
+ // component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+ it('data.', () => {
+ expect(true).toBe(true);
+ });
+ it('animated.', () => {
+ expect(true).toBe(true);
+ });
+ it('activatedIndex.', () => {
+ expect(true).toBe(true);
+ });
+ it('trigger.', () => {
+ expect(true).toBe(true);
+ });
+ it('layout.', () => {
+ expect(true).toBe(true);
+ });
+ it('justify.', () => {
+ expect(true).toBe(true);
+ });
+ it('nodeJustify.', () => {
+ expect(true).toBe(true);
+ });
+ it('nodeTpl.', () => {
+ expect(true).toBe(true);
+ });
+ it('size.', () => {
+ expect(true).toBe(true);
+ });
+ it('showExpand.', () => {
+ expect(true).toBe(true);
+ });
+ it('autoShowArrow.', () => {
+ expect(true).toBe(true);
+ });
+ it('expandMaxHeight.', () => {
+ expect(true).toBe(true);
+ });
+ it('showAnchor.', () => {
+ expect(true).toBe(true);
+ });
+ it('indexChange.', () => {
+ expect(true).toBe(true);
+ });
+ it('nodeChange.', () => {
+ expect(true).toBe(true);
});
});
});
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ node.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- .row:not(:first-child) {
- margin-top: 1rem;
- }
- .custom-node x-icon {
- margin-right: 0.125rem;
- }
- `
- ]
-})
-class TestXSliderComponent {
- data: XData = ['用户管理', '配置管理', '角色管理', '任务', '工作', '消息', '流程', '新闻'];
- dataCustom: XData = [
- { label: '用户管理', icon: 'fto-box' },
- { label: '配置管理', icon: 'fto-settings' },
- '角色管理',
- '任务',
- '工作',
- '消息',
- '流程',
- '新闻'
- ];
-}
diff --git a/lib/ng-nest/ui/statistic/countdown.component.spec.ts b/lib/ng-nest/ui/statistic/countdown.component.spec.ts
new file mode 100644
index 000000000..7f4959817
--- /dev/null
+++ b/lib/ng-nest/ui/statistic/countdown.component.spec.ts
@@ -0,0 +1,94 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { Component, provideExperimentalZonelessChangeDetection, signal } from '@angular/core';
+import { By } from '@angular/platform-browser';
+import { XCountdownComponent, XCountdownPrefix } from '@ng-nest/ui/statistic';
+import { provideHttpClientTesting } from '@angular/common/http/testing';
+import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+import { XStyle, XTemplate } from '@ng-nest/ui/core';
+
+@Component({
+ standalone: true,
+ imports: [XCountdownComponent],
+ template: ` `
+})
+class XTestCountdownComponent {}
+
+@Component({
+ standalone: true,
+ imports: [XCountdownComponent],
+ template: `
+
+
+ `
+})
+class XTestCountdownPropertyComponent {
+ value = signal(null);
+ label = signal(null);
+ prefix = signal(null);
+ suffix = signal(null);
+ valueStyle = signal({});
+ format = signal('HH:mm:ss');
+ finish() {}
+}
+
+describe(XCountdownPrefix, () => {
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [XTestCountdownComponent, XTestCountdownPropertyComponent],
+ providers: [
+ provideHttpClient(withInterceptorsFromDi()),
+ provideHttpClientTesting(),
+ provideExperimentalZonelessChangeDetection()
+ ]
+ }).compileComponents();
+ });
+ describe('default.', () => {
+ let fixture: ComponentFixture;
+ beforeEach(() => {
+ fixture = TestBed.createComponent(XTestCountdownComponent);
+ fixture.detectChanges();
+ });
+ it('define.', () => {
+ const com = fixture.debugElement.query(By.directive(XCountdownComponent));
+ expect(com).toBeDefined();
+ });
+ });
+ describe(`input.`, async () => {
+ let fixture: ComponentFixture;
+ // let component: XTestCountdownPropertyComponent;
+ beforeEach(async () => {
+ fixture = TestBed.createComponent(XTestCountdownPropertyComponent);
+ // component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+ it('value.', () => {
+ expect(true).toBe(true);
+ });
+ it('label.', () => {
+ expect(true).toBe(true);
+ });
+ it('prefix.', () => {
+ expect(true).toBe(true);
+ });
+ it('suffix.', () => {
+ expect(true).toBe(true);
+ });
+ it('valueStyle.', () => {
+ expect(true).toBe(true);
+ });
+ it('format.', () => {
+ expect(true).toBe(true);
+ });
+ it('finish.', () => {
+ expect(true).toBe(true);
+ });
+ });
+});
diff --git a/lib/ng-nest/ui/statistic/statistic.component.spec.ts b/lib/ng-nest/ui/statistic/statistic.component.spec.ts
index 2fb572a3b..0e2ca4696 100644
--- a/lib/ng-nest/ui/statistic/statistic.component.spec.ts
+++ b/lib/ng-nest/ui/statistic/statistic.component.spec.ts
@@ -1,37 +1,44 @@
-import { XIconComponent } from '@ng-nest/ui/icon';
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { Component, DebugElement, provideExperimentalZonelessChangeDetection } from '@angular/core';
+import { Component, provideExperimentalZonelessChangeDetection, signal } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { XRowComponent, XColComponent } from '@ng-nest/ui/layout';
-import { XStatisticComponent, XCountdownComponent } from '@ng-nest/ui/statistic';
-import { FormsModule } from '@angular/forms';
-import { XStatisticPrefix } from './statistic.property';
-import { XButtonComponent } from '@ng-nest/ui/button';
-import { XContainerComponent } from '@ng-nest/ui/container';
-import { XCardComponent } from '@ng-nest/ui/card';
-import { XAddDays } from '@ng-nest/ui/core';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-
+import { XStatisticComponent, XStatisticPrefix } from '@ng-nest/ui/statistic';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+import { XStyle, XTemplate } from '@ng-nest/ui/core';
+
+@Component({
+ standalone: true,
+ imports: [XStatisticComponent],
+ template: ` `
+})
+class XTestStatisticComponent {}
+
+@Component({
+ standalone: true,
+ imports: [XStatisticComponent],
+ template: `
+
+
+ `
+})
+class XTestStatisticPropertyComponent {
+ value = signal(null);
+ label = signal(null);
+ prefix = signal(null);
+ suffix = signal(null);
+ valueStyle = signal({});
+}
describe(XStatisticPrefix, () => {
beforeEach(() => {
TestBed.configureTestingModule({
- declarations: [TestXStatisticComponent],
- imports: [
- BrowserAnimationsModule,
-
- FormsModule,
- XStatisticComponent,
- XCountdownComponent,
- XButtonComponent,
- XCardComponent,
- XContainerComponent,
- XRowComponent,
- XColComponent,
- XIconComponent
- ],
+ imports: [XTestStatisticComponent, XTestStatisticPropertyComponent],
providers: [
provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
@@ -39,94 +46,39 @@ describe(XStatisticPrefix, () => {
]
}).compileComponents();
});
- describe(`default.`, () => {
- let fixture: ComponentFixture;
- let statistic: DebugElement;
+ describe('default.', () => {
+ let fixture: ComponentFixture;
beforeEach(() => {
- fixture = TestBed.createComponent(TestXStatisticComponent);
+ fixture = TestBed.createComponent(XTestStatisticComponent);
+ fixture.detectChanges();
+ });
+ it('define.', () => {
+ const com = fixture.debugElement.query(By.directive(XStatisticComponent));
+ expect(com).toBeDefined();
+ });
+ });
+ describe(`input.`, async () => {
+ let fixture: ComponentFixture;
+ // let component: XTestStatisticPropertyComponent;
+ beforeEach(async () => {
+ fixture = TestBed.createComponent(XTestStatisticPropertyComponent);
+ // component = fixture.componentInstance;
fixture.detectChanges();
- statistic = fixture.debugElement.query(By.directive(XStatisticComponent));
});
- it('should create.', () => {
- expect(statistic).toBeDefined();
+ it('value.', () => {
+ expect(true).toBe(true);
+ });
+ it('label.', () => {
+ expect(true).toBe(true);
+ });
+ it('prefix.', () => {
+ expect(true).toBe(true);
+ });
+ it('suffix.', () => {
+ expect(true).toBe(true);
+ });
+ it('valueStyle.', () => {
+ expect(true).toBe(true);
});
});
});
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- x-row x-col {
- padding-top: 0.5rem;
- padding-bottom: 0.5rem;
- }
- `
- ]
-})
-class TestXStatisticComponent {
- deadline = XAddDays(new Date(), 2).getTime();
-}
diff --git a/lib/ng-nest/ui/steps/steps.component.spec.ts b/lib/ng-nest/ui/steps/steps.component.spec.ts
index 3098b6144..439e70e4c 100644
--- a/lib/ng-nest/ui/steps/steps.component.spec.ts
+++ b/lib/ng-nest/ui/steps/steps.component.spec.ts
@@ -1,28 +1,48 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { Component, DebugElement, ChangeDetectorRef, provideExperimentalZonelessChangeDetection } from '@angular/core';
+import { Component, provideExperimentalZonelessChangeDetection, signal, TemplateRef } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { XStepsComponent } from '@ng-nest/ui/steps';
-import { XStepsPrefix } from './steps.property';
-import { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';
-import { XTabsComponent, XTabComponent } from '@ng-nest/ui/tabs';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-
+import { XStepsComponent, XStepsLayout, XStepsNode, XStepsPrefix, XStepsStatus } from '@ng-nest/ui/steps';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+import { XDataArray } from '@ng-nest/ui/core';
+
+@Component({
+ standalone: true,
+ imports: [XStepsComponent],
+ template: ` `
+})
+class XTestStepsComponent {}
+
+@Component({
+ standalone: true,
+ imports: [XStepsComponent],
+ template: `
+
+
+ `
+})
+class XTestStepsPropertyComponent {
+ data = signal>([]);
+ layout = signal('row');
+ activatedIndex = signal(0);
+ startIndex = signal(0);
+ status = signal(null);
+ customTpl = signal | null>(null);
+ nodeStatus = signal(false);
+}
describe(XStepsPrefix, () => {
beforeEach(() => {
TestBed.configureTestingModule({
- declarations: [TestXStepsComponent, TestXStepsDotComponent],
- imports: [
- BrowserAnimationsModule,
-
- XStepsComponent,
- XButtonComponent,
- XButtonsComponent,
- XTabsComponent,
- XTabComponent
- ],
+ imports: [XTestStepsComponent, XTestStepsPropertyComponent],
providers: [
provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
@@ -30,213 +50,45 @@ describe(XStepsPrefix, () => {
]
}).compileComponents();
});
- describe(`default.`, () => {
- let fixture: ComponentFixture;
- let steps: DebugElement;
+ describe('default.', () => {
+ let fixture: ComponentFixture;
beforeEach(() => {
- fixture = TestBed.createComponent(TestXStepsComponent);
- steps = fixture.debugElement.query(By.directive(XStepsComponent));
+ fixture = TestBed.createComponent(XTestStepsComponent);
fixture.detectChanges();
});
- it('should create.', () => {
- expect(steps).toBeDefined();
+ it('define.', () => {
+ const com = fixture.debugElement.query(By.directive(XStepsComponent));
+ expect(com).toBeDefined();
});
});
- describe(`custom.`, () => {
- let fixture: ComponentFixture;
- let steps: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXStepsDotComponent);
+ describe(`input.`, async () => {
+ let fixture: ComponentFixture;
+ // let component: XTestStepsPropertyComponent;
+ beforeEach(async () => {
+ fixture = TestBed.createComponent(XTestStepsPropertyComponent);
+ // component = fixture.componentInstance;
fixture.detectChanges();
- steps = fixture.debugElement.query(By.directive(XStepsComponent));
});
- it('should create.', () => {
- expect(steps).toBeDefined();
+ it('data.', () => {
+ expect(true).toBe(true);
+ });
+ it('layout.', () => {
+ expect(true).toBe(true);
+ });
+ it('activatedIndex.', () => {
+ expect(true).toBe(true);
+ });
+ it('startIndex.', () => {
+ expect(true).toBe(true);
+ });
+ it('status.', () => {
+ expect(true).toBe(true);
+ });
+ it('customTpl.', () => {
+ expect(true).toBe(true);
+ });
+ it('nodeStatus.', () => {
+ expect(true).toBe(true);
});
});
});
-
-@Component({
- template: `
-
-
-
-
- 下一步
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0">上一步
- 下一步
- 提交
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- .row {
- margin-top: 2rem;
- }
- .row:not(:first-child) {
- margin-top: 1rem;
- }
- .custom-steps-content {
- height: 10rem;
- border: 0.0625rem solid var(--x-border);
- border-radius: 0.125rem;
- line-height: 10rem;
- text-align: center;
- }
- `
- ]
-})
-class TestXStepsComponent {
- activatedIndex = 0;
- data = ['步骤 1', '步骤 2', '步骤 3'];
- dataDefault = [
- { label: '完成', description: '这是描述内容。' },
- { label: '进行中', description: '这是描述内容。' },
- { label: '等待', description: '这是描述内容。' }
- ];
- dataIcon = [
- { label: '登录', icon: 'fto-user' },
- { label: '验证', icon: 'fto-user-check' },
- { label: '付款', icon: 'fto-credit-card' },
- { label: '完成', icon: 'fto-smile' }
- ];
- activatedTab = 0;
- dataError = ['完成', '执行错误', '等待'];
-
- constructor(private cdr: ChangeDetectorRef) {}
-
- next() {
- this.activatedIndex++;
- if (this.activatedIndex > this.data.length - 1) this.activatedIndex = 0;
- this.cdr.detectChanges();
- }
-
- preTab() {
- this.activatedTab -= 1;
- this.cdr.detectChanges();
- }
-
- nextTab() {
- this.activatedTab += 1;
- this.cdr.detectChanges();
- }
-
- doneTab() {
- console.log('提交');
- }
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- .row {
- margin-top: 2rem;
- }
- .row:not(:first-child) {
- margin-top: 1rem;
- }
- .custom-class {
- width: 0.5rem;
- height: 0.5rem;
- border-radius: 0.5rem;
- margin-top: 0.75rem;
- background-color: var(--x-primary);
- }
- .custom-class.wait {
- background-color: var(--x-background-a900);
- }
- .custom-loading-circular {
- animation: loading-rotate 2s linear infinite;
- height: 1.75rem;
- width: 1.75rem;
- }
- .custom-loading-path {
- animation: loading-dash 1.5s ease-in-out infinite;
- stroke-dasharray: 90, 150;
- stroke-dashoffset: 0;
- stroke-width: 2;
- stroke: var(--x-primary);
- stroke-linecap: round;
- }
- @keyframes loading-rotate {
- 100% {
- transform: rotate(360deg);
- }
- }
-
- @keyframes loading-dash {
- 0% {
- stroke-dasharray: 1, 200;
- stroke-dashoffset: 0;
- }
- 50% {
- stroke-dasharray: 90, 150;
- stroke-dashoffset: -2.5rem;
- }
- 100% {
- stroke-dasharray: 90, 150;
- stroke-dashoffset: -7.5rem;
- }
- }
- `
- ]
-})
-class TestXStepsDotComponent {
- data = ['步骤 1', '步骤 2', '步骤 3'];
- activatedIndex = 1;
-}
diff --git a/lib/ng-nest/ui/switch/switch.component.spec.ts b/lib/ng-nest/ui/switch/switch.component.spec.ts
index c6f963219..3c0466423 100644
--- a/lib/ng-nest/ui/switch/switch.component.spec.ts
+++ b/lib/ng-nest/ui/switch/switch.component.spec.ts
@@ -1,34 +1,86 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { Component, DebugElement, ChangeDetectorRef, provideExperimentalZonelessChangeDetection } from '@angular/core';
+import { Component, provideExperimentalZonelessChangeDetection, signal, TemplateRef, viewChild } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { XSwitchComponent } from '@ng-nest/ui/switch';
-import { FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { XSwitchPrefix } from './switch.property';
-import { XRowComponent, XColComponent } from '@ng-nest/ui/layout';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-
+import { XSwitchComponent, XSwitchPrefix } from '@ng-nest/ui/switch';
import { provideHttpClientTesting } from '@angular/common/http/testing';
-import { XRadioComponent } from '@ng-nest/ui/radio';
-import { XInputComponent } from '@ng-nest/ui/input';
-import { XIconComponent } from '@ng-nest/ui/icon';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+import { XAlign, XDirection, XJustify, XSize, XTemplate } from '@ng-nest/ui/core';
+
+@Component({
+ standalone: true,
+ imports: [XSwitchComponent],
+ template: ` `
+})
+class XTestSwitchComponent {}
+
+@Component({
+ standalone: true,
+ imports: [XSwitchComponent],
+ template: `
+
+
+ before
+ after
+ `
+})
+class XTestSwitchPropertyComponent {
+ loading = signal(false);
+ manual = signal(false);
+ checkedText = signal(null);
+ unCheckedText = signal(null);
+ size = signal('medium');
+ pointer = signal(false);
+ label = signal('');
+ labelWidth = signal('');
+ labelAlign = signal('start');
+ justify = signal('start');
+ align = signal('start');
+ direction = signal('column');
+ placeholder = signal('');
+ disabled = signal(false);
+ required = signal(false);
+ readonly = signal(false);
+ valueTpl = signal | null>(null);
+ valueTplContext = signal(null);
+ before = signal(null);
+ beforeTemplate = viewChild>('beforeTemplate');
+ after = signal(null);
+ afterTemplate = viewChild>('afterTemplate');
+ pattern = signal(null);
+ message = signal([]);
+ active = signal(false);
+ inputValidator = signal<((value: any) => boolean) | null>(null);
+}
describe(XSwitchPrefix, () => {
beforeEach(() => {
TestBed.configureTestingModule({
- declarations: [TestXSwitchComponent, TestXSwitchLabelComponent, TestXSwitchDisabledComponent],
- imports: [
- BrowserAnimationsModule,
-
- XSwitchComponent,
- FormsModule,
- ReactiveFormsModule,
- XRowComponent,
- XColComponent,
- XRadioComponent,
- XInputComponent,
- XIconComponent
- ],
+ imports: [XTestSwitchComponent, XTestSwitchPropertyComponent],
providers: [
provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
@@ -36,149 +88,96 @@ describe(XSwitchPrefix, () => {
]
}).compileComponents();
});
- describe(`default.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
+ describe('default.', () => {
+ let fixture: ComponentFixture;
beforeEach(() => {
- fixture = TestBed.createComponent(TestXSwitchComponent);
+ fixture = TestBed.createComponent(XTestSwitchComponent);
fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(XSwitchComponent));
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('define.', () => {
+ const com = fixture.debugElement.query(By.directive(XSwitchComponent));
+ expect(com).toBeDefined();
});
});
- describe(`label.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSwitchLabelComponent);
+ describe(`input.`, async () => {
+ let fixture: ComponentFixture;
+ // let component: XTestSwitchPropertyComponent;
+ beforeEach(async () => {
+ fixture = TestBed.createComponent(XTestSwitchPropertyComponent);
+ // component = fixture.componentInstance;
fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(TestXSwitchLabelComponent));
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('loading.', () => {
+ expect(true).toBe(true);
});
- });
- describe(`disabled.`, () => {
- let fixture: ComponentFixture;
- let debugElement: DebugElement;
- beforeEach(() => {
- fixture = TestBed.createComponent(TestXSwitchDisabledComponent);
- fixture.detectChanges();
- debugElement = fixture.debugElement.query(By.directive(TestXSwitchDisabledComponent));
+ it('manual.', () => {
+ expect(true).toBe(true);
+ });
+ it('checkedText.', () => {
+ expect(true).toBe(true);
+ });
+ it('unCheckedText.', () => {
+ expect(true).toBe(true);
+ });
+ it('size.', () => {
+ expect(true).toBe(true);
+ });
+ it('pointer.', () => {
+ expect(true).toBe(true);
+ });
+ it('label.', () => {
+ expect(true).toBe(true);
+ });
+ it('labelWidth.', () => {
+ expect(true).toBe(true);
+ });
+ it('labelAlign.', () => {
+ expect(true).toBe(true);
+ });
+ it('justify.', () => {
+ expect(true).toBe(true);
+ });
+ it('align.', () => {
+ expect(true).toBe(true);
+ });
+ it('direction.', () => {
+ expect(true).toBe(true);
+ });
+ it('placeholder.', () => {
+ expect(true).toBe(true);
});
- it('should create.', () => {
- expect(debugElement).toBeDefined();
+ it('disabled.', () => {
+ expect(true).toBe(true);
+ });
+ it('required.', () => {
+ expect(true).toBe(true);
+ });
+ it('readonly.', () => {
+ expect(true).toBe(true);
+ });
+ it('valueTpl.', () => {
+ expect(true).toBe(true);
+ });
+ it('valueTplContext.', () => {
+ expect(true).toBe(true);
+ });
+ it('before.', () => {
+ expect(true).toBe(true);
+ });
+ it('after.', () => {
+ expect(true).toBe(true);
+ });
+ it('pattern.', () => {
+ expect(true).toBe(true);
+ });
+ it('message.', () => {
+ expect(true).toBe(true);
+ });
+ it('active.', () => {
+ expect(true).toBe(true);
+ });
+ it('inputValidator.', () => {
+ expect(true).toBe(true);
});
});
});
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- height: 900px;
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSwitchComponent {
- model1!: boolean;
- model2 = true;
- constructor(private cdr: ChangeDetectorRef) {}
- change() {
- this.cdr.detectChanges();
- }
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSwitchLabelComponent {
- constructor() {}
-}
-
-@Component({
- template: `
-
-
-
-
-
-
-
-
-
-
-
- `,
- styles: [
- `
- :host {
- background-color: var(--x-background);
- padding: 1rem;
- border: 0.0625rem solid var(--x-border);
- }
- x-row:not(:first-child) {
- margin-top: 1rem;
- }
- `
- ]
-})
-class TestXSwitchDisabledComponent {
- model = true;
-}
diff --git a/lib/ng-nest/ui/table/table.component.html b/lib/ng-nest/ui/table/table.component.html
index 95af44213..2c78856a5 100644
--- a/lib/ng-nest/ui/table/table.component.html
+++ b/lib/ng-nest/ui/table/table.component.html
@@ -130,6 +130,9 @@
[totalTpl]="totalTpl()"
[simple]="simple()"
[simpleIndexWidth]="simpleIndexWidth()"
+ [jumpTooltipText]="jumpTooltipText()"
+ [inputSizeTooltipText]="inputSizeTooltipText()"
+ [inputIndexSizeSureType]="inputIndexSizeSureType()"
>
}
diff --git a/lib/ng-nest/ui/table/table.component.spec.ts b/lib/ng-nest/ui/table/table.component.spec.ts
index dff2fd053..37decac58 100644
--- a/lib/ng-nest/ui/table/table.component.spec.ts
+++ b/lib/ng-nest/ui/table/table.component.spec.ts
@@ -1,71 +1,163 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import {
- Component,
- DebugElement,
- Injectable,
- ChangeDetectorRef,
- provideExperimentalZonelessChangeDetection
-} from '@angular/core';
+import { Component, provideExperimentalZonelessChangeDetection, signal } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { XTableComponent } from '@ng-nest/ui/table';
-import { FormsModule } from '@angular/forms';
-import { XTablePrefix, XTableColumn, XTableCellConfig } from './table.property';
import {
- XRepositoryAbstract,
- XQuery,
- XResultList,
- XGroupItem,
- XFilter,
- XChunk,
- XGroupBy,
- XSort,
- XId,
- XOrderBy
-} from '@ng-nest/ui/core';
-import { Observable, interval } from 'rxjs';
-import { map as rxjsMap, delay } from 'rxjs/operators';
-import { XIconComponent } from '@ng-nest/ui/icon';
-import { XAvatarComponent } from '@ng-nest/ui/avatar';
-import { XButtonComponent } from '@ng-nest/ui/button';
-import { XInputComponent } from '@ng-nest/ui/input';
-import { XSelectComponent } from '@ng-nest/ui/select';
-import { XSwitchComponent } from '@ng-nest/ui/switch';
-import { XLinkComponent } from '@ng-nest/ui/link';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { XDescriptionModule } from '@ng-nest/ui/description';
+ XPaginationPosition,
+ XTableCellConfig,
+ XTableColumn,
+ XTableComponent,
+ XTableDragWidthEvent,
+ XTableHeadCheckbox,
+ XTableHeaderPosition,
+ XTablePrefix,
+ XTableRow,
+ XTableTemplate
+} from '@ng-nest/ui/table';
import { provideHttpClientTesting } from '@angular/common/http/testing';
-import { XDialogComponent } from '@ng-nest/ui/dialog';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+import { XData, XDataArray, XQuery, XSize, XSort, XTemplate } from '@ng-nest/ui/core';
+import { XPaginationInputIndexSizeSureType, XPaginationSizeData } from '@ng-nest/ui/pagination';
+import { XSelectNode } from '@ng-nest/ui/select';
+
+@Component({
+ standalone: true,
+ imports: [XTableComponent],
+ template: ` `
+})
+class XTestTableComponent {}
+
+@Component({
+ standalone: true,
+ imports: [XTableComponent],
+ template: `
+
+
+ `
+})
+class XTestTablePropertyComponent {
+ data = signal>([]);
+ columns = signal([]);
+ rowHeight = signal(42);
+ loading = signal(false);
+ bordered = signal(false);
+ showHeader = signal(true);
+ headerPosition = signal('top');
+ activatedRow = signal(null);
+ headColumnTpl = signal({});
+ headThTpl = signal(null);
+ bodyColumnTpl = signal({});
+ bodyTdTpl = signal(null);
+ rowClass = signal<((row: XTableRow, index: number) => { [className: string]: boolean }) | null>(null);
+ headSearchTpl = signal(null);
+
+ sortChangeResult = signal(null);
+ sortChange(sort: XSort[]) {
+ this.sortChangeResult.set(sort);
+ }
+
+ headCheckboxChangeResult = signal(null);
+ headCheckboxChange(headCheckbox: XTableHeadCheckbox) {
+ this.headCheckboxChangeResult.set(headCheckbox);
+ }
+
+ bodyCheckboxChangeResult = signal(null);
+ bodyCheckboxChange(row: XTableRow) {
+ this.bodyCheckboxChangeResult.set(row);
+ }
+
+ allowSelectRow = signal(true);
+ allowCheckRow = signal(true);
+ virtualScroll = signal(false);
+ bodyHeight = signal(null);
+ itemSize = signal(42);
+ minBufferPx = signal(100);
+ maxBufferPx = signal(200);
+ adaptionHeight = signal(null);
+ docPercent = signal(1);
+ checkedRow = signal<{ [property: string]: any[] }>({});
+ manual = signal(true);
+ scroll = signal<{ x: number; y: number } | null>(null);
+ header = signal(null);
+ footer = signal(null);
+ cellConfig = signal(null);
+ rowSize = signal('medium');
+ paginationPosition = signal('bottom-left');
+ hiddenWrapBorder = signal(false);
+ hiddenPaginationBorder = signal(false);
+ showPagination = signal(true);
+ treeTable = signal(true);
+ expandedAll = signal(false);
+ expandedLevel = signal(-1);
+ expanded = signal([]);
+ expandTpl = signal(null);
+ showEmpty = signal(true);
+ emptyImg = signal(null);
+ emptyContent = signal(null);
+ index = signal(1);
+ size = signal(10);
+ total = signal(0);
+ query = signal({});
+ pageLinkSize = signal(5);
+ showEllipsis = signal(true);
+ showTotal = signal(true);
+ space = signal('0.25rem');
+ showBackground = signal(false);
+ showSize = signal(false);
+ sizeWidth = signal('6.875rem');
+ showInputSize = signal(false);
+ inputSizeTooltipText = signal('');
+ inputSizeWidth = signal('3.125rem');
+ sizeData = signal>(XPaginationSizeData);
+ disabled = signal(false);
+ showJump = signal(false);
+ jumpTooltipText = signal('');
+ jumpWidth = signal('3.125rem');
+ totalTpl = signal(null);
+ simple = signal(false);
+ simpleIndexWidth = signal('8.125rem');
+ inputIndexSizeSureType = signal('enter');
+
+ columnDragStartedResult = signal(null);
+ columnDragStarted(column: XTableColumn) {
+ this.columnDragStartedResult.set(column);
+ }
+
+ columnDragEndedResult = signal