cat-qw-lib 0.32.5 → 0.32.7

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.
@@ -739,11 +739,9 @@ class FormContainerComponent {
739
739
  });
740
740
  }
741
741
  handleSaveClick() {
742
- console.log("7");
743
742
  this.onSave.emit();
744
743
  }
745
744
  handleCancelClick() {
746
- console.log("8");
747
745
  this.onCancel.emit();
748
746
  }
749
747
  handleCreateBtnClick() { }
@@ -1187,6 +1185,7 @@ class BaseFormComponent {
1187
1185
  record;
1188
1186
  recordChange = new BehaviorSubject({});
1189
1187
  destroy$ = new Subject();
1188
+ onSave = new EventEmitter();
1190
1189
  onFormNavigate = new EventEmitter();
1191
1190
  onCancel = new EventEmitter();
1192
1191
  constructor(service, validatorService, router, activatedRoute, baseStore, baseQuery) {
@@ -1218,7 +1217,6 @@ class BaseFormComponent {
1218
1217
  }
1219
1218
  }
1220
1219
  handleSubmit() {
1221
- console.log("Submitting form...");
1222
1220
  const validateRecords = this.validatorService
1223
1221
  ? this.validatorService.handleValidateRecords(this.record)
1224
1222
  : true;
@@ -1250,7 +1248,8 @@ class BaseFormComponent {
1250
1248
  });
1251
1249
  });
1252
1250
  if (this.baseStore && this.baseStore.missingFields.length > 0) {
1253
- this.baseStore.setIsFormSubmitted(true);
1251
+ if (this.baseStore)
1252
+ this.baseStore.setIsFormSubmitted(true);
1254
1253
  console.error(ERROR.MISSING_REQUIRED_FIELD, this.baseStore.missingFields);
1255
1254
  }
