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.16 to 0.0.17

12

package.json
{
"name": "@semantic-ui/component",
"version": "0.0.16",
"type": "module",

@@ -16,7 +15,8 @@ "main": "src/index.js",

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

@@ -22,2 +23,3 @@

state = {},
events = {},

@@ -98,2 +100,3 @@

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

@@ -183,3 +186,3 @@ }

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

@@ -192,2 +195,5 @@ if (!isServer) {

}
if(plural === true) {
data.plural = true;
}
return data;

@@ -194,0 +200,0 @@ }

import { LitElement } from 'lit';
import { each, isFunction, isNumber, isString, isPlainObject, keys, unique, isEqual, isServer, inArray, get, isBoolean, isArray } from '@semantic-ui/utils';
import { $ } from '@semantic-ui/query';
import { ReactiveVar } from '@semantic-ui/reactivity';
import { scopeStyles } from './helpers/scope-styles.js';

@@ -280,3 +280,24 @@

/*******************************
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

@@ -283,0 +304,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