nuxeo-development-framework 3.3.6 → 3.3.8

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.
Files changed (19) hide show
  1. package/bundles/nuxeo-development-framework.umd.js +746 -746
  2. package/bundles/nuxeo-development-framework.umd.js.map +1 -1
  3. package/esm2015/lib/Core/services/roles/roles.service.js +13 -17
  4. package/esm2015/lib/components/dynamic-form/components/dynamic-form-department/dynamic-form-department.component.js +7 -3
  5. package/esm2015/lib/components/dynamic-form/components/dynamic-form-department/services/department-api.service.js +4 -9
  6. package/esm2015/lib/components/dynamic-form/components/dynamic-form-textitem/dynamic-form-textitem.component.js +2 -2
  7. package/esm2015/lib/components/dynamic-form/components/dynamic-form-treeview-select/dropdown-treeview-select.component.js +18 -11
  8. package/esm2015/lib/components/filter/filter/filter.component.js +1 -1
  9. package/esm2015/lib/components/select-users-by-department/select-users-by-departments/select-users-by-departments.component.js +1 -1
  10. package/esm2015/lib/nuxeo-development-framework.module.js +2 -2
  11. package/esm2015/lib/shared-services/global-admin.service.js +5 -7
  12. package/fesm2015/nuxeo-development-framework.js +212 -212
  13. package/fesm2015/nuxeo-development-framework.js.map +1 -1
  14. package/lib/Core/services/roles/roles.service.d.ts +2 -8
  15. package/lib/components/dynamic-form/components/dynamic-form-department/dynamic-form-department.component.d.ts +3 -1
  16. package/lib/components/dynamic-form/components/dynamic-form-department/services/department-api.service.d.ts +1 -1
  17. package/lib/components/dynamic-form/components/dynamic-form-treeview-select/dropdown-treeview-select.component.d.ts +3 -1
  18. package/lib/shared-services/global-admin.service.d.ts +1 -3
  19. package/package.json +1 -1
@@ -1015,559 +1015,270 @@
1015
1015
  return NuxeoOverride;
1016
1016
  }(Nuxeo$1));
1017
1017
 
