Skip to content

Instantly share code, notes, and snippets.

View askianoor's full-sized avatar
💰
Working at Charisma Financial Services Group

Ali Kianoor askianoor

💰
Working at Charisma Financial Services Group
View GitHub Profile
@askianoor
askianoor / ValidationService.ts
Last active March 28, 2021 11:09
Iranian National Code && National ID Validation Functions in JavaScript/TypeScript
// Iranian National Code - For Humans
checkIranianNationalCode(id: string): any {
if(id.length != 10) {
return false;
}
const outputNumber = [];
for (var i = 0, len = id.length - 1; i < len; i += 1) {
if(+id.charAt(i) == NaN) {
return false;
Property Default Value Options Description
emptyLabel No results found string label for no result found after search
searchBoxPlaceholder Search ... string `placeholder` for search box
maximumResultForShow 30 number For better performance (especially in mobile), you must set maximum record for showing the records
valueMember id string when your value is an object, it must be defined
displayMember name string for searching, it must be defined
maxWidthForMobileView 599.9 number unit is px
useMobileView TRUE boolean if this value is true and your screen width is less than value of maxWidthForMobileView, 'mat-select' Will be displayed in 'FullScreen' or 'Bottom Sheet'
mobileViewType 'FullScreen' | 'BottomSheet' string
lazyLoad FALSE boolean for use searcher function, it must be true
@askianoor
askianoor / KianSpacing.scss
Last active January 8, 2021 16:42
Pure SCSS for Spacing like Bootstrap
$spacer: 1;
$unit: rem;
/* ----- Margin Classes ----- */
.m-auto { margin: auto !important; }
.mx-auto { margin: 0 auto !important; }
.my-auto { margin: auto 0 !important; }
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }