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

@descope/sdk-mixins

Package Overview
Dependencies
Maintainers
4
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@descope/sdk-mixins - npm Package Compare versions

Comparing version 0.2.43 to 0.2.44

76

dist/cjs/index.cjs.js

@@ -29,5 +29,5 @@ 'use strict';

acc[logLevel] = (...args) => {
var _a;
var _b;
this.onLogEvent(logLevel, args);
(_a = logger[logLevel]) === null || _a === void 0 ? void 0 : _a.call(logger, ...args);
(_b = logger[logLevel]) === null || _b === void 0 ? void 0 : _b.call(logger, ...args);
};

@@ -55,5 +55,5 @@ return acc;

connectedCallback() {
var _a, _b;
(_a = super.connectedCallback) === null || _a === void 0 ? void 0 : _a.call(this);
if ((_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.isConnected) {
var _b, _c;
(_b = super.connectedCallback) === null || _b === void 0 ? void 0 : _b.call(this);
if ((_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.isConnected) {
// the init function is running once, on the first time the component is connected

@@ -94,7 +94,7 @@ if (tslib.__classPrivateFieldGet(this, _InitLifecycleMixinClass_isInit, "f")) {

async init() {
var _a;
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
var _b;
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
attributesObserver(this, (attrName) => {
var _a;
(_a = tslib.__classPrivateFieldGet(this, _ObserveAttributesMixinClass_observeMappings, "f")[attrName]) === null || _a === void 0 ? void 0 : _a.forEach((cb) => {
var _b;
(_b = tslib.__classPrivateFieldGet(this, _ObserveAttributesMixinClass_observeMappings, "f")[attrName]) === null || _b === void 0 ? void 0 : _b.forEach((cb) => {
cb(attrName, this.getAttribute(attrName));

@@ -134,4 +134,4 @@ });

async init() {
var _a;
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
var _b;
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
// check attributes initial values

@@ -240,4 +240,4 @@ mappingsNames.forEach((attr) => tslib.__classPrivateFieldGet(this, _ValidateAttributesMixinClass_instances, "m", _ValidateAttributesMixinClass_handleError).call(this, attr, this.getAttribute(attr)));

this.attributeChangedCallback = (attrName, oldValue, newValue) => {
var _a;
(_a = super.attributeChangedCallback) === null || _a === void 0 ? void 0 : _a.call(this, attrName, oldValue, newValue);
var _b;
(_b = super.attributeChangedCallback) === null || _b === void 0 ? void 0 : _b.call(this, attrName, oldValue, newValue);
if (attrName === 'debug') {

@@ -252,4 +252,4 @@ tslib.__classPrivateFieldGet(this, _DebuggerMixinClass_instances, "m", _DebuggerMixinClass_handleDebugMode).call(this);

onLogEvent(logLevel, args) {
var _a;
(_a = super.onLogEvent) === null || _a === void 0 ? void 0 : _a.call(this, logLevel, args);
var _b;
(_b = super.onLogEvent) === null || _b === void 0 ? void 0 : _b.call(this, logLevel, args);
if (logLevel === 'error') {

@@ -260,4 +260,4 @@ tslib.__classPrivateFieldGet(this, _DebuggerMixinClass_instances, "m", _DebuggerMixinClass_updateDebuggerMessages).call(this, args[0] || 'Error', args[1]);

async init() {
var _a;
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
var _b;
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
tslib.__classPrivateFieldGet(this, _DebuggerMixinClass_instances, "m", _DebuggerMixinClass_handleDebugMode).call(this);

@@ -269,4 +269,4 @@ }

_DebuggerMixinClass_disableDebugger = function _DebuggerMixinClass_disableDebugger() {
var _a;
(_a = tslib.__classPrivateFieldGet(this, _DebuggerMixinClass_debuggerEle, "f")) === null || _a === void 0 ? void 0 : _a.remove();
var _b;
(_b = tslib.__classPrivateFieldGet(this, _DebuggerMixinClass_debuggerEle, "f")) === null || _b === void 0 ? void 0 : _b.remove();
tslib.__classPrivateFieldSet(this, _DebuggerMixinClass_debuggerEle, null, "f");

@@ -296,5 +296,5 @@ },

_DebuggerMixinClass_updateDebuggerMessages = function _DebuggerMixinClass_updateDebuggerMessages(title, description) {
var _a;
var _b;
if (title)
(_a = tslib.__classPrivateFieldGet(this, _DebuggerMixinClass_debuggerEle, "f")) === null || _a === void 0 ? void 0 : _a.updateData({ title, description });
(_b = tslib.__classPrivateFieldGet(this, _DebuggerMixinClass_debuggerEle, "f")) === null || _b === void 0 ? void 0 : _b.updateData({ title, description });
},

@@ -353,5 +353,5 @@ _a; });

async function _DescopeUiMixinClass_getComponentsVersion() {
var _a;
var _b;
const config = await this.config;
const componentsVersion = (_a = config === null || config === void 0 ? void 0 : config.projectConfig) === null || _a === void 0 ? void 0 : _a.componentsVersion;
const componentsVersion = (_b = config === null || config === void 0 ? void 0 : config.projectConfig) === null || _b === void 0 ? void 0 : _b.componentsVersion;
if (!componentsVersion) {

@@ -535,5 +535,5 @@ this.logger.error('Could not get components version');

async init() {
var _a;
var _b;
this.loadDescopeUiComponents([MODAL_ELE_TAG]);
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
}

@@ -583,4 +583,4 @@ },

async init() {
var _a;
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
var _b;
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
this.loadDescopeUiComponents([NOTIFICATION_ELE_TAG]);

@@ -637,7 +637,7 @@ }

get theme() {
var _a, _b;
var _b, _c;
const theme = this.getAttribute('theme');
if (theme === 'os') {
const isOsDark = window.matchMedia &&
((_b = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(prefers-color-scheme: dark)')) === null || _b === void 0 ? void 0 : _b.matches);
((_c = (_b = window.matchMedia) === null || _b === void 0 ? void 0 : _b.call(window, '(prefers-color-scheme: dark)')) === null || _c === void 0 ? void 0 : _c.matches);
return isOsDark ? 'dark' : 'light';

@@ -648,4 +648,4 @@ }

async init() {
var _a;
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
var _b;
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
tslib.__classPrivateFieldGet(this, _ThemeMixinClass_instances, "m", _ThemeMixinClass_loadGlobalStyle).call(this);

@@ -702,3 +702,3 @@ tslib.__classPrivateFieldGet(this, _ThemeMixinClass_instances, "m", _ThemeMixinClass_loadComponentsStyle).call(this);

_ThemeMixinClass_loadGlobalStyle = async function _ThemeMixinClass_loadGlobalStyle() {
var _a, _b;
var _b, _c;
const theme = await tslib.__classPrivateFieldGet(this, _ThemeMixinClass_instances, "a", _ThemeMixinClass_themeResource_get);

@@ -709,7 +709,7 @@ if (!theme)

styleEle.innerText =
(((_a = theme === null || theme === void 0 ? void 0 : theme.light) === null || _a === void 0 ? void 0 : _a.globals) || '') + (((_b = theme === null || theme === void 0 ? void 0 : theme.dark) === null || _b === void 0 ? void 0 : _b.globals) || '');
(((_b = theme === null || theme === void 0 ? void 0 : theme.light) === null || _b === void 0 ? void 0 : _b.globals) || '') + (((_c = theme === null || theme === void 0 ? void 0 : theme.dark) === null || _c === void 0 ? void 0 : _c.globals) || '');
this.shadowRoot.appendChild(styleEle);
},
_ThemeMixinClass_loadComponentsStyle = async function _ThemeMixinClass_loadComponentsStyle() {
var _a, _b;
var _b, _c;
const theme = Object.assign({}, (await tslib.__classPrivateFieldGet(this, _ThemeMixinClass_instances, "a", _ThemeMixinClass_themeResource_get)));

@@ -721,4 +721,4 @@ if (!theme)

descopeUi.componentsThemeManager.themes = {
light: (_a = theme === null || theme === void 0 ? void 0 : theme.light) === null || _a === void 0 ? void 0 : _a.components,
dark: (_b = theme === null || theme === void 0 ? void 0 : theme.dark) === null || _b === void 0 ? void 0 : _b.components,
light: (_b = theme === null || theme === void 0 ? void 0 : theme.light) === null || _b === void 0 ? void 0 : _b.components,
dark: (_c = theme === null || theme === void 0 ? void 0 : theme.dark) === null || _c === void 0 ? void 0 : _c.components,
};

@@ -728,5 +728,5 @@ }

_ThemeMixinClass_loadFonts = async function _ThemeMixinClass_loadFonts() {
var _a, _b;
var _b, _c;
const { projectConfig } = await this.config;
const fonts = (_b = (_a = projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.cssTemplate) === null || _a === void 0 ? void 0 : _a[this.theme]) === null || _b === void 0 ? void 0 : _b.fonts;
const fonts = (_c = (_b = projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.cssTemplate) === null || _b === void 0 ? void 0 : _b[this.theme]) === null || _c === void 0 ? void 0 : _c.fonts;
if (fonts) {

@@ -733,0 +733,0 @@ Object.values(fonts).forEach((font) => {

@@ -27,5 +27,5 @@ import { __classPrivateFieldGet, __classPrivateFieldSet } from 'tslib';

acc[logLevel] = (...args) => {
var _a;
var _b;
this.onLogEvent(logLevel, args);
(_a = logger[logLevel]) === null || _a === void 0 ? void 0 : _a.call(logger, ...args);
(_b = logger[logLevel]) === null || _b === void 0 ? void 0 : _b.call(logger, ...args);
};

@@ -53,5 +53,5 @@ return acc;

connectedCallback() {
var _a, _b;
(_a = super.connectedCallback) === null || _a === void 0 ? void 0 : _a.call(this);
if ((_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.isConnected) {
var _b, _c;
(_b = super.connectedCallback) === null || _b === void 0 ? void 0 : _b.call(this);
if ((_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.isConnected) {
// the init function is running once, on the first time the component is connected

@@ -92,7 +92,7 @@ if (__classPrivateFieldGet(this, _InitLifecycleMixinClass_isInit, "f")) {

async init() {
var _a;
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
var _b;
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
attributesObserver(this, (attrName) => {
var _a;
(_a = __classPrivateFieldGet(this, _ObserveAttributesMixinClass_observeMappings, "f")[attrName]) === null || _a === void 0 ? void 0 : _a.forEach((cb) => {
var _b;
(_b = __classPrivateFieldGet(this, _ObserveAttributesMixinClass_observeMappings, "f")[attrName]) === null || _b === void 0 ? void 0 : _b.forEach((cb) => {
cb(attrName, this.getAttribute(attrName));

@@ -132,4 +132,4 @@ });

async init() {
var _a;
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
var _b;
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
// check attributes initial values

@@ -238,4 +238,4 @@ mappingsNames.forEach((attr) => __classPrivateFieldGet(this, _ValidateAttributesMixinClass_instances, "m", _ValidateAttributesMixinClass_handleError).call(this, attr, this.getAttribute(attr)));

this.attributeChangedCallback = (attrName, oldValue, newValue) => {
var _a;
(_a = super.attributeChangedCallback) === null || _a === void 0 ? void 0 : _a.call(this, attrName, oldValue, newValue);
var _b;
(_b = super.attributeChangedCallback) === null || _b === void 0 ? void 0 : _b.call(this, attrName, oldValue, newValue);
if (attrName === 'debug') {

@@ -250,4 +250,4 @@ __classPrivateFieldGet(this, _DebuggerMixinClass_instances, "m", _DebuggerMixinClass_handleDebugMode).call(this);

onLogEvent(logLevel, args) {
var _a;
(_a = super.onLogEvent) === null || _a === void 0 ? void 0 : _a.call(this, logLevel, args);
var _b;
(_b = super.onLogEvent) === null || _b === void 0 ? void 0 : _b.call(this, logLevel, args);
if (logLevel === 'error') {

@@ -258,4 +258,4 @@ __classPrivateFieldGet(this, _DebuggerMixinClass_instances, "m", _DebuggerMixinClass_updateDebuggerMessages).call(this, args[0] || 'Error', args[1]);

async init() {
var _a;
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
var _b;
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
__classPrivateFieldGet(this, _DebuggerMixinClass_instances, "m", _DebuggerMixinClass_handleDebugMode).call(this);

@@ -267,4 +267,4 @@ }

_DebuggerMixinClass_disableDebugger = function _DebuggerMixinClass_disableDebugger() {
var _a;
(_a = __classPrivateFieldGet(this, _DebuggerMixinClass_debuggerEle, "f")) === null || _a === void 0 ? void 0 : _a.remove();
var _b;
(_b = __classPrivateFieldGet(this, _DebuggerMixinClass_debuggerEle, "f")) === null || _b === void 0 ? void 0 : _b.remove();
__classPrivateFieldSet(this, _DebuggerMixinClass_debuggerEle, null, "f");

@@ -294,5 +294,5 @@ },

_DebuggerMixinClass_updateDebuggerMessages = function _DebuggerMixinClass_updateDebuggerMessages(title, description) {
var _a;
var _b;
if (title)
(_a = __classPrivateFieldGet(this, _DebuggerMixinClass_debuggerEle, "f")) === null || _a === void 0 ? void 0 : _a.updateData({ title, description });
(_b = __classPrivateFieldGet(this, _DebuggerMixinClass_debuggerEle, "f")) === null || _b === void 0 ? void 0 : _b.updateData({ title, description });
},

@@ -351,5 +351,5 @@ _a; });

async function _DescopeUiMixinClass_getComponentsVersion() {
var _a;
var _b;
const config = await this.config;
const componentsVersion = (_a = config === null || config === void 0 ? void 0 : config.projectConfig) === null || _a === void 0 ? void 0 : _a.componentsVersion;
const componentsVersion = (_b = config === null || config === void 0 ? void 0 : config.projectConfig) === null || _b === void 0 ? void 0 : _b.componentsVersion;
if (!componentsVersion) {

@@ -533,5 +533,5 @@ this.logger.error('Could not get components version');

async init() {
var _a;
var _b;
this.loadDescopeUiComponents([MODAL_ELE_TAG]);
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
}

@@ -581,4 +581,4 @@ },

async init() {
var _a;
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
var _b;
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
this.loadDescopeUiComponents([NOTIFICATION_ELE_TAG]);

@@ -635,7 +635,7 @@ }

get theme() {
var _a, _b;
var _b, _c;
const theme = this.getAttribute('theme');
if (theme === 'os') {
const isOsDark = window.matchMedia &&
((_b = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(prefers-color-scheme: dark)')) === null || _b === void 0 ? void 0 : _b.matches);
((_c = (_b = window.matchMedia) === null || _b === void 0 ? void 0 : _b.call(window, '(prefers-color-scheme: dark)')) === null || _c === void 0 ? void 0 : _c.matches);
return isOsDark ? 'dark' : 'light';

@@ -646,4 +646,4 @@ }

async init() {
var _a;
await ((_a = super.init) === null || _a === void 0 ? void 0 : _a.call(this));
var _b;
await ((_b = super.init) === null || _b === void 0 ? void 0 : _b.call(this));
__classPrivateFieldGet(this, _ThemeMixinClass_instances, "m", _ThemeMixinClass_loadGlobalStyle).call(this);

@@ -700,3 +700,3 @@ __classPrivateFieldGet(this, _ThemeMixinClass_instances, "m", _ThemeMixinClass_loadComponentsStyle).call(this);

_ThemeMixinClass_loadGlobalStyle = async function _ThemeMixinClass_loadGlobalStyle() {
var _a, _b;
var _b, _c;
const theme = await __classPrivateFieldGet(this, _ThemeMixinClass_instances, "a", _ThemeMixinClass_themeResource_get);

@@ -707,7 +707,7 @@ if (!theme)

styleEle.innerText =
(((_a = theme === null || theme === void 0 ? void 0 : theme.light) === null || _a === void 0 ? void 0 : _a.globals) || '') + (((_b = theme === null || theme === void 0 ? void 0 : theme.dark) === null || _b === void 0 ? void 0 : _b.globals) || '');
(((_b = theme === null || theme === void 0 ? void 0 : theme.light) === null || _b === void 0 ? void 0 : _b.globals) || '') + (((_c = theme === null || theme === void 0 ? void 0 : theme.dark) === null || _c === void 0 ? void 0 : _c.globals) || '');
this.shadowRoot.appendChild(styleEle);
},
_ThemeMixinClass_loadComponentsStyle = async function _ThemeMixinClass_loadComponentsStyle() {
var _a, _b;
var _b, _c;
const theme = Object.assign({}, (await __classPrivateFieldGet(this, _ThemeMixinClass_instances, "a", _ThemeMixinClass_themeResource_get)));

@@ -719,4 +719,4 @@ if (!theme)

descopeUi.componentsThemeManager.themes = {
light: (_a = theme === null || theme === void 0 ? void 0 : theme.light) === null || _a === void 0 ? void 0 : _a.components,
dark: (_b = theme === null || theme === void 0 ? void 0 : theme.dark) === null || _b === void 0 ? void 0 : _b.components,
light: (_b = theme === null || theme === void 0 ? void 0 : theme.light) === null || _b === void 0 ? void 0 : _b.components,
dark: (_c = theme === null || theme === void 0 ? void 0 : theme.dark) === null || _c === void 0 ? void 0 : _c.components,
};

@@ -726,5 +726,5 @@ }

_ThemeMixinClass_loadFonts = async function _ThemeMixinClass_loadFonts() {
var _a, _b;
var _b, _c;
const { projectConfig } = await this.config;
const fonts = (_b = (_a = projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.cssTemplate) === null || _a === void 0 ? void 0 : _a[this.theme]) === null || _b === void 0 ? void 0 : _b.fonts;
const fonts = (_c = (_b = projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.cssTemplate) === null || _b === void 0 ? void 0 : _b[this.theme]) === null || _c === void 0 ? void 0 : _c.fonts;
if (fonts) {

@@ -731,0 +731,0 @@ Object.values(fonts).forEach((font) => {

{
"name": "@descope/sdk-mixins",
"version": "0.2.43",
"version": "0.2.44",
"author": "Descope Team <info@descope.com>",

@@ -79,3 +79,3 @@ "homepage": "https://github.com/descope/sdk-mixins",

"ts-node": "10.9.2",
"typescript": "^4.5.3",
"typescript": "^5.0.2",
"@reduxjs/toolkit": "^2.0.1",

@@ -86,4 +86,4 @@ "redux": "5.0.1"

"tslib": "2.6.3",
"@descope/sdk-component-drivers": "0.2.39",
"@descope/sdk-helpers": "0.1.58"
"@descope/sdk-component-drivers": "0.2.40",
"@descope/sdk-helpers": "0.1.59"
},

@@ -90,0 +90,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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