easy-mat-ui 0.0.5 → 0.0.7

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.
Files changed (41) hide show
  1. package/fesm2022/easy-mat-ui.mjs +1119 -0
  2. package/fesm2022/easy-mat-ui.mjs.map +1 -0
  3. package/index.d.ts +279 -0
  4. package/package.json +15 -6
  5. package/easy-mat-ui-0.0.4.tgz +0 -0
  6. package/ng-package.json +0 -19
  7. package/src/lib/easy-mat-ui.component.spec.ts +0 -23
  8. package/src/lib/easy-mat-ui.component.ts +0 -16
  9. package/src/lib/easy-mat-ui.service.spec.ts +0 -16
  10. package/src/lib/easy-mat-ui.service.ts +0 -9
  11. package/src/lib/easy-multi-select/easy-multi-select.css +0 -102
  12. package/src/lib/easy-multi-select/easy-multi-select.html +0 -51
  13. package/src/lib/easy-multi-select/easy-multi-select.spec.ts +0 -23
  14. package/src/lib/easy-multi-select/easy-multi-select.ts +0 -181
  15. package/src/lib/easy-table/easy-table.component.css +0 -117
  16. package/src/lib/easy-table/easy-table.component.html +0 -221
  17. package/src/lib/easy-table/easy-table.component.spec.ts +0 -23
  18. package/src/lib/easy-table/easy-table.component.ts +0 -568
  19. package/src/lib/model/dictionary.model.ts +0 -4
  20. package/src/lib/model/mat-column-typed.model.ts +0 -41
  21. package/src/lib/model/mat-column.model.ts +0 -35
  22. package/src/lib/model/tuple.model.ts +0 -8
  23. package/src/lib/shared/table-toolbar/table-toolbar.css +0 -26
  24. package/src/lib/shared/table-toolbar/table-toolbar.html +0 -80
  25. package/src/lib/shared/table-toolbar/table-toolbar.ts +0 -130
  26. package/src/lib/styles/_backgrounds.scss +0 -39
  27. package/src/lib/styles/_buttons.scss +0 -90
  28. package/src/lib/styles/_colors.scss +0 -67
  29. package/src/lib/styles/_effects.scss +0 -44
  30. package/src/lib/styles/_material-overrides.scss +0 -87
  31. package/src/lib/styles/_spacing.scss +0 -68
  32. package/src/lib/styles/_tables.scss +0 -71
  33. package/src/lib/styles/_typography.scss +0 -105
  34. package/src/lib/styles.scss +0 -30
  35. package/src/lib/utils/enums.ts +0 -49
  36. package/src/lib/utils/matTabCommon.ts +0 -59
  37. package/src/lib/utils/utils.ts +0 -68
  38. package/src/public-api.ts +0 -8
  39. package/tsconfig.lib.json +0 -18
  40. package/tsconfig.lib.prod.json +0 -11
  41. package/tsconfig.spec.json +0 -15
