@pnt-team/pnt-component-frontend 0.0.88 → 0.0.89

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.
@@ -110,47 +110,60 @@ var PntBusinessSelect = (props) => {
110
110
  );
111
111
  const fetchData = (0, import_react.useCallback)(
112
112
  async (kw, page, append) => {
113
- var _a, _b;
113
+ var _a, _b, _c;
114
114
  if (append) {
115
- if (appendLoadingRef.current || loadingRef.current)
115
+ if (appendLoadingRef.current || loadingRef.current) {
116
+ console.log("[PntBS] fetchData APPEND blocked: loading=" + loadingRef.current + " appendLoading=" + appendLoadingRef.current);
116
117
  return;
118
+ }
117
119
  const meta = listMetaRef.current;
118
- if (meta.keyword !== kw)
120
+ if (meta.keyword !== kw) {
121
+ console.log("[PntBS] fetchData APPEND blocked: kw mismatch " + kw + " vs " + meta.keyword);
119
122
  return;
120
- if (page <= meta.page)
123
+ }
124
+ if (page <= meta.page) {
125
+ console.log("[PntBS] fetchData APPEND blocked: page " + page + " <= " + meta.page);
121
126
  return;
122
- if (optionsRef.current.length >= meta.total)
127
+ }
128
+ if (optionsRef.current.length >= meta.total) {
129
+ console.log("[PntBS] fetchData APPEND blocked: no more");
123
130
  return;
131
+ }
124
132
  appendLoadingRef.current = true;
125
133
  }
126
134
  const seq = ++fetchSeqRef.current;
135
+ console.log('[PntBS] fetchData START kw="' + kw + '" page=' + page + " append=" + append + " seq=" + seq);
127
136
  loadingRef.current = true;
128
137
  setLoading(true);
129
138
  try {
130
139
  const res = await requestFn(buildParams(kw, page));
131
- if (seq !== fetchSeqRef.current)
140
+ console.log("[PntBS] fetchData GOT seq=" + seq + " latestSeq=" + fetchSeqRef.current + " code=" + res.code);
141
+ if (seq !== fetchSeqRef.current) {
142
+ console.log("[PntBS] fetchData seq MISMATCH - DROPPED (seq=" + seq + " latest=" + fetchSeqRef.current + ")");
132
143
  return;
144
+ }
133
145
  if (res.code === 0 && res.data) {
134
146
  const newList = res.data.list || [];
135
147
  const resTotal = ((_a = res.data.pagination) == null ? void 0 : _a.total) || 0;
136
148
  let nextList;
137
149
  if (append) {
138
- const existed = new Set(
139
- optionsRef.current.map((o) => o.game_id)
140
- );
141
- nextList = [
142
- ...optionsRef.current,
143
- ...newList.filter((o) => !existed.has(o.game_id))
144
- ];
150
+ const existed = new Set(optionsRef.current.map((o) => o.game_id));
151
+ nextList = [...optionsRef.current, ...newList.filter((o) => !existed.has(o.game_id))];
145
152
  } else {
146
153
  nextList = newList;
147
154
  lastReplaceAtRef.current = Date.now();
148
155
  }
149
156
  optionsRef.current = nextList;
150
157
  listMetaRef.current = { keyword: kw, page, total: resTotal };
158
+ console.log("[PntBS] fetchData SET options count=" + nextList.length + " first=" + (((_b = nextList[0]) == null ? void 0 : _b.name) || "null"));
151
159
  setOptions(nextList);
152
- (_b = onLoadedRef.current) == null ? void 0 : _b.call(onLoadedRef, nextList);
160
+ (_c = onLoadedRef.current) == null ? void 0 : _c.call(onLoadedRef, nextList);
161
+ } else {
162
+ console.log("[PntBS] fetchData BAD RESPONSE code=" + res.code + " hasData=" + !!res.data);
153
163
  }
164
+ } catch (e) {
165
+ const msg = e instanceof Error ? e.message : String(e);
166
+ console.log("[PntBS] fetchData ERROR seq=" + seq + ' kw="' + kw + '": ' + msg);
154
167
  } finally {
155
168
  if (append)
156
169
  appendLoadingRef.current = false;
@@ -165,10 +178,13 @@ var PntBusinessSelect = (props) => {
165
178
  const handleSearch = (0, import_react.useCallback)(
166
179
  (val) => {
167
180
  keywordRef.current = val;
181
+ console.log('[PntBS] handleSearch val="' + val + '" debounceMs=' + searchDebounce);
168
182
  if (debounceRef.current)
169
183
  clearTimeout(debounceRef.current);
170
184
  debounceRef.current = setTimeout(() => {
171
- fetchData(keywordRef.current, 1, false);
185
+ const kw = keywordRef.current;
186
+ console.log('[PntBS] handleSearch timer fired, fetchData kw="' + kw + '" append=false seq++');
187
+ fetchData(kw, 1, false);
172
188
  }, searchDebounce);
173
189
  },
174
190
  [fetchData, searchDebounce]
@@ -185,8 +201,9 @@ var PntBusinessSelect = (props) => {
185
201
  return;
186
202
  if (debounceRef.current)
187
203
  clearTimeout(debounceRef.current);
188
- if (keywordRef.current) {
189
- keywordRef.current = "";
204
+ keywordRef.current = "";
205
+ if (listMetaRef.current.keyword) {
206
+ console.log('[PntBS] popupClose resetting from kw="' + listMetaRef.current.keyword + '"');
190
207
  fetchData("", 1, false);
191
208
  }
192
209
  },
@@ -366,11 +383,11 @@ var PntBusinessSelect = (props) => {
366
383
  if (raw) {
367
384
  return { ...raw, value: raw.game_id, label: getLabelText(raw) };
368
385
  }
369
- const fromCtx = ctxOptions.find(
370
- (o) => String(o.value) === id
371
- );
386
+ const fromCtx = ctxOptions.find((o) => String(o.value) === id);
372
387
  if (fromCtx) {
373
- const { children, content, ...rest } = fromCtx;
388
+ const rest = { ...fromCtx };
389
+ delete rest.children;
390
+ delete rest.content;
374
391
  return rest;
375
392
  }
376
393
  return { value: id, label: id };
@@ -382,6 +399,15 @@ var PntBusinessSelect = (props) => {
382
399
  },
383
400
  [onChange, multiple, getLabelText]
384
401
  );
402
+ const handleClear = (0, import_react.useCallback)(() => {
403
+ console.log("[PntBS] handleClear X-button clicked, resetting");
404
+ keywordRef.current = "";
405
+ if (debounceRef.current)
406
+ clearTimeout(debounceRef.current);
407
+ if (listMetaRef.current.keyword) {
408
+ fetchData("", 1, false);
409
+ }
410
+ }, [fetchData]);
385
411
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
386
412
  import_tdesign_react.Select,
387
413
  {
@@ -390,6 +416,7 @@ var PntBusinessSelect = (props) => {
390
416
  filterable,
391
417
  filter: enableRemoteSearch ? void 0 : filterable ? localFilter : void 0,
392
418
  onSearch: enableRemoteSearch ? handleSearch : void 0,
419
+ onClear: enableRemoteSearch ? handleClear : void 0,
393
420
  loading: loading && options.length === 0,
394
421
  multiple,
395
422
  max,
@@ -19,6 +19,11 @@ interface PntGeneralLayoutProps {
19
19
  * 返回按钮点击回调
20
20
  */
21
21
  onBackButtonClick?: (() => void) | undefined;
22
+ /**
23
+ * 是否显示头部底部分割线
24
+ * @default true
25
+ */
26
+ headerBordered?: boolean;
22
27
  /**
23
28
  * 子头部内容
24
29
  * @description 位于 Header 下方,常用于放置面包屑、Tab 等
@@ -41,6 +46,25 @@ interface PntGeneralLayoutProps {
41
46
  * 内容区自定义样式
42
47
  */
43
48
  bodyStyle?: React.CSSProperties;
49
+ /**
50
+ * 内容区内边距
51
+ * @description 数字按 px 处理;需要全出血内容时可传 '24px 0'
52
+ * @default 24
53
+ */
54
+ bodyPadding?: number | string;
55
+ /**
56
+ * 内容区卡片圆角(px)
57
+ * @description 作用于 body 内 t-card / tea-card / 各业务 wrapper、block 容器
58
+ * @default 4
59
+ */
60
+ cardRadius?: number;
61
+ /**
62
+ * 底部按钮样式模式
63
+ * @description fixed-统一下按钮尺寸(高 36px、最小宽 92px、加粗中号字);
64
+ * auto-不约束按钮尺寸,仅保留按钮间距
65
+ * @default 'fixed'
66
+ */
67
+ footerButton?: 'fixed' | 'auto';
44
68
  /**
45
69
  * 底部内容
46
70
  * @description 传入后将渲染 Layout Footer 区域,常用于放置操作按钮
@@ -50,7 +74,8 @@ interface PntGeneralLayoutProps {
50
74
  /**
51
75
  * 通用页面布局组件(L3 布局组件)
52
76
  * @description 提供标准的「头部 + 子头部 + 内容区 + 底部」页面布局结构,
53
- * 基于 TDesign Layout 封装,适用于后台管理系统的详情页、表单页等场景。
77
+ * 基于 TDesign Layout(flex column)封装,内容区自动填满剩余高度,
78
+ * 适用于后台管理系统的列表页、详情页、表单页等场景。
54
79
  *
55
80
  * @example
56
81
  * ```tsx
@@ -76,6 +101,13 @@ interface PntGeneralLayoutProps {
76
101
  * >
77
102
  * <Detail />
78
103
  * </PntGeneralLayout>
104
+ *
105
+ * // 全出血内容区(无头部边线、内容无左右内边距、底部按钮不强制尺寸)
106
+ * <PntGeneralLayout
107
+ * headerBordered={false}
108
+ * bodyPadding="24px 0"
109
+ * footerButton="auto"
110
+ * />
79
111
  * ```
80
112
  */
81
113
  declare const PntGeneralLayout: FunctionComponent<PntGeneralLayoutProps>;
@@ -32,15 +32,29 @@ var PntGeneralLayout = (prop) => {
32
32
  headerTitle,
33
33
  showBackButton = false,
34
34
  onBackButtonClick,
35
+ headerBordered = true,
35
36
  subHeaderContent,
36
37
  operation,
37
38
  bodyRef,
38
39
  children,
39
40
  bodyStyle,
41
+ bodyPadding = 24,
42
+ cardRadius = 4,
43
+ footerButton = "fixed",
40
44
  footer
41
45
  } = prop;
42
46
  const { Header, Footer } = import_tdesign_react.Layout;
43
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tdesign_react.Layout, { className: `pnt-general-layout${className ? " " + className : ""}`, children: [
47
+ const layoutClassName = [
48
+ "pnt-general-layout",
49
+ !headerBordered && "pnt-general-layout--borderless",
50
+ footerButton === "auto" && "pnt-general-layout--footer-auto",
51
+ className
52
+ ].filter(Boolean).join(" ");
53
+ const cssVars = {
54
+ "--pnt-layout-body-padding": typeof bodyPadding === "number" ? `${bodyPadding}px` : bodyPadding,
55
+ "--pnt-layout-card-radius": `${cardRadius}px`
56
+ };
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tdesign_react.Layout, { className: layoutClassName, style: cssVars, children: [
44
58
  headerTitle && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Header, { children: [
45
59
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "header-title", children: [
46
60
  showBackButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -61,10 +75,7 @@ var PntGeneralLayout = (prop) => {
61
75
  {
62
76
  className: "general-layout-body",
63
77
  ref: bodyRef,
64
- style: {
65
- height: `calc(100%${headerTitle && " - 72px"}${footer && " - 72px"})`,
66
- ...bodyStyle
67
- },
78
+ style: bodyStyle,
68
79
  children
69
80
  }
70
81
  ),
@@ -1,90 +1,121 @@
1
- .pnt-general-layout {
2
- height: 100%;
3
- background-color: rgba(0, 0, 0, 0);
4
-
5
- .t-layout__header {
6
- height: auto;
7
- display: flex;
8
- justify-content: space-between;
9
- border-bottom: 1px solid #f0f3f6;
10
-
11
- .header-title {
12
- display: inline-block;
13
- vertical-align: top;
14
- padding: 24px;
15
-
16
- .goback-icon {
17
- margin-right: 12px;
18
- vertical-align: top;
19
- color: #3f8cff;
20
- cursor: pointer;
21
- }
22
-
23
- .title {
24
- display: inline-block;
25
- vertical-align: top;
26
- font-weight: 600;
27
- font-size: 20px;
28
- height: 24px;
29
- line-height: 24px;
30
- }
31
- }
32
-
33
- .header-operation {
34
- height: 72px;
35
- line-height: 72px;
36
- padding-right: 24px;
37
-
38
- .t-button + .t-button {
39
- margin-left: 12px;
40
- }
41
- }
42
- }
43
-
44
- .general-layout-sub-header {
45
- border-bottom: 1px solid #f0f3f6;
46
- }
47
-
48
- .general-layout-body {
49
- height: 100%;
50
- padding: 24px;
51
- overflow-y: auto;
52
- background: #fafafa;
53
-
54
- > div.tea-card,
55
- > div.t-card,
56
- > div.t-loading__parent > div.t-card,
57
- > div[class*='-wrapper'],
58
- > div[class*='-block'] {
59
- box-shadow: none;
60
- margin-bottom: 24px;
61
- border-radius: 4px;
62
- }
63
-
64
- > div:last-child,
65
- > div:last-child.t-card,
66
- > div:last-child.tea-card,
67
- > div.t-loading__parent > div:last-child.t-card,
68
- > div:last-child[class*='-wrapper'],
69
- > div:last-child[class*='-block'] {
70
- margin-bottom: 0;
71
- }
72
- }
73
-
74
- .t-layout__footer {
75
- padding: 18px 24px;
76
- background: #fff;
77
- border-top: 1px solid #f0f3f6;
78
-
79
- .t-button {
80
- font-size: 14px;
81
- min-width: 92px;
82
- height: 36px;
83
- font-weight: 600;
84
-
85
- & + .t-button {
86
- margin-left: 12px;
87
- }
88
- }
89
- }
90
- }
1
+ .pnt-general-layout {
2
+ // 可通过 props(bodyPadding / cardRadius)覆盖的布局变量
3
+ --pnt-layout-body-padding: 24px;
4
+ --pnt-layout-card-radius: 4px;
5
+
6
+ height: 100%;
7
+ background-color: rgba(0, 0, 0, 0);
8
+
9
+ .t-layout__header {
10
+ height: auto;
11
+ flex-shrink: 0;
12
+ display: flex;
13
+ justify-content: space-between;
14
+ align-items: stretch;
15
+ border-bottom: 1px solid #f0f3f6;
16
+
17
+ .header-title {
18
+ display: inline-flex;
19
+ align-items: center;
20
+ padding: 24px;
21
+
22
+ .goback-icon {
23
+ margin-right: 12px;
24
+ color: #3f8cff;
25
+ cursor: pointer;
26
+ }
27
+
28
+ .title {
29
+ font-weight: 600;
30
+ font-size: 20px;
31
+ line-height: 24px;
32
+ }
33
+ }
34
+
35
+ // 统一 flex 居中:高度由 header-title 的 padding 撑起(72px),
36
+ // 比固定 line-height: 72px 更稳,按钮高度变化也不会错位
37
+ .header-operation {
38
+ display: flex;
39
+ align-items: center;
40
+ padding-right: 24px;
41
+
42
+ .t-button + .t-button {
43
+ margin-left: 12px;
44
+ }
45
+ }
46
+ }
47
+
48
+ // 无头部分割线变体(headerBordered={false})
49
+ &--borderless {
50
+ .t-layout__header {
51
+ border-bottom: none;
52
+ }
53
+ }
54
+
55
+ .general-layout-sub-header {
56
+ flex-shrink: 0;
57
+ border-bottom: 1px solid #f0f3f6;
58
+ }
59
+
60
+ .general-layout-body {
61
+ // flex 自动填满 header/sub-header/footer 之外的剩余空间;
62
+ // min-height: 0 保证内容超长时由 body 自身滚动,而不是撑破布局
63
+ flex: 1 1 auto;
64
+ min-height: 0;
65
+ padding: var(--pnt-layout-body-padding);
66
+ overflow-y: auto;
67
+ background: #fafafa;
68
+
69
+ // 卡片/业务容器取各项目选择器超集,统一去阴影、间距与圆角
70
+ > div.tea-card,
71
+ > div.t-card,
72
+ > div.t-loading__parent > div.t-card,
73
+ > div[class*='-wrapper'],
74
+ > div[class*='-block'] {
75
+ box-shadow: none;
76
+ margin-bottom: 24px;
77
+ border-radius: var(--pnt-layout-card-radius);
78
+
79
+ .t-card__body {
80
+ border-radius: var(--pnt-layout-card-radius);
81
+ }
82
+ }
83
+
84
+ > div:last-child,
85
+ > div:last-child.t-card,
86
+ > div:last-child.tea-card,
87
+ > div.t-loading__parent > div:last-child.t-card,
88
+ > div:last-child[class*='-wrapper'],
89
+ > div:last-child[class*='-block'] {
90
+ margin-bottom: 0;
91
+ }
92
+ }
93
+
94
+ .t-layout__footer {
95
+ flex-shrink: 0;
96
+ padding: 18px 24px;
97
+ background: #fff;
98
+ border-top: 1px solid #f0f3f6;
99
+
100
+ .t-button {
101
+ font-size: 14px;
102
+ min-width: 92px;
103
+ height: 36px;
104
+ font-weight: 600;
105
+
106
+ & + .t-button {
107
+ margin-left: 12px;
108
+ }
109
+ }
110
+ }
111
+
112
+ // 底部按钮不约束尺寸变体(footerButton='auto'),仅保留按钮间距
113
+ &--footer-auto {
114
+ .t-layout__footer .t-button {
115
+ font-size: inherit;
116
+ min-width: 0;
117
+ height: auto;
118
+ font-weight: inherit;
119
+ }
120
+ }
121
+ }
@@ -153,35 +153,45 @@ const PntBusinessSelect = props => {
153
153
  // append=true 为滚动翻页(追加),append=false 为初始化/搜索/重置(替换)
154
154
  const fetchData = useCallback(async (kw, page, append) => {
155
155
  if (append) {
156
- // 任何请求进行中都不再追加;并校验关键词/页码/总数,
157
- // 防止搜索后残余滚动事件用新关键词 + 旧页码请求错误分页
158
- if (appendLoadingRef.current || loadingRef.current) return;
156
+ if (appendLoadingRef.current || loadingRef.current) {
157
+ console.log('[PntBS] fetchData APPEND blocked: loading=' + loadingRef.current + ' appendLoading=' + appendLoadingRef.current);
158
+ return;
159
+ }
159
160
  const meta = listMetaRef.current;
160
- if (meta.keyword !== kw) return;
161
- if (page <= meta.page) return;
162
- if (optionsRef.current.length >= meta.total) return;
161
+ if (meta.keyword !== kw) {
162
+ console.log('[PntBS] fetchData APPEND blocked: kw mismatch ' + kw + ' vs ' + meta.keyword);
163
+ return;
164
+ }
165
+ if (page <= meta.page) {
166
+ console.log('[PntBS] fetchData APPEND blocked: page ' + page + ' <= ' + meta.page);
167
+ return;
168
+ }
169
+ if (optionsRef.current.length >= meta.total) {
170
+ console.log('[PntBS] fetchData APPEND blocked: no more');
171
+ return;
172
+ }
163
173
  appendLoadingRef.current = true;
164
174
  }
165
- // 替换请求不被在途请求阻塞,靠序号让旧响应失效
166
175
  const seq = ++fetchSeqRef.current;
176
+ console.log('[PntBS] fetchData START kw="' + kw + '" page=' + page + ' append=' + append + ' seq=' + seq);
167
177
  loadingRef.current = true;
168
178
  setLoading(true);
169
179
  try {
170
180
  const res = await requestFn(buildParams(kw, page));
171
- // 已有更新的替换请求发出,本次(可能是旧关键词的翻页)结果丢弃
172
- if (seq !== fetchSeqRef.current) return;
173
- // 适配 commonEesType:code === 0 视为成功
181
+ console.log('[PntBS] fetchData GOT seq=' + seq + ' latestSeq=' + fetchSeqRef.current + ' code=' + res.code);
182
+ if (seq !== fetchSeqRef.current) {
183
+ console.log('[PntBS] fetchData seq MISMATCH - DROPPED (seq=' + seq + ' latest=' + fetchSeqRef.current + ')');
184
+ return;
185
+ }
174
186
  if (res.code === 0 && res.data) {
175
187
  const newList = res.data.list || [];
176
188
  const resTotal = res.data.pagination?.total || 0;
177
189
  let nextList;
178
190
  if (append) {
179
- // 按 game_id 去重,避免重复页混入
180
191
  const existed = new Set(optionsRef.current.map(o => o.game_id));
181
192
  nextList = [...optionsRef.current, ...newList.filter(o => !existed.has(o.game_id))];
182
193
  } else {
183
194
  nextList = newList;
184
- // 列表整体替换,屏蔽随后浏览器 clamp 滚动位置触发的残余触底
185
195
  lastReplaceAtRef.current = Date.now();
186
196
  }
187
197
  optionsRef.current = nextList;
@@ -190,9 +200,15 @@ const PntBusinessSelect = props => {
190
200
  page,
191
201
  total: resTotal
192
202
  };
203
+ console.log('[PntBS] fetchData SET options count=' + nextList.length + ' first=' + (nextList[0]?.name || 'null'));
193
204
  setOptions(nextList);
194
205
  onLoadedRef.current?.(nextList);
206
+ } else {
207
+ console.log('[PntBS] fetchData BAD RESPONSE code=' + res.code + ' hasData=' + !!res.data);
195
208
  }
209
+ } catch (e) {
210
+ const msg = e instanceof Error ? e.message : String(e);
211
+ console.log('[PntBS] fetchData ERROR seq=' + seq + ' kw="' + kw + '": ' + msg);
196
212
  } finally {
197
213
  if (append) appendLoadingRef.current = false;
198
214
  if (seq === fetchSeqRef.current) {
@@ -205,10 +221,12 @@ const PntBusinessSelect = props => {
205
221
  // ---- 远程搜索(防抖) ----
206
222
  const handleSearch = useCallback(val => {
207
223
  keywordRef.current = val;
224
+ console.log('[PntBS] handleSearch val="' + val + '" debounceMs=' + searchDebounce);
208
225
  if (debounceRef.current) clearTimeout(debounceRef.current);
209
226
  debounceRef.current = setTimeout(() => {
210
- // 防抖结束时以最新输入为准(请求序号会使期间的旧翻页响应失效)
211
- fetchData(keywordRef.current, 1, false);
227
+ const kw = keywordRef.current;
228
+ console.log('[PntBS] handleSearch timer fired, fetchData kw="' + kw + '" append=false seq++');
229
+ fetchData(kw, 1, false);
212
230
  }, searchDebounce);
213
231
  }, [fetchData, searchDebounce]);
214
232
 
@@ -224,8 +242,15 @@ const PntBusinessSelect = props => {
224
242
  const handlePopupVisibleChange = useCallback(visible => {
225
243
  if (visible) return;
226
244
  if (debounceRef.current) clearTimeout(debounceRef.current);
227
- if (keywordRef.current) {
228
- keywordRef.current = '';
245
+ // 必须以「当前列表实际使用的关键词」为准,不能只看 keywordRef:
246
+ // 1) 单选选中一项后,TDesign 关闭弹窗时会先以 blur 触发 onSearch(''),
247
+ // 把 keywordRef 提前清空并挂一个重置 timer,随后本回调又会清掉该 timer,
248
+ // 若仅按 keywordRef 判断就会漏发重置请求;
249
+ // 2) 用户手动清空输入但未关闭下拉时,keywordRef 已为 '',但列表仍残留
250
+ // 上次搜索结果,关闭时必须重置回默认列表。
251
+ keywordRef.current = '';
252
+ if (listMetaRef.current.keyword) {
253
+ console.log('[PntBS] popupClose resetting from kw="' + listMetaRef.current.keyword + '"');
229
254
  fetchData('', 1, false);
230
255
  }
231
256
  }, [fetchData]);
@@ -429,11 +454,11 @@ const PntBusinessSelect = props => {
429
454
  // 兜底:从 TDesign 上下文剥离 React 字段(children/content)
430
455
  const fromCtx = ctxOptions.find(o => String(o.value) === id);
431
456
  if (fromCtx) {
432
- const {
433
- children,
434
- content,
435
- ...rest
436
- } = fromCtx;
457
+ const rest = {
458
+ ...fromCtx
459
+ };
460
+ delete rest.children;
461
+ delete rest.content;
437
462
  return rest;
438
463
  }
439
464
  return {
@@ -446,15 +471,24 @@ const PntBusinessSelect = props => {
446
471
  selectedOptions: multiple ? selectedOptions : selectedOptions.slice(0, 1)
447
472
  });
448
473
  }, [onChange, multiple, getLabelText]);
474
+
475
+ // 点击 clear 按钮(X)时重置列表——TDesign 的 onClearValue 只 setInputValue,
476
+ // 不触发 handleInputChange / onSearch,所以需要主动重置。
477
+ const handleClear = useCallback(() => {
478
+ console.log('[PntBS] handleClear X-button clicked, resetting');
479
+ keywordRef.current = '';
480
+ if (debounceRef.current) clearTimeout(debounceRef.current);
481
+ if (listMetaRef.current.keyword) {
482
+ fetchData('', 1, false);
483
+ }
484
+ }, [fetchData]);
449
485
  return /*#__PURE__*/_jsx(Select, {
450
486
  value: selectValue,
451
487
  onChange: handleChange,
452
- filterable: filterable
453
- // 远程搜索模式由服务端过滤(传了 onSearch 时 TDesign 也会跳过本地过滤);
454
- // 仅全量模式使用本地过滤
455
- ,
488
+ filterable: filterable,
456
489
  filter: enableRemoteSearch ? undefined : filterable ? localFilter : undefined,
457
490
  onSearch: enableRemoteSearch ? handleSearch : undefined,
491
+ onClear: enableRemoteSearch ? handleClear : undefined,
458
492
  loading: loading && options.length === 0,
459
493
  multiple: multiple,
460
494
  max: max,
@@ -19,6 +19,11 @@ interface PntGeneralLayoutProps {
19
19
  * 返回按钮点击回调
20
20
  */
21
21
  onBackButtonClick?: (() => void) | undefined;
22
+ /**
23
+ * 是否显示头部底部分割线
24
+ * @default true
25
+ */
26
+ headerBordered?: boolean;
22
27
  /**
23
28
  * 子头部内容
24
29
  * @description 位于 Header 下方,常用于放置面包屑、Tab 等
@@ -41,6 +46,25 @@ interface PntGeneralLayoutProps {
41
46
  * 内容区自定义样式
42
47
  */
43
48
  bodyStyle?: React.CSSProperties;
49
+ /**
50
+ * 内容区内边距
51
+ * @description 数字按 px 处理;需要全出血内容时可传 '24px 0'
52
+ * @default 24
53
+ */
54
+ bodyPadding?: number | string;
55
+ /**
56
+ * 内容区卡片圆角(px)
57
+ * @description 作用于 body 内 t-card / tea-card / 各业务 wrapper、block 容器
58
+ * @default 4
59
+ */
60
+ cardRadius?: number;
61
+ /**
62
+ * 底部按钮样式模式
63
+ * @description fixed-统一下按钮尺寸(高 36px、最小宽 92px、加粗中号字);
64
+ * auto-不约束按钮尺寸,仅保留按钮间距
65
+ * @default 'fixed'
66
+ */
67
+ footerButton?: 'fixed' | 'auto';
44
68
  /**
45
69
  * 底部内容
46
70
  * @description 传入后将渲染 Layout Footer 区域,常用于放置操作按钮
@@ -50,7 +74,8 @@ interface PntGeneralLayoutProps {
50
74
  /**
51
75
  * 通用页面布局组件(L3 布局组件)
52
76
  * @description 提供标准的「头部 + 子头部 + 内容区 + 底部」页面布局结构,
53
- * 基于 TDesign Layout 封装,适用于后台管理系统的详情页、表单页等场景。
77
+ * 基于 TDesign Layout(flex column)封装,内容区自动填满剩余高度,
78
+ * 适用于后台管理系统的列表页、详情页、表单页等场景。
54
79
  *
55
80
  * @example
56
81
  * ```tsx
@@ -76,6 +101,13 @@ interface PntGeneralLayoutProps {
76
101
  * >
77
102
  * <Detail />
78
103
  * </PntGeneralLayout>
104
+ *
105
+ * // 全出血内容区(无头部边线、内容无左右内边距、底部按钮不强制尺寸)
106
+ * <PntGeneralLayout
107
+ * headerBordered={false}
108
+ * bodyPadding="24px 0"
109
+ * footerButton="auto"
110
+ * />
79
111
  * ```
80
112
  */
81
113
  declare const PntGeneralLayout: FunctionComponent<PntGeneralLayoutProps>;
@@ -7,7 +7,8 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  /**
8
8
  * 通用页面布局组件(L3 布局组件)
9
9
  * @description 提供标准的「头部 + 子头部 + 内容区 + 底部」页面布局结构,
10
- * 基于 TDesign Layout 封装,适用于后台管理系统的详情页、表单页等场景。
10
+ * 基于 TDesign Layout(flex column)封装,内容区自动填满剩余高度,
11
+ * 适用于后台管理系统的列表页、详情页、表单页等场景。
11
12
  *
12
13
  * @example
13
14
  * ```tsx
@@ -33,6 +34,13 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
33
34
  * >
34
35
  * <Detail />
35
36
  * </PntGeneralLayout>
37
+ *
38
+ * // 全出血内容区(无头部边线、内容无左右内边距、底部按钮不强制尺寸)
39
+ * <PntGeneralLayout
40
+ * headerBordered={false}
41
+ * bodyPadding="24px 0"
42
+ * footerButton="auto"
43
+ * />
36
44
  * ```
37
45
  */
38
46
  const PntGeneralLayout = prop => {
@@ -41,19 +49,29 @@ const PntGeneralLayout = prop => {
41
49
  headerTitle,
42
50
  showBackButton = false,
43
51
  onBackButtonClick,
52
+ headerBordered = true,
44
53
  subHeaderContent,
45
54
  operation,
46
55
  bodyRef,
47
56
  children,
48
57
  bodyStyle,
58
+ bodyPadding = 24,
59
+ cardRadius = 4,
60
+ footerButton = 'fixed',
49
61
  footer
50
62
  } = prop;
51
63
  const {
52
64
  Header,
53
65
  Footer
54
66
  } = Layout;
67
+ const layoutClassName = ['pnt-general-layout', !headerBordered && 'pnt-general-layout--borderless', footerButton === 'auto' && 'pnt-general-layout--footer-auto', className].filter(Boolean).join(' ');
68
+ const cssVars = {
69
+ '--pnt-layout-body-padding': typeof bodyPadding === 'number' ? `${bodyPadding}px` : bodyPadding,
70
+ '--pnt-layout-card-radius': `${cardRadius}px`
71
+ };
55
72
  return /*#__PURE__*/_jsxs(Layout, {
56
- className: `pnt-general-layout${className ? ' ' + className : ''}`,
73
+ className: layoutClassName,
74
+ style: cssVars,
57
75
  children: [headerTitle && /*#__PURE__*/_jsxs(Header, {
58
76
  children: [/*#__PURE__*/_jsxs("span", {
59
77
  className: "header-title",
@@ -75,10 +93,7 @@ const PntGeneralLayout = prop => {
75
93
  }), /*#__PURE__*/_jsx("div", {
76
94
  className: "general-layout-body",
77
95
  ref: bodyRef,
78
- style: {
79
- height: `calc(100%${headerTitle && ' - 72px'}${footer && ' - 72px'})`,
80
- ...bodyStyle
81
- },
96
+ style: bodyStyle,
82
97
  children: children
83
98
  }), footer && /*#__PURE__*/_jsx(Footer, {
84
99
  children: footer
@@ -1,90 +1,121 @@
1
- .pnt-general-layout {
2
- height: 100%;
3
- background-color: rgba(0, 0, 0, 0);
4
-
5
- .t-layout__header {
6
- height: auto;
7
- display: flex;
8
- justify-content: space-between;
9
- border-bottom: 1px solid #f0f3f6;
10
-
11
- .header-title {
12
- display: inline-block;
13
- vertical-align: top;
14
- padding: 24px;
15
-
16
- .goback-icon {
17
- margin-right: 12px;
18
- vertical-align: top;
19
- color: #3f8cff;
20
- cursor: pointer;
21
- }
22
-
23
- .title {
24
- display: inline-block;
25
- vertical-align: top;
26
- font-weight: 600;
27
- font-size: 20px;
28
- height: 24px;
29
- line-height: 24px;
30
- }
31
- }
32
-
33
- .header-operation {
34
- height: 72px;
35
- line-height: 72px;
36
- padding-right: 24px;
37
-
38
- .t-button + .t-button {
39
- margin-left: 12px;
40
- }
41
- }
42
- }
43
-
44
- .general-layout-sub-header {
45
- border-bottom: 1px solid #f0f3f6;
46
- }
47
-
48
- .general-layout-body {
49
- height: 100%;
50
- padding: 24px;
51
- overflow-y: auto;
52
- background: #fafafa;
53
-
54
- > div.tea-card,
55
- > div.t-card,
56
- > div.t-loading__parent > div.t-card,
57
- > div[class*='-wrapper'],
58
- > div[class*='-block'] {
59
- box-shadow: none;
60
- margin-bottom: 24px;
61
- border-radius: 4px;
62
- }
63
-
64
- > div:last-child,
65
- > div:last-child.t-card,
66
- > div:last-child.tea-card,
67
- > div.t-loading__parent > div:last-child.t-card,
68
- > div:last-child[class*='-wrapper'],
69
- > div:last-child[class*='-block'] {
70
- margin-bottom: 0;
71
- }
72
- }
73
-
74
- .t-layout__footer {
75
- padding: 18px 24px;
76
- background: #fff;
77
- border-top: 1px solid #f0f3f6;
78
-
79
- .t-button {
80
- font-size: 14px;
81
- min-width: 92px;
82
- height: 36px;
83
- font-weight: 600;
84
-
85
- & + .t-button {
86
- margin-left: 12px;
87
- }
88
- }
89
- }
90
- }
1
+ .pnt-general-layout {
2
+ // 可通过 props(bodyPadding / cardRadius)覆盖的布局变量
3
+ --pnt-layout-body-padding: 24px;
4
+ --pnt-layout-card-radius: 4px;
5
+
6
+ height: 100%;
7
+ background-color: rgba(0, 0, 0, 0);
8
+
9
+ .t-layout__header {
10
+ height: auto;
11
+ flex-shrink: 0;
12
+ display: flex;
13
+ justify-content: space-between;
14
+ align-items: stretch;
15
+ border-bottom: 1px solid #f0f3f6;
16
+
17
+ .header-title {
18
+ display: inline-flex;
19
+ align-items: center;
20
+ padding: 24px;
21
+
22
+ .goback-icon {
23
+ margin-right: 12px;
24
+ color: #3f8cff;
25
+ cursor: pointer;
26
+ }
27
+
28
+ .title {
29
+ font-weight: 600;
30
+ font-size: 20px;
31
+ line-height: 24px;
32
+ }
33
+ }
34
+
35
+ // 统一 flex 居中:高度由 header-title 的 padding 撑起(72px),
36
+ // 比固定 line-height: 72px 更稳,按钮高度变化也不会错位
37
+ .header-operation {
38
+ display: flex;
39
+ align-items: center;
40
+ padding-right: 24px;
41
+
42
+ .t-button + .t-button {
43
+ margin-left: 12px;
44
+ }
45
+ }
46
+ }
47
+
48
+ // 无头部分割线变体(headerBordered={false})
49
+ &--borderless {
50
+ .t-layout__header {
51
+ border-bottom: none;
52
+ }
53
+ }
54
+
55
+ .general-layout-sub-header {
56
+ flex-shrink: 0;
57
+ border-bottom: 1px solid #f0f3f6;
58
+ }
59
+
60
+ .general-layout-body {
61
+ // flex 自动填满 header/sub-header/footer 之外的剩余空间;
62
+ // min-height: 0 保证内容超长时由 body 自身滚动,而不是撑破布局
63
+ flex: 1 1 auto;
64
+ min-height: 0;
65
+ padding: var(--pnt-layout-body-padding);
66
+ overflow-y: auto;
67
+ background: #fafafa;
68
+
69
+ // 卡片/业务容器取各项目选择器超集,统一去阴影、间距与圆角
70
+ > div.tea-card,
71
+ > div.t-card,
72
+ > div.t-loading__parent > div.t-card,
73
+ > div[class*='-wrapper'],
74
+ > div[class*='-block'] {
75
+ box-shadow: none;
76
+ margin-bottom: 24px;
77
+ border-radius: var(--pnt-layout-card-radius);
78
+
79
+ .t-card__body {
80
+ border-radius: var(--pnt-layout-card-radius);
81
+ }
82
+ }
83
+
84
+ > div:last-child,
85
+ > div:last-child.t-card,
86
+ > div:last-child.tea-card,
87
+ > div.t-loading__parent > div:last-child.t-card,
88
+ > div:last-child[class*='-wrapper'],
89
+ > div:last-child[class*='-block'] {
90
+ margin-bottom: 0;
91
+ }
92
+ }
93
+
94
+ .t-layout__footer {
95
+ flex-shrink: 0;
96
+ padding: 18px 24px;
97
+ background: #fff;
98
+ border-top: 1px solid #f0f3f6;
99
+
100
+ .t-button {
101
+ font-size: 14px;
102
+ min-width: 92px;
103
+ height: 36px;
104
+ font-weight: 600;
105
+
106
+ & + .t-button {
107
+ margin-left: 12px;
108
+ }
109
+ }
110
+ }
111
+
112
+ // 底部按钮不约束尺寸变体(footerButton='auto'),仅保留按钮间距
113
+ &--footer-auto {
114
+ .t-layout__footer .t-button {
115
+ font-size: inherit;
116
+ min-width: 0;
117
+ height: auto;
118
+ font-weight: inherit;
119
+ }
120
+ }
121
+ }
@@ -1 +1 @@
1
- .pnt-image-preview-wrapper{position:relative}.pnt-image-preview-wrapper .pnt-image-preview-progress,.pnt-image-preview-wrapper .pnt-image-preview-upload-progress{align-items:center;display:flex;height:8.5rem;justify-content:center;width:8.5rem}.pnt-image-preview-wrapper .pnt-image-preview-progress .pnt-image-preview-loading,.pnt-image-preview-wrapper .pnt-image-preview-upload-progress .pnt-image-preview-loading{align-items:center;background-color:#f7f8fa;border-radius:.25rem;display:flex;flex-direction:column;height:100%;justify-content:center;text-align:center;width:100%}.pnt-image-preview-wrapper .pnt-image-preview-progress .pnt-image-preview-loading svg,.pnt-image-preview-wrapper .pnt-image-preview-upload-progress .pnt-image-preview-loading svg{color:var(--td-brand-color);font-size:1.5rem}.pnt-image-preview-wrapper .pnt-image-preview-progress .pnt-image-preview-loading p,.pnt-image-preview-wrapper .pnt-image-preview-upload-progress .pnt-image-preview-loading p{color:#808191;font-size:.75rem;margin-top:.25rem}.pnt-image-preview-wrapper .pnt-image-preview{height:8.5rem;width:8.5rem}.pnt-image-preview-wrapper .pnt-image-preview .pnt-image-preview-mask{align-items:center;background:rgba(0,0,0,.6);color:#fff;display:flex;height:100%;justify-content:center}.pnt-image-preview-wrapper .pnt-image-preview .pnt-image-preview-mask .pnt-image-preview-divider{border-left:.0625rem solid var(--td-text-color-anti);height:var(--td-comp-size-xxxs);margin:0 var(--td-comp-margin-l)}.pnt-business-select{width:100%}.pnt-business-select-option-label{display:block;width:100%}.pnt-business-select-popup .t-popup__content .t-loading,.pnt-business-select-popup .t-popup__content .total-wrapper{align-items:center;display:flex;font-weight:400;height:2.25rem;line-height:1.25rem;padding:0 .875rem}.pnt-business-select-popup .t-popup__content .total-wrapper{color:#808191;font-size:.875rem}.pnt-secure-box{color:#333;max-width:-moz-fit-content;max-width:fit-content;position:relative}.pnt-secure-box .view-icon{color:#3f8cff!important;cursor:pointer;font-size:small;position:absolute;right:-1.875rem;top:.0625rem}.pnt-secure-box .security-value{position:relative;top:.1875rem}.pnt-general-layout{background-color:transparent;height:100%}.pnt-general-layout .t-layout__header{border-bottom:.0625rem solid #f0f3f6;display:flex;height:auto;justify-content:space-between}.pnt-general-layout .t-layout__header .header-title{display:inline-block;padding:1.5rem;vertical-align:top}.pnt-general-layout .t-layout__header .header-title .goback-icon{color:#3f8cff;cursor:pointer;margin-right:.75rem;vertical-align:top}.pnt-general-layout .t-layout__header .header-title .title{display:inline-block;font-size:1.25rem;font-weight:600;height:1.5rem;line-height:1.5rem;vertical-align:top}.pnt-general-layout .t-layout__header .header-operation{height:4.5rem;line-height:4.5rem;padding-right:1.5rem}.pnt-general-layout .t-layout__header .header-operation .t-button+.t-button{margin-left:.75rem}.pnt-general-layout .general-layout-sub-header{border-bottom:.0625rem solid #f0f3f6}.pnt-general-layout .general-layout-body{background:#fafafa;height:100%;overflow-y:auto;padding:1.5rem}.pnt-general-layout .general-layout-body>div.t-card,.pnt-general-layout .general-layout-body>div.t-loading__parent>div.t-card,.pnt-general-layout .general-layout-body>div.tea-card,.pnt-general-layout .general-layout-body>div[class*=-block],.pnt-general-layout .general-layout-body>div[class*=-wrapper]{border-radius:.25rem;box-shadow:none;margin-bottom:1.5rem}.pnt-general-layout .general-layout-body>div.t-loading__parent>div:last-child.t-card,.pnt-general-layout .general-layout-body>div:last-child,.pnt-general-layout .general-layout-body>div:last-child.t-card,.pnt-general-layout .general-layout-body>div:last-child.tea-card,.pnt-general-layout .general-layout-body>div:last-child[class*=-block],.pnt-general-layout .general-layout-body>div:last-child[class*=-wrapper]{margin-bottom:0}.pnt-general-layout .t-layout__footer{background:#fff;border-top:.0625rem solid #f0f3f6;padding:1.125rem 1.5rem}.pnt-general-layout .t-layout__footer .t-button{font-size:.875rem;font-weight:600;height:2.25rem;min-width:5.75rem}.pnt-general-layout .t-layout__footer .t-button+.t-button{margin-left:.75rem}
1
+ .pnt-image-preview-wrapper{position:relative}.pnt-image-preview-wrapper .pnt-image-preview-progress,.pnt-image-preview-wrapper .pnt-image-preview-upload-progress{align-items:center;display:flex;height:8.5rem;justify-content:center;width:8.5rem}.pnt-image-preview-wrapper .pnt-image-preview-progress .pnt-image-preview-loading,.pnt-image-preview-wrapper .pnt-image-preview-upload-progress .pnt-image-preview-loading{align-items:center;background-color:#f7f8fa;border-radius:.25rem;display:flex;flex-direction:column;height:100%;justify-content:center;text-align:center;width:100%}.pnt-image-preview-wrapper .pnt-image-preview-progress .pnt-image-preview-loading svg,.pnt-image-preview-wrapper .pnt-image-preview-upload-progress .pnt-image-preview-loading svg{color:var(--td-brand-color);font-size:1.5rem}.pnt-image-preview-wrapper .pnt-image-preview-progress .pnt-image-preview-loading p,.pnt-image-preview-wrapper .pnt-image-preview-upload-progress .pnt-image-preview-loading p{color:#808191;font-size:.75rem;margin-top:.25rem}.pnt-image-preview-wrapper .pnt-image-preview{height:8.5rem;width:8.5rem}.pnt-image-preview-wrapper .pnt-image-preview .pnt-image-preview-mask{align-items:center;background:rgba(0,0,0,.6);color:#fff;display:flex;height:100%;justify-content:center}.pnt-image-preview-wrapper .pnt-image-preview .pnt-image-preview-mask .pnt-image-preview-divider{border-left:.0625rem solid var(--td-text-color-anti);height:var(--td-comp-size-xxxs);margin:0 var(--td-comp-margin-l)}.pnt-business-select{width:100%}.pnt-business-select-option-label{display:block;width:100%}.pnt-business-select-popup .t-popup__content .t-loading,.pnt-business-select-popup .t-popup__content .total-wrapper{align-items:center;display:flex;font-weight:400;height:2.25rem;line-height:1.25rem;padding:0 .875rem}.pnt-business-select-popup .t-popup__content .total-wrapper{color:#808191;font-size:.875rem}.pnt-secure-box{color:#333;max-width:-moz-fit-content;max-width:fit-content;position:relative}.pnt-secure-box .view-icon{color:#3f8cff!important;cursor:pointer;font-size:small;position:absolute;right:-1.875rem;top:.0625rem}.pnt-secure-box .security-value{position:relative;top:.1875rem}.pnt-general-layout{--pnt-layout-body-padding:1.5rem;--pnt-layout-card-radius:0.25rem;background-color:transparent;height:100%}.pnt-general-layout .t-layout__header{align-items:stretch;border-bottom:.0625rem solid #f0f3f6;display:flex;flex-shrink:0;height:auto;justify-content:space-between}.pnt-general-layout .t-layout__header .header-title{align-items:center;display:inline-flex;padding:1.5rem}.pnt-general-layout .t-layout__header .header-title .goback-icon{color:#3f8cff;cursor:pointer;margin-right:.75rem}.pnt-general-layout .t-layout__header .header-title .title{font-size:1.25rem;font-weight:600;line-height:1.5rem}.pnt-general-layout .t-layout__header .header-operation{align-items:center;display:flex;padding-right:1.5rem}.pnt-general-layout .t-layout__header .header-operation .t-button+.t-button{margin-left:.75rem}.pnt-general-layout--borderless .t-layout__header{border-bottom:none}.pnt-general-layout .general-layout-sub-header{border-bottom:.0625rem solid #f0f3f6;flex-shrink:0}.pnt-general-layout .general-layout-body{background:#fafafa;flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--pnt-layout-body-padding)}.pnt-general-layout .general-layout-body>div.t-card,.pnt-general-layout .general-layout-body>div.t-loading__parent>div.t-card,.pnt-general-layout .general-layout-body>div.tea-card,.pnt-general-layout .general-layout-body>div[class*=-block],.pnt-general-layout .general-layout-body>div[class*=-wrapper]{border-radius:var(--pnt-layout-card-radius);box-shadow:none;margin-bottom:1.5rem}.pnt-general-layout .general-layout-body>div.t-card .t-card__body,.pnt-general-layout .general-layout-body>div.t-loading__parent>div.t-card .t-card__body,.pnt-general-layout .general-layout-body>div.tea-card .t-card__body,.pnt-general-layout .general-layout-body>div[class*=-block] .t-card__body,.pnt-general-layout .general-layout-body>div[class*=-wrapper] .t-card__body{border-radius:var(--pnt-layout-card-radius)}.pnt-general-layout .general-layout-body>div.t-loading__parent>div:last-child.t-card,.pnt-general-layout .general-layout-body>div:last-child,.pnt-general-layout .general-layout-body>div:last-child.t-card,.pnt-general-layout .general-layout-body>div:last-child.tea-card,.pnt-general-layout .general-layout-body>div:last-child[class*=-block],.pnt-general-layout .general-layout-body>div:last-child[class*=-wrapper]{margin-bottom:0}.pnt-general-layout .t-layout__footer{background:#fff;border-top:.0625rem solid #f0f3f6;flex-shrink:0;padding:1.125rem 1.5rem}.pnt-general-layout .t-layout__footer .t-button{font-size:.875rem;font-weight:600;height:2.25rem;min-width:5.75rem}.pnt-general-layout .t-layout__footer .t-button+.t-button{margin-left:.75rem}.pnt-general-layout--footer-auto .t-layout__footer .t-button{font-size:inherit;font-weight:inherit;height:auto;min-width:0}
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("tdesign-react"),require("tdesign-icons-react")):"function"==typeof define&&define.amd?define([,,],t):"object"==typeof exports?exports.PntBusinessComponent=t(require("react"),require("tdesign-react"),require("tdesign-icons-react")):e.PntBusinessComponent=t(e.React,e.TDesign,e.TDesignIcons)}(self,(function(e,t,r){return function(){var n={76:function(e,t,r){"use strict";var n=r(809),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var n,a={},s=null,l=null;for(n in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(l=t.ref),t)i.call(t,n)&&!c.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:o,type:e,key:s,ref:l,props:a,_owner:u.current}}t.Fragment=a,t.jsx=s,t.jsxs=s},472:function(e,t,r){"use strict";e.exports=r(76)},809:function(t){"use strict";t.exports=e},352:function(e){"use strict";e.exports=t},420:function(e){"use strict";e.exports=r},820:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},720:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},748:function(e,t,r){var n=r(820);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},842:function(e){function t(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,a){var i=e.apply(r,n);function u(e){t(i,o,a,u,c,"next",e)}function c(e){t(i,o,a,u,c,"throw",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},286:function(e,t,r){var n=r(617);e.exports=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}},e.exports.__esModule=!0,e.exports.default=e.exports},762:function(e,t,r){var n=r(893);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},454:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},587:function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return u}},e.exports.__esModule=!0,e.exports.default=e.exports},469:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},928:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},212:function(e,t,r){var n=r(762);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},578:function(e,t,r){var n=r(710);e.exports=function(e,t){if(null==e)return{};var r,o,a=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a},e.exports.__esModule=!0,e.exports.default=e.exports},710:function(e){e.exports=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},650:function(e,t,r){var n=r(65).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},a=Object.prototype,i=a.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof x?t:x,a=Object.create(o.prototype),i=new k(n||[]);return u(a,"_invoke",{value:O(e,r,i)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",y="executing",m="completed",g={};function x(){}function b(){}function w(){}var j={};p(j,s,(function(){return this}));var A=Object.getPrototypeOf,E=A&&A(A(G([])));E&&E!==a&&i.call(E,s)&&(j=E);var C=w.prototype=x.prototype=Object.create(j);function M(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(o,a,u,c){var s=h(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}})}function O(e,r,n){var o=v;return function(a,i){if(o===y)throw new Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=L(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return b.prototype=w,u(C,"constructor",{value:w,configurable:!0}),u(w,"constructor",{value:b,configurable:!0}),b.displayName=p(w,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,p(e,f,"GeneratorFunction")),e.prototype=Object.create(C),e},r.awrap=function(e){return{__await:e}},M(S.prototype),p(S.prototype,l,(function(){return this})),r.AsyncIterator=S,r.async=function(e,t,n,o,a){void 0===a&&(a=Promise);var i=new S(d(e,t,n,o),a);return r.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},M(C),p(C,f,"Generator"),p(C,s,(function(){return this})),p(C,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=G,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},50:function(e,t,r){var n=r(720),o=r(587),a=r(617),i=r(469);e.exports=function(e,t){return n(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},705:function(e,t,r){var n=r(748),o=r(454),a=r(617),i=r(928);e.exports=function(e){return n(e)||o(e)||a(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},952:function(e,t,r){var n=r(65).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},893:function(e,t,r){var n=r(65).default,o=r(952);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},65:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},617:function(e,t,r){var n=r(820);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){"use strict";a.r(i),a.d(i,{PntBusinessSelect:function(){return E},PntGeneralLayout:function(){return P},PntImagePreview:function(){return s},PntProvider:function(){return r},PntSecureBox:function(){return L},usePntConfig:function(){return n}});var e=a(809),t=(0,e.createContext)(null),r=t.Provider,n=function(){var r=(0,e.useContext)(t);if(!r)throw new Error("[pnt-component-frontend] 未注入配置:请在应用根入口用 <PntProvider value={{ http }}> 包裹");return r},o=a(420),u=a(352),c=a(472),s=function(e){var t=e.iconUrl,r=e.loading,n=e.defaultImg,a=e.params,i=e.onRemove,s=null!=t&&t.length?t:n||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARAAAAEQCAIAAAD3aLxCAAAaGklEQVR4Ae2dT2/TShfG+WZ8Ej6LN3iTImWVTSqhdEE3RUhFQsCmrNpuUMSu7Y5NQ4BFxYIkpIi8L/dcnft4xnMydtzW9jyoQiczx+Px4/Obv3byaFP2bz7/Pp9/n82+yt98/n2xWKLjYrFEh9nsK32ojyjQg9iQ+McbqvYjtdRwSFBm1GGz2dBHWxPqM59/71lsSHg71yXXWAKMEwoMCEc4NhZOhPRVn9nsKzYEQWAWi6WvCIdkql0PhhwcQm+N59nsq+MTBGaz2SwWy1JvDRoaVKDHChjxXzIk67EQvDQqsKMCf4GRQTm7lB2l5OF9VUAmKbIO/AinsGSmr7ec11VbAZ3Sy1rzX2CUmdqF8kAq0GMFdA1sPv/+SD+ULqL1WAVeGhWIVAAZITCRotEtXQUITLr3nldeQ4ECMDqBcfZra5TLQ6hALxVARh7JvrX/6GQvr5wXRQVqKICMcOOyhoA8JF0FCEy6955XXkMBAlNDNB6SrgIEJt17zyuvoUD9Sf9isfy1vl2u1vyjAh1S4Nf6tuojYIVJPy6ZxQO3WCw7pBGrSgUcBSoxg4zU3Oln3+LcAH7slgK/1rfx3UNh4xI/xBfRLX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CXVfAjnDMRUa4cckeJlEFEAnbLmxc4gf7MMzteuvC+lMBjGfbRkbYwyTavhIYGxLMJTCEhArUfVoZJzRIlW2zfaICXVfAjnDMRUa4rMy2NlEFEAnbLiwr266h3K63Lqw/FQjFtp3Onf5E21cCY4MRyiUwBCZRBUJI2OkEJtFwYQ9jgxHK5aSfwCSqQAgJP70w6cclM981lML2iQp0XYFQbPvpyAh3+hNtX7se7rvX3wcjlMKdfkJCBeru9CM9IcL89N35ZglU4GEV8KM6lIKM1ByS/VrfPuzV8uxUYBcFfq1vQ3j46QVgcELju4ZSFovlLtXlsVTgYRVYLJah2PbTkZGay8qbzWaxWLKfedi7zrPXUODX+rYSLRLq8/n3+fz7YrGsuXHpU8gUKpCCAgQmhbvMa2xMAQLTmJQsKAUFCEwKd5nX2JgC9Sf9jVWBBVGBdivQwLNk7b5A1o4KNKlAYVkZN2WaPAnLogJ9UQAZqbnT3xcpeB1UYLsCBGa7RvSgAqpAARgcn1XdAdUSaVCBHiugwMzn3x/Jnr8kEZge33VeWj0FFotlARhZMpvNvpKWeoLyqN4rIMzM5983mw03Lnt/u3mBTSoQBIYdTpMys6yuKRCK/xJgcNAmozd5sBkvWQdyOLxzzkEfFWc2+0oNuxU/oUlKCTB4m9WWAZxes66tqYPEhDpsNhv6oDjUp3OxMZt9xTqLXQIMA52BrgqwoXSYKQFGOgfEhsMJVI1DTcWpr0NN2WvBm672/wBMjYyrp4LAIgAAAABJRU5ErkJggg==",l=function(e){return(0,c.jsx)("div",{className:e?"pnt-image-preview-progress":"pnt-image-preview-upload-progress",style:null==a?void 0:a.style,children:(0,c.jsxs)("div",{className:"pnt-image-preview-loading",children:[(0,c.jsx)(o.LoadingIcon,{size:"18px",name:"loading"}),(0,c.jsx)("p",{children:"上传中"})]})})};return(0,c.jsx)("div",{className:"pnt-image-preview-wrapper",onClick:function(e){(null!=t&&t.length||r)&&e.stopPropagation()},children:r?l(!1):(0,c.jsx)(u.ImageViewer,{images:[s],closeOnOverlay:!0,trigger:function(e){var r=e.open,n=(0,c.jsxs)("div",{className:"pnt-image-preview-mask",children:[(0,c.jsx)("span",{children:(0,c.jsx)(o.BrowseIcon,{onClick:r,size:"16px",name:"browse"})}),(0,c.jsx)("span",{className:"pnt-image-preview-divider"}),(0,c.jsx)("span",{children:(0,c.jsx)(o.DeleteIcon,{onClick:i,size:"16px",name:"delete"})})]});return(0,c.jsx)(u.Image,{alt:"",src:s,loading:l(!0),overlayContent:t?n:(0,c.jsx)(c.Fragment,{}),overlayTrigger:"hover",fit:"contain",className:"pnt-image-preview",style:null==a?void 0:a.style})}})})},l=a(578),f=a.n(l),p=a(212),d=a.n(p),h=a(650),v=a.n(h),y=a(705),m=a.n(y),g=a(842),x=a.n(g),b=a(50),w=a.n(b),j=function(e,t){return e.post("/v3/business/game_info/high-security-decrypt?audience=/laas-pnt",t)},A=["children","content"],E=function(t){var r=t.value,o=t.onChange,a=t.multiple,i=void 0!==a&&a,s=t.scene,l=void 0===s?"default":s,p=t.statuses,h=t.businessTypes,y=t.businessAccessMethod,g=t.labelFormat,b=void 0===g?"name":g,j=t.labelField,E=t.optionLabel,C=t.pagination,M=void 0===C||C,S=t.onLoaded,O=t.placeholder,L=t.disabled,P=t.clearable,I=void 0===P||P,k=t.filterable,G=void 0===k||k,Q=t.max,T=t.pageSize,V=void 0===T?20:T,D=t.searchDebounce,N=void 0===D?400:D,R=t.minCollapsedNum,B=t.collapsedItems,Y=t.popupProps,z=t.fields,q=t.optionDisabled,U=t.optionTooltip,K=t.tooltipPlacement,F=void 0===K?"top":K,J=t.className,W=t.style,Z=n().http,_=(0,e.useCallback)((function(e){return t=e,Z.post("/business/select/list?audience=/player-network",t);var t}),[Z]),X=(0,e.useState)([]),H=w()(X,2),$=H[0],ee=H[1],te=(0,e.useState)(!1),re=w()(te,2),ne=re[0],oe=re[1],ae=(0,e.useRef)(),ie=(0,e.useRef)(!1),ue=(0,e.useRef)(new Map),ce=(0,e.useRef)(new Set),se=(0,e.useState)(0),le=w()(se,2),fe=le[0],pe=le[1],de=(0,e.useRef)(S);de.current=S;var he=(0,e.useRef)([]),ve=(0,e.useRef)(0),ye=(0,e.useRef)(!1),me=(0,e.useRef)({keyword:"",page:0,total:0}),ge=(0,e.useRef)(""),xe=(0,e.useRef)(0),be=(z||[]).join(","),we=(p||[]).join(","),je=(h||[]).join(","),Ae=(0,e.useCallback)((function(e,t){return{keyword:e||void 0,pageNum:M?t:0,pageSize:M?V:0,scene:l,statuses:p,business_types:h,business_access_method:y,fields:z}}),[l,we,je,y,V,be,M]),Ee=(0,e.useCallback)(function(){var e=x()(v()().mark((function e(t,r,n){var o,a,i,u,c,s,l,f,p;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=11;break}if(!ye.current&&!ie.current){e.next=3;break}return e.abrupt("return");case 3:if((o=me.current).keyword===t){e.next=6;break}return e.abrupt("return");case 6:if(!(r<=o.page)){e.next=8;break}return e.abrupt("return");case 8:if(!(he.current.length>=o.total)){e.next=10;break}return e.abrupt("return");case 10:ye.current=!0;case 11:return a=++ve.current,ie.current=!0,oe(!0),e.prev=14,e.next=17,_(Ae(t,r));case 17:if(i=e.sent,a===ve.current){e.next=20;break}return e.abrupt("return");case 20:0===i.code&&i.data&&(s=i.data.list||[],l=(null===(u=i.data.pagination)||void 0===u?void 0:u.total)||0,n?(p=new Set(he.current.map((function(e){return e.game_id}))),f=[].concat(m()(he.current),m()(s.filter((function(e){return!p.has(e.game_id)}))))):(f=s,xe.current=Date.now()),he.current=f,me.current={keyword:t,page:r,total:l},ee(f),null===(c=de.current)||void 0===c||c.call(de,f));case 21:return e.prev=21,n&&(ye.current=!1),a===ve.current&&(ie.current=!1,oe(!1)),e.finish(21);case 25:case"end":return e.stop()}}),e,null,[[14,,21,25]])})));return function(t,r,n){return e.apply(this,arguments)}}(),[_,Ae]),Ce=(0,e.useCallback)((function(e){ge.current=e,ae.current&&clearTimeout(ae.current),ae.current=setTimeout((function(){Ee(ge.current,1,!1)}),N)}),[Ee,N]),Me=(0,e.useCallback)((function(){if(!(Date.now()-xe.current<200)){var e=me.current;Ee(e.keyword,e.page+1,!0)}}),[Ee]),Se=(0,e.useCallback)((function(e){e||(ae.current&&clearTimeout(ae.current),ge.current&&(ge.current="",Ee("",1,!1)))}),[Ee]);(0,e.useEffect)((function(){Ee("",1,!1)}),[Ee]),(0,e.useEffect)((function(){var e=(Array.isArray(r)?r:r?[r]:[]).map(String);$.forEach((function(t){t.game_id&&e.includes(t.game_id)&&ue.current.set(t.game_id,t)}))}),[$,r]),(0,e.useEffect)((function(){if(M){var e=(Array.isArray(r)?r:r?[r]:[]).map(String),t=new Set($.map((function(e){return e.game_id})).filter(Boolean)),n=e.filter((function(e){return e&&!t.has(e)&&!ue.current.has(e)&&!ce.current.has(e)}));if(0!==n.length){n.forEach((function(e){return ce.current.add(e)}));var o=!1;return x()(v()().mark((function e(){var t,r;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_(d()(d()({},Ae("",1)),{},{pageNum:1,pageSize:n.length,game_ids:n,keyword:void 0}));case 3:if(r=e.sent,!o&&0===r.code&&null!==(t=r.data)&&void 0!==t&&t.list){e.next=6;break}return e.abrupt("return");case 6:r.data.list.forEach((function(e){e.game_id&&ue.current.set(e.game_id,e)})),pe((function(e){return e+1})),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})))(),function(){o=!0}}}}),[r,$,_,Ae,M]),(0,e.useEffect)((function(){return function(){ae.current&&clearTimeout(ae.current)}}),[]);var Oe=(0,e.useCallback)((function(e){if(j)return e[j]||e.name||"";var t=e.name||"",r=e.name_en||"",n=e.game_id||"";switch(b){case"name_en":return r||t;case"name_id":return"".concat(t,"(").concat(n,")");case"name_en_id":return"".concat(r,"(").concat(n,")");default:return t}}),[b,j]),Le=(0,e.useCallback)((function(e){return E?E(e):Oe(e)}),[E,Oe]),Pe=(0,e.useCallback)((function(e){return("compliance_age"===l||"custom_region"===l)&&!1===e.creatable||!!q&&q(e)}),[l,q]),Ie=(0,e.useCallback)((function(e){return U?U(e):""}),[U]),ke=(0,e.useMemo)((function(){var e=new Map;return $.forEach((function(t){t.game_id&&e.set(t.game_id,{label:Oe(t),content:Le(t),value:t.game_id,disabled:Pe(t),name:t.name,name_en:t.name_en,game_id:t.game_id,rawItem:t})})),(Array.isArray(r)?r:r?[r]:[]).map(String).forEach((function(t){if(!e.has(t)){var r=ue.current.get(t);r?e.set(t,{label:Oe(r),content:Le(r),value:t,disabled:Pe(r),name:r.name,name_en:r.name_en,game_id:r.game_id,rawItem:r}):e.set(t,{label:t,content:t,value:t,disabled:!1})}})),Array.from(e.values())}),[$,r,Le,Oe,Pe,fe]),Ge=(0,e.useCallback)((function(e,t){if(!e)return!0;var r=e.toLowerCase(),n=t,o=null==n?void 0:n.rawItem;return o?Object.values(o).some((function(e){return"string"==typeof e&&e.toLowerCase().includes(r)})):((null==n?void 0:n.name)||"").toLowerCase().includes(r)||((null==n?void 0:n.name_en)||"").toLowerCase().includes(r)||((null==n?void 0:n.game_id)||"").includes(r)}),[]),Qe=u.Select.Option,Te=!!U,Ve=G&&M,De=M,Ne=(0,e.useMemo)((function(){return null==r?r:Array.isArray(r)?r.map(String):String(r)}),[r]),Re=(0,e.useCallback)((function(e,t){if(o){var r=(Array.isArray(e)?e:null!=e?[e]:[]).map(String),n=(null==t?void 0:t.selectedOptions)||[],a=r.map((function(e){var t=he.current.find((function(t){return t.game_id===e}))||ue.current.get(e);if(t)return d()(d()({},t),{},{value:t.game_id,label:Oe(t)});var r=n.find((function(t){return String(t.value)===e}));if(r){r.children,r.content;return f()(r,A)}return{value:e,label:e}}));o(e,d()(d()({},t),{},{selectedOptions:i?a:a.slice(0,1)}))}}),[o,i,Oe]);return(0,c.jsx)(u.Select,{value:Ne,onChange:Re,filterable:G,filter:Ve?void 0:G?Ge:void 0,onSearch:Ve?Ce:void 0,loading:ne&&0===$.length,multiple:i,max:Q,clearable:I,disabled:L,placeholder:O,minCollapsedNum:R,collapsedItems:B,onPopupVisibleChange:Se,panelBottomContent:$.length>0&&ne?(0,c.jsx)(u.Loading,{loading:!0,size:"small"}):null,popupProps:d()(d()({},Y),{},{overlayClassName:["pnt-business-select-popup",null==Y?void 0:Y.overlayClassName].filter(Boolean).join(" "),onScrollToBottom:De?Me:void 0}),className:J?"pnt-business-select ".concat(J):"pnt-business-select",style:W,children:ke.map((function(e){var t=e.rawItem,r=Te&&t?Ie(t):"",n=d()(d()({},t||{}),{},{value:e.value,label:e.label,disabled:e.disabled});return(0,c.jsx)(Qe,d()(d()({},n),{},{children:r?(0,c.jsx)(u.Tooltip,{content:r,placement:F,children:(0,c.jsx)("span",{className:"pnt-business-select-option-label",children:e.content})}):e.content}),e.value)}))})},C=new Map,M=a(286),S=a.n(M),O=function(e){var t=String(e);if(!t.includes("_high_security_:"))return!1;var r=t.split(":"),n=r.slice(0,-1).join(":"),o=parseInt(r[r.length-1],10);if(isNaN(o))return!1;var a,i=0,u=S()(n);try{for(u.s();!(a=u.n()).done;){i+=a.value.charCodeAt(0)}}catch(e){u.e(e)}finally{u.f()}return i===o},L=function(t){var r=t.dataKey,o=t.dataValue,a=t.env,i=t.gameId,u=t.renderDom,s=t.viewText,l=t.pageId,f=function(){var t=n().http,r=(0,e.useState)((function(){var e={};return C.forEach((function(t,r){e[r]=t})),e})),o=w()(r,2),a=o[0],i=o[1],u=function(){var e=x()(v()().mark((function e(r){var n,o,a,u,c,s;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.gameId,o=r.param,a=r.env,u=r.pageId,c={game_id:Number(n),env:Number(a),page_id:u||location.pathname,param:o.map((function(e){return{key:e.key,value:e.value}}))},e.next=4,j(t,c);case 4:0===(s=e.sent).code&&s.data&&(s.data.forEach((function(e){C.set(e.key,e.value)})),i(Object.fromEntries(C)));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{securityData:a,requestSecurityData:u}}(),p=f.securityData,d=f.requestSecurityData;return(0,c.jsx)("div",{className:"pnt-secure-box",children:(0,c.jsxs)(c.Fragment,{children:[u(O(o)?p[r]||"******":o),O(o)&&!p.hasOwnProperty(r)&&(0,c.jsx)("span",{className:"view-icon",onClick:function(){d({env:a,gameId:i,pageId:l,param:[{key:r,value:o}]})},children:s||"View"})]})})},P=function(e){var t=e.className,r=e.headerTitle,n=e.showBackButton,a=void 0!==n&&n,i=e.onBackButtonClick,s=e.subHeaderContent,l=e.operation,f=e.bodyRef,p=e.children,h=e.bodyStyle,v=e.footer,y=u.Layout.Header,m=u.Layout.Footer;return(0,c.jsxs)(u.Layout,{className:"pnt-general-layout".concat(t?" "+t:""),children:[r&&(0,c.jsxs)(y,{children:[(0,c.jsxs)("span",{className:"header-title",children:[a&&(0,c.jsx)(o.ArrowLeftIcon,{className:"goback-icon",size:"24px",onClick:i}),(0,c.jsx)("span",{className:"title",children:r})]}),l&&(0,c.jsx)("span",{className:"header-operation",children:l})]}),s&&(0,c.jsx)("div",{className:"general-layout-sub-header",children:s}),(0,c.jsx)("div",{className:"general-layout-body",ref:f,style:d()({height:"calc(100%".concat(r&&" - 72px").concat(v&&" - 72px",")")},h),children:p}),v&&(0,c.jsx)(m,{children:v})]})}}(),i}()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("tdesign-react"),require("tdesign-icons-react")):"function"==typeof define&&define.amd?define([,,],t):"object"==typeof exports?exports.PntBusinessComponent=t(require("react"),require("tdesign-react"),require("tdesign-icons-react")):e.PntBusinessComponent=t(e.React,e.TDesign,e.TDesignIcons)}(self,(function(e,t,r){return function(){var n={76:function(e,t,r){"use strict";var n=r(809),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var n,a={},s=null,l=null;for(n in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(l=t.ref),t)i.call(t,n)&&!c.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:o,type:e,key:s,ref:l,props:a,_owner:u.current}}t.Fragment=a,t.jsx=s,t.jsxs=s},472:function(e,t,r){"use strict";e.exports=r(76)},809:function(t){"use strict";t.exports=e},352:function(e){"use strict";e.exports=t},420:function(e){"use strict";e.exports=r},820:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},720:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},748:function(e,t,r){var n=r(820);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},842:function(e){function t(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,a){var i=e.apply(r,n);function u(e){t(i,o,a,u,c,"next",e)}function c(e){t(i,o,a,u,c,"throw",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},286:function(e,t,r){var n=r(617);e.exports=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}},e.exports.__esModule=!0,e.exports.default=e.exports},762:function(e,t,r){var n=r(893);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},454:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},587:function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return u}},e.exports.__esModule=!0,e.exports.default=e.exports},469:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},928:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},212:function(e,t,r){var n=r(762);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},650:function(e,t,r){var n=r(65).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},a=Object.prototype,i=a.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),i=new O(n||[]);return u(a,"_invoke",{value:M(e,r,i)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",y="executing",m="completed",g={};function b(){}function x(){}function w(){}var A={};p(A,s,(function(){return this}));var E=Object.getPrototypeOf,j=E&&E(E(D([])));j&&j!==a&&i.call(j,s)&&(A=j);var C=w.prototype=b.prototype=Object.create(A);function P(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(o,a,u,c){var s=h(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}})}function M(e,r,n){var o=v;return function(a,i){if(o===y)throw new Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=L(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return x.prototype=w,u(C,"constructor",{value:w,configurable:!0}),u(w,"constructor",{value:x,configurable:!0}),x.displayName=p(w,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,p(e,f,"GeneratorFunction")),e.prototype=Object.create(C),e},r.awrap=function(e){return{__await:e}},P(S.prototype),p(S.prototype,l,(function(){return this})),r.AsyncIterator=S,r.async=function(e,t,n,o,a){void 0===a&&(a=Promise);var i=new S(d(e,t,n,o),a);return r.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},P(C),p(C,f,"Generator"),p(C,s,(function(){return this})),p(C,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=D,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},50:function(e,t,r){var n=r(720),o=r(587),a=r(617),i=r(469);e.exports=function(e,t){return n(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},705:function(e,t,r){var n=r(748),o=r(454),a=r(617),i=r(928);e.exports=function(e){return n(e)||o(e)||a(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},952:function(e,t,r){var n=r(65).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},893:function(e,t,r){var n=r(65).default,o=r(952);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},65:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},617:function(e,t,r){var n=r(820);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){"use strict";a.r(i),a.d(i,{PntBusinessSelect:function(){return w},PntGeneralLayout:function(){return S},PntImagePreview:function(){return s},PntProvider:function(){return r},PntSecureBox:function(){return P},usePntConfig:function(){return n}});var e=a(809),t=(0,e.createContext)(null),r=t.Provider,n=function(){var r=(0,e.useContext)(t);if(!r)throw new Error("[pnt-component-frontend] 未注入配置:请在应用根入口用 <PntProvider value={{ http }}> 包裹");return r},o=a(420),u=a(352),c=a(472),s=function(e){var t=e.iconUrl,r=e.loading,n=e.defaultImg,a=e.params,i=e.onRemove,s=null!=t&&t.length?t:n||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARAAAAEQCAIAAAD3aLxCAAAaGklEQVR4Ae2dT2/TShfG+WZ8Ej6LN3iTImWVTSqhdEE3RUhFQsCmrNpuUMSu7Y5NQ4BFxYIkpIi8L/dcnft4xnMydtzW9jyoQiczx+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hZMpvNvpKWeoLyqN4rIMzM5983mw03Lnt/u3mBTSoQBIYdTpMys6yuKRCK/xJgcNAmozd5sBkvWQdyOLxzzkEfFWc2+0oNuxU/oUlKCTB4m9WWAZxes66tqYPEhDpsNhv6oDjUp3OxMZt9xTqLXQIMA52BrgqwoXSYKQFGOgfEhsMJVI1DTcWpr0NN2WvBm672/wBMjYyrp4LAIgAAAABJRU5ErkJggg==",l=function(e){return(0,c.jsx)("div",{className:e?"pnt-image-preview-progress":"pnt-image-preview-upload-progress",style:null==a?void 0:a.style,children:(0,c.jsxs)("div",{className:"pnt-image-preview-loading",children:[(0,c.jsx)(o.LoadingIcon,{size:"18px",name:"loading"}),(0,c.jsx)("p",{children:"上传中"})]})})};return(0,c.jsx)("div",{className:"pnt-image-preview-wrapper",onClick:function(e){(null!=t&&t.length||r)&&e.stopPropagation()},children:r?l(!1):(0,c.jsx)(u.ImageViewer,{images:[s],closeOnOverlay:!0,trigger:function(e){var r=e.open,n=(0,c.jsxs)("div",{className:"pnt-image-preview-mask",children:[(0,c.jsx)("span",{children:(0,c.jsx)(o.BrowseIcon,{onClick:r,size:"16px",name:"browse"})}),(0,c.jsx)("span",{className:"pnt-image-preview-divider"}),(0,c.jsx)("span",{children:(0,c.jsx)(o.DeleteIcon,{onClick:i,size:"16px",name:"delete"})})]});return(0,c.jsx)(u.Image,{alt:"",src:s,loading:l(!0),overlayContent:t?n:(0,c.jsx)(c.Fragment,{}),overlayTrigger:"hover",fit:"contain",className:"pnt-image-preview",style:null==a?void 0:a.style})}})})},l=a(212),f=a.n(l),p=a(650),d=a.n(p),h=a(705),v=a.n(h),y=a(842),m=a.n(y),g=a(50),b=a.n(g),x=function(e,t){return e.post("/v3/business/game_info/high-security-decrypt?audience=/laas-pnt",t)},w=function(t){var r=t.value,o=t.onChange,a=t.multiple,i=void 0!==a&&a,s=t.scene,l=void 0===s?"default":s,p=t.statuses,h=t.businessTypes,y=t.businessAccessMethod,g=t.labelFormat,x=void 0===g?"name":g,w=t.labelField,A=t.optionLabel,E=t.pagination,j=void 0===E||E,C=t.onLoaded,P=t.placeholder,S=t.disabled,M=t.clearable,L=void 0===M||M,k=t.filterable,I=void 0===k||k,O=t.max,D=t.pageSize,G=void 0===D?20:D,B=t.searchDebounce,Q=void 0===B?400:B,T=t.minCollapsedNum,R=t.collapsedItems,N=t.popupProps,V=t.fields,q=t.optionDisabled,Y=t.optionTooltip,z=t.tooltipPlacement,U=void 0===z?"top":z,K=t.className,F=t.style,J=n().http,W=(0,e.useCallback)((function(e){return t=e,J.post("/business/select/list?audience=/player-network",t);var t}),[J]),Z=(0,e.useState)([]),_=b()(Z,2),X=_[0],H=_[1],$=(0,e.useState)(!1),ee=b()($,2),te=ee[0],re=ee[1],ne=(0,e.useRef)(),oe=(0,e.useRef)(!1),ae=(0,e.useRef)(new Map),ie=(0,e.useRef)(new Set),ue=(0,e.useState)(0),ce=b()(ue,2),se=ce[0],le=ce[1],fe=(0,e.useRef)(C);fe.current=C;var pe=(0,e.useRef)([]),de=(0,e.useRef)(0),he=(0,e.useRef)(!1),ve=(0,e.useRef)({keyword:"",page:0,total:0}),ye=(0,e.useRef)(""),me=(0,e.useRef)(0),ge=(V||[]).join(","),be=(p||[]).join(","),xe=(h||[]).join(","),we=(0,e.useCallback)((function(e,t){return{keyword:e||void 0,pageNum:j?t:0,pageSize:j?G:0,scene:l,statuses:p,business_types:h,business_access_method:y,fields:V}}),[l,be,xe,y,G,ge,j]),Ae=(0,e.useCallback)(function(){var e=m()(d()().mark((function e(t,r,n){var o,a,i,u,c,s,l,f,p,h,y;return d()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=15;break}if(!he.current&&!oe.current){e.next=4;break}return console.log("[PntBS] fetchData APPEND blocked: loading="+oe.current+" appendLoading="+he.current),e.abrupt("return");case 4:if((o=ve.current).keyword===t){e.next=8;break}return console.log("[PntBS] fetchData APPEND blocked: kw mismatch "+t+" vs "+o.keyword),e.abrupt("return");case 8:if(!(r<=o.page)){e.next=11;break}return console.log("[PntBS] fetchData APPEND blocked: page "+r+" <= "+o.page),e.abrupt("return");case 11:if(!(pe.current.length>=o.total)){e.next=14;break}return console.log("[PntBS] fetchData APPEND blocked: no more"),e.abrupt("return");case 14:he.current=!0;case 15:return a=++de.current,console.log('[PntBS] fetchData START kw="'+t+'" page='+r+" append="+n+" seq="+a),oe.current=!0,re(!0),e.prev=19,e.next=22,W(we(t,r));case 22:if(i=e.sent,console.log("[PntBS] fetchData GOT seq="+a+" latestSeq="+de.current+" code="+i.code),a===de.current){e.next=27;break}return console.log("[PntBS] fetchData seq MISMATCH - DROPPED (seq="+a+" latest="+de.current+")"),e.abrupt("return");case 27:0===i.code&&i.data?(l=i.data.list||[],f=(null===(u=i.data.pagination)||void 0===u?void 0:u.total)||0,n?(h=new Set(pe.current.map((function(e){return e.game_id}))),p=[].concat(v()(pe.current),v()(l.filter((function(e){return!h.has(e.game_id)}))))):(p=l,me.current=Date.now()),pe.current=p,ve.current={keyword:t,page:r,total:f},console.log("[PntBS] fetchData SET options count="+p.length+" first="+((null===(c=p[0])||void 0===c?void 0:c.name)||"null")),H(p),null===(s=fe.current)||void 0===s||s.call(fe,p)):console.log("[PntBS] fetchData BAD RESPONSE code="+i.code+" hasData="+!!i.data),e.next=34;break;case 30:e.prev=30,e.t0=e.catch(19),y=e.t0 instanceof Error?e.t0.message:String(e.t0),console.log("[PntBS] fetchData ERROR seq="+a+' kw="'+t+'": '+y);case 34:return e.prev=34,n&&(he.current=!1),a===de.current&&(oe.current=!1,re(!1)),e.finish(34);case 38:case"end":return e.stop()}}),e,null,[[19,30,34,38]])})));return function(t,r,n){return e.apply(this,arguments)}}(),[W,we]),Ee=(0,e.useCallback)((function(e){ye.current=e,console.log('[PntBS] handleSearch val="'+e+'" debounceMs='+Q),ne.current&&clearTimeout(ne.current),ne.current=setTimeout((function(){var e=ye.current;console.log('[PntBS] handleSearch timer fired, fetchData kw="'+e+'" append=false seq++'),Ae(e,1,!1)}),Q)}),[Ae,Q]),je=(0,e.useCallback)((function(){if(!(Date.now()-me.current<200)){var e=ve.current;Ae(e.keyword,e.page+1,!0)}}),[Ae]),Ce=(0,e.useCallback)((function(e){e||(ne.current&&clearTimeout(ne.current),ye.current="",ve.current.keyword&&(console.log('[PntBS] popupClose resetting from kw="'+ve.current.keyword+'"'),Ae("",1,!1)))}),[Ae]);(0,e.useEffect)((function(){Ae("",1,!1)}),[Ae]),(0,e.useEffect)((function(){var e=(Array.isArray(r)?r:r?[r]:[]).map(String);X.forEach((function(t){t.game_id&&e.includes(t.game_id)&&ae.current.set(t.game_id,t)}))}),[X,r]),(0,e.useEffect)((function(){if(j){var e=(Array.isArray(r)?r:r?[r]:[]).map(String),t=new Set(X.map((function(e){return e.game_id})).filter(Boolean)),n=e.filter((function(e){return e&&!t.has(e)&&!ae.current.has(e)&&!ie.current.has(e)}));if(0!==n.length){n.forEach((function(e){return ie.current.add(e)}));var o=!1;return m()(d()().mark((function e(){var t,r;return d()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,W(f()(f()({},we("",1)),{},{pageNum:1,pageSize:n.length,game_ids:n,keyword:void 0}));case 3:if(r=e.sent,!o&&0===r.code&&null!==(t=r.data)&&void 0!==t&&t.list){e.next=6;break}return e.abrupt("return");case 6:r.data.list.forEach((function(e){e.game_id&&ae.current.set(e.game_id,e)})),le((function(e){return e+1})),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})))(),function(){o=!0}}}}),[r,X,W,we,j]),(0,e.useEffect)((function(){return function(){ne.current&&clearTimeout(ne.current)}}),[]);var Pe=(0,e.useCallback)((function(e){if(w)return e[w]||e.name||"";var t=e.name||"",r=e.name_en||"",n=e.game_id||"";switch(x){case"name_en":return r||t;case"name_id":return"".concat(t,"(").concat(n,")");case"name_en_id":return"".concat(r,"(").concat(n,")");default:return t}}),[x,w]),Se=(0,e.useCallback)((function(e){return A?A(e):Pe(e)}),[A,Pe]),Me=(0,e.useCallback)((function(e){return("compliance_age"===l||"custom_region"===l)&&!1===e.creatable||!!q&&q(e)}),[l,q]),Le=(0,e.useCallback)((function(e){return Y?Y(e):""}),[Y]),ke=(0,e.useMemo)((function(){var e=new Map;return X.forEach((function(t){t.game_id&&e.set(t.game_id,{label:Pe(t),content:Se(t),value:t.game_id,disabled:Me(t),name:t.name,name_en:t.name_en,game_id:t.game_id,rawItem:t})})),(Array.isArray(r)?r:r?[r]:[]).map(String).forEach((function(t){if(!e.has(t)){var r=ae.current.get(t);r?e.set(t,{label:Pe(r),content:Se(r),value:t,disabled:Me(r),name:r.name,name_en:r.name_en,game_id:r.game_id,rawItem:r}):e.set(t,{label:t,content:t,value:t,disabled:!1})}})),Array.from(e.values())}),[X,r,Se,Pe,Me,se]),Ie=(0,e.useCallback)((function(e,t){if(!e)return!0;var r=e.toLowerCase(),n=t,o=null==n?void 0:n.rawItem;return o?Object.values(o).some((function(e){return"string"==typeof e&&e.toLowerCase().includes(r)})):((null==n?void 0:n.name)||"").toLowerCase().includes(r)||((null==n?void 0:n.name_en)||"").toLowerCase().includes(r)||((null==n?void 0:n.game_id)||"").includes(r)}),[]),Oe=u.Select.Option,De=!!Y,Ge=I&&j,Be=j,Qe=(0,e.useMemo)((function(){return null==r?r:Array.isArray(r)?r.map(String):String(r)}),[r]),Te=(0,e.useCallback)((function(e,t){if(o){var r=(Array.isArray(e)?e:null!=e?[e]:[]).map(String),n=(null==t?void 0:t.selectedOptions)||[],a=r.map((function(e){var t=pe.current.find((function(t){return t.game_id===e}))||ae.current.get(e);if(t)return f()(f()({},t),{},{value:t.game_id,label:Pe(t)});var r=n.find((function(t){return String(t.value)===e}));if(r){var o=f()({},r);return delete o.children,delete o.content,o}return{value:e,label:e}}));o(e,f()(f()({},t),{},{selectedOptions:i?a:a.slice(0,1)}))}}),[o,i,Pe]),Re=(0,e.useCallback)((function(){console.log("[PntBS] handleClear X-button clicked, resetting"),ye.current="",ne.current&&clearTimeout(ne.current),ve.current.keyword&&Ae("",1,!1)}),[Ae]);return(0,c.jsx)(u.Select,{value:Qe,onChange:Te,filterable:I,filter:Ge?void 0:I?Ie:void 0,onSearch:Ge?Ee:void 0,onClear:Ge?Re:void 0,loading:te&&0===X.length,multiple:i,max:O,clearable:L,disabled:S,placeholder:P,minCollapsedNum:T,collapsedItems:R,onPopupVisibleChange:Ce,panelBottomContent:X.length>0&&te?(0,c.jsx)(u.Loading,{loading:!0,size:"small"}):null,popupProps:f()(f()({},N),{},{overlayClassName:["pnt-business-select-popup",null==N?void 0:N.overlayClassName].filter(Boolean).join(" "),onScrollToBottom:Be?je:void 0}),className:K?"pnt-business-select ".concat(K):"pnt-business-select",style:F,children:ke.map((function(e){var t=e.rawItem,r=De&&t?Le(t):"",n=f()(f()({},t||{}),{},{value:e.value,label:e.label,disabled:e.disabled});return(0,c.jsx)(Oe,f()(f()({},n),{},{children:r?(0,c.jsx)(u.Tooltip,{content:r,placement:U,children:(0,c.jsx)("span",{className:"pnt-business-select-option-label",children:e.content})}):e.content}),e.value)}))})},A=new Map,E=a(286),j=a.n(E),C=function(e){var t=String(e);if(!t.includes("_high_security_:"))return!1;var r=t.split(":"),n=r.slice(0,-1).join(":"),o=parseInt(r[r.length-1],10);if(isNaN(o))return!1;var a,i=0,u=j()(n);try{for(u.s();!(a=u.n()).done;){i+=a.value.charCodeAt(0)}}catch(e){u.e(e)}finally{u.f()}return i===o},P=function(t){var r=t.dataKey,o=t.dataValue,a=t.env,i=t.gameId,u=t.renderDom,s=t.viewText,l=t.pageId,f=function(){var t=n().http,r=(0,e.useState)((function(){var e={};return A.forEach((function(t,r){e[r]=t})),e})),o=b()(r,2),a=o[0],i=o[1],u=function(){var e=m()(d()().mark((function e(r){var n,o,a,u,c,s;return d()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.gameId,o=r.param,a=r.env,u=r.pageId,c={game_id:Number(n),env:Number(a),page_id:u||location.pathname,param:o.map((function(e){return{key:e.key,value:e.value}}))},e.next=4,x(t,c);case 4:0===(s=e.sent).code&&s.data&&(s.data.forEach((function(e){A.set(e.key,e.value)})),i(Object.fromEntries(A)));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{securityData:a,requestSecurityData:u}}(),p=f.securityData,h=f.requestSecurityData;return(0,c.jsx)("div",{className:"pnt-secure-box",children:(0,c.jsxs)(c.Fragment,{children:[u(C(o)?p[r]||"******":o),C(o)&&!p.hasOwnProperty(r)&&(0,c.jsx)("span",{className:"view-icon",onClick:function(){h({env:a,gameId:i,pageId:l,param:[{key:r,value:o}]})},children:s||"View"})]})})},S=function(e){var t=e.className,r=e.headerTitle,n=e.showBackButton,a=void 0!==n&&n,i=e.onBackButtonClick,s=e.headerBordered,l=void 0===s||s,f=e.subHeaderContent,p=e.operation,d=e.bodyRef,h=e.children,v=e.bodyStyle,y=e.bodyPadding,m=void 0===y?24:y,g=e.cardRadius,b=void 0===g?4:g,x=e.footerButton,w=void 0===x?"fixed":x,A=e.footer,E=u.Layout.Header,j=u.Layout.Footer,C=["pnt-general-layout",!l&&"pnt-general-layout--borderless","auto"===w&&"pnt-general-layout--footer-auto",t].filter(Boolean).join(" "),P={"--pnt-layout-body-padding":"number"==typeof m?"".concat(m,"px"):m,"--pnt-layout-card-radius":"".concat(b,"px")};return(0,c.jsxs)(u.Layout,{className:C,style:P,children:[r&&(0,c.jsxs)(E,{children:[(0,c.jsxs)("span",{className:"header-title",children:[a&&(0,c.jsx)(o.ArrowLeftIcon,{className:"goback-icon",size:"24px",onClick:i}),(0,c.jsx)("span",{className:"title",children:r})]}),p&&(0,c.jsx)("span",{className:"header-operation",children:p})]}),f&&(0,c.jsx)("div",{className:"general-layout-sub-header",children:f}),(0,c.jsx)("div",{className:"general-layout-body",ref:d,style:v,children:h}),A&&(0,c.jsx)(j,{children:A})]})}}(),i}()}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnt-team/pnt-component-frontend",
3
- "version": "0.0.88",
3
+ "version": "0.0.89",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "exports": {