ud-components 0.3.21 → 0.3.22
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/enums/loading-status.enum.d.ts +6 -0
- package/fesm2022/ud-components.mjs +45 -2
- package/fesm2022/ud-components.mjs.map +1 -1
- package/package.json +28 -3
- package/public-api.d.ts +3 -0
- package/services/loading-state/loading-state.store.d.ts +20 -0
- package/types/loading-state.type.d.ts +11 -0
- package/ud-components-0.3.21.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ud-components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.22",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=19",
|
|
6
|
-
"@angular/core": ">=19"
|
|
6
|
+
"@angular/core": ">=19",
|
|
7
|
+
"@ngrx/signals": ">=19"
|
|
7
8
|
},
|
|
8
9
|
"dependencies": {
|
|
9
10
|
"tslib": "^2.3.0"
|
|
@@ -18,6 +19,30 @@
|
|
|
18
19
|
".": {
|
|
19
20
|
"types": "./index.d.ts",
|
|
20
21
|
"default": "./fesm2022/ud-components.mjs"
|
|
22
|
+
},
|
|
23
|
+
"./enums/role.enum": {
|
|
24
|
+
"types": "./enums/role.enum.d.ts",
|
|
25
|
+
"default": "./enums/role.enum.js"
|
|
26
|
+
},
|
|
27
|
+
"./lib/kpi/kpi.enum": {
|
|
28
|
+
"types": "./lib/kpi/kpi.enum.d.ts",
|
|
29
|
+
"default": "./lib/kpi/kpi.enum.js"
|
|
30
|
+
},
|
|
31
|
+
"./lib/edit-view/edit-view-section.directive": {
|
|
32
|
+
"types": "./lib/edit-view/edit-view-section.directive.d.ts",
|
|
33
|
+
"default": "./lib/edit-view/edit-view-section.directive.js"
|
|
34
|
+
},
|
|
35
|
+
"./interfaces/page-request.interface": {
|
|
36
|
+
"types": "./interfaces/page-request.interface.d.ts",
|
|
37
|
+
"default": "./interfaces/page-request.interface.js"
|
|
38
|
+
},
|
|
39
|
+
"./interfaces/table.interface": {
|
|
40
|
+
"types": "./interfaces/table.interface.d.ts",
|
|
41
|
+
"default": "./interfaces/table.interface.js"
|
|
42
|
+
},
|
|
43
|
+
"./interfaces/table-display-column.interface": {
|
|
44
|
+
"types": "./interfaces/table-display-column.interface.d.ts",
|
|
45
|
+
"default": "./interfaces/table-display-column.interface.js"
|
|
21
46
|
}
|
|
22
47
|
}
|
|
23
|
-
}
|
|
48
|
+
}
|
package/public-api.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from './lib/form-fields/textarea/textarea.component';
|
|
|
24
24
|
export * from './lib/form-fields/phone-input/phone-input.component';
|
|
25
25
|
export * from './lib/button/button.component';
|
|
26
26
|
export * from './lib/toggle/toggle.component';
|
|
27
|
+
export * from './enums/loading-status.enum';
|
|
27
28
|
export * from './enums/application-status.enum';
|
|
28
29
|
export * from './enums/custom-table.enum';
|
|
29
30
|
export * from './enums/modal-input-type.enum';
|
|
@@ -44,6 +45,8 @@ export * from './pipes/to-observable/to-observable.pipe';
|
|
|
44
45
|
export * from './pipes/pluralize/pluralize.pipe';
|
|
45
46
|
export * from './pipes/safe/safe.pipe';
|
|
46
47
|
export * from './pipes/singular/singular.pipe';
|
|
48
|
+
export * from './services/loading-state/loading-state.store';
|
|
47
49
|
export * from './services/translate-wrapper/translate-wrapper.service';
|
|
50
|
+
export * from './types/loading-state.type';
|
|
48
51
|
export * from './utils/common-utils';
|
|
49
52
|
export * from './utils/time-options.utils';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LoadingStatus } from '../../enums/loading-status.enum';
|
|
2
|
+
import { LoadingState } from '../../types/loading-state.type';
|
|
3
|
+
/**
|
|
4
|
+
* Reusable loading state feature for signal stores
|
|
5
|
+
*/
|
|
6
|
+
export declare function withLoadingState(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals").EmptyFeatureResult, {
|
|
7
|
+
state: {
|
|
8
|
+
loadingState: LoadingState;
|
|
9
|
+
};
|
|
10
|
+
props: {
|
|
11
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
12
|
+
isLoaded: import("@angular/core").Signal<boolean>;
|
|
13
|
+
hasError: import("@angular/core").Signal<boolean>;
|
|
14
|
+
error: import("@angular/core").Signal<string | null>;
|
|
15
|
+
};
|
|
16
|
+
methods: {
|
|
17
|
+
setLoadingStatus: (status: LoadingStatus.INIT | LoadingStatus.LOADING | LoadingStatus.LOADED) => void;
|
|
18
|
+
setLoadingError: (error: string) => void;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LoadingStatus } from '../enums/loading-status.enum';
|
|
2
|
+
export type LoadingState = {
|
|
3
|
+
status: LoadingStatus.INIT;
|
|
4
|
+
} | {
|
|
5
|
+
status: LoadingStatus.LOADING;
|
|
6
|
+
} | {
|
|
7
|
+
status: LoadingStatus.LOADED;
|
|
8
|
+
} | {
|
|
9
|
+
status: LoadingStatus.ERROR;
|
|
10
|
+
error: string;
|
|
11
|
+
};
|
package/ud-components-0.3.21.tgz
DELETED
|
Binary file
|