@bnsights/bbsf-controls 1.0.82 → 1.0.83
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/README.md +4 -0
- package/bnsights-bbsf-controls-1.0.83.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +33 -21
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/components/app-base-component.js +35 -24
- package/esm2015/lib/controls/ConfirmationModal/ConfirmationModal.component.js +2 -1
- package/fesm2015/bnsights-bbsf-controls.js +33 -21
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/package.json +1 -1
- package/bnsights-bbsf-controls-1.0.82.tgz +0 -0
|
@@ -6268,6 +6268,7 @@
|
|
|
6268
6268
|
confirmButtonText: this.options.SubmitButtonText,
|
|
6269
6269
|
showCancelButton: this.options.showCancelButton,
|
|
6270
6270
|
showCloseButton: this.options.showCloseButton,
|
|
6271
|
+
allowOutsideClick: false
|
|
6271
6272
|
}).then(function (result) {
|
|
6272
6273
|
if (result.isConfirmed) {
|
|
6273
6274
|
_this.submit();
|
|
@@ -8164,16 +8165,16 @@
|
|
|
8164
8165
|
var AppBaseComponent = /** @class */ (function () {
|
|
8165
8166
|
function AppBaseComponent(injector) {
|
|
8166
8167
|
var _this = this;
|
|
8167
|
-
this.pageTitle =
|
|
8168
|
+
this.pageTitle = '';
|
|
8168
8169
|
this.PageCount = 12;
|
|
8169
8170
|
this.onSuccessAddHandler = function (success) {
|
|
8170
|
-
_this.utilityService.notifySuccessMessage(_this.l(
|
|
8171
|
+
_this.utilityService.notifySuccessMessage(_this.l('RecordAdded'), null, null, false);
|
|
8171
8172
|
};
|
|
8172
8173
|
this.onSuccessEditHandler = function (success) {
|
|
8173
|
-
_this.utilityService.notifySuccessMessage(_this.l(
|
|
8174
|
+
_this.utilityService.notifySuccessMessage(_this.l('RecordUpdated'), null, null, false);
|
|
8174
8175
|
};
|
|
8175
8176
|
this.onSuccessDeleteHandler = function (success) {
|
|
8176
|
-
_this.utilityService.notifySuccessMessage(_this.l(
|
|
8177
|
+
_this.utilityService.notifySuccessMessage(_this.l('RecordDeleted'), null, null, false);
|
|
8177
8178
|
};
|
|
8178
8179
|
this.utilityService = injector.get(bbsfUtilities.UtilityService);
|
|
8179
8180
|
this.controlUtility = injector.get(ControlUtility);
|
|
@@ -8182,9 +8183,9 @@
|
|
|
8182
8183
|
this.modalService = injector.get(ngBootstrap.NgbModal);
|
|
8183
8184
|
this.titleService = injector.get(platformBrowser.Title);
|
|
8184
8185
|
this.auhService = injector.get(bbsfUtilities.AuthService);
|
|
8185
|
-
this.exportLabel = this.utilityService.getResourceValue(
|
|
8186
|
-
this.filtersLabel = this.utilityService.getResourceValue(
|
|
8187
|
-
this.addLabel = this.utilityService.getResourceValue(
|
|
8186
|
+
this.exportLabel = this.utilityService.getResourceValue('Export');
|
|
8187
|
+
this.filtersLabel = this.utilityService.getResourceValue('Filters');
|
|
8188
|
+
this.addLabel = this.utilityService.getResourceValue('Add');
|
|
8188
8189
|
this.userName = this.auhService.name();
|
|
8189
8190
|
this.isEN = this.utilityService.isCurrentLanguageEnglish();
|
|
8190
8191
|
}
|
|
@@ -8198,7 +8199,7 @@
|
|
|
8198
8199
|
return this.configurationService.getConfigurationValue(key);
|
|
8199
8200
|
};
|
|
8200
8201
|
AppBaseComponent.prototype.getLanguageModeValue = function () {
|
|
8201
|
-
return this.configurationService.getConfigurationValue(
|
|
8202
|
+
return this.configurationService.getConfigurationValue('LanguageMode');
|
|
8202
8203
|
};
|
|
8203
8204
|
AppBaseComponent.prototype.stopBlockUI = function () {
|
|
8204
8205
|
this.utilityService.stopBlockUI();
|
|
@@ -8208,13 +8209,19 @@
|
|
|
8208
8209
|
};
|
|
8209
8210
|
AppBaseComponent.prototype.openModal = function (modal, size) {
|
|
8210
8211
|
if (size)
|
|
8211
|
-
this.modalService.open(modal, {
|
|
8212
|
+
this.modalService.open(modal, {
|
|
8213
|
+
size: size,
|
|
8214
|
+
backdrop: 'static',
|
|
8215
|
+
keyboard: false,
|
|
8216
|
+
});
|
|
8212
8217
|
else
|
|
8213
|
-
this.modalService.open(modal, { backdrop: 'static' });
|
|
8218
|
+
this.modalService.open(modal, { backdrop: 'static', keyboard: false });
|
|
8214
8219
|
};
|
|
8215
8220
|
AppBaseComponent.prototype.download = function (fileDTO, fileName) {
|
|
8216
8221
|
/*let blob = new Blob([file]);*/
|
|
8217
|
-
var file = new Blob([fileDTO], {
|
|
8222
|
+
var file = new Blob([fileDTO], {
|
|
8223
|
+
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
8224
|
+
});
|
|
8218
8225
|
saveAs__namespace(file, fileName);
|
|
8219
8226
|
};
|
|
8220
8227
|
AppBaseComponent.prototype.base64toBlob = function (base64Data, contentType) {
|
|
@@ -8236,7 +8243,9 @@
|
|
|
8236
8243
|
return new Blob(byteArrays, { type: contentType });
|
|
8237
8244
|
};
|
|
8238
8245
|
AppBaseComponent.prototype.calculatePageTitle = function (title) {
|
|
8239
|
-
return title
|
|
8246
|
+
return title
|
|
8247
|
+
? title.substring(0, 100) + (" | " + this.l('ApplicationName'))
|
|
8248
|
+
: "" + this.l('ApplicationName');
|
|
8240
8249
|
};
|
|
8241
8250
|
AppBaseComponent.prototype.getPagingFiltersValues = function (form, filters) {
|
|
8242
8251
|
var model = new Object();
|
|
@@ -8244,7 +8253,10 @@
|
|
|
8244
8253
|
var filterItem = filters[i];
|
|
8245
8254
|
if (form.controls[filterItem.FormControlName].value == undefined)
|
|
8246
8255
|
continue;
|
|
8247
|
-
model[filterItem.ActionParameterName] =
|
|
8256
|
+
model[filterItem.ActionParameterName] =
|
|
8257
|
+
form.controls[filterItem.FormControlName].value == undefined
|
|
8258
|
+
? ''
|
|
8259
|
+
: form.controls[filterItem.FormControlName].value;
|
|
8248
8260
|
// params = params.append(filterItem.ActionParameterName, form.controls[filterItem.FormControlName].value == undefined ? '' : form.controls[filterItem.FormControlName].value);
|
|
8249
8261
|
}
|
|
8250
8262
|
return model;
|
|
@@ -8264,7 +8276,7 @@
|
|
|
8264
8276
|
selBox.select();
|
|
8265
8277
|
document.execCommand('copy');
|
|
8266
8278
|
document.body.removeChild(selBox);
|
|
8267
|
-
this.utilityService.notifySuccessMessage(this.l(
|
|
8279
|
+
this.utilityService.notifySuccessMessage(this.l('CopiedSuccessfully'));
|
|
8268
8280
|
};
|
|
8269
8281
|
AppBaseComponent.prototype.addRequiredRule = function (control, controlOptions) {
|
|
8270
8282
|
this.controlUtility.addRequiredToControl(control, controlOptions);
|
|
@@ -8278,39 +8290,39 @@
|
|
|
8278
8290
|
var fromDate = form.controls[fromDateControl].value;
|
|
8279
8291
|
var toDate = form.controls[toDateControl].value;
|
|
8280
8292
|
if (fromDate && toDate && toDate <= fromDate)
|
|
8281
|
-
return {
|
|
8293
|
+
return { customerError: true };
|
|
8282
8294
|
return null;
|
|
8283
8295
|
};
|
|
8284
8296
|
validator.massage = this.l(validationMessageKey);
|
|
8285
8297
|
return validator;
|
|
8286
8298
|
};
|
|
8287
8299
|
AppBaseComponent.prototype.recalculatePageTitle = function () {
|
|
8288
|
-
this.titleService.setTitle(this.calculatePageTitle(
|
|
8300
|
+
this.titleService.setTitle(this.calculatePageTitle(''));
|
|
8289
8301
|
};
|
|
8290
8302
|
AppBaseComponent.prototype.isEnglish = function () {
|
|
8291
8303
|
return this.utilityService.isCurrentLanguageEnglish();
|
|
8292
8304
|
};
|
|
8293
8305
|
AppBaseComponent.prototype.calculateInitials = function (name) {
|
|
8294
|
-
var language = localStorage.getItem(
|
|
8306
|
+
var language = localStorage.getItem('language');
|
|
8295
8307
|
var currentUser = this.auhService.user.profile;
|
|
8296
8308
|
console.log(currentUser);
|
|
8297
|
-
var userName = language ==
|
|
8309
|
+
var userName = language == 'en' ? currentUser.given_nameEn : currentUser.given_nameAr;
|
|
8298
8310
|
if (currentUser) {
|
|
8299
|
-
var fullName = userName.split(
|
|
8311
|
+
var fullName = userName.split(' ');
|
|
8300
8312
|
var initials = void 0;
|
|
8301
8313
|
if (fullName.length > 1) {
|
|
8302
8314
|
if (this.isEN)
|
|
8303
8315
|
initials = fullName.shift().charAt(0) + fullName.pop().charAt(0);
|
|
8304
8316
|
else
|
|
8305
8317
|
initials =
|
|
8306
|
-
fullName.shift().charAt(0) +
|
|
8318
|
+
fullName.shift().charAt(0) + ' ' + fullName.pop().charAt(0);
|
|
8307
8319
|
}
|
|
8308
8320
|
else {
|
|
8309
8321
|
initials = fullName.pop().charAt(0);
|
|
8310
8322
|
}
|
|
8311
8323
|
return initials.toUpperCase();
|
|
8312
8324
|
}
|
|
8313
|
-
return
|
|
8325
|
+
return '';
|
|
8314
8326
|
};
|
|
8315
8327
|
AppBaseComponent.prototype.getCurrentUserInitials = function () {
|
|
8316
8328
|
return this.calculateInitials(this.auhService.name());
|