Skip to content
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

Props and named slots #14

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.DS_Store
node_modules/
/dist/

# local env files
.env.local
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# vue3-calendar-heatmap


![](https://user-images.githubusercontent.com/684302/142281760-eaeccf78-5cc8-450d-8407-6208aafb63a2.png)

[![npm](https://img.shields.io/npm/v/vue3-calendar-heatmap.svg?style=flat-square)](https://www.npmjs.com/package/vue3-calendar-heatmap)
Expand Down
1 change: 1 addition & 0 deletions decs.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module "@/components/*"
446 changes: 446 additions & 0 deletions dist/src/components/CalendarHeatmap.vue.d.ts

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions dist/src/components/Heatmap.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
export interface Value {
date: Date | string;
count: number;
}
export interface Activity {
count: number;
colorIndex: number;
}
export declare type Activities = Map<string, Activity>;
export interface CalendarItem {
date: Date;
count?: number;
colorIndex: number;
}
export declare type Calendar = CalendarItem[][];
export interface Month {
value: number;
index: number;
}
export interface Locale {
months: string[];
days: string[];
on: string;
less: string;
more: string;
}
export declare type TooltipFormatter = (item: CalendarItem, unit: string) => string;
export declare class Heatmap {
static readonly DEFAULT_RANGE_COLOR_LIGHT: string[];
static readonly DEFAULT_RANGE_COLOR_DARK: string[];
static readonly DEFAULT_LOCALE: Locale;
static readonly DEFAULT_TOOLTIP_UNIT = "contributions";
static readonly DAYS_IN_ONE_YEAR = 365;
static readonly DAYS_IN_WEEK = 7;
static readonly SQUARE_SIZE = 10;
startDate: Date;
endDate: Date;
max: number;
private _values;
private _firstFullWeekOfMonths?;
private _activities?;
private _calendar?;
constructor(endDate: Date | string, values: Value[], max?: number);
set values(v: Value[]);
get values(): Value[];
get activities(): Activities;
get weekCount(): number;
get calendar(): Calendar;
get firstFullWeekOfMonths(): Month[];
getColorIndex(count?: number): number;
getCountEmptyDaysAtStart(): number;
getCountEmptyDaysAtEnd(): number;
getDaysCount(): number;
private shiftDate;
private parseDate;
private keyDayParser;
}
8 changes: 8 additions & 0 deletions dist/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { App } from 'vue';
declare function install(Vue: App): void;
declare const _default: {
install: typeof install;
};
export default _default;
export * from './components/Heatmap';
export { default as CalendarHeatmap } from './components/CalendarHeatmap.vue';
1 change: 1 addition & 0 deletions dist/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading