cat-qw-lib 0.0.10 → 0.3.4
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 +195 -207
- package/fesm2022/cat-qw-lib.mjs.map +1 -1
- package/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.d.ts +1 -0
- package/lib/admin/api-admin/models/api-config.model.d.ts +2 -0
- package/lib/admin/widget-admin/components/widget-admin-form/widget-admin-form.component.d.ts +15 -20
- package/lib/admin/widget-admin/components/widget-admin-list/widget-admin-list.component.d.ts +4 -0
- package/lib/admin/widget-admin/models/widget.model.d.ts +12 -1
- package/lib/admin/widget-admin/state/widget-admin.query.d.ts +3 -1
- package/lib/admin/widget-admin/state/widget-admin.store.d.ts +3 -0
- package/lib/admin/widget-admin/widget-admin.module.d.ts +7 -4
- package/lib/shared/_base/base-form/base-form.component.d.ts +10 -2
- package/lib/shared/_base/base-list/base-list.component.d.ts +3 -0
- package/lib/shared/components/form-container/form-container.component.d.ts +2 -3
- package/lib/shared/constant/DATASOURCES.d.ts +3 -0
- package/lib/shared/constant/SHARED.d.ts +2 -0
- package/lib/shared/constant/URLS.d.ts +3 -0
- package/lib/shared/controls/dropdown/dropdown.component.d.ts +3 -0
- package/lib/shared/services/app-config.service.d.ts +3 -0
- package/lib/shared/services/table.builder.d.ts +3 -0
- package/lib/shared/state/base.query.d.ts +4 -0
- package/lib/shared/state/base.store.d.ts +3 -0
- package/package.json +1 -1
- package/src/assets/config/api.config.json +5 -0
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -106,6 +106,8 @@ class SHARED {
|
|
|
106
106
|
static application = 'Application';
|
|
107
107
|
static INVALID_API_PATH = 'Please enter the API path.';
|
|
108
108
|
static WIDTH_AUTO = 'w-auto';
|
|
109
|
+
static TRUE = true;
|
|
110
|
+
static FALSE = false;
|
|
109
111
|
}
|
|
110
112
|
const delimiters = ['|', '/', '-'];
|
|
111
113
|
const dictionaryItemList = [];
|
|
@@ -647,6 +649,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
647
649
|
}] } });
|
|
648
650
|
|
|
649
651
|
var BaseStore_1;
|
|
652
|
+
/**
|
|
653
|
+
* BaseStore is a generic class that extends EntityStore from Akita.
|
|
654
|
+
*/
|
|
650
655
|
let BaseStore = class BaseStore extends EntityStore {
|
|
651
656
|
static { BaseStore_1 = this; }
|
|
652
657
|
static storeName = 'base';
|
|
@@ -692,6 +697,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
692
697
|
args: [{ providedIn: 'root' }]
|
|
693
698
|
}], ctorParameters: () => [] });
|
|
694
699
|
|
|
700
|
+
/**
|
|
701
|
+
* BaseQuery is a generic class that extends QueryEntity from Akita.
|
|
702
|
+
* It provides methods to interact with the state of entities managed by the BaseStore.
|
|
703
|
+
*/
|
|
695
704
|
class BaseQuery extends QueryEntity {
|
|
696
705
|
store;
|
|
697
706
|
constructor(store) {
|
|
@@ -817,34 +826,31 @@ class TextBoxComponent extends BaseControlComponent {
|
|
|
817
826
|
}
|
|
818
827
|
}
|
|
819
828
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TextBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
820
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: TextBoxComponent, isStandalone: true, selector: "text-box", usesInheritance: true, ngImport: i0, template: "<ng-container >\n <div class=\"\">\n\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\n <label>{{ attributeModel.displayText }}</label>\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\n </div>\n @if (attributeModel.readonly) {\n <div class=\"mb-2\" [ngStyle]=\"{'font-size':'14px', 'color':'#0F1729', 'font-weight':'600' }\">\n <label class=\"text-value-wrapper\" [ngStyle]=\"{color: attributeModel.textColorOnReadonly}\">{{ getValue() }}</label>\n </div>\n } @else {\n <div class=\"inputTextBox\">\n\n <input\n pInputText\n type=\"text\"\n autocomplete=\"off\"\n [placeholder]=\"attributeModel.placeholder ?? ''\"\n class=\"block p-inputtext w-full\"\n [pTooltip]=\"attributeModel.tooltip ?? ''\"\n [tooltipPosition]=\"attributeModel.toolTipPosition ?? '' \"\n [ngModel]=\"record?.[attributeModel.name] ?? ''\"\n [disabled]=\"attributeModel?.readonly ?? false\" \n [name]=\"attributeModel.name ?? 'textBox'\"\n [required]=\"attributeModel.isRequired ?? false\" \n [ngStyle]=\"{\n width: attributeModel.customColumnWidth\n ? attributeModel.customColumnWidth\n : '',\n padding: attributeModel.customPadding ? attributeModel.customPadding : ''\n }\"\n #textboxField=\"ngModel\"\n (ngModelChange)=\"handleModelChange($event, textboxField.valid)\"\n [ngClass]=\"{\n 'ng-dirty ng-invalid':\n (!textboxField.valid && error)\n }\"\n />\n </div>\n }\n </div>\n \n</ng-container>\n", styles: [".asterisk{color:red}.inputTextBox{position:relative}.textCount{position:absolute;bottom:23%;right:1%;color:#bcbcbc}.markRed{color:red}.text-value-wrapper{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$3.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
|
|
829
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: TextBoxComponent, isStandalone: true, selector: "text-box", usesInheritance: true, ngImport: i0, template: "<ng-container >\n <div class=\"\">\n\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\n <label>{{ attributeModel.displayText }}</label>\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\n </div>\n @if (attributeModel.readonly) {\n <div class=\"mb-2\" [ngStyle]=\"{'font-size':'14px', 'color':'#0F1729', 'font-weight':'600' }\">\n <label [for]=\"attributeModel.name ?? 'textBox'\" class=\"text-value-wrapper\" [ngStyle]=\"{color: attributeModel.textColorOnReadonly}\">{{ getValue() }}</label>\n </div>\n } @else {\n <div class=\"inputTextBox\">\n\n <input\n pInputText\n type=\"text\"\n autocomplete=\"off\"\n [placeholder]=\"attributeModel.placeholder ?? ''\"\n class=\"block p-inputtext w-full\"\n [pTooltip]=\"attributeModel.tooltip ?? ''\"\n [tooltipPosition]=\"attributeModel.toolTipPosition ?? '' \"\n [ngModel]=\"record?.[attributeModel.name] ?? ''\"\n [disabled]=\"attributeModel?.readonly ?? false\" \n [name]=\"attributeModel.name ?? 'textBox'\"\n [id]=\"attributeModel.name ?? 'textBox'\"\n [required]=\"attributeModel.isRequired ?? false\" \n [ngStyle]=\"{\n width: attributeModel.customColumnWidth\n ? attributeModel.customColumnWidth\n : '',\n padding: attributeModel.customPadding ? attributeModel.customPadding : ''\n }\"\n #textboxField=\"ngModel\"\n (ngModelChange)=\"handleModelChange($event, textboxField.valid)\"\n [ngClass]=\"{\n 'ng-dirty ng-invalid':\n (!textboxField.valid && error)\n }\"\n />\n </div>\n }\n </div>\n \n</ng-container>\n", styles: [".asterisk{color:red}.inputTextBox{position:relative}.textCount{position:absolute;bottom:23%;right:1%;color:#bcbcbc}.markRed{color:red}.text-value-wrapper{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$3.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
|
|
821
830
|
}
|
|
822
831
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TextBoxComponent, decorators: [{
|
|
823
832
|
type: Component,
|
|
824
|
-
args: [{ selector: 'text-box', standalone: true, imports: [CommonModule, InputTextModule, FormsModule, TooltipModule], template: "<ng-container >\n <div class=\"\">\n\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\n <label>{{ attributeModel.displayText }}</label>\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\n </div>\n @if (attributeModel.readonly) {\n <div class=\"mb-2\" [ngStyle]=\"{'font-size':'14px', 'color':'#0F1729', 'font-weight':'600' }\">\n <label class=\"text-value-wrapper\" [ngStyle]=\"{color: attributeModel.textColorOnReadonly}\">{{ getValue() }}</label>\n </div>\n } @else {\n <div class=\"inputTextBox\">\n\n <input\n pInputText\n type=\"text\"\n autocomplete=\"off\"\n [placeholder]=\"attributeModel.placeholder ?? ''\"\n class=\"block p-inputtext w-full\"\n [pTooltip]=\"attributeModel.tooltip ?? ''\"\n [tooltipPosition]=\"attributeModel.toolTipPosition ?? '' \"\n [ngModel]=\"record?.[attributeModel.name] ?? ''\"\n [disabled]=\"attributeModel?.readonly ?? false\" \n [name]=\"attributeModel.name ?? 'textBox'\"\n [required]=\"attributeModel.isRequired ?? false\" \n [ngStyle]=\"{\n width: attributeModel.customColumnWidth\n ? attributeModel.customColumnWidth\n : '',\n padding: attributeModel.customPadding ? attributeModel.customPadding : ''\n }\"\n #textboxField=\"ngModel\"\n (ngModelChange)=\"handleModelChange($event, textboxField.valid)\"\n [ngClass]=\"{\n 'ng-dirty ng-invalid':\n (!textboxField.valid && error)\n }\"\n />\n </div>\n }\n </div>\n \n</ng-container>\n", styles: [".asterisk{color:red}.inputTextBox{position:relative}.textCount{position:absolute;bottom:23%;right:1%;color:#bcbcbc}.markRed{color:red}.text-value-wrapper{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%}\n"] }]
|
|
833
|
+
args: [{ selector: 'text-box', standalone: true, imports: [CommonModule, InputTextModule, FormsModule, TooltipModule], template: "<ng-container >\n <div class=\"\">\n\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\n <label>{{ attributeModel.displayText }}</label>\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\n </div>\n @if (attributeModel.readonly) {\n <div class=\"mb-2\" [ngStyle]=\"{'font-size':'14px', 'color':'#0F1729', 'font-weight':'600' }\">\n <label [for]=\"attributeModel.name ?? 'textBox'\" class=\"text-value-wrapper\" [ngStyle]=\"{color: attributeModel.textColorOnReadonly}\">{{ getValue() }}</label>\n </div>\n } @else {\n <div class=\"inputTextBox\">\n\n <input\n pInputText\n type=\"text\"\n autocomplete=\"off\"\n [placeholder]=\"attributeModel.placeholder ?? ''\"\n class=\"block p-inputtext w-full\"\n [pTooltip]=\"attributeModel.tooltip ?? ''\"\n [tooltipPosition]=\"attributeModel.toolTipPosition ?? '' \"\n [ngModel]=\"record?.[attributeModel.name] ?? ''\"\n [disabled]=\"attributeModel?.readonly ?? false\" \n [name]=\"attributeModel.name ?? 'textBox'\"\n [id]=\"attributeModel.name ?? 'textBox'\"\n [required]=\"attributeModel.isRequired ?? false\" \n [ngStyle]=\"{\n width: attributeModel.customColumnWidth\n ? attributeModel.customColumnWidth\n : '',\n padding: attributeModel.customPadding ? attributeModel.customPadding : ''\n }\"\n #textboxField=\"ngModel\"\n (ngModelChange)=\"handleModelChange($event, textboxField.valid)\"\n [ngClass]=\"{\n 'ng-dirty ng-invalid':\n (!textboxField.valid && error)\n }\"\n />\n </div>\n }\n </div>\n \n</ng-container>\n", styles: [".asterisk{color:red}.inputTextBox{position:relative}.textCount{position:absolute;bottom:23%;right:1%;color:#bcbcbc}.markRed{color:red}.text-value-wrapper{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%}\n"] }]
|
|
825
834
|
}] });
|
|
826
835
|
|
|
827
836
|
class FormContainerComponent {
|
|
828
837
|
router;
|
|
829
838
|
route;
|
|
839
|
+
isDisable = SHARED.TRUE;
|
|
830
840
|
messages = [];
|
|
831
841
|
record;
|
|
832
842
|
headerText;
|
|
833
|
-
showSave =
|
|
834
|
-
disableButton =
|
|
835
|
-
disableSubmitButton =
|
|
836
|
-
disableSaveButton =
|
|
843
|
+
showSave = SHARED.FALSE;
|
|
844
|
+
disableButton = SHARED.FALSE;
|
|
845
|
+
disableSubmitButton = SHARED.FALSE;
|
|
846
|
+
disableSaveButton = SHARED.FALSE;
|
|
837
847
|
onSave = new EventEmitter();
|
|
838
|
-
onSubmit = new EventEmitter();
|
|
839
848
|
onCancel = new EventEmitter();
|
|
840
|
-
overrideNavigate =
|
|
849
|
+
overrideNavigate = SHARED.FALSE;
|
|
841
850
|
constructor(router, route) {
|
|
842
851
|
this.router = router;
|
|
843
852
|
this.route = route;
|
|
844
853
|
}
|
|
845
|
-
handleSubmitClick() {
|
|
846
|
-
this.onSubmit.emit();
|
|
847
|
-
}
|
|
848
854
|
handleSaveClick() {
|
|
849
855
|
this.onSave.emit();
|
|
850
856
|
}
|
|
@@ -859,12 +865,14 @@ class FormContainerComponent {
|
|
|
859
865
|
handleCreateBtnClick() {
|
|
860
866
|
}
|
|
861
867
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FormContainerComponent, deps: [{ token: i3$2.Router }, { token: i3$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
862
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: FormContainerComponent, isStandalone: true, selector: "form-container", inputs: { messages: "messages", record: "record", headerText: "headerText", showSave: "showSave", disableButton: "disableButton", disableSubmitButton: "disableSubmitButton", disableSaveButton: "disableSaveButton", overrideNavigate: "overrideNavigate" }, outputs: { onSave: "onSave",
|
|
868
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: FormContainerComponent, isStandalone: true, selector: "form-container", inputs: { isDisable: "isDisable", messages: "messages", record: "record", headerText: "headerText", showSave: "showSave", disableButton: "disableButton", disableSubmitButton: "disableSubmitButton", disableSaveButton: "disableSaveButton", overrideNavigate: "overrideNavigate" }, outputs: { onSave: "onSave", onCancel: "onCancel" }, providers: [MessageService, ConfirmationService], ngImport: i0, template: "<div class=\"form-container\">\n <div class=\"text-900 font-bold text-xl form-header mb-2\">\n <div class=\"form-header-container w-full mr-0\">\n <div class=\"form-header-title\"[innerHTML]=\"this.headerText\">\n </div>\n <div class=\"form-header-messege w-full\">\n <p-messages class=\"message-wrapper\" [(value)]=\"messages\" [enableService]=\"false\" />\n </div>\n </div>\n\n <div class=\"btn-wrapper\">\n <ng-content select=\"[headerButtons]\"></ng-content>\n @if(showSave){\n <button\n pButton\n pRipple\n label=\"Cancel\"\n (click)=\"handleCancelClick()\"\n class=\"p-button-outlined mr-2\"\n ></button>\n\n <button\n pButton\n class=\"p-button-success\"\n label=\"Save\"\n [disabled]=\"disableSaveButton\"\n type=\"button\"\n tooltipPosition=\"bottom\"\n (click)=\"handleSaveClick()\"\n ></button>\n }\n <ng-content select=\"[headerButtons]\"></ng-content>\n </div>\n </div>\n \n \n <p-toast></p-toast>\n\n <div>\n <p-confirmDialog>\n <ng-template pTemplate=\"message\" let-message>\n <div class=\"flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border\">\n <i class=\"pi pi-exclamation-circle text-6xl text-primary-500\"></i>\n <p>{{ message.message }}</p>\n </div>\n </ng-template>\n </p-confirmDialog>\n </div> \n <div class=\"grid\">\n <div class=\"col-12\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n ", styles: [".form-container{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}.form-container.card{padding:0}.form-container .p-button{padding:.5rem 1.25rem}.form-container .form-footer{background-color:var(--surface-100);padding:6px 16px;height:46px;width:100%;margin-top:auto;position:sticky;bottom:0;z-index:4}.form-container .form-footer.card{margin-bottom:0!important}.form-container .form-header{padding:6px 16px;height:46px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:4;width:100%}.form-container .form-top button{height:fit-content}.form-container .form-header-bg-light{background-color:#e1e2e8!important}.form-container .form-header-bg-dark{background-color:#3b3848!important}.form-container .left-wrapper{display:flex}.form-container .p-16{padding:4px 32px 16px}.form-container .m-16{margin:0 16px}.form-container .errors{position:sticky;top:3.4rem;z-index:1;background-color:var(--surface-900);padding:0 16px}.btn-wrapper{display:flex;justify-content:flex-end;align-items:center}.form-header-container{display:flex;flex-wrap:nowrap;align-items:center;margin-right:2rem}.form-header-container .form-header-title{text-wrap:nowrap}.form-header-container .form-header-messege{margin-left:1rem}::ng-deep .message-wrapper .p-message-wrapper{padding:.5rem .7rem;display:flex;align-items:center;margin:1rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i4$2.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "ngmodule", type: ToastModule }, { kind: "component", type: i5.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i6.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
863
869
|
}
|
|
864
870
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FormContainerComponent, decorators: [{
|
|
865
871
|
type: Component,
|
|
866
|
-
args: [{ selector: 'form-container', standalone: true, imports: [CommonModule, ButtonModule, ConfirmDialogModule, ToastModule, MessagesModule, ButtonComponent, TextBoxComponent], providers: [MessageService, ConfirmationService], encapsulation: ViewEncapsulation.None, template: "<div class=\"form-container\">\n <div class=\"text-900 font-bold text-xl form-header mb-2\">\n <div class=\"form-header-container w-full mr-0\">\n <div class=\"form-header-title\"[innerHTML]=\"this.headerText\">\n </div>\n <div class=\"form-header-messege w-full\">\n <p-messages class=\"message-wrapper\" [(value)]=\"messages\" [enableService]=\"false\" />\n </div>\n </div>\n\n <div class=\"btn-wrapper\">\n <ng-content select=\"[headerButtons]\"></ng-content>\n @if(showSave){\n <button\n pButton\n pRipple\n label=\"Cancel\"\n (click)=\"handleCancelClick()\"\n class=\"p-button-outlined mr-2\"\n ></button>\n\n <button\n pButton\n class=\"p-button-success\"\n label=\"Save\"\n [disabled]=\"disableSaveButton\"\n type=\"button\"\n tooltipPosition=\"bottom\"\n (click)=\"handleSaveClick()\"\n ></button>\n }\n <ng-content select=\"[headerButtons]\"></ng-content>\n </div>\n </div>\n \n \n <p-toast></p-toast>\n\n <div>\n <p-confirmDialog>\n <ng-template pTemplate=\"message\" let-message>\n <div class=\"flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border\">\n <i class=\"pi pi-exclamation-circle text-6xl text-primary-500\"></i>\n <p>{{ message.message }}</p>\n </div>\n </ng-template>\n </p-confirmDialog>\n </div> \n <div class=\"grid\">\n <div class=\"col-12\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n ", styles: [".form-container{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}.form-container.card{padding:0}.form-container .p-button{padding:.5rem 1.25rem}.form-container .form-footer{background-color:var(--surface-100);padding:6px 16px;height:46px;width:100%;margin-top:auto;position:sticky;bottom:0;z-index:4}.form-container .form-footer.card{margin-bottom:0!important}.form-container .form-header{padding:6px 16px;height:46px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:4;width:100%}.form-container .form-top button{height:fit-content}.form-container .form-header-bg-light{background-color:#e1e2e8!important}.form-container .form-header-bg-dark{background-color:#3b3848!important}.form-container .left-wrapper{display:flex}.form-container .p-16{padding:4px 32px 16px}.form-container .m-16{margin:0 16px}.form-container .errors{position:sticky;top:3.4rem;z-index:1;background-color:var(--surface-900);padding:0 16px}.btn-wrapper{display:flex;justify-content:flex-end;align-items:center}.form-header-container{display:flex;flex-wrap:nowrap;align-items:center;margin-right:2rem}.form-header-container .form-header-title{text-wrap:nowrap}.form-header-container .form-header-messege{margin-left:1rem}::ng-deep .message-wrapper .p-message-wrapper{padding:.
|
|
867
|
-
}], ctorParameters: () => [{ type: i3$2.Router }, { type: i3$2.ActivatedRoute }], propDecorators: {
|
|
872
|
+
args: [{ selector: 'form-container', standalone: true, imports: [CommonModule, ButtonModule, ConfirmDialogModule, ToastModule, MessagesModule, ButtonComponent, TextBoxComponent], providers: [MessageService, ConfirmationService], encapsulation: ViewEncapsulation.None, template: "<div class=\"form-container\">\n <div class=\"text-900 font-bold text-xl form-header mb-2\">\n <div class=\"form-header-container w-full mr-0\">\n <div class=\"form-header-title\"[innerHTML]=\"this.headerText\">\n </div>\n <div class=\"form-header-messege w-full\">\n <p-messages class=\"message-wrapper\" [(value)]=\"messages\" [enableService]=\"false\" />\n </div>\n </div>\n\n <div class=\"btn-wrapper\">\n <ng-content select=\"[headerButtons]\"></ng-content>\n @if(showSave){\n <button\n pButton\n pRipple\n label=\"Cancel\"\n (click)=\"handleCancelClick()\"\n class=\"p-button-outlined mr-2\"\n ></button>\n\n <button\n pButton\n class=\"p-button-success\"\n label=\"Save\"\n [disabled]=\"disableSaveButton\"\n type=\"button\"\n tooltipPosition=\"bottom\"\n (click)=\"handleSaveClick()\"\n ></button>\n }\n <ng-content select=\"[headerButtons]\"></ng-content>\n </div>\n </div>\n \n \n <p-toast></p-toast>\n\n <div>\n <p-confirmDialog>\n <ng-template pTemplate=\"message\" let-message>\n <div class=\"flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border\">\n <i class=\"pi pi-exclamation-circle text-6xl text-primary-500\"></i>\n <p>{{ message.message }}</p>\n </div>\n </ng-template>\n </p-confirmDialog>\n </div> \n <div class=\"grid\">\n <div class=\"col-12\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n ", styles: [".form-container{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}.form-container.card{padding:0}.form-container .p-button{padding:.5rem 1.25rem}.form-container .form-footer{background-color:var(--surface-100);padding:6px 16px;height:46px;width:100%;margin-top:auto;position:sticky;bottom:0;z-index:4}.form-container .form-footer.card{margin-bottom:0!important}.form-container .form-header{padding:6px 16px;height:46px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:4;width:100%}.form-container .form-top button{height:fit-content}.form-container .form-header-bg-light{background-color:#e1e2e8!important}.form-container .form-header-bg-dark{background-color:#3b3848!important}.form-container .left-wrapper{display:flex}.form-container .p-16{padding:4px 32px 16px}.form-container .m-16{margin:0 16px}.form-container .errors{position:sticky;top:3.4rem;z-index:1;background-color:var(--surface-900);padding:0 16px}.btn-wrapper{display:flex;justify-content:flex-end;align-items:center}.form-header-container{display:flex;flex-wrap:nowrap;align-items:center;margin-right:2rem}.form-header-container .form-header-title{text-wrap:nowrap}.form-header-container .form-header-messege{margin-left:1rem}::ng-deep .message-wrapper .p-message-wrapper{padding:.5rem .7rem;display:flex;align-items:center;margin:1rem}\n"] }]
|
|
873
|
+
}], ctorParameters: () => [{ type: i3$2.Router }, { type: i3$2.ActivatedRoute }], propDecorators: { isDisable: [{
|
|
874
|
+
type: Input
|
|
875
|
+
}], messages: [{
|
|
868
876
|
type: Input
|
|
869
877
|
}], record: [{
|
|
870
878
|
type: Input
|
|
@@ -880,18 +888,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
880
888
|
type: Input
|
|
881
889
|
}], onSave: [{
|
|
882
890
|
type: Output
|
|
883
|
-
}], onSubmit: [{
|
|
884
|
-
type: Output
|
|
885
891
|
}], onCancel: [{
|
|
886
892
|
type: Output
|
|
887
893
|
}], overrideNavigate: [{
|
|
888
894
|
type: Input
|
|
889
895
|
}] } });
|
|
890
896
|
|
|
897
|
+
/**
|
|
898
|
+
* URLS
|
|
899
|
+
*/
|
|
891
900
|
class URLS {
|
|
892
901
|
static CONFIGFILEURL = "assets/config/api.config.json";
|
|
893
902
|
}
|
|
894
903
|
|
|
904
|
+
/**
|
|
905
|
+
* This service is used to get the app configuration from the config file.
|
|
906
|
+
*/
|
|
895
907
|
class AppConfigService {
|
|
896
908
|
http;
|
|
897
909
|
appConfig;
|
|
@@ -1044,6 +1056,9 @@ class TablePrimaryHeaderModel {
|
|
|
1044
1056
|
width;
|
|
1045
1057
|
}
|
|
1046
1058
|
|
|
1059
|
+
/**
|
|
1060
|
+
* TableBuilder
|
|
1061
|
+
*/
|
|
1047
1062
|
class TableBuilder {
|
|
1048
1063
|
hiddenHeaders = [];
|
|
1049
1064
|
buildTable(records, headerWidths) {
|
|
@@ -1080,6 +1095,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1080
1095
|
}]
|
|
1081
1096
|
}] });
|
|
1082
1097
|
|
|
1098
|
+
/**
|
|
1099
|
+
* BaseListComponent is a generic class that provides a base implementation for a list component.
|
|
1100
|
+
*/
|
|
1083
1101
|
class BaseListComponent {
|
|
1084
1102
|
service;
|
|
1085
1103
|
builder;
|
|
@@ -1104,6 +1122,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1104
1122
|
args: [{ selector: 'lib-base-list', template: "<p>base-list works!</p>\n" }]
|
|
1105
1123
|
}], ctorParameters: () => [{ type: BaseService }, { type: TableBuilder }] });
|
|
1106
1124
|
|
|
1125
|
+
/**
|
|
1126
|
+
* DropdownComponent
|
|
1127
|
+
*/
|
|
1107
1128
|
class DropdownComponent extends BaseControlComponent {
|
|
1108
1129
|
listService;
|
|
1109
1130
|
options = [];
|
|
@@ -1124,6 +1145,11 @@ class DropdownComponent extends BaseControlComponent {
|
|
|
1124
1145
|
if (!this.isStaticDropdown) {
|
|
1125
1146
|
this.handleGetAndSetList();
|
|
1126
1147
|
}
|
|
1148
|
+
else {
|
|
1149
|
+
this.options = this.attributeModel.options?.map((x) => {
|
|
1150
|
+
return { label: x[this.attributeModel?.listLabelProperty || 0], value: x[this.attributeModel?.listValueProperty || 0] };
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1127
1153
|
}
|
|
1128
1154
|
handleGetAndSetList() {
|
|
1129
1155
|
try {
|
|
@@ -1390,13 +1416,16 @@ class ROUTES {
|
|
|
1390
1416
|
static DICTIONARY = '/dictionary/';
|
|
1391
1417
|
static APIMANAGEMENT = '/apiManagement/';
|
|
1392
1418
|
static APICONFIG = 'apiConfig';
|
|
1393
|
-
static VALIDATEAPI = 'api-
|
|
1419
|
+
static VALIDATEAPI = 'api-configurations/validate';
|
|
1394
1420
|
static APPLICATION = "application/";
|
|
1395
1421
|
static APIPROPERTIES = "apiConfig/parentAndChildProps";
|
|
1396
1422
|
static APPLICATION_WIDGET = "widgets/dataItems/";
|
|
1397
1423
|
static DOCUMENTALERT = "alerts/documentId";
|
|
1398
1424
|
}
|
|
1399
1425
|
|
|
1426
|
+
/**
|
|
1427
|
+
* This class is used to store the API Paths for the application
|
|
1428
|
+
*/
|
|
1400
1429
|
class DATASOURCES {
|
|
1401
1430
|
static QUEUES = "queues";
|
|
1402
1431
|
static DICTIONARY = "data-dictionaries";
|
|
@@ -1569,6 +1598,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1569
1598
|
}]
|
|
1570
1599
|
}], ctorParameters: () => [] });
|
|
1571
1600
|
|
|
1601
|
+
/**
|
|
1602
|
+
* BaseFormComponent
|
|
1603
|
+
*/
|
|
1572
1604
|
class BaseFormComponent {
|
|
1573
1605
|
service;
|
|
1574
1606
|
validatorService;
|
|
@@ -1578,6 +1610,8 @@ class BaseFormComponent {
|
|
|
1578
1610
|
subscriptions;
|
|
1579
1611
|
record;
|
|
1580
1612
|
recordChange = new BehaviorSubject({});
|
|
1613
|
+
onSave = new EventEmitter();
|
|
1614
|
+
onCancel = new EventEmitter();
|
|
1581
1615
|
constructor(service, validatorService, router, activatedRoute, baseStore) {
|
|
1582
1616
|
this.service = service;
|
|
1583
1617
|
this.validatorService = validatorService;
|
|
@@ -1590,11 +1624,9 @@ class BaseFormComponent {
|
|
|
1590
1624
|
message = [];
|
|
1591
1625
|
attributeMode;
|
|
1592
1626
|
init() {
|
|
1627
|
+
this.service.initList();
|
|
1593
1628
|
this.baseStore?.setRecordChange(SHARED.EMPTY);
|
|
1594
|
-
|
|
1595
|
-
let id = this.activatedRoute ? this.activatedRoute.snapshot.params[SHARED.ID] : '';
|
|
1596
|
-
console.log(this.activatedRoute?.snapshot.params);
|
|
1597
|
-
console.log("ID", id);
|
|
1629
|
+
let id = '677fab064fcbea6b1687404c';
|
|
1598
1630
|
if ((id !== SHARED.ZERO.toString()) && id) {
|
|
1599
1631
|
this.service.getById(id).subscribe((res) => {
|
|
1600
1632
|
this.record = res;
|
|
@@ -1607,43 +1639,49 @@ class BaseFormComponent {
|
|
|
1607
1639
|
let validateRecords = this.validatorService ? this.validatorService.handleValidateRecords(this.record) : true;
|
|
1608
1640
|
if (validateRecords) {
|
|
1609
1641
|
if (this.record._id) {
|
|
1610
|
-
this.
|
|
1611
|
-
next: (response) => {
|
|
1612
|
-
this.navigateToList();
|
|
1613
|
-
console.log('Record created:', response);
|
|
1614
|
-
},
|
|
1615
|
-
error: (error) => {
|
|
1616
|
-
console.error('Error creating record:', error);
|
|
1617
|
-
}
|
|
1618
|
-
});
|
|
1642
|
+
this.handleAddRecord();
|
|
1619
1643
|
}
|
|
1620
1644
|
else {
|
|
1621
|
-
this.
|
|
1622
|
-
next: (response) => {
|
|
1623
|
-
this.navigateToList();
|
|
1624
|
-
console.log('Record created:', response);
|
|
1625
|
-
},
|
|
1626
|
-
error: (error) => {
|
|
1627
|
-
console.error('Error creating record:', error);
|
|
1628
|
-
}
|
|
1629
|
-
});
|
|
1645
|
+
this.handleUdateRecord();
|
|
1630
1646
|
}
|
|
1631
1647
|
}
|
|
1632
1648
|
}
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1649
|
+
handleAddRecord() {
|
|
1650
|
+
this.service.update(this.record._id, this.record).subscribe({
|
|
1651
|
+
next: (response) => {
|
|
1652
|
+
console.log('Record created:', response);
|
|
1653
|
+
this.onSave.emit();
|
|
1654
|
+
},
|
|
1655
|
+
error: (error) => {
|
|
1656
|
+
console.error('Error creating record:', error);
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1660
|
+
handleUdateRecord() {
|
|
1661
|
+
this.service.create(this.record).subscribe({
|
|
1662
|
+
next: (response) => {
|
|
1663
|
+
console.log('Record created:', response);
|
|
1664
|
+
this.onSave.emit();
|
|
1665
|
+
},
|
|
1666
|
+
error: (error) => {
|
|
1667
|
+
console.error('Error creating record:', error);
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1670
|
+
}
|
|
1671
|
+
handleCancel() {
|
|
1672
|
+
this.onCancel.emit();
|
|
1639
1673
|
}
|
|
1640
1674
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseFormComponent, deps: [{ token: BaseService }, { token: ValidatorService }, { token: i3$2.Router }, { token: i3$2.ActivatedRoute }, { token: BaseStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
1641
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseFormComponent, isStandalone: true, selector: "base-form", providers: [ValidatorService], ngImport: i0, template: "<p>base-form works!</p>\n", styles: [""] });
|
|
1675
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseFormComponent, isStandalone: true, selector: "base-form", outputs: { onSave: "onSave", onCancel: "onCancel" }, providers: [ValidatorService], ngImport: i0, template: "<p>base-form works!</p>\n", styles: [""] });
|
|
1642
1676
|
}
|
|
1643
1677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseFormComponent, decorators: [{
|
|
1644
1678
|
type: Component,
|
|
1645
1679
|
args: [{ selector: 'base-form', providers: [ValidatorService], template: "<p>base-form works!</p>\n" }]
|
|
1646
|
-
}], ctorParameters: () => [{ type: BaseService }, { type: ValidatorService }, { type: i3$2.Router }, { type: i3$2.ActivatedRoute }, { type: BaseStore }]
|
|
1680
|
+
}], ctorParameters: () => [{ type: BaseService }, { type: ValidatorService }, { type: i3$2.Router }, { type: i3$2.ActivatedRoute }, { type: BaseStore }], propDecorators: { onSave: [{
|
|
1681
|
+
type: Output
|
|
1682
|
+
}], onCancel: [{
|
|
1683
|
+
type: Output
|
|
1684
|
+
}] } });
|
|
1647
1685
|
|
|
1648
1686
|
class LOOKUPS {
|
|
1649
1687
|
static DOCUMENTTYPE = 'DocumentType';
|
|
@@ -1722,7 +1760,7 @@ class LISTCONFIG {
|
|
|
1722
1760
|
static APICONFIG = [
|
|
1723
1761
|
{
|
|
1724
1762
|
name: "parentApiConfigID",
|
|
1725
|
-
dataSource: "
|
|
1763
|
+
dataSource: "api-configurations",
|
|
1726
1764
|
listValueProperty: "_id",
|
|
1727
1765
|
listLabelProperty: "name"
|
|
1728
1766
|
}
|
|
@@ -1798,6 +1836,7 @@ class ApiAdminFormComponent extends BaseFormComponent {
|
|
|
1798
1836
|
router;
|
|
1799
1837
|
activatedRoute;
|
|
1800
1838
|
apiAdminStore;
|
|
1839
|
+
isDisable = SHARED.TRUE;
|
|
1801
1840
|
messages = SHARED.EMPTYARRAY;
|
|
1802
1841
|
name = SHARED.EMPTY;
|
|
1803
1842
|
selectedParentId;
|
|
@@ -1820,13 +1859,19 @@ class ApiAdminFormComponent extends BaseFormComponent {
|
|
|
1820
1859
|
}
|
|
1821
1860
|
hanldeValidateApi() {
|
|
1822
1861
|
const payload = {
|
|
1823
|
-
|
|
1824
|
-
credentials:
|
|
1862
|
+
path: this.record.path,
|
|
1863
|
+
credentials: {
|
|
1864
|
+
email: this.record.credentials.email,
|
|
1865
|
+
password: this.record.credentials.password
|
|
1866
|
+
},
|
|
1867
|
+
getByIDPath: this.record.getByIDPath,
|
|
1868
|
+
idProperty: this.record.idProperty
|
|
1825
1869
|
};
|
|
1826
1870
|
if (this.record.path) {
|
|
1827
1871
|
this.apiAdminService.checkApiByPathName(ROUTES.VALIDATEAPI, payload).subscribe({
|
|
1828
1872
|
next: (res) => {
|
|
1829
1873
|
if (res) {
|
|
1874
|
+
this.isDisable = SHARED.FALSE;
|
|
1830
1875
|
this.messages = [{ severity: SHARED.SUCCESS, detail: res.message }];
|
|
1831
1876
|
setTimeout(() => {
|
|
1832
1877
|
this.messages = SHARED.EMPTYARRAY;
|
|
@@ -1865,11 +1910,11 @@ class ApiAdminFormComponent extends BaseFormComponent {
|
|
|
1865
1910
|
}
|
|
1866
1911
|
}
|
|
1867
1912
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminFormComponent, deps: [{ token: ApiAdminService }, { token: ValidatorService }, { token: i3$2.Router }, { token: i3$2.ActivatedRoute }, { token: ApiAdminStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
1868
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: ApiAdminFormComponent, isStandalone: false, selector: "lib-api-admin-form", usesInheritance: true, ngImport: i0, template: "<form-container\n [headerText]=\"'Queue / Api Management Form'\"\n [messages]=\"messages\"\n (onSave)=\"handleSubmit()\"\n [showSave]=\"true\"\n>\n <div class=\"card p-fluid p-formgrid grid \">\n <h4 class=\"font-bold col-12 md:col-12\">Api Management Form</h4>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'name',\n isRequired: true,\n displayText: 'Name',\n placeholder: 'Enter Name'\n }\"\n ></text-box>\n </div>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'path',\n isRequired: true,\n displayText: 'Path',\n placeholder: 'Enter Path'\n }\"\n ></text-box>\n </div>\n\n <div class=\"col-12 md:col-2\">\n <button\n pButton\n pRipple\n type=\"button\"\n label=\"Validate\"\n (click)=\"hanldeValidateApi()\"\n class=\"p-button-raised\"\n ></button>\n </div>\n </div>\n <div class=\"card p-fluid p-formgrid grid \">\n <h4 class=\"font-bold\">Other Details</h4>\n <div class=\"col-12 md:col-12 p-0 m-0\">\n <api-credential-form [record]=\"record\"></api-credential-form>\n </div>\n <div class=\"col-12 md:col-6\">\n <dropdown\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n name: 'parentApiConfigID',\n dataSource: '
|
|
1913
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: ApiAdminFormComponent, isStandalone: false, selector: "lib-api-admin-form", usesInheritance: true, ngImport: i0, template: "<form-container\n [headerText]=\"'Queue / Api Management Form'\"\n [messages]=\"messages\"\n (onSave)=\"handleSubmit()\"\n [showSave]=\"true\"\n [disableSaveButton]=\"isDisable\"\n \n>\n <div class=\"card p-fluid p-formgrid grid \">\n <h4 class=\"font-bold col-12 md:col-12\">Api Management Form</h4>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'name',\n isRequired: true,\n displayText: 'Name',\n placeholder: 'Enter Name'\n }\"\n ></text-box>\n </div>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'path',\n isRequired: true,\n displayText: 'Path',\n placeholder: 'Enter Path'\n }\"\n ></text-box>\n </div>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'getByIDPath',\n isRequired: true,\n displayText: 'Get By ID Path',\n placeholder: 'Enter getByID Path'\n }\"\n ></text-box>\n </div>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'idProperty',\n isRequired: true,\n displayText: 'Id Property',\n placeholder: 'Enter Id Property'\n }\"\n ></text-box>\n </div>\n\n <div class=\"col-12 md:col-2\">\n <button\n pButton\n pRipple\n type=\"button\"\n label=\"Validate\"\n (click)=\"hanldeValidateApi()\"\n class=\"p-button-raised\"\n ></button>\n </div>\n </div>\n <div class=\"card p-fluid p-formgrid grid \">\n <h4 class=\"font-bold\">Other Details</h4>\n <div class=\"col-12 md:col-12 p-0 m-0\">\n <api-credential-form [record]=\"record\"></api-credential-form>\n </div>\n <div class=\"col-12 md:col-6\">\n <dropdown\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n name: 'parentApiConfigID',\n dataSource: 'api-configurations',\n listLabelProperty: 'name',\n listValueProperty: '_id', \n displayText: 'Select Parent',\n placeholder: 'Select Parent API',\n childListName: 'parentKey',\n childListKey: 'name'\n }\"\n (onInput)=\"handleModelChange($event)\"\n ></dropdown>\n\n </div>\n <div class=\"col-12 md:col-6\">\n <dropdown\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n name:'parentKey',\n displayText : 'Property',\n placeholder: 'Select Property',\n options: apiPropertyList\n }\"></dropdown>\n </div>\n\n <div class=\"col-12 md:col-12\">\n <text-area\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'description',\n isRequired: false,\n displayText: 'Description',\n placeholder: 'Enter Description'\n }\"\n ></text-area>\n </div>\n </div>\n</form-container>", styles: [".p-message .p-message-wrapper{padding:.143rem 1.357rem}\n"], dependencies: [{ kind: "component", type: TextBoxComponent, selector: "text-box" }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: FormContainerComponent, selector: "form-container", inputs: ["isDisable", "messages", "record", "headerText", "showSave", "disableButton", "disableSubmitButton", "disableSaveButton", "overrideNavigate"], outputs: ["onSave", "onCancel"] }, { kind: "directive", type: i2$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: TextAreaComponent, selector: "text-area", inputs: ["rowspan"] }, { kind: "component", type: ApiCredentialFormComponent, selector: "api-credential-form", inputs: ["record"] }] });
|
|
1869
1914
|
}
|
|
1870
1915
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminFormComponent, decorators: [{
|
|
1871
1916
|
type: Component,
|
|
1872
|
-
args: [{ selector: 'lib-api-admin-form', standalone: false, template: "<form-container\n [headerText]=\"'Queue / Api Management Form'\"\n [messages]=\"messages\"\n (onSave)=\"handleSubmit()\"\n [showSave]=\"true\"\n>\n <div class=\"card p-fluid p-formgrid grid \">\n <h4 class=\"font-bold col-12 md:col-12\">Api Management Form</h4>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'name',\n isRequired: true,\n displayText: 'Name',\n placeholder: 'Enter Name'\n }\"\n ></text-box>\n </div>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'path',\n isRequired: true,\n displayText: 'Path',\n placeholder: 'Enter Path'\n }\"\n ></text-box>\n </div>\n\n <div class=\"col-12 md:col-2\">\n <button\n pButton\n pRipple\n type=\"button\"\n label=\"Validate\"\n (click)=\"hanldeValidateApi()\"\n class=\"p-button-raised\"\n ></button>\n </div>\n </div>\n <div class=\"card p-fluid p-formgrid grid \">\n <h4 class=\"font-bold\">Other Details</h4>\n <div class=\"col-12 md:col-12 p-0 m-0\">\n <api-credential-form [record]=\"record\"></api-credential-form>\n </div>\n <div class=\"col-12 md:col-6\">\n <dropdown\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n name: 'parentApiConfigID',\n dataSource: '
|
|
1917
|
+
args: [{ selector: 'lib-api-admin-form', standalone: false, template: "<form-container\n [headerText]=\"'Queue / Api Management Form'\"\n [messages]=\"messages\"\n (onSave)=\"handleSubmit()\"\n [showSave]=\"true\"\n [disableSaveButton]=\"isDisable\"\n \n>\n <div class=\"card p-fluid p-formgrid grid \">\n <h4 class=\"font-bold col-12 md:col-12\">Api Management Form</h4>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'name',\n isRequired: true,\n displayText: 'Name',\n placeholder: 'Enter Name'\n }\"\n ></text-box>\n </div>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'path',\n isRequired: true,\n displayText: 'Path',\n placeholder: 'Enter Path'\n }\"\n ></text-box>\n </div>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'getByIDPath',\n isRequired: true,\n displayText: 'Get By ID Path',\n placeholder: 'Enter getByID Path'\n }\"\n ></text-box>\n </div>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'idProperty',\n isRequired: true,\n displayText: 'Id Property',\n placeholder: 'Enter Id Property'\n }\"\n ></text-box>\n </div>\n\n <div class=\"col-12 md:col-2\">\n <button\n pButton\n pRipple\n type=\"button\"\n label=\"Validate\"\n (click)=\"hanldeValidateApi()\"\n class=\"p-button-raised\"\n ></button>\n </div>\n </div>\n <div class=\"card p-fluid p-formgrid grid \">\n <h4 class=\"font-bold\">Other Details</h4>\n <div class=\"col-12 md:col-12 p-0 m-0\">\n <api-credential-form [record]=\"record\"></api-credential-form>\n </div>\n <div class=\"col-12 md:col-6\">\n <dropdown\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n name: 'parentApiConfigID',\n dataSource: 'api-configurations',\n listLabelProperty: 'name',\n listValueProperty: '_id', \n displayText: 'Select Parent',\n placeholder: 'Select Parent API',\n childListName: 'parentKey',\n childListKey: 'name'\n }\"\n (onInput)=\"handleModelChange($event)\"\n ></dropdown>\n\n </div>\n <div class=\"col-12 md:col-6\">\n <dropdown\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n name:'parentKey',\n displayText : 'Property',\n placeholder: 'Select Property',\n options: apiPropertyList\n }\"></dropdown>\n </div>\n\n <div class=\"col-12 md:col-12\">\n <text-area\n [store]=\"apiAdminStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'description',\n isRequired: false,\n displayText: 'Description',\n placeholder: 'Enter Description'\n }\"\n ></text-area>\n </div>\n </div>\n</form-container>", styles: [".p-message .p-message-wrapper{padding:.143rem 1.357rem}\n"] }]
|
|
1873
1918
|
}], ctorParameters: () => [{ type: ApiAdminService }, { type: ValidatorService }, { type: i3$2.Router }, { type: i3$2.ActivatedRoute }, { type: ApiAdminStore }] });
|
|
1874
1919
|
|
|
1875
1920
|
/**
|
|
@@ -1948,6 +1993,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1948
1993
|
}]
|
|
1949
1994
|
}] });
|
|
1950
1995
|
|
|
1996
|
+
/**
|
|
1997
|
+
* Widget Admin Store
|
|
1998
|
+
*/
|
|
1951
1999
|
let WidgetAdminStore = class WidgetAdminStore extends BaseStore {
|
|
1952
2000
|
constructor() {
|
|
1953
2001
|
super();
|
|
@@ -1978,25 +2026,25 @@ class WidgetAdminService extends BaseService {
|
|
|
1978
2026
|
list = [
|
|
1979
2027
|
{
|
|
1980
2028
|
name: "queueID",
|
|
1981
|
-
dataSource:
|
|
2029
|
+
dataSource: DATASOURCES.QUEUES,
|
|
1982
2030
|
listValueProperty: "_id",
|
|
1983
2031
|
listLabelProperty: "name",
|
|
1984
2032
|
},
|
|
1985
2033
|
{
|
|
1986
|
-
name: "
|
|
1987
|
-
dataSource:
|
|
2034
|
+
name: "dictionaryID",
|
|
2035
|
+
dataSource: DATASOURCES.DICTIONARY,
|
|
1988
2036
|
listValueProperty: "_id",
|
|
1989
2037
|
listLabelProperty: "name",
|
|
1990
2038
|
},
|
|
1991
2039
|
{
|
|
1992
2040
|
name: "dictionaryItemID",
|
|
1993
|
-
dataSource: "
|
|
2041
|
+
dataSource: "data-dictionaries/attributes",
|
|
1994
2042
|
listValueProperty: "_id",
|
|
1995
|
-
listLabelProperty: "
|
|
2043
|
+
listLabelProperty: "key",
|
|
1996
2044
|
},
|
|
1997
2045
|
{
|
|
1998
2046
|
name: "linkedWidgetID",
|
|
1999
|
-
dataSource:
|
|
2047
|
+
dataSource: DATASOURCES.WIDGET,
|
|
2000
2048
|
listValueProperty: "_id",
|
|
2001
2049
|
listLabelProperty: "widgetName",
|
|
2002
2050
|
},
|
|
@@ -2009,12 +2057,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
2009
2057
|
args: [{ providedIn: 'root' }]
|
|
2010
2058
|
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: WidgetAdminStore }, { type: AppConfigService }, { type: ListService }] });
|
|
2011
2059
|
|
|
2060
|
+
/**
|
|
2061
|
+
* Widget Admin List Component
|
|
2062
|
+
*/
|
|
2012
2063
|
class WidgetAdminListComponent extends BaseListComponent {
|
|
2013
2064
|
tableBuilder;
|
|
2014
2065
|
constructor(widgetAdminService, tableBuilder) {
|
|
2015
2066
|
super(widgetAdminService, tableBuilder);
|
|
2016
2067
|
this.tableBuilder = tableBuilder;
|
|
2017
2068
|
}
|
|
2069
|
+
ngOnInit() {
|
|
2070
|
+
this.init();
|
|
2071
|
+
}
|
|
2018
2072
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminListComponent, deps: [{ token: WidgetAdminService }, { token: TableBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2019
2073
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: WidgetAdminListComponent, isStandalone: false, selector: "lib-widget-admin-list", usesInheritance: true, ngImport: i0, template: "@if(table){\n<lib-table-primary [table]=\"table\">\n\n</lib-table-primary>\n}", styles: [""], dependencies: [{ kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["table", "title", "showStatus", "showActions", "showSearchBar", "showNewRecordButton", "showRefreshButton"] }] });
|
|
2020
2074
|
}
|
|
@@ -2023,12 +2077,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
2023
2077
|
args: [{ selector: 'lib-widget-admin-list', standalone: false, template: "@if(table){\n<lib-table-primary [table]=\"table\">\n\n</lib-table-primary>\n}" }]
|
|
2024
2078
|
}], ctorParameters: () => [{ type: WidgetAdminService }, { type: TableBuilder }] });
|
|
2025
2079
|
|
|
2080
|
+
/**
|
|
2081
|
+
* WidgetModel class represents the model of a widget.
|
|
2082
|
+
*/
|
|
2026
2083
|
class WidgetModel extends BaseModel {
|
|
2027
|
-
|
|
2084
|
+
name;
|
|
2028
2085
|
queueID;
|
|
2029
2086
|
dataItems = [];
|
|
2030
2087
|
order;
|
|
2088
|
+
headerDictionaryID;
|
|
2089
|
+
subHeaderDictionaryID;
|
|
2090
|
+
headerDictionaryItemID;
|
|
2091
|
+
subHeaderDictionaryItemID;
|
|
2092
|
+
isActive;
|
|
2031
2093
|
}
|
|
2094
|
+
/**
|
|
2095
|
+
* WidgetItemModel class represents the model of a widget item.
|
|
2096
|
+
*/
|
|
2032
2097
|
class WidgetItemModel extends BaseModel {
|
|
2033
2098
|
name;
|
|
2034
2099
|
dictionaryItemID;
|
|
@@ -2038,6 +2103,23 @@ class WidgetItemModel extends BaseModel {
|
|
|
2038
2103
|
linkedWidgetID;
|
|
2039
2104
|
}
|
|
2040
2105
|
|
|
2106
|
+
/**
|
|
2107
|
+
* Widget Admin Query
|
|
2108
|
+
*/
|
|
2109
|
+
class WidgetAdminQuery extends BaseQuery {
|
|
2110
|
+
store;
|
|
2111
|
+
constructor(store) {
|
|
2112
|
+
super(store);
|
|
2113
|
+
this.store = store;
|
|
2114
|
+
}
|
|
2115
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminQuery, deps: [{ token: WidgetAdminStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2116
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminQuery, providedIn: 'root' });
|
|
2117
|
+
}
|
|
2118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminQuery, decorators: [{
|
|
2119
|
+
type: Injectable,
|
|
2120
|
+
args: [{ providedIn: 'root' }]
|
|
2121
|
+
}], ctorParameters: () => [{ type: WidgetAdminStore }] });
|
|
2122
|
+
|
|
2041
2123
|
/**
|
|
2042
2124
|
* WidgetAdminFormComponent
|
|
2043
2125
|
*/
|
|
@@ -2045,173 +2127,79 @@ class WidgetAdminFormComponent extends BaseFormComponent {
|
|
|
2045
2127
|
service;
|
|
2046
2128
|
validatorService;
|
|
2047
2129
|
widgetStore;
|
|
2130
|
+
query;
|
|
2048
2131
|
router;
|
|
2049
2132
|
activatedRoute;
|
|
2050
2133
|
widgetItem;
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
dictionaryItemOptions = [];
|
|
2059
|
-
linkedWidgetOptions = [];
|
|
2060
|
-
dictionaryFieldsOptions = [];
|
|
2061
|
-
constructor(service, validatorService, widgetStore, router, activatedRoute) {
|
|
2134
|
+
widgetItems = [];
|
|
2135
|
+
dictionaries = [];
|
|
2136
|
+
headerDictionaryItems = [];
|
|
2137
|
+
subHeaderDictionaryItems = [];
|
|
2138
|
+
dictionaryItemArray = [];
|
|
2139
|
+
widgetOptionsArray = [];
|
|
2140
|
+
constructor(service, validatorService, widgetStore, query, router, activatedRoute) {
|
|
2062
2141
|
super(service, validatorService, router, activatedRoute);
|
|
2063
2142
|
this.service = service;
|
|
2064
2143
|
this.validatorService = validatorService;
|
|
2065
2144
|
this.widgetStore = widgetStore;
|
|
2145
|
+
this.query = query;
|
|
2066
2146
|
this.router = router;
|
|
2067
2147
|
this.activatedRoute = activatedRoute;
|
|
2068
2148
|
this.record = new WidgetModel();
|
|
2069
2149
|
this.widgetItem = new WidgetItemModel();
|
|
2070
|
-
this.service.initList();
|
|
2071
2150
|
}
|
|
2072
2151
|
ngOnInit() {
|
|
2073
2152
|
super.init();
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
this.
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
this.
|
|
2080
|
-
this.record._id = res._id;
|
|
2081
|
-
this.formArray = Array.isArray(res.dataItems) ? res.dataItems.map((item) => {
|
|
2082
|
-
const field = new WidgetItemModel();
|
|
2083
|
-
field.name = item.itemName;
|
|
2084
|
-
field.dictionaryItemID = item.dictionaryItemID;
|
|
2085
|
-
field.linkedWidgetID = item.linkedWidgetID;
|
|
2086
|
-
field.isMain = item.isMain;
|
|
2087
|
-
field.isEditable = item.isEditable;
|
|
2088
|
-
field.dictionaryID = item.dictionaryId;
|
|
2089
|
-
return field;
|
|
2090
|
-
}) : [];
|
|
2091
|
-
this.record.dataItems = res.dataItems;
|
|
2092
|
-
this.widgetsFieldNames = Array.isArray(this.formArray) ? this.formArray.map((item) => ({
|
|
2093
|
-
name: item.name,
|
|
2094
|
-
dictionaryItemID: item.dictionaryItemID,
|
|
2095
|
-
dictionaryId: item.dictionaryID,
|
|
2096
|
-
linkedWidgetID: item.linkedWidgetID,
|
|
2097
|
-
isMain: item.isMain,
|
|
2098
|
-
isEditable: item.isEditable,
|
|
2099
|
-
})) : [];
|
|
2100
|
-
this.handleFilterDatadictionaryAndLinkedWidget(this.record.queueID, 'dictionaryId', 'linkedWidgetID');
|
|
2101
|
-
this.record.dataItems.forEach((e, i) => {
|
|
2102
|
-
this.filterDictionaryProperty(e.dictionaryItemID, 'dictionaryId', i);
|
|
2103
|
-
});
|
|
2153
|
+
this.recordChange.asObservable().subscribe((record) => {
|
|
2154
|
+
this.handleQueueChange(record.queueID);
|
|
2155
|
+
this.handleHeaderDictionarySelect(record.headerDictionaryID);
|
|
2156
|
+
this.handleSubHeaderDictionarySelect(record.subHeaderDictionaryID);
|
|
2157
|
+
record.dataItems.forEach((item, index) => {
|
|
2158
|
+
this.handleWidgetItemDictionarySelect(item.dictionaryID, index);
|
|
2104
2159
|
});
|
|
2105
|
-
}
|
|
2160
|
+
});
|
|
2106
2161
|
}
|
|
2107
|
-
|
|
2108
|
-
this.
|
|
2109
|
-
this.editingIndex = null;
|
|
2110
|
-
}
|
|
2111
|
-
handleFieldClick(index) {
|
|
2112
|
-
this.editingIndex = index;
|
|
2113
|
-
this.widgetItem.name = this.widgetsFieldNames[index].name;
|
|
2114
|
-
this.allowToAddWidget = true;
|
|
2115
|
-
}
|
|
2116
|
-
handleSaveWidgetField(event) {
|
|
2117
|
-
let widgetName = this.widgetItem?.name;
|
|
2118
|
-
if (widgetName) {
|
|
2119
|
-
if (this.editingIndex !== null) {
|
|
2120
|
-
const updatedWidgetsFieldNames = [...this.widgetsFieldNames];
|
|
2121
|
-
const updatedFormArray = [...this.formArray];
|
|
2122
|
-
const updatedDataItems = [...this.record.dataItems];
|
|
2123
|
-
updatedWidgetsFieldNames[this.editingIndex] = {
|
|
2124
|
-
...updatedWidgetsFieldNames[this.editingIndex],
|
|
2125
|
-
name: widgetName
|
|
2126
|
-
};
|
|
2127
|
-
updatedFormArray[this.editingIndex] = {
|
|
2128
|
-
...updatedFormArray[this.editingIndex],
|
|
2129
|
-
name: widgetName
|
|
2130
|
-
};
|
|
2131
|
-
updatedDataItems[this.editingIndex] = {
|
|
2132
|
-
...updatedDataItems[this.editingIndex],
|
|
2133
|
-
name: widgetName
|
|
2134
|
-
};
|
|
2135
|
-
this.widgetsFieldNames = updatedWidgetsFieldNames;
|
|
2136
|
-
this.formArray = updatedFormArray;
|
|
2137
|
-
this.record.dataItems = updatedDataItems;
|
|
2138
|
-
this.editingIndex = null;
|
|
2139
|
-
}
|
|
2140
|
-
else {
|
|
2141
|
-
const newField = new WidgetItemModel();
|
|
2142
|
-
newField.name = widgetName;
|
|
2143
|
-
this.widgetsFieldNames = this.widgetsFieldNames.concat({ name: widgetName });
|
|
2144
|
-
this.formArray = this.formArray.concat(newField);
|
|
2145
|
-
this.record.dataItems = this.record.dataItems.concat(newField);
|
|
2146
|
-
}
|
|
2147
|
-
this.widgetItem.name = SHARED.EMPTY;
|
|
2148
|
-
this.allowToAddWidget = false;
|
|
2149
|
-
}
|
|
2162
|
+
handleWidgetItemAddBtnClick() {
|
|
2163
|
+
this.record.dataItems = [...this.record.dataItems, new WidgetItemModel()];
|
|
2150
2164
|
}
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
// : [];
|
|
2157
|
-
// this.dictionaryItemOptions = Array.isArray(filteredRecords) ? filteredRecords.map((res: any) => ({
|
|
2158
|
-
// label: res.name,
|
|
2159
|
-
// value: res._id,
|
|
2160
|
-
// })) : [];
|
|
2161
|
-
// });
|
|
2162
|
-
this.linkedWidgetFilter(queueId, linkedWidgetList);
|
|
2163
|
-
}
|
|
2164
|
-
linkedWidgetFilter(queueId, linkedWidgetList) {
|
|
2165
|
-
// this.widgetQuery.getLists().subscribe((allLists: List[]) => {
|
|
2166
|
-
// this.linkedWidgetItems = allLists.filter((list) => list.forProperty === linkedWidgetList);
|
|
2167
|
-
// const filteredRecords = Array.isArray(this.linkedWidgetItems[0]?.records)
|
|
2168
|
-
// ? this.linkedWidgetItems[0]?.records.filter((res: any) => res.queueID == queueId)
|
|
2169
|
-
// : [];
|
|
2170
|
-
// this.linkedWidgetOptions = Array.isArray(filteredRecords) ? filteredRecords.map((res: any) => ({
|
|
2171
|
-
// label: res.widgetName,
|
|
2172
|
-
// value: res._id,
|
|
2173
|
-
// })) : [];
|
|
2174
|
-
// });
|
|
2175
|
-
}
|
|
2176
|
-
filterDictionaryProperty(dictionaryId, listName, index) {
|
|
2177
|
-
// this.widgetQuery.getLists().subscribe((allLists: List[]) => {
|
|
2178
|
-
// this.dataDictionaryField = allLists.filter((list) => list.forProperty === listName);
|
|
2179
|
-
// const filteredRecords = Array.isArray(this.dataDictionaryField[0]?.records)
|
|
2180
|
-
// ? this.dataDictionaryField[0]?.records.filter((res: any) => res.dictionaryID == dictionaryId)
|
|
2181
|
-
// : [];
|
|
2182
|
-
// this.dictionaryFieldsOptions[index] = Array.isArray(filteredRecords) ? filteredRecords.map((res: any) => ({
|
|
2183
|
-
// label: res.key,
|
|
2184
|
-
// value: res._id,
|
|
2185
|
-
// })) : [];
|
|
2186
|
-
// });
|
|
2165
|
+
handleQueueChange(event) {
|
|
2166
|
+
this.query.getLists().subscribe((allLists) => {
|
|
2167
|
+
const allDictionaryRecords = allLists.find((list) => list.forProperty === 'dictionaryID')?.records;
|
|
2168
|
+
this.dictionaries = allDictionaryRecords?.filter((item) => item.queueID === event) || [];
|
|
2169
|
+
});
|
|
2187
2170
|
}
|
|
2188
|
-
|
|
2189
|
-
this.
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2171
|
+
handleHeaderDictionarySelect(dictionaryId) {
|
|
2172
|
+
this.query.getLists().subscribe((allLists) => {
|
|
2173
|
+
const allDictionaryItemRecords = allLists.find((list) => list.forProperty === 'dictionaryItemID')?.records;
|
|
2174
|
+
this.headerDictionaryItems = allDictionaryItemRecords?.filter((item) => item.dictionaryID === dictionaryId) || [];
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
2177
|
+
handleSubHeaderDictionarySelect(dictionaryId) {
|
|
2178
|
+
this.query.getLists().subscribe((allLists) => {
|
|
2179
|
+
const allDictionaryItemRecords = allLists.find((list) => list.forProperty === 'dictionaryItemID')?.records;
|
|
2180
|
+
this.subHeaderDictionaryItems = allDictionaryItemRecords?.filter((item) => item.dictionaryID === dictionaryId) || [];
|
|
2181
|
+
});
|
|
2182
|
+
}
|
|
2183
|
+
handleWidgetItemDictionarySelect(dictionaryId, index) {
|
|
2184
|
+
this.query.getLists().subscribe((allLists) => {
|
|
2185
|
+
const allDictionaryItemRecords = allLists.find((list) => list.forProperty === 'dictionaryItemID')?.records;
|
|
2186
|
+
this.dictionaryItemArray[index] = allDictionaryItemRecords?.filter((item) => item.dictionaryID === dictionaryId) || [];
|
|
2187
|
+
});
|
|
2203
2188
|
}
|
|
2204
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminFormComponent, deps: [{ token: WidgetAdminService }, { token: ValidatorService }, { token: WidgetAdminStore }, { token: i3$2.Router }, { token: i3$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
2205
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: WidgetAdminFormComponent, isStandalone: false, selector: "lib-widget-admin-form", usesInheritance: true, ngImport: i0, template: "<div class=\"grid\">\n <div class=\"col-12\">\n <div class=\"card\">\n <form-container [record]=\"record\" (onSubmit)=\"handleSubmit()\" [messages]=\"message\">\n\n <div class=\"col-12 md:col-12 mt-2\">\n <div class=\"mb-2\">\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\n readonly: false,\n name: 'widgetName',\n isRequired: true,\n displayText: 'Add Widget',\n placeholder: 'Enter Widget Name'\n }\"></text-box>\n </div>\n </div>\n\n <div class=\"field col-12 md:col-12 p-0 md:flex\">\n\n <div class=\"field p-0 pr-2 col-12 md:col-3\">\n <div class=\"card m-0 p-0 mb-2\">\n <div class=\"mt-3 w-full flex\">\n <button pButton pRipple label=\"Add Field\" routerLinkActive=\"router-link-active\"\n icon=\"pi pi-plus font-semibold\"\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\n (click)=\"handleAddField()\">Add Widget Item</button>\n </div>\n\n </div>\n </div>\n <div class=\"col-12 md:col-9\">\n <dropdown [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\n name:'queueID',\n displayText : 'Select Queues',\n isRequired:true,\n \n \n }\" (onInput)=\"handleFilterDatadictionaryAndLinkedWidget($event,'dictionaryId', 'linkedWidgetID')\">\n </dropdown>\n </div>\n </div>\n\n\n @if(allowToAddWidget){\n <div class=\"feild-card col-12 md:col-3\">\n <div\n class=\"flex surface-card flex-column w-full border-1 surface-border p-3 gap-5 hover:surface-ground cursor-pointer border-round\">\n <div class=\"flex justify-content-between align-items-center\">\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\n name : 'itemName',\n readonly : false,\n isRequired : true,\n displayText:'Enter Field Name'\n }\" (keydown.enter)=\"handleSaveWidgetField($event)\"></text-box>\n </div>\n </div>\n </div>\n }\n\n <div class=\"field col-12 p-0 m-0 md:col-12 flex\">\n <div class=\"abc col-12 p-0 m-0 md:col-12 flex\">\n\n <div class=\"field p-0 m-0 col-12 md:col-3\">\n @for(widgetsField of widgetsFieldNames; track widgetsField ; let i = $index){\n <div class=\"flex flex-column gap-5 overflow-y-auto mt-2 scrollable kanban-list\" #listEl\n style=\"min-height: 2rem\">\n <div class=\"flex surface-card flex-column mt-3 w-full border-1 surface-border p-3 gap-5 hover:surface-ground cursor-pointer border-round\"\n (click)=\"handleFieldClick(i)\">\n <div class=\"flex justify-content-between align-items-center\">\n <span class=\"text-900 font-semibold\">{{\n widgetsField.name\n }}</span>\n </div>\n </div>\n </div>\n }\n </div>\n\n <div class=\"allFeilds col-12 md:col-9\">\n <div *ngFor=\"let formItem of formArray; let i = index\"\n class=\"field md:flex align-items-center px-0 p-0 m-0 col-12 md:col-12\">\n <div class=\"field col-12 pl-2 pb-0 mb-2 md:mr-2 md:col-3\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"formItem\"\n [attributeModel]=\"{\n name:'dictionaryId',\n listLabelProperty:'name',\n listValueProperty:'_id',\n displayText : 'Select Data Dictionary',\n isRequired:true,\n options: dictionaryItemOptions\n }\" (onInput)=\"filterDictionaryProperty($event, 'dictionaryItemID', i)\">\n </dropdown>\n </div>\n <div class=\"field col-12 md:mr-2 mb-2 pb-0 p-0 md:col-3\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"formItem\"\n [attributeModel]=\"{\n name:'dictionaryItemID',\n listLabelProperty:'name',\n listValueProperty:'_id',\n displayText : 'Select Properties',\n isRequired:true,\n options: dictionaryFieldsOptions[i]\n }\">\n </dropdown>\n </div>\n <div class=\"field col-12 p-0 pb-0 mb-2 md:col-3\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"formItem\"\n [attributeModel]=\"{\n name:'linkedWidgetID',\n listLabelProperty:'widgetName',\n listValueProperty:'_id',\n displayText : 'Select Linked Widget',\n isRequired:true,\n options:linkedWidgetOptions\n }\">\n </dropdown>\n </div>\n <div class=\"field col-12 m-0 flex justify-content-around md:col-3 mt-4\">\n <div class=\"m-0\">\n <check-box [store]=\"widgetStore\" [record]=\"formItem\" [attributeModel]=\"{\n name:'isMain',\n displayText : 'Main',\n }\">\n </check-box>\n </div>\n <div class=\"m-0\">\n <check-box [store]=\"widgetStore\" [record]=\"formItem\" [attributeModel]=\"{\n name:'isEditable',\n displayText : 'Edit',\n }\">\n </check-box>\n </div>\n </div>\n </div>\n </div>\n\n\n\n </div>\n\n </div>\n </form-container>\n </div>\n </div>\n</div>", styles: [""], 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", "disableButton", "disableSubmitButton", "disableSaveButton", "overrideNavigate"], outputs: ["onSave", "onSubmit", "onCancel"] }, { kind: "component", type: CheckBoxComponent, selector: "check-box" }] });
|
|
2189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminFormComponent, deps: [{ token: WidgetAdminService }, { token: ValidatorService }, { token: WidgetAdminStore }, { token: WidgetAdminQuery }, { token: i3$2.Router }, { token: i3$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
2190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetAdminFormComponent, isStandalone: false, selector: "lib-widget-admin-form", usesInheritance: true, ngImport: i0, template: "<div class=\"grid\">\n <div class=\"col-12\">\n <div class=\"card\">\n <form-container [record]=\"record\" (onSave)=\"handleSubmit()\" (onCancel)=\"handleCancel()\" [messages]=\"message\"\n [showSave]=\"true\">\n\n <div class=\"col-12 md:col-12 mt-2 mb-2 flex\">\n <div class=\"col-5 md:col-5 mt-2 mb-2\">\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\n readonly: false,\n name: 'name',\n isRequired: true,\n displayText: 'Name',\n placeholder: 'Enter Widget Name'\n }\"></text-box>\n </div>\n\n <div class=\"col-5 md:col-5 mt-2 mb-2\">\n <dropdown [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\n name:'queueID',\n displayText : 'Select Queue 2',\n isRequired:true,\n }\" (onInput)=\"handleQueueChange($event)\">\n </dropdown>\n </div>\n <div class=\"col-2 md:col-2 mt-5\">\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\n name:'isActive',\n displayText : 'Active',\n }\">\n </check-box>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"col-6 md:col-6 mt-2 mb-2 flex\">\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\"\n [attributeModel]=\"{\n name:'headerDictionaryID',\n listLabelProperty:'name',\n listValueProperty:'_id',\n displayText : 'Select Dictionary',\n options: dictionaries\n }\" (onInput)=\"handleHeaderDictionarySelect($event)\">\n </dropdown>\n </div>\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\"\n [attributeModel]=\"{\n name:'headerDictionaryItemID',\n listLabelProperty:'key',\n listValueProperty:'_id',\n displayText : 'Select Header Item',\n options: headerDictionaryItems\n }\">\n </dropdown>\n </div>\n </div>\n <div class=\"col-6 md:col-6 mt-2 mb-2 flex\">\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\"\n [attributeModel]=\"{\n name:'subHeaderDictionaryID',\n listLabelProperty:'name',\n listValueProperty:'_id',\n displayText : 'Select Dictionary',\n options: dictionaries\n }\" (onInput)=\"handleSubHeaderDictionarySelect($event)\">\n </dropdown>\n </div>\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\"\n [attributeModel]=\"{\n name:'subHeaderDictionaryItemID',\n listLabelProperty:'key',\n listValueProperty:'_id',\n displayText : 'Select SubHeader Item',\n options: subHeaderDictionaryItems\n }\">\n </dropdown>\n </div>\n </div>\n </div>\n\n <div class=\"field p-0 pr-2 col-12 md:col-2\">\n <div class=\"card m-0 p-0 mb-2\">\n <div class=\"mt-3 w-full flex\">\n <button pButton pRipple label=\"Add Field\" routerLinkActive=\"router-link-active\"\n icon=\"pi pi-plus font-semibold\"\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\n (click)=\"handleWidgetItemAddBtnClick()\">Add Widget Item</button>\n </div>\n\n </div>\n </div>\n\n <!-- Widget Items -->\n <div class=\"feild-card col-12 md:col-12 flex\"\n *ngFor=\"let widgetItem of record.dataItems; let i = index;\">\n <div class=\"field col-2 col-sm-6\">\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\n name : 'name',\n readonly : false,\n displayText : 'Item Label',\n isRequired : true,\n }\"></text-box>\n </div>\n <div class=\"field col-2 col-sm-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\"\n [attributeModel]=\"{\n name:'dictionaryID',\n listLabelProperty:'name',\n listValueProperty:'_id',\n displayText : 'Select Dictionary',\n isRequired:true,\n options: dictionaries\n }\" (onInput)=\"handleWidgetItemDictionarySelect($event, i)\">\n </dropdown>\n </div>\n <div class=\"field col-2 col-sm-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\"\n [attributeModel]=\"{\n name:'dictionaryItemID',\n listLabelProperty:'key',\n listValueProperty:'_id',\n displayText : 'Select Properties',\n isRequired:true,\n options: dictionaryItemArray[i]\n }\">\n </dropdown>\n </div>\n <div class=\"field col-3 col-sm-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\"\n [attributeModel]=\"{\n name:'linkedWidgetID',\n listLabelProperty:'widgetName',\n listValueProperty:'_id',\n displayText : 'Select Linked Widget',\n }\">\n </dropdown>\n </div>\n <div class=\"field col-3 m-0 flex justify-content-around md:col-3 mt-4\">\n <div class=\"m-0\">\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\n name:'isMain',\n displayText : 'Add to Main ?',\n }\">\n </check-box>\n </div>\n <div class=\"m-0\">\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\n name:'isEditable',\n displayText : 'Is Editable ?',\n }\">\n </check-box>\n </div>\n </div>\n </div>\n </form-container>\n </div>\n </div>\n</div>", styles: [""], 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: ["isDisable", "messages", "record", "headerText", "showSave", "disableButton", "disableSubmitButton", "disableSaveButton", "overrideNavigate"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: CheckBoxComponent, selector: "check-box" }] });
|
|
2206
2191
|
}
|
|
2207
2192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminFormComponent, decorators: [{
|
|
2208
2193
|
type: Component,
|
|
2209
|
-
args: [{ selector: 'lib-widget-admin-form', standalone: false, template: "<div class=\"grid\">\n <div class=\"col-12\">\n <div class=\"card\">\n <form-container [record]=\"record\" (
|
|
2210
|
-
}], ctorParameters: () => [{ type: WidgetAdminService }, { type: ValidatorService }, { type: WidgetAdminStore }, { type: i3$2.Router }, { type: i3$2.ActivatedRoute }] });
|
|
2194
|
+
args: [{ selector: 'lib-widget-admin-form', standalone: false, template: "<div class=\"grid\">\n <div class=\"col-12\">\n <div class=\"card\">\n <form-container [record]=\"record\" (onSave)=\"handleSubmit()\" (onCancel)=\"handleCancel()\" [messages]=\"message\"\n [showSave]=\"true\">\n\n <div class=\"col-12 md:col-12 mt-2 mb-2 flex\">\n <div class=\"col-5 md:col-5 mt-2 mb-2\">\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\n readonly: false,\n name: 'name',\n isRequired: true,\n displayText: 'Name',\n placeholder: 'Enter Widget Name'\n }\"></text-box>\n </div>\n\n <div class=\"col-5 md:col-5 mt-2 mb-2\">\n <dropdown [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\n name:'queueID',\n displayText : 'Select Queue 2',\n isRequired:true,\n }\" (onInput)=\"handleQueueChange($event)\">\n </dropdown>\n </div>\n <div class=\"col-2 md:col-2 mt-5\">\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\n name:'isActive',\n displayText : 'Active',\n }\">\n </check-box>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"col-6 md:col-6 mt-2 mb-2 flex\">\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\"\n [attributeModel]=\"{\n name:'headerDictionaryID',\n listLabelProperty:'name',\n listValueProperty:'_id',\n displayText : 'Select Dictionary',\n options: dictionaries\n }\" (onInput)=\"handleHeaderDictionarySelect($event)\">\n </dropdown>\n </div>\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\"\n [attributeModel]=\"{\n name:'headerDictionaryItemID',\n listLabelProperty:'key',\n listValueProperty:'_id',\n displayText : 'Select Header Item',\n options: headerDictionaryItems\n }\">\n </dropdown>\n </div>\n </div>\n <div class=\"col-6 md:col-6 mt-2 mb-2 flex\">\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\"\n [attributeModel]=\"{\n name:'subHeaderDictionaryID',\n listLabelProperty:'name',\n listValueProperty:'_id',\n displayText : 'Select Dictionary',\n options: dictionaries\n }\" (onInput)=\"handleSubHeaderDictionarySelect($event)\">\n </dropdown>\n </div>\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\"\n [attributeModel]=\"{\n name:'subHeaderDictionaryItemID',\n listLabelProperty:'key',\n listValueProperty:'_id',\n displayText : 'Select SubHeader Item',\n options: subHeaderDictionaryItems\n }\">\n </dropdown>\n </div>\n </div>\n </div>\n\n <div class=\"field p-0 pr-2 col-12 md:col-2\">\n <div class=\"card m-0 p-0 mb-2\">\n <div class=\"mt-3 w-full flex\">\n <button pButton pRipple label=\"Add Field\" routerLinkActive=\"router-link-active\"\n icon=\"pi pi-plus font-semibold\"\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\n (click)=\"handleWidgetItemAddBtnClick()\">Add Widget Item</button>\n </div>\n\n </div>\n </div>\n\n <!-- Widget Items -->\n <div class=\"feild-card col-12 md:col-12 flex\"\n *ngFor=\"let widgetItem of record.dataItems; let i = index;\">\n <div class=\"field col-2 col-sm-6\">\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\n name : 'name',\n readonly : false,\n displayText : 'Item Label',\n isRequired : true,\n }\"></text-box>\n </div>\n <div class=\"field col-2 col-sm-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\"\n [attributeModel]=\"{\n name:'dictionaryID',\n listLabelProperty:'name',\n listValueProperty:'_id',\n displayText : 'Select Dictionary',\n isRequired:true,\n options: dictionaries\n }\" (onInput)=\"handleWidgetItemDictionarySelect($event, i)\">\n </dropdown>\n </div>\n <div class=\"field col-2 col-sm-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\"\n [attributeModel]=\"{\n name:'dictionaryItemID',\n listLabelProperty:'key',\n listValueProperty:'_id',\n displayText : 'Select Properties',\n isRequired:true,\n options: dictionaryItemArray[i]\n }\">\n </dropdown>\n </div>\n <div class=\"field col-3 col-sm-6\">\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\"\n [attributeModel]=\"{\n name:'linkedWidgetID',\n listLabelProperty:'widgetName',\n listValueProperty:'_id',\n displayText : 'Select Linked Widget',\n }\">\n </dropdown>\n </div>\n <div class=\"field col-3 m-0 flex justify-content-around md:col-3 mt-4\">\n <div class=\"m-0\">\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\n name:'isMain',\n displayText : 'Add to Main ?',\n }\">\n </check-box>\n </div>\n <div class=\"m-0\">\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\n name:'isEditable',\n displayText : 'Is Editable ?',\n }\">\n </check-box>\n </div>\n </div>\n </div>\n </form-container>\n </div>\n </div>\n</div>" }]
|
|
2195
|
+
}], ctorParameters: () => [{ type: WidgetAdminService }, { type: ValidatorService }, { type: WidgetAdminStore }, { type: WidgetAdminQuery }, { type: i3$2.Router }, { type: i3$2.ActivatedRoute }] });
|
|
2211
2196
|
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2197
|
+
/**
|
|
2198
|
+
* Module for managing widgets.
|
|
2199
|
+
*/
|
|
2200
|
+
class QWWidgetAdminModule {
|
|
2201
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QWWidgetAdminModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2202
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: QWWidgetAdminModule, declarations: [WidgetAdminListComponent, WidgetAdminFormComponent], imports: [CommonModule,
|
|
2215
2203
|
FormsModule,
|
|
2216
2204
|
SharedModule,
|
|
2217
2205
|
TablePrimaryComponent,
|
|
@@ -2219,7 +2207,7 @@ class WidgetAdminModule {
|
|
|
2219
2207
|
CheckBoxComponent,
|
|
2220
2208
|
ButtonComponent,
|
|
2221
2209
|
TextBoxComponent], exports: [WidgetAdminListComponent, WidgetAdminFormComponent] });
|
|
2222
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type:
|
|
2210
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QWWidgetAdminModule, imports: [CommonModule,
|
|
2223
2211
|
FormsModule,
|
|
2224
2212
|
SharedModule,
|
|
2225
2213
|
TablePrimaryComponent,
|
|
@@ -2228,7 +2216,7 @@ class WidgetAdminModule {
|
|
|
2228
2216
|
ButtonComponent,
|
|
2229
2217
|
TextBoxComponent] });
|
|
2230
2218
|
}
|
|
2231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type:
|
|
2219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QWWidgetAdminModule, decorators: [{
|
|
2232
2220
|
type: NgModule,
|
|
2233
2221
|
args: [{
|
|
2234
2222
|
declarations: [WidgetAdminListComponent, WidgetAdminFormComponent],
|
|
@@ -2313,7 +2301,7 @@ class AdminActionFormComponent extends BaseFormComponent {
|
|
|
2313
2301
|
this.adminActionStore = adminActionStore;
|
|
2314
2302
|
}
|
|
2315
2303
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionFormComponent, deps: [{ token: AdminActionService }, { token: ValidatorService }, { token: i3$2.Router }, { token: i3$2.ActivatedRoute }, { token: AdminActionStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2316
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: AdminActionFormComponent, isStandalone: false, selector: "lib-admin-action-form", usesInheritance: true, ngImport: i0, template: "<form-container\n [headerText]=\"'Actions / Actions Form'\"\n [messages]=\"messages\"\n (onSave)=\"handleSubmit()\"\n [showSave]=\"true\"\n>\n <div class=\"card p-fluid p-formgrid grid \">\n <h4 class=\"font-bold col-12 md:col-12\">Actions Form</h4>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"adminActionStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'actionName',\n isRequired: true,\n displayText: 'Action Name',\n placeholder: 'Enter Action Name'\n }\"\n ></text-box>\n </div>\n \n <div class=\"col-12 md:col-6\">\n <dropdown\n [store]=\"adminActionStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n name:'apiEndPoint',\n isRequired: true,\n displayText : 'End Point',\n placeholder: 'Select End Point',\n options: apiConfigList\n }\"></dropdown>\n </div>\n\n <div class=\"col-12 md:col-12\">\n <text-area\n [store]=\"adminActionStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'prompt',\n isRequired: true,\n displayText: 'Prompt',\n placeholder: 'Enter prompt'\n }\"\n ></text-area>\n </div>\n\n <div class=\"col-12 md:col-6\">\n <dropdown\n [store]=\"adminActionStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n name:'queue',\n isRequired: true,\n displayText : 'Queue',\n placeholder: 'Select Queue',\n options: queueList\n }\"></dropdown>\n </div>\n\n <div class=\"col-12 md:col-2 flex align-items-end justify-content-end validate-btn-wrapper\">\n <button\n pButton\n pRipple\n type=\"button\"\n label=\"Validate\"\n class=\"p-button-raised\"\n ></button>\n </div>\n\n <div class=\"col-12 md:col-12\">\n <text-area\n [store]=\"adminActionStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'formConfiguration',\n isRequired: true,\n displayText: 'Form Configuration',\n placeholder: 'Enter form configuration'\n }\"\n ></text-area>\n </div>\n </div>\n \n</form-container>", styles: [".validate-btn-wrapper{margin-bottom:2px}\n"], dependencies: [{ 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", "disableButton", "disableSubmitButton", "disableSaveButton", "overrideNavigate"], outputs: ["onSave", "
|
|
2304
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: AdminActionFormComponent, isStandalone: false, selector: "lib-admin-action-form", usesInheritance: true, ngImport: i0, template: "<form-container\n [headerText]=\"'Actions / Actions Form'\"\n [messages]=\"messages\"\n (onSave)=\"handleSubmit()\"\n [showSave]=\"true\"\n>\n <div class=\"card p-fluid p-formgrid grid \">\n <h4 class=\"font-bold col-12 md:col-12\">Actions Form</h4>\n <div class=\"col-12 md:col-6\">\n <text-box\n [store]=\"adminActionStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'actionName',\n isRequired: true,\n displayText: 'Action Name',\n placeholder: 'Enter Action Name'\n }\"\n ></text-box>\n </div>\n \n <div class=\"col-12 md:col-6\">\n <dropdown\n [store]=\"adminActionStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n name:'apiEndPoint',\n isRequired: true,\n displayText : 'End Point',\n placeholder: 'Select End Point',\n options: apiConfigList\n }\"></dropdown>\n </div>\n\n <div class=\"col-12 md:col-12\">\n <text-area\n [store]=\"adminActionStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'prompt',\n isRequired: true,\n displayText: 'Prompt',\n placeholder: 'Enter prompt'\n }\"\n ></text-area>\n </div>\n\n <div class=\"col-12 md:col-6\">\n <dropdown\n [store]=\"adminActionStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n name:'queue',\n isRequired: true,\n displayText : 'Queue',\n placeholder: 'Select Queue',\n options: queueList\n }\"></dropdown>\n </div>\n\n <div class=\"col-12 md:col-2 flex align-items-end justify-content-end validate-btn-wrapper\">\n <button\n pButton\n pRipple\n type=\"button\"\n label=\"Validate\"\n class=\"p-button-raised\"\n ></button>\n </div>\n\n <div class=\"col-12 md:col-12\">\n <text-area\n [store]=\"adminActionStore\"\n [record]=\"record\"\n [attributeModel]=\"{\n readonly: false,\n name: 'formConfiguration',\n isRequired: true,\n displayText: 'Form Configuration',\n placeholder: 'Enter form configuration'\n }\"\n ></text-area>\n </div>\n </div>\n \n</form-container>", styles: [".validate-btn-wrapper{margin-bottom:2px}\n"], dependencies: [{ kind: "component", type: TextBoxComponent, selector: "text-box" }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: FormContainerComponent, selector: "form-container", inputs: ["isDisable", "messages", "record", "headerText", "showSave", "disableButton", "disableSubmitButton", "disableSaveButton", "overrideNavigate"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: TextAreaComponent, selector: "text-area", inputs: ["rowspan"] }, { kind: "directive", type: i2$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }] });
|
|
2317
2305
|
}
|
|
2318
2306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionFormComponent, decorators: [{
|
|
2319
2307
|
type: Component,
|
|
@@ -2359,5 +2347,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
2359
2347
|
* Generated bundle index. Do not edit.
|
|
2360
2348
|
*/
|
|
2361
2349
|
|
|
2362
|
-
export { ActionAdminModule, AdminActionFormComponent, AdminActionListComponent, ApiAdminFormComponent, ApiAdminListComponent, ApiAdminModule, WidgetAdminFormComponent, WidgetAdminListComponent
|
|
2350
|
+
export { ActionAdminModule, AdminActionFormComponent, AdminActionListComponent, ApiAdminFormComponent, ApiAdminListComponent, ApiAdminModule, QWWidgetAdminModule, WidgetAdminFormComponent, WidgetAdminListComponent };
|
|
2363
2351
|
//# sourceMappingURL=cat-qw-lib.mjs.map
|