quick-start-feature-box 1.0.5 → 1.0.6

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/dist/index.js CHANGED
@@ -1,490 +1 @@
1
- import React6, { createContext, useState, useMemo, useContext, useEffect } from 'react';
2
- import { Tooltip, message, Button, Modal, Image } from 'antd';
3
- import classNames from 'classnames';
4
- import { useLocation, Link } from 'react-router-dom';
5
-
6
- // src/FeatureBox/index.js
7
-
8
- // src/FeatureBox/index.less
9
- var FeatureBox_default = {};
10
-
11
- // src/StepAndQuote/index.less
12
- var StepAndQuote_default = {};
13
-
14
- // src/Tab/index.less
15
- var Tab_default = {};
16
- function isPrefixArray(prefixArray, mainArray) {
17
- return prefixArray.every((element, index) => element === mainArray[index]);
18
- }
19
- var Tab = (props) => {
20
- const {
21
- data,
22
- idx,
23
- stepChildrenLength,
24
- tabNum,
25
- currentLinkList,
26
- setCurrentLinkList
27
- } = props;
28
- const getActive = (linkList, index) => {
29
- if (linkList.length <= currentLinkList.length) {
30
- return isPrefixArray(linkList, currentLinkList);
31
- }
32
- return index == 0;
33
- };
34
- return /* @__PURE__ */ React6.createElement("div", { className: classNames(Tab_default.Tab, {
35
- [Tab_default.noFirstTab]: tabNum != 1,
36
- [Tab_default.isInternalChanged]: idx < stepChildrenLength - 1
37
- }) }, (data?.children ?? []).map((item, index) => {
38
- if (item.type !== "tabItem") {
39
- return null;
40
- }
41
- return /* @__PURE__ */ React6.createElement(
42
- "div",
43
- {
44
- key: item.id,
45
- className: classNames(Tab_default.tabItem, {
46
- [Tab_default.active]: getActive(item.linkList, index),
47
- [Tab_default.noFirstTabsItem]: tabNum != 1,
48
- [Tab_default.hasIcon]: item.icon
49
- }),
50
- onClick: () => {
51
- setCurrentLinkList(item.linkList);
52
- }
53
- },
54
- item.icon && /* @__PURE__ */ React6.createElement("div", { className: Tab_default.tabIcon, dangerouslySetInnerHTML: { __html: item.icon } }),
55
- item.text
56
- );
57
- }));
58
- };
59
- var Tab_default2 = Tab;
60
-
61
- // src/Article/index.less
62
- var Article_default = {};
63
-
64
- // src/Article/index.js
65
- var Article = (props) => {
66
- const {
67
- data
68
- } = props;
69
- const modifiedText = useMemo(() => {
70
- return data?.text?.replace(/<img([^>]+)>/g, (match) => {
71
- return `<div class="img-container">${match}<i class="iconfont img-preview">&#x11bc7;</i></div>`;
72
- }) ?? "";
73
- }, [data]);
74
- return /* @__PURE__ */ React6.createElement("div", { className: Article_default.Article, dangerouslySetInnerHTML: { __html: modifiedText } });
75
- };
76
- var Article_default2 = Article;
77
-
78
- // src/Dictionary/index.less
79
- var Dictionary_default = {};
80
-
81
- // src/HelpModal/index.less
82
- var HelpModal_default = {};
83
- var HelpModal = (props) => {
84
- const {
85
- visible,
86
- setVisible,
87
- link
88
- } = props;
89
- const [loading, setLoading] = useState(true);
90
- return /* @__PURE__ */ React6.createElement(
91
- Modal,
92
- {
93
- className: HelpModal_default.HelpModal,
94
- open: visible,
95
- width: "90vw",
96
- onCancel: () => setVisible(false),
97
- destroyOnClose: true,
98
- footer: null
99
- },
100
- /* @__PURE__ */ React6.createElement(
101
- "iframe",
102
- {
103
- className: HelpModal_default.HelpModalIframe,
104
- style: { display: loading ? "none" : "block" },
105
- src: link,
106
- onLoad: () => setLoading(false)
107
- }
108
- )
109
- );
110
- };
111
- var HelpModal_default2 = HelpModal;
112
-
113
- // src/Dictionary/index.js
114
- var Dictionary = (props) => {
115
- const {
116
- data
117
- } = props;
118
- const [visible, setVisible] = useState(false);
119
- const [link, setLink] = useState("");
120
- const handleClick = (item) => {
121
- setLink(item.link);
122
- setVisible(true);
123
- };
124
- return /* @__PURE__ */ React6.createElement("div", { className: Dictionary_default.Dictionary }, (data?.children ?? []).map((item) => {
125
- return item.type === "modal" ? /* @__PURE__ */ React6.createElement("div", { key: item.id, className: Dictionary_default.item, onClick: () => handleClick(item) }, item.icon && /* @__PURE__ */ React6.createElement("div", { className: Dictionary_default.dicIcon, dangerouslySetInnerHTML: { __html: item.icon } }), /* @__PURE__ */ React6.createElement("div", { className: Dictionary_default.title }, item.text)) : /* @__PURE__ */ React6.createElement("a", { className: Dictionary_default.item, href: item.link }, item.icon && /* @__PURE__ */ React6.createElement("div", { className: Dictionary_default.dicIcon, dangerouslySetInnerHTML: { __html: item.icon } }), /* @__PURE__ */ React6.createElement("div", { className: Dictionary_default.title }, item.text));
126
- }), /* @__PURE__ */ React6.createElement(HelpModal_default2, { visible, setVisible, link }));
127
- };
128
- var Dictionary_default2 = Dictionary;
129
-
130
- // src/Extra/index.less
131
- var Extra_default = {};
132
- var Extra = (props) => {
133
- const {
134
- data
135
- } = props;
136
- const [visible, setVisible] = useState(false);
137
- const [currentLink, setCurrentLink] = useState([]);
138
- const handleClick = (item) => {
139
- setCurrentLink(item.link);
140
- setVisible(true);
141
- };
142
- return /* @__PURE__ */ React6.createElement("div", { className: Extra_default.Extra }, (data?.children ?? []).map((item, index) => {
143
- return item.type === "link" ? /* @__PURE__ */ React6.createElement(Button, { className: Extra_default.ExtraButton, key: index, type: "primary", href: item.link }, item.text) : /* @__PURE__ */ React6.createElement(Button, { className: Extra_default.ExtraButton, key: index, onClick: () => handleClick(item) }, item.text);
144
- }), /* @__PURE__ */ React6.createElement(
145
- HelpModal_default2,
146
- {
147
- visible,
148
- setVisible,
149
- link: currentLink
150
- }
151
- ));
152
- };
153
- var Extra_default2 = Extra;
154
- var STEP_CHILD_COMPONENTS = {
155
- tab: Tab_default2,
156
- article: Article_default2,
157
- dictionary: Dictionary_default2,
158
- extra: Extra_default2,
159
- default: ({ data }) => /* @__PURE__ */ React6.createElement("div", { style: { color: "red", fontSize: 20, textAlign: "center" } }, "uniqueName: ", data.uniqueName, "\uFF0Ctype: ", data.type, "\u4E0D\u7B26\u5408\u89C4\u5219")
160
- };
161
- var Step = (props) => {
162
- const {
163
- data,
164
- module,
165
- feature,
166
- currentLinkList,
167
- currentQuoteList,
168
- index,
169
- ...rest
170
- } = props;
171
- const i18n2 = useContext(i18nContext);
172
- const copyLink = () => {
173
- const linkListStr = (currentLinkList || []).join("-");
174
- const linkListPath = linkListStr != "" ? `&linkList=${linkListStr}` : "";
175
- const currentQuoteListStr = (currentQuoteList || []).join("-");
176
- const currentQuoteListPath = currentQuoteListStr != "" ? `&quoteList=${currentQuoteListStr}` : "";
177
- const copyText = `${window.location.origin}/quickstart/detail?module=${module}&feature=${feature}${linkListPath}${currentQuoteListPath}#step-${index + 1}`;
178
- if (navigator.clipboard && navigator.clipboard.writeText) {
179
- navigator.clipboard.writeText(copyText);
180
- message.success(i18n2.rebate_copy_share_success);
181
- } else {
182
- fallbackCopyTextToClipboard(copyText);
183
- }
184
- };
185
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(Tooltip, { title: i18n2.rebate_copy_share }, /* @__PURE__ */ React6.createElement("span", { className: StepAndQuote_default.title, onClick: copyLink }, data.text, /* @__PURE__ */ React6.createElement("i", { className: "iconfont" }, "\uE63E"))), (data?.children ?? []).map((item, idx) => {
186
- const Comp = STEP_CHILD_COMPONENTS[item?.type] || STEP_CHILD_COMPONENTS.default;
187
- const tabNum = (data?.children ?? []).slice(0, idx + 1).filter((child) => child?.type === "tab").length;
188
- return /* @__PURE__ */ React6.createElement(
189
- Comp,
190
- {
191
- key: idx,
192
- idx,
193
- stepChildrenLength: data?.children?.length ?? 0,
194
- data: item,
195
- tabNum,
196
- currentLinkList,
197
- ...rest
198
- }
199
- );
200
- }));
201
- };
202
- var Quote = (props) => {
203
- const {
204
- data,
205
- currentQuoteList,
206
- setCurrentQuoteList
207
- } = props;
208
- const i18n2 = useContext(i18nContext);
209
- const handleClick = (quoteID) => {
210
- if (currentQuoteList.includes(quoteID)) {
211
- setCurrentQuoteList(currentQuoteList.filter((id) => id !== quoteID));
212
- } else {
213
- setCurrentQuoteList([...currentQuoteList, quoteID]);
214
- }
215
- };
216
- const isOpen = useMemo(() => currentQuoteList.includes(data.id), [currentQuoteList, data.id]);
217
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement("div", { className: StepAndQuote_default.title, onClick: () => handleClick(data.id) }, /* @__PURE__ */ React6.createElement("div", { className: StepAndQuote_default.QuoteBoxLeft }, (() => {
218
- if (!data.icon) {
219
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null);
220
- }
221
- if (data.icon.startsWith("<svg")) {
222
- return /* @__PURE__ */ React6.createElement("div", { className: StepAndQuote_default.QuoteIcon, dangerouslySetInnerHTML: { __html: data.icon } });
223
- } else {
224
- return /* @__PURE__ */ React6.createElement("img", { className: StepAndQuote_default.QuoteIcon, src: data.icon, alt: "quote" });
225
- }
226
- })(), /* @__PURE__ */ React6.createElement("div", { className: StepAndQuote_default.QuoteText }, data.text)), /* @__PURE__ */ React6.createElement("div", { className: StepAndQuote_default.QuoteBoxRight }, /* @__PURE__ */ React6.createElement("div", null, isOpen ? i18n2.order_close_product : i18n2.common_view_short), /* @__PURE__ */ React6.createElement("i", { className: "iconfont", style: { color: "#888888", ...isOpen ? { transform: "rotate(180deg)" } : {} } }, "\uE611"))), isOpen && /* @__PURE__ */ React6.createElement("div", { className: StepAndQuote_default.line }));
227
- };
228
- var StepAndQuote = (props) => {
229
- const {
230
- data,
231
- index,
232
- ...rest
233
- } = props;
234
- return /* @__PURE__ */ React6.createElement("div", { id: `step-${index + 1}`, className: classNames(StepAndQuote_default.StepAndQuote, data.type === "step" ? StepAndQuote_default.Step : StepAndQuote_default.Quote) }, /* @__PURE__ */ React6.createElement("div", { className: StepAndQuote_default.tail }), /* @__PURE__ */ React6.createElement("div", { className: StepAndQuote_default.circle }, index + 1), /* @__PURE__ */ React6.createElement("div", { className: StepAndQuote_default.content }, data.type === "step" ? /* @__PURE__ */ React6.createElement(Step, { data, index, ...rest }) : /* @__PURE__ */ React6.createElement(Quote, { data, ...rest })));
235
- };
236
- var StepAndQuote_default2 = StepAndQuote;
237
-
238
- // src/FeatureContentBox/index.js
239
- function processContentData(node, data, link = []) {
240
- if (!Array.isArray(node)) return;
241
- return node.map((item) => {
242
- const tempLink = [...link];
243
- item = {
244
- ...item,
245
- ...data[item.u]
246
- };
247
- if (["tab", "tabItem"].includes(item.type)) {
248
- tempLink.push(item.id);
249
- }
250
- if (item.c) {
251
- item.children = processContentData(item.c, data, tempLink);
252
- }
253
- return {
254
- ...item,
255
- linkList: tempLink
256
- };
257
- });
258
- }
259
- function dealStepWithTab(stepNode, childrenNode, newChildren, linkList, quoteList, result) {
260
- const isExternalChanged = childrenNode.some((item) => item.type === "step" || item.type === "quote");
261
- if (isExternalChanged) {
262
- childrenNode.forEach((item) => {
263
- if (item.type != "step" && item.type != "quote") {
264
- newChildren.push(item);
265
- }
266
- });
267
- result.push({
268
- ...stepNode,
269
- children: newChildren
270
- });
271
- getRealRenderData(childrenNode, linkList, quoteList, result);
272
- } else {
273
- const hasTab = childrenNode.some((item) => item.type === "tab");
274
- if (hasTab) {
275
- childrenNode.some((item) => {
276
- newChildren.push(item);
277
- if (item.type != "tab") {
278
- return false;
279
- }
280
- const tabItemID = linkList.findIndex((id) => id == item.id) > -1 ? linkList[linkList.findIndex((id) => id == item.id) + 1] : item.children?.[0]?.id ?? -1;
281
- const tabItem = item.children.find((child) => child.id == tabItemID);
282
- dealStepWithTab(stepNode, tabItem?.children || [], newChildren, linkList, quoteList, result);
283
- return true;
284
- });
285
- } else {
286
- result.push({
287
- ...stepNode,
288
- children: [...newChildren, ...childrenNode]
289
- });
290
- }
291
- }
292
- }
293
- function getRealRenderData(node, linkList, quoteList, result = []) {
294
- if (!Array.isArray(node)) return;
295
- (node || []).forEach((item) => {
296
- if (item.type === "step") {
297
- const { children } = item;
298
- dealStepWithTab(item, children, [], linkList, quoteList, result);
299
- } else if (item.type === "quote") {
300
- result.push(item);
301
- if (quoteList.includes(item.id)) {
302
- getRealRenderData(item.children, linkList, quoteList, result);
303
- }
304
- }
305
- });
306
- return result;
307
- }
308
- var FeatureContentBox = (props) => {
309
- const {
310
- structure,
311
- linkList,
312
- quoteList,
313
- content,
314
- ...rest
315
- } = props;
316
- const [currentLinkList, setCurrentLinkList] = useState(linkList);
317
- const [currentQuoteList, setCurrentQuoteList] = useState(quoteList);
318
- const completeData = useMemo(() => {
319
- return processContentData(structure, content);
320
- }, [structure]);
321
- const realRenderData = useMemo(() => {
322
- return getRealRenderData(completeData, currentLinkList, currentQuoteList);
323
- }, [completeData, currentLinkList, currentQuoteList]);
324
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, realRenderData.map((item, index) => {
325
- return /* @__PURE__ */ React6.createElement(
326
- StepAndQuote_default2,
327
- {
328
- key: item.id,
329
- data: item,
330
- index,
331
- currentLinkList,
332
- setCurrentLinkList,
333
- currentQuoteList,
334
- setCurrentQuoteList,
335
- ...rest
336
- }
337
- );
338
- }));
339
- };
340
- var FeatureContentBox_default = React6.memo(FeatureContentBox, (prevProps, nextProps) => {
341
- return prevProps.structure === nextProps.structure;
342
- });
343
- var i18nContext = createContext({});
344
- function fallbackCopyTextToClipboard(text) {
345
- const textarea = document.createElement("textarea");
346
- textarea.value = text;
347
- document.body.appendChild(textarea);
348
- textarea.select();
349
- try {
350
- document.execCommand("copy");
351
- message.success(i18n.rebate_copy_share_success);
352
- } catch (err) {
353
- message.error(i18n.rebate_copy_share_failed);
354
- } finally {
355
- document.body.removeChild(textarea);
356
- }
357
- }
358
- var FeatureItem = (props) => {
359
- const {
360
- feature,
361
- data,
362
- content,
363
- linkList,
364
- quoteList,
365
- module
366
- } = props;
367
- const i18n2 = useContext(i18nContext);
368
- const active = useMemo(() => {
369
- return feature === data.alias;
370
- }, [feature, data]);
371
- const location = useLocation();
372
- const [imgSrc, setImgSrc] = useState("");
373
- const [imgVisible, setImgVisible] = useState(false);
374
- useEffect(() => {
375
- const hash = location.hash;
376
- setTimeout(() => {
377
- let offsetPosition = 0;
378
- if (hash) {
379
- const element = document.querySelector(hash);
380
- const topOffset = 50;
381
- const elementPosition = element.getBoundingClientRect().top + window.scrollY;
382
- offsetPosition = elementPosition - topOffset;
383
- }
384
- window.scrollTo({
385
- top: offsetPosition
386
- });
387
- }, 0);
388
- }, [location]);
389
- const copyLink = (e) => {
390
- e.preventDefault();
391
- e.stopPropagation();
392
- const copyText = `${window.location.origin}/quickstart/detail?module=${module}&feature=${data.alias}#${data.alias}`;
393
- if (navigator.clipboard && navigator.clipboard.writeText) {
394
- navigator.clipboard.writeText(copyText);
395
- message.success(i18n2.rebate_copy_share_success);
396
- } else {
397
- fallbackCopyTextToClipboard(copyText);
398
- }
399
- };
400
- const imgClick = (e) => {
401
- let target = e.target;
402
- let imgElement = null;
403
- if (target.tagName === "IMG") {
404
- imgElement = target;
405
- } else if (target.className === "iconfont img-preview") {
406
- imgElement = target.parentElement.querySelector("img");
407
- }
408
- if (imgElement) {
409
- setImgSrc(imgElement.src);
410
- setImgVisible(true);
411
- }
412
- };
413
- return /* @__PURE__ */ React6.createElement("div", { id: data.alias, className: FeatureBox_default.FeatureItem }, /* @__PURE__ */ React6.createElement(
414
- Link,
415
- {
416
- className: FeatureBox_default.header,
417
- to: {
418
- pathname: "/quickstart/detail",
419
- search: new URLSearchParams({ module, ...data.alias == feature ? {} : { feature: data.alias } }).toString(),
420
- ...data.alias == feature ? {} : { hash: data.alias }
421
- }
422
- },
423
- /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.headerLeft }, data.icon && /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.iconBox, dangerouslySetInnerHTML: { __html: data.icon } }), /* @__PURE__ */ React6.createElement("div", null, /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.title }, data.name, /* @__PURE__ */ React6.createElement(Tooltip, { title: i18n2.rebate_copy_share }, /* @__PURE__ */ React6.createElement("i", { className: "iconfont", onClick: copyLink }, "\uE63E"))), !active && /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.summary }, data.summary))),
424
- /* @__PURE__ */ React6.createElement(
425
- "div",
426
- {
427
- className: FeatureBox_default.btn
428
- },
429
- active ? i18n2.order_close_product : i18n2.read
430
- )
431
- ), active && /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.wrapper, onClick: imgClick }, data.content && /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.contentBox }, /* @__PURE__ */ React6.createElement("i", { className: "iconfont" }, "\uE649"), /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.contentRight }, /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.title }, i18n2.function_purpose), /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.content, dangerouslySetInnerHTML: { __html: data.content } }))), data.remark && /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.remark }, data.remark), /* @__PURE__ */ React6.createElement(
432
- Image,
433
- {
434
- style: { display: "none" },
435
- src: imgSrc,
436
- preview: {
437
- visible: imgVisible,
438
- src: imgSrc,
439
- onVisibleChange: (value) => {
440
- setImgVisible(value);
441
- }
442
- }
443
- }
444
- ), /* @__PURE__ */ React6.createElement(
445
- FeatureContentBox_default,
446
- {
447
- structure: data.contentRelative,
448
- content,
449
- module,
450
- feature,
451
- linkList: active ? linkList : [],
452
- quoteList: active ? quoteList : []
453
- }
454
- )));
455
- };
456
- var FeatureBox = (props) => {
457
- const {
458
- data,
459
- content,
460
- module,
461
- feature,
462
- setFeature,
463
- linkList,
464
- quoteList,
465
- i18n: i18n2
466
- } = props;
467
- const featureData = useMemo(() => {
468
- let tempModule = module;
469
- if (!tempModule) {
470
- tempModule = data?.[0]?.alias ?? "platform_post";
471
- }
472
- return data.find((item) => item.alias === tempModule);
473
- }, [data, module]);
474
- return featureData && /* @__PURE__ */ React6.createElement(i18nContext.Provider, { value: i18n2 }, /* @__PURE__ */ React6.createElement("div", { className: FeatureBox_default.FeatureBox, style: { marginBottom: feature ? 0 : 200 } }, (featureData.features || []).map((item) => /* @__PURE__ */ React6.createElement(
475
- FeatureItem,
476
- {
477
- key: `${module}-${item.alias}`,
478
- feature,
479
- data: item,
480
- content,
481
- setFeature,
482
- linkList,
483
- quoteList,
484
- module
485
- }
486
- ))));
487
- };
488
- var FeatureBox_default2 = FeatureBox;
489
-
490
- export { FeatureBox_default2 as FeatureBox };
1
+ import*as e from"react";import*as t from"antd";import*as a from"classnames";import*as n from"react-router-dom";var l={d:(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const r=(i={createContext:()=>e.createContext,default:()=>e.default,useContext:()=>e.useContext,useEffect:()=>e.useEffect,useMemo:()=>e.useMemo,useState:()=>e.useState},c={},l.d(c,i),c),s="JlW5Amoa76Zmhbgg_PQl";var i,c;const u=(e=>{var t={};return l.d(t,e),t})({Button:()=>t.Button,Image:()=>t.Image,Modal:()=>t.Modal,Tooltip:()=>t.Tooltip,message:()=>t.message}),o="Wa7TmEji7UmTaY49_ja0",d="Yg0rmK0PPqJbMD9DlKYe",m="G7lGrZkYJhHv2bRiTyh0",f="XTXp1fMj7Jb4hRWOJySw",p="L_rKPiQFinN_d28xweyV",v="WEaTuAZk0UWtDx23Vi3v",y="GU9940ucMlb6xXFw0C2f",E=(e=>{var t={};return l.d(t,e),t})({default:()=>a.default}),h="obyM2mj9mwtByjf1hjw1",g="qrg1ED3pXjNKyMzV6BaZ",N="gAMOuDM8LTFy_6BoGNXa",L=e=>{const{visible:t,setVisible:a,link:n}=e,[l,s]=(0,r.useState)(!0);return r.default.createElement(u.Modal,{className:"faxWNOvAqlYe7Qt098J_",open:t,width:"90vw",onCancel:()=>a(!1),destroyOnClose:!0,footer:null},r.default.createElement("iframe",{className:"ycJtWvpyuebtY0C09cfV",style:{display:l?"none":"block"},src:n,onLoad:()=>s(!1)}))},b="Vb7Tf72Zs_5MV8fyc_kw";function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},k.apply(null,arguments)}const _={tab:e=>{const{data:t,idx:a,stepChildrenLength:n,tabNum:l,currentLinkList:s,setCurrentLinkList:i}=e,c=(e,t)=>{return e.length<=s.length?(a=s,e.every(((e,t)=>e===a[t]))):0==t;var a};return r.default.createElement("div",{className:(0,E.default)("zqqbOJmu8bGfDAVrSMVg",{[v]:1!=l,[y]:a<n-1})},(t?.children??[]).map(((e,t)=>"tabItem"!==e.type?null:r.default.createElement("div",{key:e.id,className:(0,E.default)("ToV17JEnPHyjaOLN1F_7",{[m]:c(e.linkList,t),[f]:1!=l,[p]:e.icon}),onClick:()=>{i(e.linkList)}},e.icon&&r.default.createElement("div",{className:"WBOJ7Z5UqTUt81cDtpgE",dangerouslySetInnerHTML:{__html:e.icon}}),e.text))))},article:e=>{const{data:t}=e,a=(0,r.useMemo)((()=>t?.text?.replace(/<img([^>]+)>/g,(e=>`<div class="img-container">${e}<i class="iconfont img-preview">&#x11bc7;</i></div>`))??""),[t]);return r.default.createElement("div",{className:"PDFOyZOPDLlI3nkG8v3A",dangerouslySetInnerHTML:{__html:a}})},dictionary:e=>{const{data:t}=e,[a,n]=(0,r.useState)(!1),[l,s]=(0,r.useState)("");return r.default.createElement("div",{className:"fwoStWa964EjtpJv31FG"},(t?.children??[]).map((e=>"modal"===e.type?r.default.createElement("div",{key:e.id,className:h,onClick:()=>(e=>{s(e.link),n(!0)})(e)},e.icon&&r.default.createElement("div",{className:g,dangerouslySetInnerHTML:{__html:e.icon}}),r.default.createElement("div",{className:N},e.text)):r.default.createElement("a",{className:h,href:e.link},e.icon&&r.default.createElement("div",{className:g,dangerouslySetInnerHTML:{__html:e.icon}}),r.default.createElement("div",{className:N},e.text)))),r.default.createElement(L,{visible:a,setVisible:n,link:l}))},extra:e=>{const{data:t}=e,[a,n]=(0,r.useState)(!1),[l,s]=(0,r.useState)([]);return r.default.createElement("div",{className:"ZClzBYnAcJyLGBSJvfyU"},(t?.children??[]).map(((e,t)=>"link"===e.type?r.default.createElement(u.Button,{className:b,key:t,type:"primary",href:e.link},e.text):r.default.createElement(u.Button,{className:b,key:t,onClick:()=>(e=>{s(e.link),n(!0)})(e)},e.text))),r.default.createElement(L,{visible:a,setVisible:n,link:l}))},default:({data:e})=>r.default.createElement("div",{style:{color:"red",fontSize:20,textAlign:"center"}},"uniqueName: ",e.uniqueName,",type: ",e.type,"不符合规则")},x=e=>{const{data:t,module:a,feature:n,currentLinkList:l,currentQuoteList:s,index:i,...c}=e,d=(0,r.useContext)(P);return r.default.createElement(r.default.Fragment,null,r.default.createElement(u.Tooltip,{title:d.rebate_copy_share},r.default.createElement("span",{className:o,onClick:()=>{const e=(l||[]).join("-"),t=""!=e?`&linkList=${e}`:"",r=(s||[]).join("-"),c=""!=r?`&quoteList=${r}`:"",o=`${window.location.origin}/quickstart/detail?module=${a}&feature=${n}${t}${c}#step-${i+1}`;navigator.clipboard&&navigator.clipboard.writeText?(navigator.clipboard.writeText(o),u.message.success(d.rebate_copy_share_success)):W(o)}},t.text,r.default.createElement("i",{className:"iconfont"},""))),(t?.children??[]).map(((e,a)=>{const n=_[e?.type]||_.default,s=(t?.children??[]).slice(0,a+1).filter((e=>"tab"===e?.type)).length;return r.default.createElement(n,k({key:a,idx:a,stepChildrenLength:t?.children?.length??0,data:e,tabNum:s,currentLinkList:l},c))})))},w=e=>{const{data:t,currentQuoteList:a,setCurrentQuoteList:n}=e,l=(0,r.useContext)(P),s=(0,r.useMemo)((()=>a.includes(t.id)),[a,t.id]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:o,onClick:()=>{return e=t.id,void(a.includes(e)?n(a.filter((t=>t!==e))):n([...a,e]));var e}},r.default.createElement("div",{className:"Ay8nBajHQSoRUcWgoyYA"},t.icon?t.icon.startsWith("<svg")?r.default.createElement("div",{className:d,dangerouslySetInnerHTML:{__html:t.icon}}):r.default.createElement("img",{className:d,src:t.icon,alt:"quote"}):r.default.createElement(r.default.Fragment,null),r.default.createElement("div",{className:"uCg8ozQ0Zsh8rpawlv5w"},t.text)),r.default.createElement("div",{className:"uXPukzQ6vzEhazGLvcPY"},r.default.createElement("div",null,s?l.order_close_product:l.common_view_short),r.default.createElement("i",{className:"iconfont",style:{color:"#888888",...s?{transform:"rotate(180deg)"}:{}}},""))),s&&r.default.createElement("div",{className:"KWJJXxKnKL5wLoYE94QN"}))},C=e=>{const{data:t,index:a,...n}=e;return r.default.createElement("div",{id:`step-${a+1}`,className:(0,E.default)("jzTu4XFjN30iTiW0qFJh","step"===t.type?"E50ZUabr1u8wH82BvFkX":"t12DH8SW4jP1wwjy25F9")},r.default.createElement("div",{className:"HTnvY_Txf3pOLE5vdnYS"}),r.default.createElement("div",{className:"Yu1PS5mH1ECigr66kFUU"},a+1),r.default.createElement("div",{className:"LHMNdWiuhitG28UDSqHN"},"step"===t.type?r.default.createElement(x,k({data:t,index:a},n)):r.default.createElement(w,k({data:t},n))))};function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},S.apply(null,arguments)}function T(e,t,a=[]){if(Array.isArray(e))return e.map((e=>{const n=[...a];return e={...e,...t[e.u]},["tab","tabItem"].includes(e.type)&&n.push(e.id),e.c&&(e.children=T(e.c,t,n)),{...e,linkList:n}}))}function M(e,t,a,n,l,r){t.some((e=>"step"===e.type||"quote"===e.type))?(t.forEach((e=>{"step"!=e.type&&"quote"!=e.type&&a.push(e)})),r.push({...e,children:a}),q(t,n,l,r)):t.some((e=>"tab"===e.type))?t.some((t=>{if(a.push(t),"tab"!=t.type)return!1;const s=n.findIndex((e=>e==t.id))>-1?n[n.findIndex((e=>e==t.id))+1]:t.children?.[0]?.id??-1,i=t.children.find((e=>e.id==s));return M(e,i?.children||[],a,n,l,r),!0})):r.push({...e,children:[...a,...t]})}function q(e,t,a,n=[]){if(Array.isArray(e))return(e||[]).forEach((e=>{if("step"===e.type){const{children:l}=e;M(e,l,[],t,a,n)}else"quote"===e.type&&(n.push(e),a.includes(e.id)&&q(e.children,t,a,n))})),n}const j=e=>{const{structure:t,linkList:a,quoteList:n,content:l,...s}=e,[i,c]=(0,r.useState)(a),[u,o]=(0,r.useState)(n),d=(0,r.useMemo)((()=>T(t,l)),[t]),m=(0,r.useMemo)((()=>q(d,i,u)),[d,i,u]);return r.default.createElement(r.default.Fragment,null,m.map(((e,t)=>r.default.createElement(C,S({key:e.id,data:e,index:t,currentLinkList:i,setCurrentLinkList:c,currentQuoteList:u,setCurrentQuoteList:o},s)))))},O=r.default.memo(j,((e,t)=>e.structure===t.structure)),F=(e=>{var t={};return l.d(t,e),t})({Link:()=>n.Link,useLocation:()=>n.useLocation}),P=(0,r.createContext)({});function W(e){const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy"),u.message.success(i18n.rebate_copy_share_success)}catch(e){u.message.error(i18n.rebate_copy_share_failed)}finally{document.body.removeChild(t)}}const I=e=>{const{feature:t,data:a,content:n,linkList:l,quoteList:i,module:c}=e,o=(0,r.useContext)(P),d=(0,r.useMemo)((()=>t===a.alias),[t,a]),m=(0,F.useLocation)(),[f,p]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=m.hash;setTimeout((()=>{let t=0;if(e){const a=50;t=document.querySelector(e).getBoundingClientRect().top+window.scrollY-a}window.scrollTo({top:t})}),0)}),[m]),r.default.createElement("div",{id:a.alias,className:"lKRXIcLGEpMxp6uBbzgj"},r.default.createElement(F.Link,{className:"UqcnoA6terhouZ8seTFw",to:{pathname:"/quickstart/detail",search:new URLSearchParams({module:c,...a.alias==t?{}:{feature:a.alias}}).toString(),...a.alias==t?{}:{hash:a.alias}}},r.default.createElement("div",{className:"z0J3YL7I4EioYWba9Tny"},a.icon&&r.default.createElement("div",{className:"pmFo7bZwNBwG41evVLdC",dangerouslySetInnerHTML:{__html:a.icon}}),r.default.createElement("div",null,r.default.createElement("div",{className:s},a.name,r.default.createElement(u.Tooltip,{title:o.rebate_copy_share},r.default.createElement("i",{className:"iconfont",onClick:e=>{e.preventDefault(),e.stopPropagation();const t=`${window.location.origin}/quickstart/detail?module=${c}&feature=${a.alias}#${a.alias}`;navigator.clipboard&&navigator.clipboard.writeText?(navigator.clipboard.writeText(t),u.message.success(o.rebate_copy_share_success)):W(t)}},""))),!d&&r.default.createElement("div",{className:"Vz3906VSoXJTeoXHWasO"},a.summary))),r.default.createElement("div",{className:"hqbyJUa6KTSDLsA00lQg"},d?o.order_close_product:o.read)),d&&r.default.createElement("div",{className:"_pWnrxnSG9u3Apj_Ngh9",onClick:e=>{let t=e.target,a=null;"IMG"===t.tagName?a=t:"iconfont img-preview"===t.className&&(a=t.parentElement.querySelector("img")),a&&(p(a.src),y(!0))}},a.content&&r.default.createElement("div",{className:"X5uevNFu6aPhLiiQdfhG"},r.default.createElement("i",{className:"iconfont"},""),r.default.createElement("div",{className:"iI1Knk7CNaGbKOB7b6bW"},r.default.createElement("div",{className:s},o.function_purpose),r.default.createElement("div",{className:"lYTxqzoPW7srqRYw8x9z",dangerouslySetInnerHTML:{__html:a.content}}))),a.remark&&r.default.createElement("div",{className:"kR6VNHepLVmCknDi4RuO"},a.remark),r.default.createElement(u.Image,{style:{display:"none"},src:f,preview:{visible:v,src:f,onVisibleChange:e=>{y(e)}}}),r.default.createElement(O,{structure:a.contentRelative,content:n,module:c,feature:t,linkList:d?l:[],quoteList:d?i:[]})))},J=e=>{const{data:t,content:a,module:n,feature:l,setFeature:s,linkList:i,quoteList:c,i18n:u}=e,o=(0,r.useMemo)((()=>{let e=n;return e||(e=t?.[0]?.alias??"platform_post"),t.find((t=>t.alias===e))}),[t,n]);return o&&r.default.createElement(P.Provider,{value:u},r.default.createElement("div",{className:"mv6UOUglZrz9CNruDm7Q",style:{marginBottom:l?0:200}},(o.features||[]).map((e=>r.default.createElement(I,{key:`${n}-${e.alias}`,feature:l,data:e,content:a,setFeature:s,linkList:i,quoteList:c,module:n})))))};export{J as FeatureBox};
@@ -1,8 +1,7 @@
1
- /* src/FeatureBox/index.less */
2
- .FeatureBox {
1
+ .mv6UOUglZrz9CNruDm7Q {
3
2
  flex: 1 1 auto;
4
3
  }
5
- .FeatureBox .FeatureItem {
4
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj {
6
5
  width: 100%;
7
6
  margin-bottom: 30px;
8
7
  border-radius: 12px;
@@ -11,39 +10,39 @@
11
10
  background-color: #FFFFFF;
12
11
  box-shadow: 3px 3px 4px 0px rgba(0, 0, 0, 0.05);
13
12
  }
14
- .FeatureBox .FeatureItem .header {
13
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj .UqcnoA6terhouZ8seTFw {
15
14
  color: #333333;
16
15
  display: flex;
17
16
  justify-content: space-between;
18
17
  align-items: center;
19
18
  padding: 20px 28px;
20
19
  }
21
- .FeatureBox .FeatureItem .header .headerLeft {
20
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj .UqcnoA6terhouZ8seTFw .z0J3YL7I4EioYWba9Tny {
22
21
  display: flex;
23
22
  align-items: flex-start;
24
23
  gap: 12px;
25
24
  }
26
- .FeatureBox .FeatureItem .header .headerLeft .iconBox {
25
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj .UqcnoA6terhouZ8seTFw .z0J3YL7I4EioYWba9Tny .pmFo7bZwNBwG41evVLdC {
27
26
  width: 20px;
28
27
  height: 20px;
29
28
  }
30
- .FeatureBox .FeatureItem .header .headerLeft .title {
29
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj .UqcnoA6terhouZ8seTFw .z0J3YL7I4EioYWba9Tny .JlW5Amoa76Zmhbgg_PQl {
31
30
  font-size: 15px;
32
31
  font-weight: 500;
33
32
  }
34
- .FeatureBox .FeatureItem .header .headerLeft .title :global .iconfont {
33
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj .UqcnoA6terhouZ8seTFw .z0J3YL7I4EioYWba9Tny .JlW5Amoa76Zmhbgg_PQl .iconfont {
35
34
  font-size: 13px;
36
35
  color: #7f7f7f;
37
36
  cursor: pointer;
38
37
  margin-left: 16px;
39
38
  }
40
- .FeatureBox .FeatureItem .header .headerLeft .title :global .iconfont:hover {
39
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj .UqcnoA6terhouZ8seTFw .z0J3YL7I4EioYWba9Tny .JlW5Amoa76Zmhbgg_PQl .iconfont:hover {
41
40
  color: var(--color-primary);
42
41
  }
43
- .FeatureBox .FeatureItem .header .headerLeft .summary {
42
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj .UqcnoA6terhouZ8seTFw .z0J3YL7I4EioYWba9Tny .Vz3906VSoXJTeoXHWasO {
44
43
  margin-top: 12px;
45
44
  }
46
- .FeatureBox .FeatureItem .header .btn {
45
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj .UqcnoA6terhouZ8seTFw .hqbyJUa6KTSDLsA00lQg {
47
46
  font-size: 14px;
48
47
  border-radius: 5px;
49
48
  padding: 5px 18px;
@@ -51,18 +50,18 @@
51
50
  border: 1px solid #d9d9d9;
52
51
  transition: all 0.3s ease;
53
52
  }
54
- .FeatureBox .FeatureItem .header:hover {
53
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj .UqcnoA6terhouZ8seTFw:hover {
55
54
  text-decoration: none;
56
55
  }
57
- .FeatureBox .FeatureItem .header:hover .btn {
56
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj .UqcnoA6terhouZ8seTFw:hover .hqbyJUa6KTSDLsA00lQg {
58
57
  color: var(--color-primary);
59
58
  border-color: var(--color-primary);
60
59
  }
61
- .FeatureBox .FeatureItem .wrapper {
60
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj ._pWnrxnSG9u3Apj_Ngh9 {
62
61
  border-top: 1px solid #ebebeb;
63
62
  padding: 20px 28px;
64
63
  }
65
- .FeatureBox .FeatureItem .wrapper .contentBox {
64
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj ._pWnrxnSG9u3Apj_Ngh9 .X5uevNFu6aPhLiiQdfhG {
66
65
  padding: 14px 20px;
67
66
  display: flex;
68
67
  align-items: flex-start;
@@ -71,48 +70,47 @@
71
70
  gap: 8px;
72
71
  margin-bottom: 28px;
73
72
  }
74
- .FeatureBox .FeatureItem .wrapper .contentBox :global .iconfont {
73
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj ._pWnrxnSG9u3Apj_Ngh9 .X5uevNFu6aPhLiiQdfhG .iconfont {
75
74
  color: #f59a23;
76
75
  font-size: 18px;
77
76
  }
78
- .FeatureBox .FeatureItem .wrapper .contentBox .contentRight .title {
77
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj ._pWnrxnSG9u3Apj_Ngh9 .X5uevNFu6aPhLiiQdfhG .iI1Knk7CNaGbKOB7b6bW .JlW5Amoa76Zmhbgg_PQl {
79
78
  font-weight: 500;
80
79
  }
81
- .FeatureBox .FeatureItem .wrapper .contentBox .contentRight .content {
80
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj ._pWnrxnSG9u3Apj_Ngh9 .X5uevNFu6aPhLiiQdfhG .iI1Knk7CNaGbKOB7b6bW .lYTxqzoPW7srqRYw8x9z {
82
81
  line-height: 1.8em;
83
82
  margin-top: 8px;
84
83
  }
85
- .FeatureBox .FeatureItem .wrapper .contentBox .contentRight .content :global li::before {
86
- content: "\2022";
84
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj ._pWnrxnSG9u3Apj_Ngh9 .X5uevNFu6aPhLiiQdfhG .iI1Knk7CNaGbKOB7b6bW .lYTxqzoPW7srqRYw8x9z li::before {
85
+ content: "";
87
86
  font-size: 1em;
88
87
  font-weight: 300;
89
88
  margin-right: 10px;
90
89
  }
91
- .FeatureBox .FeatureItem .wrapper .remark {
90
+ .mv6UOUglZrz9CNruDm7Q .lKRXIcLGEpMxp6uBbzgj ._pWnrxnSG9u3Apj_Ngh9 .kR6VNHepLVmCknDi4RuO {
92
91
  color: #7f7f7f;
93
92
  }
94
- :global .pgant-tooltip-inner {
93
+ .pgant-tooltip-inner {
95
94
  min-height: unset;
96
95
  }
97
- :global .pgant-image-preview-img {
96
+ .pgant-image-preview-img {
98
97
  max-width: 80vw;
99
98
  max-height: 80vh;
100
99
  }
101
100
 
102
- /* src/StepAndQuote/index.less */
103
- .StepAndQuote {
101
+ .jzTu4XFjN30iTiW0qFJh {
104
102
  display: block;
105
103
  position: relative;
106
104
  color: #333333;
107
105
  }
108
- .StepAndQuote .tail {
106
+ .jzTu4XFjN30iTiW0qFJh .HTnvY_Txf3pOLE5vdnYS {
109
107
  position: absolute;
110
108
  top: 24px;
111
109
  left: 12px;
112
110
  height: 100%;
113
111
  border-left: 1px solid #e1e1e1;
114
112
  }
115
- .StepAndQuote .circle {
113
+ .jzTu4XFjN30iTiW0qFJh .Yu1PS5mH1ECigr66kFUU {
116
114
  position: absolute;
117
115
  width: 24px;
118
116
  height: 24px;
@@ -126,22 +124,22 @@
126
124
  justify-content: center;
127
125
  font-size: 12px;
128
126
  }
129
- .StepAndQuote .content {
127
+ .jzTu4XFjN30iTiW0qFJh .LHMNdWiuhitG28UDSqHN {
130
128
  margin-left: 60px;
131
129
  position: relative;
132
130
  word-break: break-all;
133
131
  }
134
- .StepAndQuote.Step {
132
+ .jzTu4XFjN30iTiW0qFJh.E50ZUabr1u8wH82BvFkX {
135
133
  padding-bottom: 32px;
136
134
  }
137
- .StepAndQuote.Step .title {
135
+ .jzTu4XFjN30iTiW0qFJh.E50ZUabr1u8wH82BvFkX .Wa7TmEji7UmTaY49_ja0 {
138
136
  font-size: 15px;
139
137
  font-weight: 650;
140
138
  margin-bottom: 5px;
141
139
  cursor: pointer;
142
140
  display: inline-block;
143
141
  }
144
- .StepAndQuote.Step .title :global .iconfont {
142
+ .jzTu4XFjN30iTiW0qFJh.E50ZUabr1u8wH82BvFkX .Wa7TmEji7UmTaY49_ja0 .iconfont {
145
143
  font-weight: normal;
146
144
  opacity: 0;
147
145
  width: 13px;
@@ -152,30 +150,30 @@
152
150
  font-size: 13px;
153
151
  transition: opacity 0.3s ease-in-out;
154
152
  }
155
- .StepAndQuote.Step .title:hover :global .iconfont {
153
+ .jzTu4XFjN30iTiW0qFJh.E50ZUabr1u8wH82BvFkX .Wa7TmEji7UmTaY49_ja0:hover .iconfont {
156
154
  opacity: 100;
157
155
  color: var(--color-primary);
158
156
  }
159
- .StepAndQuote.Quote {
157
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 {
160
158
  padding-bottom: 56px;
161
159
  position: relative;
162
160
  }
163
- .StepAndQuote.Quote .line {
161
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 .KWJJXxKnKL5wLoYE94QN {
164
162
  width: 100%;
165
163
  height: 1px;
166
164
  margin-top: 56px;
167
165
  background-color: #e1e1e1;
168
166
  }
169
- .StepAndQuote.Quote .circle {
167
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 .Yu1PS5mH1ECigr66kFUU {
170
168
  top: 18px;
171
169
  }
172
- .StepAndQuote.Quote .tail {
170
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 .HTnvY_Txf3pOLE5vdnYS {
173
171
  display: none;
174
172
  }
175
- .StepAndQuote.Quote .content {
173
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 .LHMNdWiuhitG28UDSqHN {
176
174
  margin-left: 0;
177
175
  }
178
- .StepAndQuote.Quote .title {
176
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 .Wa7TmEji7UmTaY49_ja0 {
179
177
  cursor: pointer;
180
178
  padding: 12px;
181
179
  border-radius: 5px;
@@ -186,39 +184,38 @@
186
184
  justify-content: space-between;
187
185
  transition: all 0.3s ease-in-out;
188
186
  }
189
- .StepAndQuote.Quote .title .QuoteBoxLeft {
187
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 .Wa7TmEji7UmTaY49_ja0 .Ay8nBajHQSoRUcWgoyYA {
190
188
  display: flex;
191
189
  align-items: center;
192
190
  gap: 8px;
193
191
  }
194
- .StepAndQuote.Quote .title .QuoteBoxLeft .QuoteIcon {
192
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 .Wa7TmEji7UmTaY49_ja0 .Ay8nBajHQSoRUcWgoyYA .Yg0rmK0PPqJbMD9DlKYe {
195
193
  width: 40px;
196
194
  height: auto;
197
195
  }
198
- .StepAndQuote.Quote .title .QuoteBoxLeft .QuoteText {
196
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 .Wa7TmEji7UmTaY49_ja0 .Ay8nBajHQSoRUcWgoyYA .uCg8ozQ0Zsh8rpawlv5w {
199
197
  font-size: 15px;
200
198
  font-weight: 650;
201
199
  }
202
- .StepAndQuote.Quote .title .QuoteBoxRight {
200
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 .Wa7TmEji7UmTaY49_ja0 .uXPukzQ6vzEhazGLvcPY {
203
201
  display: flex;
204
202
  align-items: center;
205
203
  gap: 12px;
206
204
  }
207
- .StepAndQuote.Quote .title:hover {
205
+ .jzTu4XFjN30iTiW0qFJh.t12DH8SW4jP1wwjy25F9 .Wa7TmEji7UmTaY49_ja0:hover {
208
206
  box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.1);
209
207
  }
210
- .StepAndQuote:last-child .tail {
208
+ .jzTu4XFjN30iTiW0qFJh:last-child .HTnvY_Txf3pOLE5vdnYS {
211
209
  display: none;
212
210
  }
213
211
 
214
- /* src/Tab/index.less */
215
- .Tab {
212
+ .zqqbOJmu8bGfDAVrSMVg {
216
213
  display: flex;
217
214
  gap: 16px;
218
215
  padding: 10px 0 24px 0;
219
216
  border-bottom: 1px solid #ebebeb;
220
217
  }
221
- .Tab .tabItem {
218
+ .zqqbOJmu8bGfDAVrSMVg .ToV17JEnPHyjaOLN1F_7 {
222
219
  padding: 16px 28px;
223
220
  border: 1px solid #e1e1e1;
224
221
  border-radius: 5px;
@@ -230,78 +227,77 @@
230
227
  justify-content: center;
231
228
  gap: 5px;
232
229
  }
233
- .Tab .tabItem .tabIcon {
230
+ .zqqbOJmu8bGfDAVrSMVg .ToV17JEnPHyjaOLN1F_7 .WBOJ7Z5UqTUt81cDtpgE {
234
231
  width: 28px;
235
232
  height: 28px;
236
233
  color: #959595;
237
234
  fill: currentColor;
238
235
  transition: all 0.3s ease-in-out;
239
236
  }
240
- .Tab .tabItem:hover {
237
+ .zqqbOJmu8bGfDAVrSMVg .ToV17JEnPHyjaOLN1F_7:hover {
241
238
  color: var(--color-primary, #fb9332);
242
239
  }
243
- .Tab .tabItem:hover .tabIcon {
240
+ .zqqbOJmu8bGfDAVrSMVg .ToV17JEnPHyjaOLN1F_7:hover .WBOJ7Z5UqTUt81cDtpgE {
244
241
  color: var(--color-primary, #fb9332);
245
242
  }
246
- .Tab .tabItem.active {
243
+ .zqqbOJmu8bGfDAVrSMVg .ToV17JEnPHyjaOLN1F_7.G7lGrZkYJhHv2bRiTyh0 {
247
244
  color: var(--color-primary, #fb9332);
248
245
  border-color: var(--color-primary, #fb9332);
249
246
  }
250
- .Tab .tabItem.active .tabIcon {
247
+ .zqqbOJmu8bGfDAVrSMVg .ToV17JEnPHyjaOLN1F_7.G7lGrZkYJhHv2bRiTyh0 .WBOJ7Z5UqTUt81cDtpgE {
251
248
  color: var(--color-primary, #fb9332);
252
249
  }
253
- .Tab .tabItem.noFirstTabsItem {
250
+ .zqqbOJmu8bGfDAVrSMVg .ToV17JEnPHyjaOLN1F_7.XTXp1fMj7Jb4hRWOJySw {
254
251
  padding: 10px 22px;
255
252
  }
256
- .Tab .tabItem.hasIcon {
253
+ .zqqbOJmu8bGfDAVrSMVg .ToV17JEnPHyjaOLN1F_7.L_rKPiQFinN_d28xweyV {
257
254
  padding: 10px 28px;
258
255
  }
259
- .Tab.noFirstTab {
256
+ .zqqbOJmu8bGfDAVrSMVg.WEaTuAZk0UWtDx23Vi3v {
260
257
  padding: 24px 0 24px 0;
261
258
  }
262
- .Tab.isInternalChanged {
259
+ .zqqbOJmu8bGfDAVrSMVg.GU9940ucMlb6xXFw0C2f {
263
260
  margin-bottom: 24px;
264
261
  }
265
- .Tab + .Tab {
262
+ .zqqbOJmu8bGfDAVrSMVg + .zqqbOJmu8bGfDAVrSMVg {
266
263
  margin-top: -24px;
267
264
  }
268
265
 
269
- /* src/Article/index.less */
270
- .Article a {
266
+ .PDFOyZOPDLlI3nkG8v3A a {
271
267
  text-decoration: underline;
272
268
  text-decoration-color: var(--color-primary, #FB9332);
273
269
  }
274
- .Article img {
270
+ .PDFOyZOPDLlI3nkG8v3A img {
275
271
  border: 1px solid #eeeeee;
276
272
  }
277
- .Article b {
273
+ .PDFOyZOPDLlI3nkG8v3A b {
278
274
  color: #333333;
279
275
  }
280
- .Article :first-child {
276
+ .PDFOyZOPDLlI3nkG8v3A :first-child {
281
277
  margin-top: 0 !important;
282
278
  }
283
- .Article :global .title {
279
+ .PDFOyZOPDLlI3nkG8v3A .title {
284
280
  font-size: 14px;
285
281
  margin-top: 16px;
286
282
  margin-bottom: 8px;
287
283
  font-weight: 650;
288
284
  }
289
- .Article :global .desc {
285
+ .PDFOyZOPDLlI3nkG8v3A .desc {
290
286
  color: #999999;
291
287
  margin-top: var(--desc-margin-top, 16px);
292
288
  margin-bottom: 8px;
293
289
  }
294
- .Article :global .title + .desc {
290
+ .PDFOyZOPDLlI3nkG8v3A .title + .desc {
295
291
  --desc-margin-top: -6px;
296
292
  }
297
- .Article :global .img-container {
293
+ .PDFOyZOPDLlI3nkG8v3A .img-container {
298
294
  position: relative;
299
295
  cursor: pointer;
300
296
  }
301
- .Article :global .img-container img {
297
+ .PDFOyZOPDLlI3nkG8v3A .img-container img {
302
298
  width: 100%;
303
299
  }
304
- .Article :global .img-container .iconfont {
300
+ .PDFOyZOPDLlI3nkG8v3A .img-container .iconfont {
305
301
  display: none;
306
302
  transition: all 0.3s ease;
307
303
  opacity: 0;
@@ -314,27 +310,26 @@
314
310
  padding: 2px 4px;
315
311
  font-size: 16px;
316
312
  }
317
- .Article :global .img-container:hover .iconfont {
313
+ .PDFOyZOPDLlI3nkG8v3A .img-container:hover .iconfont {
318
314
  display: block;
319
315
  opacity: 1;
320
316
  }
321
- .Article :global .img-container + .img-container {
317
+ .PDFOyZOPDLlI3nkG8v3A .img-container + .img-container {
322
318
  margin-top: 10px;
323
319
  }
324
- .Article :global li::before {
325
- content: "\2022";
320
+ .PDFOyZOPDLlI3nkG8v3A li::before {
321
+ content: "";
326
322
  font-size: 1em;
327
323
  font-weight: 300;
328
324
  margin-right: 8px;
329
325
  }
330
326
 
331
- /* src/Dictionary/index.less */
332
- .Dictionary {
327
+ .fwoStWa964EjtpJv31FG {
333
328
  display: flex;
334
329
  margin-top: 10px;
335
330
  gap: 20px;
336
331
  }
337
- .Dictionary .item {
332
+ .fwoStWa964EjtpJv31FG .obyM2mj9mwtByjf1hjw1 {
338
333
  display: flex;
339
334
  flex-direction: column;
340
335
  align-items: center;
@@ -346,53 +341,52 @@
346
341
  cursor: pointer;
347
342
  text-decoration: none;
348
343
  }
349
- .Dictionary .item .dicIcon {
344
+ .fwoStWa964EjtpJv31FG .obyM2mj9mwtByjf1hjw1 .qrg1ED3pXjNKyMzV6BaZ {
350
345
  width: 16px;
351
346
  height: 16px;
352
347
  }
353
- .Dictionary .item .title {
348
+ .fwoStWa964EjtpJv31FG .obyM2mj9mwtByjf1hjw1 .gAMOuDM8LTFy_6BoGNXa {
354
349
  color: #333333;
355
350
  }
356
- .Dictionary .item:hover {
351
+ .fwoStWa964EjtpJv31FG .obyM2mj9mwtByjf1hjw1:hover {
357
352
  border-color: var(--color-primary, #fb9332);
358
353
  }
359
354
 
360
- /* src/HelpModal/index.less */
361
- .HelpModal {
355
+ .faxWNOvAqlYe7Qt098J_ {
362
356
  top: 0;
363
357
  bottom: 0;
364
358
  padding: 40px;
365
359
  height: 100vh;
366
360
  }
367
- .HelpModal :global .pgant-modal-content {
361
+ .faxWNOvAqlYe7Qt098J_ .pgant-modal-content {
368
362
  width: 100%;
369
363
  height: 100%;
370
364
  padding: 0;
371
365
  }
372
- .HelpModal :global .pgant-modal-content .pgant-modal-body {
366
+ .faxWNOvAqlYe7Qt098J_ .pgant-modal-content .pgant-modal-body {
373
367
  padding: 0;
374
368
  height: 100%;
375
369
  }
376
- .HelpModal .HelpModalSkeleton {
370
+ .faxWNOvAqlYe7Qt098J_ .iOKx5_GzMXdYLZKQpOxV {
377
371
  padding: 40px;
378
372
  width: 100%;
379
373
  height: 100%;
380
374
  box-sizing: border-box;
381
375
  }
382
- .HelpModal .HelpModalIframe {
376
+ .faxWNOvAqlYe7Qt098J_ .ycJtWvpyuebtY0C09cfV {
383
377
  width: 100%;
384
378
  height: 100%;
385
379
  border: none;
386
380
  }
387
381
 
388
- /* src/Extra/index.less */
389
- .Extra {
382
+ .ZClzBYnAcJyLGBSJvfyU {
390
383
  position: absolute;
391
384
  right: 0;
392
385
  top: 0;
393
386
  display: flex;
394
387
  gap: 12px;
395
388
  }
396
- .Extra .ExtraButton {
389
+ .ZClzBYnAcJyLGBSJvfyU .Vb7Tf72Zs_5MV8fyc_kw {
397
390
  border-radius: 3px;
398
391
  }
392
+
package/package.json CHANGED
@@ -1,43 +1,42 @@
1
1
  {
2
2
  "name": "quick-start-feature-box",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
+ "type": "module",
4
5
  "keywords": [
5
6
  "react",
6
7
  "components"
7
8
  ],
8
- "author": "",
9
+ "author": "skyfxxker",
9
10
  "license": "MIT",
10
- "type": "module",
11
+ "main": "dist/index.js",
11
12
  "module": "dist/index.js",
12
- "style": "dist/index.css",
13
- "files": [
14
- "dist/**"
15
- ],
13
+ "files": ["dist/**"],
16
14
  "scripts": {
17
- "build": "tsup"
15
+ "build": "webpack --config webpack.config.js"
18
16
  },
19
17
  "peerDependencies": {
20
18
  "classnames": "^2.3.1 || ^2.5.1",
21
- "react": "^18.0.0 || ^18.2.0",
22
- "react-dom": "^18.0.0 || ^18.2.0",
19
+ "react": ">=16.8.0",
20
+ "react-dom": ">=16.8.0",
23
21
  "react-router": "^6.3.0 || ^6.23.0",
24
- "react-router-dom": "^6.3.0 || ^6.23.0"
22
+ "react-router-dom": "^6.3.0 || ^6.23.0",
23
+ "antd": ">=4.0.0"
25
24
  },
26
25
  "devDependencies": {
27
- "esbuild-plugin-less": "^1.3.20",
28
- "less": "^4.2.2",
29
- "less-loader": "^12.2.0",
30
- "tsup": "^8.3.5",
31
- "typescript": "^5.0.0"
26
+ "@babel/core": "^7.15.0",
27
+ "@babel/preset-react": "^7.14.5",
28
+ "babel-loader": "^8.2.2",
29
+ "css-loader": "^6.7.1",
30
+ "less": "^4.1.2",
31
+ "less-loader": "^11.0.0",
32
+ "mini-css-extract-plugin": "^2.5.3",
33
+ "webpack": "^5.74.0",
34
+ "webpack-cli": "^4.10.0"
32
35
  },
33
36
  "exports": {
34
- "./package.json": "./package.json",
35
- ".": {
36
- "import": {
37
- "types": "./dist/index.d.ts",
38
- "default": "./dist/index.js"
39
- }
40
- },
41
- "./dist/index.css": "./dist/index.css"
42
- }
43
- }
37
+ ".": "./dist/index.js",
38
+ "./styles.css": "./dist/styles/index.css",
39
+ "./styles/*": "./dist/styles/*"
40
+ },
41
+ "style": "dist/styles/index.css"
42
+ }
package/dist/index.d.ts DELETED
@@ -1,80 +0,0 @@
1
- /**
2
- * 国际化类型定义
3
- */
4
- type I18N = {
5
- rebate_copy_share_success: (values: any) => any;
6
- rebate_copy_share_failed: (values: any) => any;
7
- rebate_copy_share: (values: any) => any;
8
- read: (values: any) => any;
9
- order_close_product: (values: any) => any;
10
- function_purpose: (values: any) => any;
11
- common_view_short: (values: any) => any;
12
- };
13
- /**
14
- * FeatureBox组件props类型定义
15
- */
16
- type FeatureBoxProps = {
17
- /**
18
- * - 国际化对象
19
- */
20
- i18n: I18N;
21
- /**
22
- * - 功能数据
23
- */
24
- data: any;
25
- /**
26
- * - 内容数据
27
- */
28
- content: any;
29
- /**
30
- * - 模块名称
31
- */
32
- module: string;
33
- /**
34
- * - 功能名称
35
- */
36
- feature: string;
37
- /**
38
- * - 设置功能方法
39
- */
40
- setFeature: Function;
41
- /**
42
- * - 链接列表
43
- */
44
- linkList: any[];
45
- /**
46
- * - 引用列表
47
- */
48
- quoteList: any[];
49
- };
50
- /**
51
- * 国际化类型定义
52
- * @typedef {Object} I18N
53
- * @property {(values: any) => import('react').ReactNode} rebate_copy_share_success
54
- * @property {(values: any) => import('react').ReactNode} rebate_copy_share_failed
55
- * @property {(values: any) => import('react').ReactNode} rebate_copy_share
56
- * @property {(values: any) => import('react').ReactNode} read
57
- * @property {(values: any) => import('react').ReactNode} order_close_product
58
- * @property {(values: any) => import('react').ReactNode} function_purpose
59
- * @property {(values: any) => import('react').ReactNode} common_view_short
60
- */
61
- /**
62
- * FeatureBox组件props类型定义
63
- * @typedef {Object} FeatureBoxProps
64
- * @property {I18N} i18n - 国际化对象
65
- * @property {any} data - 功能数据
66
- * @property {any} content - 内容数据
67
- * @property {string} module - 模块名称
68
- * @property {string} feature - 功能名称
69
- * @property {Function} setFeature - 设置功能方法
70
- * @property {Array} linkList - 链接列表
71
- * @property {Array} quoteList - 引用列表
72
- */
73
- /**
74
- * FeatureBox组件
75
- * @param {FeatureBoxProps} props - 组件props
76
- * @returns {JSX.Element} - 返回React元素
77
- */
78
- declare function FeatureBox(props: FeatureBoxProps): JSX.Element;
79
-
80
- export { FeatureBox };