ps-toolkit-ui 0.1.75 → 0.1.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ps-toolkit-ui.umd.js +34 -20
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/form/bank-card/form.bank-card.component.js +34 -21
- package/fesm2015/ps-toolkit-ui.js +33 -20
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/bank-card/form.bank-card.component.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -3194,32 +3194,32 @@
|
|
|
3194
3194
|
this.cValue = '';
|
|
3195
3195
|
this.banks = [
|
|
3196
3196
|
{ name: 'edbi', startWith: ['2071', '6276'] },
|
|
3197
|
-
{ name: 'bpi', startWith: ['5022', '
|
|
3197
|
+
{ name: 'bpi', startWith: ['5022', '639347'] },
|
|
3198
3198
|
{ name: 'shahr-bank', startWith: ['5028'] },
|
|
3199
|
-
{ name: 'ttbank', startWith: ['
|
|
3200
|
-
{ name: 'karafarinbank', startWith: ['
|
|
3201
|
-
{ name: 'bank-day', startWith: ['
|
|
3199
|
+
{ name: 'ttbank', startWith: ['502908'] },
|
|
3200
|
+
{ name: 'karafarinbank', startWith: ['502910', '627488'] },
|
|
3201
|
+
{ name: 'bank-day', startWith: ['502938'] },
|
|
3202
3202
|
{ name: 'tourismbank', startWith: ['5054'] },
|
|
3203
3203
|
{ name: 'izbank', startWith: ['5057'] },
|
|
3204
3204
|
{ name: 'ebanksepah', startWith: ['5892'] },
|
|
3205
3205
|
{ name: 'refah-bank', startWith: ['5894'] },
|
|
3206
|
-
{ name: 'bsi', startWith: ['
|
|
3207
|
-
{ name: 'bki', startWith: ['
|
|
3208
|
-
{ name: 'bmi', startWith: ['
|
|
3209
|
-
{ name: 'qmb', startWith: ['6063', '
|
|
3206
|
+
{ name: 'bsi', startWith: ['603769'] },
|
|
3207
|
+
{ name: 'bki', startWith: ['603770', '6392'] },
|
|
3208
|
+
{ name: 'bmi', startWith: ['603799'] },
|
|
3209
|
+
{ name: 'qmb', startWith: ['6063', '639370'] },
|
|
3210
3210
|
{ name: 'bankmellat', startWith: ['6104', '9919'] },
|
|
3211
3211
|
{ name: 'sb24', startWith: ['6219'] },
|
|
3212
3212
|
{ name: 'parsian-bank', startWith: ['6221', '6278', '6391'] },
|
|
3213
|
-
{ name: 'tejaratbank', startWith: ['
|
|
3214
|
-
{ name: 'ansarbank', startWith: ['
|
|
3215
|
-
{ name: 'enbank', startWith: ['
|
|
3213
|
+
{ name: 'tejaratbank', startWith: ['627353'] },
|
|
3214
|
+
{ name: 'ansarbank', startWith: ['627381'] },
|
|
3215
|
+
{ name: 'enbank', startWith: ['627412'] },
|
|
3216
3216
|
{ name: 'postbank', startWith: ['6277'] },
|
|
3217
3217
|
{ name: 'bim', startWith: ['6279'] },
|
|
3218
3218
|
{ name: 'bank-maskan', startWith: ['6280'] },
|
|
3219
3219
|
{ name: 'cid', startWith: ['6281'] },
|
|
3220
3220
|
{ name: 'ba24', startWith: ['6362'] },
|
|
3221
3221
|
{ name: 'cbi', startWith: ['6367'] },
|
|
3222
|
-
{ name: 'sinabank', startWith: ['
|
|
3222
|
+
{ name: 'sinabank', startWith: ['639346'] },
|
|
3223
3223
|
{ name: 'sbank', startWith: ['6396'] },
|
|
3224
3224
|
];
|
|
3225
3225
|
}
|
|
@@ -3238,37 +3238,40 @@
|
|
|
3238
3238
|
this.part4 = new InputClass(this.inp.environment, this.inp.l, 'BankCardPart4', null, exports.InputType.Number, 'bank-card-part-4 bank-card-part-item', '', true, 1000, 9999);
|
|
3239
3239
|
this.part1.displayLabel = this.part2.displayLabel = this.part3.displayLabel = this.part4.displayLabel = false;
|
|
3240
3240
|
this.part1.placeholder = this.part2.placeholder = this.part3.placeholder = this.part4.placeholder = null;
|
|
3241
|
-
var bankNames = this.banks.map(function (x) { return x.name; });
|
|
3242
3241
|
this.part1.onChange = function (v) {
|
|
3243
3242
|
_this.inp.error = null;
|
|
3243
|
+
_this.setIcon();
|
|
3244
3244
|
if (v.length === 4) {
|
|
3245
3245
|
_this.part2.focus();
|
|
3246
|
-
var b = _this.banks.filter(function (x) { return x.startWith.includes(_this.part1.data().toString()); });
|
|
3247
|
-
if (b.length > 0) {
|
|
3248
|
-
$__namespace(_this.inputIcon.nativeElement).removeClass('fa-money-check').addClass(b[0].name);
|
|
3249
|
-
}
|
|
3250
|
-
else {
|
|
3251
|
-
$__namespace(_this.inputIcon.nativeElement).addClass('fa-money-check').removeClass(bankNames);
|
|
3252
|
-
}
|
|
3253
3246
|
}
|
|
3254
3247
|
};
|
|
3255
3248
|
this.part2.onChange = function (v) {
|
|
3256
3249
|
_this.inp.error = null;
|
|
3250
|
+
_this.setIcon();
|
|
3257
3251
|
if (v.length === 4) {
|
|
3258
3252
|
_this.part3.focus();
|
|
3259
3253
|
}
|
|
3254
|
+
else if (v.length === 0) {
|
|
3255
|
+
_this.part1.focus();
|
|
3256
|
+
}
|
|
3260
3257
|
};
|
|
3261
3258
|
this.part3.onChange = function (v) {
|
|
3262
3259
|
_this.inp.error = null;
|
|
3263
3260
|
if (v.length === 4) {
|
|
3264
3261
|
_this.part4.focus();
|
|
3265
3262
|
}
|
|
3263
|
+
else if (v.length === 0) {
|
|
3264
|
+
_this.part2.focus();
|
|
3265
|
+
}
|
|
3266
3266
|
};
|
|
3267
3267
|
this.part4.onChange = function (v) {
|
|
3268
3268
|
_this.inp.error = null;
|
|
3269
3269
|
if (v.length === 4) {
|
|
3270
3270
|
_this.changeIndex.emit('Tab');
|
|
3271
3271
|
}
|
|
3272
|
+
else if (v.length === 0) {
|
|
3273
|
+
_this.part3.focus();
|
|
3274
|
+
}
|
|
3272
3275
|
};
|
|
3273
3276
|
this.inp.setValue = function (v) {
|
|
3274
3277
|
if (v === null) {
|
|
@@ -3308,6 +3311,17 @@
|
|
|
3308
3311
|
_this.onFocusIn();
|
|
3309
3312
|
};
|
|
3310
3313
|
};
|
|
3314
|
+
FormBankCardComponent.prototype.setIcon = function () {
|
|
3315
|
+
var _this = this;
|
|
3316
|
+
console.log(this.part1.data().toString() + this.part2.data().toString());
|
|
3317
|
+
var b = this.banks.filter(function (x) { return x.startWith.includes(_this.part1.data().toString() + _this.part2.data().toString().substring(0, 2)); });
|
|
3318
|
+
if (b.length > 0) {
|
|
3319
|
+
$__namespace(this.inputIcon.nativeElement).removeClass('fa-money-check').addClass(b[0].name);
|
|
3320
|
+
}
|
|
3321
|
+
else {
|
|
3322
|
+
$__namespace(this.inputIcon.nativeElement).addClass('fa-money-check').removeClass(this.banks.map(function (x) { return x.name; }));
|
|
3323
|
+
}
|
|
3324
|
+
};
|
|
3311
3325
|
FormBankCardComponent.prototype.changeFocus = function (p, a) {
|
|
3312
3326
|
if (p === 'Part1') {
|
|
3313
3327
|
if (a === 'Tab' || a === 'Enter') {
|