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

@forter/component-base

Package Overview
Dependencies
Maintainers
3
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forter/component-base - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0

44

dist/bundle.js

@@ -550,4 +550,3 @@ import '@forter/tokens';

PREFIX: 'prefix',
SUFFIX: 'suffix',
TEXT: 'text'
SUFFIX: 'suffix'
};

@@ -558,3 +557,3 @@ var Element = _decorate$1(null, function (_initialize, _LitElement) {

var _super = _createSuper$1(Element);
function Element(slots) {
function Element() {
var _this;

@@ -564,3 +563,2 @@ _classCallCheck(this, Element);

_initialize(_assertThisInitialized(_this));
_this.slots = slots;
_this.init();

@@ -572,3 +570,3 @@ return _this;

// Rendering every registered slots
// Rendering every registered slot

@@ -903,3 +901,3 @@ // Rendering one slot inside the light dom

_get(_getPrototypeOf(Element.prototype), "willUpdate", this).call(this, changedProperties);
this.renderSlots(this.slots, changedProperties);
this.renderSlots();
}

@@ -909,4 +907,5 @@ }, {

key: "renderSlots",
value: function renderSlots(slots) {
value: function renderSlots() {
var _this3 = this;
var slots = Object.keys(this.slotRenderers || {});
(slots || []).map(function (slotName) {

@@ -924,8 +923,15 @@ return _this3.renderSlot.bind(_this3)(slotName);

var renderer = slotRenderer === null || slotRenderer === void 0 ? void 0 : slotRenderer.renderer;
var root = this.verifySlotted(slotName);
var shouldRender = condition && typeof condition === 'function' && !!condition.apply(this);
var root = this.getSlot(slotName);
var hasSlotFlag = "has-slot-".concat(slotName);
if (root.getAttribute('internal-slot')) {
if (renderer && typeof renderer === 'function') {
this[hasSlotFlag] = shouldRender;
if (root && !root.getAttribute('internal-slot')) {
// The user inserted his own slot
this[hasSlotFlag] = true;
} else {
// The slot is managed by the component
var shouldRender = condition && typeof condition === 'function' && !!condition.apply(this);
if (shouldRender) {
this[hasSlotFlag] = true;
root = this.verifySlotted(slotName);
// Getting the template and the position

@@ -938,5 +944,4 @@ var template = shouldRender ? renderer.apply(this) : null;

this[hasSlotFlag] = false;
this.removeSlot(slotName);
}
} else {
this[hasSlotFlag] = true;
}

@@ -956,2 +961,9 @@ }

kind: "method",
key: "removeSlot",
value: function removeSlot(slotName) {
var slot = this.getSlot(slotName);
slot && this.removeChild(slot);
}
}, {
kind: "method",
key: "isSlotted",

@@ -1118,6 +1130,6 @@ value: function isSlotted(slotName) {

var _super = _createSuper(GeneralFormElement);
function GeneralFormElement(slots) {
function GeneralFormElement() {
var _this;
_classCallCheck(this, GeneralFormElement);
_this = _super.call(this, slots);
_this = _super.call(this);
_initialize(_assertThisInitialized(_this));

@@ -1124,0 +1136,0 @@ _this.value = null;

{
"name": "@forter/component-base",
"version": "5.0.0",
"version": "6.0.0",
"description": "",

@@ -30,3 +30,3 @@ "license": "MIT",

},
"gitHead": "1b013d1b4fb811a85e6e396694e276d16d0b8cf6"
"gitHead": "66899f5c8a3010d17c593b1de1f0ab9790b0cd40"
}

Sorry, the diff of this file is not supported yet

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