angular-dumb-lib 0.0.6 → 0.0.9

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 (122) 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 +22 -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/datetime-picker/datetime-picker.component.mjs +58 -0
  7. package/esm2022/lib/components/atoms/file-selection/file-selection.component.mjs +85 -0
  8. package/esm2022/lib/components/atoms/input/input.component.mjs +57 -0
  9. package/esm2022/lib/components/atoms/loading/loading.component.mjs +25 -0
  10. package/esm2022/lib/components/atoms/selection/selection.component.mjs +92 -0
  11. package/esm2022/lib/components/atoms/slider/slider.component.mjs +42 -0
  12. package/esm2022/lib/components/atoms/tags/tags.component.mjs +62 -0
  13. package/esm2022/lib/components/molecules/cards/cards.component.mjs +22 -0
  14. package/esm2022/lib/components/molecules/content-design/content-design.component.mjs +32 -0
  15. package/esm2022/lib/components/molecules/form/form.component.mjs +71 -0
  16. package/esm2022/lib/components/molecules/modal/modal.component.mjs +45 -0
  17. package/esm2022/lib/components/molecules/paginator/paginator.component.mjs +118 -0
  18. package/esm2022/lib/components/molecules/table/table.component.mjs +51 -0
  19. package/esm2022/lib/components/pages/footer/footer.component.mjs +15 -0
  20. package/esm2022/lib/components/pages/login/login.component.mjs +31 -0
  21. package/esm2022/lib/components/pages/menu/menu.component.mjs +31 -0
  22. package/esm2022/lib/components/pages/version/version.component.mjs +26 -0
  23. package/esm2022/lib/shared/constants/constant.mjs +6 -0
  24. package/esm2022/lib/shared/enums/enum.mjs +69 -0
  25. package/esm2022/lib/shared/interfaces/interface.mjs +2 -0
  26. package/esm2022/public-api.mjs +25 -0
  27. package/fesm2022/angular-dumb-lib.mjs +915 -0
  28. package/fesm2022/angular-dumb-lib.mjs.map +1 -0
  29. package/index.d.ts +5 -0
  30. package/lib/angular-dumb-lib.component.d.ts +5 -0
  31. package/lib/angular-dumb-lib.module.d.ts +7 -0
  32. package/lib/angular-dumb-lib.service.d.ts +6 -0
  33. package/lib/components/atoms/button/button.component.d.ts +12 -0
  34. package/lib/components/atoms/datetime-picker/datetime-picker.component.d.ts +17 -0
  35. package/lib/components/atoms/file-selection/file-selection.component.d.ts +25 -0
  36. package/lib/components/atoms/input/input.component.d.ts +19 -0
  37. package/lib/components/atoms/loading/loading.component.d.ts +11 -0
  38. package/lib/components/atoms/selection/selection.component.d.ts +28 -0
  39. package/lib/components/atoms/slider/slider.component.d.ts +14 -0
  40. package/lib/components/atoms/tags/tags.component.d.ts +19 -0
  41. package/lib/components/molecules/cards/cards.component.d.ts +10 -0
  42. package/lib/components/molecules/content-design/content-design.component.d.ts +12 -0
  43. package/lib/components/molecules/form/form.component.d.ts +23 -0
  44. package/lib/components/molecules/modal/modal.component.d.ts +17 -0
  45. package/lib/components/molecules/paginator/paginator.component.d.ts +29 -0
  46. package/lib/components/molecules/table/table.component.d.ts +20 -0
  47. package/lib/components/pages/footer/footer.component.d.ts +8 -0
  48. package/lib/components/pages/login/login.component.d.ts +11 -0
  49. package/lib/components/pages/menu/menu.component.d.ts +14 -0
  50. package/lib/components/pages/version/version.component.d.ts +10 -0
  51. package/lib/shared/constants/constant.d.ts +3 -0
  52. package/lib/shared/enums/enum.d.ts +59 -0
  53. package/lib/shared/interfaces/interface.d.ts +58 -0
  54. package/package.json +16 -3
  55. package/public-api.d.ts +21 -0
  56. package/ng-package.json +0 -7
  57. package/src/lib/angular-dumb-lib.component.spec.ts +0 -21
  58. package/src/lib/angular-dumb-lib.component.ts +0 -15
  59. package/src/lib/angular-dumb-lib.module.ts +0 -19
  60. package/src/lib/angular-dumb-lib.service.spec.ts +0 -16
  61. package/src/lib/angular-dumb-lib.service.ts +0 -9
  62. package/src/lib/components/atoms/button/button.component.html +0 -15
  63. package/src/lib/components/atoms/button/button.component.scss +0 -76
  64. package/src/lib/components/atoms/button/button.component.ts +0 -33
  65. package/src/lib/components/atoms/datetime-picker/datetime-picker.component.html +0 -7
  66. package/src/lib/components/atoms/datetime-picker/datetime-picker.component.scss +0 -24
  67. package/src/lib/components/atoms/datetime-picker/datetime-picker.component.ts +0 -59
  68. package/src/lib/components/atoms/file-selection/file-selection.component.html +0 -24
  69. package/src/lib/components/atoms/file-selection/file-selection.component.scss +0 -35
  70. package/src/lib/components/atoms/file-selection/file-selection.component.ts +0 -86
  71. package/src/lib/components/atoms/input/input.component.html +0 -28
  72. package/src/lib/components/atoms/input/input.component.scss +0 -64
  73. package/src/lib/components/atoms/input/input.component.ts +0 -57
  74. package/src/lib/components/atoms/loading/loading.component.html +0 -3
  75. package/src/lib/components/atoms/loading/loading.component.scss +0 -36
  76. package/src/lib/components/atoms/loading/loading.component.ts +0 -21
  77. package/src/lib/components/atoms/selection/selection.component.html +0 -38
  78. package/src/lib/components/atoms/selection/selection.component.scss +0 -65
  79. package/src/lib/components/atoms/selection/selection.component.ts +0 -84
  80. package/src/lib/components/atoms/slider/slider.component.html +0 -14
  81. package/src/lib/components/atoms/slider/slider.component.scss +0 -50
  82. package/src/lib/components/atoms/slider/slider.component.ts +0 -37
  83. package/src/lib/components/atoms/tags/tags.component.html +0 -25
  84. package/src/lib/components/atoms/tags/tags.component.scss +0 -58
  85. package/src/lib/components/atoms/tags/tags.component.ts +0 -62
  86. package/src/lib/components/molecules/cards/cards.component.html +0 -12
  87. package/src/lib/components/molecules/cards/cards.component.scss +0 -14
  88. package/src/lib/components/molecules/cards/cards.component.ts +0 -19
  89. package/src/lib/components/molecules/content-design/content-design.component.html +0 -14
  90. package/src/lib/components/molecules/content-design/content-design.component.scss +0 -68
  91. package/src/lib/components/molecules/content-design/content-design.component.ts +0 -32
  92. package/src/lib/components/molecules/form/form.component.html +0 -22
  93. package/src/lib/components/molecules/form/form.component.scss +0 -17
  94. package/src/lib/components/molecules/form/form.component.ts +0 -64
  95. package/src/lib/components/molecules/modal/modal.component.html +0 -16
  96. package/src/lib/components/molecules/modal/modal.component.scss +0 -83
  97. package/src/lib/components/molecules/modal/modal.component.ts +0 -48
  98. package/src/lib/components/molecules/paginator/paginator.component.html +0 -25
  99. package/src/lib/components/molecules/paginator/paginator.component.scss +0 -27
  100. package/src/lib/components/molecules/paginator/paginator.component.ts +0 -126
  101. package/src/lib/components/molecules/table/table.component.html +0 -45
  102. package/src/lib/components/molecules/table/table.component.scss +0 -169
  103. package/src/lib/components/molecules/table/table.component.ts +0 -40
  104. package/src/lib/components/pages/footer/footer.component.html +0 -32
  105. package/src/lib/components/pages/footer/footer.component.scss +0 -69
  106. package/src/lib/components/pages/footer/footer.component.ts +0 -16
  107. package/src/lib/components/pages/login/login.component.html +0 -10
  108. package/src/lib/components/pages/login/login.component.scss +0 -32
  109. package/src/lib/components/pages/login/login.component.ts +0 -32
  110. package/src/lib/components/pages/menu/menu.component.html +0 -18
  111. package/src/lib/components/pages/menu/menu.component.scss +0 -87
  112. package/src/lib/components/pages/menu/menu.component.ts +0 -26
  113. package/src/lib/components/pages/version/version.component.html +0 -3
  114. package/src/lib/components/pages/version/version.component.scss +0 -0
  115. package/src/lib/components/pages/version/version.component.ts +0 -28
  116. package/src/lib/shared/constants/constant.ts +0 -7
  117. package/src/lib/shared/enums/enum.ts +0 -68
  118. package/src/lib/shared/interfaces/interface.ts +0 -64
  119. package/src/public-api.ts +0 -10
  120. package/tsconfig.lib.json +0 -14
  121. package/tsconfig.lib.prod.json +0 -10
  122. package/tsconfig.spec.json +0 -14
