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

@semantic-ui/templating

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semantic-ui/templating - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

14

package.json
{
"name": "@semantic-ui/templating",
"version": "0.0.16",
"main": "src/index.js",

@@ -9,8 +8,9 @@ "module": "src/index.js",

"dependencies": {
"@semantic-ui/component": "^0.0.16",
"@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/component": "^0.0.17",
"@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 { $ } from '@semantic-ui/query';
import { capitalize, fatal, each, remove, generateID, isEqual, noop, isServer, inArray, isFunction, proxyObject, extend, clone, wrapFunction } from '@semantic-ui/utils';
import { Reaction } from '@semantic-ui/reactivity';
import { capitalize, fatal, each, remove, generateID, isEqual, noop, isServer, inArray, isFunction, extend, wrapFunction } from '@semantic-ui/utils';
import { ReactiveVar, Reaction } from '@semantic-ui/reactivity';

@@ -23,2 +23,3 @@ import { LitRenderer } from '@semantic-ui/component';

events,
state,
subTemplates,

@@ -44,2 +45,4 @@ createInstance,

this.data = data || {};
this.reactions = [];
this.state = state || {};
this.templateName = templateName || this.getGenericTemplateName();

@@ -88,7 +91,2 @@ this.subTemplates = subTemplates;

findTemplate = (templateName) => Template.findTemplate(templateName);
findParent = (templateName) => Template.findParentTemplate(this, templateName);
findChild = (templateName) => Template.findChildTemplate(this, templateName);
findChildren = (templateName) => Template.findChildTemplates(this, templateName);
initialize() {

@@ -103,3 +101,3 @@ let tpl = this;

// and be removed when the template is destroyed
this.tpl.reaction = this.reaction;
this.tpl.reaction = this.reaction.bind(this);
if (isFunction(tpl.initialize)) {

@@ -110,2 +108,6 @@ this.call(tpl.initialize.bind(this));

this.tpl._childTemplates = [];
/* This will be removed before release
will need to refactor some examples
*/
this.tpl.$ = this.$.bind(this);

@@ -121,2 +123,3 @@ this.tpl.$$ = this.$$.bind(this);

this.tpl.findChildren = this.findChildren.bind(this);
/* end of removed section */

@@ -383,3 +386,3 @@ this.onCreated = () => {

/*******************************
DOM Helpers
DOM Helpers
*******************************/

@@ -424,4 +427,8 @@

reaction: this.reaction.bind(this),
reactiveVar: this.reactiveVar.bind(this),
data: this.tpl.data,
settings: this.element.settings,
state: this.element.state,

@@ -435,6 +442,7 @@ isServer: Template.isServer,

findTemplate: this.findTemplate,
template: this,
templateName: this.templateName,
templates: Template.renderedTemplates,
findTemplate: this.findTemplate,
findParent: this.findParent.bind(this),

@@ -491,8 +499,9 @@ findChild: this.findChild.bind(this),

reaction(reaction) {
if (!this.reactions) {
this.reactions = [];
}
this.reactions.push(Reaction.create(reaction));
}
reactiveVar(value, options) {
return new ReactiveVar(value, options);
}
clearReactions() {

@@ -502,2 +511,12 @@ each(this.reactions || [], (comp) => comp.stop());

/*******************************
Template Helpers
*******************************/
findTemplate = (templateName) => Template.findTemplate(templateName);
findParent = (templateName) => Template.findParentTemplate(this, templateName);
findChild = (templateName) => Template.findChildTemplate(this, templateName);
findChildren = (templateName) => Template.findChildTemplates(this, templateName);
static renderedTemplates = new Map();

@@ -504,0 +523,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