Socket
Socket
Sign inDemoInstall

@commercetools-uikit/utils

Package Overview
Dependencies
Maintainers
0
Versions
652
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-uikit/utils - npm Package Compare versions

Comparing version 0.0.0-canary-20240902123520 to 0.0.0-canary-20240916085337

24

dist/commercetools-uikit-utils.cjs.dev.js

@@ -10,3 +10,2 @@ 'use strict';

var isPropValid = require('@emotion/is-prop-valid');
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
var react = require('react');

@@ -21,3 +20,2 @@ var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');

var isPropValid__default = /*#__PURE__*/_interopDefault(isPropValid);
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);

@@ -70,3 +68,2 @@

const warning = function (condition, message) {
var _context;
let prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Warning';

@@ -76,3 +73,3 @@ if (isProduction || condition) {

}
console.warn(_concatInstanceProperty__default["default"](_context = "".concat(prefix, ": ")).call(_context, message));
console.warn(`${prefix}: ${message}`);
};

@@ -86,6 +83,3 @@ const useWarning = (condition, message) => {

const getMessage$1 = (componentName, additionalMessage) => {
var _context;
return _concatInstanceProperty__default["default"](_context = "\"".concat(componentName, "\" has been deprecated and will be removed in the next major version.")).call(_context, additionalMessage ? ' ' + additionalMessage : '');
};
const getMessage$1 = (componentName, additionalMessage) => `"${componentName}" has been deprecated and will be removed in the next major version.${additionalMessage ? ' ' + additionalMessage : ''}`;
const warnDeprecatedComponent = function (componentName) {

@@ -101,5 +95,4 @@ let additionalMessage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

const getMessage = function (propName, componentName) {
var _context, _context2;
let additionalMessage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
return _concatInstanceProperty__default["default"](_context = _concatInstanceProperty__default["default"](_context2 = "\"".concat(propName, "\" property of \"")).call(_context2, componentName, "\" component has been deprecated and will be removed in the next major version.")).call(_context, additionalMessage ? ' ' + additionalMessage : '');
return `"${propName}" property of "${componentName}" component has been deprecated and will be removed in the next major version.${additionalMessage ? ' ' + additionalMessage : ''}`;
};

@@ -124,5 +117,4 @@ const warnDeprecatedProp = function (condition, propName, componentName) {

return () => {
var _context;
id += 1;
return _concatInstanceProperty__default["default"](_context = "".concat(prefix)).call(_context, id);
return `${prefix}${id}`;
};

@@ -162,7 +154,7 @@ }

amPm = _match[5];
const parsedMinutes = Number(minutes !== null && minutes !== void 0 ? minutes : '00');
const parsedSeconds = Number(seconds !== null && seconds !== void 0 ? seconds : '00');
const parsedMinutes = Number(minutes ?? '00');
const parsedSeconds = Number(seconds ?? '00');
// Parses the number as a fraction to ensure that .5, .05 and .005 are
// parsed correctily (they are 500, 50 and 5 respectively).
const parsedMilliseconds = Number("0.".concat(milliseconds !== null && milliseconds !== void 0 ? milliseconds : '000')) * 1000;
const parsedMilliseconds = Number(`0.${milliseconds ?? '000'}`) * 1000;
// edge-case: allow 24:00, but nothing over it

@@ -207,3 +199,3 @@ const parsedHours = Number(hours) === 24 && parsedMinutes === 0 && parsedSeconds === 0 && parsedMilliseconds === 0 ? 0 : Number(hours);

// NOTE: This string will be replaced on build time with the package version.
var version = "19.10.0";
var version = "19.11.0";

@@ -210,0 +202,0 @@ exports.SafeHTMLElement = SafeHTMLElement$1;

@@ -10,3 +10,2 @@ 'use strict';

var isPropValid = require('@emotion/is-prop-valid');
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
var react = require('react');

@@ -21,3 +20,2 @@ var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');

var isPropValid__default = /*#__PURE__*/_interopDefault(isPropValid);
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);

@@ -74,6 +72,2 @@

const getMessage$1 = (componentName, additionalMessage) => {
var _context;
return _concatInstanceProperty__default["default"](_context = "\"".concat(componentName, "\" has been deprecated and will be removed in the next major version.")).call(_context, additionalMessage ? ' ' + additionalMessage : '');
};
const warnDeprecatedComponent = function (componentName) {

@@ -83,16 +77,9 @@ return void 0;

const useWarnDeprecatedComponent = function (componentName) {
let additionalMessage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
return useWarning(false, getMessage$1(componentName, additionalMessage));
return useWarning();
};
const getMessage = function (propName, componentName) {
var _context, _context2;
let additionalMessage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
return _concatInstanceProperty__default["default"](_context = _concatInstanceProperty__default["default"](_context2 = "\"".concat(propName, "\" property of \"")).call(_context2, componentName, "\" component has been deprecated and will be removed in the next major version.")).call(_context, additionalMessage ? ' ' + additionalMessage : '');
};
const warnDeprecatedProp = function (condition, propName, componentName) {
};
const useWarnDeprecatedProp = function (condition, propName, componentName) {
let additionalMessage = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
useWarning(condition, getMessage(propName, componentName, additionalMessage));
useWarning();
};

@@ -109,5 +96,4 @@

return () => {
var _context;
id += 1;
return _concatInstanceProperty__default["default"](_context = "".concat(prefix)).call(_context, id);
return `${prefix}${id}`;
};

@@ -147,7 +133,7 @@ }

amPm = _match[5];
const parsedMinutes = Number(minutes !== null && minutes !== void 0 ? minutes : '00');
const parsedSeconds = Number(seconds !== null && seconds !== void 0 ? seconds : '00');
const parsedMinutes = Number(minutes ?? '00');
const parsedSeconds = Number(seconds ?? '00');
// Parses the number as a fraction to ensure that .5, .05 and .005 are
// parsed correctily (they are 500, 50 and 5 respectively).
const parsedMilliseconds = Number("0.".concat(milliseconds !== null && milliseconds !== void 0 ? milliseconds : '000')) * 1000;
const parsedMilliseconds = Number(`0.${milliseconds ?? '000'}`) * 1000;
// edge-case: allow 24:00, but nothing over it

@@ -192,3 +178,3 @@ const parsedHours = Number(hours) === 24 && parsedMinutes === 0 && parsedSeconds === 0 && parsedMilliseconds === 0 ? 0 : Number(hours);

// NOTE: This string will be replaced on build time with the package version.
var version = "19.10.0";
var version = "19.11.0";

@@ -195,0 +181,0 @@ exports.SafeHTMLElement = SafeHTMLElement$1;

@@ -6,3 +6,2 @@ import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';

import isPropValid from '@emotion/is-prop-valid';
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
import { useEffect } from 'react';

@@ -56,3 +55,2 @@ import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';

const warning = function (condition, message) {
var _context;
let prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Warning';

@@ -62,3 +60,3 @@ if (isProduction || condition) {

}
console.warn(_concatInstanceProperty(_context = "".concat(prefix, ": ")).call(_context, message));
console.warn(`${prefix}: ${message}`);
};

@@ -72,6 +70,3 @@ const useWarning = (condition, message) => {

const getMessage$1 = (componentName, additionalMessage) => {
var _context;
return _concatInstanceProperty(_context = "\"".concat(componentName, "\" has been deprecated and will be removed in the next major version.")).call(_context, additionalMessage ? ' ' + additionalMessage : '');
};
const getMessage$1 = (componentName, additionalMessage) => `"${componentName}" has been deprecated and will be removed in the next major version.${additionalMessage ? ' ' + additionalMessage : ''}`;
const warnDeprecatedComponent = function (componentName) {

@@ -87,5 +82,4 @@ let additionalMessage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

const getMessage = function (propName, componentName) {
var _context, _context2;
let additionalMessage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
return _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = "\"".concat(propName, "\" property of \"")).call(_context2, componentName, "\" component has been deprecated and will be removed in the next major version.")).call(_context, additionalMessage ? ' ' + additionalMessage : '');
return `"${propName}" property of "${componentName}" component has been deprecated and will be removed in the next major version.${additionalMessage ? ' ' + additionalMessage : ''}`;
};

@@ -110,5 +104,4 @@ const warnDeprecatedProp = function (condition, propName, componentName) {

return () => {
var _context;
id += 1;
return _concatInstanceProperty(_context = "".concat(prefix)).call(_context, id);
return `${prefix}${id}`;
};

@@ -148,7 +141,7 @@ }

amPm = _match[5];
const parsedMinutes = Number(minutes !== null && minutes !== void 0 ? minutes : '00');
const parsedSeconds = Number(seconds !== null && seconds !== void 0 ? seconds : '00');
const parsedMinutes = Number(minutes ?? '00');
const parsedSeconds = Number(seconds ?? '00');
// Parses the number as a fraction to ensure that .5, .05 and .005 are
// parsed correctily (they are 500, 50 and 5 respectively).
const parsedMilliseconds = Number("0.".concat(milliseconds !== null && milliseconds !== void 0 ? milliseconds : '000')) * 1000;
const parsedMilliseconds = Number(`0.${milliseconds ?? '000'}`) * 1000;
// edge-case: allow 24:00, but nothing over it

@@ -193,4 +186,4 @@ const parsedHours = Number(hours) === 24 && parsedMinutes === 0 && parsedSeconds === 0 && parsedMilliseconds === 0 ? 0 : Number(hours);

// NOTE: This string will be replaced on build time with the package version.
var version = "19.10.0";
var version = "19.11.0";
export { SafeHTMLElement$1 as SafeHTMLElement, canUseDOM, createSequentialId, filterAriaAttributes, filterDataAttributes, filterInvalidAttributes, getFieldId$1 as getFieldId, isNumberish, parseTime$1 as parseTime, useWarnDeprecatedComponent, useWarnDeprecatedProp, useWarning, version, warnDeprecatedComponent, warnDeprecatedProp, warning };
{
"name": "@commercetools-uikit/utils",
"description": "A collection of utilities shared across the other packages.",
"version": "0.0.0-canary-20240902123520",
"version": "0.0.0-canary-20240916085337",
"bugs": "https://github.com/commercetools/ui-kit/issues",

@@ -6,0 +6,0 @@ "repository": {

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