@datarailsshared/datarailsshared 1.4.296 → 1.4.305
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 +53 -33
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.305.tgz +0 -0
- package/datarailsshared-datarailsshared.d.ts +24 -24
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/datarailsshared-datarailsshared.js +25 -25
- package/esm2015/lib/date-tags/forecast-tag/forecast-tag.component.js +15 -8
- package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker/dr-date-picker.component.js +8 -1
- package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.js +3 -2
- package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.js +3 -3
- package/fesm2015/datarailsshared-datarailsshared.js +24 -10
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/date-tags/forecast-tag/forecast-tag.component.d.ts +2 -0
- package/lib/dr-inputs/date-pickers/dr-date-picker/dr-date-picker.component.d.ts +4 -0
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.4.296.tgz +0 -0
|
@@ -445,11 +445,15 @@
|
|
|
445
445
|
this.updateLockedDate();
|
|
446
446
|
this.chosenTagHandler();
|
|
447
447
|
};
|
|
448
|
+
ForecastTagComponent.prototype.isNeedToIncrementYear = function (dateObj, fiscalYearStartsFrom) {
|
|
449
|
+
return dateObj.month() + 1 >= fiscalYearStartsFrom;
|
|
450
|
+
};
|
|
448
451
|
ForecastTagComponent.prototype.initDate = function () {
|
|
449
452
|
var dateVal = this.defaultValue ? moment$8.unix(this.defaultValue) : moment$8();
|
|
450
453
|
var fiscal_year_starts_from = this.fiscalYearStartsFrom || 1;
|
|
451
454
|
var fiscal_year_back = this.fiscalYearBack || false;
|
|
452
455
|
this.forecastValue = this.getFiscalMonthFromDate(dateVal, fiscal_year_starts_from) - 1;
|
|
456
|
+
this.initialForecastValue = this.forecastValue;
|
|
453
457
|
var fiscal_year = this.getFiscalYearFromDate(dateVal, fiscal_year_starts_from, fiscal_year_back);
|
|
454
458
|
this.updateYear(fiscal_year, this.forecastValue);
|
|
455
459
|
this.updateLockedDate();
|
|
@@ -491,15 +495,18 @@
|
|
|
491
495
|
return all_months.indexOf(dateObj.month() + 1) + 1;
|
|
492
496
|
};
|
|
493
497
|
ForecastTagComponent.prototype.getFiscalYearFromDate = function (dateObj, fiscal_year_starts_from, fiscal_year_back) {
|
|
498
|
+
var _a;
|
|
494
499
|
var fiscal_year = dateObj.year();
|
|
495
|
-
if (
|
|
496
|
-
if (
|
|
497
|
-
|
|
500
|
+
if (this.initialForecastValue !== this.forecastValue && !!((_a = this.dateObj) === null || _a === void 0 ? void 0 : _a.date) && dateObj.year() - moment$8.unix(this.defaultValue).year() < 1 && fiscal_year_starts_from !== 1) {
|
|
501
|
+
if (!fiscal_year_back) {
|
|
502
|
+
if (this.isNeedToIncrementYear(dateObj, fiscal_year_starts_from)) {
|
|
503
|
+
fiscal_year += 1;
|
|
504
|
+
}
|
|
498
505
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
506
|
+
else {
|
|
507
|
+
if (!this.isNeedToIncrementYear(dateObj, fiscal_year_starts_from)) {
|
|
508
|
+
fiscal_year -= 1;
|
|
509
|
+
}
|
|
503
510
|
}
|
|
504
511
|
}
|
|
505
512
|
return fiscal_year;
|
|
@@ -6237,8 +6244,8 @@
|
|
|
6237
6244
|
var currentTimeframeOption = this.timeframeOptions.filter(function (option) { return option.value === _this._calendar.currentView; })[0];
|
|
6238
6245
|
var fullPeriodLabel = currentTimeframeOption.periodLabel();
|
|
6239
6246
|
if (this._calendar.currentView === exports.CalendarView.FOR_DAYS) {
|
|
6240
|
-
this.periodMonthLabel = fullPeriodLabel.
|
|
6241
|
-
this.periodYearLabel = fullPeriodLabel.
|
|
6247
|
+
this.periodMonthLabel = fullPeriodLabel.match(/[a-zA-Z]+/g).toString();
|
|
6248
|
+
this.periodYearLabel = fullPeriodLabel.match(/[0-9]+/g).toString();
|
|
6242
6249
|
}
|
|
6243
6250
|
else {
|
|
6244
6251
|
this.periodMonthLabel = '';
|
|
@@ -6323,6 +6330,16 @@
|
|
|
6323
6330
|
var noop = function () {
|
|
6324
6331
|
};
|
|
6325
6332
|
var ɵ0$2 = noop;
|
|
6333
|
+
var CustomDateAdapter = /** @class */ (function (_super) {
|
|
6334
|
+
__extends(CustomDateAdapter, _super);
|
|
6335
|
+
function CustomDateAdapter() {
|
|
6336
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
6337
|
+
}
|
|
6338
|
+
CustomDateAdapter.prototype.getFirstDayOfWeek = function () {
|
|
6339
|
+
return 1;
|
|
6340
|
+
};
|
|
6341
|
+
return CustomDateAdapter;
|
|
6342
|
+
}(materialMomentAdapter.MomentDateAdapter));
|
|
6326
6343
|
var DrDatePickerComponent = /** @class */ (function () {
|
|
6327
6344
|
function DrDatePickerComponent(cdr, dateAdapter, datePickerService) {
|
|
6328
6345
|
var _this = this;
|
|
@@ -6528,6 +6545,7 @@
|
|
|
6528
6545
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6529
6546
|
providers: [
|
|
6530
6547
|
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: DrDatePickerComponent, multi: true },
|
|
6548
|
+
{ provide: core.DateAdapter, useClass: CustomDateAdapter },
|
|
6531
6549
|
DrDatePickerService
|
|
6532
6550
|
],
|
|
6533
6551
|
styles: ["@charset \"UTF-8\";:host{position:relative;width:100%;display:flex;flex-direction:row;min-height:32px;height:32px;font-size:14px;font-family:\"Poppins\",sans-serif;background-color:#fff;border:1px solid #9EA1AA;border-radius:6px;color:#333;overflow:hidden;outline:none;cursor:pointer}:host:hover{border-color:#9ea1aa}:host.active,:host:focus-within{border-color:#4646ce!important;color:#333}:host.disabled{pointer-events:none;border:1px solid #AEABAC;background:#F0F1F4;color:#aeabac}:host.disabled:after{color:#aeabac}:host.ng-valid.ng-dirty{border-color:#037c5a}:host.ng-invalid.ng-dirty:not(:focus-within){border-color:#bf1d30!important}:host.ng-untouched.ng-valid{border-color:#9ea1aa}:host:after,:host:before{position:absolute;display:flex;border-color:#6D6E6F transparent transparent;color:#6d6e6f}:host:after{font-family:DataRails!important;content:\"\\ea13\";font-size:24px;color:#6d6e6f;top:0;bottom:0;right:8px;position:absolute;display:flex;align-items:center;justify-content:center;pointer-events:none}:host i{display:flex;align-items:center;position:absolute;color:#6d6e6f;left:8px;top:0;bottom:0}:host input{display:flex;flex-grow:1;height:100%;border:none;text-align:left;padding-left:35px;padding-right:25px;cursor:pointer!important;outline:none}:host input.when-quarter{position:absolute;visibility:hidden}:host input:disabled{border:none;color:#aeabac;background:transparent}:host input::-webkit-search-decoration,:host input::-webkit-search-cancel-button,:host input::-webkit-search-results-button,:host input::-webkit-search-results-decoration{-webkit-appearance:none}:host input::placeholder{color:#6d6e6f;font-size:14px;line-height:18px}::ng-deep .mat-datepicker-content{margin:7px 0;box-shadow:0 4px 8px 1px #00000040;border-radius:12px!important}::ng-deep .mat-datepicker-content button[disabled]{border:inherit;color:inherit;background-color:inherit}::ng-deep .mat-datepicker-content button[disabled]:hover{border:inherit}::ng-deep .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background:#F2F2FB;color:#4646ce;font-weight:600}::ng-deep .mat-calendar-body-selected{background-color:#4646ce;color:#f2f2fb;font-weight:600}::ng-deep .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:none}::ng-deep .mat-button-focus-overlay{background:#F5F5F5}::ng-deep .mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:1!important;background:#F5F5F5;transition:opacity .2s cubic-bezier(.35,0,.25,1)}::ng-deep .mat-calendar-controls .mat-calendar-period-button:hover{background:#F5F5F5;transition:background .2s cubic-bezier(.35,0,.25,1)}::ng-deep .mat-calendar-table-header th{font-size:14px;font-weight:600;color:#333}::ng-deep .mat-calendar-table-header-divider{display:none}::ng-deep .mat-calendar-body-label{color:#fff;padding:0}\n"]
|
|
@@ -6732,6 +6750,7 @@
|
|
|
6732
6750
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6733
6751
|
providers: [
|
|
6734
6752
|
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: DrDatePickerWithTimeframeComponent, multi: true },
|
|
6753
|
+
{ provide: core.DateAdapter, useClass: CustomDateAdapter },
|
|
6735
6754
|
{ provide: DrDatePickerService }
|
|
6736
6755
|
],
|
|
6737
6756
|
styles: ["@charset \"UTF-8\";:host{position:relative;width:100%;display:flex;flex-direction:row;min-height:32px;height:32px;font-size:14px;font-family:\"Poppins\",sans-serif;background-color:#fff;border:1px solid #9EA1AA;border-radius:6px;color:#333;overflow:hidden;outline:none;cursor:pointer}:host:hover{border-color:#9ea1aa}:host.active,:host:focus-within{border-color:#4646ce!important;color:#333}:host.disabled{pointer-events:none;border:1px solid #AEABAC;background:#F0F1F4;color:#aeabac}:host.disabled:after{color:#aeabac}:host.ng-valid.ng-dirty{border-color:#037c5a}:host.ng-invalid.ng-dirty:not(:focus-within){border-color:#bf1d30!important}:host.ng-untouched.ng-valid{border-color:#9ea1aa}:host:after,:host:before{position:absolute;display:flex;border-color:#6D6E6F transparent transparent;color:#6d6e6f}:host:after{font-family:DataRails!important;content:\"\\ea13\";font-size:24px;color:#6d6e6f;top:0;bottom:0;right:8px;position:absolute;display:flex;align-items:center;justify-content:center;pointer-events:none}:host i{display:flex;align-items:center;position:absolute;color:#6d6e6f;left:8px;top:0;bottom:0}:host input{display:flex;flex-grow:1;height:100%;border:none;text-align:left;padding-left:35px;padding-right:25px;cursor:pointer!important;outline:none}:host input.when-quarter{position:absolute;visibility:hidden}:host input:disabled{border:none;color:#aeabac;background:transparent}:host input::-webkit-search-decoration,:host input::-webkit-search-cancel-button,:host input::-webkit-search-results-button,:host input::-webkit-search-results-decoration{-webkit-appearance:none}:host input::placeholder{color:#6d6e6f;font-size:14px;line-height:18px}::ng-deep .mat-datepicker-content{margin:7px 0;box-shadow:0 4px 8px 1px #00000040;border-radius:12px!important}::ng-deep .mat-datepicker-content button[disabled]{border:inherit;color:inherit;background-color:inherit}::ng-deep .mat-datepicker-content button[disabled]:hover{border:inherit}::ng-deep .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background:#F2F2FB;color:#4646ce;font-weight:600}::ng-deep .mat-calendar-body-selected{background-color:#4646ce;color:#f2f2fb;font-weight:600}::ng-deep .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:none}::ng-deep .mat-button-focus-overlay{background:#F5F5F5}::ng-deep .mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:1!important;background:#F5F5F5;transition:opacity .2s cubic-bezier(.35,0,.25,1)}::ng-deep .mat-calendar-controls .mat-calendar-period-button:hover{background:#F5F5F5;transition:background .2s cubic-bezier(.35,0,.25,1)}::ng-deep .mat-calendar-table-header th{font-size:14px;font-weight:600;color:#333}::ng-deep .mat-calendar-table-header-divider{display:none}::ng-deep .mat-calendar-body-label{color:#fff;padding:0}:host{border:none;display:flex;align-items:center}:host.disabled{background:transparent;color:inherit}:host.disabled.dr-date-picker-on-dashboard .dr-datepicker-input-container__formatted-value-display{text-decoration:none;color:#6d6e6f;font-weight:normal}:host.dr-date-picker-on-dashboard{width:-moz-fit-content;width:fit-content;justify-content:space-between}:host.dr-date-picker-on-dashboard mat-datepicker{position:absolute}:host.dr-date-picker-on-dashboard:after{visibility:hidden}:host.dr-date-picker-on-dashboard .dr-datepicker-input-container{display:flex;flex-direction:row;justify-content:center;align-items:center;margin-left:-10px}:host.dr-date-picker-on-dashboard .dr-datepicker-input-container__formatted-value-display{font-weight:600;width:auto;margin-left:5px}:host.dr-date-picker-on-dashboard .dr-datepicker-input-container .dr-icon-date{display:block;position:relative;top:0;margin-right:8px;color:#4e566c}:host .dr-datepicker-input-container input{visibility:hidden;position:absolute;width:100%}:host .dr-datepicker-input-container__formatted-value-display{width:90px;height:22px;padding-left:0;text-align:center;line-height:22px;color:#0c142b;-webkit-text-decoration-line:underline;text-decoration-line:underline}:host .dr-datepicker-input-container__formatted-value-display:hover{background-color:#f2f2fb;border-radius:5px;cursor:pointer;-webkit-text-decoration-line:underline;text-decoration-line:underline;color:#4646ce}::ng-deep .date-picker-preset-tag{width:386px!important}::ng-deep .date-picker-preset-tag .mat-calendar-content{padding-left:32px!important;padding-right:32px!important}\n"]
|
|
@@ -8162,34 +8181,35 @@
|
|
|
8162
8181
|
exports.YearTagComponent = YearTagComponent;
|
|
8163
8182
|
exports["ɵa"] = components$1;
|
|
8164
8183
|
exports["ɵb"] = POPUP_ANIMATION;
|
|
8165
|
-
exports["ɵba"] =
|
|
8166
|
-
exports["ɵbb"] =
|
|
8167
|
-
exports["ɵbc"] =
|
|
8168
|
-
exports["ɵbd"] =
|
|
8184
|
+
exports["ɵba"] = DrChatCustomMessageDirective;
|
|
8185
|
+
exports["ɵbb"] = DrScenarioConfigurationComponent;
|
|
8186
|
+
exports["ɵbc"] = DrScenarioTagConfigurationComponent;
|
|
8187
|
+
exports["ɵbd"] = DrBadgeStatusComponent;
|
|
8188
|
+
exports["ɵbe"] = TreeviewItemComponent;
|
|
8169
8189
|
exports["ɵc"] = DrChatCustomMessageService;
|
|
8170
8190
|
exports["ɵd"] = DrChatMessageComponent;
|
|
8171
8191
|
exports["ɵe"] = DrChatFormComponent;
|
|
8172
8192
|
exports["ɵf"] = DrChatSuggestionsComponent;
|
|
8173
|
-
exports["ɵg"] =
|
|
8174
|
-
exports["ɵh"] =
|
|
8175
|
-
exports["ɵi"] =
|
|
8176
|
-
exports["ɵj"] =
|
|
8177
|
-
exports["ɵk"] =
|
|
8178
|
-
exports["ɵl"] =
|
|
8179
|
-
exports["ɵm"] =
|
|
8180
|
-
exports["ɵn"] =
|
|
8181
|
-
exports["ɵo"] =
|
|
8182
|
-
exports["ɵp"] =
|
|
8183
|
-
exports["ɵq"] =
|
|
8184
|
-
exports["ɵr"] =
|
|
8185
|
-
exports["ɵs"] =
|
|
8186
|
-
exports["ɵt"] =
|
|
8187
|
-
exports["ɵu"] =
|
|
8188
|
-
exports["ɵv"] =
|
|
8189
|
-
exports["ɵw"] =
|
|
8190
|
-
exports["ɵx"] =
|
|
8191
|
-
exports["ɵy"] =
|
|
8192
|
-
exports["ɵz"] =
|
|
8193
|
+
exports["ɵg"] = CustomDateAdapter;
|
|
8194
|
+
exports["ɵh"] = DrDatePickerComponent;
|
|
8195
|
+
exports["ɵi"] = DrDatePickerService;
|
|
8196
|
+
exports["ɵj"] = DrDatePickerWithTimeframeComponent;
|
|
8197
|
+
exports["ɵk"] = DrDatePickerFormatDirective;
|
|
8198
|
+
exports["ɵl"] = DrDatePickerCustomHeaderComponent;
|
|
8199
|
+
exports["ɵm"] = DrShowTimeframePipe;
|
|
8200
|
+
exports["ɵn"] = DrSelectAddItemComponent;
|
|
8201
|
+
exports["ɵo"] = TooltipInfoComponent;
|
|
8202
|
+
exports["ɵp"] = TooltipInfoSimpleComponent;
|
|
8203
|
+
exports["ɵq"] = TooltipNoBodyComponent;
|
|
8204
|
+
exports["ɵr"] = TooltipProcessDefaultComponent;
|
|
8205
|
+
exports["ɵs"] = DrDynamicTagModule;
|
|
8206
|
+
exports["ɵt"] = DrDynamicTagComponent;
|
|
8207
|
+
exports["ɵu"] = StepperComponent;
|
|
8208
|
+
exports["ɵv"] = DialogWrapperComponent;
|
|
8209
|
+
exports["ɵw"] = DialogModalWrapperComponent;
|
|
8210
|
+
exports["ɵx"] = DrChatMessageTextComponent;
|
|
8211
|
+
exports["ɵy"] = DrChatMessageFileComponent;
|
|
8212
|
+
exports["ɵz"] = DrDotFlashingComponent;
|
|
8193
8213
|
|
|
8194
8214
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8195
8215
|
|