Installation
npm install credcomponents --save
Available components to use
- Chat
- File Upload
- Macro Component
- Maps
- Mega Menu
- Tooltip
Available directives to use
- Comma Seprator
- Sticky Scroll
Available utilities to use
- LoadScript
- Using `LoadScript` utility function you can load external files and can be unloaded using `unloadScript` utility function.
- There are also other utilities to check type of variables, is property are available or not in object, loops, filters.
Usage
All the components, directives and utilites are tree shaked, where you will install only specific dependency not others with it.
import {
FileUpload,
Chat,
Macro,
BubbleMap,
GoogleMap,
LeafletMaps,
LineMap,
yandexMap,
ymapMarker,
...,
CommaSeprator,
StickyScroll,
...,
isPrimitive,
isUndef,
isDef,
isTrue,
isFalse,
isPrimitive,
isRefrence,
isPlainArray,
isPlainObject,
isRegExp,
isFunction,
isPromise,
isValidArrayIndex,
toNumber,
...
} from 'credcomponents'
import Vue from 'vue'
import { Macro } from 'credcomponents'
Vue.use(Macro, {
applicationName: "<< Your appname>>", macroJSFileUrl: "<<Your path for macro file, where in custom code get executed>>"
});
Above components can be used as webcomponents in your legacy application.
- Include
webcomponents/credence.min.js
in your html file or load the you load other javascript files. - The use above published component this way.
<!doctype html>
<meta charset="utf-8">
<title>credence demo</title>
<script src="https://unpkg.com/vue"></script>
<script src="/credcomponents/webcomponents/credence.min.js"></script>
<credence-file-upload></credence-file-upload>
<credence-macro></credence-macro>
<credence-mega-menu-web-component></credence-mega-menu-web-component>
Each published components, directives and utility can be installed individually instead of installing all package credcomponents
.
npm install @credenceanalytics/file-upload --save
npm install @credenceanalytics/macro-component --save
import Vue from 'vue'
import { Macro } from '@credenceanalytics/macro-component'
Vue.use(Macro, {
applicationName: "<< Your appname>>", macroJSFileUrl: "<<Your path for macro file, where in custom code get executed>>"
});
import { FileUpload } from "@credenceanalytics/file-upload";
import SearchBar from "@credenceanalytics/search-bar"