@bnsights/bbsf-controls 1.0.9 → 1.0.10
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/bnsights-bbsf-controls-1.0.10.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +58 -14
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/services/ControlUtility.js +3 -3
- package/esm2015/lib/controls/ConfirmationModal/ConfirmationModal.component.js +32 -6
- package/esm2015/lib/controls/Form/Form.component.js +21 -4
- package/esm2015/lib/controls/bbsf-controls.module.js +3 -1
- package/fesm2015/bnsights-bbsf-controls.js +54 -10
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/services/ControlUtility.d.ts +1 -1
- package/lib/controls/ConfirmationModal/ConfirmationModal.component.d.ts +2 -0
- package/lib/controls/Form/Form.component.d.ts +6 -1
- package/package.json +6 -4
- package/src/lib/assets/Style.css +3 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@fullcalendar/angular'), require('@fullcalendar/daygrid'), require('@fullcalendar/timegrid'), require('@fullcalendar/list'), require('@fullcalendar/interaction'), require('@angular/core'), require('ng-block-ui'), require('@angular/forms'), require('@angular/http'), require('@angular/router'), require('ngx-toastr'), require('ngx-permissions'), require('@angular/cdk/overlay'), require('@ngrx/store-devtools'), require('@angular/common'), require('ngx-intl-tel-input'), require('@bnsights/bbsf-utilities'), require('ngx-bootstrap/datepicker'), require('rxjs'), require('ng2-file-upload'), require('ng-pick-datetime'), require('ng-multiselect-dropdown'), require('angular2-multiselect-dropdown'), require('ngx-summernote'), require('ngx-mask'), require('@syncfusion/ej2-angular-popups'), require('ngx-dropzone'), require('angular-cropperjs'), require('ngx-image-cropper'), require('@ng-bootstrap/ng-bootstrap'), require('@ngx-translate/core'), require('@angular/common/http'), require('ngx-typeahead'), require('rxjs/operators'), require('ngx-tags-input'), require('@ng-select/ng-select'), require('ngx-infinite-scroll'), require('@agm/core'), require('@angular-material-extensions/google-maps-autocomplete'), require('@fullcalendar/core/locales/en-gb'), require('@fullcalendar/core/locales/ar'), require('ngx-bootstrap/typeahead'), require('@angular/material/slide-toggle'), require('@kolkov/angular-editor'), require('angular-ng-autocomplete'), require('ng-inline-svg')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@bnsights/bbsf-controls', ['exports', '@fullcalendar/angular', '@fullcalendar/daygrid', '@fullcalendar/timegrid', '@fullcalendar/list', '@fullcalendar/interaction', '@angular/core', 'ng-block-ui', '@angular/forms', '@angular/http', '@angular/router', 'ngx-toastr', 'ngx-permissions', '@angular/cdk/overlay', '@ngrx/store-devtools', '@angular/common', 'ngx-intl-tel-input', '@bnsights/bbsf-utilities', 'ngx-bootstrap/datepicker', 'rxjs', 'ng2-file-upload', 'ng-pick-datetime', 'ng-multiselect-dropdown', 'angular2-multiselect-dropdown', 'ngx-summernote', 'ngx-mask', '@syncfusion/ej2-angular-popups', 'ngx-dropzone', 'angular-cropperjs', 'ngx-image-cropper', '@ng-bootstrap/ng-bootstrap', '@ngx-translate/core', '@angular/common/http', 'ngx-typeahead', 'rxjs/operators', 'ngx-tags-input', '@ng-select/ng-select', 'ngx-infinite-scroll', '@agm/core', '@angular-material-extensions/google-maps-autocomplete', '@fullcalendar/core/locales/en-gb', '@fullcalendar/core/locales/ar', 'ngx-bootstrap/typeahead', '@angular/material/slide-toggle', '@kolkov/angular-editor', 'angular-ng-autocomplete', 'ng-inline-svg'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bnsights = global.bnsights || {}, global.bnsights["bbsf-controls"] = {}), global.angular, global.dayGridPlugin, global.timeGridPlugin, global.listPlugin, global.interactionPlugin, global.ng.core, global.ngBlockUi, global.ng.forms, global.ng.http, global.ng.router, global.ngxToastr, global.ngxPermissions, global.ng.cdk.overlay, global.storeDevtools, global.ng.common, global.ngxIntlTelInput, global.bbsfUtilities, global.datepicker, global.rxjs, global.ng2FileUpload, global.ngPickDatetime, global.ngMultiselectDropdown, global.angular2MultiselectDropdown, global.ngxSummernote, global.ngxMask, global.ej2AngularPopups, global.ngxDropzone, global.angularCropperjs, global.ngxImageCropper, global.ngBootstrap, global.core$1, global.ng.common.http, global.ngxTypeahead, global.rxjs.operators, global.ngxTagsInput, global.ngSelect, global.ngxInfiniteScroll, global.core, global.googleMapsAutocomplete, global.enGbLocale, global.ArLocale, global.typeahead, global.ng.material.slideToggle, global.angularEditor, global.angularNgAutocomplete, global.ngInlineSvg));
|
|
5
|
-
})(this, (function (exports, angular, dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin, i0, ngBlockUi, forms, http, router, ngxToastr, ngxPermissions, overlay, storeDevtools, common, ngxIntlTelInput, bbsfUtilities, datepicker, rxjs, ng2FileUpload, ngPickDatetime, ngMultiselectDropdown, angular2MultiselectDropdown, ngxSummernote, ngxMask, ej2AngularPopups, ngxDropzone, angularCropperjs, ngxImageCropper, ngBootstrap, core$1, http$1, ngxTypeahead, operators, ngxTagsInput, ngSelect, ngxInfiniteScroll, core, googleMapsAutocomplete, enGbLocale, ArLocale, typeahead, slideToggle, angularEditor, angularNgAutocomplete, ngInlineSvg) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@fullcalendar/angular'), require('@fullcalendar/daygrid'), require('@fullcalendar/timegrid'), require('@fullcalendar/list'), require('@fullcalendar/interaction'), require('@angular/core'), require('ng-block-ui'), require('@angular/forms'), require('@angular/http'), require('@angular/router'), require('ngx-toastr'), require('ngx-permissions'), require('@angular/cdk/overlay'), require('@ngrx/store-devtools'), require('@angular/common'), require('ngx-intl-tel-input'), require('@bnsights/bbsf-utilities'), require('ngx-bootstrap/datepicker'), require('rxjs'), require('ng2-file-upload'), require('ng-pick-datetime'), require('ng-multiselect-dropdown'), require('angular2-multiselect-dropdown'), require('ngx-summernote'), require('ngx-mask'), require('@syncfusion/ej2-angular-popups'), require('ngx-dropzone'), require('angular-cropperjs'), require('ngx-image-cropper'), require('@ng-bootstrap/ng-bootstrap'), require('@ngx-translate/core'), require('@angular/common/http'), require('ngx-typeahead'), require('rxjs/operators'), require('ngx-tags-input'), require('@ng-select/ng-select'), require('ngx-infinite-scroll'), require('@agm/core'), require('@angular-material-extensions/google-maps-autocomplete'), require('@fullcalendar/core/locales/en-gb'), require('@fullcalendar/core/locales/ar'), require('ngx-bootstrap/typeahead'), require('@angular/material/slide-toggle'), require('@kolkov/angular-editor'), require('angular-ng-autocomplete'), require('ng-inline-svg'), require('sweetalert2'), require('@sweetalert2/ngx-sweetalert2')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@bnsights/bbsf-controls', ['exports', '@fullcalendar/angular', '@fullcalendar/daygrid', '@fullcalendar/timegrid', '@fullcalendar/list', '@fullcalendar/interaction', '@angular/core', 'ng-block-ui', '@angular/forms', '@angular/http', '@angular/router', 'ngx-toastr', 'ngx-permissions', '@angular/cdk/overlay', '@ngrx/store-devtools', '@angular/common', 'ngx-intl-tel-input', '@bnsights/bbsf-utilities', 'ngx-bootstrap/datepicker', 'rxjs', 'ng2-file-upload', 'ng-pick-datetime', 'ng-multiselect-dropdown', 'angular2-multiselect-dropdown', 'ngx-summernote', 'ngx-mask', '@syncfusion/ej2-angular-popups', 'ngx-dropzone', 'angular-cropperjs', 'ngx-image-cropper', '@ng-bootstrap/ng-bootstrap', '@ngx-translate/core', '@angular/common/http', 'ngx-typeahead', 'rxjs/operators', 'ngx-tags-input', '@ng-select/ng-select', 'ngx-infinite-scroll', '@agm/core', '@angular-material-extensions/google-maps-autocomplete', '@fullcalendar/core/locales/en-gb', '@fullcalendar/core/locales/ar', 'ngx-bootstrap/typeahead', '@angular/material/slide-toggle', '@kolkov/angular-editor', 'angular-ng-autocomplete', 'ng-inline-svg', 'sweetalert2', '@sweetalert2/ngx-sweetalert2'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bnsights = global.bnsights || {}, global.bnsights["bbsf-controls"] = {}), global.angular, global.dayGridPlugin, global.timeGridPlugin, global.listPlugin, global.interactionPlugin, global.ng.core, global.ngBlockUi, global.ng.forms, global.ng.http, global.ng.router, global.ngxToastr, global.ngxPermissions, global.ng.cdk.overlay, global.storeDevtools, global.ng.common, global.ngxIntlTelInput, global.bbsfUtilities, global.datepicker, global.rxjs, global.ng2FileUpload, global.ngPickDatetime, global.ngMultiselectDropdown, global.angular2MultiselectDropdown, global.ngxSummernote, global.ngxMask, global.ej2AngularPopups, global.ngxDropzone, global.angularCropperjs, global.ngxImageCropper, global.ngBootstrap, global.core$1, global.ng.common.http, global.ngxTypeahead, global.rxjs.operators, global.ngxTagsInput, global.ngSelect, global.ngxInfiniteScroll, global.core, global.googleMapsAutocomplete, global.enGbLocale, global.ArLocale, global.typeahead, global.ng.material.slideToggle, global.angularEditor, global.angularNgAutocomplete, global.ngInlineSvg, global.Swal, global.ngxSweetalert2));
|
|
5
|
+
})(this, (function (exports, angular, dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin, i0, ngBlockUi, forms, http, router, ngxToastr, ngxPermissions, overlay, storeDevtools, common, ngxIntlTelInput, bbsfUtilities, datepicker, rxjs, ng2FileUpload, ngPickDatetime, ngMultiselectDropdown, angular2MultiselectDropdown, ngxSummernote, ngxMask, ej2AngularPopups, ngxDropzone, angularCropperjs, ngxImageCropper, ngBootstrap, core$1, http$1, ngxTypeahead, operators, ngxTagsInput, ngSelect, ngxInfiniteScroll, core, googleMapsAutocomplete, enGbLocale, ArLocale, typeahead, slideToggle, angularEditor, angularNgAutocomplete, ngInlineSvg, Swal, ngxSweetalert2) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
32
32
|
var enGbLocale__default = /*#__PURE__*/_interopDefaultLegacy(enGbLocale);
|
|
33
33
|
var ArLocale__default = /*#__PURE__*/_interopDefaultLegacy(ArLocale);
|
|
34
|
+
var Swal__default = /*#__PURE__*/_interopDefaultLegacy(Swal);
|
|
34
35
|
|
|
35
36
|
var ErrorMassageValidation = /** @class */ (function () {
|
|
36
37
|
// tslint:disable-next-line: deprecation
|
|
@@ -232,8 +233,8 @@
|
|
|
232
233
|
}
|
|
233
234
|
}
|
|
234
235
|
};
|
|
235
|
-
ControlUtility.prototype.showGlobalError = function () {
|
|
236
|
-
this.controlValidationService.showGlobalError();
|
|
236
|
+
ControlUtility.prototype.showGlobalError = function (formId) {
|
|
237
|
+
this.controlValidationService.showGlobalError(null, formId);
|
|
237
238
|
this.scrollToGlobalErrorMassage();
|
|
238
239
|
};
|
|
239
240
|
ControlUtility.prototype.RemoveRequiredValidation = function (FormControl, ValidationRole, Options) {
|
|
@@ -5298,19 +5299,23 @@
|
|
|
5298
5299
|
})(exports.PagingActionMode || (exports.PagingActionMode = {}));
|
|
5299
5300
|
|
|
5300
5301
|
var FormComponent = /** @class */ (function () {
|
|
5301
|
-
function FormComponent(utilityService, controlValidationService, modalService, ngbActiveModal) {
|
|
5302
|
+
function FormComponent(controlUtility, utilityService, controlValidationService, modalService, ngbActiveModal) {
|
|
5303
|
+
this.controlUtility = controlUtility;
|
|
5302
5304
|
this.utilityService = utilityService;
|
|
5303
5305
|
this.controlValidationService = controlValidationService;
|
|
5304
5306
|
this.modalService = modalService;
|
|
5305
5307
|
this.ngbActiveModal = ngbActiveModal;
|
|
5306
5308
|
}
|
|
5307
5309
|
FormComponent.prototype.ngOnInit = function () {
|
|
5310
|
+
this.fromName = this.randomString(5);
|
|
5308
5311
|
};
|
|
5309
5312
|
FormComponent.prototype.submit = function () {
|
|
5310
5313
|
var _this = this;
|
|
5311
5314
|
this.options.FormGroup.markAllAsTouched();
|
|
5312
|
-
if (this.options.FormGroup.invalid)
|
|
5315
|
+
if (this.options.FormGroup.invalid) {
|
|
5316
|
+
this.showGlobalError();
|
|
5313
5317
|
return;
|
|
5318
|
+
}
|
|
5314
5319
|
else {
|
|
5315
5320
|
var submitModel = this.options.GetModelFunction();
|
|
5316
5321
|
var submittedService = this.options.ServiceSubmitFunction.apply(null, submitModel);
|
|
@@ -5359,16 +5364,28 @@
|
|
|
5359
5364
|
if (!this.options.DisableBlockUI)
|
|
5360
5365
|
this.utilityService.stopBlockUI();
|
|
5361
5366
|
};
|
|
5367
|
+
FormComponent.prototype.showGlobalError = function () {
|
|
5368
|
+
this.controlUtility.showGlobalError(this.fromName);
|
|
5369
|
+
};
|
|
5370
|
+
FormComponent.prototype.randomString = function (length) {
|
|
5371
|
+
var randomChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
5372
|
+
var result = '';
|
|
5373
|
+
for (var i = 0; i < length; i++) {
|
|
5374
|
+
result += randomChars.charAt(Math.floor(Math.random() * randomChars.length));
|
|
5375
|
+
}
|
|
5376
|
+
return result;
|
|
5377
|
+
};
|
|
5362
5378
|
return FormComponent;
|
|
5363
5379
|
}());
|
|
5364
5380
|
FormComponent.decorators = [
|
|
5365
5381
|
{ type: i0.Component, args: [{
|
|
5366
5382
|
// tslint:disable-next-line: component-selector
|
|
5367
5383
|
selector: 'BBSF-Form',
|
|
5368
|
-
template: "<form [FormGroup]=\"options.FormGroup\" (ngSubmit)=\"submit()\"
|
|
5384
|
+
template: "<form id=\"{{fromName}}\" [FormGroup]=\"options.FormGroup\" (ngSubmit)=\"submit()\" > \r\n \r\n <ng-template #content><ng-content></ng-content></ng-template>\r\n\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n</form>"
|
|
5369
5385
|
},] }
|
|
5370
5386
|
];
|
|
5371
5387
|
FormComponent.ctorParameters = function () { return [
|
|
5388
|
+
{ type: ControlUtility },
|
|
5372
5389
|
{ type: bbsfUtilities.UtilityService },
|
|
5373
5390
|
{ type: bbsfUtilities.ControlValidationService },
|
|
5374
5391
|
{ type: ngBootstrap.NgbModal },
|
|
@@ -5390,11 +5407,38 @@
|
|
|
5390
5407
|
};
|
|
5391
5408
|
//Method used to show confirmation modal
|
|
5392
5409
|
ConfirmationModalComponent.prototype.showModal = function () {
|
|
5410
|
+
var _this = this;
|
|
5393
5411
|
this.utilityService.startBlockUI();
|
|
5394
5412
|
//check for options text values
|
|
5395
5413
|
this.setTextValues();
|
|
5396
|
-
//
|
|
5397
|
-
this.
|
|
5414
|
+
//sweetalert styles//
|
|
5415
|
+
switch (this.options.StyleConfirmationMode) {
|
|
5416
|
+
case this.styleSuccess: {
|
|
5417
|
+
this.icon = 'success';
|
|
5418
|
+
this.btnColor = '#50cd89';
|
|
5419
|
+
}
|
|
5420
|
+
case this.styleWarning: {
|
|
5421
|
+
this.icon = 'warning';
|
|
5422
|
+
this.btnColor = '#ffc700';
|
|
5423
|
+
}
|
|
5424
|
+
case this.styleDanger: {
|
|
5425
|
+
this.icon = 'error';
|
|
5426
|
+
this.btnColor = '#f1416c';
|
|
5427
|
+
}
|
|
5428
|
+
}
|
|
5429
|
+
Swal__default["default"].fire({
|
|
5430
|
+
title: this.options.ConfirmationHeader,
|
|
5431
|
+
text: this.options.ConfirmationBody,
|
|
5432
|
+
icon: this.icon,
|
|
5433
|
+
showCancelButton: true,
|
|
5434
|
+
confirmButtonColor: this.btnColor,
|
|
5435
|
+
cancelButtonColor: '#f5f8fa',
|
|
5436
|
+
showCloseButton: true,
|
|
5437
|
+
}).then(function (result) {
|
|
5438
|
+
if (result.isConfirmed) {
|
|
5439
|
+
_this.submit();
|
|
5440
|
+
}
|
|
5441
|
+
});
|
|
5398
5442
|
this.utilityService.stopBlockUI();
|
|
5399
5443
|
};
|
|
5400
5444
|
ConfirmationModalComponent.prototype.setTextValues = function () {
|
|
@@ -5454,9 +5498,8 @@
|
|
|
5454
5498
|
}());
|
|
5455
5499
|
ConfirmationModalComponent.decorators = [
|
|
5456
5500
|
{ type: i0.Component, args: [{
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
styles: [""]
|
|
5501
|
+
template: "",
|
|
5502
|
+
selector: 'BBSF-ConfirmationModal'
|
|
5460
5503
|
},] }
|
|
5461
5504
|
];
|
|
5462
5505
|
ConfirmationModalComponent.ctorParameters = function () { return [
|
|
@@ -5559,6 +5602,7 @@
|
|
|
5559
5602
|
angularNgAutocomplete.AutocompleteLibModule,
|
|
5560
5603
|
bbsfUtilities.BBSFUtilitiesModule,
|
|
5561
5604
|
ngInlineSvg.InlineSVGModule.forRoot(),
|
|
5605
|
+
ngxSweetalert2.SweetAlert2Module
|
|
5562
5606
|
],
|
|
5563
5607
|
providers: [
|
|
5564
5608
|
ErrorMassageValidation,
|