@brickclay-org/ui 0.0.9 → 0.0.13
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 +1 -1
- package/package.json +16 -15
- package/ng-package.json +0 -8
- package/src/lib/assets/icons.ts +0 -8
- package/src/lib/brickclay-lib.spec.ts +0 -23
- package/src/lib/brickclay-lib.ts +0 -15
- package/src/lib/calender/calendar.module.ts +0 -35
- package/src/lib/calender/components/custom-calendar/custom-calendar.component.css +0 -698
- package/src/lib/calender/components/custom-calendar/custom-calendar.component.html +0 -230
- package/src/lib/calender/components/custom-calendar/custom-calendar.component.spec.ts +0 -23
- package/src/lib/calender/components/custom-calendar/custom-calendar.component.ts +0 -1534
- package/src/lib/calender/components/scheduled-date-picker/scheduled-date-picker.component.css +0 -373
- package/src/lib/calender/components/scheduled-date-picker/scheduled-date-picker.component.html +0 -210
- package/src/lib/calender/components/scheduled-date-picker/scheduled-date-picker.component.ts +0 -360
- package/src/lib/calender/components/time-picker/time-picker.component.css +0 -174
- package/src/lib/calender/components/time-picker/time-picker.component.html +0 -60
- package/src/lib/calender/components/time-picker/time-picker.component.ts +0 -283
- package/src/lib/calender/services/calendar-manager.service.ts +0 -45
- package/src/lib/checkbox/checkbox.css +0 -26
- package/src/lib/checkbox/checkbox.html +0 -42
- package/src/lib/checkbox/checkbox.ts +0 -67
- package/src/lib/radio/radio.css +0 -39
- package/src/lib/radio/radio.html +0 -58
- package/src/lib/radio/radio.ts +0 -77
- package/src/lib/toggle/components/toggle.component.css +0 -74
- package/src/lib/toggle/components/toggle.component.html +0 -24
- package/src/lib/toggle/components/toggle.component.ts +0 -62
- package/src/public-api.ts +0 -20
- package/tsconfig.lib.json +0 -19
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
<div class="calendar-container relative" [class.open]="show" [class.inline-mode]="inline">
|
|
2
|
-
<!-- Input field -->
|
|
3
|
-
<div class="input-wrapper" *ngIf="!inline">
|
|
4
|
-
<input
|
|
5
|
-
type="text"
|
|
6
|
-
(click)="toggle()"
|
|
7
|
-
readonly
|
|
8
|
-
[value]="getDisplayValue()"
|
|
9
|
-
[placeholder]="placeholder"
|
|
10
|
-
class="calendar-input">
|
|
11
|
-
<!-- *ngIf="!getDisplayValue()" -->
|
|
12
|
-
|
|
13
|
-
<span class="calendar-icon" >
|
|
14
|
-
<img alt="calendar" class="calendar-icon-img" [src]='brickclayIcons.calenderIcon'/>
|
|
15
|
-
</span>
|
|
16
|
-
<button class="clear-btn" *ngIf="getDisplayValue() && isDisplayCrossIcon" (click)="clear(); $event.stopPropagation()" title="Clear">×</button>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<!-- Calendar Popup / Inline -->
|
|
20
|
-
<div class="calendar-popup"
|
|
21
|
-
[class.inline-calendar]="inline"
|
|
22
|
-
[ngClass]="{
|
|
23
|
-
'position-right': !inline && opens === 'right',
|
|
24
|
-
'position-center': !inline && opens === 'center',
|
|
25
|
-
'drop-up': !inline && drop === 'up',
|
|
26
|
-
'has-ranges': showRanges && customRanges,
|
|
27
|
-
'dual-calendar-mode': dualCalendar
|
|
28
|
-
}"
|
|
29
|
-
*ngIf="inline || show">
|
|
30
|
-
|
|
31
|
-
<!-- RANGES -->
|
|
32
|
-
<div class="ranges" *ngIf="showRanges && customRanges">
|
|
33
|
-
<button
|
|
34
|
-
*ngFor="let rangeKey of rangeOrder"
|
|
35
|
-
(click)="chooseRange(rangeKey)"
|
|
36
|
-
[class.active]="activeRange === rangeKey"
|
|
37
|
-
[class.custom-range]="rangeKey === 'Custom Range'"
|
|
38
|
-
class="range-btn"
|
|
39
|
-
[disabled]="rangeKey === 'Custom Range'">
|
|
40
|
-
{{ rangeKey }}
|
|
41
|
-
</button>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="" [ngClass]="showRanges ? 'w-100 flex-grow-1' : ''">
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<!-- SINGLE CALENDAR -->
|
|
47
|
-
<div *ngIf="!dualCalendar" class="calendar-wrapper">
|
|
48
|
-
<div class="header">
|
|
49
|
-
<!-- <button (click)="prevMonth()" class="nav-btn" type="button">
|
|
50
|
-
<img src="assets/calender/pagination-left-gray.svg" alt="arrow-left" class="arrow-left">
|
|
51
|
-
</button> -->
|
|
52
|
-
<button class="nav-btn" type="button" (click)="prevMonth()" matTooltip="Prev month"
|
|
53
|
-
>
|
|
54
|
-
<img alt="prev" class="h-3 w-3" [src]="brickclayIcons.arrowleft"/>
|
|
55
|
-
</button>
|
|
56
|
-
<span class="month-year">{{ getMonthName(month) }} {{ year }}</span>
|
|
57
|
-
<!-- <button (click)="nextMonth()" class="nav-btn" type="button">
|
|
58
|
-
<img src="assets/calender/pagination-right-gray.svg" alt="arrow-right" class="arrow-right">
|
|
59
|
-
</button> -->
|
|
60
|
-
<button class="nav-btn" type="button" (click)="nextMonth()" matTooltip="Next month"
|
|
61
|
-
>
|
|
62
|
-
<img alt="next" class="h-3 w-3" [src]='brickclayIcons.arrowRight'/>
|
|
63
|
-
<!--<img src="assets/calender/pagination-right-gray.svg" alt="next" class="h-3 w-3" /> -->
|
|
64
|
-
</button>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<table class="calendar-table">
|
|
68
|
-
<thead>
|
|
69
|
-
<tr>
|
|
70
|
-
<th *ngFor="let d of ['Mo','Tu','We','Th','Fr','Sa','Su']" class="weekday-header">{{ d }}</th>
|
|
71
|
-
</tr>
|
|
72
|
-
</thead>
|
|
73
|
-
<tbody>
|
|
74
|
-
<tr *ngFor="let week of calendar">
|
|
75
|
-
<td
|
|
76
|
-
*ngFor="let dayObj of week"
|
|
77
|
-
(click)="dayObj.currentMonth && !isDateDisabled(year, month, dayObj.day) && selectDate(dayObj.day)"
|
|
78
|
-
(mouseenter)="dayObj.currentMonth && !isDateDisabled(year, month, dayObj.day) && onDateHover(dayObj.day, false)"
|
|
79
|
-
(mouseleave)="onDateLeave()"
|
|
80
|
-
[class.active]="dayObj.currentMonth && isDateSelected(year, month, dayObj.day)"
|
|
81
|
-
[class.in-range]="dayObj.currentMonth && isDateInRange(year, month, dayObj.day)"
|
|
82
|
-
[class.other-month]="!dayObj.currentMonth"
|
|
83
|
-
[class.disabled]="isDateDisabled(year, month, dayObj.day)"
|
|
84
|
-
[class.multi-selected]="multiDateSelection && isDateInMultiSelection(year, month, dayObj.day)"
|
|
85
|
-
[class.today]="dayObj.currentMonth && isToday(year, month, dayObj.day)"
|
|
86
|
-
class="calendar-day">
|
|
87
|
-
{{ dayObj.day }}
|
|
88
|
-
</td>
|
|
89
|
-
</tr>
|
|
90
|
-
</tbody>
|
|
91
|
-
</table>
|
|
92
|
-
|
|
93
|
-
<!-- Single Calendar Time Picker -->
|
|
94
|
-
<div *ngIf="enableTimepicker" class="timepicker-section">
|
|
95
|
-
<div class="timepicker-label">Time</div>
|
|
96
|
-
<div class="timepicker-controls">
|
|
97
|
-
<brickclay-time-picker
|
|
98
|
-
pickerId="single-time"
|
|
99
|
-
[label]="''"
|
|
100
|
-
[value]="getSingleTimePickerDisplay()"
|
|
101
|
-
[closePicker]="shouldClosePicker('single-time')"
|
|
102
|
-
(timeChange)="onSingleTimePickerChange($event)"
|
|
103
|
-
(pickerOpened)="onTimePickerOpened($event)"
|
|
104
|
-
(pickerClosed)="onTimePickerClosed($event)">
|
|
105
|
-
</brickclay-time-picker>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
|
|
110
|
-
<!-- DUAL CALENDAR -->
|
|
111
|
-
<div class="dual-calendar" *ngIf="dualCalendar">
|
|
112
|
-
<!-- LEFT CALENDAR -->
|
|
113
|
-
<div class="calendar-left">
|
|
114
|
-
<div class="header">
|
|
115
|
-
<button (click)="prevLeftMonth()" class="nav-btn" type="button">
|
|
116
|
-
<img alt="arrow-left" class="arrow-left" [src]="brickclayIcons.arrowleft"/>
|
|
117
|
-
</button>
|
|
118
|
-
<span class="month-year">{{ getMonthName(leftMonth) }} {{ leftYear }}</span>
|
|
119
|
-
<button (click)="nextLeftMonth()" class="nav-btn" type="button">
|
|
120
|
-
<img alt="arrow-right" class="arrow-right" [src]='brickclayIcons.arrowRight'/>
|
|
121
|
-
</button>
|
|
122
|
-
</div>
|
|
123
|
-
<table class="calendar-table">
|
|
124
|
-
<thead>
|
|
125
|
-
<tr>
|
|
126
|
-
<th *ngFor="let d of ['Mo','Tu','We','Th','Fr','Sa','Su']" class="weekday-header">{{ d }}</th>
|
|
127
|
-
</tr>
|
|
128
|
-
</thead>
|
|
129
|
-
<tbody>
|
|
130
|
-
<tr *ngFor="let week of leftCalendar">
|
|
131
|
-
<td
|
|
132
|
-
*ngFor="let dayObj of week"
|
|
133
|
-
(click)="dayObj.currentMonth && !isDateDisabled(leftYear, leftMonth, dayObj.day) && selectDate(dayObj.day, false)"
|
|
134
|
-
(mouseenter)="dayObj.currentMonth && !isDateDisabled(leftYear, leftMonth, dayObj.day) && onDateHover(dayObj.day, false)"
|
|
135
|
-
(mouseleave)="onDateLeave()"
|
|
136
|
-
[class.active]="dayObj.currentMonth && isDateSelected(leftYear, leftMonth, dayObj.day)"
|
|
137
|
-
[class.in-range]="dayObj.currentMonth && isDateInRange(leftYear, leftMonth, dayObj.day)"
|
|
138
|
-
[class.other-month]="!dayObj.currentMonth"
|
|
139
|
-
[class.disabled]="isDateDisabled(leftYear, leftMonth, dayObj.day)"
|
|
140
|
-
[class.multi-selected]="multiDateSelection && isDateInMultiSelection(leftYear, leftMonth, dayObj.day)"
|
|
141
|
-
[class.today]="dayObj.currentMonth && isToday(leftYear, leftMonth, dayObj.day)"
|
|
142
|
-
class="calendar-day">
|
|
143
|
-
{{ dayObj.day }}
|
|
144
|
-
</td>
|
|
145
|
-
</tr>
|
|
146
|
-
</tbody>
|
|
147
|
-
</table>
|
|
148
|
-
|
|
149
|
-
<!-- Start Time Picker for Dual Calendar -->
|
|
150
|
-
<div *ngIf="enableTimepicker" class="timepicker-section">
|
|
151
|
-
<div class="timepicker-label">Start Time</div>
|
|
152
|
-
<div class="timepicker-controls">
|
|
153
|
-
<brickclay-time-picker
|
|
154
|
-
pickerId="dual-start"
|
|
155
|
-
[label]="''"
|
|
156
|
-
[value]="getDualTimePickerDisplay(true)"
|
|
157
|
-
[closePicker]="shouldClosePicker('dual-start')"
|
|
158
|
-
(timeChange)="onDualTimePickerChange($event, true)"
|
|
159
|
-
(pickerOpened)="onTimePickerOpened($event)"
|
|
160
|
-
(pickerClosed)="onTimePickerClosed($event)">
|
|
161
|
-
</brickclay-time-picker>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
|
|
166
|
-
<!-- RIGHT CALENDAR -->
|
|
167
|
-
<div class="calendar-right">
|
|
168
|
-
<div class="header">
|
|
169
|
-
<button (click)="prevRightMonth()" class="nav-btn" type="button">
|
|
170
|
-
<img alt="arrow-left" class="arrow-left" [src]="brickclayIcons.arrowleft"/>
|
|
171
|
-
</button>
|
|
172
|
-
<span class="month-year">{{ getMonthName(rightMonth) }} {{ rightYear }}</span>
|
|
173
|
-
<button (click)="nextRightMonth()" class="nav-btn" type="button">
|
|
174
|
-
<img alt="arrow-right" class="arrow-right" [src]='brickclayIcons.arrowRight'/>
|
|
175
|
-
</button>
|
|
176
|
-
</div>
|
|
177
|
-
<table class="calendar-table">
|
|
178
|
-
<thead>
|
|
179
|
-
<tr>
|
|
180
|
-
<th *ngFor="let d of ['Mo','Tu','We','Th','Fr','Sa','Su']" class="weekday-header">{{ d }}</th>
|
|
181
|
-
</tr>
|
|
182
|
-
</thead>
|
|
183
|
-
<tbody>
|
|
184
|
-
<tr *ngFor="let week of rightCalendar">
|
|
185
|
-
<td
|
|
186
|
-
*ngFor="let dayObj of week"
|
|
187
|
-
(click)="dayObj.currentMonth && !isDateDisabled(rightYear, rightMonth, dayObj.day) && selectDate(dayObj.day, true)"
|
|
188
|
-
(mouseenter)="dayObj.currentMonth && !isDateDisabled(rightYear, rightMonth, dayObj.day) && onDateHover(dayObj.day, true)"
|
|
189
|
-
(mouseleave)="onDateLeave()"
|
|
190
|
-
[class.active]="dayObj.currentMonth && isDateSelected(rightYear, rightMonth, dayObj.day)"
|
|
191
|
-
[class.in-range]="dayObj.currentMonth && isDateInRange(rightYear, rightMonth, dayObj.day)"
|
|
192
|
-
[class.other-month]="!dayObj.currentMonth"
|
|
193
|
-
[class.disabled]="isDateDisabled(rightYear, rightMonth, dayObj.day)"
|
|
194
|
-
[class.multi-selected]="multiDateSelection && isDateInMultiSelection(rightYear, rightMonth, dayObj.day)"
|
|
195
|
-
[class.today]="dayObj.currentMonth && isToday(rightYear, rightMonth, dayObj.day)"
|
|
196
|
-
class="calendar-day">
|
|
197
|
-
{{ dayObj.day }}
|
|
198
|
-
</td>
|
|
199
|
-
</tr>
|
|
200
|
-
</tbody>
|
|
201
|
-
</table>
|
|
202
|
-
|
|
203
|
-
<!-- End Time Picker for Dual Calendar -->
|
|
204
|
-
<div *ngIf="enableTimepicker" class="timepicker-section">
|
|
205
|
-
<div class="timepicker-label">End Time</div>
|
|
206
|
-
<div class="timepicker-controls">
|
|
207
|
-
<brickclay-time-picker
|
|
208
|
-
pickerId="dual-end"
|
|
209
|
-
[label]="''"
|
|
210
|
-
[value]="getDualTimePickerDisplay(false)"
|
|
211
|
-
[closePicker]="shouldClosePicker('dual-end')"
|
|
212
|
-
(timeChange)="onDualTimePickerChange($event, false)"
|
|
213
|
-
(pickerOpened)="onTimePickerOpened($event)"
|
|
214
|
-
(pickerClosed)="onTimePickerClosed($event)">
|
|
215
|
-
</brickclay-time-picker>
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
</div>
|
|
219
|
-
</div>
|
|
220
|
-
|
|
221
|
-
<!-- FOOTER -->
|
|
222
|
-
<div class="footer" *ngIf="!inline">
|
|
223
|
-
<button *ngIf="showCancel" (click)="cancel()" class="btn-cancel" type="button">Cancel</button>
|
|
224
|
-
<button (click)="apply()" class="btn-apply" type="button">Apply</button>
|
|
225
|
-
</div>
|
|
226
|
-
|
|
227
|
-
</div>
|
|
228
|
-
|
|
229
|
-
</div>
|
|
230
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { CustomCalendarComponent } from './custom-calendar.component';
|
|
4
|
-
|
|
5
|
-
describe('CustomCalendarComponent', () => {
|
|
6
|
-
let component: CustomCalendarComponent;
|
|
7
|
-
let fixture: ComponentFixture<CustomCalendarComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [CustomCalendarComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(CustomCalendarComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|