@bnsights/bbsf-controls 1.0.45 → 1.0.48
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 +17 -0
- package/bnsights-bbsf-controls-1.0.48.tgz +0 -0
- package/bnsights-bbsf-controls.d.ts +1 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +768 -531
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/bnsights-bbsf-controls.js +2 -1
- package/esm2015/lib/Shared/Enums/TagInputView.js +7 -0
- package/esm2015/lib/Shared/Models/AutocompleteDTO.js +2 -1
- package/esm2015/lib/Shared/Models/AutocompleteOptions.js +2 -1
- package/esm2015/lib/Shared/Models/PagingOptions.js +5 -1
- package/esm2015/lib/Shared/Models/TagsInputDTO.js +1 -1
- package/esm2015/lib/Shared/Models/TagsInputOptions.js +9 -5
- package/esm2015/lib/Shared/components/ng-tag-input.js +292 -0
- package/esm2015/lib/Shared/default_intl.js +21 -0
- package/esm2015/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.js +3 -2
- package/esm2015/lib/controls/DateTimePicker/DateTimePicker.component.js +6 -1
- package/esm2015/lib/controls/Paging/Paging.component.js +81 -41
- package/esm2015/lib/controls/TagsInput/TagsInput.component.js +2 -2
- package/esm2015/lib/controls/bbsf-controls.module.js +4 -2
- package/esm2015/public-api.js +3 -1
- package/fesm2015/bnsights-bbsf-controls.js +418 -52
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Enums/TagInputView.d.ts +5 -0
- package/lib/Shared/Models/AutocompleteDTO.d.ts +1 -0
- package/lib/Shared/Models/AutocompleteOptions.d.ts +1 -0
- package/lib/Shared/Models/PagingOptions.d.ts +4 -0
- package/lib/Shared/Models/TagsInputDTO.d.ts +4 -2
- package/lib/Shared/Models/TagsInputOptions.d.ts +3 -0
- package/lib/Shared/components/ng-tag-input.d.ts +45 -0
- package/lib/Shared/default_intl.d.ts +10 -0
- package/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.d.ts +1 -0
- package/lib/controls/Paging/Paging.component.d.ts +7 -2
- package/package.json +2 -2
- package/public-api.d.ts +2 -0
- package/bnsights-bbsf-controls-1.0.45.tgz +0 -0
|
@@ -378,6 +378,345 @@
|
|
|
378
378
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
379
379
|
];
|
|
380
380
|
|
|
381
|
+
/*! *****************************************************************************
|
|
382
|
+
Copyright (c) Microsoft Corporation.
|
|
383
|
+
|
|
384
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
385
|
+
purpose with or without fee is hereby granted.
|
|
386
|
+
|
|
387
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
388
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
389
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
390
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
391
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
392
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
393
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
394
|
+
***************************************************************************** */
|
|
395
|
+
/* global Reflect, Promise */
|
|
396
|
+
var extendStatics = function (d, b) {
|
|
397
|
+
extendStatics = Object.setPrototypeOf ||
|
|
398
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
399
|
+
function (d, b) { for (var p in b)
|
|
400
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
401
|
+
d[p] = b[p]; };
|
|
402
|
+
return extendStatics(d, b);
|
|
403
|
+
};
|
|
404
|
+
function __extends(d, b) {
|
|
405
|
+
if (typeof b !== "function" && b !== null)
|
|
406
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
407
|
+
extendStatics(d, b);
|
|
408
|
+
function __() { this.constructor = d; }
|
|
409
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
410
|
+
}
|
|
411
|
+
var __assign = function () {
|
|
412
|
+
__assign = Object.assign || function __assign(t) {
|
|
413
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
414
|
+
s = arguments[i];
|
|
415
|
+
for (var p in s)
|
|
416
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
417
|
+
t[p] = s[p];
|
|
418
|
+
}
|
|
419
|
+
return t;
|
|
420
|
+
};
|
|
421
|
+
return __assign.apply(this, arguments);
|
|
422
|
+
};
|
|
423
|
+
function __rest(s, e) {
|
|
424
|
+
var t = {};
|
|
425
|
+
for (var p in s)
|
|
426
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
427
|
+
t[p] = s[p];
|
|
428
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
429
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
430
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
431
|
+
t[p[i]] = s[p[i]];
|
|
432
|
+
}
|
|
433
|
+
return t;
|
|
434
|
+
}
|
|
435
|
+
function __decorate(decorators, target, key, desc) {
|
|
436
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
437
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
438
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
439
|
+
else
|
|
440
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
441
|
+
if (d = decorators[i])
|
|
442
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
443
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
444
|
+
}
|
|
445
|
+
function __param(paramIndex, decorator) {
|
|
446
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
447
|
+
}
|
|
448
|
+
function __metadata(metadataKey, metadataValue) {
|
|
449
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
450
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
451
|
+
}
|
|
452
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
453
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
454
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
455
|
+
function fulfilled(value) { try {
|
|
456
|
+
step(generator.next(value));
|
|
457
|
+
}
|
|
458
|
+
catch (e) {
|
|
459
|
+
reject(e);
|
|
460
|
+
} }
|
|
461
|
+
function rejected(value) { try {
|
|
462
|
+
step(generator["throw"](value));
|
|
463
|
+
}
|
|
464
|
+
catch (e) {
|
|
465
|
+
reject(e);
|
|
466
|
+
} }
|
|
467
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
468
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
function __generator(thisArg, body) {
|
|
472
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
473
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
474
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
475
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
476
|
+
function step(op) {
|
|
477
|
+
if (f)
|
|
478
|
+
throw new TypeError("Generator is already executing.");
|
|
479
|
+
while (_)
|
|
480
|
+
try {
|
|
481
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
482
|
+
return t;
|
|
483
|
+
if (y = 0, t)
|
|
484
|
+
op = [op[0] & 2, t.value];
|
|
485
|
+
switch (op[0]) {
|
|
486
|
+
case 0:
|
|
487
|
+
case 1:
|
|
488
|
+
t = op;
|
|
489
|
+
break;
|
|
490
|
+
case 4:
|
|
491
|
+
_.label++;
|
|
492
|
+
return { value: op[1], done: false };
|
|
493
|
+
case 5:
|
|
494
|
+
_.label++;
|
|
495
|
+
y = op[1];
|
|
496
|
+
op = [0];
|
|
497
|
+
continue;
|
|
498
|
+
case 7:
|
|
499
|
+
op = _.ops.pop();
|
|
500
|
+
_.trys.pop();
|
|
501
|
+
continue;
|
|
502
|
+
default:
|
|
503
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
504
|
+
_ = 0;
|
|
505
|
+
continue;
|
|
506
|
+
}
|
|
507
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
508
|
+
_.label = op[1];
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
512
|
+
_.label = t[1];
|
|
513
|
+
t = op;
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
if (t && _.label < t[2]) {
|
|
517
|
+
_.label = t[2];
|
|
518
|
+
_.ops.push(op);
|
|
519
|
+
break;
|
|
520
|
+
}
|
|
521
|
+
if (t[2])
|
|
522
|
+
_.ops.pop();
|
|
523
|
+
_.trys.pop();
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
op = body.call(thisArg, _);
|
|
527
|
+
}
|
|
528
|
+
catch (e) {
|
|
529
|
+
op = [6, e];
|
|
530
|
+
y = 0;
|
|
531
|
+
}
|
|
532
|
+
finally {
|
|
533
|
+
f = t = 0;
|
|
534
|
+
}
|
|
535
|
+
if (op[0] & 5)
|
|
536
|
+
throw op[1];
|
|
537
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
541
|
+
if (k2 === undefined)
|
|
542
|
+
k2 = k;
|
|
543
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
544
|
+
}) : (function (o, m, k, k2) {
|
|
545
|
+
if (k2 === undefined)
|
|
546
|
+
k2 = k;
|
|
547
|
+
o[k2] = m[k];
|
|
548
|
+
});
|
|
549
|
+
function __exportStar(m, o) {
|
|
550
|
+
for (var p in m)
|
|
551
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
552
|
+
__createBinding(o, m, p);
|
|
553
|
+
}
|
|
554
|
+
function __values(o) {
|
|
555
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
556
|
+
if (m)
|
|
557
|
+
return m.call(o);
|
|
558
|
+
if (o && typeof o.length === "number")
|
|
559
|
+
return {
|
|
560
|
+
next: function () {
|
|
561
|
+
if (o && i >= o.length)
|
|
562
|
+
o = void 0;
|
|
563
|
+
return { value: o && o[i++], done: !o };
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
567
|
+
}
|
|
568
|
+
function __read(o, n) {
|
|
569
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
570
|
+
if (!m)
|
|
571
|
+
return o;
|
|
572
|
+
var i = m.call(o), r, ar = [], e;
|
|
573
|
+
try {
|
|
574
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
575
|
+
ar.push(r.value);
|
|
576
|
+
}
|
|
577
|
+
catch (error) {
|
|
578
|
+
e = { error: error };
|
|
579
|
+
}
|
|
580
|
+
finally {
|
|
581
|
+
try {
|
|
582
|
+
if (r && !r.done && (m = i["return"]))
|
|
583
|
+
m.call(i);
|
|
584
|
+
}
|
|
585
|
+
finally {
|
|
586
|
+
if (e)
|
|
587
|
+
throw e.error;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
return ar;
|
|
591
|
+
}
|
|
592
|
+
/** @deprecated */
|
|
593
|
+
function __spread() {
|
|
594
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
595
|
+
ar = ar.concat(__read(arguments[i]));
|
|
596
|
+
return ar;
|
|
597
|
+
}
|
|
598
|
+
/** @deprecated */
|
|
599
|
+
function __spreadArrays() {
|
|
600
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
601
|
+
s += arguments[i].length;
|
|
602
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
603
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
604
|
+
r[k] = a[j];
|
|
605
|
+
return r;
|
|
606
|
+
}
|
|
607
|
+
function __spreadArray(to, from, pack) {
|
|
608
|
+
if (pack || arguments.length === 2)
|
|
609
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
610
|
+
if (ar || !(i in from)) {
|
|
611
|
+
if (!ar)
|
|
612
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
613
|
+
ar[i] = from[i];
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
617
|
+
}
|
|
618
|
+
function __await(v) {
|
|
619
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
620
|
+
}
|
|
621
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
622
|
+
if (!Symbol.asyncIterator)
|
|
623
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
624
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
625
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
626
|
+
function verb(n) { if (g[n])
|
|
627
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
628
|
+
function resume(n, v) { try {
|
|
629
|
+
step(g[n](v));
|
|
630
|
+
}
|
|
631
|
+
catch (e) {
|
|
632
|
+
settle(q[0][3], e);
|
|
633
|
+
} }
|
|
634
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
635
|
+
function fulfill(value) { resume("next", value); }
|
|
636
|
+
function reject(value) { resume("throw", value); }
|
|
637
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
638
|
+
resume(q[0][0], q[0][1]); }
|
|
639
|
+
}
|
|
640
|
+
function __asyncDelegator(o) {
|
|
641
|
+
var i, p;
|
|
642
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
643
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
644
|
+
}
|
|
645
|
+
function __asyncValues(o) {
|
|
646
|
+
if (!Symbol.asyncIterator)
|
|
647
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
648
|
+
var m = o[Symbol.asyncIterator], i;
|
|
649
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
650
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
651
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
652
|
+
}
|
|
653
|
+
function __makeTemplateObject(cooked, raw) {
|
|
654
|
+
if (Object.defineProperty) {
|
|
655
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
656
|
+
}
|
|
657
|
+
else {
|
|
658
|
+
cooked.raw = raw;
|
|
659
|
+
}
|
|
660
|
+
return cooked;
|
|
661
|
+
}
|
|
662
|
+
;
|
|
663
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
664
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
665
|
+
}) : function (o, v) {
|
|
666
|
+
o["default"] = v;
|
|
667
|
+
};
|
|
668
|
+
function __importStar(mod) {
|
|
669
|
+
if (mod && mod.__esModule)
|
|
670
|
+
return mod;
|
|
671
|
+
var result = {};
|
|
672
|
+
if (mod != null)
|
|
673
|
+
for (var k in mod)
|
|
674
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
675
|
+
__createBinding(result, mod, k);
|
|
676
|
+
__setModuleDefault(result, mod);
|
|
677
|
+
return result;
|
|
678
|
+
}
|
|
679
|
+
function __importDefault(mod) {
|
|
680
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
681
|
+
}
|
|
682
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
683
|
+
if (kind === "a" && !f)
|
|
684
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
685
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
686
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
687
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
688
|
+
}
|
|
689
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
690
|
+
if (kind === "m")
|
|
691
|
+
throw new TypeError("Private method is not writable");
|
|
692
|
+
if (kind === "a" && !f)
|
|
693
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
694
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
695
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
696
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
// here is the default text string - just adjust the strings to reflect your preferred language
|
|
700
|
+
var DefaultIntl = /** @class */ (function (_super) {
|
|
701
|
+
__extends(DefaultIntl, _super);
|
|
702
|
+
function DefaultIntl(utilityService) {
|
|
703
|
+
var _this = _super.call(this) || this;
|
|
704
|
+
_this.utilityService = utilityService;
|
|
705
|
+
/** A label for the range 'from' in picker info */
|
|
706
|
+
_this.rangeFromLabel = _this.utilityService.getResourceValue("From");
|
|
707
|
+
/** A label for the range 'to' in picker info */
|
|
708
|
+
_this.rangeToLabel = _this.utilityService.getResourceValue("To");
|
|
709
|
+
return _this;
|
|
710
|
+
}
|
|
711
|
+
return DefaultIntl;
|
|
712
|
+
}(ngPickDatetime.OwlDateTimeIntl));
|
|
713
|
+
DefaultIntl.decorators = [
|
|
714
|
+
{ type: i0.Injectable }
|
|
715
|
+
];
|
|
716
|
+
DefaultIntl.ctorParameters = function () { return [
|
|
717
|
+
{ type: bbsfUtilities.UtilityService }
|
|
718
|
+
]; };
|
|
719
|
+
|
|
381
720
|
var DateInputComponent = /** @class */ (function () {
|
|
382
721
|
// tslint:disable-next-line: max-line-length
|
|
383
722
|
function DateInputComponent(datepipe, onChangeService, ErrorHandler, controlUtility, controlContainer, DateInputControlHost, UtilityService, translate, controlValidationService, dateTimeAdapter) {
|
|
@@ -557,6 +896,9 @@
|
|
|
557
896
|
{ type: i0.Component, args: [{
|
|
558
897
|
selector: 'BBSF-DateTimePicker',
|
|
559
898
|
template: "<div class=\"b-control b-date-picker\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <input autocomplete=\"off\" (dateTimeChange)=\"onDateSelect($event)\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"{{options.Name}}\" [owlDateTime]=\"dt1\" [owlDateTimeTrigger]=\"dt1\"\r\n [class.is-invalid]=\"DatePickerFormControl.invalid && DatePickerFormControl.touched\"\r\n [min]=\"options.StartDate\" [max]=\"options.EndDate\" [hour12Timer]=\"options.Hour12Timer\" [selectMode]=\"getSelectMode(options.SelectMode)\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" #Dateinput>\r\n\r\n <owl-date-time [pickerType]=\"getPickerType(options.PickerType)\"\r\n [startView]=\"getStartView(options.StartView)\" [firstDayOfWeek]=\"options.FirstDayOfWeek\"\r\n [hour12Timer]=\"options.Hour12Timer\" #dt1></owl-date-time>\r\n \r\n <div class=\"input-group-append\">\r\n <span class=\"input-group-text\" [owlDateTimeTrigger]=\"dt1\">\r\n <span class=\"svg-icon\">\r\n <svg id=\"Group_356\" data-name=\"Group 356\" xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"15\" viewBox=\"0 0 48 48\">\r\n <path id=\"Path_6737\" data-name=\"Path 6737\" d=\"M11.583,1a1,1,0,0,0-2,0V5.7h2Z\" style=\"\"></path>\r\n <path id=\"Path_6738\" data-name=\"Path 6738\" d=\"M38.417,1a1,1,0,0,0-2,0V5.7h2Z\"></path>\r\n <path id=\"Path_6739\" data-name=\"Path 6739\" d=\"M0,43.146C0,45.822,1.826,48,4.07,48H43.928C46.174,48,48,45.822,48,43.146V17.121H0Z\" fill=\"#d5d5d5\"></path>\r\n <path id=\"Path_6740\" data-name=\"Path 6740\" d=\"M43.929,5.7H38.417v5.512a1,1,0,1,1-2,0V5.7H11.583v5.512a1,1,0,1,1-2,0V5.7H4.07C1.826,5.7,0,7.877,0,10.555v4.566H48V10.555C48,7.877,46.174,5.7,43.929,5.7Z\" fill=\"#595959\"></path>\r\n </svg>\r\n </span>\r\n </span>\r\n <!--<span class=\"input-group-text\" *ngIf=\"options.EnableCopyToClipboard\"\r\n (click)=\"copyInputMessage(Dateinput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>-->\r\n </div>\r\n </div>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(DatePickerFormControl.invalid && DatePickerFormControl.touched)\">\r\n {{getErrorValidation(DatePickerFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"control-desc\"*ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n \r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
899
|
+
providers: [
|
|
900
|
+
{ provide: ngPickDatetime.OwlDateTimeIntl, useClass: DefaultIntl }
|
|
901
|
+
],
|
|
560
902
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
561
903
|
},] }
|
|
562
904
|
];
|
|
@@ -802,501 +1144,183 @@
|
|
|
802
1144
|
this.markAllAsTouched = false;
|
|
803
1145
|
}
|
|
804
1146
|
return this.controlUtility.getErrorValidationMassage(ErrorList, this.group, this.options);
|
|
805
|
-
};
|
|
806
|
-
FileUploadComponent.prototype.fileOverAnother = function (event) {
|
|
807
|
-
this.hasAnotherDropZoneOver = event;
|
|
808
|
-
};
|
|
809
|
-
FileUploadComponent.prototype.onFileChange = function () {
|
|
810
|
-
var _this = this;
|
|
811
|
-
var FilesArray = [];
|
|
812
|
-
if (this.options.IsMultipleFile && this.options.MinNoOfFiles != null && this.options.MinNoOfFiles > 0 && this.options.MinNoOfFiles > this.uploader.queue.length) {
|
|
813
|
-
var formControl = this.fileUploadFormControl;
|
|
814
|
-
formControl.setErrors({ MinFileCountValidationKey: this.options.MinNoOfFiles });
|
|
815
|
-
formControl.markAsTouched();
|
|
816
|
-
this.uploader.queue = [];
|
|
817
|
-
return;
|
|
818
|
-
}
|
|
819
|
-
if (this.options.IsMultipleFile && this.options.MaxNoOfFiles != null && this.options.MaxNoOfFiles > 0 && this.options.MaxNoOfFiles < this.uploader.queue.length) {
|
|
820
|
-
var formControl = this.fileUploadFormControl;
|
|
821
|
-
formControl.setErrors({ MaxFileCountValidationKey: this.options.MaxNoOfFiles });
|
|
822
|
-
formControl.markAsTouched();
|
|
823
|
-
this.uploader.queue = [];
|
|
824
|
-
return;
|
|
825
|
-
}
|
|
826
|
-
if (this.options.IsMultipleFile && (this.options.MaxSizeForAllFilesInMB != null && this.options.MaxSizeForAllFilesInMB > 0)) {
|
|
827
|
-
var AllSizeFile = 0;
|
|
828
|
-
for (var index = 0; index < this.uploader.queue.length; index++) {
|
|
829
|
-
var element = this.uploader.queue[index];
|
|
830
|
-
var file = element.file;
|
|
831
|
-
AllSizeFile = AllSizeFile + file.size;
|
|
832
|
-
}
|
|
833
|
-
var MaxSizeForAllFiles = this.options.MaxSizeForAllFilesInMB * 1000 * 1000;
|
|
834
|
-
if (AllSizeFile > MaxSizeForAllFiles) {
|
|
835
|
-
var formControl = this.fileUploadFormControl;
|
|
836
|
-
formControl.setErrors({ MaxSizeForAllFilesInMB: this.options.MaxSizeForAllFilesInMB + 'M' });
|
|
837
|
-
formControl.markAsTouched();
|
|
838
|
-
this.uploader.queue = [];
|
|
839
|
-
return;
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
var AddedQueue = this.uploader.queue.filter(function (object) { return object["some"].lastModified != null; });
|
|
843
|
-
var _loop_1 = function (index) {
|
|
844
|
-
var element = AddedQueue[index];
|
|
845
|
-
var file = element.file;
|
|
846
|
-
var maxFileSize = this_1.options.FileMaxSizeInMB * 1000 * 1000;
|
|
847
|
-
if (file) {
|
|
848
|
-
var fileType = file.type;
|
|
849
|
-
if (file.size > maxFileSize) {
|
|
850
|
-
var formControl = this_1.fileUploadFormControl;
|
|
851
|
-
formControl.setErrors({ FileMaxSizeInMB: this_1.options.FileMaxSizeInMB + 'M' });
|
|
852
|
-
formControl.markAsTouched();
|
|
853
|
-
this_1.uploader.queue = [];
|
|
854
|
-
return { value: void 0 };
|
|
855
|
-
}
|
|
856
|
-
if (this_1.options.FileUploadAcceptsTypes != null && this_1.options.FileUploadAcceptsTypes.length > 0 && !(this_1.AcceptedTypeArray.includes(fileType.toUpperCase()) || this_1.AcceptedTypeArray.includes(fileType.toLowerCase()))) {
|
|
857
|
-
var formControl = this_1.fileUploadFormControl;
|
|
858
|
-
formControl.setErrors({ ToolTipTypeError: this_1.ToolTipTypeArray });
|
|
859
|
-
formControl.markAsTouched();
|
|
860
|
-
this_1.uploader.queue = [];
|
|
861
|
-
return { value: void 0 };
|
|
862
|
-
}
|
|
863
|
-
var reader_1 = new FileReader();
|
|
864
|
-
var fileObject = file.rawFile;
|
|
865
|
-
reader_1.readAsDataURL(fileObject);
|
|
866
|
-
reader_1.onload = function () {
|
|
867
|
-
var existingID_GUID = null;
|
|
868
|
-
if (!_this.options.IsMultipleFile && _this.file)
|
|
869
|
-
existingID_GUID = _this.file.NameWithExtension == file.name ? _this.file.ID_GUID : null;
|
|
870
|
-
var AddedFile = {
|
|
871
|
-
FileName: file.name,
|
|
872
|
-
FileType: file.type,
|
|
873
|
-
FileBase64: reader_1.result.toString().split(',')[1],
|
|
874
|
-
FileSizeInMB: ((file.size / 1000) / 1000),
|
|
875
|
-
NameWithExtension: file.name,
|
|
876
|
-
ID_GUID: existingID_GUID
|
|
877
|
-
};
|
|
878
|
-
if (_this.options.IsMultipleFile == false) {
|
|
879
|
-
_this.fileUploadModel = new FileUploadModel();
|
|
880
|
-
_this.fileUploadModel.File = AddedFile;
|
|
881
|
-
_this.fileUploadFormControl.setValue(_this.fileUploadModel);
|
|
882
|
-
_this.group.get(_this.options.Name).setValue(_this.fileUploadModel);
|
|
883
|
-
}
|
|
884
|
-
else {
|
|
885
|
-
FilesArray.push(AddedFile);
|
|
886
|
-
_this.multipleFileUploadModel.UploadedFiles = FilesArray;
|
|
887
|
-
if (_this.options.Value != null && _this.options.Value != undefined) {
|
|
888
|
-
if (_this.options.Value.CorrelationID_GUID == null) {
|
|
889
|
-
_this.multipleFileUploadModel.RemovedFiles = [];
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
_this.fileUploadFormControl.setValue(_this.multipleFileUploadModel);
|
|
893
|
-
_this.group.get(_this.options.Name).setValue(_this.multipleFileUploadModel);
|
|
894
|
-
}
|
|
895
|
-
};
|
|
896
|
-
var originalValue = this_1.group.get(this_1.options.Name).value;
|
|
897
|
-
if (this_1.options.PatchFunction && this_1.options.PatchPath && this_1.group.get(this_1.options.Name).valid) {
|
|
898
|
-
this_1.controlUtility.patchControlValue(originalValue, this_1.options.PatchFunction, this_1.options.PatchPath);
|
|
899
|
-
}
|
|
900
|
-
this_1.OnChange.emit(originalValue);
|
|
901
|
-
}
|
|
902
|
-
};
|
|
903
|
-
var this_1 = this;
|
|
904
|
-
for (var index = 0; index < AddedQueue.length; index++) {
|
|
905
|
-
var state_1 = _loop_1(index);
|
|
906
|
-
if (typeof state_1 === "object")
|
|
907
|
-
return state_1.value;
|
|
908
|
-
}
|
|
909
|
-
};
|
|
910
|
-
FileUploadComponent.prototype.removeFromControlValue = function (item) {
|
|
911
|
-
if (this.options.IsMultipleFile == false) {
|
|
912
|
-
this.fileUploadModel = null;
|
|
913
|
-
if (this.options.IsRequired == true) {
|
|
914
|
-
this.fileUploadFormControl.markAsTouched();
|
|
915
|
-
this.fileUploadFormControl.invalid;
|
|
916
|
-
}
|
|
917
|
-
this.group.get(this.options.Name).setValue(this.fileUploadModel);
|
|
918
|
-
}
|
|
919
|
-
else {
|
|
920
|
-
if (this.options.Value != null && this.options.Value != undefined) {
|
|
921
|
-
if (this.options.Value.CorrelationID_GUID == null) {
|
|
922
|
-
this.deletedFiles = [];
|
|
923
|
-
this.multipleFileUploadModel.RemovedFiles = [];
|
|
924
|
-
}
|
|
925
|
-
else {
|
|
926
|
-
if (this.multipleFileUploadModel.RemovedFiles.length == 0) {
|
|
927
|
-
var FileObject_1 = item.file.rawFile;
|
|
928
|
-
var DeletedItem = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension == FileObject_1.name; })[0];
|
|
929
|
-
this.multipleFileUploadModel.ExistingFiles = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension != FileObject_1.name; });
|
|
930
|
-
this.deletedFiles.push(DeletedItem);
|
|
931
|
-
this.multipleFileUploadModel.RemovedFiles.push(DeletedItem.ID_GUID);
|
|
932
|
-
}
|
|
933
|
-
else {
|
|
934
|
-
var FileObject_2 = item.file.rawFile;
|
|
935
|
-
var deletedList = this.deletedFiles.filter(function (Object) { return Object.NameWithExtension == FileObject_2.name; });
|
|
936
|
-
if (deletedList.length == 0 || deletedList == undefined) {
|
|
937
|
-
var DeletedItem = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension == FileObject_2.name; })[0];
|
|
938
|
-
this.multipleFileUploadModel.ExistingFiles = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension != FileObject_2.name; });
|
|
939
|
-
this.deletedFiles.push(DeletedItem);
|
|
940
|
-
this.multipleFileUploadModel.RemovedFiles.push(DeletedItem.ID_GUID);
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
else {
|
|
946
|
-
this.deletedFiles = [];
|
|
947
|
-
this.multipleFileUploadModel.RemovedFiles = [];
|
|
948
|
-
}
|
|
949
|
-
this.multipleFileUploadModel.UploadedFiles = this.multipleFileUploadModel.UploadedFiles.filter(function (Object) { return Object.NameWithExtension != item._file.name; });
|
|
950
|
-
if ((this.multipleFileUploadModel.UploadedFiles == null || this.multipleFileUploadModel.UploadedFiles == []) && this.options.IsRequired) {
|
|
951
|
-
this.fileUploadFormControl.markAsTouched();
|
|
952
|
-
this.fileUploadFormControl.invalid;
|
|
953
|
-
}
|
|
954
|
-
this.fileUploadFormControl.setValue(this.multipleFileUploadModel);
|
|
955
|
-
this.group.get(this.options.Name).setValue(this.multipleFileUploadModel);
|
|
956
|
-
}
|
|
957
|
-
};
|
|
958
|
-
return FileUploadComponent;
|
|
959
|
-
}());
|
|
960
|
-
FileUploadComponent.controlContainerstatic = null;
|
|
961
|
-
FileUploadComponent.decorators = [
|
|
962
|
-
{ type: i0.Component, args: [{
|
|
963
|
-
selector: 'BBSF-FileUplaod',
|
|
964
|
-
template: "\r\n<div class=\"b-control b-fileupload\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"col-form-label col-sm-12 mb-2\" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n\r\n <ejs-tooltip id=\"tooltip\" content='{{ValidationMessage}}' tipPointerPosition='Middle'\r\n *ngIf=\"(ValidationMessage!=null&&ValidationMessage!='')\">\r\n <i class=\"fa fa-info-circle\" data-plugin=\"tooltip\" data-html=\"true\">\r\n </i>\r\n </ejs-tooltip>\r\n\r\n\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n\r\n <div>\r\n\r\n <div ng2FileDrop *ngIf=\"(options.IsDropZone)&&(!((options.IsMultipleFile==false)&&(uploader.queue.length)>0))\"\r\n [ngClass]=\"{'another-file-over-class': hasAnotherDropZoneOver}\" (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\" [uploader]=\"uploader\" [accept]=\"AcceptedType\"\r\n class=\"well my-drop-zoneform-control bnsights-control {{options.ExtraClasses}}\"\r\n (change)=\"onFileChange()\" id=\"{{options.Name}}\" multiple=\"{{options.IsMultipleFile?'multiple':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" type=\"file\" formControlName=\"{{options.Name}}\"\r\n id=\"options.Name\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n\r\n\r\n <div class=\"dragndrop text-center\">\r\n <p class=\"drag-icon mb-3\">\r\n <i class=\"fas fa-cloud-download-alt\"></i>\r\n </p>\r\n <p>\r\n {{UtilityService.getResourceValue(\"DragAndDropHere\")}}\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"(!options.IsDropZone)&&!((uploader.queue.length>0)&&(!options.IsMultipleFile))\">\r\n <button type=\"button\" class=\"btn btn-light btn-sm file-fake-input mb-3\" (click)=\"fileInput.click();\">\r\n <i class=\"icon fa fa-cloud-upload-alt\"></i>\r\n {{UtilityService.getResourceValue(\"Upload\")}}\r\n </button>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"AcceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\" id=\"file\"\r\n multiple=\"{{options.IsMultipleFile?'multiple':''}}\" name=\"file\" type=\"file\" value=\"\"\r\n autocomplete=\"off\" (change)=\"onFileChange()\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\"\r\n id=\"{{options.Name}}\" aria-describedby=\"email-error\" aria-invalid=\"true\" type=\"file\"\r\n formControlName=\"{{options.Name}}\" id=\"options.Name\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n </div>\r\n\r\n </div>\r\n\r\n <div *ngFor=\"let item of uploader.queue\">\r\n <div class=\"fileInfoContainer ui-file btn-group mb-3\">\r\n <a href=\"{{ item?._file?.url}}\" download>\r\n <button type=\"button\" class=\"download-link btn btn-light btn-sm\">\r\n <span>\r\n <i class=\"icon fa fa-download\"></i>\r\n <span class=\"upload-file-info\">{{ item?.file?.name }}</span>\r\n </span>\r\n </button>\r\n </a>\r\n <span class=\"removeUIFile remove-link btn btn-xs btn-danger d-flex align-items-center justify-content-center\"\r\n (click)=\"item.remove();removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"text-danger Required-text\" *ngIf=\"(fileUploadFormControl.invalid && fileUploadFormControl.touched)\">\r\n {{getErrorValidation(fileUploadFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n\r\n\r\n <div class=\"col-md-9 col-sm-9\">\r\n\r\n <div>\r\n <label>\r\n {{options.LabelDescription}}\r\n </label>\r\n </div>\r\n\r\n\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
965
|
-
styles: [".e-tip-content{background-color:#afafaf;color:#fff;padding-left:10px;padding-right:10px;padding-top:2px}.my-drop-zone{border:dotted 3px lightgray}.nv-file-over{border:dotted 3px red}.another-file-over-class{border:dotted 3px green}html,body{height:100%}\n"]
|
|
966
|
-
},] }
|
|
967
|
-
];
|
|
968
|
-
FileUploadComponent.ctorParameters = function () { return [
|
|
969
|
-
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
970
|
-
{ type: forms.FormGroupDirective },
|
|
971
|
-
{ type: ControlUtility },
|
|
972
|
-
{ type: bbsfUtilities.UtilityService },
|
|
973
|
-
{ type: bbsfUtilities.ControlValidationService },
|
|
974
|
-
{ type: GlobalSettings }
|
|
975
|
-
]; };
|
|
976
|
-
FileUploadComponent.propDecorators = {
|
|
977
|
-
fileInput: [{ type: i0.ViewChild, args: ['fileInput', { static: false },] }],
|
|
978
|
-
group: [{ type: i0.Input }],
|
|
979
|
-
options: [{ type: i0.Input }],
|
|
980
|
-
OnChange: [{ type: i0.Output }]
|
|
981
|
-
};
|
|
982
|
-
|
|
983
|
-
/*! *****************************************************************************
|
|
984
|
-
Copyright (c) Microsoft Corporation.
|
|
985
|
-
|
|
986
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
987
|
-
purpose with or without fee is hereby granted.
|
|
988
|
-
|
|
989
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
990
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
991
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
992
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
993
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
994
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
995
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
996
|
-
***************************************************************************** */
|
|
997
|
-
/* global Reflect, Promise */
|
|
998
|
-
var extendStatics = function (d, b) {
|
|
999
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1000
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1001
|
-
function (d, b) { for (var p in b)
|
|
1002
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
1003
|
-
d[p] = b[p]; };
|
|
1004
|
-
return extendStatics(d, b);
|
|
1005
|
-
};
|
|
1006
|
-
function __extends(d, b) {
|
|
1007
|
-
if (typeof b !== "function" && b !== null)
|
|
1008
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1009
|
-
extendStatics(d, b);
|
|
1010
|
-
function __() { this.constructor = d; }
|
|
1011
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1012
|
-
}
|
|
1013
|
-
var __assign = function () {
|
|
1014
|
-
__assign = Object.assign || function __assign(t) {
|
|
1015
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1016
|
-
s = arguments[i];
|
|
1017
|
-
for (var p in s)
|
|
1018
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
1019
|
-
t[p] = s[p];
|
|
1020
|
-
}
|
|
1021
|
-
return t;
|
|
1022
|
-
};
|
|
1023
|
-
return __assign.apply(this, arguments);
|
|
1024
|
-
};
|
|
1025
|
-
function __rest(s, e) {
|
|
1026
|
-
var t = {};
|
|
1027
|
-
for (var p in s)
|
|
1028
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1029
|
-
t[p] = s[p];
|
|
1030
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1031
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1032
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1033
|
-
t[p[i]] = s[p[i]];
|
|
1034
|
-
}
|
|
1035
|
-
return t;
|
|
1036
|
-
}
|
|
1037
|
-
function __decorate(decorators, target, key, desc) {
|
|
1038
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1039
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1040
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1041
|
-
else
|
|
1042
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1043
|
-
if (d = decorators[i])
|
|
1044
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1045
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1046
|
-
}
|
|
1047
|
-
function __param(paramIndex, decorator) {
|
|
1048
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
1049
|
-
}
|
|
1050
|
-
function __metadata(metadataKey, metadataValue) {
|
|
1051
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1052
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
1053
|
-
}
|
|
1054
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1055
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1056
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1057
|
-
function fulfilled(value) { try {
|
|
1058
|
-
step(generator.next(value));
|
|
1147
|
+
};
|
|
1148
|
+
FileUploadComponent.prototype.fileOverAnother = function (event) {
|
|
1149
|
+
this.hasAnotherDropZoneOver = event;
|
|
1150
|
+
};
|
|
1151
|
+
FileUploadComponent.prototype.onFileChange = function () {
|
|
1152
|
+
var _this = this;
|
|
1153
|
+
var FilesArray = [];
|
|
1154
|
+
if (this.options.IsMultipleFile && this.options.MinNoOfFiles != null && this.options.MinNoOfFiles > 0 && this.options.MinNoOfFiles > this.uploader.queue.length) {
|
|
1155
|
+
var formControl = this.fileUploadFormControl;
|
|
1156
|
+
formControl.setErrors({ MinFileCountValidationKey: this.options.MinNoOfFiles });
|
|
1157
|
+
formControl.markAsTouched();
|
|
1158
|
+
this.uploader.queue = [];
|
|
1159
|
+
return;
|
|
1059
1160
|
}
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1161
|
+
if (this.options.IsMultipleFile && this.options.MaxNoOfFiles != null && this.options.MaxNoOfFiles > 0 && this.options.MaxNoOfFiles < this.uploader.queue.length) {
|
|
1162
|
+
var formControl = this.fileUploadFormControl;
|
|
1163
|
+
formControl.setErrors({ MaxFileCountValidationKey: this.options.MaxNoOfFiles });
|
|
1164
|
+
formControl.markAsTouched();
|
|
1165
|
+
this.uploader.queue = [];
|
|
1166
|
+
return;
|
|
1065
1167
|
}
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
}
|
|
1073
|
-
function __generator(thisArg, body) {
|
|
1074
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
1075
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
1076
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
1077
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
1078
|
-
function step(op) {
|
|
1079
|
-
if (f)
|
|
1080
|
-
throw new TypeError("Generator is already executing.");
|
|
1081
|
-
while (_)
|
|
1082
|
-
try {
|
|
1083
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
1084
|
-
return t;
|
|
1085
|
-
if (y = 0, t)
|
|
1086
|
-
op = [op[0] & 2, t.value];
|
|
1087
|
-
switch (op[0]) {
|
|
1088
|
-
case 0:
|
|
1089
|
-
case 1:
|
|
1090
|
-
t = op;
|
|
1091
|
-
break;
|
|
1092
|
-
case 4:
|
|
1093
|
-
_.label++;
|
|
1094
|
-
return { value: op[1], done: false };
|
|
1095
|
-
case 5:
|
|
1096
|
-
_.label++;
|
|
1097
|
-
y = op[1];
|
|
1098
|
-
op = [0];
|
|
1099
|
-
continue;
|
|
1100
|
-
case 7:
|
|
1101
|
-
op = _.ops.pop();
|
|
1102
|
-
_.trys.pop();
|
|
1103
|
-
continue;
|
|
1104
|
-
default:
|
|
1105
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
1106
|
-
_ = 0;
|
|
1107
|
-
continue;
|
|
1108
|
-
}
|
|
1109
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
1110
|
-
_.label = op[1];
|
|
1111
|
-
break;
|
|
1112
|
-
}
|
|
1113
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
1114
|
-
_.label = t[1];
|
|
1115
|
-
t = op;
|
|
1116
|
-
break;
|
|
1117
|
-
}
|
|
1118
|
-
if (t && _.label < t[2]) {
|
|
1119
|
-
_.label = t[2];
|
|
1120
|
-
_.ops.push(op);
|
|
1121
|
-
break;
|
|
1122
|
-
}
|
|
1123
|
-
if (t[2])
|
|
1124
|
-
_.ops.pop();
|
|
1125
|
-
_.trys.pop();
|
|
1126
|
-
continue;
|
|
1127
|
-
}
|
|
1128
|
-
op = body.call(thisArg, _);
|
|
1129
|
-
}
|
|
1130
|
-
catch (e) {
|
|
1131
|
-
op = [6, e];
|
|
1132
|
-
y = 0;
|
|
1168
|
+
if (this.options.IsMultipleFile && (this.options.MaxSizeForAllFilesInMB != null && this.options.MaxSizeForAllFilesInMB > 0)) {
|
|
1169
|
+
var AllSizeFile = 0;
|
|
1170
|
+
for (var index = 0; index < this.uploader.queue.length; index++) {
|
|
1171
|
+
var element = this.uploader.queue[index];
|
|
1172
|
+
var file = element.file;
|
|
1173
|
+
AllSizeFile = AllSizeFile + file.size;
|
|
1133
1174
|
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1175
|
+
var MaxSizeForAllFiles = this.options.MaxSizeForAllFilesInMB * 1000 * 1000;
|
|
1176
|
+
if (AllSizeFile > MaxSizeForAllFiles) {
|
|
1177
|
+
var formControl = this.fileUploadFormControl;
|
|
1178
|
+
formControl.setErrors({ MaxSizeForAllFilesInMB: this.options.MaxSizeForAllFilesInMB + 'M' });
|
|
1179
|
+
formControl.markAsTouched();
|
|
1180
|
+
this.uploader.queue = [];
|
|
1181
|
+
return;
|
|
1136
1182
|
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1183
|
+
}
|
|
1184
|
+
var AddedQueue = this.uploader.queue.filter(function (object) { return object["some"].lastModified != null; });
|
|
1185
|
+
var _loop_1 = function (index) {
|
|
1186
|
+
var element = AddedQueue[index];
|
|
1187
|
+
var file = element.file;
|
|
1188
|
+
var maxFileSize = this_1.options.FileMaxSizeInMB * 1000 * 1000;
|
|
1189
|
+
if (file) {
|
|
1190
|
+
var fileType = file.type;
|
|
1191
|
+
if (file.size > maxFileSize) {
|
|
1192
|
+
var formControl = this_1.fileUploadFormControl;
|
|
1193
|
+
formControl.setErrors({ FileMaxSizeInMB: this_1.options.FileMaxSizeInMB + 'M' });
|
|
1194
|
+
formControl.markAsTouched();
|
|
1195
|
+
this_1.uploader.queue = [];
|
|
1196
|
+
return { value: void 0 };
|
|
1197
|
+
}
|
|
1198
|
+
if (this_1.options.FileUploadAcceptsTypes != null && this_1.options.FileUploadAcceptsTypes.length > 0 && !(this_1.AcceptedTypeArray.includes(fileType.toUpperCase()) || this_1.AcceptedTypeArray.includes(fileType.toLowerCase()))) {
|
|
1199
|
+
var formControl = this_1.fileUploadFormControl;
|
|
1200
|
+
formControl.setErrors({ ToolTipTypeError: this_1.ToolTipTypeArray });
|
|
1201
|
+
formControl.markAsTouched();
|
|
1202
|
+
this_1.uploader.queue = [];
|
|
1203
|
+
return { value: void 0 };
|
|
1204
|
+
}
|
|
1205
|
+
var reader_1 = new FileReader();
|
|
1206
|
+
var fileObject = file.rawFile;
|
|
1207
|
+
reader_1.readAsDataURL(fileObject);
|
|
1208
|
+
reader_1.onload = function () {
|
|
1209
|
+
var existingID_GUID = null;
|
|
1210
|
+
if (!_this.options.IsMultipleFile && _this.file)
|
|
1211
|
+
existingID_GUID = _this.file.NameWithExtension == file.name ? _this.file.ID_GUID : null;
|
|
1212
|
+
var AddedFile = {
|
|
1213
|
+
FileName: file.name,
|
|
1214
|
+
FileType: file.type,
|
|
1215
|
+
FileBase64: reader_1.result.toString().split(',')[1],
|
|
1216
|
+
FileSizeInMB: ((file.size / 1000) / 1000),
|
|
1217
|
+
NameWithExtension: file.name,
|
|
1218
|
+
ID_GUID: existingID_GUID
|
|
1219
|
+
};
|
|
1220
|
+
if (_this.options.IsMultipleFile == false) {
|
|
1221
|
+
_this.fileUploadModel = new FileUploadModel();
|
|
1222
|
+
_this.fileUploadModel.File = AddedFile;
|
|
1223
|
+
_this.fileUploadFormControl.setValue(_this.fileUploadModel);
|
|
1224
|
+
_this.group.get(_this.options.Name).setValue(_this.fileUploadModel);
|
|
1225
|
+
}
|
|
1226
|
+
else {
|
|
1227
|
+
FilesArray.push(AddedFile);
|
|
1228
|
+
_this.multipleFileUploadModel.UploadedFiles = FilesArray;
|
|
1229
|
+
if (_this.options.Value != null && _this.options.Value != undefined) {
|
|
1230
|
+
if (_this.options.Value.CorrelationID_GUID == null) {
|
|
1231
|
+
_this.multipleFileUploadModel.RemovedFiles = [];
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
_this.fileUploadFormControl.setValue(_this.multipleFileUploadModel);
|
|
1235
|
+
_this.group.get(_this.options.Name).setValue(_this.multipleFileUploadModel);
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
var originalValue = this_1.group.get(this_1.options.Name).value;
|
|
1239
|
+
if (this_1.options.PatchFunction && this_1.options.PatchPath && this_1.group.get(this_1.options.Name).valid) {
|
|
1240
|
+
this_1.controlUtility.patchControlValue(originalValue, this_1.options.PatchFunction, this_1.options.PatchPath);
|
|
1241
|
+
}
|
|
1242
|
+
this_1.OnChange.emit(originalValue);
|
|
1166
1243
|
}
|
|
1167
1244
|
};
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
return o;
|
|
1174
|
-
var i = m.call(o), r, ar = [], e;
|
|
1175
|
-
try {
|
|
1176
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
1177
|
-
ar.push(r.value);
|
|
1178
|
-
}
|
|
1179
|
-
catch (error) {
|
|
1180
|
-
e = { error: error };
|
|
1181
|
-
}
|
|
1182
|
-
finally {
|
|
1183
|
-
try {
|
|
1184
|
-
if (r && !r.done && (m = i["return"]))
|
|
1185
|
-
m.call(i);
|
|
1245
|
+
var this_1 = this;
|
|
1246
|
+
for (var index = 0; index < AddedQueue.length; index++) {
|
|
1247
|
+
var state_1 = _loop_1(index);
|
|
1248
|
+
if (typeof state_1 === "object")
|
|
1249
|
+
return state_1.value;
|
|
1186
1250
|
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1251
|
+
};
|
|
1252
|
+
FileUploadComponent.prototype.removeFromControlValue = function (item) {
|
|
1253
|
+
if (this.options.IsMultipleFile == false) {
|
|
1254
|
+
this.fileUploadModel = null;
|
|
1255
|
+
if (this.options.IsRequired == true) {
|
|
1256
|
+
this.fileUploadFormControl.markAsTouched();
|
|
1257
|
+
this.fileUploadFormControl.invalid;
|
|
1258
|
+
}
|
|
1259
|
+
this.group.get(this.options.Name).setValue(this.fileUploadModel);
|
|
1190
1260
|
}
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1261
|
+
else {
|
|
1262
|
+
if (this.options.Value != null && this.options.Value != undefined) {
|
|
1263
|
+
if (this.options.Value.CorrelationID_GUID == null) {
|
|
1264
|
+
this.deletedFiles = [];
|
|
1265
|
+
this.multipleFileUploadModel.RemovedFiles = [];
|
|
1266
|
+
}
|
|
1267
|
+
else {
|
|
1268
|
+
if (this.multipleFileUploadModel.RemovedFiles.length == 0) {
|
|
1269
|
+
var FileObject_1 = item.file.rawFile;
|
|
1270
|
+
var DeletedItem = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension == FileObject_1.name; })[0];
|
|
1271
|
+
this.multipleFileUploadModel.ExistingFiles = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension != FileObject_1.name; });
|
|
1272
|
+
this.deletedFiles.push(DeletedItem);
|
|
1273
|
+
this.multipleFileUploadModel.RemovedFiles.push(DeletedItem.ID_GUID);
|
|
1274
|
+
}
|
|
1275
|
+
else {
|
|
1276
|
+
var FileObject_2 = item.file.rawFile;
|
|
1277
|
+
var deletedList = this.deletedFiles.filter(function (Object) { return Object.NameWithExtension == FileObject_2.name; });
|
|
1278
|
+
if (deletedList.length == 0 || deletedList == undefined) {
|
|
1279
|
+
var DeletedItem = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension == FileObject_2.name; })[0];
|
|
1280
|
+
this.multipleFileUploadModel.ExistingFiles = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension != FileObject_2.name; });
|
|
1281
|
+
this.deletedFiles.push(DeletedItem);
|
|
1282
|
+
this.multipleFileUploadModel.RemovedFiles.push(DeletedItem.ID_GUID);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
else {
|
|
1288
|
+
this.deletedFiles = [];
|
|
1289
|
+
this.multipleFileUploadModel.RemovedFiles = [];
|
|
1290
|
+
}
|
|
1291
|
+
this.multipleFileUploadModel.UploadedFiles = this.multipleFileUploadModel.UploadedFiles.filter(function (Object) { return Object.NameWithExtension != item._file.name; });
|
|
1292
|
+
if ((this.multipleFileUploadModel.UploadedFiles == null || this.multipleFileUploadModel.UploadedFiles == []) && this.options.IsRequired) {
|
|
1293
|
+
this.fileUploadFormControl.markAsTouched();
|
|
1294
|
+
this.fileUploadFormControl.invalid;
|
|
1216
1295
|
}
|
|
1296
|
+
this.fileUploadFormControl.setValue(this.multipleFileUploadModel);
|
|
1297
|
+
this.group.get(this.options.Name).setValue(this.multipleFileUploadModel);
|
|
1217
1298
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
var i, p;
|
|
1244
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
1245
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
1246
|
-
}
|
|
1247
|
-
function __asyncValues(o) {
|
|
1248
|
-
if (!Symbol.asyncIterator)
|
|
1249
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1250
|
-
var m = o[Symbol.asyncIterator], i;
|
|
1251
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
1252
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
1253
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
1254
|
-
}
|
|
1255
|
-
function __makeTemplateObject(cooked, raw) {
|
|
1256
|
-
if (Object.defineProperty) {
|
|
1257
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
1258
|
-
}
|
|
1259
|
-
else {
|
|
1260
|
-
cooked.raw = raw;
|
|
1261
|
-
}
|
|
1262
|
-
return cooked;
|
|
1263
|
-
}
|
|
1264
|
-
;
|
|
1265
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
1266
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1267
|
-
}) : function (o, v) {
|
|
1268
|
-
o["default"] = v;
|
|
1269
|
-
};
|
|
1270
|
-
function __importStar(mod) {
|
|
1271
|
-
if (mod && mod.__esModule)
|
|
1272
|
-
return mod;
|
|
1273
|
-
var result = {};
|
|
1274
|
-
if (mod != null)
|
|
1275
|
-
for (var k in mod)
|
|
1276
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
1277
|
-
__createBinding(result, mod, k);
|
|
1278
|
-
__setModuleDefault(result, mod);
|
|
1279
|
-
return result;
|
|
1280
|
-
}
|
|
1281
|
-
function __importDefault(mod) {
|
|
1282
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
1283
|
-
}
|
|
1284
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
1285
|
-
if (kind === "a" && !f)
|
|
1286
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
1287
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
1288
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1289
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
1290
|
-
}
|
|
1291
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
1292
|
-
if (kind === "m")
|
|
1293
|
-
throw new TypeError("Private method is not writable");
|
|
1294
|
-
if (kind === "a" && !f)
|
|
1295
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
1296
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
1297
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
1298
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
1299
|
-
}
|
|
1299
|
+
};
|
|
1300
|
+
return FileUploadComponent;
|
|
1301
|
+
}());
|
|
1302
|
+
FileUploadComponent.controlContainerstatic = null;
|
|
1303
|
+
FileUploadComponent.decorators = [
|
|
1304
|
+
{ type: i0.Component, args: [{
|
|
1305
|
+
selector: 'BBSF-FileUplaod',
|
|
1306
|
+
template: "\r\n<div class=\"b-control b-fileupload\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"col-form-label col-sm-12 mb-2\" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n\r\n <ejs-tooltip id=\"tooltip\" content='{{ValidationMessage}}' tipPointerPosition='Middle'\r\n *ngIf=\"(ValidationMessage!=null&&ValidationMessage!='')\">\r\n <i class=\"fa fa-info-circle\" data-plugin=\"tooltip\" data-html=\"true\">\r\n </i>\r\n </ejs-tooltip>\r\n\r\n\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n\r\n <div>\r\n\r\n <div ng2FileDrop *ngIf=\"(options.IsDropZone)&&(!((options.IsMultipleFile==false)&&(uploader.queue.length)>0))\"\r\n [ngClass]=\"{'another-file-over-class': hasAnotherDropZoneOver}\" (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\" [uploader]=\"uploader\" [accept]=\"AcceptedType\"\r\n class=\"well my-drop-zoneform-control bnsights-control {{options.ExtraClasses}}\"\r\n (change)=\"onFileChange()\" id=\"{{options.Name}}\" multiple=\"{{options.IsMultipleFile?'multiple':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" type=\"file\" formControlName=\"{{options.Name}}\"\r\n id=\"options.Name\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n\r\n\r\n <div class=\"dragndrop text-center\">\r\n <p class=\"drag-icon mb-3\">\r\n <i class=\"fas fa-cloud-download-alt\"></i>\r\n </p>\r\n <p>\r\n {{UtilityService.getResourceValue(\"DragAndDropHere\")}}\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"(!options.IsDropZone)&&!((uploader.queue.length>0)&&(!options.IsMultipleFile))\">\r\n <button type=\"button\" class=\"btn btn-light btn-sm file-fake-input mb-3\" (click)=\"fileInput.click();\">\r\n <i class=\"icon fa fa-cloud-upload-alt\"></i>\r\n {{UtilityService.getResourceValue(\"Upload\")}}\r\n </button>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"AcceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\" id=\"file\"\r\n multiple=\"{{options.IsMultipleFile?'multiple':''}}\" name=\"file\" type=\"file\" value=\"\"\r\n autocomplete=\"off\" (change)=\"onFileChange()\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\"\r\n id=\"{{options.Name}}\" aria-describedby=\"email-error\" aria-invalid=\"true\" type=\"file\"\r\n formControlName=\"{{options.Name}}\" id=\"options.Name\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n </div>\r\n\r\n </div>\r\n\r\n <div *ngFor=\"let item of uploader.queue\">\r\n <div class=\"fileInfoContainer ui-file btn-group mb-3\">\r\n <a href=\"{{ item?._file?.url}}\" download>\r\n <button type=\"button\" class=\"download-link btn btn-light btn-sm\">\r\n <span>\r\n <i class=\"icon fa fa-download\"></i>\r\n <span class=\"upload-file-info\">{{ item?.file?.name }}</span>\r\n </span>\r\n </button>\r\n </a>\r\n <span class=\"removeUIFile remove-link btn btn-xs btn-danger d-flex align-items-center justify-content-center\"\r\n (click)=\"item.remove();removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"text-danger Required-text\" *ngIf=\"(fileUploadFormControl.invalid && fileUploadFormControl.touched)\">\r\n {{getErrorValidation(fileUploadFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n\r\n\r\n <div class=\"col-md-9 col-sm-9\">\r\n\r\n <div>\r\n <label>\r\n {{options.LabelDescription}}\r\n </label>\r\n </div>\r\n\r\n\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
1307
|
+
styles: [".e-tip-content{background-color:#afafaf;color:#fff;padding-left:10px;padding-right:10px;padding-top:2px}.my-drop-zone{border:dotted 3px lightgray}.nv-file-over{border:dotted 3px red}.another-file-over-class{border:dotted 3px green}html,body{height:100%}\n"]
|
|
1308
|
+
},] }
|
|
1309
|
+
];
|
|
1310
|
+
FileUploadComponent.ctorParameters = function () { return [
|
|
1311
|
+
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
1312
|
+
{ type: forms.FormGroupDirective },
|
|
1313
|
+
{ type: ControlUtility },
|
|
1314
|
+
{ type: bbsfUtilities.UtilityService },
|
|
1315
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
1316
|
+
{ type: GlobalSettings }
|
|
1317
|
+
]; };
|
|
1318
|
+
FileUploadComponent.propDecorators = {
|
|
1319
|
+
fileInput: [{ type: i0.ViewChild, args: ['fileInput', { static: false },] }],
|
|
1320
|
+
group: [{ type: i0.Input }],
|
|
1321
|
+
options: [{ type: i0.Input }],
|
|
1322
|
+
OnChange: [{ type: i0.Output }]
|
|
1323
|
+
};
|
|
1300
1324
|
|
|
1301
1325
|
var EnglishArabicDTO = /** @class */ (function () {
|
|
1302
1326
|
function EnglishArabicDTO() {
|
|
@@ -4115,6 +4139,7 @@
|
|
|
4115
4139
|
function AutocompleteDTO() {
|
|
4116
4140
|
this.key = "";
|
|
4117
4141
|
this.value = "";
|
|
4142
|
+
this.image = "";
|
|
4118
4143
|
}
|
|
4119
4144
|
return AutocompleteDTO;
|
|
4120
4145
|
}());
|
|
@@ -4144,6 +4169,7 @@
|
|
|
4144
4169
|
this.validationRulesasync = [];
|
|
4145
4170
|
this.dataList = [];
|
|
4146
4171
|
this.SelectedValue = "";
|
|
4172
|
+
this.avatarImage = "https://upload.wikimedia.org/wikipedia/commons/7/7c/Profile_avatar_placeholder_large.png?20150327203541";
|
|
4147
4173
|
this.resetError = function () {
|
|
4148
4174
|
_this.controlValidationService.RemoveGlobalError();
|
|
4149
4175
|
};
|
|
@@ -4345,7 +4371,7 @@
|
|
|
4345
4371
|
{ type: i0.Component, args: [{
|
|
4346
4372
|
// tslint:disable-next-line: component-selector
|
|
4347
4373
|
selector: 'BBSF-AutocompleteTextBox',
|
|
4348
|
-
template: "<div class=\"b-control b-auto-complete-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n\r\n <!-- <input \r\n[(ngModel)]=\"Search\"\r\n value=\"{{Search}}\" \r\n autocomplete=\"off\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n typeaheadOptionField=\"{{Value}}\"\r\n [typeahead]=\"suggestions$\"\r\n [typeaheadAsync]=\"true\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" (typeaheadOnSelect)=\"handleResultSelected($event)\" (blur)=\"onBlur($event.target.value)\" /> -->\r\n <!-- \r\n <input ngxTypeahead autocomplete=\"off\"\r\n value=\"{{Search}}\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" [taUrl]=\"options.ActionURL\"\r\n [taParams]=\"options.Params\" taQueryParam=\"{{QueryParam}}\" taApi=\"{{Api}}\" taListItemLabel=\"{{Value}}\" (taSelected)=\"handleResultSelected($event)\"> -->\r\n\r\n\r\n\r\n <ng-autocomplete *ngIf=\"!options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n [notFoundTemplate]=\"notFoundTemplate\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n <ng-autocomplete *ngIf=\"options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n\r\n\r\n <ng-template #itemTemplate let-item>\r\n <a [innerHTML]=\"item.value\"></a>\r\n </ng-template>\r\n\r\n <ng-template #notFoundTemplate let-notFound>\r\n <div [innerHTML]=\"notFound\"></div>\r\n </ng-template>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched)\">\r\n {{getErrorValidation(AutocompleteTextBoxControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">{{options.LabelDescription}}</div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div
|
|
4374
|
+
template: "<div class=\"b-control b-auto-complete-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n\r\n <!-- <input \r\n[(ngModel)]=\"Search\"\r\n value=\"{{Search}}\" \r\n autocomplete=\"off\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n typeaheadOptionField=\"{{Value}}\"\r\n [typeahead]=\"suggestions$\"\r\n [typeaheadAsync]=\"true\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" (typeaheadOnSelect)=\"handleResultSelected($event)\" (blur)=\"onBlur($event.target.value)\" /> -->\r\n <!-- \r\n <input ngxTypeahead autocomplete=\"off\"\r\n value=\"{{Search}}\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" [taUrl]=\"options.ActionURL\"\r\n [taParams]=\"options.Params\" taQueryParam=\"{{QueryParam}}\" taApi=\"{{Api}}\" taListItemLabel=\"{{Value}}\" (taSelected)=\"handleResultSelected($event)\"> -->\r\n\r\n\r\n\r\n <ng-autocomplete *ngIf=\"!options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n [notFoundTemplate]=\"notFoundTemplate\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n <ng-autocomplete *ngIf=\"options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n\r\n\r\n <ng-template #itemTemplate let-item>\r\n <img *ngIf=\"options.ItemWithImage\" style=\"border-radius:50%; height:40px; width: 40px; float:left; margin-left:5px ; margin-top: 5px;margin-right: 5px;\" src=\"{{(item.image?item.image:avatarImage)}}\" />\r\n <a [innerHTML]=\"item.value\"></a>\r\n </ng-template>\r\n\r\n <ng-template #notFoundTemplate let-notFound>\r\n <div [innerHTML]=\"notFound\"></div>\r\n </ng-template>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched)\">\r\n {{getErrorValidation(AutocompleteTextBoxControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">{{options.LabelDescription}}</div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
4349
4375
|
styles: [""]
|
|
4350
4376
|
},] }
|
|
4351
4377
|
];
|
|
@@ -4561,7 +4587,7 @@
|
|
|
4561
4587
|
{ type: i0.Component, args: [{
|
|
4562
4588
|
// tslint:disable-next-line: component-selector
|
|
4563
4589
|
selector: 'BBSF-TagsInput',
|
|
4564
|
-
template: "<div class=\"b-control b-tags-input\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n <div class=\"form-group row\" [formGroup]=\"TagsFormGroup\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n
|
|
4590
|
+
template: "<div class=\"b-control b-tags-input\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n <div class=\"form-group row\" [formGroup]=\"TagsFormGroup\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <b-tags-input id=\"typeahead-http\" type=\"text\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" [disabled]=\"options.IsDisabled\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\" formControlName=\"tags\"\r\n [class.is-invalid]=\"TagsFormControl.invalid && TagsFormControl.touched\" placeholder=\"{{options.Placeholder}}\"\r\n id=\"{{options.Name}}\" (onTagsChanged)=\"onTagsChanged($event)\" [(ngModel)]=\"tags\"\r\n removeLastOnBackspace=\"{{options.RemoveLastOnBackspace}}\" (onNoOptionsMatch)=\"onNoOptionsMatch($event)\"\r\n [options]=\"searchFunctionFactory(SearchKey.selected)\" #SearchKey\r\n scrollableOptions=\"{{options.ScrollableOptions}}\" scrollableOptionsInView=\"{{options.MaxSearchResultsCount}}\"\r\n (keypress)=\"AddTag($event.key,SearchKey)\" [ViewMode]=\"options.TagInputMode\"\r\n maxTags=\"{{options.MaxNumberTags}}\" minLengthBeforeOptions=\"{{options.MinSearchLength}}\"\r\n [showDescription]=\"options.ShowDescription\" [defaultImageURL]=\"options.DefaultImgUrl\" name=\"tags\">\r\n </b-tags-input>\r\n\r\n <div class=\"text-danger Required-text\" *ngIf=\"(TagsFormControl.invalid && TagsFormControl.touched)\">\r\n {{getErrorValidation(TagsFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">{{options.LabelDescription}}</div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n",
|
|
4565
4591
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
4566
4592
|
},] }
|
|
4567
4593
|
];
|
|
@@ -4632,6 +4658,7 @@
|
|
|
4632
4658
|
this.direction = '';
|
|
4633
4659
|
this.IsFirstCall = true;
|
|
4634
4660
|
this.Items = new i0.EventEmitter();
|
|
4661
|
+
this.subscriptions = new rxjs.Subscription();
|
|
4635
4662
|
this.ReinitializePaging = function () {
|
|
4636
4663
|
_this.IsFirstCall = true;
|
|
4637
4664
|
_this.getItemList(1, true);
|
|
@@ -4641,31 +4668,34 @@
|
|
|
4641
4668
|
_this.getItemList(_this.CurrentPage);
|
|
4642
4669
|
};
|
|
4643
4670
|
}
|
|
4671
|
+
PagingComponent.prototype.ngOnDestroy = function () {
|
|
4672
|
+
this.subscriptions.unsubscribe();
|
|
4673
|
+
};
|
|
4644
4674
|
PagingComponent.prototype.ngOnInit = function () {
|
|
4645
4675
|
var _this = this;
|
|
4646
4676
|
if (this.options.IsLoadMoreControl)
|
|
4647
4677
|
this.Sum = this.options.PageSize;
|
|
4648
4678
|
if (this.options.DropdownFiltersControlNames != null && this.options.DropdownFiltersControlNames.length > 0) {
|
|
4649
4679
|
var DropdownFiltersControlNames = this.options.DropdownFiltersControlNames;
|
|
4650
|
-
this.onChangeService.GetValue().subscribe(function (value) {
|
|
4680
|
+
this.subscriptions.add(this.onChangeService.GetValue().subscribe(function (value) {
|
|
4651
4681
|
var result = _this.options.DropdownFiltersControlNames.filter(function (item) { return item == value; });
|
|
4652
4682
|
if (result.length > 0) {
|
|
4653
4683
|
_this.IsFirstCall = true;
|
|
4654
4684
|
_this.CurrentPage = 1;
|
|
4655
4685
|
_this.getItemList(_this.CurrentPage, true);
|
|
4656
4686
|
}
|
|
4657
|
-
});
|
|
4687
|
+
}));
|
|
4658
4688
|
}
|
|
4659
4689
|
if (this.options.BootstrapDatePickersFiltersControlNames != null && this.options.BootstrapDatePickersFiltersControlNames.length > 0) {
|
|
4660
4690
|
var BootstrapDatePickersFiltersControlNames = this.options.BootstrapDatePickersFiltersControlNames;
|
|
4661
|
-
this.onChangeService.GetValue().subscribe(function (value) {
|
|
4691
|
+
this.subscriptions.add(this.onChangeService.GetValue().subscribe(function (value) {
|
|
4662
4692
|
var result = _this.options.BootstrapDatePickersFiltersControlNames.filter(function (item) { return item == value; });
|
|
4663
4693
|
if (result.length > 0) {
|
|
4664
4694
|
_this.IsFirstCall = true;
|
|
4665
4695
|
_this.CurrentPage = 1;
|
|
4666
4696
|
_this.getItemList(_this.CurrentPage, true);
|
|
4667
4697
|
}
|
|
4668
|
-
});
|
|
4698
|
+
}));
|
|
4669
4699
|
}
|
|
4670
4700
|
this.IsFirstCall = true;
|
|
4671
4701
|
this.getItemList(this.CurrentPage, true);
|
|
@@ -4697,6 +4727,16 @@
|
|
|
4697
4727
|
}, false);
|
|
4698
4728
|
}
|
|
4699
4729
|
}
|
|
4730
|
+
//Add click event on Reset Filter button
|
|
4731
|
+
if (this.options.ResetFilterButtonName != null) {
|
|
4732
|
+
var button = document.getElementsByName(this.options.ResetFilterButtonName)[0];
|
|
4733
|
+
if (button != undefined) {
|
|
4734
|
+
var element = button;
|
|
4735
|
+
element.addEventListener("click", function (e) {
|
|
4736
|
+
_this.clearFilters();
|
|
4737
|
+
}, false);
|
|
4738
|
+
}
|
|
4739
|
+
}
|
|
4700
4740
|
if (this.options.TypeaheadSearchControlNames != null && this.options.TypeaheadSearchControlNames.length > 0) {
|
|
4701
4741
|
var TypeaheadSearchControlNames = this.options.TypeaheadSearchControlNames;
|
|
4702
4742
|
for (var index = 0; index < TypeaheadSearchControlNames.length; index++) {
|
|
@@ -4746,6 +4786,8 @@
|
|
|
4746
4786
|
PagingComponent.prototype.getItemList = function (page, IsFilterUpdated) {
|
|
4747
4787
|
var _this = this;
|
|
4748
4788
|
if (IsFilterUpdated === void 0) { IsFilterUpdated = false; }
|
|
4789
|
+
if (this.options.StartPagingCallback)
|
|
4790
|
+
this.options.StartPagingCallback.call(null);
|
|
4749
4791
|
var pagingDTO = new PagingDTO();
|
|
4750
4792
|
var size = Number.parseInt(this.options.PageSize.toString());
|
|
4751
4793
|
if (this.options.IsLoadMoreControl)
|
|
@@ -4756,46 +4798,15 @@
|
|
|
4756
4798
|
pagingDTO.TotalCount = this.totalRow;
|
|
4757
4799
|
pagingDTO.IsFilterUpdated = IsFilterUpdated;
|
|
4758
4800
|
var filters = {};
|
|
4759
|
-
|
|
4760
|
-
for (var index = 0; index < this.options.Filters.length; index++) {
|
|
4761
|
-
if (this.options.Filters[index].FormControlName != null && this.options.Filters[index].FormControlName != "") {
|
|
4762
|
-
var FormControlName = this.options.Filters[index].FormControlName;
|
|
4763
|
-
var ControlValue = this.group.controls[FormControlName].value;
|
|
4764
|
-
if (ControlValue != undefined && ControlValue != null) {
|
|
4765
|
-
if (this.options.Filters[index].FilterType == exports.FilterType.DatePicker) {
|
|
4766
|
-
if (Array.isArray(ControlValue)) {
|
|
4767
|
-
for (var element = 0; element < ControlValue.length; element++) {
|
|
4768
|
-
var value = ControlValue[element];
|
|
4769
|
-
filters[this.options.Filters[index].ActionParameterName] = value;
|
|
4770
|
-
}
|
|
4771
|
-
}
|
|
4772
|
-
else {
|
|
4773
|
-
filters[this.options.Filters[index].ActionParameterName] = ControlValue;
|
|
4774
|
-
}
|
|
4775
|
-
}
|
|
4776
|
-
else {
|
|
4777
|
-
if (this.options.Filters[index].FilterType == exports.FilterType.AutocompleteTextBox)
|
|
4778
|
-
ControlValue = JSON.stringify(ControlValue);
|
|
4779
|
-
if (this.options.Filters[index].FilterType == exports.FilterType.TagInput)
|
|
4780
|
-
ControlValue = JSON.stringify(ControlValue);
|
|
4781
|
-
filters[this.options.Filters[index].ActionParameterName] = ControlValue;
|
|
4782
|
-
}
|
|
4783
|
-
}
|
|
4784
|
-
}
|
|
4785
|
-
else {
|
|
4786
|
-
var ElementjQuerySelector = this.options.Filters[index].jQuerySelector;
|
|
4787
|
-
var ElementValue = document.querySelector(ElementjQuerySelector).value;
|
|
4788
|
-
if (ElementValue != undefined && ElementValue != null)
|
|
4789
|
-
filters[this.options.Filters[index].ActionParameterName] = ElementValue;
|
|
4790
|
-
}
|
|
4791
|
-
}
|
|
4792
|
-
}
|
|
4801
|
+
filters = this.getFiltersValue();
|
|
4793
4802
|
//Set Filters object that sent to action URL
|
|
4794
4803
|
var filtersDTO = {
|
|
4795
4804
|
PagingDTO: pagingDTO,
|
|
4796
4805
|
Filters: filters
|
|
4797
4806
|
};
|
|
4798
|
-
|
|
4807
|
+
var requestOptions = new bbsfUtilities.RequestOptionsModel();
|
|
4808
|
+
requestOptions.disableBlockUI = this.options.DisableBlockUI;
|
|
4809
|
+
this.requestHandlerService.post(this.options.ActionPostURL, this.options.Filters && this.options.Filters.length > 0 ? filtersDTO : pagingDTO, null, null, requestOptions)
|
|
4799
4810
|
.subscribe(function (responseData) {
|
|
4800
4811
|
_this.result = responseData.items; //this.castItems(responseData.items);
|
|
4801
4812
|
var castedResult = classTransformer.plainToClass(_this.options.TypeOfResponse, _this.result, { excludeExtraneousValues: true });
|
|
@@ -4855,6 +4866,60 @@
|
|
|
4855
4866
|
this.itemsText = this.utilityService.getResourceValue("Item");
|
|
4856
4867
|
}
|
|
4857
4868
|
};
|
|
4869
|
+
PagingComponent.prototype.clearFilters = function () {
|
|
4870
|
+
if (this.options.Filters != null && this.options.Filters != []) {
|
|
4871
|
+
for (var index = 0; index < this.options.Filters.length; index++) {
|
|
4872
|
+
if (this.options.Filters[index].FormControlName != null && this.options.Filters[index].FormControlName != "") {
|
|
4873
|
+
var FormControlName = this.options.Filters[index].FormControlName;
|
|
4874
|
+
this.group.controls[FormControlName].setValue(null);
|
|
4875
|
+
}
|
|
4876
|
+
}
|
|
4877
|
+
this.ReinitializePaging();
|
|
4878
|
+
}
|
|
4879
|
+
};
|
|
4880
|
+
PagingComponent.prototype.getFiltersValue = function () {
|
|
4881
|
+
var filters = {};
|
|
4882
|
+
if (this.options.Filters != null && this.options.Filters != []) {
|
|
4883
|
+
for (var index = 0; index < this.options.Filters.length; index++) {
|
|
4884
|
+
if (this.options.Filters[index].FormControlName != null && this.options.Filters[index].FormControlName != "") {
|
|
4885
|
+
var FormControlName = this.options.Filters[index].FormControlName;
|
|
4886
|
+
var ControlValue = this.group.controls[FormControlName].value;
|
|
4887
|
+
if (ControlValue != undefined && ControlValue != null && ControlValue != "") {
|
|
4888
|
+
if (this.options.Filters[index].FilterType == exports.FilterType.DatePicker) {
|
|
4889
|
+
//if (Array.isArray(ControlValue)) {
|
|
4890
|
+
// for (let element = 0; element < ControlValue.length; element++) {
|
|
4891
|
+
// const value = ControlValue[element];
|
|
4892
|
+
// filters[this.options.Filters[index].ActionParameterName] = value;
|
|
4893
|
+
// }
|
|
4894
|
+
//}
|
|
4895
|
+
//else {
|
|
4896
|
+
filters[this.options.Filters[index].ActionParameterName] = ControlValue;
|
|
4897
|
+
//}
|
|
4898
|
+
}
|
|
4899
|
+
else {
|
|
4900
|
+
if (this.options.Filters[index].FilterType == exports.FilterType.AutocompleteTextBox)
|
|
4901
|
+
ControlValue = ControlValue;
|
|
4902
|
+
if (this.options.Filters[index].FilterType == exports.FilterType.TagInput)
|
|
4903
|
+
ControlValue = ControlValue;
|
|
4904
|
+
filters[this.options.Filters[index].ActionParameterName] = ControlValue;
|
|
4905
|
+
}
|
|
4906
|
+
}
|
|
4907
|
+
else {
|
|
4908
|
+
filters[this.options.Filters[index].ActionParameterName] = null;
|
|
4909
|
+
}
|
|
4910
|
+
}
|
|
4911
|
+
else {
|
|
4912
|
+
var ElementjQuerySelector = this.options.Filters[index].jQuerySelector;
|
|
4913
|
+
var ElementValue = document.querySelector(ElementjQuerySelector).value;
|
|
4914
|
+
if (ElementValue != undefined && ElementValue != null)
|
|
4915
|
+
filters[this.options.Filters[index].ActionParameterName] = ElementValue;
|
|
4916
|
+
else
|
|
4917
|
+
filters[this.options.Filters[index].ActionParameterName] = null;
|
|
4918
|
+
}
|
|
4919
|
+
}
|
|
4920
|
+
}
|
|
4921
|
+
return filters;
|
|
4922
|
+
};
|
|
4858
4923
|
return PagingComponent;
|
|
4859
4924
|
}());
|
|
4860
4925
|
PagingComponent.decorators = [
|
|
@@ -7347,6 +7412,167 @@
|
|
|
7347
7412
|
{ type: common.DatePipe }
|
|
7348
7413
|
]; };
|
|
7349
7414
|
|
|
7415
|
+
exports.TagInputView = void 0;
|
|
7416
|
+
(function (TagInputView) {
|
|
7417
|
+
TagInputView[TagInputView["WithImage"] = 1] = "WithImage";
|
|
7418
|
+
TagInputView[TagInputView["WithoutImage"] = 2] = "WithoutImage";
|
|
7419
|
+
TagInputView[TagInputView["WithInitial"] = 3] = "WithInitial";
|
|
7420
|
+
})(exports.TagInputView || (exports.TagInputView = {}));
|
|
7421
|
+
|
|
7422
|
+
var noop = function () { };
|
|
7423
|
+
var ɵ0$1 = noop;
|
|
7424
|
+
var TAGS_INPUT_TEMPLATE = "\n \n<div class=\"tags-input\">\n<span class=\"tags-input__tag label label-primary badge badge-primary\" *ngFor=\"let tag of tags\">\n {{tag[displayField]}}\n <span *ngIf=\"isDeleteable(tag)\" role=\"button\" class=\"tags-input__tag-remove-btn\" (click)=\"removeTag(tag)\"\n (touch)=\"removeTag(tag)\">\n <span aria-hidden=\"true\">×</span>\n <span class=\"sr-only\">Close</span>\n </span>\n</span>\n\n<input *ngIf=\"options === null; else withTypeahead\" class=\"tags-input__input-field\" type=\"text\"\n [placeholder]=\"getPlaceholder()\" name=\"tags\" (keyup.enter)=\"addTag(tagInput)\"\n (keydown.backspace)=\"removeLastTag(tagInput)\" [disabled]=\"!canAddTags || maximumOfTagsReached()\"\n [hidden]=\"!canAddTags || maximumOfTagsReached()\" #tagInput />\n\n<ng-template #withTypeahead>\n <span [ngSwitch]=\"ViewMode\">\n\n <span *ngSwitchCase=\"tagInputViewEnum.WithImage\">\n <input *ngIf=\"(options !== null)\" class=\"tags-input__input-field\" type=\"text\" [placeholder]=\"getPlaceholder()\"\n name=\"tags\" (keydown.backspace)=\"removeLastTag(tagInput)\" [(ngModel)]=\"selected\" [typeahead]=\"options\"\n [typeaheadOptionField]=\"displayField\" (typeaheadOnSelect)=\"typeaheadOnSelect($event)\"\n (typeaheadNoResults)=\"typeaheadOnNoMatch($event)\" [typeaheadMinLength]=\"minLengthBeforeOptions\"\n [typeaheadScrollable]=\"scrollableOptions\" [typeaheadLatinize]=\"true\"\n [typeaheadItemTemplate]=\"itemTemplateWithImage\" [typeaheadOptionsInScrollableView]=\"scrollableOptionsInView\"\n [disabled]=\"!canAddTags || maximumOfTagsReached()\" [hidden]=\"!canAddTags || maximumOfTagsReached()\"\n #tagInput />\n </span>\n\n <span *ngSwitchCase=\"tagInputViewEnum.WithoutImage\">\n <input *ngIf=\"(options !== null)\" class=\"tags-input__input-field\" type=\"text\" [placeholder]=\"getPlaceholder()\"\n name=\"tags\" (keydown.backspace)=\"removeLastTag(tagInput)\" [(ngModel)]=\"selected\" [typeahead]=\"options\"\n [typeaheadOptionField]=\"displayField\" (typeaheadOnSelect)=\"typeaheadOnSelect($event)\"\n (typeaheadNoResults)=\"typeaheadOnNoMatch($event)\" [typeaheadMinLength]=\"minLengthBeforeOptions\"\n [typeaheadScrollable]=\"scrollableOptions\" [typeaheadLatinize]=\"true\"\n [typeaheadItemTemplate]=\"itemTemplateWithoutImage\"\n [typeaheadOptionsInScrollableView]=\"scrollableOptionsInView\"\n [disabled]=\"!canAddTags || maximumOfTagsReached()\" [hidden]=\"!canAddTags || maximumOfTagsReached()\"\n #tagInput />\n </span>\n\n <span *ngSwitchCase=\"tagInputViewEnum.WithInitial\">\n <input *ngIf=\"(options !== null)\" class=\"tags-input__input-field\" type=\"text\" [placeholder]=\"getPlaceholder()\"\n name=\"tags\" (keydown.backspace)=\"removeLastTag(tagInput)\" [(ngModel)]=\"selected\" [typeahead]=\"options\"\n [typeaheadOptionField]=\"displayField\" (typeaheadOnSelect)=\"typeaheadOnSelect($event)\"\n (typeaheadNoResults)=\"typeaheadOnNoMatch($event)\" [typeaheadMinLength]=\"minLengthBeforeOptions\"\n [typeaheadScrollable]=\"scrollableOptions\" [typeaheadLatinize]=\"true\"\n [typeaheadItemTemplate]=\"itemTemplateWithoutInitial\"\n [typeaheadOptionsInScrollableView]=\"scrollableOptionsInView\"\n [disabled]=\"!canAddTags || maximumOfTagsReached()\" [hidden]=\"!canAddTags || maximumOfTagsReached()\"\n #tagInput />\n </span>\n\n <span *ngSwitchDefault>\n <input *ngIf=\"(options !== null)\" class=\"tags-input__input-field\" type=\"text\" [placeholder]=\"getPlaceholder()\"\n name=\"tags\" (keydown.backspace)=\"removeLastTag(tagInput)\" [(ngModel)]=\"selected\" [typeahead]=\"options\"\n [typeaheadOptionField]=\"displayField\" (typeaheadOnSelect)=\"typeaheadOnSelect($event)\"\n (typeaheadNoResults)=\"typeaheadOnNoMatch($event)\" [typeaheadMinLength]=\"minLengthBeforeOptions\"\n [typeaheadScrollable]=\"scrollableOptions\" [typeaheadLatinize]=\"true\"\n [typeaheadItemTemplate]=\"itemTemplateWithoutImage\"\n [typeaheadOptionsInScrollableView]=\"scrollableOptionsInView\"\n [disabled]=\"!canAddTags || maximumOfTagsReached()\" [hidden]=\"!canAddTags || maximumOfTagsReached()\"\n #tagInput />\n </span>\n\n </span>\n\n</ng-template>\n\n<ng-template #itemTemplateWithImage let-model=\"item\" let-index=\"index\">\n <img\n style=\"border-radius:50%; height:40px; width: 40px; float:left; margin-left:5px ; margin-top: 5px;margin-right: 5px;\"\n src=\"{{(model.imageURL?model.imageURL:defaultImageURL)}}\" />\n <div>\n <a [innerHTML]=\"model.name\"></a>\n <p *ngIf=\"showDescription\">\n {{model.description}}\n </p>\n </div>\n</ng-template>\n\n<ng-template #itemTemplateWithoutImage let-model=\"item\" let-index=\"index\">\n <div>\n <a [innerHTML]=\"model.name\"></a>\n <p *ngIf=\"showDescription\">\n {{model.description}}\n </p>\n </div>\n</ng-template>\n\n<ng-template #itemTemplateWithoutInitial let-model=\"item\" let-index=\"index\">\n <div class=\"user-image\">\n <div class=\"user-initials\">{{calculateInitials(model.name)}}</div>\n </div>\n <div>\n <a [innerHTML]=\"model.name\"></a>\n <p *ngIf=\"showDescription\">\n {{model.description}}\n </p>\n </div>\n</ng-template>\n</div>\n";
|
|
7425
|
+
var TAGS_INPUT_STYLE = "\n :host {\n overflow: auto;\n white-space: nowrap;\n }\n\n .tags-input {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n }\n\n .tags-input__tag {\n display: inline-block;\n margin-bottom: 2px;\n margin-right: 5px;\n padding-right: 0.3em;\n }\n\n .tags-input__tag-remove-btn {\n cursor: pointer;\n display: inline-block;\n font-size: 12px;\n margin: -3px 0 0 3px;\n padding: 0;\n vertical-align: top;\n }\n\n .tags-input__input-field {\n border: none;\n flex-grow: 1;\n outline: none;\n }\n";
|
|
7426
|
+
var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
|
|
7427
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
7428
|
+
useExisting: i0.forwardRef(function () { return BTagsInputComponent; }),
|
|
7429
|
+
multi: true
|
|
7430
|
+
};
|
|
7431
|
+
var BTagsInputComponent = /** @class */ (function () {
|
|
7432
|
+
function BTagsInputComponent() {
|
|
7433
|
+
this.selected = '';
|
|
7434
|
+
this.tags = [];
|
|
7435
|
+
this.onTouchedCallback = noop;
|
|
7436
|
+
this.onChangeCallback = noop;
|
|
7437
|
+
this.tagInputViewEnum = exports.TagInputView;
|
|
7438
|
+
this.removeLastOnBackspace = false;
|
|
7439
|
+
this.canDeleteTags = true;
|
|
7440
|
+
this.canAddTags = true;
|
|
7441
|
+
this.ViewMode = exports.TagInputView.WithoutImage;
|
|
7442
|
+
this.placeholder = '';
|
|
7443
|
+
this.showDescription = true;
|
|
7444
|
+
this.options = null;
|
|
7445
|
+
this.defaultImageURL = null;
|
|
7446
|
+
this.displayField = 'name';
|
|
7447
|
+
this.minLengthBeforeOptions = 1;
|
|
7448
|
+
this.scrollableOptions = false;
|
|
7449
|
+
this.scrollableOptionsInView = 5;
|
|
7450
|
+
this.onTagsChanged = new i0.EventEmitter();
|
|
7451
|
+
this.onMaxTagsReached = new i0.EventEmitter();
|
|
7452
|
+
this.onNoOptionsMatch = new i0.EventEmitter();
|
|
7453
|
+
}
|
|
7454
|
+
BTagsInputComponent.prototype.getPlaceholder = function () {
|
|
7455
|
+
if (this.tags && this.tags.length > 0) {
|
|
7456
|
+
return '';
|
|
7457
|
+
}
|
|
7458
|
+
return this.placeholder;
|
|
7459
|
+
};
|
|
7460
|
+
BTagsInputComponent.prototype.tagsChanged = function (type, tag) {
|
|
7461
|
+
this.onChangeCallback(this.tags);
|
|
7462
|
+
this.onTagsChanged.emit({
|
|
7463
|
+
change: type,
|
|
7464
|
+
tag: tag
|
|
7465
|
+
});
|
|
7466
|
+
if (this.maximumOfTagsReached()) {
|
|
7467
|
+
this.onMaxTagsReached.emit();
|
|
7468
|
+
}
|
|
7469
|
+
};
|
|
7470
|
+
BTagsInputComponent.prototype.removeLastTag = function (tagInput) {
|
|
7471
|
+
if (!this.removeLastOnBackspace || !this.tags.length) {
|
|
7472
|
+
return;
|
|
7473
|
+
}
|
|
7474
|
+
if (tagInput.value === '') {
|
|
7475
|
+
this.removeTag(this.tags[this.tags.length - 1]);
|
|
7476
|
+
}
|
|
7477
|
+
};
|
|
7478
|
+
BTagsInputComponent.prototype.addTag = function (tagInput) {
|
|
7479
|
+
var _a;
|
|
7480
|
+
if (tagInput.value.trim() !== '') {
|
|
7481
|
+
var tag = (_a = {},
|
|
7482
|
+
_a[this.displayField] = tagInput.value,
|
|
7483
|
+
_a);
|
|
7484
|
+
this.addPredefinedTag(tag);
|
|
7485
|
+
}
|
|
7486
|
+
tagInput.value = '';
|
|
7487
|
+
};
|
|
7488
|
+
BTagsInputComponent.prototype.addPredefinedTag = function (tag) {
|
|
7489
|
+
if (!this.maximumOfTagsReached()) {
|
|
7490
|
+
this.tags.push(tag);
|
|
7491
|
+
this.tagsChanged('add', tag);
|
|
7492
|
+
}
|
|
7493
|
+
};
|
|
7494
|
+
BTagsInputComponent.prototype.removeTag = function (tagToRemove) {
|
|
7495
|
+
if (!this.isDeleteable(tagToRemove)) {
|
|
7496
|
+
return;
|
|
7497
|
+
}
|
|
7498
|
+
this.tags = this.tags.filter(function (tag) { return tagToRemove !== tag; });
|
|
7499
|
+
this.tagsChanged('remove', tagToRemove);
|
|
7500
|
+
};
|
|
7501
|
+
BTagsInputComponent.prototype.maximumOfTagsReached = function () {
|
|
7502
|
+
return typeof this.maxTags !== 'undefined' && this.tags && this.tags.length >= this.maxTags;
|
|
7503
|
+
};
|
|
7504
|
+
BTagsInputComponent.prototype.isDeleteable = function (tag) {
|
|
7505
|
+
if (typeof tag.deleteable !== "undefined" && !tag.deleteable) {
|
|
7506
|
+
return false;
|
|
7507
|
+
}
|
|
7508
|
+
return this.canDeleteTags;
|
|
7509
|
+
};
|
|
7510
|
+
BTagsInputComponent.prototype.typeaheadOnSelect = function (e) {
|
|
7511
|
+
var _a;
|
|
7512
|
+
if (typeof e.item === 'string') {
|
|
7513
|
+
this.addPredefinedTag((_a = {},
|
|
7514
|
+
_a[this.displayField] = e.value,
|
|
7515
|
+
_a));
|
|
7516
|
+
}
|
|
7517
|
+
else {
|
|
7518
|
+
this.addPredefinedTag(e.item);
|
|
7519
|
+
}
|
|
7520
|
+
this.selected = '';
|
|
7521
|
+
};
|
|
7522
|
+
BTagsInputComponent.prototype.typeaheadOnNoMatch = function (e) {
|
|
7523
|
+
if (typeof this.onNoOptionsMatch !== 'undefined') {
|
|
7524
|
+
this.onNoOptionsMatch.emit(e);
|
|
7525
|
+
}
|
|
7526
|
+
};
|
|
7527
|
+
BTagsInputComponent.prototype.writeValue = function (value) {
|
|
7528
|
+
if (value !== this.tags) {
|
|
7529
|
+
this.tags = value;
|
|
7530
|
+
}
|
|
7531
|
+
};
|
|
7532
|
+
BTagsInputComponent.prototype.registerOnChange = function (fn) {
|
|
7533
|
+
this.onChangeCallback = fn;
|
|
7534
|
+
};
|
|
7535
|
+
BTagsInputComponent.prototype.registerOnTouched = function (fn) {
|
|
7536
|
+
this.onTouchedCallback = fn;
|
|
7537
|
+
};
|
|
7538
|
+
BTagsInputComponent.prototype.calculateInitials = function (name) {
|
|
7539
|
+
debugger;
|
|
7540
|
+
var fullName = name.split(' ');
|
|
7541
|
+
var initials = "";
|
|
7542
|
+
if (fullName.length > 1)
|
|
7543
|
+
initials = fullName.shift().charAt(0) + fullName.pop().charAt(0);
|
|
7544
|
+
else
|
|
7545
|
+
initials = fullName.shift().charAt(0);
|
|
7546
|
+
return initials.toUpperCase();
|
|
7547
|
+
};
|
|
7548
|
+
return BTagsInputComponent;
|
|
7549
|
+
}());
|
|
7550
|
+
BTagsInputComponent.decorators = [
|
|
7551
|
+
{ type: i0.Component, args: [{
|
|
7552
|
+
selector: 'b-tags-input',
|
|
7553
|
+
template: TAGS_INPUT_TEMPLATE,
|
|
7554
|
+
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
|
|
7555
|
+
styles: [TAGS_INPUT_STYLE]
|
|
7556
|
+
},] }
|
|
7557
|
+
];
|
|
7558
|
+
BTagsInputComponent.propDecorators = {
|
|
7559
|
+
maxTags: [{ type: i0.Input }],
|
|
7560
|
+
removeLastOnBackspace: [{ type: i0.Input }],
|
|
7561
|
+
canDeleteTags: [{ type: i0.Input }],
|
|
7562
|
+
canAddTags: [{ type: i0.Input }],
|
|
7563
|
+
ViewMode: [{ type: i0.Input }],
|
|
7564
|
+
placeholder: [{ type: i0.Input }],
|
|
7565
|
+
showDescription: [{ type: i0.Input }],
|
|
7566
|
+
options: [{ type: i0.Input }],
|
|
7567
|
+
defaultImageURL: [{ type: i0.Input }],
|
|
7568
|
+
minLengthBeforeOptions: [{ type: i0.Input }],
|
|
7569
|
+
scrollableOptions: [{ type: i0.Input }],
|
|
7570
|
+
scrollableOptionsInView: [{ type: i0.Input }],
|
|
7571
|
+
onTagsChanged: [{ type: i0.Output }],
|
|
7572
|
+
onMaxTagsReached: [{ type: i0.Output }],
|
|
7573
|
+
onNoOptionsMatch: [{ type: i0.Output }]
|
|
7574
|
+
};
|
|
7575
|
+
|
|
7350
7576
|
var options;
|
|
7351
7577
|
exports.AppInjector = void 0;
|
|
7352
7578
|
angular.FullCalendarModule.registerPlugins([
|
|
@@ -7397,7 +7623,8 @@
|
|
|
7397
7623
|
RepeaterItemFieldComponent,
|
|
7398
7624
|
RepeaterTableComponent,
|
|
7399
7625
|
BBSFDateTimePipe,
|
|
7400
|
-
BBSFDatePipe
|
|
7626
|
+
BBSFDatePipe,
|
|
7627
|
+
BTagsInputComponent
|
|
7401
7628
|
],
|
|
7402
7629
|
imports: [
|
|
7403
7630
|
common.CommonModule,
|
|
@@ -7700,6 +7927,7 @@
|
|
|
7700
7927
|
// Params: object={};
|
|
7701
7928
|
_this.QueryParam = 'query';
|
|
7702
7929
|
_this.SelectedValue = null;
|
|
7930
|
+
_this.ItemWithImage = false;
|
|
7703
7931
|
return _this;
|
|
7704
7932
|
}
|
|
7705
7933
|
return AutocompleteOptions;
|
|
@@ -7724,26 +7952,29 @@
|
|
|
7724
7952
|
/** Allow User To Add Tags */
|
|
7725
7953
|
_this.CanAddTags = true;
|
|
7726
7954
|
/** Set Max Number Of Tags That User Can Be Select */
|
|
7727
|
-
_this.MaxNumberTags =
|
|
7955
|
+
_this.MaxNumberTags = 5;
|
|
7728
7956
|
/** Set Min Length Of Char To Call Search Function */
|
|
7729
7957
|
_this.MinSearchLength = 1;
|
|
7730
7958
|
/**Allow Scrolle Option In Dropdown */
|
|
7731
7959
|
_this.ScrollableOptions = true;
|
|
7732
7960
|
/** Set Max Number Of Tags That will Be Appear ON Dropdown */
|
|
7733
|
-
_this.MaxSearchResultsCount =
|
|
7961
|
+
_this.MaxSearchResultsCount = 10;
|
|
7734
7962
|
/**Value Name Of Tag Option In Dropdown */
|
|
7735
|
-
_this.DatasourceItemValue = "
|
|
7963
|
+
_this.DatasourceItemValue = "id";
|
|
7736
7964
|
/**Text Of Tag That Will Show In Dropdown */
|
|
7737
|
-
_this.DatasourceItemText = "
|
|
7965
|
+
_this.DatasourceItemText = "name";
|
|
7738
7966
|
/**Set Query Param Name By Default It's 'query'*/
|
|
7739
7967
|
_this.QueryParamName = "query";
|
|
7740
7968
|
/**Set Query Param Name By Default It's 'query'*/
|
|
7741
7969
|
_this.SelectedItemsParamName = "SelectedItems";
|
|
7742
7970
|
/**Set Filter Param Name By Default It's 'query'*/
|
|
7743
7971
|
_this.FilterParamName = "";
|
|
7972
|
+
_this.DefaultImgUrl = "";
|
|
7744
7973
|
/** allow add value of TagInput dosn't exist in list*/
|
|
7745
7974
|
_this.AllowNewSelection = false;
|
|
7746
7975
|
_this.ValidationToken = null;
|
|
7976
|
+
_this.TagInputMode = exports.TagInputView.WithoutImage;
|
|
7977
|
+
_this.ShowDescription = true;
|
|
7747
7978
|
return _this;
|
|
7748
7979
|
}
|
|
7749
7980
|
return TagsInputOptions;
|
|
@@ -7797,6 +8028,10 @@
|
|
|
7797
8028
|
/**listens to the window scroll instead of the actual element scroll. this allows to invoke a callback function in the scope of the element while listenning to the window scroll. */
|
|
7798
8029
|
this.ScrollWindow = true;
|
|
7799
8030
|
this.ForceDirection = exports.ForceDirection.English;
|
|
8031
|
+
/** Clear Filter button selector */
|
|
8032
|
+
this.ResetFilterButtonName = null;
|
|
8033
|
+
this.DisableBlockUI = false;
|
|
8034
|
+
this.StartPagingCallback = null;
|
|
7800
8035
|
}
|
|
7801
8036
|
return PagingOptions;
|
|
7802
8037
|
}());
|
|
@@ -8241,6 +8476,7 @@
|
|
|
8241
8476
|
exports.CustomValidator = CustomValidator;
|
|
8242
8477
|
exports.DateInputComponent = DateInputComponent;
|
|
8243
8478
|
exports.DatePickerOptions = DatePickerOptions;
|
|
8479
|
+
exports.DefaultIntl = DefaultIntl;
|
|
8244
8480
|
exports.DropdownListComponent = DropdownListComponent;
|
|
8245
8481
|
exports.DropdownListItem = DropdownListItem;
|
|
8246
8482
|
exports.DropdownOptions = DropdownOptions;
|
|
@@ -8305,6 +8541,7 @@
|
|
|
8305
8541
|
exports.environment = environment;
|
|
8306
8542
|
exports.options = options;
|
|
8307
8543
|
exports["ɵ0"] = ɵ0;
|
|
8544
|
+
exports["ɵa"] = BTagsInputComponent;
|
|
8308
8545
|
|
|
8309
8546
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8310
8547
|
|