@@ -1,105 +0,0 @@
1
- .hover {
2
- cursor: pointer;
3
- }
4
-
5
- .no-border {
6
- border: transparent;
7
- }
8
-
9
- .uppercase {
10
- text-transform: uppercase;
11
- }
12
-
13
- .tab-space {
14
- padding: 0 0 50px 0;
15
- }
16
-
17
- .xx-large,
18
- .x-large {
19
- font-size: xx-large !important;
20
- }
21
-
22
- .xx-small {
23
- font-size: xx-small !important;
24
- }
25
-
26
- .x-small {
27
- font-size: x-small !important;
28
- }
29
-
30
- .small {
31
- font-size: small !important;
32
- }
33
-
34
- .required {
35
- color: #f44336;
36
- }
37
-
38
- .zoom_in {
39
- color: #00bcd4 !important;
40
- }
41
-
42
- .zoom_out {
43
- color: #ffb804 !important;
44
- }
45
-
46
- .zoom_out, .zoom_in {
47
- font-size: 1.6em !important;
48
- cursor: pointer;
49
- }
50
-
51
- .isReadOnly {
52
- color: #4e656f;
53
- font-weight: 100 !important;
54
- }
55
-
56
- .shadow-5 {
57
- text-shadow: 0 5px 5px #c2c0c0;
58
- }
59
-
60
- .shadow-title {
61
- text-shadow: 0 10px 10px #c2c0c0;
62
- color: #5a0023;
63
- font-weight: 500;
64
- }
65
-
66
- .shadow-lg {
67
- font-size: x-large !important;
68
- text-shadow: 0 5px 5px #c2c0c0;
69
- color: #5a0023 !important;
70
- }
71
-
72
- .card-pricing h6 {
73
- color: #5a0023;
74
- }
75
-
76
-
77
- .x-small-column {
78
- width: 2%;
79
- min-width: 25px;
80
- flex: 0 0 2%;
81
- }
82
-
83
- .small-column {
84
- width: 5%;
85
- min-width: 50px;
86
- flex: 0 0 6%;
87
- }
88
-
89
- .medium-column {
90
- width: 12%;
91
- min-width: 100px;
92
- flex: 0 0 12%;
93
- }
94
-
95
- .large-column {
96
- width: 20%;
97
- min-width: 150px;
98
- flex: 0 0 20%;
99
- }
100
-
101
- .x-large-column {
102
- width: 30%;
103
- min-width: 200px;
104
- flex: 0 0 30%;
105
- }
@@ -1,30 +0,0 @@
1
- @use "bootstrap/scss/bootstrap";
2
-
3
- @use './styles/colors' as *;
4
- @use './styles/backgrounds' as *;
5
- @use './styles/buttons' as *;
6
- @use './styles/tables' as *;
7
- @use './styles/typography' as *;
8
- @use './styles/spacing' as *;
9
- @use './styles/effects' as *;
10
- @use './styles/material-overrides' as *;
11
-
12
-
13
- @media (max-width: 768px) {
14
- .mat-header-cell, .mat-cell {
15
- font-size: 12px;
16
- padding: 0.25rem;
17
- }
18
-
19
- .action-link button {
20
- padding: 0.25rem !important;
21
- }
22
-
23
- .btn-mini-fab mat-icon {
24
- font-size: 18px;
25
- }
26
-
27
- mat-form-field {
28
- width: 100% !important;
29
- }
30
- }
@@ -1,49 +0,0 @@
1
- export enum CRUD {
2
- CREATE = 'create',
3
- READ = 'read',
4
- UPDATE = 'update',
5
- DELETE = 'delete',
6
- LINK = 'link',
7
- DUPLICATE = 'duplicate'
8
- }
9
-
10
- export enum ColumnType {
11
- ICON = 'icon',
12
- TEXT = 'text',
13
- DATE = 'date',
14
- DATE_TIME = 'date-time',
15
- NUMBER = 'number',
16
- Filter = 'filter',
17
- ICON_AND_TEXT = 'icon-and-text',
18
- PASSWORD = 'password',
19
- BUTTON = 'button',
20
- DROPDOWNLIST = 'dropdownlist'
21
- }
22
-
23
- export enum ColumnSize {
24
- XSmall = 'x-small-column',
25
- Small = 'small-column',
26
- Medium = 'medium-column',
27
- Large = 'large-column',
28
- XLarge = 'x-large-column'
29
- }
30
-
31
-
32
- export enum InputType {
33
- Dropdown = 'ddl',
34
- Text = 'text',
35
- Number = 'number',
36
- Date = 'date',
37
- TextArea = 'textarea',
38
- Checkbox = 'checkbox'
39
- }
40
-
41
-
42
- export enum ScreenSize {
43
- lg = 1281, // High Resolution desktops min-width:1281px
44
- md = 1025, // Laptop and desktops min-width:1025px
45
- sml = 801, // Landscape Tablet and iPads min-width:801px
46
- sm = 600, // Portrait Tablet and iPads min-width:600px
47
- xsl = 480, // Phone with Landscape mode min-width:480px
48
- sx = 320, // Phone with portrait mode min-width:320px
49
- }
@@ -1,59 +0,0 @@
1
- import {formatDate} from '@angular/common';
2
- import {Utils} from './utils';
3
- import {ColumnType} from './enums';
4
- import {MatColumnTyped} from '../model/mat-column-typed.model';
5
-
6
- export class MatTabCommon {
7
-
8
- static displayFormatTyped(column: MatColumnTyped, value: string | null | undefined, sliceSize: number): string | null {
9
- let str: string | null = null;
10
-
11
- switch (column.type) {
12
- case ColumnType.DATE_TIME:
13
- if (value) {
14
- str = formatDate(value, 'yyyy-MM-dd HH-mm-ss', 'en_LU');
15
- } else {
16
- str = null;
17
- }
18
- break;
19
- case ColumnType.DATE:
20
- if (value) {
21
- str = formatDate(value, 'yyyy-MM-dd', 'en_LU');
22
- } else {
23
- str = null;
24
- }
25
- break;
26
-
27
- case ColumnType.NUMBER:
28
- const num = parseFloat(value ?? '');
29
- str = isNaN(num) ? '' : num.toFixed(2);
30
- break;
31
-
32
- default:
33
- str = value ?? '';
34
- }
35
-
36
- const sliceBase = Utils.slice_size ?? 20;
37
- const effectiveSlice = sliceSize == null || sliceSize === 0 ? 1 : sliceSize;
38
- const length = sliceBase / effectiveSlice;
39
-
40
- if (str == null) {
41
- return null;
42
- }
43
-
44
- return str.length > length ? str.slice(0, length) + '...' : str;
45
- }
46
-
47
-
48
- static toFixed(value: string, digits: number): null | string | undefined {
49
- return value == null ? null : parseFloat(value)?.toFixed(digits);
50
- }
51
-
52
- static getCssClasses(col: MatColumnTyped, item: any): string {
53
- const staticClass = col.cssClass ?? '';
54
- const dynamicClass = col.cssClassFn ? col.cssClassFn(item, col) : '';
55
- return [staticClass, dynamicClass].filter(Boolean).join(' ');
56
- }
57
-
58
-
59
- }
@@ -1,68 +0,0 @@
1
- import {formatDate} from '@angular/common';
2
-
3
-
4
- export class Utils {
5
- public static slice_size: number;
6
- public static screen_size: number;
7
-
8
-
9
- static isNullOrEmpty(value: string): boolean {
10
- return !value || value?.toString()?.trim() == '';
11
- }
12
-
13
-
14
- public static areValuesEqual(val1: any, val2: any): boolean {
15
- if (val1 === null || val1 === undefined || val1 === '') {
16
- return val2 === null || val2 === undefined || val2 === '';
17
- }
18
- if (val2 === null || val2 === undefined || val2 === '') {
19
- return val1 === null || val1 === undefined || val1 === '';
20
- }
21
-
22
- const num1 = Number(val1);
23
- const num2 = Number(val2);
24
-
25
- if (!isNaN(num1) && !isNaN(num2)) {
26
- return num1 === num2;
27
- }
28
-
29
- return val1 === val2;
30
- }
31
-
32
- static identifyDuplicates(
33
- data: Record<string, any>[],
34
- key: string,
35
- getUnique: boolean = true
36
- ): Record<string, any>[] {
37
- const uniqueMap = new Map<any, Record<string, any>>();
38
- const duplicates: Record<string, any>[] = [];
39
-
40
- data?.forEach(item => {
41
- const keyValue = item[key];
42
- if (uniqueMap.has(keyValue)) {
43
- duplicates.push(item);
44
- } else {
45
- uniqueMap.set(keyValue, item);
46
- }
47
- });
48
-
49
- return getUnique ? Array.from(uniqueMap.values()) : duplicates;
50
- }
51
-
52
-
53
- public static getUnique(data: Object[], key: string) {
54
- return this.identifyDuplicates(data, key);
55
- }
56
-
57
- public static getDuplicate(data: Object[], key: string) {
58
- return this.identifyDuplicates(data, key, false);
59
- }
60
-
61
-
62
- static safeCompare(a: any, b: any): number {
63
- const aStr = a != null ? String(a) : '';
64
- const bStr = b != null ? String(b) : '';
65
- return aStr.localeCompare(bStr);
66
- }
67
-
68
- }
package/src/public-api.ts DELETED
@@ -1,8 +0,0 @@
1
- /*
2
- * Public API Surface of easy-mat-ui
3
- */
4
-
5
- export * from './lib/easy-mat-ui.service';
6
- export * from './lib/easy-mat-ui.component';
7
- export * from './lib/easy-table/easy-table.component';
8
- export * from './lib/easy-multi-select/easy-multi-select';
package/tsconfig.lib.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../out-tsc/lib",
5
- "declaration": true,
6
- "declarationMap": true,
7
- "inlineSources": true,
8
- "types": [],
9
- "target": "ES2022",
10
- "useDefineForClassFields": false
11
- },
12
- "angularCompilerOptions": {
13
- "strictTemplates": true
14
- },
15
- "exclude": [
16
- "**/*.spec.ts"
17
- ]
18
- }
@@ -1,11 +0,0 @@
1
- /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
- /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
- {
4
- "extends": "./tsconfig.lib.json",
5
- "compilerOptions": {
6
- "declarationMap": false
7
- },
8
- "angularCompilerOptions": {
9
- "compilationMode": "partial"
10
- }
11
- }
@@ -1,15 +0,0 @@
1
- /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
- /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
- {
4
- "extends": "../../tsconfig.json",
5
- "compilerOptions": {
6
- "outDir": "../../out-tsc/spec",
7
- "types": [
8
- "jasmine"
9
- ]
10
- },
11
- "include": [
12
- "**/*.spec.ts",
13
- "**/*.d.ts"
14
- ]
15
- }