1018
- var EvaluatorsService = /** @class */ (function () {
1019
- function EvaluatorsService(nuxeoService, appConfigService) {
1018
+ var RolesService$1 = /** @class */ (function () {
1019
+ function RolesService(environment
1020
+ // , private globalAdmin : GlobalAdminService , private nuxeoService : NuxeoService
1021
+ ) {
1022
+ this.environment = environment;
1023
+ }
1024
+ RolesService.prototype.getRoleName = function (role, code) {
1025
+ if (code === void 0) { code = null; }
1026
+ if (this.environment.RolesConstants[role]) {
1027
+ return code
1028
+ ? this.environment.RolesConstants[role].replace("{departmentTitle}", code)
1029
+ : "^" + this.environment.RolesConstants[role].replace("{departmentTitle}", ".*.") + "$";
1030
+ }
1031
+ else {
1032
+ console.warn("role: " + role + " does not exist in roles config");
1033
+ return role;
1034
+ }
1035
+ };
1036
+ RolesService.prototype.isUserInRole = function (user, role, code) {
1020
1037
  var _this = this;
1021
- this.nuxeoService = nuxeoService;
1022
- this.appConfigService = appConfigService;
1023
- this.context = { entity: null, getEvaluator: null, user: null };
1024
- this.asyncEvery = function (arr, predicate) { return __awaiter(_this, void 0, void 0, function () {
1025
- var arr_1, arr_1_1, e, e_1_1;
1026
- var e_1, _j;
1027
- return __generator(this, function (_k) {
1028
- switch (_k.label) {
1029
- case 0:
1030
- _k.trys.push([0, 5, 6, 7]);
1031
- arr_1 = __values(arr), arr_1_1 = arr_1.next();
1032
- _k.label = 1;
1033
- case 1:
1034
- if (!!arr_1_1.done) return [3 /*break*/, 4];
1035
- e = arr_1_1.value;
1036
- return [4 /*yield*/, predicate(e)];
1037
- case 2:
1038
- if (!(_k.sent())) {
1039
- return [2 /*return*/, false];
1038
+ if (code === void 0) { code = null; }
1039
+ var hasRole = false;
1040
+ var groups = user ? user.extendedGroups || user.groups : [];
1041
+ if (groups && groups.length > 0) {
1042
+ if (Array.isArray(role)) {
1043
+ role.forEach(function (r) {
1044
+ if (groups.filter(function (item) {
1045
+ if (code) {
1046
+ return (item.name || item) === _this.getRoleName(r, code);
1040
1047
  }
1041
- _k.label = 3;
1042
- case 3:
1043
- arr_1_1 = arr_1.next();
1044
- return [3 /*break*/, 1];
1045
- case 4: return [3 /*break*/, 7];
1046
- case 5:
1047
- e_1_1 = _k.sent();
1048
- e_1 = { error: e_1_1 };
1049
- return [3 /*break*/, 7];
1050
- case 6:
1051
- try {
1052
- if (arr_1_1 && !arr_1_1.done && (_j = arr_1.return)) _j.call(arr_1);
1048
+ else {
1049
+ var regex = new RegExp(_this.getRoleName(r));
1050
+ return regex.test(item.name || item);
1053
1051
  }
1054
- finally { if (e_1) throw e_1.error; }
1055
- return [7 /*endfinally*/];
1056
- case 7: return [2 /*return*/, true];
1057
- }
1058
- });
1059
- }); };
1060
- this.asyncSome = function (arr, predicate) { return __awaiter(_this, void 0, void 0, function () {
1061
- var arr_2, arr_2_1, e, e_2_1;
1062
- var e_2, _j;
1063
- return __generator(this, function (_k) {
1064
- switch (_k.label) {
1065
- case 0:
1066
- _k.trys.push([0, 5, 6, 7]);
1067
- arr_2 = __values(arr), arr_2_1 = arr_2.next();
1068
- _k.label = 1;
1069
- case 1:
1070
- if (!!arr_2_1.done) return [3 /*break*/, 4];
1071
- e = arr_2_1.value;
1072
- return [4 /*yield*/, predicate(e)];
1073
- case 2:
1074
- if (_k.sent()) {
1075
- return [2 /*return*/, true];
1052
+ }).length > 0) {
1053
+ hasRole = true;
1054
+ return;
1055
+ }
1056
+ });
1057
+ }
1058
+ else {
1059
+ hasRole =
1060
+ groups.filter(function (item) {
1061
+ if (code) {
1062
+ return (item.name || item) === _this.getRoleName(role, code);
1076
1063
  }
1077
- _k.label = 3;
1078
- case 3:
1079
- arr_2_1 = arr_2.next();
1080
- return [3 /*break*/, 1];
1081
- case 4: return [3 /*break*/, 7];
1082
- case 5:
1083
- e_2_1 = _k.sent();
1084
- e_2 = { error: e_2_1 };
1085
- return [3 /*break*/, 7];
1086
- case 6:
1087
- try {
1088
- if (arr_2_1 && !arr_2_1.done && (_j = arr_2.return)) _j.call(arr_2);
1064
+ else {
1065
+ var regex = new RegExp(_this.getRoleName(role));
1066
+ return regex.test(item.name || item);
1089
1067
  }
1090
- finally { if (e_2) throw e_2.error; }
1091
- return [7 /*endfinally*/];
1092
- case 7: return [2 /*return*/, false];
1068
+ }).length > 0;
1069
+ }
1070
+ }
1071
+ return hasRole;
1072
+ };
1073
+ RolesService.prototype.getUserRoleName = function (user, code) {
1074
+ var _this = this;
1075
+ var found = null;
1076
+ var groups = user ? user.extendedGroups || user.groups : [];
1077
+ if (groups && groups.length) {
1078
+ Object.keys(this.environment.RolesConstants).forEach(function (key) {
1079
+ var roleWCode = _this.environment.RolesConstants[key].replace("{departmentTitle}", code);
1080
+ if ((code && roleWCode.includes('dms_user_')) || !code)
1081
+ groups.forEach(function (group) {
1082
+ if (group.name || group === roleWCode) {
1083
+ found = key;
1084
+ }
1085
+ });
1086
+ });
1087
+ }
1088
+ return found;
1089
+ };
1090
+ RolesService.prototype.isUserManagerInDepartment = function (user, code) {
1091
+ var filteredRoles = Object.values(this.environment.RolesConstants).filter(function (role) { return role.includes("{departmentTitle}"); });
1092
+ var departmentRoles = [];
1093
+ var isUserInDepartment = false;
1094
+ var groups = user ? user.extendedGroups || user.groups : [];
1095
+ if (groups && groups.length) {
1096
+ filteredRoles.forEach(function (key) {
1097
+ var roleWCode = key.replace("{departmentTitle}", code);
1098
+ departmentRoles.push(roleWCode);
1099
+ });
1100
+ }
1101
+ departmentRoles = departmentRoles.filter(function (role) {
1102
+ return role.includes("Manager");
1103
+ });
1104
+ groups.forEach(function (group) {
1105
+ var groupName = group.name || group;
1106
+ var departmentIsIncluded = departmentRoles.includes(groupName);
1107
+ if (departmentIsIncluded) {
1108
+ isUserInDepartment = true;
1109
+ }
1110
+ });
1111
+ return isUserInDepartment;
1112
+ };
1113
+ RolesService.prototype.getUserDepartment = function (currentUser, prefix, option) {
1114
+ if (prefix === void 0) { prefix = "cts_role_"; }
1115
+ var groupToExclude = "cts_role_sys";
1116
+ if (option && option.isGlobalAdmin) {
1117
+ prefix = "tenant_" + option.activeTenant + "_cts_role_";
1118
+ groupToExclude = "tenant_" + option.activeTenant + "_cts_role_sys";
1119
+ }
1120
+ else if (option && !option.isGlobalAdmin && option.tenantId) {
1121
+ prefix = "tenant_" + option.tenantId + "_cts_role_";
1122
+ groupToExclude = "tenant_" + option.tenantId + "_cts_role_sys";
1123
+ }
1124
+ var allGroups = currentUser.properties.groups;
1125
+ var departmentCode = "";
1126
+ allGroups.some(function (group) {
1127
+ if (!group.includes(groupToExclude) && group.includes(prefix)) {
1128
+ departmentCode = group;
1129
+ return true;
1130
+ }
1131
+ });
1132
+ var prefixLength = prefix.length;
1133
+ departmentCode = departmentCode.substring(prefixLength);
1134
+ var lastIndex = departmentCode.lastIndexOf("_");
1135
+ departmentCode = departmentCode.substring(0, lastIndex);
1136
+ return departmentCode;
1137
+ };
1138
+ return RolesService;
1139
+ }());
1140
+ RolesService$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: RolesService$1, deps: [{ token: "environment" }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1141
+ RolesService$1.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: RolesService$1, providedIn: "root" });
1142
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: RolesService$1, decorators: [{
1143
+ type: i0.Injectable,
1144
+ args: [{
1145
+ providedIn: "root",
1146
+ }]
1147
+ }], ctorParameters: function () {
1148
+ return [{ type: undefined, decorators: [{
1149
+ type: i0.Inject,
1150
+ args: ["environment"]
1151
+ }] }];
1152
+ } });
1153
+
1154
+ var NuxeoService$1 = /** @class */ (function () {
1155
+ function NuxeoService(http, keycloak, baseHref, environment, rolesService) {
1156
+ this.http = http;
1157
+ this.keycloak = keycloak;
1158
+ this.baseHref = baseHref;
1159
+ this.environment = environment;
1160
+ this.rolesService = rolesService;
1161
+ this.excludedUrls = [];
1162
+ this.enableBearerInterceptor = true;
1163
+ this.authenticated = false;
1164
+ this.ctsUser = false;
1165
+ this.ctsManger = false;
1166
+ }
1167
+ NuxeoService.prototype.init = function () {
1168
+ var _this = this;
1169
+ return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
1170
+ var _this = this;
1171
+ return __generator(this, function (_a) {
1172
+ try {
1173
+ this.keycloak.getToken().then(function (token) {
1174
+ _this.createTokenClient(token);
1175
+ _this.nuxeoClient.connect()
1176
+ .then(function (client) {
1177
+ _this.authenticated = true;
1178
+ resolve(client);
1179
+ _this.checkForRoles();
1180
+ })
1181
+ .catch(function (error) {
1182
+ reject(error);
1183
+ });
1184
+ });
1185
+ }
1186
+ catch (error) {
1187
+ reject(error);
1093
1188
  }
1189
+ return [2 /*return*/];
1094
1190
  });
1095
- }); };
1096
- // tslint:disable-next-line:member-ordering
1097
- this.evaluators = {
1098
- AND: function (context, args) { return __awaiter(_this, void 0, void 0, function () {
1099
- var _this = this;
1100
- return __generator(this, function (_j) {
1101
- switch (_j.label) {
1102
- case 0:
1103
- if (!args || args.length === 0) {
1104
- return [2 /*return*/, false];
1105
- }
1106
- return [4 /*yield*/, this.asyncEvery(args, function (arg) { return __awaiter(_this, void 0, void 0, function () {
1107
- var evaluator;
1108
- return __generator(this, function (_j) {
1109
- switch (_j.label) {
1110
- case 0: return [4 /*yield*/, context.getEvaluator(arg.value)];
1111
- case 1:
1112
- evaluator = _j.sent();
1113
- if (!evaluator) {
1114
- console.warn("evaluator not found: " + arg.value);
1115
- return [2 /*return*/, false];
1116
- }
1117
- return [4 /*yield*/, evaluator(context, arg.parameters || [])];
1118
- case 2: return [2 /*return*/, _j.sent()];
1119
- }
1120
- });
1121
- }); })];
1122
- case 1: return [2 /*return*/, _j.sent()];
1123
- }
1124
- });
1125
- }); },
1126
- OR: function (context, args) { return __awaiter(_this, void 0, void 0, function () {
1127
- var _this = this;
1128
- return __generator(this, function (_j) {
1129
- switch (_j.label) {
1130
- case 0:
1131
- if (!args || args.length === 0) {
1132
- return [2 /*return*/, false];
1133
- }
1134
- return [4 /*yield*/, this.asyncSome(args, function (arg) { return __awaiter(_this, void 0, void 0, function () {
1135
- var evaluator, res;
1136
- return __generator(this, function (_j) {
1137
- switch (_j.label) {
1138
- case 0: return [4 /*yield*/, context.getEvaluator(arg.value)];
1139
- case 1:
1140
- evaluator = _j.sent();
1141
- if (!evaluator) {
1142
- console.warn("evaluator not found: " + arg.value);
1143
- return [2 /*return*/, false];
1144
- }
1145
- return [4 /*yield*/, evaluator(context, arg.parameters || [])];
1146
- case 2:
1147
- res = _j.sent();
1148
- return [2 /*return*/, res];
1149
- }
1150
- });
1151
- }); })];
1152
- case 1: return [2 /*return*/, _j.sent()];
1153
- }
1154
- });
1155
- }); },
1156
- isStatus: function (context, args) { return __awaiter(_this, void 0, void 0, function () {
1157
- return __generator(this, function (_j) {
1158
- if (args.indexOf(context.entity.state) > -1) {
1159
- return [2 /*return*/, true];
1160
- }
1161
- else {
1162
- return [2 /*return*/, false];
1163
- }
1164
- return [2 /*return*/];
1165
- });
1166
- }); },
1167
- isCreator: function (context, args) { return __awaiter(_this, void 0, void 0, function () {
1168
- var _a, _b, _c, _d, _e, _f, _g, _h, owner;
1169
- return __generator(this, function (_j) {
1170
- if ((_b = (_a = context.entity.properties.owner) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.username) {
1171
- owner = (_d = (_c = context.entity.properties.owner) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.username;
1172
- }
1173
- else if ((_f = (_e = context.entity.properties["corr:owner"]) === null || _e === void 0 ? void 0 : _e.properties) === null || _f === void 0 ? void 0 : _f.username) {
1174
- owner = (_h = (_g = context.entity.properties["corr:owner"]) === null || _g === void 0 ? void 0 : _g.properties) === null || _h === void 0 ? void 0 : _h.username;
1175
- }
1176
- else if (context.entity.properties.owner) {
1177
- owner = context.entity.properties.owner;
1178
- }
1179
- else if (context.entity.properties["corr:owner"]) {
1180
- owner = context.entity.properties["corr:owner"];
1181
- }
1182
- if (owner === context.user.properties.username) {
1183
- return [2 /*return*/, true];
1184
- }
1185
- else {
1186
- return [2 /*return*/, false];
1187
- }
1188
- return [2 /*return*/];
1189
- });
1190
- }); },
1191
- isUserInrole: function (context, args) { return __awaiter(_this, void 0, void 0, function () {
1192
- var result;
1193
- return __generator(this, function (_j) {
1194
- switch (_j.label) {
1195
- case 0: return [4 /*yield*/, this.nuxeoService
1196
- .isUserInRole(args, "")
1197
- .pipe(operators.first())
1198
- .toPromise()];
1199
- case 1:
1200
- result = _j.sent();
1201
- return [2 /*return*/, result];
1202
- }
1203
- });
1204
- }); },
1205
- };
1206
- this.getEvaluator = function (key) { return __awaiter(_this, void 0, void 0, function () {
1207
- var eva, fn_1;
1208
- var _this = this;
1209
- return __generator(this, function (_j) {
1210
- eva = this.evaluators;
1211
- if (key && key.startsWith("!")) {
1212
- fn_1 = eva[key.substring(1)];
1213
- return [2 /*return*/, function (context, args) { return __awaiter(_this, void 0, void 0, function () {
1214
- var result;
1215
- return __generator(this, function (_j) {
1216
- switch (_j.label) {
1217
- case 0: return [4 /*yield*/, fn_1.apply(void 0, __spreadArray([context], __read(args)))];
1218
- case 1:
1219
- result = _j.sent();
1220
- return [2 /*return*/, !result];
1221
- }
1222
- });
1223
- }); }];
1224
- }
1225
- return [2 /*return*/, eva[key]];
1226
- });
1227
- }); };
1228
- this.appConfigService.configLoaded.subscribe(function (ready) {
1229
- if (ready) {
1230
- _this.conditions = _this.getAllRules();
1191
+ }); });
1192
+ };
1193
+ NuxeoService.prototype.createTokenClient = function (token) {
1194
+ this.nuxeoClient = new NuxeoOverride$1({
1195
+ baseURL: this.environment.nuxeo,
1196
+ auth: {
1197
+ method: 'bearerToken',
1198
+ token: token
1231
1199
  }
1232
- });
1233
- }
1234
- EvaluatorsService.prototype.setEvaluators = function (evaluators) {
1235
- this.evaluators = Object.assign(Object.assign({}, this.evaluators), evaluators);
1200
+ }, this.keycloak);
1236
1201
  };
1237
- EvaluatorsService.prototype.getEvaluators = function () {
1238
- return this.evaluators;
1202
+ NuxeoService.prototype.getToken = function () {
1203
+ return this.keycloak.getToken();
1239
1204
  };
1240
- // ----------------------------------------------------
1241
- EvaluatorsService.prototype.evaluateRule = function (ruleId, context) {
1242
- return __awaiter(this, void 0, void 0, function () {
1243
- var ruleRef, evaluator, evaluator;
1244
- return __generator(this, function (_j) {
1245
- switch (_j.label) {
1246
- case 0:
1247
- ruleRef = this.getRuleById(ruleId);
1248
- context = context || this.context;
1249
- context["getEvaluator"] = this.getEvaluator;
1250
- if (!ruleRef) return [3 /*break*/, 4];
1251
- return [4 /*yield*/, this.getEvaluator(ruleRef.type)];
1252
- case 1:
1253
- evaluator = _j.sent();
1254
- if (!evaluator) return [3 /*break*/, 3];
1255
- return [4 /*yield*/, evaluator(context, ruleRef.parameters)];
1256
- case 2: return [2 /*return*/, _j.sent()];
1257
- case 3: return [3 /*break*/, 7];
1258
- case 4: return [4 /*yield*/, this.getEvaluator(ruleId)];
1259
- case 5:
1260
- evaluator = _j.sent();
1261
- if (!evaluator) return [3 /*break*/, 7];
1262
- return [4 /*yield*/, evaluator(context)];
1263
- case 6: return [2 /*return*/, _j.sent()];
1264
- case 7: return [2 /*return*/];
1205
+ NuxeoService.prototype.doLogout = function () {
1206
+ this.keycloak.logout(window.location.origin + this.baseHref);
1207
+ };
1208
+ NuxeoService.prototype.isUserInRole = function (role, committeeCode) {
1209
+ var _this = this;
1210
+ if (committeeCode === void 0) { committeeCode = null; }
1211
+ var simpleObservable = new rxjs.Observable(function (observer) {
1212
+ _this.keycloak.isLoggedIn().then(function (logged) {
1213
+ if (!logged) {
1214
+ observer.next(false);
1215
+ }
1216
+ else {
1217
+ var hasRole = _this.rolesService.isUserInRole(_this.nuxeoClient.user, role, committeeCode);
1218
+ observer.next(hasRole);
1265
1219
  }
1266
1220
  });
1267
1221
  });
1222
+ return simpleObservable;
1268
1223
  };
1269
- EvaluatorsService.prototype.getRuleById = function (id) {
1270
- return this.conditions[id] ? Object.assign({}, this.conditions[id]) : null;
1224
+ NuxeoService.prototype.createBlob = function (file) {
1225
+ return new NuxeoOverride$1.Blob({
1226
+ content: file
1227
+ });
1271
1228
  };
1272
- EvaluatorsService.prototype.getAllRules = function () {
1273
- return this.appConfigService.conditons;
1229
+ NuxeoService.prototype.getDuplicates = function (params, body) {
1230
+ if (params === void 0) { params = {}; }
1231
+ if (body === void 0) { body = {}; }
1232
+ return rxjs.from(this.nuxeoClient
1233
+ .operation('AC_Get_Duplicates', {
1234
+ url: "" + this.environment.nuxeo + this.environment.customAutomation,
1235
+ })
1236
+ .params(params)
1237
+ .context(body)
1238
+ .execute()).pipe(operators.catchError(function (err) {
1239
+ console.log(err);
1240
+ throw err;
1241
+ }));
1274
1242
  };
1275
- return EvaluatorsService;
1276
- }());
1277
- EvaluatorsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: EvaluatorsService, deps: [{ token: NuxeoService$1 }, { token: AppConfigService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1278
- EvaluatorsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: EvaluatorsService, providedIn: "root" });
1279
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: EvaluatorsService, decorators: [{
1280
- type: i0.Injectable,
1281
- args: [{ providedIn: "root" }]
1282
- }], ctorParameters: function () { return [{ type: NuxeoService$1 }, { type: AppConfigService }]; } });
1283
-
1284
- var GlobalAdminService = /** @class */ (function () {
1285
- function GlobalAdminService(nuxeo, evaluatorService) {
1286
- this.nuxeo = nuxeo;
1287
- this.evaluatorService = evaluatorService;
1288
- this.isGlobalAdmin = false;
1289
- this.activeTenant = null;
1290
- }
1291
- GlobalAdminService.prototype.checkIfGlobalAdmin = function () {
1292
- return this.evaluatorService.evaluateRule('isGlobalAdmin');
1243
+ NuxeoService.prototype.checkForRoles = function () {
1244
+ this.isCtsUser();
1245
+ this.isCtsManger();
1293
1246
  };
1294
- return GlobalAdminService;
1247
+ NuxeoService.prototype.isCtsUser = function () {
1248
+ var _this = this;
1249
+ this.isUserInRole('ctsSecretary', '').subscribe(function (data) {
1250
+ _this.ctsUser = data;
1251
+ });
1252
+ };
1253
+ NuxeoService.prototype.isCtsManger = function () {
1254
+ var _this = this;
1255
+ this.isUserInRole('ctsManger', '').subscribe(function (data) {
1256
+ _this.ctsManger = data;
1257
+ });
1258
+ };
1259
+ return NuxeoService;
1295
1260
  }());
1296
- GlobalAdminService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: GlobalAdminService, deps: [{ token: NuxeoService$1 }, { token: EvaluatorsService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1297
- GlobalAdminService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: GlobalAdminService, providedIn: 'root' });
1298
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: GlobalAdminService, decorators: [{
1261
+ NuxeoService$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NuxeoService$1, deps: [{ token: i1__namespace.HttpClient }, { token: i2__namespace.KeycloakService }, { token: i3.APP_BASE_HREF }, { token: 'environment' }, { token: RolesService$1 }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1262
+ NuxeoService$1.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NuxeoService$1, providedIn: 'root' });
1263
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NuxeoService$1, decorators: [{
1299
1264
  type: i0.Injectable,
1300
1265
  args: [{
1301
1266
  providedIn: 'root'
1302
1267
  }]
1303
- }], ctorParameters: function () { return [{ type: NuxeoService$1 }, { type: EvaluatorsService }]; } });
1268
+ }], ctorParameters: function () {
1269
+ return [{ type: i1__namespace.HttpClient }, { type: i2__namespace.KeycloakService }, { type: undefined, decorators: [{
1270
+ type: i0.Inject,
1271
+ args: [i3.APP_BASE_HREF]
1272
+ }] }, { type: undefined, decorators: [{
1273
+ type: i0.Inject,
1274
+ args: ['environment']
1275
+ }] }, { type: RolesService$1 }];
1276
+ } });
1304
1277
 
1305
- var RolesService$1 = /** @class */ (function () {
1306
- function RolesService(environment, globalAdmin, nuxeoService) {
1307
- this.environment = environment;
1308
- this.globalAdmin = globalAdmin;
1309
- this.nuxeoService = nuxeoService;
1310
- }
1311
- RolesService.prototype.getRoleName = function (role, code) {
1312
- if (code === void 0) { code = null; }
1313
- if (this.environment.RolesConstants[role]) {
1314
- return code
1315
- ? this.environment.RolesConstants[role].replace("{departmentTitle}", code)
1316
- : "^" + this.environment.RolesConstants[role].replace("{departmentTitle}", ".*.") + "$";
1317
- }
1318
- else {
1319
- console.warn("role: " + role + " does not exist in roles config");
1320
- return role;
1321
- }
1322
- };
1323
- RolesService.prototype.isUserInRole = function (user, role, code) {
1324
- var _this = this;
1325
- if (code === void 0) { code = null; }
1326
- var hasRole = false;
1327
- var groups = user ? user.extendedGroups || user.groups : [];
1328
- if (groups && groups.length > 0) {
1329
- if (Array.isArray(role)) {
1330
- role.forEach(function (r) {
1331
- if (groups.filter(function (item) {
1332
- if (code) {
1333
- return (item.name || item) === _this.getRoleName(r, code);
1334
- }
1335
- else {
1336
- var regex = new RegExp(_this.getRoleName(r));
1337
- return regex.test(item.name || item);
1338
- }
1339
- }).length > 0) {
1340
- hasRole = true;
1341
- return;
1342
- }
1343
- });
1344
- }
1345
- else {
1346
- hasRole =
1347
- groups.filter(function (item) {
1348
- if (code) {
1349
- return (item.name || item) === _this.getRoleName(role, code);
1350
- }
1351
- else {
1352
- var regex = new RegExp(_this.getRoleName(role));
1353
- return regex.test(item.name || item);
1354
- }
1355
- }).length > 0;
1356
- }
1357
- }
1358
- return hasRole;
1359
- };
1360
- RolesService.prototype.getUserRoleName = function (user, code) {
1361
- var _this = this;
1362
- var found = null;
1363
- var groups = user ? user.extendedGroups || user.groups : [];
1364
- if (groups && groups.length) {
1365
- Object.keys(this.environment.RolesConstants).forEach(function (key) {
1366
- var roleWCode = _this.environment.RolesConstants[key].replace("{departmentTitle}", code);
1367
- if ((code && roleWCode.includes('dms_user_')) || !code)
1368
- groups.forEach(function (group) {
1369
- if (group.name || group === roleWCode) {
1370
- found = key;
1371
- }
1372
- });
1373
- });
1374
- }
1375
- return found;
1376
- };
1377
- RolesService.prototype.isUserManagerInDepartment = function (user, code) {
1378
- var filteredRoles = Object.values(this.environment.RolesConstants).filter(function (role) { return role.includes("{departmentTitle}"); });
1379
- var departmentRoles = [];
1380
- var isUserInDepartment = false;
1381
- var groups = user ? user.extendedGroups || user.groups : [];
1382
- if (groups && groups.length) {
1383
- filteredRoles.forEach(function (key) {
1384
- var roleWCode = key.replace("{departmentTitle}", code);
1385
- departmentRoles.push(roleWCode);
1386
- });
1387
- }
1388
- departmentRoles = departmentRoles.filter(function (role) {
1389
- return role.includes("Manager");
1390
- });
1391
- groups.forEach(function (group) {
1392
- var groupName = group.name || group;
1393
- var departmentIsIncluded = departmentRoles.includes(groupName);
1394
- if (departmentIsIncluded) {
1395
- isUserInDepartment = true;
1396
- }
1397
- });
1398
- return isUserInDepartment;
1399
- };
1400
- RolesService.prototype.getUserDepartment = function (currentUser, prefix) {
1401
- if (prefix === void 0) { prefix = "cts_role_"; }
1402
- var groupToExclude = "cts_role_sys";
1403
- if (this.globalAdmin.isGlobalAdmin) {
1404
- prefix = "tenant_" + this.globalAdmin.activeTenant + "_cts_role_";
1405
- groupToExclude = "tenant_" + this.globalAdmin.activeTenant + "_cts_role_sys";
1406
- }
1407
- else if (!this.globalAdmin.activeTenant && this.nuxeoService.nuxeoClient.user.properties.tenantId) {
1408
- prefix = "tenant_" + this.nuxeoService.nuxeoClient.user.properties.tenantId + "_cts_role_";
1409
- groupToExclude = "tenant_" + this.nuxeoService.nuxeoClient.user.properties.tenantId + "_cts_role_sys";
1410
- }
1411
- var allGroups = currentUser.properties.groups;
1412
- var departmentCode = "";
1413
- allGroups.some(function (group) {
1414
- if (!group.includes(groupToExclude) && group.includes(prefix)) {
1415
- departmentCode = group;
1416
- return true;
1417
- }
1418
- });
1419
- var prefixLength = prefix.length;
1420
- departmentCode = departmentCode.substring(prefixLength);
1421
- var lastIndex = departmentCode.lastIndexOf("_");
1422
- departmentCode = departmentCode.substring(0, lastIndex);
1423
- return departmentCode;
1424
- };
1425
- return RolesService;
1426
- }());
1427
- RolesService$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: RolesService$1, deps: [{ token: "environment" }, { token: GlobalAdminService }, { token: NuxeoService$1 }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1428
- RolesService$1.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: RolesService$1, providedIn: "root" });
1429
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: RolesService$1, decorators: [{
1430
- type: i0.Injectable,
1431
- args: [{
1432
- providedIn: "root",
1433
- }]
1434
- }], ctorParameters: function () {
1435
- return [{ type: undefined, decorators: [{
1436
- type: i0.Inject,
1437
- args: ["environment"]
1438
- }] }, { type: GlobalAdminService }, { type: NuxeoService$1 }];
1439
- } });
1440
- 'tenant_fintech_cts_role_sys';
1441
- 'tenant_fintech_cts_role_';
1442
-
1443
- var NuxeoService$1 = /** @class */ (function () {
1444
- function NuxeoService(http, keycloak, baseHref, environment, rolesService) {
1445
- this.http = http;
1446
- this.keycloak = keycloak;
1447
- this.baseHref = baseHref;
1448
- this.environment = environment;
1449
- this.rolesService = rolesService;
1450
- this.excludedUrls = [];
1451
- this.enableBearerInterceptor = true;
1452
- this.authenticated = false;
1453
- this.ctsUser = false;
1454
- this.ctsManger = false;
1455
- }
1456
- NuxeoService.prototype.init = function () {
1457
- var _this = this;
1458
- return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
1459
- var _this = this;
1460
- return __generator(this, function (_a) {
1461
- try {
1462
- this.keycloak.getToken().then(function (token) {
1463
- _this.createTokenClient(token);
1464
- _this.nuxeoClient.connect()
1465
- .then(function (client) {
1466
- _this.authenticated = true;
1467
- resolve(client);
1468
- _this.checkForRoles();
1469
- })
1470
- .catch(function (error) {
1471
- reject(error);
1472
- });
1473
- });
1474
- }
1475
- catch (error) {
1476
- reject(error);
1477
- }
1478
- return [2 /*return*/];
1479
- });
1480
- }); });
1481
- };
1482
- NuxeoService.prototype.createTokenClient = function (token) {
1483
- this.nuxeoClient = new NuxeoOverride$1({
1484
- baseURL: this.environment.nuxeo,
1485
- auth: {
1486
- method: 'bearerToken',
1487
- token: token
1488
- }
1489
- }, this.keycloak);
1490
- };
1491
- NuxeoService.prototype.getToken = function () {
1492
- return this.keycloak.getToken();
1493
- };
1494
- NuxeoService.prototype.doLogout = function () {
1495
- this.keycloak.logout(window.location.origin + this.baseHref);
1496
- };
1497
- NuxeoService.prototype.isUserInRole = function (role, committeeCode) {
1498
- var _this = this;
1499
- if (committeeCode === void 0) { committeeCode = null; }
1500
- var simpleObservable = new rxjs.Observable(function (observer) {
1501
- _this.keycloak.isLoggedIn().then(function (logged) {
1502
- if (!logged) {
1503
- observer.next(false);
1504
- }
1505
- else {
1506
- var hasRole = _this.rolesService.isUserInRole(_this.nuxeoClient.user, role, committeeCode);
1507
- observer.next(hasRole);
1508
- }
1509
- });
1510
- });
1511
- return simpleObservable;
1512
- };
1513
- NuxeoService.prototype.createBlob = function (file) {
1514
- return new NuxeoOverride$1.Blob({
1515
- content: file
1516
- });
1517
- };
1518
- NuxeoService.prototype.getDuplicates = function (params, body) {
1519
- if (params === void 0) { params = {}; }
1520
- if (body === void 0) { body = {}; }
1521
- return rxjs.from(this.nuxeoClient
1522
- .operation('AC_Get_Duplicates', {
1523
- url: "" + this.environment.nuxeo + this.environment.customAutomation,
1524
- })
1525
- .params(params)
1526
- .context(body)
1527
- .execute()).pipe(operators.catchError(function (err) {
1528
- console.log(err);
1529
- throw err;
1530
- }));
1531
- };
1532
- NuxeoService.prototype.checkForRoles = function () {
1533
- this.isCtsUser();
1534
- this.isCtsManger();
1535
- };
1536
- NuxeoService.prototype.isCtsUser = function () {
1537
- var _this = this;
1538
- this.isUserInRole('ctsSecretary', '').subscribe(function (data) {
1539
- _this.ctsUser = data;
1540
- });
1541
- };
1542
- NuxeoService.prototype.isCtsManger = function () {
1543
- var _this = this;
1544
- this.isUserInRole('ctsManger', '').subscribe(function (data) {
1545
- _this.ctsManger = data;
1546
- });
1547
- };
1548
- return NuxeoService;
1549
- }());
1550
- NuxeoService$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NuxeoService$1, deps: [{ token: i1__namespace.HttpClient }, { token: i2__namespace.KeycloakService }, { token: i3.APP_BASE_HREF }, { token: 'environment' }, { token: RolesService$1 }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1551
- NuxeoService$1.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NuxeoService$1, providedIn: 'root' });
1552
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NuxeoService$1, decorators: [{
1553
- type: i0.Injectable,
1554
- args: [{
1555
- providedIn: 'root'
1556
- }]
1557
- }], ctorParameters: function () {
1558
- return [{ type: i1__namespace.HttpClient }, { type: i2__namespace.KeycloakService }, { type: undefined, decorators: [{
1559
- type: i0.Inject,
1560
- args: [i3.APP_BASE_HREF]
1561
- }] }, { type: undefined, decorators: [{
1562
- type: i0.Inject,
1563
- args: ['environment']
1564
- }] }, { type: RolesService$1 }];
1565
- } });
1566
-
1567
- var TRANSLATION_PROVIDER$1 = new i0.InjectionToken('Injection token for translation providers.');
1568
- var TranslationService$1 = /** @class */ (function () {
1569
- function TranslationService(translate, rendererFactory, localStorage, userPreferencesService, appConfig, nuxeoService, environment, providers) {
1570
- var e_1, _a;
1278
+ var TRANSLATION_PROVIDER$1 = new i0.InjectionToken('Injection token for translation providers.');
1279
+ var TranslationService$1 = /** @class */ (function () {
1280
+ function TranslationService(translate, rendererFactory, localStorage, userPreferencesService, appConfig, nuxeoService, environment, providers) {
1281
+ var e_1, _a;
1571
1282
  var _this = this;
1572
1283
  this.translate = translate;
1573
1284
  this.rendererFactory = rendererFactory;
@@ -2582,10 +2293,10 @@
2582
2293
  }(Nuxeo));
2583
2294
 
2584
2295
  var RolesService = /** @class */ (function () {
2585
- function RolesService(environment, globalAdmin, nuxeoService) {
2296
+ function RolesService(environment
2297
+ // , private globalAdmin : GlobalAdminService , private nuxeoService : NuxeoService
2298
+ ) {
2586
2299
  this.environment = environment;
2587
- this.globalAdmin = globalAdmin;
2588
- this.nuxeoService = nuxeoService;
2589
2300
  }
2590
2301
  RolesService.prototype.getRoleName = function (role, code) {
2591
2302
  if (code === void 0) { code = null; }
@@ -2676,16 +2387,16 @@
2676
2387
  });
2677
2388
  return isUserInDepartment;
2678
2389
  };
2679
- RolesService.prototype.getUserDepartment = function (currentUser, prefix) {
2390
+ RolesService.prototype.getUserDepartment = function (currentUser, prefix, option) {
2680
2391
  if (prefix === void 0) { prefix = "cts_role_"; }
2681
2392
  var groupToExclude = "cts_role_sys";
2682
- if (this.globalAdmin.isGlobalAdmin) {
2683
- prefix = "tenant_" + this.globalAdmin.activeTenant + "_cts_role_";
2684
- groupToExclude = "tenant_" + this.globalAdmin.activeTenant + "_cts_role_sys";
2393
+ if (option && option.isGlobalAdmin) {
2394
+ prefix = "tenant_" + option.activeTenant + "_cts_role_";
2395
+ groupToExclude = "tenant_" + option.activeTenant + "_cts_role_sys";
2685
2396
  }
2686
- else if (!this.globalAdmin.activeTenant && this.nuxeoService.nuxeoClient.user.properties.tenantId) {
2687
- prefix = "tenant_" + this.nuxeoService.nuxeoClient.user.properties.tenantId + "_cts_role_";
2688
- groupToExclude = "tenant_" + this.nuxeoService.nuxeoClient.user.properties.tenantId + "_cts_role_sys";
2397
+ else if (option && !option.isGlobalAdmin && option.tenantId) {
2398
+ prefix = "tenant_" + option.tenantId + "_cts_role_";
2399
+ groupToExclude = "tenant_" + option.tenantId + "_cts_role_sys";
2689
2400
  }
2690
2401
  var allGroups = currentUser.properties.groups;
2691
2402
  var departmentCode = "";
@@ -2703,7 +2414,7 @@
2703
2414
  };
2704
2415
  return RolesService;
2705
2416
  }());
2706
- RolesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: RolesService, deps: [{ token: "environment" }, { token: GlobalAdminService }, { token: NuxeoService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2417
+ RolesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: RolesService, deps: [{ token: "environment" }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2707
2418
  RolesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: RolesService, providedIn: "root" });
2708
2419
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: RolesService, decorators: [{
2709
2420
  type: i0.Injectable,
@@ -2714,10 +2425,8 @@
2714
2425
  return [{ type: undefined, decorators: [{
2715
2426
  type: i0.Inject,
2716
2427
  args: ["environment"]
2717
- }] }, { type: GlobalAdminService }, { type: NuxeoService }];
2718
- } });
2719
- 'tenant_fintech_cts_role_sys';
2720
- 'tenant_fintech_cts_role_';
2428
+ }] }];
2429
+ } });
2721
2430
 
