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

PNPM instead of YARN #924

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
23 changes: 23 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2.1

jobs:
build:
docker:
- image: cimg/node:16.19.1
steps:
- checkout
- run:
name: Install pnpm
command: npm install -g pnpm
- run:
name: Install Dependencies with pnpm
command: pnpm install --production=false
- run:
name: Build the Package
command: pnpm run build

workflows:
version: 2
build_and_test:
jobs:
- build
38 changes: 38 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

function build {
rm -rf lib && ./node_modules/.bin/babel src --out-dir lib && ./node_modules/.bin/node-sass src/lib/Timeline.scss lib/Timeline.css && sed -i'.bak' 's/Timeline\\.scss/Timeline\\.css/g' lib/lib/Timeline.js && rm lib/lib/Timeline.js.bak
}

function commit_changes {
# Check if there are any changes to commit
if [[ -n $(git status -s) ]]; then
git add lib/*

# Commit changes with a default message
git commit -m "Build artifacts updated"
else
echo "No changes to commit."
fi
}

function main {
exit_status=0

current_branch=$(git branch --show-current)
if [ "$current_branch" = "main" ]; then
build || exit_status=$?

if [ $exit_status -eq 0 ]; then
commit_changes
fi

fi

if [ $exit_status -ne 0 ]; then
echo "Pre-push hook failed (build failed)."
exit $exit_status
fi
}

main "$@"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ bower_components
modules
build
gh-pages
/lib
package-lock.json
# vscode stuff
.vscode
Expand Down
107 changes: 107 additions & 0 deletions lib/Timeline.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
.react-calendar-timeline * {
box-sizing: border-box; }

.react-calendar-timeline .rct-outer {
display: block;
overflow: hidden;
white-space: nowrap; }

.react-calendar-timeline .rct-scroll {
display: inline-block;
white-space: normal;
vertical-align: top;
overflow-x: scroll;
overflow-y: hidden;
-ms-touch-action: none;
touch-action: none; }

.react-calendar-timeline .rct-item:hover {
z-index: 88; }

.react-calendar-timeline .rct-item .rct-item-content {
position: sticky;
position: -webkit-sticky;
left: 0px;
overflow: hidden;
display: inline-block;
border-radius: 2px;
padding: 0 6px;
height: 100%; }

.react-calendar-timeline .rct-sidebar {
overflow: hidden;
white-space: normal;
display: inline-block;
vertical-align: top;
position: relative;
box-sizing: border-box;
border-right: 1px solid #bbb; }
.react-calendar-timeline .rct-sidebar.rct-sidebar-right {
border-right: 0;
border-left: 1px solid #bbb; }
.react-calendar-timeline .rct-sidebar .rct-sidebar-row {
padding: 0 4px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
box-sizing: border-box;
margin: 0;
border-bottom: 1px solid #bbb; }
.react-calendar-timeline .rct-sidebar .rct-sidebar-row.rct-sidebar-row-odd {
background: rgba(0, 0, 0, 0.05); }
.react-calendar-timeline .rct-sidebar .rct-sidebar-row.rct-sidebar-row-even {
background: transparent; }

.react-calendar-timeline .rct-vertical-lines .rct-vl {
position: absolute;
border-left: 1px solid #bbb;
z-index: 30; }
.react-calendar-timeline .rct-vertical-lines .rct-vl.rct-vl-first {
border-left-width: 2px; }
.react-calendar-timeline .rct-vertical-lines .rct-vl.rct-day-6, .react-calendar-timeline .rct-vertical-lines .rct-vl.rct-day-0 {
background: rgba(250, 246, 225, 0.5); }

.react-calendar-timeline .rct-horizontal-lines {
-webkit-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
user-select: none; }
.react-calendar-timeline .rct-horizontal-lines .rct-hl-even,
.react-calendar-timeline .rct-horizontal-lines .rct-hl-odd {
border-bottom: 1px solid #bbb;
box-sizing: border-box;
z-index: 40; }
.react-calendar-timeline .rct-horizontal-lines .rct-hl-odd {
background: rgba(0, 0, 0, 0.05); }
.react-calendar-timeline .rct-horizontal-lines .rct-hl-even {
background: transparent; }

.react-calendar-timeline .rct-cursor-line {
position: absolute;
width: 2px;
background: #2196f3;
z-index: 51; }

.react-calendar-timeline .rct-dateHeader {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
border-bottom: 1px solid #bbb;
cursor: pointer;
font-size: 14px;
background-color: #f0f0f0;
border-left: 2px solid #bbb; }

.react-calendar-timeline .rct-dateHeader-primary {
background-color: initial;
border-left: 1px solid #bbb;
border-right: 1px solid #bbb;
color: #fff; }

.react-calendar-timeline .rct-header-root {
background: #c52020;
border-bottom: 1px solid #bbb; }

.react-calendar-timeline .rct-calendar-header {
border: 1px solid #bbb; }
65 changes: 65 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "CursorMarker", {
enumerable: true,
get: function get() {
return _CursorMarker["default"];
}
});
Object.defineProperty(exports, "CustomHeader", {
enumerable: true,
get: function get() {
return _CustomHeader["default"];
}
});
Object.defineProperty(exports, "CustomMarker", {
enumerable: true,
get: function get() {
return _CustomMarker["default"];
}
});
Object.defineProperty(exports, "DateHeader", {
enumerable: true,
get: function get() {
return _DateHeader["default"];
}
});
Object.defineProperty(exports, "SidebarHeader", {
enumerable: true,
get: function get() {
return _SidebarHeader["default"];
}
});
Object.defineProperty(exports, "TimelineHeaders", {
enumerable: true,
get: function get() {
return _TimelineHeaders["default"];
}
});
Object.defineProperty(exports, "TimelineMarkers", {
enumerable: true,
get: function get() {
return _TimelineMarkers["default"];
}
});
Object.defineProperty(exports, "TodayMarker", {
enumerable: true,
get: function get() {
return _TodayMarker["default"];
}
});
exports["default"] = void 0;
var _Timeline = _interopRequireDefault(require("./lib/Timeline"));
var _TimelineMarkers = _interopRequireDefault(require("./lib/markers/public/TimelineMarkers"));
var _TodayMarker = _interopRequireDefault(require("./lib/markers/public/TodayMarker"));
var _CustomMarker = _interopRequireDefault(require("./lib/markers/public/CustomMarker"));
var _CursorMarker = _interopRequireDefault(require("./lib/markers/public/CursorMarker"));
var _TimelineHeaders = _interopRequireDefault(require("./lib/headers/TimelineHeaders"));
var _SidebarHeader = _interopRequireDefault(require("./lib/headers/SidebarHeader"));
var _CustomHeader = _interopRequireDefault(require("./lib/headers/CustomHeader"));
var _DateHeader = _interopRequireDefault(require("./lib/headers/DateHeader"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = exports["default"] = _Timeline["default"];
Loading