@everymatrix/stage-dm-range-date-picker 1.0.29 → 1.0.30
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/component-lib.js +8 -4
- package/main.js +8 -4
- package/main.js.map +1 -1
- package/package-stage.json +1 -1
- package/package.json +1 -1
package/component-lib.js
CHANGED
|
@@ -43348,9 +43348,9 @@ var VerificationRequestBodyStrategy = class _VerificationRequestBodyStrategy {
|
|
|
43348
43348
|
const prefixedKey = field_id === "merchant_name" ? "p_domains" : `p_${field_id}`;
|
|
43349
43349
|
if (field.field_data_type === "TIMESTAMP" && value) {
|
|
43350
43350
|
const { start, end, alias } = value;
|
|
43351
|
-
if (start && end || alias) {
|
|
43352
|
-
let startDate = start;
|
|
43353
|
-
let endDate = end;
|
|
43351
|
+
if (start && end || alias && alias !== "custom") {
|
|
43352
|
+
let startDate = structuredClone(start);
|
|
43353
|
+
let endDate = structuredClone(end);
|
|
43354
43354
|
if (alias && alias !== "custom") {
|
|
43355
43355
|
startDate = dateTransform(alias, "start");
|
|
43356
43356
|
endDate = dateTransform(alias, "end");
|
|
@@ -67274,6 +67274,9 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
|
|
|
67274
67274
|
this.elementRef = elementRef;
|
|
67275
67275
|
this.shadowDomStyleInjectorService = shadowDomStyleInjectorService;
|
|
67276
67276
|
this.dateControl.valueChanges.subscribe((dates) => {
|
|
67277
|
+
if (!dates || !dates[0] || !dates[1] && this.requireEndDate) {
|
|
67278
|
+
return;
|
|
67279
|
+
}
|
|
67277
67280
|
if (this.manualDateChange) {
|
|
67278
67281
|
this.currentAlias = TimePeriod.Custom;
|
|
67279
67282
|
this.manualDateChange = false;
|
|
@@ -67334,7 +67337,7 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
|
|
|
67334
67337
|
return this.requireEndDate ? endDateRequired(control) : null;
|
|
67335
67338
|
}
|
|
67336
67339
|
writeValue(value) {
|
|
67337
|
-
if (!value || typeof value !== "object" || !("alias" in value)) {
|
|
67340
|
+
if (!value || typeof value !== "object" || !("alias" in value) || value.alias == "custom" && (!value.start || !value.end && this.requireEndDate)) {
|
|
67338
67341
|
this.inputValue = "";
|
|
67339
67342
|
this._initialValue = null;
|
|
67340
67343
|
this.dateControl.setValue(null, { emitEvent: false });
|
|
@@ -67440,6 +67443,7 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
|
|
|
67440
67443
|
this.dateControl.markAsDirty();
|
|
67441
67444
|
this.inputValue = "";
|
|
67442
67445
|
this._initialValue = null;
|
|
67446
|
+
this.currentAlias = null;
|
|
67443
67447
|
if (this.control) {
|
|
67444
67448
|
this.control.reset();
|
|
67445
67449
|
this.control.markAsTouched();
|
package/main.js
CHANGED
|
@@ -40964,9 +40964,9 @@ var VerificationRequestBodyStrategy = class _VerificationRequestBodyStrategy {
|
|
|
40964
40964
|
const prefixedKey = field_id === "merchant_name" ? "p_domains" : `p_${field_id}`;
|
|
40965
40965
|
if (field.field_data_type === "TIMESTAMP" && value) {
|
|
40966
40966
|
const { start, end, alias } = value;
|
|
40967
|
-
if (start && end || alias) {
|
|
40968
|
-
let startDate = start;
|
|
40969
|
-
let endDate = end;
|
|
40967
|
+
if (start && end || alias && alias !== "custom") {
|
|
40968
|
+
let startDate = structuredClone(start);
|
|
40969
|
+
let endDate = structuredClone(end);
|
|
40970
40970
|
if (alias && alias !== "custom") {
|
|
40971
40971
|
startDate = dateTransform(alias, "start");
|
|
40972
40972
|
endDate = dateTransform(alias, "end");
|
|
@@ -64890,6 +64890,9 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
|
|
|
64890
64890
|
this.elementRef = elementRef;
|
|
64891
64891
|
this.shadowDomStyleInjectorService = shadowDomStyleInjectorService;
|
|
64892
64892
|
this.dateControl.valueChanges.subscribe((dates) => {
|
|
64893
|
+
if (!dates || !dates[0] || !dates[1] && this.requireEndDate) {
|
|
64894
|
+
return;
|
|
64895
|
+
}
|
|
64893
64896
|
if (this.manualDateChange) {
|
|
64894
64897
|
this.currentAlias = TimePeriod.Custom;
|
|
64895
64898
|
this.manualDateChange = false;
|
|
@@ -64950,7 +64953,7 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
|
|
|
64950
64953
|
return this.requireEndDate ? endDateRequired(control) : null;
|
|
64951
64954
|
}
|
|
64952
64955
|
writeValue(value) {
|
|
64953
|
-
if (!value || typeof value !== "object" || !("alias" in value)) {
|
|
64956
|
+
if (!value || typeof value !== "object" || !("alias" in value) || value.alias == "custom" && (!value.start || !value.end && this.requireEndDate)) {
|
|
64954
64957
|
this.inputValue = "";
|
|
64955
64958
|
this._initialValue = null;
|
|
64956
64959
|
this.dateControl.setValue(null, { emitEvent: false });
|
|
@@ -65056,6 +65059,7 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
|
|
|
65056
65059
|
this.dateControl.markAsDirty();
|
|
65057
65060
|
this.inputValue = "";
|
|
65058
65061
|
this._initialValue = null;
|
|
65062
|
+
this.currentAlias = null;
|
|
65059
65063
|
if (this.control) {
|
|
65060
65064
|
this.control.reset();
|
|
65061
65065
|
this.control.markAsTouched();
|