Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

smartclient-eval

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartclient-eval

Installs SmartClient Eval SDK

  • 0.8.6
  • npm
  • Socket score

Version published
Weekly downloads
256
increased by96.92%
Maintainers
1
Weekly downloads
 
Created
Source

Provides access to SmartClient Evaluation's client-side UI components documented here. Currently, using this module requires an environment, such as React or Angular, that defines "window" as a global with real browser document and navigator objects.

Installation

Install package and SmartClient runtime(s):

npm install smartclient-eval [flags]

Update/reconfigure SmartClient runtime(s) (must be run from package directory):

npm run update [flags]

where the supported flags are:

--location=<directory>  where to install the SmartClient runtime(s);
                        default is to place runtime root (isomorphic)
                        in the dependent module directory

--branch=<number>       desired branch (e.g. 11.1); default is release
                        branch

--date=<date>|latest    desired build date, in format YYYY-MM-DD,
                        or 'latest'; default is 'latest'

--runtime=release|debug|both
                        which runtime(s) to install; default is 'both'

--reference[=<boolean>] whether to keep the framework reference directory;
                        default is to not install it to save disk space

--skins=Tahoe|all|none  which skins (if any) to install;
                        default is to only install Tahoe

--yes[=<boolean>]       assume answer 'yes' to prompts with default

After installation, command-line configuration is persisted, so command-line arguments only need to be supplied when updating if the desired configuration has changed.

Note that since 'npm update' no longer runs a package's update script if the version hasn't changed, you must use the syntax above, run from the package directory, to update the runtime(s) if the package has already been installed. (The smartclient-eval package is versioned separately from nightly SDK builds.)

Command-line Examples

New install, selecting a specific branch and date:

npm install smartclient-eval --branch=11.1 --date=2018-12-30

Update to latest nighlty build (run from package directory):

npm run update --date=latest

Update to SmartClient 12.1 branch, installing all skins:

npm run update --branch=12.1 --skins=all

Importing

If you are building a new Angular, React or similar application, and plan to use SmartClient pervasively throughout, you can just add an import declaration to your main.ts or App.tsx to make the framework available. However, if you are adding SmartClient to an existing application, and you only plan to use SmartClient for specific components like grids, or for Reify screens, consider using background download instead of importing SmartClient directly (importing causes SmartClient to load immediately on all pages).

To directly import the release or debug framework, respectively, in your application, you can write:

import 'smartclient-eval/release';

or

import 'smartclient-eval/debug';

To import a skin as well, such as "Tahoe", you can add:

import 'smartclient-eval/skins/Tahoe';

If you want to refer to SmartClient APIs through your own constant, you can always insert a declaration such as:

const ISC: typeof isc = window['isc'];

after importing the framework.

Importing skins in Angular

In Angular, if you directly import the skin, you may need to also manually add the path to the skin_styles.css file for your skin to the src/styles.css file (or equivalent) for your app, in addition to importing the skin as described above.

For example, if you've installed the SmartClient runtime in the default location, and are importing Tahoe, you'd add the following to src/style.css in your app:

@import '../isomorphic/skins/Tahoe/skin_styles.css';

Note that if you are using the FileLoader to load a skin, it must be installed under src/assets (for example copied from isomorphic/skins) to work properly.

TypeScript

To provide typescript support, the installation process should automatically augment your tsconfig.json file to include SmartClient's typescript file.

Alternatively, you can copy the typescript declaration file, smartclient.d.ts, from the installed resources under the isomorphic directory to your app's source directory, and then import it from your app like:

import 'smartclient.d.ts';

Note that SmartClient's TypeScript support is intended for IDE auto-completion and inline documentation, not for transpilation. So, if you run into compile errors, you can always remove any reference to our TypeScript file from your own TS file and application, remove smartclient.d.ts from under src/assets (if present), and instead make TypeScript active for your IDE only. For further details, see the TypeScript support documentation for our framework or your IDE.

Keywords

FAQs

Package last updated on 10 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc