raise-common-lib 0.0.151 → 0.0.153
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/raise-common-lib.umd.js +39 -55
- package/bundles/raise-common-lib.umd.js.map +1 -1
- package/bundles/raise-common-lib.umd.min.js +1 -1
- package/bundles/raise-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/dialog/common-delete-dialog/index.component.js +10 -29
- package/esm2015/lib/dialog/common-dialog/index.component.js +20 -13
- package/esm2015/lib/service/dialog.service.js +9 -6
- package/esm5/lib/dialog/common-delete-dialog/index.component.js +10 -38
- package/esm5/lib/dialog/common-dialog/index.component.js +23 -14
- package/esm5/lib/service/dialog.service.js +9 -6
- package/fesm2015/raise-common-lib.js +36 -45
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +39 -55
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/dialog/common-delete-dialog/index.component.d.ts +3 -2
- package/lib/dialog/common-dialog/index.component.d.ts +3 -0
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
- package/src/assets/style/reset/button.scss +2 -2
|
@@ -1950,6 +1950,8 @@
|
|
|
1950
1950
|
/** @type {?|undefined} */
|
|
1951
1951
|
DialogConfig.prototype.cancelBtnLabel;
|
|
1952
1952
|
/** @type {?|undefined} */
|
|
1953
|
+
DialogConfig.prototype.discardBtnLabel;
|
|
1954
|
+
/** @type {?|undefined} */
|
|
1953
1955
|
DialogConfig.prototype.showErrorIcon;
|
|
1954
1956
|
/** @type {?|undefined} */
|
|
1955
1957
|
DialogConfig.prototype.hideCloseIcon;
|
|
@@ -1960,6 +1962,8 @@
|
|
|
1960
1962
|
/** @type {?|undefined} */
|
|
1961
1963
|
DialogConfig.prototype.hideCloseBtn;
|
|
1962
1964
|
/** @type {?|undefined} */
|
|
1965
|
+
DialogConfig.prototype.hideDiscardBtn;
|
|
1966
|
+
/** @type {?|undefined} */
|
|
1963
1967
|
DialogConfig.prototype.showZoomBtn;
|
|
1964
1968
|
/** @type {?|undefined} */
|
|
1965
1969
|
DialogConfig.prototype.onCloseRequest;
|
|
@@ -1971,6 +1975,7 @@
|
|
|
1971
1975
|
this.title = "";
|
|
1972
1976
|
this.saveBtnLabel = "";
|
|
1973
1977
|
this.cancelBtnLabel = "";
|
|
1978
|
+
this.discardBtnLabel = "";
|
|
1974
1979
|
this.description = "";
|
|
1975
1980
|
this.size = "small";
|
|
1976
1981
|
this.showZoomBtn = false;
|
|
@@ -1989,6 +1994,7 @@
|
|
|
1989
1994
|
this.data.saveBtnLabel || this.translation.DELETE || ".DELETE";
|
|
1990
1995
|
this.cancelBtnLabel =
|
|
1991
1996
|
this.data.cancelBtnLabel || this.translation.CANCEL || ".CANCEL";
|
|
1997
|
+
this.discardBtnLabel = this.data.discardBtnLabel;
|
|
1992
1998
|
this.description =
|
|
1993
1999
|
this.data.description ||
|
|
1994
2000
|
this.translation.IF_YOU_DELETE_THIS_RECORD_WARNING ||
|
|
@@ -1996,46 +2002,10 @@
|
|
|
1996
2002
|
this.size = this.data.size || "small";
|
|
1997
2003
|
this.showZoomBtn = this.data.showZoomBtn || false;
|
|
1998
2004
|
};
|
|
1999
|
-
/**
|
|
2000
|
-
* @param {?} e
|
|
2001
|
-
* @return {?}
|
|
2002
|
-
*/
|
|
2003
|
-
CommonDeleteComponent.prototype.onSave = /**
|
|
2004
|
-
* @param {?} e
|
|
2005
|
-
* @return {?}
|
|
2006
|
-
*/
|
|
2007
|
-
function (e) {
|
|
2008
|
-
this.dialogRef.close(e);
|
|
2009
|
-
};
|
|
2010
|
-
/**
|
|
2011
|
-
* @param {?} e
|
|
2012
|
-
* @return {?}
|
|
2013
|
-
*/
|
|
2014
|
-
CommonDeleteComponent.prototype.onClose = /**
|
|
2015
|
-
* @param {?} e
|
|
2016
|
-
* @return {?}
|
|
2017
|
-
*/
|
|
2018
|
-
function (e) {
|
|
2019
|
-
var _this = this;
|
|
2020
|
-
if (this.data.onCloseRequest) {
|
|
2021
|
-
this.data.onCloseRequest(e).then((/**
|
|
2022
|
-
* @param {?} confirmed
|
|
2023
|
-
* @return {?}
|
|
2024
|
-
*/
|
|
2025
|
-
function (confirmed) {
|
|
2026
|
-
if (confirmed) {
|
|
2027
|
-
_this.dialogRef.close();
|
|
2028
|
-
}
|
|
2029
|
-
}));
|
|
2030
|
-
}
|
|
2031
|
-
else {
|
|
2032
|
-
this.dialogRef.close();
|
|
2033
|
-
}
|
|
2034
|
-
};
|
|
2035
2005
|
CommonDeleteComponent.decorators = [
|
|
2036
2006
|
{ type: core.Component, args: [{
|
|
2037
2007
|
selector: "kt-common-delete-dialog",
|
|
2038
|
-
template: "<
|
|
2008
|
+
template: "<rs-common-dialog\r\n [size]=\"size\"\r\n [title]=\"title\"\r\n [hideHeader]=\"false\"\r\n [hideCloseBtn]=\"data.hideCloseBtn === undefined ? false : data.hideCloseBtn\"\r\n [hideSaveBtn]=\"data.hideSaveBtn === undefined ? false : data.hideSaveBtn\"\r\n [hideDiscardBtn]=\"\r\n data.hideDiscardBtn === undefined ? true : data.hideDiscardBtn\r\n \"\r\n [saveBtnLabel]=\"saveBtnLabel\"\r\n [cancelBtnLabel]=\"cancelBtnLabel\"\r\n [discardBtnLabel]=\"discardBtnLabel\"\r\n [showErrorIcon]=\"\r\n data.showErrorIcon === undefined ? false : data.showErrorIcon\r\n \"\r\n [hideCloseIcon]=\"\r\n data.hideCloseIcon === undefined ? false : data.hideCloseIcon\r\n \"\r\n>\r\n <div class=\"mapping-dialog\">\r\n {{ description }}\r\n </div>\r\n</rs-common-dialog>\r\n",
|
|
2039
2009
|
styles: [".mapping-dialog{color:#44566c;font-family:Arial;font-size:12px;line-height:16px;white-space:pre-line}"]
|
|
2040
2010
|
}] }
|
|
2041
2011
|
];
|
|
@@ -2056,6 +2026,8 @@
|
|
|
2056
2026
|
/** @type {?} */
|
|
2057
2027
|
CommonDeleteComponent.prototype.cancelBtnLabel;
|
|
2058
2028
|
/** @type {?} */
|
|
2029
|
+
CommonDeleteComponent.prototype.discardBtnLabel;
|
|
2030
|
+
/** @type {?} */
|
|
2059
2031
|
CommonDeleteComponent.prototype.description;
|
|
2060
2032
|
/** @type {?} */
|
|
2061
2033
|
CommonDeleteComponent.prototype.size;
|
|
@@ -2183,11 +2155,14 @@
|
|
|
2183
2155
|
/** @type {?} */
|
|
2184
2156
|
var defaultData = {
|
|
2185
2157
|
title: this.translation.UNSAVED_CHANGES || ".UNSAVED_CHANGES",
|
|
2186
|
-
description: this.translation
|
|
2187
|
-
.
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
cancelBtnLabel: this.translation.
|
|
2158
|
+
description: this.translation.YOU_HAVE_UNSAVED_CHANGES_DO_YOU_WANT_TO_CONTINUE ||
|
|
2159
|
+
".YOU_HAVE_UNSAVED_CHANGES_DO_YOU_WANT_TO_CONTINUE",
|
|
2160
|
+
saveBtnLabel: this.translation.SAVE_AND_LEAVE || ".SAVE_AND_LEAVE",
|
|
2161
|
+
discardBtnLabel: this.translation.DISCARD_AND_LEAVE || ".DISCARD_AND_LEAVE",
|
|
2162
|
+
cancelBtnLabel: this.translation.CANCEL || ".CANCEL",
|
|
2163
|
+
hideDiscardBtn: false,
|
|
2164
|
+
size: "medium",
|
|
2165
|
+
hideCloseIcon: true,
|
|
2191
2166
|
};
|
|
2192
2167
|
if (data) {
|
|
2193
2168
|
data = Object.assign(defaultData, data);
|
|
@@ -22889,8 +22864,10 @@
|
|
|
22889
22864
|
this.hideCloseIcon = false;
|
|
22890
22865
|
this.hideCloseBtn = false;
|
|
22891
22866
|
this.hideSaveBtn = false;
|
|
22867
|
+
this.hideDiscardBtn = false;
|
|
22892
22868
|
this.saveBtnLabel = "";
|
|
22893
22869
|
this.cancelBtnLabel = "";
|
|
22870
|
+
this.discardBtnLabel = "";
|
|
22894
22871
|
this.showErrorIcon = false;
|
|
22895
22872
|
this.showZoomBtn = false;
|
|
22896
22873
|
// 显示相关属性
|
|
@@ -22936,12 +22913,12 @@
|
|
|
22936
22913
|
*/
|
|
22937
22914
|
function (confirmed) {
|
|
22938
22915
|
if (confirmed) {
|
|
22939
|
-
_this.dialogRef.close();
|
|
22916
|
+
_this.dialogRef.close("close");
|
|
22940
22917
|
}
|
|
22941
22918
|
}));
|
|
22942
22919
|
}
|
|
22943
22920
|
else {
|
|
22944
|
-
this.dialogRef.close();
|
|
22921
|
+
this.dialogRef.close("close");
|
|
22945
22922
|
}
|
|
22946
22923
|
};
|
|
22947
22924
|
/**
|
|
@@ -22965,15 +22942,16 @@
|
|
|
22965
22942
|
* @return {?}
|
|
22966
22943
|
*/
|
|
22967
22944
|
function () {
|
|
22968
|
-
|
|
22969
|
-
|
|
22970
|
-
|
|
22971
|
-
|
|
22972
|
-
|
|
22973
|
-
|
|
22974
|
-
|
|
22975
|
-
|
|
22976
|
-
|
|
22945
|
+
this.dialogRef.close("save");
|
|
22946
|
+
};
|
|
22947
|
+
/**
|
|
22948
|
+
* @return {?}
|
|
22949
|
+
*/
|
|
22950
|
+
CommonDialogComponent.prototype.onDiscard = /**
|
|
22951
|
+
* @return {?}
|
|
22952
|
+
*/
|
|
22953
|
+
function () {
|
|
22954
|
+
this.dialogRef.close("discard");
|
|
22977
22955
|
};
|
|
22978
22956
|
/**
|
|
22979
22957
|
* @private
|
|
@@ -22993,8 +22971,8 @@
|
|
|
22993
22971
|
CommonDialogComponent.decorators = [
|
|
22994
22972
|
{ type: core.Component, args: [{
|
|
22995
22973
|
selector: "rs-common-dialog",
|
|
22996
|
-
template: "<div class=\"dialog\" [ngClass]=\"size\" [ngStyle]=\"dialogStyle\">\r\n <!-- \u5934\u90E8 -->\r\n <div *ngIf=\"!hideHeader\" mat-dialog-title class=\"dialog__header\">\r\n <div class=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n </div>\r\n <div class=\"header__actions\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header__close-btn\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header__close-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/shrink-icon.svg\"\r\n />\r\n <img\r\n class=\"header__close-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/grow-icon.svg\"\r\n />\r\n </div>\r\n <div *ngIf=\"!hideCloseIcon\" class=\"header__close-btn\" (click)=\"onClose()\">\r\n <img class=\"header__close-icon\" src=\"../../../assets/img/close.svg\" />\r\n </div>\r\n </div>\r\n </div>\r\n <!-- \u5185\u5BB9 -->\r\n <div class=\"dialog__content\" mat-dialog-content>\r\n <ng-content></ng-content>\r\n </div>\r\n <!-- \u5E95\u90E8\u6309\u94AE -->\r\n <div mat-dialog-actions class=\"dialog__footer\">\r\n <ng-content select=\"[footerSlot]\"></ng-content>\r\n <!-- \u9ED8\u8BA4\u5C55\u793A\u4FDD\u5B58/\u5173\u95ED\u6309\u94AE -->\r\n <ng-container *ngIf=\"!customFooter\">\r\n <ng-template [ngTemplateOutlet]=\"defaultTemplate\"></ng-template>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <button\r\n *ngIf=\"!hideCloseBtn\"\r\n class=\"e-btn\"\r\n (click)=\"onClose()\"\r\n >\r\n {{ cancelBtnLabel }}\r\n </button>\r\n <button\r\n *ngIf=\"!hideSaveBtn\"\r\n class=\"e-btn e-primary\"\r\n (click)=\"onSave()\"\r\n >\r\n {{ saveBtnLabel }}\r\n </button>\r\n </ng-template>\r\n </div>\r\n <!-- loading -->\r\n <div class=\"dialog__loading\" [hidden]=\"!loading\">\r\n <img src=\"../../../assets/img/raise_loading.gif\" alt=\"\" />\r\n </div>\r\n</div>\r\n",
|
|
22997
|
-
styles: [":host::ng-deep .dialog{position:relative;max-height:90vh;font-weight:400;padding:20px;overflow:hidden;display:flex;flex-direction:column}:host::ng-deep .dialog.largest{width:80vw!important;max-width:1885px;padding:20px}:host::ng-deep .dialog.medium{width:500px;padding:20px}:host::ng-deep .dialog.small{width:350px;padding:20px 16px}:host::ng-deep .dialog.small .dialog__header{color:#002c4f;margin-bottom:16px}:host::ng-deep .dialog.small .dialog__header .header__title{font-size:13px;line-height:16px}:host::ng-deep .dialog.small .dialog__content{font-size:12px;line-height:16px}:host::ng-deep .dialog.small .dialog__footer{min-height:42px;padding:16px 0 0;font-size:12px;line-height:14px}:host::ng-deep .dialog.small .dialog__footer button{padding:6px 12px;min-width:60px}:host::ng-deep .dialog.large{width:800px;padding:20px}:host::ng-deep .dialog .dialog__header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0}:host::ng-deep .dialog .dialog__header::before{display:none}:host::ng-deep .dialog .dialog__header .header__title{color:#002c4f;font-family:Arial;font-size:15px;font-weight:700;line-height:18px;flex:1;overflow:hidden;display:flex;align-items:center;gap:8px}:host::ng-deep .dialog .dialog__header .header__actions{display:flex;align-items:center;gap:20px}:host::ng-deep .dialog .dialog__header .header__close-icon{display:block;width:100%;height:100%}:host::ng-deep .dialog .dialog__header .header__close-btn{cursor:pointer;flex:0 0 20px;padding:4px;width:20px;height:20px;display:flex;justify-content:center;align-items:center}:host::ng-deep .dialog .dialog__content{width:100%;min-height:38px;position:relative;overflow-y:auto;overflow-x:hidden;margin:0;padding:0;font-size:13px;line-height:19px;flex:1;height:0}:host::ng-deep .dialog .dialog__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;padding:20px 0 0;font-size:13px;line-height:16px;margin-bottom:0}:host::ng-deep .dialog .
|
|
22974
|
+
template: "<div class=\"dialog\" [ngClass]=\"size\" [ngStyle]=\"dialogStyle\">\r\n <!-- \u5934\u90E8 -->\r\n <div *ngIf=\"!hideHeader\" mat-dialog-title class=\"dialog__header\">\r\n <div class=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n </div>\r\n <div class=\"header__actions\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header__close-btn\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header__close-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/shrink-icon.svg\"\r\n />\r\n <img\r\n class=\"header__close-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/grow-icon.svg\"\r\n />\r\n </div>\r\n <div *ngIf=\"!hideCloseIcon\" class=\"header__close-btn\" (click)=\"onClose()\">\r\n <img class=\"header__close-icon\" src=\"../../../assets/img/close.svg\" />\r\n </div>\r\n </div>\r\n </div>\r\n <!-- \u5185\u5BB9 -->\r\n <div class=\"dialog__content\" mat-dialog-content>\r\n <ng-content></ng-content>\r\n </div>\r\n <!-- \u5E95\u90E8\u6309\u94AE -->\r\n <div mat-dialog-actions class=\"dialog__footer\">\r\n <ng-content select=\"[footerSlot]\"></ng-content>\r\n <!-- \u9ED8\u8BA4\u5C55\u793A\u4FDD\u5B58/\u5173\u95ED\u6309\u94AE -->\r\n <ng-container *ngIf=\"!customFooter\">\r\n <ng-template [ngTemplateOutlet]=\"defaultTemplate\"></ng-template>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <button\r\n *ngIf=\"!hideCloseBtn\"\r\n class=\"e-btn\"\r\n (click)=\"onClose()\"\r\n >\r\n {{ cancelBtnLabel }}\r\n </button>\r\n <button\r\n *ngIf=\"!hideDiscardBtn\"\r\n class=\"e-btn\"\r\n (click)=\"onDiscard()\"\r\n >\r\n {{ discardBtnLabel }}\r\n </button>\r\n <button\r\n *ngIf=\"!hideSaveBtn\"\r\n class=\"e-btn e-primary\"\r\n (click)=\"onSave()\"\r\n >\r\n {{ saveBtnLabel }}\r\n </button>\r\n </ng-template>\r\n </div>\r\n <!-- loading -->\r\n <div class=\"dialog__loading\" [hidden]=\"!loading\">\r\n <img src=\"../../../assets/img/raise_loading.gif\" alt=\"\" />\r\n </div>\r\n</div>\r\n",
|
|
22975
|
+
styles: [":host::ng-deep .dialog{position:relative;max-height:90vh;font-weight:400;padding:20px;overflow:hidden;display:flex;flex-direction:column}:host::ng-deep .dialog.largest{width:80vw!important;height:88vh!important;max-width:1885px;padding:20px}:host::ng-deep .dialog.medium{width:500px;padding:20px}:host::ng-deep .dialog.small{width:350px;padding:20px 16px}:host::ng-deep .dialog.small .dialog__header{color:#002c4f;margin-bottom:16px}:host::ng-deep .dialog.small .dialog__header .header__title{font-size:13px;line-height:16px}:host::ng-deep .dialog.small .dialog__content{font-size:12px;line-height:16px}:host::ng-deep .dialog.small .dialog__footer{min-height:42px;padding:16px 0 0;font-size:12px;line-height:14px}:host::ng-deep .dialog.small .dialog__footer button{padding:6px 12px;min-width:60px}:host::ng-deep .dialog.large{width:800px;padding:20px}:host::ng-deep .dialog .dialog__header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0}:host::ng-deep .dialog .dialog__header::before{display:none}:host::ng-deep .dialog .dialog__header .header__title{color:#002c4f;font-family:Arial;font-size:15px;font-weight:700;line-height:18px;flex:1;overflow:hidden;display:flex;align-items:center;gap:8px}:host::ng-deep .dialog .dialog__header .header__actions{display:flex;align-items:center;gap:20px}:host::ng-deep .dialog .dialog__header .header__close-icon{display:block;width:100%;height:100%}:host::ng-deep .dialog .dialog__header .header__close-btn{cursor:pointer;flex:0 0 20px;padding:4px;width:20px;height:20px;display:flex;justify-content:center;align-items:center}:host::ng-deep .dialog .dialog__content{width:100%;min-height:38px;position:relative;overflow-y:auto;overflow-x:hidden;margin:0;padding:0;font-size:13px;line-height:19px;flex:1;height:0}:host::ng-deep .dialog .dialog__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:20px 0 0;font-size:13px;line-height:16px;margin-bottom:0}:host::ng-deep .dialog .dialog__loading{height:100%;background:0 0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999}:host::ng-deep .dialog .dialog__loading img{position:absolute;left:50%;top:50%;width:40px;height:40px;transform:translate(-50%,-50%)}"]
|
|
22998
22976
|
}] }
|
|
22999
22977
|
];
|
|
23000
22978
|
/** @nocollapse */
|
|
@@ -23006,8 +22984,10 @@
|
|
|
23006
22984
|
hideCloseIcon: [{ type: core.Input }],
|
|
23007
22985
|
hideCloseBtn: [{ type: core.Input }],
|
|
23008
22986
|
hideSaveBtn: [{ type: core.Input }],
|
|
22987
|
+
hideDiscardBtn: [{ type: core.Input }],
|
|
23009
22988
|
saveBtnLabel: [{ type: core.Input }],
|
|
23010
22989
|
cancelBtnLabel: [{ type: core.Input }],
|
|
22990
|
+
discardBtnLabel: [{ type: core.Input }],
|
|
23011
22991
|
showErrorIcon: [{ type: core.Input }],
|
|
23012
22992
|
showZoomBtn: [{ type: core.Input }],
|
|
23013
22993
|
onCloseRequest: [{ type: core.Input }],
|
|
@@ -23033,10 +23013,14 @@
|
|
|
23033
23013
|
/** @type {?} */
|
|
23034
23014
|
CommonDialogComponent.prototype.hideSaveBtn;
|
|
23035
23015
|
/** @type {?} */
|
|
23016
|
+
CommonDialogComponent.prototype.hideDiscardBtn;
|
|
23017
|
+
/** @type {?} */
|
|
23036
23018
|
CommonDialogComponent.prototype.saveBtnLabel;
|
|
23037
23019
|
/** @type {?} */
|
|
23038
23020
|
CommonDialogComponent.prototype.cancelBtnLabel;
|
|
23039
23021
|
/** @type {?} */
|
|
23022
|
+
CommonDialogComponent.prototype.discardBtnLabel;
|
|
23023
|
+
/** @type {?} */
|
|
23040
23024
|
CommonDialogComponent.prototype.showErrorIcon;
|
|
23041
23025
|
/** @type {?} */
|
|
23042
23026
|
CommonDialogComponent.prototype.showZoomBtn;
|