verben-workflow-ui 0.5.65 → 0.5.67

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.
@@ -142,11 +142,11 @@ class FormControlComponent {
142
142
  return this.selectedFilesMap.get(property);
143
143
  }
144
144
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormControlComponent, deps: [{ token: i1.HttpWebRequestService }, { token: i1.UtilService }, { token: i0.ChangeDetectorRef }, { token: i1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component });
145
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormControlComponent, selector: "form-control", inputs: { dataType: "dataType", value: "value", boolInputType: "boolInputType", formProperties: "formProperties", disabled: "disabled" }, ngImport: i0, template: "<div class=\"flex flex-col gap-6 w-full\">\n <div *ngFor=\"let property of formProperties\">\n <ng-container [ngSwitch]=\"property.DataType\">\n <!-- Text, URL, and Color -->\n <verbena-input\n *ngSwitchCase=\"'Text'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'MailAddress'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'email'\"\n [placeHolder]=\"'Enter email'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'URL'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'url'\"\n [placeHolder]=\"'https://example.com'\"\n ></verbena-input>\n <div *ngSwitchCase=\"'Colour'\">\n <label [htmlFor]=\"property.id\">\n {{ formatLabel(property) }}\n <span class=\"flex items-center gap-1\">\n <input\n [id]=\"property.id\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n class=\"block mt-2 w-[100px]\"\n [type]=\"'color'\"\n />\n <span\n *ngIf=\"property.Value !== ''\"\n class=\"font-semibold\"\n [style.color]=\"property.Value\"\n >:{{ property.Value }}</span\n >\n </span>\n </label>\n </div>\n <verbena-textarea\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'MultilineText'\"\n [label]=\"formatLabel(property)\"\n ></verbena-textarea>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'PhoneNumber'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n\n <!-- Numeric inputs -->\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Number'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'number'\"\n [placeHolder]=\"'Enter an integer'\"\n [max]=\"property.MaxValue\"\n [min]=\"property.MinValue\"\n ></verbena-input>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Decimal'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter decimal value'\"\n ></verbena-input>\n\n <!-- Boolean input -->\n <ng-container *ngSwitchCase=\"'YesNo'\">\n <label [htmlFor]=\"property.id\" class=\"block mb-2\">{{\n formatLabel(property)\n }}</label>\n <verbena-switch\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [onText]=\"''\"\n [offText]=\"''\"\n [onColor]=\"'#1A237E'\"\n [label]=\"formatLabel(property)\"\n ></verbena-switch>\n </ng-container>\n\n <div *ngSwitchCase=\"'Video'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'video/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <video\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-full h-[100px] mt-3 rounded-md shadow\"\n ></video>\n </div>\n <div *ngSwitchCase=\"'Image'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'image/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <img\n class=\"w-[100px] mx-auto\"\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n />\n </div>\n <div *ngSwitchCase=\"'Audio'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'audio/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <audio\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"mt-3 w-full\"\n ></audio>\n </div>\n\n <div *ngSwitchCase=\"'SingleSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [placeholder]=\"property.Name\"\n [filter]=\"true\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'MultiSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [multiselect]=\"true\"\n [placeholder]=\"property.Name\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'SingleFileSelection'\">\n <file-upload\n [multiple]=\"false\"\n [selectedFiles]=\"getFiles(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [label]=\"formatLabel(property)\"\n ></file-upload>\n <ng-container [ngSwitch]=\"getFileExtension(property.Value)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n <div *ngSwitchCase=\"'MultiFileSelection'\">\n <file-upload\n [disabled]=\"disabled || property.IsReadOnly\"\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [multiple]=\"true\"\n [label]=\"formatLabel(property)\"\n >\n </file-upload>\n\n <div *ngIf=\"property.Value !== ''\" class=\"flex flex-wrap gap-3 mt-3\">\n <div *ngFor=\"let file of getFileArray(property.Value)\">\n <ng-container [ngSwitch]=\"getFileExtension(file)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(file)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(file)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n </div>\n </div>\n\n <!-- Fallback for unsupported types -->\n <div *ngSwitchDefault>Unsupported data type: {{ property.DataType }}</div>\n </ng-container>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i4.VerbenaSwitchComponent, selector: "verbena-switch", inputs: ["label", "checked", "disabled", "offColor", "onColor", "onText", "offText", "width", "height", "customStyles"], outputs: ["change"] }, { kind: "component", type: i4.VerbenaInputComponent, selector: "verbena-input", inputs: ["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.FileUploadComponent, selector: "file-upload", inputs: ["multiple", "label", "accept", "selectedFiles", "disabled"], outputs: ["selectedFilesChange"] }, { kind: "component", type: i4.VerbenaTextareaComponent, selector: "verbena-textarea", inputs: ["label", "required", "rows", "cols", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "value", "errorMessageColor"], outputs: ["valueChange"] }] });
145
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormControlComponent, selector: "form-control", inputs: { dataType: "dataType", value: "value", boolInputType: "boolInputType", formProperties: "formProperties", disabled: "disabled" }, ngImport: i0, template: "<div class=\"flex flex-col gap-6 w-full\">\n <div *ngFor=\"let property of formProperties\">\n <ng-container [ngSwitch]=\"property.DataType\">\n <!-- Text, URL, and Color -->\n <verbena-input\n *ngSwitchCase=\"'Text'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'MailAddress'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'email'\"\n [placeHolder]=\"'Enter email'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'URL'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'url'\"\n [placeHolder]=\"'https://example.com'\"\n ></verbena-input>\n <div *ngSwitchCase=\"'Colour'\">\n <label [htmlFor]=\"property.id\">\n {{ formatLabel(property) }}\n <span class=\"flex items-center gap-1\">\n <input\n [id]=\"property.id\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n class=\"block mt-2 w-[100px]\"\n [type]=\"'color'\"\n />\n <span\n *ngIf=\"property.Value !== ''\"\n class=\"font-semibold\"\n [style.color]=\"property.Value\"\n >:{{ property.Value }}</span\n >\n </span>\n </label>\n </div>\n <verbena-textarea\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'MultilineText'\"\n [label]=\"formatLabel(property)\"\n ></verbena-textarea>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'PhoneNumber'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n\n <!-- Numeric inputs -->\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Number'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'number'\"\n [placeHolder]=\"'Enter an integer'\"\n [max]=\"property.MaxValue\"\n [min]=\"property.MinValue\"\n ></verbena-input>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Decimal'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter decimal value'\"\n ></verbena-input>\n\n <!-- Boolean input -->\n <ng-container *ngSwitchCase=\"'YesNo'\">\n <label [htmlFor]=\"property.id\" class=\"block mb-2\">{{\n formatLabel(property)\n }}</label>\n <verbena-switch\n [disabled]=\"disabled || property.IsReadOnly\"\n [ngModel]=\"property.Value == 'true' || property.Value == 'True'\"\n (ngModelChange)=\"property.Value = $event.toString()\"\n [onText]=\"''\"\n [offText]=\"''\"\n [onColor]=\"'#1A237E'\"\n [label]=\"formatLabel(property)\"\n ></verbena-switch>\n </ng-container>\n\n <div *ngSwitchCase=\"'Video'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'video/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <video\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-full h-[100px] mt-3 rounded-md shadow\"\n ></video>\n </div>\n <div *ngSwitchCase=\"'Image'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'image/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <img\n class=\"w-[100px] mx-auto\"\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n />\n </div>\n <div *ngSwitchCase=\"'Audio'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'audio/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <audio\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"mt-3 w-full\"\n ></audio>\n </div>\n\n <div *ngSwitchCase=\"'SingleSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [placeholder]=\"property.Name\"\n [filter]=\"true\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'MultiSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [multiselect]=\"true\"\n [placeholder]=\"property.Name\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'SingleFileSelection'\">\n <file-upload\n [multiple]=\"false\"\n [selectedFiles]=\"getFiles(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [label]=\"formatLabel(property)\"\n ></file-upload>\n <ng-container [ngSwitch]=\"getFileExtension(property.Value)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n <div *ngSwitchCase=\"'MultiFileSelection'\">\n <file-upload\n [disabled]=\"disabled || property.IsReadOnly\"\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [multiple]=\"true\"\n [label]=\"formatLabel(property)\"\n >\n </file-upload>\n\n <div *ngIf=\"property.Value !== ''\" class=\"flex flex-wrap gap-3 mt-3\">\n <div *ngFor=\"let file of getFileArray(property.Value)\">\n <ng-container [ngSwitch]=\"getFileExtension(file)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(file)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(file)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n </div>\n </div>\n\n <!-- Fallback for unsupported types -->\n <div *ngSwitchDefault>Unsupported data type: {{ property.DataType }}</div>\n </ng-container>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i4.VerbenaSwitchComponent, selector: "verbena-switch", inputs: ["label", "checked", "disabled", "offColor", "onColor", "onText", "offText", "width", "height", "customStyles"], outputs: ["change"] }, { kind: "component", type: i4.VerbenaInputComponent, selector: "verbena-input", inputs: ["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.FileUploadComponent, selector: "file-upload", inputs: ["multiple", "label", "accept", "selectedFiles", "disabled"], outputs: ["selectedFilesChange"] }, { kind: "component", type: i4.VerbenaTextareaComponent, selector: "verbena-textarea", inputs: ["label", "required", "rows", "cols", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "value", "errorMessageColor"], outputs: ["valueChange"] }] });
146
146
  }
