cat-qw-lib 2.3.32 → 2.3.34
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
CHANGED
|
@@ -3802,12 +3802,19 @@ class WidgetAdminFormComponent extends BaseFormComponent {
|
|
|
3802
3802
|
this.baseQuery = baseQuery;
|
|
3803
3803
|
this.record = new WidgetModel();
|
|
3804
3804
|
this.record.isActive = true;
|
|
3805
|
+
this.record.dataItems = this.record.dataItems || [];
|
|
3806
|
+
this.record.badges = this.record.badges || [];
|
|
3805
3807
|
this.widgetItem = new WidgetItemModel();
|
|
3806
3808
|
}
|
|
3807
3809
|
ngOnInit() {
|
|
3808
3810
|
super.init();
|
|
3809
3811
|
this.baseStore.setIsApiValidated(null);
|
|
3810
3812
|
this.recordChange.asObservable().subscribe((record) => {
|
|
3813
|
+
// Ensure arrays are initialized
|
|
3814
|
+
if (!record.dataItems)
|
|
3815
|
+
record.dataItems = [];
|
|
3816
|
+
if (!record.badges)
|
|
3817
|
+
record.badges = [];
|
|
3811
3818
|
this.handleAPIChange(record.queueID);
|
|
3812
3819
|
this.handleHeaderDictionarySelect(record.headerDictionaryID);
|
|
3813
3820
|
this.handleSubHeaderDictionarySelect(record.subHeaderDictionaryID);
|
|
@@ -3891,7 +3898,7 @@ class WidgetAdminFormComponent extends BaseFormComponent {
|
|
|
3891
3898
|
});
|
|
3892
3899
|
}
|
|
3893
3900
|
handleDeleteBadge(index) {
|
|
3894
|
-
if (index >= 0 && index < this.record.badges.length) {
|
|
3901
|
+
if (this.record.badges && index >= 0 && index < this.record.badges.length) {
|
|
3895
3902
|
this.record.badges = this.record.badges.filter((_, i) => i !== index);
|
|
3896
3903
|
}
|
|
3897
3904
|
else {
|
|
@@ -3899,7 +3906,7 @@ class WidgetAdminFormComponent extends BaseFormComponent {
|
|
|
3899
3906
|
}
|
|
3900
3907
|
}
|
|
3901
3908
|
handleDeleteRecord(index) {
|
|
3902
|
-
if (index >= 0 && index < this.record.dataItems.length) {
|
|
3909
|
+
if (this.record.dataItems && index >= 0 && index < this.record.dataItems.length) {
|
|
3903
3910
|
this.record.dataItems = this.record.dataItems.filter((_, i) => i !== index);
|
|
3904
3911
|
}
|
|
3905
3912
|
else {
|
|
@@ -3918,7 +3925,7 @@ class WidgetAdminFormComponent extends BaseFormComponent {
|
|
|
3918
3925
|
}
|
|
3919
3926
|
return item;
|
|
3920
3927
|
});
|
|
3921
|
-
if (this.record.badges) {
|
|
3928
|
+
if (this.record.badges && Array.isArray(this.record.badges)) {
|
|
3922
3929
|
this.record.badges = this.record.badges.map((badge) => {
|
|
3923
3930
|
if (typeof badge.style === 'string') {
|
|
3924
3931
|
const parsed = this.service.sanitizeStyleString(badge.style);
|
|
@@ -3927,6 +3934,9 @@ class WidgetAdminFormComponent extends BaseFormComponent {
|
|
|
3927
3934
|
return badge;
|
|
3928
3935
|
});
|
|
3929
3936
|
}
|
|
3937
|
+
else {
|
|
3938
|
+
this.record.badges = [];
|
|
3939
|
+
}
|
|
3930
3940
|
super.handleSubmit();
|
|
3931
3941
|
}
|
|
3932
3942
|
ngOnDestroy() {
|
|
@@ -3934,11 +3944,11 @@ class WidgetAdminFormComponent extends BaseFormComponent {
|
|
|
3934
3944
|
super.ngOnDestroy();
|
|
3935
3945
|
}
|
|
3936
3946
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetAdminFormComponent, deps: [{ token: WidgetAdminService }, { token: ValidatorService }, { token: WidgetAdminStore }, { token: WidgetAdminQuery }, { token: i3$4.Router }, { token: i3$4.ActivatedRoute }, { token: BaseStore }, { token: BaseQuery }], target: i0.ɵɵFactoryTarget.Component });
|
|
3937
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: WidgetAdminFormComponent, isStandalone: false, selector: "lib-widget-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\">Widget Form</h4>\r\n <div class=\"col-12 md:col-12 mt-2 mb-2 flex\">\r\n <div class=\"col-3 md:col-3 mt-2 mb-2\">\r\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Name',\r\n placeholder: 'Enter Widget Name'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-3 md:col-3 mt-2 mb-2\">\r\n <dropdown [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'apiConfigId',\r\n displayText : 'Select API',\r\n isRequired:true,\r\n }\" (onInput)=\"handleAPIChange($event)\">\r\n </dropdown>\r\n </div>\r\n\r\n <div class=\"col-4 md:col-4 mt-2 mb-2\">\r\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'style',\r\n isRequired: false,\r\n displayText: 'Style',\r\n placeholder: 'Enter Widget Style'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-2 md:col-2 mt-5\">\r\n <check-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Active',\r\n }\">\r\n </check-box>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center m-0\">\r\n <div class=\"col-6 md:col-5 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Header Item',\r\n options: headerDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-6 md:col-5 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleSubHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select SubHeader Item',\r\n options: subHeaderDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-6 md:col-2 mt-2 mb-2 flex\">\r\n <div class=\"field col-12 pl-2 pb-0 mb-2 md:mr-2 md:col-12\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'layoutType',\r\n listLabelProperty:'name',\r\n listValueProperty:'value',\r\n displayText : 'Select Layout Type',\r\n options: widgetLayoutTypeList\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field p-0 pr-2 col-12 md:col-12 flex gap-2\">\r\n <div class=\"col-6 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 icon=\"pi pi-plus font-semibold\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleBadgeAddBtnClick()\">\r\n <span class=\"ml-3\">Add Badge </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-6 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 icon=\"pi pi-plus font-semibold\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleWidgetItemAddBtnClick()\">\r\n <span class=\"ml-3\">Add Widget Item </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Badges Section -->\r\n <div class=\"field p-0 pr-2 col-12 md:col-12 mb-3\">\r\n <h5 *ngIf=\"record && record.badges && record.badges.length > 0\" class=\"font-bold col-12 md:col-12 mb-2\">Badges</h5>\r\n <div class=\"feild-card col-12 md:col-12 flex\" *ngFor=\"let badge of (record?.badges || []); let i = index;\">\r\n <div class=\"field col-3 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"badge\" [attributeModel]=\"{\r\n name:'dictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n isRequired:true,\r\n options: dictionaries\r\n }\" (onInput)=\"handleBadgeDictionarySelect($event, i)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-3 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"badge\" [attributeModel]=\"{\r\n name:'dictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Properties',\r\n isRequired:true,\r\n options: badgeDictionaryItemArray[i]\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-4 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"badge\" [attributeModel]=\"{\r\n name : 'style',\r\n readonly : false,\r\n displayText : 'Style',\r\n isRequired : false,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-2 m-0 flex justify-content-start md:col-2 mt-5\">\r\n <div class=\"ml-4 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteBadge(i)\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Widget Items -->\r\n <h5 *ngIf=\"record.dataItems.length > 0\" class=\"font-bold col-12 md:col-12 mb-2\">Widget Items</h5>\r\n <div class=\"feild-card col-12 md:col-12 flex\" *ngFor=\"let widgetItem of record.dataItems; let i = index;\">\r\n <div class=\"field col-2 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name : 'name',\r\n readonly : false,\r\n displayText : 'Item Label',\r\n isRequired : true,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n isRequired:true,\r\n options: dictionaries\r\n }\" (onInput)=\"handleWidgetItemDictionarySelect($event, i)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Properties',\r\n isRequired:true,\r\n options: dictionaryItemArray[i]\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-4 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name : 'style',\r\n readonly : false,\r\n displayText : 'Item Style',\r\n isRequired : false,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-4 m-0 flex justify-content-center md:col-2 mt-5\">\r\n <div class=\"m-0\">\r\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Is Active ?',\r\n }\">\r\n </check-box>\r\n </div>\r\n <div class=\"ml-4 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteRecord(i)\"></i>\r\n </div>\r\n </div>\r\n </div>\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: "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: "component", type: FormContainerComponent, selector: "form-container", inputs: ["messages", "record", "headerText", "showSave", "disableSaveButton"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: CheckBoxComponent, selector: "check-box" }, { kind: "directive", type: i3$3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }] });
|
|
3947
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: WidgetAdminFormComponent, isStandalone: false, selector: "lib-widget-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\">Widget Form</h4>\r\n <div class=\"col-12 md:col-12 mt-2 mb-2 flex\">\r\n <div class=\"col-3 md:col-3 mt-2 mb-2\">\r\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Name',\r\n placeholder: 'Enter Widget Name'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-3 md:col-3 mt-2 mb-2\">\r\n <dropdown [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'apiConfigId',\r\n displayText : 'Select API',\r\n isRequired:true,\r\n }\" (onInput)=\"handleAPIChange($event)\">\r\n </dropdown>\r\n </div>\r\n\r\n <div class=\"col-4 md:col-4 mt-2 mb-2\">\r\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'style',\r\n isRequired: false,\r\n displayText: 'Style',\r\n placeholder: 'Enter Widget Style'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-2 md:col-2 mt-5\">\r\n <check-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Active',\r\n }\">\r\n </check-box>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center m-0\">\r\n <div class=\"col-6 md:col-5 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Header Item',\r\n options: headerDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-6 md:col-5 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleSubHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select SubHeader Item',\r\n options: subHeaderDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-6 md:col-2 mt-2 mb-2 flex\">\r\n <div class=\"field col-12 pl-2 pb-0 mb-2 md:mr-2 md:col-12\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'layoutType',\r\n listLabelProperty:'name',\r\n listValueProperty:'value',\r\n displayText : 'Select Layout Type',\r\n options: widgetLayoutTypeList\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field p-0 pr-2 col-12 md:col-12 flex gap-2\">\r\n <div class=\"col-6 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 icon=\"pi pi-plus font-semibold\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleBadgeAddBtnClick()\">\r\n <span class=\"ml-3\">Add Badge </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-6 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 icon=\"pi pi-plus font-semibold\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleWidgetItemAddBtnClick()\">\r\n <span class=\"ml-3\">Add Widget Item </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Badges Section -->\r\n <div class=\"field p-0 pr-2 col-12 md:col-12 mb-3\">\r\n <h5 *ngIf=\"(record?.badges?.length ?? 0) > 0\" class=\"font-bold col-12 md:col-12 mb-2\">Badges</h5>\r\n <div class=\"feild-card col-12 md:col-12 flex\" *ngFor=\"let badge of (record?.badges || []); let i = index;\">\r\n <div class=\"field col-3 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"badge\" [attributeModel]=\"{\r\n name:'dictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n isRequired:true,\r\n options: dictionaries\r\n }\" (onInput)=\"handleBadgeDictionarySelect($event, i)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-3 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"badge\" [attributeModel]=\"{\r\n name:'dictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Properties',\r\n isRequired:true,\r\n options: badgeDictionaryItemArray[i]\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-4 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"badge\" [attributeModel]=\"{\r\n name : 'style',\r\n readonly : false,\r\n displayText : 'Style',\r\n isRequired : false,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-2 m-0 flex justify-content-start md:col-2 mt-5\">\r\n <div class=\"ml-4 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteBadge(i)\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Widget Items -->\r\n <h5 *ngIf=\"(record?.dataItems?.length ?? 0) > 0\" class=\"font-bold col-12 md:col-12 mb-2\">Widget Items</h5>\r\n <div class=\"feild-card col-12 md:col-12 flex\" *ngFor=\"let widgetItem of (record?.dataItems || []); let i = index;\">\r\n <div class=\"field col-2 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name : 'name',\r\n readonly : false,\r\n displayText : 'Item Label',\r\n isRequired : true,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n isRequired:true,\r\n options: dictionaries\r\n }\" (onInput)=\"handleWidgetItemDictionarySelect($event, i)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Properties',\r\n isRequired:true,\r\n options: dictionaryItemArray[i]\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-4 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name : 'style',\r\n readonly : false,\r\n displayText : 'Item Style',\r\n isRequired : false,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-4 m-0 flex justify-content-center md:col-2 mt-5\">\r\n <div class=\"m-0\">\r\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Is Active ?',\r\n }\">\r\n </check-box>\r\n </div>\r\n <div class=\"ml-4 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteRecord(i)\"></i>\r\n </div>\r\n </div>\r\n </div>\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: "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: "component", type: FormContainerComponent, selector: "form-container", inputs: ["messages", "record", "headerText", "showSave", "disableSaveButton"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: CheckBoxComponent, selector: "check-box" }, { kind: "directive", type: i3$3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }] });
|
|
3938
3948
|
}
|
|
3939
3949
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetAdminFormComponent, decorators: [{
|
|
3940
3950
|
type: Component,
|
|
3941
|
-
args: [{ selector: 'lib-widget-admin-form', standalone: false, 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\">Widget Form</h4>\r\n <div class=\"col-12 md:col-12 mt-2 mb-2 flex\">\r\n <div class=\"col-3 md:col-3 mt-2 mb-2\">\r\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Name',\r\n placeholder: 'Enter Widget Name'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-3 md:col-3 mt-2 mb-2\">\r\n <dropdown [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'apiConfigId',\r\n displayText : 'Select API',\r\n isRequired:true,\r\n }\" (onInput)=\"handleAPIChange($event)\">\r\n </dropdown>\r\n </div>\r\n\r\n <div class=\"col-4 md:col-4 mt-2 mb-2\">\r\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'style',\r\n isRequired: false,\r\n displayText: 'Style',\r\n placeholder: 'Enter Widget Style'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-2 md:col-2 mt-5\">\r\n <check-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Active',\r\n }\">\r\n </check-box>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center m-0\">\r\n <div class=\"col-6 md:col-5 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Header Item',\r\n options: headerDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-6 md:col-5 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleSubHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select SubHeader Item',\r\n options: subHeaderDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-6 md:col-2 mt-2 mb-2 flex\">\r\n <div class=\"field col-12 pl-2 pb-0 mb-2 md:mr-2 md:col-12\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'layoutType',\r\n listLabelProperty:'name',\r\n listValueProperty:'value',\r\n displayText : 'Select Layout Type',\r\n options: widgetLayoutTypeList\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field p-0 pr-2 col-12 md:col-12 flex gap-2\">\r\n <div class=\"col-6 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 icon=\"pi pi-plus font-semibold\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleBadgeAddBtnClick()\">\r\n <span class=\"ml-3\">Add Badge </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-6 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 icon=\"pi pi-plus font-semibold\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleWidgetItemAddBtnClick()\">\r\n <span class=\"ml-3\">Add Widget Item </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Badges Section -->\r\n <div class=\"field p-0 pr-2 col-12 md:col-12 mb-3\">\r\n <h5 *ngIf=\"record && record.badges && record.badges.length > 0\" class=\"font-bold col-12 md:col-12 mb-2\">Badges</h5>\r\n <div class=\"feild-card col-12 md:col-12 flex\" *ngFor=\"let badge of (record?.badges || []); let i = index;\">\r\n <div class=\"field col-3 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"badge\" [attributeModel]=\"{\r\n name:'dictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n isRequired:true,\r\n options: dictionaries\r\n }\" (onInput)=\"handleBadgeDictionarySelect($event, i)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-3 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"badge\" [attributeModel]=\"{\r\n name:'dictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Properties',\r\n isRequired:true,\r\n options: badgeDictionaryItemArray[i]\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-4 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"badge\" [attributeModel]=\"{\r\n name : 'style',\r\n readonly : false,\r\n displayText : 'Style',\r\n isRequired : false,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-2 m-0 flex justify-content-start md:col-2 mt-5\">\r\n <div class=\"ml-4 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteBadge(i)\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Widget Items -->\r\n <h5 *ngIf=\"record.dataItems.length > 0\" class=\"font-bold col-12 md:col-12 mb-2\">Widget Items</h5>\r\n <div class=\"feild-card col-12 md:col-12 flex\" *ngFor=\"let widgetItem of record.dataItems; let i = index;\">\r\n <div class=\"field col-2 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name : 'name',\r\n readonly : false,\r\n displayText : 'Item Label',\r\n isRequired : true,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n isRequired:true,\r\n options: dictionaries\r\n }\" (onInput)=\"handleWidgetItemDictionarySelect($event, i)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Properties',\r\n isRequired:true,\r\n options: dictionaryItemArray[i]\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-4 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name : 'style',\r\n readonly : false,\r\n displayText : 'Item Style',\r\n isRequired : false,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-4 m-0 flex justify-content-center md:col-2 mt-5\">\r\n <div class=\"m-0\">\r\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Is Active ?',\r\n }\">\r\n </check-box>\r\n </div>\r\n <div class=\"ml-4 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteRecord(i)\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</form-container>", styles: [".trash-icon-wrapper{font-size:20px;color:var(--red-500)}\n"] }]
|
|
3951
|
+
args: [{ selector: 'lib-widget-admin-form', standalone: false, 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\">Widget Form</h4>\r\n <div class=\"col-12 md:col-12 mt-2 mb-2 flex\">\r\n <div class=\"col-3 md:col-3 mt-2 mb-2\">\r\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Name',\r\n placeholder: 'Enter Widget Name'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-3 md:col-3 mt-2 mb-2\">\r\n <dropdown [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'apiConfigId',\r\n displayText : 'Select API',\r\n isRequired:true,\r\n }\" (onInput)=\"handleAPIChange($event)\">\r\n </dropdown>\r\n </div>\r\n\r\n <div class=\"col-4 md:col-4 mt-2 mb-2\">\r\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'style',\r\n isRequired: false,\r\n displayText: 'Style',\r\n placeholder: 'Enter Widget Style'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-2 md:col-2 mt-5\">\r\n <check-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Active',\r\n }\">\r\n </check-box>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center m-0\">\r\n <div class=\"col-6 md:col-5 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Header Item',\r\n options: headerDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-6 md:col-5 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleSubHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select SubHeader Item',\r\n options: subHeaderDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-6 md:col-2 mt-2 mb-2 flex\">\r\n <div class=\"field col-12 pl-2 pb-0 mb-2 md:mr-2 md:col-12\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'layoutType',\r\n listLabelProperty:'name',\r\n listValueProperty:'value',\r\n displayText : 'Select Layout Type',\r\n options: widgetLayoutTypeList\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field p-0 pr-2 col-12 md:col-12 flex gap-2\">\r\n <div class=\"col-6 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 icon=\"pi pi-plus font-semibold\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleBadgeAddBtnClick()\">\r\n <span class=\"ml-3\">Add Badge </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-6 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 icon=\"pi pi-plus font-semibold\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleWidgetItemAddBtnClick()\">\r\n <span class=\"ml-3\">Add Widget Item </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Badges Section -->\r\n <div class=\"field p-0 pr-2 col-12 md:col-12 mb-3\">\r\n <h5 *ngIf=\"(record?.badges?.length ?? 0) > 0\" class=\"font-bold col-12 md:col-12 mb-2\">Badges</h5>\r\n <div class=\"feild-card col-12 md:col-12 flex\" *ngFor=\"let badge of (record?.badges || []); let i = index;\">\r\n <div class=\"field col-3 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"badge\" [attributeModel]=\"{\r\n name:'dictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n isRequired:true,\r\n options: dictionaries\r\n }\" (onInput)=\"handleBadgeDictionarySelect($event, i)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-3 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"badge\" [attributeModel]=\"{\r\n name:'dictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Properties',\r\n isRequired:true,\r\n options: badgeDictionaryItemArray[i]\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-4 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"badge\" [attributeModel]=\"{\r\n name : 'style',\r\n readonly : false,\r\n displayText : 'Style',\r\n isRequired : false,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-2 m-0 flex justify-content-start md:col-2 mt-5\">\r\n <div class=\"ml-4 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteBadge(i)\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Widget Items -->\r\n <h5 *ngIf=\"(record?.dataItems?.length ?? 0) > 0\" class=\"font-bold col-12 md:col-12 mb-2\">Widget Items</h5>\r\n <div class=\"feild-card col-12 md:col-12 flex\" *ngFor=\"let widgetItem of (record?.dataItems || []); let i = index;\">\r\n <div class=\"field col-2 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name : 'name',\r\n readonly : false,\r\n displayText : 'Item Label',\r\n isRequired : true,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n isRequired:true,\r\n options: dictionaries\r\n }\" (onInput)=\"handleWidgetItemDictionarySelect($event, i)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Properties',\r\n isRequired:true,\r\n options: dictionaryItemArray[i]\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-4 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name : 'style',\r\n readonly : false,\r\n displayText : 'Item Style',\r\n isRequired : false,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-4 m-0 flex justify-content-center md:col-2 mt-5\">\r\n <div class=\"m-0\">\r\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Is Active ?',\r\n }\">\r\n </check-box>\r\n </div>\r\n <div class=\"ml-4 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteRecord(i)\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</form-container>", styles: [".trash-icon-wrapper{font-size:20px;color:var(--red-500)}\n"] }]
|
|
3942
3952
|
}], ctorParameters: () => [{ type: WidgetAdminService }, { type: ValidatorService }, { type: WidgetAdminStore }, { type: WidgetAdminQuery }, { type: i3$4.Router }, { type: i3$4.ActivatedRoute }, { type: BaseStore }, { type: BaseQuery }] });
|
|
3943
3953
|
|
|
3944
3954
|
/**
|
|
@@ -5429,6 +5439,7 @@ class WidgetHeaderComponent {
|
|
|
5429
5439
|
subHeaderStyle = {};
|
|
5430
5440
|
headerIconStyle = {};
|
|
5431
5441
|
headerIconClass;
|
|
5442
|
+
processedBadges = [];
|
|
5432
5443
|
constructor(styleBulderService) {
|
|
5433
5444
|
this.styleBulderService = styleBulderService;
|
|
5434
5445
|
}
|
|
@@ -5442,13 +5453,66 @@ class WidgetHeaderComponent {
|
|
|
5442
5453
|
this.headerIconStyle = this.styleBulderService.getItemStyle(parsedHeaderIconStyle);
|
|
5443
5454
|
this.headerIconClass = this.widget.style.headerIconClass;
|
|
5444
5455
|
}
|
|
5456
|
+
// Process badges
|
|
5457
|
+
this.processBadges();
|
|
5458
|
+
}
|
|
5459
|
+
processBadges() {
|
|
5460
|
+
this.processedBadges = [];
|
|
5461
|
+
if (this.widget && this.widget.badges && Array.isArray(this.widget.badges)) {
|
|
5462
|
+
this.processedBadges = this.widget.badges.map((badge) => {
|
|
5463
|
+
const badgeStyle = badge.style || {};
|
|
5464
|
+
const processedBadge = {
|
|
5465
|
+
value: badge.value || '',
|
|
5466
|
+
valueClass: badgeStyle.valueClass || '',
|
|
5467
|
+
badgeStyle: {},
|
|
5468
|
+
valueIconClass: badgeStyle.valueIconClass,
|
|
5469
|
+
valueIconStyle: {},
|
|
5470
|
+
valueIconClassExpression: badgeStyle.valueIconClassExpression,
|
|
5471
|
+
valueIconStyleExpression: {},
|
|
5472
|
+
mergedValueIconStyle: {}
|
|
5473
|
+
};
|
|
5474
|
+
// Parse and apply badge styles
|
|
5475
|
+
if (badgeStyle.value) {
|
|
5476
|
+
const parsedValueStyle = this.styleBulderService.parseStyleObject(badgeStyle.value);
|
|
5477
|
+
processedBadge.badgeStyle = this.styleBulderService.getItemStyle(parsedValueStyle);
|
|
5478
|
+
}
|
|
5479
|
+
// Parse style expression if present
|
|
5480
|
+
if (badgeStyle.styleExpression) {
|
|
5481
|
+
const parsedStyleExpression = this.styleBulderService.parseStyleObject(badgeStyle.styleExpression);
|
|
5482
|
+
const styleExpressionObj = this.styleBulderService.getItemStyle(parsedStyleExpression);
|
|
5483
|
+
processedBadge.badgeStyle = { ...processedBadge.badgeStyle, ...styleExpressionObj };
|
|
5484
|
+
}
|
|
5485
|
+
// Parse item style if present
|
|
5486
|
+
if (badgeStyle.itemStyle) {
|
|
5487
|
+
const parsedItemStyle = this.styleBulderService.parseStyleObject(badgeStyle.itemStyle);
|
|
5488
|
+
const itemStyleObj = this.styleBulderService.getItemStyle(parsedItemStyle);
|
|
5489
|
+
processedBadge.badgeStyle = { ...processedBadge.badgeStyle, ...itemStyleObj };
|
|
5490
|
+
}
|
|
5491
|
+
// Parse value icon style
|
|
5492
|
+
if (badgeStyle.valueIconStyle) {
|
|
5493
|
+
const parsedValueIconStyle = this.styleBulderService.parseStyleObject(badgeStyle.valueIconStyle);
|
|
5494
|
+
processedBadge.valueIconStyle = this.styleBulderService.getItemStyle(parsedValueIconStyle);
|
|
5495
|
+
}
|
|
5496
|
+
// Parse value icon style expression
|
|
5497
|
+
if (badgeStyle.valueIconStyleExpression) {
|
|
5498
|
+
const parsedValueIconStyleExpression = this.styleBulderService.parseStyleObject(badgeStyle.valueIconStyleExpression);
|
|
5499
|
+
processedBadge.valueIconStyleExpression = this.styleBulderService.getItemStyle(parsedValueIconStyleExpression);
|
|
5500
|
+
}
|
|
5501
|
+
// Merge icon styles
|
|
5502
|
+
processedBadge.mergedValueIconStyle = {
|
|
5503
|
+
...processedBadge.valueIconStyle,
|
|
5504
|
+
...processedBadge.valueIconStyleExpression
|
|
5505
|
+
};
|
|
5506
|
+
return processedBadge;
|
|
5507
|
+
});
|
|
5508
|
+
}
|
|
5445
5509
|
}
|
|
5446
5510
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetHeaderComponent, deps: [{ token: StyleBuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5447
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: WidgetHeaderComponent, isStandalone: false, selector: "lib-widget-header", inputs: { widget: "widget" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"widget.header || widget.subHeader\" class=\"grid m-0 align-items-center justify-content-between px-3 pt-3\">\r\n <div class=\"col-12 p-0\">\r\n <div class=\"flex align-items-center\">\r\n <i [class]=\"headerIconClass\" [ngStyle]=\"headerIconStyle\"></i>\r\n <h3 [ngStyle]=\"headerStyle\" class=\"m-0 application-title-wrapper\">\r\n {{ (widget.header) }}\r\n </h3>\r\n </div>\r\n <div *ngIf=\"widget?.subHeader\" class=\"flex align-items-center mt-2\">\r\n <span [ngStyle]=\"subHeaderStyle\" class=\"mr-3 font-semibold\">{{ widget.subHeader }}</span>\r\n </div>\r\n </div>\r\n</div>", styles: ["::ng-deep .badge-wrapper .p-button{padding:4px 8px}.application-title-wrapper{font-size:16px;font-weight:600}.chart-container{display:flex;flex-direction:column;align-items:center;justify-content:center}@media screen and (min-width: 1200px) and (max-width: 1800px){.application-title-wrapper{font-size:14px}}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
5511
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: WidgetHeaderComponent, isStandalone: false, selector: "lib-widget-header", inputs: { widget: "widget" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"widget.header || widget.subHeader\" class=\"grid m-0 align-items-center justify-content-between px-3 pt-3\">\r\n <div class=\"col-12 p-0\">\r\n <div class=\"flex align-items-center\">\r\n <i [class]=\"headerIconClass\" [ngStyle]=\"headerIconStyle\"></i>\r\n <h3 [ngStyle]=\"headerStyle\" class=\"m-0 application-title-wrapper\">\r\n {{ (widget.header) }}\r\n </h3>\r\n\r\n <!-- Badges -->\r\n <div *ngIf=\"processedBadges && processedBadges.length > 0\" class=\"flex align-items-center ml-2\">\r\n <span *ngFor=\"let badge of processedBadges\" \r\n class=\"px-2 py-1 rounded font-semibold badge ml-2\"\r\n [ngClass]=\"badge.valueClass\"\r\n [ngStyle]=\"badge.badgeStyle\">\r\n <i *ngIf=\"badge.valueIconClass\" \r\n [ngClass]=\"badge.valueIconClass\" \r\n [ngStyle]=\"badge.mergedValueIconStyle\"\r\n class=\"mr-1\"></i>\r\n <i *ngIf=\"badge.valueIconClassExpression\" \r\n [ngClass]=\"badge.valueIconClassExpression\" \r\n [ngStyle]=\"badge.mergedValueIconStyle\"\r\n class=\"mr-1\"></i>\r\n {{ badge.value !== 'null' ? badge.value : '' }}\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"widget?.subHeader\" class=\"flex align-items-center mt-2\">\r\n <span [ngStyle]=\"subHeaderStyle\" class=\"mr-3 font-semibold\">{{ widget.subHeader }}</span>\r\n </div>\r\n </div>\r\n</div>", styles: ["::ng-deep .badge-wrapper .p-button{padding:4px 8px}.application-title-wrapper{font-size:16px;font-weight:600}.chart-container{display:flex;flex-direction:column;align-items:center;justify-content:center}@media screen and (min-width: 1200px) and (max-width: 1800px){.application-title-wrapper{font-size:14px}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
5448
5512
|
}
|
|
5449
5513
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetHeaderComponent, decorators: [{
|
|
5450
5514
|
type: Component,
|
|
5451
|
-
args: [{ selector: 'lib-widget-header', standalone: false, template: "<div *ngIf=\"widget.header || widget.subHeader\" class=\"grid m-0 align-items-center justify-content-between px-3 pt-3\">\r\n <div class=\"col-12 p-0\">\r\n <div class=\"flex align-items-center\">\r\n <i [class]=\"headerIconClass\" [ngStyle]=\"headerIconStyle\"></i>\r\n <h3 [ngStyle]=\"headerStyle\" class=\"m-0 application-title-wrapper\">\r\n {{ (widget.header) }}\r\n </h3>\r\n </div>\r\n <div *ngIf=\"widget?.subHeader\" class=\"flex align-items-center mt-2\">\r\n <span [ngStyle]=\"subHeaderStyle\" class=\"mr-3 font-semibold\">{{ widget.subHeader }}</span>\r\n </div>\r\n </div>\r\n</div>", styles: ["::ng-deep .badge-wrapper .p-button{padding:4px 8px}.application-title-wrapper{font-size:16px;font-weight:600}.chart-container{display:flex;flex-direction:column;align-items:center;justify-content:center}@media screen and (min-width: 1200px) and (max-width: 1800px){.application-title-wrapper{font-size:14px}}\n"] }]
|
|
5515
|
+
args: [{ selector: 'lib-widget-header', standalone: false, template: "<div *ngIf=\"widget.header || widget.subHeader\" class=\"grid m-0 align-items-center justify-content-between px-3 pt-3\">\r\n <div class=\"col-12 p-0\">\r\n <div class=\"flex align-items-center\">\r\n <i [class]=\"headerIconClass\" [ngStyle]=\"headerIconStyle\"></i>\r\n <h3 [ngStyle]=\"headerStyle\" class=\"m-0 application-title-wrapper\">\r\n {{ (widget.header) }}\r\n </h3>\r\n\r\n <!-- Badges -->\r\n <div *ngIf=\"processedBadges && processedBadges.length > 0\" class=\"flex align-items-center ml-2\">\r\n <span *ngFor=\"let badge of processedBadges\" \r\n class=\"px-2 py-1 rounded font-semibold badge ml-2\"\r\n [ngClass]=\"badge.valueClass\"\r\n [ngStyle]=\"badge.badgeStyle\">\r\n <i *ngIf=\"badge.valueIconClass\" \r\n [ngClass]=\"badge.valueIconClass\" \r\n [ngStyle]=\"badge.mergedValueIconStyle\"\r\n class=\"mr-1\"></i>\r\n <i *ngIf=\"badge.valueIconClassExpression\" \r\n [ngClass]=\"badge.valueIconClassExpression\" \r\n [ngStyle]=\"badge.mergedValueIconStyle\"\r\n class=\"mr-1\"></i>\r\n {{ badge.value !== 'null' ? badge.value : '' }}\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"widget?.subHeader\" class=\"flex align-items-center mt-2\">\r\n <span [ngStyle]=\"subHeaderStyle\" class=\"mr-3 font-semibold\">{{ widget.subHeader }}</span>\r\n </div>\r\n </div>\r\n</div>", styles: ["::ng-deep .badge-wrapper .p-button{padding:4px 8px}.application-title-wrapper{font-size:16px;font-weight:600}.chart-container{display:flex;flex-direction:column;align-items:center;justify-content:center}@media screen and (min-width: 1200px) and (max-width: 1800px){.application-title-wrapper{font-size:14px}}\n"] }]
|
|
5452
5516
|
}], ctorParameters: () => [{ type: StyleBuilderService }], propDecorators: { widget: [{
|
|
5453
5517
|
type: Input
|
|
5454
5518
|
}] } });
|