angular-dumb-lib 0.0.6 → 0.0.8

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 (89) hide show
  1. package/esm2022/angular-dumb-lib.mjs +5 -0
  2. package/esm2022/lib/angular-dumb-lib.component.mjs +20 -0
  3. package/esm2022/lib/angular-dumb-lib.module.mjs +32 -0
  4. package/esm2022/lib/angular-dumb-lib.service.mjs +15 -0
  5. package/esm2022/lib/components/atoms/button/button.component.mjs +34 -0
  6. package/esm2022/lib/components/atoms/input/input.component.mjs +57 -0
  7. package/esm2022/lib/components/molecules/content-design/content-design.component.mjs +32 -0
  8. package/esm2022/lib/shared/enums/enum.mjs +69 -0
  9. package/esm2022/lib/shared/interfaces/interface.mjs +2 -0
  10. package/esm2022/public-api.mjs +10 -0
  11. package/fesm2022/angular-dumb-lib.mjs +243 -0
  12. package/fesm2022/angular-dumb-lib.mjs.map +1 -0
  13. package/index.d.ts +5 -0
  14. package/lib/angular-dumb-lib.component.d.ts +5 -0
  15. package/lib/angular-dumb-lib.module.d.ts +9 -0
  16. package/lib/angular-dumb-lib.service.d.ts +6 -0
  17. package/lib/components/atoms/button/button.component.d.ts +12 -0
  18. package/lib/components/atoms/input/input.component.d.ts +19 -0
  19. package/lib/components/molecules/content-design/content-design.component.d.ts +12 -0
  20. package/lib/shared/enums/enum.d.ts +59 -0
  21. package/lib/shared/interfaces/interface.d.ts +58 -0
  22. package/package.json +16 -3
  23. package/{src/public-api.ts → public-api.d.ts} +1 -5
  24. package/ng-package.json +0 -7
  25. package/src/lib/angular-dumb-lib.component.spec.ts +0 -21
  26. package/src/lib/angular-dumb-lib.component.ts +0 -15
  27. package/src/lib/angular-dumb-lib.module.ts +0 -19
  28. package/src/lib/angular-dumb-lib.service.spec.ts +0 -16
  29. package/src/lib/angular-dumb-lib.service.ts +0 -9
  30. package/src/lib/components/atoms/button/button.component.html +0 -15
  31. package/src/lib/components/atoms/button/button.component.scss +0 -76
  32. package/src/lib/components/atoms/button/button.component.ts +0 -33
  33. package/src/lib/components/atoms/datetime-picker/datetime-picker.component.html +0 -7
  34. package/src/lib/components/atoms/datetime-picker/datetime-picker.component.scss +0 -24
  35. package/src/lib/components/atoms/datetime-picker/datetime-picker.component.ts +0 -59
  36. package/src/lib/components/atoms/file-selection/file-selection.component.html +0 -24
  37. package/src/lib/components/atoms/file-selection/file-selection.component.scss +0 -35
  38. package/src/lib/components/atoms/file-selection/file-selection.component.ts +0 -86
  39. package/src/lib/components/atoms/input/input.component.html +0 -28
  40. package/src/lib/components/atoms/input/input.component.scss +0 -64
  41. package/src/lib/components/atoms/input/input.component.ts +0 -57
  42. package/src/lib/components/atoms/loading/loading.component.html +0 -3
  43. package/src/lib/components/atoms/loading/loading.component.scss +0 -36
  44. package/src/lib/components/atoms/loading/loading.component.ts +0 -21
  45. package/src/lib/components/atoms/selection/selection.component.html +0 -38
  46. package/src/lib/components/atoms/selection/selection.component.scss +0 -65
  47. package/src/lib/components/atoms/selection/selection.component.ts +0 -84
  48. package/src/lib/components/atoms/slider/slider.component.html +0 -14
  49. package/src/lib/components/atoms/slider/slider.component.scss +0 -50
  50. package/src/lib/components/atoms/slider/slider.component.ts +0 -37
  51. package/src/lib/components/atoms/tags/tags.component.html +0 -25
  52. package/src/lib/components/atoms/tags/tags.component.scss +0 -58
  53. package/src/lib/components/atoms/tags/tags.component.ts +0 -62
  54. package/src/lib/components/molecules/cards/cards.component.html +0 -12
  55. package/src/lib/components/molecules/cards/cards.component.scss +0 -14
  56. package/src/lib/components/molecules/cards/cards.component.ts +0 -19
  57. package/src/lib/components/molecules/content-design/content-design.component.html +0 -14
  58. package/src/lib/components/molecules/content-design/content-design.component.scss +0 -68
  59. package/src/lib/components/molecules/content-design/content-design.component.ts +0 -32
  60. package/src/lib/components/molecules/form/form.component.html +0 -22
  61. package/src/lib/components/molecules/form/form.component.scss +0 -17
  62. package/src/lib/components/molecules/form/form.component.ts +0 -64
  63. package/src/lib/components/molecules/modal/modal.component.html +0 -16
  64. package/src/lib/components/molecules/modal/modal.component.scss +0 -83
  65. package/src/lib/components/molecules/modal/modal.component.ts +0 -48
  66. package/src/lib/components/molecules/paginator/paginator.component.html +0 -25
  67. package/src/lib/components/molecules/paginator/paginator.component.scss +0 -27
  68. package/src/lib/components/molecules/paginator/paginator.component.ts +0 -126
  69. package/src/lib/components/molecules/table/table.component.html +0 -45
  70. package/src/lib/components/molecules/table/table.component.scss +0 -169
  71. package/src/lib/components/molecules/table/table.component.ts +0 -40
  72. package/src/lib/components/pages/footer/footer.component.html +0 -32
  73. package/src/lib/components/pages/footer/footer.component.scss +0 -69
  74. package/src/lib/components/pages/footer/footer.component.ts +0 -16
  75. package/src/lib/components/pages/login/login.component.html +0 -10
  76. package/src/lib/components/pages/login/login.component.scss +0 -32
  77. package/src/lib/components/pages/login/login.component.ts +0 -32
  78. package/src/lib/components/pages/menu/menu.component.html +0 -18
  79. package/src/lib/components/pages/menu/menu.component.scss +0 -87
  80. package/src/lib/components/pages/menu/menu.component.ts +0 -26
  81. package/src/lib/components/pages/version/version.component.html +0 -3
  82. package/src/lib/components/pages/version/version.component.scss +0 -0
  83. package/src/lib/components/pages/version/version.component.ts +0 -28
  84. package/src/lib/shared/constants/constant.ts +0 -7
  85. package/src/lib/shared/enums/enum.ts +0 -68
  86. package/src/lib/shared/interfaces/interface.ts +0 -64
  87. package/tsconfig.lib.json +0 -14
  88. package/tsconfig.lib.prod.json +0 -10
  89. package/tsconfig.spec.json +0 -14
