@plesk/ui-library 3.25.7 → 3.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Drawer/Drawer.js +11 -6
- package/cjs/components/Drawer/Header.js +11 -4
- package/cjs/components/Icon/constants.js +2 -2
- package/cjs/components/Icon/images/symbols.svg +15 -1
- package/cjs/components/Item/Item.js +12 -3
- package/cjs/components/ItemLink/ItemLink.js +1 -0
- package/cjs/components/ItemList/ItemList.js +39 -8
- package/cjs/components/ItemList/ItemList.stories.js +35 -3
- package/cjs/components/ProgressStep/ProgressStep.js +16 -14
- package/cjs/components/Section/Section.js +14 -1
- package/cjs/index.js +1 -1
- package/dist/images/symbols.svg +15 -1
- package/dist/plesk-ui-library-rtl.css +1 -1
- package/dist/plesk-ui-library-rtl.css.map +1 -1
- package/dist/plesk-ui-library.css +1 -1
- package/dist/plesk-ui-library.css.map +1 -1
- package/dist/plesk-ui-library.js +106 -763
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +3 -3
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/Drawer/Drawer.js +11 -5
- package/esm/components/Drawer/Header.js +11 -4
- package/esm/components/Icon/constants.js +2 -2
- package/esm/components/Icon/images/symbols.svg +15 -1
- package/esm/components/Item/Item.js +12 -3
- package/esm/components/ItemLink/ItemLink.js +1 -0
- package/esm/components/ItemList/ItemList.js +39 -8
- package/esm/components/ItemList/ItemList.stories.js +32 -2
- package/esm/components/ProgressStep/ProgressStep.js +17 -15
- package/esm/components/Section/Section.js +14 -1
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/styleguide/build/bundle.0e0e8f42.js +2 -0
- package/styleguide/build/{bundle.91e6a6ac.js.LICENSE.txt → bundle.0e0e8f42.js.LICENSE.txt} +0 -0
- package/styleguide/images/symbols.svg +15 -1
- package/styleguide/index.html +2 -2
- package/types/src/components/Icon/constants.d.ts +1 -1
- package/types/src/components/ItemLink/ItemLink.d.ts +4 -0
- package/types/src/components/ItemLink/ItemLink.stories.d.ts +1 -0
- package/types/src/components/ItemList/ItemList.d.ts +8 -0
- package/types/src/components/ItemList/ItemList.stories.d.ts +104 -0
- package/styleguide/build/bundle.91e6a6ac.js +0 -2
package/dist/plesk-ui-library.js
CHANGED
|
@@ -6154,8 +6154,6 @@ var _Form = _interopRequireDefault(__webpack_require__(/*! ../Form */ "./compone
|
|
|
6154
6154
|
|
|
6155
6155
|
var _Heading = _interopRequireDefault(__webpack_require__(/*! ../Heading */ "./components/Heading/index.tsx"));
|
|
6156
6156
|
|
|
6157
|
-
var _Text = _interopRequireDefault(__webpack_require__(/*! ../Text */ "./components/Text/index.tsx"));
|
|
6158
|
-
|
|
6159
6157
|
var _Translate = __webpack_require__(/*! ../Translate */ "./components/Translate/index.js");
|
|
6160
6158
|
|
|
6161
6159
|
var _ScrollableElementFormContext = _interopRequireDefault(__webpack_require__(/*! ../Form/ScrollableElementFormContext */ "./components/Form/ScrollableElementFormContext.js"));
|
|
@@ -6206,6 +6204,12 @@ const propTypes = {
|
|
|
6206
6204
|
*/
|
|
6207
6205
|
backButton: _propTypes.default.bool,
|
|
6208
6206
|
|
|
6207
|
+
/**
|
|
6208
|
+
* A slot for `Tabs` component.
|
|
6209
|
+
* @since 3.26.0
|
|
6210
|
+
*/
|
|
6211
|
+
tabs: _propTypes.default.node,
|
|
6212
|
+
|
|
6209
6213
|
/**
|
|
6210
6214
|
* Overlay placement.
|
|
6211
6215
|
* @since 0.0.65
|
|
@@ -6321,6 +6325,7 @@ const defaultProps = {
|
|
|
6321
6325
|
subtitle: '',
|
|
6322
6326
|
backButton: undefined,
|
|
6323
6327
|
hideButton: undefined,
|
|
6328
|
+
tabs: undefined,
|
|
6324
6329
|
placement: 'left',
|
|
6325
6330
|
size: 'md',
|
|
6326
6331
|
onClose: null,
|
|
@@ -6347,6 +6352,7 @@ const Drawer = ({
|
|
|
6347
6352
|
subtitle,
|
|
6348
6353
|
backButton,
|
|
6349
6354
|
hideButton,
|
|
6355
|
+
tabs,
|
|
6350
6356
|
onClose,
|
|
6351
6357
|
form,
|
|
6352
6358
|
progress,
|
|
@@ -6439,7 +6445,8 @@ const Drawer = ({
|
|
|
6439
6445
|
}) => /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_Header.default, {
|
|
6440
6446
|
backButton: backButton,
|
|
6441
6447
|
hideButton: typeof hideButton === 'boolean' ? hideButton : Boolean(progress && !isClosable),
|
|
6442
|
-
onClose: onCloseWithConfirmation
|
|
6448
|
+
onClose: onCloseWithConfirmation,
|
|
6449
|
+
tabs: tabs
|
|
6443
6450
|
}, (0, _Translate.isLikeText)(title) ? /*#__PURE__*/_react.default.createElement(_Heading.default, {
|
|
6444
6451
|
level: "2",
|
|
6445
6452
|
className: `${baseClassName}__title`
|
|
@@ -6447,9 +6454,7 @@ const Drawer = ({
|
|
|
6447
6454
|
className: `${baseClassName}__title`
|
|
6448
6455
|
}, title), subtitle && /*#__PURE__*/_react.default.createElement("div", {
|
|
6449
6456
|
className: `${baseClassName}__subtitle`
|
|
6450
|
-
},
|
|
6451
|
-
intent: "muted"
|
|
6452
|
-
}, subtitle) : subtitle)), /*#__PURE__*/_react.default.createElement(_ScrollDirection.default, null, ({
|
|
6457
|
+
}, subtitle)), /*#__PURE__*/_react.default.createElement(_ScrollDirection.default, null, ({
|
|
6453
6458
|
handleScroll
|
|
6454
6459
|
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
6455
6460
|
className: `${baseClassName}__body`,
|
|
@@ -6760,6 +6765,7 @@ class Header extends _react.Component {
|
|
|
6760
6765
|
children,
|
|
6761
6766
|
backButton,
|
|
6762
6767
|
hideButton,
|
|
6768
|
+
tabs,
|
|
6763
6769
|
...props
|
|
6764
6770
|
} = this.props;
|
|
6765
6771
|
let prefix;
|
|
@@ -6793,7 +6799,11 @@ class Header extends _react.Component {
|
|
|
6793
6799
|
className: `${baseClassName}__inner`
|
|
6794
6800
|
}, prefix, /*#__PURE__*/_react.default.createElement("div", {
|
|
6795
6801
|
className: `${baseClassName}__content`
|
|
6796
|
-
}, children
|
|
6802
|
+
}, children, tabs && /*#__PURE__*/_react.default.createElement("div", {
|
|
6803
|
+
className: `${baseClassName}__tabs`
|
|
6804
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
6805
|
+
className: `${baseClassName}__tabs-inner`
|
|
6806
|
+
}, tabs))), suffix));
|
|
6797
6807
|
}
|
|
6798
6808
|
|
|
6799
6809
|
}
|
|
@@ -6805,14 +6815,16 @@ _defineProperty(Header, "propTypes", {
|
|
|
6805
6815
|
onClose: _propTypes.default.func,
|
|
6806
6816
|
children: _propTypes.default.node.isRequired,
|
|
6807
6817
|
backButton: _propTypes.default.bool,
|
|
6808
|
-
hideButton: _propTypes.default.bool
|
|
6818
|
+
hideButton: _propTypes.default.bool,
|
|
6819
|
+
tabs: _propTypes.default.node
|
|
6809
6820
|
});
|
|
6810
6821
|
|
|
6811
6822
|
_defineProperty(Header, "defaultProps", {
|
|
6812
6823
|
onClose: null,
|
|
6813
6824
|
baseClassName: `${_constants.CLS_PREFIX}drawer-header`,
|
|
6814
6825
|
backButton: false,
|
|
6815
|
-
hideButton: false
|
|
6826
|
+
hideButton: false,
|
|
6827
|
+
tabs: undefined
|
|
6816
6828
|
});
|
|
6817
6829
|
|
|
6818
6830
|
/***/ }),
|
|
@@ -11238,9 +11250,9 @@ exports.NAMES_12 = exports.NAMES = void 0;
|
|
|
11238
11250
|
|
|
11239
11251
|
/* eslint-disable max-len */
|
|
11240
11252
|
// This file is generated by create-svg-sprite. Do not edit.
|
|
11241
|
-
const NAMES_12 = ['archive', 'arrow-back', 'arrow-diagonal-out', 'arrow-down', 'arrow-down-in', 'arrow-down-out', 'arrow-down-tray', 'arrow-left', 'arrow-right', 'arrow-right-in', 'arrow-right-out', 'arrow-up', 'arrow-up-circle', 'arrow-up-in', 'arrow-up-in-cloud', 'arrow-up-out', 'arrow-up-tray', 'arrows-four-directions', 'arrows-inward', 'arrows-loop', 'arrows-opposite', 'arrows-outward', 'backup', 'backup2', 'bar-chart-vertical', 'bar-chart-vertical-arrow-up', 'bell', 'book-email', 'boundary', 'box-diagonal-bottom-in', 'box-diagonal-top-in', 'brush', 'bug', 'calendar', 'calendar-clock', 'camera', 'card', 'card-ribbon', 'card-row', 'card-tile', 'cd', 'cd-up-in-cloud', 'chain', 'chain-broken', 'chat', 'check-list', 'check-mark', 'check-mark-circle', 'check-mark-circle-filled', 'chevron-double-down', 'chevron-double-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'circle-diagonal', 'clean', 'clip', 'clock', 'clone', 'cloud', 'cloud-checkmark', 'cloud-crossed', 'cloud-graph', 'code', 'connection', 'console', 'console-filled', 'copy', 'copy-indicator', 'cpu', 'crane', 'credit-cards', 'cross-mark', 'cross-mark-circle', 'cross-mark-circle-filled', 'crown-transfer', 'dashboard', 'database', 'database-box', 'database-plus', 'deploy', 'dollar', 'dollar-filled', 'emoticon-confused', 'emoticon-dead', 'emoticon-excited', 'emoticon-happy', 'emoticon-neutral', 'emoticon-sad', 'emoticon-smile', 'enter', 'exclamation-mark-circle', 'exclamation-mark-circle-filled', 'eye', 'eye-closed', 'facebook', 'facebook-filled', 'feedback', 'filter', 'filter-check-mark', 'fire', 'flag-globe', 'floppy-disk', 'folder-closed', 'folder-key', 'folder-network', 'folder-open', 'folders-tree', 'four-squares', 'gear', 'git', 'github', 'globe', 'hard-drive', 'hard-drive-key', 'hat', 'hexagons', 'home', 'info-circle', 'info-circle-filled', 'ip-addresses', 'kebab', 'key', 'lifebuoy', 'lightbulb', 'limit', 'linux', 'list', 'list-check-mark', 'location', 'lock-closed', 'lock-closed-check', 'lock-closed-filled', 'lock-open', 'lock-open-cross', 'lock-open-filled', 'mail', 'mail-settings', 'megaphone', 'menu', 'menu-thin', 'microsoft', 'minimize', 'minus', 'minus-circle', 'minus-circle-filled', 'monitoring', 'monitoring-off', 'my-little-admin', 'net', 'nine-dots', 'node-js', 'package', 'panel', 'panel-check', 'panel-eye', 'panel-key', 'panel-settings', 'panels', 'pause-circle', 'pencil', 'pencil-dialog', 'php', 'phpmyadmin', 'pin', 'pipette', 'plans', 'plugins', 'plus', 'power', 'projects', 'puzzle', 'question-mark-circle', 'question-mark-circle-filled', 'ram', 'react-js', 'recycle', 'refresh', 'reload', 'remove', 'reset', 'resource', 'ribbon', 'rocket', 'ruby', 'sand-clock', 'scan', 'screen', 'search', 'security-check', 'send', 'servers', 'share', 'shield', 'shield-chain', 'shopping-cart', 'sidebar-right-hide', 'sidebar-right-show', 'signal-light', 'site-page', 'sleep', 'sliders', 'square-with-circles', 'star', 'star-circle-filled', 'star-filled', 'star-half-filled', 'start', 'start-circle', 'stop', 'stop-circle', 'storage', 'themes', 'three-dots-horizontal', 'three-dots-vertical', 'tools', 'transfer', 'triangle-exclamation-mark', 'triangle-exclamation-mark-filled', 'unarchive', 'user', 'volume', 'web', 'web-plus', 'web-settings', 'windows', 'wordpress'];
|
|
11253
|
+
const NAMES_12 = ['archive', 'arrow-back', 'arrow-diagonal-out', 'arrow-down', 'arrow-down-in', 'arrow-down-out', 'arrow-down-tray', 'arrow-left', 'arrow-right', 'arrow-right-in', 'arrow-right-out', 'arrow-up', 'arrow-up-circle', 'arrow-up-in', 'arrow-up-in-cloud', 'arrow-up-out', 'arrow-up-tray', 'arrows-four-directions', 'arrows-inward', 'arrows-loop', 'arrows-opposite', 'arrows-outward', 'backup', 'backup2', 'bar-chart-vertical', 'bar-chart-vertical-arrow-up', 'bell', 'book-email', 'boundary', 'box-diagonal-bottom-in', 'box-diagonal-top-in', 'brush', 'bug', 'calendar', 'calendar-clock', 'camera', 'card', 'card-ribbon', 'card-row', 'card-tile', 'cd', 'cd-up-in-cloud', 'chain', 'chain-broken', 'chat', 'check-list', 'check-mark', 'check-mark-circle', 'check-mark-circle-filled', 'chevron-double-down', 'chevron-double-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'circle-diagonal', 'clean', 'clip', 'clock', 'clone', 'cloud', 'cloud-checkmark', 'cloud-crossed', 'cloud-graph', 'code', 'connection', 'console', 'console-filled', 'copy', 'copy-indicator', 'cpu', 'crane', 'credit-cards', 'cross-mark', 'cross-mark-circle', 'cross-mark-circle-filled', 'crown-transfer', 'dashboard', 'database', 'database-box', 'database-plus', 'deploy', 'docker-filled', 'dollar', 'dollar-filled', 'dot', 'emoticon-confused', 'emoticon-dead', 'emoticon-excited', 'emoticon-happy', 'emoticon-neutral', 'emoticon-sad', 'emoticon-smile', 'enter', 'exclamation-mark-circle', 'exclamation-mark-circle-filled', 'eye', 'eye-closed', 'facebook', 'facebook-filled', 'feedback', 'filter', 'filter-check-mark', 'fire', 'flag-globe', 'floppy-disk', 'folder-closed', 'folder-key', 'folder-network', 'folder-open', 'folders-tree', 'four-squares', 'gear', 'git', 'github', 'globe', 'hard-drive', 'hard-drive-key', 'hat', 'hexagons', 'home', 'info-circle', 'info-circle-filled', 'ip-addresses', 'kebab', 'key', 'lifebuoy', 'lightbulb', 'limit', 'linux', 'list', 'list-check-mark', 'location', 'lock-closed', 'lock-closed-check', 'lock-closed-filled', 'lock-open', 'lock-open-cross', 'lock-open-filled', 'mail', 'mail-settings', 'megaphone', 'menu', 'menu-thin', 'microsoft', 'minimize', 'minus', 'minus-circle', 'minus-circle-filled', 'monitoring', 'monitoring-off', 'my-little-admin', 'net', 'nine-dots', 'node-js', 'package', 'panel', 'panel-check', 'panel-eye', 'panel-key', 'panel-settings', 'panels', 'pause-circle', 'pencil', 'pencil-dialog', 'php', 'phpmyadmin', 'pin', 'pipette', 'plans', 'plugins', 'plus', 'power', 'projects', 'puzzle', 'question-mark-circle', 'question-mark-circle-filled', 'ram', 'react-js', 'recycle', 'refresh', 'reload', 'remove', 'reset', 'resource', 'ribbon', 'rocket', 'ruby', 'sand-clock', 'scan', 'screen', 'search', 'security-check', 'send', 'servers', 'share', 'shield', 'shield-chain', 'shopping-cart', 'sidebar-right-hide', 'sidebar-right-show', 'signal-light', 'site-page', 'sleep', 'sliders', 'square-with-circles', 'star', 'star-circle-filled', 'star-filled', 'star-half-filled', 'start', 'start-circle', 'stop', 'stop-circle', 'storage', 'themes', 'three-dots-horizontal', 'three-dots-vertical', 'tools', 'transfer', 'triangle-exclamation-mark', 'triangle-exclamation-mark-filled', 'unarchive', 'user', 'volume', 'web', 'web-plus', 'web-settings', 'windows', 'wordpress'];
|
|
11242
11254
|
exports.NAMES_12 = NAMES_12;
|
|
11243
|
-
const NAMES = ['archive', 'arrow-back', 'arrow-diagonal-out', 'arrow-down', 'arrow-down-in', 'arrow-down-out', 'arrow-down-tray', 'arrow-left', 'arrow-right', 'arrow-right-in', 'arrow-right-out', 'arrow-up', 'arrow-up-circle', 'arrow-up-in', 'arrow-up-in-cloud', 'arrow-up-out', 'arrow-up-tray', 'arrows-four-directions', 'arrows-inward', 'arrows-loop', 'arrows-opposite', 'arrows-outward', 'backup', 'backup2', 'bar-chart-vertical', 'bar-chart-vertical-arrow-up', 'bell', 'book-email', 'boundary', 'box-diagonal-bottom-in', 'box-diagonal-top-in', 'brush', 'bug', 'calendar', 'calendar-clock', 'camera', 'card', 'card-ribbon', 'card-row', 'card-tile', 'cd', 'cd-up-in-cloud', 'chain', 'chain-broken', 'chat', 'check-list', 'check-mark', 'check-mark-circle', 'check-mark-circle-filled', 'chevron-double-down', 'chevron-double-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'circle-diagonal', 'clean', 'clip', 'clock', 'clone', 'cloud', 'cloud-checkmark', 'cloud-crossed', 'cloud-graph', 'code', 'connection', 'console', 'console-filled', 'copy', 'copy-indicator', 'cpu', 'crane', 'credit-cards', 'cross-mark', 'cross-mark-circle', 'cross-mark-circle-filled', 'crown-transfer', 'dashboard', 'database', 'database-box', 'database-plus', 'deploy', 'dollar', 'dollar-filled', 'emoticon-confused', 'emoticon-dead', 'emoticon-excited', 'emoticon-happy', 'emoticon-neutral', 'emoticon-sad', 'emoticon-smile', 'enter', 'exclamation-mark-circle', 'exclamation-mark-circle-filled', 'eye', 'eye-closed', 'facebook', 'facebook-filled', 'feedback', 'filter', 'filter-check-mark', 'fire', 'flag-globe', 'floppy-disk', 'folder-closed', 'folder-key', 'folder-network', 'folder-open', 'folders-tree', 'four-squares', 'gear', 'git', 'github', 'globe', 'hard-drive', 'hard-drive-key', 'hat', 'hexagons', 'home', 'info-circle', 'info-circle-filled', 'ip-addresses', 'kebab', 'key', 'lifebuoy', 'lightbulb', 'limit', 'linux', 'list', 'list-check-mark', 'location', 'lock-closed', 'lock-closed-check', 'lock-closed-filled', 'lock-open', 'lock-open-cross', 'lock-open-filled', 'mail', 'mail-settings', 'megaphone', 'menu', 'menu-thin', 'microsoft', 'minimize', 'minus', 'minus-circle', 'minus-circle-filled', 'monitoring', 'monitoring-off', 'my-little-admin', 'net', 'nine-dots', 'node-js', 'package', 'panel', 'panel-check', 'panel-eye', 'panel-key', 'panel-settings', 'panels', 'pause-circle', 'pencil', 'pencil-dialog', 'php', 'phpmyadmin', 'pin', 'pipette', 'plans', 'plugins', 'plus', 'power', 'projects', 'puzzle', 'question-mark-circle', 'question-mark-circle-filled', 'ram', 'react-js', 'recycle', 'refresh', 'reload', 'remove', 'reset', 'resource', 'ribbon', 'rocket', 'ruby', 'sand-clock', 'scan', 'screen', 'search', 'security-check', 'send', 'servers', 'share', 'shield', 'shield-chain', 'shopping-cart', 'sidebar-right-hide', 'sidebar-right-show', 'signal-light', 'site-page', 'sleep', 'sliders', 'square-with-circles', 'star', 'star-circle-filled', 'star-filled', 'star-half-filled', 'start', 'start-circle', 'stop', 'stop-circle', 'storage', 'themes', 'three-dots-horizontal', 'three-dots-vertical', 'tools', 'transfer', 'triangle-exclamation-mark', 'triangle-exclamation-mark-filled', 'unarchive', 'user', 'volume', 'web', 'web-plus', 'web-settings', 'windows', 'wordpress'];
|
|
11255
|
+
const NAMES = ['archive', 'arrow-back', 'arrow-diagonal-out', 'arrow-down', 'arrow-down-in', 'arrow-down-out', 'arrow-down-tray', 'arrow-left', 'arrow-right', 'arrow-right-in', 'arrow-right-out', 'arrow-up', 'arrow-up-circle', 'arrow-up-in', 'arrow-up-in-cloud', 'arrow-up-out', 'arrow-up-tray', 'arrows-four-directions', 'arrows-inward', 'arrows-loop', 'arrows-opposite', 'arrows-outward', 'backup', 'backup2', 'bar-chart-vertical', 'bar-chart-vertical-arrow-up', 'bell', 'book-email', 'boundary', 'box-diagonal-bottom-in', 'box-diagonal-top-in', 'brush', 'bug', 'calendar', 'calendar-clock', 'camera', 'card', 'card-ribbon', 'card-row', 'card-tile', 'cd', 'cd-up-in-cloud', 'chain', 'chain-broken', 'chat', 'check-list', 'check-mark', 'check-mark-circle', 'check-mark-circle-filled', 'chevron-double-down', 'chevron-double-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'circle-diagonal', 'clean', 'clip', 'clock', 'clone', 'cloud', 'cloud-checkmark', 'cloud-crossed', 'cloud-graph', 'code', 'connection', 'console', 'console-filled', 'copy', 'copy-indicator', 'cpu', 'crane', 'credit-cards', 'cross-mark', 'cross-mark-circle', 'cross-mark-circle-filled', 'crown-transfer', 'dashboard', 'database', 'database-box', 'database-plus', 'deploy', 'docker-filled', 'dollar', 'dollar-filled', 'dot', 'emoticon-confused', 'emoticon-dead', 'emoticon-excited', 'emoticon-happy', 'emoticon-neutral', 'emoticon-sad', 'emoticon-smile', 'enter', 'exclamation-mark-circle', 'exclamation-mark-circle-filled', 'eye', 'eye-closed', 'facebook', 'facebook-filled', 'feedback', 'filter', 'filter-check-mark', 'fire', 'flag-globe', 'floppy-disk', 'folder-closed', 'folder-key', 'folder-network', 'folder-open', 'folders-tree', 'four-squares', 'gear', 'git', 'github', 'globe', 'hard-drive', 'hard-drive-key', 'hat', 'hexagons', 'home', 'info-circle', 'info-circle-filled', 'ip-addresses', 'kebab', 'key', 'lifebuoy', 'lightbulb', 'limit', 'linux', 'list', 'list-check-mark', 'location', 'lock-closed', 'lock-closed-check', 'lock-closed-filled', 'lock-open', 'lock-open-cross', 'lock-open-filled', 'mail', 'mail-settings', 'megaphone', 'menu', 'menu-thin', 'microsoft', 'minimize', 'minus', 'minus-circle', 'minus-circle-filled', 'monitoring', 'monitoring-off', 'my-little-admin', 'net', 'nine-dots', 'node-js', 'package', 'panel', 'panel-check', 'panel-eye', 'panel-key', 'panel-settings', 'panels', 'pause-circle', 'pencil', 'pencil-dialog', 'php', 'phpmyadmin', 'pin', 'pipette', 'plans', 'plugins', 'plus', 'power', 'projects', 'puzzle', 'question-mark-circle', 'question-mark-circle-filled', 'ram', 'react-js', 'recycle', 'refresh', 'reload', 'remove', 'reset', 'resource', 'ribbon', 'rocket', 'ruby', 'sand-clock', 'scan', 'screen', 'search', 'security-check', 'send', 'servers', 'share', 'shield', 'shield-chain', 'shopping-cart', 'sidebar-right-hide', 'sidebar-right-show', 'signal-light', 'site-page', 'sleep', 'sliders', 'square-with-circles', 'star', 'star-circle-filled', 'star-filled', 'star-half-filled', 'start', 'start-circle', 'stop', 'stop-circle', 'storage', 'themes', 'three-dots-horizontal', 'three-dots-vertical', 'tools', 'transfer', 'triangle-exclamation-mark', 'triangle-exclamation-mark-filled', 'unarchive', 'user', 'volume', 'web', 'web-plus', 'web-settings', 'windows', 'wordpress'];
|
|
11244
11256
|
exports.NAMES = NAMES;
|
|
11245
11257
|
|
|
11246
11258
|
/***/ }),
|
|
@@ -12305,6 +12317,7 @@ class Item extends _react.Component {
|
|
|
12305
12317
|
value,
|
|
12306
12318
|
tooltip,
|
|
12307
12319
|
disabled,
|
|
12320
|
+
hoverable,
|
|
12308
12321
|
...props
|
|
12309
12322
|
} = this.props;
|
|
12310
12323
|
|
|
@@ -12325,7 +12338,8 @@ class Item extends _react.Component {
|
|
|
12325
12338
|
const item = /*#__PURE__*/_react.default.createElement(Tag, _extends({
|
|
12326
12339
|
className: (0, _classnames.default)(baseClassName, {
|
|
12327
12340
|
[`${baseClassName}--card`]: view === 'card',
|
|
12328
|
-
[`${baseClassName}--disabled`]: disabled
|
|
12341
|
+
[`${baseClassName}--disabled`]: disabled,
|
|
12342
|
+
[`${baseClassName}--hoverable`]: hoverable
|
|
12329
12343
|
}, className)
|
|
12330
12344
|
}, props), /*#__PURE__*/_react.default.createElement(_Media.default, {
|
|
12331
12345
|
image: this.renderIcon(icon),
|
|
@@ -12419,11 +12433,18 @@ Item.propTypes = {
|
|
|
12419
12433
|
* Whether disabled or not.
|
|
12420
12434
|
* @since 3.15.0
|
|
12421
12435
|
*/
|
|
12422
|
-
disabled: _propTypes.default.bool
|
|
12436
|
+
disabled: _propTypes.default.bool,
|
|
12437
|
+
|
|
12438
|
+
/**
|
|
12439
|
+
* Add hover shadow and pointer cursor.
|
|
12440
|
+
* @since 3.26.0
|
|
12441
|
+
*/
|
|
12442
|
+
hoverable: _propTypes.default.bool
|
|
12423
12443
|
};
|
|
12424
12444
|
Item.defaultProps = {
|
|
12425
12445
|
component: 'div',
|
|
12426
12446
|
view: VIEW_SIMPLE,
|
|
12447
|
+
hoverable: undefined,
|
|
12427
12448
|
title: undefined,
|
|
12428
12449
|
description: undefined,
|
|
12429
12450
|
icon: undefined,
|
|
@@ -12502,6 +12523,7 @@ const ItemLink = ({
|
|
|
12502
12523
|
baseClassName = `${_constants.CLS_PREFIX}item-link`,
|
|
12503
12524
|
className,
|
|
12504
12525
|
children,
|
|
12526
|
+
hoverable,
|
|
12505
12527
|
...props
|
|
12506
12528
|
}) => {
|
|
12507
12529
|
if (props.onClick) {
|
|
@@ -12626,7 +12648,8 @@ class ItemList extends _react.Component {
|
|
|
12626
12648
|
baseClassName,
|
|
12627
12649
|
selectable,
|
|
12628
12650
|
onSelect,
|
|
12629
|
-
reorderable
|
|
12651
|
+
reorderable,
|
|
12652
|
+
hoverable
|
|
12630
12653
|
} = this.props;
|
|
12631
12654
|
const classNameList = [`${baseClassName}__item`];
|
|
12632
12655
|
const props = {};
|
|
@@ -12651,6 +12674,11 @@ class ItemList extends _react.Component {
|
|
|
12651
12674
|
});
|
|
12652
12675
|
(0, _utils.safeInvoke)(onSelect, nextValue);
|
|
12653
12676
|
};
|
|
12677
|
+
} // Extends hoverable behavior from the ItemList in case if its child doesn't have its own
|
|
12678
|
+
|
|
12679
|
+
|
|
12680
|
+
if (item.props.hoverable === undefined) {
|
|
12681
|
+
props.hoverable = hoverable && this.canManageHoverableState();
|
|
12654
12682
|
}
|
|
12655
12683
|
|
|
12656
12684
|
if (reorderable) {
|
|
@@ -12743,20 +12771,45 @@ class ItemList extends _react.Component {
|
|
|
12743
12771
|
}));
|
|
12744
12772
|
}
|
|
12745
12773
|
|
|
12746
|
-
|
|
12747
|
-
const {
|
|
12748
|
-
children
|
|
12749
|
-
} = this.props;
|
|
12774
|
+
someChild(predicate) {
|
|
12750
12775
|
let result = false;
|
|
12751
12776
|
|
|
12752
|
-
_react.Children.forEach(children, child => {
|
|
12753
|
-
if (child && child
|
|
12777
|
+
_react.Children.forEach(this.props.children, child => {
|
|
12778
|
+
if (child && predicate(child)) {
|
|
12754
12779
|
result = true;
|
|
12755
12780
|
}
|
|
12756
12781
|
});
|
|
12757
12782
|
|
|
12758
12783
|
return result;
|
|
12759
12784
|
}
|
|
12785
|
+
/**
|
|
12786
|
+
* There are some states where we can't manage hoverable state
|
|
12787
|
+
*/
|
|
12788
|
+
|
|
12789
|
+
|
|
12790
|
+
canManageHoverableState() {
|
|
12791
|
+
const {
|
|
12792
|
+
reorderable,
|
|
12793
|
+
selectable
|
|
12794
|
+
} = this.props;
|
|
12795
|
+
return !reorderable && !selectable;
|
|
12796
|
+
}
|
|
12797
|
+
|
|
12798
|
+
isHoverable() {
|
|
12799
|
+
if (!this.canManageHoverableState()) {
|
|
12800
|
+
return false;
|
|
12801
|
+
}
|
|
12802
|
+
|
|
12803
|
+
return this.props.hoverable || this.hasHoverableCard();
|
|
12804
|
+
}
|
|
12805
|
+
|
|
12806
|
+
hasViewCard() {
|
|
12807
|
+
return this.someChild(child => child.props && child.props.view === 'card');
|
|
12808
|
+
}
|
|
12809
|
+
|
|
12810
|
+
hasHoverableCard() {
|
|
12811
|
+
return this.someChild(child => child.props && !!child.props.hoverable);
|
|
12812
|
+
}
|
|
12760
12813
|
|
|
12761
12814
|
renderReorderable({
|
|
12762
12815
|
baseClassName,
|
|
@@ -12815,7 +12868,7 @@ class ItemList extends _react.Component {
|
|
|
12815
12868
|
} = this.props;
|
|
12816
12869
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
12817
12870
|
className: (0, _classnames.default)(this.props.baseClassName, {
|
|
12818
|
-
[`${this.props.baseClassName}--hoverable`]:
|
|
12871
|
+
[`${this.props.baseClassName}--hoverable`]: this.isHoverable(),
|
|
12819
12872
|
[`${this.props.baseClassName}--stretchable`]: stretchable,
|
|
12820
12873
|
[`${this.props.baseClassName}--selectable`]: selectable,
|
|
12821
12874
|
[`${this.props.baseClassName}--cards`]: this.hasViewCard()
|
|
@@ -20240,39 +20293,39 @@ const ProgressStep = ({
|
|
|
20240
20293
|
switch (status) {
|
|
20241
20294
|
case STATUS_NOT_STARTED:
|
|
20242
20295
|
intent = 'inactive';
|
|
20243
|
-
icon =
|
|
20296
|
+
icon = 'dot';
|
|
20244
20297
|
break;
|
|
20245
20298
|
|
|
20246
20299
|
case STATUS_RUNNING:
|
|
20247
|
-
intent =
|
|
20248
|
-
icon =
|
|
20300
|
+
intent = false;
|
|
20301
|
+
icon = 'dot';
|
|
20249
20302
|
break;
|
|
20250
20303
|
|
|
20251
20304
|
case STATUS_DONE:
|
|
20252
20305
|
intent = 'success';
|
|
20253
|
-
icon = 'check-mark';
|
|
20306
|
+
icon = 'check-mark-circle-filled';
|
|
20254
20307
|
break;
|
|
20255
20308
|
|
|
20256
20309
|
case STATUS_WARNING:
|
|
20257
20310
|
intent = 'warning';
|
|
20258
|
-
icon = 'triangle-exclamation-mark';
|
|
20311
|
+
icon = 'triangle-exclamation-mark-filled';
|
|
20259
20312
|
break;
|
|
20260
20313
|
|
|
20261
20314
|
case STATUS_ERROR:
|
|
20262
20315
|
intent = 'danger';
|
|
20263
|
-
icon = 'exclamation-mark-circle';
|
|
20316
|
+
icon = 'exclamation-mark-circle-filled';
|
|
20264
20317
|
break;
|
|
20265
20318
|
|
|
20266
20319
|
case STATUS_CANCELED:
|
|
20267
20320
|
progress = 0;
|
|
20268
20321
|
intent = 'inactive';
|
|
20269
|
-
icon = 'cross-mark';
|
|
20322
|
+
icon = 'cross-mark-circle-filled';
|
|
20270
20323
|
break;
|
|
20271
20324
|
}
|
|
20272
20325
|
|
|
20273
20326
|
icon = _Icon.default.create(icon, {
|
|
20274
20327
|
className: `${baseClassName}__icon`,
|
|
20275
|
-
size: _Icon.
|
|
20328
|
+
size: _Icon.ICON_SIZE_16,
|
|
20276
20329
|
intent
|
|
20277
20330
|
});
|
|
20278
20331
|
|
|
@@ -20290,19 +20343,21 @@ const ProgressStep = ({
|
|
|
20290
20343
|
className: `${baseClassName}__media`
|
|
20291
20344
|
}, icon), /*#__PURE__*/_react.default.createElement("div", {
|
|
20292
20345
|
className: `${baseClassName}__body`
|
|
20293
|
-
}, (title || statusText) && /*#__PURE__*/_react.default.createElement("div", {
|
|
20346
|
+
}, (title || statusText || _react.Children.toArray(children).length > 0) && /*#__PURE__*/_react.default.createElement("div", {
|
|
20294
20347
|
className: `${baseClassName}__labels`
|
|
20348
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
20349
|
+
className: `${baseClassName}__labels-body`
|
|
20295
20350
|
}, title && /*#__PURE__*/_react.default.createElement("div", {
|
|
20296
20351
|
className: `${baseClassName}__title`
|
|
20297
|
-
}, title),
|
|
20352
|
+
}, title), _react.Children.toArray(children).length ? /*#__PURE__*/_react.default.createElement("div", {
|
|
20353
|
+
className: `${baseClassName}__content`
|
|
20354
|
+
}, children) : null), statusText && /*#__PURE__*/_react.default.createElement("div", {
|
|
20298
20355
|
className: `${baseClassName}__status`
|
|
20299
20356
|
}, statusText)), STATUS_RUNNING === status && /*#__PURE__*/_react.default.createElement(_ProgressBar.default, {
|
|
20300
20357
|
className: `${baseClassName}__progress`,
|
|
20301
20358
|
intent: "info",
|
|
20302
20359
|
progress: progress
|
|
20303
|
-
})
|
|
20304
|
-
className: `${baseClassName}__content`
|
|
20305
|
-
}, children) : null));
|
|
20360
|
+
})));
|
|
20306
20361
|
};
|
|
20307
20362
|
|
|
20308
20363
|
ProgressStep.propTypes = {
|
|
@@ -20781,7 +20836,11 @@ class Section extends _react.Component {
|
|
|
20781
20836
|
collapsed
|
|
20782
20837
|
}) => ({
|
|
20783
20838
|
collapsed: !collapsed
|
|
20784
|
-
}))
|
|
20839
|
+
}), () => {
|
|
20840
|
+
if (this.props.onToggle) {
|
|
20841
|
+
this.props.onToggle(this.state.collapsed);
|
|
20842
|
+
}
|
|
20843
|
+
});
|
|
20785
20844
|
});
|
|
20786
20845
|
}
|
|
20787
20846
|
|
|
@@ -20892,9 +20951,11 @@ class Section extends _react.Component {
|
|
|
20892
20951
|
collapsed,
|
|
20893
20952
|
onTitleChange,
|
|
20894
20953
|
onClose,
|
|
20954
|
+
onToggle,
|
|
20895
20955
|
buttons,
|
|
20896
20956
|
vertical: verticalProp,
|
|
20897
20957
|
children,
|
|
20958
|
+
form,
|
|
20898
20959
|
...props
|
|
20899
20960
|
} = this.props;
|
|
20900
20961
|
const vertical = verticalProp === undefined ? this.state.vertical : verticalProp;
|
|
@@ -20971,6 +21032,12 @@ const propTypes = {
|
|
|
20971
21032
|
*/
|
|
20972
21033
|
onClose: _propTypes.default.func,
|
|
20973
21034
|
|
|
21035
|
+
/**
|
|
21036
|
+
* A callback executed when the section collapsing.
|
|
21037
|
+
* @since 3.26.0
|
|
21038
|
+
*/
|
|
21039
|
+
onToggle: _propTypes.default.func,
|
|
21040
|
+
|
|
20974
21041
|
/**
|
|
20975
21042
|
* Array of custom section action button at the right.
|
|
20976
21043
|
* @since 0.0.54
|
|
@@ -21012,6 +21079,7 @@ const defaultProps = {
|
|
|
21012
21079
|
collapsed: false,
|
|
21013
21080
|
onTitleChange: undefined,
|
|
21014
21081
|
onClose: undefined,
|
|
21082
|
+
onToggle: undefined,
|
|
21015
21083
|
buttons: undefined,
|
|
21016
21084
|
vertical: undefined,
|
|
21017
21085
|
children: undefined,
|
|
@@ -85043,7 +85111,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
85043
85111
|
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "../node_modules/react-measure/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");
|
|
85044
85112
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
85045
85113
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
85046
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "../node_modules/
|
|
85114
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
|
|
85047
85115
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
|
85048
85116
|
/* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! resize-observer-polyfill */ "../node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js");
|
|
85049
85117
|
|
|
@@ -85263,731 +85331,6 @@ Measure.propTypes.children = (prop_types__WEBPACK_IMPORTED_MODULE_4___default().
|
|
|
85263
85331
|
|
|
85264
85332
|
|
|
85265
85333
|
|
|
85266
|
-
/***/ }),
|
|
85267
|
-
|
|
85268
|
-
/***/ "../node_modules/react-measure/node_modules/prop-types/checkPropTypes.js":
|
|
85269
|
-
/*!*******************************************************************************!*\
|
|
85270
|
-
!*** ../node_modules/react-measure/node_modules/prop-types/checkPropTypes.js ***!
|
|
85271
|
-
\*******************************************************************************/
|
|
85272
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
85273
|
-
|
|
85274
|
-
"use strict";
|
|
85275
|
-
/**
|
|
85276
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
85277
|
-
*
|
|
85278
|
-
* This source code is licensed under the MIT license found in the
|
|
85279
|
-
* LICENSE file in the root directory of this source tree.
|
|
85280
|
-
*/
|
|
85281
|
-
|
|
85282
|
-
|
|
85283
|
-
|
|
85284
|
-
var printWarning = function() {};
|
|
85285
|
-
|
|
85286
|
-
if (true) {
|
|
85287
|
-
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/react-measure/node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
|
85288
|
-
var loggedTypeFailures = {};
|
|
85289
|
-
|
|
85290
|
-
printWarning = function(text) {
|
|
85291
|
-
var message = 'Warning: ' + text;
|
|
85292
|
-
if (typeof console !== 'undefined') {
|
|
85293
|
-
console.error(message);
|
|
85294
|
-
}
|
|
85295
|
-
try {
|
|
85296
|
-
// --- Welcome to debugging React ---
|
|
85297
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
85298
|
-
// to find the callsite that caused this warning to fire.
|
|
85299
|
-
throw new Error(message);
|
|
85300
|
-
} catch (x) {}
|
|
85301
|
-
};
|
|
85302
|
-
}
|
|
85303
|
-
|
|
85304
|
-
/**
|
|
85305
|
-
* Assert that the values match with the type specs.
|
|
85306
|
-
* Error messages are memorized and will only be shown once.
|
|
85307
|
-
*
|
|
85308
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
85309
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
85310
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
85311
|
-
* @param {string} componentName Name of the component for error messages.
|
|
85312
|
-
* @param {?Function} getStack Returns the component stack.
|
|
85313
|
-
* @private
|
|
85314
|
-
*/
|
|
85315
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
85316
|
-
if (true) {
|
|
85317
|
-
for (var typeSpecName in typeSpecs) {
|
|
85318
|
-
if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
|
85319
|
-
var error;
|
|
85320
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
85321
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
85322
|
-
// After these have been cleaned up, we'll let them throw.
|
|
85323
|
-
try {
|
|
85324
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
85325
|
-
// behavior as without this statement except with a better message.
|
|
85326
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
85327
|
-
var err = Error(
|
|
85328
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
85329
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
85330
|
-
);
|
|
85331
|
-
err.name = 'Invariant Violation';
|
|
85332
|
-
throw err;
|
|
85333
|
-
}
|
|
85334
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
85335
|
-
} catch (ex) {
|
|
85336
|
-
error = ex;
|
|
85337
|
-
}
|
|
85338
|
-
if (error && !(error instanceof Error)) {
|
|
85339
|
-
printWarning(
|
|
85340
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
85341
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
85342
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
85343
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
85344
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
85345
|
-
'shape all require an argument).'
|
|
85346
|
-
)
|
|
85347
|
-
|
|
85348
|
-
}
|
|
85349
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
85350
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
85351
|
-
// same error.
|
|
85352
|
-
loggedTypeFailures[error.message] = true;
|
|
85353
|
-
|
|
85354
|
-
var stack = getStack ? getStack() : '';
|
|
85355
|
-
|
|
85356
|
-
printWarning(
|
|
85357
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
85358
|
-
);
|
|
85359
|
-
}
|
|
85360
|
-
}
|
|
85361
|
-
}
|
|
85362
|
-
}
|
|
85363
|
-
}
|
|
85364
|
-
|
|
85365
|
-
module.exports = checkPropTypes;
|
|
85366
|
-
|
|
85367
|
-
|
|
85368
|
-
/***/ }),
|
|
85369
|
-
|
|
85370
|
-
/***/ "../node_modules/react-measure/node_modules/prop-types/factoryWithTypeCheckers.js":
|
|
85371
|
-
/*!****************************************************************************************!*\
|
|
85372
|
-
!*** ../node_modules/react-measure/node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
|
85373
|
-
\****************************************************************************************/
|
|
85374
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
85375
|
-
|
|
85376
|
-
"use strict";
|
|
85377
|
-
/**
|
|
85378
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
85379
|
-
*
|
|
85380
|
-
* This source code is licensed under the MIT license found in the
|
|
85381
|
-
* LICENSE file in the root directory of this source tree.
|
|
85382
|
-
*/
|
|
85383
|
-
|
|
85384
|
-
|
|
85385
|
-
|
|
85386
|
-
var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
|
|
85387
|
-
|
|
85388
|
-
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/react-measure/node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
|
85389
|
-
var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/react-measure/node_modules/prop-types/checkPropTypes.js");
|
|
85390
|
-
|
|
85391
|
-
var printWarning = function() {};
|
|
85392
|
-
|
|
85393
|
-
if (true) {
|
|
85394
|
-
printWarning = function(text) {
|
|
85395
|
-
var message = 'Warning: ' + text;
|
|
85396
|
-
if (typeof console !== 'undefined') {
|
|
85397
|
-
console.error(message);
|
|
85398
|
-
}
|
|
85399
|
-
try {
|
|
85400
|
-
// --- Welcome to debugging React ---
|
|
85401
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
85402
|
-
// to find the callsite that caused this warning to fire.
|
|
85403
|
-
throw new Error(message);
|
|
85404
|
-
} catch (x) {}
|
|
85405
|
-
};
|
|
85406
|
-
}
|
|
85407
|
-
|
|
85408
|
-
function emptyFunctionThatReturnsNull() {
|
|
85409
|
-
return null;
|
|
85410
|
-
}
|
|
85411
|
-
|
|
85412
|
-
module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
85413
|
-
/* global Symbol */
|
|
85414
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
85415
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
85416
|
-
|
|
85417
|
-
/**
|
|
85418
|
-
* Returns the iterator method function contained on the iterable object.
|
|
85419
|
-
*
|
|
85420
|
-
* Be sure to invoke the function with the iterable as context:
|
|
85421
|
-
*
|
|
85422
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
85423
|
-
* if (iteratorFn) {
|
|
85424
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
85425
|
-
* ...
|
|
85426
|
-
* }
|
|
85427
|
-
*
|
|
85428
|
-
* @param {?object} maybeIterable
|
|
85429
|
-
* @return {?function}
|
|
85430
|
-
*/
|
|
85431
|
-
function getIteratorFn(maybeIterable) {
|
|
85432
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
85433
|
-
if (typeof iteratorFn === 'function') {
|
|
85434
|
-
return iteratorFn;
|
|
85435
|
-
}
|
|
85436
|
-
}
|
|
85437
|
-
|
|
85438
|
-
/**
|
|
85439
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
85440
|
-
* supplied to React components. Example usage:
|
|
85441
|
-
*
|
|
85442
|
-
* var Props = require('ReactPropTypes');
|
|
85443
|
-
* var MyArticle = React.createClass({
|
|
85444
|
-
* propTypes: {
|
|
85445
|
-
* // An optional string prop named "description".
|
|
85446
|
-
* description: Props.string,
|
|
85447
|
-
*
|
|
85448
|
-
* // A required enum prop named "category".
|
|
85449
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
85450
|
-
*
|
|
85451
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
85452
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
85453
|
-
* },
|
|
85454
|
-
* render: function() { ... }
|
|
85455
|
-
* });
|
|
85456
|
-
*
|
|
85457
|
-
* A more formal specification of how these methods are used:
|
|
85458
|
-
*
|
|
85459
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
85460
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
85461
|
-
*
|
|
85462
|
-
* Each and every declaration produces a function with the same signature. This
|
|
85463
|
-
* allows the creation of custom validation functions. For example:
|
|
85464
|
-
*
|
|
85465
|
-
* var MyLink = React.createClass({
|
|
85466
|
-
* propTypes: {
|
|
85467
|
-
* // An optional string or URI prop named "href".
|
|
85468
|
-
* href: function(props, propName, componentName) {
|
|
85469
|
-
* var propValue = props[propName];
|
|
85470
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
85471
|
-
* !(propValue instanceof URI)) {
|
|
85472
|
-
* return new Error(
|
|
85473
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
85474
|
-
* componentName
|
|
85475
|
-
* );
|
|
85476
|
-
* }
|
|
85477
|
-
* }
|
|
85478
|
-
* },
|
|
85479
|
-
* render: function() {...}
|
|
85480
|
-
* });
|
|
85481
|
-
*
|
|
85482
|
-
* @internal
|
|
85483
|
-
*/
|
|
85484
|
-
|
|
85485
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
85486
|
-
|
|
85487
|
-
// Important!
|
|
85488
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
85489
|
-
var ReactPropTypes = {
|
|
85490
|
-
array: createPrimitiveTypeChecker('array'),
|
|
85491
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
85492
|
-
func: createPrimitiveTypeChecker('function'),
|
|
85493
|
-
number: createPrimitiveTypeChecker('number'),
|
|
85494
|
-
object: createPrimitiveTypeChecker('object'),
|
|
85495
|
-
string: createPrimitiveTypeChecker('string'),
|
|
85496
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
85497
|
-
|
|
85498
|
-
any: createAnyTypeChecker(),
|
|
85499
|
-
arrayOf: createArrayOfTypeChecker,
|
|
85500
|
-
element: createElementTypeChecker(),
|
|
85501
|
-
instanceOf: createInstanceTypeChecker,
|
|
85502
|
-
node: createNodeChecker(),
|
|
85503
|
-
objectOf: createObjectOfTypeChecker,
|
|
85504
|
-
oneOf: createEnumTypeChecker,
|
|
85505
|
-
oneOfType: createUnionTypeChecker,
|
|
85506
|
-
shape: createShapeTypeChecker,
|
|
85507
|
-
exact: createStrictShapeTypeChecker,
|
|
85508
|
-
};
|
|
85509
|
-
|
|
85510
|
-
/**
|
|
85511
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
85512
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
85513
|
-
*/
|
|
85514
|
-
/*eslint-disable no-self-compare*/
|
|
85515
|
-
function is(x, y) {
|
|
85516
|
-
// SameValue algorithm
|
|
85517
|
-
if (x === y) {
|
|
85518
|
-
// Steps 1-5, 7-10
|
|
85519
|
-
// Steps 6.b-6.e: +0 != -0
|
|
85520
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
85521
|
-
} else {
|
|
85522
|
-
// Step 6.a: NaN == NaN
|
|
85523
|
-
return x !== x && y !== y;
|
|
85524
|
-
}
|
|
85525
|
-
}
|
|
85526
|
-
/*eslint-enable no-self-compare*/
|
|
85527
|
-
|
|
85528
|
-
/**
|
|
85529
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
85530
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
85531
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
85532
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
85533
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
85534
|
-
*/
|
|
85535
|
-
function PropTypeError(message) {
|
|
85536
|
-
this.message = message;
|
|
85537
|
-
this.stack = '';
|
|
85538
|
-
}
|
|
85539
|
-
// Make `instanceof Error` still work for returned errors.
|
|
85540
|
-
PropTypeError.prototype = Error.prototype;
|
|
85541
|
-
|
|
85542
|
-
function createChainableTypeChecker(validate) {
|
|
85543
|
-
if (true) {
|
|
85544
|
-
var manualPropTypeCallCache = {};
|
|
85545
|
-
var manualPropTypeWarningCount = 0;
|
|
85546
|
-
}
|
|
85547
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
85548
|
-
componentName = componentName || ANONYMOUS;
|
|
85549
|
-
propFullName = propFullName || propName;
|
|
85550
|
-
|
|
85551
|
-
if (secret !== ReactPropTypesSecret) {
|
|
85552
|
-
if (throwOnDirectAccess) {
|
|
85553
|
-
// New behavior only for users of `prop-types` package
|
|
85554
|
-
var err = new Error(
|
|
85555
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
85556
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
85557
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
85558
|
-
);
|
|
85559
|
-
err.name = 'Invariant Violation';
|
|
85560
|
-
throw err;
|
|
85561
|
-
} else if ( true && typeof console !== 'undefined') {
|
|
85562
|
-
// Old behavior for people using React.PropTypes
|
|
85563
|
-
var cacheKey = componentName + ':' + propName;
|
|
85564
|
-
if (
|
|
85565
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
85566
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
85567
|
-
manualPropTypeWarningCount < 3
|
|
85568
|
-
) {
|
|
85569
|
-
printWarning(
|
|
85570
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
85571
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
85572
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
85573
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
85574
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
85575
|
-
);
|
|
85576
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
85577
|
-
manualPropTypeWarningCount++;
|
|
85578
|
-
}
|
|
85579
|
-
}
|
|
85580
|
-
}
|
|
85581
|
-
if (props[propName] == null) {
|
|
85582
|
-
if (isRequired) {
|
|
85583
|
-
if (props[propName] === null) {
|
|
85584
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
85585
|
-
}
|
|
85586
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
85587
|
-
}
|
|
85588
|
-
return null;
|
|
85589
|
-
} else {
|
|
85590
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
85591
|
-
}
|
|
85592
|
-
}
|
|
85593
|
-
|
|
85594
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
85595
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
85596
|
-
|
|
85597
|
-
return chainedCheckType;
|
|
85598
|
-
}
|
|
85599
|
-
|
|
85600
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
85601
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
85602
|
-
var propValue = props[propName];
|
|
85603
|
-
var propType = getPropType(propValue);
|
|
85604
|
-
if (propType !== expectedType) {
|
|
85605
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
85606
|
-
// check, but we can offer a more precise error message here rather than
|
|
85607
|
-
// 'of type `object`'.
|
|
85608
|
-
var preciseType = getPreciseType(propValue);
|
|
85609
|
-
|
|
85610
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
85611
|
-
}
|
|
85612
|
-
return null;
|
|
85613
|
-
}
|
|
85614
|
-
return createChainableTypeChecker(validate);
|
|
85615
|
-
}
|
|
85616
|
-
|
|
85617
|
-
function createAnyTypeChecker() {
|
|
85618
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
85619
|
-
}
|
|
85620
|
-
|
|
85621
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
85622
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
85623
|
-
if (typeof typeChecker !== 'function') {
|
|
85624
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
85625
|
-
}
|
|
85626
|
-
var propValue = props[propName];
|
|
85627
|
-
if (!Array.isArray(propValue)) {
|
|
85628
|
-
var propType = getPropType(propValue);
|
|
85629
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
85630
|
-
}
|
|
85631
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
85632
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
85633
|
-
if (error instanceof Error) {
|
|
85634
|
-
return error;
|
|
85635
|
-
}
|
|
85636
|
-
}
|
|
85637
|
-
return null;
|
|
85638
|
-
}
|
|
85639
|
-
return createChainableTypeChecker(validate);
|
|
85640
|
-
}
|
|
85641
|
-
|
|
85642
|
-
function createElementTypeChecker() {
|
|
85643
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
85644
|
-
var propValue = props[propName];
|
|
85645
|
-
if (!isValidElement(propValue)) {
|
|
85646
|
-
var propType = getPropType(propValue);
|
|
85647
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
85648
|
-
}
|
|
85649
|
-
return null;
|
|
85650
|
-
}
|
|
85651
|
-
return createChainableTypeChecker(validate);
|
|
85652
|
-
}
|
|
85653
|
-
|
|
85654
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
85655
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
85656
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
85657
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
85658
|
-
var actualClassName = getClassName(props[propName]);
|
|
85659
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
85660
|
-
}
|
|
85661
|
-
return null;
|
|
85662
|
-
}
|
|
85663
|
-
return createChainableTypeChecker(validate);
|
|
85664
|
-
}
|
|
85665
|
-
|
|
85666
|
-
function createEnumTypeChecker(expectedValues) {
|
|
85667
|
-
if (!Array.isArray(expectedValues)) {
|
|
85668
|
-
true ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : 0;
|
|
85669
|
-
return emptyFunctionThatReturnsNull;
|
|
85670
|
-
}
|
|
85671
|
-
|
|
85672
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
85673
|
-
var propValue = props[propName];
|
|
85674
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
85675
|
-
if (is(propValue, expectedValues[i])) {
|
|
85676
|
-
return null;
|
|
85677
|
-
}
|
|
85678
|
-
}
|
|
85679
|
-
|
|
85680
|
-
var valuesString = JSON.stringify(expectedValues);
|
|
85681
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
85682
|
-
}
|
|
85683
|
-
return createChainableTypeChecker(validate);
|
|
85684
|
-
}
|
|
85685
|
-
|
|
85686
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
85687
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
85688
|
-
if (typeof typeChecker !== 'function') {
|
|
85689
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
85690
|
-
}
|
|
85691
|
-
var propValue = props[propName];
|
|
85692
|
-
var propType = getPropType(propValue);
|
|
85693
|
-
if (propType !== 'object') {
|
|
85694
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
85695
|
-
}
|
|
85696
|
-
for (var key in propValue) {
|
|
85697
|
-
if (propValue.hasOwnProperty(key)) {
|
|
85698
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
85699
|
-
if (error instanceof Error) {
|
|
85700
|
-
return error;
|
|
85701
|
-
}
|
|
85702
|
-
}
|
|
85703
|
-
}
|
|
85704
|
-
return null;
|
|
85705
|
-
}
|
|
85706
|
-
return createChainableTypeChecker(validate);
|
|
85707
|
-
}
|
|
85708
|
-
|
|
85709
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
85710
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
85711
|
-
true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
|
|
85712
|
-
return emptyFunctionThatReturnsNull;
|
|
85713
|
-
}
|
|
85714
|
-
|
|
85715
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
85716
|
-
var checker = arrayOfTypeCheckers[i];
|
|
85717
|
-
if (typeof checker !== 'function') {
|
|
85718
|
-
printWarning(
|
|
85719
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
85720
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
85721
|
-
);
|
|
85722
|
-
return emptyFunctionThatReturnsNull;
|
|
85723
|
-
}
|
|
85724
|
-
}
|
|
85725
|
-
|
|
85726
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
85727
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
85728
|
-
var checker = arrayOfTypeCheckers[i];
|
|
85729
|
-
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
|
85730
|
-
return null;
|
|
85731
|
-
}
|
|
85732
|
-
}
|
|
85733
|
-
|
|
85734
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
85735
|
-
}
|
|
85736
|
-
return createChainableTypeChecker(validate);
|
|
85737
|
-
}
|
|
85738
|
-
|
|
85739
|
-
function createNodeChecker() {
|
|
85740
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
85741
|
-
if (!isNode(props[propName])) {
|
|
85742
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
85743
|
-
}
|
|
85744
|
-
return null;
|
|
85745
|
-
}
|
|
85746
|
-
return createChainableTypeChecker(validate);
|
|
85747
|
-
}
|
|
85748
|
-
|
|
85749
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
85750
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
85751
|
-
var propValue = props[propName];
|
|
85752
|
-
var propType = getPropType(propValue);
|
|
85753
|
-
if (propType !== 'object') {
|
|
85754
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
85755
|
-
}
|
|
85756
|
-
for (var key in shapeTypes) {
|
|
85757
|
-
var checker = shapeTypes[key];
|
|
85758
|
-
if (!checker) {
|
|
85759
|
-
continue;
|
|
85760
|
-
}
|
|
85761
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
85762
|
-
if (error) {
|
|
85763
|
-
return error;
|
|
85764
|
-
}
|
|
85765
|
-
}
|
|
85766
|
-
return null;
|
|
85767
|
-
}
|
|
85768
|
-
return createChainableTypeChecker(validate);
|
|
85769
|
-
}
|
|
85770
|
-
|
|
85771
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
85772
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
85773
|
-
var propValue = props[propName];
|
|
85774
|
-
var propType = getPropType(propValue);
|
|
85775
|
-
if (propType !== 'object') {
|
|
85776
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
85777
|
-
}
|
|
85778
|
-
// We need to check all keys in case some are required but missing from
|
|
85779
|
-
// props.
|
|
85780
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
85781
|
-
for (var key in allKeys) {
|
|
85782
|
-
var checker = shapeTypes[key];
|
|
85783
|
-
if (!checker) {
|
|
85784
|
-
return new PropTypeError(
|
|
85785
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
85786
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
85787
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
85788
|
-
);
|
|
85789
|
-
}
|
|
85790
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
85791
|
-
if (error) {
|
|
85792
|
-
return error;
|
|
85793
|
-
}
|
|
85794
|
-
}
|
|
85795
|
-
return null;
|
|
85796
|
-
}
|
|
85797
|
-
|
|
85798
|
-
return createChainableTypeChecker(validate);
|
|
85799
|
-
}
|
|
85800
|
-
|
|
85801
|
-
function isNode(propValue) {
|
|
85802
|
-
switch (typeof propValue) {
|
|
85803
|
-
case 'number':
|
|
85804
|
-
case 'string':
|
|
85805
|
-
case 'undefined':
|
|
85806
|
-
return true;
|
|
85807
|
-
case 'boolean':
|
|
85808
|
-
return !propValue;
|
|
85809
|
-
case 'object':
|
|
85810
|
-
if (Array.isArray(propValue)) {
|
|
85811
|
-
return propValue.every(isNode);
|
|
85812
|
-
}
|
|
85813
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
85814
|
-
return true;
|
|
85815
|
-
}
|
|
85816
|
-
|
|
85817
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
85818
|
-
if (iteratorFn) {
|
|
85819
|
-
var iterator = iteratorFn.call(propValue);
|
|
85820
|
-
var step;
|
|
85821
|
-
if (iteratorFn !== propValue.entries) {
|
|
85822
|
-
while (!(step = iterator.next()).done) {
|
|
85823
|
-
if (!isNode(step.value)) {
|
|
85824
|
-
return false;
|
|
85825
|
-
}
|
|
85826
|
-
}
|
|
85827
|
-
} else {
|
|
85828
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
85829
|
-
while (!(step = iterator.next()).done) {
|
|
85830
|
-
var entry = step.value;
|
|
85831
|
-
if (entry) {
|
|
85832
|
-
if (!isNode(entry[1])) {
|
|
85833
|
-
return false;
|
|
85834
|
-
}
|
|
85835
|
-
}
|
|
85836
|
-
}
|
|
85837
|
-
}
|
|
85838
|
-
} else {
|
|
85839
|
-
return false;
|
|
85840
|
-
}
|
|
85841
|
-
|
|
85842
|
-
return true;
|
|
85843
|
-
default:
|
|
85844
|
-
return false;
|
|
85845
|
-
}
|
|
85846
|
-
}
|
|
85847
|
-
|
|
85848
|
-
function isSymbol(propType, propValue) {
|
|
85849
|
-
// Native Symbol.
|
|
85850
|
-
if (propType === 'symbol') {
|
|
85851
|
-
return true;
|
|
85852
|
-
}
|
|
85853
|
-
|
|
85854
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
85855
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
85856
|
-
return true;
|
|
85857
|
-
}
|
|
85858
|
-
|
|
85859
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
85860
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
85861
|
-
return true;
|
|
85862
|
-
}
|
|
85863
|
-
|
|
85864
|
-
return false;
|
|
85865
|
-
}
|
|
85866
|
-
|
|
85867
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
85868
|
-
function getPropType(propValue) {
|
|
85869
|
-
var propType = typeof propValue;
|
|
85870
|
-
if (Array.isArray(propValue)) {
|
|
85871
|
-
return 'array';
|
|
85872
|
-
}
|
|
85873
|
-
if (propValue instanceof RegExp) {
|
|
85874
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
85875
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
85876
|
-
// passes PropTypes.object.
|
|
85877
|
-
return 'object';
|
|
85878
|
-
}
|
|
85879
|
-
if (isSymbol(propType, propValue)) {
|
|
85880
|
-
return 'symbol';
|
|
85881
|
-
}
|
|
85882
|
-
return propType;
|
|
85883
|
-
}
|
|
85884
|
-
|
|
85885
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
85886
|
-
// See `createPrimitiveTypeChecker`.
|
|
85887
|
-
function getPreciseType(propValue) {
|
|
85888
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
85889
|
-
return '' + propValue;
|
|
85890
|
-
}
|
|
85891
|
-
var propType = getPropType(propValue);
|
|
85892
|
-
if (propType === 'object') {
|
|
85893
|
-
if (propValue instanceof Date) {
|
|
85894
|
-
return 'date';
|
|
85895
|
-
} else if (propValue instanceof RegExp) {
|
|
85896
|
-
return 'regexp';
|
|
85897
|
-
}
|
|
85898
|
-
}
|
|
85899
|
-
return propType;
|
|
85900
|
-
}
|
|
85901
|
-
|
|
85902
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
85903
|
-
// For example, "undefined" or "of type array"
|
|
85904
|
-
function getPostfixForTypeWarning(value) {
|
|
85905
|
-
var type = getPreciseType(value);
|
|
85906
|
-
switch (type) {
|
|
85907
|
-
case 'array':
|
|
85908
|
-
case 'object':
|
|
85909
|
-
return 'an ' + type;
|
|
85910
|
-
case 'boolean':
|
|
85911
|
-
case 'date':
|
|
85912
|
-
case 'regexp':
|
|
85913
|
-
return 'a ' + type;
|
|
85914
|
-
default:
|
|
85915
|
-
return type;
|
|
85916
|
-
}
|
|
85917
|
-
}
|
|
85918
|
-
|
|
85919
|
-
// Returns class name of the object, if any.
|
|
85920
|
-
function getClassName(propValue) {
|
|
85921
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
85922
|
-
return ANONYMOUS;
|
|
85923
|
-
}
|
|
85924
|
-
return propValue.constructor.name;
|
|
85925
|
-
}
|
|
85926
|
-
|
|
85927
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
85928
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
85929
|
-
|
|
85930
|
-
return ReactPropTypes;
|
|
85931
|
-
};
|
|
85932
|
-
|
|
85933
|
-
|
|
85934
|
-
/***/ }),
|
|
85935
|
-
|
|
85936
|
-
/***/ "../node_modules/react-measure/node_modules/prop-types/index.js":
|
|
85937
|
-
/*!**********************************************************************!*\
|
|
85938
|
-
!*** ../node_modules/react-measure/node_modules/prop-types/index.js ***!
|
|
85939
|
-
\**********************************************************************/
|
|
85940
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
85941
|
-
|
|
85942
|
-
/**
|
|
85943
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
85944
|
-
*
|
|
85945
|
-
* This source code is licensed under the MIT license found in the
|
|
85946
|
-
* LICENSE file in the root directory of this source tree.
|
|
85947
|
-
*/
|
|
85948
|
-
|
|
85949
|
-
if (true) {
|
|
85950
|
-
var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
|
|
85951
|
-
Symbol.for &&
|
|
85952
|
-
Symbol.for('react.element')) ||
|
|
85953
|
-
0xeac7;
|
|
85954
|
-
|
|
85955
|
-
var isValidElement = function(object) {
|
|
85956
|
-
return typeof object === 'object' &&
|
|
85957
|
-
object !== null &&
|
|
85958
|
-
object.$$typeof === REACT_ELEMENT_TYPE;
|
|
85959
|
-
};
|
|
85960
|
-
|
|
85961
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
85962
|
-
// http://fb.me/prop-types-in-prod
|
|
85963
|
-
var throwOnDirectAccess = true;
|
|
85964
|
-
module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/react-measure/node_modules/prop-types/factoryWithTypeCheckers.js")(isValidElement, throwOnDirectAccess);
|
|
85965
|
-
} else {}
|
|
85966
|
-
|
|
85967
|
-
|
|
85968
|
-
/***/ }),
|
|
85969
|
-
|
|
85970
|
-
/***/ "../node_modules/react-measure/node_modules/prop-types/lib/ReactPropTypesSecret.js":
|
|
85971
|
-
/*!*****************************************************************************************!*\
|
|
85972
|
-
!*** ../node_modules/react-measure/node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
|
85973
|
-
\*****************************************************************************************/
|
|
85974
|
-
/***/ ((module) => {
|
|
85975
|
-
|
|
85976
|
-
"use strict";
|
|
85977
|
-
/**
|
|
85978
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
85979
|
-
*
|
|
85980
|
-
* This source code is licensed under the MIT license found in the
|
|
85981
|
-
* LICENSE file in the root directory of this source tree.
|
|
85982
|
-
*/
|
|
85983
|
-
|
|
85984
|
-
|
|
85985
|
-
|
|
85986
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
85987
|
-
|
|
85988
|
-
module.exports = ReactPropTypesSecret;
|
|
85989
|
-
|
|
85990
|
-
|
|
85991
85334
|
/***/ }),
|
|
85992
85335
|
|
|
85993
85336
|
/***/ "../node_modules/react-sortable-hoc/dist/commonjs/Manager.js":
|
|
@@ -92025,7 +91368,7 @@ module.exports = __webpack_require__.p + "images/no-image.svg?2f8dd4286fb9a8bd9a
|
|
|
92025
91368
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
92026
91369
|
|
|
92027
91370
|
"use strict";
|
|
92028
|
-
module.exports = __webpack_require__.p + "images/symbols.svg?
|
|
91371
|
+
module.exports = __webpack_require__.p + "images/symbols.svg?147027a4906d0c1e2b29";
|
|
92029
91372
|
|
|
92030
91373
|
/***/ }),
|
|
92031
91374
|
|
|
@@ -92158,7 +91501,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
92158
91501
|
/***/ ((module) => {
|
|
92159
91502
|
|
|
92160
91503
|
"use strict";
|
|
92161
|
-
module.exports = JSON.parse('{"name":"@plesk/ui-library","version":"3.
|
|
91504
|
+
module.exports = JSON.parse('{"name":"@plesk/ui-library","version":"3.26.0","description":"Plesk UI Library","main":"index.js","module":"esm/index.js","types":"./types/src","sideEffects":["cjs/index.js","esm/index.js","dist/*.js","dist/*.css"],"scripts":{"pretest":"yarn lint","test":"jest --ci --coverage --coverageReporters text-summary","test:vr":"cross-env VISUAL_REGRESSION=true jest","build":"yarn build:types && yarn build:umd && yarn build:esm && yarn build:cjs","build:umd":"webpack --config ./configs/build.config.js","build:esm":"cross-env NODE_ENV=esm node ./scripts/build.js","build:cjs":"cross-env NODE_ENV=cjs node ./scripts/build.js","build:types":"rimraf ./types && tsc --project ./configs/types-generator.config.json","create-svg-sprite":"node ./scripts/create-svg-sprite.js","lint":"yarn lint:es && yarn lint:types && yarn lint:style","lint:es":"eslint --ext js,md,tsx src configs scripts styleguidist","lint:types":"tsc","lint:style":"stylelint \\"src/**/*.less\\"","styleguide":"styleguidist server --config ./configs/styleguide.config.js","styleguide:build":"styleguidist build --config ./configs/styleguide.config.js","create-component":"node scripts/create-component.js","prepublishOnly":"yarn install && yarn test && yarn build && yarn styleguide:build","storybook":"webpack serve --config ./configs/storybook.config.js","postinstall":"node ./scripts/postinstall.js"},"files":["esm","cjs","dist","styleguide","types","/scripts/postinstall.js","/index.js"],"dependencies":{"@babel/runtime":"^7.15.4","@plesk/react-movable":"^2.6.0","@types/classnames":"2.2.7","@types/react":"16.8.13","@types/react-dom":"16.8.4","@types/react-measure":"2.0.8","@types/react-transition-group":"^4.2.3","@types/svg4everybody":"2.1.0","classnames":"^2.3.1","codemirror":"5.48.0","marked":"0.3.19","memoize-one":"^5.1.1","popper.js":"1.14.3","prop-types":"^15.7.2","react-measure":"2.3.0","react-sortable-hoc":"0.6.8","react-transition-group":"^4.4.1","scroll-into-view-if-needed":"^2.2.20","svg4everybody":"2.1.9","use-focus-visible":"^1.0.0"},"devDependencies":{"@babel/core":"^7.15.8","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.15.8","@babel/preset-env":"^7.15.8","@babel/preset-react":"^7.14.5","@babel/preset-typescript":"^7.15.0","@plesk/eslint-config":"^1.1.0","@plesk/stylelint-config":"^0.0.6","@types/buble":"^0.19.2","@types/cheerio":"^0.22.30","@types/doctrine":"^0.0.3","@types/enzyme":"^3.10.9","@types/jest":"^23.3.12","@types/webpack-dev-server":"^3.10.1","@typescript-eslint/eslint-plugin":"^2.7.0","@typescript-eslint/parser":"^2.7.0","autoprefixer":"^10.3.7","babel-loader":"^8.2.3","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-transform-require-ignore":"^0.1.1","clean-webpack-plugin":"^4.0.0","cross-env":"^5.2.0","css-loader":"^6.4.0","css-minimizer-webpack-plugin":"^3.1.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.6","enzyme-to-json":"^3.6.2","eslint-config-prettier":"^6.11.0","eslint-plugin-markdown":"^1.0.2","eslint-plugin-prettier":"^3.1.3","expect-puppeteer":"^4.4.0","fs-extra":"^7.0.0","html-webpack-plugin":"^5.5.0","inquirer":"^3.2.1","jest":"^24.9.0","jest-dev-server":"^4.4.0","jest-image-snapshot":"^4.0.2","less":"^4.1.2","less-loader":"^10.2.0","mini-css-extract-plugin":"^2.4.3","postcss":"^8.3.11","postcss-loader":"^6.2.0","postcss-logical":"^5.0.0","prettier":"^2.0.5","puppeteer-core":"^5.2.1","react":"^16.8.6","react-dom":"^16.8.6","react-styleguidist":"^11.1.7","react-test-renderer":"^16.8.6","rimraf":"^3.0.1","rtlcss":"^3.4.0","style-loader":"^3.3.1","stylelint-config-prettier":"^8.0.1","stylelint-prettier":"^1.1.2","svg-mixer":"^2.3.14","terser-webpack-plugin":"^5.2.4","typescript":"^3.7.2","webpack":"^5.60.0","webpack-cli":"^4.9.1"},"peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"resolutions":{"@babel/types":"^7.15.6","@types/node":"^12.12.8","**/caniuse-lite":"1.0.30001274"},"browserslist":["last 2 versions",">1%","not op_mini all","not dead","not ie 11"],"author":"Plesk Developers <plesk-dev-leads@plesk.com> (https://www.plesk.com/)","license":"Apache-2.0"}');
|
|
92162
91505
|
|
|
92163
91506
|
/***/ }),
|
|
92164
91507
|
|