pb-sxp-ui 1.0.58 → 1.0.59

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.
@@ -45,13 +45,14 @@ const Popup = () => {
45
45
  const renderPopupDetail = useMemo(() => {
46
46
  var _a, _b, _c;
47
47
  return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
48
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
48
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
49
49
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
50
50
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
51
51
  const Component = withBindDataSource(t);
52
52
  const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
53
- const defaulSetting = (_e = t === null || t === void 0 ? void 0 : t.extend) === null || _e === void 0 ? void 0 : _e.defaulSetting;
54
- return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.textStyle), bindDatas: (_j = (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.bindDatas) !== null && _j !== void 0 ? _j : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.props, { event: ((_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, onClose: handleClose })));
53
+ const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
54
+ const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
55
+ return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.textStyle), bindDatas: (_m = (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.bindDatas) !== null && _m !== void 0 ? _m : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_o = value === null || value === void 0 ? void 0 : value.item) === null || _o === void 0 ? void 0 : _o.props, { event: ((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
55
56
  }
56
57
  else {
57
58
  return React.createElement(React.Fragment, null);
@@ -13,6 +13,7 @@ export interface IAppointFormProps {
13
13
  submitEmail?: string;
14
14
  layoutType?: 'horizontal' | 'vertical' | 'inline';
15
15
  isExternalLink?: boolean;
16
+ isPopup?: boolean;
16
17
  onClick?: () => void;
17
18
  onClose?: () => void;
18
19
  }
@@ -7,7 +7,7 @@ import { useSxpDataSource } from '../../../../core/hooks';
7
7
  import './index.less';
8
8
  import { useEventReport } from '../../../../core/hooks/useEventReport';
9
9
  const AppointForm = (_a) => {
10
- var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, onClick, onClose } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "onClick", "onClose"]);
10
+ var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose"]);
11
11
  const { submitForm, popupDetailData } = useSxpDataSource();
12
12
  const { jumpToWeb } = useEventReport();
13
13
  const formRef = useRef();
@@ -72,7 +72,9 @@ const AppointForm = (_a) => {
72
72
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
73
73
  jumpToWeb(data, product, cta, position);
74
74
  }
75
- onClose === null || onClose === void 0 ? void 0 : onClose();
75
+ if (!isPopup) {
76
+ onClose === null || onClose === void 0 ? void 0 : onClose();
77
+ }
76
78
  onClick === null || onClick === void 0 ? void 0 : onClick();
77
79
  }
78
80
  }), 1000);