2722
2431
  var NuxeoService = /** @class */ (function () {
2723
2432
  function NuxeoService(http, keycloak, baseHref, environment, rolesService) {
@@ -3661,195 +3370,461 @@
3661
3370
  }
3662
3371
  this.selectedDateChange.emit(this.selectedDate);
3663
3372
  };
3664
- HijriGregorianDatepickerComponent.prototype.hijriClick = function () {
3665
- if (this.selectedDateType == DateType.Hijri) {
3666
- return;
3667
- }
3668
- this.selectedDateType = DateType.Hijri;
3669
- //to hijri
3670
- if (this.range) {
3671
- this.selectedDate = {
3672
- from: this.dateFormatterService.ToHijri(this.selectedDate.from || null),
3673
- to: this.dateFormatterService.ToHijri(this.selectedDate.to || null)
3674
- };
3675
- }
3676
- else {
3677
- this.selectedDate = this.dateFormatterService.ToHijri(this.selectedDate);
3678
- }
3679
- this.selectedDateChange.emit(this.selectedDate);
3373
+ HijriGregorianDatepickerComponent.prototype.hijriClick = function () {
3374
+ if (this.selectedDateType == DateType.Hijri) {
3375
+ return;
3376
+ }
3377
+ this.selectedDateType = DateType.Hijri;
3378
+ //to hijri
3379
+ if (this.range) {
3380
+ this.selectedDate = {
3381
+ from: this.dateFormatterService.ToHijri(this.selectedDate.from || null),
3382
+ to: this.dateFormatterService.ToHijri(this.selectedDate.to || null)
3383
+ };
3384
+ }
3385
+ else {
3386
+ this.selectedDate = this.dateFormatterService.ToHijri(this.selectedDate);
3387
+ }
3388
+ this.selectedDateChange.emit(this.selectedDate);
3389
+ };
3390
+ HijriGregorianDatepickerComponent.prototype.gregClick = function () {
3391
+ if (this.selectedDateType == DateType.Gregorian) {
3392
+ return;
3393
+ }
3394
+ this.selectedDateType = DateType.Gregorian;
3395
+ //to Gregorian
3396
+ if (this.range) {
3397
+ this.selectedDate = {
3398
+ from: this.dateFormatterService.ToGregorian(this.selectedDate.from || null),
3399
+ to: this.dateFormatterService.ToGregorian(this.selectedDate.to || null)
3400
+ };
3401
+ }
3402
+ else {
3403
+ this.selectedDate = this.dateFormatterService.ToGregorian(this.selectedDate);
3404
+ }
3405
+ this.selectedDateChange.emit(this.selectedDate);
3406
+ };
3407
+ return HijriGregorianDatepickerComponent;
3408
+ }());
3409
+ HijriGregorianDatepickerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: HijriGregorianDatepickerComponent, deps: [{ token: DateFormatterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
3410
+ HijriGregorianDatepickerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: HijriGregorianDatepickerComponent, selector: "hijri-gregorian-datepicker", inputs: { selectedDateType: "selectedDateType", selectedDate: "selectedDate", label: "label", showLabel: "showLabel", readonly: "readonly", isRequired: "isRequired", disabled: "disabled", disabledbtn: "disabledbtn", minHijri: "minHijri", maxHijri: "maxHijri", minGreg: "minGreg", maxGreg: "maxGreg", hijriLabel: "hijriLabel", GregLabel: "GregLabel", placeHolder: "placeHolder", range: "range", vertical: "vertical" }, outputs: { selectedDateChange: "selectedDateChange" }, viewQueries: [{ propertyName: "datePicker", first: true, predicate: ["d"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"form-group\" provideParentForm>\r\n <label class=\"requiredInput\" *ngIf=\"showLabel\" for=\"input-birth-Date\">{{ label }} </label>\r\n\r\n <div class=\"input-group\">\r\n <gregorian-date-picker [vertical]=\"vertical\" *ngIf=\"selectedDateType == DateType.Gregorian\" [range]=\"range\"\r\n [(selectedDate)]=\"selectedDate\" (selectedDateChange)=\"dateSelected($event)\" [readonly]=\"readonly\" [min]=\"minGreg\"\r\n [max]=\"maxGreg\" style=\"flex: 1 1 auto;\" [name]=\"label\" [isRequired]=\"isRequired\" [placeHolder]=\"placeHolder\"\r\n [disabled]=\"disabled\">\r\n </gregorian-date-picker>\r\n <hijri-date-picker [vertical]=\"vertical\" *ngIf=\"selectedDateType == DateType.Hijri\" [range]=\"range\"\r\n [(selectedDate)]=\"selectedDate\" (selectedDateChange)=\"dateSelected($event)\" [readonly]=\"readonly\" [min]=\"minHijri\"\r\n [max]=\"maxHijri\" style=\"flex: 1 1 auto;\" [name]=\"label\" [isRequired]=\"isRequired\" [placeHolder]=\"placeHolder\"\r\n [disabled]=\"disabled\">\r\n </hijri-date-picker>\r\n\r\n <div class=\"input-group-append\">\r\n <button class=\"btn btn-sm {{selectedDateType == DateType.Hijri ? 'btn-info focus active' : 'btn-outline-info'}}\"\r\n (click)=\"hijriClick()\" [disabled]=\"disabledbtn\" type=\"button\">\r\n {{hijriLabel ? hijriLabel : 'Hijri' }}\r\n </button>\r\n <button\r\n class=\"btn btn-sm {{selectedDateType == DateType.Gregorian ? 'btn-info focus active' : 'btn-outline-info'}}\"\r\n (click)=\"gregClick()\" [disabled]=\"disabledbtn\" type=\"button\">\r\n {{GregLabel ? GregLabel : 'Gregorian' }}\r\n </button>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", components: [{ type: GregorianDatepickerComponent, selector: "gregorian-date-picker", inputs: ["selectedDate", "readonly", "isRequired", "disabled", "min", "max", "name", "range", "vertical", "placeHolder"], outputs: ["selectedDateChange"] }, { type: HijriDatepickerComponent, selector: "hijri-date-picker", inputs: ["selectedDate", "readonly", "isRequired", "disabled", "min", "max", "name", "range", "vertical", "placeHolder"], outputs: ["selectedDateChange"] }], directives: [{ type: ProvideParentFormDirective, selector: "[provideParentForm]" }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3411
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: HijriGregorianDatepickerComponent, decorators: [{
3412
+ type: i0.Component,
3413
+ args: [{
3414
+ selector: 'hijri-gregorian-datepicker',
3415
+ templateUrl: './hijri-gregorian-datepicker.component.html'
3416
+ }]
3417
+ }], ctorParameters: function () { return [{ type: DateFormatterService }]; }, propDecorators: { datePicker: [{
3418
+ type: i0.ViewChild,
3419
+ args: ['d']
3420
+ }], selectedDateType: [{
3421
+ type: i0.Input
3422
+ }], selectedDate: [{
3423
+ type: i0.Input
3424
+ }], selectedDateChange: [{
3425
+ type: i0.Output
3426
+ }], label: [{
3427
+ type: i0.Input
3428
+ }], showLabel: [{
3429
+ type: i0.Input
3430
+ }], readonly: [{
3431
+ type: i0.Input
3432
+ }], isRequired: [{
3433
+ type: i0.Input
3434
+ }], disabled: [{
3435
+ type: i0.Input
3436
+ }], disabledbtn: [{
3437
+ type: i0.Input
3438
+ }], minHijri: [{
3439
+ type: i0.Input
3440
+ }], maxHijri: [{
3441
+ type: i0.Input
3442
+ }], minGreg: [{
3443
+ type: i0.Input
3444
+ }], maxGreg: [{
3445
+ type: i0.Input
3446
+ }], hijriLabel: [{
3447
+ type: i0.Input
3448
+ }], GregLabel: [{
3449
+ type: i0.Input
3450
+ }], placeHolder: [{
3451
+ type: i0.Input
3452
+ }], range: [{
3453
+ type: i0.Input
3454
+ }], vertical: [{
3455
+ type: i0.Input
3456
+ }] } });
3457
+
3458
+ /** @ignore */
3459
+ var NgxHijriGregorianDatepickerModule = /** @class */ (function () {
3460
+ function NgxHijriGregorianDatepickerModule() {
3461
+ }
3462
+ return NgxHijriGregorianDatepickerModule;
3463
+ }());
3464
+ NgxHijriGregorianDatepickerModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NgxHijriGregorianDatepickerModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3465
+ NgxHijriGregorianDatepickerModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NgxHijriGregorianDatepickerModule, declarations: [HijriGregorianDatepickerComponent,
3466
+ HijriDatepickerComponent,
3467
+ GregorianDatepickerComponent,
3468
+ ProvideParentFormDirective], imports: [i3.CommonModule,
3469
+ i6.ReactiveFormsModule,
3470
+ i1$1.TranslateModule,
3471
+ i6.FormsModule,
3472
+ i1$4.NgbModule], exports: [HijriGregorianDatepickerComponent] });
3473
+ NgxHijriGregorianDatepickerModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NgxHijriGregorianDatepickerModule, providers: [
3474
+ { provide: i1$4.NgbDateParserFormatter, useClass: CustomNgbDateParserFormatter },
3475
+ DateFormatterService
3476
+ ], imports: [[
3477
+ i3.CommonModule,
3478
+ i6.ReactiveFormsModule,
3479
+ i1$1.TranslateModule,
3480
+ i6.FormsModule,
3481
+ i1$4.NgbModule
3482
+ ]] });
3483
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NgxHijriGregorianDatepickerModule, decorators: [{
3484
+ type: i0.NgModule,
3485
+ args: [{
3486
+ declarations: [
3487
+ HijriGregorianDatepickerComponent,
3488
+ HijriDatepickerComponent,
3489
+ GregorianDatepickerComponent,
3490
+ ProvideParentFormDirective
3491
+ ],
3492
+ imports: [
3493
+ i3.CommonModule,
3494
+ i6.ReactiveFormsModule,
3495
+ i1$1.TranslateModule,
3496
+ i6.FormsModule,
3497
+ i1$4.NgbModule
3498
+ ],
3499
+ providers: [
3500
+ { provide: i1$4.NgbDateParserFormatter, useClass: CustomNgbDateParserFormatter },
3501
+ DateFormatterService
3502
+ ],
3503
+ exports: [HijriGregorianDatepickerComponent]
3504
+ }]
3505
+ }] });
3506
+
3507
+ /** @ignore */
3508
+ var ClickOutsideDirective = /** @class */ (function () {
3509
+ function ClickOutsideDirective(elementRef) {
3510
+ this.elementRef = elementRef;
3511
+ this.clickOutside = new i0.EventEmitter();
3512
+ }
3513
+ ClickOutsideDirective.prototype.onClick = function (target) {
3514
+ var clickedInside = this.elementRef.nativeElement.contains(target);
3515
+ if (!clickedInside) {
3516
+ this.clickOutside.emit(target);
3517
+ }
3518
+ };
3519
+ return ClickOutsideDirective;
3520
+ }());
3521
+ ClickOutsideDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: ClickOutsideDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
3522
+ ClickOutsideDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.4", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: { clickOutside: "clickOutside" }, host: { listeners: { "window:click": "onClick($event.target)" } }, ngImport: i0__namespace });
3523
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: ClickOutsideDirective, decorators: [{
3524
+ type: i0.Directive,
3525
+ args: [{
3526
+ selector: '[clickOutside]'
3527
+ }]
3528
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { clickOutside: [{
3529
+ type: i0.Output
3530
+ }], onClick: [{
3531
+ type: i0.HostListener,
3532
+ args: ['window:click', ['$event.target']]
3533
+ }] } });
3534
+
3535
+ /** @ignore */
3536
+ var SetRtlDirective = /** @class */ (function () {
3537
+ function SetRtlDirective(elRef, renderer, translation) {
3538
+ this.elRef = elRef;
3539
+ this.renderer = renderer;
3540
+ this.translation = translation;
3541
+ this.switchClassBasedOnLanguage();
3542
+ }
3543
+ /*Switch rtl class based on the chosen language from Translation Service*/
3544
+ SetRtlDirective.prototype.switchClassBasedOnLanguage = function () {
3545
+ var _this = this;
3546
+ this.translation.isArabic.subscribe(function (arabic) {
3547
+ arabic
3548
+ ? _this.renderer.addClass(_this.elRef.nativeElement, 'rtl')
3549
+ : _this.renderer.removeClass(_this.elRef.nativeElement, 'rtl');
3550
+ });
3551
+ };
3552
+ return SetRtlDirective;
3553
+ }());
3554
+ SetRtlDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SetRtlDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.Renderer2 }, { token: TranslationService$1 }], target: i0__namespace.ɵɵFactoryTarget.Directive });
3555
+ SetRtlDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.4", type: SetRtlDirective, selector: "[SetRtl]", ngImport: i0__namespace });
3556
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SetRtlDirective, decorators: [{
3557
+ type: i0.Directive,
3558
+ args: [{
3559
+ selector: '[SetRtl]',
3560
+ }]
3561
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.Renderer2 }, { type: TranslationService$1 }]; } });
3562
+
3563
+ var EvaluatorsService = /** @class */ (function () {
3564
+ function EvaluatorsService(nuxeoService, appConfigService) {
3565
+ var _this = this;
3566
+ this.nuxeoService = nuxeoService;
3567
+ this.appConfigService = appConfigService;
3568
+ this.context = { entity: null, getEvaluator: null, user: null };
3569
+ this.asyncEvery = function (arr, predicate) { return __awaiter(_this, void 0, void 0, function () {
3570
+ var arr_1, arr_1_1, e, e_1_1;
3571
+ var e_1, _j;
3572
+ return __generator(this, function (_k) {
3573
+ switch (_k.label) {
3574
+ case 0:
3575
+ _k.trys.push([0, 5, 6, 7]);
3576
+ arr_1 = __values(arr), arr_1_1 = arr_1.next();
3577
+ _k.label = 1;
3578
+ case 1:
3579
+ if (!!arr_1_1.done) return [3 /*break*/, 4];
3580
+ e = arr_1_1.value;
3581
+ return [4 /*yield*/, predicate(e)];
3582
+ case 2:
3583
+ if (!(_k.sent())) {
3584
+ return [2 /*return*/, false];
3585
+ }
3586
+ _k.label = 3;
3587
+ case 3:
3588
+ arr_1_1 = arr_1.next();
3589
+ return [3 /*break*/, 1];
3590
+ case 4: return [3 /*break*/, 7];
3591
+ case 5:
3592
+ e_1_1 = _k.sent();
3593
+ e_1 = { error: e_1_1 };
3594
+ return [3 /*break*/, 7];
3595
+ case 6:
3596
+ try {
3597
+ if (arr_1_1 && !arr_1_1.done && (_j = arr_1.return)) _j.call(arr_1);
3598
+ }
3599
+ finally { if (e_1) throw e_1.error; }
3600
+ return [7 /*endfinally*/];
3601
+ case 7: return [2 /*return*/, true];
3602
+ }
3603
+ });
3604
+ }); };
3605
+ this.asyncSome = function (arr, predicate) { return __awaiter(_this, void 0, void 0, function () {
3606
+ var arr_2, arr_2_1, e, e_2_1;
3607
+ var e_2, _j;
3608
+ return __generator(this, function (_k) {
3609
+ switch (_k.label) {
3610
+ case 0:
3611
+ _k.trys.push([0, 5, 6, 7]);
3612
+ arr_2 = __values(arr), arr_2_1 = arr_2.next();
3613
+ _k.label = 1;
3614
+ case 1:
3615
+ if (!!arr_2_1.done) return [3 /*break*/, 4];
3616
+ e = arr_2_1.value;
3617
+ return [4 /*yield*/, predicate(e)];
3618
+ case 2:
3619
+ if (_k.sent()) {
3620
+ return [2 /*return*/, true];
3621
+ }
3622
+ _k.label = 3;
3623
+ case 3:
3624
+ arr_2_1 = arr_2.next();
3625
+ return [3 /*break*/, 1];
3626
+ case 4: return [3 /*break*/, 7];
3627
+ case 5:
3628
+ e_2_1 = _k.sent();
3629
+ e_2 = { error: e_2_1 };
3630
+ return [3 /*break*/, 7];
3631
+ case 6:
3632
+ try {
3633
+ if (arr_2_1 && !arr_2_1.done && (_j = arr_2.return)) _j.call(arr_2);
3634
+ }
3635
+ finally { if (e_2) throw e_2.error; }
3636
+ return [7 /*endfinally*/];
3637
+ case 7: return [2 /*return*/, false];
3638
+ }
3639
+ });
3640
+ }); };
3641
+ // tslint:disable-next-line:member-ordering
3642
+ this.evaluators = {
3643
+ AND: function (context, args) { return __awaiter(_this, void 0, void 0, function () {
3644
+ var _this = this;
3645
+ return __generator(this, function (_j) {
3646
+ switch (_j.label) {
3647
+ case 0:
3648
+ if (!args || args.length === 0) {
3649
+ return [2 /*return*/, false];
3650
+ }
3651
+ return [4 /*yield*/, this.asyncEvery(args, function (arg) { return __awaiter(_this, void 0, void 0, function () {
3652
+ var evaluator;
3653
+ return __generator(this, function (_j) {
3654
+ switch (_j.label) {
3655
+ case 0: return [4 /*yield*/, context.getEvaluator(arg.value)];
3656
+ case 1:
3657
+ evaluator = _j.sent();
3658
+ if (!evaluator) {
3659
+ console.warn("evaluator not found: " + arg.value);
3660
+ return [2 /*return*/, false];
3661
+ }
3662
+ return [4 /*yield*/, evaluator(context, arg.parameters || [])];
3663
+ case 2: return [2 /*return*/, _j.sent()];
3664
+ }
3665
+ });
3666
+ }); })];
3667
+ case 1: return [2 /*return*/, _j.sent()];
3668
+ }
3669
+ });
3670
+ }); },
3671
+ OR: function (context, args) { return __awaiter(_this, void 0, void 0, function () {
3672
+ var _this = this;
3673
+ return __generator(this, function (_j) {
3674
+ switch (_j.label) {
3675
+ case 0:
3676
+ if (!args || args.length === 0) {
3677
+ return [2 /*return*/, false];
3678
+ }
3679
+ return [4 /*yield*/, this.asyncSome(args, function (arg) { return __awaiter(_this, void 0, void 0, function () {
3680
+ var evaluator, res;
3681
+ return __generator(this, function (_j) {
3682
+ switch (_j.label) {
3683
+ case 0: return [4 /*yield*/, context.getEvaluator(arg.value)];
3684
+ case 1:
3685
+ evaluator = _j.sent();
3686
+ if (!evaluator) {
3687
+ console.warn("evaluator not found: " + arg.value);
3688
+ return [2 /*return*/, false];
3689
+ }
3690
+ return [4 /*yield*/, evaluator(context, arg.parameters || [])];
3691
+ case 2:
3692
+ res = _j.sent();
3693
+ return [2 /*return*/, res];
3694
+ }
3695
+ });
3696
+ }); })];
3697
+ case 1: return [2 /*return*/, _j.sent()];
3698
+ }
3699
+ });
3700
+ }); },
3701
+ isStatus: function (context, args) { return __awaiter(_this, void 0, void 0, function () {
3702
+ return __generator(this, function (_j) {
3703
+ if (args.indexOf(context.entity.state) > -1) {
3704
+ return [2 /*return*/, true];
3705
+ }
3706
+ else {
3707
+ return [2 /*return*/, false];
3708
+ }
3709
+ return [2 /*return*/];
3710
+ });
3711
+ }); },
3712
+ isCreator: function (context, args) { return __awaiter(_this, void 0, void 0, function () {
3713
+ var _a, _b, _c, _d, _e, _f, _g, _h, owner;
3714
+ return __generator(this, function (_j) {
3715
+ if ((_b = (_a = context.entity.properties.owner) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.username) {
3716
+ owner = (_d = (_c = context.entity.properties.owner) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.username;
3717
+ }
3718
+ else if ((_f = (_e = context.entity.properties["corr:owner"]) === null || _e === void 0 ? void 0 : _e.properties) === null || _f === void 0 ? void 0 : _f.username) {
3719
+ owner = (_h = (_g = context.entity.properties["corr:owner"]) === null || _g === void 0 ? void 0 : _g.properties) === null || _h === void 0 ? void 0 : _h.username;
3720
+ }
3721
+ else if (context.entity.properties.owner) {
3722
+ owner = context.entity.properties.owner;
3723
+ }
3724
+ else if (context.entity.properties["corr:owner"]) {
3725
+ owner = context.entity.properties["corr:owner"];
3726
+ }
3727
+ if (owner === context.user.properties.username) {
3728
+ return [2 /*return*/, true];
3729
+ }
3730
+ else {
3731
+ return [2 /*return*/, false];
3732
+ }
3733
+ return [2 /*return*/];
3734
+ });
3735
+ }); },
3736
+ isUserInrole: function (context, args) { return __awaiter(_this, void 0, void 0, function () {
3737
+ var result;
3738
+ return __generator(this, function (_j) {
3739
+ switch (_j.label) {
3740
+ case 0: return [4 /*yield*/, this.nuxeoService
3741
+ .isUserInRole(args, "")
3742
+ .pipe(operators.first())
3743
+ .toPromise()];
3744
+ case 1:
3745
+ result = _j.sent();
3746
+ return [2 /*return*/, result];
3747
+ }
3748
+ });
3749
+ }); },
3750
+ };
3751
+ this.getEvaluator = function (key) { return __awaiter(_this, void 0, void 0, function () {
3752
+ var eva, fn_1;
3753
+ var _this = this;
3754
+ return __generator(this, function (_j) {
3755
+ eva = this.evaluators;
3756
+ if (key && key.startsWith("!")) {
3757
+ fn_1 = eva[key.substring(1)];
3758
+ return [2 /*return*/, function (context, args) { return __awaiter(_this, void 0, void 0, function () {
3759
+ var result;
3760
+ return __generator(this, function (_j) {
3761
+ switch (_j.label) {
3762
+ case 0: return [4 /*yield*/, fn_1.apply(void 0, __spreadArray([context], __read(args)))];
3763
+ case 1:
3764
+ result = _j.sent();
3765
+ return [2 /*return*/, !result];
3766
+ }
3767
+ });
3768
+ }); }];
3769
+ }
3770
+ return [2 /*return*/, eva[key]];
3771
+ });
3772
+ }); };
3773
+ this.appConfigService.configLoaded.subscribe(function (ready) {
3774
+ if (ready) {
3775
+ _this.conditions = _this.getAllRules();
3776
+ }
3777
+ });
3778
+ }
3779
+ EvaluatorsService.prototype.setEvaluators = function (evaluators) {
3780
+ this.evaluators = Object.assign(Object.assign({}, this.evaluators), evaluators);
3781
+ };
3782
+ EvaluatorsService.prototype.getEvaluators = function () {
3783
+ return this.evaluators;
3680
3784
  };
3681
- HijriGregorianDatepickerComponent.prototype.gregClick = function () {
3682
- if (this.selectedDateType == DateType.Gregorian) {
3683
- return;
3684
- }
3685
- this.selectedDateType = DateType.Gregorian;
3686
- //to Gregorian
3687
- if (this.range) {
3688
- this.selectedDate = {
3689
- from: this.dateFormatterService.ToGregorian(this.selectedDate.from || null),
3690
- to: this.dateFormatterService.ToGregorian(this.selectedDate.to || null)
3691
- };
3692
- }
3693
- else {
3694
- this.selectedDate = this.dateFormatterService.ToGregorian(this.selectedDate);
3695
- }
3696
- this.selectedDateChange.emit(this.selectedDate);
3785
+ // ----------------------------------------------------
3786
+ EvaluatorsService.prototype.evaluateRule = function (ruleId, context) {
3787
+ return __awaiter(this, void 0, void 0, function () {
3788
+ var ruleRef, evaluator, evaluator;
3789
+ return __generator(this, function (_j) {
3790
+ switch (_j.label) {
3791
+ case 0:
3792
+ ruleRef = this.getRuleById(ruleId);
3793
+ context = context || this.context;
3794
+ context["getEvaluator"] = this.getEvaluator;
3795
+ if (!ruleRef) return [3 /*break*/, 4];
3796
+ return [4 /*yield*/, this.getEvaluator(ruleRef.type)];
3797
+ case 1:
3798
+ evaluator = _j.sent();
3799
+ if (!evaluator) return [3 /*break*/, 3];
3800
+ return [4 /*yield*/, evaluator(context, ruleRef.parameters)];
3801
+ case 2: return [2 /*return*/, _j.sent()];
3802
+ case 3: return [3 /*break*/, 7];
3803
+ case 4: return [4 /*yield*/, this.getEvaluator(ruleId)];
3804
+ case 5:
3805
+ evaluator = _j.sent();
3806
+ if (!evaluator) return [3 /*break*/, 7];
3807
+ return [4 /*yield*/, evaluator(context)];
3808
+ case 6: return [2 /*return*/, _j.sent()];
3809
+ case 7: return [2 /*return*/];
3810
+ }
3811
+ });
3812
+ });
3697
3813
  };
3698
- return HijriGregorianDatepickerComponent;
3699
- }());
3700
- HijriGregorianDatepickerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: HijriGregorianDatepickerComponent, deps: [{ token: DateFormatterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
3701
- HijriGregorianDatepickerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: HijriGregorianDatepickerComponent, selector: "hijri-gregorian-datepicker", inputs: { selectedDateType: "selectedDateType", selectedDate: "selectedDate", label: "label", showLabel: "showLabel", readonly: "readonly", isRequired: "isRequired", disabled: "disabled", disabledbtn: "disabledbtn", minHijri: "minHijri", maxHijri: "maxHijri", minGreg: "minGreg", maxGreg: "maxGreg", hijriLabel: "hijriLabel", GregLabel: "GregLabel", placeHolder: "placeHolder", range: "range", vertical: "vertical" }, outputs: { selectedDateChange: "selectedDateChange" }, viewQueries: [{ propertyName: "datePicker", first: true, predicate: ["d"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"form-group\" provideParentForm>\r\n <label class=\"requiredInput\" *ngIf=\"showLabel\" for=\"input-birth-Date\">{{ label }} </label>\r\n\r\n <div class=\"input-group\">\r\n <gregorian-date-picker [vertical]=\"vertical\" *ngIf=\"selectedDateType == DateType.Gregorian\" [range]=\"range\"\r\n [(selectedDate)]=\"selectedDate\" (selectedDateChange)=\"dateSelected($event)\" [readonly]=\"readonly\" [min]=\"minGreg\"\r\n [max]=\"maxGreg\" style=\"flex: 1 1 auto;\" [name]=\"label\" [isRequired]=\"isRequired\" [placeHolder]=\"placeHolder\"\r\n [disabled]=\"disabled\">\r\n </gregorian-date-picker>\r\n <hijri-date-picker [vertical]=\"vertical\" *ngIf=\"selectedDateType == DateType.Hijri\" [range]=\"range\"\r\n [(selectedDate)]=\"selectedDate\" (selectedDateChange)=\"dateSelected($event)\" [readonly]=\"readonly\" [min]=\"minHijri\"\r\n [max]=\"maxHijri\" style=\"flex: 1 1 auto;\" [name]=\"label\" [isRequired]=\"isRequired\" [placeHolder]=\"placeHolder\"\r\n [disabled]=\"disabled\">\r\n </hijri-date-picker>\r\n\r\n <div class=\"input-group-append\">\r\n <button class=\"btn btn-sm {{selectedDateType == DateType.Hijri ? 'btn-info focus active' : 'btn-outline-info'}}\"\r\n (click)=\"hijriClick()\" [disabled]=\"disabledbtn\" type=\"button\">\r\n {{hijriLabel ? hijriLabel : 'Hijri' }}\r\n </button>\r\n <button\r\n class=\"btn btn-sm {{selectedDateType == DateType.Gregorian ? 'btn-info focus active' : 'btn-outline-info'}}\"\r\n (click)=\"gregClick()\" [disabled]=\"disabledbtn\" type=\"button\">\r\n {{GregLabel ? GregLabel : 'Gregorian' }}\r\n </button>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", components: [{ type: GregorianDatepickerComponent, selector: "gregorian-date-picker", inputs: ["selectedDate", "readonly", "isRequired", "disabled", "min", "max", "name", "range", "vertical", "placeHolder"], outputs: ["selectedDateChange"] }, { type: HijriDatepickerComponent, selector: "hijri-date-picker", inputs: ["selectedDate", "readonly", "isRequired", "disabled", "min", "max", "name", "range", "vertical", "placeHolder"], outputs: ["selectedDateChange"] }], directives: [{ type: ProvideParentFormDirective, selector: "[provideParentForm]" }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3702
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: HijriGregorianDatepickerComponent, decorators: [{
3703
- type: i0.Component,
3704
- args: [{
3705
- selector: 'hijri-gregorian-datepicker',
3706
- templateUrl: './hijri-gregorian-datepicker.component.html'
3707
- }]
3708
- }], ctorParameters: function () { return [{ type: DateFormatterService }]; }, propDecorators: { datePicker: [{
3709
- type: i0.ViewChild,
3710
- args: ['d']
3711
- }], selectedDateType: [{
3712
- type: i0.Input
3713
- }], selectedDate: [{
3714
- type: i0.Input
3715
- }], selectedDateChange: [{
3716
- type: i0.Output
3717
- }], label: [{
3718
- type: i0.Input
3719
- }], showLabel: [{
3720
- type: i0.Input
3721
- }], readonly: [{
3722
- type: i0.Input
3723
- }], isRequired: [{
3724
- type: i0.Input
3725
- }], disabled: [{
3726
- type: i0.Input
3727
- }], disabledbtn: [{
3728
- type: i0.Input
3729
- }], minHijri: [{
3730
- type: i0.Input
3731
- }], maxHijri: [{
3732
- type: i0.Input
3733
- }], minGreg: [{
3734
- type: i0.Input
3735
- }], maxGreg: [{
3736
- type: i0.Input
3737
- }], hijriLabel: [{
3738
- type: i0.Input
3739
- }], GregLabel: [{
3740
- type: i0.Input
3741
- }], placeHolder: [{
3742
- type: i0.Input
3743
- }], range: [{
3744
- type: i0.Input
3745
- }], vertical: [{
3746
- type: i0.Input
3747
- }] } });
3748
-
3749
- /** @ignore */
3750
- var NgxHijriGregorianDatepickerModule = /** @class */ (function () {
3751
- function NgxHijriGregorianDatepickerModule() {
3752
- }
3753
- return NgxHijriGregorianDatepickerModule;
3754
- }());
3755
- NgxHijriGregorianDatepickerModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NgxHijriGregorianDatepickerModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3756
- NgxHijriGregorianDatepickerModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NgxHijriGregorianDatepickerModule, declarations: [HijriGregorianDatepickerComponent,
3757
- HijriDatepickerComponent,
3758
- GregorianDatepickerComponent,
3759
- ProvideParentFormDirective], imports: [i3.CommonModule,
3760
- i6.ReactiveFormsModule,
3761
- i1$1.TranslateModule,
3762
- i6.FormsModule,
3763
- i1$4.NgbModule], exports: [HijriGregorianDatepickerComponent] });
3764
- NgxHijriGregorianDatepickerModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NgxHijriGregorianDatepickerModule, providers: [
3765
- { provide: i1$4.NgbDateParserFormatter, useClass: CustomNgbDateParserFormatter },
3766
- DateFormatterService
3767
- ], imports: [[
3768
- i3.CommonModule,
3769
- i6.ReactiveFormsModule,
3770
- i1$1.TranslateModule,
3771
- i6.FormsModule,
3772
- i1$4.NgbModule
3773
- ]] });
3774
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: NgxHijriGregorianDatepickerModule, decorators: [{
3775
- type: i0.NgModule,
3776
- args: [{
3777
- declarations: [
3778
- HijriGregorianDatepickerComponent,
3779
- HijriDatepickerComponent,
3780
- GregorianDatepickerComponent,
3781
- ProvideParentFormDirective
3782
- ],
3783
- imports: [
3784
- i3.CommonModule,
3785
- i6.ReactiveFormsModule,
3786
- i1$1.TranslateModule,
3787
- i6.FormsModule,
3788
- i1$4.NgbModule
3789
- ],
3790
- providers: [
3791
- { provide: i1$4.NgbDateParserFormatter, useClass: CustomNgbDateParserFormatter },
3792
- DateFormatterService
3793
- ],
3794
- exports: [HijriGregorianDatepickerComponent]
3795
- }]
3796
- }] });
3797
-
3798
- /** @ignore */
3799
- var ClickOutsideDirective = /** @class */ (function () {
3800
- function ClickOutsideDirective(elementRef) {
3801
- this.elementRef = elementRef;
3802
- this.clickOutside = new i0.EventEmitter();
3803
- }
3804
- ClickOutsideDirective.prototype.onClick = function (target) {
3805
- var clickedInside = this.elementRef.nativeElement.contains(target);
3806
- if (!clickedInside) {
3807
- this.clickOutside.emit(target);
3808
- }
3814
+ EvaluatorsService.prototype.getRuleById = function (id) {
3815
+ return this.conditions[id] ? Object.assign({}, this.conditions[id]) : null;
3809
3816
  };
3810
- return ClickOutsideDirective;
3811
- }());
3812
- ClickOutsideDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: ClickOutsideDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
3813
- ClickOutsideDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.4", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: { clickOutside: "clickOutside" }, host: { listeners: { "window:click": "onClick($event.target)" } }, ngImport: i0__namespace });
3814
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: ClickOutsideDirective, decorators: [{
3815
- type: i0.Directive,
3816
- args: [{
3817
- selector: '[clickOutside]'
3818
- }]
3819
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { clickOutside: [{
3820
- type: i0.Output
3821
- }], onClick: [{
3822
- type: i0.HostListener,
3823
- args: ['window:click', ['$event.target']]
3824
- }] } });
3825
-
3826
- /** @ignore */
3827
- var SetRtlDirective = /** @class */ (function () {
3828
- function SetRtlDirective(elRef, renderer, translation) {
3829
- this.elRef = elRef;
3830
- this.renderer = renderer;
3831
- this.translation = translation;
3832
- this.switchClassBasedOnLanguage();
3833
- }
3834
- /*Switch rtl class based on the chosen language from Translation Service*/
3835
- SetRtlDirective.prototype.switchClassBasedOnLanguage = function () {
3836
- var _this = this;
3837
- this.translation.isArabic.subscribe(function (arabic) {
3838
- arabic
3839
- ? _this.renderer.addClass(_this.elRef.nativeElement, 'rtl')
3840
- : _this.renderer.removeClass(_this.elRef.nativeElement, 'rtl');
3841
- });
3817
+ EvaluatorsService.prototype.getAllRules = function () {
3818
+ return this.appConfigService.conditons;
3842
3819
  };
3843
- return SetRtlDirective;
3820
+ return EvaluatorsService;
3844
3821
  }());
3845
- SetRtlDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SetRtlDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.Renderer2 }, { token: TranslationService$1 }], target: i0__namespace.ɵɵFactoryTarget.Directive });
3846
- SetRtlDirectivedir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.4", type: SetRtlDirective, selector: "[SetRtl]", ngImport: i0__namespace });
3847
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SetRtlDirective, decorators: [{
3848
- type: i0.Directive,
3849
- args: [{
3850
- selector: '[SetRtl]',
3851
- }]
3852
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.Renderer2 }, { type: TranslationService$1 }]; } });
3822
+ EvaluatorsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: EvaluatorsService, deps: [{ token: NuxeoService$1 }, { token: AppConfigService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3823
+ EvaluatorsServiceprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: EvaluatorsService, providedIn: "root" });
3824
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: EvaluatorsService, decorators: [{
3825
+ type: i0.Injectable,
3826
+ args: [{ providedIn: "root" }]
3827
+ }], ctorParameters: function () { return [{ type: NuxeoService$1 }, { type: AppConfigService }]; } });
3853
3828
 
