verben-workflow-ui 0.7.6 → 0.7.8
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/esm2022/src/lib/components/designer/components/label-editor.component.mjs +9 -4
- package/esm2022/src/lib/components/designer/components/swimlane-label.component.mjs +1 -1
- package/esm2022/src/lib/components/designer/components/wf-canvas.component.mjs +2 -2
- package/esm2022/src/lib/components/designer/models/types.mjs +1 -1
- package/esm2022/src/lib/components/designer/services/connection.service.mjs +2 -1
- package/esm2022/src/lib/components/designer/services/wf-mapper.service.mjs +4 -1
- package/esm2022/src/lib/components/my-queue/tasks.form.component.mjs +29 -7
- package/esm2022/src/lib/components/task-history/task-history.component.mjs +37 -8
- package/esm2022/src/lib/components/tasks/tasks.form.component.mjs +13 -3
- package/esm2022/src/lib/components/workflow-designer/action-dialog/action-dialog.component.mjs +13 -3
- package/esm2022/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.mjs +4 -3
- package/esm2022/src/lib/components/workflow-designer/services/transformer.service.mjs +3 -1
- package/esm2022/src/lib/components/workflow-designer/workflow-data.service.mjs +67 -2
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.component.mjs +2 -1
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.state.mjs +3 -1
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.types.mjs +1 -1
- package/esm2022/src/lib/components/workflow-stage/workflow-stage.component.mjs +75 -14
- package/esm2022/src/lib/models/MessageMedium.mjs +3 -1
- package/esm2022/src/lib/models/WorkflowAction.mjs +1 -1
- package/esm2022/src/lib/services/public-api.mjs +2 -1
- package/esm2022/src/lib/services/workflow-form.helper.mjs +58 -0
- package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs +14 -5
- package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs +28 -6
- package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs +37 -8
- package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs +12 -2
- package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs +86 -5
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow-stage.mjs +74 -13
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow-stage.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-models.mjs +2 -0
- package/fesm2022/verben-workflow-ui-src-lib-models.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-services.mjs +59 -1
- package/fesm2022/verben-workflow-ui-src-lib-services.mjs.map +1 -1
- package/package.json +63 -63
- package/src/lib/components/designer/components/label-editor.component.d.ts +2 -1
- package/src/lib/components/designer/models/types.d.ts +1 -0
- package/src/lib/components/my-queue/tasks.form.component.d.ts +3 -1
- package/src/lib/components/task-history/task-history.component.d.ts +3 -1
- package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.d.ts +4 -2
- package/src/lib/components/workflow-designer/workflow-data.service.d.ts +7 -0
- package/src/lib/components/workflow-designer/workflow-designer.types.d.ts +1 -0
- package/src/lib/components/workflow-stage/workflow-stage.component.d.ts +4 -1
- package/src/lib/models/MessageMedium.d.ts +3 -1
- package/src/lib/models/WorkflowAction.d.ts +1 -0
- package/src/lib/services/public-api.d.ts +1 -0
- package/src/lib/services/workflow-form.helper.d.ts +17 -0
|
@@ -832,16 +832,28 @@ class TasksFormComponent {
|
|
|
832
832
|
WorkflowCode: value.data.WorkflowCode || '',
|
|
833
833
|
Status: value.data.Status || '',
|
|
834
834
|
});
|
|
835
|
-
if (this.readOnly) {
|
|
836
|
-
this.form.disable();
|
|
837
|
-
}
|
|
838
835
|
}
|
|
839
836
|
else {
|
|
840
837
|
this.form.reset();
|
|
841
838
|
}
|
|
839
|
+
if (this._readOnly) {
|
|
840
|
+
this.form.disable({ emitEvent: false });
|
|
841
|
+
}
|
|
842
842
|
}
|
|
843
843
|
_currentData = null;
|
|
844
|
-
|
|
844
|
+
_readOnly = false;
|
|
845
|
+
get readOnly() {
|
|
846
|
+
return this._readOnly;
|
|
847
|
+
}
|
|
848
|
+
set readOnly(value) {
|
|
849
|
+
this._readOnly = value;
|
|
850
|
+
if (this._readOnly) {
|
|
851
|
+
this.form.disable({ emitEvent: false });
|
|
852
|
+
}
|
|
853
|
+
else {
|
|
854
|
+
this.form.enable({ emitEvent: false });
|
|
855
|
+
}
|
|
856
|
+
}
|
|
845
857
|
taskForm = null;
|
|
846
858
|
active = 0;
|
|
847
859
|
dataType = DataType.Text;
|
|
@@ -862,6 +874,16 @@ class TasksFormComponent {
|
|
|
862
874
|
this.operationPopupService = operationPopupService;
|
|
863
875
|
this.taskFacade.getWorkflow$().subscribe((workflows) => {
|
|
864
876
|
this.workflows = workflows;
|
|
877
|
+
const currentWorkflowCode = this.form.get('WorkflowCode')?.value ||
|
|
878
|
+
this._currentData?.data?.WorkflowCode ||
|
|
879
|
+
'';
|
|
880
|
+
if (currentWorkflowCode && workflows.length > 0) {
|
|
881
|
+
setTimeout(() => {
|
|
882
|
+
this.form
|
|
883
|
+
.get('WorkflowCode')
|
|
884
|
+
?.setValue(currentWorkflowCode, { emitEvent: true });
|
|
885
|
+
}, 0);
|
|
886
|
+
}
|
|
865
887
|
});
|
|
866
888
|
this.form = this.fb.group({
|
|
867
889
|
Name: ['', { validators: [Validators.required] }],
|
|
@@ -977,11 +999,11 @@ class TasksFormComponent {
|
|
|
977
999
|
this.utilService.showSuccess('Task followed successfully');
|
|
978
1000
|
}
|
|
979
1001
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksFormComponent, deps: [{ token: i1.FormBuilder }, { token: i2.TaskFacade }, { token: i3.EnvironmentService }, { token: i3.UtilService }, { token: MyQueueState }, { token: i5.OperationPopupService }], target: i0.ɵɵFactoryTarget.Component });
|
|
980
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TasksFormComponent, selector: "tasks-form", inputs: { currentData: "currentData", readOnly: "readOnly" }, outputs: { onTaskFormSave: "onTaskFormSave", onSave: "onSave" }, ngImport: i0, template: "@if (taskFormView && taskForm) {\n <div\n *ngIf=\"taskForm.Entities[active]\"\n class=\"flex flex-wrap bg-[#9A9FBF80] rounded-xl px-3 py-2 w-full relative gap-6\"\n >\n <app-form-timer></app-form-timer>\n <div *ngFor=\"let group of taskForm.Entities; let index = index\">\n <p\n (click)=\"active = index\"\n [ngClass]=\"{\n 'bg-[var(--vbn-color-surface)] text-primary rounded-lg shadow-lg':\n active === index,\n }\"\n class=\"px-6 py-2 cursor-pointer\"\n >\n {{ group.Name }}group\n </p>\n </div>\n </div>\n\n <div *ngIf=\"taskForm.Entities[active]; else emptyState\" class=\"mt-4\">\n <form-control\n [dataType]=\"dataType\"\n [formProperties]=\"taskForm.Entities[active].Properties\"\n ></form-control>\n\n <div class=\"flex gap-3 justify-end\">\n <verbena-button\n (click)=\"areRequiredPropertiesFilled()\"\n text=\"CHECK\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n (click)=\"taskFormView = false\"\n text=\"Close task form\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"sendTaskForm()\"\n [disable]=\"!areRequiredPropertiesFilled()\"\n text=\"Save\"\n ></verbena-button>\n </div>\n </div>\n\n <!-- Empty state template -->\n <ng-template #emptyState>\n <p class=\"mt-4 p-4 text-gray-600 text-center\">\n No entries available for the selected form group.\n </p>\n </ng-template>\n} @else {\n <form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n (ngSubmit)=\"handleSubmit()\"\n >\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n formControlName=\"Name\"\n placeHolder=\"Enter Name\"\n />\n <verbena-input\n name=\"Description\"\n label=\"Description\"\n formControlName=\"Description\"\n placeHolder=\"Enter Description\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"workflow\">Workflow</label>\n\n <verben-drop-down\n label=\"Workflow\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select\"\n [options]=\"workflows\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n id=\"workflow\"\n formControlName=\"WorkflowCode\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"status\">Status</label>\n\n <verben-drop-down\n label=\"Status\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [showClear]=\"true\"\n placeholder=\"Null\"\n [(options)]=\"statuses\"\n id=\"status\"\n formControlName=\"Status\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between gap-4 my-2\">\n <div class=\"flex gap-3\">\n <div *ngIf=\"currentData && getRoute(currentData.data) as workflowRoute\">\n <ng-container\n *ngIf=\"\n currentData && workflowRoute && workflowRoute.trim().length > 0\n \"\n >\n <verbena-button\n *ngIf=\"currentData.data.DataState !== 'New'\"\n class=\"verben-switch-button\"\n (click)=\"viewSource(currentData.data, workflowRoute)\"\n text=\"View Source Data\"\n ></verbena-button>\n </ng-container>\n </div>\n <verbena-button\n *ngIf=\"currentData && currentData.data.DataState !== 'New'\"\n class=\"verben-switch-button\"\n (click)=\"followTask(currentData.data.TaskData)\"\n text=\"Follow Task\"\n ></verbena-button>\n </div>\n\n <!-- <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-text-muted)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button> -->\n <!-- <verbena-button\n [disable]=\"!taskForm || loadingTaskForm\"\n (click)=\"taskFormView = true\"\n [text]=\"loadingTaskForm ? 'Checking for form' : 'Fill task form'\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button> -->\n <verbena-button\n *ngIf=\"!readOnly\"\n type=\"submit\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button>\n </div>\n </form>\n}\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5$1.VerbenaInputComponent, selector: "verbena-input", inputs: ["disabled", "label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "fontSize", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "passLength", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i5$1.VerbenaButtonComponent, selector: "verbena-button", inputs: ["type", "text", "styleType", "size", "block", "disable", "disabled", "isLoading", "spinnerSize", "spinnerColor", "svg", "svgPosition", "svgWidth", "svgHeight", "svgSize", "svgColor", "icon", "useIcon", "iconPosition", "iconColor", "variant", "weight", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "buttonClass", "buttonTextClass"] }, { kind: "component", type: i5$1.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "overlayWidth", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "refPageSize", "disabled", "required", "autoScrollToCurrentItem", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i8.FormControlComponent, selector: "form-control", inputs: ["dataType", "value", "boolInputType", "formProperties", "disabled"] }, { kind: "component", type: i9.FormTimerComponent, selector: "app-form-timer", inputs: ["expiryDate"] }] });
|
|
1002
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TasksFormComponent, selector: "tasks-form", inputs: { currentData: "currentData", readOnly: "readOnly" }, outputs: { onTaskFormSave: "onTaskFormSave", onSave: "onSave" }, ngImport: i0, template: "@if (taskFormView && taskForm) {\n <div\n *ngIf=\"taskForm.Entities[active]\"\n class=\"flex flex-wrap bg-[#9A9FBF80] rounded-xl px-3 py-2 w-full relative gap-6\"\n >\n <app-form-timer></app-form-timer>\n <div *ngFor=\"let group of taskForm.Entities; let index = index\">\n <p\n (click)=\"active = index\"\n [ngClass]=\"{\n 'bg-[var(--vbn-color-surface)] text-primary rounded-lg shadow-lg':\n active === index,\n }\"\n class=\"px-6 py-2 cursor-pointer\"\n >\n {{ group.Name }}group\n </p>\n </div>\n </div>\n\n <div *ngIf=\"taskForm.Entities[active]; else emptyState\" class=\"mt-4\">\n <form-control\n [dataType]=\"dataType\"\n [formProperties]=\"taskForm.Entities[active].Properties\"\n ></form-control>\n\n <div class=\"flex gap-3 justify-end\">\n <verbena-button\n (click)=\"areRequiredPropertiesFilled()\"\n text=\"CHECK\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n (click)=\"taskFormView = false\"\n text=\"Close task form\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"sendTaskForm()\"\n [disable]=\"!areRequiredPropertiesFilled()\"\n text=\"Save\"\n ></verbena-button>\n </div>\n </div>\n\n <!-- Empty state template -->\n <ng-template #emptyState>\n <p class=\"mt-4 p-4 text-gray-600 text-center\">\n No entries available for the selected form group.\n </p>\n </ng-template>\n} @else {\n <form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n (ngSubmit)=\"handleSubmit()\"\n >\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n formControlName=\"Name\"\n placeHolder=\"Enter Name\"\n />\n <verbena-input\n name=\"Description\"\n label=\"Description\"\n formControlName=\"Description\"\n placeHolder=\"Enter Description\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"workflow\">Workflow</label>\n\n <verben-drop-down\n label=\"Workflow\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n filterBy=\"Name\"\n placeholder=\"Select\"\n [options]=\"workflows\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n id=\"workflow\"\n formControlName=\"WorkflowCode\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"status\">Status</label>\n\n <verben-drop-down\n label=\"Status\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [showClear]=\"true\"\n placeholder=\"Null\"\n [(options)]=\"statuses\"\n id=\"status\"\n formControlName=\"Status\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between gap-4 my-2\">\n <div class=\"flex gap-3\">\n <div *ngIf=\"currentData && getRoute(currentData.data) as workflowRoute\">\n <ng-container\n *ngIf=\"\n currentData && workflowRoute && workflowRoute.trim().length > 0\n \"\n >\n <verbena-button\n *ngIf=\"currentData.data.DataState !== 'New'\"\n class=\"verben-switch-button\"\n (click)=\"viewSource(currentData.data, workflowRoute)\"\n text=\"View Source Data\"\n ></verbena-button>\n </ng-container>\n </div>\n <verbena-button\n *ngIf=\"currentData && currentData.data.DataState !== 'New'\"\n class=\"verben-switch-button\"\n (click)=\"followTask(currentData.data.TaskData)\"\n text=\"Follow Task\"\n ></verbena-button>\n </div>\n\n <!-- <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-text-muted)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button> -->\n <!-- <verbena-button\n [disable]=\"!taskForm || loadingTaskForm\"\n (click)=\"taskFormView = true\"\n [text]=\"loadingTaskForm ? 'Checking for form' : 'Fill task form'\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button> -->\n <verbena-button\n *ngIf=\"!readOnly\"\n type=\"submit\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button>\n </div>\n </form>\n}\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5$1.VerbenaInputComponent, selector: "verbena-input", inputs: ["disabled", "label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "fontSize", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "passLength", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i5$1.VerbenaButtonComponent, selector: "verbena-button", inputs: ["type", "text", "styleType", "size", "block", "disable", "disabled", "isLoading", "spinnerSize", "spinnerColor", "svg", "svgPosition", "svgWidth", "svgHeight", "svgSize", "svgColor", "icon", "useIcon", "iconPosition", "iconColor", "variant", "weight", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "buttonClass", "buttonTextClass"] }, { kind: "component", type: i5$1.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "overlayWidth", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "refPageSize", "disabled", "required", "autoScrollToCurrentItem", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i8.FormControlComponent, selector: "form-control", inputs: ["dataType", "value", "boolInputType", "formProperties", "disabled"] }, { kind: "component", type: i9.FormTimerComponent, selector: "app-form-timer", inputs: ["expiryDate"] }] });
|
|
981
1003
|
}
|
|
982
1004
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksFormComponent, decorators: [{
|
|
983
1005
|
type: Component,
|
|
984
|
-
args: [{ selector: 'tasks-form', template: "@if (taskFormView && taskForm) {\n <div\n *ngIf=\"taskForm.Entities[active]\"\n class=\"flex flex-wrap bg-[#9A9FBF80] rounded-xl px-3 py-2 w-full relative gap-6\"\n >\n <app-form-timer></app-form-timer>\n <div *ngFor=\"let group of taskForm.Entities; let index = index\">\n <p\n (click)=\"active = index\"\n [ngClass]=\"{\n 'bg-[var(--vbn-color-surface)] text-primary rounded-lg shadow-lg':\n active === index,\n }\"\n class=\"px-6 py-2 cursor-pointer\"\n >\n {{ group.Name }}group\n </p>\n </div>\n </div>\n\n <div *ngIf=\"taskForm.Entities[active]; else emptyState\" class=\"mt-4\">\n <form-control\n [dataType]=\"dataType\"\n [formProperties]=\"taskForm.Entities[active].Properties\"\n ></form-control>\n\n <div class=\"flex gap-3 justify-end\">\n <verbena-button\n (click)=\"areRequiredPropertiesFilled()\"\n text=\"CHECK\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n (click)=\"taskFormView = false\"\n text=\"Close task form\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"sendTaskForm()\"\n [disable]=\"!areRequiredPropertiesFilled()\"\n text=\"Save\"\n ></verbena-button>\n </div>\n </div>\n\n <!-- Empty state template -->\n <ng-template #emptyState>\n <p class=\"mt-4 p-4 text-gray-600 text-center\">\n No entries available for the selected form group.\n </p>\n </ng-template>\n} @else {\n <form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n (ngSubmit)=\"handleSubmit()\"\n >\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n formControlName=\"Name\"\n placeHolder=\"Enter Name\"\n />\n <verbena-input\n name=\"Description\"\n label=\"Description\"\n formControlName=\"Description\"\n placeHolder=\"Enter Description\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"workflow\">Workflow</label>\n\n <verben-drop-down\n label=\"Workflow\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select\"\n [options]=\"workflows\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n id=\"workflow\"\n formControlName=\"WorkflowCode\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"status\">Status</label>\n\n <verben-drop-down\n label=\"Status\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [showClear]=\"true\"\n placeholder=\"Null\"\n [(options)]=\"statuses\"\n id=\"status\"\n formControlName=\"Status\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between gap-4 my-2\">\n <div class=\"flex gap-3\">\n <div *ngIf=\"currentData && getRoute(currentData.data) as workflowRoute\">\n <ng-container\n *ngIf=\"\n currentData && workflowRoute && workflowRoute.trim().length > 0\n \"\n >\n <verbena-button\n *ngIf=\"currentData.data.DataState !== 'New'\"\n class=\"verben-switch-button\"\n (click)=\"viewSource(currentData.data, workflowRoute)\"\n text=\"View Source Data\"\n ></verbena-button>\n </ng-container>\n </div>\n <verbena-button\n *ngIf=\"currentData && currentData.data.DataState !== 'New'\"\n class=\"verben-switch-button\"\n (click)=\"followTask(currentData.data.TaskData)\"\n text=\"Follow Task\"\n ></verbena-button>\n </div>\n\n <!-- <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-text-muted)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button> -->\n <!-- <verbena-button\n [disable]=\"!taskForm || loadingTaskForm\"\n (click)=\"taskFormView = true\"\n [text]=\"loadingTaskForm ? 'Checking for form' : 'Fill task form'\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button> -->\n <verbena-button\n *ngIf=\"!readOnly\"\n type=\"submit\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button>\n </div>\n </form>\n}\n" }]
|
|
1006
|
+
args: [{ selector: 'tasks-form', template: "@if (taskFormView && taskForm) {\n <div\n *ngIf=\"taskForm.Entities[active]\"\n class=\"flex flex-wrap bg-[#9A9FBF80] rounded-xl px-3 py-2 w-full relative gap-6\"\n >\n <app-form-timer></app-form-timer>\n <div *ngFor=\"let group of taskForm.Entities; let index = index\">\n <p\n (click)=\"active = index\"\n [ngClass]=\"{\n 'bg-[var(--vbn-color-surface)] text-primary rounded-lg shadow-lg':\n active === index,\n }\"\n class=\"px-6 py-2 cursor-pointer\"\n >\n {{ group.Name }}group\n </p>\n </div>\n </div>\n\n <div *ngIf=\"taskForm.Entities[active]; else emptyState\" class=\"mt-4\">\n <form-control\n [dataType]=\"dataType\"\n [formProperties]=\"taskForm.Entities[active].Properties\"\n ></form-control>\n\n <div class=\"flex gap-3 justify-end\">\n <verbena-button\n (click)=\"areRequiredPropertiesFilled()\"\n text=\"CHECK\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n (click)=\"taskFormView = false\"\n text=\"Close task form\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"sendTaskForm()\"\n [disable]=\"!areRequiredPropertiesFilled()\"\n text=\"Save\"\n ></verbena-button>\n </div>\n </div>\n\n <!-- Empty state template -->\n <ng-template #emptyState>\n <p class=\"mt-4 p-4 text-gray-600 text-center\">\n No entries available for the selected form group.\n </p>\n </ng-template>\n} @else {\n <form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n (ngSubmit)=\"handleSubmit()\"\n >\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n formControlName=\"Name\"\n placeHolder=\"Enter Name\"\n />\n <verbena-input\n name=\"Description\"\n label=\"Description\"\n formControlName=\"Description\"\n placeHolder=\"Enter Description\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"workflow\">Workflow</label>\n\n <verben-drop-down\n label=\"Workflow\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n filterBy=\"Name\"\n placeholder=\"Select\"\n [options]=\"workflows\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n id=\"workflow\"\n formControlName=\"WorkflowCode\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"status\">Status</label>\n\n <verben-drop-down\n label=\"Status\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [showClear]=\"true\"\n placeholder=\"Null\"\n [(options)]=\"statuses\"\n id=\"status\"\n formControlName=\"Status\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between gap-4 my-2\">\n <div class=\"flex gap-3\">\n <div *ngIf=\"currentData && getRoute(currentData.data) as workflowRoute\">\n <ng-container\n *ngIf=\"\n currentData && workflowRoute && workflowRoute.trim().length > 0\n \"\n >\n <verbena-button\n *ngIf=\"currentData.data.DataState !== 'New'\"\n class=\"verben-switch-button\"\n (click)=\"viewSource(currentData.data, workflowRoute)\"\n text=\"View Source Data\"\n ></verbena-button>\n </ng-container>\n </div>\n <verbena-button\n *ngIf=\"currentData && currentData.data.DataState !== 'New'\"\n class=\"verben-switch-button\"\n (click)=\"followTask(currentData.data.TaskData)\"\n text=\"Follow Task\"\n ></verbena-button>\n </div>\n\n <!-- <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-text-muted)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button> -->\n <!-- <verbena-button\n [disable]=\"!taskForm || loadingTaskForm\"\n (click)=\"taskFormView = true\"\n [text]=\"loadingTaskForm ? 'Checking for form' : 'Fill task form'\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button> -->\n <verbena-button\n *ngIf=\"!readOnly\"\n type=\"submit\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button>\n </div>\n </form>\n}\n" }]
|
|
985
1007
|
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.TaskFacade }, { type: i3.EnvironmentService }, { type: i3.UtilService }, { type: MyQueueState }, { type: i5.OperationPopupService }], propDecorators: { currentData: [{
|
|
986
1008
|
type: Input
|
|
987
1009
|
}], readOnly: [{
|