nuxeo-development-framework 0.4.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/bundles/nuxeo-development-framework.umd.js +144 -118
  2. package/bundles/nuxeo-development-framework.umd.js.map +1 -1
  3. package/esm2015/lib/components/documents/components/document-scan/document-scan.service.js +1 -1
  4. package/esm2015/lib/components/documents/constants/documents.js +2 -2
  5. package/esm2015/lib/components/dynamic-form/components/dynamic-form-department/dynamic-form-department.component.js +22 -8
  6. package/esm2015/lib/components/dynamic-form/components/dynamic-form-department/services/department-api.service.js +23 -23
  7. package/esm2015/lib/components/dynamic-form/components/dynamic-form-treeview-select/dropdown-treeview-select.component.js +46 -20
  8. package/esm2015/lib/components/dynamic-form/components/form-wrappers/user-selector-wrapper/user-selector-wrapper.component.js +2 -2
  9. package/esm2015/lib/components/dynamic-form/services/dynamic-form-update.service.js +4 -9
  10. package/esm2015/lib/components/filter/filter/filter.component.js +1 -1
  11. package/esm2015/lib/directive/app-has-role/app-has-role.directive.js +1 -1
  12. package/esm2015/lib/directive/permissions/evaluators.service.js +36 -4
  13. package/esm2015/lib/directive/permissions/permissions.directive.js +2 -39
  14. package/esm2015/lib/nuxeo-development-framework.module.js +8 -1
  15. package/esm2015/lib/pipes/time-ago.pipe.js +1 -1
  16. package/fesm2015/nuxeo-development-framework.js +135 -97
  17. package/fesm2015/nuxeo-development-framework.js.map +1 -1
  18. package/lib/components/dynamic-form/components/dynamic-form-department/dynamic-form-department.component.d.ts +10 -1
  19. package/lib/components/dynamic-form/components/dynamic-form-department/services/department-api.service.d.ts +8 -8
  20. package/lib/components/dynamic-form/components/dynamic-form-treeview-select/dropdown-treeview-select.component.d.ts +7 -1
  21. package/lib/components/dynamic-form/services/dynamic-form-update.service.d.ts +1 -6
  22. package/lib/directive/permissions/evaluators.service.d.ts +12 -1
  23. package/lib/directive/permissions/permissions.directive.d.ts +0 -4
  24. package/lib/nuxeo-development-framework.module.d.ts +2 -0
  25. package/package.json +1 -1
@@ -1140,6 +1140,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
1140
1140
  }] });
1141
1141
 
1142
1142
  class NuxeoDevelopmentFrameworkModule {
1143
+ static forRoot() {
1144
+ return {
1145
+ ngModule: NuxeoDevelopmentFrameworkModule,
1146
+ providers: [UserPreferencesService$1]
1147
+ };
1148
+ }
1143
1149
  }
1144
1150
  NuxeoDevelopmentFrameworkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: NuxeoDevelopmentFrameworkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1145
1151
  NuxeoDevelopmentFrameworkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: NuxeoDevelopmentFrameworkModule, declarations: [NuxeoDevelopmentFrameworkComponent], imports: [CommonModule,
@@ -2975,8 +2981,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
2975
2981
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: TranslationService$1 }]; } });
2976
2982
 