3854
3829
  /**
3855
3830
  * Permission directive shows or hides an element,
@@ -6436,6 +6411,26 @@
6436
6411
  manager: 'dept:manager',
6437
6412
  };
6438
6413
 
6414
+ var GlobalAdminService = /** @class */ (function () {
6415
+ function GlobalAdminService(evaluatorService) {
6416
+ this.evaluatorService = evaluatorService;
6417
+ this.isGlobalAdmin = false;
6418
+ this.activeTenant = null;
6419
+ }
6420
+ GlobalAdminService.prototype.checkIfGlobalAdmin = function () {
6421
+ return this.evaluatorService.evaluateRule('isGlobalAdmin');
6422
+ };
6423
+ return GlobalAdminService;
6424
+ }());
6425
+ GlobalAdminService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: GlobalAdminService, deps: [{ token: EvaluatorsService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
6426
+ GlobalAdminService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: GlobalAdminService, providedIn: 'root' });
6427
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: GlobalAdminService, decorators: [{
6428
+ type: i0.Injectable,
6429
+ args: [{
6430
+ providedIn: 'root'
6431
+ }]
6432
+ }], ctorParameters: function () { return [{ type: EvaluatorsService }]; } });
6433
+
6439
6434
  var departmentCacheBuster$ = new rxjs.Subject();
