diff --git a/projects/demo-integrations/src/tests/component-testing/predicate/predicate-test.component.ts b/projects/demo-integrations/src/tests/component-testing/predicate/predicate-test.component.ts deleted file mode 100644 index 7810724b8..000000000 --- a/projects/demo-integrations/src/tests/component-testing/predicate/predicate-test.component.ts +++ /dev/null @@ -1,72 +0,0 @@ -import {ChangeDetectionStrategy, Component} from '@angular/core'; -import {FormsModule} from '@angular/forms'; -import {MaskitoDirective} from '@maskito/angular'; -import {MaskitoElementPredicate, MaskitoOptions} from '@maskito/core'; -import {TuiGroupModule} from '@taiga-ui/core'; -import {TuiInputModule} from '@taiga-ui/kit'; - -@Component({ - standalone: true, - selector: 'predicate-test', - imports: [TuiGroupModule, MaskitoDirective, TuiInputModule, FormsModule], - template: ` -
- - Card number - - Name -
- -
- Card number -
- `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class PredicateTestComponent { - value = { - number: '', - name: '', - }; - - readonly cardMask: MaskitoOptions = { - mask: [ - ...new Array(4).fill(/\d/), - ' ', - ...new Array(4).fill(/\d/), - ' ', - ...new Array(4).fill(/\d/), - ' ', - ...new Array(4).fill(/\d/), - ], - }; - - readonly nameMask: MaskitoOptions = { - mask: /^[a-zA-Z\s]+$/, - postprocessors: [ - ({value, selection}) => ({value: value.toUpperCase(), selection}), - ], - }; - - readonly cardPredicate: MaskitoElementPredicate = element => - element.querySelectorAll('input')[0]; - - readonly namePredicate: MaskitoElementPredicate = element => - element.querySelectorAll('input')[1]; - - readonly asyncPredicate: MaskitoElementPredicate = async element => - Promise.resolve(element.querySelectorAll('input')[0]); -}