2977
2983
  class EvaluatorsService {
2978
- constructor(nuxeoService) {
2984
+ constructor(nuxeoService, appConfigService) {
2979
2985
  this.nuxeoService = nuxeoService;
2986
+ this.appConfigService = appConfigService;
2987
+ this.context = { entity: null, getEvaluator: null, user: null };
2980
2988
  this.asyncEvery = (arr, predicate) => __awaiter(this, void 0, void 0, function* () {
2981
2989
  for (let e of arr) {
2982
2990
  if (!(yield predicate(e))) {
@@ -3072,6 +3080,9 @@ class EvaluatorsService {
3072
3080
  }
3073
3081
  return eva[key];
3074
3082
  });
3083
+ setTimeout(() => {
3084
+ this.conditions = this.getAllRules();
3085
+ }, 2000);
3075
3086
  }
3076
3087
  setEvaluators(evaluators) {
3077
3088
  this.evaluators = Object.assign(Object.assign({}, this.evaluators), evaluators);
@@ -3079,13 +3090,39 @@ class EvaluatorsService {
3079
3090
  getEvaluators() {
3080
3091
  return this.evaluators;
3081
3092
  }
3093
+ // ----------------------------------------------------
3094
+ evaluateRule(ruleId, context) {
3095
+ return __awaiter(this, void 0, void 0, function* () {
3096
+ const ruleRef = this.getRuleById(ruleId);
3097
+ context = context || this.context;
3098
+ context['getEvaluator'] = this.getEvaluator;
3099
+ if (ruleRef) {
3100
+ const evaluator = yield this.getEvaluator(ruleRef.type);
3101
+ if (evaluator) {
3102
+ return yield evaluator(context, ruleRef.parameters);
3103
+ }
3104
+ }
3105
+ else {
3106
+ const evaluator = yield this.getEvaluator(ruleId);
3107
+ if (evaluator) {
3108
+ return yield evaluator(context);
3109
+ }
3110
+ }
3111
+ });
3112
+ }
3113
+ getRuleById(id) {
3114
+ return this.conditions[id] ? Object.assign({}, this.conditions[id]) : null;
3115
+ }
3116
+ getAllRules() {
3117
+ return this.appConfigService.conditons;
3118
+ }
3082
3119
  }
3083
- EvaluatorsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: EvaluatorsService, deps: [{ token: NuxeoService$1 }], target: i0.ɵɵFactoryTarget.Injectable });
3120
+ EvaluatorsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: EvaluatorsService, deps: [{ token: NuxeoService$1 }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
3084
3121
  EvaluatorsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: EvaluatorsService, providedIn: "root" });
3085
3122
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: EvaluatorsService, decorators: [{
3086
3123
  type: Injectable,
3087
3124
  args: [{ providedIn: "root" }]
3088
- }], ctorParameters: function () { return [{ type: NuxeoService$1 }]; } });
3125
+ }], ctorParameters: function () { return [{ type: NuxeoService$1 }, { type: AppConfigService }]; } });
3089
3126
 
3090
3127
  /**
3091
3128
  * Permission directive shows or hides an element,
@@ -3113,20 +3150,8 @@ class PermissionsDirective {
3113
3150
  this.evaluatorsService = evaluatorsService;
3114
3151
  this.isVisible = false;
3115
3152
  this.context = { entity: null, getEvaluator: null, user: null };
3116
- this.getEvaluator = (key) => __awaiter(this, void 0, void 0, function* () {
3117
- const eva = this.evaluatorsService.evaluators;
3118
- if (key && key.startsWith('!')) {
3119
- const fn = eva[key.substring(1)];
3120
- return (context, args) => __awaiter(this, void 0, void 0, function* () {
3121
- const result = yield fn(context, ...args);
3122
- return !result;
3123
- });
3124
- }
3125
- return eva[key];
3126
- });
3127
3153
  }
3128
3154
  ngOnInit() {
3129
- this.getAllRules();
3130
3155
  this.context.getEvaluator = this.evaluatorsService.getEvaluator;
3131
3156
  if (!this.permission.name) {
3132
3157
  if (!this.isVisible) {
@@ -3137,7 +3162,7 @@ class PermissionsDirective {
3137
3162
  else {
3138
3163
  this.context.entity = this.permission.entity;
3139
3164
  this.context.user = this.permission.user || this.nuxeoService.nuxeoClient.user;
3140
- this.evaluateRule(this.permission.name, this.context).then((result) => {
3165
+ this.evaluatorsService.evaluateRule(this.permission.name, this.context).then((result) => {
3141
3166
  if (result) {
3142
3167
  if (!this.isVisible) {
3143
3168
  this.isVisible = true;
@@ -3151,30 +3176,6 @@ class PermissionsDirective {
3151
3176
  });
3152
3177
  }
3153
3178
  }
3154
- evaluateRule(ruleId, context) {
3155
- return __awaiter(this, void 0, void 0, function* () {
3156
- const ruleRef = this.getRuleById(ruleId);
3157
- context = context || this.context;
3158
- if (ruleRef) {
3159
- const evaluator = yield this.evaluatorsService.getEvaluator(ruleRef.type);
3160
- if (evaluator) {
3161
- return yield evaluator(context, ruleRef.parameters);
3162
- }
3163
- }
3164
- else {
3165
- const evaluator = yield this.evaluatorsService.getEvaluator(ruleId);
3166
- if (evaluator) {
3167
- return yield evaluator(context);
3168
- }
3169
- }
3170
- });
3171
- }
3172
- getRuleById(id) {
3173
- return this.conditions[id] ? Object.assign({}, this.conditions[id]) : null;
3174
- }
3175
- getAllRules() {
3176
- this.conditions = this.appConfigService.conditons;
3177
- }
3178
3179
  }
3179
3180
  PermissionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: PermissionsDirective, deps: [{ token: NuxeoService$1 }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: AppConfigService }, { token: EvaluatorsService }], target: i0.ɵɵFactoryTarget.Directive });
3180
3181
  PermissionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.4", type: PermissionsDirective, selector: "[permission]", inputs: { permission: "permission" }, ngImport: i0 });
@@ -4176,14 +4177,11 @@ function transformKeyToObject(key, value) {
4176
4177
  }, value);
4177
4178
  }
4178
4179
  class DynamicFormUpdateService {
4179
- constructor(callApi, adapter, appConfigService) {
4180
+ constructor(callApi) {
4180
4181
  this.callApi = callApi;
4181
- this.adapter = adapter;
4182
- this.appConfigService = appConfigService;
4183
4182
  this.itemUpdated$ = new Subject();
4184
4183
  this.itemClicked$ = new Subject();
4185
4184
  this.validate$ = new Subject();
4186
- this.fields = this.appConfigService.myConfiguration.tables.incomingCorespondance.fields;
4187
4185
  }
4188
4186
  update(property, newValue) {
4189
4187
  this.itemUpdated$.next({
@@ -4227,14 +4225,14 @@ class DynamicFormUpdateService {
4227
4225
  }));
4228
4226
  }
4229
4227
  }
4230
- DynamicFormUpdateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: DynamicFormUpdateService, deps: [{ token: CallApiService }, { token: AdapterService }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
4228
+ DynamicFormUpdateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: DynamicFormUpdateService, deps: [{ token: CallApiService }], target: i0.ɵɵFactoryTarget.Injectable });
4231
4229
  DynamicFormUpdateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: DynamicFormUpdateService, providedIn: 'root' });
4232
4230
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: DynamicFormUpdateService, decorators: [{
4233
4231
  type: Injectable,
4234
4232
  args: [{
4235
4233
  providedIn: 'root'
4236
4234
  }]
4237
- }], ctorParameters: function () { return [{ type: CallApiService }, { type: AdapterService }, { type: AppConfigService }]; } });
4235
+ }], ctorParameters: function () { return [{ type: CallApiService }]; } });
4238
4236
 
4239
4237
  /** @ignore */
