• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / d9ae709b-3c27-4b69-b125-b8b80b54f90b

pending completion
d9ae709b-3c27-4b69-b125-b8b80b54f90b

Pull #2757

circleci

mengshuicmq
fix: fix code review
Pull Request #2757: feat(color-picker): color-picker support disabled (#INFR-8645)

98 of 6315 branches covered (1.55%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

2392 of 13661 relevant lines covered (17.51%)

83.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/src/upload/upload.config.ts
1
import { InjectionToken } from '@angular/core';
2

1✔
3
import { ThyFileSizeExceedsContext, ThySizeExceedsHandler } from './types';
1✔
4

5
export interface ThyUploadConfig {
6
    sizeThreshold?: number;
7
    sizeExceedsHandler?: ThySizeExceedsHandler;
8
    acceptType?: string;
9
}
10

11
export const THY_UPLOAD_DEFAULT_OPTIONS = new InjectionToken<ThyUploadConfig>('thy-uploader-default-options');
12

×
13
export const THY_UPLOAD_DEFAULT_OPTIONS_PROVIDER = {
×
14
    provide: THY_UPLOAD_DEFAULT_OPTIONS,
15
    useValue: {
×
16
        acceptType: '',
17
        sizeThreshold: 0,
18
        sizeExceedsHandler: sizeExceedsHandler
×
19
    }
20
};
21

22
export function sizeExceedsHandler(event: ThyFileSizeExceedsContext): void {
23
    if (typeof ngDevMode === 'undefined' || ngDevMode) {
24
        const exceedsFilesMessage = event.exceedsFiles
25
            .map(item => {
26
                return `file: ${item.name}, size: ${item.size}`;
27
            })
28
            .join(',');
29
        console.error(`some files(${exceedsFilesMessage}) size exceeds threshold ${event.sizeThreshold}`);
30
    }
31
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc