Socket
Socket
Sign inDemoInstall

rc-cascader

Package Overview
Dependencies
Maintainers
5
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-cascader - npm Package Compare versions

Comparing version 3.18.0 to 3.18.1

2

es/Panel.d.ts
import * as React from 'react';
import type { CascaderProps } from './Cascader';
export type PickType = 'value' | 'defaultValue' | 'changeOnSelect' | 'onChange' | 'options' | 'prefixCls' | 'checkable' | 'fieldNames' | 'showCheckedStrategy' | 'loadData' | 'expandTrigger' | 'expandIcon' | 'loadingIcon' | 'className' | 'style';
export type PickType = 'value' | 'defaultValue' | 'changeOnSelect' | 'onChange' | 'options' | 'prefixCls' | 'checkable' | 'fieldNames' | 'showCheckedStrategy' | 'loadData' | 'expandTrigger' | 'expandIcon' | 'loadingIcon' | 'className' | 'style' | 'direction' | 'notFoundContent';
export type PanelProps = Pick<CascaderProps, PickType>;
export default function Panel(props: PanelProps): React.JSX.Element;

@@ -0,1 +1,2 @@

import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";

@@ -15,2 +16,3 @@ import classNames from 'classnames';

export default function Panel(props) {
var _classNames;
var _ref = props,

@@ -33,3 +35,6 @@ _ref$prefixCls = _ref.prefixCls,

expandIcon = _ref$expandIcon === void 0 ? '>' : _ref$expandIcon,
loadingIcon = _ref.loadingIcon;
loadingIcon = _ref.loadingIcon,
direction = _ref.direction,
_ref$notFoundContent = _ref.notFoundContent,
notFoundContent = _ref$notFoundContent === void 0 ? 'Not Found' : _ref$notFoundContent;

@@ -117,8 +122,10 @@ // ======================== Multiple ========================

// ========================= Render =========================
var panelPrefixCls = "".concat(prefixCls, "-panel");
var isEmpty = !mergedOptions.length;
return /*#__PURE__*/React.createElement(CascaderContext.Provider, {
value: cascaderContext
}, /*#__PURE__*/React.createElement("div", {
className: classNames("".concat(prefixCls, "-panel"), className),
className: classNames(panelPrefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(panelPrefixCls, "-rtl"), direction === 'rtl'), _defineProperty(_classNames, "".concat(panelPrefixCls, "-empty"), isEmpty), _classNames), className),
style: style
}, /*#__PURE__*/React.createElement(RawOptionList, {
}, isEmpty ? notFoundContent : /*#__PURE__*/React.createElement(RawOptionList, {
prefixCls: prefixCls,

@@ -128,4 +135,5 @@ searchValue: null,

toggleOpen: noop,
open: true
open: true,
direction: direction
})));
}
import * as React from 'react';
import type { CascaderProps } from './Cascader';
export type PickType = 'value' | 'defaultValue' | 'changeOnSelect' | 'onChange' | 'options' | 'prefixCls' | 'checkable' | 'fieldNames' | 'showCheckedStrategy' | 'loadData' | 'expandTrigger' | 'expandIcon' | 'loadingIcon' | 'className' | 'style';
export type PickType = 'value' | 'defaultValue' | 'changeOnSelect' | 'onChange' | 'options' | 'prefixCls' | 'checkable' | 'fieldNames' | 'showCheckedStrategy' | 'loadData' | 'expandTrigger' | 'expandIcon' | 'loadingIcon' | 'className' | 'style' | 'direction' | 'notFoundContent';
export type PanelProps = Pick<CascaderProps, PickType>;
export default function Panel(props: PanelProps): React.JSX.Element;

@@ -9,2 +9,3 @@ "use strict";

exports.default = Panel;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));

@@ -26,2 +27,3 @@ var _classnames = _interopRequireDefault(require("classnames"));

function Panel(props) {
var _classNames;
var _ref = props,

@@ -44,3 +46,6 @@ _ref$prefixCls = _ref.prefixCls,

expandIcon = _ref$expandIcon === void 0 ? '>' : _ref$expandIcon,
loadingIcon = _ref.loadingIcon;
loadingIcon = _ref.loadingIcon,
direction = _ref.direction,
_ref$notFoundContent = _ref.notFoundContent,
notFoundContent = _ref$notFoundContent === void 0 ? 'Not Found' : _ref$notFoundContent;

@@ -128,8 +133,10 @@ // ======================== Multiple ========================

// ========================= Render =========================
var panelPrefixCls = "".concat(prefixCls, "-panel");
var isEmpty = !mergedOptions.length;
return /*#__PURE__*/React.createElement(_context.default.Provider, {
value: cascaderContext
}, /*#__PURE__*/React.createElement("div", {
className: (0, _classnames.default)("".concat(prefixCls, "-panel"), className),
className: (0, _classnames.default)(panelPrefixCls, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(panelPrefixCls, "-rtl"), direction === 'rtl'), (0, _defineProperty2.default)(_classNames, "".concat(panelPrefixCls, "-empty"), isEmpty), _classNames), className),
style: style
}, /*#__PURE__*/React.createElement(_List.default, {
}, isEmpty ? notFoundContent : /*#__PURE__*/React.createElement(_List.default, {
prefixCls: prefixCls,

@@ -139,4 +146,5 @@ searchValue: null,

toggleOpen: noop,
open: true
open: true,
direction: direction
})));
}
{
"name": "rc-cascader",
"version": "3.18.0",
"version": "3.18.1",
"description": "cascade select ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

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