-
Notifications
You must be signed in to change notification settings - Fork 1
[PER-10641] Create edtf date dropdown component #1047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aasandei-vsp
wants to merge
4
commits into
PER-10632-add-components-edtf
Choose a base branch
from
PER-10641-create-edtf-date-dropdpwn-component
base: PER-10632-add-components-edtf
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3db82a9
Create the edtf sidebar datepicker component
aasandei-vsp 6d22e8b
Added edtf-date flag to hide the edtf functionality until it is mature
aasandei-vsp 26a1fd2
Add support for unspecified digits
aasandei-vsp 9b1c23d
Format timezone offsets as +/-HH:MM in the sidebar date picker
aasandei-vsp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
src/app/file-browser/components/sidebar-date-picker/sidebar-date-picker.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| <div class="pr-sidebar-date-picker" #sidebarDatePickerContainer> | ||
| <div class="pr-sidebar-date-picker-header"> | ||
| <span class="pr-sidebar-date-picker-label">Date</span> | ||
| @if (activeQualifiers().length) { | ||
| <i class="material-icons pr-header-dot">fiber_manual_record</i> | ||
| <span class="pr-sidebar-date-picker-qualifiers"> | ||
| {{ activeQualifiers().join(', ') }}: | ||
| </span> | ||
| } | ||
| </div> | ||
|
|
||
| <div | ||
| class="pr-sidebar-date-picker-rows" | ||
| [class.can-edit]="!disabled" | ||
| (click)="toggle()" | ||
| > | ||
| <div class="pr-sidebar-date-picker-row"> | ||
| @if (hasEndDate()) { | ||
| <span class="pr-sidebar-date-picker-row-label">From</span> | ||
| } | ||
| @if (hasStartDate()) { | ||
| <span class="pr-sidebar-date-picker-row-value"> | ||
| <span class="pr-date-part" | ||
| >{{ formattedStartDate() }} | ||
| @if (formattedStartTime()) { | ||
| <i class="material-icons pr-dot">fiber_manual_record</i> | ||
| } | ||
| </span> | ||
| @if (formattedStartTime()) { | ||
| <span class="pr-time-group"> | ||
| <span class="pr-time-part">{{ formattedStartTime() }}</span> | ||
| <span class="pr-muted">{{ startMeridian() }}</span> | ||
| @if (startTimezone()) { | ||
| <span class="pr-muted">{{ startTimezone() }}</span> | ||
| } | ||
| </span> | ||
| } | ||
| </span> | ||
| } @else { | ||
| <span class="pr-sidebar-date-picker-row-placeholder"> | ||
| {{ disabled ? 'No date' : 'Click to add date' }} | ||
| </span> | ||
| } | ||
| @if (!disabled) { | ||
| <span class="pr-sidebar-date-picker-edit-icon"> | ||
| <i class="material-icons">edit</i> | ||
| </span> | ||
| } | ||
| </div> | ||
|
|
||
| @if (hasEndDate()) { | ||
| <div class="pr-sidebar-date-picker-row pr-sidebar-date-picker-to-row"> | ||
| <span class="pr-sidebar-date-picker-row-label">To</span> | ||
| <span class="pr-sidebar-date-picker-row-value"> | ||
| <span class="pr-date-part" | ||
| >{{ formattedEndDate() }} | ||
| @if (formattedEndTime()) { | ||
| <i class="material-icons pr-dot">fiber_manual_record</i> | ||
| } | ||
| </span> | ||
| @if (formattedEndTime()) { | ||
| <span class="pr-time-group"> | ||
| <span class="pr-time-part">{{ formattedEndTime() }}</span> | ||
| <span class="pr-muted">{{ endMeridian() }}</span> | ||
| @if (endTimezone()) { | ||
| <span class="pr-muted">{{ endTimezone() }}</span> | ||
| } | ||
| </span> | ||
| } | ||
| </span> | ||
| </div> | ||
| } | ||
| </div> | ||
|
|
||
| @if (isDropdownOpen()) { | ||
| <div class="pr-sidebar-date-picker-panel"> | ||
| <div class="pr-sidebar-date-picker-fields"> | ||
| <pr-datepicker-input | ||
| [date]="_date()" | ||
| (dateChange)="onDateChange($event)" | ||
| /> | ||
|
|
||
| <pr-timepicker-input | ||
| [time]="_time()" | ||
| (timeChange)="onTimeChange($event)" | ||
| /> | ||
|
|
||
| <button class="pr-clear-btn" (click)="clearAll()"> | ||
| <i class="material-icons">backspace</i> | ||
| <span>Clear date and time</span> | ||
| </button> | ||
| </div> | ||
|
|
||
| <div class="pr-sidebar-date-picker-footer"> | ||
| <button class="pr-more-options-btn" (click)="onMoreOptions()"> | ||
|
aasandei-vsp marked this conversation as resolved.
|
||
| <i class="material-icons">tune</i> | ||
| <span>More options</span> | ||
| </button> | ||
|
|
||
| <div class="pr-sidebar-date-picker-actions"> | ||
| <button class="pr-btn-cancel" (click)="onCancel()">Cancel</button> | ||
| <button class="pr-btn-save" (click)="onSave()"> | ||
|
aasandei-vsp marked this conversation as resolved.
|
||
| <i class="material-icons">keyboard_return</i> | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| } | ||
| </div> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.