cat-qw-lib 0.19.4 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/cat-qw-lib.mjs +51 -15
- package/fesm2022/cat-qw-lib.mjs.map +1 -1
- package/lib/admin/dd-admin/components/dd-admin-form/dd-admin-form.component.d.ts +3 -1
- package/lib/admin/dd-admin/models/dictionary.model.d.ts +1 -0
- package/lib/admin/dd-admin/state/dictionary.service.d.ts +1 -0
- package/lib/shared/constant/DATASOURCES.d.ts +1 -0
- package/lib/shared/constant/ERROR.d.ts +1 -0
- package/lib/shared/constant/MESSAGES.d.ts +1 -0
- package/lib/shared/constant/SHARED.d.ts +1 -0
- package/package.json +1 -1
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -23,7 +23,7 @@ import * as i3$2 from 'primeng/checkbox';
|
|
|
23
23
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
24
24
|
import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
|
|
25
25
|
import { __decorate } from 'tslib';
|
|
26
|
-
import { BehaviorSubject, firstValueFrom, of, tap as tap$1, map, Subscription } from 'rxjs';
|
|
26
|
+
import { BehaviorSubject, firstValueFrom, of, tap as tap$1, map, catchError, Subscription } from 'rxjs';
|
|
27
27
|
import { DragDropModule } from 'primeng/dragdrop';
|
|
28
28
|
import * as i4$2 from 'primeng/confirmdialog';
|
|
29
29
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
@@ -138,6 +138,7 @@ class SHARED {
|
|
|
138
138
|
static MISSING_RECORD_ID = "Missing recordId";
|
|
139
139
|
static EMPTY_STRING = " ";
|
|
140
140
|
static SELECTED_QUEUE_ID = "selectedQueueId";
|
|
141
|
+
static ISITEMEXPRESSION = "isItemExpression";
|
|
141
142
|
}
|
|
142
143
|
const MESSAGE_TYPES = ['SMS', 'WhatsApp', 'Email'];
|
|
143
144
|
const delimiters = ['|', '/', '-'];
|
|
@@ -662,6 +663,7 @@ class ERROR {
|
|
|
662
663
|
static ERROR_FETCHING_WIDGET_DATA = "Error fetching record widget data:";
|
|
663
664
|
static ERROR_MISSING_PARAMETERS = "Required parameters are missing:";
|
|
664
665
|
static INVALID_INDEX = "Invalid index:";
|
|
666
|
+
static ERROR_DELETE_DICTIONARY_ITEM = "Failed to delete dictionary item with ID:";
|
|
665
667
|
}
|
|
666
668
|
|
|
667
669
|
/**
|
|
@@ -1409,6 +1411,7 @@ class DATASOURCES {
|
|
|
1409
1411
|
static DOCUMETS = "documents";
|
|
1410
1412
|
static RATIONALE = "rationale";
|
|
1411
1413
|
static QUEUESAPICONFIG = "api-configurations/get-queues-apiconfig";
|
|
1414
|
+
static DELETEDICTIONARYITEM = "data-dictionaries/dictionaryItems";
|
|
1412
1415
|
}
|
|
1413
1416
|
|
|
1414
1417
|
class HEADERS {
|
|
@@ -1643,6 +1646,7 @@ class MESSAGE {
|
|
|
1643
1646
|
static VALIDATE_SUCCESS_MESSAGE = "API validation completed successfully! Your API is now ready for use.";
|
|
1644
1647
|
static VALIDATE_ACTION_SUCCESS_MESSAGE = "Validation action was successful. The configuration is valid.";
|
|
1645
1648
|
static QUERY_CHANGE_EVENT = "Query Change Event:";
|
|
1649
|
+
static DELETE_DICTIONARY_ITEM_SUCCESS = "Dictionary item deleted successfully.";
|
|
1646
1650
|
}
|
|
1647
1651
|
|
|
1648
1652
|
class LISTCONFIG {
|
|
@@ -2672,6 +2676,7 @@ class DdAdminModel extends BaseModel {
|
|
|
2672
2676
|
name;
|
|
2673
2677
|
queueID;
|
|
2674
2678
|
dictionaryItems = [];
|
|
2679
|
+
message;
|
|
2675
2680
|
}
|
|
2676
2681
|
class DdItemModel extends BaseModel {
|
|
2677
2682
|
itemName;
|
|
@@ -2709,6 +2714,13 @@ class DictionaryService extends BaseService {
|
|
|
2709
2714
|
getAllApiProperties(name, id) {
|
|
2710
2715
|
return this.http.get(`${this.apiUrl + name}/${id}`).pipe(tap$1((propertiesData) => this.dictionaryStore.setPropertiesData(propertiesData)));
|
|
2711
2716
|
}
|
|
2717
|
+
deleteDictionaryItemById(name, dictionaryItemId) {
|
|
2718
|
+
const Url = `${this.apiUrl + name}/${dictionaryItemId}`;
|
|
2719
|
+
return this.http.delete(Url).pipe(catchError((error) => {
|
|
2720
|
+
console.error(ERROR.ERROR_DELETE_DICTIONARY_ITEM, error);
|
|
2721
|
+
return of({ error: true, message: ERROR.ERROR_DELETE_DICTIONARY_ITEM });
|
|
2722
|
+
}));
|
|
2723
|
+
}
|
|
2712
2724
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryService, deps: [{ token: DictionaryStore }, { token: i1$1.HttpClient }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2713
2725
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryService, providedIn: 'root' });
|
|
2714
2726
|
}
|
|
@@ -2768,17 +2780,21 @@ class DdAdminItemFormComponent {
|
|
|
2768
2780
|
ngOnChanges(changes) {
|
|
2769
2781
|
this.subscriptions.add(this.dictionaryQuery.selectPropertyData().subscribe((res) => {
|
|
2770
2782
|
if (res) {
|
|
2771
|
-
res
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
res?.childApis.forEach((childApi) => {
|
|
2775
|
-
childApi.properties.forEach((property) => {
|
|
2776
|
-
this.propertyOptions.push({ label: `${res.name}.${childApi.name}.${property}`, value: `${res.name}.${childApi.name}.${property}` });
|
|
2783
|
+
if (res?.properties?.length) {
|
|
2784
|
+
res.properties.forEach((property) => {
|
|
2785
|
+
this.propertyOptions.push({ label: `${res.name}.${property}`, value: `${res.name}.${property}` });
|
|
2777
2786
|
});
|
|
2778
|
-
}
|
|
2787
|
+
}
|
|
2788
|
+
if (res?.childApis?.length) {
|
|
2789
|
+
res.childApis.forEach((childApi) => {
|
|
2790
|
+
childApi.properties.forEach((property) => {
|
|
2791
|
+
this.propertyOptions.push({ label: `${res.name}.${childApi.name}.${property}`, value: `${res.name}.${childApi.name}.${property}` });
|
|
2792
|
+
});
|
|
2793
|
+
});
|
|
2794
|
+
}
|
|
2779
2795
|
}
|
|
2780
2796
|
}));
|
|
2781
|
-
if (changes[
|
|
2797
|
+
if (changes[SHARED.ISITEMEXPRESSION]) {
|
|
2782
2798
|
this.attributeRecord.mappingInfo = (this.isItemExpression ? this.ddItemRecord.itemExpression : this.ddItemRecord.styleExpression) ?? SHARED.EMPTY;
|
|
2783
2799
|
}
|
|
2784
2800
|
}
|
|
@@ -2804,11 +2820,11 @@ class DdAdminItemFormComponent {
|
|
|
2804
2820
|
this.subscriptions.unsubscribe();
|
|
2805
2821
|
}
|
|
2806
2822
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminItemFormComponent, deps: [{ token: DictionaryStore }, { token: DictionaryQuery }], target: i0.ɵɵFactoryTarget.Component });
|
|
2807
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: DdAdminItemFormComponent, isStandalone: false, selector: "lib-dd-admin-item-form", inputs: { ddItemRecord: "ddItemRecord", isItemExpression: "isItemExpression", isSidebarVisible: "isSidebarVisible" }, outputs: { saveClick: "saveClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"dicitonary-edit-action px-3\">\r\n <div class=\"flex align-items-center justify-content-end mt-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Save',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleSaveBtnClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 mt-5\">\r\n <text-area\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n displayText: 'Expression',\r\n readonly : false,\r\n name : 'mappingInfo',\r\n isRequired : false,\r\n placeholder : 'Enter Text',\r\n customPadding: '12px',\r\n }\"\r\n ></text-area>\r\n </div>\r\n <div class=\"col-12 md:col-12\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"dictionaryStore\" [record]=\"attributeRecord\" [attributeModel]=\"{\r\n name:'propertyList',\r\n displayText : 'Select properties',\r\n isRequired:false,\r\n options : propertyOptions,\r\n filter : true\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Add to expression',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleAddExpressionClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: ButtonComponent, selector: "lib-button" }, { kind: "component", type: TextAreaComponent, selector: "text-area", inputs: ["rowspan"] }] });
|
|
2823
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: DdAdminItemFormComponent, isStandalone: false, selector: "lib-dd-admin-item-form", inputs: { ddItemRecord: "ddItemRecord", isItemExpression: "isItemExpression", isSidebarVisible: "isSidebarVisible" }, outputs: { saveClick: "saveClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"dicitonary-edit-action px-3\">\r\n <div class=\"flex align-items-center justify-content-end mt-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Save',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleSaveBtnClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 mt-5\">\r\n <label *ngIf=\"!isItemExpression\" for=\"styleInput\" class=\"text-gray-600 text-sm mb-2 block\">\r\n Hint: Use key-value pairs for styles.\r\n <br/>\r\n Example:<code>\r\n 'background-color': 'lightgray',\r\n 'font-size': '16px',<br>\r\n 'padding': '10px'\r\n </code>\r\n </label>\r\n <text-area\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n displayText: 'Expression',\r\n readonly : false,\r\n name : 'mappingInfo',\r\n isRequired : false,\r\n placeholder : 'Enter Text',\r\n customPadding: '12px',\r\n }\"\r\n ></text-area>\r\n </div>\r\n <div class=\"col-12 md:col-12\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"dictionaryStore\" [record]=\"attributeRecord\" [attributeModel]=\"{\r\n name:'propertyList',\r\n displayText : 'Select properties',\r\n isRequired:false,\r\n options : propertyOptions,\r\n filter : true\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Add to expression',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleAddExpressionClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: ButtonComponent, selector: "lib-button" }, { kind: "component", type: TextAreaComponent, selector: "text-area", inputs: ["rowspan"] }] });
|
|
2808
2824
|
}
|
|
2809
2825
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminItemFormComponent, decorators: [{
|
|
2810
2826
|
type: Component,
|
|
2811
|
-
args: [{ selector: 'lib-dd-admin-item-form', standalone: false, template: "<div class=\"dicitonary-edit-action px-3\">\r\n <div class=\"flex align-items-center justify-content-end mt-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Save',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleSaveBtnClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 mt-5\">\r\n <text-area\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n displayText: 'Expression',\r\n readonly : false,\r\n name : 'mappingInfo',\r\n isRequired : false,\r\n placeholder : 'Enter Text',\r\n customPadding: '12px',\r\n }\"\r\n ></text-area>\r\n </div>\r\n <div class=\"col-12 md:col-12\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"dictionaryStore\" [record]=\"attributeRecord\" [attributeModel]=\"{\r\n name:'propertyList',\r\n displayText : 'Select properties',\r\n isRequired:false,\r\n options : propertyOptions,\r\n filter : true\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Add to expression',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleAddExpressionClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n</div>" }]
|
|
2827
|
+
args: [{ selector: 'lib-dd-admin-item-form', standalone: false, template: "<div class=\"dicitonary-edit-action px-3\">\r\n <div class=\"flex align-items-center justify-content-end mt-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Save',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleSaveBtnClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 mt-5\">\r\n <label *ngIf=\"!isItemExpression\" for=\"styleInput\" class=\"text-gray-600 text-sm mb-2 block\">\r\n Hint: Use key-value pairs for styles.\r\n <br/>\r\n Example:<code>\r\n 'background-color': 'lightgray',\r\n 'font-size': '16px',<br>\r\n 'padding': '10px'\r\n </code>\r\n </label>\r\n <text-area\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n displayText: 'Expression',\r\n readonly : false,\r\n name : 'mappingInfo',\r\n isRequired : false,\r\n placeholder : 'Enter Text',\r\n customPadding: '12px',\r\n }\"\r\n ></text-area>\r\n </div>\r\n <div class=\"col-12 md:col-12\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"dictionaryStore\" [record]=\"attributeRecord\" [attributeModel]=\"{\r\n name:'propertyList',\r\n displayText : 'Select properties',\r\n isRequired:false,\r\n options : propertyOptions,\r\n filter : true\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Add to expression',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleAddExpressionClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n</div>" }]
|
|
2812
2828
|
}], ctorParameters: () => [{ type: DictionaryStore }, { type: DictionaryQuery }], propDecorators: { ddItemRecord: [{
|
|
2813
2829
|
type: Input
|
|
2814
2830
|
}], isItemExpression: [{
|
|
@@ -2829,6 +2845,7 @@ class DdAdminFormComponent extends BaseFormComponent {
|
|
|
2829
2845
|
baseStore;
|
|
2830
2846
|
baseQuery;
|
|
2831
2847
|
sidebarVisibility = [];
|
|
2848
|
+
messages = SHARED.EMPTYARRAY;
|
|
2832
2849
|
dictionaryItem;
|
|
2833
2850
|
dictionaryName = SHARED.EMPTY;
|
|
2834
2851
|
isItemExpression = SHARED.FALSE;
|
|
@@ -2866,15 +2883,34 @@ class DdAdminFormComponent extends BaseFormComponent {
|
|
|
2866
2883
|
onSidebarClose(isVisible) {
|
|
2867
2884
|
this.sidebarVisibility = this.sidebarVisibility.map(() => isVisible);
|
|
2868
2885
|
}
|
|
2869
|
-
handleDeleteRecord(index) {
|
|
2870
|
-
this.record.dictionaryItems.
|
|
2886
|
+
handleDeleteRecord(index, dictionaryItemId) {
|
|
2887
|
+
if (index >= 0 && index < this.record.dictionaryItems.length) {
|
|
2888
|
+
this.record.dictionaryItems = this.record.dictionaryItems.filter((_, i) => i !== index);
|
|
2889
|
+
if (dictionaryItemId) {
|
|
2890
|
+
this.service.deleteDictionaryItemById(DATASOURCES.DELETEDICTIONARYITEM, dictionaryItemId).subscribe((res) => {
|
|
2891
|
+
this.messages = [{ severity: SHARED.SUCCESS, detail: res?.message || MESSAGE.DELETE_DICTIONARY_ITEM_SUCCESS }];
|
|
2892
|
+
setTimeout(() => {
|
|
2893
|
+
this.messages = SHARED.EMPTYARRAY;
|
|
2894
|
+
}, 3000);
|
|
2895
|
+
}, (error) => {
|
|
2896
|
+
this.messages = [{ severity: SHARED.ERROR, detail: `${ERROR.ERROR_DELETE_DICTIONARY_ITEM} ${dictionaryItemId}` }];
|
|
2897
|
+
console.error(`${ERROR.ERROR_DELETE_DICTIONARY_ITEM} ${dictionaryItemId}`, error);
|
|
2898
|
+
setTimeout(() => {
|
|
2899
|
+
this.messages = SHARED.EMPTYARRAY;
|
|
2900
|
+
}, 3000);
|
|
2901
|
+
});
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
else {
|
|
2905
|
+
console.error(ERROR.INVALID_INDEX, index);
|
|
2906
|
+
}
|
|
2871
2907
|
}
|
|
2872
2908
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminFormComponent, deps: [{ token: DictionaryService }, { token: DictionaryQuery }, { token: ValidatorService }, { token: i3$3.Router }, { token: i3$3.ActivatedRoute }, { token: DictionaryStore }, { token: BaseStore }, { token: BaseQuery }], target: i0.ɵɵFactoryTarget.Component });
|
|
2873
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: DdAdminFormComponent, isStandalone: false, selector: "lib-dd-admin-form", usesInheritance: true, ngImport: i0, template: "<form-container [record]=\"record\" [headerText]=\"'Dictionary Form'\" [showSave]=\"true\" (onCancel)=\"handleCancel()\"\r\n
|
|
2909
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: DdAdminFormComponent, isStandalone: false, selector: "lib-dd-admin-form", usesInheritance: true, ngImport: i0, template: "<form-container \r\n [messages]=\"messages\" \r\n [record]=\"record\" \r\n [headerText]=\"'Dictionary Form'\" \r\n [showSave]=\"true\" \r\n (onCancel)=\"handleCancel()\"\r\n (onSave)=\"handleSubmit()\">\r\n <div class=\"card p-fluid p-formgrid grid\">\r\n <div class=\"col-12 md:col-12 flex align-items-center justify-content-between\">\r\n <div class=\"col-12 md:col-6 p-field\">\r\n <div class=\"dictionary-name\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly : false,\r\n name : 'name',\r\n isRequired : true,\r\n displayText: 'Dictionary Name',\r\n placeholder : 'Enter Text',\r\n }\"></text-box>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"ddAdminStore\" [record]=\"record\" [attributeModel]=\"{\r\n name: 'queueID',\r\n dataSource: 'queues',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id',\r\n displayText: 'Queue',\r\n placeholder: 'Select Queue',\r\n isRequired: true\r\n }\" (onInput)=\"handleGetProperties($event)\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field p-0 pr-2 ml-3 col-12 md:col-2\">\r\n <div class=\"card m-0 p-0 mb-2\">\r\n <div class=\"mt-3 w-full flex\">\r\n <button pButton pRipple routerLinkActive=\"router-link-active\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleDictionaryItemAddBtnClick()\">\r\n Add New Item\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- dictionary Items -->\r\n <div class=\"col-12 md:col-12 flex align-items-center justify-content-between\"\r\n *ngFor=\"let ddItem of record.dictionaryItems; let i = index\">\r\n <div class=\"field col-12 md:col-3 pr-0\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'itemName',\r\n readonly : false,\r\n displayText : 'Item Name',\r\n isRequired : true,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field flex align-items-center justify-content-between col-12 md:col-3 pr-0\">\r\n <div class=\"flex align-items-center w-full\">\r\n <div class=\"w-full mr-3\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'itemExpression',\r\n readonly : false,\r\n disable : true,\r\n displayText : 'Item Expression',\r\n isRequired : true,\r\n }\">\r\n </text-box>\r\n </div>\r\n <span class=\"pi pi-cog mt-4 cursor-pointer text-xl\" (click)=\"handleItemExpression(i, $event )\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field col-12 md:col-3 flex align-items-center justify-content-between pr-0\">\r\n <div class=\"flex align-items-center w-full\">\r\n <div class=\"w-full mr-3\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'styleExpression',\r\n readonly : false,\r\n disable : true,\r\n displayText : 'Style Expression',\r\n isRequired : true,\r\n }\">\r\n </text-box>\r\n </div>\r\n <span class=\"pi pi-cog mt-4 text-xl cursor-pointer text-color\"\r\n (click)=\"handleStyleExpression(i, $event)\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field col-12 md:col-2 flex align-items-center justify-content-center mt-4\">\r\n <check-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Is Active',\r\n }\">\r\n </check-box>\r\n\r\n <div class=\"ml-6 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteRecord(i, ddItem?._id)\"></i>\r\n </div>\r\n </div>\r\n <sidebar [isSidebarVisible]=\"sidebarVisibility[i]\" [title]=\"'Edit Expression'\"\r\n (onClose)=\"onSidebarClose($event)\">\r\n <lib-dd-admin-item-form [ddItemRecord]=\"ddItem\" [isItemExpression]=\"isItemExpression\"\r\n (saveClick)=\"onSidebarClose($event)\"></lib-dd-admin-item-form>\r\n </sidebar>\r\n </div>\r\n\r\n </div>\r\n</form-container>", styles: [".trash-icon-wrapper{font-size:20px;color:var(--red-500)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: TextBoxComponent, selector: "text-box" }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: FormContainerComponent, selector: "form-container", inputs: ["messages", "record", "headerText", "showSave", "disableSaveButton"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: SidebarComponent, selector: "sidebar", inputs: ["isSidebarVisible", "title"], outputs: ["onClose"] }, { kind: "component", type: CheckBoxComponent, selector: "check-box" }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: DdAdminItemFormComponent, selector: "lib-dd-admin-item-form", inputs: ["ddItemRecord", "isItemExpression", "isSidebarVisible"], outputs: ["saveClick"] }] });
|
|
2874
2910
|
}
|
|
2875
2911
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminFormComponent, decorators: [{
|
|
2876
2912
|
type: Component,
|
|
2877
|
-
args: [{ selector: 'lib-dd-admin-form', standalone: false, template: "<form-container [record]=\"record\" [headerText]=\"'Dictionary Form'\" [showSave]=\"true\" (onCancel)=\"handleCancel()\"\r\n
|
|
2913
|
+
args: [{ selector: 'lib-dd-admin-form', standalone: false, template: "<form-container \r\n [messages]=\"messages\" \r\n [record]=\"record\" \r\n [headerText]=\"'Dictionary Form'\" \r\n [showSave]=\"true\" \r\n (onCancel)=\"handleCancel()\"\r\n (onSave)=\"handleSubmit()\">\r\n <div class=\"card p-fluid p-formgrid grid\">\r\n <div class=\"col-12 md:col-12 flex align-items-center justify-content-between\">\r\n <div class=\"col-12 md:col-6 p-field\">\r\n <div class=\"dictionary-name\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly : false,\r\n name : 'name',\r\n isRequired : true,\r\n displayText: 'Dictionary Name',\r\n placeholder : 'Enter Text',\r\n }\"></text-box>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"ddAdminStore\" [record]=\"record\" [attributeModel]=\"{\r\n name: 'queueID',\r\n dataSource: 'queues',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id',\r\n displayText: 'Queue',\r\n placeholder: 'Select Queue',\r\n isRequired: true\r\n }\" (onInput)=\"handleGetProperties($event)\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field p-0 pr-2 ml-3 col-12 md:col-2\">\r\n <div class=\"card m-0 p-0 mb-2\">\r\n <div class=\"mt-3 w-full flex\">\r\n <button pButton pRipple routerLinkActive=\"router-link-active\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleDictionaryItemAddBtnClick()\">\r\n Add New Item\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- dictionary Items -->\r\n <div class=\"col-12 md:col-12 flex align-items-center justify-content-between\"\r\n *ngFor=\"let ddItem of record.dictionaryItems; let i = index\">\r\n <div class=\"field col-12 md:col-3 pr-0\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'itemName',\r\n readonly : false,\r\n displayText : 'Item Name',\r\n isRequired : true,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field flex align-items-center justify-content-between col-12 md:col-3 pr-0\">\r\n <div class=\"flex align-items-center w-full\">\r\n <div class=\"w-full mr-3\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'itemExpression',\r\n readonly : false,\r\n disable : true,\r\n displayText : 'Item Expression',\r\n isRequired : true,\r\n }\">\r\n </text-box>\r\n </div>\r\n <span class=\"pi pi-cog mt-4 cursor-pointer text-xl\" (click)=\"handleItemExpression(i, $event )\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field col-12 md:col-3 flex align-items-center justify-content-between pr-0\">\r\n <div class=\"flex align-items-center w-full\">\r\n <div class=\"w-full mr-3\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'styleExpression',\r\n readonly : false,\r\n disable : true,\r\n displayText : 'Style Expression',\r\n isRequired : true,\r\n }\">\r\n </text-box>\r\n </div>\r\n <span class=\"pi pi-cog mt-4 text-xl cursor-pointer text-color\"\r\n (click)=\"handleStyleExpression(i, $event)\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field col-12 md:col-2 flex align-items-center justify-content-center mt-4\">\r\n <check-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Is Active',\r\n }\">\r\n </check-box>\r\n\r\n <div class=\"ml-6 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteRecord(i, ddItem?._id)\"></i>\r\n </div>\r\n </div>\r\n <sidebar [isSidebarVisible]=\"sidebarVisibility[i]\" [title]=\"'Edit Expression'\"\r\n (onClose)=\"onSidebarClose($event)\">\r\n <lib-dd-admin-item-form [ddItemRecord]=\"ddItem\" [isItemExpression]=\"isItemExpression\"\r\n (saveClick)=\"onSidebarClose($event)\"></lib-dd-admin-item-form>\r\n </sidebar>\r\n </div>\r\n\r\n </div>\r\n</form-container>", styles: [".trash-icon-wrapper{font-size:20px;color:var(--red-500)}\n"] }]
|
|
2878
2914
|
}], ctorParameters: () => [{ type: DictionaryService }, { type: DictionaryQuery }, { type: ValidatorService }, { type: i3$3.Router }, { type: i3$3.ActivatedRoute }, { type: DictionaryStore }, { type: BaseStore }, { type: BaseQuery }] });
|
|
2879
2915
|
|
|
2880
2916
|
class DdAdminListComponent extends BaseListComponent {
|