@@ -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>
@@ -1,58 +0,0 @@
1
- .tags-select-container {
2
- display: flex;
3
- flex-direction: column;
4
- }
5
-
6
- input[type="text"] {
7
- padding: 5px;
8
- border: 1px solid #ccc;
9
- border-radius: 4px;
10
- width: 200px;
11
- margin-bottom: 10px;
12
- }
13
-
14
- .tag-list {
15
- list-style-type: none;
16
- padding-left: 0;
17
- margin: 0;
18
- border: 1px solid #ccc;
19
- max-height: 100px;
20
- overflow-y: auto;
21
- }
22
-
23
- .tag-list li {
24
- padding: 5px;
25
- cursor: pointer;
26
- border-bottom: 1px solid #ddd;
27
- }
28
-
29
- .tag-list li:hover {
30
- background-color: #f1f1f1;
31
- }
32
-
33
- .selected-tags {
34
- display: flex;
35
- flex-wrap: wrap;
36
- gap: 5px;
37
- }
38
-
39
- .tag-button {
40
- background-color: #007bff;
41
- color: white;
42
- border: none;
43
- border-radius: 20px;
44
- padding: 5px 10px;
45
- display: flex;
46
- align-items: center;
47
- cursor: pointer;
48
- }
49
-
50
- .tag-button .remove-tag {
51
- margin-left: 8px;
52
- background: none;
53
- border: none;
54
- font-size: 1rem;
55
- font-weight: bold;
56
- color: white;
57
- cursor: pointer;
58
- }
@@ -1,62 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, Input, forwardRef } from '@angular/core';
3
- import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
4
-
5
- @Component({
6
- selector: 'app-tags',
7
- standalone: true,
8
- templateUrl: './tags.component.html',
9
- styleUrls: ['./tags.component.scss'],
10
- providers: [{
11
- provide: NG_VALUE_ACCESSOR,
12
- useExisting: forwardRef(() => TagsComponent),
13
- multi: true
14
- }],
15
- imports: [CommonModule, FormsModule]
16
- })
17
- export class TagsComponent implements ControlValueAccessor {
18
- @Input() availableTags: string[] = ['abc', 'dce'];
19
- filteredTags: string[] = [];
20
- selectedTags: string[] = [];
21
- searchText: string = '';
22
-
23
- private onChange: any = () => {};
24
- private onTouched: any = () => {};
25
-
26
- ngOnInit() {
27
- this.filteredTags = this.availableTags; // Initialize the filtered tags list
28
- }
29
-
30
- writeValue(value: string[]): void {
31
- if (value) {
32
- this.selectedTags = value;
33
- }
34
- }
35
-
36
- registerOnChange(fn: any): void {
37
- this.onChange = fn;
38
- }
39
-
40
- registerOnTouched(fn: any): void {
41
- this.onTouched = fn;
42
- }
43
-
44
- onTagSelectionChange(tag: string) {
45
- if (!this.selectedTags.includes(tag)) {
46
- this.selectedTags = [...this.selectedTags, tag]; // Add the tag
47
- this.onChange(this.selectedTags);
48
- }
49
- }
50
-
51
- removeTag(tag: string) {
52
- this.selectedTags = this.selectedTags.filter(t => t !== tag); // Remove the tag
53
- this.onChange(this.selectedTags);
54
- }
55
-
56
- filterTags() {
57
- this.filteredTags = this.availableTags.filter(tag =>
58
- tag.toLowerCase().includes(this.searchText.toLowerCase()) &&
59
- !this.selectedTags.includes(tag)
60
- );
61
- }
62
- }
@@ -1,12 +0,0 @@
1
- <div class="cards-content">
2
- <ng-container *ngFor="let content of cardContents">
3
- <div class="card {{content.name}}">
4
- <app-content-design
5
- [content] = "content">
6
- </app-content-design>
7
- </div>
8
- </ng-container>
9
- </div>
10
-
11
-
12
-
@@ -1,14 +0,0 @@
1
- .cards-content {
2
- display: flex;
3
- flex-direction: row;
4
- }
5
-
6
- .content {
7
- width: 33%;
8
- }
9
-
10
- .card {
11
- ::ng-deep .content {
12
- padding: 0 20px;
13
- }
14
- }
@@ -1,19 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { IContentDesign } from '../../../shared/interfaces/interface';
3
- import { ContentDesignComponent } from 'angular-dumb-lib';
4
- import { CommonModule } from '@angular/common';
5
-
6
- @Component({
7
- selector: 'app-cards',
8
- standalone: true,
9
- templateUrl: './cards.component.html',
10
- styleUrls: ['./cards.component.scss'],
11
- imports: [CommonModule, ContentDesignComponent]
12
- })
13
- export class CardsComponent implements OnInit {
14
- @Input() cardContents: IContentDesign[] = [];
15
- constructor() { }
16
-
17
- ngOnInit() {
18
- }
19
- }
@@ -1,14 +0,0 @@
1
- <div class="content-designer" [ngClass]="content.contentDirection">
2
- <div *ngIf="content.coverImage" class="image">
3
- <img [src]="content.coverImage" alt="Cover Image">
4
- </div>
5
-
6
- <div class="content">
7
- <h2>{{ content.title }}</h2>
8
- <p>{{ content.content }}</p>
9
- <ng-container [ngTemplateOutlet]="content.template"></ng-container>
10
- <app-button *ngIf="content.button" [config] = "content.button"
11
- (clickEvent)="onButtonClick()">
12
- </app-button>
13
- </div>
14
- </div>