olaii-web-common
v1.0.29
Published
Olaii common services used in angular 1.x apps.
Downloads
112
Readme
Olaii web common v1.0.29
Olaii common services used in angular 1.x webapps.
How to build
npm run build
It should compile all the js and html files into dist/olaii-web-common.js
, and all the styles into dist/olaii-web-common.css
.
How to run develop?
npm install
npm run serve
A demo project from demo
directory will be available on http://test.olaii.com:3030.
What dose my project need?
angular
.module("myApp", ["olaiiCommon"])
.constant("DEPLOY", "development")
.constant("API_URL", "https://auth.dev.olaii.com/")
.constant("API_URL_AUTH", "https://auth.dev.olaii.com/")
.constant("GOOGLE_CLIENT_ID", "XXXX"); // Optional
Directives
- olaii-common-google-login
- olaii-common-language
- olaii-common-login
- olaii-common-password-change
- olaii-common-theme
- olaii-common-svgs
- olaii-common-user
- olaii-common-apps
- olaii-common-sidebar
- olaii-common-popup
- olaii-common-view-title
- olaii-common-dialog
Services
OlaiiCommonService
- dateFormat -
dd.MM.yyyy
- dateTimeFormat -
dd.MM.yyyy • HH:mm
- dateTimeWithSecondsFormat -
dd.MM.yyyy • HH:mm:ss
- countries
- countriesMap
- success(text)
- error(test)
- colorLuminance(hex, lum)
- getDarkerColor(color)
- detectBrowser()
- isMobile()
- isLocal()
- arrayToMap(array, key)
- addScript(url)
- copyToClipboard(text)
AuthService
- debug
- user
- isAuthenticated()
- readFromCache()
- loginWithGoogle(token)
- login(username, password, code)
- logout()
- goToLogin()
- getUser(force)
- register(email, first_name, last_name, password)
- changePassword(currentPassword, newPassword)
- resetPassword(email)
- resetPasswordConfirm(password, token, uid)
- twoFactorStatus()
- twoFactorRequest()
- twoFactorEnable(code)
- twoFactorDisable(code)
- hasMultiple
- hasCashless
- hasPos
- hasTicketing
- hasGuestlist
- hasPass
- isAdmin
- checkPermisions()
- clearAll()
LanguageService
- language
- languageCookieName
- languages
- languagesMap
- get()
- set(language)
- updateProfile(language)
- clearAll()
RequestService
- get(path, params, headers, responseType)
- getList(path, params, headers, responseType)
- getBlob(path, params, headers)
- post(path, data, params, headers, responseType)
- postFile(path, file, name, headers)
- postFormData(path, formData, headers, responseType)
- put(path, data, params, headers, responseType)
- update(path, data, params, headers, responseType)
- patch(path, data, params, headers, responseType)
- delete(path, params, headers)
- customRequest({ method, url, data, params, headers, responseType })
- request(method, url, data, params, headers, responseType)
- handleList(response)
- loadMore(items)
- handleList(response)
StateService
- organizerId
- organizerEventId
- organizerExperienceId
- campaignId
- eventId
- licenseId
- campaignCookieName
- eventCookieName
- licenseCookieName
- organizerCookieName
- organizerEventCookieName
- organizerExperienceCookieName
- getState()
- getOrganizer()
- getOrganizerEvent()
- getOrganizerExperience()
- getCampaign()
- getEvent()
- getLicence()
- setState(organizerId, eventId, experienceId)
- setOrganizerId(organizerId)
- setOrganizerEventId(organizerEventId)
- setOrganizerExperienceId(organizerExperienceId)
- setStateCampaignId(campaignId)
- setStateEventId(eventId)
- setLicenceState(licenseId)
- clearAll()
- clearCampaignId()
- clearEventId()
- clearLicenseId()
- clearOrganizerId()
- clearOrganizerEventId()
- clearOrganizerExperienceId()
ThemeService
- theme
- themeCookieKey
- isDark()
- isLight()
- get()
- set(type)
- toggle()
- clearAll()
TokenService
- debug
- accessToken
- accessTokenExpired
- accessTokenCookieName
- refreshToken
- refreshTokenCookieName
- refreshTokenExpired
- refreshInProgress
- getHeader()
- hasToken()
- readFromCache()
- getAccessToken()
- setAccessToken()
- setAccessTokenTimeout()
- isAccessTokenExpired()
- getRefreshToken()
- setRefreshToken()
- setRefreshTokenTimeout()
- refreshAccessToken()
- clearAll()
OlaiiErrorService
- errors
- handle(error)
- getErrorMessage(error)
LICENSE
See LICENSE.md
CHANGELOG
See CHANGELOG.md