147
147
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormControlComponent, decorators: [{
148
148
  type: Component,
149
- args: [{ selector: 'form-control', template: "<div class=\"flex flex-col gap-6 w-full\">\n <div *ngFor=\"let property of formProperties\">\n <ng-container [ngSwitch]=\"property.DataType\">\n <!-- Text, URL, and Color -->\n <verbena-input\n *ngSwitchCase=\"'Text'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'MailAddress'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'email'\"\n [placeHolder]=\"'Enter email'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'URL'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'url'\"\n [placeHolder]=\"'https://example.com'\"\n ></verbena-input>\n <div *ngSwitchCase=\"'Colour'\">\n <label [htmlFor]=\"property.id\">\n {{ formatLabel(property) }}\n <span class=\"flex items-center gap-1\">\n <input\n [id]=\"property.id\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n class=\"block mt-2 w-[100px]\"\n [type]=\"'color'\"\n />\n <span\n *ngIf=\"property.Value !== ''\"\n class=\"font-semibold\"\n [style.color]=\"property.Value\"\n >:{{ property.Value }}</span\n >\n </span>\n </label>\n </div>\n <verbena-textarea\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'MultilineText'\"\n [label]=\"formatLabel(property)\"\n ></verbena-textarea>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'PhoneNumber'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n\n <!-- Numeric inputs -->\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Number'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'number'\"\n [placeHolder]=\"'Enter an integer'\"\n [max]=\"property.MaxValue\"\n [min]=\"property.MinValue\"\n ></verbena-input>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Decimal'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter decimal value'\"\n ></verbena-input>\n\n <!-- Boolean input -->\n <ng-container *ngSwitchCase=\"'YesNo'\">\n <label [htmlFor]=\"property.id\" class=\"block mb-2\">{{\n formatLabel(property)\n }}</label>\n <verbena-switch\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [onText]=\"''\"\n [offText]=\"''\"\n [onColor]=\"'#1A237E'\"\n [label]=\"formatLabel(property)\"\n ></verbena-switch>\n </ng-container>\n\n <div *ngSwitchCase=\"'Video'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'video/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <video\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-full h-[100px] mt-3 rounded-md shadow\"\n ></video>\n </div>\n <div *ngSwitchCase=\"'Image'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'image/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <img\n class=\"w-[100px] mx-auto\"\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n />\n </div>\n <div *ngSwitchCase=\"'Audio'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'audio/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <audio\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"mt-3 w-full\"\n ></audio>\n </div>\n\n <div *ngSwitchCase=\"'SingleSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [placeholder]=\"property.Name\"\n [filter]=\"true\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'MultiSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [multiselect]=\"true\"\n [placeholder]=\"property.Name\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'SingleFileSelection'\">\n <file-upload\n [multiple]=\"false\"\n [selectedFiles]=\"getFiles(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [label]=\"formatLabel(property)\"\n ></file-upload>\n <ng-container [ngSwitch]=\"getFileExtension(property.Value)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n <div *ngSwitchCase=\"'MultiFileSelection'\">\n <file-upload\n [disabled]=\"disabled || property.IsReadOnly\"\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [multiple]=\"true\"\n [label]=\"formatLabel(property)\"\n >\n </file-upload>\n\n <div *ngIf=\"property.Value !== ''\" class=\"flex flex-wrap gap-3 mt-3\">\n <div *ngFor=\"let file of getFileArray(property.Value)\">\n <ng-container [ngSwitch]=\"getFileExtension(file)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(file)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(file)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n </div>\n </div>\n\n <!-- Fallback for unsupported types -->\n <div *ngSwitchDefault>Unsupported data type: {{ property.DataType }}</div>\n </ng-container>\n </div>\n</div>\n" }]
149
+ args: [{ selector: 'form-control', template: "<div class=\"flex flex-col gap-6 w-full\">\n <div *ngFor=\"let property of formProperties\">\n <ng-container [ngSwitch]=\"property.DataType\">\n <!-- Text, URL, and Color -->\n <verbena-input\n *ngSwitchCase=\"'Text'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'MailAddress'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'email'\"\n [placeHolder]=\"'Enter email'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'URL'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'url'\"\n [placeHolder]=\"'https://example.com'\"\n ></verbena-input>\n <div *ngSwitchCase=\"'Colour'\">\n <label [htmlFor]=\"property.id\">\n {{ formatLabel(property) }}\n <span class=\"flex items-center gap-1\">\n <input\n [id]=\"property.id\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n class=\"block mt-2 w-[100px]\"\n [type]=\"'color'\"\n />\n <span\n *ngIf=\"property.Value !== ''\"\n class=\"font-semibold\"\n [style.color]=\"property.Value\"\n >:{{ property.Value }}</span\n >\n </span>\n </label>\n </div>\n <verbena-textarea\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'MultilineText'\"\n [label]=\"formatLabel(property)\"\n ></verbena-textarea>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'PhoneNumber'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n\n <!-- Numeric inputs -->\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Number'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'number'\"\n [placeHolder]=\"'Enter an integer'\"\n [max]=\"property.MaxValue\"\n [min]=\"property.MinValue\"\n ></verbena-input>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Decimal'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter decimal value'\"\n ></verbena-input>\n\n <!-- Boolean input -->\n <ng-container *ngSwitchCase=\"'YesNo'\">\n <label [htmlFor]=\"property.id\" class=\"block mb-2\">{{\n formatLabel(property)\n }}</label>\n <verbena-switch\n [disabled]=\"disabled || property.IsReadOnly\"\n [ngModel]=\"property.Value == 'true' || property.Value == 'True'\"\n (ngModelChange)=\"property.Value = $event.toString()\"\n [onText]=\"''\"\n [offText]=\"''\"\n [onColor]=\"'#1A237E'\"\n [label]=\"formatLabel(property)\"\n ></verbena-switch>\n </ng-container>\n\n <div *ngSwitchCase=\"'Video'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'video/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <video\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-full h-[100px] mt-3 rounded-md shadow\"\n ></video>\n </div>\n <div *ngSwitchCase=\"'Image'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'image/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <img\n class=\"w-[100px] mx-auto\"\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n />\n </div>\n <div *ngSwitchCase=\"'Audio'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'audio/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <audio\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"mt-3 w-full\"\n ></audio>\n </div>\n\n <div *ngSwitchCase=\"'SingleSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [placeholder]=\"property.Name\"\n [filter]=\"true\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'MultiSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [multiselect]=\"true\"\n [placeholder]=\"property.Name\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'SingleFileSelection'\">\n <file-upload\n [multiple]=\"false\"\n [selectedFiles]=\"getFiles(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [label]=\"formatLabel(property)\"\n ></file-upload>\n <ng-container [ngSwitch]=\"getFileExtension(property.Value)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n <div *ngSwitchCase=\"'MultiFileSelection'\">\n <file-upload\n [disabled]=\"disabled || property.IsReadOnly\"\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [multiple]=\"true\"\n [label]=\"formatLabel(property)\"\n >\n </file-upload>\n\n <div *ngIf=\"property.Value !== ''\" class=\"flex flex-wrap gap-3 mt-3\">\n <div *ngFor=\"let file of getFileArray(property.Value)\">\n <ng-container [ngSwitch]=\"getFileExtension(file)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(file)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(file)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n </div>\n </div>\n\n <!-- Fallback for unsupported types -->\n <div *ngSwitchDefault>Unsupported data type: {{ property.DataType }}</div>\n </ng-container>\n </div>\n</div>\n" }]
150
150
  }], ctorParameters: () => [{ type: i1.HttpWebRequestService }, { type: i1.UtilService }, { type: i0.ChangeDetectorRef }, { type: i1.EnvironmentService }], propDecorators: { dataType: [{
151
151
  type: Input
152
152
  }], value: [{
@@ -1 +1 @@
1
- {"version":3,"file":"verben-workflow-ui-src-lib-components-form-control.mjs","sources":["../../../projects/verben-workflow-ui/src/lib/components/form-control/form-control.component.ts","../../../projects/verben-workflow-ui/src/lib/components/form-control/form-control.component.html","../../../projects/verben-workflow-ui/src/lib/components/form-control/form-control.module.ts","../../../projects/verben-workflow-ui/src/lib/components/form-control/verben-workflow-ui-src-lib-components-form-control.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport {\n ErrorResponse,\n FormProperty,\n ObjectState,\n} from 'verben-workflow-ui/src/lib/models';\nimport { DataType, File as FileData } from 'verben-workflow-ui/src/lib/models';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport {\n HttpWebRequestService,\n UtilService,\n} from 'verben-workflow-ui/src/lib/services';\nimport { EnvironmentService } from 'verben-workflow-ui/src/lib/services';\nimport { ChangeDetectorRef } from '@angular/core';\nexport type BoolInputType = 'switch' | 'checkbox' | 'radio';\n\n@Component({\n selector: 'form-control',\n templateUrl: './form-control.component.html',\n styleUrls: ['./form-control.component.css'],\n})\nexport class FormControlComponent implements OnInit {\n @Input() dataType!: DataType;\n @Input() value: any = '';\n @Input() boolInputType: BoolInputType = 'checkbox';\n @Input() formProperties: FormProperty[] = [];\n @Input() disabled: boolean = false;\n\n fileBaseUrl: string = '';\n fileUrl: string = '';\n constructor(\n private server: HttpWebRequestService,\n private utilService: UtilService,\n private cdr: ChangeDetectorRef,\n private envSvc: EnvironmentService,\n ) {\n this.fileBaseUrl = this.envSvc.environment.FILE_BASE_URL;\n this.fileUrl = this.envSvc.environment.FILE_URL;\n }\n\n ngOnInit(): void {\n this.initializeDefaultValue();\n }\n\n initializeDefaultValue() {\n if (this.dataType === DataType.YesNo && this.value === '') {\n this.value = false;\n } else if (!this.value) {\n this.value = '';\n }\n }\n onFileSelect(data: any, property: FormProperty): void {\n const files: any = data;\n\n if (!files || files.length === 0) return;\n\n const fileArray: FileData[] = [];\n const readers: Promise<void>[] = [];\n\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const reader = new FileReader();\n\n const promise = new Promise<void>((resolve, reject) => {\n reader.onload = () => {\n const base64 = reader.result as string;\n fileArray.push({\n Extension: file.name.split('.').pop(),\n Name: this.generateRandomCode(),\n Data: base64,\n DataState: ObjectState.New,\n });\n resolve();\n };\n\n reader.onerror = (error) => reject(error);\n reader.readAsDataURL(file);\n });\n\n readers.push(promise);\n }\n\n Promise.all(readers).then(() => {\n console.log('Files ready to upload:', fileArray);\n this.uploadFile(fileArray, property);\n });\n }\n private generateRandomCode(length: number = 10): string {\n const chars =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return result;\n }\n setPreview(val: string): string {\n if (!val) return '';\n const first = val.split(',')[0].trim();\n\n if (first.startsWith('http') || first.startsWith('data:')) {\n return first;\n }\n return `${this.envSvc.environment.FILE_URL}/${first}`;\n }\n\n getFileArray(value: string): string[] {\n if (!value) return [];\n return value\n .split(',')\n .map((v) => v.trim())\n .filter((v) => v);\n }\n\n getFileExtension(fileUrl: string): string {\n const parts = fileUrl.split('.');\n return parts[parts.length - 1].toLowerCase();\n }\n\n async uploadFile(\n files: FileData[],\n property: FormProperty,\n ): Promise<any[] | undefined> {\n this.utilService.sendBI(true);\n const res = await this.server.post(\n `SaveFiles`,\n files,\n this.envSvc.environment.FILE_BASE_URL,\n );\n this.utilService.sendBI(false);\n if (res instanceof ErrorResponse) {\n return undefined;\n } else {\n var result = res as any;\n const joinedResult = result.join(',');\n property.Value = joinedResult;\n\n this.cdr.detectChanges();\n return result;\n }\n }\n formatLabel(property: any): string {\n return property.IsRequired\n ? `${property.Name} *`\n : `${property.Name} (Optional)`;\n }\n optionsArray(property: any) {\n property.Options?.split(',').map((option: any) => option.trim());\n return property.Options?.split(',').map((option: any) => option.trim());\n }\n onSelectedFileChange(files: File[]) {\n console.log(files);\n }\n\n getSelectedFilesIfAny(property: FormProperty): File[] {\n var fileMock: any = {\n name: property.Value,\n };\n\n return property.Value.trim().length > 0 ? [fileMock] : [];\n }\n\n selectedFilesMap = new Map<any, File[]>();\n\n getFiles(property: any): File[] {\n if (!this.selectedFilesMap.has(property)) {\n this.selectedFilesMap.set(property, this.getSelectedFilesIfAny(property));\n }\n return this.selectedFilesMap.get(property)!;\n }\n}\n","<div class=\"flex flex-col gap-6 w-full\">\n <div *ngFor=\"let property of formProperties\">\n <ng-container [ngSwitch]=\"property.DataType\">\n <!-- Text, URL, and Color -->\n <verbena-input\n *ngSwitchCase=\"'Text'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'MailAddress'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'email'\"\n [placeHolder]=\"'Enter email'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'URL'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'url'\"\n [placeHolder]=\"'https://example.com'\"\n ></verbena-input>\n <div *ngSwitchCase=\"'Colour'\">\n <label [htmlFor]=\"property.id\">\n {{ formatLabel(property) }}\n <span class=\"flex items-center gap-1\">\n <input\n [id]=\"property.id\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n class=\"block mt-2 w-[100px]\"\n [type]=\"'color'\"\n />\n <span\n *ngIf=\"property.Value !== ''\"\n class=\"font-semibold\"\n [style.color]=\"property.Value\"\n >:{{ property.Value }}</span\n >\n </span>\n </label>\n </div>\n <verbena-textarea\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'MultilineText'\"\n [label]=\"formatLabel(property)\"\n ></verbena-textarea>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'PhoneNumber'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n\n <!-- Numeric inputs -->\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Number'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'number'\"\n [placeHolder]=\"'Enter an integer'\"\n [max]=\"property.MaxValue\"\n [min]=\"property.MinValue\"\n ></verbena-input>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Decimal'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter decimal value'\"\n ></verbena-input>\n\n <!-- Boolean input -->\n <ng-container *ngSwitchCase=\"'YesNo'\">\n <label [htmlFor]=\"property.id\" class=\"block mb-2\">{{\n formatLabel(property)\n }}</label>\n <verbena-switch\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [onText]=\"''\"\n [offText]=\"''\"\n [onColor]=\"'#1A237E'\"\n [label]=\"formatLabel(property)\"\n ></verbena-switch>\n </ng-container>\n\n <div *ngSwitchCase=\"'Video'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'video/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <video\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-full h-[100px] mt-3 rounded-md shadow\"\n ></video>\n </div>\n <div *ngSwitchCase=\"'Image'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'image/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <img\n class=\"w-[100px] mx-auto\"\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n />\n </div>\n <div *ngSwitchCase=\"'Audio'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'audio/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <audio\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"mt-3 w-full\"\n ></audio>\n </div>\n\n <div *ngSwitchCase=\"'SingleSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [placeholder]=\"property.Name\"\n [filter]=\"true\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'MultiSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [multiselect]=\"true\"\n [placeholder]=\"property.Name\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'SingleFileSelection'\">\n <file-upload\n [multiple]=\"false\"\n [selectedFiles]=\"getFiles(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [label]=\"formatLabel(property)\"\n ></file-upload>\n <ng-container [ngSwitch]=\"getFileExtension(property.Value)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n <div *ngSwitchCase=\"'MultiFileSelection'\">\n <file-upload\n [disabled]=\"disabled || property.IsReadOnly\"\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [multiple]=\"true\"\n [label]=\"formatLabel(property)\"\n >\n </file-upload>\n\n <div *ngIf=\"property.Value !== ''\" class=\"flex flex-wrap gap-3 mt-3\">\n <div *ngFor=\"let file of getFileArray(property.Value)\">\n <ng-container [ngSwitch]=\"getFileExtension(file)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(file)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(file)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n </div>\n </div>\n\n <!-- Fallback for unsupported types -->\n <div *ngSwitchDefault>Unsupported data type: {{ property.DataType }}</div>\n </ng-container>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport {\n CardDataViewModule,\n DataExportModule,\n DataTableModule,\n DataViewModule,\n DropDownModule,\n SortTableModule,\n SvgModule,\n TableFilterModule,\n VerbenaButtonModule,\n VerbenaInputModule,\n VerbenaSwitchModule,\n VerbenaTextareaModule,\n VerbenPopUpModule,\n VisibleColumnModule,\n} from 'verben-ng-ui';\nimport { FormControlComponent } from './form-control.component';\nimport { FileUploadModule } from 'verben-workflow-ui/src/lib/components/file-upload';\n@NgModule({\n declarations: [FormControlComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n DataTableModule,\n SvgModule,\n VerbenPopUpModule,\n DataViewModule,\n VerbenaButtonModule,\n CardDataViewModule,\n DropDownModule,\n VerbenaSwitchModule,\n TableFilterModule,\n VisibleColumnModule,\n SortTableModule,\n DataExportModule,\n VerbenaInputModule,\n FileUploadModule,\n VerbenaTextareaModule,\n ],\n exports: [FormControlComponent],\n})\nexport class FormControlerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAqBa,oBAAoB,CAAA;AAUrB,IAAA,MAAA,CAAA;AACA,IAAA,WAAA,CAAA;AACA,IAAA,GAAA,CAAA;AACA,IAAA,MAAA,CAAA;AAZD,IAAA,QAAQ,CAAY;IACpB,KAAK,GAAQ,EAAE,CAAC;IAChB,aAAa,GAAkB,UAAU,CAAC;IAC1C,cAAc,GAAmB,EAAE,CAAC;IACpC,QAAQ,GAAY,KAAK,CAAC;IAEnC,WAAW,GAAW,EAAE,CAAC;IACzB,OAAO,GAAW,EAAE,CAAC;AACrB,IAAA,WAAA,CACU,MAA6B,EAC7B,WAAwB,EACxB,GAAsB,EACtB,MAA0B,EAAA;QAH1B,IAAM,CAAA,MAAA,GAAN,MAAM,CAAuB;QAC7B,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QACxB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QACtB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAoB;QAElC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC;QACzD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC;KACjD;IAED,QAAQ,GAAA;QACN,IAAI,CAAC,sBAAsB,EAAE,CAAC;KAC/B;IAED,sBAAsB,GAAA;AACpB,QAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,KAAK,IAAI,IAAI,CAAC,KA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AAc;wBACd,mBAAmB;wBACnB,iBAAiB;wBACjB,mBAAmB;wBACnB,eAAe;wBACf,gBAAgB;wBAChB,kBAAkB;wBAClB,gBAAgB;wBAChB,qBAAqB;AACtB,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA,CAAA;;;AC7CD;;AAEG;;;;"}
1
+ {"version":3,"file":"verben-workflow-ui-src-lib-components-form-control.mjs","sources":["../../../projects/verben-workflow-ui/src/lib/components/form-control/form-control.component.ts","../../../projects/verben-workflow-ui/src/lib/components/form-control/form-control.component.html","../../../projects/verben-workflow-ui/src/lib/components/form-control/form-control.module.ts","../../../projects/verben-workflow-ui/src/lib/components/form-control/verben-workflow-ui-src-lib-components-form-control.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport {\n ErrorResponse,\n FormProperty,\n ObjectState,\n} from 'verben-workflow-ui/src/lib/models';\nimport { DataType, File as FileData } from 'verben-workflow-ui/src/lib/models';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport {\n HttpWebRequestService,\n UtilService,\n} from 'verben-workflow-ui/src/lib/services';\nimport { EnvironmentService } from 'verben-workflow-ui/src/lib/services';\nimport { ChangeDetectorRef } from '@angular/core';\nexport type BoolInputType = 'switch' | 'checkbox' | 'radio';\n\n@Component({\n selector: 'form-control',\n templateUrl: './form-control.component.html',\n styleUrls: ['./form-control.component.css'],\n})\nexport class FormControlComponent implements OnInit {\n @Input() dataType!: DataType;\n @Input() value: any = '';\n @Input() boolInputType: BoolInputType = 'checkbox';\n @Input() formProperties: FormProperty[] = [];\n @Input() disabled: boolean = false;\n\n fileBaseUrl: string = '';\n fileUrl: string = '';\n constructor(\n private server: HttpWebRequestService,\n private utilService: UtilService,\n private cdr: ChangeDetectorRef,\n private envSvc: EnvironmentService,\n ) {\n this.fileBaseUrl = this.envSvc.environment.FILE_BASE_URL;\n this.fileUrl = this.envSvc.environment.FILE_URL;\n }\n\n ngOnInit(): void {\n this.initializeDefaultValue();\n }\n\n initializeDefaultValue() {\n if (this.dataType === DataType.YesNo && this.value === '') {\n this.value = false;\n } else if (!this.value) {\n this.value = '';\n }\n }\n onFileSelect(data: any, property: FormProperty): void {\n const files: any = data;\n\n if (!files || files.length === 0) return;\n\n const fileArray: FileData[] = [];\n const readers: Promise<void>[] = [];\n\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const reader = new FileReader();\n\n const promise = new Promise<void>((resolve, reject) => {\n reader.onload = () => {\n const base64 = reader.result as string;\n fileArray.push({\n Extension: file.name.split('.').pop(),\n Name: this.generateRandomCode(),\n Data: base64,\n DataState: ObjectState.New,\n });\n resolve();\n };\n\n reader.onerror = (error) => reject(error);\n reader.readAsDataURL(file);\n });\n\n readers.push(promise);\n }\n\n Promise.all(readers).then(() => {\n console.log('Files ready to upload:', fileArray);\n this.uploadFile(fileArray, property);\n });\n }\n private generateRandomCode(length: number = 10): string {\n const chars =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return result;\n }\n setPreview(val: string): string {\n if (!val) return '';\n const first = val.split(',')[0].trim();\n\n if (first.startsWith('http') || first.startsWith('data:')) {\n return first;\n }\n return `${this.envSvc.environment.FILE_URL}/${first}`;\n }\n\n getFileArray(value: string): string[] {\n if (!value) return [];\n return value\n .split(',')\n .map((v) => v.trim())\n .filter((v) => v);\n }\n\n getFileExtension(fileUrl: string): string {\n const parts = fileUrl.split('.');\n return parts[parts.length - 1].toLowerCase();\n }\n\n async uploadFile(\n files: FileData[],\n property: FormProperty,\n ): Promise<any[] | undefined> {\n this.utilService.sendBI(true);\n const res = await this.server.post(\n `SaveFiles`,\n files,\n this.envSvc.environment.FILE_BASE_URL,\n );\n this.utilService.sendBI(false);\n if (res instanceof ErrorResponse) {\n return undefined;\n } else {\n var result = res as any;\n const joinedResult = result.join(',');\n property.Value = joinedResult;\n\n this.cdr.detectChanges();\n return result;\n }\n }\n formatLabel(property: any): string {\n return property.IsRequired\n ? `${property.Name} *`\n : `${property.Name} (Optional)`;\n }\n optionsArray(property: any) {\n property.Options?.split(',').map((option: any) => option.trim());\n return property.Options?.split(',').map((option: any) => option.trim());\n }\n onSelectedFileChange(files: File[]) {\n console.log(files);\n }\n\n getSelectedFilesIfAny(property: FormProperty): File[] {\n var fileMock: any = {\n name: property.Value,\n };\n\n return property.Value.trim().length > 0 ? [fileMock] : [];\n }\n\n selectedFilesMap = new Map<any, File[]>();\n\n getFiles(property: any): File[] {\n if (!this.selectedFilesMap.has(property)) {\n this.selectedFilesMap.set(property, this.getSelectedFilesIfAny(property));\n }\n return this.selectedFilesMap.get(property)!;\n }\n}\n","<div class=\"flex flex-col gap-6 w-full\">\n <div *ngFor=\"let property of formProperties\">\n <ng-container [ngSwitch]=\"property.DataType\">\n <!-- Text, URL, and Color -->\n <verbena-input\n *ngSwitchCase=\"'Text'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'MailAddress'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'email'\"\n [placeHolder]=\"'Enter email'\"\n ></verbena-input>\n <verbena-input\n *ngSwitchCase=\"'URL'\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [type]=\"'url'\"\n [placeHolder]=\"'https://example.com'\"\n ></verbena-input>\n <div *ngSwitchCase=\"'Colour'\">\n <label [htmlFor]=\"property.id\">\n {{ formatLabel(property) }}\n <span class=\"flex items-center gap-1\">\n <input\n [id]=\"property.id\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n class=\"block mt-2 w-[100px]\"\n [type]=\"'color'\"\n />\n <span\n *ngIf=\"property.Value !== ''\"\n class=\"font-semibold\"\n [style.color]=\"property.Value\"\n >:{{ property.Value }}</span\n >\n </span>\n </label>\n </div>\n <verbena-textarea\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'MultilineText'\"\n [label]=\"formatLabel(property)\"\n ></verbena-textarea>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'PhoneNumber'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter text'\"\n ></verbena-input>\n\n <!-- Numeric inputs -->\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Number'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'number'\"\n [placeHolder]=\"'Enter an integer'\"\n [max]=\"property.MaxValue\"\n [min]=\"property.MinValue\"\n ></verbena-input>\n <verbena-input\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n *ngSwitchCase=\"'Decimal'\"\n [label]=\"formatLabel(property)\"\n [type]=\"'text'\"\n [placeHolder]=\"'Enter decimal value'\"\n ></verbena-input>\n\n <!-- Boolean input -->\n <ng-container *ngSwitchCase=\"'YesNo'\">\n <label [htmlFor]=\"property.id\" class=\"block mb-2\">{{\n formatLabel(property)\n }}</label>\n <verbena-switch\n [disabled]=\"disabled || property.IsReadOnly\"\n [ngModel]=\"property.Value == 'true' || property.Value == 'True'\"\n (ngModelChange)=\"property.Value = $event.toString()\"\n [onText]=\"''\"\n [offText]=\"''\"\n [onColor]=\"'#1A237E'\"\n [label]=\"formatLabel(property)\"\n ></verbena-switch>\n </ng-container>\n\n <div *ngSwitchCase=\"'Video'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'video/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <video\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-full h-[100px] mt-3 rounded-md shadow\"\n ></video>\n </div>\n <div *ngSwitchCase=\"'Image'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'image/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <img\n class=\"w-[100px] mx-auto\"\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n />\n </div>\n <div *ngSwitchCase=\"'Audio'\">\n <file-upload\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n [label]=\"formatLabel(property)\"\n [accept]=\"'audio/*'\"\n [multiple]=\"false\"\n ></file-upload>\n <audio\n *ngIf=\"property.Value !== ''\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"mt-3 w-full\"\n ></audio>\n </div>\n\n <div *ngSwitchCase=\"'SingleSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [placeholder]=\"property.Name\"\n [filter]=\"true\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'MultiSelection'\">\n <div class=\"mb-2\">{{ formatLabel(property) }}</div>\n <verben-drop-down\n width=\"100%\"\n [multiselect]=\"true\"\n [placeholder]=\"property.Name\"\n [options]=\"optionsArray(property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [(ngModel)]=\"property.Value\"\n ></verben-drop-down>\n </div>\n <div *ngSwitchCase=\"'SingleFileSelection'\">\n <file-upload\n [multiple]=\"false\"\n [selectedFiles]=\"getFiles(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [disabled]=\"disabled || property.IsReadOnly\"\n [label]=\"formatLabel(property)\"\n ></file-upload>\n <ng-container [ngSwitch]=\"getFileExtension(property.Value)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(property.Value)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(property.Value)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n <div *ngSwitchCase=\"'MultiFileSelection'\">\n <file-upload\n [disabled]=\"disabled || property.IsReadOnly\"\n [selectedFiles]=\"getSelectedFilesIfAny(property)\"\n (selectedFilesChange)=\"onFileSelect($event, property)\"\n [multiple]=\"true\"\n [label]=\"formatLabel(property)\"\n >\n </file-upload>\n\n <div *ngIf=\"property.Value !== ''\" class=\"flex flex-wrap gap-3 mt-3\">\n <div *ngFor=\"let file of getFileArray(property.Value)\">\n <ng-container [ngSwitch]=\"getFileExtension(file)\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"setPreview(file)\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"setPreview(file)\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"setPreview(file)\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n </div>\n </div>\n\n <!-- Fallback for unsupported types -->\n <div *ngSwitchDefault>Unsupported data type: {{ property.DataType }}</div>\n </ng-container>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport {\n CardDataViewModule,\n DataExportModule,\n DataTableModule,\n DataViewModule,\n DropDownModule,\n SortTableModule,\n SvgModule,\n TableFilterModule,\n VerbenaButtonModule,\n VerbenaInputModule,\n VerbenaSwitchModule,\n VerbenaTextareaModule,\n VerbenPopUpModule,\n VisibleColumnModule,\n} from 'verben-ng-ui';\nimport { FormControlComponent } from './form-control.component';\nimport { FileUploadModule } from 'verben-workflow-ui/src/lib/components/file-upload';\n@NgModule({\n declarations: [FormControlComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n DataTableModule,\n SvgModule,\n VerbenPopUpModule,\n DataViewModule,\n VerbenaButtonModule,\n CardDataViewModule,\n DropDownModule,\n VerbenaSwitchModule,\n TableFilterModule,\n VisibleColumnModule,\n SortTableModule,\n DataExportModule,\n VerbenaInputModule,\n FileUploadModule,\n VerbenaTextareaModule,\n ],\n exports: [FormControlComponent],\n})\nexport class FormControlerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAqBa,oBAAoB,CAAA;AAUrB,IAAA,MAAA,CAAA;AACA,IAAA,WAAA,CAAA;AACA,IAAA,GAAA,CAAA;AACA,IAAA,MAAA,CAAA;AAZD,IAAA,QAAQ,CAAY;IACpB,KAAK,GAAQ,EAAE,CAAC;IAChB,aAAa,GAAkB,UAAU,CAAC;IAC1C,cAAc,GAAmB,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AA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YArB5B,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,eAAe;YACf,SAAS;YACT,iBAAiB;YACjB,cAAc;YACd,mBAAmB;YACnB,kBAAkB;YAClB,cAAc;YACd,mBAAmB;YACnB,iBAAiB;YACjB,mBAAmB;YACnB,eAAe;YACf,gBAAgB;YAChB,kBAAkB;YAClB,gBAAgB;YAChB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;4FAIZ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAxB/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,eAAe;wBACf,SAAS;wBACT,iBAAiB;wBACjB,cAAc;wBACd,mBAAmB;wBACnB,kBAAkB;wBAClB,cAAc;wBACd,mBAAmB;wBACnB,iBAAiB;wBACjB,mBAAmB;wBACnB,eAAe;wBACf,gBAAgB;wBAChB,kBAAkB;wBAClB,gBAAgB;wBAChB,qBAAqB;AACtB,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA,CAAA;;;AC7CD;;AAEG;;;;"}
@@ -3,7 +3,7 @@ import { Injectable, EventEmitter, Component, Input, ViewChild, Output, NgModule
3
3
  import { Subject, debounceTime } from 'rxjs';
4
4
  import * as i6 from 'verben-ng-ui';
5
5
  import { DataFilterType, ConditionalOptions, DataTableModule, SvgModule, VerbenPopUpModule, DataViewModule, VerbenaButtonModule, CardDataViewModule, DropDownModule, TableFilterModule, VisibleColumnModule, SortTableModule, DataExportModule, VerbenaInputModule, VerbenaSwitchModule, ChipModule } from 'verben-ng-ui';
6
- import { Status, ErrorResponse, ObjectState, SearchOperator, SearchPropertySign, SearchPropertyValueType, DataType } from 'verben-workflow-ui/src/lib/models';
6
+ import { Status, ErrorResponse, SortDirection, ObjectState, SearchOperator, SearchPropertySign, SearchPropertyValueType, DataType } from 'verben-workflow-ui/src/lib/models';
7
7
  import * as i1 from 'verben-workflow-ui/src/lib/services';
8
8
  import * as i3 from '@angular/router';
9
9
  import { RouterModule } from '@angular/router';
@@ -165,7 +165,7 @@ class FormGroupComponent {
165
165
  dataView;
166
166
  tableView;
167
167
  application = null;
168
- pageSize = 10;
168
+ pageSize = 20;
169
169
  skip = 0;
170
170
  hasMore = true;
171
171
  onViewProcessClicked = new EventEmitter();
@@ -306,7 +306,7 @@ class FormGroupComponent {
306
306
  this.selectedSortTableCount = 0;
307
307
  }
308
308
  this.utilService.sendBI(true);
309
- const res = await this.server.get(`GetFormEntities/${this.skip}/${this.pageSize}`, this.envSvc.environment.WorkFlowAPI);
309
+ const res = await this.server.get(`GetFormEntities/${this.skip}/${this.pageSize}/CreatedAt/${SortDirection.Desc}`, this.envSvc.environment.WorkFlowAPI);
310
310
  this.utilService.sendBI(false);
311
311
  if (res instanceof ErrorResponse) {
312
312
  return undefined;