@pnt-team/pnt-component-frontend 0.0.95 → 0.0.96
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.
|
@@ -35,7 +35,9 @@ var PntSecureBox = (prop) => {
|
|
|
35
35
|
const isSecurity = (0, import_utils.isSecurityData)(dataValue);
|
|
36
36
|
const unlocked = isSecurity && isUnlocked(dataKey);
|
|
37
37
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pnt-secure-box", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
38
|
-
renderDom(
|
|
38
|
+
renderDom(
|
|
39
|
+
unlocked ? securityData[dataKey] || "******" : isSecurity ? "******" : dataValue
|
|
40
|
+
),
|
|
39
41
|
isSecurity && !isUnlocked(dataKey) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
42
|
"span",
|
|
41
43
|
{
|
|
@@ -154,9 +154,7 @@ var useHighSecurity = (options) => {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
return null;
|
|
157
|
-
}).filter(
|
|
158
|
-
(item) => item !== null
|
|
159
|
-
);
|
|
157
|
+
}).filter((item) => item !== null);
|
|
160
158
|
setEntries(gid, eid, decrypted);
|
|
161
159
|
decrypted.forEach((item) => {
|
|
162
160
|
const index = missingIndexes.find(
|
|
@@ -188,12 +186,9 @@ var useHighSecurity = (options) => {
|
|
|
188
186
|
},
|
|
189
187
|
[http, snapshot]
|
|
190
188
|
);
|
|
191
|
-
const clearSecurityData = (0, import_react.useCallback)(
|
|
192
|
-
(filter)
|
|
193
|
-
|
|
194
|
-
},
|
|
195
|
-
[]
|
|
196
|
-
);
|
|
189
|
+
const clearSecurityData = (0, import_react.useCallback)((filter) => {
|
|
190
|
+
clearEntries(filter);
|
|
191
|
+
}, []);
|
|
197
192
|
return {
|
|
198
193
|
securityData,
|
|
199
194
|
requestSecurityData,
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ export { default as PntImage } from './components/PntImage';
|
|
|
3
3
|
export { default as PntBusinessSelect } from './components/PntBusinessSelect';
|
|
4
4
|
export { default as PntSecureBox } from './components/PntSecureBox';
|
|
5
5
|
export { default as PntUpload } from './components/PntUpload';
|
|
6
|
-
export type { PntUploadProps, PntUploadTexts,
|
|
7
|
-
export { default as usePntCosUploader,
|
|
6
|
+
export type { PntUploadErrorPhase, PntUploadProps, PntUploadTexts, } from './components/PntUpload';
|
|
7
|
+
export { createPntCosUploader, normalizeSnakeCredential, default as usePntCosUploader, type CosScene, type FileNameStrategy, type GetCosCredentialParams, type NormalizeCredential, type NormalizedCosCredential, type PntCosRequestOverrides, type PntCosUploadOptions, type PntCosUploadResult, type PntCosUploader as PntCosUploaderInstance, } from './components/PntCosUploader';
|
|
8
8
|
export { useHighSecurity } from './hooks/useHighSecurity';
|
|
9
|
-
export type { HighSecurityParamItem, HighSecurityRequestParams, UseHighSecurityOptions, UseHighSecurityResult,
|
|
9
|
+
export type { ClearSecurityDataFilter, HighSecurityParamItem, HighSecurityRequestParams, UseHighSecurityOptions, UseHighSecurityResult, } from './hooks/useHighSecurity';
|
|
10
10
|
export { isSecurityData } from './utils';
|
|
11
11
|
export { default as PntGeneralLayout } from './components/PntGeneralLayout';
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ export { default as PntImage } from './components/PntImage';
|
|
|
3
3
|
export { default as PntBusinessSelect } from './components/PntBusinessSelect';
|
|
4
4
|
export { default as PntSecureBox } from './components/PntSecureBox';
|
|
5
5
|
export { default as PntUpload } from './components/PntUpload';
|
|
6
|
-
export type { PntUploadProps, PntUploadTexts,
|
|
7
|
-
export { default as usePntCosUploader,
|
|
6
|
+
export type { PntUploadErrorPhase, PntUploadProps, PntUploadTexts, } from './components/PntUpload';
|
|
7
|
+
export { createPntCosUploader, normalizeSnakeCredential, default as usePntCosUploader, type CosScene, type FileNameStrategy, type GetCosCredentialParams, type NormalizeCredential, type NormalizedCosCredential, type PntCosRequestOverrides, type PntCosUploadOptions, type PntCosUploadResult, type PntCosUploader as PntCosUploaderInstance, } from './components/PntCosUploader';
|
|
8
8
|
export { useHighSecurity } from './hooks/useHighSecurity';
|
|
9
|
-
export type { HighSecurityParamItem, HighSecurityRequestParams, UseHighSecurityOptions, UseHighSecurityResult,
|
|
9
|
+
export type { ClearSecurityDataFilter, HighSecurityParamItem, HighSecurityRequestParams, UseHighSecurityOptions, UseHighSecurityResult, } from './hooks/useHighSecurity';
|
|
10
10
|
export { isSecurityData } from './utils';
|
|
11
11
|
export { default as PntGeneralLayout } from './components/PntGeneralLayout';
|
package/lib/esm/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export { default as PntBusinessSelect } from "./components/PntBusinessSelect";
|
|
|
16
16
|
export { default as PntSecureBox } from "./components/PntSecureBox";
|
|
17
17
|
export { default as PntUpload } from "./components/PntUpload";
|
|
18
18
|
// ---------- 业务能力 hook(PntUpload 的另一半:COS 直传 service) ----------
|
|
19
|
-
export { default as usePntCosUploader
|
|
19
|
+
export { createPntCosUploader, normalizeSnakeCredential, default as usePntCosUploader } from "./components/PntCosUploader";
|
|
20
20
|
|
|
21
21
|
// ---------- 业务能力 hook(PntSecureBox 的另一半:高敏解锁,供"复制"等非展示场景使用) ----------
|
|
22
22
|
export { useHighSecurity } from "./hooks/useHighSecurity";
|
package/package.json
CHANGED