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

@semantic-ui/component

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semantic-ui/component - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

10

package.json

@@ -15,8 +15,8 @@ {

"dependencies": {
"@semantic-ui/query": "^0.0.20",
"@semantic-ui/reactivity": "^0.0.20",
"@semantic-ui/templating": "^0.0.20",
"@semantic-ui/utils": "^0.0.20"
"@semantic-ui/query": "^0.0.21",
"@semantic-ui/reactivity": "^0.0.21",
"@semantic-ui/templating": "^0.0.21",
"@semantic-ui/utils": "^0.0.21"
},
"version": "0.0.20"
"version": "0.0.21"
}
import { unsafeCSS } from 'lit';
import { each, noop, isServer, kebabToCamel, proxyObject } from '@semantic-ui/utils';
import { ReactiveVar } from '@semantic-ui/reactivity';
import { each, noop, isServer, kebabToCamel } from '@semantic-ui/utils';
import { TemplateCompiler, Template } from '@semantic-ui/templating';

@@ -36,3 +35,3 @@

subTemplates = [],
subTemplates = {},
renderingEngine,

@@ -61,4 +60,6 @@ beforeRendered = noop,

*/
let litTemplate = new Template({
templateName: templateName,
stateConfig: state,
isPrototype: true,

@@ -101,3 +102,2 @@ renderingEngine,

this.settings = this.createSettingsProxy({componentSpec, properties: webComponent.properties});
this.state = this.createReactiveState(state);
this.setDefaultSettings(settings);

@@ -132,3 +132,2 @@ }

});
// just to be safe
if(!this.template.initialized) {

@@ -188,3 +187,2 @@ this.template.initialize();

...this.getContent({componentSpec}),
...this.state,
};

@@ -191,0 +189,0 @@ if (!isServer) {

@@ -188,2 +188,5 @@ import { html } from 'lit';

// we can safely remove outer parens
expressionString = expressionString.replace(/^\((.+)\)$/, '$1');
const expressions = expressionString.split(' ').reverse();

@@ -190,0 +193,0 @@ let funcArguments = [];

@@ -280,24 +280,3 @@ import { LitElement } from 'lit';

/*******************************
Reactive State
*******************************/
createReactiveState(state) {
let reactiveState = {};
each(state, (config, name) => {
if(config?.value && config?.options) {
// complex config { counter: { value: 0, options: { equalityFunction }}}
reactiveState[name] = new ReactiveVar(config.value, config.options);
}
else {
// simple config i.e. { counter: 0 }
const initialValue = config;
reactiveState[name] = new ReactiveVar(initialValue);
}
});
return reactiveState;
}
/*******************************
Settings / Template Data

@@ -304,0 +283,0 @@ *******************************/

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