Angular2 how to integrate TIBCO spotfire - angular2-directives

I am trying to integrate spotfire visualization in angular2. I have downloaded the spotfire api javascript ie. spotfireapi.js
I dont know how to use it in Angular2 component. I am getting error when i instantiate the following:
var customization = new spotfire.webPlayer.Customization();
Can anyone direct me the right way to use this 3rd party api in angular2?
Thanks

Add this line after imports of your component:
declare var spotfire: any;
This will fix the error you are talking about.

Related

How to use implement hijri datepicker on vue3 app?

I'm currently building a web app using vue3. and Now I need to use a hijri datepicker but the libraries I found don't work on vue3! I don't use jquery on my app so I don't want a library depending on jquery.
what library would be good for me? also how can I do it manually without a library? and resources teaching this would be so fine.
any help would be appreciated!
I tried to use this lib but it doesn't work with vue 3 only with vue2.
PS: I'm using vuetify on my app if it would help
I will introduce you to 3 sites for implementing the Hijri or Solar calendar, which you can use in Vue js 3 using API composition and API option.
The first link with option API - The second link with API composition API - The third link is also a complete document for Hijri or Shamsi calendar.

Fusion chart automation using protractor automation framework

My current project setup
Angular js 1.5
integrated fusion chart https://www.fusioncharts.com/fusioncharts
now am trying protractor framework to automate the application and i could do many things like form validation , input and submit .
Now i have problem with Fusion chart automation , like am not able to validate the data that showing on the graph is correct or not .
i tried below idea but am not able to get reference it giving error fusion chart is not defined .
outine
please comment on the below idea and suggest any other way to automate this or any other new framework .
You can write test cases using FusionCharts life cycle events supported to test but please note chart need to be rendered first on any browser as FusionCharts is a JavaScript charting library that you need to include in your HTML page/application to use or run the charts.
Fusioncharts has its own supported events and methods which you can use like method getCSVData to fetch chart data set in the CSV format which you can later validate if its correct or not as per your requirement.
Refer below doc link for lifecycle Events using AngularJs,
https://www.fusioncharts.com/dev/getting-started/angular/angularjs/lifecycle-event-using-angularjs
Please refer below doc link for all supported methods with details and samples,
https://www.fusioncharts.com/dev/api/fusioncharts/fusioncharts-methods
Please refer below doc link for supported events,
https://www.fusioncharts.com/dev/api/fusioncharts/fusioncharts-events
Hope this helps.

How to create a user with Pusher on React Native?

I try to follow official document https://pusher.com/tutorials/chat-app-react-native-gifted-chat and it works.
But when I want to set a create user function , I can't find the code from React Native.
I just find it with Node.js https://docs.pusher.com/chatkit/reference/server-node#creating-a-user and with Javascript https://docs.pusher.com/chatkit/quick_start/javascript#create-a-user
If i use Javascript document, it will show error https://docs.pusher.com/chatkit/quick_start/javascript#create-a-user
import Chatkit from "#pusher/chatkit";
const chatkit = new Chatkit.default({
instanceLocator: CHATKIT_TOKEN_PROVIDER_ENDPOINT,
key: CHATKIT_SECRET_KEY
})
There is no default can be used obviously.
Is any way to do it on the mobile application or I must have a backend to do it ?
Any help would be appreciated. Thanks in advance.
Currently you can create users in one of three ways:
Using your Chatkit dashboard's console
From your server code using one of the server SDKs
Using the HTTP API directly
As you'll notice from that list, you can't create a user from the client.

How to load Google Places API in React Native?

I am trying to use the Google Places API in react native. I first tried using fetch to make requests directly, but I just saw that you have to use the existing classes/objects provided by Google, like the PlacesService. Searching for React Native libraries that include the API objects for you just brings up some that do the autocomplete feature and not much else.
The Places API docs say to load the library using this url: <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"></script>
This is straightforward to me in regular web dev, but not in react native. What is the standard procedure for loading a library like this in React Native?
Right now I have copy and pasted the JS contents from the link above into a file in my React Native project. But, I don't even know how to export it as I can't really tell what the name of the object/function is. google ? google.maps ?
Right now I am doing:
export default google.maps
and also tried
export default google
but these both throw this error:
cannot read property 'createElement' of undefined
This is my first React Native project, so I'm sorry if this is a basic question.
Thanks for the help.
but I just saw that you have to use the existing classes/objects provided by Google
I'm not sure what you mean by that. Places api can be done via fetch/api request. Look at how react-native-google-places does it at https://github.com/FaridSafi/react-native-google-places-autocomplete/blob/master/GooglePlacesAutocomplete.js#L227
They use a new XMLHttpRequest(); but fetch() would work as well. It is web api and I don't think you need to run any external javascript/load any external js files.

Missing components in the CameraRoll API

I am trying to access the gallery using the official CameraRoll API guide. I am unable to render the component because the following modules are not provided in the official doc:
const CameraRollView = require('./CameraRollView');
const AssetScaledImageExampleView = require('./AssetScaledImageExample');
I tried to google for examples regarding CameraRollView and AssetScaledImageExampleView but found nothing. My question is where can I find the boilerplate code for these two modules? I am still learning React-Native so I am not sure how I am suppose to go about coding these two modules.
Above the example code, next to the headline "Examples", you should see a link "Edit on GitHub" which leads to the source code for that example on GitHub. From there, you can navigate to the location of the file you desire.
For the particular files you desire, they are located at the following links:
CameraRollView.js
AssetScaledImageExample