1256
1255
  else {
@@ -1276,6 +1275,7 @@ class BaseFormComponent {
1276
1275
  return;
1277
1276
  this.service.update(this.record._id, this.record).subscribe({
1278
1277
  next: (response) => {
1278
+ console.log('Record updated:', response);
1279
1279
  this.record = {};
1280
1280
  this.baseStore?.setIsApiValidated(null);
1281
1281
  this.onFormNavigate.emit(response);
@@ -1290,6 +1290,7 @@ class BaseFormComponent {
1290
1290
  return;
1291
1291
  this.service.create(this.record).subscribe({
1292
1292
  next: (response) => {
1293
+ console.log('Record created:', response);
1293
1294
  this.record = {};
1294
1295
  this.baseStore?.setIsApiValidated(null);
1295
1296
  this.onFormNavigate.emit(response);
@@ -1308,17 +1309,20 @@ class BaseFormComponent {
1308
1309
  if (this.baseStore) {
1309
1310
  this.baseStore.setAttributeModelList([]);
1310
1311
  this.baseStore.setIsApiValidated(null);
1312
+ this.baseStore?.setIsShowMessage(null);
1311
1313
  }
1312
1314
  this.destroy$.next();
1313
1315
  this.destroy$.complete();
1314
1316
  }
1315
1317
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseFormComponent, deps: [{ token: BaseService }, { token: ValidatorService }, { token: i3$4.Router }, { token: i3$4.ActivatedRoute }, { token: BaseStore }, { token: BaseQuery }], target: i0.ɵɵFactoryTarget.Component });
1316
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseFormComponent, isStandalone: true, selector: "base-form", outputs: { onFormNavigate: "onFormNavigate", onCancel: "onCancel" }, providers: [ValidatorService], ngImport: i0, template: "<p>base-form works!</p>\r\n", styles: [""] });
1318
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseFormComponent, isStandalone: true, selector: "base-form", outputs: { onSave: "onSave", onFormNavigate: "onFormNavigate", onCancel: "onCancel" }, providers: [ValidatorService], ngImport: i0, template: "<p>base-form works!</p>\r\n", styles: [""] });
1317
1319
  }
1318
1320
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseFormComponent, decorators: [{
1319
1321
  type: Component,
1320
1322
  args: [{ selector: 'base-form', providers: [ValidatorService], template: "<p>base-form works!</p>\r\n" }]
1321
- }], ctorParameters: () => [{ type: BaseService }, { type: ValidatorService }, { type: i3$4.Router }, { type: i3$4.ActivatedRoute }, { type: BaseStore }, { type: BaseQuery }], propDecorators: { onFormNavigate: [{
1323
+ }], ctorParameters: () => [{ type: BaseService }, { type: ValidatorService }, { type: i3$4.Router }, { type: i3$4.ActivatedRoute }, { type: BaseStore }, { type: BaseQuery }], propDecorators: { onSave: [{
1324
+ type: Output
1325
+ }], onFormNavigate: [{
1322
1326
  type: Output
1323
1327
  }], onCancel: [{
1324
1328
  type: Output
@@ -2061,7 +2065,7 @@ class ApiAdminFormComponent extends BaseFormComponent {
2061
2065
  }
2062
2066
  ngOnInit() {
2063
2067
  this.init();
2064
- this.baseStore.setIsApiValidated(null);
2068
+ this.baseStore.setIsApiValidated(false);
2065
2069
  }
2066
2070
  hanldeValidateApi() {
2067
2071
  const payload = {
@@ -2611,7 +2615,6 @@ class QueueAdminFormComponent extends BaseFormComponent {
2611
2615
  next: (res) => {
2612
2616
  if (res) {
2613
2617
  this.fetchedProperties = res.properties;
2614
- console.log(this.fetchedProperties);
2615
2618
  const updatedPropertyList = res.properties.map((value) => ({ value }));
2616
2619
  this.apiPropertyList = updatedPropertyList;
2617
2620
  this.setupQueryBuilderConfig(res.properties);
@@ -2969,7 +2972,7 @@ class AdminActionFormComponent extends BaseFormComponent {
2969
2972
  }
2970
2973
  ngOnInit() {
2971
2974
  this.init();
2972
- this.baseStore.setIsApiValidated(null);
2975
+ this.baseStore.setIsApiValidated(false);
2973
2976
  }
2974
2977
  handleValidateAction() {
2975
2978
  const payload = { path: this.record.apiDocsUrl };
@@ -3476,6 +3479,9 @@ class TemplateAdminFormComponent extends BaseFormComponent {
3476
3479
  ngOnInit() {
3477
3480
  super.init();
3478
3481
  }
3482
+ ngOnChanges(changes) {
3483
+ console.log(this.record);
3484
+ }
3479
3485
  handleQueueChange(event) {
3480
3486
  this.query.getLists().subscribe((allLists) => {
3481
3487
  const allDictionaryRecords = allLists.find((list) => list.forProperty === 'dictionaryID')?.records;
@@ -3494,7 +3500,7 @@ class TemplateAdminFormComponent extends BaseFormComponent {
3494
3500
  }
3495
3501
  ;
3496
3502
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TemplateAdminFormComponent, deps: [{ token: TemplateAdminService }, { token: ValidatorService }, { token: i3$4.Router }, { token: i3$4.ActivatedRoute }, { token: TemplateAdminQuery }, { token: TemplateAdminStore }, { token: BaseStore }, { token: BaseQuery }], target: i0.ɵɵFactoryTarget.Component });
3497
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: TemplateAdminFormComponent, isStandalone: false, selector: "lib-template-admin-form", usesInheritance: true, ngImport: i0, template: "<form-container [record]=\"record\" [showSave]=\"true\" [messages]=\"message\" (onSave)=\"handleSubmit()\"\r\n (onCancel)=\"handleCancel()\">\r\n <div class=\"card p-fluid p-formgrid\">\r\n <h4 class=\"font-bold col-12 md:col-12\">Template Form</h4>\r\n <div class=\"col-12 md:col-12 flex px-0\">\r\n <div class=\"col-12 md:col-6\">\r\n <text-box [store]=\"templateStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Name',\r\n placeholder: 'Enter Template Name'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"templateStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name: 'type',\r\n displayText: 'Type',\r\n listLabelProperty: 'value',\r\n listValueProperty: 'value',\r\n placeholder: 'Select Type',\r\n isRequired: true,\r\n options: templateTypeList\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 flex px-0\">\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown [store]=\"templateStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'queueId',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id',\r\n displayText : 'Select Queue',\r\n placeholder: 'Select Queue',\r\n isRequired:true\r\n }\" (onInput)=\"handleQueueChange($event)\">\r\n </dropdown>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown [store]=\"templateStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name: 'dictionaryID',\r\n displayText: 'Select Dictionary',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id',\r\n placeholder: 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 flex px-0\">\r\n <div *ngIf=\"record.type === 'email'\" class=\"col-12 md:col-6\">\r\n <text-box [store]=\"templateStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'subject',\r\n isRequired: true,\r\n displayText: 'Subject',\r\n placeholder: 'Enter Subject'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown [store]=\"templateStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name: 'dictionaryItemID',\r\n displayText: 'Select Dictionary Item',\r\n listLabelProperty: 'itemName',\r\n listValueProperty: '_id',\r\n placeholder: 'Select Dictionary Item',\r\n options: dictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12\">\r\n <label>Message</label>\r\n <span class=\"asterisk ml-1\">*</span>\r\n <quill-editor [(ngModel)]=\"messageContent\" class=\"w-full mt-2\"></quill-editor>\r\n </div>\r\n </div>\r\n</form-container>", styles: [".asterisk{color:red}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TextBoxComponent, selector: "text-box" }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FormContainerComponent, selector: "form-container", inputs: ["messages", "record", "headerText", "showSave", "disableSaveButton"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: i1$2.QuillEditorComponent, selector: "quill-editor" }] });
3503
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: TemplateAdminFormComponent, isStandalone: false, selector: "lib-template-admin-form", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<form-container [record]=\"record\" [showSave]=\"true\" [messages]=\"message\" (onSave)=\"handleSubmit()\"\r\n (onCancel)=\"handleCancel()\">\r\n <div class=\"card p-fluid p-formgrid\">\r\n <h4 class=\"font-bold col-12 md:col-12\">Template Form</h4>\r\n <div class=\"col-12 md:col-12 flex px-0\">\r\n <div class=\"col-12 md:col-6\">\r\n <text-box [store]=\"templateStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Name',\r\n placeholder: 'Enter Template Name'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"templateStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name: 'type',\r\n displayText: 'Type',\r\n listLabelProperty: 'value',\r\n listValueProperty: 'value',\r\n placeholder: 'Select Type',\r\n isRequired: true,\r\n options: templateTypeList\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 flex px-0\">\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown [store]=\"templateStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'queueId',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id',\r\n displayText : 'Select Queue',\r\n placeholder: 'Select Queue',\r\n isRequired:true\r\n }\" (onInput)=\"handleQueueChange($event)\">\r\n </dropdown>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown [store]=\"templateStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name: 'dictionaryID',\r\n displayText: 'Select Dictionary',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id',\r\n placeholder: 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 flex px-0\">\r\n <div *ngIf=\"record.type === 'email'\" class=\"col-12 md:col-6\">\r\n <text-box [store]=\"templateStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'subject',\r\n isRequired: true,\r\n displayText: 'Subject',\r\n placeholder: 'Enter Subject'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown [store]=\"templateStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name: 'dictionaryItemID',\r\n displayText: 'Select Dictionary Item',\r\n listLabelProperty: 'itemName',\r\n listValueProperty: '_id',\r\n placeholder: 'Select Dictionary Item',\r\n options: dictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12\">\r\n <label>Message</label>\r\n <span class=\"asterisk ml-1\">*</span>\r\n <quill-editor [(ngModel)]=\"messageContent\" class=\"w-full mt-2\"></quill-editor>\r\n </div>\r\n </div>\r\n</form-container>", styles: [".asterisk{color:red}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TextBoxComponent, selector: "text-box" }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FormContainerComponent, selector: "form-container", inputs: ["messages", "record", "headerText", "showSave", "disableSaveButton"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: i1$2.QuillEditorComponent, selector: "quill-editor" }] });
3498
3504
  }
3499
3505
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TemplateAdminFormComponent, decorators: [{
3500
3506
  type: Component,