@paperless/core 2.0.1-beta.196 → 2.0.1-beta.197
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 +11 -0
- package/dist/build/{p-701eff76.entry.js → p-0aac5364.entry.js} +2 -2
- package/dist/build/p-0aac5364.entry.js.map +1 -0
- package/dist/build/{p-75699819.js → p-64e0fed3.js} +1 -1
- package/dist/build/p-datepicker.entry.esm.js.map +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +15 -7
- 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/datepicker/datepicker.component.js +15 -7
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -1
- package/dist/components/p-datepicker.js +15 -7
- package/dist/components/p-datepicker.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js +15 -7
- package/dist/esm/p-datepicker.entry.js.map +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/{p-701eff76.entry.js → p-0aac5364.entry.js} +2 -2
- package/dist/paperless/p-0aac5364.entry.js.map +1 -0
- 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/package.json +1 -1
- package/dist/build/p-701eff76.entry.js.map +0 -1
- package/dist/paperless/p-701eff76.entry.js.map +0 -1
|
@@ -2983,6 +2983,7 @@ const Datepicker = class {
|
|
|
2983
2983
|
year: 'yyyy',
|
|
2984
2984
|
month: 'LLLL, yyyy',
|
|
2985
2985
|
day: 'dd-MM-yyyy',
|
|
2986
|
+
dayNoDashes: 'ddMMyyyy',
|
|
2986
2987
|
};
|
|
2987
2988
|
parseValue(value) {
|
|
2988
2989
|
if (!value && this.preselectToday) {
|
|
@@ -3063,7 +3064,7 @@ const Datepicker = class {
|
|
|
3063
3064
|
this.parseValue(this.value);
|
|
3064
3065
|
}
|
|
3065
3066
|
render() {
|
|
3066
|
-
return (h("p-dropdown", { key: '
|
|
3067
|
+
return (h("p-dropdown", { key: '1b991cdf5bc3e03b162a7bef4a6190413d187241', allowOverflow: true, strategy: this.strategy, placement: this.placement, disableTriggerClick: true, applyMaxWidth: false, applyFullWidth: false, insideClick: true, show: this._showDropdown }, h("p-field", { key: '2811ba01f522bd273c67fa120e8f83c6e3f91ff3', 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, 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: 'f2db96e7c890522a5bedcede831e6cbd2d27f2f6', 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 && format(this._value, 'yyyy-MM-dd'), min: this.minDate && format(new Date(this.minDate), 'yyyy-MM-dd'), max: this.maxDate && format(new Date(this.maxDate), 'yyyy-MM-dd') })), h("div", { key: 'ac88ae7b06ab91cf08da6ef3b363a53629299f2e', slot: 'items' }, h("p-calendar", { key: 'c53e934194a8ff323113d3b7f9e286941ef6c0ab', 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 }))));
|
|
3067
3068
|
}
|
|
3068
3069
|
documentClickHandler({ target }) {
|
|
3069
3070
|
if (!this._showDropdown || childOf(target, this._el)) {
|
|
@@ -3080,7 +3081,7 @@ const Datepicker = class {
|
|
|
3080
3081
|
}
|
|
3081
3082
|
this._showDropdown = true;
|
|
3082
3083
|
}
|
|
3083
|
-
_onBlur() {
|
|
3084
|
+
_onBlur(parseFormat = this.format) {
|
|
3084
3085
|
if (this._isMobileBrowser && this._dateInputRef) {
|
|
3085
3086
|
return;
|
|
3086
3087
|
}
|
|
@@ -3088,24 +3089,31 @@ const Datepicker = class {
|
|
|
3088
3089
|
if (target.value === null) {
|
|
3089
3090
|
return;
|
|
3090
3091
|
}
|
|
3091
|
-
const value = parse(target.value,
|
|
3092
|
+
const value = parse(target.value, parseFormat, new Date());
|
|
3092
3093
|
if (value === this._value) {
|
|
3093
3094
|
return;
|
|
3094
3095
|
}
|
|
3095
|
-
|
|
3096
|
+
const valid = isValid(value);
|
|
3097
|
+
if (!valid && parseFormat === this.format && this.mode === 'day') {
|
|
3098
|
+
return this._onBlur(this._defaultFormats['dayNoDashes']);
|
|
3099
|
+
}
|
|
3100
|
+
if (!valid || this._isDisabledDay(value)) {
|
|
3096
3101
|
target.value = this._getFormattedDate();
|
|
3097
3102
|
return;
|
|
3098
3103
|
}
|
|
3099
3104
|
this._setValue(value, false);
|
|
3100
3105
|
}
|
|
3101
|
-
_onValueChange(value) {
|
|
3106
|
+
_onValueChange(value, parseFormat = this.format) {
|
|
3102
3107
|
if (this._onInputTimeout) {
|
|
3103
3108
|
clearTimeout(this._onInputTimeout);
|
|
3104
3109
|
this._onInputTimeout = null;
|
|
3105
3110
|
}
|
|
3106
3111
|
this._onInputTimeout = setTimeout(() => {
|
|
3107
|
-
const parsedValue = parse(value,
|
|
3108
|
-
if (!isValid(parsedValue) || format(parsedValue,
|
|
3112
|
+
const parsedValue = parse(value, parseFormat, new Date());
|
|
3113
|
+
if (!isValid(parsedValue) || format(parsedValue, parseFormat) !== value) {
|
|
3114
|
+
if (this.mode === 'day') {
|
|
3115
|
+
this._onValueChange(value, this._defaultFormats['dayNoDashes']);
|
|
3116
|
+
}
|
|
3109
3117
|
return;
|
|
3110
3118
|
}
|
|
3111
3119
|
this._setValue(parsedValue, false);
|