6440
6435
  var minute$1 = 60000;
6441
6436
  /** @ignore */
@@ -6452,14 +6447,9 @@
6452
6447
  _this.arabic = res;
6453
6448
  });
6454
6449
  }
6455
- DepartmentApiService.prototype.getDepartmentTree = function (customPageProvider) {
6456
- var params = {
6457
- pageProvider: customPageProvider ? customPageProvider : 'PP_Department',
6458
- currentPageIndex: 0,
6459
- offset: 0,
6460
- pageSize: 40,
6461
- quickFilters: 'Parent Dept'
6462
- };
6450
+ DepartmentApiService.prototype.getDepartmentTree = function (customPageProvider, customParams) {
6451
+ var obj = customParams ? customParams : {};
6452
+ var params = Object.assign({ pageProvider: customPageProvider ? customPageProvider : 'PP_Department', currentPageIndex: 0, offset: 0, pageSize: 40, quickFilters: 'Parent Dept' }, obj);
6463
6453
  if (this.globalAdminService.isGlobalAdmin) {
6464
6454
  params['queryParams'] = '/' + this.globalAdminService.activeTenant + '/';
6465
6455
  }
@@ -7078,7 +7068,7 @@
7078
7068
  }());
7079
7069
  DynamicFormTextItemComponent.DEFAULT_SEPARATOR = ', ';
