nexheal-lib 0.0.3 → 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 +19 -15
- package/fesm2022/nexheal-lib.mjs +2837 -0
- package/fesm2022/nexheal-lib.mjs.map +1 -0
- package/index.d.ts +498 -0
- package/package.json +23 -47
- package/.editorconfig +0 -17
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/tasks.json +0 -42
- package/angular.json +0 -36
- package/projects/nexheal-lib/README.md +0 -63
- package/projects/nexheal-lib/ng-package.json +0 -9
- package/projects/nexheal-lib/package.json +0 -12
- package/projects/nexheal-lib/src/directives/clickoutside.directive.ts +0 -34
- package/projects/nexheal-lib/src/lib/controls/autocomplete-control/autocomplete-control.component.html +0 -52
- package/projects/nexheal-lib/src/lib/controls/autocomplete-control/autocomplete-control.component.scss +0 -22
- package/projects/nexheal-lib/src/lib/controls/autocomplete-control/autocomplete-control.component.spec.ts +0 -22
- package/projects/nexheal-lib/src/lib/controls/autocomplete-control/autocomplete-control.component.ts +0 -367
- package/projects/nexheal-lib/src/lib/controls/calendar-control/calendar-control.component.html +0 -152
- package/projects/nexheal-lib/src/lib/controls/calendar-control/calendar-control.component.scss +0 -194
- package/projects/nexheal-lib/src/lib/controls/calendar-control/calendar-control.component.spec.ts +0 -22
- package/projects/nexheal-lib/src/lib/controls/calendar-control/calendar-control.component.ts +0 -759
- package/projects/nexheal-lib/src/lib/controls/checkbox-control/checkbox-control.component.html +0 -4
- package/projects/nexheal-lib/src/lib/controls/checkbox-control/checkbox-control.component.spec.ts +0 -22
- package/projects/nexheal-lib/src/lib/controls/checkbox-control/checkbox-control.component.ts +0 -94
- package/projects/nexheal-lib/src/lib/controls/input-control/input-control.component.html +0 -61
- package/projects/nexheal-lib/src/lib/controls/input-control/input-control.component.scss +0 -132
- package/projects/nexheal-lib/src/lib/controls/input-control/input-control.component.spec.ts +0 -22
- package/projects/nexheal-lib/src/lib/controls/input-control/input-control.component.ts +0 -202
- package/projects/nexheal-lib/src/lib/controls/multiselect-control/multiselect-control.component.html +0 -72
- package/projects/nexheal-lib/src/lib/controls/multiselect-control/multiselect-control.component.scss +0 -90
- package/projects/nexheal-lib/src/lib/controls/multiselect-control/multiselect-control.component.spec.ts +0 -22
- package/projects/nexheal-lib/src/lib/controls/multiselect-control/multiselect-control.component.ts +0 -482
- package/projects/nexheal-lib/src/lib/controls/select-control/select-control.component.html +0 -53
- package/projects/nexheal-lib/src/lib/controls/select-control/select-control.component.scss +0 -19
- package/projects/nexheal-lib/src/lib/controls/select-control/select-control.component.spec.ts +0 -22
- package/projects/nexheal-lib/src/lib/controls/select-control/select-control.component.ts +0 -375
- package/projects/nexheal-lib/src/lib/controls/switch-control/switch-control.component.html +0 -4
- package/projects/nexheal-lib/src/lib/controls/switch-control/switch-control.component.scss +0 -53
- package/projects/nexheal-lib/src/lib/controls/switch-control/switch-control.component.spec.ts +0 -22
- package/projects/nexheal-lib/src/lib/controls/switch-control/switch-control.component.ts +0 -93
- package/projects/nexheal-lib/src/lib/controls/text-editor/text-editor.component.html +0 -88
- package/projects/nexheal-lib/src/lib/controls/text-editor/text-editor.component.scss +0 -122
- package/projects/nexheal-lib/src/lib/controls/text-editor/text-editor.component.spec.ts +0 -22
- package/projects/nexheal-lib/src/lib/controls/text-editor/text-editor.component.ts +0 -314
- package/projects/nexheal-lib/src/lib/controls/textarea-control/textarea-control.component.html +0 -19
- package/projects/nexheal-lib/src/lib/controls/textarea-control/textarea-control.component.scss +0 -15
- package/projects/nexheal-lib/src/lib/controls/textarea-control/textarea-control.component.spec.ts +0 -22
- package/projects/nexheal-lib/src/lib/controls/textarea-control/textarea-control.component.ts +0 -83
- package/projects/nexheal-lib/src/public-api.ts +0 -13
- package/projects/nexheal-lib/tsconfig.lib.json +0 -18
- package/projects/nexheal-lib/tsconfig.lib.prod.json +0 -11
- package/projects/nexheal-lib/tsconfig.spec.json +0 -14
- package/tsconfig.json +0 -39
- /package/{projects/nexheal-lib/src → src}/styles/_formcontrols.scss +0 -0
- /package/{projects/nexheal-lib/src → src}/styles/nexheal.scss +0 -0
package/projects/nexheal-lib/src/lib/controls/calendar-control/calendar-control.component.html
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
<div class="form-group calendar" [ngClass]="customClass">
|
|
2
|
-
<label class="inp-label" [ngClass]="{'required' : required}" *ngIf="title">{{ title }}</label>
|
|
3
|
-
<div class="form-group calendar" #root (click)="openCalendar()" >
|
|
4
|
-
<input type="text" #inputEl [placeholder]="(inputPlaceholder && placeholder) ? placeholder : ''"
|
|
5
|
-
[formControl]="inputControl" class="form-control" [ngClass]="{ 'is-invalid': error }" (blur)="onBlur()"
|
|
6
|
-
(focus)="onFocus()" (click)="openCalendar(); $event.stopPropagation()" (keydown)="onInputKeydown($event)" />
|
|
7
|
-
|
|
8
|
-
<span class="focus-border" *ngIf="deFocus"></span>
|
|
9
|
-
<span class="calendar-icon">
|
|
10
|
-
<i class="he" [ngClass]="!timeOnly ? 'he-calendar-blank' : 'he-clock'"></i>
|
|
11
|
-
</span>
|
|
12
|
-
<label class="clear" *ngIf="!inputLoader && (selectedDate && !disabled) && clearVal" (click)="clearDate($event)">
|
|
13
|
-
<i class="he he-close"></i>
|
|
14
|
-
</label>
|
|
15
|
-
<label *ngIf="inputLoader" class="loader input-loader"></label>
|
|
16
|
-
<div *ngIf="error" class="val-msg">{{ errorMessage }}</div>
|
|
17
|
-
|
|
18
|
-
<div class="datepicker-group" #datePicker *ngIf="isOpen" (click)="$event.stopPropagation()">
|
|
19
|
-
|
|
20
|
-
<!-- time picker -->
|
|
21
|
-
<ng-container *ngIf="timeOnly">
|
|
22
|
-
<div class="time-picker">
|
|
23
|
-
<div class="time-select">
|
|
24
|
-
<button (click)="incrementHour()"><i class="he he-chevron-up"></i></button>
|
|
25
|
-
<ng-container *ngIf="hourFormat === '12'; else show24">
|
|
26
|
-
<div class="time-value">
|
|
27
|
-
{{ ((selectedHour % 12) || 12) | number:'2.0' }}
|
|
28
|
-
</div>
|
|
29
|
-
</ng-container>
|
|
30
|
-
<ng-template #show24>
|
|
31
|
-
<div class="time-value">
|
|
32
|
-
{{ selectedHour | number:'2.0' }}
|
|
33
|
-
</div>
|
|
34
|
-
</ng-template>
|
|
35
|
-
|
|
36
|
-
<button (click)="decrementHour()"><i class="he he-chevron-down"></i></button>
|
|
37
|
-
</div>
|
|
38
|
-
<span class="time-separator">:</span>
|
|
39
|
-
<div class="time-select">
|
|
40
|
-
<button (click)="incrementMinute()"><i class="he he-chevron-up"></i></button>
|
|
41
|
-
<div class="time-value">{{ selectedMinute | number:'2.0' }}</div>
|
|
42
|
-
<button (click)="decrementMinute()"><i class="he he-chevron-down"></i></button>
|
|
43
|
-
</div>
|
|
44
|
-
<div class="ampm-toggle" *ngIf="hourFormat === '12'">
|
|
45
|
-
<button type="button" [class.active]="meridian === 'AM'" (click)="setMeridian('AM')">AM</button>
|
|
46
|
-
<button type="button" [class.active]="meridian === 'PM'" (click)="setMeridian('PM')">PM</button>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</ng-container>
|
|
50
|
-
|
|
51
|
-
<!-- day view -->
|
|
52
|
-
<ng-container *ngIf="!timeOnly && currentView === 'day'">
|
|
53
|
-
<div class="header">
|
|
54
|
-
<button class="calendar-arrow" (click)="prevMonth()"><i class="he he-chevron-left"></i></button>
|
|
55
|
-
<div class="title" (click)="goToMonthView()">
|
|
56
|
-
<div>{{ displayMonthName }}</div>
|
|
57
|
-
<div>{{ displayYear }}</div>
|
|
58
|
-
</div>
|
|
59
|
-
<button class="calendar-arrow" (click)="nextMonth()"><i class="he he-chevron-right"></i></button>
|
|
60
|
-
</div>
|
|
61
|
-
<div class="week-header">
|
|
62
|
-
<div>Sun</div>
|
|
63
|
-
<div>Mon</div>
|
|
64
|
-
<div>Tue</div>
|
|
65
|
-
<div>Wed</div>
|
|
66
|
-
<div>Thu</div>
|
|
67
|
-
<div>Fri</div>
|
|
68
|
-
<div>Sat</div>
|
|
69
|
-
</div>
|
|
70
|
-
<div class="days-grid">
|
|
71
|
-
<div class="day-cell" *ngFor="let day of daysInMonth" (click)="selectDay(day)"
|
|
72
|
-
[class.disabled]="day !== null && dayClassMap[day].disabled"
|
|
73
|
-
[class.selected]="day !== null && dayClassMap[day].selected" [class.today]="
|
|
74
|
-
day !== null &&
|
|
75
|
-
displayYear === todayYear &&
|
|
76
|
-
displayMonth === todayMonth &&
|
|
77
|
-
day === todayDate
|
|
78
|
-
">
|
|
79
|
-
{{day ? day : ''}}
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
<ng-container *ngIf="showTime">
|
|
83
|
-
<div class="time-picker">
|
|
84
|
-
<div class="time-select">
|
|
85
|
-
<button type="button" (click)="incrementHour()">
|
|
86
|
-
<i class="he he-chevron-up"></i>
|
|
87
|
-
</button>
|
|
88
|
-
<ng-container *ngIf="hourFormat === '12'; else show24">
|
|
89
|
-
<div class="time-value">
|
|
90
|
-
{{
|
|
91
|
-
selectedHour % 12 === 0
|
|
92
|
-
? 12
|
|
93
|
-
: selectedHour % 12
|
|
94
|
-
| number:'2.0' }}
|
|
95
|
-
</div>
|
|
96
|
-
</ng-container>
|
|
97
|
-
<ng-template #show24>
|
|
98
|
-
<div class="time-value">{{ selectedHour | number:'2.0' }}</div>
|
|
99
|
-
</ng-template>
|
|
100
|
-
<button type="button" (click)="decrementHour()">
|
|
101
|
-
<i class="he he-chevron-down"></i>
|
|
102
|
-
</button>
|
|
103
|
-
</div>
|
|
104
|
-
<span class="time-separator">:</span>
|
|
105
|
-
<div class="time-select">
|
|
106
|
-
<button type="button" (click)="incrementMinute()">
|
|
107
|
-
<i class="he he-chevron-up"></i>
|
|
108
|
-
</button>
|
|
109
|
-
<div class="time-value">
|
|
110
|
-
{{ selectedMinute < 10 ? '0' +selectedMinute : selectedMinute }} </div>
|
|
111
|
-
<button type="button" (click)="decrementMinute()">
|
|
112
|
-
<i class="he he-chevron-down"></i>
|
|
113
|
-
</button>
|
|
114
|
-
</div>
|
|
115
|
-
<div class="ampm-toggle" *ngIf="hourFormat === '12'">
|
|
116
|
-
<button type="button" [class.active]="meridian === 'AM'" (click)="setMeridian('AM')">AM</button>
|
|
117
|
-
<button type="button" [class.active]="meridian === 'PM'" (click)="setMeridian('PM')">PM</button>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</ng-container>
|
|
121
|
-
</ng-container>
|
|
122
|
-
|
|
123
|
-
<!-- month view -->
|
|
124
|
-
<ng-container *ngIf="!timeOnly && currentView === 'month'">
|
|
125
|
-
<div class="header">
|
|
126
|
-
<button class="calendar-arrow" (click)="displayYear = displayYear - 1"><i
|
|
127
|
-
class="he he-chevron-left"></i></button>
|
|
128
|
-
<div class="title" (click)="goToYearRangeView()">{{ displayYear }}</div>
|
|
129
|
-
<button class="calendar-arrow" (click)="displayYear = displayYear + 1"><i
|
|
130
|
-
class="he he-chevron-right"></i></button>
|
|
131
|
-
</div>
|
|
132
|
-
<div class="month-grid">
|
|
133
|
-
<div class="month-cell" *ngFor="let m of months; index as i" (click)="selectMonth(i)">{{ m }}
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</ng-container>
|
|
137
|
-
|
|
138
|
-
<!-- year range view -->
|
|
139
|
-
<ng-container *ngIf="!timeOnly && currentView === 'yearRange'">
|
|
140
|
-
<div class="header">
|
|
141
|
-
<button class="calendar-arrow" (click)="prevYearRange()"><i class="he he-chevron-left"></i></button>
|
|
142
|
-
<div class="title">{{ yearRange[0] }} ~ {{ yearRange[yearRangeSize-1] }}</div>
|
|
143
|
-
<button class="calendar-arrow" (click)="nextYearRange()"><i class="he he-chevron-right"></i></button>
|
|
144
|
-
</div>
|
|
145
|
-
<div class="year-grid">
|
|
146
|
-
<div class="year-cell" *ngFor="let y of yearRange" (click)="selectYear(y)">{{ y }}</div>
|
|
147
|
-
</div>
|
|
148
|
-
</ng-container>
|
|
149
|
-
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
package/projects/nexheal-lib/src/lib/controls/calendar-control/calendar-control.component.scss
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
.form-group {
|
|
2
|
-
&.calendar {
|
|
3
|
-
position: relative;
|
|
4
|
-
.clear {
|
|
5
|
-
top: 9px;
|
|
6
|
-
right: 34px;
|
|
7
|
-
}
|
|
8
|
-
.datepicker-group {
|
|
9
|
-
left: 0;
|
|
10
|
-
width: 100%;
|
|
11
|
-
z-index: 1000;
|
|
12
|
-
z-index: 1000;
|
|
13
|
-
padding: 0.5rem;
|
|
14
|
-
color: #495057;
|
|
15
|
-
min-width: 240px;
|
|
16
|
-
border-radius: 3px;
|
|
17
|
-
background: #ffffff;
|
|
18
|
-
box-shadow:
|
|
19
|
-
0 2px 4px -1px #0003,
|
|
20
|
-
0 4px 5px #00000024,
|
|
21
|
-
0 1px 10px #0000001f;
|
|
22
|
-
|
|
23
|
-
.header {
|
|
24
|
-
display: flex;
|
|
25
|
-
font-weight: 600;
|
|
26
|
-
padding: 5px 5px;
|
|
27
|
-
align-items: center;
|
|
28
|
-
justify-content: space-between;
|
|
29
|
-
border-bottom: 1px solid #dee2e6;
|
|
30
|
-
|
|
31
|
-
.title {
|
|
32
|
-
gap: 8px;
|
|
33
|
-
display: flex;
|
|
34
|
-
font-size: 15px;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.calendar-arrow {
|
|
40
|
-
width: 28px;
|
|
41
|
-
height: 28px;
|
|
42
|
-
border: none;
|
|
43
|
-
line-height: 1;
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
background: none;
|
|
46
|
-
|
|
47
|
-
i {
|
|
48
|
-
font-size: 14px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&:hover {
|
|
52
|
-
background: #f0f0f0;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
.week-header {
|
|
57
|
-
display: grid;
|
|
58
|
-
padding: 8px 0;
|
|
59
|
-
font-size: 13px;
|
|
60
|
-
font-weight: 700;
|
|
61
|
-
text-align: center;
|
|
62
|
-
grid-template-columns: repeat(7, 1fr);
|
|
63
|
-
}
|
|
64
|
-
.days-grid,
|
|
65
|
-
.month-grid,
|
|
66
|
-
.year-grid {
|
|
67
|
-
gap: 3px;
|
|
68
|
-
padding: 5px;
|
|
69
|
-
display: grid;
|
|
70
|
-
grid-template-columns: repeat(7, 1fr);
|
|
71
|
-
|
|
72
|
-
.day-cell,
|
|
73
|
-
.month-cell,
|
|
74
|
-
.year-cell {
|
|
75
|
-
display: flex;
|
|
76
|
-
font-size: 14px;
|
|
77
|
-
cursor: pointer;
|
|
78
|
-
align-items: center;
|
|
79
|
-
justify-content: center;
|
|
80
|
-
|
|
81
|
-
&.today {
|
|
82
|
-
color: #37c0b3;
|
|
83
|
-
font-weight: bold;
|
|
84
|
-
border: 1px solid #37c0b3;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&.selected,
|
|
88
|
-
&:hover {
|
|
89
|
-
color: #ffffff;
|
|
90
|
-
background: #37c0b3;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&.disabled {
|
|
94
|
-
color: #e0e0e0;
|
|
95
|
-
background: none;
|
|
96
|
-
user-select: none;
|
|
97
|
-
cursor: not-allowed;
|
|
98
|
-
|
|
99
|
-
&.today {
|
|
100
|
-
color: #37c0b3;
|
|
101
|
-
|
|
102
|
-
&:hover {
|
|
103
|
-
color: #ffffff;
|
|
104
|
-
background: #37c0b3;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:hover {
|
|
109
|
-
color: #e0e0e0;
|
|
110
|
-
background: transparent;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.day-cell {
|
|
116
|
-
padding: 5px 2px;
|
|
117
|
-
border-radius: 50%;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.month-cell,
|
|
121
|
-
.year-cell {
|
|
122
|
-
padding: 8px 2px;
|
|
123
|
-
border-radius: 3px;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
.month-grid {
|
|
127
|
-
grid-template-columns: repeat(3, 1fr);
|
|
128
|
-
}
|
|
129
|
-
.year-grid {
|
|
130
|
-
grid-template-columns: repeat(4, 1fr);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.time-picker {
|
|
134
|
-
display: flex;
|
|
135
|
-
user-select: none;
|
|
136
|
-
align-items: center;
|
|
137
|
-
justify-content: center;
|
|
138
|
-
|
|
139
|
-
.ampm-toggle {
|
|
140
|
-
gap: 6px;
|
|
141
|
-
display: flex;
|
|
142
|
-
margin-left: 1rem;
|
|
143
|
-
flex-direction: column;
|
|
144
|
-
justify-content: center;
|
|
145
|
-
|
|
146
|
-
button {
|
|
147
|
-
cursor: pointer;
|
|
148
|
-
padding: 3px 8px;
|
|
149
|
-
font-size: 0.75rem;
|
|
150
|
-
background: #ffffff;
|
|
151
|
-
border: 1px solid #cccccc;
|
|
152
|
-
|
|
153
|
-
&.active {
|
|
154
|
-
color: #ffffff;
|
|
155
|
-
border-color: #37c0b3;
|
|
156
|
-
background-color: #37c0b3;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.time-select {
|
|
162
|
-
display: flex;
|
|
163
|
-
margin: 0 0.75rem;
|
|
164
|
-
align-items: center;
|
|
165
|
-
flex-direction: column;
|
|
166
|
-
|
|
167
|
-
button {
|
|
168
|
-
border: none;
|
|
169
|
-
cursor: pointer;
|
|
170
|
-
padding: 4px 8px;
|
|
171
|
-
background: transparent;
|
|
172
|
-
i {
|
|
173
|
-
font-size: 1rem;
|
|
174
|
-
}
|
|
175
|
-
&:hover {
|
|
176
|
-
background: #f0f0f0;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
.time-value {
|
|
180
|
-
width: 2rem;
|
|
181
|
-
font-size: 1rem;
|
|
182
|
-
text-align: center;
|
|
183
|
-
margin: 2px 3px 4px;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.time-separator {
|
|
188
|
-
line-height: 1;
|
|
189
|
-
font-size: 1rem;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
package/projects/nexheal-lib/src/lib/controls/calendar-control/calendar-control.component.spec.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { CalendarControl } from './calendar-control.component';
|
|
3
|
-
|
|
4
|
-
describe('CalendarControl', () => {
|
|
5
|
-
let component: CalendarControl;
|
|
6
|
-
let fixture: ComponentFixture<CalendarControl>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [CalendarControl]
|
|
11
|
-
})
|
|
12
|
-
.compileComponents();
|
|
13
|
-
|
|
14
|
-
fixture = TestBed.createComponent(CalendarControl);
|
|
15
|
-
component = fixture.componentInstance;
|
|
16
|
-
fixture.detectChanges();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('should create', () => {
|
|
20
|
-
expect(component).toBeTruthy();
|
|
21
|
-
});
|
|
22
|
-
});
|