feat: add logo image and RTL support styles
- Added logo image to assets. - Implemented RTL support styles in rtlSupport.scss for various components including breadcrumb, datatable, and tree node toggle button. chore: configure environment files for production, staging, and development - Created environment.prod.ts for production settings. - Created environment.staging.ts for staging settings. - Created environment.ts for local development settings. feat: define custom theme preset - Added presets.ts to define a custom theme preset using PrimeUIX with specific component styles and semantic colors. chore: set up proxy configuration for local development
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import { Maybe } from '@/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnInit,
|
||||
Output,
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
||||
import flatpickr from 'flatpickr-wrap';
|
||||
import { BaseOptions } from 'flatpickr-wrap/dist/types/options';
|
||||
import { InputTextModule } from 'primeng/inputtext';
|
||||
import { UikitFieldComponent } from '../uikit-field.component';
|
||||
|
||||
@Component({
|
||||
selector: 'uikit-datepicker',
|
||||
standalone: true,
|
||||
imports: [CommonModule, ReactiveFormsModule, InputTextModule, UikitFieldComponent],
|
||||
templateUrl: './datepicker.component.html',
|
||||
})
|
||||
export class UikitFlatpickrJalaliComponent implements OnInit {
|
||||
@Input() control?: FormControl<Maybe<string>>;
|
||||
@Input() placeholder = 'انتخاب تاریخ';
|
||||
@Input() label = 'تاریخ';
|
||||
@Input() disabled = false;
|
||||
@Input() name: string = 'datepicker';
|
||||
@Input() options: Partial<BaseOptions> = {};
|
||||
|
||||
@Output() valueChange = new EventEmitter<string>();
|
||||
|
||||
@ViewChild('wrapper', { static: true }) wrapperRef!: ElementRef<HTMLElement>;
|
||||
|
||||
private fpInstance: any | null = null;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.fpInstance = flatpickr(this.wrapperRef.nativeElement, {
|
||||
...this.options,
|
||||
altInputClass: 'p-inputtext w-full',
|
||||
onChange: (selectedDates: Date[], dateStr: string) => {
|
||||
this.valueChange.emit(dateStr);
|
||||
if (this.control) this.control.setValue(dateStr);
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user