Cision Websolutions modules
npm install cision-websolutions!Cision logo
Websolutions
=====================
We deliver release feeds, share graphs, subscription modules and other investor relations modules such as estimate, ownership and insider. Some of these web modules work together with Cisions main product Cision Point were costumers send out their releases to their recipients collected from our media database.
To see examples on all our modules and more information visit our demosite.
Installation
-------------------
This project requires to be installed with pnpm to be able to run out of the box since npm will flatten the project which destroys the folder structure.
To read more about how pnpm works go visit their GitHub page.
To install pnpm and the cision package run the following commands.
``javascript
`
npm i -g pnpm
pnpm i cision-websolutions
`
To install cision package dependencies run the following command from node_modules/cision-websolutions folder if you installed project from npm site otherwise run it from root.
javascript
`
pnpm install
`
Run
-------------------
This command can only be run from the node_modules/cision-websolutions folder not from the root level of the downloaded package.
Make sure all dev dependencies are installed before running this.
javascript
`
npm run start
`
Build
-------------------
This command can only be run from the node_modules/cision-websolutions folder not from the root level of the downloaded package.
Make sure all dev dependencies are installed before running this.
javascript
`
npm run build-prod
src/js/settings.js
General information
-------------------
This is a Webpack version of the Cision Web Solutions modules and running this will create a cision bundle with all cision resources and dependencies. These modules are built using jQuery, they are modestly styled with Twitter's Bootstrap framework and JSRender is used as the template engine. To render graphs and charts we use Highstock. Highstock is required for the sharegraph, the Estimate history graph and the ownership pie charts. JQuery and Highcharts are loaded via CDN on the pages that require them to minimize the bundle size. This is done since they are big libraries that could already be included in a web application and it would in that case not make sense to load them again in the Cision bundle. Also we get to benefit from the CDN cache.
$3
For all our modules we provide an accessKey or a unique identifier which is essential for the module to work. These examples are set up using Cisions example feeds and the identifiers will have to be changed. These are specified in the settings file together with all other module related settings. The settings file can be found in . These settings can be overridden for any given module and can be passed as an object in all init and render functions. For example, a few of the default settings in the smaller sharegraph in our package differ from those of the original sharegraph, so we want to override them.
`javascript
`
var options = {
showVolume: false,
typeOfChart: 'EndOfDay',
isMiniShareGraph: true,
accessKey: window.cision.websolution.settings.minisharegraph.accessKey
};
window.cision.websolution.sharegraph.init(options);
src/js/texts.js
$3
Translations for all the modules is found in . We have full support for Swedish, English and Finnish. There is also limited support for Norwegian, German and Danish, but the translations are currently incomplete. Texts can be changed and new languages added by editing this file. The language code correlates to the uiLanguage setting.
`
$3
Included in our websolutions bundle we have helpers for formatting date, time, numbers, and numbers with currency. Those helpers can be used in all jsrender scripts to directly format a spcific value.
Example of usage inside JSRender script tag with default formatting options stated in the settings file:
javascript
`
{{>~formatNumber(inputNumber)}}
`
With override fomatting options passed as strings
javascript
`
{{>~formatNumber(inputNumber, decimalPrecision, decimalSeparator, thousandSeparator)}}
`
For date and time formatting, pass format string as second parameter
javascript
`
{{>~formatTime(value, timeFormat)}}
{{>~formatDate(value, dateFormat)}}
{{>~formatDateTime(value, dateTimeFormat)}}
`
This can also be used in javascript
javascript
`
var formattedNumber = window.cision.websolution.formatHelpers.formatNumber(value, decimalPrecision, decimalSeparator, thousandSeparator)
https://publish.ne.cision.com/Subscription/SubscribeWithCaptcha
For more detailed information about the feeds we deliver, what they include and what filter options are available please read our technical white papers. They are found in the top right menu on our demosite.
Web modules
-----------
$3
This feed is avaliable in JSON, XML and RSS and most customers implement this feed in their own way to make it fit seamlessly on their site. The most common way to use the feed is to collect the new data from Cision whenever the feed is updated. The feeds are updated every time a new relase is sent out or removed and there is a maximum delay of 2 minutes. As a faster alternative to polling the feed, we provide a Notified Pull solution where the server is notified of new content by an xml ping. This brings the delay time down to less than half a minute.
$3
Very similar to our release feeds in regards to implemenation and examples, except for media files rather than press releases. The only difference apart from the type of content is an extra filter option on media type. This can be passed as a render option as MediaType: "Image" for example. For more examples on different filters that are available check out the technical white paper.
$3
Our subscription module does not have an example since it is a simple form that posts to the follopwing endpoint . It should be implemented with Googles reCAPTCHA for security purposes But if requested it can be used without it.
`
Possible fields are language, phone number, e-mail, company among others. A complete list of the available fields and their format can be found in our technical white paper for the subscription at our demosite. There are some fields that are required for the submission to work such as:
html
``
subscriptionUniqueIdentifier is the identifier provided by Cision which is required to create subscriptions and is unique per subscription solution.
ReplyLanguage decides what language the emails are sent in, this does not need to match the language of the releasesa subscriber wants to subscribe to.