@datarailsshared/datarailsshared 1.3.10 → 1.3.13-dev
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/assets/styles/img/spinner.gif +0 -0
- package/bundles/datarailsshared-datarailsshared.umd.js +245 -104
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.3.13-dev.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-inputs/button/button.component.js +7 -3
- package/esm2015/lib/dr-inputs/dr-input/dr-input.component.js +23 -8
- package/esm2015/lib/dr-inputs/radio-button/radio-button.component.js +1 -1
- package/esm2015/lib/dr-popover/dr-popover-ref.js +6 -1
- package/esm2015/lib/dr-popover/dr-popover.component.js +20 -18
- package/esm2015/lib/dr-popover/dr-popover.directive.js +30 -76
- 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 +12 -1
- package/esm2015/public-api.js +6 -2
- package/fesm2015/datarailsshared-datarailsshared.js +231 -97
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-inputs/button/button.component.d.ts +2 -1
- package/lib/dr-inputs/dr-input/dr-input.component.d.ts +6 -2
- package/lib/dr-popover/dr-popover-ref.d.ts +5 -1
- package/lib/dr-popover/dr-popover.component.d.ts +7 -4
- package/lib/dr-popover/dr-popover.directive.d.ts +9 -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 +21 -0
- package/package.json +1 -1
- package/public-api.d.ts +5 -1
- package/datarailsshared-datarailsshared-1.3.10.tgz +0 -0
|
Binary file
|
|
@@ -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
|
|
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
|
|
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
|
|
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 [
|
|
@@ -1275,7 +1276,7 @@
|
|
|
1275
1276
|
this.readonly = false;
|
|
1276
1277
|
this.clearable = false;
|
|
1277
1278
|
this.blur = new i0.EventEmitter();
|
|
1278
|
-
this.
|
|
1279
|
+
this.innerValue = null;
|
|
1279
1280
|
this._disabled = null;
|
|
1280
1281
|
this._elementClass = [];
|
|
1281
1282
|
this._buttonOptions = {
|
|
@@ -1288,6 +1289,8 @@
|
|
|
1288
1289
|
this.searchHandler = new i0.EventEmitter();
|
|
1289
1290
|
this.buttonHandler = new i0.EventEmitter();
|
|
1290
1291
|
this.tabindex = -1;
|
|
1292
|
+
this.onChangeCallback = rxjs.noop;
|
|
1293
|
+
this.onTouchedCallback = rxjs.noop;
|
|
1291
1294
|
this.onChange = function () { };
|
|
1292
1295
|
this.onTouched = function () { };
|
|
1293
1296
|
}
|
|
@@ -1336,6 +1339,20 @@
|
|
|
1336
1339
|
DrInputComponent.prototype.set = function (val) {
|
|
1337
1340
|
this._elementClass = val.split(' ');
|
|
1338
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
|
+
});
|
|
1339
1356
|
DrInputComponent.prototype.ngAfterViewInit = function () {
|
|
1340
1357
|
if (this.clearable) {
|
|
1341
1358
|
this._elementClass.push('clearable');
|
|
@@ -1351,15 +1368,17 @@
|
|
|
1351
1368
|
}
|
|
1352
1369
|
};
|
|
1353
1370
|
DrInputComponent.prototype.registerOnChange = function (fn) {
|
|
1354
|
-
this.
|
|
1371
|
+
this.onChangeCallback = fn;
|
|
1355
1372
|
};
|
|
1356
1373
|
DrInputComponent.prototype.registerOnTouched = function (fn) {
|
|
1357
|
-
this.
|
|
1374
|
+
this.onTouchedCallback = fn;
|
|
1358
1375
|
};
|
|
1359
1376
|
DrInputComponent.prototype.writeValue = function (value) {
|
|
1360
|
-
this.
|
|
1361
|
-
|
|
1362
|
-
|
|
1377
|
+
if (value !== this.innerValue) {
|
|
1378
|
+
this.innerValue = value;
|
|
1379
|
+
this.updateChanges();
|
|
1380
|
+
this.cdr.markForCheck();
|
|
1381
|
+
}
|
|
1363
1382
|
};
|
|
1364
1383
|
DrInputComponent.prototype.updateChanges = function () {
|
|
1365
1384
|
this.onChange(this.value);
|
|
@@ -1400,7 +1419,7 @@
|
|
|
1400
1419
|
multi: true
|
|
1401
1420
|
}],
|
|
1402
1421
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1403
|
-
styles: [":host{position:relative;width:100%;display:flex;flex-direction:row;min-height:32px;height:32px;font-size:14px;font-family:\"
|
|
1422
|
+
styles: [":host{position:relative;width:100%;display:flex;flex-direction:row;min-height:32px;height:32px;font-size:14px;font-family:\"Poppins\",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"]
|
|
1404
1423
|
},] }
|
|
1405
1424
|
];
|
|
1406
1425
|
DrInputComponent.ctorParameters = function () { return [
|
|
@@ -1755,8 +1774,8 @@
|
|
|
1755
1774
|
},] }
|
|
1756
1775
|
];
|
|
1757
1776
|
DrTooltipDirective.ctorParameters = function () { return [
|
|
1758
|
-
{ type:
|
|
1759
|
-
{ type:
|
|
1777
|
+
{ type: i1.Overlay },
|
|
1778
|
+
{ type: i1.OverlayPositionBuilder },
|
|
1760
1779
|
{ type: i0.ElementRef }
|
|
1761
1780
|
]; };
|
|
1762
1781
|
DrTooltipDirective.propDecorators = {
|
|
@@ -1925,6 +1944,8 @@
|
|
|
1925
1944
|
this.click = new i0.EventEmitter();
|
|
1926
1945
|
}
|
|
1927
1946
|
DrButtonComponent.prototype.onClick = function ($event) {
|
|
1947
|
+
$event.preventDefault();
|
|
1948
|
+
$event.stopPropagation();
|
|
1928
1949
|
this.click.emit($event);
|
|
1929
1950
|
};
|
|
1930
1951
|
return DrButtonComponent;
|
|
@@ -1932,8 +1953,8 @@
|
|
|
1932
1953
|
DrButtonComponent.decorators = [
|
|
1933
1954
|
{ type: i0.Component, args: [{
|
|
1934
1955
|
selector: 'dr-button',
|
|
1935
|
-
template: "<button (click)=\"onClick($event)\" [
|
|
1936
|
-
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"]
|
|
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>",
|
|
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~=danger]{background:#BF1D30;color:#fff;border:none;min-width:90px}:host button[theme][theme~=danger]:hover:not([disabled=\"true\"]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#740e1a 0%,#BF1D30 100%);box-shadow:0 4px 14px #0000001a;border-radius:16px;border:none}:host button[theme][theme~=danger]:hover[disabled=false]{border:none}:host button[theme][theme~=danger]:active{background:#740e1a}:host button[theme][theme~=danger][disabled=true]{background:#F0F1F4;color:#727583;border:none}:host button[theme][theme~=danger][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"]
|
|
1937
1958
|
},] }
|
|
1938
1959
|
];
|
|
1939
1960
|
DrButtonComponent.ctorParameters = function () { return []; };
|
|
@@ -1944,6 +1965,7 @@
|
|
|
1944
1965
|
icon: [{ type: i0.Input }],
|
|
1945
1966
|
isBold: [{ type: i0.Input }],
|
|
1946
1967
|
isLoading: [{ type: i0.Input }],
|
|
1968
|
+
iconColor: [{ type: i0.Input }],
|
|
1947
1969
|
click: [{ type: i0.Output }]
|
|
1948
1970
|
};
|
|
1949
1971
|
// Examples:
|
|
@@ -1951,6 +1973,7 @@
|
|
|
1951
1973
|
<dr-button [icon]="'dr-icon-arrow-down'">hello</dr-button>
|
|
1952
1974
|
<dr-button [icon]="'dr-icon-refresh'" [theme]="'primary-icon'"></dr-button>
|
|
1953
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>
|
|
1954
1977
|
|
|
1955
1978
|
<dr-button [icon]="'dr-icon-refresh'" [theme]="'secondary-icon'"></dr-button>
|
|
1956
1979
|
<dr-button [icon]="'dr-icon-share'" [isDisabled]="true" [theme]="'secondary-icon'"></dr-button>
|
|
@@ -2191,7 +2214,12 @@
|
|
|
2191
2214
|
function DrPopoverRef(overlayRef) {
|
|
2192
2215
|
this.overlayRef = overlayRef;
|
|
2193
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
|
+
*/
|
|
2194
2221
|
this.onClose = this.onClose$.asObservable();
|
|
2222
|
+
this.onBackdropClick = this.overlayRef.backdropClick();
|
|
2195
2223
|
}
|
|
2196
2224
|
DrPopoverRef.prototype.close = function (res) {
|
|
2197
2225
|
this.overlayRef.detach();
|
|
@@ -2212,34 +2240,30 @@
|
|
|
2212
2240
|
this.class = '';
|
|
2213
2241
|
this.isContentTemplate = false;
|
|
2214
2242
|
}
|
|
2215
|
-
Object.defineProperty(DrPopoverComponent.prototype, "popoverContainer", {
|
|
2216
|
-
set: function (template) {
|
|
2217
|
-
this.isContentTemplate = this.content instanceof i0.TemplateRef;
|
|
2218
|
-
if (!this.isContentTemplate) {
|
|
2219
|
-
this.componentRef = this.viewContainerRef.createComponent(this.componentFactoryResolver.resolveComponentFactory(this.content));
|
|
2220
|
-
Object.assign(this.componentRef.instance, this.contentContext);
|
|
2221
|
-
template.nativeElement.appendChild(this.componentRef.location.nativeElement);
|
|
2222
|
-
}
|
|
2223
|
-
else {
|
|
2224
|
-
this.contentContext.closePopover = this.popoverRef.close.bind(this.popoverRef);
|
|
2225
|
-
}
|
|
2226
|
-
this.cdr.detectChanges();
|
|
2227
|
-
},
|
|
2228
|
-
enumerable: false,
|
|
2229
|
-
configurable: true
|
|
2230
|
-
});
|
|
2231
2243
|
DrPopoverComponent.prototype.clickOutside = function (e) {
|
|
2232
|
-
var isTargetHost = this.hostRef.nativeElement === e.target || this.hostRef.nativeElement.contains(e.target);
|
|
2244
|
+
var isTargetHost = this.hostRef instanceof i0.ElementRef && (this.hostRef.nativeElement === e.target || this.hostRef.nativeElement.contains(e.target));
|
|
2233
2245
|
var isTargetInPopover = this.elementRef.nativeElement.contains(e.target);
|
|
2234
2246
|
var isTargetInDatepicker = e.target.closest('mat-datepicker-popup');
|
|
2235
2247
|
var isTargetInSelect = e.target.closest('ng-dropdown-panel');
|
|
2248
|
+
var isTargetInDatepickerContent = e.target.closest('mat-datepicker-content');
|
|
2236
2249
|
if (!isTargetHost
|
|
2237
2250
|
&& !isTargetInPopover
|
|
2238
2251
|
&& !isTargetInDatepicker
|
|
2239
|
-
&& !isTargetInSelect
|
|
2252
|
+
&& !isTargetInSelect
|
|
2253
|
+
&& !isTargetInDatepickerContent
|
|
2254
|
+
&& !this.manualClosing) {
|
|
2240
2255
|
this.popoverRef.close();
|
|
2241
2256
|
}
|
|
2242
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);
|
|
2264
|
+
}
|
|
2265
|
+
this.cdr.detectChanges();
|
|
2266
|
+
};
|
|
2243
2267
|
return DrPopoverComponent;
|
|
2244
2268
|
}());
|
|
2245
2269
|
DrPopoverComponent.decorators = [
|
|
@@ -2249,7 +2273,8 @@
|
|
|
2249
2273
|
animations: [
|
|
2250
2274
|
animations.trigger('popover', POPUP_ANIMATION),
|
|
2251
2275
|
],
|
|
2252
|
-
|
|
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"]
|
|
2253
2278
|
},] }
|
|
2254
2279
|
];
|
|
2255
2280
|
DrPopoverComponent.ctorParameters = function () { return [
|
|
@@ -2264,16 +2289,96 @@
|
|
|
2264
2289
|
contentContext: [{ type: i0.Input }],
|
|
2265
2290
|
class: [{ type: i0.Input }],
|
|
2266
2291
|
hostRef: [{ type: i0.Input }],
|
|
2267
|
-
|
|
2292
|
+
manualClosing: [{ type: i0.Input }],
|
|
2293
|
+
popoverContainer: [{ type: i0.ViewChild, args: ['popoverContainer', { read: i0.ElementRef, static: true },] }],
|
|
2268
2294
|
clickOutside: [{ type: i0.HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
2269
2295
|
};
|
|
2270
2296
|
|
|
2271
|
-
var
|
|
2272
|
-
|
|
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) {
|
|
2273
2311
|
this.overlay = overlay;
|
|
2274
2312
|
this.overlayPositionBuilder = overlayPositionBuilder;
|
|
2275
|
-
this.elementRef = elementRef;
|
|
2276
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) {
|
|
2380
|
+
this.elementRef = elementRef;
|
|
2381
|
+
this.drPopoverService = drPopoverService;
|
|
2277
2382
|
this.contentContext = {};
|
|
2278
2383
|
this.position = 'bottom';
|
|
2279
2384
|
this.class = '';
|
|
@@ -2281,78 +2386,39 @@
|
|
|
2281
2386
|
this.popoverClose = new i0.EventEmitter();
|
|
2282
2387
|
this.showStateChange = new i0.EventEmitter();
|
|
2283
2388
|
}
|
|
2284
|
-
DrPopoverDirective.prototype.
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
this.destroyPopover();
|
|
2389
|
+
DrPopoverDirective.prototype.togglePopover = function () {
|
|
2390
|
+
if (this.popoverRef) {
|
|
2391
|
+
this.closePopover();
|
|
2288
2392
|
}
|
|
2289
2393
|
else {
|
|
2290
2394
|
this.renderPopover();
|
|
2291
|
-
this.showStateChange.emit({ isShown:
|
|
2395
|
+
this.showStateChange.emit({ isShown: !!this.popoverRef });
|
|
2396
|
+
}
|
|
2397
|
+
};
|
|
2398
|
+
DrPopoverDirective.prototype.closePopover = function (res) {
|
|
2399
|
+
if (this.popoverRef) {
|
|
2400
|
+
this.popoverRef.close(res);
|
|
2401
|
+
this.popoverRef = null;
|
|
2292
2402
|
}
|
|
2293
2403
|
};
|
|
2294
2404
|
DrPopoverDirective.prototype.renderPopover = function () {
|
|
2295
2405
|
var _this = this;
|
|
2296
|
-
var
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
_this.destroyPopover();
|
|
2304
|
-
_this.popoverClose.emit(res);
|
|
2305
|
-
_this.showStateChange.emit({ isShown: !!((_a = _this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached()) });
|
|
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,
|
|
2306
2413
|
});
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
this.overlayRef.dispose();
|
|
2312
|
-
this.overlayRef = null;
|
|
2313
|
-
}
|
|
2314
|
-
if (this.contentRef) {
|
|
2315
|
-
this.contentRef.destroy();
|
|
2316
|
-
this.contentRef = null;
|
|
2317
|
-
}
|
|
2318
|
-
if (this.drPopoverRef) {
|
|
2319
|
-
this.drPopoverRef.close();
|
|
2320
|
-
this.drPopoverRef = null;
|
|
2321
|
-
}
|
|
2322
|
-
};
|
|
2323
|
-
DrPopoverDirective.prototype.attachOverlayContainer = function () {
|
|
2324
|
-
var componentPortal = new portal.ComponentPortal(DrPopoverComponent, null, this.createInjector(this.drPopoverRef));
|
|
2325
|
-
this.contentRef = this.overlayRef.attach(componentPortal);
|
|
2326
|
-
this.drPopoverRef.componentRef = this.contentRef;
|
|
2327
|
-
this.contentRef.instance.content = this.content;
|
|
2328
|
-
this.contentRef.instance.contentContext = this.contentContext;
|
|
2329
|
-
this.contentRef.instance.class = this.class + ' ' + this.position;
|
|
2330
|
-
this.contentRef.instance.hostRef = this.elementRef;
|
|
2331
|
-
};
|
|
2332
|
-
DrPopoverDirective.prototype.createOverlay = function (config) {
|
|
2333
|
-
var overlayConfig = this.getOverlayConfig(config);
|
|
2334
|
-
return this.overlay.create(overlayConfig);
|
|
2335
|
-
};
|
|
2336
|
-
DrPopoverDirective.prototype.getOverlayConfig = function (config) {
|
|
2337
|
-
var positionStrategy = this.overlayPositionBuilder
|
|
2338
|
-
.flexibleConnectedTo(this.elementRef)
|
|
2339
|
-
.withPositions([POPUP_POSITIONS[this.position]]);
|
|
2340
|
-
var overlayConfig = new overlay.OverlayConfig({
|
|
2341
|
-
hasBackdrop: false,
|
|
2342
|
-
panelClass: config === null || config === void 0 ? void 0 : config.panelClass,
|
|
2343
|
-
scrollStrategy: this.overlay.scrollStrategies.noop(),
|
|
2344
|
-
positionStrategy: positionStrategy,
|
|
2414
|
+
popoverRef.onClose.pipe(operators.first()).subscribe(function (res) {
|
|
2415
|
+
_this.closePopover();
|
|
2416
|
+
_this.popoverClose.emit(res);
|
|
2417
|
+
_this.showStateChange.emit({ isShown: !!_this.popoverRef });
|
|
2345
2418
|
});
|
|
2346
|
-
return overlayConfig;
|
|
2347
|
-
};
|
|
2348
|
-
DrPopoverDirective.prototype.createInjector = function (previewOverlayRef) {
|
|
2349
|
-
var injectionTokens = [
|
|
2350
|
-
{ provide: DrPopoverRef, useValue: previewOverlayRef },
|
|
2351
|
-
];
|
|
2352
|
-
return i0.Injector.create({ providers: injectionTokens, parent: this.injector });
|
|
2353
2419
|
};
|
|
2354
2420
|
DrPopoverDirective.prototype.ngOnDestroy = function () {
|
|
2355
|
-
this.
|
|
2421
|
+
this.closePopover();
|
|
2356
2422
|
};
|
|
2357
2423
|
return DrPopoverDirective;
|
|
2358
2424
|
}());
|
|
@@ -2362,10 +2428,8 @@
|
|
|
2362
2428
|
},] }
|
|
2363
2429
|
];
|
|
2364
2430
|
DrPopoverDirective.ctorParameters = function () { return [
|
|
2365
|
-
{ type: overlay.Overlay },
|
|
2366
|
-
{ type: overlay.OverlayPositionBuilder },
|
|
2367
2431
|
{ type: i0.ElementRef },
|
|
2368
|
-
{ type:
|
|
2432
|
+
{ type: DrPopoverService }
|
|
2369
2433
|
]; };
|
|
2370
2434
|
DrPopoverDirective.propDecorators = {
|
|
2371
2435
|
content: [{ type: i0.Input, args: ['drPopover',] }],
|
|
@@ -2373,9 +2437,10 @@
|
|
|
2373
2437
|
position: [{ type: i0.Input, args: ['drPopoverPosition',] }],
|
|
2374
2438
|
class: [{ type: i0.Input, args: ['drPopoverClass',] }],
|
|
2375
2439
|
overlayConfig: [{ type: i0.Input, args: ['drPopoverOverlayConfig',] }],
|
|
2440
|
+
manualClosing: [{ type: i0.Input, args: ['drPopoverManualClosing',] }],
|
|
2376
2441
|
popoverClose: [{ type: i0.Output, args: ['drPopoverClose',] }],
|
|
2377
2442
|
showStateChange: [{ type: i0.Output, args: ['drPopoverShowStateChange',] }],
|
|
2378
|
-
|
|
2443
|
+
togglePopover: [{ type: i0.HostListener, args: ['click',] }]
|
|
2379
2444
|
};
|
|
2380
2445
|
|
|
2381
2446
|
var DrDropdownService = /** @class */ (function () {
|
|
@@ -2663,6 +2728,52 @@
|
|
|
2663
2728
|
},] }
|
|
2664
2729
|
];
|
|
2665
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:\"Poppins\",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
|
+
|
|
2666
2777
|
var components$2 = [DateTagComponent,
|
|
2667
2778
|
DayTagComponent,
|
|
2668
2779
|
WeekTagComponent,
|
|
@@ -2876,6 +2987,32 @@
|
|
|
2876
2987
|
},] }
|
|
2877
2988
|
];
|
|
2878
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
|
+
|
|
2879
3016
|
/* components */
|
|
2880
3017
|
|
|
2881
3018
|
/**
|
|
@@ -2904,10 +3041,14 @@
|
|
|
2904
3041
|
exports.DrPopoverDirective = DrPopoverDirective;
|
|
2905
3042
|
exports.DrPopoverModule = DrPopoverModule;
|
|
2906
3043
|
exports.DrPopoverRef = DrPopoverRef;
|
|
3044
|
+
exports.DrPopoverService = DrPopoverService;
|
|
2907
3045
|
exports.DrSelectComponent = DrSelectComponent;
|
|
2908
3046
|
exports.DrSpinnerComponent = DrSpinnerComponent;
|
|
2909
3047
|
exports.DrSpinnerDirective = DrSpinnerDirective;
|
|
2910
3048
|
exports.DrSpinnerModule = DrSpinnerModule;
|
|
3049
|
+
exports.DrTabComponent = DrTabComponent;
|
|
3050
|
+
exports.DrTabsComponent = DrTabsComponent;
|
|
3051
|
+
exports.DrTabsModule = DrTabsModule;
|
|
2911
3052
|
exports.DrTagComponent = DrTagComponent;
|
|
2912
3053
|
exports.DrTagModule = DrTagModule;
|
|
2913
3054
|
exports.DrToggleComponent = DrToggleComponent;
|