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

@ewc-lib/ewc-dialog-feedback

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ewc-lib/ewc-dialog-feedback

![Screenshot](./screenshot.png)

  • 3.0.0-alpha
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
22
increased by1000%
Maintainers
0
Weekly downloads
 
Created
Source

Screenshot

Screenshot

  • This component is supposed to be shown after page load until a given date
  • The user can stop this component from being shown by ticking a checkbox
  • The information if it should be shown or not is stored in a cookie
  • Multiple periods can be specified

Notes

  • this component comes with predefined title and body text
  • maximal 1 instance is supported

API

The API of ewc-dialog applies to this element as well, because this element derives from ewc-dialog.

Additionally, there are the following attribs:

  • configUrl - URL to a raw text file containing a JSON string
  • configString - config as a JSON string
    • Note: configString has precedence in case both are given
  • titleText - a string. Default: "Your feedback wanted"
  • messageHtml - a string containing html markup. Also has a default.

Note: The attribs are applied only initially - changing them at runtime has no effect.

config string example

{
  "cookieName": "eurostat-dashboards-survey",
  "cookiePath": "/eurostat/cache",
  "participationUrl": "https://ec.europa.eu/eusurvey/runner/dashboards_feedback",
  "activationPeriods": [
    {
      "activeFrom": "2024-10-18 10:00",
      "activeUntil": "2024-10-24 14:00",
      "cookieExpiryDate": "2024-10-25"
    },
    {
      "activeFrom": "2024-11-20 10:00",
      "activeUntil": "2024-11-26 14:00",
      "cookieExpiryDate": "2024-11-27"
    },
    {
      "activeFrom": "2024-12-18 10:00",
      "activeUntil": "2024-12-24 14:00",
      "cookieExpiryDate": "2024-12-25"
    }
  ]
}

Note: the user has to make sure the cookie expiry date of one period lies before the start of the next period

Usage with WebPack

package.json

"dependencies": {
  "@ewc-lib/ewc-dialog-feedback": "^SOMEVERSION"
},

main.js

import "@ewc-lib/ewc-dialog-feedback"

index.html

<ewc-dialog-feedback
  configUrl="https://ec.europa.eu/eurostat/cache/dashboard/_configuration/survey-popup-settings.json"
</ewc-dialog-feedback>

FAQs

Package last updated on 21 Oct 2024

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