@datarailsshared/datarailsshared 1.3.9 → 1.3.12
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/_datarailsshared.styles.css +4 -0
- package/assets/styles/_styles.scss +2 -0
- package/bundles/datarailsshared-datarailsshared.umd.js +307 -90
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.3.12.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-avatar/dr-avatar.component.js +17 -10
- package/esm2015/lib/dr-dropdown/dr-dropdown.component.js +5 -3
- package/esm2015/lib/dr-inputs/button/button.component.js +6 -2
- package/esm2015/lib/dr-inputs/dr-input/dr-input.component.js +26 -9
- package/esm2015/lib/dr-inputs/dr-toggle/dr-toggle.component.js +1 -1
- package/esm2015/lib/dr-inputs/radio-button/radio-button.component.js +1 -1
- package/esm2015/lib/dr-popover/dr-popover-ref.js +20 -0
- package/esm2015/lib/dr-popover/dr-popover.component.js +33 -27
- package/esm2015/lib/dr-popover/dr-popover.directive.js +39 -42
- package/esm2015/lib/dr-popover/dr-popover.module.js +4 -4
- package/esm2015/lib/dr-popover/dr-popover.service.js +76 -0
- package/esm2015/lib/dr-tabs/dr-tab.component.js +23 -0
- package/esm2015/lib/dr-tabs/dr-tabs.component.js +27 -0
- package/esm2015/lib/dr-tabs/dr-tabs.module.js +30 -0
- package/esm2015/lib/models/popover.js +13 -0
- package/esm2015/public-api.js +6 -1
- package/fesm2015/datarailsshared-datarailsshared.js +288 -84
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-avatar/dr-avatar.component.d.ts +4 -2
- package/lib/dr-inputs/button/button.component.d.ts +1 -0
- package/lib/dr-inputs/dr-input/dr-input.component.d.ts +7 -2
- package/lib/dr-inputs/dr-toggle/dr-toggle.component.d.ts +1 -1
- package/lib/dr-popover/dr-popover-ref.d.ts +16 -0
- package/lib/dr-popover/dr-popover.component.d.ts +12 -7
- package/lib/dr-popover/dr-popover.directive.d.ts +19 -15
- package/lib/dr-popover/dr-popover.service.d.ts +16 -0
- package/lib/dr-tabs/dr-tab.component.d.ts +8 -0
- package/lib/dr-tabs/dr-tabs.component.d.ts +10 -0
- package/lib/dr-tabs/dr-tabs.module.d.ts +2 -0
- package/lib/models/popover.d.ts +22 -0
- package/package.json +1 -1
- package/public-api.d.ts +5 -0
- package/datarailsshared-datarailsshared-1.3.9.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('@angular/animations'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/common'), require('rxjs'), 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')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@datarailsshared/datarailsshared', ['exports', '@angular/core', '@angular/forms', '@angular/material/core', '@angular/material-moment-adapter', 'moment', '@angular/animations', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/common', 'rxjs', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/button-toggle', '@ng-select/ng-select', '@angular/material/tooltip'], 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.animations, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.common, global.rxjs, 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));
|
|
5
|
-
}(this, (function (exports, i0, forms, core, materialMomentAdapter, momentImported, animations,
|
|
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('rxjs'), require('@angular/animations'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/common'), require('rxjs/operators'), 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', 'rxjs', '@angular/animations', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/common', 'rxjs/operators', '@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.rxjs, global.ng.animations, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.common, global.rxjs.operators, 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, rxjs, animations, i1, portal, common, operators, 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;
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
28
|
var momentImported__namespace = /*#__PURE__*/_interopNamespace(momentImported);
|
|
29
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
30
|
|
|
30
31
|
// import {*} from ""
|
|
31
32
|
var DateTagComponent = /** @class */ (function () {
|
|
@@ -1203,7 +1204,7 @@
|
|
|
1203
1204
|
],
|
|
1204
1205
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1205
1206
|
encapsulation: i0.ViewEncapsulation.ShadowDom,
|
|
1206
|
-
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;
|
|
1207
|
+
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"]
|
|
1207
1208
|
},] }
|
|
1208
1209
|
];
|
|
1209
1210
|
RadioButtonComponent.ctorParameters = function () { return [
|
|
@@ -1274,7 +1275,8 @@
|
|
|
1274
1275
|
this.placeholder = '';
|
|
1275
1276
|
this.readonly = false;
|
|
1276
1277
|
this.clearable = false;
|
|
1277
|
-
this.
|
|
1278
|
+
this.blur = new i0.EventEmitter();
|
|
1279
|
+
this.innerValue = null;
|
|
1278
1280
|
this._disabled = null;
|
|
1279
1281
|
this._elementClass = [];
|
|
1280
1282
|
this._buttonOptions = {
|
|
@@ -1287,6 +1289,8 @@
|
|
|
1287
1289
|
this.searchHandler = new i0.EventEmitter();
|
|
1288
1290
|
this.buttonHandler = new i0.EventEmitter();
|
|
1289
1291
|
this.tabindex = -1;
|
|
1292
|
+
this.onChangeCallback = rxjs.noop;
|
|
1293
|
+
this.onTouchedCallback = rxjs.noop;
|
|
1290
1294
|
this.onChange = function () { };
|
|
1291
1295
|
this.onTouched = function () { };
|
|
1292
1296
|
}
|
|
@@ -1335,6 +1339,20 @@
|
|
|
1335
1339
|
DrInputComponent.prototype.set = function (val) {
|
|
1336
1340
|
this._elementClass = val.split(' ');
|
|
1337
1341
|
};
|
|
1342
|
+
Object.defineProperty(DrInputComponent.prototype, "value", {
|
|
1343
|
+
get: function () {
|
|
1344
|
+
return this.innerValue;
|
|
1345
|
+
},
|
|
1346
|
+
set: function (v) {
|
|
1347
|
+
if (v !== this.innerValue) {
|
|
1348
|
+
this.innerValue = v;
|
|
1349
|
+
this.onChangeCallback(v);
|
|
1350
|
+
}
|
|
1351
|
+
this.cdr.markForCheck();
|
|
1352
|
+
},
|
|
1353
|
+
enumerable: false,
|
|
1354
|
+
configurable: true
|
|
1355
|
+
});
|
|
1338
1356
|
DrInputComponent.prototype.ngAfterViewInit = function () {
|
|
1339
1357
|
if (this.clearable) {
|
|
1340
1358
|
this._elementClass.push('clearable');
|
|
@@ -1350,15 +1368,17 @@
|
|
|
1350
1368
|
}
|
|
1351
1369
|
};
|
|
1352
1370
|
DrInputComponent.prototype.registerOnChange = function (fn) {
|
|
1353
|
-
this.
|
|
1371
|
+
this.onChangeCallback = fn;
|
|
1354
1372
|
};
|
|
1355
1373
|
DrInputComponent.prototype.registerOnTouched = function (fn) {
|
|
1356
|
-
this.
|
|
1374
|
+
this.onTouchedCallback = fn;
|
|
1357
1375
|
};
|
|
1358
1376
|
DrInputComponent.prototype.writeValue = function (value) {
|
|
1359
|
-
this.
|
|
1360
|
-
|
|
1361
|
-
|
|
1377
|
+
if (value !== this.innerValue) {
|
|
1378
|
+
this.innerValue = value;
|
|
1379
|
+
this.updateChanges();
|
|
1380
|
+
this.cdr.markForCheck();
|
|
1381
|
+
}
|
|
1362
1382
|
};
|
|
1363
1383
|
DrInputComponent.prototype.updateChanges = function () {
|
|
1364
1384
|
this.onChange(this.value);
|
|
@@ -1392,14 +1412,14 @@
|
|
|
1392
1412
|
DrInputComponent.decorators = [
|
|
1393
1413
|
{ type: i0.Component, args: [{
|
|
1394
1414
|
selector: 'dr-input',
|
|
1395
|
-
template: "<ng-content select=\"[prefixIcon]\"></ng-content>\r\n<input [(ngModel)]=\"value\"\r\n (ngModelChange)=\"updateChanges()\"\r\n (blur)=\"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",
|
|
1415
|
+
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",
|
|
1396
1416
|
providers: [{
|
|
1397
1417
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
1398
1418
|
useExisting: i0.forwardRef(function () { return DrInputComponent; }),
|
|
1399
1419
|
multi: true
|
|
1400
1420
|
}],
|
|
1401
1421
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1402
|
-
styles: [":host{position:relative;width:100%;display:flex;flex-direction:row;min-height:32px;height:32px;font-size:14px;font-family:\"Nunito Sans\",sans-serif;border:1px solid #C3C4CE;border-radius:6px;color:#85889c;padding:0 8px;overflow:hidden}:host:hover{border-color:#85889c}:host:focus-within{border-color:#21b8f1!important;color:#151b3f}:host.disabled{pointer-events:none;border:none;color:#85889c;background:#E5E6EA}: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 input{display:flex;flex-grow:1;height:100%;border:none;padding:4px 0;text-align:left}:host input:disabled{border:none;color:#85889c;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 .clear-icon{visibility:hidden}:host.clearable .clear-icon,:host.ng-touched.ng-invalid .clear-icon{visibility:visible;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\"><path d=\"M5.91783 5.00001L9.03353 1.88395C9.11924 1.79818 9.16651 1.68374 9.16665 1.56171C9.16665 1.43962 9.11937 1.32504 9.03353 1.2394L8.76047 0.966415C8.67463 0.880433 8.56023 0.833344 8.43808 0.833344C8.31612 0.833344 8.20166 0.880433 8.11582 0.966415L5.00013 4.08227L1.88428 0.966415C1.79858 0.880433 1.68404 0.833344 1.56196 0.833344C1.44001 0.833344 1.32556 0.880433 1.23985 0.966415L0.966646 1.2394C0.788869 1.41719 0.788869 1.70637 0.966646 1.88395L4.08242 5.00001L0.966646 8.11593C0.880873 8.20184 0.833677 8.31628 0.833677 8.43831C0.833677 8.56034 0.880873 8.67478 0.966646 8.76062L1.23978 9.03361C1.32548 9.11952 1.44 9.16668 1.56188 9.16668C1.68397 9.16668 1.7985 9.11952 1.88421 9.03361L5.00005 5.91769L8.11575 9.03361C8.20159 9.11952 8.31605 9.16668 8.438 9.16668H8.43815C8.56017 9.16668 8.67456 9.11952 8.7604 9.03361L9.03346 8.76062C9.11916 8.67484 9.16643 8.56034 9.16643 8.43831C9.16643 8.31628 9.11916 8.20184 9.03346 8.116L5.91783 5.00001Z\" fill=\"%2351566F\"/></svg> ');margin:auto 8px;cursor:pointer}:host span+span,:host span+img{margin-left:0}:host.search-type{padding:0 16px;border-radius:16px}:host.search-type.ng-valid{border-color:#c3c4ce}:host.search-type .search-icon{content:url('data:image/svg+xml; utf8, <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.5816 10.2097C11.4878 10.1157 11.3605 10.0629 11.2277 10.0629H10.8175C10.7473 10.0629 10.6799 10.035 10.6303 9.98534C10.5322 9.88724 10.527 9.73044 10.6132 9.62178C11.4154 8.6112 11.8925 7.33534 11.8925 5.94625C11.8925 2.66209 9.23042 0 5.94625 0C2.66209 0 0 2.66209 0 5.94625C0 9.23042 2.66209 11.8925 5.94625 11.8925C7.33523 11.8925 8.611 11.4155 9.62155 10.6172C9.7304 10.5312 9.88711 10.5366 9.9852 10.6347C10.0349 10.6845 10.0629 10.7519 10.0629 10.8223V11.2277C10.0629 11.3605 10.1157 11.4878 10.2097 11.5816L14.2834 15.6472C14.4787 15.8421 14.795 15.8419 14.9901 15.6468L15.6468 14.9901C15.8419 14.795 15.8421 14.4787 15.6472 14.2834L11.5816 10.2097ZM5.94625 10.0629C3.67296 10.0629 1.82962 8.21955 1.82962 5.94625C1.82962 3.67296 3.67296 1.82962 5.94625 1.82962C8.21955 1.82962 10.0629 3.67296 10.0629 5.94625C10.0629 8.21955 8.21955 10.0629 5.94625 10.0629Z\" fill=\"%23BCBCBC\"/></svg> ');margin:auto 0 auto 8px;cursor:pointer}:host.with-button{padding-right:0}:host.with-button button{color:#0061ff;background:#F6F7F8;height:100%;width:auto;padding:0 8px;display:flex;align-items:center;border:none;border-left:1px solid #C3C4CE}:host ::ng-deep img[prefixIcon],:host ::ng-deep img[suffixIcon],:host ::ng-deep i[prefixIcon],:host ::ng-deep i[suffixIcon]{position:relative;margin:auto 8px}:host ::ng-deep img[prefixIcon],:host ::ng-deep i[prefixIcon]{margin-left:0}:host ::ng-deep img[suffixIcon],:host ::ng-deep i[suffixIcon]{margin-right:0}\n"]
|
|
1422
|
+
styles: [":host{position:relative;width:100%;display:flex;flex-direction:row;min-height:32px;height:32px;font-size:14px;font-family:\"Nunito Sans\",sans-serif;border:1px solid #C3C4CE;border-radius:6px;color:#85889c;padding:0 8px;overflow:hidden;outline:none}:host:hover{border-color:#85889c}:host:focus-within{border-color:#21b8f1!important;color:#151b3f}:host.disabled{pointer-events:none;border:none;color:#85889c;background:#E5E6EA}: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 input{display:flex;flex-grow:1;height:100%;border:none;padding:4px 0;text-align:left}:host input:disabled{border:none;color:#85889c;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 .clear-icon{visibility:hidden}:host.clearable .clear-icon,:host.ng-touched.ng-invalid .clear-icon{visibility:visible;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\"><path d=\"M5.91783 5.00001L9.03353 1.88395C9.11924 1.79818 9.16651 1.68374 9.16665 1.56171C9.16665 1.43962 9.11937 1.32504 9.03353 1.2394L8.76047 0.966415C8.67463 0.880433 8.56023 0.833344 8.43808 0.833344C8.31612 0.833344 8.20166 0.880433 8.11582 0.966415L5.00013 4.08227L1.88428 0.966415C1.79858 0.880433 1.68404 0.833344 1.56196 0.833344C1.44001 0.833344 1.32556 0.880433 1.23985 0.966415L0.966646 1.2394C0.788869 1.41719 0.788869 1.70637 0.966646 1.88395L4.08242 5.00001L0.966646 8.11593C0.880873 8.20184 0.833677 8.31628 0.833677 8.43831C0.833677 8.56034 0.880873 8.67478 0.966646 8.76062L1.23978 9.03361C1.32548 9.11952 1.44 9.16668 1.56188 9.16668C1.68397 9.16668 1.7985 9.11952 1.88421 9.03361L5.00005 5.91769L8.11575 9.03361C8.20159 9.11952 8.31605 9.16668 8.438 9.16668H8.43815C8.56017 9.16668 8.67456 9.11952 8.7604 9.03361L9.03346 8.76062C9.11916 8.67484 9.16643 8.56034 9.16643 8.43831C9.16643 8.31628 9.11916 8.20184 9.03346 8.116L5.91783 5.00001Z\" fill=\"%2351566F\"/></svg> ');margin:auto 8px;cursor:pointer}:host span+span,:host span+img{margin-left:0}:host.search-type{padding:0 16px;border-radius:16px}:host.search-type.ng-valid{border-color:#c3c4ce}:host.search-type .search-icon{content:url('data:image/svg+xml; utf8, <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.5816 10.2097C11.4878 10.1157 11.3605 10.0629 11.2277 10.0629H10.8175C10.7473 10.0629 10.6799 10.035 10.6303 9.98534C10.5322 9.88724 10.527 9.73044 10.6132 9.62178C11.4154 8.6112 11.8925 7.33534 11.8925 5.94625C11.8925 2.66209 9.23042 0 5.94625 0C2.66209 0 0 2.66209 0 5.94625C0 9.23042 2.66209 11.8925 5.94625 11.8925C7.33523 11.8925 8.611 11.4155 9.62155 10.6172C9.7304 10.5312 9.88711 10.5366 9.9852 10.6347C10.0349 10.6845 10.0629 10.7519 10.0629 10.8223V11.2277C10.0629 11.3605 10.1157 11.4878 10.2097 11.5816L14.2834 15.6472C14.4787 15.8421 14.795 15.8419 14.9901 15.6468L15.6468 14.9901C15.8419 14.795 15.8421 14.4787 15.6472 14.2834L11.5816 10.2097ZM5.94625 10.0629C3.67296 10.0629 1.82962 8.21955 1.82962 5.94625C1.82962 3.67296 3.67296 1.82962 5.94625 1.82962C8.21955 1.82962 10.0629 3.67296 10.0629 5.94625C10.0629 8.21955 8.21955 10.0629 5.94625 10.0629Z\" fill=\"%23BCBCBC\"/></svg> ');margin:auto 0 auto 8px;cursor:pointer}:host.with-button{padding-right:0}:host.with-button button{color:#0061ff;background:#F6F7F8;height:100%;width:auto;padding:0 8px;display:flex;align-items:center;border:none;border-left:1px solid #C3C4CE}:host ::ng-deep img[prefixIcon],:host ::ng-deep img[suffixIcon],:host ::ng-deep i[prefixIcon],:host ::ng-deep i[suffixIcon]{position:relative;margin:auto 8px}:host ::ng-deep img[prefixIcon],:host ::ng-deep i[prefixIcon]{margin-left:0}:host ::ng-deep img[suffixIcon],:host ::ng-deep i[suffixIcon]{margin-right:0}\n"]
|
|
1403
1423
|
},] }
|
|
1404
1424
|
];
|
|
1405
1425
|
DrInputComponent.ctorParameters = function () { return [
|
|
@@ -1415,6 +1435,7 @@
|
|
|
1415
1435
|
placeholder: [{ type: i0.Input }],
|
|
1416
1436
|
readonly: [{ type: i0.Input }],
|
|
1417
1437
|
clearable: [{ type: i0.Input }],
|
|
1438
|
+
blur: [{ type: i0.Output }],
|
|
1418
1439
|
elementClass: [{ type: i0.HostBinding, args: ['class',] }],
|
|
1419
1440
|
searchHandler: [{ type: i0.Output }],
|
|
1420
1441
|
buttonHandler: [{ type: i0.Output }],
|
|
@@ -1488,23 +1509,34 @@
|
|
|
1488
1509
|
|
|
1489
1510
|
var DrAvatarComponent = /** @class */ (function () {
|
|
1490
1511
|
function DrAvatarComponent() {
|
|
1491
|
-
this.users = [];
|
|
1492
1512
|
this.userClicked = new i0.EventEmitter();
|
|
1513
|
+
this.parsedUsers = [];
|
|
1493
1514
|
}
|
|
1515
|
+
Object.defineProperty(DrAvatarComponent.prototype, "users", {
|
|
1516
|
+
set: function (user) {
|
|
1517
|
+
if (user) {
|
|
1518
|
+
this.parsedUsers = this.parseUsers(user);
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
enumerable: false,
|
|
1522
|
+
configurable: true
|
|
1523
|
+
});
|
|
1494
1524
|
DrAvatarComponent.prototype.ngOnChanges = function (changes) {
|
|
1495
1525
|
var _this = this;
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
this.getFirstUsers().forEach(function (user, index) { return user.class = "icon-" + index; });
|
|
1526
|
+
if (changes.users) {
|
|
1527
|
+
this.getFirstUsers().forEach(function (user) { return user.class = "icon-" + _this.getRandomValue(5); });
|
|
1499
1528
|
this.getLastUsers().forEach(function (user) { return user.class = "icon-" + _this.getRandomValue(5); });
|
|
1500
1529
|
}
|
|
1501
1530
|
};
|
|
1531
|
+
DrAvatarComponent.prototype.parseUsers = function (value) {
|
|
1532
|
+
return Array.isArray(value) ? value : Array.of(value);
|
|
1533
|
+
};
|
|
1502
1534
|
DrAvatarComponent.prototype.getFirstUsers = function () {
|
|
1503
|
-
return this.
|
|
1535
|
+
return this.parsedUsers.slice(0, 2);
|
|
1504
1536
|
};
|
|
1505
1537
|
DrAvatarComponent.prototype.getLastUsers = function () {
|
|
1506
|
-
if (this.
|
|
1507
|
-
return this.
|
|
1538
|
+
if (this.parsedUsers.length > 2) {
|
|
1539
|
+
return this.parsedUsers.slice(2, this.parsedUsers.length - 1);
|
|
1508
1540
|
}
|
|
1509
1541
|
return [];
|
|
1510
1542
|
};
|
|
@@ -1516,7 +1548,7 @@
|
|
|
1516
1548
|
DrAvatarComponent.decorators = [
|
|
1517
1549
|
{ type: i0.Component, args: [{
|
|
1518
1550
|
selector: 'dr-avatar',
|
|
1519
|
-
template: "<div class=\"users-section\">\r\n <div class=\"users-section__user\"\r\n [class]=\"user.class\"\r\n *ngFor=\"let user of getFirstUsers()\"\r\n (click)=\"userClicked.emit()\"\r\n [matTooltip]=\"user.first_name + ' ' + user.last_name\"\r\n [matTooltipPosition]=\"'below'\">\r\n {{user.first_name[0] + user.last_name[0]}}\r\n </div>\r\n\r\n <div class=\"users-section__user icon-2\" *ngIf=\"
|
|
1551
|
+
template: "<div class=\"users-section\">\r\n <div class=\"users-section__user\"\r\n [class]=\"user.class\"\r\n *ngFor=\"let user of getFirstUsers()\"\r\n (click)=\"userClicked.emit()\"\r\n [matTooltip]=\"user.first_name + ' ' + user.last_name\"\r\n [matTooltipPosition]=\"'below'\">\r\n {{user.first_name[0] + user.last_name[0]}}\r\n </div>\r\n\r\n <div class=\"users-section__user icon-2\" *ngIf=\"parsedUsers.length > 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.first_name[0] + user.last_name[0]}}\r\n </div>\r\n <span class=\"username\">\r\n {{user.first_name + ' ' + user.last_name}}\r\n </span>\r\n </div>\r\n</ng-template>\r\n",
|
|
1520
1552
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1521
1553
|
styles: [":host{width:auto}.users-section{display:flex;position:absolute;height:28px;top:5px}.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{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}\n"]
|
|
1522
1554
|
},] }
|
|
@@ -1742,8 +1774,8 @@
|
|
|
1742
1774
|
},] }
|
|
1743
1775
|
];
|
|
1744
1776
|
DrTooltipDirective.ctorParameters = function () { return [
|
|
1745
|
-
{ type:
|
|
1746
|
-
{ type:
|
|
1777
|
+
{ type: i1.Overlay },
|
|
1778
|
+
{ type: i1.OverlayPositionBuilder },
|
|
1747
1779
|
{ type: i0.ElementRef }
|
|
1748
1780
|
]; };
|
|
1749
1781
|
DrTooltipDirective.propDecorators = {
|
|
@@ -1912,6 +1944,8 @@
|
|
|
1912
1944
|
this.click = new i0.EventEmitter();
|
|
1913
1945
|
}
|
|
1914
1946
|
DrButtonComponent.prototype.onClick = function ($event) {
|
|
1947
|
+
$event.preventDefault();
|
|
1948
|
+
$event.stopPropagation();
|
|
1915
1949
|
this.click.emit($event);
|
|
1916
1950
|
};
|
|
1917
1951
|
return DrButtonComponent;
|
|
@@ -1919,7 +1953,7 @@
|
|
|
1919
1953
|
DrButtonComponent.decorators = [
|
|
1920
1954
|
{ type: i0.Component, args: [{
|
|
1921
1955
|
selector: 'dr-button',
|
|
1922
|
-
template: "<button (click)=\"onClick($event)\" [
|
|
1956
|
+
template: "<button (click)=\"onClick($event)\" [disabled]=\"disabled\" [attr.is-loading]=\"isLoading\" [attr.bold]=\"isBold\"\r\n [attr.icon]=\"icon ? true : false\" [attr.theme]=\"theme\">\r\n <ng-container *ngIf=\"!isLoading\">\r\n <i *ngIf=\"icon\" class=\"dr\" [ngClass]=\"icon\" [style.color]=\"iconColor || 'inherit'\"></i>\r\n <ng-content></ng-content>\r\n </ng-container>\r\n <i *ngIf=\"isLoading\" class=\"dr dr-spinner\"></i>\r\n</button>",
|
|
1923
1957
|
styles: [":host{display:inline-block}:host button[theme]{cursor:pointer;border-radius:16px;padding:5px 16px;font-family:\"Poppins\";font-style:normal;font-weight:400;font-size:14px;line-height:22px;color:#4e566c;border:1px solid #7F7FDD;display:flex;justify-content:space-between;align-items:center;height:32px}:host button[theme] .dr{padding:0;margin-left:5.35px;margin-right:8.64px}:host button[theme] .dr-spinner{animation-name:rotate;animation-iteration-count:infinite;animation-duration:1s}@keyframes rotate{0%{transform:rotate()}to{transform:rotate(360deg)}}:host button[theme][theme~=secondary]{padding:5px 16px;background:#FFFFFF;border-radius:16px;min-width:90px}:host button[theme][theme~=secondary]:hover:not([disabled=\"true\"]){color:#4e566c;transition:.2ms ease-in all;background:#F2F2FB;box-shadow:0 4px 14px #0000001a;border:1px solid #4646CE;border-radius:16px}:host button[theme][theme~=secondary]:active{box-shadow:none;background:#F2F2FB}:host button[theme][theme~=secondary][disabled=true]{background:#F0F1F4;color:#727583;border:none}:host button[theme][theme~=secondary][is-loading=true]{justify-content:center;padding:5px 16px}:host button[theme][theme~=primary]{background:#4646CE;color:#fff;border:none;min-width:90px}:host button[theme][theme~=primary]:hover:not([disabled=\"true\"]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%);box-shadow:0 4px 14px #0000001a;border-radius:16px;border:none}:host button[theme][theme~=primary]:hover[disabled=false]{border:none}:host button[theme][theme~=primary]:active{background:#25258C}:host button[theme][theme~=primary][disabled=true]{background:#F0F1F4;color:#727583;border:none}:host button[theme][theme~=primary][is-loading=true]{justify-content:center;padding:5px 16px}:host button[theme][theme~=ghost]{background:none;border:none;color:#151b3f;padding:4px 8px}:host button[theme][theme~=ghost] .dr{margin-left:4.5px;margin-right:12.5px}:host button[theme][theme~=ghost]:hover:not([disabled=\"true\"]){color:#4646ce;background:#F2F2FB;border-radius:4px}:host button[theme][theme~=ghost][disabled=true]{color:#727583}:host button[theme][theme~=text-link]{background:none;border:none;color:#0b5af9;text-decoration:underline}:host button[theme][theme~=text-link][disabled=true]{color:#727583}:host button[theme][theme~=primary-icon]{padding:8px;width:28px;height:28px;justify-content:center;color:#fff;background:#4646CE;border:none}:host button[theme][theme~=primary-icon]:hover,:host button[theme][theme~=primary-icon]:active{background:linear-gradient(96.89deg,#131318 0%,#4646CE 100%)}:host button[theme][theme~=primary-icon][disabled=true]{color:#bcbcbc;background:#E5E6EA}:host button[theme][theme~=primary-icon] .dr{margin:0}:host button[theme][theme~=secondary-icon]{background:white;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:1px solid #7F7FDD}:host button[theme][theme~=secondary-icon]:hover,:host button[theme][theme~=secondary-icon]:active{color:#4646ce;background:#F2F2FB}:host button[theme][theme~=secondary-icon][disabled=true]{color:#bcbcbc;background:#E5E6EA;border:none}:host button[theme][theme~=secondary-icon] .dr{margin:0}:host button[theme][theme~=icon]{background:none;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:none}:host button[theme][theme~=icon]:hover,:host button[theme][theme~=icon]:active{background:#F0F3FC;color:#4646ce}:host button[theme][theme~=icon][disabled=true]{color:#bcbcbc;border:none}:host button[theme][theme~=icon][disabled=true]:hover,:host button[theme][theme~=icon][disabled=true]:active{background:none}:host button[theme][theme~=icon] .dr{margin:0}:host button[theme][bold=true]{font-weight:600}:host button[theme][icon=true]{padding-left:8px}:host button[theme][icon=false]{justify-content:center}\n"]
|
|
1924
1958
|
},] }
|
|
1925
1959
|
];
|
|
@@ -1931,6 +1965,7 @@
|
|
|
1931
1965
|
icon: [{ type: i0.Input }],
|
|
1932
1966
|
isBold: [{ type: i0.Input }],
|
|
1933
1967
|
isLoading: [{ type: i0.Input }],
|
|
1968
|
+
iconColor: [{ type: i0.Input }],
|
|
1934
1969
|
click: [{ type: i0.Output }]
|
|
1935
1970
|
};
|
|
1936
1971
|
// Examples:
|
|
@@ -1938,6 +1973,7 @@
|
|
|
1938
1973
|
<dr-button [icon]="'dr-icon-arrow-down'">hello</dr-button>
|
|
1939
1974
|
<dr-button [icon]="'dr-icon-refresh'" [theme]="'primary-icon'"></dr-button>
|
|
1940
1975
|
<dr-button [icon]="'dr-icon-refresh'" [isDisabled]="true" [theme]="'primary-icon'"></dr-button>
|
|
1976
|
+
<dr-button [theme]="'secondary'" [icon]="'dr-icon-excel'" [iconColor]="'#03A678'"></dr-button>
|
|
1941
1977
|
|
|
1942
1978
|
<dr-button [icon]="'dr-icon-refresh'" [theme]="'secondary-icon'"></dr-button>
|
|
1943
1979
|
<dr-button [icon]="'dr-icon-share'" [isDisabled]="true" [theme]="'secondary-icon'"></dr-button>
|
|
@@ -2174,41 +2210,59 @@
|
|
|
2174
2210
|
datePickerFormat: [{ type: i0.Input, args: ['drDatePickerFormat',] }]
|
|
2175
2211
|
};
|
|
2176
2212
|
|
|
2213
|
+
var DrPopoverRef = /** @class */ (function () {
|
|
2214
|
+
function DrPopoverRef(overlayRef) {
|
|
2215
|
+
this.overlayRef = overlayRef;
|
|
2216
|
+
this.onClose$ = new rxjs.Subject();
|
|
2217
|
+
// FIXME: this decision was made because of the incompatible rxjs version
|
|
2218
|
+
/**
|
|
2219
|
+
* Correct type is @type {Observable<any>}
|
|
2220
|
+
*/
|
|
2221
|
+
this.onClose = this.onClose$.asObservable();
|
|
2222
|
+
this.onBackdropClick = this.overlayRef.backdropClick();
|
|
2223
|
+
}
|
|
2224
|
+
DrPopoverRef.prototype.close = function (res) {
|
|
2225
|
+
this.overlayRef.detach();
|
|
2226
|
+
this.overlayRef.dispose();
|
|
2227
|
+
this.onClose$.next(res);
|
|
2228
|
+
this.onClose$.complete();
|
|
2229
|
+
};
|
|
2230
|
+
return DrPopoverRef;
|
|
2231
|
+
}());
|
|
2232
|
+
|
|
2177
2233
|
var DrPopoverComponent = /** @class */ (function () {
|
|
2178
|
-
function DrPopoverComponent(cdr, componentFactoryResolver, elementRef) {
|
|
2234
|
+
function DrPopoverComponent(cdr, componentFactoryResolver, viewContainerRef, elementRef, popoverRef) {
|
|
2179
2235
|
this.cdr = cdr;
|
|
2180
2236
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
2237
|
+
this.viewContainerRef = viewContainerRef;
|
|
2181
2238
|
this.elementRef = elementRef;
|
|
2239
|
+
this.popoverRef = popoverRef;
|
|
2182
2240
|
this.class = '';
|
|
2183
2241
|
this.isContentTemplate = false;
|
|
2184
2242
|
}
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
this.isContentTemplate = this.content instanceof i0.TemplateRef;
|
|
2188
|
-
if (!this.isContentTemplate) {
|
|
2189
|
-
this.componentRef = template.createComponent(this.componentFactoryResolver.resolveComponentFactory(this.content));
|
|
2190
|
-
this.componentRef.instance['closePopover'] = this.closePopover;
|
|
2191
|
-
for (var key in this.contentContext) {
|
|
2192
|
-
this.componentRef.instance[key] = this.contentContext[key];
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
else {
|
|
2196
|
-
this.contentContext.closePopover = this.closePopover;
|
|
2197
|
-
}
|
|
2198
|
-
this.cdr.detectChanges();
|
|
2199
|
-
},
|
|
2200
|
-
enumerable: false,
|
|
2201
|
-
configurable: true
|
|
2202
|
-
});
|
|
2203
|
-
;
|
|
2204
|
-
DrPopoverComponent.prototype.removeOutside = function (e) {
|
|
2205
|
-
var isTargetHost = this.hostRef.nativeElement === e.target;
|
|
2243
|
+
DrPopoverComponent.prototype.clickOutside = function (e) {
|
|
2244
|
+
var isTargetHost = this.hostRef instanceof i0.ElementRef && (this.hostRef.nativeElement === e.target || this.hostRef.nativeElement.contains(e.target));
|
|
2206
2245
|
var isTargetInPopover = this.elementRef.nativeElement.contains(e.target);
|
|
2207
2246
|
var isTargetInDatepicker = e.target.closest('mat-datepicker-popup');
|
|
2208
2247
|
var isTargetInSelect = e.target.closest('ng-dropdown-panel');
|
|
2209
|
-
|
|
2210
|
-
|
|
2248
|
+
var isTargetInDatepickerContent = e.target.closest('mat-datepicker-content');
|
|
2249
|
+
if (!isTargetHost
|
|
2250
|
+
&& !isTargetInPopover
|
|
2251
|
+
&& !isTargetInDatepicker
|
|
2252
|
+
&& !isTargetInSelect
|
|
2253
|
+
&& !isTargetInDatepickerContent
|
|
2254
|
+
&& !this.manualClosing) {
|
|
2255
|
+
this.popoverRef.close();
|
|
2256
|
+
}
|
|
2257
|
+
};
|
|
2258
|
+
DrPopoverComponent.prototype.ngOnInit = function () {
|
|
2259
|
+
this.isContentTemplate = this.content instanceof i0.TemplateRef;
|
|
2260
|
+
if (!this.isContentTemplate) {
|
|
2261
|
+
this.componentRef = this.viewContainerRef.createComponent(this.componentFactoryResolver.resolveComponentFactory(this.content));
|
|
2262
|
+
Object.assign(this.componentRef.instance, this.contentContext);
|
|
2263
|
+
this.popoverContainer.nativeElement.appendChild(this.componentRef.location.nativeElement);
|
|
2211
2264
|
}
|
|
2265
|
+
this.cdr.detectChanges();
|
|
2212
2266
|
};
|
|
2213
2267
|
return DrPopoverComponent;
|
|
2214
2268
|
}());
|
|
@@ -2219,69 +2273,152 @@
|
|
|
2219
2273
|
animations: [
|
|
2220
2274
|
animations.trigger('popover', POPUP_ANIMATION),
|
|
2221
2275
|
],
|
|
2222
|
-
|
|
2276
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2277
|
+
styles: [".dr-popover{display:flex;background:#fff;border:1px solid #E5E5E5;border-radius:5px;box-sizing:border-box;box-shadow:0 4px 14px #0003;font-size:12px;color:#545a6b;max-height:100vh;max-width:100vw;overflow:auto}::ng-deep .dr-popover-transparent-backdrop{background-color:transparent}\n"]
|
|
2223
2278
|
},] }
|
|
2224
2279
|
];
|
|
2225
2280
|
DrPopoverComponent.ctorParameters = function () { return [
|
|
2226
2281
|
{ type: i0.ChangeDetectorRef },
|
|
2227
2282
|
{ type: i0.ComponentFactoryResolver },
|
|
2228
|
-
{ type: i0.
|
|
2283
|
+
{ type: i0.ViewContainerRef },
|
|
2284
|
+
{ type: i0.ElementRef },
|
|
2285
|
+
{ type: DrPopoverRef }
|
|
2229
2286
|
]; };
|
|
2230
2287
|
DrPopoverComponent.propDecorators = {
|
|
2231
2288
|
content: [{ type: i0.Input }],
|
|
2232
2289
|
contentContext: [{ type: i0.Input }],
|
|
2233
2290
|
class: [{ type: i0.Input }],
|
|
2234
2291
|
hostRef: [{ type: i0.Input }],
|
|
2235
|
-
|
|
2236
|
-
popoverContainer: [{ type: i0.ViewChild, args: ['popoverContainer', { read: i0.
|
|
2237
|
-
|
|
2292
|
+
manualClosing: [{ type: i0.Input }],
|
|
2293
|
+
popoverContainer: [{ type: i0.ViewChild, args: ['popoverContainer', { read: i0.ElementRef, static: true },] }],
|
|
2294
|
+
clickOutside: [{ type: i0.HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
2238
2295
|
};
|
|
2239
2296
|
|
|
2240
|
-
var
|
|
2241
|
-
|
|
2297
|
+
var DEFAULT_CONFIG = {
|
|
2298
|
+
hasBackdrop: false,
|
|
2299
|
+
closeOnBackdropClick: false,
|
|
2300
|
+
backdropClass: 'dr-popover-transparent-backdrop',
|
|
2301
|
+
};
|
|
2302
|
+
var DEFAULT_MODEL = {
|
|
2303
|
+
position: 'bottom',
|
|
2304
|
+
class: '',
|
|
2305
|
+
overlayConfig: {},
|
|
2306
|
+
manualClosing: false,
|
|
2307
|
+
};
|
|
2308
|
+
|
|
2309
|
+
var DrPopoverService = /** @class */ (function () {
|
|
2310
|
+
function DrPopoverService(overlay, overlayPositionBuilder, injector) {
|
|
2242
2311
|
this.overlay = overlay;
|
|
2243
|
-
this.vcRef = vcRef;
|
|
2244
|
-
this.resolver = resolver;
|
|
2245
2312
|
this.overlayPositionBuilder = overlayPositionBuilder;
|
|
2313
|
+
this.injector = injector;
|
|
2314
|
+
}
|
|
2315
|
+
DrPopoverService.prototype.open = function (content, popoverModel) {
|
|
2316
|
+
if (!content)
|
|
2317
|
+
return;
|
|
2318
|
+
var model = Object.assign(Object.assign({}, DEFAULT_MODEL), popoverModel);
|
|
2319
|
+
var overlayRef = this.createOverlay(model);
|
|
2320
|
+
var popoverRef = new DrPopoverRef(overlayRef);
|
|
2321
|
+
this.attachOverlayContainer(content, model, overlayRef, popoverRef);
|
|
2322
|
+
this.registerCloseListeners(model, overlayRef, popoverRef);
|
|
2323
|
+
return popoverRef;
|
|
2324
|
+
};
|
|
2325
|
+
DrPopoverService.prototype.attachOverlayContainer = function (content, _a, overlayRef, popoverRef) {
|
|
2326
|
+
var contentContext = _a.contentContext, position = _a.position, elementClass = _a.class, manualClosing = _a.manualClosing, hostRef = _a.hostRef;
|
|
2327
|
+
var componentPortal = new portal.ComponentPortal(DrPopoverComponent, null, this.createInjector(popoverRef));
|
|
2328
|
+
var contentRef = overlayRef.attach(componentPortal);
|
|
2329
|
+
popoverRef.componentRef = contentRef;
|
|
2330
|
+
contentRef.instance.content = content;
|
|
2331
|
+
contentRef.instance.contentContext = Object.assign(Object.assign({}, contentContext), { closePopover: popoverRef.close.bind(popoverRef) });
|
|
2332
|
+
contentRef.instance.class = elementClass + ' ' + position;
|
|
2333
|
+
contentRef.instance.manualClosing = manualClosing;
|
|
2334
|
+
contentRef.instance.hostRef = hostRef;
|
|
2335
|
+
};
|
|
2336
|
+
DrPopoverService.prototype.createOverlay = function (popoverModel) {
|
|
2337
|
+
var overlayConfig = this.getOverlayConfig(popoverModel);
|
|
2338
|
+
return this.overlay.create(overlayConfig);
|
|
2339
|
+
};
|
|
2340
|
+
DrPopoverService.prototype.getOverlayConfig = function (popoverModel) {
|
|
2341
|
+
var config = Object.assign(Object.assign({}, DEFAULT_CONFIG), popoverModel.overlayConfig || {});
|
|
2342
|
+
var positionStrategy = this.overlayPositionBuilder
|
|
2343
|
+
.flexibleConnectedTo(popoverModel.hostRef)
|
|
2344
|
+
.withPositions([POPUP_POSITIONS[popoverModel.position]]);
|
|
2345
|
+
var overlayConfig = new i1.OverlayConfig(Object.assign({ scrollStrategy: this.overlay.scrollStrategies.noop(), positionStrategy: positionStrategy }, config));
|
|
2346
|
+
return overlayConfig;
|
|
2347
|
+
};
|
|
2348
|
+
DrPopoverService.prototype.createInjector = function (popoverRef) {
|
|
2349
|
+
var injectionTokens = [
|
|
2350
|
+
{ provide: DrPopoverRef, useValue: popoverRef },
|
|
2351
|
+
];
|
|
2352
|
+
return i0.Injector.create({ providers: injectionTokens, parent: this.injector });
|
|
2353
|
+
};
|
|
2354
|
+
DrPopoverService.prototype.registerCloseListeners = function (popoverModel, overlayRef, popoverRef) {
|
|
2355
|
+
var config = popoverModel.overlayConfig || {};
|
|
2356
|
+
var targetElement = popoverModel.targetElement;
|
|
2357
|
+
if ((config === null || config === void 0 ? void 0 : config.closeOnBackdropClick) && (config === null || config === void 0 ? void 0 : config.hasBackdrop)) {
|
|
2358
|
+
overlayRef.backdropClick().subscribe(function () { return popoverRef.close(); });
|
|
2359
|
+
}
|
|
2360
|
+
if (targetElement) {
|
|
2361
|
+
targetElement.addEventListener('mouseup', function () { return popoverRef.close(); }, { once: true });
|
|
2362
|
+
}
|
|
2363
|
+
};
|
|
2364
|
+
return DrPopoverService;
|
|
2365
|
+
}());
|
|
2366
|
+
DrPopoverService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DrPopoverService_Factory() { return new DrPopoverService(i0__namespace.ɵɵinject(i1__namespace.Overlay), i0__namespace.ɵɵinject(i1__namespace.OverlayPositionBuilder), i0__namespace.ɵɵinject(i0__namespace.INJECTOR)); }, token: DrPopoverService, providedIn: "root" });
|
|
2367
|
+
DrPopoverService.decorators = [
|
|
2368
|
+
{ type: i0.Injectable, args: [{
|
|
2369
|
+
providedIn: 'root',
|
|
2370
|
+
},] }
|
|
2371
|
+
];
|
|
2372
|
+
DrPopoverService.ctorParameters = function () { return [
|
|
2373
|
+
{ type: i1.Overlay },
|
|
2374
|
+
{ type: i1.OverlayPositionBuilder },
|
|
2375
|
+
{ type: i0.Injector }
|
|
2376
|
+
]; };
|
|
2377
|
+
|
|
2378
|
+
var DrPopoverDirective = /** @class */ (function () {
|
|
2379
|
+
function DrPopoverDirective(elementRef, drPopoverService) {
|
|
2246
2380
|
this.elementRef = elementRef;
|
|
2381
|
+
this.drPopoverService = drPopoverService;
|
|
2247
2382
|
this.contentContext = {};
|
|
2248
2383
|
this.position = 'bottom';
|
|
2249
2384
|
this.class = '';
|
|
2385
|
+
this.overlayConfig = {};
|
|
2386
|
+
this.popoverClose = new i0.EventEmitter();
|
|
2387
|
+
this.showStateChange = new i0.EventEmitter();
|
|
2250
2388
|
}
|
|
2251
|
-
DrPopoverDirective.prototype.
|
|
2252
|
-
if (this.
|
|
2253
|
-
this.
|
|
2389
|
+
DrPopoverDirective.prototype.togglePopover = function () {
|
|
2390
|
+
if (this.popoverRef) {
|
|
2391
|
+
this.closePopover();
|
|
2254
2392
|
}
|
|
2255
2393
|
else {
|
|
2256
2394
|
this.renderPopover();
|
|
2395
|
+
this.showStateChange.emit({ isShown: !!this.popoverRef });
|
|
2257
2396
|
}
|
|
2258
2397
|
};
|
|
2259
|
-
DrPopoverDirective.prototype.
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
this.overlayRef = this.overlay.create({ positionStrategy: positionStrategy });
|
|
2264
|
-
if (!((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached()) && this.content) {
|
|
2265
|
-
this.contentRef = this.overlayRef.attach(new portal.ComponentPortal(DrPopoverComponent));
|
|
2266
|
-
this.contentRef.instance.content = this.content;
|
|
2267
|
-
this.contentRef.instance.contentContext = this.contentContext;
|
|
2268
|
-
this.contentRef.instance.class = this.class + ' ' + this.position;
|
|
2269
|
-
this.contentRef.instance.hostRef = this.elementRef;
|
|
2270
|
-
this.contentRef.instance.closePopover = this.destroyPopover.bind(this);
|
|
2398
|
+
DrPopoverDirective.prototype.closePopover = function (res) {
|
|
2399
|
+
if (this.popoverRef) {
|
|
2400
|
+
this.popoverRef.close(res);
|
|
2401
|
+
this.popoverRef = null;
|
|
2271
2402
|
}
|
|
2272
2403
|
};
|
|
2273
|
-
DrPopoverDirective.prototype.
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
this.
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
this.
|
|
2280
|
-
this.
|
|
2281
|
-
|
|
2404
|
+
DrPopoverDirective.prototype.renderPopover = function () {
|
|
2405
|
+
var _this = this;
|
|
2406
|
+
var popoverRef = this.popoverRef = this.drPopoverService.open(this.content, {
|
|
2407
|
+
hostRef: this.elementRef,
|
|
2408
|
+
overlayConfig: this.overlayConfig,
|
|
2409
|
+
class: this.class,
|
|
2410
|
+
manualClosing: this.manualClosing,
|
|
2411
|
+
position: this.position,
|
|
2412
|
+
contentContext: this.contentContext,
|
|
2413
|
+
});
|
|
2414
|
+
popoverRef.onClose.pipe(operators.first()).subscribe(function (res) {
|
|
2415
|
+
_this.closePopover();
|
|
2416
|
+
_this.popoverClose.emit(res);
|
|
2417
|
+
_this.showStateChange.emit({ isShown: !!_this.popoverRef });
|
|
2418
|
+
});
|
|
2282
2419
|
};
|
|
2283
2420
|
DrPopoverDirective.prototype.ngOnDestroy = function () {
|
|
2284
|
-
this.
|
|
2421
|
+
this.closePopover();
|
|
2285
2422
|
};
|
|
2286
2423
|
return DrPopoverDirective;
|
|
2287
2424
|
}());
|
|
@@ -2291,18 +2428,19 @@
|
|
|
2291
2428
|
},] }
|
|
2292
2429
|
];
|
|
2293
2430
|
DrPopoverDirective.ctorParameters = function () { return [
|
|
2294
|
-
{ type:
|
|
2295
|
-
{ type:
|
|
2296
|
-
{ type: i0.ComponentFactoryResolver },
|
|
2297
|
-
{ type: overlay.OverlayPositionBuilder },
|
|
2298
|
-
{ type: i0.ElementRef }
|
|
2431
|
+
{ type: i0.ElementRef },
|
|
2432
|
+
{ type: DrPopoverService }
|
|
2299
2433
|
]; };
|
|
2300
2434
|
DrPopoverDirective.propDecorators = {
|
|
2301
2435
|
content: [{ type: i0.Input, args: ['drPopover',] }],
|
|
2302
2436
|
contentContext: [{ type: i0.Input, args: ['drPopoverContext',] }],
|
|
2303
2437
|
position: [{ type: i0.Input, args: ['drPopoverPosition',] }],
|
|
2304
2438
|
class: [{ type: i0.Input, args: ['drPopoverClass',] }],
|
|
2305
|
-
|
|
2439
|
+
overlayConfig: [{ type: i0.Input, args: ['drPopoverOverlayConfig',] }],
|
|
2440
|
+
manualClosing: [{ type: i0.Input, args: ['drPopoverManualClosing',] }],
|
|
2441
|
+
popoverClose: [{ type: i0.Output, args: ['drPopoverClose',] }],
|
|
2442
|
+
showStateChange: [{ type: i0.Output, args: ['drPopoverShowStateChange',] }],
|
|
2443
|
+
togglePopover: [{ type: i0.HostListener, args: ['click',] }]
|
|
2306
2444
|
};
|
|
2307
2445
|
|
|
2308
2446
|
var DrDropdownService = /** @class */ (function () {
|
|
@@ -2381,8 +2519,10 @@
|
|
|
2381
2519
|
}
|
|
2382
2520
|
};
|
|
2383
2521
|
DrDropdownComponent.prototype.tooltipToShow = function (act) {
|
|
2384
|
-
|
|
2385
|
-
|
|
2522
|
+
if (act.toolTipIfDisabled || this.disabled(act) || !act.toolTip) {
|
|
2523
|
+
return '';
|
|
2524
|
+
}
|
|
2525
|
+
return act.toolTip ? act.toolTip : act.title;
|
|
2386
2526
|
};
|
|
2387
2527
|
DrDropdownComponent.prototype.action = function (act) {
|
|
2388
2528
|
if (!this.disabled(act)) {
|
|
@@ -2588,6 +2728,52 @@
|
|
|
2588
2728
|
},] }
|
|
2589
2729
|
];
|
|
2590
2730
|
|
|
2731
|
+
var DrTabComponent = /** @class */ (function () {
|
|
2732
|
+
function DrTabComponent() {
|
|
2733
|
+
}
|
|
2734
|
+
DrTabComponent.prototype.ngOnInit = function () {
|
|
2735
|
+
};
|
|
2736
|
+
return DrTabComponent;
|
|
2737
|
+
}());
|
|
2738
|
+
DrTabComponent.decorators = [
|
|
2739
|
+
{ type: i0.Component, args: [{
|
|
2740
|
+
selector: 'dr-tab',
|
|
2741
|
+
template: "\n <ng-template>\n <ng-content></ng-content>\n </ng-template>\n "
|
|
2742
|
+
},] }
|
|
2743
|
+
];
|
|
2744
|
+
DrTabComponent.ctorParameters = function () { return []; };
|
|
2745
|
+
DrTabComponent.propDecorators = {
|
|
2746
|
+
label: [{ type: i0.Input }],
|
|
2747
|
+
disabled: [{ type: i0.Input }],
|
|
2748
|
+
contentTemplate: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }]
|
|
2749
|
+
};
|
|
2750
|
+
|
|
2751
|
+
var DrTabsComponent = /** @class */ (function () {
|
|
2752
|
+
function DrTabsComponent() {
|
|
2753
|
+
this.selectedTab = 0;
|
|
2754
|
+
this.selectedTabChange = new i0.EventEmitter();
|
|
2755
|
+
}
|
|
2756
|
+
DrTabsComponent.prototype.selectedIndexChange = function ($event) {
|
|
2757
|
+
this.selectedTab = $event;
|
|
2758
|
+
this.selectedTabChange.emit($event);
|
|
2759
|
+
};
|
|
2760
|
+
return DrTabsComponent;
|
|
2761
|
+
}());
|
|
2762
|
+
DrTabsComponent.decorators = [
|
|
2763
|
+
{ type: i0.Component, args: [{
|
|
2764
|
+
selector: 'dr-tabs',
|
|
2765
|
+
template: "<mat-tab-group disableRipple [selectedIndex]=\"selectedTab\"\r\n (selectedIndexChange)=\"selectedIndexChange($event)\"\r\n [class.with-radio]=\"withRadio\">\r\n <mat-tab *ngFor=\"let tab of tabsContentList; let index = index\" label=\"{{tab.label}}\" [disabled]=\"tab.disabled\" >\r\n <ng-container *ngIf=\"withRadio\">\r\n <ng-template mat-tab-label>\r\n <dr-radio-button [value]=\"index\"\r\n [(ngModel)]=\"selectedTab\">\r\n </dr-radio-button>\r\n {{tab.label}}\r\n </ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngTemplateOutlet=\"tab.contentTemplate\" ></ng-container>\r\n </mat-tab>\r\n</mat-tab-group>\r\n",
|
|
2766
|
+
styles: [":host{width:100%}:host ::ng-deep .mat-tab-group,:host ::ng-deep .mat-tab-body-wrapper{height:100%}:host ::ng-deep .mat-tab-nav-bar,:host ::ng-deep .mat-tab-header{border-bottom:1px solid #D5DAE5}:host ::ng-deep .mat-tab-labels{padding:0 17px}:host ::ng-deep .mat-tab-label{padding:0 8px;min-width:0;height:38px;opacity:1}:host ::ng-deep .mat-tab-label:not(:last-child){margin-right:21px}:host ::ng-deep .mat-tab-label-active .mat-tab-label-content{color:#579bf2;font-weight:700}:host ::ng-deep .mat-tab-label-content{font-weight:400;font-size:14px;line-height:22px;color:#51566f;font-family:\"Nunito Sans\",sans-serif}:host ::ng-deep .mat-ink-bar{height:3px;border-radius:5px;background-color:#579bf2!important}:host ::ng-deep .with-radio .mat-tab-labels{padding:0;margin-bottom:8px}:host ::ng-deep .with-radio .mat-tab-label{padding:8px 16px;min-width:0;flex-grow:1;justify-content:start;height:38px;opacity:1}:host ::ng-deep .with-radio .mat-tab-label:not(:last-child){margin-right:8px}:host ::ng-deep .with-radio .mat-tab-label-active{background:#F6F7F8;border-radius:3px}:host ::ng-deep .with-radio .mat-tab-label-active .mat-tab-label-content{color:#0c142b;font-weight:600}:host ::ng-deep .with-radio .mat-ink-bar{display:none!important}\n"]
|
|
2767
|
+
},] }
|
|
2768
|
+
];
|
|
2769
|
+
DrTabsComponent.ctorParameters = function () { return []; };
|
|
2770
|
+
DrTabsComponent.propDecorators = {
|
|
2771
|
+
selectedTab: [{ type: i0.Input }],
|
|
2772
|
+
withRadio: [{ type: i0.Input }],
|
|
2773
|
+
selectedTabChange: [{ type: i0.Output }],
|
|
2774
|
+
tabsContentList: [{ type: i0.ContentChildren, args: [DrTabComponent,] }]
|
|
2775
|
+
};
|
|
2776
|
+
|
|
2591
2777
|
var components$2 = [DateTagComponent,
|
|
2592
2778
|
DayTagComponent,
|
|
2593
2779
|
WeekTagComponent,
|
|
@@ -2801,6 +2987,32 @@
|
|
|
2801
2987
|
},] }
|
|
2802
2988
|
];
|
|
2803
2989
|
|
|
2990
|
+
var DrTabsModule = /** @class */ (function () {
|
|
2991
|
+
function DrTabsModule() {
|
|
2992
|
+
}
|
|
2993
|
+
return DrTabsModule;
|
|
2994
|
+
}());
|
|
2995
|
+
DrTabsModule.decorators = [
|
|
2996
|
+
{ type: i0.NgModule, args: [{
|
|
2997
|
+
imports: [
|
|
2998
|
+
common.CommonModule,
|
|
2999
|
+
tabs.MatTabsModule,
|
|
3000
|
+
forms.FormsModule,
|
|
3001
|
+
forms.ReactiveFormsModule,
|
|
3002
|
+
DrInputsModule
|
|
3003
|
+
],
|
|
3004
|
+
exports: [
|
|
3005
|
+
DrTabsComponent,
|
|
3006
|
+
DrTabComponent
|
|
3007
|
+
],
|
|
3008
|
+
providers: [],
|
|
3009
|
+
declarations: [
|
|
3010
|
+
DrTabsComponent,
|
|
3011
|
+
DrTabComponent
|
|
3012
|
+
],
|
|
3013
|
+
},] }
|
|
3014
|
+
];
|
|
3015
|
+
|
|
2804
3016
|
/* components */
|
|
2805
3017
|
|
|
2806
3018
|
/**
|
|
@@ -2828,10 +3040,15 @@
|
|
|
2828
3040
|
exports.DrPopoverComponent = DrPopoverComponent;
|
|
2829
3041
|
exports.DrPopoverDirective = DrPopoverDirective;
|
|
2830
3042
|
exports.DrPopoverModule = DrPopoverModule;
|
|
3043
|
+
exports.DrPopoverRef = DrPopoverRef;
|
|
3044
|
+
exports.DrPopoverService = DrPopoverService;
|
|
2831
3045
|
exports.DrSelectComponent = DrSelectComponent;
|
|
2832
3046
|
exports.DrSpinnerComponent = DrSpinnerComponent;
|
|
2833
3047
|
exports.DrSpinnerDirective = DrSpinnerDirective;
|
|
2834
3048
|
exports.DrSpinnerModule = DrSpinnerModule;
|
|
3049
|
+
exports.DrTabComponent = DrTabComponent;
|
|
3050
|
+
exports.DrTabsComponent = DrTabsComponent;
|
|
3051
|
+
exports.DrTabsModule = DrTabsModule;
|
|
2835
3052
|
exports.DrTagComponent = DrTagComponent;
|
|
2836
3053
|
exports.DrTagModule = DrTagModule;
|
|
2837
3054
|
exports.DrToggleComponent = DrToggleComponent;
|