@paperless/core 0.1.0-alpha.407 → 0.1.0-alpha.409
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 +20 -0
- package/dist/{paperless/p-53dca131.entry.js → build/p-75aa8c67.entry.js} +2 -2
- package/dist/build/p-78770cf6.js +2 -0
- package/dist/build/p-78770cf6.js.map +1 -0
- package/dist/build/{p-0309be9d.entry.js → p-7e91daa4.entry.js} +2 -2
- package/dist/build/p-7e91daa4.entry.js.map +1 -0
- package/dist/build/{p-ca41ea7f.entry.js → p-b24e06bd.entry.js} +2 -2
- package/dist/build/p-b24e06bd.entry.js.map +1 -0
- package/dist/build/{p-bbde7cba.entry.js → p-b338c29f.entry.js} +2 -2
- package/dist/build/{p-2b08e371.entry.js → p-b5710d1b.entry.js} +2 -2
- package/dist/{paperless/p-3b6c4710.entry.js → build/p-c8a39486.entry.js} +2 -2
- package/dist/build/p-d3820966.entry.js +2 -0
- package/dist/build/{p-8fb43cc7.entry.js.map → p-d3820966.entry.js.map} +1 -1
- package/dist/{paperless/p-78948e08.entry.js → build/p-f1cb5979.entry.js} +2 -2
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js +3 -3
- package/dist/cjs/p-calendar.cjs.entry.js +0 -7
- package/dist/cjs/p-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +13 -20
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/p-divider.cjs.entry.js +1 -1
- package/dist/cjs/p-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/p-modal-body_4.cjs.entry.js +4 -4
- package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -1
- package/dist/cjs/p-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/cjs/{popper-d7a0f999.js → popper-6eb3f461.js} +4 -5
- package/dist/cjs/popper-6eb3f461.js.map +1 -0
- package/dist/collection/components/atoms/backdrop/backdrop.component.css +1 -1
- package/dist/collection/components/atoms/button/button.component.css +1 -1
- package/dist/collection/components/atoms/divider/divider.component.css +1 -1
- package/dist/collection/components/atoms/icon/icon.component.css +1 -1
- package/dist/collection/components/atoms/loader/loader.component.css +1 -1
- package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -1
- package/dist/collection/components/atoms/modal-container/modal-container.component.css +1 -1
- package/dist/collection/components/atoms/modal-footer/modal-footer.component.css +1 -1
- package/dist/collection/components/atoms/modal-header/modal-header.component.css +1 -1
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.css +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.js +0 -7
- package/dist/collection/components/molecules/calendar/calendar.component.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +22 -27
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -1
- package/dist/components/backdrop.component.js +1 -1
- package/dist/components/button.component.js +1 -1
- package/dist/components/calendar.component.js +0 -7
- package/dist/components/calendar.component.js.map +1 -1
- package/dist/components/divider.component.js +1 -1
- package/dist/components/icon.component.js +1 -1
- package/dist/components/loader.component.js +1 -1
- package/dist/components/modal-body.component.js +1 -1
- package/dist/components/modal-body.component.js.map +1 -1
- package/dist/components/modal-container.component.js +1 -1
- package/dist/components/modal-container.component.js.map +1 -1
- package/dist/components/modal-footer.component.js +1 -1
- package/dist/components/modal-header.component.js +1 -1
- package/dist/components/modal-header.component.js.map +1 -1
- package/dist/components/p-datepicker.js +14 -21
- package/dist/components/p-datepicker.js.map +1 -1
- package/dist/components/popper.js +3 -4
- package/dist/components/popper.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-backdrop.entry.js +1 -1
- package/dist/esm/p-button_3.entry.js +3 -3
- package/dist/esm/p-calendar.entry.js +0 -7
- package/dist/esm/p-calendar.entry.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js +13 -20
- package/dist/esm/p-datepicker.entry.js.map +1 -1
- package/dist/esm/p-divider.entry.js +1 -1
- package/dist/esm/p-dropdown_2.entry.js +1 -1
- package/dist/esm/p-modal-body_4.entry.js +4 -4
- package/dist/esm/p-modal-body_4.entry.js.map +1 -1
- package/dist/esm/p-tooltip.entry.js +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/esm/{popper-42db9fbd.js → popper-d15dbc3d.js} +4 -5
- package/dist/esm/popper-d15dbc3d.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/{build/p-53dca131.entry.js → paperless/p-75aa8c67.entry.js} +2 -2
- package/dist/paperless/p-78770cf6.js +2 -0
- package/dist/paperless/p-78770cf6.js.map +1 -0
- package/dist/paperless/{p-0309be9d.entry.js → p-7e91daa4.entry.js} +2 -2
- package/dist/paperless/p-7e91daa4.entry.js.map +1 -0
- package/dist/paperless/{p-ca41ea7f.entry.js → p-b24e06bd.entry.js} +2 -2
- package/dist/paperless/p-b24e06bd.entry.js.map +1 -0
- package/dist/paperless/{p-bbde7cba.entry.js → p-b338c29f.entry.js} +2 -2
- package/dist/paperless/{p-2b08e371.entry.js → p-b5710d1b.entry.js} +2 -2
- package/dist/{build/p-3b6c4710.entry.js → paperless/p-c8a39486.entry.js} +2 -2
- package/dist/paperless/p-d3820966.entry.js +2 -0
- package/dist/paperless/{p-8fb43cc7.entry.js.map → p-d3820966.entry.js.map} +1 -1
- package/dist/{build/p-78948e08.entry.js → paperless/p-f1cb5979.entry.js} +2 -2
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +5 -5
- package/dist/types/components.d.ts +2 -2
- package/hydrate/index.js +27 -42
- package/package.json +3 -3
- package/dist/build/p-0309be9d.entry.js.map +0 -1
- package/dist/build/p-8fb43cc7.entry.js +0 -2
- package/dist/build/p-ca41ea7f.entry.js.map +0 -1
- package/dist/build/p-f86fcdf4.js +0 -2
- package/dist/build/p-f86fcdf4.js.map +0 -1
- package/dist/cjs/popper-d7a0f999.js.map +0 -1
- package/dist/esm/popper-42db9fbd.js.map +0 -1
- package/dist/paperless/p-0309be9d.entry.js.map +0 -1
- package/dist/paperless/p-8fb43cc7.entry.js +0 -2
- package/dist/paperless/p-ca41ea7f.entry.js.map +0 -1
- package/dist/paperless/p-f86fcdf4.js +0 -2
- package/dist/paperless/p-f86fcdf4.js.map +0 -1
- /package/dist/build/{p-53dca131.entry.js.map → p-75aa8c67.entry.js.map} +0 -0
- /package/dist/build/{p-bbde7cba.entry.js.map → p-b338c29f.entry.js.map} +0 -0
- /package/dist/build/{p-2b08e371.entry.js.map → p-b5710d1b.entry.js.map} +0 -0
- /package/dist/build/{p-3b6c4710.entry.js.map → p-c8a39486.entry.js.map} +0 -0
- /package/dist/build/{p-78948e08.entry.js.map → p-f1cb5979.entry.js.map} +0 -0
- /package/dist/paperless/{p-53dca131.entry.js.map → p-75aa8c67.entry.js.map} +0 -0
- /package/dist/paperless/{p-bbde7cba.entry.js.map → p-b338c29f.entry.js.map} +0 -0
- /package/dist/paperless/{p-2b08e371.entry.js.map → p-b5710d1b.entry.js.map} +0 -0
- /package/dist/paperless/{p-3b6c4710.entry.js.map → p-c8a39486.entry.js.map} +0 -0
- /package/dist/paperless/{p-78948e08.entry.js.map → p-f1cb5979.entry.js.map} +0 -0
|
@@ -3943,8 +3943,7 @@ const Datepicker = class {
|
|
|
3943
3943
|
}
|
|
3944
3944
|
return index.format(this._value, this.format);
|
|
3945
3945
|
}
|
|
3946
|
-
|
|
3947
|
-
console.log('[Datepicker] parse value', value, this._el);
|
|
3946
|
+
parseValue(value) {
|
|
3948
3947
|
if (!value && this.preselectToday) {
|
|
3949
3948
|
value = new Date();
|
|
3950
3949
|
}
|
|
@@ -3953,7 +3952,7 @@ const Datepicker = class {
|
|
|
3953
3952
|
}
|
|
3954
3953
|
this._setValue(value);
|
|
3955
3954
|
}
|
|
3956
|
-
|
|
3955
|
+
parseMinDate(minDate) {
|
|
3957
3956
|
if (typeof minDate === 'string') {
|
|
3958
3957
|
minDate = new Date(minDate);
|
|
3959
3958
|
}
|
|
@@ -3965,7 +3964,7 @@ const Datepicker = class {
|
|
|
3965
3964
|
this._setValue(null);
|
|
3966
3965
|
}
|
|
3967
3966
|
}
|
|
3968
|
-
|
|
3967
|
+
parseMaxDate(maxDate) {
|
|
3969
3968
|
if (typeof maxDate === 'string') {
|
|
3970
3969
|
maxDate = new Date(maxDate);
|
|
3971
3970
|
}
|
|
@@ -3977,7 +3976,7 @@ const Datepicker = class {
|
|
|
3977
3976
|
this._setValue(null);
|
|
3978
3977
|
}
|
|
3979
3978
|
}
|
|
3980
|
-
|
|
3979
|
+
parseDisabledDates(disabledDates) {
|
|
3981
3980
|
if (typeof disabledDates === 'string') {
|
|
3982
3981
|
disabledDates = JSON.parse(disabledDates);
|
|
3983
3982
|
}
|
|
@@ -3999,22 +3998,22 @@ const Datepicker = class {
|
|
|
3999
3998
|
}
|
|
4000
3999
|
componentWillLoad() {
|
|
4001
4000
|
if (this.disabledDates) {
|
|
4002
|
-
this.
|
|
4001
|
+
this.parseDisabledDates(this.disabledDates);
|
|
4003
4002
|
}
|
|
4004
4003
|
if (this.minDate) {
|
|
4005
|
-
this.
|
|
4004
|
+
this.parseMinDate(this.minDate);
|
|
4006
4005
|
}
|
|
4007
4006
|
if (this.maxDate) {
|
|
4008
|
-
this.
|
|
4007
|
+
this.parseMaxDate(this.maxDate);
|
|
4009
4008
|
}
|
|
4010
4009
|
if (this.mode !== 'day' &&
|
|
4011
4010
|
this.format === this._defaultFormats['day']) {
|
|
4012
4011
|
this.format = this._defaultFormats[this.mode];
|
|
4013
4012
|
}
|
|
4014
|
-
this.
|
|
4013
|
+
this.parseValue(this.value);
|
|
4015
4014
|
}
|
|
4016
4015
|
render() {
|
|
4017
|
-
return (index$1.h(index$1.Host, { class: "p-datepicker" }, index$1.h("p-dropdown", { disableTriggerClick: true, applyMaxWidth: false, applyFullWidth: false, insideClick: true, show: this._showDropdown }, index$1.h("p-input-group", { slot: "trigger", icon: "calendar", iconPosition: "start", size: this.size, prefix: this.prefix, label: this.label, helper: this.helper, error: this.error, disabled: this.disabled, focused: this._showDropdown }, index$1.h("input", { slot: "input", type: "text", placeholder: this.placeholder, value: this.formattedDate, class: "p-input cursor-pointer", onFocus: () => this._onFocus(), onInput: (ev) => this._onInput(ev) })), index$1.h("div", { slot: "items" }, index$1.h("p-calendar", { variant: "embedded", value: this._value, onValueChange: ({ detail }) => this.
|
|
4016
|
+
return (index$1.h(index$1.Host, { class: "p-datepicker" }, index$1.h("p-dropdown", { disableTriggerClick: true, applyMaxWidth: false, applyFullWidth: false, insideClick: true, show: this._showDropdown }, index$1.h("p-input-group", { slot: "trigger", icon: "calendar", iconPosition: "start", size: this.size, prefix: this.prefix, label: this.label, helper: this.helper, error: this.error, disabled: this.disabled, focused: this._showDropdown }, index$1.h("input", { slot: "input", type: "text", placeholder: this.placeholder, value: this.formattedDate, class: "p-input cursor-pointer", onFocus: () => this._onFocus(), onInput: (ev) => this._onInput(ev) })), index$1.h("div", { slot: "items" }, index$1.h("p-calendar", { 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, mode: this.mode })))));
|
|
4018
4017
|
}
|
|
4019
4018
|
documentClickHandler({ target }) {
|
|
4020
4019
|
if (!this._showDropdown || childOf.childOf(target, this._el)) {
|
|
@@ -4042,33 +4041,27 @@ const Datepicker = class {
|
|
|
4042
4041
|
}, 250);
|
|
4043
4042
|
}
|
|
4044
4043
|
_setValue(value, blur = true) {
|
|
4045
|
-
console.log('[Datepicker] set value', value, this._el);
|
|
4046
4044
|
if (value === null) {
|
|
4047
4045
|
this._value = null;
|
|
4048
4046
|
this.valueChange.emit(null);
|
|
4049
4047
|
return;
|
|
4050
4048
|
}
|
|
4051
|
-
console.log('[Datepicker] value is not null', value, this._el);
|
|
4052
4049
|
if (!index.isValid(value)) {
|
|
4053
4050
|
return;
|
|
4054
4051
|
}
|
|
4055
|
-
console.log('[Datepicker] value is valid', value, this._el);
|
|
4056
4052
|
if (this._isDisabledDay(value)) {
|
|
4057
4053
|
return;
|
|
4058
4054
|
}
|
|
4059
|
-
console.log('[Datepicker] value is not disabled', value, this._el);
|
|
4060
4055
|
value = index.startOfDay(value);
|
|
4061
4056
|
const isSameValue = index.isSameDay(value, this._value);
|
|
4062
4057
|
if (isSameValue) {
|
|
4063
4058
|
return;
|
|
4064
4059
|
}
|
|
4065
|
-
console.log('[Datepicker] value is not the same as previous value', value, this._el);
|
|
4066
4060
|
if (blur) {
|
|
4067
4061
|
this._onBlur();
|
|
4068
4062
|
}
|
|
4069
4063
|
this._value = value;
|
|
4070
4064
|
this.valueChange.emit(value);
|
|
4071
|
-
console.log('[Datepicker] value is set', value, this._el);
|
|
4072
4065
|
}
|
|
4073
4066
|
_isDisabledDay(day) {
|
|
4074
4067
|
return (index.isBefore(day, this._minDate) ||
|
|
@@ -4077,10 +4070,10 @@ const Datepicker = class {
|
|
|
4077
4070
|
}
|
|
4078
4071
|
get _el() { return index$1.getElement(this); }
|
|
4079
4072
|
static get watchers() { return {
|
|
4080
|
-
"value": ["
|
|
4081
|
-
"minDate": ["
|
|
4082
|
-
"maxDate": ["
|
|
4083
|
-
"disabledDates": ["
|
|
4073
|
+
"value": ["parseValue"],
|
|
4074
|
+
"minDate": ["parseMinDate"],
|
|
4075
|
+
"maxDate": ["parseMaxDate"],
|
|
4076
|
+
"disabledDates": ["parseDisabledDates"]
|
|
4084
4077
|
}; }
|
|
4085
4078
|
};
|
|
4086
4079
|
Datepicker.style = datepickerComponentCss;
|