7080
7070
  DynamicFormTextItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DynamicFormTextItemComponent, deps: [{ token: DynamicFormUpdateService }, { token: i1__namespace$1.TranslateService }, { token: i6__namespace.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
7081
- DynamicFormTextItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DynamicFormTextItemComponent, selector: "app-dynamic-form-textitem", inputs: { autoComplete: "autoComplete", nativeAutoComplete: "nativeAutoComplete", autoComplete_pageProvider: "autoComplete_pageProvider", autoComplete_propertyName: "autoComplete_propertyName", autoComplete_propertyKey: "autoComplete_propertyKey", autoCompleteValueKey: "autoCompleteValueKey", autoCompleteType: "autoCompleteType", tenantId: "tenantId", emitFullObject: "emitFullObject", outsideParams: "outsideParams", type: "type", property: "property", label: "label", editable: "editable", placeholder: "placeholder", disabled: "disabled", displayEmpty: "displayEmpty", preventSpace: "preventSpace", id: "id", maxCharsNum: "maxCharsNum" }, viewQueries: [{ propertyName: "editorInput", first: true, predicate: ["editorInput"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"app-property-value\">\r\n <div class=\"app-input-wrapper\">\r\n <label *ngIf=\"label\" for=\"formGroupInputSmall\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger m-1\">*</span></label\r\n >\r\n <div class=\"\">\r\n <ng-container *ngIf=\"isEditable(); else readOnly\">\r\n <div class=\"new-one\" (clickOutside)=\"openOptions(false)\">\r\n <input\r\n \r\n [id]=\"id\"\r\n [attr.disabled]=\"isDisabled() || null\"\r\n [type]=\"type\"\r\n class=\"form-control\"\r\n [ngClass]=\"{'input-filled' : (emitFullObject ? editedValue.title : editedValue) }\"\r\n (keydown.space)=\"allowSpace($event)\"\r\n #editorInput\r\n [required]=\"isRequired()\"\r\n [(ngModel)]=\"emitFullObject ? editedValue.title : editedValue\"\r\n [autocomplete]=\"nativeAutoComplete\"\r\n (ngModelChange)=\"update($event)\"\r\n (keyup)=\"waitUntilUserFinishTyping()\"\r\n [attr.data-automation-id]=\"'card-textitem-editinput-'\"\r\n placeholder=\"{{ placeholder | translate }}\"\r\n (focus)=\"openOptions(true)\"\r\n maxlength=\"{{maxCharsNum}}\"\r\n />\r\n <div *ngIf=\"documentList.length !== 0\" id=\"suggestedoptions\">\r\n <div\r\n class=\"suggestions-wrapper\"\r\n [ngClass]=\"{ 'd-block': showsuggestedOptions }\"\r\n >\r\n <div\r\n class=\"option\"\r\n id=\"suggestedoptions\"\r\n *ngFor=\"let option of documentList\"\r\n (click)=\"selectItem(option)\"\r\n >\r\n {{ option.title }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n >\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n {{ label | translate }} {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </li>\r\n <li *ngIf=\"control.errors.pattern\">\r\n {{ \"wrong pattern\" | translate }}\r\n </li>\r\n <li *ngIf=\"control.errors.min\">\r\n {{ \"VALIDATORS.MIN\" | translate }} {{ control.errors.min.min }}\r\n </li>\r\n </ul>\r\n </mat-error>\r\n </ng-container>\r\n <ng-template #readOnly>\r\n {{ emitFullObject ? editedValue.title : editedValue }}\r\n </ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".app-property-value .input-filled{border-color:#1a96c6!important}.app-property-value .app-input-wrapper label{color:#8f98aa;font-size:12px;margin-bottom:0}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;background-color:#8f98aa1a;border-radius:0;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .app-textitem-editable-error ul{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error ul li{margin-top:5px}.app-property-value .app-input-wrapper .new-one{position:relative}.app-property-value .app-input-wrapper .suggestions-wrapper{border-radius:3px;height:auto;max-height:240px;border:1px solid #ccc;box-shadow:2px 2px 2px #0000000f;overflow:auto;display:none;position:absolute;width:100%;background-color:#fff;z-index:99}.app-property-value .app-input-wrapper .suggestions-wrapper .option{margin-bottom:5px;padding:5px 10px;cursor:pointer}.app-property-value .app-input-wrapper .suggestions-wrapper .option:hover{background-color:#f5faff}\n"], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { type: i6__namespace.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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$2.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1__namespace$1.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
7071
+ DynamicFormTextItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DynamicFormTextItemComponent, selector: "app-dynamic-form-textitem", inputs: { autoComplete: "autoComplete", nativeAutoComplete: "nativeAutoComplete", autoComplete_pageProvider: "autoComplete_pageProvider", autoComplete_propertyName: "autoComplete_propertyName", autoComplete_propertyKey: "autoComplete_propertyKey", autoCompleteValueKey: "autoCompleteValueKey", autoCompleteType: "autoCompleteType", tenantId: "tenantId", emitFullObject: "emitFullObject", outsideParams: "outsideParams", type: "type", property: "property", label: "label", editable: "editable", placeholder: "placeholder", disabled: "disabled", displayEmpty: "displayEmpty", preventSpace: "preventSpace", id: "id", maxCharsNum: "maxCharsNum" }, viewQueries: [{ propertyName: "editorInput", first: true, predicate: ["editorInput"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"app-property-value\">\r\n <div class=\"app-input-wrapper\">\r\n <label *ngIf=\"label\" for=\"formGroupInputSmall\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger m-1\">*</span></label\r\n >\r\n <div class=\"\">\r\n <ng-container *ngIf=\"isEditable(); else readOnly\">\r\n <div class=\"new-one\" (clickOutside)=\"openOptions(false)\">\r\n <input\r\n \r\n [id]=\"id\"\r\n [attr.disabled]=\"isDisabled() || null\"\r\n [type]=\"type\"\r\n class=\"form-control\"\r\n [ngClass]=\"{'input-filled' : (emitFullObject ? (editedValue?.title) : editedValue) }\"\r\n (keydown.space)=\"allowSpace($event)\"\r\n #editorInput\r\n [required]=\"isRequired()\"\r\n [(ngModel)]=\"emitFullObject ? editedValue?.title : editedValue\"\r\n [autocomplete]=\"nativeAutoComplete\"\r\n (ngModelChange)=\"update($event)\"\r\n (keyup)=\"waitUntilUserFinishTyping()\"\r\n [attr.data-automation-id]=\"'card-textitem-editinput-'\"\r\n placeholder=\"{{ placeholder | translate }}\"\r\n (focus)=\"openOptions(true)\"\r\n maxlength=\"{{maxCharsNum}}\"\r\n />\r\n <div *ngIf=\"documentList.length !== 0\" id=\"suggestedoptions\">\r\n <div\r\n class=\"suggestions-wrapper\"\r\n [ngClass]=\"{ 'd-block': showsuggestedOptions }\"\r\n >\r\n <div\r\n class=\"option\"\r\n id=\"suggestedoptions\"\r\n *ngFor=\"let option of documentList\"\r\n (click)=\"selectItem(option)\"\r\n >\r\n {{ option.title }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n >\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n {{ label | translate }} {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </li>\r\n <li *ngIf=\"control.errors.pattern\">\r\n {{ \"wrong pattern\" | translate }}\r\n </li>\r\n <li *ngIf=\"control.errors.min\">\r\n {{ \"VALIDATORS.MIN\" | translate }} {{ control.errors.min.min }}\r\n </li>\r\n </ul>\r\n </mat-error>\r\n </ng-container>\r\n <ng-template #readOnly>\r\n {{ emitFullObject ? editedValue?.title : editedValue }}\r\n </ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".app-property-value .input-filled{border-color:#1a96c6!important}.app-property-value .app-input-wrapper label{color:#8f98aa;font-size:12px;margin-bottom:0}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;background-color:#8f98aa1a;border-radius:0;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .app-textitem-editable-error ul{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error ul li{margin-top:5px}.app-property-value .app-input-wrapper .new-one{position:relative}.app-property-value .app-input-wrapper .suggestions-wrapper{border-radius:3px;height:auto;max-height:240px;border:1px solid #ccc;box-shadow:2px 2px 2px #0000000f;overflow:auto;display:none;position:absolute;width:100%;background-color:#fff;z-index:99}.app-property-value .app-input-wrapper .suggestions-wrapper .option{margin-bottom:5px;padding:5px 10px;cursor:pointer}.app-property-value .app-input-wrapper .suggestions-wrapper .option:hover{background-color:#f5faff}\n"], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { type: i6__namespace.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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$2.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1__namespace$1.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
7082
7072
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DynamicFormTextItemComponent, decorators: [{
7083
7073
  type: i0.Component,
7084
7074
  args: [{
@@ -7866,13 +7856,14 @@
7866
7856
  */
7867
7857
  var TreeviewSelectComponent = /** @class */ (function () {
7868
7858
  // this component is used in two places the flag is this.treeview
7869
- function TreeviewSelectComponent(i18n, translation, departmentApiService, departmentManagment, rolesService, nuxeoService) {
7859
+ function TreeviewSelectComponent(i18n, translation, departmentApiService, departmentManagment, rolesService, nuxeoService, globalAdmin) {
7870
7860
  this.i18n = i18n;
7871
7861
  this.translation = translation;
7872
7862
  this.departmentApiService = departmentApiService;
7873
7863
  this.departmentManagment = departmentManagment;
7874
7864
  this.rolesService = rolesService;
7875
7865
  this.nuxeoService = nuxeoService;
7866
+ this.globalAdmin = globalAdmin;
7876
7867
  this.multipleSelection = [];
7877
7868
  this.selectedParentWithChild = [];
7878
7869
  this.showPlus = false;
@@ -7959,7 +7950,12 @@
7959
7950
  };
7960
7951
  TreeviewSelectComponent.prototype.selectDefault = function () {
7961
7952
  var _this = this;
7962
- this.myDepartment = this.rolesService.getUserDepartment(this.nuxeoService.nuxeoClient.user);
7953
+ var option = {
7954
+ 'isGlobalAdmin': this.globalAdmin.isGlobalAdmin,
7955
+ 'activeTenant': this.globalAdmin.activeTenant,
7956
+ 'tenantId': this.nuxeoService.nuxeoClient.user.properties.tenantId
7957
+ };
7958
+ this.myDepartment = this.rolesService.getUserDepartment(this.nuxeoService.nuxeoClient.user, 'cts_role_', option);
7963
7959
  this.items.map(function (item) {
7964
7960
  _this.setPreSeletedItem(item, _this.myDepartment);
7965
7961
  });
@@ -8108,7 +8104,7 @@
8108
8104
  };
8109
8105
  return TreeviewSelectComponent;
8110
8106
  }());
8111
- TreeviewSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: TreeviewSelectComponent, deps: [{ token: i1__namespace$2.TreeviewI18n }, { token: TranslationService$1 }, { token: DepartmentApiService }, { token: DepartmentManagementService$1 }, { token: RolesService$1 }, { token: NuxeoService$1 }], target: i0__namespace.ɵɵFactoryTarget.Component });
8107
+ TreeviewSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: TreeviewSelectComponent, deps: [{ token: i1__namespace$2.TreeviewI18n }, { token: TranslationService$1 }, { token: DepartmentApiService }, { token: DepartmentManagementService$1 }, { token: RolesService$1 }, { token: NuxeoService$1 }, { token: GlobalAdminService }], target: i0__namespace.ɵɵFactoryTarget.Component });
8112
8108
  TreeviewSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: TreeviewSelectComponent, selector: "app-dynamic-form-treeview-select", inputs: { treeview: "treeview", treeViewAsFormControl: "treeViewAsFormControl", config: "config", items: "items", value: "value", multiple: "multiple", defaultSelect: "defaultSelect", pp_departmentNestedTree: "pp_departmentNestedTree", useCustomAddEditAction: "useCustomAddEditAction", customPrefix: "customPrefix", customParentProperty: "customParentProperty", placeholder: "placeholder" }, outputs: { valueChange: "valueChange", plusClicked: "plusClicked", actionClicked: "actionClicked" }, providers: [{ provide: i1$2.TreeviewI18n, useClass: DropdownTreeviewSelectI18n }], viewQueries: [{ propertyName: "dropdownTreeviewComponent", first: true, predicate: i1$2.DropdownTreeviewComponent, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<ng-template\r\n #itemTemplate\r\n let-item=\"item\"\r\n let-onCollapseExpand=\"onCollapseExpand\"\r\n let-onCheckedChange=\"onCheckedChange\"\r\n>\r\n <!-- single -->\r\n <div *ngIf=\"!treeview && !multiple\">\r\n <div\r\n class=\"text-nowrap row-item\"\r\n [ngClass]=\"{ active: item.value === this.value }\"\r\n >\r\n <i\r\n *ngIf=\"item.children\"\r\n (click)=\"onCollapseExpand()\"\r\n aria-hidden=\"true\"\r\n [ngSwitch]=\"item.collapsed\"\r\n >\r\n <span\r\n *ngSwitchCase=\"true\"\r\n class=\"bi bi-caret-{{ arabic ? 'left' : 'right' }}-fill caret-icon\"\r\n ></span>\r\n <span\r\n *ngSwitchCase=\"false\"\r\n class=\"bi bi-caret-down-fill caret-icon\"\r\n ></span>\r\n </i>\r\n <!-- <label class=\"form-check-label\" (click)=\"select(item)\">{{\r\n item.text\r\n }}</label> -->\r\n <label *ngIf=\"item.disabled\" class=\"form-check-label\">{{\r\n item.text\r\n }}</label>\r\n <label *ngIf=\"!item.disabled\" class=\"form-check-label\" (click)=\"select(item)\">{{\r\n item.text\r\n }}</label>\r\n </div>\r\n </div>\r\n <!-- Multiple -->\r\n <div *ngIf=\"!treeview && multiple\">\r\n <div\r\n class=\"text-nowrap row-item\"\r\n [ngClass]=\"{ active: item.value === this.value }\"\r\n >\r\n <i\r\n *ngIf=\"item.children\"\r\n (click)=\"onCollapseExpand()\"\r\n aria-hidden=\"true\"\r\n [ngSwitch]=\"item.collapsed\"\r\n >\r\n <span\r\n *ngSwitchCase=\"true\"\r\n class=\"bi bi-caret-{{ arabic ? 'left' : 'right' }}-fill caret-icon\"\r\n ></span>\r\n <span\r\n *ngSwitchCase=\"false\"\r\n class=\"bi bi-caret-down-fill caret-icon\"\r\n ></span>\r\n </i>\r\n <!-- <input\r\n class=\"multiple-checkBox\"\r\n type=\"checkbox\"\r\n [checked]=\"multipleSelection.includes(item.value)\"\r\n (change)=\"selectMultiple($event.target.checked, item)\"\r\n />\r\n\r\n <label class=\"form-check-label\">{{ item.text }}</label> -->\r\n <div class=\"multiple-treeview\">\r\n <mat-checkbox\r\n [checked]=\"multipleSelection.includes(item.value)\"\r\n (change)=\"selectMultiple($event.checked, item)\"\r\n >\r\n <span> {{ item.text }} </span>\r\n </mat-checkbox>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- treeView -->\r\n <div *ngIf=\"treeview && !treeViewAsFormControl\" class=\"tree-view-container\">\r\n <div\r\n (mouseenter)=\"hoverField.style.display = 'flex'\"\r\n (mouseleave)=\"hoverField.style.display = 'none'\"\r\n class=\"text-nowrap row-item treeview-row\"\r\n [ngClass]=\"{ selected: item.value == selectedItem }\"\r\n >\r\n <i\r\n *ngIf=\"item.children\"\r\n (click)=\"onCollapsed(item)\"\r\n aria-hidden=\"true\"\r\n [ngSwitch]=\"item.collapsed\"\r\n >\r\n <span\r\n *ngSwitchCase=\"true\"\r\n class=\"bi bi-caret-{{ arabic ? 'left' : 'right' }}-fill caret-icon\"\r\n ></span>\r\n\r\n <span\r\n *ngSwitchCase=\"false\"\r\n class=\"bi bi-caret-down-fill caret-icon\"\r\n ></span>\r\n </i>\r\n <label class=\"form-check-label-treeview\" (click)=\"select(item)\"\r\n >{{ item.text }}\r\n <span #hoverField class=\"hoverField\">\r\n <span\r\n type=\"button\"\r\n matTooltip=\"{{ 'department_management.form.edit' | translate }}\"\r\n (click)=\"onAction($event, 'update', item)\"\r\n >\r\n <li class=\"bi bi-pencil\"></li>\r\n </span>\r\n\r\n <span\r\n type=\"button\"\r\n matTooltip=\"{{\r\n 'department_management.form.toolTip_message' | translate\r\n }}\"\r\n (click)=\"onAction($event, 'add', item)\"\r\n >\r\n <li class=\"bi bi-plus\"></li>\r\n </span>\r\n </span>\r\n </label>\r\n </div>\r\n </div>\r\n <!-- treeView as form control -->\r\n <div *ngIf=\"treeview && treeViewAsFormControl\" class=\"tree-view-container\">\r\n <div\r\n class=\"text-nowrap row-item treeview-row-form-control\"\r\n [ngClass]=\"{ 'selected-form-control': item.value == selectedItem }\"\r\n >\r\n <i\r\n *ngIf=\"item.children\"\r\n (click)=\"onCollapsed(item)\"\r\n aria-hidden=\"true\"\r\n [ngSwitch]=\"item.collapsed\"\r\n >\r\n <span\r\n *ngSwitchCase=\"true\"\r\n class=\"bi bi-caret-{{ arabic ? 'left' : 'right' }}-fill caret-icon\"\r\n ></span>\r\n \r\n <span\r\n *ngSwitchCase=\"false\"\r\n class=\"bi bi-caret-down-fill caret-icon\"\r\n ></span>\r\n </i>\r\n <label class=\"form-check-label-treeview\" (click)=\"select(item)\"\r\n >{{ item.text }}\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template>\r\n<ng-template\r\n #headerTemplate\r\n let-config=\"config\"\r\n let-item=\"item\"\r\n let-onCollapseExpand=\"onCollapseExpand\"\r\n let-onCheckedChange=\"onCheckedChange\"\r\n let-onFilterTextChange=\"onFilterTextChange\"\r\n>\r\n <div *ngIf=\"config.hasFilter\" class=\"row row-filter\">\r\n <div class=\"col-12\">\r\n <input\r\n class=\"form-control\"\r\n type=\"text\"\r\n [placeholder]=\"i18n.getFilterPlaceholder(placeholder)\"\r\n [(ngModel)]=\"filterText\"\r\n (ngModelChange)=\"onFilterTextChange($event)\"\r\n />\r\n </div>\r\n </div>\r\n <div *ngIf=\"config.hasAllCheckBox || config.hasCollapseExpand\" class=\"row\">\r\n <div class=\"col-12\">\r\n <label *ngIf=\"config.hasAllCheckBox\" (click)=\"select(item)\">\r\n <strong>{{ i18n.getAllCheckboxText() }}</strong>\r\n </label>\r\n <label\r\n *ngIf=\"config.hasCollapseExpand\"\r\n class=\"float-right\"\r\n (click)=\"onCollapseExpand()\"\r\n >\r\n <i\r\n [title]=\"i18n.getTooltipCollapseExpandText(item.collapsed)\"\r\n aria-hidden=\"true\"\r\n [ngSwitch]=\"item.collapsed\"\r\n >\r\n <span *ngSwitchCase=\"true\" class=\"bi bi-arrows-angle-expand\"></span>\r\n <span\r\n *ngSwitchCase=\"false\"\r\n class=\"bi bi-arrows-angle-contract\"\r\n ></span>\r\n </i>\r\n </label>\r\n </div>\r\n </div>\r\n <a *ngIf=\"defaultSelect\" class=\"select-default\" (click)=\"selectDefault()\">{{'department_management.selectDefault'| translate}}</a>\r\n <div *ngIf=\"config.hasDivider\" class=\"dropdown-divider\" [ngClass]=\"{'dropdown-divider-noMargin': defaultSelect}\"></div>\r\n</ng-template>\r\n\r\n<ng-container *ngIf=\"!treeview && !multiple\">\r\n <ngx-dropdown-treeview\r\n [config]=\"config\"\r\n [headerTemplate]=\"headerTemplate\"\r\n [items]=\"items\"\r\n [itemTemplate]=\"itemTemplate\"\r\n >\r\n </ngx-dropdown-treeview\r\n></ng-container>\r\n<ng-container *ngIf=\"!treeview && multiple\">\r\n <div class=\"multiple-tree-view\">\r\n <ngx-dropdown-treeview\r\n [config]=\"config\"\r\n [items]=\"items\"\r\n [itemTemplate]=\"itemTemplate\"\r\n >\r\n </ngx-dropdown-treeview>\r\n </div>\r\n</ng-container>\r\n<ng-container *ngIf=\"treeview && !treeViewAsFormControl\">\r\n <div class=\"tree-view\">\r\n <ngx-treeview\r\n [config]=\"config\"\r\n [headerTemplate]=\"headerTemplate\"\r\n [items]=\"items\"\r\n [itemTemplate]=\"itemTemplate\"\r\n >\r\n </ngx-treeview>\r\n </div>\r\n</ng-container>\r\n<ng-container *ngIf=\"treeview && treeViewAsFormControl\">\r\n <div class=\"tree-view-form-control\">\r\n <ngx-treeview\r\n [config]=\"config\"\r\n [headerTemplate]=\"headerTemplate\"\r\n [items]=\"items\"\r\n [itemTemplate]=\"itemTemplate\"\r\n >\r\n </ngx-treeview>\r\n </div>\r\n</ng-container>\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.caret-icon{color:#6c757d;font-size:14px}.multiple-treeview .mat-checkbox-ripple .mat-ripple-element,.multiple-treeview .mat-checkbox-checked.mat-accent .mat-checkbox-background{background-color:#33e3b7!important}.multiple-treeview .mat-checkbox-ripple .mat-ripple-element{position:fixed;left:inherit;top:inherit;transform:translate(-3px,-3px)!important}.multiple-treeview mat-checkbox .mat-checkbox-background{background-color:#d9dce2!important}.form-check-label-treeview{display:flex;align-items:center;justify-content:space-between;width:100%}.form-check-label-treeview .hoverField{display:none;align-items:center;text-align:center}.form-check-label-treeview .hoverField span{display:flex;align-items:center;justify-content:center;margin:0 3px;border:none;background-color:snow;background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:30px;width:30px;color:#fff;border-radius:5px;list-style:none;margin-inline-end:4px}.form-check-label-treeview .hoverField span .bi-plus{font-size:28px;display:flex;justify-content:center}.form-check-label-treeview .hoverField .add-btn{width:164px;padding:1px;display:flex;justify-content:center;align-items:center;font-size:13px;background-color:#0dbab5;border-radius:5px;border:0;color:#fff;--tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.form-check-label-treeview .hoverField .plus-btn{display:flex;font-size:28px;align-items:center}.selected{background-color:#f5f6f8}.selected .hoverField{display:flex!important}.selected-form-control{background-color:#d9dce2}.selected-form-control .hoverField{display:flex!important}.treeview-item .row-item{display:flex;align-items:center;padding:5px 10px}.treeview-item .row-item .multiple-checkBox{margin-inline-start:4px;margin-inline-end:4px}.treeview-item .active{background-color:#f5f6f8}.treeview-row{display:flex;align-items:center}.treeview-row:hover{background-color:#f5f6f8}.treeview-row-form-control{display:flex;align-items:center}.treeview-row-form-control:hover{background-color:#d9dce2}label{margin-bottom:0;cursor:pointer}.bi{cursor:pointer;margin-right:.3rem}ngx-treeview .treeview-container{max-height:200px!important;overflow-x:hidden;scrollbar-color:#b4bac6 transparent!important;scrollbar-width:thin!important;overflow-y:auto}ngx-treeview .select-default{display:flex;justify-content:start;font-size:13px;cursor:pointer;margin-bottom:3px;margin-top:4px}ngx-treeview .dropdown-divider-noMargin{margin-top:0!important}.tree-view ngx-treeview .treeview-container{max-height:500px!important;overflow-x:hidden}.tree-view-form-control ngx-treeview .treeview-container{max-height:300px!important;overflow-x:hidden}ngx-dropdown-treeview .dropdown .dropdown-menu{margin-top:0!important;width:100%}ngx-dropdown-treeview .dropdown .btn-outline-secondary{background-color:#8f98aa1a;border:none!important}ngx-dropdown-treeview .dropdown .btn-outline-secondary:hover{color:#6c757d!important}ngx-dropdown-treeview .dropdown .btn-outline-secondary:focus{box-shadow:none!important}ngx-dropdown-treeview .dropdown .btn-outline-secondary:active{background-color:#8f98aa1a!important;border:none!important;color:#6c757d!important}ngx-dropdown-treeview .dropdown:after{position:static!important}ngx-dropdown-treeview .show .dropdown-toggle{background-color:#8f98aa1a!important;border:none!important;color:#6c757d!important}.rtl .treeview-item .treeview-item{margin-right:2rem!important;margin-left:0!important}.rtl .row-all .col-12{text-align:right}.rtl .row-all .col-12 .pull-right{float:left!important}.rtl .form-check.form-check-inline{margin-right:0!important}.rtl .btn.dropdown-toggle{margin-right:0!important}.rtl .dropdown-menu:not(ngb-datepicker){right:0px;left:unset}.rtl .dropdown :after{margin-top:.6rem;left:.6rem;right:unset!important}.rtl ngx-treeview-item{text-align:right;direction:rtl}@media (min-width: 576px){.rtl .form-inline .form-check-input{margin:3px}}.rtl .form-inline .form-check-input{margin:3px;position:inherit}.rtl .dropdown button{text-align:right!important;direction:rtl}.rtl .fa.fa-caret-right{transform:rotate(180deg)}\n"], components: [{ type: i7__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i1__namespace$2.DropdownTreeviewComponent, selector: "ngx-dropdown-treeview", inputs: ["buttonClass", "config", "headerTemplate", "itemTemplate", "items"], outputs: ["selectedChange", "filterChange"] }, { type: i1__namespace$2.TreeviewComponent, selector: "ngx-treeview", inputs: ["config", "headerTemplate", "itemTemplate", "items"], outputs: ["selectedChange", "filterChange"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i8__namespace$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i6__namespace.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: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1__namespace$1.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
8113
8109
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: TreeviewSelectComponent, decorators: [{
8114
8110
  type: i0.Component,
@@ -8119,7 +8115,7 @@
8119
8115
  encapsulation: i0.ViewEncapsulation.None,
8120
8116
  providers: [{ provide: i1$2.TreeviewI18n, useClass: DropdownTreeviewSelectI18n }],
8121
8117
  }]
8122
- }], ctorParameters: function () { return [{ type: i1__namespace$2.TreeviewI18n }, { type: TranslationService$1 }, { type: DepartmentApiService }, { type: DepartmentManagementService$1 }, { type: RolesService$1 }, { type: NuxeoService$1 }]; }, propDecorators: { treeview: [{
8118
+ }], ctorParameters: function () { return [{ type: i1__namespace$2.TreeviewI18n }, { type: TranslationService$1 }, { type: DepartmentApiService }, { type: DepartmentManagementService$1 }, { type: RolesService$1 }, { type: NuxeoService$1 }, { type: GlobalAdminService }]; }, propDecorators: { treeview: [{
8123
8119
  type: i0.Input
8124
8120
  }], treeViewAsFormControl: [{
8125
8121
  type: i0.Input
@@ -8182,6 +8178,8 @@
8182
8178
  /** is tree searchable */
8183
8179
  this.searchable = true;
8184
8180
  this.defaultSelect = false;
8181
+ /** to allow custom paramsto be passed to get departments request from outside the component */
8182
+ this.customParams = {};
8185
8183
  /** emitted when item is selected */
8186
8184
  this.onSelecting = new i0.EventEmitter();
8187
8185
  /** emitted when action is clicked */
@@ -8300,7 +8298,7 @@
8300
8298
  return __awaiter(this, void 0, void 0, function () {
8301
8299
  var _this = this;
8302
8300
  return __generator(this, function (_a) {
8303
- this.departmentApi.getDepartmentTree(this.pp_departmentTree).subscribe(function (res) { return __awaiter(_this, void 0, void 0, function () {
8301
+ this.departmentApi.getDepartmentTree(this.pp_departmentTree, this.customParams).subscribe(function (res) { return __awaiter(_this, void 0, void 0, function () {
8304
8302
  var _a;
8305
8303
  return __generator(this, function (_b) {
8306
8304
  switch (_b.label) {
@@ -8355,7 +8353,7 @@
8355
8353
  return DynamicFormDepartmentComponent;
8356
8354
  }());
8357
8355
  DynamicFormDepartmentComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DynamicFormDepartmentComponent, deps: [{ token: TranslationService$1 }, { token: DepartmentApiService }, { token: i6__namespace.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
8358
- DynamicFormDepartmentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: { treeview: "treeview", treeViewAsFormControl: "treeViewAsFormControl", placeholder: "placeholder", multiple: "multiple", searchable: "searchable", label: "label", defaultSelect: "defaultSelect", pp_departmentNestedTree: "pp_departmentNestedTree", pp_departmentTree: "pp_departmentTree", customPrefix: "customPrefix", useCustomAddEditAction: "useCustomAddEditAction", customParentProperty: "customParentProperty" }, outputs: { onSelecting: "onSelecting", actionClicked: "actionClicked" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"label\">\r\n <div>\r\n <label class=\"select-label\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger m-1\">*</span></label\r\n >\r\n </div>\r\n</ng-container>\r\n<app-dynamic-form-treeview-select\r\n [treeview]=\"treeview\"\r\n [treeViewAsFormControl]=\"treeViewAsFormControl\"\r\n [defaultSelect]=\"defaultSelect\"\r\n [multiple]=\"multiple\"\r\n [items]=\"data\"\r\n [pp_departmentNestedTree]=\"pp_departmentNestedTree\"\r\n [useCustomAddEditAction]=\"useCustomAddEditAction\"\r\n [customPrefix]=\"customPrefix\"\r\n [customParentProperty]=\"customParentProperty\"\r\n (valueChange)=\"getSelecteditems($event)\"\r\n [(value)]=\"selection\"\r\n (actionClicked)=\"onAction($event)\"\r\n class=\"dropdown-wrapper\"\r\n [ngClass]=\"{'input-filled' : selection && selection.length > 0 }\"\r\n>\r\n</app-dynamic-form-treeview-select>\r\n<mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n>\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </li>\r\n </ul>\r\n</mat-error>\r\n", styles: ["app-dynamic-form-department .dropdown{border:1px solid #ccc!important;border-radius:5px!important}app-dynamic-form-department .input-filled .dropdown{border-color:#1a96c6!important}\n"], components: [{ type: TreeviewSelectComponent, selector: "app-dynamic-form-treeview-select", inputs: ["treeview", "treeViewAsFormControl", "config", "items", "value", "multiple", "defaultSelect", "pp_departmentNestedTree", "useCustomAddEditAction", "customPrefix", "customParentProperty", "placeholder"], outputs: ["valueChange", "plusClicked", "actionClicked"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace$2.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1__namespace$1.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
8356
+ DynamicFormDepartmentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: { treeview: "treeview", treeViewAsFormControl: "treeViewAsFormControl", placeholder: "placeholder", multiple: "multiple", searchable: "searchable", label: "label", defaultSelect: "defaultSelect", pp_departmentNestedTree: "pp_departmentNestedTree", pp_departmentTree: "pp_departmentTree", customPrefix: "customPrefix", useCustomAddEditAction: "useCustomAddEditAction", customParentProperty: "customParentProperty", customParams: "customParams" }, outputs: { onSelecting: "onSelecting", actionClicked: "actionClicked" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"label\">\r\n <div>\r\n <label class=\"select-label\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger m-1\">*</span></label\r\n >\r\n </div>\r\n</ng-container>\r\n<app-dynamic-form-treeview-select\r\n [treeview]=\"treeview\"\r\n [treeViewAsFormControl]=\"treeViewAsFormControl\"\r\n [defaultSelect]=\"defaultSelect\"\r\n [multiple]=\"multiple\"\r\n [items]=\"data\"\r\n [pp_departmentNestedTree]=\"pp_departmentNestedTree\"\r\n [useCustomAddEditAction]=\"useCustomAddEditAction\"\r\n [customPrefix]=\"customPrefix\"\r\n [customParentProperty]=\"customParentProperty\"\r\n (valueChange)=\"getSelecteditems($event)\"\r\n [(value)]=\"selection\"\r\n (actionClicked)=\"onAction($event)\"\r\n class=\"dropdown-wrapper\"\r\n [ngClass]=\"{'input-filled' : selection && selection.length > 0 }\"\r\n>\r\n</app-dynamic-form-treeview-select>\r\n<mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n>\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </li>\r\n </ul>\r\n</mat-error>\r\n", styles: ["app-dynamic-form-department .dropdown{border:1px solid #ccc!important;border-radius:5px!important}app-dynamic-form-department .input-filled .dropdown{border-color:#1a96c6!important}\n"], components: [{ type: TreeviewSelectComponent, selector: "app-dynamic-form-treeview-select", inputs: ["treeview", "treeViewAsFormControl", "config", "items", "value", "multiple", "defaultSelect", "pp_departmentNestedTree", "useCustomAddEditAction", "customPrefix", "customParentProperty", "placeholder"], outputs: ["valueChange", "plusClicked", "actionClicked"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace$2.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1__namespace$1.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
8359
8357
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DynamicFormDepartmentComponent, decorators: [{
8360
8358
  type: i0.Component,
8361
8359
  args: [{
@@ -8394,6 +8392,8 @@
8394
8392
  type: i0.Input
8395
8393
  }], customParentProperty: [{
8396
8394
  type: i0.Input
8395
+ }], customParams: [{
8396
+ type: i0.Input
8397
8397
  }], onSelecting: [{
8398
8398
  type: i0.Output
8399
8399
  }], actionClicked: [{
@@ -18047,7 +18047,7 @@
18047
18047
  return FilterComponent;
18048
18048
  }());
18049
18049
  FilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FilterComponent, deps: [{ token: i6__namespace.FormBuilder }], target: i0__namespace.ɵɵFactoryTarget.Component });
18050
- FilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FilterComponent, selector: "cts-filter", inputs: { fields: "fields", filterTitle: "filterTitle" }, outputs: { onFiltering: "onFiltering" }, ngImport: i0__namespace, template: "<div class=\"filter-wrapper\">\r\n <div class=\"filter-title\">\r\n <!-- {{filterTitle | translate}} -->\r\n </div>\r\n <div class=\"iner-filter-wrapper\" *ngIf=\"filterForm\">\r\n <form [formGroup]=\"filterForm\">\r\n <div class=\"single-control-wrapper\" *ngFor=\"let field of fields\">\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'text'\">\r\n <app-dynamic-form-textitem\r\n [label]=\"field.label\"\r\n [formControlName]=\"field.formControlName\"\r\n placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{\r\n field.placeholder | translate\r\n }}\"\r\n >\r\n </app-dynamic-form-textitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'dropdown'\">\r\n <app-dynamic-form-vocabulary-item\r\n [shwoAllValues]=\"false\"\r\n [label]=\"field.label\"\r\n [bindLabel]=\"field.bindLabel\"\r\n [bindValue]=\"field.bindValue\"\r\n [placeholder]=\"field.placeholder | translate\"\r\n [multiple]=\"field.multiple\"\r\n [searchable]=\"field.searchable\"\r\n [closeOnSelect]=\"field.closeOnSelect\"\r\n [hideSelectedItems]=\"field.hideSelectedItems\"\r\n [vocabularyType]=\"field.vocabularyType\"\r\n [formControlName]=\"field.formControlName\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'rang'\">\r\n <cts-dynamic-form-hijri-dateitem [label]=\"field.label\" [formControlName]=\"field.formControlName\"[range]=\"true\" [vertical]=\"false\" >\r\n </cts-dynamic-form-hijri-dateitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'department'\">\r\n <app-dynamic-form-department\r\n [label]=\"field.label\"\r\n placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{\r\n field.placeholder | translate\r\n }}\"\r\n [formControlName]=\"field.formControlName\"\r\n >\r\n </app-dynamic-form-department>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'toggle'\">\r\n <cts-dynamic-form-slide-toggleitem\r\n [label]=\"field.label\"\r\n [formControlName]=\"field.formControlName\"\r\n ></cts-dynamic-form-slide-toggleitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'date'\">\r\n <cts-dynamic-form-hijri-dateitem\r\n [formControlName]=\"field.formControlName\"\r\n [label]=\"field.label\"\r\n >\r\n </cts-dynamic-form-hijri-dateitem>\r\n </div>\r\n \r\n\r\n </div>\r\n\r\n </form>\r\n \r\n </div>\r\n <div class=\"form-actions\">\r\n <button class=\"my-button mx-2\" type=\"button\" (click)=\"filter()\"> {{'FILTER' | translate}}</button>\r\n <button class=\"my-button reset mx-2\" type=\"button\" (click)=\"reset()\"> {{'reset' | translate}}</button>\r\n </div>\r\n</div>\r\n\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.filter-wrapper .filter-title{font-size:18px;font-weight:bold;margin-bottom:15px}.filter-wrapper .iner-filter-wrapper{height:320px;overflow:auto;scrollbar-color:#b4bac6 transparent!important;scrollbar-width:thin!important;padding:15px 15px 0}.filter-wrapper .iner-filter-wrapper .single-control-wrapper{margin-bottom:15px}.filter-wrapper .form-actions{display:flex;justify-content:flex-start;align-content:center;padding:10px 15px}.filter-wrapper .form-actions .filter{border:none;background-color:transparent;font-weight:bold;width:80px;height:40px;background-image:linear-gradient(to bottom,#0dbab5,#2e62df);color:#fff;border-radius:5px}\n"], components: [{ type: DynamicFormTextItemComponent, selector: "app-dynamic-form-textitem", inputs: ["autoComplete", "nativeAutoComplete", "autoComplete_pageProvider", "autoComplete_propertyName", "autoComplete_propertyKey", "autoCompleteValueKey", "autoCompleteType", "tenantId", "emitFullObject", "outsideParams", "type", "property", "label", "editable", "placeholder", "disabled", "displayEmpty", "preventSpace", "id", "maxCharsNum"] }, { type: DynamicFormVocabularyItemComponent, selector: "app-dynamic-form-vocabulary-item", inputs: ["bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "disabled", "vocabularyType", "label", "cacheable", "shwoAllValues"], outputs: ["onSelecting"] }, { type: DynamicFormHijriDateitemComponent, selector: "cts-dynamic-form-hijri-dateitem", inputs: ["minHijri", "maxHijri", "minGreg", "maxGreg", "label", "isDisabled", "range", "vertical", "isReadOnly", "placeholder"], outputs: ["valueChanged"] }, { type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: ["treeview", "treeViewAsFormControl", "placeholder", "multiple", "searchable", "label", "defaultSelect", "pp_departmentNestedTree", "pp_departmentTree", "customPrefix", "useCustomAddEditAction", "customParentProperty"], outputs: ["onSelecting", "actionClicked"] }, { type: DynamicFormSlideToggleitemComponent, selector: "cts-dynamic-form-slide-toggleitem", inputs: ["label", "disabled", "checked", "theme"], outputs: ["onToggle"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1__namespace$1.TranslatePipe } });
18050
+ FilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FilterComponent, selector: "cts-filter", inputs: { fields: "fields", filterTitle: "filterTitle" }, outputs: { onFiltering: "onFiltering" }, ngImport: i0__namespace, template: "<div class=\"filter-wrapper\">\r\n <div class=\"filter-title\">\r\n <!-- {{filterTitle | translate}} -->\r\n </div>\r\n <div class=\"iner-filter-wrapper\" *ngIf=\"filterForm\">\r\n <form [formGroup]=\"filterForm\">\r\n <div class=\"single-control-wrapper\" *ngFor=\"let field of fields\">\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'text'\">\r\n <app-dynamic-form-textitem\r\n [label]=\"field.label\"\r\n [formControlName]=\"field.formControlName\"\r\n placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{\r\n field.placeholder | translate\r\n }}\"\r\n >\r\n </app-dynamic-form-textitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'dropdown'\">\r\n <app-dynamic-form-vocabulary-item\r\n [shwoAllValues]=\"false\"\r\n [label]=\"field.label\"\r\n [bindLabel]=\"field.bindLabel\"\r\n [bindValue]=\"field.bindValue\"\r\n [placeholder]=\"field.placeholder | translate\"\r\n [multiple]=\"field.multiple\"\r\n [searchable]=\"field.searchable\"\r\n [closeOnSelect]=\"field.closeOnSelect\"\r\n [hideSelectedItems]=\"field.hideSelectedItems\"\r\n [vocabularyType]=\"field.vocabularyType\"\r\n [formControlName]=\"field.formControlName\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'rang'\">\r\n <cts-dynamic-form-hijri-dateitem [label]=\"field.label\" [formControlName]=\"field.formControlName\"[range]=\"true\" [vertical]=\"false\" >\r\n </cts-dynamic-form-hijri-dateitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'department'\">\r\n <app-dynamic-form-department\r\n [label]=\"field.label\"\r\n placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{\r\n field.placeholder | translate\r\n }}\"\r\n [formControlName]=\"field.formControlName\"\r\n >\r\n </app-dynamic-form-department>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'toggle'\">\r\n <cts-dynamic-form-slide-toggleitem\r\n [label]=\"field.label\"\r\n [formControlName]=\"field.formControlName\"\r\n ></cts-dynamic-form-slide-toggleitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'date'\">\r\n <cts-dynamic-form-hijri-dateitem\r\n [formControlName]=\"field.formControlName\"\r\n [label]=\"field.label\"\r\n >\r\n </cts-dynamic-form-hijri-dateitem>\r\n </div>\r\n \r\n\r\n </div>\r\n\r\n </form>\r\n \r\n </div>\r\n <div class=\"form-actions\">\r\n <button class=\"my-button mx-2\" type=\"button\" (click)=\"filter()\"> {{'FILTER' | translate}}</button>\r\n <button class=\"my-button reset mx-2\" type=\"button\" (click)=\"reset()\"> {{'reset' | translate}}</button>\r\n </div>\r\n</div>\r\n\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.filter-wrapper .filter-title{font-size:18px;font-weight:bold;margin-bottom:15px}.filter-wrapper .iner-filter-wrapper{height:320px;overflow:auto;scrollbar-color:#b4bac6 transparent!important;scrollbar-width:thin!important;padding:15px 15px 0}.filter-wrapper .iner-filter-wrapper .single-control-wrapper{margin-bottom:15px}.filter-wrapper .form-actions{display:flex;justify-content:flex-start;align-content:center;padding:10px 15px}.filter-wrapper .form-actions .filter{border:none;background-color:transparent;font-weight:bold;width:80px;height:40px;background-image:linear-gradient(to bottom,#0dbab5,#2e62df);color:#fff;border-radius:5px}\n"], components: [{ type: DynamicFormTextItemComponent, selector: "app-dynamic-form-textitem", inputs: ["autoComplete", "nativeAutoComplete", "autoComplete_pageProvider", "autoComplete_propertyName", "autoComplete_propertyKey", "autoCompleteValueKey", "autoCompleteType", "tenantId", "emitFullObject", "outsideParams", "type", "property", "label", "editable", "placeholder", "disabled", "displayEmpty", "preventSpace", "id", "maxCharsNum"] }, { type: DynamicFormVocabularyItemComponent, selector: "app-dynamic-form-vocabulary-item", inputs: ["bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "disabled", "vocabularyType", "label", "cacheable", "shwoAllValues"], outputs: ["onSelecting"] }, { type: DynamicFormHijriDateitemComponent, selector: "cts-dynamic-form-hijri-dateitem", inputs: ["minHijri", "maxHijri", "minGreg", "maxGreg", "label", "isDisabled", "range", "vertical", "isReadOnly", "placeholder"], outputs: ["valueChanged"] }, { type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: ["treeview", "treeViewAsFormControl", "placeholder", "multiple", "searchable", "label", "defaultSelect", "pp_departmentNestedTree", "pp_departmentTree", "customPrefix", "useCustomAddEditAction", "customParentProperty", "customParams"], outputs: ["onSelecting", "actionClicked"] }, { type: DynamicFormSlideToggleitemComponent, selector: "cts-dynamic-form-slide-toggleitem", inputs: ["label", "disabled", "checked", "theme"], outputs: ["onToggle"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1__namespace$1.TranslatePipe } });
18051
18051
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FilterComponent, decorators: [{
18052
18052
  type: i0.Component,
18053
18053
  args: [{
@@ -23116,7 +23116,7 @@
23116
23116
  return SelectUsersByDepartmentsComponent;
23117
23117
  }());
23118
23118
  SelectUsersByDepartmentsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SelectUsersByDepartmentsComponent, deps: [{ token: DepartmentManagementService }, { token: i6__namespace.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
23119
- SelectUsersByDepartmentsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: SelectUsersByDepartmentsComponent, selector: "app-select-users-by-departments", inputs: { display: "display", depLabel: "depLabel", userLabel: "userLabel", allowMultipleUsers: "allowMultipleUsers" }, outputs: { formChanged: "formChanged" }, host: { classAttribute: "userByDepSelectors" }, ngImport: i0__namespace, template: "<form [formGroup]=\"depAnditsUsers\">\r\n <div class=\"w-full flex justify-between\"\r\n [ngClass]=\"{'flex-row': display === 'row', 'flex-col': display === 'column'}\">\r\n <div class=\"flex flex-col w-full flex-1 depWrapper\">\r\n <label class=\"dep-label\">\r\n {{depLabel}}\r\n <span class=\"text-danger\" *ngIf=\"isRequired()\">*</span>\r\n </label>\r\n <ng-container *ngIf=\"!reseting\">\r\n <app-dynamic-form-department \r\n #depRef\r\n formControlName=\"dep\"\r\n placeholder=\"placeholder\"\r\n [treeview]=\"false\"\r\n [pp_departmentNestedTree]=\"'PP_OS_Departments'\"\r\n [pp_departmentTree]=\"'PP_OS_Departments'\"\r\n [customPrefix]=\"'osdept'\"\r\n [customParentProperty]=\"'osdepartment_parentDepartmentCode'\"\r\n [useCustomAddEditAction]=\"true\"\r\n (onSelecting)=\"getDepMembers($event)\"\r\n >\r\n </app-dynamic-form-department>\r\n </ng-container>\r\n <ng-container *ngIf=\"reseting\">\r\n <app-dynamic-form-department\r\n #depRef\r\n formControlName=\"dep\"\r\n placeholder=\"placeholder\"\r\n [treeview]=\"false\"\r\n [pp_departmentNestedTree]=\"'PP_OS_Departments'\"\r\n [pp_departmentTree]=\"'PP_OS_Departments'\"\r\n [customPrefix]=\"'osdept'\"\r\n [customParentProperty]=\"'osdepartment_parentDepartmentCode'\"\r\n [useCustomAddEditAction]=\"true\"\r\n (onSelecting)=\"getDepMembers($event)\"\r\n >\r\n </app-dynamic-form-department>\r\n </ng-container>\r\n </div>\r\n <div class=\"flex flex-col w-full flex-1 usersWrapper\"\r\n [ngClass]=\"{'mt-4': display === 'column'}\">\r\n <label class=\"users-label\">\r\n {{userLabel}}\r\n <span class=\"text-danger\" *ngIf=\"isRequired()\">*</span>\r\n </label>\r\n <ng-select \r\n formControlName=\"users\"\r\n #ngSelectComponent \r\n [items]=\"depUsers\" \r\n bindLabel=\"properties.fullName\" \r\n bindValue=\"properties.username\" \r\n [multiple]=\"allowMultipleUsers\"\r\n [placeholder]=\"'share.placeholder' | translate\"\r\n (change)=\"setUser()\"\r\n >\r\n <ng-template ng-notfound-tmp let-searchTerm=\"searchTerm\">\r\n <div class=\"ng-option disabled\" *ngIf=\"!depAnditsUsers?.get('dep').value;else notFound\">\r\n {{'archiveSearch.select_dep' | translate}}\r\n </div>\r\n <ng-template #notFound>\r\n <div class=\"ng-option disabled\">\r\n {{'archiveSearch.noUsers' | translate}}\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\">\r\n <div class=\"flex flex-col h-full\">\r\n <div *ngIf=\"item\" class=\"flex flex-row\">\r\n <div class=\"flex-0 w-8 h-8 rounded-full overflow-hidden\">\r\n <cts-avatar [user]=\"{\r\n properties: {\r\n firstName: item.properties?.firstName,\r\n lastName: item.properties?.lastName\r\n }\r\n }\">\r\n </cts-avatar>\r\n </div>\r\n <div class=\"flex flex-col pt-0 px-2\">\r\n <span>{{item.properties?.fullName}}</span>\r\n <span>{{item.properties?.email}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-select>\r\n </div>\r\n </div>\r\n</form>", styles: [".userByDepSelectors ngx-dropdown-treeview>.dropdown{@apply bg-primary-50 border-primary-100 !important;}.userByDepSelectors .ng-select .ng-select-container .ng-value-container .ng-placeholder{font-size:12px!important;margin-top:4px!important}\n"], components: [{ type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: ["treeview", "treeViewAsFormControl", "placeholder", "multiple", "searchable", "label", "defaultSelect", "pp_departmentNestedTree", "pp_departmentTree", "customPrefix", "useCustomAddEditAction", "customParentProperty"], outputs: ["onSelecting", "actionClicked"] }, { type: i4__namespace$2.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"] }, { type: AvatarComponent, selector: "cts-avatar", inputs: ["user"] }], directives: [{ type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace$2.ɵl, selector: "[ng-notfound-tmp]" }, { type: i4__namespace$2.ɵf, selector: "[ng-option-tmp]" }], pipes: { "translate": i1__namespace$1.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
23119
+ SelectUsersByDepartmentsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: SelectUsersByDepartmentsComponent, selector: "app-select-users-by-departments", inputs: { display: "display", depLabel: "depLabel", userLabel: "userLabel", allowMultipleUsers: "allowMultipleUsers" }, outputs: { formChanged: "formChanged" }, host: { classAttribute: "userByDepSelectors" }, ngImport: i0__namespace, template: "<form [formGroup]=\"depAnditsUsers\">\r\n <div class=\"w-full flex justify-between\"\r\n [ngClass]=\"{'flex-row': display === 'row', 'flex-col': display === 'column'}\">\r\n <div class=\"flex flex-col w-full flex-1 depWrapper\">\r\n <label class=\"dep-label\">\r\n {{depLabel}}\r\n <span class=\"text-danger\" *ngIf=\"isRequired()\">*</span>\r\n </label>\r\n <ng-container *ngIf=\"!reseting\">\r\n <app-dynamic-form-department \r\n #depRef\r\n formControlName=\"dep\"\r\n placeholder=\"placeholder\"\r\n [treeview]=\"false\"\r\n [pp_departmentNestedTree]=\"'PP_OS_Departments'\"\r\n [pp_departmentTree]=\"'PP_OS_Departments'\"\r\n [customPrefix]=\"'osdept'\"\r\n [customParentProperty]=\"'osdepartment_parentDepartmentCode'\"\r\n [useCustomAddEditAction]=\"true\"\r\n (onSelecting)=\"getDepMembers($event)\"\r\n >\r\n </app-dynamic-form-department>\r\n </ng-container>\r\n <ng-container *ngIf=\"reseting\">\r\n <app-dynamic-form-department\r\n #depRef\r\n formControlName=\"dep\"\r\n placeholder=\"placeholder\"\r\n [treeview]=\"false\"\r\n [pp_departmentNestedTree]=\"'PP_OS_Departments'\"\r\n [pp_departmentTree]=\"'PP_OS_Departments'\"\r\n [customPrefix]=\"'osdept'\"\r\n [customParentProperty]=\"'osdepartment_parentDepartmentCode'\"\r\n [useCustomAddEditAction]=\"true\"\r\n (onSelecting)=\"getDepMembers($event)\"\r\n >\r\n </app-dynamic-form-department>\r\n </ng-container>\r\n </div>\r\n <div class=\"flex flex-col w-full flex-1 usersWrapper\"\r\n [ngClass]=\"{'mt-4': display === 'column'}\">\r\n <label class=\"users-label\">\r\n {{userLabel}}\r\n <span class=\"text-danger\" *ngIf=\"isRequired()\">*</span>\r\n </label>\r\n <ng-select \r\n formControlName=\"users\"\r\n #ngSelectComponent \r\n [items]=\"depUsers\" \r\n bindLabel=\"properties.fullName\" \r\n bindValue=\"properties.username\" \r\n [multiple]=\"allowMultipleUsers\"\r\n [placeholder]=\"'share.placeholder' | translate\"\r\n (change)=\"setUser()\"\r\n >\r\n <ng-template ng-notfound-tmp let-searchTerm=\"searchTerm\">\r\n <div class=\"ng-option disabled\" *ngIf=\"!depAnditsUsers?.get('dep').value;else notFound\">\r\n {{'archiveSearch.select_dep' | translate}}\r\n </div>\r\n <ng-template #notFound>\r\n <div class=\"ng-option disabled\">\r\n {{'archiveSearch.noUsers' | translate}}\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\">\r\n <div class=\"flex flex-col h-full\">\r\n <div *ngIf=\"item\" class=\"flex flex-row\">\r\n <div class=\"flex-0 w-8 h-8 rounded-full overflow-hidden\">\r\n <cts-avatar [user]=\"{\r\n properties: {\r\n firstName: item.properties?.firstName,\r\n lastName: item.properties?.lastName\r\n }\r\n }\">\r\n </cts-avatar>\r\n </div>\r\n <div class=\"flex flex-col pt-0 px-2\">\r\n <span>{{item.properties?.fullName}}</span>\r\n <span>{{item.properties?.email}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-select>\r\n </div>\r\n </div>\r\n</form>", styles: [".userByDepSelectors ngx-dropdown-treeview>.dropdown{@apply bg-primary-50 border-primary-100 !important;}.userByDepSelectors .ng-select .ng-select-container .ng-value-container .ng-placeholder{font-size:12px!important;margin-top:4px!important}\n"], components: [{ type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: ["treeview", "treeViewAsFormControl", "placeholder", "multiple", "searchable", "label", "defaultSelect", "pp_departmentNestedTree", "pp_departmentTree", "customPrefix", "useCustomAddEditAction", "customParentProperty", "customParams"], outputs: ["onSelecting", "actionClicked"] }, { type: i4__namespace$2.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"] }, { type: AvatarComponent, selector: "cts-avatar", inputs: ["user"] }], directives: [{ type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace$2.ɵl, selector: "[ng-notfound-tmp]" }, { type: i4__namespace$2.ɵf, selector: "[ng-option-tmp]" }], pipes: { "translate": i1__namespace$1.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
23120
23120
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SelectUsersByDepartmentsComponent, decorators: [{
23121
23121
  type: i0.Component,
23122
23122
  args: [{