@rt-tools/ui-kit 0.0.4
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/README.md +99 -0
- package/fesm2022/rt-tools-ui-kit.mjs +5143 -0
- package/fesm2022/rt-tools-ui-kit.mjs.map +1 -0
- package/package.json +43 -0
- package/rt-tools-ui-kit-0.0.4.tgz +0 -0
- package/src/lib/ui-kit/action-bar/components/bar/rtui-action-bar.component.scss +104 -0
- package/src/lib/ui-kit/action-bar/components/container/rtui-action-bar-container.component.scss +12 -0
- package/src/lib/ui-kit/aside/components/container/aside-container.component.scss +20 -0
- package/src/lib/ui-kit/aside/components/error-notification/aside-error-box.component.scss +37 -0
- package/src/lib/ui-kit/aside/components/panel/aside-panel.component.scss +243 -0
- package/src/lib/ui-kit/aside/stories/aside-component/test-aside.component.scss +4 -0
- package/src/lib/ui-kit/buttons/icon-round/rtui-round-icon-button.component.scss +44 -0
- package/src/lib/ui-kit/buttons/multi-button/rtui-multi-button.component.scss +92 -0
- package/src/lib/ui-kit/checkbox/rtui-checkbox.component.scss +68 -0
- package/src/lib/ui-kit/checkbox/stories/component/test-checkbox.component.scss +9 -0
- package/src/lib/ui-kit/dynamic-selectors/components/actions/rtui-dynamic-selector-list-actions.component.scss +63 -0
- package/src/lib/ui-kit/dynamic-selectors/components/dynamic-input/rtui-dynamic-input.component.scss +3 -0
- package/src/lib/ui-kit/dynamic-selectors/components/dynamic-selector/rtui-dynamic-selector.component.scss +7 -0
- package/src/lib/ui-kit/dynamic-selectors/components/multi-selector-popup/rtui-multi-selector-popup.component.scss +229 -0
- package/src/lib/ui-kit/dynamic-selectors/components/placeholder/rtui-dynamic-selector-placeholder.component.scss +59 -0
- package/src/lib/ui-kit/dynamic-selectors/components/selected-list/rtui-dynamic-selector-selected-list.component.scss +35 -0
- package/src/lib/ui-kit/dynamic-selectors/strories/component/input/test-dynamic-input.component.scss +16 -0
- package/src/lib/ui-kit/dynamic-selectors/strories/component/selector/test-selector.component.scss +22 -0
- package/src/lib/ui-kit/file-uploader/rtui-file-upload.component.scss +69 -0
- package/src/lib/ui-kit/file-uploader/stories/component/test-file-upload.component.scss +6 -0
- package/src/lib/ui-kit/header/header.component.scss +0 -0
- package/src/lib/ui-kit/header/stories/component/test-header.component.scss +14 -0
- package/src/lib/ui-kit/image-uploader/image-uploader/rtui-image-upload.component.scss +93 -0
- package/src/lib/ui-kit/image-uploader/stories/component/test-image-upload.component.scss +9 -0
- package/src/lib/ui-kit/info-badge/info-badge.component.scss +62 -0
- package/src/lib/ui-kit/info-badge/stories/component/test-info-badge/test-info-badge.component.scss +11 -0
- package/src/lib/ui-kit/modal/modal.component.scss +115 -0
- package/src/lib/ui-kit/modal/stories/test-modal.component.scss +4 -0
- package/src/lib/ui-kit/popover/rtui-popover-container.component.scss +13 -0
- package/src/lib/ui-kit/scrollable/scrollable-container.component.scss +64 -0
- package/src/lib/ui-kit/side-menu/menu/rtui-side-menu.component.scss +185 -0
- package/src/lib/ui-kit/side-menu/menu-sub-item/rtui-side-menu-sub-item.component.scss +97 -0
- package/src/lib/ui-kit/side-menu/stories/component/test-side-menu-wrapper.component.scss +48 -0
- package/src/lib/ui-kit/snack-bar/snack-bar.component.scss +100 -0
- package/src/lib/ui-kit/snack-bar/stories/component/test-snack-bar.component.scss +30 -0
- package/src/lib/ui-kit/spinner/spinner.component.scss +49 -0
- package/src/lib/ui-kit/table/components/clear-search-button/rtui-clear-button.component.scss +50 -0
- package/src/lib/ui-kit/table/components/pagination-view/rtui-pagination.component.scss +191 -0
- package/src/lib/ui-kit/table/components/table/rtui-table.component.scss +4 -0
- package/src/lib/ui-kit/table/components/table-base-cell/table-base-cell.component.scss +133 -0
- package/src/lib/ui-kit/table/components/table-config-aside/rt-table-config-aside.component.scss +4 -0
- package/src/lib/ui-kit/table/components/table-container/table-container.component.scss +212 -0
- package/src/lib/ui-kit/table/components/table-header-cell/table-header-cell.component.scss +115 -0
- package/src/lib/ui-kit/table/components/table-header-filter-cell/table-header-filter-cell.component.scss +11 -0
- package/src/lib/ui-kit/table/dynamic-list.component.scss +6 -0
- package/src/lib/ui-kit/table/stories/dynamic-list/test-dynamic-list.component.scss +15 -0
- package/src/lib/ui-kit/table/stories/pagination/test-pagination-component.scss +16 -0
- package/src/lib/ui-kit/table/stories/table/test-table-component.scss +7 -0
- package/src/lib/ui-kit/toggle/rtui-toggle.component.scss +174 -0
- package/src/lib/ui-kit/toggle/stories/component/test-toggle.component.scss +9 -0
- package/src/lib/ui-kit/toolbar/toolbar.component.scss +99 -0
- package/src/styles/base/_base.scss +71 -0
- package/src/styles/base/_mixin.scss +66 -0
- package/src/styles/base/_variables.scss +34 -0
- package/src/styles/components/_action-bar.scss +84 -0
- package/src/styles/components/_button.scss +364 -0
- package/src/styles/components/_checkbox.scss +40 -0
- package/src/styles/components/_dynamic-selectors.scss +134 -0
- package/src/styles/components/_form.scss +90 -0
- package/src/styles/components/_rtui_button.scss +452 -0
- package/src/styles/components/_snackbar.scss +103 -0
- package/src/styles/components/_table.scss +239 -0
- package/src/styles/main.scss +14 -0
- package/types/rt-tools-ui-kit.d.ts +1875 -0
package/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Set of utility types and functions for TypeScript
|
|
2
|
+
Package uses Angular Signals (Angular 16+).
|
|
3
|
+
|
|
4
|
+
## Interfaces & Types
|
|
5
|
+
|
|
6
|
+
* ```typescript
|
|
7
|
+
IDictionary
|
|
8
|
+
```
|
|
9
|
+
* ```typescript
|
|
10
|
+
IntersectionType
|
|
11
|
+
```
|
|
12
|
+
* ```typescript
|
|
13
|
+
Modify
|
|
14
|
+
```
|
|
15
|
+
* ```typescript
|
|
16
|
+
IMapper
|
|
17
|
+
```
|
|
18
|
+
* ```typescript
|
|
19
|
+
Nullable
|
|
20
|
+
```
|
|
21
|
+
* ```typescript
|
|
22
|
+
PartialOmit
|
|
23
|
+
```
|
|
24
|
+
* ```typescript
|
|
25
|
+
Primitive
|
|
26
|
+
```
|
|
27
|
+
* Makes selected props from a record optional
|
|
28
|
+
```typescript
|
|
29
|
+
Optional
|
|
30
|
+
```
|
|
31
|
+
* Get the union type of all the values in an object, array or array-like type
|
|
32
|
+
```typescript
|
|
33
|
+
ValuesType
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## Functions
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
* ```typescript
|
|
41
|
+
isDateValid(date?: Date): boolean;
|
|
42
|
+
```
|
|
43
|
+
* ```typescript
|
|
44
|
+
dateStringToDate(date: string | Date): Date;
|
|
45
|
+
```
|
|
46
|
+
* Indicates if the arguments are equal
|
|
47
|
+
```typescript
|
|
48
|
+
isEqual<T>(f: T, s: T): boolean;
|
|
49
|
+
```
|
|
50
|
+
* Indicates if the content of two arrays is identical
|
|
51
|
+
```typescript
|
|
52
|
+
areArraysEqual<T>(f: T[], s: T[]): boolean;
|
|
53
|
+
```
|
|
54
|
+
* Indicates if the content of two arrays is identical
|
|
55
|
+
```typescript
|
|
56
|
+
areObjectsEqual<T>(f: T, s: T): boolean;
|
|
57
|
+
```
|
|
58
|
+
* ```typescript
|
|
59
|
+
isNumber<T>(value: T | number | unknown | undefined): value is number;
|
|
60
|
+
```
|
|
61
|
+
* ```typescript
|
|
62
|
+
initToday(): Date;
|
|
63
|
+
```
|
|
64
|
+
* ```typescript
|
|
65
|
+
isToday(date: Date): boolean;
|
|
66
|
+
```
|
|
67
|
+
* Make shallow copy of passed object
|
|
68
|
+
```typescript
|
|
69
|
+
removeFieldFromObject<T extends object, K extends string>(obj: T, key: K): Omit<T, K>;
|
|
70
|
+
```
|
|
71
|
+
* Allow to compare two values by provided comparator
|
|
72
|
+
```typescript
|
|
73
|
+
safeCompare<T>(a: T, b: T, comparator: ComparatorType<T>): number;
|
|
74
|
+
```
|
|
75
|
+
* Allow to safely compare two string values
|
|
76
|
+
```typescript
|
|
77
|
+
safeStrCompare(a: string, b: string): number;
|
|
78
|
+
```
|
|
79
|
+
* Allow to safely compare two number values
|
|
80
|
+
```typescript
|
|
81
|
+
safeNumCompare(a: number, b: number): number;
|
|
82
|
+
```
|
|
83
|
+
* Allow composing comparison chain of several comparators
|
|
84
|
+
that delegate comparison by the chain to the next comparators if current comparator returns 0
|
|
85
|
+
```typescript
|
|
86
|
+
safeComparatorPipe(...comparators: Array<() => number>): number;
|
|
87
|
+
```
|
|
88
|
+
* ```typescript
|
|
89
|
+
sortByAlphabet: <T extends object>(a: T, b: T, field: keyof T) => number;
|
|
90
|
+
```
|
|
91
|
+
* ```typescript
|
|
92
|
+
sortByDate: (a: { [field: string]: any }, b: { [field: string]: any }, field: string) => number
|
|
93
|
+
```
|
|
94
|
+
* ```typescript
|
|
95
|
+
stringifyHttpLikeParams<T extends {}>(params: T): { [param: string]: string | string[] }
|
|
96
|
+
```
|
|
97
|
+
* ```typescript
|
|
98
|
+
transformArrayInput<T>(array: unknown): T[]
|
|
99
|
+
```
|