@datarailsshared/datarailsshared 1.4.305 → 1.4.324
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/bundles/datarailsshared-datarailsshared.umd.js +23 -30
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.324.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/date-tags/forecast-tag/forecast-tag.component.js +19 -29
- package/esm2015/lib/date-tags/quarter-tag/quarter-tag.component.js +6 -3
- package/esm2015/lib/dr-inputs/dr-select/dr-select.component.js +1 -1
- package/fesm2015/datarailsshared-datarailsshared.js +24 -31
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/date-tags/forecast-tag/forecast-tag.component.d.ts +2 -4
- package/lib/date-tags/quarter-tag/quarter-tag.component.d.ts +2 -2
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.4.305.tgz +0 -0
|
@@ -415,6 +415,7 @@
|
|
|
415
415
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
+
/* BEFORE MERGE INTO MASTER YOU MUST CONSULT WITH ARTEM LAZIUK !!!*/
|
|
418
419
|
// @ts-ignore
|
|
419
420
|
var moment$8 = require('moment');
|
|
420
421
|
var ForecastTagComponent = /** @class */ (function (_super) {
|
|
@@ -441,24 +442,19 @@
|
|
|
441
442
|
_this.initDateValue = null;
|
|
442
443
|
return _this;
|
|
443
444
|
}
|
|
444
|
-
ForecastTagComponent.prototype.ngOnChanges = function () {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
ForecastTagComponent.prototype.isNeedToIncrementYear = function (dateObj, fiscalYearStartsFrom) {
|
|
449
|
-
return dateObj.month() + 1 >= fiscalYearStartsFrom;
|
|
445
|
+
ForecastTagComponent.prototype.ngOnChanges = function (changes) {
|
|
446
|
+
if (changes.lockedDate) {
|
|
447
|
+
this.updateLockedDate();
|
|
448
|
+
}
|
|
450
449
|
};
|
|
451
450
|
ForecastTagComponent.prototype.initDate = function () {
|
|
452
451
|
var dateVal = this.defaultValue ? moment$8.unix(this.defaultValue) : moment$8();
|
|
453
452
|
var fiscal_year_starts_from = this.fiscalYearStartsFrom || 1;
|
|
454
|
-
var fiscal_year_back = this.fiscalYearBack || false;
|
|
455
453
|
this.forecastValue = this.getFiscalMonthFromDate(dateVal, fiscal_year_starts_from) - 1;
|
|
456
|
-
this.
|
|
457
|
-
var fiscal_year = this.getFiscalYearFromDate(dateVal, fiscal_year_starts_from, fiscal_year_back);
|
|
458
|
-
this.updateYear(fiscal_year, this.forecastValue);
|
|
454
|
+
this.updateYear(dateVal.year(), this.forecastValue);
|
|
459
455
|
this.updateLockedDate();
|
|
460
456
|
if (!this.initDateValue) {
|
|
461
|
-
this.initDateValue =
|
|
457
|
+
this.initDateValue = _.cloneDeep(this.dateObj.date);
|
|
462
458
|
}
|
|
463
459
|
};
|
|
464
460
|
ForecastTagComponent.prototype.updateYear = function (fiscalYear, month) {
|
|
@@ -495,18 +491,15 @@
|
|
|
495
491
|
return all_months.indexOf(dateObj.month() + 1) + 1;
|
|
496
492
|
};
|
|
497
493
|
ForecastTagComponent.prototype.getFiscalYearFromDate = function (dateObj, fiscal_year_starts_from, fiscal_year_back) {
|
|
498
|
-
var _a;
|
|
499
494
|
var fiscal_year = dateObj.year();
|
|
500
|
-
if (
|
|
501
|
-
if (
|
|
502
|
-
|
|
503
|
-
fiscal_year += 1;
|
|
504
|
-
}
|
|
495
|
+
if (!fiscal_year_back) {
|
|
496
|
+
if (dateObj.month() + 1 >= fiscal_year_starts_from && fiscal_year_starts_from !== 1) {
|
|
497
|
+
fiscal_year += 1;
|
|
505
498
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
if (dateObj.month() + 1 < fiscal_year_starts_from && fiscal_year_starts_from !== 1) {
|
|
502
|
+
fiscal_year -= 1;
|
|
510
503
|
}
|
|
511
504
|
}
|
|
512
505
|
return fiscal_year;
|
|
@@ -516,6 +509,7 @@
|
|
|
516
509
|
};
|
|
517
510
|
ForecastTagComponent.prototype.changeYearInputHandler = function (event) {
|
|
518
511
|
this.updateLockedDate();
|
|
512
|
+
this.initDateValue = _.cloneDeep(this.dateObj.date);
|
|
519
513
|
this.chosenTagHandler();
|
|
520
514
|
};
|
|
521
515
|
ForecastTagComponent.prototype.chosenTagHandler = function () {
|
|
@@ -525,7 +519,6 @@
|
|
|
525
519
|
return;
|
|
526
520
|
var month = this.forecastValue;
|
|
527
521
|
var year = moment$8.unix(this.dateObj.date).year();
|
|
528
|
-
var dateValueResult;
|
|
529
522
|
if (!Number.isNaN(month) && !Number.isNaN(year)) {
|
|
530
523
|
var date = new Date(year, month, 1, 12, 0, 0, 0);
|
|
531
524
|
var fiscal_year_starts_from = this.fiscalYearStartsFrom || 1;
|
|
@@ -538,10 +531,7 @@
|
|
|
538
531
|
date.setMonth(date.getMonth() - 1 + fiscal_year_starts_from);
|
|
539
532
|
}
|
|
540
533
|
}
|
|
541
|
-
|
|
542
|
-
var initDate = moment$8.unix(this.dateObj.date).set('month', month);
|
|
543
|
-
var fiscal_year = this.getFiscalYearFromDate(initDate, fiscal_year_starts_from, fiscal_year_back);
|
|
544
|
-
this.updateYear(fiscal_year, date.getMonth());
|
|
534
|
+
this.updateYear(year, date.getMonth());
|
|
545
535
|
this.isDateEventHappened = true;
|
|
546
536
|
setTimeout(function () {
|
|
547
537
|
_this.isDateEventHappened = false;
|
|
@@ -549,7 +539,7 @@
|
|
|
549
539
|
}
|
|
550
540
|
var resultTag = {
|
|
551
541
|
name: this.name,
|
|
552
|
-
value:
|
|
542
|
+
value: this.dateObj.date,
|
|
553
543
|
label: ((_a = _.find(this.forecastTags, { value: this.forecastValue })) === null || _a === void 0 ? void 0 : _a.label) + " (" + year + ")",
|
|
554
544
|
locked: !this.dateFilter(moment$8.unix(this.dateObj.date))
|
|
555
545
|
};
|
|
@@ -690,8 +680,11 @@
|
|
|
690
680
|
enumerable: false,
|
|
691
681
|
configurable: true
|
|
692
682
|
});
|
|
693
|
-
QuarterTagComponent.prototype.ngOnChanges = function () {
|
|
694
|
-
|
|
683
|
+
QuarterTagComponent.prototype.ngOnChanges = function (changes) {
|
|
684
|
+
if (changes.lockedDate) {
|
|
685
|
+
this.initName();
|
|
686
|
+
this.initTags();
|
|
687
|
+
}
|
|
695
688
|
};
|
|
696
689
|
QuarterTagComponent.prototype.ngOnInit = function () {
|
|
697
690
|
this.initName();
|
|
@@ -1909,7 +1902,7 @@
|
|
|
1909
1902
|
useExisting: DrSelectComponent,
|
|
1910
1903
|
multi: true
|
|
1911
1904
|
}],
|
|
1912
|
-
styles: ["@charset \"UTF-8\";:host{width:100%;height:32px}:host.textView::ng-deep{width:auto}:host.textView::ng-deep ng-select.ng-select .ng-select-container{border:none!important;cursor:pointer}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{-webkit-text-decoration-line:underline;text-decoration-line:underline;color:#0b5af9}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-arrow{border:none;width:auto;height:auto;display:flex;-webkit-text-decoration-line:none;text-decoration-line:none;top:0}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-arrow:before{font-family:DataRails!important;content:\"\\ea13\";font-size:24px;color:#333}:host.no-left-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-left-radius:0!important;border-top-left-radius:0!important}:host.no-right-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-right-radius:0!important;border-top-right-radius:0!important}:host.no-right-border ::ng-deep ng-select.ng-select .ng-select-container{border-right:none!important}:host.no-left-border ::ng-deep ng-select.ng-select .ng-select-container{border-left:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container{min-height:32px;height:32px;width:100%;border-radius:6px;border:1px solid #9EA1AA;box-shadow:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container:hover{border-color:#4646ce}:host ::ng-deep ng-select.ng-select .ng-select-container:focus-within{border-color:#4646ce}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input{top:0!important;line-height:30px;padding:0 50px 0 8px!important;color:#333;font-size:14px;font-weight:400}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input input::placeholder{color:#6d6e6f;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0 0 0 8px;height:100%;overflow:auto;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-input{padding:0 0 0 3px!important}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper{margin-right:7px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper .ng-arrow{border:none;width:auto;height:auto;display:flex;-webkit-text-decoration-line:none;text-decoration-line:none;top:0}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper .ng-arrow:before{font-family:DataRails!important;content:\"\\ea13\";font-size:24px;color:#6d6e6f}:host ::ng-deep ng-select.ng-select.ng-select-opened .ng-select-container{border-radius:6px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container{max-height:58px;height:100%}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{max-height:58px;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{color:#333;height:24px;padding:2px 16px;font-size:12px;margin:2px 4px 2px 0;background:#F0F1F4;display:flex;flex-direction:row-reverse;align-items:center;border-radius:12px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{line-height:20px;padding:0!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon{border:none!important;padding:0!important;width:20px;display:flex;align-items:center;color:transparent;margin-left:4px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:before{font-family:DataRails!important;content:\"\\
|
|
1905
|
+
styles: ["@charset \"UTF-8\";:host{width:100%;height:32px}:host.textView::ng-deep{width:auto}:host.textView::ng-deep ng-select.ng-select .ng-select-container{border:none!important;cursor:pointer}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{-webkit-text-decoration-line:underline;text-decoration-line:underline;color:#0b5af9}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-arrow{border:none;width:auto;height:auto;display:flex;-webkit-text-decoration-line:none;text-decoration-line:none;top:0}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-arrow:before{font-family:DataRails!important;content:\"\\ea13\";font-size:24px;color:#333}:host.no-left-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-left-radius:0!important;border-top-left-radius:0!important}:host.no-right-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-right-radius:0!important;border-top-right-radius:0!important}:host.no-right-border ::ng-deep ng-select.ng-select .ng-select-container{border-right:none!important}:host.no-left-border ::ng-deep ng-select.ng-select .ng-select-container{border-left:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container{min-height:32px;height:32px;width:100%;border-radius:6px;border:1px solid #9EA1AA;box-shadow:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container:hover{border-color:#4646ce}:host ::ng-deep ng-select.ng-select .ng-select-container:focus-within{border-color:#4646ce}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input{top:0!important;line-height:30px;padding:0 50px 0 8px!important;color:#333;font-size:14px;font-weight:400}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input input::placeholder{color:#6d6e6f;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0 0 0 8px;height:100%;overflow:auto;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-input{padding:0 0 0 3px!important}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper{margin-right:7px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper .ng-arrow{border:none;width:auto;height:auto;display:flex;-webkit-text-decoration-line:none;text-decoration-line:none;top:0}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper .ng-arrow:before{font-family:DataRails!important;content:\"\\ea13\";font-size:24px;color:#6d6e6f}:host ::ng-deep ng-select.ng-select.ng-select-opened .ng-select-container{border-radius:6px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container{max-height:58px;height:100%}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{max-height:58px;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{color:#333;height:24px;padding:2px 16px;font-size:12px;margin:2px 4px 2px 0;background:#F0F1F4;display:flex;flex-direction:row-reverse;align-items:center;border-radius:12px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{line-height:20px;padding:0!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon{border:none!important;padding:0!important;width:20px;display:flex;align-items:center;color:transparent;margin-left:4px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:before{font-family:DataRails!important;content:\"\\ea57\";font-size:20px;color:#333}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon,:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:hover{background:transparent!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#F0F1F4!important;border:1px solid #AEABAC!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#aeabac!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-arrow{color:#aeabac}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-arrow:before{color:#aeabac}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-input input::placeholder{color:#aeabac}:host ::ng-deep ng-select.ng-select.ng-select-single.ng-invalid.ng-touched .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-multiple.ng-invalid.ng-touched .ng-select-container{border-color:#bf1d30}:host.ng-invalid.ng-touched::ng-deep ng-select.ng-select .ng-select-container{border-color:#bf1d30}:host .dr-select__loading{position:relative;height:32px;width:24px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select{border:1px solid #DFE0E3;border-radius:4px!important;margin:8px 0;box-shadow:0 4px 8px 1px #00000040;background-color:#fff;overflow:hidden;padding:8px 0}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:empty{display:none}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;min-height:36px;padding:8px 12px;font-size:14px;line-height:22px;background:#FFFFFF}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option>.ng-option-label{text-overflow:ellipsis;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-marked{background:#F5F5F5}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{background:#EAEAFF;color:#333}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected span,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked span{font-weight:normal!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option-disabled{cursor:default}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option-disabled[role=group]{font-size:14px;line-height:22px;color:#aeabac;cursor:default}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option-disabled[role=group]:not(:first-of-type){border-top:1px solid #DFE0E3}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option-disabled[role=group]:hover{background:#FFFFFF}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .dr-select__option-with-desc__wrapper{color:#333}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{max-width:97%;word-break:break-word;color:#6d6e6f;font-weight:400;font-size:12px;line-height:20px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.ng-option-selected .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.ng-option-selected.ng-option-marked .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{color:#6d6e6f}\n"]
|
|
1913
1906
|
},] }
|
|
1914
1907
|
];
|
|
1915
1908
|
DrSelectComponent.ctorParameters = function () { return [
|