ghocomps 1.1.25 → 1.3.25

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.
@@ -1,119 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { ChangeDetectionStrategy, ChangeDetectorRef, Component, model, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChanges }
3
- from '@angular/core';
4
- import { FormsModule } from '@angular/forms';
5
- import { DatePipe } from '@angular/common';
6
-
7
-
8
- @Component({
9
- selector: 'gho-input',
10
- standalone: true,
11
- imports: [CommonModule, FormsModule, ],
12
- template: `<div style="height: 55px !important;">
13
- <div style="height: 18px !important;">
14
- @if(datavalid())
15
- {
16
- <div [ngStyle]="{ margin: '-2px 5px' }" class="input-label">{{label}}
17
- </div>
18
- }
19
-
20
- </div>
21
- <div >
22
- <table>
23
- <tr>
24
- <td> <input type="text" [placeholder]="placeholder" [ngModel]="sharedValue" (input)="onInput($event)"
25
- [ngClass]="getclass()"></td>
26
- @if(filter && datavalid() )
27
- {
28
- <td>
29
- <div (click)="clear()" [ngClass]="getclearclass()">
30
- <i class="bi bi-x-lg "></i>
31
- </div>
32
- </td> }
33
- </tr>
34
- </table>
35
- </div>
36
- </div>`,
37
- styleUrl: './input.css',
38
- providers: [DatePipe],
39
- changeDetection: ChangeDetectionStrategy.OnPush,
40
- })
41
- export class GHOInput implements OnInit {
42
- constructor(private el: ElementRef, private cdr: ChangeDetectorRef, private datePipe: DatePipe) { }
43
- @Input() list: [] = [];
44
- @Input() label: string = "";
45
- @Input() appearance: string = "outline"
46
- @Input() filter: boolean = false;
47
- @Input() showclear: boolean = false;
48
- placeholder: string = "";
49
- @Input() sharedValue: string = '';
50
- @Output() sharedValueChange = new EventEmitter<string>();
51
-
52
-
53
- onInput(event: Event): void {
54
- this.sharedValue = (event.target as HTMLInputElement).value
55
- this.sharedValueChange.emit(this.sharedValue);
56
- this.setlabel();
57
- }
58
-
59
- clear()
60
- {
61
- this.sharedValue = ""
62
- this.sharedValueChange.emit(this.sharedValue);
63
- this.setlabel();
64
- }
65
-
66
- setlabel() {
67
- if (this.sharedValue.length > 0) {
68
- this.placeholder = ""
69
- }
70
- else { this.placeholder = this.label }
71
- }
72
-
73
- ngOnChanges(changes: SimpleChanges) {
74
- if (changes['sharedValue']) {
75
- this.setlabel();
76
- }
77
- }
78
-
79
- getclass() {
80
- if (this.appearance == "outline") {
81
- let css = " d-flex gap-3"
82
- if (!this.filter) { css = "input-outline" }
83
-
84
- if (this.filter) { if (!this.datavalid()) { css = "input-outline" } }
85
-
86
- if (this.filter) { if (this.datavalid() && this.showclear) { css = "input-outline-filter input-filter" } }
87
-
88
- if (this.filter) { if (this.datavalid() && !this.showclear) { css = "input-outline input-filter " } }
89
-
90
-
91
- if (!this.showclear) { css = "input-outline" }
92
-
93
- return css + " input"
94
- }
95
- else {
96
- return "input-mat d-flex gap-3 "
97
- }
98
- }
99
-
100
- getclearclass() {
101
- if (this.appearance == "outline") {
102
- if (this.datavalid() && this.showclear) { return "input-outline-filter-img"; }
103
- }
104
- else { return "input-mat-img "; }
105
- return "input-mat";
106
- }
107
-
108
- datavalid() {
109
- if (this.placeholder==this.label) {
110
- return false;
111
- }
112
- else { return true; }
113
- }
114
-
115
-
116
- ngOnInit(): void {
117
- }
118
-
119
- }
@@ -1,7 +0,0 @@
1
- /*
2
- * Public API Surface of ghocomps
3
- */
4
-
5
- export * from './lib/dropdown';
6
- export * from './lib/input';
7
- export * from './lib/date';
@@ -1,18 +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/lib",
7
- "declaration": true,
8
- "declarationMap": true,
9
- "inlineSources": true,
10
- "types": []
11
- },
12
- "include": [
13
- "src/**/*.ts"
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
- "src/**/*.d.ts",
13
- "src/**/*.spec.ts"
14
- ]
15
- }
package/tsconfig.json DELETED
@@ -1,45 +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
- "compileOnSave": false,
5
- "compilerOptions": {
6
- "inlineSourceMap": true,
7
- "inlineSources": true,
8
- "paths": {
9
- "GHOComps": [
10
- "./dist/ghocomps"
11
- ]
12
- },
13
- "strict": true,
14
- "allowJs": true,
15
- "noImplicitAny": false,
16
- "noImplicitOverride": true,
17
- "noPropertyAccessFromIndexSignature": true,
18
- "noImplicitReturns": true,
19
- "noFallthroughCasesInSwitch": true,
20
- "skipLibCheck": true,
21
- "isolatedModules": true,
22
- "experimentalDecorators": true,
23
- "importHelpers": true,
24
- "target": "ES2022",
25
- "module": "preserve",
26
- "strictNullChecks": false,
27
- "strictPropertyInitialization": false,
28
- },
29
- "angularCompilerOptions": {
30
- "enableI18nLegacyMessageIdFormat": false,
31
- "strictInjectionParameters": true,
32
- "strictInputAccessModifiers": true,
33
- "typeCheckHostBindings": true,
34
- "strictTemplates": true,
35
- },
36
- "files": [],
37
- "references": [
38
- {
39
- "path": "./projects/ghocomps/tsconfig.lib.json"
40
- },
41
- {
42
- "path": "./projects/ghocomps/tsconfig.spec.json"
43
- }
44
- ]
45
- }