4240
4238
  class DynamicFormBoolItemComponent {
@@ -5540,9 +5538,9 @@ class DepartmentApiService {
5540
5538
  this.arabic = res;
5541
5539
  });
5542
5540
  }
5543
- getDepartmentTree() {
5541
+ getDepartmentTree(customPageProvider) {
5544
5542
  return this.CallApiService.query({
5545
- pageProvider: 'PP_Department',
5543
+ pageProvider: customPageProvider ? customPageProvider : 'PP_Department',
5546
5544
  currentPageIndex: 0,
5547
5545
  offset: 0,
5548
5546
  pageSize: 40,
@@ -5555,9 +5553,9 @@ class DepartmentApiService {
5555
5553
  },
5556
5554
  });
5557
5555
  }
5558
- getDepartmentDetails(code) {
5556
+ getDepartmentDetails(code, customPageProvider) {
5559
5557
  return this.CallApiService.query({
5560
- pageProvider: 'PP_Department_With_ElasticSearch',
5558
+ pageProvider: customPageProvider ? customPageProvider : 'PP_Department_With_ElasticSearch',
5561
5559
  currentPageIndex: 0,
5562
5560
  offset: 0,
5563
5561
  pageSize: 40,
@@ -5570,9 +5568,9 @@ class DepartmentApiService {
5570
5568
  },
5571
5569
  });
5572
5570
  }
5573
- getDepartmentNestedTree(code) {
5571
+ getDepartmentNestedTree(code, customPageProvider) {
5574
5572
  return this.CallApiService.query({
5575
- pageProvider: 'PP_Department',
5573
+ pageProvider: customPageProvider ? customPageProvider : 'PP_Department',
5576
5574
  currentPageIndex: 0,
5577
5575
  offset: 0,
5578
5576
  pageSize: 40,
@@ -5585,36 +5583,36 @@ class DepartmentApiService {
5585
5583
  },
5586
5584
  });
5587
5585
  }
5588
- getDepartment(uid) {
5586
+ getDepartment(uid, fields) {
5589
5587
  return from(this.nuxeoService.nuxeoClient
5590
5588
  .repository()
5591
5589
  .headers({
5592
5590
  'X-NXproperties': '*',
5593
5591
  })
5594
5592
  .fetch(uid)).pipe(map((data) => {
5595
- return this.adapter.adaptIn(data, DepartmentConstants.fields);
5593
+ return this.adapter.adaptIn(data, fields ? fields : DepartmentConstants.fields);
5596
5594
  }), catchError((err) => {
5597
5595
  throw err;
5598
5596
  }));
5599
5597
  }
5600
5598
  // testing
5601
- createDepartment(Department, parentId) {
5599
+ createDepartment(Department, parentId, customOperation, fields) {
5602
5600
  return from(this.nuxeoService.nuxeoClient
5603
- .operation('AC_UA_Depatrment_Create', {
5601
+ .operation(customOperation ? customOperation : 'AC_UA_Depatrment_Create', {
5604
5602
  url: `${this.environment.nuxeo}${this.environment.customAutomation}`,
5605
5603
  })
5606
5604
  .input(parentId)
5607
5605
  .context({
5608
- department: this.adapter.adaptOut(Department, DepartmentConstants.fields),
5606
+ department: this.adapter.adaptOut(Department, fields ? fields : DepartmentConstants.fields),
5609
5607
  })
5610
5608
  .execute()).pipe(catchError((err) => {
5611
5609
  console.log(err);
5612
5610
  throw err;
5613
5611
  }));
5614
5612
  }
5615
- createDepartmentInRoot(Department) {
5613
+ createDepartmentInRoot(Department, customOperation) {
5616
5614
  return from(this.nuxeoService.nuxeoClient
5617
- .operation('AC_UA_Depatrment_Create_InRoot', {
5615
+ .operation(customOperation ? customOperation : 'AC_UA_Depatrment_Create_InRoot', {
5618
5616
  url: `${this.environment.nuxeo}${this.environment.customAutomation}`,
5619
5617
  })
5620
5618
  .context({
@@ -5625,47 +5623,47 @@ class DepartmentApiService {
5625
5623
  throw err;
5626
5624
  }));
5627
5625
  }
5628
- updateDepartment(Department, departmentId) {
5626
+ updateDepartment(Department, departmentId, customOperation, fields) {
5629
5627
  return from(this.nuxeoService.nuxeoClient
5630
- .operation('AC_UA_Department_Update', {
5628
+ .operation(customOperation ? customOperation : 'AC_UA_Department_Update', {
5631
5629
  url: `${this.environment.nuxeo}${this.environment.customAutomation}`,
5632
5630
  })
5633
5631
  .input(departmentId)
5634
5632
  .context({
5635
- department: this.adapter.adaptOut(Department, DepartmentConstants.fields),
5633
+ department: this.adapter.adaptOut(Department, fields ? fields : DepartmentConstants.fields),
5636
5634
  })
5637
5635
  .execute()).pipe(catchError((err) => {
5638
5636
  console.log(err);
5639
5637
  throw err;
5640
5638
  }));
5641
5639
  }
5642
- recursiveFill(entries, level = 0, treeview = true, collapsed = true) {
5640
+ recursiveFill(entries, level = 0, treeview = true, collapsed = true, customPrefix) {
5643
5641
  return entries.map((item) => {
5644
5642
  let treeViewObj = treeview
5645
5643
  ? {
5646
5644
  text: this.arabic
5647
5645
  ? item.properties
5648
- ? item.properties['dept:arabicName']
5646
+ ? item.properties[customPrefix ? (customPrefix + ':arabicName') : 'dept:arabicName']
5649
5647
  : '--'
5650
5648
  : item.properties
5651
- ? item.properties['dept:englishName']
5649
+ ? item.properties[customPrefix ? (customPrefix + ':englishName') : 'dept:englishName']
5652
5650
  : '--',
5653
5651
  value: Object.assign(Object.assign({}, item), { level }),
5654
5652
  }
5655
5653
  : {
5656
5654
  text: this.arabic
5657
5655
  ? item.properties
5658
- ? item.properties['dept:arabicName']
5656
+ ? item.properties[customPrefix ? (customPrefix + ':arabicName') : 'dept:arabicName']
5659
5657
  : '--'
5660
5658
  : item.properties
5661
- ? item.properties['dept:englishName']
5659
+ ? item.properties[customPrefix ? (customPrefix + ':englishName') : 'dept:englishName']
5662
5660
  : '--',
5663
5661
  value: item.title,
5664
5662
  };
5665
5663
  const treeItem = new TreeviewItem(Object.assign(Object.assign({}, treeViewObj), { collapsed: level >= 2 && collapsed ? true : false }));
5666
5664
  if (item.contextParameters &&
5667
5665
  item.contextParameters.children.entries.length) {
5668
- treeItem.children = this.recursiveFill(item.contextParameters.children.entries, level + 1);
5666
+ treeItem.children = this.recursiveFill(item.contextParameters.children.entries, level + 1, undefined, undefined, customPrefix);
5669
5667
  }
5670
5668
  return treeItem;
5671
5669
  });
@@ -6803,6 +6801,8 @@ class TreeviewSelectComponent {
6803
6801
  this.plusClicked = new EventEmitter();
6804
6802
  /** event emitted on plus button clicked (for department management) */
6805
6803
  this.defaultSelect = false;
6804
+ /** use outside custom function instead of the iner function */
6805
+ this.useCustomAddEditAction = false;
6806
6806
  this.actionClicked = new EventEmitter();
6807
6807
  this.arabic = false;
6808
6808
  this.onDestroy$ = new Subject();
@@ -6946,23 +6946,41 @@ class TreeviewSelectComponent {
6946
6946
  e.stopPropagation();
6947
6947
  if (item) {
6948
6948
  if (action === "add") {
6949
- this.departmentManagment
6950
- .openFormDialog(item.value.uid, false, item.value.title, item)
6951
- .subscribe((res) => {
6952
- if (res) {
6953
- this.update(item);
6954
- }
6955
- });
6949
+ // emit action to outside to execute function from outside the component
6950
+ if (this.useCustomAddEditAction) {
6951
+ this.actionClicked.emit({
6952
+ action: action,
6953
+ item: item
6954
+ });
6955
+ }
6956
+ else {
6957
+ this.departmentManagment
6958
+ .openFormDialog(item.value.uid, false, item.value.title, item)
6959
+ .subscribe((res) => {
6960
+ if (res) {
6961
+ this.update(item);
6962
+ }
6963
+ });
6964
+ }
6956
6965
  }
6957
6966
  if (action === "update") {
6958
- this.departmentManagment
6959
- .openFormDialog(item.value.uid, true)
6960
- .subscribe((res) => {
6961
- // this.update(item);
6962
- this.departmentApiService.getDepartmentTree().subscribe((res) => {
6963
- this.items = this.departmentApiService.recursiveFill(res.entries);
6967
+ if (this.useCustomAddEditAction) {
6968
+ // emit action to outside to execute function from outside the component
6969
+ this.actionClicked.emit({
6970
+ action: action,
6971
+ item: item
6964
6972
  });
6965
- });
6973
+ }
6974
+ else {
6975
+ this.departmentManagment
6976
+ .openFormDialog(item.value.uid, true)
6977
+ .subscribe((res) => {
6978
+ // this.update(item);
6979
+ this.departmentApiService.getDepartmentTree().subscribe((res) => {
6980
+ this.items = this.departmentApiService.recursiveFill(res.entries, undefined, undefined, undefined, this.customPrefix);
6981
+ });
6982
+ });
6983
+ }
6966
6984
  }
6967
6985
  }
6968
6986
  }
@@ -6974,9 +6992,9 @@ class TreeviewSelectComponent {
6974
6992
  item.collapsed = !item.collapsed;
6975
6993
  if (item.value.level === 2) {
6976
6994
  this.departmentApiService
6977
- .getDepartmentNestedTree(item.value.title)
6995
+ .getDepartmentNestedTree(item.value.title, this.pp_departmentNestedTree ? this.pp_departmentNestedTree : 'PP_Department')
6978
6996
  .subscribe((res) => {
6979
- item.children = this.departmentApiService.recursiveFill(res.entries);
6997
+ item.children = this.departmentApiService.recursiveFill(res.entries, undefined, undefined, undefined, this.customPrefix);
6980
6998
  }, (err) => { });
6981
6999
  }
6982
7000
  }
@@ -6986,14 +7004,14 @@ class TreeviewSelectComponent {
6986
7004
  */
6987
7005
  update(item) {
6988
7006
  this.departmentApiService
6989
- .getDepartmentNestedTree(item.value.title)
7007
+ .getDepartmentNestedTree(item.value.title, this.pp_departmentNestedTree ? this.pp_departmentNestedTree : 'PP_Department')
6990
7008
  .subscribe((data) => {
6991
- item.children = this.departmentApiService.recursiveFill(data.entries, 0, true, true);
7009
+ item.children = this.departmentApiService.recursiveFill(data.entries, 0, true, true, this.customPrefix);
6992
7010
  }, (err) => { });
6993
7011
  }
6994
7012
  }
6995
7013
  TreeviewSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: TreeviewSelectComponent, deps: [{ token: i1$2.TreeviewI18n }, { token: TranslationService$1 }, { token: DepartmentApiService }, { token: DepartmentManagementService }, { token: RolesService$1 }, { token: NuxeoService$1 }], target: i0.ɵɵFactoryTarget.Component });
6996
- TreeviewSelectComponent.ɵcmp = i0.ɵɵ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" }, outputs: { valueChange: "valueChange", plusClicked: "plusClicked", actionClicked: "actionClicked" }, providers: [{ provide: TreeviewI18n, useClass: DropdownTreeviewSelectI18n }], viewQueries: [{ propertyName: "dropdownTreeviewComponent", first: true, predicate: DropdownTreeviewComponent, descendants: true }], usesOnChanges: true, ngImport: i0, 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 </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()\"\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}.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.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.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.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$2.DropdownTreeviewComponent, selector: "ngx-dropdown-treeview", inputs: ["buttonClass", "config", "headerTemplate", "itemTemplate", "items"], outputs: ["selectedChange", "filterChange"] }, { type: i1$2.TreeviewComponent, selector: "ngx-treeview", inputs: ["config", "headerTemplate", "itemTemplate", "items"], outputs: ["selectedChange", "filterChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
7014
+ TreeviewSelectComponent.ɵcmp = i0.ɵɵ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" }, outputs: { valueChange: "valueChange", plusClicked: "plusClicked", actionClicked: "actionClicked" }, providers: [{ provide: TreeviewI18n, useClass: DropdownTreeviewSelectI18n }], viewQueries: [{ propertyName: "dropdownTreeviewComponent", first: true, predicate: DropdownTreeviewComponent, descendants: true }], usesOnChanges: true, ngImport: i0, 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 </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()\"\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}.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.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.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.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$2.DropdownTreeviewComponent, selector: "ngx-dropdown-treeview", inputs: ["buttonClass", "config", "headerTemplate", "itemTemplate", "items"], outputs: ["selectedChange", "filterChange"] }, { type: i1$2.TreeviewComponent, selector: "ngx-treeview", inputs: ["config", "headerTemplate", "itemTemplate", "items"], outputs: ["selectedChange", "filterChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
6997
7015
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: TreeviewSelectComponent, decorators: [{
6998
7016
  type: Component,
6999
7017
  args: [{
@@ -7021,6 +7039,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
7021
7039
  type: Output
7022
7040
  }], defaultSelect: [{
7023
7041
  type: Input
7042
+ }], pp_departmentNestedTree: [{
7043
+ type: Input
7044
+ }], useCustomAddEditAction: [{
7045
+ type: Input
7046
+ }], customPrefix: [{
7047
+ type: Input
7024
7048
  }], actionClicked: [{
7025
7049
  type: Output
7026
7050
  }], dropdownTreeviewComponent: [{
@@ -7097,20 +7121,20 @@ class DynamicFormDepartmentComponent {
7097
7121
  ? {
7098
7122
  text: this.arabic
7099
7123
  ? item.properties
7100
- ? item.properties['dept:arabicName']
7124
+ ? item.properties[this.customPrefix ? (this.customPrefix + ':arabicName') : 'dept:arabicName']
7101
7125
  : '--'
7102
7126
  : item.properties
7103
- ? item.properties['dept:englishName']
7127
+ ? item.properties[this.customPrefix ? (this.customPrefix + ':englishName') : 'dept:englishName']
7104
7128
  : '--',
7105
7129
  value: Object.assign(Object.assign({}, item), { level }),
7106
7130
  }
7107
7131
  : {
7108
7132
  text: this.arabic
7109
7133
  ? item.properties
7110
- ? item.properties['dept:arabicName']
7134
+ ? item.properties[this.customPrefix ? (this.customPrefix + ':arabicName') : 'dept:arabicName']
7111
7135
  : '--'
7112
7136
  : item.properties
7113
- ? item.properties['dept:englishName']
7137
+ ? item.properties[this.customPrefix ? (this.customPrefix + ':englishName') : 'dept:englishName']
7114
7138
  : '--',
7115
7139
  value: this.multiple ? item.uid : item.title,
7116
7140
  };
@@ -7120,7 +7144,7 @@ class DynamicFormDepartmentComponent {
7120
7144
  if (!this.treeview &&
7121
7145
  (level == 2 || (level > 2 && (level + 1) % 3 == 0))) {
7122
7146
  const extended = yield this.departmentApi
7123
- .getDepartmentNestedTree(item.title)
7147
+ .getDepartmentNestedTree(item.title, this.pp_departmentNestedTree)
7124
7148
  .pipe(first())
7125
7149
  .toPromise();
7126
7150
  treeItem.children = yield this.recursiveFill(extended.entries, level + 1);
@@ -7135,7 +7159,7 @@ class DynamicFormDepartmentComponent {
7135
7159
  }
7136
7160
  getLisOfOptions() {
7137
7161
  return __awaiter(this, void 0, void 0, function* () {
7138
- this.departmentApi.getDepartmentTree().subscribe((res) => __awaiter(this, void 0, void 0, function* () {
7162
+ this.departmentApi.getDepartmentTree(this.pp_departmentTree).subscribe((res) => __awaiter(this, void 0, void 0, function* () {
7139
7163
  this.loading = false;
7140
7164
  this.data = yield this.recursiveFill(res.entries);
7141
7165
  }));
@@ -7169,9 +7193,15 @@ class DynamicFormDepartmentComponent {
7169
7193
  hasErrors() {
7170
7194
  return this.showError;
7171
7195
  }
7196
+ // onPlusClicked(e) {
7197
+ // this.plusClicked.next(e);
7198
+ // }
7199
+ onAction(e) {
7200
+ this.actionClicked.emit(e);
7201
+ }
7172
7202
  }
7173
7203
  DynamicFormDepartmentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: DynamicFormDepartmentComponent, deps: [{ token: TranslationService$1 }, { token: DepartmentApiService }, { token: i3$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
7174
- DynamicFormDepartmentComponent.ɵcmp = i0.ɵɵ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" }, outputs: { onSelecting: "onSelecting", actionClicked: "actionClicked" }, ngImport: i0, 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 (valueChange)=\"getSelecteditems($event)\"\r\n [(value)]=\"selection\"\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"], outputs: ["valueChange", "plusClicked", "actionClicked"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
7204
+ DynamicFormDepartmentComponent.ɵcmp = i0.ɵɵ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" }, outputs: { onSelecting: "onSelecting", actionClicked: "actionClicked" }, ngImport: i0, 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 (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"], outputs: ["valueChange", "plusClicked", "actionClicked"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
7175
7205
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: DynamicFormDepartmentComponent, decorators: [{
7176
7206
  type: Component,
7177
7207
  args: [{
@@ -7198,6 +7228,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
7198
7228
  type: Input
7199
7229
  }], defaultSelect: [{
7200
7230
  type: Input
7231
+ }], pp_departmentNestedTree: [{
7232
+ type: Input
7233
+ }], pp_departmentTree: [{
7234
+ type: Input
7235
+ }], customPrefix: [{
7236
+ type: Input
7237
+ }], useCustomAddEditAction: [{
7238
+ type: Input
7201
7239
  }], onSelecting: [{
7202
7240
  type: Output
7203
7241
  }], actionClicked: [{
@@ -9107,7 +9145,7 @@ class UserSelectorWrapperComponent {
9107
9145
  }
9108
9146
  }
9109
9147
  UserSelectorWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: UserSelectorWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9110
- UserSelectorWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: UserSelectorWrapperComponent, selector: "lib-user-selector-wrapper", inputs: { value: "value", multipleMode: "multipleMode", customOptions: "customOptions" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<cts-dynamic-form-select-users placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{'CREATE.USER' | translate}}\"\r\n [multiple]=\"multipleMode\"\r\n [searchable]=\"true\"\r\n [bindLabel]=\"'fullName'\"\r\n [closeOnSelect]=\"!multipleMode\"\r\n [searchable]=\"true\"\r\n [deptTitle]=\"'all'\"\r\n [preSelectedValues]=\"[]\"\r\n [usePreSelectedValue]=\"true\"\r\n (onSelectItems)=\"executeFunction($event)\"\r\n (ngModelChange)=\"checkChange($event)\"\r\n [(ngModel)]=\"bindedValue\" >\r\n</cts-dynamic-form-select-users>\r\n <!-- -->\r\n\r\n<!-- <div>{{customOptions | json}}</div>\r\n<div>{{multipleMode}}</div> -->", styles: [""], components: [{ type: DynamicFormSelectUsersComponent, selector: "cts-dynamic-form-select-users", inputs: ["deptTitle", "label", "bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "preSelectedValues", "usePreSelectedValue", "disabled", "filter"], outputs: ["onSelectItems"] }], directives: [{ type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1$1.TranslatePipe } });
9148
+ UserSelectorWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: UserSelectorWrapperComponent, selector: "lib-user-selector-wrapper", inputs: { value: "value", multipleMode: "multipleMode", customOptions: "customOptions" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<cts-dynamic-form-select-users placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{'CREATE.USER' | translate}}\"\n [multiple]=\"multipleMode\"\n [searchable]=\"true\"\n [bindLabel]=\"'fullName'\"\n [closeOnSelect]=\"!multipleMode\"\n [searchable]=\"true\"\n [deptTitle]=\"'all'\"\n [preSelectedValues]=\"[]\"\n [usePreSelectedValue]=\"true\"\n (onSelectItems)=\"executeFunction($event)\"\n (ngModelChange)=\"checkChange($event)\"\n [(ngModel)]=\"bindedValue\" >\n</cts-dynamic-form-select-users>\n <!-- -->\n\n<!-- <div>{{customOptions | json}}</div>\n<div>{{multipleMode}}</div> -->", styles: [""], components: [{ type: DynamicFormSelectUsersComponent, selector: "cts-dynamic-form-select-users", inputs: ["deptTitle", "label", "bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "preSelectedValues", "usePreSelectedValue", "disabled", "filter"], outputs: ["onSelectItems"] }], directives: [{ type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1$1.TranslatePipe } });
9111
9149
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: UserSelectorWrapperComponent, decorators: [{
9112
9150
  type: Component,
9113
9151
  args: [{
@@ -9748,7 +9786,7 @@ DocumentsConstants.pageProvider = {
9748
9786
  name: 'PP_Committee_CTDocuments',
9749
9787
  headers: {
9750
9788
  'X-NXproperties': '*',
9751
- 'X-NXfetch-document': 'dc:creator,dc:lastContributor',
9789
+ 'X-NXfetch-document': 'dc:creator,dc:lastContributor,dc:contributors',
9752
9790
  },
9753
9791
  },
9754
9792
  agendaItem: {
@@ -15709,7 +15747,7 @@ class FilterComponent {
15709
15747
  }
15710
15748
  }
15711
15749
  FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: FilterComponent, deps: [{ token: i3$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
15712
- FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FilterComponent, selector: "cts-filter", inputs: { fields: "fields", filterTitle: "filterTitle" }, outputs: { onFiltering: "onFiltering" }, ngImport: i0, 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}.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.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.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", "autoComplete_pageProvider", "autoComplete_propertyName", "autoComplete_propertyKey", "autoCompleteValueKey", "type", "property", "label", "editable", "placeholder", "disabled", "displayEmpty", "preventSpace", "id"] }, { type: DynamicFormVocabularyItemComponent, selector: "app-dynamic-form-vocabulary-item", inputs: ["bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "vocabularyType", "label", "cacheable", "shwoAllValues"], outputs: ["onSelecting"] }, { type: DynamicFormHijriDateitemComponent, selector: "cts-dynamic-form-hijri-dateitem", inputs: ["minHijri", "maxHijri", "minGreg", "maxGreg", "label", "isDisabled", "range", "vertical", "isReadOnly"], outputs: ["valueChanged"] }, { type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: ["treeview", "treeViewAsFormControl", "placeholder", "multiple", "searchable", "label", "defaultSelect"], outputs: ["onSelecting", "actionClicked"] }, { type: DynamicFormSlideToggleitemComponent, selector: "cts-dynamic-form-slide-toggleitem", inputs: ["label", "disabled", "checked", "theme"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1$1.TranslatePipe } });
15750
+ FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FilterComponent, selector: "cts-filter", inputs: { fields: "fields", filterTitle: "filterTitle" }, outputs: { onFiltering: "onFiltering" }, ngImport: i0, 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}.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.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.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", "autoComplete_pageProvider", "autoComplete_propertyName", "autoComplete_propertyKey", "autoCompleteValueKey", "type", "property", "label", "editable", "placeholder", "disabled", "displayEmpty", "preventSpace", "id"] }, { type: DynamicFormVocabularyItemComponent, selector: "app-dynamic-form-vocabulary-item", inputs: ["bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "vocabularyType", "label", "cacheable", "shwoAllValues"], outputs: ["onSelecting"] }, { type: DynamicFormHijriDateitemComponent, selector: "cts-dynamic-form-hijri-dateitem", inputs: ["minHijri", "maxHijri", "minGreg", "maxGreg", "label", "isDisabled", "range", "vertical", "isReadOnly"], outputs: ["valueChanged"] }, { type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: ["treeview", "treeViewAsFormControl", "placeholder", "multiple", "searchable", "label", "defaultSelect", "pp_departmentNestedTree", "pp_departmentTree", "customPrefix", "useCustomAddEditAction"], outputs: ["onSelecting", "actionClicked"] }, { type: DynamicFormSlideToggleitemComponent, selector: "cts-dynamic-form-slide-toggleitem", inputs: ["label", "disabled", "checked", "theme"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1$1.TranslatePipe } });
15713
15751
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: FilterComponent, decorators: [{
15714
15752
  type: Component,
15715
15753
  args: [{