@datarailsshared/datarailsshared 1.3.21 → 1.3.24
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 +213 -13
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.3.24.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-avatar/dr-avatar.component.js +3 -3
- package/esm2015/lib/dr-dropdown/dr-dropdown-position.directive.js +2 -2
- package/esm2015/lib/dr-dropdown/dr-dropdown.component.js +2 -1
- package/esm2015/lib/dr-inputs/dr-input/dr-input.component.js +4 -2
- package/esm2015/lib/dr-inputs/dr-inputs.module.js +3 -1
- package/esm2015/lib/dr-inputs/dr-toggle/dr-toggle.component.js +12 -4
- package/esm2015/lib/dr-inputs/radio-button/radio-button.component.js +14 -5
- package/esm2015/lib/dr-inputs/radio-button/radio-group.component.js +164 -0
- package/esm2015/lib/models/dropdown.js +1 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/datarailsshared-datarailsshared.js +192 -14
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-inputs/dr-input/dr-input.component.d.ts +2 -0
- package/lib/dr-inputs/dr-toggle/dr-toggle.component.d.ts +5 -2
- package/lib/dr-inputs/radio-button/radio-button.component.d.ts +4 -1
- package/lib/dr-inputs/radio-button/radio-group.component.d.ts +39 -0
- package/lib/models/dropdown.d.ts +2 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/datarailsshared-datarailsshared-1.3.21.tgz +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material-moment-adapter'), require('moment'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@datarailsshared/datarailsshared', ['exports', '@angular/core', '@angular/forms', '@angular/material/core', '@angular/material-moment-adapter', 'moment', 'rxjs', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.datarailsshared = global.datarailsshared || {}, global.datarailsshared.datarailsshared = {}), global.ng.core, global.ng.forms, global.ng.material.core, global.ng.materialMomentAdapter, global.momentImported, global.rxjs, global.
|
|
5
|
-
}(this, (function (exports, i0, forms, core, materialMomentAdapter, momentImported, rxjs, animations, i1, portal,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material-moment-adapter'), require('moment'), require('@angular/common'), require('rxjs'), require('rxjs/operators'), require('@angular/animations'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/button-toggle'), require('@ng-select/ng-select'), require('@angular/material/tooltip'), require('@angular/material/tabs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@datarailsshared/datarailsshared', ['exports', '@angular/core', '@angular/forms', '@angular/material/core', '@angular/material-moment-adapter', 'moment', '@angular/common', 'rxjs', 'rxjs/operators', '@angular/animations', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/button-toggle', '@ng-select/ng-select', '@angular/material/tooltip', '@angular/material/tabs'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.datarailsshared = global.datarailsshared || {}, global.datarailsshared.datarailsshared = {}), global.ng.core, global.ng.forms, global.ng.material.core, global.ng.materialMomentAdapter, global.momentImported, global.ng.common, global.rxjs, global.rxjs.operators, global.ng.animations, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.buttonToggle, global.ngSelect, global.ng.material.tooltip, global.ng.material.tabs));
|
|
5
|
+
}(this, (function (exports, i0, forms, core, materialMomentAdapter, momentImported, common, rxjs, operators, animations, i1, portal, datepicker, formField, input, select, buttonToggle, ngSelect, tooltip, tabs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -1162,6 +1162,7 @@
|
|
|
1162
1162
|
var RadioButtonComponent = /** @class */ (function () {
|
|
1163
1163
|
function RadioButtonComponent(cdr) {
|
|
1164
1164
|
this.cdr = cdr;
|
|
1165
|
+
this.valueChange = new i0.EventEmitter();
|
|
1165
1166
|
this.onChange = (function (onchanges) { });
|
|
1166
1167
|
this.onTouched = function () { };
|
|
1167
1168
|
}
|
|
@@ -1189,6 +1190,14 @@
|
|
|
1189
1190
|
};
|
|
1190
1191
|
RadioButtonComponent.prototype.valueChanged = function (event) {
|
|
1191
1192
|
this.onChange(this.modelValue);
|
|
1193
|
+
this.valueChange.emit(this.value);
|
|
1194
|
+
};
|
|
1195
|
+
RadioButtonComponent.prototype._setName = function (name) {
|
|
1196
|
+
this.name = name;
|
|
1197
|
+
this.cdr.markForCheck();
|
|
1198
|
+
};
|
|
1199
|
+
RadioButtonComponent.prototype._markForCheck = function () {
|
|
1200
|
+
this.cdr.markForCheck();
|
|
1192
1201
|
};
|
|
1193
1202
|
return RadioButtonComponent;
|
|
1194
1203
|
}());
|
|
@@ -1204,8 +1213,7 @@
|
|
|
1204
1213
|
}
|
|
1205
1214
|
],
|
|
1206
1215
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1207
|
-
|
|
1208
|
-
styles: ["label input[type=radio].radiobox+span{vertical-align:middle;line-height:20px}input+span,input+span:after,input+span:before{box-sizing:content-box!important;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important}input{visibility:hidden;position:absolute;width:18px;height:18px}label input+span{position:relative;z-index:19;display:inline-block;margin:0 5px 0 0;line-height:17px;min-height:14px;min-width:14px}label input+span:hover{cursor:pointer}label input+span:before{content:\"\";font-size:14px;border-radius:0;display:inline-block;text-align:center;vertical-align:middle;padding:1px;height:12px;line-height:13px;width:12px;margin-right:5px;border:1px solid #C3C4CE;background-color:#fff;font-weight:normal;margin-top:-1px}label input+span:before{border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%}label input:checked+span:before,label:hover input:checked+span:before{background:white;border-color:#579bf2;color:#579bf2}label input:checked+span:before,label:hover input:checked+span:before{font-family:\"DataRails\"!important;background-image:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23579BF2\"/></svg> ');background-repeat:no-repeat;background-position:center;color:#579bf2}label input:disabled+span:before{border-color:#bcbcbc}label input[disabled]:checked+span:before{content:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23BCBCBC\"/></svg> ');border-color:#bcbcbc}label span:hover:before{border-color:#85889c}\n"]
|
|
1216
|
+
styles: [":host{display:flex;line-height:22px}label input[type=radio].radiobox+span{vertical-align:middle;line-height:20px}input+span,input+span:after,input+span:before{box-sizing:content-box!important;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important}input{visibility:hidden;position:absolute;width:18px;height:18px}label input+span{position:relative;z-index:19;display:inline-block;margin:0 5px 0 0;line-height:17px;min-height:14px;min-width:14px}label input+span:hover{cursor:pointer}label input+span:before{content:\"\";font-size:14px;border-radius:0;display:inline-block;text-align:center;vertical-align:middle;padding:1px;height:12px;line-height:13px;width:12px;margin-right:5px;border:1px solid #C3C4CE;background-color:#fff;font-weight:normal;margin-top:-1px}label input+span:before{border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%}label input:checked+span:before,label:hover input:checked+span:before{background:white;border-color:#579bf2;color:#579bf2}label input:checked+span:before,label:hover input:checked+span:before{font-family:\"DataRails\"!important;background-image:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23579BF2\"/></svg> ');background-repeat:no-repeat;background-position:center;color:#579bf2}label input:disabled+span:before{border-color:#bcbcbc}label input[disabled]:checked+span:before{content:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23BCBCBC\"/></svg> ');border-color:#bcbcbc}label span:hover:before{border-color:#85889c}\n"]
|
|
1209
1217
|
},] }
|
|
1210
1218
|
];
|
|
1211
1219
|
RadioButtonComponent.ctorParameters = function () { return [
|
|
@@ -1214,7 +1222,182 @@
|
|
|
1214
1222
|
RadioButtonComponent.propDecorators = {
|
|
1215
1223
|
disabled: [{ type: i0.Input }],
|
|
1216
1224
|
name: [{ type: i0.Input }],
|
|
1217
|
-
_value: [{ type: i0.Input, args: ['value',] }]
|
|
1225
|
+
_value: [{ type: i0.Input, args: ['value',] }],
|
|
1226
|
+
valueChange: [{ type: i0.Output }]
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
var RadioGroupComponent = /** @class */ (function () {
|
|
1230
|
+
function RadioGroupComponent(hostElement, platformId, document) {
|
|
1231
|
+
this.hostElement = hostElement;
|
|
1232
|
+
this.platformId = platformId;
|
|
1233
|
+
this.document = document;
|
|
1234
|
+
this.destroy$ = new rxjs.Subject();
|
|
1235
|
+
this.valueChange = new i0.EventEmitter();
|
|
1236
|
+
this.onChange = function (value) { };
|
|
1237
|
+
this.onTouched = function () { };
|
|
1238
|
+
}
|
|
1239
|
+
Object.defineProperty(RadioGroupComponent.prototype, "value", {
|
|
1240
|
+
get: function () {
|
|
1241
|
+
return this._value;
|
|
1242
|
+
},
|
|
1243
|
+
set: function (value) {
|
|
1244
|
+
this._value = value;
|
|
1245
|
+
this.updateValues();
|
|
1246
|
+
},
|
|
1247
|
+
enumerable: false,
|
|
1248
|
+
configurable: true
|
|
1249
|
+
});
|
|
1250
|
+
Object.defineProperty(RadioGroupComponent.prototype, "name", {
|
|
1251
|
+
get: function () {
|
|
1252
|
+
return this._name;
|
|
1253
|
+
},
|
|
1254
|
+
set: function (name) {
|
|
1255
|
+
this._name = name;
|
|
1256
|
+
this.updateNames();
|
|
1257
|
+
},
|
|
1258
|
+
enumerable: false,
|
|
1259
|
+
configurable: true
|
|
1260
|
+
});
|
|
1261
|
+
Object.defineProperty(RadioGroupComponent.prototype, "disabled", {
|
|
1262
|
+
get: function () {
|
|
1263
|
+
return this._disabled;
|
|
1264
|
+
},
|
|
1265
|
+
set: function (disabled) {
|
|
1266
|
+
this._disabled = !!disabled;
|
|
1267
|
+
this.updateDisabled();
|
|
1268
|
+
},
|
|
1269
|
+
enumerable: false,
|
|
1270
|
+
configurable: true
|
|
1271
|
+
});
|
|
1272
|
+
RadioGroupComponent.prototype.ngAfterContentInit = function () {
|
|
1273
|
+
var _this = this;
|
|
1274
|
+
// In case option 'name' isn't set on nb-radio component,
|
|
1275
|
+
// we need to set it's name right away, so it won't overlap with options
|
|
1276
|
+
// without names from other radio groups. Otherwise they all would have
|
|
1277
|
+
// same name and will be considered as options from one group so only the
|
|
1278
|
+
// last option will stay selected.
|
|
1279
|
+
this.updateNames();
|
|
1280
|
+
this.radios.changes
|
|
1281
|
+
.pipe(operators.startWith(this.radios),
|
|
1282
|
+
// 'changes' emit during change detection run and we can't update
|
|
1283
|
+
// option properties right of since they already was initialized.
|
|
1284
|
+
// Instead we schedule microtask to update radios after change detection
|
|
1285
|
+
// run is finished and trigger one more change detection run.
|
|
1286
|
+
operators.switchMap(function (radios) { return rxjs.from(Promise.resolve(radios)); }), operators.takeUntil(this.destroy$))
|
|
1287
|
+
.subscribe(function () { return _this.updateAndSubscribeToRadios(); });
|
|
1288
|
+
};
|
|
1289
|
+
RadioGroupComponent.prototype.ngOnDestroy = function () {
|
|
1290
|
+
this.destroy$.next();
|
|
1291
|
+
this.destroy$.complete();
|
|
1292
|
+
};
|
|
1293
|
+
RadioGroupComponent.prototype.registerOnChange = function (fn) {
|
|
1294
|
+
this.onChange = fn;
|
|
1295
|
+
};
|
|
1296
|
+
RadioGroupComponent.prototype.registerOnTouched = function (fn) {
|
|
1297
|
+
this.onTouched = fn;
|
|
1298
|
+
};
|
|
1299
|
+
RadioGroupComponent.prototype.writeValue = function (value) {
|
|
1300
|
+
this.value = value;
|
|
1301
|
+
};
|
|
1302
|
+
RadioGroupComponent.prototype.setDisabledState = function (isDisabled) {
|
|
1303
|
+
this.disabled = isDisabled;
|
|
1304
|
+
};
|
|
1305
|
+
RadioGroupComponent.prototype.updateAndSubscribeToRadios = function () {
|
|
1306
|
+
this.updateValueFromCheckedOption();
|
|
1307
|
+
this.updateNames();
|
|
1308
|
+
this.updateValues();
|
|
1309
|
+
this.updateDisabled();
|
|
1310
|
+
this.subscribeOnRadiosValueChange();
|
|
1311
|
+
this.subscribeOnRadiosBlur();
|
|
1312
|
+
};
|
|
1313
|
+
RadioGroupComponent.prototype.updateNames = function () {
|
|
1314
|
+
var _this = this;
|
|
1315
|
+
if (this.radios) {
|
|
1316
|
+
this.radios.forEach(function (radio) { return radio._setName(_this.name); });
|
|
1317
|
+
}
|
|
1318
|
+
};
|
|
1319
|
+
RadioGroupComponent.prototype.updateValues = function () {
|
|
1320
|
+
var _this = this;
|
|
1321
|
+
this.updateAndMarkForCheckRadios(function (radio) {
|
|
1322
|
+
if (radio.value === _this.value) {
|
|
1323
|
+
radio.modelValue = radio.value;
|
|
1324
|
+
}
|
|
1325
|
+
});
|
|
1326
|
+
};
|
|
1327
|
+
RadioGroupComponent.prototype.updateDisabled = function () {
|
|
1328
|
+
var _this = this;
|
|
1329
|
+
if (typeof this.disabled !== 'undefined') {
|
|
1330
|
+
this.updateAndMarkForCheckRadios(function (radio) { return radio.disabled = _this.disabled; });
|
|
1331
|
+
}
|
|
1332
|
+
};
|
|
1333
|
+
RadioGroupComponent.prototype.subscribeOnRadiosValueChange = function () {
|
|
1334
|
+
var _this = this;
|
|
1335
|
+
if (!this.radios || !this.radios.length) {
|
|
1336
|
+
return;
|
|
1337
|
+
}
|
|
1338
|
+
rxjs.merge.apply(void 0, __spreadArray([], __read(this.radios.map(function (radio) { return radio.valueChange; })))).pipe(operators.takeUntil(rxjs.merge(this.radios.changes, this.destroy$)))
|
|
1339
|
+
.subscribe(function (value) {
|
|
1340
|
+
_this.writeValue(value);
|
|
1341
|
+
_this.propagateValue(value);
|
|
1342
|
+
});
|
|
1343
|
+
};
|
|
1344
|
+
RadioGroupComponent.prototype.propagateValue = function (value) {
|
|
1345
|
+
this.valueChange.emit(value);
|
|
1346
|
+
this.onChange(value);
|
|
1347
|
+
};
|
|
1348
|
+
RadioGroupComponent.prototype.subscribeOnRadiosBlur = function () {
|
|
1349
|
+
var _this = this;
|
|
1350
|
+
var hasNoRadios = !this.radios || !this.radios.length;
|
|
1351
|
+
if (!common.isPlatformBrowser(this.platformId) || hasNoRadios) {
|
|
1352
|
+
return;
|
|
1353
|
+
}
|
|
1354
|
+
var hostElement = this.hostElement.nativeElement;
|
|
1355
|
+
rxjs.fromEvent(hostElement, 'focusin')
|
|
1356
|
+
.pipe(operators.filter(function (event) { return hostElement.contains(event.target); }), operators.switchMap(function () { return rxjs.merge(rxjs.fromEvent(_this.document, 'focusin'), rxjs.fromEvent(_this.document, 'click')); }), operators.filter(function (event) { return !hostElement.contains(event.target); }), operators.takeUntil(rxjs.merge(this.radios.changes, this.destroy$)))
|
|
1357
|
+
.subscribe(function () { return _this.onTouched(); });
|
|
1358
|
+
};
|
|
1359
|
+
RadioGroupComponent.prototype.updateAndMarkForCheckRadios = function (updateFn) {
|
|
1360
|
+
if (this.radios) {
|
|
1361
|
+
this.radios.forEach(function (radio) {
|
|
1362
|
+
updateFn(radio);
|
|
1363
|
+
radio._markForCheck();
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1366
|
+
};
|
|
1367
|
+
RadioGroupComponent.prototype.updateValueFromCheckedOption = function () {
|
|
1368
|
+
var checkedRadio = this.radios.find(function (radio) { return radio.modelValue; });
|
|
1369
|
+
var isValueMissing = this.value === undefined || this.value === null;
|
|
1370
|
+
if (checkedRadio && isValueMissing && checkedRadio.value !== this.value) {
|
|
1371
|
+
this.value = checkedRadio.value;
|
|
1372
|
+
}
|
|
1373
|
+
};
|
|
1374
|
+
return RadioGroupComponent;
|
|
1375
|
+
}());
|
|
1376
|
+
RadioGroupComponent.decorators = [
|
|
1377
|
+
{ type: i0.Component, args: [{
|
|
1378
|
+
selector: 'dr-radio-group',
|
|
1379
|
+
template: "\n <ng-content select=\"dr-radio-button\"></ng-content>",
|
|
1380
|
+
providers: [
|
|
1381
|
+
{
|
|
1382
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
1383
|
+
useExisting: i0.forwardRef(function () { return RadioGroupComponent; }),
|
|
1384
|
+
multi: true,
|
|
1385
|
+
},
|
|
1386
|
+
],
|
|
1387
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1388
|
+
},] }
|
|
1389
|
+
];
|
|
1390
|
+
RadioGroupComponent.ctorParameters = function () { return [
|
|
1391
|
+
{ type: i0.ElementRef },
|
|
1392
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [i0.PLATFORM_ID,] }] },
|
|
1393
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
|
|
1394
|
+
]; };
|
|
1395
|
+
RadioGroupComponent.propDecorators = {
|
|
1396
|
+
value: [{ type: i0.Input }],
|
|
1397
|
+
name: [{ type: i0.Input }],
|
|
1398
|
+
disabled: [{ type: i0.Input }],
|
|
1399
|
+
radios: [{ type: i0.ContentChildren, args: [RadioButtonComponent, { descendants: true },] }],
|
|
1400
|
+
valueChange: [{ type: i0.Output }]
|
|
1218
1401
|
};
|
|
1219
1402
|
|
|
1220
1403
|
var CheckboxComponent = /** @class */ (function () {
|
|
@@ -1429,7 +1612,7 @@
|
|
|
1429
1612
|
DrInputComponent.decorators = [
|
|
1430
1613
|
{ type: i0.Component, args: [{
|
|
1431
1614
|
selector: 'dr-input',
|
|
1432
|
-
template: "<ng-content select=\"[prefixIcon]\"></ng-content>\r\n<input [(ngModel)]=\"value\"\r\n (ngModelChange)=\"updateChanges()\"\r\n (blur)=\"blur.emit(value); onTouched()\"\r\n [disabled]=\"_disabled\"\r\n [readonly]=\"readonly\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [name]=\"name\"\r\n>\r\n<span class=\"clear-icon\" (click)=\"writeValue(null)\"></span>\r\n<span *ngIf=\"type === 'search'\" class=\"search-icon\" (click)=\"onSearchClicked($event)\"></span>\r\n<ng-content select=\"[suffixIcon]\"></ng-content>\r\n<button *ngIf=\"_buttonOptions.show || (_buttonOptions.showOnFocus && _buttonOptions.focusSet)\"\r\n (click)=\"onButtonClicked($event)\">\r\n {{_buttonOptions.text}}\r\n</button>\r\n",
|
|
1615
|
+
template: "<ng-content select=\"[prefixIcon]\"></ng-content>\r\n<input [(ngModel)]=\"value\"\r\n (ngModelChange)=\"updateChanges()\"\r\n (blur)=\"blur.emit(value); onTouched()\"\r\n [disabled]=\"_disabled\"\r\n [readonly]=\"readonly\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [name]=\"name\"\r\n [min]=\"min\"\r\n [step]=\"step\"\r\n>\r\n<span class=\"clear-icon\" (click)=\"writeValue(null)\"></span>\r\n<span *ngIf=\"type === 'search'\" class=\"search-icon\" (click)=\"onSearchClicked($event)\"></span>\r\n<ng-content select=\"[suffixIcon]\"></ng-content>\r\n<button *ngIf=\"_buttonOptions.show || (_buttonOptions.showOnFocus && _buttonOptions.focusSet)\"\r\n (click)=\"onButtonClicked($event)\">\r\n {{_buttonOptions.text}}\r\n</button>\r\n",
|
|
1433
1616
|
providers: [{
|
|
1434
1617
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
1435
1618
|
useExisting: i0.forwardRef(function () { return DrInputComponent; }),
|
|
@@ -1452,6 +1635,8 @@
|
|
|
1452
1635
|
placeholder: [{ type: i0.Input }],
|
|
1453
1636
|
readonly: [{ type: i0.Input }],
|
|
1454
1637
|
clearable: [{ type: i0.Input }],
|
|
1638
|
+
min: [{ type: i0.Input }],
|
|
1639
|
+
step: [{ type: i0.Input }],
|
|
1455
1640
|
blur: [{ type: i0.Output }],
|
|
1456
1641
|
elementClass: [{ type: i0.HostBinding, args: ['class',] }],
|
|
1457
1642
|
searchHandler: [{ type: i0.Output }],
|
|
@@ -1560,9 +1745,9 @@
|
|
|
1560
1745
|
DrAvatarComponent.decorators = [
|
|
1561
1746
|
{ type: i0.Component, args: [{
|
|
1562
1747
|
selector: 'dr-avatar',
|
|
1563
|
-
template: "<div class=\"users-section\">\r\n <div *ngIf=\"!parsedUsers.length\"\r\n class=\"users-section__default\"
|
|
1748
|
+
template: "<div class=\"users-section\">\r\n <div *ngIf=\"!parsedUsers.length\"\r\n class=\"users-section__default\">\r\n </div>\r\n\r\n <div *ngFor=\"let user of getFirstUsers()\"\r\n class=\"users-section__user\"\r\n [class]=\"'icon-' + user.colorNumber + ' ' + user.status\"\r\n (click)=\"userClicked.emit()\"\r\n [matTooltip]=\"user | drAvatar\"\r\n [matTooltipPosition]=\"'below'\">\r\n {{user | drAvatar: 'initials'}}\r\n </div>\r\n\r\n <div *ngIf=\"parsedUsers.length > 2\"\r\n class=\"users-section__user icon-2\"\r\n [drTooltip]=\"usersTemplate\"\r\n [drTooltipPosition]=\"'bottom'\">\r\n {{getLastUsers().length}}\r\n </div>\r\n</div>\r\n\r\n<ng-template #usersTemplate>\r\n <div *ngFor=\"let user of getLastUsers()\" class=\"users-popover-item\">\r\n <div class=\"users-section__user\"\r\n (click)=\"userClicked.emit()\"\r\n [class]=\"user.class\">\r\n {{user | drAvatar: 'initials'}}\r\n </div>\r\n <span class=\"username\">\r\n {{user | drAvatar}}\r\n </span>\r\n </div>\r\n</ng-template>\r\n",
|
|
1564
1749
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1565
|
-
styles: [":host{width:auto}.users-section{display:flex;height:28px}.users-section__default{display:flex;height:28px;width:28px;border-radius:14px;background:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Crect width%3D%2224%22 height%3D%2224%22 rx%3D%2212%22 fill%3D%22%23BCBCBC%22%2F%3E%0D%3Cpath d%3D%22M11.9993 11.9998C13.6108 11.9998 14.916 10.691 14.916 9.08317C14.916 7.47171 13.6108 6.1665 11.9993 6.1665C10.3879 6.1665 9.08268 7.47171 9.08268 9.08317C9.08268 10.691 10.3879 11.9998 11.9993 11.9998ZM11.9993 13.4582C10.0561 13.4582 6.16602 14.4316 6.16602 16.3748V17.8332H17.8327V16.3748C17.8327 14.4316 13.9426 13.4582 11.9993 13.4582Z%22 fill%3D%22white%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat}.users-popover-item{display:flex;align-items:center;margin:12px}.users-popover-item .username{color:#51566f;font-size:14px}.users-popover-item .users-section__user{margin-right:8px}.users-section__user{position:relative;display:flex;justify-content:center;align-items:center;height:28px;width:28px;border-radius:14px;background:red;color:#fff;font-size:12px}.users-section__user.icon-0{background-color:#7b61ff}.users-section__user.icon-1{background-color:#21b8f1}.users-section__user.icon-2{background-color:#2969b0}.users-section__user.icon-3{background-color:#51566f}.users-section__user.icon-4{background-color:#0061ff}.users-section__user:hover{cursor:pointer}.users-section__user:not(:first-child){margin-left:4px}.users-section__user.warning:after{content:\"\";display:flex;width:8px;height:8px;position:absolute;
|
|
1750
|
+
styles: [":host{width:auto}.users-section{display:flex;height:28px}.users-section__default{display:flex;height:28px;width:28px;border-radius:14px;background:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Crect width%3D%2224%22 height%3D%2224%22 rx%3D%2212%22 fill%3D%22%23BCBCBC%22%2F%3E%0D%3Cpath d%3D%22M11.9993 11.9998C13.6108 11.9998 14.916 10.691 14.916 9.08317C14.916 7.47171 13.6108 6.1665 11.9993 6.1665C10.3879 6.1665 9.08268 7.47171 9.08268 9.08317C9.08268 10.691 10.3879 11.9998 11.9993 11.9998ZM11.9993 13.4582C10.0561 13.4582 6.16602 14.4316 6.16602 16.3748V17.8332H17.8327V16.3748C17.8327 14.4316 13.9426 13.4582 11.9993 13.4582Z%22 fill%3D%22white%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat}.users-popover-item{display:flex;align-items:center;margin:12px}.users-popover-item .username{color:#51566f;font-size:14px}.users-popover-item .users-section__user{margin-right:8px}.users-section__user{position:relative;display:flex;justify-content:center;align-items:center;height:28px;width:28px;border-radius:14px;background:red;color:#fff;font-size:12px}.users-section__user.icon-0{background-color:#7b61ff}.users-section__user.icon-1{background-color:#21b8f1}.users-section__user.icon-2{background-color:#2969b0}.users-section__user.icon-3{background-color:#51566f}.users-section__user.icon-4{background-color:#0061ff}.users-section__user:hover{cursor:pointer}.users-section__user:not(:first-child){margin-left:4px}.users-section__user.online:after,.users-section__user.offline:after,.users-section__user.warning:after{content:\"\";display:flex;width:8px;height:8px;position:absolute;border-radius:4px;top:-2px;right:0}.users-section__user.online:after{background:#03A678}.users-section__user.offline:after{background:#DE2833}.users-section__user.warning:after{background:#FDA014}\n"]
|
|
1566
1751
|
},] }
|
|
1567
1752
|
];
|
|
1568
1753
|
DrAvatarComponent.ctorParameters = function () { return []; };
|
|
@@ -1824,6 +2009,7 @@
|
|
|
1824
2009
|
function DrToggleComponent(cdr) {
|
|
1825
2010
|
this.cdr = cdr;
|
|
1826
2011
|
this._disabled = false;
|
|
2012
|
+
this._elementClass = [];
|
|
1827
2013
|
this.checkedChange = new i0.EventEmitter();
|
|
1828
2014
|
this.onChange = function () { };
|
|
1829
2015
|
this.onTouched = function () { };
|
|
@@ -1835,6 +2021,16 @@
|
|
|
1835
2021
|
enumerable: false,
|
|
1836
2022
|
configurable: true
|
|
1837
2023
|
});
|
|
2024
|
+
Object.defineProperty(DrToggleComponent.prototype, "elementClass", {
|
|
2025
|
+
get: function () { return this._elementClass.join(' '); },
|
|
2026
|
+
enumerable: false,
|
|
2027
|
+
configurable: true
|
|
2028
|
+
});
|
|
2029
|
+
DrToggleComponent.prototype.ngAfterViewInit = function () {
|
|
2030
|
+
if (this.toggleTitleRight) {
|
|
2031
|
+
this._elementClass.push('toggle-label-alignment');
|
|
2032
|
+
}
|
|
2033
|
+
};
|
|
1838
2034
|
DrToggleComponent.prototype.writeValue = function (value) {
|
|
1839
2035
|
this.checkedStatus = value;
|
|
1840
2036
|
this.cdr.markForCheck();
|
|
@@ -1864,7 +2060,7 @@
|
|
|
1864
2060
|
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: DrToggleComponent, multi: true }
|
|
1865
2061
|
],
|
|
1866
2062
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1867
|
-
styles: [":host{display:flex;justify-content:space-between;align-items:center}:host .toggle-container.disabled{pointer-events:none}:host .toggle-container.disabled .toggle-body{background-color:#8f9bb329!important}:host .toggle-container.disabled .toggle-body i{background:rgba(143,155,179,.24)!important}:host .toggle-container.success input:checked+span.toggle-body{background-color:#03a678}:host .toggle-container input{display:none}:host .toggle-container input:checked+span.toggle-body>i,:host .toggle-container input:checked+span.toggle-body:active>i{margin-left:16px}:host .toggle-container input:checked+span.toggle-body{background-color:#579bf2}:host .toggle-container .toggle-body{cursor:pointer;display:block;width:30px;height:16px;margin:7px auto;border-radius:15px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;background-color:#aeb5bb;line-height:1}:host .toggle-container .toggle-body:active{background-color:#a6b9cb}:host .toggle-container .toggle-body-wrapper{display:flex;flex-direction:column}:host .toggle-container .toggle-body i{height:12px;width:12px;background:#fff;display:inline-block;border-radius:100px;margin-top:2px;margin-left:1.5px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;pointer-events:none}\n"]
|
|
2063
|
+
styles: [":host{display:flex;justify-content:space-between;align-items:center}:host.toggle-label-alignment{justify-content:start}:host .toggle-container.disabled{pointer-events:none}:host .toggle-container.disabled .toggle-body{background-color:#8f9bb329!important}:host .toggle-container.disabled .toggle-body i{background:rgba(143,155,179,.24)!important}:host .toggle-container.success input:checked+span.toggle-body{background-color:#03a678}:host .toggle-container input{display:none}:host .toggle-container input:checked+span.toggle-body>i,:host .toggle-container input:checked+span.toggle-body:active>i{margin-left:16px}:host .toggle-container input:checked+span.toggle-body{background-color:#579bf2}:host .toggle-container .toggle-body{cursor:pointer;display:block;width:30px;height:16px;margin:7px auto;border-radius:15px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;background-color:#aeb5bb;line-height:1}:host .toggle-container .toggle-body:active{background-color:#a6b9cb}:host .toggle-container .toggle-body-wrapper{display:flex;flex-direction:column}:host .toggle-container .toggle-body i{height:12px;width:12px;background:#fff;display:inline-block;border-radius:100px;margin-top:2px;margin-left:1.5px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;pointer-events:none}\n"]
|
|
1868
2064
|
},] }
|
|
1869
2065
|
];
|
|
1870
2066
|
DrToggleComponent.ctorParameters = function () { return [
|
|
@@ -1876,7 +2072,8 @@
|
|
|
1876
2072
|
successType: [{ type: i0.Input }],
|
|
1877
2073
|
checkedStatus: [{ type: i0.Input }],
|
|
1878
2074
|
disabled: [{ type: i0.Input }],
|
|
1879
|
-
checkedChange: [{ type: i0.Output }]
|
|
2075
|
+
checkedChange: [{ type: i0.Output }],
|
|
2076
|
+
elementClass: [{ type: i0.HostBinding, args: ['class',] }]
|
|
1880
2077
|
};
|
|
1881
2078
|
|
|
1882
2079
|
var DrToggleButtonComponent = /** @class */ (function () {
|
|
@@ -2627,6 +2824,7 @@
|
|
|
2627
2824
|
if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
2628
2825
|
item.childOptions = {
|
|
2629
2826
|
list: item.children,
|
|
2827
|
+
class: item.childOptions.class,
|
|
2630
2828
|
position: 'child'
|
|
2631
2829
|
};
|
|
2632
2830
|
}
|
|
@@ -2847,7 +3045,7 @@
|
|
|
2847
3045
|
this.renderer.setStyle(this.el.nativeElement, 'z-index', '10010');
|
|
2848
3046
|
}
|
|
2849
3047
|
else {
|
|
2850
|
-
var defaultChildPadding =
|
|
3048
|
+
var defaultChildPadding = 3;
|
|
2851
3049
|
var widthMoreWindowRight = window.innerWidth - this.position.clientX - this.el.nativeElement.offsetWidth - defaultPadding;
|
|
2852
3050
|
var widthMoreWindowBottom = window.innerHeight - this.position.clientY - this.el.nativeElement.offsetHeight - defaultPadding;
|
|
2853
3051
|
var calculatedHorizantallyPos = widthMoreWindowRight < 0
|
|
@@ -3018,6 +3216,7 @@
|
|
|
3018
3216
|
var components$1 = [
|
|
3019
3217
|
DrButtonComponent,
|
|
3020
3218
|
RadioButtonComponent,
|
|
3219
|
+
RadioGroupComponent,
|
|
3021
3220
|
CheckboxComponent,
|
|
3022
3221
|
DrInputComponent,
|
|
3023
3222
|
DrSelectComponent,
|
|
@@ -3234,6 +3433,7 @@
|
|
|
3234
3433
|
exports.MonthTagComponent = MonthTagComponent;
|
|
3235
3434
|
exports.QuarterTagComponent = QuarterTagComponent;
|
|
3236
3435
|
exports.RadioButtonComponent = RadioButtonComponent;
|
|
3436
|
+
exports.RadioGroupComponent = RadioGroupComponent;
|
|
3237
3437
|
exports.TooltipComponent = TooltipComponent;
|
|
3238
3438
|
exports.WeekTagComponent = WeekTagComponent;
|
|
3239
3439
|
exports.YearTagComponent = YearTagComponent;
|