@datarailsshared/datarailsshared 1.4.308 → 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 +14 -25
- 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 +15 -26
- package/esm2015/lib/dr-inputs/dr-select/dr-select.component.js +1 -1
- package/fesm2015/datarailsshared-datarailsshared.js +15 -26
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/date-tags/forecast-tag/forecast-tag.component.d.ts +0 -2
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.4.308.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) {
|
|
@@ -446,20 +447,14 @@
|
|
|
446
447
|
this.updateLockedDate();
|
|
447
448
|
}
|
|
448
449
|
};
|
|
449
|
-
ForecastTagComponent.prototype.isNeedToIncrementYear = function (dateObj, fiscalYearStartsFrom) {
|
|
450
|
-
return dateObj.month() + 1 >= fiscalYearStartsFrom;
|
|
451
|
-
};
|
|
452
450
|
ForecastTagComponent.prototype.initDate = function () {
|
|
453
451
|
var dateVal = this.defaultValue ? moment$8.unix(this.defaultValue) : moment$8();
|
|
454
452
|
var fiscal_year_starts_from = this.fiscalYearStartsFrom || 1;
|
|
455
|
-
var fiscal_year_back = this.fiscalYearBack || false;
|
|
456
453
|
this.forecastValue = this.getFiscalMonthFromDate(dateVal, fiscal_year_starts_from) - 1;
|
|
457
|
-
this.
|
|
458
|
-
var fiscal_year = this.getFiscalYearFromDate(dateVal, fiscal_year_starts_from, fiscal_year_back);
|
|
459
|
-
this.updateYear(fiscal_year, this.forecastValue);
|
|
454
|
+
this.updateYear(dateVal.year(), this.forecastValue);
|
|
460
455
|
this.updateLockedDate();
|
|
461
456
|
if (!this.initDateValue) {
|
|
462
|
-
this.initDateValue =
|
|
457
|
+
this.initDateValue = _.cloneDeep(this.dateObj.date);
|
|
463
458
|
}
|
|
464
459
|
};
|
|
465
460
|
ForecastTagComponent.prototype.updateYear = function (fiscalYear, month) {
|
|
@@ -496,18 +491,15 @@
|
|
|
496
491
|
return all_months.indexOf(dateObj.month() + 1) + 1;
|
|
497
492
|
};
|
|
498
493
|
ForecastTagComponent.prototype.getFiscalYearFromDate = function (dateObj, fiscal_year_starts_from, fiscal_year_back) {
|
|
499
|
-
var _a;
|
|
500
494
|
var fiscal_year = dateObj.year();
|
|
501
|
-
if (
|
|
502
|
-
if (
|
|
503
|
-
|
|
504
|
-
fiscal_year += 1;
|
|
505
|
-
}
|
|
495
|
+
if (!fiscal_year_back) {
|
|
496
|
+
if (dateObj.month() + 1 >= fiscal_year_starts_from && fiscal_year_starts_from !== 1) {
|
|
497
|
+
fiscal_year += 1;
|
|
506
498
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
if (dateObj.month() + 1 < fiscal_year_starts_from && fiscal_year_starts_from !== 1) {
|
|
502
|
+
fiscal_year -= 1;
|
|
511
503
|
}
|
|
512
504
|
}
|
|
513
505
|
return fiscal_year;
|
|
@@ -517,6 +509,7 @@
|
|
|
517
509
|
};
|
|
518
510
|
ForecastTagComponent.prototype.changeYearInputHandler = function (event) {
|
|
519
511
|
this.updateLockedDate();
|
|
512
|
+
this.initDateValue = _.cloneDeep(this.dateObj.date);
|
|
520
513
|
this.chosenTagHandler();
|
|
521
514
|
};
|
|
522
515
|
ForecastTagComponent.prototype.chosenTagHandler = function () {
|
|
@@ -526,7 +519,6 @@
|
|
|
526
519
|
return;
|
|
527
520
|
var month = this.forecastValue;
|
|
528
521
|
var year = moment$8.unix(this.dateObj.date).year();
|
|
529
|
-
var dateValueResult;
|
|
530
522
|
if (!Number.isNaN(month) && !Number.isNaN(year)) {
|
|
531
523
|
var date = new Date(year, month, 1, 12, 0, 0, 0);
|
|
532
524
|
var fiscal_year_starts_from = this.fiscalYearStartsFrom || 1;
|
|
@@ -539,10 +531,7 @@
|
|
|
539
531
|
date.setMonth(date.getMonth() - 1 + fiscal_year_starts_from);
|
|
540
532
|
}
|
|
541
533
|
}
|
|
542
|
-
|
|
543
|
-
var initDate = moment$8.unix(this.dateObj.date).set('month', month);
|
|
544
|
-
var fiscal_year = this.getFiscalYearFromDate(initDate, fiscal_year_starts_from, fiscal_year_back);
|
|
545
|
-
this.updateYear(fiscal_year, date.getMonth());
|
|
534
|
+
this.updateYear(year, date.getMonth());
|
|
546
535
|
this.isDateEventHappened = true;
|
|
547
536
|
setTimeout(function () {
|
|
548
537
|
_this.isDateEventHappened = false;
|
|
@@ -550,7 +539,7 @@
|
|
|
550
539
|
}
|
|
551
540
|
var resultTag = {
|
|
552
541
|
name: this.name,
|
|
553
|
-
value:
|
|
542
|
+
value: this.dateObj.date,
|
|
554
543
|
label: ((_a = _.find(this.forecastTags, { value: this.forecastValue })) === null || _a === void 0 ? void 0 : _a.label) + " (" + year + ")",
|
|
555
544
|
locked: !this.dateFilter(moment$8.unix(this.dateObj.date))
|
|
556
545
|
};
|
|
@@ -1913,7 +1902,7 @@
|
|
|
1913
1902
|
useExisting: DrSelectComponent,
|
|
1914
1903
|
multi: true
|
|
1915
1904
|
}],
|
|
1916
|
-
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"]
|
|
1917
1906
|
},] }
|
|
1918
1907
|
];
|
|
1919
1908
|
DrSelectComponent.ctorParameters = function () { return [
|