@webilix/ngx-helper-m3 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/webilix-ngx-helper-m3.mjs +735 -596
- package/fesm2022/webilix-ngx-helper-m3.mjs.map +1 -1
- package/lib/components/component.service.d.ts +11 -0
- package/lib/components/value/box/ngx-helper-value-box.component.d.ts +2 -10
- package/lib/components/value/list/ngx-helper-value-list.component.d.ts +4 -10
- package/lib/components/value/ngx-helper-value.interface.d.ts +1 -0
- package/lib/http/ngx-helper-http.interface.d.ts +9 -0
- package/lib/http/ngx-helper-http.service.d.ts +16 -0
- package/lib/http/upload/upload.component.d.ts +21 -0
- package/ngx-helper-m3.css +59 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/lib/components/value/ngx-helper-value.info.d.ts +0 -2
@@ -1,4 +1,5 @@
|
|
1
1
|
import { INgxHelperConfig } from '../ngx-helper.config';
|
2
|
+
import { INgxHelperValue } from './value/ngx-helper-value.interface';
|
2
3
|
import * as i0 from "@angular/core";
|
3
4
|
export interface IComponentConfig {
|
4
5
|
readonly mobileWidth: number;
|
@@ -14,8 +15,18 @@ export interface IComponentConfig {
|
|
14
15
|
};
|
15
16
|
};
|
16
17
|
}
|
18
|
+
export interface IValueComponentData {
|
19
|
+
readonly title: string;
|
20
|
+
readonly value: string;
|
21
|
+
readonly color?: string;
|
22
|
+
readonly action?: () => string[] | void;
|
23
|
+
readonly copyToClipboard?: boolean;
|
24
|
+
readonly ltr?: boolean;
|
25
|
+
readonly english?: boolean;
|
26
|
+
}
|
17
27
|
export declare class ComponentService {
|
18
28
|
getComponentConfig(config?: Partial<INgxHelperConfig>): IComponentConfig;
|
29
|
+
getValueData(values: INgxHelperValue[]): IValueComponentData[];
|
19
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentService, never>;
|
20
31
|
static ɵprov: i0.ɵɵInjectableDeclaration<ComponentService>;
|
21
32
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
2
2
|
import { Router } from '@angular/router';
|
3
3
|
import { INgxHelperConfig } from '../../../ngx-helper.config';
|
4
|
-
import { ComponentService } from '../../component.service';
|
4
|
+
import { ComponentService, IValueComponentData } from '../../component.service';
|
5
5
|
import { INgxHelperValue } from '../ngx-helper-value.interface';
|
6
6
|
import * as i0 from "@angular/core";
|
7
7
|
export declare class NgxHelperValueBoxComponent implements OnInit, OnChanges {
|
@@ -20,18 +20,10 @@ export declare class NgxHelperValueBoxComponent implements OnInit, OnChanges {
|
|
20
20
|
emptyText: string;
|
21
21
|
gapSize: string;
|
22
22
|
hideShadow: boolean;
|
23
|
-
data:
|
24
|
-
title: string;
|
25
|
-
value: string;
|
26
|
-
action?: () => string[] | void;
|
27
|
-
copyToClipboard?: boolean;
|
28
|
-
ltr?: boolean;
|
29
|
-
english?: boolean;
|
30
|
-
}[];
|
23
|
+
data: IValueComponentData[];
|
31
24
|
copyIndex?: number;
|
32
25
|
private copyTimeout;
|
33
26
|
private componentConfig;
|
34
|
-
private pipeTransform;
|
35
27
|
constructor(router: Router, componentService: ComponentService, config?: Partial<INgxHelperConfig> | undefined);
|
36
28
|
ngOnInit(): void;
|
37
29
|
ngOnChanges(changes: SimpleChanges): void;
|
@@ -1,25 +1,19 @@
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
2
2
|
import { Router } from '@angular/router';
|
3
|
+
import { ComponentService, IValueComponentData } from '../../component.service';
|
3
4
|
import { INgxHelperValue } from '../ngx-helper-value.interface';
|
4
5
|
import * as i0 from "@angular/core";
|
5
6
|
export declare class NgxHelperValueListComponent implements OnChanges {
|
6
7
|
private readonly router;
|
8
|
+
private readonly componentService;
|
7
9
|
private className;
|
8
10
|
values: INgxHelperValue[];
|
9
11
|
titleWidth: string;
|
10
12
|
emptyText: string;
|
11
|
-
data:
|
12
|
-
title: string;
|
13
|
-
value: string;
|
14
|
-
action?: () => string[] | void;
|
15
|
-
copyToClipboard?: boolean;
|
16
|
-
ltr?: boolean;
|
17
|
-
english?: boolean;
|
18
|
-
}[];
|
13
|
+
data: IValueComponentData[];
|
19
14
|
copyIndex?: number;
|
20
15
|
private copyTimeout;
|
21
|
-
|
22
|
-
constructor(router: Router);
|
16
|
+
constructor(router: Router, componentService: ComponentService);
|
23
17
|
ngOnChanges(changes: SimpleChanges): void;
|
24
18
|
onClick(action?: () => string[] | void): void;
|
25
19
|
onCopy(event: Event, index: number): void;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { ApplicationRef, Injector } from '@angular/core';
|
2
|
+
import { HttpStatusCode } from '@angular/common/http';
|
3
|
+
import { INgxHelperHttpUploadConfig } from './ngx-helper-http.interface';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class NgxHelperHttpService {
|
6
|
+
private readonly applicationRef;
|
7
|
+
private readonly injector;
|
8
|
+
private components;
|
9
|
+
constructor(applicationRef: ApplicationRef, injector: Injector);
|
10
|
+
private getId;
|
11
|
+
private updatePositions;
|
12
|
+
upload<R, E>(file: File, url: string, onSuccess: (response: R | undefined, status: HttpStatusCode) => void, onError: (error: E | undefined, status: HttpStatusCode) => void): void;
|
13
|
+
upload<R, E>(file: File, url: string, config: Partial<INgxHelperHttpUploadConfig>, onSuccess: (response: R, status: HttpStatusCode) => void, onError: (error: E, status: HttpStatusCode) => void): void;
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperHttpService, never>;
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperHttpService>;
|
16
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { AfterViewInit } from '@angular/core';
|
2
|
+
import { HttpClient, HttpStatusCode } from '@angular/common/http';
|
3
|
+
import { INgxHelperHttpUploadConfig } from '../ngx-helper-http.interface';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class UploadComponent<R, E> implements AfterViewInit {
|
6
|
+
private readonly httpClient;
|
7
|
+
private className;
|
8
|
+
private host;
|
9
|
+
bottom: string;
|
10
|
+
id: string;
|
11
|
+
file: File;
|
12
|
+
url: string;
|
13
|
+
config: Partial<INgxHelperHttpUploadConfig>;
|
14
|
+
close: (type: 'RESPONSE' | 'ERROR', result: any, status: HttpStatusCode) => void;
|
15
|
+
progress: number;
|
16
|
+
constructor(httpClient: HttpClient);
|
17
|
+
ngAfterViewInit(): void;
|
18
|
+
upload(): void;
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadComponent<any, any>, never>;
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UploadComponent<any, any>, "ng-component", never, {}, {}, never, never, true, never>;
|
21
|
+
}
|
package/ngx-helper-m3.css
CHANGED
@@ -79,6 +79,64 @@
|
|
79
79
|
}
|
80
80
|
}
|
81
81
|
|
82
|
+
/* NGX HELPER HTTP (UPLOAD / DOWNLOAD) */
|
83
|
+
.ngx-helper-m3-http {
|
84
|
+
position: fixed;
|
85
|
+
left: 1rem;
|
86
|
+
|
87
|
+
direction: ltr;
|
88
|
+
display: block;
|
89
|
+
height: 40px;
|
90
|
+
overflow: hidden;
|
91
|
+
width: calc(100vw - 4rem);
|
92
|
+
max-width: 250px;
|
93
|
+
transition: all 0.35s ease-out;
|
94
|
+
z-index: 5000;
|
95
|
+
|
96
|
+
border-radius: 8px;
|
97
|
+
border: 1px solid var(--outline-variant);
|
98
|
+
background-color: var(--surface-container);
|
99
|
+
|
100
|
+
.content {
|
101
|
+
display: flex;
|
102
|
+
align-items: center;
|
103
|
+
column-gap: 0.5rem;
|
104
|
+
|
105
|
+
height: 37px;
|
106
|
+
padding: 0 0.5rem;
|
107
|
+
|
108
|
+
.file {
|
109
|
+
flex: 1;
|
110
|
+
|
111
|
+
font-size: 90%;
|
112
|
+
|
113
|
+
text-align: left;
|
114
|
+
direction: ltr;
|
115
|
+
|
116
|
+
white-space: nowrap;
|
117
|
+
overflow: hidden;
|
118
|
+
text-overflow: ellipsis;
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
.progress-container {
|
123
|
+
width: 100%;
|
124
|
+
height: 3px;
|
125
|
+
background-color: var(--outline-variant);
|
126
|
+
position: relative;
|
127
|
+
|
128
|
+
.progress-value {
|
129
|
+
position: absolute;
|
130
|
+
top: 0;
|
131
|
+
bottom: 0;
|
132
|
+
left: 0;
|
133
|
+
|
134
|
+
background-color: var(--primary);
|
135
|
+
transition: all 0.35s ease-out;
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
139
|
+
|
82
140
|
/* NGX HELPER VALUE LIST */
|
83
141
|
.ngx-helper-m3-box {
|
84
142
|
display: block;
|
@@ -334,6 +392,7 @@
|
|
334
392
|
}
|
335
393
|
|
336
394
|
.page-group-spacer {
|
395
|
+
z-index: 1;
|
337
396
|
height: 1rem;
|
338
397
|
width: 100%;
|
339
398
|
background-color: var(--background);
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
@@ -29,3 +29,5 @@ export * from './lib/confirm/confirm.interface';
|
|
29
29
|
export * from './lib/confirm/confirm.service';
|
30
30
|
export * from './lib/container/container.interface';
|
31
31
|
export * from './lib/container/container.service';
|
32
|
+
export * from './lib/http/ngx-helper-http.interface';
|
33
|
+
export * from './lib/http/ngx-helper-http.service';
|