Installations
npm install @contentstack/ui-extensions-sdk
Developer
contentstack
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
16.20.2
NPM Version
8.19.4
Statistics
21 Stars
111 Commits
12 Forks
13 Watching
25 Branches
35 Contributors
Updated on 22 Oct 2024
Languages
HTML (83.72%)
JavaScript (12.83%)
CSS (3.45%)
Total Downloads
Cumulative downloads
Total Downloads
508,678
Last day
-32%
298
Compared to previous day
Last week
1.7%
2,103
Compared to previous week
Last month
10.9%
8,264
Compared to previous month
Last year
-21.3%
149,823
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
39
Contentstack Extensions SDK
The Extensions SDK allows you to extend Contentstack’s UI by helping you create Custom Fields, Custom Widgets, and Dashboard Widgets.
Custom Fields enable users to introduce simpler interface controls, such as color picker, code editor, video selector, and more, or maybe complex micro web applications such as Shopify or Snipkart. Because of their dissociated nature, custom fields can be reused multiple times.
Custom Widgets are like micro content-processing apps that help you analyze the entry content and provide recommendations. Some of the useful widgets you can create using this type of extension are text intelligence, SEO recommendations, language translation, grammar checker and more.
Dashboard Widgets let you add powerful widgets to the stack’s dashboard that let users do more from a centralized location. Some examples of this type of extension include personal notes, recently published content, notification centre, and stack usage summary.
This SDK overview document introduces you to the concept of custom extensions.
Getting started
Include the compiled version of the extension client library by adding the following line to your application.
1<script 2 src="https://unpkg.com/@contentstack/ui-extensions-sdk@2.2.3/dist/ui-extension-sdk.js" 3 integrity="sha512-LMktiFAj7j/AUFctMlgY8qmLrLIQVctwwCsnCXIWnvgF9JlanilvFbZxOCtPNB5eO3vp2Nhw9ED1UsWa+ltSvQ==" 4 crossorigin="anonymous" 5></script>
Extensions examples
Custom Fields
Some of the examples of custom field extensions are:
-
Color Picker - Displays a native color picker polyfill that allows users to select color as input value and saves the color code in the backend
-
Ace Editor - Displays a code editor written in JavaScript, allowing you to edit HTML, PHP, JavaScript and more easily
-
JSON Editor - Displays a simple editor that lets you view, edit and format JSON code within the field of your content type
-
Key-value Field - Lets you add key-value as input value of a field of your content type
-
Progress Bar - Allows users to set value of a field by sliding the progress bar to the left or right
-
Star Ratings - Lets you provide rating by choosing number of stars
-
Brightcove - Lets you fetch and display your Brightcove videos into a field of your content type.
-
Shopify - Lets you load products of your Shopify store into the field of your content type.
-
Egnyte - Allows you to fetch files of your Egnyte account and display them into a field of your content type.
-
Ooyala - Lets you fetch and display your Ooyala videos into a field of your content type.
-
Optimizely - Lets you serve personalized content by allowing you to select the audience for each entry.
-
Youtube - Lets you fetch and display your Youtube videos into a field of your content type.
-
External API Lookup - Lets you fetch data from an external API and display the data as possible values for the field on an entry page in Contentstack.
Custom Widgets
Some of the examples of custom widget extensions are:
-
Text Intelligence - Lets you use MonekyLearn APIs to provide helpful recommendations such as content summarizer, keyword extractor, retail classifier, etc.
-
Google Analytics - Displays the traffic analysis and statistics of your entry (using Google Analytics data) on the sidebar of the entry.
-
Optimizely Experiments - Lets you retrieve and display Optimizely Experiments and their details in your entry.
-
Developer Tools - This widget extension provides developers with quick tools (API endpoint, JSON, etc.) to work with an entry or all entries of a content type and do a lot more.
Dashboard Widgets
Some of the examples of the dashboard widget extensions are:
-
Google Analytics - Displays the traffic analysis and statistics of your site on the stack dashboard.
-
Content Type Visualizer - Content Type Visualizer Dashboard Widget offers a graphical representation of all content types, along with their fields, in a particular stack.
Using Contentstack styles
Extensions are rendered within an iframe, you will need to include the ui-extension-sdk.min.css library within your custom extension in order to use any of the styles provided by Contentstack.
Include the CSS file in your extension code as follows:
1<link 2 rel="stylesheet" 3 type="text/css" 4 href="https://unpkg.com/@contentstack/ui-extensions-sdk/dist/ui-extension-sdk.css" 5 integrity="sha512-yPPI/jWiqPr0HIh+1A2QPP5p58sSYqbPoBykxIuBckT1vzGwNbrOmwYM03qGI4ffnxd7q4kkoDys0kdZzxYn9A==" 6 crossorigin="anonymous" 7/>
For more information on styling your extension, refer to our style guide.
More information
License
Licensed under MIT.
No vulnerabilities found.
Reason
security policy file detected
Details
- Info: security policy file detected: SECURITY.md:1
- Info: Found linked content: SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1
- Info: Found text in security policy: SECURITY.md:1
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
SAST tool detected
Details
- Info: SAST configuration detected: CodeQL
- Info: SAST configuration detected: Snyk
- Info: all commits (16) are checked with a SAST tool
Reason
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
Found 5/19 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/codeql-analysis.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/codeql-analysis.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/codeql-analysis.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/codeql-analysis.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jira.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/jira.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/jira.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/jira.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/jira.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/jira.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/jira.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/jira.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/npm-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/npm-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/npm-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/npm-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/sast-scan.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/sast-scan.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/sca-scan.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/sca-scan.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/sca-scan.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/sca-scan.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-copyright-years-in-license-file.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/update-copyright-years-in-license-file.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/update-copyright-years-in-license-file.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/ui-extensions-sdk/update-copyright-years-in-license-file.yml/master?enable=pin
- Info: 0 out of 12 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 5 third-party GitHubAction dependencies pinned
- Info: 2 out of 2 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:24
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:25
- Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1
- Warn: no topLevel permission defined: .github/workflows/jira.yml:1
- Warn: no topLevel permission defined: .github/workflows/npm-publish.yml:1
- Warn: no topLevel permission defined: .github/workflows/sast-scan.yml:1
- Warn: no topLevel permission defined: .github/workflows/sca-scan.yml:1
- Warn: no topLevel permission defined: .github/workflows/update-copyright-years-in-license-file.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
37 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w
- Warn: Project is vulnerable to: GHSA-q9mw-68c2-j6m5
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj
- Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq
- Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9
- Warn: Project is vulnerable to: GHSA-mxhp-79qh-mcx6
- Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3
- Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
4.9
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More