ng-ipa-library 0.7.11 → 1.1.0
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/{esm2015/lib/core/components/loading/loading.component.js → esm2020/lib/core/components/loading/loading.component.mjs} +5 -9
- package/esm2020/lib/core/interceptors/error.interceptor.mjs +46 -0
- package/{esm2015/lib/core/interceptors/loading.interceptor.js → esm2020/lib/core/interceptors/loading.interceptor.mjs} +3 -3
- package/esm2020/lib/core/interceptors/token.interceptor.mjs +74 -0
- package/esm2020/lib/core/services/auth.service.mjs +47 -0
- package/{esm2015/lib/core/services/error.service.js → esm2020/lib/core/services/error.service.mjs} +3 -3
- package/{esm2015/lib/core/services/loader.service.js → esm2020/lib/core/services/loader.service.mjs} +3 -3
- package/esm2020/lib/generate-form/generate-form.component.mjs +116 -0
- package/esm2020/lib/ipa-form/datepicker/datepicker.component.mjs +66 -0
- package/esm2020/lib/ipa-form/datepicker/gregorian-datepicker/gregorian-datepicker.component.mjs +23 -0
- package/{esm2015/lib/ipa-form/datepicker/gregorian-datepicker/gregorian18n.js → esm2020/lib/ipa-form/datepicker/gregorian-datepicker/gregorian18n.mjs} +3 -3
- package/{esm2015/lib/ipa-form/datepicker/hijri-datepicker/IslamicI18n.js → esm2020/lib/ipa-form/datepicker/hijri-datepicker/IslamicI18n.mjs} +3 -3
- package/esm2020/lib/ipa-form/datepicker/hijri-datepicker/hijri-datepicker.component.mjs +23 -0
- package/esm2020/lib/ipa-form/dropdown-input/dropdown-input.component.mjs +77 -0
- package/{esm2015/lib/ipa-form/file-upload/file-upload.component.js → esm2020/lib/ipa-form/file-upload/file-upload.component.mjs} +5 -9
- package/esm2020/lib/ipa-form/ipa-form.service.mjs +254 -0
- package/esm2020/lib/ipa-form/recaptcha/recaptcha.component.mjs +55 -0
- package/esm2020/lib/ipa-form/text-input/text-input.component.mjs +86 -0
- package/esm2020/lib/ipa-form/textarea-input/textarea-input.component.mjs +69 -0
- package/{esm2015/lib/models/apiException.js → esm2020/lib/models/apiException.mjs} +0 -0
- package/{esm2015/lib/models/apiResponse.js → esm2020/lib/models/apiResponse.mjs} +0 -0
- package/{esm2015/lib/models/breadcrumbs.model.js → esm2020/lib/models/breadcrumbs.model.mjs} +0 -0
- package/{esm2015/lib/models/decodedToken.model.js → esm2020/lib/models/decodedToken.model.mjs} +0 -0
- package/{esm2015/lib/models/exceptionUrl.model.js → esm2020/lib/models/exceptionUrl.model.mjs} +0 -0
- package/{esm2015/lib/models/generateForm.model.js → esm2020/lib/models/generateForm.model.mjs} +0 -0
- package/{esm2015/lib/models/pagedResult.js → esm2020/lib/models/pagedResult.mjs} +0 -0
- package/{esm2015/lib/models/user.model.js → esm2020/lib/models/user.model.mjs} +0 -0
- package/{esm2015/lib/ng-ipa-library.module.js → esm2020/lib/ng-ipa-library.module.mjs} +4 -4
- package/{esm2015/lib/pipes/hijri-date.pipe.js → esm2020/lib/pipes/hijri-date.pipe.mjs} +3 -3
- package/{esm2015/lib/pipes/pipes.module.js → esm2020/lib/pipes/pipes.module.mjs} +4 -4
- package/esm2020/lib/services/breadcrumbs.service.mjs +149 -0
- package/esm2020/lib/services/common.service.mjs +65 -0
- package/{esm2015/lib/share-button/share-button.component.js → esm2020/lib/share-button/share-button.component.mjs} +5 -9
- package/{esm2015/lib/share-button/share-button.module.js → esm2020/lib/share-button/share-button.module.mjs} +4 -4
- package/{esm2015/ng-ipa-library.js → esm2020/ng-ipa-library.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/{ng-ipa-library.js → ng-ipa-library.mjs} +143 -160
- package/fesm2015/ng-ipa-library.mjs.map +1 -0
- package/fesm2020/ng-ipa-library.mjs +1601 -0
- package/fesm2020/ng-ipa-library.mjs.map +1 -0
- package/lib/core/interceptors/token.interceptor.d.ts +3 -1
- package/lib/ipa-form/text-input/text-input.component.d.ts +3 -1
- package/package.json +32 -19
- package/src/lib/assets/ngIPAStyle.scss +2 -1
- package/bundles/ng-ipa-library.umd.js +0 -2098
- package/bundles/ng-ipa-library.umd.js.map +0 -1
- package/esm2015/lib/core/interceptors/error.interceptor.js +0 -46
- package/esm2015/lib/core/interceptors/token.interceptor.js +0 -69
- package/esm2015/lib/core/services/auth.service.js +0 -48
- package/esm2015/lib/generate-form/generate-form.component.js +0 -120
- package/esm2015/lib/ipa-form/datepicker/datepicker.component.js +0 -70
- package/esm2015/lib/ipa-form/datepicker/gregorian-datepicker/gregorian-datepicker.component.js +0 -28
- package/esm2015/lib/ipa-form/datepicker/hijri-datepicker/hijri-datepicker.component.js +0 -28
- package/esm2015/lib/ipa-form/dropdown-input/dropdown-input.component.js +0 -81
- package/esm2015/lib/ipa-form/ipa-form.service.js +0 -251
- package/esm2015/lib/ipa-form/recaptcha/recaptcha.component.js +0 -59
- package/esm2015/lib/ipa-form/text-input/text-input.component.js +0 -76
- package/esm2015/lib/ipa-form/textarea-input/textarea-input.component.js +0 -73
- package/esm2015/lib/services/breadcrumbs.service.js +0 -151
- package/esm2015/lib/services/common.service.js +0 -66
- package/fesm2015/ng-ipa-library.js.map +0 -1
|
@@ -1,2098 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('ngx-toastr'), require('ngx-dropzone-wrapper'), require('ngx-captcha'), require('moment-hijri'), require('@ng-bootstrap/ng-bootstrap'), require('@ng-select/ng-select'), require('@angular/cdk/bidi'), require('rxjs'), require('@angular/cdk/overlay'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('ngx-sharebuttons/icons'), require('ngx-sharebuttons/popup'), require('@angular/common/http'), require('rxjs/operators')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('ng-ipa-library', ['exports', '@angular/common', '@angular/core', '@angular/forms', 'ngx-toastr', 'ngx-dropzone-wrapper', 'ngx-captcha', 'moment-hijri', '@ng-bootstrap/ng-bootstrap', '@ng-select/ng-select', '@angular/cdk/bidi', 'rxjs', '@angular/cdk/overlay', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', 'ngx-sharebuttons/icons', 'ngx-sharebuttons/popup', '@angular/common/http', 'rxjs/operators'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ng-ipa-library"] = {}, global.ng.common, global.ng.core, global.ng.forms, global["ngx-toastr"], global["ngx-dropzone-wrapper"], global["ngx-captcha"], global["moment-hijri"], global["@ng-bootstrap/ng-bootstrap"], global["@ng-select/ng-select"], global.ng.cdk.bidi, global.rxjs, global.ng.cdk.overlay, global["@fortawesome/angular-fontawesome"], global["@fortawesome/free-solid-svg-icons"], global["ngx-sharebuttons/icons"], global["ngx-sharebuttons/popup"], global.ng.common.http, global.rxjs.operators));
|
|
5
|
-
})(this, (function (exports, i3$1, i0, i2$1, i1, i2$2, i2$3, momentHijri, i2, i3, i5, rxjs, overlay, i1$2, freeSolidSvgIcons, icons, i1$1, i2$4, operators) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
function _interopNamespace(e) {
|
|
10
|
-
if (e && e.__esModule) return e;
|
|
11
|
-
var n = Object.create(null);
|
|
12
|
-
if (e) {
|
|
13
|
-
Object.keys(e).forEach(function (k) {
|
|
14
|
-
if (k !== 'default') {
|
|
15
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () { return e[k]; }
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n["default"] = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
28
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
29
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
30
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
|
-
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
|
|
32
|
-
var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
|
|
33
|
-
var momentHijri__default = /*#__PURE__*/_interopDefaultLegacy(momentHijri);
|
|
34
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
35
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
36
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
37
|
-
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
38
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
39
|
-
var i2__namespace$4 = /*#__PURE__*/_interopNamespace(i2$4);
|
|
40
|
-
|
|
41
|
-
var HijriDatePipe = /** @class */ (function () {
|
|
42
|
-
function HijriDatePipe() {
|
|
43
|
-
}
|
|
44
|
-
HijriDatePipe.prototype.transform = function (date, format, lang) {
|
|
45
|
-
if (format === void 0) { format = 'iYYYY-iMM-iDD'; }
|
|
46
|
-
if (lang === void 0) { lang = 'en'; }
|
|
47
|
-
momentHijri__default["default"].locale(lang);
|
|
48
|
-
return momentHijri__default["default"](date).format(format);
|
|
49
|
-
};
|
|
50
|
-
return HijriDatePipe;
|
|
51
|
-
}());
|
|
52
|
-
HijriDatePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: HijriDatePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
53
|
-
HijriDatePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: HijriDatePipe, name: "hijriDate" });
|
|
54
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: HijriDatePipe, decorators: [{
|
|
55
|
-
type: i0.Pipe,
|
|
56
|
-
args: [{
|
|
57
|
-
name: 'hijriDate',
|
|
58
|
-
}]
|
|
59
|
-
}] });
|
|
60
|
-
|
|
61
|
-
var PipesModule = /** @class */ (function () {
|
|
62
|
-
function PipesModule() {
|
|
63
|
-
}
|
|
64
|
-
return PipesModule;
|
|
65
|
-
}());
|
|
66
|
-
PipesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: PipesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
67
|
-
PipesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: PipesModule, declarations: [HijriDatePipe], exports: [HijriDatePipe] });
|
|
68
|
-
PipesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: PipesModule });
|
|
69
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: PipesModule, decorators: [{
|
|
70
|
-
type: i0.NgModule,
|
|
71
|
-
args: [{
|
|
72
|
-
declarations: [HijriDatePipe],
|
|
73
|
-
exports: [HijriDatePipe],
|
|
74
|
-
}]
|
|
75
|
-
}] });
|
|
76
|
-
|
|
77
|
-
var IPAFormService = /** @class */ (function () {
|
|
78
|
-
function IPAFormService(parserFormatter) {
|
|
79
|
-
this.parserFormatter = parserFormatter;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* check link is valid.
|
|
83
|
-
*/
|
|
84
|
-
IPAFormService.linkValidation = function (control) {
|
|
85
|
-
var isValidLink = /^((https?:\/\/)[\w-]+(\.[a-z-]+)+\.?(:\d+)?(\/\S*)?)$/.test(control.value);
|
|
86
|
-
return isValidLink || !control.value ? null : { link: true };
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* check mp4 link is valid.
|
|
90
|
-
*/
|
|
91
|
-
IPAFormService.mp4LinkValidation = function (control) {
|
|
92
|
-
var isValidLink = /^((https?:\/\/)[\w-]+(\.[a-z-]+)+\.?(:\d+)?(\/\S*)?(\/[\w\u0600-\u06FF]+\.mp4))$/.test(control.value);
|
|
93
|
-
return isValidLink || !control.value ? null : { linkMP4: true };
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* check mobile number is valid.
|
|
97
|
-
*/
|
|
98
|
-
IPAFormService.mobileNo = function (control) {
|
|
99
|
-
var isValidLink = /^05\d{8}$/.test(control.value);
|
|
100
|
-
return isValidLink || !control.value ? null : { mobileNo: true };
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* check email is valid.
|
|
104
|
-
*/
|
|
105
|
-
IPAFormService.email = function (control) {
|
|
106
|
-
var isValidLink = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/.test(control.value);
|
|
107
|
-
return isValidLink || !control.value ? null : { Email: true };
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* check national ID or iqama ID is valid.
|
|
111
|
-
*/
|
|
112
|
-
IPAFormService.checkID = function (control) {
|
|
113
|
-
var isValid = false;
|
|
114
|
-
var value = control.value;
|
|
115
|
-
if (IPAFormService.nationalIdValidate(value) ||
|
|
116
|
-
IPAFormService.iqamaIdValidate(value)) {
|
|
117
|
-
isValid = true;
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
isValid = false;
|
|
121
|
-
}
|
|
122
|
-
return isValid || !value ? null : { checkId: true };
|
|
123
|
-
};
|
|
124
|
-
IPAFormService.prototype.getErrorMessage = function (control, patternErrorMsg) {
|
|
125
|
-
if (patternErrorMsg === void 0) { patternErrorMsg = ''; }
|
|
126
|
-
for (var propertyName in control === null || control === void 0 ? void 0 : control.errors) {
|
|
127
|
-
if ((control === null || control === void 0 ? void 0 : control.errors.hasOwnProperty(propertyName)) &&
|
|
128
|
-
(control.touched || control.dirty)) {
|
|
129
|
-
return this.getValidatorErrorMessage(propertyName, control.errors[propertyName], patternErrorMsg);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
return null;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* convert gregorian date to hijri date (Based on Umm al-Qura calculations).
|
|
136
|
-
* @param date: gregorian date
|
|
137
|
-
* @param format: iDD => day: ١٥, iMM => month: ٠٤, iMMM => month: ربيع ٢,
|
|
138
|
-
* iMMMM => ربيع الثاني, iYY => year: ٤٢, iYYYY => year: ١٤٤٢,
|
|
139
|
-
* dd => ن, ddd => إثنين, dddd => الإثنين
|
|
140
|
-
* @example 'iYYYY/iM/iDهـ الموافق YYYY/M/Dم'
|
|
141
|
-
* '١٤٤٢/٠٤/١٥هـ الموافق ٢٠٢٠/١١/٣٠'
|
|
142
|
-
*/
|
|
143
|
-
IPAFormService.prototype.convertToHijriDate = function (date, format, lang) {
|
|
144
|
-
if (format === void 0) { format = 'iYYYY-iMM-iDD'; }
|
|
145
|
-
if (lang === void 0) { lang = 'ar-SA'; }
|
|
146
|
-
momentHijri__default["default"].locale(lang);
|
|
147
|
-
return momentHijri__default["default"](date).format(format);
|
|
148
|
-
};
|
|
149
|
-
IPAFormService.prototype.convertToGregorianDate = function (date, format, lang) {
|
|
150
|
-
if (format === void 0) { format = 'YYYY-MM-DD'; }
|
|
151
|
-
if (lang === void 0) { lang = 'en'; }
|
|
152
|
-
momentHijri__default["default"].locale(lang);
|
|
153
|
-
var m = momentHijri__default["default"].iConvert.toGregorian(date.year(), date.month(), date.date());
|
|
154
|
-
return momentHijri__default["default"](new Date(m.gy, m.gm, m.gd)).format(format);
|
|
155
|
-
};
|
|
156
|
-
IPAFormService.prototype.getCurrentHijriDate = function () {
|
|
157
|
-
momentHijri__default["default"].locale('en');
|
|
158
|
-
return momentHijri__default["default"]().format('iYYYY/iMM/iDD');
|
|
159
|
-
};
|
|
160
|
-
IPAFormService.prototype.getValidatorErrorMessage = function (validatorName, validatorValue, patternErrorMsg) {
|
|
161
|
-
if (validatorName === 'pattern') {
|
|
162
|
-
validatorValue = this.addPatternMsg(validatorValue, patternErrorMsg);
|
|
163
|
-
}
|
|
164
|
-
var config = {
|
|
165
|
-
required: 'هذا الحقل مطلوب',
|
|
166
|
-
pattern: "" + validatorValue.message,
|
|
167
|
-
Email: 'خطأ في البريد الالكتروني (example@ipa.edu.sa)',
|
|
168
|
-
maxlength: "\u062A\u062C\u0627\u0648\u0632 \u0639\u062F\u062F \u0627\u0644\u062D\u0642\u0644 \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0628\u0647\u0627 (" + validatorValue.requiredLength + ") \u062D\u0631\u0641",
|
|
169
|
-
minlength: "\u0639\u0644\u0649 \u0627\u0644\u0623\u0642\u0644 \u0639\u062F\u062F " + validatorValue.requiredLength + " \u062D\u0631\u0641.",
|
|
170
|
-
min: "\u0631\u0642\u0645 \u0627\u0643\u0628\u0631 \u0645\u0646 \u0623\u0648 \u064A\u0633\u0627\u0648\u064A " + validatorValue.min,
|
|
171
|
-
max: "\u0631\u0642\u0645 \u0627\u0635\u063A\u0631 \u0645\u0646 \u0623\u0648 \u064A\u0633\u0627\u0648\u064A " + validatorValue.max,
|
|
172
|
-
ngbDate: this.getNgbDatepickerErrorMsg(validatorValue),
|
|
173
|
-
checkId: 'رقم الهوية أو الاقامة غير صحيح',
|
|
174
|
-
link: 'الرابط غير صحيح (http://google.com)',
|
|
175
|
-
linkMP4: 'الرابط غير صحيح (http://example.com/a.mp4)',
|
|
176
|
-
mobileNo: 'خطأ في رقم الجوال (05xxxxxxxx)',
|
|
177
|
-
};
|
|
178
|
-
return config[validatorName];
|
|
179
|
-
};
|
|
180
|
-
IPAFormService.prototype.addPatternMsg = function (validatorValue, patternErrorMsg) {
|
|
181
|
-
var pattern = Object.assign(Object.assign({}, validatorValue), { message: patternErrorMsg });
|
|
182
|
-
return pattern;
|
|
183
|
-
};
|
|
184
|
-
IPAFormService.prototype.getNgbDatepickerErrorMsg = function (validatorValue) {
|
|
185
|
-
var msg = '';
|
|
186
|
-
if (validatorValue.maxDate) {
|
|
187
|
-
msg = "\u0627\u0644\u062A\u0627\u0631\u064A\u062E \u0627\u0644\u0645\u062F\u062E\u0644 \"" + this.parserFormatter.format(validatorValue.maxDate.actual) + "\" \u0627\u0643\u0628\u0631 \u0645\u0646 \u062A\u0627\u0631\u064A\u062E \u0627\u0644\u064A\u0648\u0645 \"" + this.parserFormatter.format(validatorValue.maxDate.maxDate) + "\"";
|
|
188
|
-
}
|
|
189
|
-
else if (validatorValue.minDate) {
|
|
190
|
-
msg = "\u0627\u0644\u062A\u0627\u0631\u064A\u062E \u0627\u0644\u0645\u062F\u062E\u0644 \"" + this.parserFormatter.format(validatorValue.minDate.actual) + "\" \u064A\u062C\u0628 \u0627\u0646 \u064A\u0643\u0648\u0646 \u0627\u0643\u0628\u0631 \u0645\u0646 \u0623\u0648 \u064A\u0633\u0627\u0648\u064A \u062A\u0627\u0631\u064A\u062E \u0627\u0644\u0628\u062F\u0627\u064A\u0629 \"" + this.parserFormatter.format(validatorValue.minDate.minDate) + "\"";
|
|
191
|
-
}
|
|
192
|
-
else if (validatorValue.invalid) {
|
|
193
|
-
msg = "\u0627\u0644\u062A\u0627\u0631\u064A\u062E \u0627\u0644\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0635\u062D\u064A\u062D " + validatorValue.invalid + ".";
|
|
194
|
-
}
|
|
195
|
-
return msg;
|
|
196
|
-
};
|
|
197
|
-
IPAFormService.convertToEn = function (value) {
|
|
198
|
-
var newValue = '';
|
|
199
|
-
for (var i = 0; i < value.length; i++) {
|
|
200
|
-
var ch = value.charCodeAt(i);
|
|
201
|
-
if (ch >= 1584 && ch <= 1650) {
|
|
202
|
-
var newChar = ch - 1584;
|
|
203
|
-
newValue = newValue + String.fromCharCode(newChar);
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
newValue = newValue + String.fromCharCode(ch);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
return newValue;
|
|
210
|
-
};
|
|
211
|
-
IPAFormService.nationalIdValidate = function (civilId) {
|
|
212
|
-
if (civilId) {
|
|
213
|
-
var strID = this.convertToEn(civilId);
|
|
214
|
-
var digits = '';
|
|
215
|
-
var counter = 0;
|
|
216
|
-
while (counter < 9) {
|
|
217
|
-
if ((counter + 1) % 2 == 0) {
|
|
218
|
-
digits = digits + strID.substring(counter, counter + 1);
|
|
219
|
-
}
|
|
220
|
-
else {
|
|
221
|
-
digits =
|
|
222
|
-
digits + (+strID.substring(counter, counter + 1) * 2).toString();
|
|
223
|
-
}
|
|
224
|
-
counter++;
|
|
225
|
-
}
|
|
226
|
-
var intSum = 0;
|
|
227
|
-
var intSumTemp = 0;
|
|
228
|
-
var strSum = void 0;
|
|
229
|
-
var intOddSumDigit = void 0;
|
|
230
|
-
var CheckDigit = void 0;
|
|
231
|
-
counter = 0;
|
|
232
|
-
while (counter < digits.length) {
|
|
233
|
-
intSumTemp = +digits.charAt(counter) * 1;
|
|
234
|
-
intSum += intSumTemp;
|
|
235
|
-
counter++;
|
|
236
|
-
}
|
|
237
|
-
strSum = intSum.toString();
|
|
238
|
-
if (strSum.length == 1) {
|
|
239
|
-
intOddSumDigit = intSum;
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
intOddSumDigit = strSum.substring(strSum.length, strSum.length - 1);
|
|
243
|
-
}
|
|
244
|
-
if (intOddSumDigit == 0) {
|
|
245
|
-
CheckDigit = 0;
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
CheckDigit = (10 - +intOddSumDigit).toString();
|
|
249
|
-
}
|
|
250
|
-
var PublicID = this.convertToEn(civilId);
|
|
251
|
-
if (CheckDigit ==
|
|
252
|
-
PublicID.substring(PublicID.length - 1, PublicID.length) &&
|
|
253
|
-
strID.length == 10 &&
|
|
254
|
-
strID.substring(0, 1) == '1') {
|
|
255
|
-
return true;
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
return false;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
else {
|
|
262
|
-
return false;
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
IPAFormService.iqamaIdValidate = function (civilId) {
|
|
266
|
-
if (civilId) {
|
|
267
|
-
var strID = this.convertToEn(civilId);
|
|
268
|
-
var digits = '';
|
|
269
|
-
var counter = 0;
|
|
270
|
-
while (counter < 9) {
|
|
271
|
-
if ((counter + 1) % 2 == 0) {
|
|
272
|
-
digits = digits + strID.substring(counter, counter + 1);
|
|
273
|
-
}
|
|
274
|
-
else {
|
|
275
|
-
digits =
|
|
276
|
-
digits + (+strID.substring(counter, counter + 1) * 2).toString();
|
|
277
|
-
}
|
|
278
|
-
counter++;
|
|
279
|
-
}
|
|
280
|
-
var intSum = 0;
|
|
281
|
-
var intSumTemp = 0;
|
|
282
|
-
var strSum = void 0;
|
|
283
|
-
var intOddSumDigit = void 0;
|
|
284
|
-
var CheckDigit = void 0;
|
|
285
|
-
counter = 0;
|
|
286
|
-
while (counter < digits.length) {
|
|
287
|
-
intSumTemp = +digits.charAt(counter) * 1;
|
|
288
|
-
intSum += intSumTemp;
|
|
289
|
-
counter++;
|
|
290
|
-
}
|
|
291
|
-
strSum = intSum.toString();
|
|
292
|
-
if (strSum.length == 1) {
|
|
293
|
-
intOddSumDigit = intSum;
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
intOddSumDigit = strSum.substring(strSum.length, strSum.length - 1);
|
|
297
|
-
}
|
|
298
|
-
if (intOddSumDigit == 0) {
|
|
299
|
-
CheckDigit = 0;
|
|
300
|
-
}
|
|
301
|
-
else {
|
|
302
|
-
CheckDigit = (10 - +intOddSumDigit).toString();
|
|
303
|
-
}
|
|
304
|
-
var PublicID = this.convertToEn(civilId);
|
|
305
|
-
if (CheckDigit ==
|
|
306
|
-
PublicID.substring(PublicID.length - 1, PublicID.length) &&
|
|
307
|
-
strID.length == 10 &&
|
|
308
|
-
strID.substring(0, 1) == '2') {
|
|
309
|
-
return true;
|
|
310
|
-
}
|
|
311
|
-
else {
|
|
312
|
-
return false;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
else {
|
|
316
|
-
return false;
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
return IPAFormService;
|
|
320
|
-
}());
|
|
321
|
-
IPAFormService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: IPAFormService, deps: [{ token: i2__namespace.NgbDateParserFormatter }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
322
|
-
IPAFormService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: IPAFormService, providedIn: 'root' });
|
|
323
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: IPAFormService, decorators: [{
|
|
324
|
-
type: i0.Injectable,
|
|
325
|
-
args: [{
|
|
326
|
-
providedIn: 'root',
|
|
327
|
-
}]
|
|
328
|
-
}], ctorParameters: function () { return [{ type: i2__namespace.NgbDateParserFormatter }]; } });
|
|
329
|
-
|
|
330
|
-
var TextInputComponent = /** @class */ (function () {
|
|
331
|
-
function TextInputComponent(validationService, controlDir) {
|
|
332
|
-
this.validationService = validationService;
|
|
333
|
-
this.controlDir = controlDir;
|
|
334
|
-
this.type = 'text';
|
|
335
|
-
this.placeholder = 'please enter text';
|
|
336
|
-
this.label = 'text input';
|
|
337
|
-
this.required = false;
|
|
338
|
-
this.patternErrorMsg = 'invalid pattern';
|
|
339
|
-
this.pattern = '';
|
|
340
|
-
this.formControl = new i2$1.FormControl('');
|
|
341
|
-
this.controlDir.valueAccessor = this;
|
|
342
|
-
}
|
|
343
|
-
TextInputComponent.prototype.ngOnInit = function () {
|
|
344
|
-
var control = this.controlDir.control;
|
|
345
|
-
var validators = (control === null || control === void 0 ? void 0 : control.validator) ? [control.validator] : [];
|
|
346
|
-
control === null || control === void 0 ? void 0 : control.setValidators(validators);
|
|
347
|
-
control === null || control === void 0 ? void 0 : control.updateValueAndValidity();
|
|
348
|
-
this.formControl = control;
|
|
349
|
-
};
|
|
350
|
-
TextInputComponent.prototype.onChange = function (event) { };
|
|
351
|
-
TextInputComponent.prototype.onTouched = function () { };
|
|
352
|
-
TextInputComponent.prototype.writeValue = function (obj) {
|
|
353
|
-
this.input.nativeElement.value = obj || '';
|
|
354
|
-
};
|
|
355
|
-
TextInputComponent.prototype.registerOnChange = function (fn) {
|
|
356
|
-
this.onChange = fn;
|
|
357
|
-
};
|
|
358
|
-
TextInputComponent.prototype.registerOnTouched = function (fn) {
|
|
359
|
-
this.onTouched = fn;
|
|
360
|
-
};
|
|
361
|
-
Object.defineProperty(TextInputComponent.prototype, "errorMessage", {
|
|
362
|
-
get: function () {
|
|
363
|
-
this.errorMsg = this.validationService.getErrorMessage(this.formControl, this.patternErrorMsg);
|
|
364
|
-
return this.errorMsg;
|
|
365
|
-
},
|
|
366
|
-
enumerable: false,
|
|
367
|
-
configurable: true
|
|
368
|
-
});
|
|
369
|
-
return TextInputComponent;
|
|
370
|
-
}());
|
|
371
|
-
TextInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: TextInputComponent, deps: [{ token: IPAFormService }, { token: i2__namespace$1.NgControl, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
372
|
-
TextInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: TextInputComponent, selector: "ipa-text-input", inputs: { id: "id", type: "type", placeholder: "placeholder", label: "label", required: "required", patternErrorMsg: "patternErrorMsg", pattern: "pattern", classes: "classes", containerClasses: "containerClasses" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div class=\"form-floating {{containerClasses}}\">\r\n <input #input id=\"{{id}}\" class=\"form-control {{classes}}\" [type]=\"type\" [required]=\"required\" pattern=\"{{pattern}}\"\r\n placeholder=\"{{placeholder}}\" [formControl]=\"formControl\" (input)=\"onChange(controlDir.control?.value)\"\r\n (blur)=\"onTouched()\"\r\n [ngClass]=\"{'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg,'is-valid is-valid:focus': (controlDir.control?.valid && (controlDir.control?.dirty || controlDir.control?.touched) && (errorMsg || controlDir.value))}\">\r\n <label for=\"{{id}}\">{{label}}</label>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>", styles: [""], directives: [{ type: i2__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2__namespace$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
373
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: TextInputComponent, decorators: [{
|
|
374
|
-
type: i0.Component,
|
|
375
|
-
args: [{
|
|
376
|
-
selector: 'ipa-text-input',
|
|
377
|
-
templateUrl: './text-input.component.html',
|
|
378
|
-
styleUrls: ['./text-input.component.scss'],
|
|
379
|
-
}]
|
|
380
|
-
}], ctorParameters: function () {
|
|
381
|
-
return [{ type: IPAFormService }, { type: i2__namespace$1.NgControl, decorators: [{
|
|
382
|
-
type: i0.Self
|
|
383
|
-
}] }];
|
|
384
|
-
}, propDecorators: { input: [{
|
|
385
|
-
type: i0.ViewChild,
|
|
386
|
-
args: ['input', { static: true }]
|
|
387
|
-
}], id: [{
|
|
388
|
-
type: i0.Input
|
|
389
|
-
}], type: [{
|
|
390
|
-
type: i0.Input
|
|
391
|
-
}], placeholder: [{
|
|
392
|
-
type: i0.Input
|
|
393
|
-
}], label: [{
|
|
394
|
-
type: i0.Input
|
|
395
|
-
}], required: [{
|
|
396
|
-
type: i0.Input
|
|
397
|
-
}], patternErrorMsg: [{
|
|
398
|
-
type: i0.Input
|
|
399
|
-
}], pattern: [{
|
|
400
|
-
type: i0.Input
|
|
401
|
-
}], classes: [{
|
|
402
|
-
type: i0.Input
|
|
403
|
-
}], containerClasses: [{
|
|
404
|
-
type: i0.Input
|
|
405
|
-
}] } });
|
|
406
|
-
|
|
407
|
-
var TextareaInputComponent = /** @class */ (function () {
|
|
408
|
-
function TextareaInputComponent(validationService, controlDir) {
|
|
409
|
-
this.validationService = validationService;
|
|
410
|
-
this.controlDir = controlDir;
|
|
411
|
-
this.input = new i0.ElementRef(null);
|
|
412
|
-
this.placeholder = 'please enter text';
|
|
413
|
-
this.label = 'textarea input';
|
|
414
|
-
this.required = false;
|
|
415
|
-
this.patternErrorMsg = 'invalid pattern';
|
|
416
|
-
this.formControl = new i2$1.FormControl('');
|
|
417
|
-
this.controlDir.valueAccessor = this;
|
|
418
|
-
}
|
|
419
|
-
TextareaInputComponent.prototype.ngOnInit = function () {
|
|
420
|
-
var control = this.controlDir.control;
|
|
421
|
-
var validators = (control === null || control === void 0 ? void 0 : control.validator) ? [control.validator] : [];
|
|
422
|
-
control === null || control === void 0 ? void 0 : control.setValidators(validators);
|
|
423
|
-
control === null || control === void 0 ? void 0 : control.updateValueAndValidity();
|
|
424
|
-
this.formControl = control;
|
|
425
|
-
};
|
|
426
|
-
TextareaInputComponent.prototype.onChange = function (event) { };
|
|
427
|
-
TextareaInputComponent.prototype.onTouched = function () { };
|
|
428
|
-
TextareaInputComponent.prototype.writeValue = function (obj) {
|
|
429
|
-
this.input.nativeElement.value = obj || '';
|
|
430
|
-
};
|
|
431
|
-
TextareaInputComponent.prototype.registerOnChange = function (fn) {
|
|
432
|
-
this.onChange = fn;
|
|
433
|
-
};
|
|
434
|
-
TextareaInputComponent.prototype.registerOnTouched = function (fn) {
|
|
435
|
-
this.onTouched = fn;
|
|
436
|
-
};
|
|
437
|
-
Object.defineProperty(TextareaInputComponent.prototype, "errorMessage", {
|
|
438
|
-
get: function () {
|
|
439
|
-
this.errorMsg = this.validationService.getErrorMessage(this.formControl, this.patternErrorMsg);
|
|
440
|
-
return this.errorMsg;
|
|
441
|
-
},
|
|
442
|
-
enumerable: false,
|
|
443
|
-
configurable: true
|
|
444
|
-
});
|
|
445
|
-
return TextareaInputComponent;
|
|
446
|
-
}());
|
|
447
|
-
TextareaInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: TextareaInputComponent, deps: [{ token: IPAFormService }, { token: i2__namespace$1.NgControl, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
448
|
-
TextareaInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: TextareaInputComponent, selector: "ipa-textarea-input", inputs: { id: "id", placeholder: "placeholder", label: "label", required: "required", patternErrorMsg: "patternErrorMsg", pattern: "pattern", classes: "classes", containerClasses: "containerClasses" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div class=\"form-floating {{containerClasses}}\">\r\n <textarea #input id=\"{{id}}\" class=\"form-control {{classes}}\" [required]=\"required\" pattern=\"{{pattern}}\"\r\n placeholder=\"{{placeholder}}\" [formControl]=\"formControl\" (input)=\"onChange(controlDir.control?.value)\"\r\n (blur)=\"onTouched()\"\r\n [ngClass]=\"{'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg,'is-valid is-valid:focus': (controlDir.control?.valid && (controlDir.control?.dirty || controlDir.control?.touched) && (errorMsg || controlDir.value))}\">\r\n </textarea>\r\n <label for=\"{{id}}\">{{label}}</label>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>", styles: [""], directives: [{ type: i2__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2__namespace$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
449
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: TextareaInputComponent, decorators: [{
|
|
450
|
-
type: i0.Component,
|
|
451
|
-
args: [{
|
|
452
|
-
selector: 'ipa-textarea-input',
|
|
453
|
-
templateUrl: './textarea-input.component.html',
|
|
454
|
-
styleUrls: ['./textarea-input.component.scss'],
|
|
455
|
-
}]
|
|
456
|
-
}], ctorParameters: function () {
|
|
457
|
-
return [{ type: IPAFormService }, { type: i2__namespace$1.NgControl, decorators: [{
|
|
458
|
-
type: i0.Self
|
|
459
|
-
}] }];
|
|
460
|
-
}, propDecorators: { input: [{
|
|
461
|
-
type: i0.ViewChild,
|
|
462
|
-
args: ['input', { static: true }]
|
|
463
|
-
}], id: [{
|
|
464
|
-
type: i0.Input
|
|
465
|
-
}], placeholder: [{
|
|
466
|
-
type: i0.Input
|
|
467
|
-
}], label: [{
|
|
468
|
-
type: i0.Input
|
|
469
|
-
}], required: [{
|
|
470
|
-
type: i0.Input
|
|
471
|
-
}], patternErrorMsg: [{
|
|
472
|
-
type: i0.Input
|
|
473
|
-
}], pattern: [{
|
|
474
|
-
type: i0.Input
|
|
475
|
-
}], classes: [{
|
|
476
|
-
type: i0.Input
|
|
477
|
-
}], containerClasses: [{
|
|
478
|
-
type: i0.Input
|
|
479
|
-
}] } });
|
|
480
|
-
|
|
481
|
-
var DropdownInputComponent = /** @class */ (function () {
|
|
482
|
-
function DropdownInputComponent(validationService, controlDir) {
|
|
483
|
-
this.validationService = validationService;
|
|
484
|
-
this.controlDir = controlDir;
|
|
485
|
-
this.label = 'text input';
|
|
486
|
-
this.items = [];
|
|
487
|
-
this.required = false;
|
|
488
|
-
this.searchable = false;
|
|
489
|
-
this.notFoundText = 'لا يوجد بيانات';
|
|
490
|
-
this.formControl = new i2$1.FormControl('');
|
|
491
|
-
this.controlDir.valueAccessor = this;
|
|
492
|
-
}
|
|
493
|
-
DropdownInputComponent.prototype.ngOnInit = function () {
|
|
494
|
-
var control = this.controlDir.control;
|
|
495
|
-
var validators = (control === null || control === void 0 ? void 0 : control.validator) ? [control.validator] : [];
|
|
496
|
-
control === null || control === void 0 ? void 0 : control.setValidators(validators);
|
|
497
|
-
control === null || control === void 0 ? void 0 : control.updateValueAndValidity();
|
|
498
|
-
this.formControl = control;
|
|
499
|
-
this.formControl.patchValue(null);
|
|
500
|
-
};
|
|
501
|
-
DropdownInputComponent.prototype.onChange = function (event) { };
|
|
502
|
-
DropdownInputComponent.prototype.onTouched = function () { };
|
|
503
|
-
DropdownInputComponent.prototype.writeValue = function (obj) {
|
|
504
|
-
if (this.input)
|
|
505
|
-
this.input.value = obj || '';
|
|
506
|
-
};
|
|
507
|
-
DropdownInputComponent.prototype.registerOnChange = function (fn) {
|
|
508
|
-
this.onChange = fn;
|
|
509
|
-
};
|
|
510
|
-
DropdownInputComponent.prototype.registerOnTouched = function (fn) {
|
|
511
|
-
this.onTouched = fn;
|
|
512
|
-
};
|
|
513
|
-
Object.defineProperty(DropdownInputComponent.prototype, "errorMessage", {
|
|
514
|
-
get: function () {
|
|
515
|
-
this.errorMsg = this.validationService.getErrorMessage(this.formControl);
|
|
516
|
-
return this.errorMsg;
|
|
517
|
-
},
|
|
518
|
-
enumerable: false,
|
|
519
|
-
configurable: true
|
|
520
|
-
});
|
|
521
|
-
return DropdownInputComponent;
|
|
522
|
-
}());
|
|
523
|
-
DropdownInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: DropdownInputComponent, deps: [{ token: IPAFormService }, { token: i2__namespace$1.NgControl, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
524
|
-
DropdownInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: DropdownInputComponent, selector: "ipa-dropdown-input", inputs: { id: "id", label: "label", items: "items", textField: "textField", valueField: "valueField", required: "required", searchable: "searchable", notFoundText: "notFoundText", classes: "classes", containerClasses: "containerClasses" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["select"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div class=\"form-floating {{containerClasses}}\"\r\n [ngClass]=\"{'was-validated': (controlDir.control?.dirty || controlDir.control?.touched) && required}\">\r\n\r\n <!-- searchable is false -->\r\n <ng-container *ngIf=\"!searchable\">\r\n <select #select id=\"{{id}}\" class=\"form-select {{classes}}\" [required]=\"required\" [formControl]=\"formControl\">\r\n <option *ngFor=\"let item of items\" [value]=\"valueField ? item[valueField] : item\">\r\n {{textField ? item[textField] : item}}</option>\r\n </select>\r\n <label for=\"{{id}}\">{{label}}</label>\r\n </ng-container>\r\n\r\n <!-- searchable is true -->\r\n <ng-select *ngIf=\"searchable\" #select dir=\"rtl\" class=\"{{classes}}\" [formControl]=\"formControl\" [items]=\"items\"\r\n [placeholder]=\"label\" [notFoundText]=\"notFoundText\" [required]=\"required\" [bindValue]=\"valueField\"\r\n [bindLabel]=\"textField\"\r\n [ngClass]=\"{'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg,'is-valid is-valid:focus': (controlDir.control?.valid && (controlDir.control?.dirty || controlDir.control?.touched) && (errorMsg || controlDir.value))}\">\r\n </ng-select>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n</div>", styles: [""], components: [{ type: i3__namespace.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }], directives: [{ type: i3__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i2__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2__namespace$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i5__namespace.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }] });
|
|
525
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: DropdownInputComponent, decorators: [{
|
|
526
|
-
type: i0.Component,
|
|
527
|
-
args: [{
|
|
528
|
-
selector: 'ipa-dropdown-input',
|
|
529
|
-
templateUrl: './dropdown-input.component.html',
|
|
530
|
-
styleUrls: ['./dropdown-input.component.scss'],
|
|
531
|
-
}]
|
|
532
|
-
}], ctorParameters: function () {
|
|
533
|
-
return [{ type: IPAFormService }, { type: i2__namespace$1.NgControl, decorators: [{
|
|
534
|
-
type: i0.Self
|
|
535
|
-
}] }];
|
|
536
|
-
}, propDecorators: { input: [{
|
|
537
|
-
type: i0.ViewChild,
|
|
538
|
-
args: ['select', { static: true }]
|
|
539
|
-
}], id: [{
|
|
540
|
-
type: i0.Input
|
|
541
|
-
}], label: [{
|
|
542
|
-
type: i0.Input
|
|
543
|
-
}], items: [{
|
|
544
|
-
type: i0.Input
|
|
545
|
-
}], textField: [{
|
|
546
|
-
type: i0.Input
|
|
547
|
-
}], valueField: [{
|
|
548
|
-
type: i0.Input
|
|
549
|
-
}], required: [{
|
|
550
|
-
type: i0.Input
|
|
551
|
-
}], searchable: [{
|
|
552
|
-
type: i0.Input
|
|
553
|
-
}], notFoundText: [{
|
|
554
|
-
type: i0.Input
|
|
555
|
-
}], classes: [{
|
|
556
|
-
type: i0.Input
|
|
557
|
-
}], containerClasses: [{
|
|
558
|
-
type: i0.Input
|
|
559
|
-
}] } });
|
|
560
|
-
|
|
561
|
-
var LoaderService = /** @class */ (function () {
|
|
562
|
-
function LoaderService() {
|
|
563
|
-
this.isLoading = new rxjs.BehaviorSubject(false);
|
|
564
|
-
this.urls = [];
|
|
565
|
-
}
|
|
566
|
-
LoaderService.prototype.setExceptionUrls = function (urls) {
|
|
567
|
-
this.urls = urls;
|
|
568
|
-
};
|
|
569
|
-
LoaderService.prototype.addExceptionUrl = function (url) {
|
|
570
|
-
this.urls.push(url);
|
|
571
|
-
};
|
|
572
|
-
return LoaderService;
|
|
573
|
-
}());
|
|
574
|
-
LoaderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: LoaderService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
575
|
-
LoaderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: LoaderService, providedIn: 'root' });
|
|
576
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: LoaderService, decorators: [{
|
|
577
|
-
type: i0.Injectable,
|
|
578
|
-
args: [{
|
|
579
|
-
providedIn: 'root',
|
|
580
|
-
}]
|
|
581
|
-
}], ctorParameters: function () { return []; } });
|
|
582
|
-
|
|
583
|
-
var LoaderComponent = /** @class */ (function () {
|
|
584
|
-
function LoaderComponent(loaderService, cdr) {
|
|
585
|
-
this.loaderService = loaderService;
|
|
586
|
-
this.cdr = cdr;
|
|
587
|
-
}
|
|
588
|
-
LoaderComponent.prototype.ngAfterViewInit = function () {
|
|
589
|
-
var _this = this;
|
|
590
|
-
this.loaderService.isLoading.subscribe(function (v) {
|
|
591
|
-
_this.loading = v;
|
|
592
|
-
_this.cdr.detectChanges();
|
|
593
|
-
});
|
|
594
|
-
};
|
|
595
|
-
return LoaderComponent;
|
|
596
|
-
}());
|
|
597
|
-
LoaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: LoaderComponent, deps: [{ token: LoaderService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
598
|
-
LoaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: LoaderComponent, selector: "ipa-loader", ngImport: i0__namespace, template: "<div id=\"cover-spin\" *ngIf=\"loading\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n", styles: ["#cover-spin{display:flex}\n"], directives: [{ type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
599
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: LoaderComponent, decorators: [{
|
|
600
|
-
type: i0.Component,
|
|
601
|
-
args: [{
|
|
602
|
-
selector: 'ipa-loader',
|
|
603
|
-
templateUrl: './loading.component.html',
|
|
604
|
-
styleUrls: ['./loading.component.scss'],
|
|
605
|
-
}]
|
|
606
|
-
}], ctorParameters: function () { return [{ type: LoaderService }, { type: i0__namespace.ChangeDetectorRef }]; } });
|
|
607
|
-
|
|
608
|
-
var FileUploadComponent = /** @class */ (function () {
|
|
609
|
-
function FileUploadComponent(
|
|
610
|
-
// private authService: AuthService,
|
|
611
|
-
toastrService) {
|
|
612
|
-
this.toastrService = toastrService;
|
|
613
|
-
this.label = '';
|
|
614
|
-
this.required = false;
|
|
615
|
-
this.acceptedFiles = '';
|
|
616
|
-
this.multiple = 1; // set maxFiles (NOT uploadMultiple)in the config object,
|
|
617
|
-
this.maxFileSize = 2;
|
|
618
|
-
this.method = 'POST';
|
|
619
|
-
this.autoUpload = false;
|
|
620
|
-
this.apiUrl = 'apiUrl';
|
|
621
|
-
this.successUpload = new i0.EventEmitter();
|
|
622
|
-
this.fileAdded = new i0.EventEmitter();
|
|
623
|
-
this.fileDeleted = new i0.EventEmitter();
|
|
624
|
-
this.dragEnter = false;
|
|
625
|
-
this.errors = [];
|
|
626
|
-
this.filesAdded = [];
|
|
627
|
-
this.currentFiles = [];
|
|
628
|
-
}
|
|
629
|
-
FileUploadComponent.prototype.ngOnInit = function () {
|
|
630
|
-
this.label = 'رفع ' + this.label;
|
|
631
|
-
this.config = {
|
|
632
|
-
url: this.apiUrl,
|
|
633
|
-
method: this.method,
|
|
634
|
-
headers: {
|
|
635
|
-
Authorization: 'Bearer ' + this.authorization,
|
|
636
|
-
},
|
|
637
|
-
maxFilesize: this.maxFileSize,
|
|
638
|
-
maxFiles: this.multiple,
|
|
639
|
-
uploadMultiple: this.multiple > 1,
|
|
640
|
-
dictInvalidFileType: 'صيغة الملف غير مسموح بها',
|
|
641
|
-
dictFileTooBig: 'الحجم تجاوز الحد المسموح',
|
|
642
|
-
dictMaxFilesExceeded: 'الرجاء حذف الملفات الموجودة حاليا لتتمكن من رفع هذا الملف',
|
|
643
|
-
acceptedFiles: this.acceptedFiles,
|
|
644
|
-
autoProcessQueue: this.autoUpload,
|
|
645
|
-
previewTemplate: '<span></span>',
|
|
646
|
-
};
|
|
647
|
-
};
|
|
648
|
-
FileUploadComponent.prototype.operationCompleted = function (e) {
|
|
649
|
-
if (this.filesAdded.length > 0) {
|
|
650
|
-
this.successUpload.emit(this.filesAdded);
|
|
651
|
-
this.filesAdded = [];
|
|
652
|
-
}
|
|
653
|
-
this.dropzoneDir.reset();
|
|
654
|
-
};
|
|
655
|
-
FileUploadComponent.prototype.onUploadSuccess = function (e) {
|
|
656
|
-
var file = e[0];
|
|
657
|
-
if (file.status === 'success') {
|
|
658
|
-
this.filesAdded.push(file);
|
|
659
|
-
}
|
|
660
|
-
this.toastrService.success('تم تحميل المرفقات بنجاح');
|
|
661
|
-
};
|
|
662
|
-
FileUploadComponent.prototype.onUploadError = function (e) {
|
|
663
|
-
if (e[1]) {
|
|
664
|
-
this.errors = [];
|
|
665
|
-
this.errors.push(e[1] + " (" + e[0].name + ")");
|
|
666
|
-
}
|
|
667
|
-
};
|
|
668
|
-
FileUploadComponent.prototype.fileWasAdded = function (e) {
|
|
669
|
-
var myDropzone = this.dropzoneDir.dropzone();
|
|
670
|
-
if (this.multiple === 1) {
|
|
671
|
-
this.currentFiles = [];
|
|
672
|
-
this.filesAdded = [];
|
|
673
|
-
this.errors = [];
|
|
674
|
-
var files = myDropzone.files;
|
|
675
|
-
if (files.length > 1) {
|
|
676
|
-
myDropzone.removeFile(files[0]);
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
this.currentFiles.push(e);
|
|
680
|
-
this.fileAdded.emit(e);
|
|
681
|
-
};
|
|
682
|
-
FileUploadComponent.prototype.sending = function (e) {
|
|
683
|
-
this.errors = [];
|
|
684
|
-
};
|
|
685
|
-
FileUploadComponent.prototype.reset = function (e) { };
|
|
686
|
-
FileUploadComponent.prototype.deleteFile = function (file) {
|
|
687
|
-
this.currentFiles = this.currentFiles.filter(function (x) { return x.name !== file.name && x.size !== file.size; });
|
|
688
|
-
this.errors = [];
|
|
689
|
-
this.fileDeleted.emit();
|
|
690
|
-
};
|
|
691
|
-
return FileUploadComponent;
|
|
692
|
-
}());
|
|
693
|
-
FileUploadComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: FileUploadComponent, deps: [{ token: i1__namespace.ToastrService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
694
|
-
FileUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: FileUploadComponent, selector: "ipa-file-upload", inputs: { label: "label", required: "required", acceptedFiles: "acceptedFiles", multiple: "multiple", maxFileSize: "maxFileSize", method: "method", autoUpload: "autoUpload", apiUrl: "apiUrl", authorization: "authorization" }, outputs: { successUpload: "successUpload", fileAdded: "fileAdded", fileDeleted: "fileDeleted" }, viewQueries: [{ propertyName: "dropzoneDir", first: true, predicate: i2$2.DropzoneDirective, descendants: true }], ngImport: i0__namespace, template: "<div class=\"file-upload\">\r\n <div class=\"upload-overlay\" [dropzone]=\"config\" (error)=\"onUploadError($event)\"\r\n (queueComplete)=\"operationCompleted($event)\" (success)=\"onUploadSuccess($event)\" (dragenter)=\"dragEnter = true\"\r\n (dragLeave)=\"dragEnter = false\" (drop)=\"dragEnter = false\" (dragEnd)=\"dragEnter = false\"\r\n [class.active-border]=\"dragEnter\" (sending)=\"sending($event)\" (reset)=\"reset($event)\"\r\n (addedFile)=\"fileWasAdded($event)\">\r\n </div>\r\n <div class=\"upload-btn-wrapper\">\r\n <div>\r\n <div class=\"subtitle mb-2\">\r\n {{label}}\r\n <span *ngIf=\"required\" class=\"required\">*</span>\r\n </div>\r\n <hr>\r\n <span style=\"font-size: 12px;\">\u0642\u0645 \u0628\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641 \u0623\u0648 \u0627\u0636\u063A\u0637 \u0647\u0646\u0627</span>\r\n <i class=\"fas fa-upload upload-icon mr-2\"></i>\r\n </div>\r\n <div *ngIf=\"acceptedFiles.length > 0\" class=\"allowed-extensions\">\r\n \u0627\u0644\u0635\u064A\u063A\u0629 \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0628\u0647\u0627:\r\n <span class=\"extensions\">{{ acceptedFiles }}</span>\r\n </div>\r\n <div class=\"allowed-extensions\">\r\n \u0627\u0642\u0635\u0649 \u062D\u062C\u0645 \u0644\u0644\u0645\u0631\u0641\u0642:\r\n <span class=\"extensions\">{{ maxFileSize }} MB</span>\r\n </div>\r\n </div>\r\n</div>\r\n<div id=\"attachment-status\" style=\"text-align: center; margin-top:10px;\">\r\n <span style=\"font-size: 14px; margin: auto; font-weight:bold;\" *ngFor=\"let file of currentFiles\">\r\n {{ file.name }} <i (click)=\"deleteFile(file)\" class=\"fas fa-trash\"\r\n style=\"color:firebrick; cursor: pointer;\"></i>\r\n <br>\r\n </span>\r\n <ul class=\"list-unstyled\">\r\n <li class=\"text-danger\" style=\"font-size: 12px;\" *ngFor=\"let error of errors\">{{error}}</li>\r\n </ul>\r\n</div>", styles: [".subtitle{border-bottom:none;display:block;line-height:2}.file-upload{border:dashed 1px #ccc;display:block;min-height:150px;border-radius:15px;width:350px;cursor:pointer;position:relative;margin:auto}.upload-overlay{position:absolute;width:100%;height:100%}.upload-btn-wrapper{text-align:center}.upload-icon{margin-right:5px}.list-unstyled{margin:10px!important;padding:14px!important;list-style:none}.allowed-extensions{color:#4d7297}.required{color:#dc3545;font-size:20px}\n"], directives: [{ type: i2__namespace$2.DropzoneDirective, selector: "[dropzone]", inputs: ["disabled", "dropzone"], outputs: ["init", "error", "success", "sending", "canceled", "complete", "processing", "drop", "dragStart", "dragEnd", "dragEnter", "dragOver", "dragLeave", "thumbnail", "addedFile", "addedFiles", "removedFile", "uploadProgress", "maxFilesReached", "maxFilesExceeded", "errorMultiple", "successMultiple", "sendingMultiple", "canceledMultiple", "completeMultiple", "processingMultiple", "reset", "queueComplete", "totalUploadProgress"], exportAs: ["ngxDropzone"] }, { type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
695
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: FileUploadComponent, decorators: [{
|
|
696
|
-
type: i0.Component,
|
|
697
|
-
args: [{
|
|
698
|
-
selector: 'ipa-file-upload',
|
|
699
|
-
templateUrl: './file-upload.component.html',
|
|
700
|
-
styleUrls: ['./file-upload.component.scss']
|
|
701
|
-
}]
|
|
702
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.ToastrService }]; }, propDecorators: { dropzoneDir: [{
|
|
703
|
-
type: i0.ViewChild,
|
|
704
|
-
args: [i2$2.DropzoneDirective, { static: false }]
|
|
705
|
-
}], label: [{
|
|
706
|
-
type: i0.Input
|
|
707
|
-
}], required: [{
|
|
708
|
-
type: i0.Input
|
|
709
|
-
}], acceptedFiles: [{
|
|
710
|
-
type: i0.Input
|
|
711
|
-
}], multiple: [{
|
|
712
|
-
type: i0.Input
|
|
713
|
-
}], maxFileSize: [{
|
|
714
|
-
type: i0.Input
|
|
715
|
-
}], method: [{
|
|
716
|
-
type: i0.Input
|
|
717
|
-
}], autoUpload: [{
|
|
718
|
-
type: i0.Input
|
|
719
|
-
}], apiUrl: [{
|
|
720
|
-
type: i0.Input
|
|
721
|
-
}], authorization: [{
|
|
722
|
-
type: i0.Input
|
|
723
|
-
}], successUpload: [{
|
|
724
|
-
type: i0.Output
|
|
725
|
-
}], fileAdded: [{
|
|
726
|
-
type: i0.Output
|
|
727
|
-
}], fileDeleted: [{
|
|
728
|
-
type: i0.Output
|
|
729
|
-
}] } });
|
|
730
|
-
|
|
731
|
-
var RecaptchaComponent = /** @class */ (function () {
|
|
732
|
-
function RecaptchaComponent(controlDir) {
|
|
733
|
-
this.controlDir = controlDir;
|
|
734
|
-
this.siteKey = '6LefJQYdAAAAAIlxmfkjNlWidMk8VukIZcs6lO5e';
|
|
735
|
-
this.recaptchaSize = 'normal';
|
|
736
|
-
this.lang = 'ar';
|
|
737
|
-
this.recaptchaType = 'image';
|
|
738
|
-
this.theme = 'light';
|
|
739
|
-
this.useGlobalDomain = true;
|
|
740
|
-
this.formControl = new i2$1.FormControl('');
|
|
741
|
-
this.controlDir.valueAccessor = this;
|
|
742
|
-
}
|
|
743
|
-
RecaptchaComponent.prototype.ngOnInit = function () {
|
|
744
|
-
var control = this.controlDir.control;
|
|
745
|
-
var validators = (control === null || control === void 0 ? void 0 : control.validator) ? [control.validator] : [];
|
|
746
|
-
control === null || control === void 0 ? void 0 : control.setValidators(validators);
|
|
747
|
-
control === null || control === void 0 ? void 0 : control.updateValueAndValidity();
|
|
748
|
-
this.formControl = control;
|
|
749
|
-
};
|
|
750
|
-
RecaptchaComponent.prototype.onChange = function (event) { };
|
|
751
|
-
RecaptchaComponent.prototype.onTouched = function () { };
|
|
752
|
-
RecaptchaComponent.prototype.writeValue = function (obj) { };
|
|
753
|
-
RecaptchaComponent.prototype.registerOnChange = function (fn) {
|
|
754
|
-
this.onChange = fn;
|
|
755
|
-
};
|
|
756
|
-
RecaptchaComponent.prototype.registerOnTouched = function (fn) {
|
|
757
|
-
this.onTouched = fn;
|
|
758
|
-
};
|
|
759
|
-
return RecaptchaComponent;
|
|
760
|
-
}());
|
|
761
|
-
RecaptchaComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: RecaptchaComponent, deps: [{ token: i2__namespace$1.NgControl, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
762
|
-
RecaptchaComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: RecaptchaComponent, selector: "ipa-recaptcha", inputs: { siteKey: "siteKey", recaptchaSize: "recaptchaSize", lang: "lang", recaptchaType: "recaptchaType", theme: "theme", useGlobalDomain: "useGlobalDomain" }, ngImport: i0__namespace, template: "<ngx-recaptcha2 [siteKey]=\"siteKey\" [size]=\"recaptchaSize\" [hl]=\"lang\" [theme]=\"theme\" [type]=\"recaptchaType\"\n [useGlobalDomain]=\"useGlobalDomain\" [formControl]=\"formControl\">\n</ngx-recaptcha2>", styles: [""], components: [{ type: i2__namespace$3.ReCaptcha2Component, selector: "ngx-recaptcha2", inputs: ["theme", "size", "hl"] }], directives: [{ type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
763
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: RecaptchaComponent, decorators: [{
|
|
764
|
-
type: i0.Component,
|
|
765
|
-
args: [{
|
|
766
|
-
selector: 'ipa-recaptcha',
|
|
767
|
-
templateUrl: './recaptcha.component.html',
|
|
768
|
-
styleUrls: ['./recaptcha.component.scss'],
|
|
769
|
-
}]
|
|
770
|
-
}], ctorParameters: function () {
|
|
771
|
-
return [{ type: i2__namespace$1.NgControl, decorators: [{
|
|
772
|
-
type: i0.Self
|
|
773
|
-
}] }];
|
|
774
|
-
}, propDecorators: { siteKey: [{
|
|
775
|
-
type: i0.Input
|
|
776
|
-
}], recaptchaSize: [{
|
|
777
|
-
type: i0.Input
|
|
778
|
-
}], lang: [{
|
|
779
|
-
type: i0.Input
|
|
780
|
-
}], recaptchaType: [{
|
|
781
|
-
type: i0.Input
|
|
782
|
-
}], theme: [{
|
|
783
|
-
type: i0.Input
|
|
784
|
-
}], useGlobalDomain: [{
|
|
785
|
-
type: i0.Input
|
|
786
|
-
}] } });
|
|
787
|
-
|
|
788
|
-
var GenerateFormComponent = /** @class */ (function () {
|
|
789
|
-
function GenerateFormComponent(validationService) {
|
|
790
|
-
this.validationService = validationService;
|
|
791
|
-
this.recaptchaSize = 'normal';
|
|
792
|
-
this.lang = 'ar';
|
|
793
|
-
this.recaptchaType = 'image';
|
|
794
|
-
this.theme = 'light';
|
|
795
|
-
this.useGlobalDomain = true;
|
|
796
|
-
// file upload outputs
|
|
797
|
-
this.successUpload = new i0.EventEmitter();
|
|
798
|
-
this.fileAdded = new i0.EventEmitter();
|
|
799
|
-
this.fileDeleted = new i0.EventEmitter();
|
|
800
|
-
}
|
|
801
|
-
GenerateFormComponent.prototype.ngOnInit = function () {
|
|
802
|
-
this.createForm();
|
|
803
|
-
};
|
|
804
|
-
Object.defineProperty(GenerateFormComponent.prototype, "formControls", {
|
|
805
|
-
get: function () {
|
|
806
|
-
return this.generateForm.get('items');
|
|
807
|
-
},
|
|
808
|
-
enumerable: false,
|
|
809
|
-
configurable: true
|
|
810
|
-
});
|
|
811
|
-
GenerateFormComponent.prototype.getErrorMessage = function (formControlName) {
|
|
812
|
-
var formControl = this.generateForm.controls[formControlName];
|
|
813
|
-
this.errorMsg = this.validationService.getErrorMessage(formControl);
|
|
814
|
-
return this.errorMsg;
|
|
815
|
-
};
|
|
816
|
-
GenerateFormComponent.prototype.SuccessUpload = function (event) {
|
|
817
|
-
this.successUpload.emit(event);
|
|
818
|
-
};
|
|
819
|
-
GenerateFormComponent.prototype.FileAdded = function (file, formControlName) {
|
|
820
|
-
this.generateForm.controls[formControlName].patchValue(file);
|
|
821
|
-
this.fileAdded.emit(file);
|
|
822
|
-
};
|
|
823
|
-
GenerateFormComponent.prototype.FileDeleted = function (event, formControlName) {
|
|
824
|
-
this.generateForm.controls[formControlName].patchValue(null);
|
|
825
|
-
this.fileDeleted.emit(event);
|
|
826
|
-
};
|
|
827
|
-
GenerateFormComponent.prototype.createForm = function () {
|
|
828
|
-
var _this = this;
|
|
829
|
-
this.form.columns.forEach(function (column) {
|
|
830
|
-
if (column.type === 'checkbox') {
|
|
831
|
-
_this.addCheckboxControl(column);
|
|
832
|
-
}
|
|
833
|
-
else {
|
|
834
|
-
_this.generateForm.addControl(column.englishName, new i2$1.FormControl(null, [
|
|
835
|
-
column.required ? i2$1.Validators.required : i2$1.Validators.nullValidator,
|
|
836
|
-
i2$1.Validators.maxLength(column.size),
|
|
837
|
-
column.type === 'number'
|
|
838
|
-
? i2$1.Validators.min(1)
|
|
839
|
-
: i2$1.Validators.nullValidator,
|
|
840
|
-
]));
|
|
841
|
-
}
|
|
842
|
-
});
|
|
843
|
-
};
|
|
844
|
-
GenerateFormComponent.prototype.addCheckboxControl = function (column) {
|
|
845
|
-
var _this = this;
|
|
846
|
-
var checkboxGroup = new i2$1.FormArray(column.data.map(function (item) {
|
|
847
|
-
var _a;
|
|
848
|
-
return new i2$1.FormGroup((_a = {},
|
|
849
|
-
_a[column.valueField] = new i2$1.FormControl(item[column.valueField]),
|
|
850
|
-
_a[column.textField] = new i2$1.FormControl(item[column.textField]),
|
|
851
|
-
_a.checkbox = new i2$1.FormControl(false, i2$1.Validators.required),
|
|
852
|
-
_a));
|
|
853
|
-
}));
|
|
854
|
-
this.generateForm.addControl(column.englishName, new i2$1.FormControl(null, column.required ? i2$1.Validators.required : i2$1.Validators.nullValidator));
|
|
855
|
-
this.generateForm.addControl('items', checkboxGroup);
|
|
856
|
-
checkboxGroup.valueChanges.subscribe(function (value) {
|
|
857
|
-
if (_this.getCheckboxSelectedValues(value)) {
|
|
858
|
-
_this.generateForm.controls[column.englishName].patchValue(value);
|
|
859
|
-
}
|
|
860
|
-
else {
|
|
861
|
-
_this.generateForm.controls[column.englishName].patchValue(null);
|
|
862
|
-
_this.generateForm.controls[column.englishName].markAsTouched();
|
|
863
|
-
}
|
|
864
|
-
});
|
|
865
|
-
};
|
|
866
|
-
GenerateFormComponent.prototype.getCheckboxSelectedValues = function (items) {
|
|
867
|
-
var selectedItems = items.filter(function (item) { return item.checkbox; });
|
|
868
|
-
return selectedItems.length > 0 ? selectedItems : null;
|
|
869
|
-
};
|
|
870
|
-
return GenerateFormComponent;
|
|
871
|
-
}());
|
|
872
|
-
GenerateFormComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: GenerateFormComponent, deps: [{ token: IPAFormService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
873
|
-
GenerateFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: GenerateFormComponent, selector: "ipa-generate-form", inputs: { generateForm: "generateForm", form: "form", siteKey: "siteKey", recaptchaSize: "recaptchaSize", lang: "lang", recaptchaType: "recaptchaType", theme: "theme", useGlobalDomain: "useGlobalDomain" }, outputs: { successUpload: "successUpload", fileAdded: "fileAdded", fileDeleted: "fileDeleted" }, ngImport: i0__namespace, template: "<form [formGroup]=\"generateForm\">\r\n <ng-container *ngFor=\"let column of form.columns\">\r\n <div [ngSwitch]=\"column.type\">\r\n <!-- TEXTAREA -->\r\n <div *ngSwitchCase=\"'textArea'\">\r\n <ipa-textarea-input [formControlName]=\"column.englishName\" [id]=\"column.englishName\"\r\n [label]=\"column.arabicLabel\" [required]=\"column.required\" [pattern]=\"column.validationPattern!\"\r\n [patternErrorMsg]=\"column.patternErrorMsg!\" [classes]=\"column.inputClasses!\"\r\n [containerClasses]=\"column.containerClasses!\"></ipa-textarea-input>\r\n </div>\r\n\r\n <!-- DROP DOWN LIST -->\r\n <div *ngSwitchCase=\"'select'\">\r\n <ipa-dropdown-input [formControlName]=\"column.englishName\" [id]=\"column.englishName\"\r\n [label]=\"column.arabicLabel\" [items]=\"column.data!\" [valueField]=\"column.valueField!\"\r\n [textField]=\"column.textField!\" [required]=\"column.required\" [searchable]=\"column.searchable\"\r\n [notFoundText]=\"column.notFoundText\" [classes]=\"column.inputClasses!\"\r\n [containerClasses]=\"column.containerClasses!\">\r\n </ipa-dropdown-input>\r\n </div>\r\n\r\n <!-- CHECKBOX -->\r\n <div *ngSwitchCase=\"'checkbox'\">\r\n <label [for]=\"column.englishName\">{{column.arabicLabel}}</label>\r\n <div [formArrayName]=\"'items'\" *ngFor=\"let control of formControls.controls; let i = index\">\r\n <div [formGroupName]=\"i\" [id]=\"column.englishName\">\r\n <div class=\"form-check\">\r\n <input [id]=\"column.englishName+control.value[column.valueField!]\" class=\"form-check-input\"\r\n type=\"checkbox\" formControlName=\"checkbox\">\r\n <label class=\"form-check-label\"\r\n [for]=\"column.englishName+control.value[column.valueField!]\">\r\n {{control.value[column.textField!]}}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"invalid-feedback\" style=\"display: block !important;\"\r\n *ngIf=\"getErrorMessage(column.englishName) !== null\">\r\n {{errorMsg}}\r\n </div>\r\n </div>\r\n\r\n <!-- RADIO -->\r\n <div *ngSwitchCase=\"'radio'\">\r\n <label [for]=\"column.englishName\">{{column.arabicLabel}}</label>\r\n <div *ngFor=\"let item of column.data; let i = index\" [id]=\"column.englishName\">\r\n <div class=\"form-check\">\r\n <input [id]=\"column.englishName+item[column.valueField!]\" class=\"form-check-input\" type=\"radio\"\r\n [formControlName]=\"column.englishName\" [value]=\"item[column.valueField!]\">\r\n <label class=\"form-check-label\" [for]=\"column.englishName+item[column.valueField!]\">\r\n {{item[column.textField!]}}\r\n </label>\r\n </div>\r\n </div>\r\n <div class=\"invalid-feedback\" style=\"display: block !important;\"\r\n *ngIf=\"getErrorMessage(column.englishName) !== null\">\r\n {{errorMsg}}\r\n </div>\r\n </div>\r\n\r\n <!-- FILE UPLOAD -->\r\n <div *ngSwitchCase=\"'file'\">\r\n <ipa-file-upload [label]=\"column.arabicLabel\" [acceptedFiles]=\"column.acceptedFiles!\"\r\n [multiple]=\"column.multipleFile!\" [maxFileSize]=\"column.size!\" [method]=\"column.apiURlMethod!\"\r\n [autoUpload]=\"column.autoUploadFile!\" [apiUrl]=\"column.apiUrl?? 'apiUrl' \"\r\n [authorization]=\"column.authorization!\" ngDefaultControl [formControlName]=\"column.englishName\"\r\n (successUpload)=\"SuccessUpload($event)\" (fileAdded)=\"FileAdded($event, column.englishName)\"\r\n (fileDeleted)=\"FileDeleted($event, column.englishName)\"></ipa-file-upload>\r\n </div>\r\n\r\n <!-- recaptcha -->\r\n <div *ngSwitchCase=\"'recaptcha'\">\r\n <ipa-recaptcha [recaptchaSize]=\"recaptchaSize\" [lang]=\"lang\" [theme]=\"theme\"\r\n [recaptchaType]=\"recaptchaType\" [useGlobalDomain]=\"useGlobalDomain\"\r\n formControlName=\"{{column.englishName}}\"></ipa-recaptcha>\r\n </div>\r\n\r\n <!-- DEFAULT -->\r\n <div *ngSwitchDefault>\r\n <ipa-text-input [formControlName]=\"column.englishName\" [id]=\"column.englishName\" [type]=\"column.type\"\r\n [label]=\"column.arabicLabel\" [required]=\"column.required\" [pattern]=\"column.validationPattern!\"\r\n [patternErrorMsg]=\"column.patternErrorMsg!\" [classes]=\"column.inputClasses!\"\r\n [containerClasses]=\"column.containerClasses!\"></ipa-text-input>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</form>", styles: [""], components: [{ type: TextareaInputComponent, selector: "ipa-textarea-input", inputs: ["id", "placeholder", "label", "required", "patternErrorMsg", "pattern", "classes", "containerClasses"] }, { type: DropdownInputComponent, selector: "ipa-dropdown-input", inputs: ["id", "label", "items", "textField", "valueField", "required", "searchable", "notFoundText", "classes", "containerClasses"] }, { type: FileUploadComponent, selector: "ipa-file-upload", inputs: ["label", "required", "acceptedFiles", "multiple", "maxFileSize", "method", "autoUpload", "apiUrl", "authorization"], outputs: ["successUpload", "fileAdded", "fileDeleted"] }, { type: RecaptchaComponent, selector: "ipa-recaptcha", inputs: ["siteKey", "recaptchaSize", "lang", "recaptchaType", "theme", "useGlobalDomain"] }, { type: TextInputComponent, selector: "ipa-text-input", inputs: ["id", "type", "placeholder", "label", "required", "patternErrorMsg", "pattern", "classes", "containerClasses"] }], directives: [{ type: i2__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2__namespace$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i2__namespace$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i2__namespace$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2__namespace$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i2__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3__namespace$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
|
|
874
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: GenerateFormComponent, decorators: [{
|
|
875
|
-
type: i0.Component,
|
|
876
|
-
args: [{
|
|
877
|
-
selector: 'ipa-generate-form',
|
|
878
|
-
templateUrl: './generate-form.component.html',
|
|
879
|
-
styleUrls: ['./generate-form.component.scss'],
|
|
880
|
-
}]
|
|
881
|
-
}], ctorParameters: function () { return [{ type: IPAFormService }]; }, propDecorators: { generateForm: [{
|
|
882
|
-
type: i0.Input
|
|
883
|
-
}], form: [{
|
|
884
|
-
type: i0.Input
|
|
885
|
-
}], siteKey: [{
|
|
886
|
-
type: i0.Input
|
|
887
|
-
}], recaptchaSize: [{
|
|
888
|
-
type: i0.Input
|
|
889
|
-
}], lang: [{
|
|
890
|
-
type: i0.Input
|
|
891
|
-
}], recaptchaType: [{
|
|
892
|
-
type: i0.Input
|
|
893
|
-
}], theme: [{
|
|
894
|
-
type: i0.Input
|
|
895
|
-
}], useGlobalDomain: [{
|
|
896
|
-
type: i0.Input
|
|
897
|
-
}], successUpload: [{
|
|
898
|
-
type: i0.Output
|
|
899
|
-
}], fileAdded: [{
|
|
900
|
-
type: i0.Output
|
|
901
|
-
}], fileDeleted: [{
|
|
902
|
-
type: i0.Output
|
|
903
|
-
}] } });
|
|
904
|
-
|
|
905
|
-
var DatepickerComponent = /** @class */ (function () {
|
|
906
|
-
function DatepickerComponent(ipaFormService, calendar, controlDir, config) {
|
|
907
|
-
this.ipaFormService = ipaFormService;
|
|
908
|
-
this.calendar = calendar;
|
|
909
|
-
this.controlDir = controlDir;
|
|
910
|
-
this.label = 'datepicker';
|
|
911
|
-
this.patternErrorMsg = 'invalid pattern';
|
|
912
|
-
this.required = false;
|
|
913
|
-
this.today = this.calendar.getToday();
|
|
914
|
-
this.formControl = new i2$1.FormControl('');
|
|
915
|
-
this.controlDir.valueAccessor = this;
|
|
916
|
-
config.container = 'body';
|
|
917
|
-
}
|
|
918
|
-
DatepickerComponent.prototype.ngOnInit = function () {
|
|
919
|
-
var control = this.controlDir.control;
|
|
920
|
-
var validators = (control === null || control === void 0 ? void 0 : control.validator) ? [control.validator] : [];
|
|
921
|
-
control === null || control === void 0 ? void 0 : control.setValidators(validators);
|
|
922
|
-
control === null || control === void 0 ? void 0 : control.updateValueAndValidity();
|
|
923
|
-
this.formControl = control;
|
|
924
|
-
};
|
|
925
|
-
DatepickerComponent.prototype.onChange = function (event) { };
|
|
926
|
-
DatepickerComponent.prototype.onTouched = function () { };
|
|
927
|
-
DatepickerComponent.prototype.writeValue = function (obj) { };
|
|
928
|
-
DatepickerComponent.prototype.registerOnChange = function (fn) {
|
|
929
|
-
this.onChange = fn;
|
|
930
|
-
};
|
|
931
|
-
DatepickerComponent.prototype.registerOnTouched = function (fn) {
|
|
932
|
-
this.onTouched = fn;
|
|
933
|
-
};
|
|
934
|
-
Object.defineProperty(DatepickerComponent.prototype, "errorMessage", {
|
|
935
|
-
get: function () {
|
|
936
|
-
this.errorMsg = this.ipaFormService.getErrorMessage(this.formControl, this.patternErrorMsg);
|
|
937
|
-
return this.errorMsg;
|
|
938
|
-
},
|
|
939
|
-
enumerable: false,
|
|
940
|
-
configurable: true
|
|
941
|
-
});
|
|
942
|
-
return DatepickerComponent;
|
|
943
|
-
}());
|
|
944
|
-
DatepickerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: DatepickerComponent, deps: [{ token: IPAFormService }, { token: i2__namespace.NgbCalendar }, { token: i2__namespace$1.NgControl, self: true }, { token: i2__namespace.NgbInputDatepickerConfig }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
945
|
-
DatepickerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: DatepickerComponent, selector: "ipa-datepicker", inputs: { id: "id", label: "label", patternErrorMsg: "patternErrorMsg", required: "required", maxDate: "maxDate", minDate: "minDate", classes: "classes", containerClasses: "containerClasses" }, ngImport: i0__namespace, template: "<div class=\"form-floating input-group {{containerClasses}}\">\r\n <input id=\"{{id}}\"\r\n [ngClass]=\"{'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg,'is-valid is-valid:focus': (controlDir.control?.valid && (controlDir.control?.dirty || controlDir.control?.touched) && (errorMsg || controlDir.value))}\"\r\n class=\"form-control {{classes}}\" [formControl]=\"formControl\" [firstDayOfWeek]=\"7\" ngbDatepicker\r\n #d=\"ngbDatepicker\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [footerTemplate]=\"footerTemplate\"\r\n [required]=\"required\" style=\"outline: unset; z-index: unset !important;\" autocomplete=\"off\" (blur)=\"onTouched()\" title=\"{{label}}\">\r\n <label for=\"{{id}}\">{{label}}</label>\r\n <span class=\"input-group-text calenderBtn\" (click)=\"d.toggle()\">\r\n <i class=\"far fa-calendar-alt fa-lg\"></i>\r\n </span>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n <ng-template #footerTemplate style=\"text-align: center;\">\r\n <hr>\r\n <button type=\"button\" class=\"btn btn-primary btn-sm m-2 \" style=\"width: auto; float: right;\"\r\n (click)=\"formControl.patchValue(today);d.navigateTo(today);\">\u0627\u0644\u064A\u0648\u0645</button>\r\n <button type=\"button\" class=\"btn btn-secondary btn-sm m-2\" style=\"width: auto; float: left;\"\r\n (click)=\"formControl.patchValue(null);d.close()\">\u0645\u0633\u062D</button>\r\n </ng-template>\r\n</div>", styles: [".calenderBtn{cursor:pointer;background-color:transparent;color:#6c757d;border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.calenderBtn:hover{color:#fff;background-color:#6c757d;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}\n"], directives: [{ type: i2__namespace.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i2__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
946
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: DatepickerComponent, decorators: [{
|
|
947
|
-
type: i0.Component,
|
|
948
|
-
args: [{
|
|
949
|
-
selector: 'ipa-datepicker',
|
|
950
|
-
templateUrl: './datepicker.component.html',
|
|
951
|
-
styleUrls: ['./datepicker.component.scss'],
|
|
952
|
-
}]
|
|
953
|
-
}], ctorParameters: function () {
|
|
954
|
-
return [{ type: IPAFormService }, { type: i2__namespace.NgbCalendar }, { type: i2__namespace$1.NgControl, decorators: [{
|
|
955
|
-
type: i0.Self
|
|
956
|
-
}] }, { type: i2__namespace.NgbInputDatepickerConfig }];
|
|
957
|
-
}, propDecorators: { id: [{
|
|
958
|
-
type: i0.Input
|
|
959
|
-
}], label: [{
|
|
960
|
-
type: i0.Input
|
|
961
|
-
}], patternErrorMsg: [{
|
|
962
|
-
type: i0.Input
|
|
963
|
-
}], required: [{
|
|
964
|
-
type: i0.Input
|
|
965
|
-
}], maxDate: [{
|
|
966
|
-
type: i0.Input
|
|
967
|
-
}], minDate: [{
|
|
968
|
-
type: i0.Input
|
|
969
|
-
}], classes: [{
|
|
970
|
-
type: i0.Input
|
|
971
|
-
}], containerClasses: [{
|
|
972
|
-
type: i0.Input
|
|
973
|
-
}] } });
|
|
974
|
-
|
|
975
|
-
/*! *****************************************************************************
|
|
976
|
-
Copyright (c) Microsoft Corporation.
|
|
977
|
-
|
|
978
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
979
|
-
purpose with or without fee is hereby granted.
|
|
980
|
-
|
|
981
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
982
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
983
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
984
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
985
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
986
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
987
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
988
|
-
***************************************************************************** */
|
|
989
|
-
/* global Reflect, Promise */
|
|
990
|
-
var extendStatics = function (d, b) {
|
|
991
|
-
extendStatics = Object.setPrototypeOf ||
|
|
992
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
993
|
-
function (d, b) { for (var p in b)
|
|
994
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
995
|
-
d[p] = b[p]; };
|
|
996
|
-
return extendStatics(d, b);
|
|
997
|
-
};
|
|
998
|
-
function __extends(d, b) {
|
|
999
|
-
if (typeof b !== "function" && b !== null)
|
|
1000
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1001
|
-
extendStatics(d, b);
|
|
1002
|
-
function __() { this.constructor = d; }
|
|
1003
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1004
|
-
}
|
|
1005
|
-
var __assign = function () {
|
|
1006
|
-
__assign = Object.assign || function __assign(t) {
|
|
1007
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1008
|
-
s = arguments[i];
|
|
1009
|
-
for (var p in s)
|
|
1010
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
1011
|
-
t[p] = s[p];
|
|
1012
|
-
}
|
|
1013
|
-
return t;
|
|
1014
|
-
};
|
|
1015
|
-
return __assign.apply(this, arguments);
|
|
1016
|
-
};
|
|
1017
|
-
function __rest(s, e) {
|
|
1018
|
-
var t = {};
|
|
1019
|
-
for (var p in s)
|
|
1020
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1021
|
-
t[p] = s[p];
|
|
1022
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1023
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1024
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1025
|
-
t[p[i]] = s[p[i]];
|
|
1026
|
-
}
|
|
1027
|
-
return t;
|
|
1028
|
-
}
|
|
1029
|
-
function __decorate(decorators, target, key, desc) {
|
|
1030
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1031
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1032
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1033
|
-
else
|
|
1034
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1035
|
-
if (d = decorators[i])
|
|
1036
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1037
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1038
|
-
}
|
|
1039
|
-
function __param(paramIndex, decorator) {
|
|
1040
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
1041
|
-
}
|
|
1042
|
-
function __metadata(metadataKey, metadataValue) {
|
|
1043
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1044
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
1045
|
-
}
|
|
1046
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1047
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1048
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1049
|
-
function fulfilled(value) { try {
|
|
1050
|
-
step(generator.next(value));
|
|
1051
|
-
}
|
|
1052
|
-
catch (e) {
|
|
1053
|
-
reject(e);
|
|
1054
|
-
} }
|
|
1055
|
-
function rejected(value) { try {
|
|
1056
|
-
step(generator["throw"](value));
|
|
1057
|
-
}
|
|
1058
|
-
catch (e) {
|
|
1059
|
-
reject(e);
|
|
1060
|
-
} }
|
|
1061
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1062
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1063
|
-
});
|
|
1064
|
-
}
|
|
1065
|
-
function __generator(thisArg, body) {
|
|
1066
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
1067
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
1068
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
1069
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
1070
|
-
function step(op) {
|
|
1071
|
-
if (f)
|
|
1072
|
-
throw new TypeError("Generator is already executing.");
|
|
1073
|
-
while (_)
|
|
1074
|
-
try {
|
|
1075
|
-
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)
|
|
1076
|
-
return t;
|
|
1077
|
-
if (y = 0, t)
|
|
1078
|
-
op = [op[0] & 2, t.value];
|
|
1079
|
-
switch (op[0]) {
|
|
1080
|
-
case 0:
|
|
1081
|
-
case 1:
|
|
1082
|
-
t = op;
|
|
1083
|
-
break;
|
|
1084
|
-
case 4:
|
|
1085
|
-
_.label++;
|
|
1086
|
-
return { value: op[1], done: false };
|
|
1087
|
-
case 5:
|
|
1088
|
-
_.label++;
|
|
1089
|
-
y = op[1];
|
|
1090
|
-
op = [0];
|
|
1091
|
-
continue;
|
|
1092
|
-
case 7:
|
|
1093
|
-
op = _.ops.pop();
|
|
1094
|
-
_.trys.pop();
|
|
1095
|
-
continue;
|
|
1096
|
-
default:
|
|
1097
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
1098
|
-
_ = 0;
|
|
1099
|
-
continue;
|
|
1100
|
-
}
|
|
1101
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
1102
|
-
_.label = op[1];
|
|
1103
|
-
break;
|
|
1104
|
-
}
|
|
1105
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
1106
|
-
_.label = t[1];
|
|
1107
|
-
t = op;
|
|
1108
|
-
break;
|
|
1109
|
-
}
|
|
1110
|
-
if (t && _.label < t[2]) {
|
|
1111
|
-
_.label = t[2];
|
|
1112
|
-
_.ops.push(op);
|
|
1113
|
-
break;
|
|
1114
|
-
}
|
|
1115
|
-
if (t[2])
|
|
1116
|
-
_.ops.pop();
|
|
1117
|
-
_.trys.pop();
|
|
1118
|
-
continue;
|
|
1119
|
-
}
|
|
1120
|
-
op = body.call(thisArg, _);
|
|
1121
|
-
}
|
|
1122
|
-
catch (e) {
|
|
1123
|
-
op = [6, e];
|
|
1124
|
-
y = 0;
|
|
1125
|
-
}
|
|
1126
|
-
finally {
|
|
1127
|
-
f = t = 0;
|
|
1128
|
-
}
|
|
1129
|
-
if (op[0] & 5)
|
|
1130
|
-
throw op[1];
|
|
1131
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
1132
|
-
}
|
|
1133
|
-
}
|
|
1134
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
1135
|
-
if (k2 === undefined)
|
|
1136
|
-
k2 = k;
|
|
1137
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
1138
|
-
}) : (function (o, m, k, k2) {
|
|
1139
|
-
if (k2 === undefined)
|
|
1140
|
-
k2 = k;
|
|
1141
|
-
o[k2] = m[k];
|
|
1142
|
-
});
|
|
1143
|
-
function __exportStar(m, o) {
|
|
1144
|
-
for (var p in m)
|
|
1145
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
1146
|
-
__createBinding(o, m, p);
|
|
1147
|
-
}
|
|
1148
|
-
function __values(o) {
|
|
1149
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1150
|
-
if (m)
|
|
1151
|
-
return m.call(o);
|
|
1152
|
-
if (o && typeof o.length === "number")
|
|
1153
|
-
return {
|
|
1154
|
-
next: function () {
|
|
1155
|
-
if (o && i >= o.length)
|
|
1156
|
-
o = void 0;
|
|
1157
|
-
return { value: o && o[i++], done: !o };
|
|
1158
|
-
}
|
|
1159
|
-
};
|
|
1160
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1161
|
-
}
|
|
1162
|
-
function __read(o, n) {
|
|
1163
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1164
|
-
if (!m)
|
|
1165
|
-
return o;
|
|
1166
|
-
var i = m.call(o), r, ar = [], e;
|
|
1167
|
-
try {
|
|
1168
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
1169
|
-
ar.push(r.value);
|
|
1170
|
-
}
|
|
1171
|
-
catch (error) {
|
|
1172
|
-
e = { error: error };
|
|
1173
|
-
}
|
|
1174
|
-
finally {
|
|
1175
|
-
try {
|
|
1176
|
-
if (r && !r.done && (m = i["return"]))
|
|
1177
|
-
m.call(i);
|
|
1178
|
-
}
|
|
1179
|
-
finally {
|
|
1180
|
-
if (e)
|
|
1181
|
-
throw e.error;
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
return ar;
|
|
1185
|
-
}
|
|
1186
|
-
/** @deprecated */
|
|
1187
|
-
function __spread() {
|
|
1188
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
1189
|
-
ar = ar.concat(__read(arguments[i]));
|
|
1190
|
-
return ar;
|
|
1191
|
-
}
|
|
1192
|
-
/** @deprecated */
|
|
1193
|
-
function __spreadArrays() {
|
|
1194
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
1195
|
-
s += arguments[i].length;
|
|
1196
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
1197
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
1198
|
-
r[k] = a[j];
|
|
1199
|
-
return r;
|
|
1200
|
-
}
|
|
1201
|
-
function __spreadArray(to, from, pack) {
|
|
1202
|
-
if (pack || arguments.length === 2)
|
|
1203
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1204
|
-
if (ar || !(i in from)) {
|
|
1205
|
-
if (!ar)
|
|
1206
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
1207
|
-
ar[i] = from[i];
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
1211
|
-
}
|
|
1212
|
-
function __await(v) {
|
|
1213
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
1214
|
-
}
|
|
1215
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
1216
|
-
if (!Symbol.asyncIterator)
|
|
1217
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1218
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
1219
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
1220
|
-
function verb(n) { if (g[n])
|
|
1221
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
1222
|
-
function resume(n, v) { try {
|
|
1223
|
-
step(g[n](v));
|
|
1224
|
-
}
|
|
1225
|
-
catch (e) {
|
|
1226
|
-
settle(q[0][3], e);
|
|
1227
|
-
} }
|
|
1228
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
1229
|
-
function fulfill(value) { resume("next", value); }
|
|
1230
|
-
function reject(value) { resume("throw", value); }
|
|
1231
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
1232
|
-
resume(q[0][0], q[0][1]); }
|
|
1233
|
-
}
|
|
1234
|
-
function __asyncDelegator(o) {
|
|
1235
|
-
var i, p;
|
|
1236
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
1237
|
-
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; }
|
|
1238
|
-
}
|
|
1239
|
-
function __asyncValues(o) {
|
|
1240
|
-
if (!Symbol.asyncIterator)
|
|
1241
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1242
|
-
var m = o[Symbol.asyncIterator], i;
|
|
1243
|
-
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);
|
|
1244
|
-
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); }); }; }
|
|
1245
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
1246
|
-
}
|
|
1247
|
-
function __makeTemplateObject(cooked, raw) {
|
|
1248
|
-
if (Object.defineProperty) {
|
|
1249
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
1250
|
-
}
|
|
1251
|
-
else {
|
|
1252
|
-
cooked.raw = raw;
|
|
1253
|
-
}
|
|
1254
|
-
return cooked;
|
|
1255
|
-
}
|
|
1256
|
-
;
|
|
1257
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
1258
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1259
|
-
}) : function (o, v) {
|
|
1260
|
-
o["default"] = v;
|
|
1261
|
-
};
|
|
1262
|
-
function __importStar(mod) {
|
|
1263
|
-
if (mod && mod.__esModule)
|
|
1264
|
-
return mod;
|
|
1265
|
-
var result = {};
|
|
1266
|
-
if (mod != null)
|
|
1267
|
-
for (var k in mod)
|
|
1268
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
1269
|
-
__createBinding(result, mod, k);
|
|
1270
|
-
__setModuleDefault(result, mod);
|
|
1271
|
-
return result;
|
|
1272
|
-
}
|
|
1273
|
-
function __importDefault(mod) {
|
|
1274
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
1275
|
-
}
|
|
1276
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
1277
|
-
if (kind === "a" && !f)
|
|
1278
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
1279
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
1280
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1281
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
1282
|
-
}
|
|
1283
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
1284
|
-
if (kind === "m")
|
|
1285
|
-
throw new TypeError("Private method is not writable");
|
|
1286
|
-
if (kind === "a" && !f)
|
|
1287
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
1288
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
1289
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
1290
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
var WEEKDAYS$1 = ['ن', 'ث', 'ر', 'خ', 'ج', 'س', 'ح'];
|
|
1294
|
-
var MONTHS$1 = [
|
|
1295
|
-
'محرم',
|
|
1296
|
-
'صفر',
|
|
1297
|
-
'ربيع الأول',
|
|
1298
|
-
'ربيع الآخر',
|
|
1299
|
-
'جمادى الأولى',
|
|
1300
|
-
'جمادى الآخرة',
|
|
1301
|
-
'رجب',
|
|
1302
|
-
'شعبان',
|
|
1303
|
-
'رمضان',
|
|
1304
|
-
'شوال',
|
|
1305
|
-
'ذو القعدة',
|
|
1306
|
-
'ذو الحجة',
|
|
1307
|
-
];
|
|
1308
|
-
var IslamicI18n = /** @class */ (function (_super) {
|
|
1309
|
-
__extends(IslamicI18n, _super);
|
|
1310
|
-
function IslamicI18n() {
|
|
1311
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1312
|
-
}
|
|
1313
|
-
IslamicI18n.prototype.getMonthShortName = function (month) {
|
|
1314
|
-
return MONTHS$1[month - 1];
|
|
1315
|
-
};
|
|
1316
|
-
IslamicI18n.prototype.getMonthFullName = function (month) {
|
|
1317
|
-
return MONTHS$1[month - 1];
|
|
1318
|
-
};
|
|
1319
|
-
IslamicI18n.prototype.getWeekdayLabel = function (weekday, width) {
|
|
1320
|
-
return WEEKDAYS$1[weekday - 1];
|
|
1321
|
-
};
|
|
1322
|
-
IslamicI18n.prototype.getDayAriaLabel = function (date) {
|
|
1323
|
-
return date.day + "-" + date.month + "-" + date.year;
|
|
1324
|
-
};
|
|
1325
|
-
return IslamicI18n;
|
|
1326
|
-
}(i2.NgbDatepickerI18n));
|
|
1327
|
-
IslamicI18n.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: IslamicI18n, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1328
|
-
IslamicI18n.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: IslamicI18n });
|
|
1329
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: IslamicI18n, decorators: [{
|
|
1330
|
-
type: i0.Injectable
|
|
1331
|
-
}] });
|
|
1332
|
-
|
|
1333
|
-
var HijriDatepickerComponent = /** @class */ (function (_super) {
|
|
1334
|
-
__extends(HijriDatepickerComponent, _super);
|
|
1335
|
-
function HijriDatepickerComponent() {
|
|
1336
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1337
|
-
}
|
|
1338
|
-
return HijriDatepickerComponent;
|
|
1339
|
-
}(DatepickerComponent));
|
|
1340
|
-
HijriDatepickerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: HijriDatepickerComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1341
|
-
HijriDatepickerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: HijriDatepickerComponent, selector: "ipa-hijri-datepicker", providers: [
|
|
1342
|
-
{ provide: i2.NgbCalendar, useClass: i2.NgbCalendarIslamicUmalqura },
|
|
1343
|
-
{ provide: i2.NgbDatepickerI18n, useClass: IslamicI18n },
|
|
1344
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"form-floating input-group {{containerClasses}}\">\r\n <input id=\"{{id}}\"\r\n [ngClass]=\"{'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg,'is-valid is-valid:focus': (controlDir.control?.valid && (controlDir.control?.dirty || controlDir.control?.touched) && (errorMsg || controlDir.value))}\"\r\n class=\"form-control {{classes}}\" [formControl]=\"formControl\" [firstDayOfWeek]=\"7\" ngbDatepicker\r\n #d=\"ngbDatepicker\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [footerTemplate]=\"footerTemplate\"\r\n [required]=\"required\" style=\"outline: unset; z-index: unset !important;\" autocomplete=\"off\" (blur)=\"onTouched()\" title=\"{{label}}\">\r\n <label for=\"{{id}}\">{{label}}</label>\r\n <span class=\"input-group-text calenderBtn\" (click)=\"d.toggle()\">\r\n <i class=\"far fa-calendar-alt fa-lg\"></i>\r\n </span>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n <ng-template #footerTemplate style=\"text-align: center;\">\r\n <hr>\r\n <button type=\"button\" class=\"btn btn-primary btn-sm m-2 \" style=\"width: auto; float: right;\"\r\n (click)=\"formControl.patchValue(today);d.navigateTo(today);\">\u0627\u0644\u064A\u0648\u0645</button>\r\n <button type=\"button\" class=\"btn btn-secondary btn-sm m-2\" style=\"width: auto; float: left;\"\r\n (click)=\"formControl.patchValue(null);d.close()\">\u0645\u0633\u062D</button>\r\n </ng-template>\r\n</div>", styles: [".calenderBtn{cursor:pointer;background-color:transparent;color:#6c757d;border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.calenderBtn:hover{color:#fff;background-color:#6c757d;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}\n"], directives: [{ type: i2__namespace.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i2__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1345
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: HijriDatepickerComponent, decorators: [{
|
|
1346
|
-
type: i0.Component,
|
|
1347
|
-
args: [{
|
|
1348
|
-
selector: 'ipa-hijri-datepicker',
|
|
1349
|
-
templateUrl: '../datepicker.component.html',
|
|
1350
|
-
styleUrls: ['../datepicker.component.scss'],
|
|
1351
|
-
providers: [
|
|
1352
|
-
{ provide: i2.NgbCalendar, useClass: i2.NgbCalendarIslamicUmalqura },
|
|
1353
|
-
{ provide: i2.NgbDatepickerI18n, useClass: IslamicI18n },
|
|
1354
|
-
],
|
|
1355
|
-
}]
|
|
1356
|
-
}] });
|
|
1357
|
-
|
|
1358
|
-
var WEEKDAYS = ['ن', 'ث', 'ر', 'خ', 'ج', 'س', 'ح'];
|
|
1359
|
-
var MONTHS = [
|
|
1360
|
-
'يناير',
|
|
1361
|
-
'فبراير',
|
|
1362
|
-
'مارس',
|
|
1363
|
-
'أبريل',
|
|
1364
|
-
'مايو',
|
|
1365
|
-
'يونيو',
|
|
1366
|
-
'يوليو',
|
|
1367
|
-
'اغسطس',
|
|
1368
|
-
'سبتمبر',
|
|
1369
|
-
'أكتوبر',
|
|
1370
|
-
'نوفمبر',
|
|
1371
|
-
'ديسمبر',
|
|
1372
|
-
];
|
|
1373
|
-
var Gregorian18n = /** @class */ (function (_super) {
|
|
1374
|
-
__extends(Gregorian18n, _super);
|
|
1375
|
-
function Gregorian18n() {
|
|
1376
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1377
|
-
}
|
|
1378
|
-
Gregorian18n.prototype.getMonthShortName = function (month) {
|
|
1379
|
-
return MONTHS[month - 1];
|
|
1380
|
-
};
|
|
1381
|
-
Gregorian18n.prototype.getMonthFullName = function (month) {
|
|
1382
|
-
return MONTHS[month - 1];
|
|
1383
|
-
};
|
|
1384
|
-
Gregorian18n.prototype.getWeekdayLabel = function (weekday, width) {
|
|
1385
|
-
return WEEKDAYS[weekday - 1];
|
|
1386
|
-
};
|
|
1387
|
-
Gregorian18n.prototype.getDayAriaLabel = function (date) {
|
|
1388
|
-
return date.day + "-" + date.month + "-" + date.year;
|
|
1389
|
-
};
|
|
1390
|
-
return Gregorian18n;
|
|
1391
|
-
}(i2.NgbDatepickerI18n));
|
|
1392
|
-
Gregorian18n.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: Gregorian18n, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1393
|
-
Gregorian18n.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: Gregorian18n });
|
|
1394
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: Gregorian18n, decorators: [{
|
|
1395
|
-
type: i0.Injectable
|
|
1396
|
-
}] });
|
|
1397
|
-
|
|
1398
|
-
var GregorianDatepickerComponent = /** @class */ (function (_super) {
|
|
1399
|
-
__extends(GregorianDatepickerComponent, _super);
|
|
1400
|
-
function GregorianDatepickerComponent() {
|
|
1401
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1402
|
-
}
|
|
1403
|
-
return GregorianDatepickerComponent;
|
|
1404
|
-
}(DatepickerComponent));
|
|
1405
|
-
GregorianDatepickerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: GregorianDatepickerComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1406
|
-
GregorianDatepickerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: GregorianDatepickerComponent, selector: "ipa-gregorian-datepicker", providers: [
|
|
1407
|
-
{ provide: i2.NgbCalendar, useClass: i2.NgbCalendarGregorian },
|
|
1408
|
-
{ provide: i2.NgbDatepickerI18n, useClass: Gregorian18n },
|
|
1409
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"form-floating input-group {{containerClasses}}\">\r\n <input id=\"{{id}}\"\r\n [ngClass]=\"{'is-invalid is-invalid:focus': (controlDir.control?.invalid && (controlDir.control?.dirty || controlDir.control?.touched)) && errorMsg,'is-valid is-valid:focus': (controlDir.control?.valid && (controlDir.control?.dirty || controlDir.control?.touched) && (errorMsg || controlDir.value))}\"\r\n class=\"form-control {{classes}}\" [formControl]=\"formControl\" [firstDayOfWeek]=\"7\" ngbDatepicker\r\n #d=\"ngbDatepicker\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [footerTemplate]=\"footerTemplate\"\r\n [required]=\"required\" style=\"outline: unset; z-index: unset !important;\" autocomplete=\"off\" (blur)=\"onTouched()\" title=\"{{label}}\">\r\n <label for=\"{{id}}\">{{label}}</label>\r\n <span class=\"input-group-text calenderBtn\" (click)=\"d.toggle()\">\r\n <i class=\"far fa-calendar-alt fa-lg\"></i>\r\n </span>\r\n <div class=\"invalid-feedback\" *ngIf=\"errorMessage !== null\">\r\n {{errorMsg}}\r\n </div>\r\n <ng-template #footerTemplate style=\"text-align: center;\">\r\n <hr>\r\n <button type=\"button\" class=\"btn btn-primary btn-sm m-2 \" style=\"width: auto; float: right;\"\r\n (click)=\"formControl.patchValue(today);d.navigateTo(today);\">\u0627\u0644\u064A\u0648\u0645</button>\r\n <button type=\"button\" class=\"btn btn-secondary btn-sm m-2\" style=\"width: auto; float: left;\"\r\n (click)=\"formControl.patchValue(null);d.close()\">\u0645\u0633\u062D</button>\r\n </ng-template>\r\n</div>", styles: [".calenderBtn{cursor:pointer;background-color:transparent;color:#6c757d;border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.calenderBtn:hover{color:#fff;background-color:#6c757d;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}\n"], directives: [{ type: i2__namespace.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i2__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1410
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: GregorianDatepickerComponent, decorators: [{
|
|
1411
|
-
type: i0.Component,
|
|
1412
|
-
args: [{
|
|
1413
|
-
selector: 'ipa-gregorian-datepicker',
|
|
1414
|
-
templateUrl: '../datepicker.component.html',
|
|
1415
|
-
styleUrls: ['../datepicker.component.scss'],
|
|
1416
|
-
providers: [
|
|
1417
|
-
{ provide: i2.NgbCalendar, useClass: i2.NgbCalendarGregorian },
|
|
1418
|
-
{ provide: i2.NgbDatepickerI18n, useClass: Gregorian18n },
|
|
1419
|
-
],
|
|
1420
|
-
}]
|
|
1421
|
-
}] });
|
|
1422
|
-
|
|
1423
|
-
var ShareButtonComponent = /** @class */ (function () {
|
|
1424
|
-
function ShareButtonComponent() {
|
|
1425
|
-
this.title = '';
|
|
1426
|
-
this.description = '';
|
|
1427
|
-
this.btnLabel = '';
|
|
1428
|
-
}
|
|
1429
|
-
ShareButtonComponent.prototype.ngAfterViewInit = function () {
|
|
1430
|
-
var elements = document.getElementsByClassName('sb-show-icon');
|
|
1431
|
-
elements[0].setAttribute('type', 'button');
|
|
1432
|
-
elements[0].setAttribute('id', 'IPAShareBtn');
|
|
1433
|
-
var label = document.createElement('label');
|
|
1434
|
-
label.innerHTML = this.btnLabel;
|
|
1435
|
-
label.classList.add('sm-share-title');
|
|
1436
|
-
label.classList.add('me-1');
|
|
1437
|
-
elements[0].before(label);
|
|
1438
|
-
};
|
|
1439
|
-
return ShareButtonComponent;
|
|
1440
|
-
}());
|
|
1441
|
-
ShareButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ShareButtonComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1442
|
-
ShareButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: ShareButtonComponent, selector: "ipa-share-button", inputs: { title: "title", description: "description", btnLabel: "btnLabel" }, ngImport: i0__namespace, template: "<share-popup-button [title]=\"title\" [description]=\"description\" [icon]=\"'share-alt'\"\r\n [include]=\"['facebook','twitter','linkedin','telegram','whatsapp','email','copy']\">\r\n</share-popup-button>", styles: [""], components: [{ type: i1__namespace$1.SharePopupComponent, selector: "share-popup-button", inputs: ["theme", "icon", "text", "include", "exclude", "closeIcon", "url", "title", "description", "image", "tags", "autoSetMeta", "show", "showIcon", "showText", "disabled", "hasBackdrop", "backdropClass"], outputs: ["opened", "closed", "popupClosed"] }] });
|
|
1443
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ShareButtonComponent, decorators: [{
|
|
1444
|
-
type: i0.Component,
|
|
1445
|
-
args: [{
|
|
1446
|
-
selector: 'ipa-share-button',
|
|
1447
|
-
templateUrl: './share-button.component.html',
|
|
1448
|
-
styleUrls: ['./share-button.component.scss'],
|
|
1449
|
-
}]
|
|
1450
|
-
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
1451
|
-
type: i0.Input
|
|
1452
|
-
}], description: [{
|
|
1453
|
-
type: i0.Input
|
|
1454
|
-
}], btnLabel: [{
|
|
1455
|
-
type: i0.Input
|
|
1456
|
-
}] } });
|
|
1457
|
-
|
|
1458
|
-
var ShareButtonModule = /** @class */ (function () {
|
|
1459
|
-
function ShareButtonModule(library) {
|
|
1460
|
-
library.addIconPacks(freeSolidSvgIcons.fas);
|
|
1461
|
-
}
|
|
1462
|
-
return ShareButtonModule;
|
|
1463
|
-
}());
|
|
1464
|
-
ShareButtonModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ShareButtonModule, deps: [{ token: i1__namespace$2.FaIconLibrary }], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1465
|
-
ShareButtonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ShareButtonModule, declarations: [ShareButtonComponent], imports: [icons.ShareIconsModule,
|
|
1466
|
-
i1$1.ShareButtonsPopupModule,
|
|
1467
|
-
overlay.OverlayModule,
|
|
1468
|
-
i1$2.FontAwesomeModule], exports: [ShareButtonComponent,
|
|
1469
|
-
icons.ShareIconsModule,
|
|
1470
|
-
i1$1.ShareButtonsPopupModule,
|
|
1471
|
-
overlay.OverlayModule,
|
|
1472
|
-
i1$2.FontAwesomeModule] });
|
|
1473
|
-
ShareButtonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ShareButtonModule, imports: [[
|
|
1474
|
-
icons.ShareIconsModule,
|
|
1475
|
-
i1$1.ShareButtonsPopupModule,
|
|
1476
|
-
overlay.OverlayModule,
|
|
1477
|
-
i1$2.FontAwesomeModule,
|
|
1478
|
-
], icons.ShareIconsModule,
|
|
1479
|
-
i1$1.ShareButtonsPopupModule,
|
|
1480
|
-
overlay.OverlayModule,
|
|
1481
|
-
i1$2.FontAwesomeModule] });
|
|
1482
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ShareButtonModule, decorators: [{
|
|
1483
|
-
type: i0.NgModule,
|
|
1484
|
-
args: [{
|
|
1485
|
-
declarations: [ShareButtonComponent],
|
|
1486
|
-
imports: [
|
|
1487
|
-
icons.ShareIconsModule,
|
|
1488
|
-
i1$1.ShareButtonsPopupModule,
|
|
1489
|
-
overlay.OverlayModule,
|
|
1490
|
-
i1$2.FontAwesomeModule,
|
|
1491
|
-
],
|
|
1492
|
-
exports: [
|
|
1493
|
-
ShareButtonComponent,
|
|
1494
|
-
icons.ShareIconsModule,
|
|
1495
|
-
i1$1.ShareButtonsPopupModule,
|
|
1496
|
-
overlay.OverlayModule,
|
|
1497
|
-
i1$2.FontAwesomeModule,
|
|
1498
|
-
]
|
|
1499
|
-
}]
|
|
1500
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$2.FaIconLibrary }]; } });
|
|
1501
|
-
|
|
1502
|
-
var NgIPALibraryModule = /** @class */ (function () {
|
|
1503
|
-
function NgIPALibraryModule() {
|
|
1504
|
-
}
|
|
1505
|
-
return NgIPALibraryModule;
|
|
1506
|
-
}());
|
|
1507
|
-
NgIPALibraryModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: NgIPALibraryModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1508
|
-
NgIPALibraryModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: NgIPALibraryModule, declarations: [TextInputComponent,
|
|
1509
|
-
TextareaInputComponent,
|
|
1510
|
-
DropdownInputComponent,
|
|
1511
|
-
LoaderComponent,
|
|
1512
|
-
GenerateFormComponent,
|
|
1513
|
-
FileUploadComponent,
|
|
1514
|
-
DatepickerComponent,
|
|
1515
|
-
HijriDatepickerComponent,
|
|
1516
|
-
GregorianDatepickerComponent,
|
|
1517
|
-
RecaptchaComponent], imports: [i3$1.CommonModule,
|
|
1518
|
-
i2$1.FormsModule,
|
|
1519
|
-
i2$1.ReactiveFormsModule,
|
|
1520
|
-
i1.ToastrModule,
|
|
1521
|
-
i2$2.DropzoneModule,
|
|
1522
|
-
i2$3.NgxCaptchaModule,
|
|
1523
|
-
PipesModule,
|
|
1524
|
-
i2.NgbDatepickerModule,
|
|
1525
|
-
ShareButtonModule,
|
|
1526
|
-
i3.NgSelectModule], exports: [TextInputComponent,
|
|
1527
|
-
TextareaInputComponent,
|
|
1528
|
-
DropdownInputComponent,
|
|
1529
|
-
LoaderComponent,
|
|
1530
|
-
GenerateFormComponent,
|
|
1531
|
-
FileUploadComponent,
|
|
1532
|
-
PipesModule,
|
|
1533
|
-
HijriDatepickerComponent,
|
|
1534
|
-
GregorianDatepickerComponent,
|
|
1535
|
-
ShareButtonModule,
|
|
1536
|
-
RecaptchaComponent] });
|
|
1537
|
-
NgIPALibraryModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: NgIPALibraryModule, imports: [[
|
|
1538
|
-
i3$1.CommonModule,
|
|
1539
|
-
i2$1.FormsModule,
|
|
1540
|
-
i2$1.ReactiveFormsModule,
|
|
1541
|
-
i1.ToastrModule,
|
|
1542
|
-
i2$2.DropzoneModule,
|
|
1543
|
-
i2$3.NgxCaptchaModule,
|
|
1544
|
-
PipesModule,
|
|
1545
|
-
i2.NgbDatepickerModule,
|
|
1546
|
-
ShareButtonModule,
|
|
1547
|
-
i3.NgSelectModule,
|
|
1548
|
-
], PipesModule,
|
|
1549
|
-
ShareButtonModule] });
|
|
1550
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: NgIPALibraryModule, decorators: [{
|
|
1551
|
-
type: i0.NgModule,
|
|
1552
|
-
args: [{
|
|
1553
|
-
declarations: [
|
|
1554
|
-
TextInputComponent,
|
|
1555
|
-
TextareaInputComponent,
|
|
1556
|
-
DropdownInputComponent,
|
|
1557
|
-
LoaderComponent,
|
|
1558
|
-
GenerateFormComponent,
|
|
1559
|
-
FileUploadComponent,
|
|
1560
|
-
DatepickerComponent,
|
|
1561
|
-
HijriDatepickerComponent,
|
|
1562
|
-
GregorianDatepickerComponent,
|
|
1563
|
-
RecaptchaComponent,
|
|
1564
|
-
],
|
|
1565
|
-
imports: [
|
|
1566
|
-
i3$1.CommonModule,
|
|
1567
|
-
i2$1.FormsModule,
|
|
1568
|
-
i2$1.ReactiveFormsModule,
|
|
1569
|
-
i1.ToastrModule,
|
|
1570
|
-
i2$2.DropzoneModule,
|
|
1571
|
-
i2$3.NgxCaptchaModule,
|
|
1572
|
-
PipesModule,
|
|
1573
|
-
i2.NgbDatepickerModule,
|
|
1574
|
-
ShareButtonModule,
|
|
1575
|
-
i3.NgSelectModule,
|
|
1576
|
-
],
|
|
1577
|
-
exports: [
|
|
1578
|
-
TextInputComponent,
|
|
1579
|
-
TextareaInputComponent,
|
|
1580
|
-
DropdownInputComponent,
|
|
1581
|
-
LoaderComponent,
|
|
1582
|
-
GenerateFormComponent,
|
|
1583
|
-
FileUploadComponent,
|
|
1584
|
-
PipesModule,
|
|
1585
|
-
HijriDatepickerComponent,
|
|
1586
|
-
GregorianDatepickerComponent,
|
|
1587
|
-
ShareButtonModule,
|
|
1588
|
-
RecaptchaComponent,
|
|
1589
|
-
],
|
|
1590
|
-
}]
|
|
1591
|
-
}] });
|
|
1592
|
-
|
|
1593
|
-
var LoadingInterceptor = /** @class */ (function () {
|
|
1594
|
-
function LoadingInterceptor(loaderService) {
|
|
1595
|
-
this.loaderService = loaderService;
|
|
1596
|
-
this.requests = [];
|
|
1597
|
-
}
|
|
1598
|
-
LoadingInterceptor.prototype.removeRequest = function (req) {
|
|
1599
|
-
var i = this.requests.indexOf(req);
|
|
1600
|
-
if (i >= 0) {
|
|
1601
|
-
this.requests.splice(i, 1);
|
|
1602
|
-
}
|
|
1603
|
-
this.loaderService.isLoading.next(this.requests.length > 0);
|
|
1604
|
-
};
|
|
1605
|
-
LoadingInterceptor.prototype.intercept = function (req, next) {
|
|
1606
|
-
var _this = this;
|
|
1607
|
-
if (this.isException(req)) {
|
|
1608
|
-
return next.handle(req);
|
|
1609
|
-
}
|
|
1610
|
-
this.requests.push(req);
|
|
1611
|
-
this.loaderService.isLoading.next(true);
|
|
1612
|
-
return new rxjs.Observable(function (observer) {
|
|
1613
|
-
var subscription = next.handle(req).subscribe(function (event) {
|
|
1614
|
-
if (event instanceof i2$4.HttpResponse) {
|
|
1615
|
-
_this.removeRequest(req);
|
|
1616
|
-
observer.next(event);
|
|
1617
|
-
}
|
|
1618
|
-
}, function (err) {
|
|
1619
|
-
_this.removeRequest(req);
|
|
1620
|
-
observer.error(err);
|
|
1621
|
-
}, function () {
|
|
1622
|
-
_this.removeRequest(req);
|
|
1623
|
-
observer.complete();
|
|
1624
|
-
});
|
|
1625
|
-
// remove request from queue when cancelled
|
|
1626
|
-
return function () {
|
|
1627
|
-
_this.removeRequest(req);
|
|
1628
|
-
subscription.unsubscribe();
|
|
1629
|
-
};
|
|
1630
|
-
});
|
|
1631
|
-
};
|
|
1632
|
-
LoadingInterceptor.prototype.isException = function (req) {
|
|
1633
|
-
var e_1, _a;
|
|
1634
|
-
try {
|
|
1635
|
-
for (var _b = __values(this.loaderService.urls), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1636
|
-
var url = _c.value;
|
|
1637
|
-
if (req.url.includes(url.path) && req.method === url.method) {
|
|
1638
|
-
return true;
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1643
|
-
finally {
|
|
1644
|
-
try {
|
|
1645
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1646
|
-
}
|
|
1647
|
-
finally { if (e_1) throw e_1.error; }
|
|
1648
|
-
}
|
|
1649
|
-
return false;
|
|
1650
|
-
};
|
|
1651
|
-
return LoadingInterceptor;
|
|
1652
|
-
}());
|
|
1653
|
-
LoadingInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: LoadingInterceptor, deps: [{ token: LoaderService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1654
|
-
LoadingInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: LoadingInterceptor });
|
|
1655
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: LoadingInterceptor, decorators: [{
|
|
1656
|
-
type: i0.Injectable
|
|
1657
|
-
}], ctorParameters: function () { return [{ type: LoaderService }]; } });
|
|
1658
|
-
|
|
1659
|
-
var ErrorService = /** @class */ (function () {
|
|
1660
|
-
function ErrorService() {
|
|
1661
|
-
this.urls = [];
|
|
1662
|
-
}
|
|
1663
|
-
ErrorService.prototype.setExceptionUrls = function (urls) {
|
|
1664
|
-
this.urls = urls;
|
|
1665
|
-
};
|
|
1666
|
-
ErrorService.prototype.addExceptionUrl = function (url) {
|
|
1667
|
-
this.urls.push(url);
|
|
1668
|
-
};
|
|
1669
|
-
return ErrorService;
|
|
1670
|
-
}());
|
|
1671
|
-
ErrorService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ErrorService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1672
|
-
ErrorService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ErrorService, providedIn: 'root' });
|
|
1673
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ErrorService, decorators: [{
|
|
1674
|
-
type: i0.Injectable,
|
|
1675
|
-
args: [{
|
|
1676
|
-
providedIn: 'root'
|
|
1677
|
-
}]
|
|
1678
|
-
}], ctorParameters: function () { return []; } });
|
|
1679
|
-
|
|
1680
|
-
var ErrorInterceptor = /** @class */ (function () {
|
|
1681
|
-
function ErrorInterceptor(errorService, toastrService) {
|
|
1682
|
-
this.errorService = errorService;
|
|
1683
|
-
this.toastrService = toastrService;
|
|
1684
|
-
}
|
|
1685
|
-
ErrorInterceptor.prototype.intercept = function (req, next) {
|
|
1686
|
-
var _this = this;
|
|
1687
|
-
if (this.isException(req)) {
|
|
1688
|
-
return next.handle(req);
|
|
1689
|
-
}
|
|
1690
|
-
return next.handle(req).pipe(operators.catchError(function (error) {
|
|
1691
|
-
var response = error.error;
|
|
1692
|
-
var toastrConfig = {
|
|
1693
|
-
disableTimeOut: true,
|
|
1694
|
-
};
|
|
1695
|
-
switch (response.statusCode) {
|
|
1696
|
-
case 500:
|
|
1697
|
-
_this.toastrService.error((response === null || response === void 0 ? void 0 : response.innerException) + ' ' + (response === null || response === void 0 ? void 0 : response.stackTrace), response.message, toastrConfig);
|
|
1698
|
-
break;
|
|
1699
|
-
default:
|
|
1700
|
-
_this.toastrService.error(response.message, '', toastrConfig);
|
|
1701
|
-
break;
|
|
1702
|
-
}
|
|
1703
|
-
return rxjs.throwError(error);
|
|
1704
|
-
}));
|
|
1705
|
-
};
|
|
1706
|
-
ErrorInterceptor.prototype.isException = function (req) {
|
|
1707
|
-
var e_1, _a;
|
|
1708
|
-
try {
|
|
1709
|
-
for (var _b = __values(this.errorService.urls), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1710
|
-
var url = _c.value;
|
|
1711
|
-
if (req.url.includes(url.path) && req.method === url.method) {
|
|
1712
|
-
return true;
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
}
|
|
1716
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1717
|
-
finally {
|
|
1718
|
-
try {
|
|
1719
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1720
|
-
}
|
|
1721
|
-
finally { if (e_1) throw e_1.error; }
|
|
1722
|
-
}
|
|
1723
|
-
return false;
|
|
1724
|
-
};
|
|
1725
|
-
return ErrorInterceptor;
|
|
1726
|
-
}());
|
|
1727
|
-
ErrorInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ErrorInterceptor, deps: [{ token: ErrorService }, { token: i1__namespace.ToastrService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1728
|
-
ErrorInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ErrorInterceptor });
|
|
1729
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: ErrorInterceptor, decorators: [{
|
|
1730
|
-
type: i0.Injectable
|
|
1731
|
-
}], ctorParameters: function () { return [{ type: ErrorService }, { type: i1__namespace.ToastrService }]; } });
|
|
1732
|
-
|
|
1733
|
-
var AuthService = /** @class */ (function () {
|
|
1734
|
-
function AuthService() {
|
|
1735
|
-
this.currentUser = new rxjs.BehaviorSubject({ exp: 0 });
|
|
1736
|
-
this.currentUserUrl = '';
|
|
1737
|
-
}
|
|
1738
|
-
AuthService.prototype.getToken = function () {
|
|
1739
|
-
var _a;
|
|
1740
|
-
return (_a = localStorage.getItem('token')) !== null && _a !== void 0 ? _a : '';
|
|
1741
|
-
};
|
|
1742
|
-
AuthService.prototype.getDecodedToken = function () {
|
|
1743
|
-
return this.decodeJwt(this.getToken());
|
|
1744
|
-
};
|
|
1745
|
-
AuthService.prototype.setCurrentUser = function () {
|
|
1746
|
-
var decodedToken = this.getDecodedToken();
|
|
1747
|
-
this.currentUser.next({
|
|
1748
|
-
nameid: decodedToken.nameid,
|
|
1749
|
-
email: decodedToken.email,
|
|
1750
|
-
given_name: decodedToken.given_name,
|
|
1751
|
-
exp: decodedToken.exp,
|
|
1752
|
-
});
|
|
1753
|
-
};
|
|
1754
|
-
AuthService.prototype.setCurrentUserUrl = function (url) {
|
|
1755
|
-
this.currentUserUrl = url;
|
|
1756
|
-
};
|
|
1757
|
-
AuthService.prototype.decodeJwt = function (token) {
|
|
1758
|
-
var base64Url = token.split('.')[1];
|
|
1759
|
-
var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
|
|
1760
|
-
var jsonPayload = decodeURIComponent(atob(base64)
|
|
1761
|
-
.split('')
|
|
1762
|
-
.map(function (c) {
|
|
1763
|
-
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
|
1764
|
-
})
|
|
1765
|
-
.join(''));
|
|
1766
|
-
return JSON.parse(jsonPayload);
|
|
1767
|
-
};
|
|
1768
|
-
return AuthService;
|
|
1769
|
-
}());
|
|
1770
|
-
AuthService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: AuthService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1771
|
-
AuthService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: AuthService, providedIn: 'root' });
|
|
1772
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: AuthService, decorators: [{
|
|
1773
|
-
type: i0.Injectable,
|
|
1774
|
-
args: [{
|
|
1775
|
-
providedIn: 'root',
|
|
1776
|
-
}]
|
|
1777
|
-
}], ctorParameters: function () { return []; } });
|
|
1778
|
-
|
|
1779
|
-
var TokenInterceptor = /** @class */ (function () {
|
|
1780
|
-
function TokenInterceptor(authService, http) {
|
|
1781
|
-
this.authService = authService;
|
|
1782
|
-
this.http = http;
|
|
1783
|
-
this.refresh = true;
|
|
1784
|
-
}
|
|
1785
|
-
TokenInterceptor.prototype.intercept = function (request, next) {
|
|
1786
|
-
if (this.isException(request)) {
|
|
1787
|
-
return next.handle(request);
|
|
1788
|
-
}
|
|
1789
|
-
var token = this.authService.getToken();
|
|
1790
|
-
if (token) {
|
|
1791
|
-
this.isTokenExpired(token);
|
|
1792
|
-
request = request.clone({
|
|
1793
|
-
setHeaders: {
|
|
1794
|
-
Authorization: "Bearer " + token,
|
|
1795
|
-
},
|
|
1796
|
-
});
|
|
1797
|
-
}
|
|
1798
|
-
return next.handle(request);
|
|
1799
|
-
};
|
|
1800
|
-
TokenInterceptor.prototype.isTokenExpired = function (token) {
|
|
1801
|
-
var _this = this;
|
|
1802
|
-
var _a;
|
|
1803
|
-
var redirectPath = location.pathname;
|
|
1804
|
-
var decodedToken = this.authService.getDecodedToken();
|
|
1805
|
-
var expDate = new Date(((_a = decodedToken.exp) !== null && _a !== void 0 ? _a : 0) * 1000);
|
|
1806
|
-
if (expDate < new Date()) {
|
|
1807
|
-
location.replace('/ar/login?redirect=' + redirectPath);
|
|
1808
|
-
return;
|
|
1809
|
-
}
|
|
1810
|
-
else {
|
|
1811
|
-
if (this.authService.currentUserUrl) {
|
|
1812
|
-
if (this.refresh) {
|
|
1813
|
-
this.http
|
|
1814
|
-
.get(this.authService.currentUserUrl + "/api/users?refresh", {
|
|
1815
|
-
headers: { Authorization: "Bearer " + token },
|
|
1816
|
-
})
|
|
1817
|
-
.subscribe(function (user) {
|
|
1818
|
-
localStorage.setItem('token', user.token);
|
|
1819
|
-
_this.refresh = false;
|
|
1820
|
-
setTimeout(function () {
|
|
1821
|
-
_this.refresh = true;
|
|
1822
|
-
}, 60 * 1000);
|
|
1823
|
-
});
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
else {
|
|
1827
|
-
throw new Error("provide current base user api url using this function authService.setCurrentUserUrl('https://...')");
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
};
|
|
1831
|
-
TokenInterceptor.prototype.isException = function (request) {
|
|
1832
|
-
if (request.url.includes('/api/users?refresh') &&
|
|
1833
|
-
request.method === 'GET') {
|
|
1834
|
-
return true;
|
|
1835
|
-
}
|
|
1836
|
-
return false;
|
|
1837
|
-
};
|
|
1838
|
-
return TokenInterceptor;
|
|
1839
|
-
}());
|
|
1840
|
-
TokenInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: TokenInterceptor, deps: [{ token: AuthService }, { token: i2__namespace$4.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1841
|
-
TokenInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: TokenInterceptor });
|
|
1842
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: TokenInterceptor, decorators: [{
|
|
1843
|
-
type: i0.Injectable
|
|
1844
|
-
}], ctorParameters: function () { return [{ type: AuthService }, { type: i2__namespace$4.HttpClient }]; } });
|
|
1845
|
-
|
|
1846
|
-
var BreadcrumbsService = /** @class */ (function () {
|
|
1847
|
-
function BreadcrumbsService() {
|
|
1848
|
-
}
|
|
1849
|
-
BreadcrumbsService.prototype.setPageTitle = function (text) {
|
|
1850
|
-
var titleEl = document.querySelector('.sub-section-title');
|
|
1851
|
-
if (titleEl) {
|
|
1852
|
-
titleEl.textContent = text;
|
|
1853
|
-
}
|
|
1854
|
-
};
|
|
1855
|
-
BreadcrumbsService.prototype.setMainPageTitle = function (text, url) {
|
|
1856
|
-
var div = document.getElementsByClassName('main-section-title');
|
|
1857
|
-
if (div && div.length > 0) {
|
|
1858
|
-
div[0].innerHTML = "<a id=\"site-url\" href=\"" + url + "\">" + text + "</a>";
|
|
1859
|
-
}
|
|
1860
|
-
};
|
|
1861
|
-
BreadcrumbsService.prototype.addBreadcrumb = function (nodeName, spanClasses, linkClasses) {
|
|
1862
|
-
var _g;
|
|
1863
|
-
if (spanClasses === void 0) { spanClasses = 'bc-current'; }
|
|
1864
|
-
if (linkClasses === void 0) { linkClasses = 'bc-node'; }
|
|
1865
|
-
var _a;
|
|
1866
|
-
var spans = (_a = document.getElementById('ctl00_path')) === null || _a === void 0 ? void 0 : _a.children;
|
|
1867
|
-
//get last child
|
|
1868
|
-
var lastIndex = spans === null || spans === void 0 ? void 0 : spans.item(spans.length - 1);
|
|
1869
|
-
var innerHTML = lastIndex.innerHTML;
|
|
1870
|
-
lastIndex.innerHTML = '';
|
|
1871
|
-
(_g = lastIndex.classList).remove.apply(_g, ['bc-current']);
|
|
1872
|
-
//add new link
|
|
1873
|
-
lastIndex.appendChild(this.createLink(innerHTML, location.pathname, linkClasses));
|
|
1874
|
-
//add new span and empty span
|
|
1875
|
-
var newSpan = this.createSpan(nodeName, spanClasses);
|
|
1876
|
-
var emptySpan = document.createElement('span');
|
|
1877
|
-
lastIndex.after.apply(lastIndex, [emptySpan, newSpan]);
|
|
1878
|
-
};
|
|
1879
|
-
BreadcrumbsService.prototype.addBreadcrumbList = function (nodeList, spanClasses, linkClasses) {
|
|
1880
|
-
var _g;
|
|
1881
|
-
if (spanClasses === void 0) { spanClasses = 'bc-current'; }
|
|
1882
|
-
if (linkClasses === void 0) { linkClasses = 'bc-node'; }
|
|
1883
|
-
var _a;
|
|
1884
|
-
var spans = (_a = document.getElementById('ctl00_path')) === null || _a === void 0 ? void 0 : _a.childNodes;
|
|
1885
|
-
//get last child
|
|
1886
|
-
var lastSpan = spans === null || spans === void 0 ? void 0 : spans.item(spans.length - 1);
|
|
1887
|
-
var innerHTML = lastSpan.innerHTML;
|
|
1888
|
-
(_g = lastSpan.classList).remove.apply(_g, [spanClasses]);
|
|
1889
|
-
lastSpan.innerHTML = '';
|
|
1890
|
-
//add new link
|
|
1891
|
-
lastSpan.appendChild(this.createLink(innerHTML, location.pathname, linkClasses));
|
|
1892
|
-
for (var i = 0; i < nodeList.length; i++) {
|
|
1893
|
-
var lastIndex = spans === null || spans === void 0 ? void 0 : spans.item(spans.length - 1);
|
|
1894
|
-
if (nodeList[i].nodeUrl) {
|
|
1895
|
-
var newSpan = document.createElement('span');
|
|
1896
|
-
newSpan.appendChild(this.createLink(nodeList[i].nodeName, nodeList[i].nodeUrl, linkClasses));
|
|
1897
|
-
var emptySpan = document.createElement('span');
|
|
1898
|
-
lastIndex.after.apply(lastIndex, [emptySpan, newSpan]);
|
|
1899
|
-
}
|
|
1900
|
-
else {
|
|
1901
|
-
var newSpan = this.createSpan(nodeList[i].nodeName, spanClasses);
|
|
1902
|
-
var emptySpan = document.createElement('span');
|
|
1903
|
-
lastIndex.after.apply(lastIndex, [emptySpan, newSpan]);
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
};
|
|
1907
|
-
BreadcrumbsService.prototype.createBreadcrumbs = function (nodeList, spanClasses, linkClasses) {
|
|
1908
|
-
if (spanClasses === void 0) { spanClasses = 'bc-current'; }
|
|
1909
|
-
if (linkClasses === void 0) { linkClasses = 'bc-node'; }
|
|
1910
|
-
var currentSpan = document.getElementById('ctl00_path');
|
|
1911
|
-
currentSpan.innerHTML = '';
|
|
1912
|
-
var newSpan = document.createElement('span');
|
|
1913
|
-
currentSpan === null || currentSpan === void 0 ? void 0 : currentSpan.appendChild(newSpan);
|
|
1914
|
-
newSpan.appendChild(this.createLink(nodeList[0].nodeName, nodeList[0].nodeUrl, linkClasses));
|
|
1915
|
-
var spans = currentSpan === null || currentSpan === void 0 ? void 0 : currentSpan.children;
|
|
1916
|
-
for (var i = 1; i < nodeList.length; i++) {
|
|
1917
|
-
var lastIndex = spans === null || spans === void 0 ? void 0 : spans.item(spans.length - 1);
|
|
1918
|
-
if (nodeList[i].nodeUrl) {
|
|
1919
|
-
var newSpan_1 = document.createElement('span');
|
|
1920
|
-
newSpan_1.appendChild(this.createLink(nodeList[i].nodeName, nodeList[i].nodeUrl, linkClasses));
|
|
1921
|
-
var emptySpan = document.createElement('span');
|
|
1922
|
-
lastIndex === null || lastIndex === void 0 ? void 0 : lastIndex.after.apply(lastIndex, [emptySpan, newSpan_1]);
|
|
1923
|
-
}
|
|
1924
|
-
else {
|
|
1925
|
-
var newSpan_2 = this.createSpan(nodeList[i].nodeName, spanClasses);
|
|
1926
|
-
var emptySpan = document.createElement('span');
|
|
1927
|
-
lastIndex.after.apply(lastIndex, [emptySpan, newSpan_2]);
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
};
|
|
1931
|
-
BreadcrumbsService.prototype.removeLastBreadcrumb = function () {
|
|
1932
|
-
var _a, _b, _c;
|
|
1933
|
-
var spans = (_a = document.getElementById('ctl00_path')) === null || _a === void 0 ? void 0 : _a.children;
|
|
1934
|
-
(_b = spans === null || spans === void 0 ? void 0 : spans.item(spans.length - 1)) === null || _b === void 0 ? void 0 : _b.remove();
|
|
1935
|
-
(_c = spans === null || spans === void 0 ? void 0 : spans.item(spans.length - 1)) === null || _c === void 0 ? void 0 : _c.remove();
|
|
1936
|
-
this.setCurrentNode(spans);
|
|
1937
|
-
};
|
|
1938
|
-
BreadcrumbsService.prototype.removeBreadcrumbByNodeName = function (nodeName) {
|
|
1939
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1940
|
-
var spans = (_a = document.getElementById('ctl00_path')) === null || _a === void 0 ? void 0 : _a.children;
|
|
1941
|
-
var index = -1;
|
|
1942
|
-
for (var i = 0; i < spans.length; i++) {
|
|
1943
|
-
var span = spans.item(i);
|
|
1944
|
-
if (((_b = span === null || span === void 0 ? void 0 : span.textContent) === null || _b === void 0 ? void 0 : _b.trim()) === nodeName) {
|
|
1945
|
-
index = i;
|
|
1946
|
-
break;
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
|
-
var lastNode = spans.length - 1 === index;
|
|
1950
|
-
if (index !== -1 && !lastNode) {
|
|
1951
|
-
(_c = spans === null || spans === void 0 ? void 0 : spans.item(index)) === null || _c === void 0 ? void 0 : _c.remove();
|
|
1952
|
-
(_d = spans === null || spans === void 0 ? void 0 : spans.item(index)) === null || _d === void 0 ? void 0 : _d.remove();
|
|
1953
|
-
}
|
|
1954
|
-
else {
|
|
1955
|
-
(_e = spans === null || spans === void 0 ? void 0 : spans.item(index)) === null || _e === void 0 ? void 0 : _e.remove();
|
|
1956
|
-
(_f = spans === null || spans === void 0 ? void 0 : spans.item(index - 1)) === null || _f === void 0 ? void 0 : _f.remove();
|
|
1957
|
-
}
|
|
1958
|
-
if (lastNode) {
|
|
1959
|
-
this.setCurrentNode(spans);
|
|
1960
|
-
}
|
|
1961
|
-
};
|
|
1962
|
-
BreadcrumbsService.prototype.removeLastBreadcrumbsByLength = function (length) {
|
|
1963
|
-
var _a, _b, _c;
|
|
1964
|
-
var spans = (_a = document.getElementById('ctl00_path')) === null || _a === void 0 ? void 0 : _a.children;
|
|
1965
|
-
while (length > 0) {
|
|
1966
|
-
(_b = spans === null || spans === void 0 ? void 0 : spans.item(spans.length - 1)) === null || _b === void 0 ? void 0 : _b.remove();
|
|
1967
|
-
(_c = spans === null || spans === void 0 ? void 0 : spans.item(spans.length - 1)) === null || _c === void 0 ? void 0 : _c.remove();
|
|
1968
|
-
length--;
|
|
1969
|
-
}
|
|
1970
|
-
if (spans.length > 0) {
|
|
1971
|
-
this.setCurrentNode(spans);
|
|
1972
|
-
}
|
|
1973
|
-
};
|
|
1974
|
-
BreadcrumbsService.prototype.createLink = function (innerHTML, href, classes) {
|
|
1975
|
-
var _g;
|
|
1976
|
-
var link = document.createElement('a');
|
|
1977
|
-
link.innerHTML = ' ' + innerHTML;
|
|
1978
|
-
link.href = href !== null && href !== void 0 ? href : '';
|
|
1979
|
-
(_g = link.classList).add.apply(_g, [classes]);
|
|
1980
|
-
return link;
|
|
1981
|
-
};
|
|
1982
|
-
BreadcrumbsService.prototype.createSpan = function (innerHTML, classes) {
|
|
1983
|
-
var _g;
|
|
1984
|
-
var span = document.createElement('span');
|
|
1985
|
-
(_g = span.classList).add.apply(_g, [classes]);
|
|
1986
|
-
span.innerHTML = ' ' + innerHTML;
|
|
1987
|
-
return span;
|
|
1988
|
-
};
|
|
1989
|
-
BreadcrumbsService.prototype.setCurrentNode = function (spans) {
|
|
1990
|
-
var _g;
|
|
1991
|
-
var _a;
|
|
1992
|
-
var lastSpan = spans === null || spans === void 0 ? void 0 : spans.item(spans.length - 1);
|
|
1993
|
-
var lastSpanLink = (_a = spans === null || spans === void 0 ? void 0 : spans.item(spans.length - 1)) === null || _a === void 0 ? void 0 : _a.children.item(0);
|
|
1994
|
-
lastSpan === null || lastSpan === void 0 ? void 0 : (_g = lastSpan.classList).add.apply(_g, ['bc-current']);
|
|
1995
|
-
lastSpan.innerHTML = lastSpanLink.innerHTML;
|
|
1996
|
-
};
|
|
1997
|
-
return BreadcrumbsService;
|
|
1998
|
-
}());
|
|
1999
|
-
BreadcrumbsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: BreadcrumbsService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2000
|
-
BreadcrumbsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: BreadcrumbsService, providedIn: 'root' });
|
|
2001
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: BreadcrumbsService, decorators: [{
|
|
2002
|
-
type: i0.Injectable,
|
|
2003
|
-
args: [{
|
|
2004
|
-
providedIn: 'root',
|
|
2005
|
-
}]
|
|
2006
|
-
}], ctorParameters: function () { return []; } });
|
|
2007
|
-
|
|
2008
|
-
var CommonService = /** @class */ (function () {
|
|
2009
|
-
function CommonService() {
|
|
2010
|
-
}
|
|
2011
|
-
CommonService.prototype.print = function (element, title, classes) {
|
|
2012
|
-
var _a;
|
|
2013
|
-
var styles = this.getElementTag('style');
|
|
2014
|
-
var linkes = this.getElementTag('link');
|
|
2015
|
-
var scripts = this.getElementTag('script');
|
|
2016
|
-
var printContents = (_a = document.getElementById(element)) === null || _a === void 0 ? void 0 : _a.innerHTML;
|
|
2017
|
-
var popupWin = window.open('', '', 'top=0,left=0,height=100%,width=auto');
|
|
2018
|
-
var data = "\n <!DOCTYPE html>\n <head>\n <title> " + title + " </title>\n <meta charset=\"utf-8\">\n " + linkes + "\n " + styles + "\n <style>\n @media print {\n .noPrint{\n display: none !important;\n }\n body {\n direction: rtl;\n }\n }\n </style>\n </head>\n <body class=\"" + classes + "\">\n " + printContents + "\n " + scripts + "\n </body>\n\n </html>";
|
|
2019
|
-
popupWin === null || popupWin === void 0 ? void 0 : popupWin.document.open();
|
|
2020
|
-
popupWin === null || popupWin === void 0 ? void 0 : popupWin.document.write(data);
|
|
2021
|
-
popupWin === null || popupWin === void 0 ? void 0 : popupWin.document.close();
|
|
2022
|
-
popupWin === null || popupWin === void 0 ? void 0 : popupWin.focus();
|
|
2023
|
-
popupWin === null || popupWin === void 0 ? void 0 : popupWin.addEventListener('focus', function () {
|
|
2024
|
-
setTimeout(function () {
|
|
2025
|
-
if (popupWin.document.hasFocus()) {
|
|
2026
|
-
popupWin.print();
|
|
2027
|
-
popupWin.close();
|
|
2028
|
-
}
|
|
2029
|
-
}, 1000);
|
|
2030
|
-
});
|
|
2031
|
-
};
|
|
2032
|
-
CommonService.prototype.getElementTag = function (tag) {
|
|
2033
|
-
var html = [];
|
|
2034
|
-
var elements = document.getElementsByTagName(tag);
|
|
2035
|
-
for (var index = 0; index < elements.length; index++) {
|
|
2036
|
-
html.push(elements[index].outerHTML);
|
|
2037
|
-
}
|
|
2038
|
-
return html.join('\r\n');
|
|
2039
|
-
};
|
|
2040
|
-
return CommonService;
|
|
2041
|
-
}());
|
|
2042
|
-
CommonService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: CommonService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2043
|
-
CommonService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: CommonService, providedIn: 'root' });
|
|
2044
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0__namespace, type: CommonService, decorators: [{
|
|
2045
|
-
type: i0.Injectable,
|
|
2046
|
-
args: [{
|
|
2047
|
-
providedIn: 'root',
|
|
2048
|
-
}]
|
|
2049
|
-
}], ctorParameters: function () { return []; } });
|
|
2050
|
-
|
|
2051
|
-
/*
|
|
2052
|
-
* Public API Surface of ipa-library
|
|
2053
|
-
*/
|
|
2054
|
-
|
|
2055
|
-
/**
|
|
2056
|
-
* Generated bundle index. Do not edit.
|
|
2057
|
-
*/
|
|
2058
|
-
|
|
2059
|
-
exports.AuthService = AuthService;
|
|
2060
|
-
exports.BreadcrumbsService = BreadcrumbsService;
|
|
2061
|
-
exports.CommonService = CommonService;
|
|
2062
|
-
exports.DropdownInputComponent = DropdownInputComponent;
|
|
2063
|
-
exports.ErrorInterceptor = ErrorInterceptor;
|
|
2064
|
-
exports.ErrorService = ErrorService;
|
|
2065
|
-
exports.FileUploadComponent = FileUploadComponent;
|
|
2066
|
-
exports.GenerateFormComponent = GenerateFormComponent;
|
|
2067
|
-
exports.GregorianDatepickerComponent = GregorianDatepickerComponent;
|
|
2068
|
-
exports.HijriDatePipe = HijriDatePipe;
|
|
2069
|
-
exports.HijriDatepickerComponent = HijriDatepickerComponent;
|
|
2070
|
-
exports.IPAFormService = IPAFormService;
|
|
2071
|
-
exports.LoaderComponent = LoaderComponent;
|
|
2072
|
-
exports.LoaderService = LoaderService;
|
|
2073
|
-
exports.LoadingInterceptor = LoadingInterceptor;
|
|
2074
|
-
exports.NgIPALibraryModule = NgIPALibraryModule;
|
|
2075
|
-
exports.PipesModule = PipesModule;
|
|
2076
|
-
exports.RecaptchaComponent = RecaptchaComponent;
|
|
2077
|
-
exports.ShareButtonComponent = ShareButtonComponent;
|
|
2078
|
-
exports.ShareButtonModule = ShareButtonModule;
|
|
2079
|
-
exports.TextInputComponent = TextInputComponent;
|
|
2080
|
-
exports.TextareaInputComponent = TextareaInputComponent;
|
|
2081
|
-
exports.TokenInterceptor = TokenInterceptor;
|
|
2082
|
-
Object.keys(i1).forEach(function (k) {
|
|
2083
|
-
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
2084
|
-
enumerable: true,
|
|
2085
|
-
get: function () { return i1[k]; }
|
|
2086
|
-
});
|
|
2087
|
-
});
|
|
2088
|
-
Object.keys(i3).forEach(function (k) {
|
|
2089
|
-
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
2090
|
-
enumerable: true,
|
|
2091
|
-
get: function () { return i3[k]; }
|
|
2092
|
-
});
|
|
2093
|
-
});
|
|
2094
|
-
|
|
2095
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2096
|
-
|
|
2097
|
-
}));
|
|
2098
|
-
//# sourceMappingURL=ng-ipa-library.umd.js.map
|