@paperless/core 2.0.1-beta.180 → 2.0.1-beta.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/build/{p-1b6eccb9.js → p-0e8aa37d.js} +1 -1
- package/dist/build/p-8049ca0b.entry.js +2 -0
- package/dist/build/p-8049ca0b.entry.js.map +1 -0
- package/dist/build/p-a9f68a69.entry.js +2 -0
- package/dist/build/p-a9f68a69.entry.js.map +1 -0
- package/dist/build/p-calendar.entry.esm.js.map +1 -1
- package/dist/build/p-datepicker.entry.esm.js.map +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-calendar.cjs.entry.js +28 -11
- package/dist/cjs/p-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-calendar.entry.cjs.js.map +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +2 -2
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/p-datepicker.entry.cjs.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.css +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.js +28 -9
- package/dist/collection/components/molecules/calendar/calendar.component.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +2 -2
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -1
- package/dist/components/{p-D8EOYm4t.js → p-C4YSpiKX.js} +32 -14
- package/dist/components/p-C4YSpiKX.js.map +1 -0
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-datepicker.js +3 -3
- package/dist/components/p-datepicker.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-calendar.entry.js +28 -11
- package/dist/esm/p-calendar.entry.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js +2 -2
- package/dist/esm/p-datepicker.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-8049ca0b.entry.js +2 -0
- package/dist/paperless/p-8049ca0b.entry.js.map +1 -0
- package/dist/paperless/p-a9f68a69.entry.js +2 -0
- package/dist/paperless/p-a9f68a69.entry.js.map +1 -0
- package/dist/paperless/p-calendar.entry.esm.js.map +1 -1
- package/dist/paperless/p-datepicker.entry.esm.js.map +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/molecules/calendar/calendar.component.d.ts +2 -0
- package/package.json +1 -1
- package/dist/build/p-a57e3213.entry.js +0 -2
- package/dist/build/p-a57e3213.entry.js.map +0 -1
- package/dist/build/p-d5d5c2ae.entry.js +0 -2
- package/dist/build/p-d5d5c2ae.entry.js.map +0 -1
- package/dist/components/p-D8EOYm4t.js.map +0 -1
- package/dist/paperless/p-a57e3213.entry.js +0 -2
- package/dist/paperless/p-a57e3213.entry.js.map +0 -1
- package/dist/paperless/p-d5d5c2ae.entry.js +0 -2
- package/dist/paperless/p-d5d5c2ae.entry.js.map +0 -1
|
@@ -2715,7 +2715,7 @@ function setYear(dirtyDate, dirtyYear) {
|
|
|
2715
2715
|
return date;
|
|
2716
2716
|
}
|
|
2717
2717
|
|
|
2718
|
-
const calendarComponentCss = "*{box-sizing:border-box}.static{position:static!important}.col-start-1{grid-column-start:1!important}.col-start-2{grid-column-start:2!important}.col-start-3{grid-column-start:3!important}.col-start-4{grid-column-start:4!important}.col-start-5{grid-column-start:5!important}.col-start-6{grid-column-start:6!important}.col-start-7{grid-column-start:7!important}.ml-auto{margin-left:auto!important}.flex{display:flex!important}.grid{display:grid!important}.h-8{height:2rem!important}.h-auto{height:auto!important}.h-full{height:100%!important}.max-h-\\[14rem\\]{max-height:14rem!important}.min-h-\\[12rem\\]{min-height:12rem!important}.w-8{width:2rem!important}.w-\\[17\\.5rem\\]{width:17.5rem!important}.w-full{width:100%!important}.flex-1{flex:1 1 0%!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-4{gap:1rem!important}.overflow-scroll{overflow:scroll!important}.rounded-lg{border-radius:.5rem!important}.border{border-width:1px!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.bg-off-white-300{--tw-bg-opacity:1!important;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-black-teal{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.text-black-teal-200{--tw-text-opacity:1!important;color:rgb(154 170 167/var(--tw-text-opacity,1))!important}.text-black-teal-300{--tw-text-opacity:1!important;color:rgb(104 127 124/var(--tw-text-opacity,1))!important}.opacity-60{opacity:.6!important}.drop-shadow-2{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,2,2,.04)) drop-shadow(0 2px 2px rgba(0,2,2,.04)) drop-shadow(0 4px 4px rgba(0,2,2,.04))!important}.drop-shadow-2,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.hover\\:bg-white-600:hover{--tw-bg-opacity:1!important;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.hover\\:text-black-teal:hover{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}";
|
|
2718
|
+
const calendarComponentCss = "*{box-sizing:border-box}.static{position:static!important}.col-start-1{grid-column-start:1!important}.col-start-2{grid-column-start:2!important}.col-start-3{grid-column-start:3!important}.col-start-4{grid-column-start:4!important}.col-start-5{grid-column-start:5!important}.col-start-6{grid-column-start:6!important}.col-start-7{grid-column-start:7!important}.ml-auto{margin-left:auto!important}.flex{display:flex!important}.grid{display:grid!important}.h-8{height:2rem!important}.h-auto{height:auto!important}.h-full{height:100%!important}.max-h-\\[14rem\\]{max-height:14rem!important}.min-h-\\[12rem\\]{min-height:12rem!important}.w-8{width:2rem!important}.w-\\[17\\.5rem\\]{width:17.5rem!important}.w-full{width:100%!important}.flex-1{flex:1 1 0%!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-4{gap:1rem!important}.overflow-scroll{overflow:scroll!important}.rounded-lg{border-radius:.5rem!important}.border{border-width:1px!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.bg-off-white-300{--tw-bg-opacity:1!important;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-semibold{font-weight:600!important}.text-black-teal{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.text-black-teal-200{--tw-text-opacity:1!important;color:rgb(154 170 167/var(--tw-text-opacity,1))!important}.text-black-teal-300{--tw-text-opacity:1!important;color:rgb(104 127 124/var(--tw-text-opacity,1))!important}.opacity-60{opacity:.6!important}.drop-shadow-2{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,2,2,.04)) drop-shadow(0 2px 2px rgba(0,2,2,.04)) drop-shadow(0 4px 4px rgba(0,2,2,.04))!important}.drop-shadow-2,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.hover\\:bg-white-600:hover{--tw-bg-opacity:1!important;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.hover\\:text-black-teal:hover{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}";
|
|
2719
2719
|
|
|
2720
2720
|
const calendar = cva(['bg-white w-[17.5rem] flex flex-col gap-4'], {
|
|
2721
2721
|
variants: {
|
|
@@ -2886,8 +2886,16 @@ const Calendar = /*@__PURE__*/ proxyCustomElement(class Calendar extends H {
|
|
|
2886
2886
|
})
|
|
2887
2887
|
.filter(date => isValid(date));
|
|
2888
2888
|
}
|
|
2889
|
+
_modeChange(mode) {
|
|
2890
|
+
if (mode === 'year' && this._view !== 'year') {
|
|
2891
|
+
this._view = 'year';
|
|
2892
|
+
}
|
|
2893
|
+
if (mode === 'month' && this._view === 'day') {
|
|
2894
|
+
this._view = 'month';
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2889
2897
|
render() {
|
|
2890
|
-
return (h("div", { key: '
|
|
2898
|
+
return (h("div", { key: '08d3c166f522981fd65a621dc0d077ed0b78e91d', class: calendar({ variant: this.variant }) }, this._getView()));
|
|
2891
2899
|
}
|
|
2892
2900
|
_checkTodayButton() {
|
|
2893
2901
|
if (this._maxDate && isAfter(this._today, this._maxDate)) {
|
|
@@ -2899,6 +2907,9 @@ const Calendar = /*@__PURE__*/ proxyCustomElement(class Calendar extends H {
|
|
|
2899
2907
|
if (this.disableWeekends && isWeekend(this._today)) {
|
|
2900
2908
|
return false;
|
|
2901
2909
|
}
|
|
2910
|
+
if (this.mode !== 'day') {
|
|
2911
|
+
return false;
|
|
2912
|
+
}
|
|
2902
2913
|
return true;
|
|
2903
2914
|
}
|
|
2904
2915
|
_getView() {
|
|
@@ -2916,7 +2927,7 @@ const Calendar = /*@__PURE__*/ proxyCustomElement(class Calendar extends H {
|
|
|
2916
2927
|
_getDayView() {
|
|
2917
2928
|
const daysInMonth = this._generateDaysInMonth();
|
|
2918
2929
|
return (h("div", { class: view({ view: 'day' }) }, this._getHeader('day'), h("div", { class: 'grid grid-cols-7 justify-between gap-1' }, this._weekDays.map(weekday => (h("span", { class: 'w-8 text-center text-xs text-black-teal-200' }, format(addDays(new Date(2022, 7, 1), weekday), 'eee')))), daysInMonth.map(day => {
|
|
2919
|
-
return day.active ? (h("p-button", { variant: 'primary', class: cn('w-full', `col-start-${day.offset}`), onClick: () => this._setValue(day.date) }, day.day)) : (h("time", { class: cn('normal flex items-center justify-center rounded-lg', 'h-8 w-8 text-sm text-black-teal-300', {
|
|
2930
|
+
return day.active ? (h("p-button", { variant: 'primary', class: cn('w-full', `col-start-${day.offset}`), onClick: () => this._setValue(day.date) }, day.day)) : (h("time", { class: cn('normal flex items-center justify-center rounded-lg', 'h-8 w-8 text-sm font-semibold text-black-teal-300', {
|
|
2920
2931
|
'cursor-pointer hover:bg-white-600 hover:text-black-teal': !day.disabled,
|
|
2921
2932
|
}, `col-start-${day.offset}`, { 'cursor-not-allowed opacity-60': day.disabled }), onClick: () => this._setValue(day.date) }, day.day));
|
|
2922
2933
|
}))));
|
|
@@ -2936,28 +2947,33 @@ const Calendar = /*@__PURE__*/ proxyCustomElement(class Calendar extends H {
|
|
|
2936
2947
|
nextFn = num => this._changeYear(num);
|
|
2937
2948
|
nextType = 'year';
|
|
2938
2949
|
}
|
|
2939
|
-
return (h("div", { class: header({ type }) },
|
|
2950
|
+
return (h("div", { class: header({ type: this.mode }) }, this.mode !== 'year' && (h("p-button", { variant: 'secondary', iconOnly: true, icon: 'caret', iconRotate: 90, size: 'sm', onClick: () => nextFn(-1), disabled: !this._canSetAmount(nextType, -1) || this._view === 'year' })), h("div", { class: cn('flex gap-2', {
|
|
2940
2951
|
'flex-1': this._enableToday,
|
|
2941
|
-
}) }, this.mode !== 'year' && (h("p-button", { variant: 'secondary', size: 'sm', onClick: () => this._changeView('month'), disabled: !this._canChangeView('month'), active: this._view === 'month' && this.mode !== 'month' }, format(this._viewDate, 'MMMM'))), h("p-button", { variant: 'secondary', size: 'sm', onClick: () => this._changeView('year'), disabled: !this._canChangeView('year'), active: this._view === 'year' && this.mode !== 'year' }, getYear(this._viewDate)), this._enableToday && (h("p-tooltip", { class: 'ml-auto', content: this.todayText }, h("p-button", { variant: 'secondary', size: 'sm', icon: 'calendar', slot: 'trigger', iconOnly: true, onClick: () => this.
|
|
2952
|
+
}) }, this.mode !== 'year' && (h("p-button", { variant: 'secondary', size: 'sm', onClick: () => this._changeView('month'), disabled: !this._canChangeView('month'), active: this._view === 'month' && this.mode !== 'month' }, format(this._viewDate, 'MMMM'))), h("p-button", { variant: 'secondary', size: 'sm', onClick: () => this._changeView('year'), disabled: !this._canChangeView('year'), active: this._view === 'year' && this.mode !== 'year' }, getYear(this._viewDate)), this._enableToday && (h("p-tooltip", { class: 'ml-auto', content: this.todayText }, h("p-button", { variant: 'secondary', size: 'sm', icon: 'calendar', slot: 'trigger', iconOnly: true, onClick: () => this._setToday() })))), this.mode !== 'year' && (h("p-button", { variant: 'secondary', iconOnly: true, icon: 'caret', iconRotate: -90, size: 'sm', onClick: () => nextFn(1), disabled: !this._canSetAmount(nextType, 1) || this._view == 'year' }))));
|
|
2942
2953
|
}
|
|
2943
2954
|
_setYear(year) {
|
|
2944
2955
|
const date = setYear(this._viewDate, year);
|
|
2945
|
-
if (this.mode
|
|
2956
|
+
if (this.mode !== 'year') {
|
|
2946
2957
|
this._viewDate = date;
|
|
2947
|
-
this.
|
|
2958
|
+
this._view = 'month';
|
|
2948
2959
|
return;
|
|
2949
2960
|
}
|
|
2950
2961
|
this._viewDate = date;
|
|
2951
|
-
this.
|
|
2962
|
+
this._setValue(setMonth(setDate(date, 1), 0));
|
|
2952
2963
|
}
|
|
2953
2964
|
_setMonth(month) {
|
|
2954
2965
|
const date = setMonth(this._viewDate, month);
|
|
2955
|
-
if (this.mode === '
|
|
2966
|
+
if (this.mode === 'day') {
|
|
2956
2967
|
this._viewDate = date;
|
|
2957
|
-
this.
|
|
2968
|
+
this._view = 'day';
|
|
2958
2969
|
return;
|
|
2959
2970
|
}
|
|
2960
2971
|
this._viewDate = date;
|
|
2972
|
+
this._setValue(setDate(date, 1));
|
|
2973
|
+
}
|
|
2974
|
+
_setToday() {
|
|
2975
|
+
this._viewDate = this._today;
|
|
2976
|
+
this._setValue(this._today);
|
|
2961
2977
|
this._view = 'day';
|
|
2962
2978
|
}
|
|
2963
2979
|
_changeMonth(amount = 1) {
|
|
@@ -3109,7 +3125,8 @@ const Calendar = /*@__PURE__*/ proxyCustomElement(class Calendar extends H {
|
|
|
3109
3125
|
"value": ["_parseValue"],
|
|
3110
3126
|
"minDate": ["_parseMinDate"],
|
|
3111
3127
|
"maxDate": ["_parseMaxDate"],
|
|
3112
|
-
"disabledDates": ["_parseDisabledDates"]
|
|
3128
|
+
"disabledDates": ["_parseDisabledDates"],
|
|
3129
|
+
"mode": ["_modeChange"]
|
|
3113
3130
|
}; }
|
|
3114
3131
|
static get style() { return calendarComponentCss; }
|
|
3115
3132
|
}, [1, "p-calendar", {
|
|
@@ -3134,7 +3151,8 @@ const Calendar = /*@__PURE__*/ proxyCustomElement(class Calendar extends H {
|
|
|
3134
3151
|
"value": ["_parseValue"],
|
|
3135
3152
|
"minDate": ["_parseMinDate"],
|
|
3136
3153
|
"maxDate": ["_parseMaxDate"],
|
|
3137
|
-
"disabledDates": ["_parseDisabledDates"]
|
|
3154
|
+
"disabledDates": ["_parseDisabledDates"],
|
|
3155
|
+
"mode": ["_modeChange"]
|
|
3138
3156
|
}]);
|
|
3139
3157
|
function defineCustomElement() {
|
|
3140
3158
|
if (typeof customElements === "undefined") {
|
|
@@ -3177,6 +3195,6 @@ function defineCustomElement() {
|
|
|
3177
3195
|
defineCustomElement();
|
|
3178
3196
|
|
|
3179
3197
|
export { Calendar as C, _typeof as _, startOfUTCISOWeek as a, getUTCWeek as b, toInteger as c, defineCustomElement as d, getUTCISOWeek as e, getDefaultOptions as f, getUTCWeekYear as g, longFormatters as h, subMilliseconds as i, getTimezoneOffsetInMilliseconds as j, isProtectedWeekYearToken as k, locale as l, throwProtectedError as m, isProtectedDayOfYearToken as n, isValid as o, isBefore as p, isAfter as q, requiredArgs as r, startOfUTCWeek as s, toDate as t, format as u, startOfDay as v, startOfMonth as w, isSameDay as x, isWeekend as y };
|
|
3180
|
-
//# sourceMappingURL=p-
|
|
3198
|
+
//# sourceMappingURL=p-C4YSpiKX.js.map
|
|
3181
3199
|
|
|
3182
|
-
//# sourceMappingURL=p-
|
|
3200
|
+
//# sourceMappingURL=p-C4YSpiKX.js.map
|