@skopon-cool/form-sdk 0.6.1 → 0.6.3
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/README.md +16 -0
- package/dist/adapter/a2uiAdapter.d.ts.map +1 -1
- package/dist/adapter/formSchema.d.ts +3 -0
- package/dist/adapter/formSchema.d.ts.map +1 -1
- package/dist/blocks/resume_multiselect/adapter.d.ts.map +1 -1
- package/dist/catalog/a2uiCustomCatalog.d.ts.map +1 -1
- package/dist/catalog/contentSearchContext.d.ts +35 -0
- package/dist/catalog/contentSearchContext.d.ts.map +1 -0
- package/dist/catalog/pairResumeContent.d.ts +20 -0
- package/dist/catalog/pairResumeContent.d.ts.map +1 -0
- package/dist/catalog/skoponResumeSelect.d.ts.map +1 -1
- package/dist/client/contentSearchClient.d.ts +36 -0
- package/dist/client/contentSearchClient.d.ts.map +1 -0
- package/dist/client/resumeSearchClient.d.ts.map +1 -1
- package/dist/client/skoponSdkClients.d.ts +4 -0
- package/dist/client/skoponSdkClients.d.ts.map +1 -1
- package/dist/components/AskUserFormCard.d.ts +3 -0
- package/dist/components/AskUserFormCard.d.ts.map +1 -1
- package/dist/components/SkoponA2uiStreamRenderer.d.ts +4 -1
- package/dist/components/SkoponA2uiStreamRenderer.d.ts.map +1 -1
- package/dist/components/SkoponFormRenderer.d.ts +3 -0
- package/dist/components/SkoponFormRenderer.d.ts.map +1 -1
- package/dist/form-sdk.css +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1855 -1538
- package/dist/types/index.d.ts +29 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adapter/a2uiAdapter.test.ts +12 -0
- package/src/adapter/a2uiAdapter.ts +8 -0
- package/src/adapter/formSchema.test.ts +8 -0
- package/src/adapter/formSchema.ts +55 -0
- package/src/blocks/resume_multiselect/adapter.ts +31 -0
- package/src/catalog/a2uiCustomCatalog.tsx +19 -0
- package/src/catalog/contentSearchContext.tsx +53 -0
- package/src/catalog/fileUploadPreview.test.tsx +17 -0
- package/src/catalog/pairResumeContent.test.ts +34 -0
- package/src/catalog/pairResumeContent.ts +55 -0
- package/src/catalog/skoponResumeSelect.tsx +348 -153
- package/src/catalog/skoponSelectLoading.test.tsx +84 -5
- package/src/client/contentSearchClient.test.ts +123 -0
- package/src/client/contentSearchClient.ts +156 -0
- package/src/client/resumeSearchClient.test.ts +5 -0
- package/src/client/resumeSearchClient.ts +5 -0
- package/src/client/skoponSdkClients.ts +9 -0
- package/src/components/AskUserFormCard.tsx +5 -0
- package/src/components/SkoponA2uiStreamRenderer.tsx +15 -9
- package/src/components/SkoponFormRenderer.tsx +20 -12
- package/src/index.ts +16 -0
- package/src/styles/a2ui-preview.css +4 -4
- package/src/styles/index.css +158 -13
- package/src/submit/submit.test.ts +1 -0
- package/src/types/index.ts +30 -1
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
/* 原生 A2UI 按钮/chip;勿作用于 Ant Design(Switch、Select、Picker 等)及 Skopon 简历/案例卡片 */
|
|
258
|
-
.a2ui-surface.a2ui-container button:not([class*='ant-']):not(.skopon-resume-select-card) {
|
|
258
|
+
.a2ui-surface.a2ui-container button:not([class*='ant-']):not(.skopon-resume-select-card):not(.skopon-resume-select-card-stage-button) {
|
|
259
259
|
min-height: var(--button-height-md);
|
|
260
260
|
padding: 0 var(--button-padding-x-md);
|
|
261
261
|
font-family: var(--font-sans);
|
|
@@ -273,12 +273,12 @@
|
|
|
273
273
|
color var(--duration-fast) var(--ease-default);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
.a2ui-surface.a2ui-container button:not([class*='ant-']):not(.skopon-resume-select-card):hover:not(:disabled) {
|
|
276
|
+
.a2ui-surface.a2ui-container button:not([class*='ant-']):not(.skopon-resume-select-card):not(.skopon-resume-select-card-stage-button):hover:not(:disabled) {
|
|
277
277
|
border-color: var(--color-border-strong);
|
|
278
278
|
background: var(--color-bg-subtle);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
.a2ui-surface.a2ui-container button:not([class*='ant-']):not(.skopon-resume-select-card):disabled {
|
|
281
|
+
.a2ui-surface.a2ui-container button:not([class*='ant-']):not(.skopon-resume-select-card):not(.skopon-resume-select-card-stage-button):disabled {
|
|
282
282
|
cursor: not-allowed;
|
|
283
283
|
opacity: 0.45;
|
|
284
284
|
}
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
color: var(--color-danger-text) !important;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
.a2ui-surface.a2ui-container img:not(.form-media-item) {
|
|
316
|
+
.a2ui-surface.a2ui-container img:not(.form-media-item):not(.skopon-resume-select-card-cover-img) {
|
|
317
317
|
max-width: 100%;
|
|
318
318
|
height: auto;
|
|
319
319
|
border-radius: var(--radius-md);
|
package/src/styles/index.css
CHANGED
|
@@ -286,6 +286,7 @@
|
|
|
286
286
|
display: flex;
|
|
287
287
|
flex-direction: row;
|
|
288
288
|
flex-wrap: nowrap;
|
|
289
|
+
align-items: flex-start;
|
|
289
290
|
gap: var(--space-3, 12px);
|
|
290
291
|
margin-top: var(--space-2, 8px);
|
|
291
292
|
overflow-x: auto;
|
|
@@ -316,19 +317,163 @@
|
|
|
316
317
|
}
|
|
317
318
|
.skopon-resume-select-card--profile {
|
|
318
319
|
flex-direction: column;
|
|
319
|
-
align-items:
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
320
|
+
align-items: stretch;
|
|
321
|
+
align-self: flex-start;
|
|
322
|
+
gap: 8px;
|
|
323
|
+
width: 240px;
|
|
324
|
+
min-width: 240px;
|
|
325
|
+
max-width: 240px;
|
|
326
|
+
height: fit-content;
|
|
327
|
+
min-height: 0;
|
|
328
|
+
max-height: none;
|
|
329
|
+
padding: 12px;
|
|
330
|
+
overflow: hidden;
|
|
331
|
+
border-radius: 8px;
|
|
332
|
+
}
|
|
333
|
+
.skopon-resume-select-card--disabled {
|
|
334
|
+
cursor: not-allowed;
|
|
335
|
+
opacity: 0.72;
|
|
336
|
+
}
|
|
337
|
+
.skopon-resume-select-card-person {
|
|
338
|
+
display: flex;
|
|
339
|
+
align-items: flex-start;
|
|
340
|
+
gap: 8px;
|
|
341
|
+
min-width: 0;
|
|
342
|
+
}
|
|
343
|
+
.skopon-resume-select-card-person-text {
|
|
344
|
+
flex: 1;
|
|
345
|
+
min-width: 0;
|
|
346
|
+
}
|
|
347
|
+
.skopon-resume-select-card-person-name {
|
|
348
|
+
font-size: 14px;
|
|
349
|
+
font-weight: 600;
|
|
350
|
+
line-height: 1.3;
|
|
351
|
+
text-align: left;
|
|
352
|
+
color: var(--color-text, rgba(0, 0, 0, 0.88));
|
|
353
|
+
overflow: hidden;
|
|
354
|
+
text-overflow: ellipsis;
|
|
355
|
+
white-space: nowrap;
|
|
356
|
+
}
|
|
357
|
+
.skopon-resume-select-card-specialties {
|
|
358
|
+
display: flex;
|
|
359
|
+
flex-wrap: wrap;
|
|
360
|
+
gap: 4px;
|
|
361
|
+
margin-top: 4px;
|
|
362
|
+
}
|
|
363
|
+
.skopon-resume-select-card-content-title {
|
|
364
|
+
flex: none;
|
|
365
|
+
margin: 0;
|
|
366
|
+
padding: 0;
|
|
367
|
+
font-size: 13px;
|
|
368
|
+
font-weight: 500;
|
|
369
|
+
line-height: 1.4;
|
|
370
|
+
text-align: left;
|
|
371
|
+
color: var(--color-text, rgba(0, 0, 0, 0.88));
|
|
372
|
+
display: -webkit-box;
|
|
373
|
+
-webkit-line-clamp: 2;
|
|
374
|
+
-webkit-box-orient: vertical;
|
|
327
375
|
overflow: hidden;
|
|
328
376
|
}
|
|
329
|
-
.
|
|
330
|
-
|
|
331
|
-
|
|
377
|
+
.skopon-resume-select-card-content-tags {
|
|
378
|
+
display: flex;
|
|
379
|
+
flex-direction: column;
|
|
380
|
+
gap: 4px;
|
|
381
|
+
min-width: 0;
|
|
382
|
+
}
|
|
383
|
+
.skopon-resume-select-card-content-tags-label {
|
|
384
|
+
color: var(--color-text-secondary, rgba(0, 0, 0, 0.45));
|
|
385
|
+
font-size: 11px;
|
|
386
|
+
line-height: 1.2;
|
|
387
|
+
}
|
|
388
|
+
.skopon-resume-select-card-content-tags-list {
|
|
389
|
+
display: flex;
|
|
390
|
+
flex-wrap: wrap;
|
|
391
|
+
gap: 4px;
|
|
392
|
+
}
|
|
393
|
+
.skopon-resume-select-card-content-tag {
|
|
394
|
+
margin: 0;
|
|
395
|
+
border-color: color-mix(in srgb, var(--color-primary, #208368) 24%, transparent);
|
|
396
|
+
background: color-mix(in srgb, var(--color-primary, #208368) 8%, transparent);
|
|
397
|
+
color: var(--color-primary, #208368);
|
|
398
|
+
font-size: 11px;
|
|
399
|
+
line-height: 18px;
|
|
400
|
+
}
|
|
401
|
+
.skopon-resume-select-card-stage {
|
|
402
|
+
position: relative;
|
|
403
|
+
flex: none;
|
|
404
|
+
align-self: stretch;
|
|
405
|
+
width: 100%;
|
|
406
|
+
height: auto;
|
|
407
|
+
aspect-ratio: 9 / 16;
|
|
408
|
+
margin: 0;
|
|
409
|
+
padding: 0;
|
|
410
|
+
overflow: hidden;
|
|
411
|
+
border-radius: 6px;
|
|
412
|
+
background: #111;
|
|
413
|
+
}
|
|
414
|
+
.skopon-resume-select-card-stage-button,
|
|
415
|
+
.skopon-resume-select-card-stage-video {
|
|
416
|
+
position: absolute;
|
|
417
|
+
top: 0;
|
|
418
|
+
right: 0;
|
|
419
|
+
bottom: 0;
|
|
420
|
+
left: 0;
|
|
421
|
+
display: block;
|
|
422
|
+
width: 100%;
|
|
423
|
+
height: 100%;
|
|
424
|
+
margin: 0;
|
|
425
|
+
padding: 0;
|
|
426
|
+
border: 0;
|
|
427
|
+
border-radius: 0;
|
|
428
|
+
background: #111;
|
|
429
|
+
cursor: pointer;
|
|
430
|
+
overflow: hidden;
|
|
431
|
+
}
|
|
432
|
+
.skopon-resume-select-card-stage-button:disabled {
|
|
433
|
+
cursor: default;
|
|
434
|
+
}
|
|
435
|
+
.a2ui-surface.a2ui-container .skopon-resume-select-card-stage img.skopon-resume-select-card-cover-img,
|
|
436
|
+
.a2ui-surface.a2ui-container .skopon-resume-select-card-stage video.skopon-resume-select-card-stage-video,
|
|
437
|
+
.skopon-resume-select-card-stage img.skopon-resume-select-card-cover-img,
|
|
438
|
+
.skopon-resume-select-card-stage video.skopon-resume-select-card-stage-video {
|
|
439
|
+
position: absolute;
|
|
440
|
+
top: 0;
|
|
441
|
+
right: 0;
|
|
442
|
+
bottom: 0;
|
|
443
|
+
left: 0;
|
|
444
|
+
display: block;
|
|
445
|
+
width: 100%;
|
|
446
|
+
height: 100%;
|
|
447
|
+
max-width: none;
|
|
448
|
+
max-height: none;
|
|
449
|
+
margin: 0;
|
|
450
|
+
border-radius: 0;
|
|
451
|
+
object-fit: cover;
|
|
452
|
+
object-position: center;
|
|
453
|
+
}
|
|
454
|
+
.skopon-resume-select-card-cover-placeholder {
|
|
455
|
+
position: absolute;
|
|
456
|
+
left: 50%;
|
|
457
|
+
top: 50%;
|
|
458
|
+
font-size: 22px;
|
|
459
|
+
color: rgba(255, 255, 255, 0.45);
|
|
460
|
+
transform: translate(-50%, -50%);
|
|
461
|
+
}
|
|
462
|
+
.skopon-resume-select-card-play {
|
|
463
|
+
position: absolute;
|
|
464
|
+
left: 50%;
|
|
465
|
+
top: 50%;
|
|
466
|
+
display: flex;
|
|
467
|
+
align-items: center;
|
|
468
|
+
justify-content: center;
|
|
469
|
+
width: 36px;
|
|
470
|
+
height: 36px;
|
|
471
|
+
margin: -18px 0 0 -18px;
|
|
472
|
+
border-radius: 50%;
|
|
473
|
+
background: rgba(0, 0, 0, 0.55);
|
|
474
|
+
color: #fff;
|
|
475
|
+
font-size: 16px;
|
|
476
|
+
pointer-events: none;
|
|
332
477
|
}
|
|
333
478
|
.skopon-resume-select-card:not(.skopon-resume-select-card--profile) {
|
|
334
479
|
flex-direction: row;
|
|
@@ -342,7 +487,6 @@
|
|
|
342
487
|
}
|
|
343
488
|
.skopon-resume-select-card--selected {
|
|
344
489
|
border-color: var(--color-primary, #208368);
|
|
345
|
-
background: color-mix(in srgb, var(--color-primary, #208368) 8%, transparent);
|
|
346
490
|
}
|
|
347
491
|
.skopon-resume-select-card:disabled {
|
|
348
492
|
cursor: not-allowed;
|
|
@@ -352,7 +496,8 @@
|
|
|
352
496
|
flex-shrink: 0;
|
|
353
497
|
}
|
|
354
498
|
.skopon-resume-select-card--profile .skopon-resume-select-card-avatar {
|
|
355
|
-
margin
|
|
499
|
+
margin: 0;
|
|
500
|
+
flex-shrink: 0;
|
|
356
501
|
}
|
|
357
502
|
.skopon-resume-select-card-name {
|
|
358
503
|
font-weight: 600;
|
package/src/types/index.ts
CHANGED
|
@@ -99,13 +99,32 @@ export interface FormBlockCondition {
|
|
|
99
99
|
/** 简历多选组件:渲染时用于 /univ/resume/search 的筛选条件 */
|
|
100
100
|
export interface FormResumeFilter {
|
|
101
101
|
names?: string[]
|
|
102
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* 智能体类型 unique_id。
|
|
104
|
+
* 运行时作为 agent_type:先找出该类型的智能体,再查他们的简历。
|
|
105
|
+
*/
|
|
103
106
|
agentKind?: string
|
|
104
107
|
agentUniqueIds?: string[]
|
|
108
|
+
/** 智能体标签 unique_id,多值 AND;与 agentKind 一起定位智能体后再查简历 */
|
|
109
|
+
tagUniqueIds?: string[]
|
|
105
110
|
resumeUniqueIds?: string[]
|
|
106
111
|
pageSize?: number
|
|
107
112
|
}
|
|
108
113
|
|
|
114
|
+
/** 内容制作搜索:渲染时用于 /univ/flow/list?owner_scope=content */
|
|
115
|
+
export interface FormContentFilter {
|
|
116
|
+
/** 流程类型 unique_id,默认 content-production */
|
|
117
|
+
flowType?: string
|
|
118
|
+
/** 流程类别 unique_id */
|
|
119
|
+
category?: string
|
|
120
|
+
/** 内容标签 unique_id */
|
|
121
|
+
tagUniqueIds?: string[]
|
|
122
|
+
/** 多标签匹配方式;all=全部命中,any=命中任一 */
|
|
123
|
+
tagMatch?: 'all' | 'any'
|
|
124
|
+
/** 每次向内容接口请求的条数,不是一屏展示张数 */
|
|
125
|
+
pageSize?: number
|
|
126
|
+
}
|
|
127
|
+
|
|
109
128
|
/** 案例多选组件:渲染时用于 /univ/case/list 的筛选条件 */
|
|
110
129
|
export interface FormCaseFilter {
|
|
111
130
|
/** Agent 类型(编辑器辅助,运行时不用) */
|
|
@@ -142,6 +161,10 @@ export interface FormBlock {
|
|
|
142
161
|
filePlaceholderIcon?: FormFilePlaceholderIcon
|
|
143
162
|
fileMinCount?: number
|
|
144
163
|
fileMaxCount?: number
|
|
164
|
+
/** 上传素材的示例图,仅展示,不参与提交。 */
|
|
165
|
+
fileExampleUrls?: string[]
|
|
166
|
+
/** 制作模板的逐字段审核标准;由工作流读取,不能使用提交值覆盖。 */
|
|
167
|
+
fileReviewCriteria?: string
|
|
145
168
|
defaultValue?: string | string[] | boolean
|
|
146
169
|
/** 派生 JSON Schema 时写入 property.$comment */
|
|
147
170
|
jsonSchemaDescription?: string
|
|
@@ -155,8 +178,14 @@ export interface FormBlock {
|
|
|
155
178
|
resumeMinCount?: number
|
|
156
179
|
/** 简历多选:最多选中数量,配置值 ≥ 1 */
|
|
157
180
|
resumeMaxCount?: number
|
|
181
|
+
/** 简历多选:一轮展示几张,默认 5。不是最多可选数,也不是接口 page_size */
|
|
182
|
+
/** content-only 仅选内容,提交 flow_unique_id;默认仍为简历与内容组合。 */
|
|
183
|
+
resumeDisplayMode?: 'profile-content' | 'content-only'
|
|
184
|
+
resumeDisplayCount?: number
|
|
158
185
|
/** 简历多选:列表筛选条件(持久化进 block json) */
|
|
159
186
|
resumeFilter?: FormResumeFilter
|
|
187
|
+
/** 简历多选:内容制作筛选(持久化进 block json) */
|
|
188
|
+
contentFilter?: FormContentFilter
|
|
160
189
|
/** 案例单选:是否显示「换一批」 */
|
|
161
190
|
caseEnableRefresh?: boolean
|
|
162
191
|
/** 案例多选:最少选中数量,配置值 ≥ 1 */
|