@@ -1,35 +0,0 @@
1
- .file-selector {
2
- display: flex;
3
- flex-direction: column;
4
- align-items: flex-start;
5
-
6
- label {
7
- font-size: 14px;
8
- color: #666;
9
- margin-bottom: 8px;
10
- font-weight: bold;
11
- }
12
-
13
- input[type="file"] {
14
- margin-bottom: 16px;
15
- }
16
-
17
- .preview-image {
18
- max-width: 150px; // Adjust the image preview size as needed
19
- max-height: 150px;
20
- border: 1px solid #ccc;
21
- margin-top: 8px;
22
- }
23
-
24
- .hidden-file-input {
25
- opacity: 0;
26
- position: absolute;
27
- z-index: -1; /* Keeps it off the screen, but functional */
28
- }
29
-
30
- .file-selection {
31
- display: flex;
32
- align-items: center;
33
- gap: 10px;
34
- }
35
- }
@@ -1,86 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, Input, OnInit, forwardRef } from '@angular/core';
3
- import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
4
- import { ButtonComponent } from 'angular-dumb-lib';
5
- import { IButtonConfig } from 'dist/angular-dumb-lib/lib/shared/interfaces/interface';
6
- import { ButtonType } from '../../../shared/enums/enum';
7
-
8
- @Component({
9
- selector: 'app-file-selection',
10
- standalone: true,
11
- templateUrl: './file-selection.component.html',
12
- styleUrls: ['./file-selection.component.scss'],
13
- providers: [{
14
- provide: NG_VALUE_ACCESSOR,
15
- useExisting: forwardRef(() => FileSelectionComponent),
16
- multi: true
17
- }],
18
- imports: [CommonModule, ButtonComponent]
19
- })
20
- export class FileSelectionComponent implements OnInit, ControlValueAccessor {
21
- @Input() label!: string; // Label for the file selector
22
- @Input() chooseFileLabel!: string;
23
- @Input() imageUrl: string | ArrayBuffer | null = null; // Allow imageUrl to be passed externally
24
- @Input() fileName: string | null = null; // Allow fileName to be passed externally
25
-
26
- config!: IButtonConfig;
27
-
28
- onChange: any = () => {};
29
- onTouched: any = () => {};
30
- private _value: any = undefined;
31
-
32
- get value() {
33
- return this._value;
34
- }
35
-
36
- set value(value: any) {
37
- this._value = value;
38
- this.onChange(this._value);
39
- this.onTouched();
40
- }
41
-
42
- ngOnInit(): void {
43
- this.config = {
44
- type: ButtonType.button,
45
- label: this.chooseFileLabel
46
- }
47
- }
48
-
49
- onFileSelected(event: Event) {
50
- const input = event.target as HTMLInputElement;
51
-
52
- if (input.files && input.files.length > 0) {
53
- const file = input.files[0];
54
-
55
- // Store the file name to display it in the UI
56
- this.fileName = file.name;
57
- this.value = file;
58
-
59
- // Generate image preview URL if it's an image
60
- const reader = new FileReader();
61
- reader.onload = (e: any) => {
62
- this.imageUrl = e.target.result; // Set image URL for preview
63
- };
64
- reader.readAsDataURL(file);
65
- }
66
- }
67
-
68
- triggerFileInput() {
69
- const fileInput = document.getElementById('fileInput') as HTMLInputElement;
70
- fileInput.click(); // Programmatically click the hidden file input
71
- }
72
-
73
- writeValue(value: any): void {
74
- this._value = value;
75
- }
76
- registerOnChange(fn: any): void {
77
- this.onChange = fn;
78
- }
79
- registerOnTouched(fn: any): void {
80
- this.onTouched = fn;
81
- }
82
-
83
- setDisabledState?(isDisabled: boolean): void {
84
- // Implement if you need to handle disabled state
85
- }
86
- }
@@ -1,28 +0,0 @@
1
- <div class="input-item" [ngClass]="config.direction">
2
- <label *ngIf="config.label">
3
- {{ config.label }}
4
- <span *ngIf="config.required" class="required-indicator">*</span>
5
- </label>
6
-
7
- <div class="input-container">
8
- <input *ngIf="config.type !== 'textarea' && config.type !== 'richText' && config.type !== 'image'"
9
- [type]="config.type"
10
- [name]="config.name"
11
- [required]="config.required"
12
- [(ngModel)]="value"
13
- [placeholder] = "config.placeholder"
14
- [ngClass]="{'input-error': !config.isValid}">
15
- <textarea *ngIf="config.type === 'textarea'"
16
- [name]="config.name"
17
- [required]="config.required"
18
- [(ngModel)]="value"
19
- [placeholder] = "config.placeholder"
20
- [ngClass]="{'input-error': !config.isValid}">
21
- </textarea>
22
- <i *ngIf="!config.isValid" class="material-icons warning-icon">error</i>
23
- </div>
24
-
25
- <div *ngIf="config.type === 'image'">
26
- <img *ngIf="value" [src]="value" alt="Selected Image" class="preview-image"/>
27
- </div>
28
- </div>
@@ -1,64 +0,0 @@
1
- .input-item {
2
- display: flex;
3
- width: 100%;
4
- gap: 10px;
5
-
6
- .input-container {
7
- display: flex;
8
- width: inherit; // Maintain the width of the input container
9
- .input-error {
10
- border-color: red;
11
- }
12
- }
13
-
14
- label {
15
- display: flex;
16
- align-items: center;
17
- }
18
-
19
- &.horizontal {
20
- flex-direction: row;
21
-
22
- label {
23
- width: 30%; // Adjust label width for horizontal layout
24
- }
25
- }
26
-
27
- &.vertical {
28
- flex-direction: column;
29
- }
30
-
31
- .preview-image {
32
- max-width: 150px; // Adjust the image preview size as needed
33
- max-height: 150px;
34
- border: 1px solid #ccc;
35
- margin-top: 8px;
36
- }
37
-
38
- .required-indicator, .warning-icon {
39
- display: flex;
40
- align-items: center;
41
- color: red; // Change this color as needed
42
- margin-left: 4px; // Space between label and asterisk
43
- }
44
-
45
- .warning-icon {
46
- font-weight: bold;
47
- }
48
-
49
- input,
50
- textarea {
51
- padding: 0.5rem;
52
- border: 1px solid #ccc;
53
- border-radius: 0.25rem;
54
- width: -webkit-fill-available; // Ensure input takes full available width
55
- }
56
-
57
- quill-editor {
58
- width: 100%;
59
- }
60
- }
61
-
62
-
63
-
64
-
@@ -1,57 +0,0 @@
1
- import { Component, Input, OnInit, forwardRef } from '@angular/core';
2
- import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
3
- import { InputDirection, InputType } from '../../../shared/enums/enum';
4
- import { IInputConfig } from '../../../shared/interfaces/interface';
5
- import { CommonModule } from '@angular/common';
6
-
7
- @Component({
8
- selector: 'app-input',
9
- standalone: true,
10
- templateUrl: './input.component.html',
11
- styleUrls: ['./input.component.scss'],
12
- providers: [{
13
- provide: NG_VALUE_ACCESSOR,
14
- useExisting: forwardRef(() => InputComponent),
15
- multi: true
16
- }],
17
- imports: [CommonModule, FormsModule]
18
- })
19
- export class InputComponent implements OnInit, ControlValueAccessor {
20
- @Input() config!: IInputConfig;
21
-
22
- private _value: any = '';
23
-
24
- get value() {
25
- return this._value;
26
- }
27
-
28
- set value(value: any) {
29
- this._value = value;
30
- this.onChange(this._value);
31
- this.onTouched();
32
- }
33
-
34
- onChange: any = () => {};
35
- onTouched: any = () => {};
36
-
37
- constructor() { }
38
-
39
- writeValue(value: any): void {
40
- this._value = value;
41
- }
42
- registerOnChange(fn: any): void {
43
- this.onChange = fn;
44
- }
45
- registerOnTouched(fn: any): void {
46
- this.onTouched = fn
47
- }
48
-
49
- ngOnInit() {
50
- this.config = {
51
- type: InputType.text,
52
- direction: InputDirection.vertical,
53
- isValid: true,
54
- ...this.config,
55
- };
56
- }
57
- }
@@ -1,3 +0,0 @@
1
- <div [ngClass]="size" class="loading-content">
2
- <img [src]="imageSrc" />
3
- </div>
@@ -1,36 +0,0 @@
1
- :host {
2
- width: 100%;
3
- height: 100%;
4
- display: table;
5
- text-align: center;
6
- }
7
-
8
- .loading-content {
9
- display: table-cell;
10
- vertical-align: middle;
11
- }
12
-
13
- .xbig img {
14
- width: 256px;
15
- height: 256px;
16
- }
17
-
18
- .big img {
19
- width: 128px;
20
- height: 128px;
21
- }
22
-
23
- .medium img {
24
- width: 64px;
25
- height: 64px;
26
- }
27
-
28
- .small img {
29
- width: 32px;
30
- height: 32px;
31
- }
32
-
33
- .xsmall img {
34
- width: 16px;
35
- height: 16px;
36
- }
@@ -1,21 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { LoadingSize } from '../../../shared/enums/enum';
3
- import { CommonModule } from '@angular/common';
4
-
5
- @Component({
6
- selector: 'app-loading',
7
- standalone: true,
8
- templateUrl: './loading.component.html',
9
- styleUrls: ['./loading.component.scss'],
10
- imports: [CommonModule]
11
- })
12
- export class LoadingComponent implements OnInit {
13
- @Input() size: LoadingSize = LoadingSize.Medium;
14
-
15
- @Input() imageSrc: string = '';
16
-
17
- constructor() { }
18
-
19
- ngOnInit() {
20
- }
21
- }
@@ -1,38 +0,0 @@
1
- <div class="dropdown" *ngIf="displayType === 'dropdown'">
2
- <label *ngIf="label">{{ label }}</label>
3
- <select
4
- (change)="onSelectChange($event)"
5
- [multiple]="isMultiSelect"
6
- [(ngModel)]="value">
7
- <option *ngFor="let option of options"
8
- [value]="option.value"
9
- [selected]="isSelected(option.value)">
10
- {{ option.label }}
11
- </option>
12
- </select>
13
- </div>
14
-
15
- <div class="radio-group" *ngIf="displayType === 'radio'">
16
- <label *ngIf="label">{{ label }}</label>
17
- <div *ngFor="let option of options">
18
- <input
19
- type="radio"
20
- [value]="option.value"
21
- [checked]="option.value === selectedValue"
22
- (change)="onSelectChange($event)"
23
- name="radioGroup"/>
24
- <label>{{ option.label }}</label>
25
- </div>
26
- </div>
27
-
28
- <div class="checkbox-group" *ngIf="displayType === 'checkbox'">
29
- <label *ngIf="label">{{ label }}</label>
30
- <div *ngFor="let option of options">
31
- <input
32
- type="checkbox"
33
- [value]="option.value"
34
- [checked]="isSelected(option.value)"
35
- (change)="onMultiSelectChange($event)"/>
36
- <label>{{ option.label }}</label>
37
- </div>
38
- </div>
@@ -1,65 +0,0 @@
1
- /* Dropdown styles */
2
- .dropdown, .radio-group, .checkbox-group {
3
- display: flex;
4
- flex-direction: column;
5
- width: 100%; // Adjust this as needed
6
- min-width: 150px;
7
-
8
- label {
9
- font-size: 12px;
10
- color: #666;
11
- margin-bottom: 4px;
12
- font-weight: bold;
13
- }
14
- }
15
-
16
- /* Select (Dropdown) styles */
17
- .dropdown select {
18
- width: 100%;
19
- padding: 9px 8px; // Compact padding
20
- font-size: 12px;
21
- color: #333;
22
- background-color: #fff;
23
- border: 1px solid #ccc;
24
- border-radius: 4px;
25
- appearance: none; // Hide default dropdown arrow in some browsers
26
- cursor: pointer;
27
- transition: border-color 0.3s, box-shadow 0.3s;
28
-
29
- &:hover {
30
- border-color: #888;
31
- }
32
-
33
- &:focus {
34
- border-color: #03A9F4;
35
- box-shadow: 0 0 5px rgba(3, 169, 244, 0.5);
36
- outline: none;
37
- }
38
- }
39
-
40
- /* Radio button styles */
41
- .radio-group div, .checkbox-group div {
42
- display: flex;
43
- align-items: center;
44
- margin-bottom: 8px; // Space between options
45
- }
46
-
47
- .radio-group input[type="radio"],
48
- .checkbox-group input[type="checkbox"] {
49
- margin-right: 8px; // Space between input and label
50
- cursor: pointer;
51
- }
52
-
53
- /* Radio/Checkbox label styles */
54
- .radio-group label, .checkbox-group label {
55
- font-size: 12px;
56
- color: #333;
57
- cursor: pointer; // Ensures clicking the label checks the input
58
- }
59
-
60
- /* Focus state for radio and checkbox */
61
- .radio-group input[type="radio"]:focus,
62
- .checkbox-group input[type="checkbox"]:focus {
63
- outline: 2px solid #03A9F4; // Focus indicator
64
- outline-offset: 2px;
65
- }
@@ -1,84 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output, forwardRef } from '@angular/core';
2
- import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
3
- import { SelectionType } from '../../../shared/enums/enum';
4
- import { IDropdownOption } from '../../../shared/interfaces/interface';
5
- import { CommonModule } from '@angular/common';
6
-
7
- @Component({
8
- selector: 'app-selection',
9
- templateUrl: './selection.component.html',
10
- styleUrls: ['./selection.component.scss'],
11
- standalone: true,
12
- providers: [{
13
- provide: NG_VALUE_ACCESSOR,
14
- useExisting: forwardRef(() => SelectionComponent),
15
- multi: true
16
- }],
17
- imports: [CommonModule, FormsModule]
18
- })
19
- export class SelectionComponent implements OnInit, ControlValueAccessor {
20
- @Input() label: string = ''; // Label for the dropdown
21
- @Input() options: IDropdownOption[] | undefined = []; // Array of options
22
- @Input() selectedValue: any; // Pre-selected value (single selection)
23
- @Input() selectedValues: any[] = []; // Pre-selected values (multi-selection)
24
- @Input() isMultiSelect: boolean = false; // Enable multi-selection for dropdown
25
- @Input() displayType: SelectionType = SelectionType.dropdown; // Control the display type (dropdown, radio, or checkbox)
26
-
27
- @Output() selectedChange: EventEmitter<any> = new EventEmitter<any>(); // Event emitter for value changes
28
-
29
- onChange: any = () => {};
30
- onTouched: any = () => {};
31
-
32
- get value() {
33
- return this.selectedValue;
34
- }
35
-
36
- set value(value: any) {
37
- this.selectedValue = (this.isMultiSelect === false && Array.isArray(value))? value[0] : value;
38
-
39
- this.onChange(this.selectedValue);
40
- this.onTouched();
41
- }
42
-
43
- ngOnInit(): void {
44
- if (this.options && this.options.length > 0 && !this.isMultiSelect) {
45
- this.selectedValue = this.options[0].value;
46
- this.onChange(this.selectedValue);
47
- }
48
- }
49
-
50
- onSelectChange(event: Event) {
51
- this.selectedChange.emit(this.selectedValue);
52
- }
53
-
54
- onMultiSelectChange(event: Event) {
55
- const target = event.target as HTMLInputElement;
56
- const value = target.value;
57
-
58
- if (target.checked) {
59
- this.selectedValues.push(value);
60
- } else {
61
- this.selectedValues = this.selectedValues.filter(v => v !== value);
62
- }
63
-
64
- this.selectedChange.emit(this.selectedValues);
65
- }
66
-
67
- isSelected(value: any): boolean {
68
- return this.isMultiSelect ? this.selectedValues.includes(value) : value === this.selectedValue;
69
- }
70
-
71
- writeValue(value: any): void {
72
- this.selectedValue = value;
73
- }
74
- registerOnChange(fn: any): void {
75
- this.onChange = fn;
76
- }
77
- registerOnTouched(fn: any): void {
78
- this.onTouched = fn
79
- }
80
-
81
- setDisabledState?(isDisabled: boolean): void {
82
- // Implement if you need to handle disabled state
83
- }
84
- }
@@ -1,14 +0,0 @@
1
- <div class="slider-container">
2
- <div class="slider-wrapper">
3
- <div
4
- class="slide"
5
- *ngFor="let image of images; let i = index"
6
- [class.active]="i === currentIndex"
7
- [ngStyle]="{'background-image': 'url(' + image + ')'}">
8
- </div>
9
- </div>
10
-
11
- <!-- Navigation Buttons -->
12
- <button class="prev" (click)="prevSlide()">&#10094;</button>
13
- <button class="next" (click)="nextSlide()">&#10095;</button>
14
- </div>
@@ -1,50 +0,0 @@
1
- .slider-container {
2
- position: relative;
3
- width: 100%;
4
- margin: auto;
5
- overflow: hidden;
6
- }
7
-
8
- .slider-wrapper {
9
- position: relative;
10
- width: 100%;
11
- height: 400px;
12
- }
13
-
14
- .slide {
15
- position: absolute;
16
- width: 100%;
17
- height: 100%;
18
- background-size: cover;
19
- background-position: center;
20
- opacity: 0;
21
- transition: opacity 0.5s ease-in-out;
22
- }
23
-
24
- .slide.active {
25
- opacity: 1;
26
- }
27
-
28
- .prev, .next {
29
- position: absolute;
30
- top: 50%;
31
- transform: translateY(-50%);
32
- background-color: rgba(0, 0, 0, 0.5);
33
- color: white;
34
- border: none;
35
- padding: 10px;
36
- cursor: pointer;
37
- font-size: 18px;
38
- }
39
-
40
- .prev {
41
- left: 10px;
42
- }
43
-
44
- .next {
45
- right: 10px;
46
- }
47
-
48
- .prev:hover, .next:hover {
49
- background-color: rgba(0, 0, 0, 0.8);
50
- }
@@ -1,37 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, Input, OnInit } from '@angular/core';
3
-
4
- @Component({
5
- selector: 'app-slider',
6
- standalone: true,
7
- templateUrl: './slider.component.html',
8
- styleUrls: ['./slider.component.scss'],
9
- imports: [CommonModule]
10
- })
11
- export class SliderComponent implements OnInit {
12
- @Input() images: string[] = [];
13
- @Input() autoSlide: boolean = false;
14
- @Input() slideInterval: number = 3000; // Time interval for auto slide
15
-
16
- currentIndex: number = 0;
17
-
18
- ngOnInit(): void {
19
- if (this.autoSlide) {
20
- this.startAutoSlide();
21
- }
22
- }
23
-
24
- startAutoSlide(): void {
25
- setInterval(() => {
26
- this.nextSlide();
27
- }, this.slideInterval);
28
- }
29
-
30
- prevSlide(): void {
31
- this.currentIndex = this.currentIndex === 0 ? this.images.length - 1 : this.currentIndex - 1;
32
- }
33
-
34
- nextSlide(): void {
35
- this.currentIndex = this.currentIndex === this.images.length - 1 ? 0 : this.currentIndex + 1;
36
- }
37
- }
@@ -1,25 +0,0 @@
1
- <div class="tags-select-container">
2
- <label for="searchTags">Search and Select Tags:</label>
3
- <input
4
- id="searchTags"
5
- type="text"
6
- [(ngModel)]="searchText"
7
- (input)="filterTags()"
8
- placeholder="Search tags..."
9
- />
10
-
11
- <div *ngIf="filteredTags.length > 0">
12
- <ul class="tag-list">
13
- <li *ngFor="let tag of filteredTags" (click)="onTagSelectionChange(tag)">
14
- {{ tag }}
15
- </li>
16
- </ul>
17
- </div>
18
-
19
- <div class="selected-tags">
20
- <button *ngFor="let tag of selectedTags" class="tag-button">
21
- {{ tag }}
22
- <span class="remove-tag" (click)="removeTag(tag)">x</span>
23
- </button>
24
- </div>
25
- </div>