├── mix-manifest.json
├── webpack.mix.js
├── .gitignore
├── src
├── DateFilter.php
├── CustomFilter.php
└── FieldServiceProvider.php
├── resources
├── js
│ ├── index.js
│ └── components
│ │ ├── SelectFilter.vue
│ │ ├── FilterSelector.vue
│ │ └── DatePicker.vue
└── airbnb-modified.css
├── composer.json
├── package.json
├── README.md
└── dist
└── js
└── custom-filters.js
/mix-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "/dist/js/custom-filters.js": "/dist/js/custom-filters.js"
3 | }
--------------------------------------------------------------------------------
/webpack.mix.js:
--------------------------------------------------------------------------------
1 | let mix = require('laravel-mix');
2 |
3 | mix.js('resources/js', 'dist/js/custom-filters.js').webpackConfig({
4 | resolve: {
5 | symlinks: false
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.idea
2 | /vendor
3 | /node_modules
4 | package-lock.json
5 | composer.phar
6 | composer.lock
7 | phpunit.xml
8 | .phpunit.result.cache
9 | .DS_Store
10 | Thumbs.db
11 |
--------------------------------------------------------------------------------
/src/DateFilter.php:
--------------------------------------------------------------------------------
1 | {
6 | Vue.component('date-picker', DatePicker)
7 | Vue.component('filter-selector', FilterSelector)
8 | Vue.component('select-filter', SelectFilter)
9 | })
10 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "64robots/nova-date-filter",
3 | "description": "A Laravel Nova date filter.",
4 | "keywords": [
5 | "laravel",
6 | "nova",
7 | "date",
8 | "filter"
9 | ],
10 | "license": "MIT",
11 | "require": {
12 | "php": ">=7.1.0"
13 | },
14 | "autoload": {
15 | "psr-4": {
16 | "R64\\Filters\\": "src/"
17 | }
18 | },
19 | "extra": {
20 | "laravel": {
21 | "providers": [
22 | "R64\\Filters\\FieldServiceProvider"
23 | ]
24 | }
25 | },
26 | "config": {
27 | "sort-packages": true
28 | },
29 | "minimum-stability": "dev",
30 | "prefer-stable": true
31 | }
32 |
--------------------------------------------------------------------------------
/src/CustomFilter.php:
--------------------------------------------------------------------------------
1 | true,
18 | 'component' => $this->componentName(),
19 | ]);
20 | }
21 |
22 | /**
23 | * The name of the Vue component to be used for this filter
24 | *
25 | * @return string
26 | */
27 | protected abstract function componentName();
28 | }
29 |
--------------------------------------------------------------------------------
/src/FieldServiceProvider.php:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
38 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "cross-env": "^5.0.0",
14 | "flatpickr": "^4.5.2",
15 | "laravel-mix": "^1.0",
16 | "laravel-nova": "^1.0",
17 | "vue": "^2.5.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DEPRECATED
2 |
3 | Since Nova 1.1.8 this feature has been adopted to the core. You should upgrade Nova and use that filter instead.
4 |
5 | ## Date Filter for Laravel Nova
6 |
7 | Nova filter that displays a Date Picker instead of a select.
8 |
9 | ### Demo
10 |
11 | 
12 |
13 | ### Install
14 |
15 | Run this command in your nova project:
16 | `composer require 64robots/nova-date-filter`
17 |
18 | ### How to use
19 |
20 | Just use DateFilter class instead of Filter
21 |
22 | ```php
23 | use R64\Filters\DateFilter;
24 |
25 | class DateFrom extends DateFilter
26 | {
27 | //
28 | }
29 | ```
30 |
31 | ### Customization
32 |
33 | As Date Filter is not a select anymore we can use options method to pass the date picker config
34 |
35 | ```php
36 | use R64\Filters\DateFilter;
37 |
38 | class DateFrom extends DateFilter
39 | {
40 | //...
41 |
42 | public function options(Request $request)
43 | {
44 | return [
45 | 'dateFormat' => 'Y-m-d', // default Y-m-d H:i:S
46 | 'placeholder' => 'My placeholder', // default __('Pick a date')
47 | 'disabled' => true, // default false
48 | 'twelveHourTime' => true, // default false
49 | 'enableTime' => true, // default false
50 | 'enableSeconds' => true, // default false
51 | ];
52 | }
53 | }
54 | ```
55 |
--------------------------------------------------------------------------------
/resources/js/components/FilterSelector.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
11 | {{ filter.name }}
12 |
13 |
14 |
21 |
22 |
29 |
30 |
31 |
32 |
33 |
34 |
68 |
--------------------------------------------------------------------------------
/resources/js/components/DatePicker.vue:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
90 |
95 |
--------------------------------------------------------------------------------
/resources/airbnb-modified.css:
--------------------------------------------------------------------------------
1 | .date-filter .flatpickr-calendar {
2 | background: transparent;
3 | opacity: 0;
4 | display: none;
5 | text-align: center;
6 | visibility: hidden;
7 | padding: 0;
8 | -webkit-animation: none;
9 | animation: none;
10 | direction: ltr;
11 | border: 0;
12 | font-size: 14px;
13 | line-height: 24px;
14 | border-radius: 5px;
15 | position: absolute;
16 | width: 264px;
17 | -webkit-box-sizing: border-box;
18 | box-sizing: border-box;
19 | -ms-touch-action: manipulation;
20 | touch-action: manipulation;
21 | background: #fff;
22 | -webkit-box-shadow: 1px 0 0 #eee, -1px 0 0 #eee, 0 1px 0 #eee, 0 -1px 0 #eee,
23 | 0 3px 13px rgba(0, 0, 0, 0.08);
24 | box-shadow: 1px 0 0 #eee, -1px 0 0 #eee, 0 1px 0 #eee, 0 -1px 0 #eee,
25 | 0 3px 13px rgba(0, 0, 0, 0.08);
26 | }
27 | .date-filter .flatpickr-calendar.open,
28 | .date-filter .flatpickr-calendar.inline {
29 | opacity: 1;
30 | max-height: 640px;
31 | visibility: visible;
32 | }
33 | .date-filter .flatpickr-calendar.open {
34 | display: inline-block;
35 | z-index: 99999;
36 | }
37 | .date-filter .flatpickr-calendar.animate.open {
38 | -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
39 | animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
40 | }
41 | .date-filter .flatpickr-calendar.inline {
42 | display: block;
43 | position: relative;
44 | top: 2px;
45 | }
46 | .date-filter .flatpickr-calendar.static {
47 | position: absolute;
48 | top: calc(100% + 2px);
49 | }
50 | .date-filter .flatpickr-calendar.static.open {
51 | z-index: 999;
52 | display: block;
53 | }
54 | .date-filter
55 | .flatpickr-calendar.multiMonth
56 | .flatpickr-days
57 | .dayContainer:nth-child(n + 1)
58 | .flatpickr-day.inRange:nth-child(7n + 7) {
59 | -webkit-box-shadow: none !important;
60 | box-shadow: none !important;
61 | }
62 | .date-filter
63 | .flatpickr-calendar.multiMonth
64 | .flatpickr-days
65 | .dayContainer:nth-child(n + 2)
66 | .flatpickr-day.inRange:nth-child(7n + 1) {
67 | -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
68 | box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
69 | }
70 | .date-filter .flatpickr-calendar .hasWeeks .dayContainer,
71 | .date-filter .flatpickr-calendar .hasTime .dayContainer {
72 | border-bottom: 0;
73 | border-bottom-right-radius: 0;
74 | border-bottom-left-radius: 0;
75 | }
76 | .date-filter .flatpickr-calendar .hasWeeks .dayContainer {
77 | border-left: 0;
78 | }
79 | .date-filter .flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
80 | height: 40px;
81 | border-top: 1px solid #eee;
82 | }
83 | .date-filter .flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
84 | height: auto;
85 | }
86 | .date-filter .flatpickr-calendar:before,
87 | .date-filter .flatpickr-calendar:after {
88 | position: absolute;
89 | display: block;
90 | pointer-events: none;
91 | border: solid transparent;
92 | content: '';
93 | height: 0;
94 | width: 0;
95 | left: 22px;
96 | }
97 | .date-filter .flatpickr-calendar.rightMost:before,
98 | .date-filter .flatpickr-calendar.rightMost:after {
99 | left: auto;
100 | right: 22px;
101 | }
102 | .date-filter .flatpickr-calendar:before {
103 | border-width: 5px;
104 | margin: 0 -5px;
105 | }
106 | .date-filter .flatpickr-calendar:after {
107 | border-width: 4px;
108 | margin: 0 -4px;
109 | }
110 | .date-filter .flatpickr-calendar.arrowTop:before,
111 | .date-filter .flatpickr-calendar.arrowTop:after {
112 | bottom: 100%;
113 | }
114 | .date-filter .flatpickr-calendar.arrowTop:before {
115 | border-bottom-color: #eee;
116 | }
117 | .date-filter .flatpickr-calendar.arrowTop:after {
118 | border-bottom-color: #fff;
119 | }
120 | .date-filter .flatpickr-calendar.arrowBottom:before,
121 | .date-filter .flatpickr-calendar.arrowBottom:after {
122 | top: 100%;
123 | }
124 | .date-filter .flatpickr-calendar.arrowBottom:before {
125 | border-top-color: #eee;
126 | }
127 | .date-filter .flatpickr-calendar.arrowBottom:after {
128 | border-top-color: #fff;
129 | }
130 | .date-filter .flatpickr-calendar:focus {
131 | outline: 0;
132 | }
133 | .flatpickr-wrapper.date-filter {
134 | display: block;
135 | width: 100%;
136 | }
137 | .flatpickr-months {
138 | display: -webkit-box;
139 | display: -webkit-flex;
140 | display: -ms-flexbox;
141 | display: flex;
142 | }
143 | .flatpickr-months .flatpickr-month {
144 | background: transparent;
145 | color: #3c3f40;
146 | fill: #3c3f40;
147 | height: 28px;
148 | line-height: 1;
149 | text-align: center;
150 | position: relative;
151 | -webkit-user-select: none;
152 | -moz-user-select: none;
153 | -ms-user-select: none;
154 | user-select: none;
155 | overflow: hidden;
156 | -webkit-box-flex: 1;
157 | -webkit-flex: 1;
158 | -ms-flex: 1;
159 | flex: 1;
160 | }
161 | .flatpickr-months .flatpickr-prev-month,
162 | .flatpickr-months .flatpickr-next-month {
163 | text-decoration: none;
164 | cursor: pointer;
165 | position: absolute;
166 | top: 0px;
167 | line-height: 16px;
168 | height: 28px;
169 | padding: 10px;
170 | z-index: 3;
171 | color: #3c3f40;
172 | fill: #3c3f40;
173 | }
174 | .flatpickr-months .flatpickr-prev-month.disabled,
175 | .flatpickr-months .flatpickr-next-month.disabled {
176 | display: none;
177 | }
178 | .flatpickr-months .flatpickr-prev-month i,
179 | .flatpickr-months .flatpickr-next-month i {
180 | position: relative;
181 | }
182 | .flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
183 | .flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
184 | /*
185 | /*rtl:begin:ignore*/
186 | /*
187 | */
188 | left: 0;
189 | /*
190 | /*rtl:end:ignore*/
191 | /*
192 | */
193 | }
194 | /*
195 | /*rtl:begin:ignore*/
196 | /*
197 | /*rtl:end:ignore*/
198 | .flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
199 | .flatpickr-months .flatpickr-next-month.flatpickr-next-month {
200 | /*
201 | /*rtl:begin:ignore*/
202 | /*
203 | */
204 | right: 0;
205 | /*
206 | /*rtl:end:ignore*/
207 | /*
208 | */
209 | }
210 | /*
211 | /*rtl:begin:ignore*/
212 | /*
213 | /*rtl:end:ignore*/
214 | .flatpickr-months .flatpickr-prev-month:hover,
215 | .flatpickr-months .flatpickr-next-month:hover {
216 | color: #f64747;
217 | }
218 | .flatpickr-months .flatpickr-prev-month:hover svg,
219 | .flatpickr-months .flatpickr-next-month:hover svg {
220 | fill: #f64747;
221 | }
222 | .flatpickr-months .flatpickr-prev-month svg,
223 | .flatpickr-months .flatpickr-next-month svg {
224 | width: 14px;
225 | height: 14px;
226 | }
227 | .flatpickr-months .flatpickr-prev-month svg path,
228 | .flatpickr-months .flatpickr-next-month svg path {
229 | -webkit-transition: fill 0.1s;
230 | transition: fill 0.1s;
231 | fill: inherit;
232 | }
233 | .numInputWrapper {
234 | position: relative;
235 | height: auto;
236 | }
237 | .numInputWrapper input,
238 | .numInputWrapper span {
239 | display: inline-block;
240 | }
241 | .numInputWrapper input {
242 | width: 100%;
243 | }
244 | .numInputWrapper input::-ms-clear {
245 | display: none;
246 | }
247 | .numInputWrapper span {
248 | position: absolute;
249 | right: 0;
250 | width: 14px;
251 | padding: 0 4px 0 2px;
252 | height: 50%;
253 | line-height: 50%;
254 | opacity: 0;
255 | cursor: pointer;
256 | border: 1px solid rgba(64, 72, 72, 0.15);
257 | -webkit-box-sizing: border-box;
258 | box-sizing: border-box;
259 | }
260 | .numInputWrapper span:hover {
261 | background: rgba(0, 0, 0, 0.1);
262 | }
263 | .numInputWrapper span:active {
264 | background: rgba(0, 0, 0, 0.2);
265 | }
266 | .numInputWrapper span:after {
267 | display: block;
268 | content: '';
269 | position: absolute;
270 | }
271 | .numInputWrapper span.arrowUp {
272 | top: 0;
273 | border-bottom: 0;
274 | }
275 | .numInputWrapper span.arrowUp:after {
276 | border-left: 4px solid transparent;
277 | border-right: 4px solid transparent;
278 | border-bottom: 4px solid rgba(64, 72, 72, 0.6);
279 | top: 26%;
280 | }
281 | .numInputWrapper span.arrowDown {
282 | top: 50%;
283 | }
284 | .numInputWrapper span.arrowDown:after {
285 | border-left: 4px solid transparent;
286 | border-right: 4px solid transparent;
287 | border-top: 4px solid rgba(64, 72, 72, 0.6);
288 | top: 40%;
289 | }
290 | .numInputWrapper span svg {
291 | width: inherit;
292 | height: auto;
293 | }
294 | .numInputWrapper span svg path {
295 | fill: rgba(60, 63, 64, 0.5);
296 | }
297 | .numInputWrapper:hover {
298 | background: rgba(0, 0, 0, 0.05);
299 | }
300 | .numInputWrapper:hover span {
301 | opacity: 1;
302 | }
303 | .flatpickr-current-month {
304 | font-size: 135%;
305 | line-height: inherit;
306 | font-weight: 300;
307 | color: inherit;
308 | position: absolute;
309 | width: 75%;
310 | left: 12.5%;
311 | padding: 6.16px 0 0 0;
312 | line-height: 1;
313 | height: 28px;
314 | display: inline-block;
315 | text-align: center;
316 | -webkit-transform: translate3d(0px, 0px, 0px);
317 | transform: translate3d(0px, 0px, 0px);
318 | }
319 | .flatpickr-current-month span.cur-month {
320 | font-family: inherit;
321 | font-weight: 700;
322 | color: inherit;
323 | display: inline-block;
324 | margin-left: 0.5ch;
325 | padding: 0;
326 | }
327 | .flatpickr-current-month span.cur-month:hover {
328 | background: rgba(0, 0, 0, 0.05);
329 | }
330 | .flatpickr-current-month .numInputWrapper {
331 | width: 6ch;
332 | width: 7ch\0;
333 | display: inline-block;
334 | }
335 | .flatpickr-current-month .numInputWrapper span.arrowUp:after {
336 | border-bottom-color: #3c3f40;
337 | }
338 | .flatpickr-current-month .numInputWrapper span.arrowDown:after {
339 | border-top-color: #3c3f40;
340 | }
341 | .flatpickr-current-month input.cur-year {
342 | background: transparent;
343 | -webkit-box-sizing: border-box;
344 | box-sizing: border-box;
345 | color: inherit;
346 | cursor: text;
347 | padding: 0 0 0 0.5ch;
348 | margin: 0;
349 | display: inline-block;
350 | font-size: inherit;
351 | font-family: inherit;
352 | font-weight: 300;
353 | line-height: inherit;
354 | height: auto;
355 | border: 0;
356 | border-radius: 0;
357 | vertical-align: initial;
358 | }
359 | .flatpickr-current-month input.cur-year:focus {
360 | outline: 0;
361 | }
362 | .flatpickr-current-month input.cur-year[disabled],
363 | .flatpickr-current-month input.cur-year[disabled]:hover {
364 | font-size: 100%;
365 | color: rgba(60, 63, 64, 0.5);
366 | background: transparent;
367 | pointer-events: none;
368 | }
369 | .date-filter .flatpickr-weekdays {
370 | background: transparent;
371 | text-align: center;
372 | overflow: hidden;
373 | width: 100%;
374 | display: -webkit-box;
375 | display: -webkit-flex;
376 | display: -ms-flexbox;
377 | display: flex;
378 | -webkit-box-align: center;
379 | -webkit-align-items: center;
380 | -ms-flex-align: center;
381 | align-items: center;
382 | height: 28px;
383 | max-width: 250px;
384 | }
385 | .flatpickr-weekdays .flatpickr-weekdaycontainer {
386 | display: -webkit-box;
387 | display: -webkit-flex;
388 | display: -ms-flexbox;
389 | display: flex;
390 | -webkit-box-flex: 1;
391 | -webkit-flex: 1;
392 | -ms-flex: 1;
393 | flex: 1;
394 | }
395 | span.flatpickr-weekday {
396 | cursor: default;
397 | font-size: 90%;
398 | background: transparent;
399 | color: rgba(0, 0, 0, 0.54);
400 | line-height: 1;
401 | margin: 0;
402 | text-align: center;
403 | display: block;
404 | -webkit-box-flex: 1;
405 | -webkit-flex: 1;
406 | -ms-flex: 1;
407 | flex: 1;
408 | font-weight: bolder;
409 | }
410 | .dayContainer,
411 | .flatpickr-weeks {
412 | padding: 1px 0 0 0;
413 | }
414 | .date-filter .flatpickr-days {
415 | position: relative;
416 | overflow: hidden;
417 | display: -webkit-box;
418 | display: -webkit-flex;
419 | display: -ms-flexbox;
420 | display: flex;
421 | -webkit-box-align: start;
422 | -webkit-align-items: flex-start;
423 | -ms-flex-align: start;
424 | align-items: flex-start;
425 | width: 264px;
426 | }
427 | .flatpickr-days:focus {
428 | outline: 0;
429 | }
430 | .date-filter .dayContainer {
431 | padding: 0;
432 | outline: 0;
433 | text-align: left;
434 | width: 100%;
435 | min-width: 250px;
436 | max-width: 250px;
437 | -webkit-box-sizing: border-box;
438 | box-sizing: border-box;
439 | display: inline-block;
440 | display: -ms-flexbox;
441 | display: -webkit-box;
442 | display: -webkit-flex;
443 | display: flex;
444 | -webkit-flex-wrap: wrap;
445 | flex-wrap: wrap;
446 | -ms-flex-wrap: wrap;
447 | -ms-flex-pack: justify;
448 | -webkit-justify-content: space-around;
449 | justify-content: space-around;
450 | -webkit-transform: translate3d(0px, 0px, 0px);
451 | transform: translate3d(0px, 0px, 0px);
452 | opacity: 1;
453 | }
454 | .dayContainer + .dayContainer {
455 | -webkit-box-shadow: -1px 0 0 #eee;
456 | box-shadow: -1px 0 0 #eee;
457 | }
458 | .flatpickr-day {
459 | background: none;
460 | border: 1px solid transparent;
461 | border-radius: 150px;
462 | -webkit-box-sizing: border-box;
463 | box-sizing: border-box;
464 | color: #404848;
465 | cursor: pointer;
466 | font-weight: 400;
467 | width: 14.2857143%;
468 | -webkit-flex-basis: 14.2857143%;
469 | -ms-flex-preferred-size: 14.2857143%;
470 | flex-basis: 14.2857143%;
471 | max-width: 39px;
472 | height: 39px;
473 | line-height: 39px;
474 | margin: 0;
475 | display: inline-block;
476 | position: relative;
477 | -webkit-box-pack: center;
478 | -webkit-justify-content: center;
479 | -ms-flex-pack: center;
480 | justify-content: center;
481 | text-align: center;
482 | }
483 | .flatpickr-day.inRange,
484 | .flatpickr-day.prevMonthDay.inRange,
485 | .flatpickr-day.nextMonthDay.inRange,
486 | .flatpickr-day.today.inRange,
487 | .flatpickr-day.prevMonthDay.today.inRange,
488 | .flatpickr-day.nextMonthDay.today.inRange,
489 | .flatpickr-day:hover,
490 | .flatpickr-day.prevMonthDay:hover,
491 | .flatpickr-day.nextMonthDay:hover,
492 | .flatpickr-day:focus,
493 | .flatpickr-day.prevMonthDay:focus,
494 | .flatpickr-day.nextMonthDay:focus {
495 | cursor: pointer;
496 | outline: 0;
497 | background: #e9e9e9;
498 | border-color: #e9e9e9;
499 | }
500 | .flatpickr-day.today {
501 | border-color: #f64747;
502 | }
503 | .flatpickr-day.today:hover,
504 | .flatpickr-day.today:focus {
505 | border-color: #f64747;
506 | background: #f64747;
507 | color: #fff;
508 | }
509 | .flatpickr-day.selected,
510 | .flatpickr-day.startRange,
511 | .flatpickr-day.endRange,
512 | .flatpickr-day.selected.inRange,
513 | .flatpickr-day.startRange.inRange,
514 | .flatpickr-day.endRange.inRange,
515 | .flatpickr-day.selected:focus,
516 | .flatpickr-day.startRange:focus,
517 | .flatpickr-day.endRange:focus,
518 | .flatpickr-day.selected:hover,
519 | .flatpickr-day.startRange:hover,
520 | .flatpickr-day.endRange:hover,
521 | .flatpickr-day.selected.prevMonthDay,
522 | .flatpickr-day.startRange.prevMonthDay,
523 | .flatpickr-day.endRange.prevMonthDay,
524 | .flatpickr-day.selected.nextMonthDay,
525 | .flatpickr-day.startRange.nextMonthDay,
526 | .flatpickr-day.endRange.nextMonthDay {
527 | background: #4f99ff;
528 | -webkit-box-shadow: none;
529 | box-shadow: none;
530 | color: #fff;
531 | border-color: #4f99ff;
532 | }
533 | .flatpickr-day.selected.startRange,
534 | .flatpickr-day.startRange.startRange,
535 | .flatpickr-day.endRange.startRange {
536 | border-radius: 50px 0 0 50px;
537 | }
538 | .flatpickr-day.selected.endRange,
539 | .flatpickr-day.startRange.endRange,
540 | .flatpickr-day.endRange.endRange {
541 | border-radius: 0 50px 50px 0;
542 | }
543 | .flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n + 1)),
544 | .flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n + 1)),
545 | .flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n + 1)) {
546 | -webkit-box-shadow: -10px 0 0 #4f99ff;
547 | box-shadow: -10px 0 0 #4f99ff;
548 | }
549 | .flatpickr-day.selected.startRange.endRange,
550 | .flatpickr-day.startRange.startRange.endRange,
551 | .flatpickr-day.endRange.startRange.endRange {
552 | border-radius: 50px;
553 | }
554 | .flatpickr-day.inRange {
555 | border-radius: 0;
556 | -webkit-box-shadow: -5px 0 0 #e9e9e9, 5px 0 0 #e9e9e9;
557 | box-shadow: -5px 0 0 #e9e9e9, 5px 0 0 #e9e9e9;
558 | }
559 | .flatpickr-day.disabled,
560 | .flatpickr-day.disabled:hover,
561 | .flatpickr-day.prevMonthDay,
562 | .flatpickr-day.nextMonthDay,
563 | .flatpickr-day.notAllowed,
564 | .flatpickr-day.notAllowed.prevMonthDay,
565 | .flatpickr-day.notAllowed.nextMonthDay {
566 | color: rgba(64, 72, 72, 0.3);
567 | background: transparent;
568 | border-color: #e9e9e9;
569 | cursor: default;
570 | }
571 | .flatpickr-day.disabled,
572 | .flatpickr-day.disabled:hover {
573 | cursor: not-allowed;
574 | color: rgba(64, 72, 72, 0.1);
575 | }
576 | .flatpickr-day.week.selected {
577 | border-radius: 0;
578 | -webkit-box-shadow: -5px 0 0 #4f99ff, 5px 0 0 #4f99ff;
579 | box-shadow: -5px 0 0 #4f99ff, 5px 0 0 #4f99ff;
580 | }
581 | .flatpickr-day.hidden {
582 | visibility: hidden;
583 | }
584 | .rangeMode .flatpickr-day {
585 | margin-top: 1px;
586 | }
587 | .flatpickr-weekwrapper {
588 | display: inline-block;
589 | float: left;
590 | }
591 | .flatpickr-weekwrapper .flatpickr-weeks {
592 | padding: 0 12px;
593 | -webkit-box-shadow: 1px 0 0 #eee;
594 | box-shadow: 1px 0 0 #eee;
595 | }
596 | .flatpickr-weekwrapper .flatpickr-weekday {
597 | float: none;
598 | width: 100%;
599 | line-height: 28px;
600 | }
601 | .flatpickr-weekwrapper span.flatpickr-day,
602 | .flatpickr-weekwrapper span.flatpickr-day:hover {
603 | display: block;
604 | width: 100%;
605 | max-width: none;
606 | color: rgba(64, 72, 72, 0.3);
607 | background: transparent;
608 | cursor: default;
609 | border: none;
610 | }
611 | .flatpickr-innerContainer {
612 | display: block;
613 | display: -webkit-box;
614 | display: -webkit-flex;
615 | display: -ms-flexbox;
616 | display: flex;
617 | -webkit-box-sizing: border-box;
618 | box-sizing: border-box;
619 | overflow: hidden;
620 | }
621 | .flatpickr-rContainer {
622 | display: inline-block;
623 | padding: 0;
624 | -webkit-box-sizing: border-box;
625 | box-sizing: border-box;
626 | }
627 | .flatpickr-time {
628 | text-align: center;
629 | outline: 0;
630 | display: block;
631 | height: 0;
632 | line-height: 40px;
633 | max-height: 40px;
634 | -webkit-box-sizing: border-box;
635 | box-sizing: border-box;
636 | overflow: hidden;
637 | display: -webkit-box;
638 | display: -webkit-flex;
639 | display: -ms-flexbox;
640 | display: flex;
641 | }
642 | .flatpickr-time:after {
643 | content: '';
644 | display: table;
645 | clear: both;
646 | }
647 | .flatpickr-time .numInputWrapper {
648 | -webkit-box-flex: 1;
649 | -webkit-flex: 1;
650 | -ms-flex: 1;
651 | flex: 1;
652 | width: 40%;
653 | height: 40px;
654 | float: left;
655 | }
656 | .flatpickr-time .numInputWrapper span.arrowUp:after {
657 | border-bottom-color: #404848;
658 | }
659 | .flatpickr-time .numInputWrapper span.arrowDown:after {
660 | border-top-color: #404848;
661 | }
662 | .flatpickr-time.hasSeconds .numInputWrapper {
663 | width: 26%;
664 | }
665 | .flatpickr-time.time24hr .numInputWrapper {
666 | width: 49%;
667 | }
668 | .flatpickr-time input {
669 | background: transparent;
670 | -webkit-box-shadow: none;
671 | box-shadow: none;
672 | border: 0;
673 | border-radius: 0;
674 | text-align: center;
675 | margin: 0;
676 | padding: 0;
677 | height: inherit;
678 | line-height: inherit;
679 | color: #404848;
680 | font-size: 14px;
681 | position: relative;
682 | -webkit-box-sizing: border-box;
683 | box-sizing: border-box;
684 | }
685 | .flatpickr-time input.flatpickr-hour {
686 | font-weight: bold;
687 | }
688 | .flatpickr-time input.flatpickr-minute,
689 | .flatpickr-time input.flatpickr-second {
690 | font-weight: 400;
691 | }
692 | .flatpickr-time input:focus {
693 | outline: 0;
694 | border: 0;
695 | }
696 | .flatpickr-time .flatpickr-time-separator,
697 | .flatpickr-time .flatpickr-am-pm {
698 | height: inherit;
699 | display: inline-block;
700 | float: left;
701 | line-height: inherit;
702 | color: #404848;
703 | font-weight: bold;
704 | width: 2%;
705 | -webkit-user-select: none;
706 | -moz-user-select: none;
707 | -ms-user-select: none;
708 | user-select: none;
709 | -webkit-align-self: center;
710 | -ms-flex-item-align: center;
711 | align-self: center;
712 | }
713 | .flatpickr-time .flatpickr-am-pm {
714 | outline: 0;
715 | width: 18%;
716 | cursor: pointer;
717 | text-align: center;
718 | font-weight: 400;
719 | }
720 | .flatpickr-time input:hover,
721 | .flatpickr-time .flatpickr-am-pm:hover,
722 | .flatpickr-time input:focus,
723 | .flatpickr-time .flatpickr-am-pm:focus {
724 | background: #f6f6f6;
725 | }
726 | .date-filter .flatpickr-input {
727 | width: 100%;
728 | }
729 | .flatpickr-input[readonly] {
730 | cursor: pointer;
731 | }
732 | @-webkit-keyframes fpFadeInDown {
733 | from {
734 | opacity: 0;
735 | -webkit-transform: translate3d(0, -20px, 0);
736 | transform: translate3d(0, -20px, 0);
737 | }
738 | to {
739 | opacity: 1;
740 | -webkit-transform: translate3d(0, 0, 0);
741 | transform: translate3d(0, 0, 0);
742 | }
743 | }
744 | @keyframes fpFadeInDown {
745 | from {
746 | opacity: 0;
747 | -webkit-transform: translate3d(0, -20px, 0);
748 | transform: translate3d(0, -20px, 0);
749 | }
750 | to {
751 | opacity: 1;
752 | -webkit-transform: translate3d(0, 0, 0);
753 | transform: translate3d(0, 0, 0);
754 | }
755 | }
756 | .date-filter .flatpickr-calendar {
757 | width: 100%;
758 | max-width: 250px;
759 | }
760 | .dayContainer {
761 | padding: 0;
762 | border-right: 0;
763 | }
764 | span.flatpickr-day,
765 | span.flatpickr-day.prevMonthDay,
766 | span.flatpickr-day.nextMonthDay {
767 | border-radius: 0 !important;
768 | border: 1px solid #e9e9e9;
769 | max-width: none;
770 | border-right-color: transparent;
771 | }
772 | span.flatpickr-day:nth-child(n + 8),
773 | span.flatpickr-day.prevMonthDay:nth-child(n + 8),
774 | span.flatpickr-day.nextMonthDay:nth-child(n + 8) {
775 | border-top-color: transparent;
776 | }
777 | span.flatpickr-day:nth-child(7n-6),
778 | span.flatpickr-day.prevMonthDay:nth-child(7n-6),
779 | span.flatpickr-day.nextMonthDay:nth-child(7n-6) {
780 | border-left: 0;
781 | }
782 | span.flatpickr-day:nth-child(n + 36),
783 | span.flatpickr-day.prevMonthDay:nth-child(n + 36),
784 | span.flatpickr-day.nextMonthDay:nth-child(n + 36) {
785 | border-bottom: 0;
786 | }
787 | span.flatpickr-day:nth-child(-n + 7),
788 | span.flatpickr-day.prevMonthDay:nth-child(-n + 7),
789 | span.flatpickr-day.nextMonthDay:nth-child(-n + 7) {
790 | margin-top: 0;
791 | }
792 | span.flatpickr-day.today:not(.selected),
793 | span.flatpickr-day.prevMonthDay.today:not(.selected),
794 | span.flatpickr-day.nextMonthDay.today:not(.selected) {
795 | border-color: #e9e9e9;
796 | border-right-color: transparent;
797 | border-top-color: transparent;
798 | border-bottom-color: #f64747;
799 | }
800 | span.flatpickr-day.today:not(.selected):hover,
801 | span.flatpickr-day.prevMonthDay.today:not(.selected):hover,
802 | span.flatpickr-day.nextMonthDay.today:not(.selected):hover {
803 | border: 1px solid #f64747;
804 | }
805 | span.flatpickr-day.startRange,
806 | span.flatpickr-day.prevMonthDay.startRange,
807 | span.flatpickr-day.nextMonthDay.startRange,
808 | span.flatpickr-day.endRange,
809 | span.flatpickr-day.prevMonthDay.endRange,
810 | span.flatpickr-day.nextMonthDay.endRange {
811 | border-color: #4f99ff;
812 | }
813 | span.flatpickr-day.today,
814 | span.flatpickr-day.prevMonthDay.today,
815 | span.flatpickr-day.nextMonthDay.today,
816 | span.flatpickr-day.selected,
817 | span.flatpickr-day.prevMonthDay.selected,
818 | span.flatpickr-day.nextMonthDay.selected {
819 | z-index: 2;
820 | }
821 | .rangeMode .flatpickr-day {
822 | margin-top: -1px;
823 | }
824 | .flatpickr-weekwrapper .flatpickr-weeks {
825 | -webkit-box-shadow: none;
826 | box-shadow: none;
827 | }
828 | .flatpickr-weekwrapper span.flatpickr-day {
829 | border: 0;
830 | margin: -1px 0 0 -1px;
831 | }
832 | .hasWeeks .flatpickr-days {
833 | border-right: 0;
834 | }
835 |
--------------------------------------------------------------------------------
/dist/js/custom-filters.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 2);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ([
67 | /* 0 */
68 | /***/ (function(module, exports) {
69 |
70 | /* globals __VUE_SSR_CONTEXT__ */
71 |
72 | // IMPORTANT: Do NOT use ES2015 features in this file.
73 | // This module is a runtime utility for cleaner component module output and will
74 | // be included in the final webpack user bundle.
75 |
76 | module.exports = function normalizeComponent (
77 | rawScriptExports,
78 | compiledTemplate,
79 | functionalTemplate,
80 | injectStyles,
81 | scopeId,
82 | moduleIdentifier /* server only */
83 | ) {
84 | var esModule
85 | var scriptExports = rawScriptExports = rawScriptExports || {}
86 |
87 | // ES6 modules interop
88 | var type = typeof rawScriptExports.default
89 | if (type === 'object' || type === 'function') {
90 | esModule = rawScriptExports
91 | scriptExports = rawScriptExports.default
92 | }
93 |
94 | // Vue.extend constructor export interop
95 | var options = typeof scriptExports === 'function'
96 | ? scriptExports.options
97 | : scriptExports
98 |
99 | // render functions
100 | if (compiledTemplate) {
101 | options.render = compiledTemplate.render
102 | options.staticRenderFns = compiledTemplate.staticRenderFns
103 | options._compiled = true
104 | }
105 |
106 | // functional template
107 | if (functionalTemplate) {
108 | options.functional = true
109 | }
110 |
111 | // scopedId
112 | if (scopeId) {
113 | options._scopeId = scopeId
114 | }
115 |
116 | var hook
117 | if (moduleIdentifier) { // server build
118 | hook = function (context) {
119 | // 2.3 injection
120 | context =
121 | context || // cached call
122 | (this.$vnode && this.$vnode.ssrContext) || // stateful
123 | (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
124 | // 2.2 with runInNewContext: true
125 | if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
126 | context = __VUE_SSR_CONTEXT__
127 | }
128 | // inject component styles
129 | if (injectStyles) {
130 | injectStyles.call(this, context)
131 | }
132 | // register component module identifier for async chunk inferrence
133 | if (context && context._registeredComponents) {
134 | context._registeredComponents.add(moduleIdentifier)
135 | }
136 | }
137 | // used by ssr in case component is cached and beforeCreate
138 | // never gets called
139 | options._ssrRegister = hook
140 | } else if (injectStyles) {
141 | hook = injectStyles
142 | }
143 |
144 | if (hook) {
145 | var functional = options.functional
146 | var existing = functional
147 | ? options.render
148 | : options.beforeCreate
149 |
150 | if (!functional) {
151 | // inject component registration as beforeCreate hook
152 | options.beforeCreate = existing
153 | ? [].concat(existing, hook)
154 | : [hook]
155 | } else {
156 | // for template-only hot-reload because in that case the render fn doesn't
157 | // go through the normalizer
158 | options._injectStyles = hook
159 | // register for functioal component in vue file
160 | options.render = function renderWithStyleInjection (h, context) {
161 | hook.call(context)
162 | return existing(h, context)
163 | }
164 | }
165 | }
166 |
167 | return {
168 | esModule: esModule,
169 | exports: scriptExports,
170 | options: options
171 | }
172 | }
173 |
174 |
175 | /***/ }),
176 | /* 1 */
177 | /***/ (function(module, exports) {
178 |
179 | /*
180 | MIT License http://www.opensource.org/licenses/mit-license.php
181 | Author Tobias Koppers @sokra
182 | */
183 | // css base code, injected by the css-loader
184 | module.exports = function(useSourceMap) {
185 | var list = [];
186 |
187 | // return the list of modules as css string
188 | list.toString = function toString() {
189 | return this.map(function (item) {
190 | var content = cssWithMappingToString(item, useSourceMap);
191 | if(item[2]) {
192 | return "@media " + item[2] + "{" + content + "}";
193 | } else {
194 | return content;
195 | }
196 | }).join("");
197 | };
198 |
199 | // import a list of modules into the list
200 | list.i = function(modules, mediaQuery) {
201 | if(typeof modules === "string")
202 | modules = [[null, modules, ""]];
203 | var alreadyImportedModules = {};
204 | for(var i = 0; i < this.length; i++) {
205 | var id = this[i][0];
206 | if(typeof id === "number")
207 | alreadyImportedModules[id] = true;
208 | }
209 | for(i = 0; i < modules.length; i++) {
210 | var item = modules[i];
211 | // skip already imported module
212 | // this implementation is not 100% perfect for weird media query combinations
213 | // when a module is imported multiple times with different media queries.
214 | // I hope this will never occur (Hey this way we have smaller bundles)
215 | if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
216 | if(mediaQuery && !item[2]) {
217 | item[2] = mediaQuery;
218 | } else if(mediaQuery) {
219 | item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
220 | }
221 | list.push(item);
222 | }
223 | }
224 | };
225 | return list;
226 | };
227 |
228 | function cssWithMappingToString(item, useSourceMap) {
229 | var content = item[1] || '';
230 | var cssMapping = item[3];
231 | if (!cssMapping) {
232 | return content;
233 | }
234 |
235 | if (useSourceMap && typeof btoa === 'function') {
236 | var sourceMapping = toComment(cssMapping);
237 | var sourceURLs = cssMapping.sources.map(function (source) {
238 | return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
239 | });
240 |
241 | return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
242 | }
243 |
244 | return [content].join('\n');
245 | }
246 |
247 | // Adapted from convert-source-map (MIT)
248 | function toComment(sourceMap) {
249 | // eslint-disable-next-line no-undef
250 | var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
251 | var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
252 |
253 | return '/*# ' + data + ' */';
254 | }
255 |
256 |
257 | /***/ }),
258 | /* 2 */
259 | /***/ (function(module, exports, __webpack_require__) {
260 |
261 | module.exports = __webpack_require__(3);
262 |
263 |
264 | /***/ }),
265 | /* 3 */
266 | /***/ (function(module, __webpack_exports__, __webpack_require__) {
267 |
268 | "use strict";
269 | Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
270 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_DatePicker__ = __webpack_require__(4);
271 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_DatePicker___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__components_DatePicker__);
272 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_FilterSelector__ = __webpack_require__(16);
273 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_FilterSelector___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__components_FilterSelector__);
274 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_SelectFilter__ = __webpack_require__(19);
275 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_SelectFilter___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__components_SelectFilter__);
276 |
277 |
278 |
279 |
280 | Nova.booting(function (Vue, router) {
281 | Vue.component('date-picker', __WEBPACK_IMPORTED_MODULE_0__components_DatePicker___default.a);
282 | Vue.component('filter-selector', __WEBPACK_IMPORTED_MODULE_1__components_FilterSelector___default.a);
283 | Vue.component('select-filter', __WEBPACK_IMPORTED_MODULE_2__components_SelectFilter___default.a);
284 | });
285 |
286 | /***/ }),
287 | /* 4 */
288 | /***/ (function(module, exports, __webpack_require__) {
289 |
290 | var disposed = false
291 | function injectStyle (ssrContext) {
292 | if (disposed) return
293 | __webpack_require__(5)
294 | }
295 | var normalizeComponent = __webpack_require__(0)
296 | /* script */
297 | var __vue_script__ = __webpack_require__(9)
298 | /* template */
299 | var __vue_template__ = __webpack_require__(15)
300 | /* template functional */
301 | var __vue_template_functional__ = false
302 | /* styles */
303 | var __vue_styles__ = injectStyle
304 | /* scopeId */
305 | var __vue_scopeId__ = "data-v-fa816ef2"
306 | /* moduleIdentifier (server only) */
307 | var __vue_module_identifier__ = null
308 | var Component = normalizeComponent(
309 | __vue_script__,
310 | __vue_template__,
311 | __vue_template_functional__,
312 | __vue_styles__,
313 | __vue_scopeId__,
314 | __vue_module_identifier__
315 | )
316 | Component.options.__file = "resources/js/components/DatePicker.vue"
317 |
318 | /* hot reload */
319 | if (false) {(function () {
320 | var hotAPI = require("vue-hot-reload-api")
321 | hotAPI.install(require("vue"), false)
322 | if (!hotAPI.compatible) return
323 | module.hot.accept()
324 | if (!module.hot.data) {
325 | hotAPI.createRecord("data-v-fa816ef2", Component.options)
326 | } else {
327 | hotAPI.reload("data-v-fa816ef2", Component.options)
328 | }
329 | module.hot.dispose(function (data) {
330 | disposed = true
331 | })
332 | })()}
333 |
334 | module.exports = Component.exports
335 |
336 |
337 | /***/ }),
338 | /* 5 */
339 | /***/ (function(module, exports, __webpack_require__) {
340 |
341 | // style-loader: Adds some css to the DOM by adding a