-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update editor to be easier to manage
- Loading branch information
1 parent
273a827
commit 9532420
Showing
11 changed files
with
786 additions
and
129 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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 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 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 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 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 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,118 @@ | ||
import { LovelaceCardConfig } from 'custom-card-helpers'; | ||
|
||
export interface atomicCardConfig extends LovelaceCardConfig { | ||
entities?: any; | ||
type: string; | ||
name?: string; | ||
entity?: string; | ||
language?: string; | ||
daysToSort?: number; | ||
eventTitle?: string; | ||
|
||
// text translations | ||
fullDayEventText?: string; | ||
untilText?: string; | ||
|
||
maxDaysToShow?: number; | ||
maxEventCount?: number; | ||
showLoader?: boolean; | ||
showLocation?: boolean; | ||
showMonth?: boolean; | ||
showWeekDay?: boolean; | ||
fullTextTime?: boolean; | ||
showCurrentEventLine?: boolean; | ||
showDate?: boolean; | ||
dateFormat?: string; | ||
hoursFormat?: string; | ||
startDaysAhead?: number; | ||
showLastCalendarWeek?: boolean; | ||
showCalNameInEvent?: boolean; | ||
sortByStartTime?: boolean; | ||
disableEventLink?: boolean; | ||
disableLocationLink?: boolean; | ||
linkTarget: string; | ||
showDeclined?: boolean; | ||
softLimit?: number; | ||
showPrivate?: boolean; | ||
showHiddenText?: boolean; | ||
hiddenEventText?: string; | ||
refreshInterval: number; | ||
showDescription: boolean; | ||
showEventIcon: boolean; | ||
showEventDate: boolean; | ||
showDatePerEvent: boolean; | ||
|
||
// color and font settings | ||
nameColor?: string; | ||
dateColor?: string; | ||
dateSize?: number; | ||
descColor?: string; | ||
descSize?: number; | ||
titleLength?: number; | ||
descLength?: number; | ||
showNoEventsForToday?: boolean; | ||
showNoEventDays?: boolean; | ||
noEventText?: string; | ||
noEventsForNextDaysText?: string; | ||
timeColor?: string; | ||
timeSize?: number; | ||
showHours?: boolean; | ||
eventTitleColor?: string; | ||
eventTitleSize?: number; | ||
locationIconColor?: string; | ||
locationLinkColor?: string; | ||
locationTextSize?: number; | ||
|
||
// finished events settings | ||
hideFinishedEvents?: boolean; | ||
dimFinishedEvents?: boolean; | ||
finishedEventOpacity?: number; | ||
finishedEventFilter?: string; | ||
|
||
// days separating | ||
dayWrapperLineColor?: string; | ||
eventBarColor?: string; | ||
eventCalNameColor?: string; | ||
eventCalNameSize?: number; | ||
showProgressBar?: boolean; | ||
showFullDayProgress?: boolean; | ||
progressBarColor?: string; | ||
enableModeChange?: boolean; | ||
defaultMode: string; | ||
|
||
// Calendar Mode Default Settings | ||
calGridColor?: string; | ||
calDayColor?: string; | ||
calWeekDayColor?: string; | ||
calDateColor?: string; | ||
defaultCalColor?: string; | ||
calEventBackgroundColor?: string; | ||
calEventBackgroundFilter?: string; | ||
calActiveEventBackgroundColor?: string; | ||
calActiveEventBackgroundFilter?: string; | ||
calEventSatColor?: string; | ||
calEventSunColor?: string; | ||
calEventHolidayColor?: string; | ||
calEventHolidayFilter?: string; | ||
calEventIcon1?: string; | ||
calEventIcon1Color?: string; | ||
calEventIcon1Filter?: string; | ||
calEventIcon2?: string; | ||
calEventIcon2Color?: string; | ||
calEventIcon2Filter?: string; | ||
calEventIcon3?: string; | ||
calEventIcon3Color?: string; | ||
calEventIcon3Filter?: string; | ||
calEventTime?: boolean; | ||
firstDayOfWeek?: number; | ||
blacklist?: string; | ||
whitelist?: string; | ||
locationFilter?: string; | ||
disableCalLink?: boolean; | ||
removeDuplicates?: boolean; | ||
|
||
compactMode?: boolean; | ||
hoursOnSameLine?: boolean; | ||
showTimeRemaining?: boolean; | ||
showAllDayHours?: boolean; | ||
} |
This file contains 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,37 @@ | ||
export interface Option { | ||
name: string; | ||
icon: string; | ||
description: string; | ||
show: boolean; | ||
properties: UnionProperty[]; | ||
} | ||
|
||
export interface Property { | ||
type: string; | ||
section?: string; | ||
name: string; | ||
label: string; | ||
default?: string | boolean | number; | ||
} | ||
|
||
export interface DropdownProperty extends Property { | ||
type: 'dropdown'; | ||
items: string[]; | ||
selected: number; | ||
} | ||
|
||
export interface InputProperty extends Property { | ||
type: 'input'; | ||
} | ||
|
||
export interface NumberProperty extends Property { | ||
type: 'number'; | ||
min: number; | ||
max: number; | ||
} | ||
|
||
export interface SwitchProperty extends Property { | ||
type: 'switch'; | ||
} | ||
|
||
export type UnionProperty = DropdownProperty | InputProperty | NumberProperty | SwitchProperty; |
This file contains 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,9 @@ | ||
import { LovelaceCard, LovelaceCardEditor } from 'custom-card-helpers'; | ||
|
||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'atomic-calendar-card-editor': LovelaceCardEditor; | ||
'atomic-calendar-card': LovelaceCard; | ||
} | ||
} |