![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
ng-eldeeb-image-picker
Advanced tools
Readme
This library was generated with Angular CLI grater than version ^12.0.0.
import { ImagePickerModule } from 'ng-eldeeb-image-picker';
@NgModule({
declarations: [],
imports: [
BrowserModule,
AppRoutingModule,
ImagePickerModule
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
{
"glob": "**/*",
"input": "./node_modules/ng-eldeeb-image-picker/assets",
"output": "/assets/"
}
],
"styles": [],
"scripts": [],
},
}
}
export class AppComponent implements OnInit {
public readonly imgPicker:FormControl<string | File | null>= new FormControl();
public ngOnInit(): void {
this.imgPicker.valueChanges.subscribe(console.log);
}
public onImageError = ($event: ImagePickerError): void => {
console.log($event);
};
}
<image-picker
class="h-[250px] w-[250px]"
[formControl]="imgPicker"
(error)="onImageError($event)"
/>
<image-picker
#imagePicker
class="h-[250px] w-[250px]"
[formControl]="imgPicker"
(error)="onImageError($event)"
>
<!-- Customize your upload button -->
<ng-template #uploadBtn>
<button
class="w-36 h-14 flex justify-center items-center gap-3 rounded-lg bg-blue-400 hover:bg-blue-600 text-white"
(click)="imagePicker.onSelectImg()"
>
Upload image
</button>
</ng-template>
<!-- Customize your selected image -->
<ng-template #image let-img>
<img
class="h-[120px] w-[120px] bg-cover bg-center rounded-full"
[src]="img"
/>
</ng-template>
<!-- Customize your Actions -->
<ng-template #actions>
<div
class="flex justify-center items-center border-t-2 border-slate-100 divide-x text-base text-gray-400"
>
<a
class="w-1/2 flex flex-auto items-center justify-center py-4 px-2 hover:bg-hover hover:bg-slate-100 cursor-pointer delete-btn text-red-500"
(click)="imagePicker.onResetImage()"
>
<mat-icon class="h-4 w-4 font-medium text-center align-middle"
>delete</mat-icon
>
<span class="edit-text">Delete</span>
</a>
<a
class="w-1/2 flex flex-auto items-center justify-center p-4 hover:bg-hover hover:bg-slate-100 cursor-pointer edit-btn"
(click)="imagePicker.onSelectImg()"
>
<mat-icon class="h-4 w-4 font-medium text-center align-middle"
>add_photo_alternate</mat-icon
>
<span class="edit-text">Edit</span>
</a>
<a
class="w-1/2 flex flex-auto items-center justify-center p-4 hover:bg-hover hover:bg-slate-100 cursor-pointer edit-btn"
(click)="imagePicker.onDownloadImg()"
>
<mat-icon class="h-4 w-4 font-medium text-center align-middle"
>cloud_download</mat-icon
>
</a>
</div>
</ng-template>
</image-picker>
Parameter | Type | Description |
---|---|---|
formControlName | formControlName | Form contol in inside form group. |
formControl | formControl | Single form control. |
ngModel | ngModel | Two way binding |
Input() sizeLimit | number | Maximum file size (KB), by default 5120000 KB. |
Input() showActions | boolean | Display actions buttons. |
Input() showEditBtn | boolean | Display edit button. |
Input() showDeleteBtn | boolean | Display delete button. |
Input() showDownload | boolean | Display download button. |
Input() editText | string | Edit button label. |
Input() deleteText | string | Delete button label. |
Input() editIcon | string | Edit button icon (img-path). |
Input() deleteIcon | string | Delete button icon (img-path). |
Input() downloadIcon | string | Download button icon (img-path). |
Output() error | EventEmitter<ImagePickerError> | On error occurred. |
Link https://stackblitz.com/edit/stackblitz-starters-vhdzsf.
Made with love ❤️, For support, email mohamed.eldeib5@gmail.com.
FAQs
This is image picker component made with ❤️
The npm package ng-eldeeb-image-picker receives a total of 0 weekly downloads. As such, ng-eldeeb-image-picker popularity was classified as not popular.
We found that ng-eldeeb-image-picker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.