@paperless/core 2.15.0 → 2.15.2
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 +22 -0
- package/dist/build/p-481a8ecd.entry.js +2 -0
- package/dist/build/p-481a8ecd.entry.js.map +1 -0
- package/dist/build/p-6aa5fec2.entry.js +2 -0
- package/dist/build/p-6aa5fec2.entry.js.map +1 -0
- package/dist/build/p-BYMwCs48.js +2 -0
- package/dist/build/p-BYMwCs48.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/{p-41efd48b.js → p-f967fae6.js} +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/{index-Dt9qqH1T.js → index-BrXouTWt.js} +142 -2
- package/dist/cjs/index-BrXouTWt.js.map +1 -0
- package/dist/cjs/p-calendar.cjs.entry.js +32 -164
- 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 +23 -13
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/p-datepicker.entry.cjs.js.map +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.js +17 -13
- package/dist/collection/components/molecules/calendar/calendar.component.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +31 -16
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -1
- package/dist/components/{p-3yDjwtDu.js → p-CLnjjZGE.js} +16 -12
- package/dist/components/p-CLnjjZGE.js.map +1 -0
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-datepicker.js +23 -13
- package/dist/components/p-datepicker.js.map +1 -1
- package/dist/esm/{index-EKSDxqjG.js → index-BYMwCs48.js} +139 -3
- package/dist/esm/index-BYMwCs48.js.map +1 -0
- package/dist/esm/p-calendar.entry.js +14 -146
- package/dist/esm/p-calendar.entry.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js +23 -13
- package/dist/esm/p-datepicker.entry.js.map +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-481a8ecd.entry.js +2 -0
- package/dist/paperless/p-481a8ecd.entry.js.map +1 -0
- package/dist/paperless/p-6aa5fec2.entry.js +2 -0
- package/dist/paperless/p-6aa5fec2.entry.js.map +1 -0
- package/dist/paperless/p-BYMwCs48.js +2 -0
- package/dist/paperless/p-BYMwCs48.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 -2
- package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +5 -4
- package/dist/types/components.d.ts +8 -8
- package/package.json +1 -1
- package/dist/build/p-60974307.entry.js +0 -2
- package/dist/build/p-60974307.entry.js.map +0 -1
- package/dist/build/p-EKSDxqjG.js +0 -2
- package/dist/build/p-EKSDxqjG.js.map +0 -1
- package/dist/build/p-aeb59c96.entry.js +0 -2
- package/dist/build/p-aeb59c96.entry.js.map +0 -1
- package/dist/cjs/index-Dt9qqH1T.js.map +0 -1
- package/dist/components/p-3yDjwtDu.js.map +0 -1
- package/dist/esm/index-EKSDxqjG.js.map +0 -1
- package/dist/paperless/p-60974307.entry.js +0 -2
- package/dist/paperless/p-60974307.entry.js.map +0 -1
- package/dist/paperless/p-EKSDxqjG.js +0 -2
- package/dist/paperless/p-EKSDxqjG.js.map +0 -1
- package/dist/paperless/p-aeb59c96.entry.js +0 -2
- package/dist/paperless/p-aeb59c96.entry.js.map +0 -1
|
@@ -4,7 +4,7 @@ import { i as isMobileBrowser } from './p-DVCJlilm.js';
|
|
|
4
4
|
import { a as asBoolean } from './p-C5CTp9IA.js';
|
|
5
5
|
import { b as state } from './p-DnVMEz1h.js';
|
|
6
6
|
import { d as defineCustomElement$b } from './p-CHsgxVNo.js';
|
|
7
|
-
import { r as requiredArgs, t as toDate, _ as _typeof, g as getUTCWeekYear, s as startOfUTCWeek, a as startOfUTCISOWeek, b as getUTCWeek, c as toInteger, e as getUTCISOWeek, f as getDefaultOptions, l as locale, h as longFormatters, i as subMilliseconds, j as getTimezoneOffsetInMilliseconds, k as isProtectedWeekYearToken, m as throwProtectedError, n as isProtectedDayOfYearToken, d as defineCustomElement$a, o as isValid, p as isBefore, q as isAfter, u as format, v as locale$1, w as startOfDay, x as startOfMonth, y as isSameDay, z as isWeekend } from './p-
|
|
7
|
+
import { r as requiredArgs, t as toDate, _ as _typeof, g as getUTCWeekYear, s as startOfUTCWeek, a as startOfUTCISOWeek, b as getUTCWeek, c as toInteger, e as getUTCISOWeek, f as getDefaultOptions, l as locale, h as longFormatters, i as subMilliseconds, j as getTimezoneOffsetInMilliseconds, k as isProtectedWeekYearToken, m as throwProtectedError, n as isProtectedDayOfYearToken, d as defineCustomElement$a, o as isValid, p as isBefore, q as isAfter, u as format, v as locale$1, w as startOfDay, x as startOfMonth, y as isSameDay, z as isWeekend, A as addYears, B as getYear, D as setYear } from './p-CLnjjZGE.js';
|
|
8
8
|
import { d as defineCustomElement$9 } from './p-CLE6xhvL.js';
|
|
9
9
|
import { d as defineCustomElement$8 } from './p-CStLRi0B.js';
|
|
10
10
|
import { d as defineCustomElement$7 } from './p-BQN0zMMn.js';
|
|
@@ -2896,11 +2896,11 @@ const Datepicker = /*@__PURE__*/ proxyCustomElement(class Datepicker extends H {
|
|
|
2896
2896
|
/**
|
|
2897
2897
|
* Min date
|
|
2898
2898
|
*/
|
|
2899
|
-
minDate;
|
|
2899
|
+
minDate = null;
|
|
2900
2900
|
/**
|
|
2901
2901
|
* Max date
|
|
2902
2902
|
*/
|
|
2903
|
-
maxDate;
|
|
2903
|
+
maxDate = null;
|
|
2904
2904
|
/**
|
|
2905
2905
|
* Wether to disable the weekends
|
|
2906
2906
|
*/
|
|
@@ -3000,6 +3000,10 @@ const Datepicker = /*@__PURE__*/ proxyCustomElement(class Datepicker extends H {
|
|
|
3000
3000
|
this._setValue(value);
|
|
3001
3001
|
}
|
|
3002
3002
|
parseMinDate(minDate) {
|
|
3003
|
+
if (minDate === null || minDate === '') {
|
|
3004
|
+
this.minDate = new Date(1970, 0, 1);
|
|
3005
|
+
return;
|
|
3006
|
+
}
|
|
3003
3007
|
if (typeof minDate === 'string') {
|
|
3004
3008
|
minDate = new Date(minDate);
|
|
3005
3009
|
}
|
|
@@ -3012,6 +3016,10 @@ const Datepicker = /*@__PURE__*/ proxyCustomElement(class Datepicker extends H {
|
|
|
3012
3016
|
}
|
|
3013
3017
|
}
|
|
3014
3018
|
parseMaxDate(maxDate) {
|
|
3019
|
+
if (maxDate === null || maxDate === '') {
|
|
3020
|
+
this.maxDate = this._getAutomaticMax();
|
|
3021
|
+
return;
|
|
3022
|
+
}
|
|
3015
3023
|
if (typeof maxDate === 'string') {
|
|
3016
3024
|
maxDate = new Date(maxDate);
|
|
3017
3025
|
}
|
|
@@ -3056,12 +3064,8 @@ const Datepicker = /*@__PURE__*/ proxyCustomElement(class Datepicker extends H {
|
|
|
3056
3064
|
if (this.disabledDates) {
|
|
3057
3065
|
this.parseDisabledDates(this.disabledDates);
|
|
3058
3066
|
}
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
}
|
|
3062
|
-
if (this.maxDate) {
|
|
3063
|
-
this.parseMaxDate(this.maxDate);
|
|
3064
|
-
}
|
|
3067
|
+
this.parseMinDate(this.minDate);
|
|
3068
|
+
this.parseMaxDate(this.maxDate);
|
|
3065
3069
|
if (this.mode !== 'day' && this.format === this._defaultFormats['day']) {
|
|
3066
3070
|
this.format = this._defaultFormats[this.mode];
|
|
3067
3071
|
}
|
|
@@ -3069,16 +3073,16 @@ const Datepicker = /*@__PURE__*/ proxyCustomElement(class Datepicker extends H {
|
|
|
3069
3073
|
this.parseValue(this.value);
|
|
3070
3074
|
}
|
|
3071
3075
|
render() {
|
|
3072
|
-
return (h("p-dropdown", { key: '
|
|
3076
|
+
return (h("p-dropdown", { key: 'f958a8b84161a153a41c6e85a76b77d32a20512d', allowOverflow: true, strategy: this.strategy, placement: this.placement, disableTriggerClick: true, applyMaxWidth: false, applyFullWidth: false, insideClick: true, show: this._showDropdown, isDatepicker: true }, h("p-field", { key: 'c08c35d9c1d96f1ae557f46639d8581d0b590002', slot: 'trigger', icon: this.hideIconWhenFilled && !!this._value ? null : 'calendar-multi', iconPosition: 'start', size: this.size, prefix: this.prefix, label: this.label, loading: this.loading, helper: this.helper, required: asBoolean(this.required), showOptional: asBoolean(this.showOptional), error: this.error, forceShowTooltip: !!this.error?.length && !this._showDropdown, autoShowError: false, disabled: asBoolean(this.disabled), focused: this._showDropdown, value: this._getFormattedDate(), placeholder: this.placeholder, onFocus: () => this._onFocus(), onBlur: () => this._onBlur(), onValueChange: ev => this._onValueChange(ev.detail), onInputRefChange: ev => (this._inputRef = ev.detail) }), this.enableNativePicker && this._isMobileBrowser && (h("input", { key: 'f551d9716890a31f4e5956370e4fac08fd8a2bca', slot: 'trigger', type: this.mode === 'day' ? 'date' : 'month', class: 'pointer-events-none absolute left-0 top-0 z-[-10] overflow-hidden opacity-0', onInput: ev => this._onNativeInput(ev), ref: ref => (this._dateInputRef = ref), value: this._value &&
|
|
3073
3077
|
format(this._value, 'yyyy-MM-dd', {
|
|
3074
3078
|
locale: state.locale === 'nl' ? locale$1 : locale,
|
|
3075
|
-
}), min: this.
|
|
3076
|
-
format(new Date(this.
|
|
3079
|
+
}), min: this._minDate &&
|
|
3080
|
+
format(new Date(this._minDate), 'yyyy-MM-dd', {
|
|
3077
3081
|
locale: state.locale === 'nl' ? locale$1 : locale,
|
|
3078
3082
|
}), max: this.maxDate &&
|
|
3079
3083
|
format(new Date(this.maxDate), 'yyyy-MM-dd', {
|
|
3080
3084
|
locale: state.locale === 'nl' ? locale$1 : locale,
|
|
3081
|
-
}) })), h("div", { key: '
|
|
3085
|
+
}) })), h("div", { key: 'b1037b81d561397c3b748502cdd5e85dbaec3a48', slot: 'items' }, h("p-calendar", { key: '35ebe73bd302d35d582a3c65135f1a08f7e05f8e', variant: 'embedded', value: this._value, onValueChange: ({ detail }) => (this.value = detail), preselectToday: this.preselectToday, disabledDates: this.disabledDates, minDate: this.minDate, maxDate: this.maxDate, disableWeekends: this.disableWeekends, enableToday: this.enableToday, todayText: this.todayText, mode: this.mode }))));
|
|
3082
3086
|
}
|
|
3083
3087
|
documentClickHandler({ target }) {
|
|
3084
3088
|
if (!this._showDropdown || childOf(target, this._el)) {
|
|
@@ -3204,6 +3208,12 @@ const Datepicker = /*@__PURE__*/ proxyCustomElement(class Datepicker extends H {
|
|
|
3204
3208
|
locale: state.locale === 'nl' ? locale$1 : locale,
|
|
3205
3209
|
});
|
|
3206
3210
|
}
|
|
3211
|
+
_getAutomaticMax() {
|
|
3212
|
+
const date = addYears(new Date(), 50);
|
|
3213
|
+
let year = getYear(date);
|
|
3214
|
+
year = Math.ceil(year / 10) * 10;
|
|
3215
|
+
return setYear(date, year);
|
|
3216
|
+
}
|
|
3207
3217
|
static get formAssociated() { return true; }
|
|
3208
3218
|
static get watchers() { return {
|
|
3209
3219
|
"value": ["parseValue"],
|