@@ -66,10 +66,10 @@ const CommodityDetail = (_a) => {
66
66
  React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
67
67
  React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
68
68
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
69
- React.createElement(ExpandableText, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
70
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
71
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
72
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
69
+ React.createElement(ExpandableText, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
70
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
71
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
72
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
73
73
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
74
74
  };
75
75
  const renderBtn = () => {
@@ -91,7 +91,7 @@ const CommodityDetailDiroNew = (_a) => {
91
91
  const productInfoText = ({ isPost }) => {
92
92
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
93
93
  React.createElement(ExpandableText, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
94
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
94
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
95
95
  Made in Italy` })));
96
96
  };
97
97
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
@@ -5,6 +5,8 @@ export interface IPromptProps {
5
5
  btnText?: string;
6
6
  style?: Record<string, any>;
7
7
  icon?: Record<string, any> | string;
8
+ isPopup?: boolean;
9
+ onClose?: () => void;
8
10
  onClick?: () => void;
9
11
  }
10
12
  declare const _default: React.NamedExoticComponent<IPromptProps>;
@@ -5,10 +5,12 @@ import success from './success.png';
5
5
  import { getMediaValueByMode } from '../../../../core/utils/materials';
6
6
  import './index.less';
7
7
  const Prompt = (_a) => {
8
- var { content, btnText, style, icon, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
8
+ var { content, btnText, style, icon, isPopup, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "onClose", "onClick"]);
9
9
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
10
10
  const handleOk = () => {
11
- window === null || window === void 0 ? void 0 : window.sxpPopup('');
11
+ if (!isPopup) {
12
+ onClose === null || onClose === void 0 ? void 0 : onClose();
13
+ }
12
14
  onClick === null || onClick === void 0 ? void 0 : onClick();
13
15
  };
14
16
  return (React.createElement("div", Object.assign({ className: `pb-prompt ${css(Object.assign({}, style))}` }, props),
@@ -48,13 +48,14 @@ const Popup = () => {
48
48
  const renderPopupDetail = (0, react_1.useMemo)(() => {
49
49
  var _a, _b, _c;
50
50
  return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
52
52
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
53
53
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
54
54
  const Component = (0, withBindDataSource_1.default)(t);
55
55
  const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
56
- const defaulSetting = (_e = t === null || t === void 0 ? void 0 : t.extend) === null || _e === void 0 ? void 0 : _e.defaulSetting;
57
- return (react_1.default.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.textStyle), bindDatas: (_j = (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.bindDatas) !== null && _j !== void 0 ? _j : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.props, { event: ((_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, onClose: handleClose })));
56
+ const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
57
+ const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
58
+ return (react_1.default.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.textStyle), bindDatas: (_m = (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.bindDatas) !== null && _m !== void 0 ? _m : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_o = value === null || value === void 0 ? void 0 : value.item) === null || _o === void 0 ? void 0 : _o.props, { event: ((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
58
59
  }
59
60
  else {
60
61
  return react_1.default.createElement(react_1.default.Fragment, null);
@@ -13,6 +13,7 @@ export interface IAppointFormProps {
13
13
  submitEmail?: string;
14
14
  layoutType?: 'horizontal' | 'vertical' | 'inline';
15
15
  isExternalLink?: boolean;
16
+ isPopup?: boolean;
16
17
  onClick?: () => void;
17
18
  onClose?: () => void;
18
19
  }
@@ -9,7 +9,7 @@ const hooks_1 = require("../../../../core/hooks");
9
9
  require("./index.less");
10
10
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
11
11
  const AppointForm = (_a) => {
12
- var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, onClick, onClose } = _a, props = tslib_1.__rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "onClick", "onClose"]);
12
+ var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose } = _a, props = tslib_1.__rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose"]);
13
13
  const { submitForm, popupDetailData } = (0, hooks_1.useSxpDataSource)();
14
14
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
15
15
  const formRef = (0, react_1.useRef)();
@@ -74,7 +74,9 @@ const AppointForm = (_a) => {
74
74
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
75
75
  jumpToWeb(data, product, cta, position);
76
76
  }
77
- onClose === null || onClose === void 0 ? void 0 : onClose();
77
+ if (!isPopup) {
78
+ onClose === null || onClose === void 0 ? void 0 : onClose();
79
+ }
78
80
  onClick === null || onClick === void 0 ? void 0 : onClick();
79
81
  }
80
82
  }), 1000);
@@ -68,10 +68,10 @@ const CommodityDetail = (_a) => {
68
68
  react_1.default.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
69
69
  react_1.default.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
70
70
  react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
71
- react_1.default.createElement(ExpandableText_1.default, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
72
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
73
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
74
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
71
+ react_1.default.createElement(ExpandableText_1.default, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
72
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
73
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
74
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
75
75
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
76
76
  };
77
77
  const renderBtn = () => {
@@ -93,7 +93,7 @@ const CommodityDetailDiroNew = (_a) => {
93
93
  const productInfoText = ({ isPost }) => {
94
94
  return (react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
95
95
  react_1.default.createElement(ExpandableText_1.default, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
96
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
96
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
97
97
  Made in Italy` })));
98
98
  };
99
99
  return (react_1.default.createElement("div", { className: 'pb-commondityDiroNew' },
@@ -5,6 +5,8 @@ export interface IPromptProps {
5
5
  btnText?: string;
6
6
  style?: Record<string, any>;
7
7
  icon?: Record<string, any> | string;
8
+ isPopup?: boolean;
9
+ onClose?: () => void;
8
10
  onClick?: () => void;
9
11
  }
10
12
  declare const _default: React.NamedExoticComponent<IPromptProps>;
@@ -7,10 +7,12 @@ const success_png_1 = tslib_1.__importDefault(require("./success.png"));
7
7
  const materials_1 = require("../../../../core/utils/materials");
8
8
  require("./index.less");
9
9
  const Prompt = (_a) => {
10
- var { content, btnText, style, icon, onClick } = _a, props = tslib_1.__rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
10
+ var { content, btnText, style, icon, isPopup, onClose, onClick } = _a, props = tslib_1.__rest(_a, ["content", "btnText", "style", "icon", "isPopup", "onClose", "onClick"]);
11
11
  const iconSrc = typeof icon === 'string' ? icon : (0, materials_1.getMediaValueByMode)(icon);
12
12
  const handleOk = () => {
13
- window === null || window === void 0 ? void 0 : window.sxpPopup('');
13
+ if (!isPopup) {
14
+ onClose === null || onClose === void 0 ? void 0 : onClose();
15
+ }
14
16
  onClick === null || onClick === void 0 ? void 0 : onClick();
15
17
  };
16
18
  return (react_1.default.createElement("div", Object.assign({ className: `pb-prompt ${(0, css_1.css)(Object.assign({}, style))}` }, props),
package/package.json CHANGED
@@ -1,115 +1,115 @@
1
- {
2
- "name": "pb-sxp-ui",
3
- "version": "1.0.58",
4
- "description": "React enterprise-class UI components",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.js",
7
- "unpkg": "dist/pb-ui.min.js",
8
- "typings": "es/index.d.ts",
9
- "type": "module",
10
- "scripts": {
11
- "prebuild": "rimraf lib && rimraf es && rimraf dist",
12
- "build": "tsc --build tsconfig.es.json && tsc --build tsconfig.cjs.json",
13
- "postbuild": "tsc-alias -p tsconfig.es.json && tsc-alias -p tsconfig.cjs.json",
14
- "package": "npm run build && cross-env NODE_ENV=production rollup -c --configPlugin typescript",
15
- "start": "npm run build && cross-env NODE_ENV=development rollup -w -c",
16
- "lint": "eslint .",
17
- "lint:fix": "eslint --fix .",
18
- "dev": "rollup -w -c",
19
- "dev:package": "npm run build && rollup -w -c",
20
- "pub": "zx ./scripts/publish.mjs"
21
- },
22
- "files": [
23
- "dist",
24
- "lib",
25
- "es",
26
- "package.json",
27
- "README.md"
28
- ],
29
- "keywords": [
30
- "antd",
31
- "react",
32
- "react-component",
33
- "ui",
34
- "component",
35
- "components"
36
- ],
37
- "author": "frontend@chatlabs.cn",
38
- "license": "MIT",
39
- "dependencies": {
40
- "@ant-design/pro-components": "^2.6.35",
41
- "@emotion/css": "^11.11.2",
42
- "antd": "^5.15.3",
43
- "eslint": "^8.48.0",
44
- "eventemitter3": "^5.0.1",
45
- "hls.js": "^1.5.8",
46
- "less": "^4.2.0",
47
- "lodash": "^4.17.21",
48
- "pako": "^2.1.0",
49
- "qs": "^6.11.2",
50
- "swiper": "^11.0.3",
51
- "uuid": "^9.0.1"
52
- },
53
- "devDependencies": {
54
- "@babel/core": "^7.22.11",
55
- "@babel/plugin-transform-runtime": "^7.22.10",
56
- "@babel/preset-env": "^7.22.10",
57
- "@rollup/plugin-alias": "^5.0.0",
58
- "@rollup/plugin-babel": "^6.0.3",
59
- "@rollup/plugin-commonjs": "^25.0.4",
60
- "@rollup/plugin-eslint": "^9.0.4",
61
- "@rollup/plugin-image": "^3.0.2",
62
- "@rollup/plugin-json": "^6.0.0",
63
- "@rollup/plugin-node-resolve": "^15.2.0",
64
- "@rollup/plugin-typescript": "^11.1.2",
65
- "@rollup/plugin-url": "^8.0.1",
66
- "@svgr/rollup": "^8.1.0",
67
- "@types/crypto-js": "^4.1.3",
68
- "@types/lodash": "^4.14.198",
69
- "@types/node": "^20.5.3",
70
- "@types/pako": "^2.0.3",
71
- "@types/qs": "^6.9.8",
72
- "@types/react": "^18.2.21",
73
- "@types/react-dom": "^18.2.14",
74
- "@types/uuid": "^9.0.7",
75
- "@typescript-eslint/eslint-plugin": "^6.6.0",
76
- "@typescript-eslint/parser": "^6.6.0",
77
- "autoprefixer": "^10.4.15",
78
- "cross-env": "^7.0.3",
79
- "cssnano": "^6.0.1",
80
- "esbuild": "^0.19.2",
81
- "eslint-config-standard": "^17.1.0",
82
- "eslint-config-standard-react": "^13.0.0",
83
- "eslint-plugin-import": "^2.28.1",
84
- "eslint-plugin-n": "^16.0.2",
85
- "eslint-plugin-promise": "^6.1.1",
86
- "eslint-plugin-react": "^7.33.2",
87
- "eslint-plugin-react-hooks": "^4.6.0",
88
- "eslint-plugin-unused-imports": "^3.0.0",
89
- "postcss": "^8.4.28",
90
- "querystring": "^0.2.1",
91
- "react": "^18.2.0",
92
- "react-dom": "^18.2.0",
93
- "rimraf": "^5.0.1",
94
- "rollup": "^3.28.1",
95
- "rollup-plugin-esbuild": "^5.0.0",
96
- "rollup-plugin-postcss": "^4.0.2",
97
- "rollup-plugin-terser": "^7.0.2",
98
- "tsc-alias": "^1.8.7",
99
- "tslib": "^2.6.2",
100
- "typescript": "^5.1.6",
101
- "zx": "^7.2.3"
102
- },
103
- "peerDependencies": {
104
- "react": ">=16.9.0",
105
- "react-dom": ">=16.9.0"
106
- },
107
- "browserslist": [
108
- "defaults",
109
- "not ie < 8",
110
- "last 2 versions",
111
- "> 1%",
112
- "iOS 7",
113
- "last 3 iOS versions"
114
- ]
115
- }
1
+ {
2
+ "name": "pb-sxp-ui",
3
+ "version": "1.0.59",
4
+ "description": "React enterprise-class UI components",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.js",
7
+ "unpkg": "dist/pb-ui.min.js",
8
+ "typings": "es/index.d.ts",
9
+ "type": "module",
10
+ "scripts": {
11
+ "prebuild": "rimraf lib && rimraf es && rimraf dist",
12
+ "build": "tsc --build tsconfig.es.json && tsc --build tsconfig.cjs.json",
13
+ "postbuild": "tsc-alias -p tsconfig.es.json && tsc-alias -p tsconfig.cjs.json",
14
+ "package": "npm run build && cross-env NODE_ENV=production rollup -c --configPlugin typescript",
15
+ "start": "npm run build && cross-env NODE_ENV=development rollup -w -c",
16
+ "lint": "eslint .",
17
+ "lint:fix": "eslint --fix .",
18
+ "dev": "rollup -w -c",
19
+ "dev:package": "npm run build && rollup -w -c",
20
+ "pub": "zx ./scripts/publish.mjs"
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "lib",
25
+ "es",
26
+ "package.json",
27
+ "README.md"
28
+ ],
29
+ "keywords": [
30
+ "antd",
31
+ "react",
32
+ "react-component",
33
+ "ui",
34
+ "component",
35
+ "components"
36
+ ],
37
+ "author": "frontend@chatlabs.cn",
38
+ "license": "MIT",
39
+ "dependencies": {
40
+ "@ant-design/pro-components": "^2.6.35",
41
+ "@emotion/css": "^11.11.2",
42
+ "antd": "^5.15.3",
43
+ "eslint": "^8.48.0",
44
+ "eventemitter3": "^5.0.1",
45
+ "hls.js": "^1.5.8",
46
+ "less": "^4.2.0",
47
+ "lodash": "^4.17.21",
48
+ "pako": "^2.1.0",
49
+ "qs": "^6.11.2",
50
+ "swiper": "^11.0.3",
51
+ "uuid": "^9.0.1"
52
+ },
53
+ "devDependencies": {
54
+ "@babel/core": "^7.22.11",
55
+ "@babel/plugin-transform-runtime": "^7.22.10",
56
+ "@babel/preset-env": "^7.22.10",
57
+ "@rollup/plugin-alias": "^5.0.0",
58
+ "@rollup/plugin-babel": "^6.0.3",
59
+ "@rollup/plugin-commonjs": "^25.0.4",
60
+ "@rollup/plugin-eslint": "^9.0.4",
61
+ "@rollup/plugin-image": "^3.0.2",
62
+ "@rollup/plugin-json": "^6.0.0",
63
+ "@rollup/plugin-node-resolve": "^15.2.0",
64
+ "@rollup/plugin-typescript": "^11.1.2",
65
+ "@rollup/plugin-url": "^8.0.1",
66
+ "@svgr/rollup": "^8.1.0",
67
+ "@types/crypto-js": "^4.1.3",
68
+ "@types/lodash": "^4.14.198",
69
+ "@types/node": "^20.5.3",
70
+ "@types/pako": "^2.0.3",
71
+ "@types/qs": "^6.9.8",
72
+ "@types/react": "^18.2.21",
73
+ "@types/react-dom": "^18.2.14",
74
+ "@types/uuid": "^9.0.7",
75
+ "@typescript-eslint/eslint-plugin": "^6.6.0",
76
+ "@typescript-eslint/parser": "^6.6.0",
77
+ "autoprefixer": "^10.4.15",
78
+ "cross-env": "^7.0.3",
79
+ "cssnano": "^6.0.1",
80
+ "esbuild": "^0.19.2",
81
+ "eslint-config-standard": "^17.1.0",
82
+ "eslint-config-standard-react": "^13.0.0",
83
+ "eslint-plugin-import": "^2.28.1",
84
+ "eslint-plugin-n": "^16.0.2",
85
+ "eslint-plugin-promise": "^6.1.1",
86
+ "eslint-plugin-react": "^7.33.2",
87
+ "eslint-plugin-react-hooks": "^4.6.0",
88
+ "eslint-plugin-unused-imports": "^3.0.0",
89
+ "postcss": "^8.4.28",
90
+ "querystring": "^0.2.1",
91
+ "react": "^18.2.0",
92
+ "react-dom": "^18.2.0",
93
+ "rimraf": "^5.0.1",
94
+ "rollup": "^3.28.1",
95
+ "rollup-plugin-esbuild": "^5.0.0",
96
+ "rollup-plugin-postcss": "^4.0.2",
97
+ "rollup-plugin-terser": "^7.0.2",
98
+ "tsc-alias": "^1.8.7",
99
+ "tslib": "^2.6.2",
100
+ "typescript": "^5.1.6",
101
+ "zx": "^7.2.3"
102
+ },
103
+ "peerDependencies": {
104
+ "react": ">=16.9.0",
105
+ "react-dom": ">=16.9.0"
106
+ },
107
+ "browserslist": [
108
+ "defaults",
109
+ "not ie < 8",
110
+ "last 2 versions",
111
+ "> 1%",
112
+ "iOS 7",
113
+ "last 3 iOS versions"
114
+ ]
115
+ }