@svadmin/ui 0.130.0 → 0.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.css +301 -0
- package/dist/app.theme.css +301 -0
- package/dist/components/AboutSettings.svelte +1 -1
- package/dist/components/AccessRevocationMatrix.svelte +425 -0
- package/dist/components/AccessRevocationMatrix.svelte.d.ts +27 -0
- package/dist/components/AudioVisualInspector.svelte +458 -0
- package/dist/components/AudioVisualInspector.svelte.d.ts +53 -0
- package/dist/components/AuditSnapshotCapture.svelte +328 -0
- package/dist/components/AuditSnapshotCapture.svelte.d.ts +28 -0
- package/dist/components/CannedResponsePicker.svelte +257 -0
- package/dist/components/CannedResponsePicker.svelte.d.ts +22 -0
- package/dist/components/ContentModerationCenter.svelte +166 -0
- package/dist/components/ContentModerationCenter.svelte.d.ts +11 -0
- package/dist/components/ContractClauseDiffViewer.svelte +566 -0
- package/dist/components/ContractClauseDiffViewer.svelte.d.ts +53 -0
- package/dist/components/DataImportPipeline.svelte +577 -0
- package/dist/components/DataImportPipeline.svelte.d.ts +35 -0
- package/dist/components/DataRetentionPolicyEditor.svelte +455 -0
- package/dist/components/DataRetentionPolicyEditor.svelte.d.ts +10 -0
- package/dist/components/ElectronicSealInspector.svelte +450 -0
- package/dist/components/ElectronicSealInspector.svelte.d.ts +72 -0
- package/dist/components/EmployeeOffboardingAuditor.svelte +405 -0
- package/dist/components/EmployeeOffboardingAuditor.svelte.d.ts +39 -0
- package/dist/components/FieldMappingBuilder.svelte +393 -0
- package/dist/components/FieldMappingBuilder.svelte.d.ts +39 -0
- package/dist/components/GatewayRouteEditor.svelte +493 -0
- package/dist/components/GatewayRouteEditor.svelte.d.ts +34 -0
- package/dist/components/I18nStudio.svelte +635 -0
- package/dist/components/I18nStudio.svelte.d.ts +23 -0
- package/dist/components/IpAccessRuleEditor.svelte +290 -0
- package/dist/components/IpAccessRuleEditor.svelte.d.ts +19 -0
- package/dist/components/IpWhitelistDrawer.svelte +94 -0
- package/dist/components/IpWhitelistDrawer.svelte.d.ts +10 -0
- package/dist/components/MediaAuthenticityAuditCard.svelte +357 -0
- package/dist/components/MediaAuthenticityAuditCard.svelte.d.ts +64 -0
- package/dist/components/PrintDocument.svelte +95 -0
- package/dist/components/PrintDocument.svelte.d.ts +10 -0
- package/dist/components/PrintPreviewModal.svelte +52 -0
- package/dist/components/PrintPreviewModal.svelte.d.ts +11 -0
- package/dist/components/PrintTemplateDesigner.svelte +280 -0
- package/dist/components/PrintTemplateDesigner.svelte.d.ts +11 -0
- package/dist/components/RateLimitPolicyPanel.svelte +369 -0
- package/dist/components/RateLimitPolicyPanel.svelte.d.ts +29 -0
- package/dist/components/SensitiveWordAuditor.svelte +368 -0
- package/dist/components/SensitiveWordAuditor.svelte.d.ts +9 -0
- package/dist/components/ServiceDeskTicketCard.svelte +297 -0
- package/dist/components/ServiceDeskTicketCard.svelte.d.ts +52 -0
- package/dist/components/ShiftScheduler.svelte +490 -0
- package/dist/components/ShiftScheduler.svelte.d.ts +50 -0
- package/dist/components/SslCertificateMonitorCard.svelte +309 -0
- package/dist/components/SslCertificateMonitorCard.svelte.d.ts +30 -0
- package/dist/components/SsoConnectionStudio.svelte +784 -0
- package/dist/components/SsoConnectionStudio.svelte.d.ts +44 -0
- package/dist/components/SsoSpMetadataPanel.svelte +44 -0
- package/dist/components/SsoSpMetadataPanel.svelte.d.ts +8 -0
- package/dist/components/StepUpAuthModal.svelte +448 -0
- package/dist/components/StepUpAuthModal.svelte.d.ts +26 -0
- package/dist/components/TrafficTopologyInspector.svelte +361 -0
- package/dist/components/TrafficTopologyInspector.svelte.d.ts +43 -0
- package/dist/components/ip-access-rules.d.ts +24 -0
- package/dist/components/ip-access-rules.js +110 -0
- package/dist/components/moderation-utils.d.ts +45 -0
- package/dist/components/moderation-utils.js +74 -0
- package/dist/components/print-document.d.ts +3 -0
- package/dist/components/print-document.js +65 -0
- package/dist/components/print-utils.d.ts +44 -0
- package/dist/components/print-utils.js +68 -0
- package/dist/components/retention-utils.d.ts +31 -0
- package/dist/components/retention-utils.js +38 -0
- package/dist/components/sso-connection-presets.d.ts +2 -0
- package/dist/components/sso-connection-presets.js +59 -0
- package/dist/components/ui/sheet/sheet.svelte +3 -1
- package/dist/components/ui/sheet/sheet.svelte.d.ts +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +44 -0
- package/package.json +5 -4
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PRINT_PAPER_DIMENSIONS } from './print-utils.js';
|
|
2
|
+
async function copyPrintStyles(source, target) {
|
|
3
|
+
await Promise.all(Array.from(source.querySelectorAll('style, link[rel="stylesheet"]'), node => {
|
|
4
|
+
const clone = node.cloneNode(true);
|
|
5
|
+
const loaded = clone instanceof HTMLLinkElement
|
|
6
|
+
? new Promise((resolve, reject) => {
|
|
7
|
+
clone.onload = () => resolve();
|
|
8
|
+
clone.onerror = () => reject(new Error('打印样式加载失败'));
|
|
9
|
+
}) : Promise.resolve();
|
|
10
|
+
target.head.append(clone);
|
|
11
|
+
return loaded;
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
/** 只复制单据;80mm 小票至少 160mm,超出时按内容高度打印。 */
|
|
15
|
+
export async function printDocument(element, paperSize) {
|
|
16
|
+
const frame = document.createElement('iframe');
|
|
17
|
+
frame.title = '单据打印';
|
|
18
|
+
frame.style.cssText = 'position:fixed;left:-10000px;top:0;width:1px;height:1px;border:0';
|
|
19
|
+
document.body.append(frame);
|
|
20
|
+
let timeout;
|
|
21
|
+
try {
|
|
22
|
+
const target = frame.contentDocument;
|
|
23
|
+
const printWindow = frame.contentWindow;
|
|
24
|
+
if (!target || !printWindow)
|
|
25
|
+
throw new Error('无法创建打印窗口');
|
|
26
|
+
target.documentElement.lang = document.documentElement.lang;
|
|
27
|
+
const base = target.createElement('base');
|
|
28
|
+
base.href = document.baseURI;
|
|
29
|
+
target.head.append(base);
|
|
30
|
+
const stylesheetReady = copyPrintStyles(document, target);
|
|
31
|
+
const paper = PRINT_PAPER_DIMENSIONS[paperSize];
|
|
32
|
+
const pageStyle = target.createElement('style');
|
|
33
|
+
pageStyle.textContent = `@page { size: ${paper.width}mm ${paper.height}mm; margin: 0; }
|
|
34
|
+
html, body { margin: 0; padding: 0; background: white; color: black; }
|
|
35
|
+
.print-pages { display: block !important; }
|
|
36
|
+
.print-page { box-shadow: none !important; border: 0 !important; }`;
|
|
37
|
+
target.head.append(pageStyle);
|
|
38
|
+
const copied = element.cloneNode(true);
|
|
39
|
+
copied.hidden = false;
|
|
40
|
+
copied.style.display = 'block';
|
|
41
|
+
target.body.append(copied);
|
|
42
|
+
const deadline = new Promise((_, reject) => {
|
|
43
|
+
timeout = setTimeout(() => reject(new Error('打印资源加载超时')), 15000);
|
|
44
|
+
});
|
|
45
|
+
await Promise.race([stylesheetReady.then(() => target.fonts?.ready), deadline]);
|
|
46
|
+
clearTimeout(timeout);
|
|
47
|
+
if (paperSize === 'RECEIPT_80MM') {
|
|
48
|
+
const height = Math.max(paper.height, ...Array.from(copied.querySelectorAll('.print-page'), page => Math.ceil(page.getBoundingClientRect().height * 25.4 / 96 - 0.01)));
|
|
49
|
+
pageStyle.textContent += `@page { size: ${paper.width}mm ${height}mm; }`;
|
|
50
|
+
}
|
|
51
|
+
// Safari 的打印对话框可能非阻塞,不能在 print() 返回时立即移除文档。
|
|
52
|
+
const cleanupTimer = setTimeout(() => frame.remove(), 60000);
|
|
53
|
+
printWindow.addEventListener('afterprint', () => {
|
|
54
|
+
clearTimeout(cleanupTimer);
|
|
55
|
+
frame.remove();
|
|
56
|
+
}, { once: true });
|
|
57
|
+
printWindow.focus();
|
|
58
|
+
printWindow.print();
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
clearTimeout(timeout);
|
|
62
|
+
frame.remove();
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type PaperSize = 'A4' | 'A4_LANDSCAPE' | 'RECEIPT_80MM' | 'SHIPPING_100X180' | 'TRIPLICATE_241X140';
|
|
2
|
+
export interface PrintColumn {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
field: string;
|
|
6
|
+
width?: string;
|
|
7
|
+
align?: 'left' | 'center' | 'right';
|
|
8
|
+
visible: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface PrintTemplateConfig {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
title: string;
|
|
14
|
+
subTitle?: string;
|
|
15
|
+
companyName: string;
|
|
16
|
+
paperSize: PaperSize;
|
|
17
|
+
showBarcode: boolean;
|
|
18
|
+
showQrCode: boolean;
|
|
19
|
+
showWatermark: boolean;
|
|
20
|
+
watermarkText?: string;
|
|
21
|
+
showAmountInWords: boolean;
|
|
22
|
+
currencySymbol: string;
|
|
23
|
+
metaFields: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
field: string;
|
|
27
|
+
value?: string;
|
|
28
|
+
}>;
|
|
29
|
+
columns: PrintColumn[];
|
|
30
|
+
signers: string[];
|
|
31
|
+
copies: string[];
|
|
32
|
+
footerNotes?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 将数字金额转换为符合中国财务规范的人民币汉字大写字符串
|
|
36
|
+
* 例如:1234.56 -> 壹仟贰佰叁拾肆元伍角陆分
|
|
37
|
+
*/
|
|
38
|
+
export declare function currencyMinorUnits(amount: number): number;
|
|
39
|
+
export declare function numberToChineseCurrency(num: number): string;
|
|
40
|
+
export declare const PRINT_PAPER_DIMENSIONS: Record<PaperSize, {
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
}>;
|
|
44
|
+
export declare function printSampleItems(sample: Record<string, unknown>): Record<string, unknown>[];
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 将数字金额转换为符合中国财务规范的人民币汉字大写字符串
|
|
3
|
+
* 例如:1234.56 -> 壹仟贰佰叁拾肆元伍角陆分
|
|
4
|
+
*/
|
|
5
|
+
export function currencyMinorUnits(amount) {
|
|
6
|
+
if (!Number.isFinite(amount) || Math.abs(amount) >= 1e12) {
|
|
7
|
+
throw new RangeError('金额必须是绝对值小于一万亿元的有限数值');
|
|
8
|
+
}
|
|
9
|
+
// 用十进制原值舍入,避免 1.15 丢分、1.005 不进位及科学计数法误差。
|
|
10
|
+
const [coefficient = '0', exponent = '0'] = Math.abs(amount).toString().split('e');
|
|
11
|
+
const decimals = coefficient.split('.')[1]?.length ?? 0;
|
|
12
|
+
const digits = BigInt(coefficient.replace('.', ''));
|
|
13
|
+
const shift = Number(exponent) - decimals + 2;
|
|
14
|
+
const divisor = 10n ** BigInt(Math.max(0, -shift));
|
|
15
|
+
const cents = shift >= 0 ? digits * 10n ** BigInt(shift)
|
|
16
|
+
: (digits + divisor / 2n) / divisor;
|
|
17
|
+
if (cents >= 100000000000000n)
|
|
18
|
+
throw new RangeError('金额舍入后超出支持范围');
|
|
19
|
+
return Number(cents) * (amount < 0 ? -1 : 1);
|
|
20
|
+
}
|
|
21
|
+
export function numberToChineseCurrency(num) {
|
|
22
|
+
if (!Number.isFinite(num) || Math.abs(num) >= 1e12)
|
|
23
|
+
return '金额无效';
|
|
24
|
+
let minorUnits;
|
|
25
|
+
try {
|
|
26
|
+
minorUnits = Math.abs(currencyMinorUnits(num));
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (error instanceof RangeError)
|
|
30
|
+
return '金额无效';
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
const fraction = ['角', '分'];
|
|
34
|
+
const digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
35
|
+
const unit = [
|
|
36
|
+
['元', '万', '亿'],
|
|
37
|
+
['', '拾', '佰', '仟'],
|
|
38
|
+
];
|
|
39
|
+
let s = '';
|
|
40
|
+
const fractionPart = minorUnits % 100;
|
|
41
|
+
for (let i = 0; i < fraction.length; i++) {
|
|
42
|
+
s += `${digit[Math.floor(fractionPart / (i === 0 ? 10 : 1)) % 10] ?? ''}${fraction[i] ?? ''}`.replace(/零./, '');
|
|
43
|
+
}
|
|
44
|
+
s = s || '整';
|
|
45
|
+
let integerPart = Math.floor(minorUnits / 100);
|
|
46
|
+
for (let i = 0; i < (unit[0]?.length ?? 0) && integerPart > 0; i++) {
|
|
47
|
+
let p = '';
|
|
48
|
+
for (let j = 0; j < (unit[1]?.length ?? 0) && integerPart > 0; j++) {
|
|
49
|
+
p = `${digit[integerPart % 10] ?? ''}${unit[1]?.[j] ?? ''}${p}`;
|
|
50
|
+
integerPart = Math.floor(integerPart / 10);
|
|
51
|
+
}
|
|
52
|
+
s = `${p.replace(/(零.)*零$/, '').replace(/^$/, '零')}${unit[0]?.[i] ?? ''}${s}`;
|
|
53
|
+
}
|
|
54
|
+
const words = s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整');
|
|
55
|
+
return num < 0 && minorUnits > 0 ? `负${words}` : words;
|
|
56
|
+
}
|
|
57
|
+
export const PRINT_PAPER_DIMENSIONS = {
|
|
58
|
+
A4: { width: 210, height: 297 },
|
|
59
|
+
A4_LANDSCAPE: { width: 297, height: 210 },
|
|
60
|
+
RECEIPT_80MM: { width: 80, height: 160 },
|
|
61
|
+
SHIPPING_100X180: { width: 100, height: 180 },
|
|
62
|
+
TRIPLICATE_241X140: { width: 241, height: 140 },
|
|
63
|
+
};
|
|
64
|
+
export function printSampleItems(sample) {
|
|
65
|
+
if (Array.isArray(sample['items']))
|
|
66
|
+
return sample['items'];
|
|
67
|
+
return Object.values(sample).filter((row) => typeof row === 'object' && row !== null && !Array.isArray(row));
|
|
68
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type RetentionAction = 'hard_delete' | 'soft_delete' | 'archive_cold_storage' | 'mask_and_archive';
|
|
2
|
+
export type RetentionStatus = 'active' | 'paused' | 'draft';
|
|
3
|
+
export interface RetentionPolicy {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
resource: string;
|
|
7
|
+
retentionDays: number;
|
|
8
|
+
action: RetentionAction;
|
|
9
|
+
status: RetentionStatus;
|
|
10
|
+
targetStorage?: string;
|
|
11
|
+
filterCondition?: string;
|
|
12
|
+
estimatedRows: number;
|
|
13
|
+
estimatedStorageMb: number;
|
|
14
|
+
lastExecutedAt?: string;
|
|
15
|
+
scheduleCron?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RetentionSummaryMetrics {
|
|
18
|
+
totalPolicies: number;
|
|
19
|
+
activePolicies: number;
|
|
20
|
+
totalEstimatedRows: number;
|
|
21
|
+
totalEstimatedStorageGb: number;
|
|
22
|
+
archivedToColdStorageGb: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 汇总统计所有生命周期策略的预估受影响量与节省存储指标
|
|
26
|
+
*/
|
|
27
|
+
export declare function calculateRetentionMetrics(policies: RetentionPolicy[]): RetentionSummaryMetrics;
|
|
28
|
+
/**
|
|
29
|
+
* 检测同一资源是否存在潜在冲突的留存策略(同资源同状态同动作)
|
|
30
|
+
*/
|
|
31
|
+
export declare function detectPolicyConflicts(policies: RetentionPolicy[]): string[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 汇总统计所有生命周期策略的预估受影响量与节省存储指标
|
|
3
|
+
*/
|
|
4
|
+
export function calculateRetentionMetrics(policies) {
|
|
5
|
+
const activeList = policies.filter(p => p.status === 'active');
|
|
6
|
+
const totalRows = activeList.reduce((acc, curr) => acc + curr.estimatedRows, 0);
|
|
7
|
+
const totalStorageMb = activeList.reduce((acc, curr) => acc + curr.estimatedStorageMb, 0);
|
|
8
|
+
const coldStorageMb = activeList
|
|
9
|
+
.filter(p => p.action === 'archive_cold_storage' || p.action === 'mask_and_archive')
|
|
10
|
+
.reduce((acc, curr) => acc + curr.estimatedStorageMb, 0);
|
|
11
|
+
return {
|
|
12
|
+
totalPolicies: policies.length,
|
|
13
|
+
activePolicies: activeList.length,
|
|
14
|
+
totalEstimatedRows: totalRows,
|
|
15
|
+
totalEstimatedStorageGb: Number((totalStorageMb / 1024).toFixed(2)),
|
|
16
|
+
archivedToColdStorageGb: Number((coldStorageMb / 1024).toFixed(2)),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 检测同一资源是否存在潜在冲突的留存策略(同资源同状态同动作)
|
|
21
|
+
*/
|
|
22
|
+
export function detectPolicyConflicts(policies) {
|
|
23
|
+
const warnings = [];
|
|
24
|
+
const map = new Map();
|
|
25
|
+
for (const p of policies) {
|
|
26
|
+
if (p.status !== 'active')
|
|
27
|
+
continue;
|
|
28
|
+
const list = map.get(p.resource) || [];
|
|
29
|
+
list.push(p);
|
|
30
|
+
map.set(p.resource, list);
|
|
31
|
+
}
|
|
32
|
+
for (const [resource, list] of map.entries()) {
|
|
33
|
+
if (list.length > 1) {
|
|
34
|
+
warnings.push(`资源 "${resource}" 存在 ${list.length} 条并发执行的活跃留存策略,请确保过滤条件互斥。`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return warnings;
|
|
38
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// 默认 SSO 连接示例,集中存放保持组件精简。
|
|
2
|
+
export const defaultSsoConnections = [
|
|
3
|
+
{
|
|
4
|
+
id: 'conn-okta-saml',
|
|
5
|
+
name: 'Corporate Okta SSO',
|
|
6
|
+
protocol: 'saml',
|
|
7
|
+
status: 'active',
|
|
8
|
+
domains: ['corp.example.com', 'partner.example.com'],
|
|
9
|
+
isDefault: true,
|
|
10
|
+
entityId: 'http://www.okta.com/exk1234567890abcdef',
|
|
11
|
+
ssoUrl: 'https://corp.okta.com/app/svadmin/exk1234567890abcdef/sso/saml',
|
|
12
|
+
certificate: 'MIIDpDCCAoygAwIBAgIGAV...[X.509 Certificate]...EXAMPLEDATA',
|
|
13
|
+
claimMappings: [
|
|
14
|
+
{ remoteClaim: 'email', localField: 'email' },
|
|
15
|
+
{ remoteClaim: 'firstName', localField: 'first_name' },
|
|
16
|
+
{ remoteClaim: 'lastName', localField: 'last_name' },
|
|
17
|
+
{ remoteClaim: 'department', localField: 'department' },
|
|
18
|
+
],
|
|
19
|
+
lastTestedAt: '2026-11-14 18:30',
|
|
20
|
+
testStatus: 'success',
|
|
21
|
+
testMessage: 'Handshake 200 OK. Signature verified.',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 'conn-azure-oidc',
|
|
25
|
+
name: 'Microsoft Entra ID (Azure AD)',
|
|
26
|
+
protocol: 'oidc',
|
|
27
|
+
status: 'active',
|
|
28
|
+
domains: ['cloud.example.org'],
|
|
29
|
+
isDefault: false,
|
|
30
|
+
clientId: '9f8b4a2c-1d3e-4f5a-8b9c-0d1e2f3a4b5c',
|
|
31
|
+
clientSecret: 'ms_sec_••••••••••••••••',
|
|
32
|
+
discoveryUrl: 'https://login.microsoftonline.com/tenant-id/v2.0/.well-known/openid-configuration',
|
|
33
|
+
scopes: ['openid', 'profile', 'email'],
|
|
34
|
+
claimMappings: [
|
|
35
|
+
{ remoteClaim: 'preferred_username', localField: 'email' },
|
|
36
|
+
{ remoteClaim: 'name', localField: 'display_name' },
|
|
37
|
+
],
|
|
38
|
+
lastTestedAt: '2026-11-14 17:15',
|
|
39
|
+
testStatus: 'success',
|
|
40
|
+
testMessage: 'Discovery endpoint parsed. OIDC JWKS valid.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'conn-feishu-suite',
|
|
44
|
+
name: '飞书自建应用企业登录',
|
|
45
|
+
protocol: 'feishu',
|
|
46
|
+
status: 'inactive',
|
|
47
|
+
domains: ['feishu.internal'],
|
|
48
|
+
isDefault: false,
|
|
49
|
+
appId: 'cli_a1b2c3d4e5f6g7h8',
|
|
50
|
+
appSecret: 'secret_••••••••••••',
|
|
51
|
+
claimMappings: [
|
|
52
|
+
{ remoteClaim: 'open_id', localField: 'sso_uid' },
|
|
53
|
+
{ remoteClaim: 'name', localField: 'display_name' },
|
|
54
|
+
{ remoteClaim: 'mobile', localField: 'phone' },
|
|
55
|
+
],
|
|
56
|
+
lastTestedAt: '2026-11-10 09:00',
|
|
57
|
+
testStatus: 'untested',
|
|
58
|
+
},
|
|
59
|
+
];
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
onClose?: () => void;
|
|
57
57
|
onCloseRequest?: (close: () => void) => void;
|
|
58
58
|
closeLabel?: string;
|
|
59
|
+
closeOnOverlayClick?: boolean;
|
|
59
60
|
};
|
|
60
61
|
|
|
61
62
|
let {
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
onClose,
|
|
66
67
|
onCloseRequest,
|
|
67
68
|
closeLabel = i18n.t("common.close"),
|
|
69
|
+
closeOnOverlayClick = true,
|
|
68
70
|
class: className,
|
|
69
71
|
tabindex = -1,
|
|
70
72
|
children,
|
|
@@ -169,7 +171,7 @@
|
|
|
169
171
|
<div
|
|
170
172
|
role="presentation"
|
|
171
173
|
class="svadmin-sheet-overlay"
|
|
172
|
-
onclick={close}
|
|
174
|
+
onclick={() => { if (closeOnOverlayClick) close(); }}
|
|
173
175
|
></div>
|
|
174
176
|
|
|
175
177
|
<!-- Sheet panel -->
|
|
@@ -6,6 +6,7 @@ type Props = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
|
6
6
|
onClose?: () => void;
|
|
7
7
|
onCloseRequest?: (close: () => void) => void;
|
|
8
8
|
closeLabel?: string;
|
|
9
|
+
closeOnOverlayClick?: boolean;
|
|
9
10
|
};
|
|
10
11
|
declare const Sheet: import("svelte").Component<Props, {}, "open" | "ref">;
|
|
11
12
|
type Sheet = ReturnType<typeof Sheet>;
|
package/dist/index.d.ts
CHANGED
|
@@ -635,7 +635,9 @@ export { default as TableAggregationFooter, default as TableColumnSumSummary, ty
|
|
|
635
635
|
export { default as IncidentWarRoomDrawer, default as AlertIncidentTimeline, type IncidentWarRoomDrawerProps, type IncidentTimelineEvent, type IncidentSeverity } from './components/IncidentWarRoomDrawer.svelte';
|
|
636
636
|
export { default as DataImportDropzone, default as BatchImportDropzone, type DataImportDropzoneProps } from './components/DataImportDropzone.svelte';
|
|
637
637
|
export { default as ColumnMappingTable, default as FieldMappingTable, type ColumnMappingTableProps, type TargetFieldConfig } from './components/ColumnMappingTable.svelte';
|
|
638
|
+
export { default as FieldMappingBuilder, default as ColumnMappingBuilder, type FieldMappingBuilderProps, type SourceField, type TargetField, type FieldMappingRule, type TransformType } from './components/FieldMappingBuilder.svelte';
|
|
638
639
|
export { default as ImportPreviewValidator, default as ImportDataValidator, type ImportPreviewValidatorProps, type RowValidationError } from './components/ImportPreviewValidator.svelte';
|
|
640
|
+
export { default as DataImportPipeline, default as BatchImportPipeline, type DataImportPipelineProps, type ValidationRule, type PipelineValidationError } from './components/DataImportPipeline.svelte';
|
|
639
641
|
export { default as PivotMatrix, default as CrossTableSummary, type PivotMatrixProps, type PivotDimension, type PivotMeasure } from './components/PivotMatrix.svelte';
|
|
640
642
|
export { default as GeoScatterMap, default as RegionDistributionMap, type GeoScatterMapProps, type GeoRegionData } from './components/GeoScatterMap.svelte';
|
|
641
643
|
export { default as DataMaskPolicyEngine, default as DataMaskCenter, type DataMaskPolicyEngineProps, type MaskingPolicyItem, type MaskingRuleType, type MaskingLevel } from './components/DataMaskPolicyEngine.svelte';
|
|
@@ -669,4 +671,31 @@ export { default as MicroAppSandbox, default as SubAppRuntimeSandbox, type Micro
|
|
|
669
671
|
export { useMicroAppState, type UseMicroAppStateOptions, type MicroAppStateMessage } from './components/useMicroAppState.svelte.js';
|
|
670
672
|
export { default as MicroAppStateBusIndicator, default as CrossAppStateBus, type MicroAppStateBusIndicatorProps } from './components/MicroAppStateBusIndicator.svelte';
|
|
671
673
|
export { default as MicroAppRouteSync, default as SubAppUrlSynchronizer, type MicroAppRouteSyncProps } from './components/MicroAppRouteSync.svelte';
|
|
674
|
+
export { default as IpAccessRuleEditor, validateIpRuleValue, type IpAccessRuleEditorProps, type IpAccessRule, type IpRuleType, type IpRuleAction, } from './components/IpAccessRuleEditor.svelte';
|
|
675
|
+
export { default as IpWhitelistDrawer, default as IpAccessControlDrawer, type IpWhitelistDrawerProps, } from './components/IpWhitelistDrawer.svelte';
|
|
676
|
+
export { default as ShiftScheduler, default as WorkShiftCalendar, type ShiftSchedulerProps, type ShiftType, type StaffMember, type ShiftAssignment, type ShiftConflictAlert } from './components/ShiftScheduler.svelte';
|
|
672
677
|
export { default as NotificationDrawer, default as GlobalNoticeDrawer, type NotificationDrawerProps, type NotificationItem as NotificationDrawerItem, type NotificationAction, type NotificationCategory, } from './components/NotificationDrawer.svelte';
|
|
678
|
+
export { default as I18nStudio, default as TranslationManager, type I18nStudioProps, } from './components/I18nStudio.svelte';
|
|
679
|
+
export { default as ContractClauseDiffViewer, default as LegalClauseComparator, type ContractClauseDiffViewerProps, type ContractClause, type ClauseChangeType, type ClauseRiskLevel, type ClauseDecisionStatus, type ClauseAnnotation, } from './components/ContractClauseDiffViewer.svelte';
|
|
680
|
+
export { default as ElectronicSealInspector, default as StampAuthenticityCard, type ElectronicSealInspectorProps, type ElectronicSealInfo, type SealValidationStatus, type SealType as ElectronicSealValidationType, type SealCertificateInfo, type SealTimestampInfo, type SealVerificationLog, } from './components/ElectronicSealInspector.svelte';
|
|
681
|
+
export { default as GatewayRouteEditor, default as ApiRouteRuleCard, type HttpMethod as GatewayHttpMethod, type HeaderMatchRule, type GatewayRouteConfig, } from './components/GatewayRouteEditor.svelte';
|
|
682
|
+
export { default as RateLimitPolicyPanel, default as CircuitBreakerCard, type CircuitBreakerState, type RateLimitDimension, type FallbackStrategy, type RateLimitPolicyConfig, } from './components/RateLimitPolicyPanel.svelte';
|
|
683
|
+
export { default as StepUpAuthModal, default as PrivilegeElevationModal, type StepUpAuthMethod, type StepUpRiskLevel, } from './components/StepUpAuthModal.svelte';
|
|
684
|
+
export { default as AuditSnapshotCapture, default as ComplianceEvidenceCard, type AuditSnapshotDiffItem, } from './components/AuditSnapshotCapture.svelte';
|
|
685
|
+
export { default as ServiceDeskTicketCard, default as SupportTicketCard, type ServiceDeskTicketCardProps, type TicketPriority, type TicketStatus, type TicketActor, type SlaInfo } from './components/ServiceDeskTicketCard.svelte';
|
|
686
|
+
export { default as CannedResponsePicker, default as QuickReplyDrawer, type CannedResponsePickerProps, type CannedTemplate } from './components/CannedResponsePicker.svelte';
|
|
687
|
+
export { default as EmployeeOffboardingAuditor, default as HandoverChecklistDrawer, type OffboardingEmployee, type OffboardingItem, type OffboardingCategory, type OffboardingItemStatus, type SignoffStatus, } from './components/EmployeeOffboardingAuditor.svelte';
|
|
688
|
+
export { default as AccessRevocationMatrix, default as PrivilegeDeprovisionCard, type TargetSystemAccess, type SystemType, type PrivilegeLevel, type RevocationStatus, } from './components/AccessRevocationMatrix.svelte';
|
|
689
|
+
export { default as DataRetentionPolicyEditor, default as DataArchiveStudio, type DataRetentionPolicyEditorProps, } from './components/DataRetentionPolicyEditor.svelte';
|
|
690
|
+
export { calculateRetentionMetrics, detectPolicyConflicts, type RetentionAction, type RetentionStatus, type RetentionPolicy, type RetentionSummaryMetrics, } from './components/retention-utils.js';
|
|
691
|
+
export { default as TrafficTopologyInspector, default as ClusterTrafficVisualizer, type TrafficTopologyInspectorProps, type TopologyNode, type TopologyEdge, type TopologyNodeStatus, type TopologyNodeType, } from './components/TrafficTopologyInspector.svelte';
|
|
692
|
+
export { default as SslCertificateMonitorCard, default as TlsCertExpiryRadar, type SslCertificateMonitorCardProps, type SslCertificateData, type CertSecurityLevel, } from './components/SslCertificateMonitorCard.svelte';
|
|
693
|
+
export { default as SensitiveWordAuditor, default as ComplianceWordFilter, type SensitiveWordAuditorProps, } from './components/SensitiveWordAuditor.svelte';
|
|
694
|
+
export { default as ContentModerationCenter, default as ContentReviewWorkbench, type ContentModerationCenterProps, } from './components/ContentModerationCenter.svelte';
|
|
695
|
+
export { scanContent, type ModerationCategory, type ModerationAction, type ModerationSeverity, type SensitiveWordItem, type ModerationMatch, type ModerationScanResult, type ModerationTicket, } from './components/moderation-utils.js';
|
|
696
|
+
export { default as AudioVisualInspector, default as MediaInspectionCard, type AudioVisualInspectorProps, type AudioVisualMediaMeta, type ViolationMarker, type InspectionViolationLevel, type InspectionOverallResult, } from './components/AudioVisualInspector.svelte';
|
|
697
|
+
export { default as MediaAuthenticityAuditCard, default as ExifMetadataAuditor, type MediaAuthenticityAuditCardProps, type MediaAuthenticityData, type MediaExifMeta, type MediaGpsLocation, type BlindWatermarkPayload, type MediaTamperRiskLevel, } from './components/MediaAuthenticityAuditCard.svelte';
|
|
698
|
+
export { default as PrintTemplateDesigner, default as DocumentPrintStudio, type PrintTemplateDesignerProps, } from './components/PrintTemplateDesigner.svelte';
|
|
699
|
+
export { default as PrintPreviewModal, default as DocumentPrintPreview, type PrintPreviewModalProps, } from './components/PrintPreviewModal.svelte';
|
|
700
|
+
export { numberToChineseCurrency, type PaperSize, type PrintColumn, type PrintTemplateConfig, } from './components/print-utils.js';
|
|
701
|
+
export { default as SsoConnectionStudio, default as IdentityProviderManager, type SsoConnectionStudioProps, type SsoConnection, type SsoProtocol, type SsoStatus, type SsoClaimMapping, } from './components/SsoConnectionStudio.svelte';
|
package/dist/index.js
CHANGED
|
@@ -566,7 +566,9 @@ export { default as IncidentWarRoomDrawer, default as AlertIncidentTimeline } fr
|
|
|
566
566
|
// Enterprise bulk data import, column mapping & inline error validator suite
|
|
567
567
|
export { default as DataImportDropzone, default as BatchImportDropzone } from './components/DataImportDropzone.svelte';
|
|
568
568
|
export { default as ColumnMappingTable, default as FieldMappingTable } from './components/ColumnMappingTable.svelte';
|
|
569
|
+
export { default as FieldMappingBuilder, default as ColumnMappingBuilder } from './components/FieldMappingBuilder.svelte';
|
|
569
570
|
export { default as ImportPreviewValidator, default as ImportDataValidator } from './components/ImportPreviewValidator.svelte';
|
|
571
|
+
export { default as DataImportPipeline, default as BatchImportPipeline } from './components/DataImportPipeline.svelte';
|
|
570
572
|
// Enterprise multi-dimensional pivot matrix & cross-tabulation analysis suite
|
|
571
573
|
export { default as PivotMatrix, default as CrossTableSummary } from './components/PivotMatrix.svelte';
|
|
572
574
|
// Enterprise regional geographic distribution & scatter bubble map suite
|
|
@@ -620,5 +622,47 @@ export { default as MicroAppSandbox, default as SubAppRuntimeSandbox } from './c
|
|
|
620
622
|
export { useMicroAppState } from './components/useMicroAppState.svelte.js';
|
|
621
623
|
export { default as MicroAppStateBusIndicator, default as CrossAppStateBus } from './components/MicroAppStateBusIndicator.svelte';
|
|
622
624
|
export { default as MicroAppRouteSync, default as SubAppUrlSynchronizer } from './components/MicroAppRouteSync.svelte';
|
|
625
|
+
// Enterprise network security IP access rule editor & whitelist drawer suite
|
|
626
|
+
export { default as IpAccessRuleEditor, validateIpRuleValue, } from './components/IpAccessRuleEditor.svelte';
|
|
627
|
+
export { default as IpWhitelistDrawer, default as IpAccessControlDrawer, } from './components/IpWhitelistDrawer.svelte';
|
|
628
|
+
// Enterprise staff shift scheduler & multi-shift rotation calendar suite
|
|
629
|
+
export { default as ShiftScheduler, default as WorkShiftCalendar } from './components/ShiftScheduler.svelte';
|
|
623
630
|
// Enterprise global notification drawer suite
|
|
624
631
|
export { default as NotificationDrawer, default as GlobalNoticeDrawer, } from './components/NotificationDrawer.svelte';
|
|
632
|
+
// Enterprise i18n translation management & hot reloading studio suite
|
|
633
|
+
export { default as I18nStudio, default as TranslationManager, } from './components/I18nStudio.svelte';
|
|
634
|
+
// Enterprise contract clause diff viewer & legal compliance suite
|
|
635
|
+
export { default as ContractClauseDiffViewer, default as LegalClauseComparator, } from './components/ContractClauseDiffViewer.svelte';
|
|
636
|
+
// Enterprise electronic seal authenticity inspector & CA verification suite
|
|
637
|
+
export { default as ElectronicSealInspector, default as StampAuthenticityCard, } from './components/ElectronicSealInspector.svelte';
|
|
638
|
+
// Enterprise microservice API gateway route & rate limit circuit breaker governance suite
|
|
639
|
+
export { default as GatewayRouteEditor, default as ApiRouteRuleCard, } from './components/GatewayRouteEditor.svelte';
|
|
640
|
+
export { default as RateLimitPolicyPanel, default as CircuitBreakerCard, } from './components/RateLimitPolicyPanel.svelte';
|
|
641
|
+
// Enterprise step-up authentication & audit snapshot compliance suite
|
|
642
|
+
export { default as StepUpAuthModal, default as PrivilegeElevationModal, } from './components/StepUpAuthModal.svelte';
|
|
643
|
+
export { default as AuditSnapshotCapture, default as ComplianceEvidenceCard, } from './components/AuditSnapshotCapture.svelte';
|
|
644
|
+
// Enterprise service desk support ticket card & canned response picker suite
|
|
645
|
+
export { default as ServiceDeskTicketCard, default as SupportTicketCard } from './components/ServiceDeskTicketCard.svelte';
|
|
646
|
+
export { default as CannedResponsePicker, default as QuickReplyDrawer } from './components/CannedResponsePicker.svelte';
|
|
647
|
+
// Enterprise employee offboarding auditor & privilege access revocation suite
|
|
648
|
+
export { default as EmployeeOffboardingAuditor, default as HandoverChecklistDrawer, } from './components/EmployeeOffboardingAuditor.svelte';
|
|
649
|
+
export { default as AccessRevocationMatrix, default as PrivilegeDeprovisionCard, } from './components/AccessRevocationMatrix.svelte';
|
|
650
|
+
// Enterprise data lifecycle retention policy editor & archive studio suite
|
|
651
|
+
export { default as DataRetentionPolicyEditor, default as DataArchiveStudio, } from './components/DataRetentionPolicyEditor.svelte';
|
|
652
|
+
export { calculateRetentionMetrics, detectPolicyConflicts, } from './components/retention-utils.js';
|
|
653
|
+
// Enterprise cluster traffic topology & SSL certificate monitor suite
|
|
654
|
+
export { default as TrafficTopologyInspector, default as ClusterTrafficVisualizer, } from './components/TrafficTopologyInspector.svelte';
|
|
655
|
+
export { default as SslCertificateMonitorCard, default as TlsCertExpiryRadar, } from './components/SslCertificateMonitorCard.svelte';
|
|
656
|
+
// Enterprise sensitive word auditor & content moderation suite
|
|
657
|
+
export { default as SensitiveWordAuditor, default as ComplianceWordFilter, } from './components/SensitiveWordAuditor.svelte';
|
|
658
|
+
export { default as ContentModerationCenter, default as ContentReviewWorkbench, } from './components/ContentModerationCenter.svelte';
|
|
659
|
+
export { scanContent, } from './components/moderation-utils.js';
|
|
660
|
+
// Enterprise audiovisual inspection & media authenticity audit suite
|
|
661
|
+
export { default as AudioVisualInspector, default as MediaInspectionCard, } from './components/AudioVisualInspector.svelte';
|
|
662
|
+
export { default as MediaAuthenticityAuditCard, default as ExifMetadataAuditor, } from './components/MediaAuthenticityAuditCard.svelte';
|
|
663
|
+
// Enterprise bill printing template designer & high-fidelity preview suite
|
|
664
|
+
export { default as PrintTemplateDesigner, default as DocumentPrintStudio, } from './components/PrintTemplateDesigner.svelte';
|
|
665
|
+
export { default as PrintPreviewModal, default as DocumentPrintPreview, } from './components/PrintPreviewModal.svelte';
|
|
666
|
+
export { numberToChineseCurrency, } from './components/print-utils.js';
|
|
667
|
+
// Enterprise SSO Connection Studio & Identity Provider Manager suite
|
|
668
|
+
export { default as SsoConnectionStudio, default as IdentityProviderManager, } from './components/SsoConnectionStudio.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svadmin/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.131.0",
|
|
4
4
|
"description": "Pre-built admin UI components — AdminApp, AutoTable, AutoForm, Sidebar, Layout",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@codemirror/lang-json": "^6.0.0",
|
|
89
89
|
"@codemirror/lang-markdown": "^6.0.0",
|
|
90
90
|
"@codemirror/lang-sql": "^6.0.0",
|
|
91
|
-
"@svadmin/core": "^0.83.
|
|
91
|
+
"@svadmin/core": "^0.83.1",
|
|
92
92
|
"@tanstack/svelte-query": "^6.1.48",
|
|
93
93
|
"codemirror": "^6.0.0",
|
|
94
94
|
"dashjs": "^5.3.0",
|
|
@@ -151,12 +151,13 @@
|
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
"dependencies": {
|
|
154
|
-
"@svadmin/devtools": "^0.6.
|
|
154
|
+
"@svadmin/devtools": "^0.6.14",
|
|
155
155
|
"@svadmin/devtools-contract": "^0.3.3",
|
|
156
156
|
"@vibeunion/devtools-devframe": "^0.1.2",
|
|
157
157
|
"typebox": "^1.4.6",
|
|
158
158
|
"@floating-ui/dom": "^1.8.0",
|
|
159
159
|
"esm-env": "^1.2.2",
|
|
160
|
+
"ip-address": "10.7.6",
|
|
160
161
|
"@lucide/svelte": "^1.71.0",
|
|
161
162
|
"@svar-ui/svelte-core": "^2.6.2",
|
|
162
163
|
"@svar-ui/svelte-filemanager": "^2.6.0",
|
|
@@ -189,7 +190,7 @@
|
|
|
189
190
|
"@codemirror/lang-markdown": "^6.5.2",
|
|
190
191
|
"@codemirror/lang-sql": "^6.10.0",
|
|
191
192
|
"@happy-dom/global-registrator": "^21.0.4",
|
|
192
|
-
"@svadmin/ai-elements": "^0.15.
|
|
193
|
+
"@svadmin/ai-elements": "^0.15.2",
|
|
193
194
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
194
195
|
"@tailwindcss/cli": "4.3.5",
|
|
195
196
|
"@testing-library/dom": "^10.4.2",
|