@datarailsshared/datarailsshared 1.4.165-rocket → 1.4.166
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 +38 -63
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.166.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/date-tags/day-tag/day-tag.component.js +8 -3
- package/esm2015/lib/date-tags/month-tag/month-tag.component.js +8 -3
- package/esm2015/lib/date-tags/year-tag/year-tag.component.js +11 -11
- package/esm2015/lib/dr-dialog/components/dialog-wrapper/dialog-wrapper.component.js +4 -1
- package/esm2015/lib/dr-dialog/services/dialog.service.js +4 -1
- package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker/dr-date-picker.component.js +2 -2
- package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.js +1 -2
- package/esm2015/lib/dr-inputs/date-pickers/services/dr-date-picker.service.js +1 -2
- package/esm2015/lib/dr-inputs/dr-inputs.module.js +2 -3
- package/esm2015/lib/dr-inputs/dr-toggle-button/dr-toggle-button.component.js +3 -8
- package/esm2015/lib/dr-tags/dr-tag.component.js +5 -17
- package/esm2015/lib/models/serverTags.js +1 -13
- package/esm2015/public-api.js +1 -3
- package/fesm2015/datarailsshared-datarailsshared.js +40 -61
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/date-tags/date-tag.module.d.ts +1 -2
- package/lib/date-tags/year-tag/year-tag.component.d.ts +1 -3
- package/lib/dr-dialog/components/dialog-wrapper/dialog-wrapper.component.d.ts +1 -0
- package/lib/dr-dialog/services/dialog.service.d.ts +1 -0
- package/lib/dr-inputs/dr-toggle-button/dr-toggle-button.component.d.ts +0 -3
- package/lib/dr-tags/dr-tag.component.d.ts +3 -7
- package/lib/models/serverTags.d.ts +1 -15
- package/package.json +1 -1
- package/public-api.d.ts +1 -2
- package/datarailsshared-datarailsshared-1.4.165-rocket.tgz +0 -0
- package/esm2015/lib/dr-inputs/dr-toggle-button/toggle-button-theme.js +0 -6
- package/lib/dr-inputs/dr-toggle-button/toggle-button-theme.d.ts +0 -4
|
@@ -612,8 +612,13 @@
|
|
|
612
612
|
configurable: true
|
|
613
613
|
});
|
|
614
614
|
MonthTagComponent.prototype.initDate = function () {
|
|
615
|
-
|
|
616
|
-
|
|
615
|
+
if (this.defaultValue) {
|
|
616
|
+
this.date = this.defaultValue;
|
|
617
|
+
this.dateObj.date = this.date;
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
this.dateObj.date = moment$7().unix();
|
|
621
|
+
}
|
|
617
622
|
};
|
|
618
623
|
MonthTagComponent.prototype.initName = function () {
|
|
619
624
|
if (!this.name) {
|
|
@@ -889,9 +894,8 @@
|
|
|
889
894
|
var ɵ0$5 = YEAR_FORMATS;
|
|
890
895
|
var YearTagComponent = /** @class */ (function (_super) {
|
|
891
896
|
__extends(YearTagComponent, _super);
|
|
892
|
-
function YearTagComponent(
|
|
897
|
+
function YearTagComponent() {
|
|
893
898
|
var _this = _super.call(this) || this;
|
|
894
|
-
_this.cdr = cdr;
|
|
895
899
|
_this.lockedDate = [];
|
|
896
900
|
return _this;
|
|
897
901
|
}
|
|
@@ -903,12 +907,15 @@
|
|
|
903
907
|
configurable: true
|
|
904
908
|
});
|
|
905
909
|
YearTagComponent.prototype.initDate = function () {
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
910
|
+
if (this.defaultValue) {
|
|
911
|
+
this.date = this.defaultValue;
|
|
912
|
+
this.dateObj.date = this.date;
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
this.dateObj.date = moment$4().unix();
|
|
916
|
+
}
|
|
909
917
|
};
|
|
910
918
|
YearTagComponent.prototype.initName = function () {
|
|
911
|
-
console.warn('bla bla bla');
|
|
912
919
|
if (!this.name) {
|
|
913
920
|
this.name = 'Year';
|
|
914
921
|
}
|
|
@@ -950,9 +957,7 @@
|
|
|
950
957
|
styles: [":host.locked>.tag-wrapper>dr-date-picker{opacity:.4}.tag__label{margin:0 0 4px;color:#0c142b;font-size:14px;font-weight:400;line-height:22px}\n"]
|
|
951
958
|
},] }
|
|
952
959
|
];
|
|
953
|
-
YearTagComponent.ctorParameters = function () { return [
|
|
954
|
-
{ type: i0.ChangeDetectorRef }
|
|
955
|
-
]; };
|
|
960
|
+
YearTagComponent.ctorParameters = function () { return []; };
|
|
956
961
|
YearTagComponent.propDecorators = {
|
|
957
962
|
isLocked: [{ type: i0.HostBinding, args: ['class.locked',] }],
|
|
958
963
|
lockedDate: [{ type: i0.Input }]
|
|
@@ -965,52 +970,30 @@
|
|
|
965
970
|
TagTypes["LIST"] = "LIST";
|
|
966
971
|
TagTypes["DATE"] = "DATE";
|
|
967
972
|
})(exports.TagTypes || (exports.TagTypes = {}));
|
|
968
|
-
var TagsConfigSubType;
|
|
969
|
-
(function (TagsConfigSubType) {
|
|
970
|
-
TagsConfigSubType["YEAR"] = "year";
|
|
971
|
-
TagsConfigSubType["PLAN"] = "plan";
|
|
972
|
-
TagsConfigSubType["BUDGET_CYCLE"] = "budget cycle";
|
|
973
|
-
TagsConfigSubType["MONTH"] = "month";
|
|
974
|
-
TagsConfigSubType["WEEK"] = "week";
|
|
975
|
-
TagsConfigSubType["DAY"] = "day";
|
|
976
|
-
TagsConfigSubType["FORECAST_NEW"] = "forecast_new";
|
|
977
|
-
TagsConfigSubType["QUARTER"] = "quarter";
|
|
978
|
-
TagsConfigSubType["FILE_STATUS"] = "file_status";
|
|
979
|
-
})(TagsConfigSubType || (TagsConfigSubType = {}));
|
|
980
973
|
|
|
981
974
|
var DrTagComponent = /** @class */ (function () {
|
|
982
975
|
function DrTagComponent() {
|
|
983
976
|
this.lockedDate = [];
|
|
984
977
|
this.dynamicTagValues = {};
|
|
978
|
+
this.connectedTags = [];
|
|
985
979
|
this.tagChange = new i0.EventEmitter(); // Not emit value for dynamic tag
|
|
986
980
|
this.dynamicTagChange = new i0.EventEmitter();
|
|
987
981
|
this.dynamicTagAdd = new i0.EventEmitter();
|
|
988
982
|
this.currentTagConnectedToDynamic = false;
|
|
989
983
|
this.tagTypes = exports.TagTypes;
|
|
990
984
|
this.connectedTagsValues = [];
|
|
991
|
-
this._connectedTags = [];
|
|
992
985
|
this.selectedTag = {
|
|
993
986
|
id: 0,
|
|
994
987
|
value: undefined,
|
|
995
988
|
name: ''
|
|
996
989
|
};
|
|
997
990
|
}
|
|
998
|
-
Object.defineProperty(DrTagComponent.prototype, "connectedTags", {
|
|
999
|
-
get: function () {
|
|
1000
|
-
return this._connectedTags;
|
|
1001
|
-
},
|
|
1002
|
-
set: function (tags) {
|
|
1003
|
-
this._connectedTags = tags || [];
|
|
1004
|
-
},
|
|
1005
|
-
enumerable: false,
|
|
1006
|
-
configurable: true
|
|
1007
|
-
});
|
|
1008
|
-
DrTagComponent.prototype.ngOnChanges = function () {
|
|
1009
|
-
this.calculateDynamicTag();
|
|
1010
|
-
};
|
|
1011
991
|
DrTagComponent.prototype.ngOnInit = function () {
|
|
992
|
+
var _this = this;
|
|
1012
993
|
var _a, _b;
|
|
1013
|
-
this.
|
|
994
|
+
this.currentTagDynamic = this.tagConfig.options.is_custom;
|
|
995
|
+
this.currentTagConnectedToDynamic = _.some(this.tagsConfig, function (tagConfig) { return tagConfig.options.is_custom
|
|
996
|
+
&& ['year'].includes(_this.tagConfig.options.sub_type); });
|
|
1014
997
|
this.dateTag = {
|
|
1015
998
|
type: this.tagConfig.type,
|
|
1016
999
|
sub_type: this.tagConfig.options.sub_type,
|
|
@@ -1125,12 +1108,6 @@
|
|
|
1125
1108
|
}
|
|
1126
1109
|
});
|
|
1127
1110
|
};
|
|
1128
|
-
DrTagComponent.prototype.calculateDynamicTag = function () {
|
|
1129
|
-
var _this = this;
|
|
1130
|
-
this.currentTagDynamic = this.tagConfig.options.is_custom;
|
|
1131
|
-
this.currentTagConnectedToDynamic = _.some(this.tagsConfig, function (tagConfig) { return tagConfig.options.is_custom
|
|
1132
|
-
&& ['year'].includes(_this.tagConfig.options.sub_type); });
|
|
1133
|
-
};
|
|
1134
1111
|
return DrTagComponent;
|
|
1135
1112
|
}());
|
|
1136
1113
|
DrTagComponent.decorators = [
|
|
@@ -1224,8 +1201,13 @@
|
|
|
1224
1201
|
configurable: true
|
|
1225
1202
|
});
|
|
1226
1203
|
DayTagComponent.prototype.initDate = function () {
|
|
1227
|
-
|
|
1228
|
-
|
|
1204
|
+
if (this.defaultValue) {
|
|
1205
|
+
this.date = this.defaultValue;
|
|
1206
|
+
this.dateObj.date = this.date;
|
|
1207
|
+
}
|
|
1208
|
+
else {
|
|
1209
|
+
this.dateObj.date = moment$3().unix();
|
|
1210
|
+
}
|
|
1229
1211
|
};
|
|
1230
1212
|
DayTagComponent.prototype.initName = function () {
|
|
1231
1213
|
if (!this.name) {
|
|
@@ -2461,20 +2443,12 @@
|
|
|
2461
2443
|
elementClass: [{ type: i0.HostBinding, args: ['class',] }]
|
|
2462
2444
|
};
|
|
2463
2445
|
|
|
2464
|
-
exports.ToggleButtonTheme = void 0;
|
|
2465
|
-
(function (ToggleButtonTheme) {
|
|
2466
|
-
ToggleButtonTheme["DEFAULT"] = "default";
|
|
2467
|
-
ToggleButtonTheme["DOTTED"] = "dotted";
|
|
2468
|
-
})(exports.ToggleButtonTheme || (exports.ToggleButtonTheme = {}));
|
|
2469
|
-
|
|
2470
2446
|
var DrToggleButtonComponent = /** @class */ (function () {
|
|
2471
2447
|
function DrToggleButtonComponent(cdr) {
|
|
2472
2448
|
this.cdr = cdr;
|
|
2473
2449
|
this._disabled = false;
|
|
2474
2450
|
this.bindLabel = null;
|
|
2475
2451
|
this.bindValue = null;
|
|
2476
|
-
this.bindHidden = null;
|
|
2477
|
-
this.theme = exports.ToggleButtonTheme.DEFAULT;
|
|
2478
2452
|
this.onChange = function () {
|
|
2479
2453
|
};
|
|
2480
2454
|
this.onTouched = function () {
|
|
@@ -2511,12 +2485,12 @@
|
|
|
2511
2485
|
DrToggleButtonComponent.decorators = [
|
|
2512
2486
|
{ type: i0.Component, args: [{
|
|
2513
2487
|
selector: 'dr-toggle-button',
|
|
2514
|
-
template: "<div class=\"toggle-container\"
|
|
2488
|
+
template: "<div class=\"toggle-container\" [class.disabled]=\"_disabled\">\n <div\n *ngFor=\"let item of items\"\n (click)=\"setValue(item)\"\n [class.selected]=\"item[bindValue] === selectedValue || item === selectedValue\"\n [class.disabled]=\"item.disabled\"\n class=\"toggle-container__item\"\n >\n {{ item[bindLabel] || item.name || item }}\n </div>\n</div>\n",
|
|
2515
2489
|
providers: [
|
|
2516
2490
|
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return DrToggleButtonComponent; }), multi: true }
|
|
2517
2491
|
],
|
|
2518
2492
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2519
|
-
styles: [".toggle-container{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c}.toggle-container__item.selected{background:#f2f2fb
|
|
2493
|
+
styles: [".toggle-container{display:flex;flex-wrap:nowrap;background:#f6f7f8;border:1px solid #c3c4ce;box-sizing:border-box;border-radius:20px;height:28px}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c}.toggle-container__item.selected{font-weight:400;background:#f2f2fb;border:1px solid #7f7fdd;color:#25258c}.toggle-container__item.disabled{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}\n"]
|
|
2520
2494
|
},] }
|
|
2521
2495
|
];
|
|
2522
2496
|
DrToggleButtonComponent.ctorParameters = function () { return [
|
|
@@ -2526,8 +2500,6 @@
|
|
|
2526
2500
|
items: [{ type: i0.Input }],
|
|
2527
2501
|
bindLabel: [{ type: i0.Input }],
|
|
2528
2502
|
bindValue: [{ type: i0.Input }],
|
|
2529
|
-
bindHidden: [{ type: i0.Input }],
|
|
2530
|
-
theme: [{ type: i0.Input }],
|
|
2531
2503
|
selectedValue: [{ type: i0.Input }],
|
|
2532
2504
|
disabled: [{ type: i0.Input }]
|
|
2533
2505
|
};
|
|
@@ -3929,6 +3901,9 @@
|
|
|
3929
3901
|
DialogWrapperComponent.prototype.closeDialog = function (data) {
|
|
3930
3902
|
this.dialogRef.close(data || false);
|
|
3931
3903
|
};
|
|
3904
|
+
DialogWrapperComponent.prototype.enableAcceptButton = function () {
|
|
3905
|
+
this.dialogData.acceptButton.isDisabled = false;
|
|
3906
|
+
};
|
|
3932
3907
|
DialogWrapperComponent.prototype.onDecline = function () {
|
|
3933
3908
|
this.dialogRef.close(undefined);
|
|
3934
3909
|
};
|
|
@@ -4117,6 +4092,9 @@
|
|
|
4117
4092
|
DialogService.prototype.close = function (params) {
|
|
4118
4093
|
this.wrapperComponent.close(params);
|
|
4119
4094
|
};
|
|
4095
|
+
DialogService.prototype.enableAcceptButton = function () {
|
|
4096
|
+
this.wrapperComponent.componentInstance.enableAcceptButton();
|
|
4097
|
+
};
|
|
4120
4098
|
DialogService.prototype.changeDialogThemeSize = function (theme) {
|
|
4121
4099
|
this.wrapperComponent.componentInstance.class = theme;
|
|
4122
4100
|
};
|
|
@@ -4341,7 +4319,6 @@
|
|
|
4341
4319
|
return DrSharedUtils;
|
|
4342
4320
|
}());
|
|
4343
4321
|
|
|
4344
|
-
// @ts-ignore
|
|
4345
4322
|
var moment$2 = require('moment');
|
|
4346
4323
|
var DrDatePickerService = /** @class */ (function () {
|
|
4347
4324
|
function DrDatePickerService() {
|
|
@@ -4532,7 +4509,6 @@
|
|
|
4532
4509
|
{ type: i0.Injectable }
|
|
4533
4510
|
];
|
|
4534
4511
|
|
|
4535
|
-
// @ts-ignore
|
|
4536
4512
|
var moment$1 = require('moment');
|
|
4537
4513
|
var DrDatePickerCustomHeaderComponent = /** @class */ (function () {
|
|
4538
4514
|
function DrDatePickerCustomHeaderComponent(_calendar, _dateAdapter, _dateFormats, cdr, datePickerService) {
|
|
@@ -4920,7 +4896,7 @@
|
|
|
4920
4896
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
4921
4897
|
providers: [
|
|
4922
4898
|
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: DrDatePickerComponent, multi: true },
|
|
4923
|
-
DrDatePickerService
|
|
4899
|
+
{ provide: DrDatePickerService }
|
|
4924
4900
|
],
|
|
4925
4901
|
styles: [":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 #c3c4ce;border-radius:6px;color:#85889c;overflow:hidden;outline:none;cursor:pointer}:host:hover{border-color:#85889c}:host:focus-within{border-color:#4646ce!important;color:#151b3f}:host.disabled{pointer-events:none;border:1px solid #aeabac;background:#f0f1f4}:host.disabled:after{color:#aeabac}:host.ng-valid.ng-dirty{border-color:#03a678}:host.ng-invalid.ng-dirty:not(:focus-within){border-color:#de2833!important}:host.ng-untouched.ng-valid{border-color:#c3c4ce}:host:after,:host:before{position:absolute;display:flex;border-color:#999999 transparent transparent;color:#999}:host:after{content:\"\\e9b6\";font-family:DataRails;font-size:24px;color:#6d6e6f;top:0;bottom:0;right:8px;position:absolute;display:flex;align-items:center;justify-content:center}:host i{position:absolute;color:#999;left:8px;top:3px}: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}::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:#f3f7ff}::ng-deep .mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:1!important;background:#f3f7ff;transition:opacity .2s cubic-bezier(.35,0,.25,1)}::ng-deep .mat-calendar-controls .mat-calendar-period-button:hover{background:#f3f7ff;transition:background .2s cubic-bezier(.35,0,.25,1)}::ng-deep .mat-calendar-table-header th{font-size:14px;font-weight:600;color:#19181a}::ng-deep .mat-calendar-table-header-divider{display:none}::ng-deep .mat-calendar-body-label{color:#fff;padding:0}\n"]
|
|
4926
4902
|
},] }
|
|
@@ -5426,8 +5402,7 @@
|
|
|
5426
5402
|
datepicker.MatDatepickerModule,
|
|
5427
5403
|
tooltip.MatTooltipModule,
|
|
5428
5404
|
DrTooltipModule
|
|
5429
|
-
]
|
|
5430
|
-
entryComponents: [DrDatePickerCustomHeaderComponent]
|
|
5405
|
+
]
|
|
5431
5406
|
},] }
|
|
5432
5407
|
];
|
|
5433
5408
|
|