@bnsights/bbsf-controls 1.0.82 → 1.0.84
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 +9 -0
- package/bnsights-bbsf-controls-1.0.84.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +46 -22
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/components/app-base-component.js +39 -24
- package/esm2015/lib/controls/ConfirmationModal/ConfirmationModal.component.js +2 -1
- package/esm2015/lib/controls/HtmlEditor/HtmlEditor.component.js +10 -2
- package/fesm2015/bnsights-bbsf-controls.js +46 -22
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/components/app-base-component.d.ts +3 -1
- package/package.json +1 -1
- package/bnsights-bbsf-controls-1.0.82.tgz +0 -0
|
@@ -2972,7 +2972,15 @@
|
|
|
2972
2972
|
uploadWithCredentials: false,
|
|
2973
2973
|
sanitize: false,
|
|
2974
2974
|
toolbarPosition: 'top',
|
|
2975
|
-
toolbarHiddenButtons: [
|
|
2975
|
+
toolbarHiddenButtons: [
|
|
2976
|
+
[
|
|
2977
|
+
'link',
|
|
2978
|
+
'unlink',
|
|
2979
|
+
'insertImage',
|
|
2980
|
+
'insertVideo',
|
|
2981
|
+
'insertHorizontalRule',
|
|
2982
|
+
]
|
|
2983
|
+
]
|
|
2976
2984
|
};
|
|
2977
2985
|
this.controlValidationService.isCreatedBefor = false;
|
|
2978
2986
|
// this.miscList = this.options.ToolsList_Misc != null ? this.options.ToolsList_Misc : ['codeview', 'undo', 'redo'];
|
|
@@ -6268,6 +6276,7 @@
|
|
|
6268
6276
|
confirmButtonText: this.options.SubmitButtonText,
|
|
6269
6277
|
showCancelButton: this.options.showCancelButton,
|
|
6270
6278
|
showCloseButton: this.options.showCloseButton,
|
|
6279
|
+
allowOutsideClick: false
|
|
6271
6280
|
}).then(function (result) {
|
|
6272
6281
|
if (result.isConfirmed) {
|
|
6273
6282
|
_this.submit();
|
|
@@ -8164,16 +8173,16 @@
|
|
|
8164
8173
|
var AppBaseComponent = /** @class */ (function () {
|
|
8165
8174
|
function AppBaseComponent(injector) {
|
|
8166
8175
|
var _this = this;
|
|
8167
|
-
this.pageTitle =
|
|
8176
|
+
this.pageTitle = '';
|
|
8168
8177
|
this.PageCount = 12;
|
|
8169
8178
|
this.onSuccessAddHandler = function (success) {
|
|
8170
|
-
_this.utilityService.notifySuccessMessage(_this.l(
|
|
8179
|
+
_this.utilityService.notifySuccessMessage(_this.l('RecordAdded'), null, null, false);
|
|
8171
8180
|
};
|
|
8172
8181
|
this.onSuccessEditHandler = function (success) {
|
|
8173
|
-
_this.utilityService.notifySuccessMessage(_this.l(
|
|
8182
|
+
_this.utilityService.notifySuccessMessage(_this.l('RecordUpdated'), null, null, false);
|
|
8174
8183
|
};
|
|
8175
8184
|
this.onSuccessDeleteHandler = function (success) {
|
|
8176
|
-
_this.utilityService.notifySuccessMessage(_this.l(
|
|
8185
|
+
_this.utilityService.notifySuccessMessage(_this.l('RecordDeleted'), null, null, false);
|
|
8177
8186
|
};
|
|
8178
8187
|
this.utilityService = injector.get(bbsfUtilities.UtilityService);
|
|
8179
8188
|
this.controlUtility = injector.get(ControlUtility);
|
|
@@ -8182,9 +8191,9 @@
|
|
|
8182
8191
|
this.modalService = injector.get(ngBootstrap.NgbModal);
|
|
8183
8192
|
this.titleService = injector.get(platformBrowser.Title);
|
|
8184
8193
|
this.auhService = injector.get(bbsfUtilities.AuthService);
|
|
8185
|
-
this.exportLabel = this.utilityService.getResourceValue(
|
|
8186
|
-
this.filtersLabel = this.utilityService.getResourceValue(
|
|
8187
|
-
this.addLabel = this.utilityService.getResourceValue(
|
|
8194
|
+
this.exportLabel = this.utilityService.getResourceValue('Export');
|
|
8195
|
+
this.filtersLabel = this.utilityService.getResourceValue('Filters');
|
|
8196
|
+
this.addLabel = this.utilityService.getResourceValue('Add');
|
|
8188
8197
|
this.userName = this.auhService.name();
|
|
8189
8198
|
this.isEN = this.utilityService.isCurrentLanguageEnglish();
|
|
8190
8199
|
}
|
|
@@ -8198,7 +8207,7 @@
|
|
|
8198
8207
|
return this.configurationService.getConfigurationValue(key);
|
|
8199
8208
|
};
|
|
8200
8209
|
AppBaseComponent.prototype.getLanguageModeValue = function () {
|
|
8201
|
-
return this.configurationService.getConfigurationValue(
|
|
8210
|
+
return this.configurationService.getConfigurationValue('LanguageMode');
|
|
8202
8211
|
};
|
|
8203
8212
|
AppBaseComponent.prototype.stopBlockUI = function () {
|
|
8204
8213
|
this.utilityService.stopBlockUI();
|
|
@@ -8208,13 +8217,23 @@
|
|
|
8208
8217
|
};
|
|
8209
8218
|
AppBaseComponent.prototype.openModal = function (modal, size) {
|
|
8210
8219
|
if (size)
|
|
8211
|
-
this.modalService.open(modal, {
|
|
8220
|
+
this.modalService.open(modal, {
|
|
8221
|
+
size: size,
|
|
8222
|
+
backdrop: 'static',
|
|
8223
|
+
keyboard: false,
|
|
8224
|
+
});
|
|
8212
8225
|
else
|
|
8213
|
-
this.modalService.open(modal, { backdrop: 'static' });
|
|
8226
|
+
this.modalService.open(modal, { backdrop: 'static', keyboard: false });
|
|
8214
8227
|
};
|
|
8215
8228
|
AppBaseComponent.prototype.download = function (fileDTO, fileName) {
|
|
8216
8229
|
/*let blob = new Blob([file]);*/
|
|
8217
|
-
var file = new Blob([fileDTO], {
|
|
8230
|
+
var file = new Blob([fileDTO], {
|
|
8231
|
+
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
8232
|
+
});
|
|
8233
|
+
saveAs__namespace(file, fileName);
|
|
8234
|
+
};
|
|
8235
|
+
AppBaseComponent.prototype.downloadPDF = function (fileDTO, fileName) {
|
|
8236
|
+
var file = new Blob([fileDTO], { type: "application/pdf" });
|
|
8218
8237
|
saveAs__namespace(file, fileName);
|
|
8219
8238
|
};
|
|
8220
8239
|
AppBaseComponent.prototype.base64toBlob = function (base64Data, contentType) {
|
|
@@ -8236,7 +8255,9 @@
|
|
|
8236
8255
|
return new Blob(byteArrays, { type: contentType });
|
|
8237
8256
|
};
|
|
8238
8257
|
AppBaseComponent.prototype.calculatePageTitle = function (title) {
|
|
8239
|
-
return title
|
|
8258
|
+
return title
|
|
8259
|
+
? title.substring(0, 100) + (" | " + this.l('ApplicationName'))
|
|
8260
|
+
: "" + this.l('ApplicationName');
|
|
8240
8261
|
};
|
|
8241
8262
|
AppBaseComponent.prototype.getPagingFiltersValues = function (form, filters) {
|
|
8242
8263
|
var model = new Object();
|
|
@@ -8244,7 +8265,10 @@
|
|
|
8244
8265
|
var filterItem = filters[i];
|
|
8245
8266
|
if (form.controls[filterItem.FormControlName].value == undefined)
|
|
8246
8267
|
continue;
|
|
8247
|
-
model[filterItem.ActionParameterName] =
|
|
8268
|
+
model[filterItem.ActionParameterName] =
|
|
8269
|
+
form.controls[filterItem.FormControlName].value == undefined
|
|
8270
|
+
? ''
|
|
8271
|
+
: form.controls[filterItem.FormControlName].value;
|
|
8248
8272
|
// params = params.append(filterItem.ActionParameterName, form.controls[filterItem.FormControlName].value == undefined ? '' : form.controls[filterItem.FormControlName].value);
|
|
8249
8273
|
}
|
|
8250
8274
|
return model;
|
|
@@ -8264,7 +8288,7 @@
|
|
|
8264
8288
|
selBox.select();
|
|
8265
8289
|
document.execCommand('copy');
|
|
8266
8290
|
document.body.removeChild(selBox);
|
|
8267
|
-
this.utilityService.notifySuccessMessage(this.l(
|
|
8291
|
+
this.utilityService.notifySuccessMessage(this.l('CopiedSuccessfully'));
|
|
8268
8292
|
};
|
|
8269
8293
|
AppBaseComponent.prototype.addRequiredRule = function (control, controlOptions) {
|
|
8270
8294
|
this.controlUtility.addRequiredToControl(control, controlOptions);
|
|
@@ -8278,39 +8302,39 @@
|
|
|
8278
8302
|
var fromDate = form.controls[fromDateControl].value;
|
|
8279
8303
|
var toDate = form.controls[toDateControl].value;
|
|
8280
8304
|
if (fromDate && toDate && toDate <= fromDate)
|
|
8281
|
-
return {
|
|
8305
|
+
return { customerError: true };
|
|
8282
8306
|
return null;
|
|
8283
8307
|
};
|
|
8284
8308
|
validator.massage = this.l(validationMessageKey);
|
|
8285
8309
|
return validator;
|
|
8286
8310
|
};
|
|
8287
8311
|
AppBaseComponent.prototype.recalculatePageTitle = function () {
|
|
8288
|
-
this.titleService.setTitle(this.calculatePageTitle(
|
|
8312
|
+
this.titleService.setTitle(this.calculatePageTitle(''));
|
|
8289
8313
|
};
|
|
8290
8314
|
AppBaseComponent.prototype.isEnglish = function () {
|
|
8291
8315
|
return this.utilityService.isCurrentLanguageEnglish();
|
|
8292
8316
|
};
|
|
8293
8317
|
AppBaseComponent.prototype.calculateInitials = function (name) {
|
|
8294
|
-
var language = localStorage.getItem(
|
|
8318
|
+
var language = localStorage.getItem('language');
|
|
8295
8319
|
var currentUser = this.auhService.user.profile;
|
|
8296
8320
|
console.log(currentUser);
|
|
8297
|
-
var userName = language ==
|
|
8321
|
+
var userName = language == 'en' ? currentUser.given_nameEn : currentUser.given_nameAr;
|
|
8298
8322
|
if (currentUser) {
|
|
8299
|
-
var fullName = userName.split(
|
|
8323
|
+
var fullName = userName.split(' ');
|
|
8300
8324
|
var initials = void 0;
|
|
8301
8325
|
if (fullName.length > 1) {
|
|
8302
8326
|
if (this.isEN)
|
|
8303
8327
|
initials = fullName.shift().charAt(0) + fullName.pop().charAt(0);
|
|
8304
8328
|
else
|
|
8305
8329
|
initials =
|
|
8306
|
-
fullName.shift().charAt(0) +
|
|
8330
|
+
fullName.shift().charAt(0) + ' ' + fullName.pop().charAt(0);
|
|
8307
8331
|
}
|
|
8308
8332
|
else {
|
|
8309
8333
|
initials = fullName.pop().charAt(0);
|
|
8310
8334
|
}
|
|
8311
8335
|
return initials.toUpperCase();
|
|
8312
8336
|
}
|
|
8313
|
-
return
|
|
8337
|
+
return '';
|
|
8314
8338
|
};
|
|
8315
8339
|
AppBaseComponent.prototype.getCurrentUserInitials = function () {
|
|
8316
8340
|
return this.calculateInitials(this.auhService.name());
|