chi-app-lib
Version:
This is a custom component (input dropdown grid textarea map captcha) published to npm.
136 lines (116 loc) • 4.08 kB
Markdown
custom component (input dropdown grid textarea map captcha)
================================
#### Installation
npm: `npm install chi-app-lib`
#### lib-chi-input (material design)
type = 'text';
direction = 'rtl';
floatLabel = 'auto'; // never
pattern = '';
petternMessage = 'مقدار این فیلد صحیح نیست!';
className;
readonly;
required;
placeHolder;
hintText;
minLength;
maxLength;
showValidatorMessage = true;
showSuffix = false;
suffixIcon = 'close';
isDirty;
focuse;
suffixClicked = new EventEmitter<any>();
isValid = new EventEmitter<boolean>();
#### lib-text-area (material design)
type = 'text';
direction = 'rtl';
pattern = '';
className;
readonly;
required;
placeHolder;
hintText;
minLength ;
maxLength ;
showCountValue ;
isDirty ;
showValidatorMessage = true ;
isValid = new EventEmitter<boolean>();
#### lib-dropdown (material design)
options = []; ex: [{value: 'value', viewValue: 'viewText'}]
direction = 'rtl';
floatLabel = 'auto'; // never
pattern = '';
className;
readonly;
required;
placeHolder;
showValidatorMessage = true;
isDirty;
isValid = new EventEmitter<boolean>();
valueChanged = new EventEmitter<any>();
#### lib-grid (material design)
columns: string[] = [];
actionsColumns: string[] = [];
columnsToDisplay: string[] ;
data;
height = '400px';
hasFilter;
filterOfSrc;
filterOnSrc;
openFilter = new EventEmitter<any>();
clearFilter = new EventEmitter<any>();
actionActor = new EventEmitter<any>(); *** reurn value Format: {actor: actor, row: row}
***example Column-define
column=[{
columnDef: 'databaseField',
type: 'string', // 'color' // number
width: '20%',
header: 'headerName',
hasIcon: true, // type is 'color'
color: 'red',
icon: 'fonMaterialIcon', // type is 'color' && 'hasIcon' show this font-icon
bold: (element: any) => `${!element.seen}`,
cell: (element: any) => `${element.name}`
},
/* for define action column */
{
columnDef: 'actions',
type: 'string',
width: '30%',
header: '',
cell: (element: any) => ``
},
/* for define filter column */
{
columnDef: 'filter',
type: 'string',
width: '30%',
header: '',
cell: (element: any) => ``
}]
***example of action Column-define
actinColumn = [
{'name': 'action Name', 'actor': 'actionFunction', 'show': showActionFunction}];
#### lib-chi-map (mapbox-gl-js)
mapUrl;
maxZoom = 18;
minZoom = 5;
zoom = 5;
center: any = [51.4, 35.7];
southWest = {lat: 24.350969, lng: 44.0};
northEast = {lat: 39.912996, lng: 63.5};
zoomControl = false;
dragging = true;
markerUrl;
markerSize;
markerAnchor;
coordinateMarker;
resetCoordinate;
zoomMarker = 17;
width;
height;
showMarker = true;
coordinate = new EventEmitter<any>();
getMap = new EventEmitter<any>();