@uipath/apollo-wind 2.62.0 → 2.64.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/components/forms/aria-ids.cjs +38 -0
- package/dist/components/forms/aria-ids.d.ts +2 -0
- package/dist/components/forms/aria-ids.js +4 -0
- package/dist/components/forms/demo-mocks.cjs +0 -448
- package/dist/components/forms/demo-mocks.js +0 -448
- package/dist/components/forms/field-control.cjs +21 -17
- package/dist/components/forms/field-control.d.ts +3 -1
- package/dist/components/forms/field-control.js +21 -17
- package/dist/components/forms/field-renderer.cjs +65 -37
- package/dist/components/forms/field-renderer.js +66 -38
- package/dist/components/forms/form-designer.cjs +204 -3
- package/dist/components/forms/form-designer.js +204 -3
- package/dist/components/forms/form-examples.cjs +3 -190
- package/dist/components/forms/form-examples.d.ts +0 -10
- package/dist/components/forms/form-examples.js +3 -184
- package/dist/components/forms/form-schema.d.ts +6 -0
- package/dist/components/forms/metadata-form.cjs +9 -1
- package/dist/components/forms/metadata-form.d.ts +8 -1
- package/dist/components/forms/metadata-form.js +9 -1
- package/dist/components/forms/mode-aware-field.cjs +11 -6
- package/dist/components/forms/mode-aware-field.d.ts +2 -0
- package/dist/components/forms/mode-aware-field.js +11 -6
- package/dist/components/forms/string-list-field.cjs +5 -4
- package/dist/components/forms/string-list-field.d.ts +4 -2
- package/dist/components/forms/string-list-field.js +5 -4
- package/dist/components/ui/folder-picker/components/folder-breadcrumb.cjs +72 -0
- package/dist/components/ui/folder-picker/components/folder-breadcrumb.d.ts +14 -0
- package/dist/components/ui/folder-picker/components/folder-breadcrumb.js +38 -0
- package/dist/components/ui/folder-picker/components/folder-picker-empty-state.cjs +75 -0
- package/dist/components/ui/folder-picker/components/folder-picker-empty-state.d.ts +26 -0
- package/dist/components/ui/folder-picker/components/folder-picker-empty-state.js +41 -0
- package/dist/components/ui/folder-picker/components/folder-picker-footer.cjs +70 -0
- package/dist/components/ui/folder-picker/components/folder-picker-footer.d.ts +20 -0
- package/dist/components/ui/folder-picker/components/folder-picker-footer.js +36 -0
- package/dist/components/ui/folder-picker/components/folder-picker-search.cjs +79 -0
- package/dist/components/ui/folder-picker/components/folder-picker-search.d.ts +14 -0
- package/dist/components/ui/folder-picker/components/folder-picker-search.js +45 -0
- package/dist/components/ui/folder-picker/components/folder-row.cjs +107 -0
- package/dist/components/ui/folder-picker/components/folder-row.d.ts +27 -0
- package/dist/components/ui/folder-picker/components/folder-row.js +73 -0
- package/dist/components/ui/folder-picker/folder-picker.cjs +465 -0
- package/dist/components/ui/folder-picker/folder-picker.d.ts +34 -0
- package/dist/components/ui/folder-picker/folder-picker.js +425 -0
- package/dist/components/ui/folder-picker/index.cjs +42 -0
- package/dist/components/ui/folder-picker/index.d.ts +2 -0
- package/dist/components/ui/folder-picker/index.js +2 -0
- package/dist/components/ui/folder-picker/types.cjs +44 -0
- package/dist/components/ui/folder-picker/types.d.ts +97 -0
- package/dist/components/ui/folder-picker/types.js +4 -0
- package/dist/components/ui/index.cjs +26 -26
- package/dist/components/ui/json-tree-view/JsonTree.types.d.ts +13 -0
- package/dist/components/ui/json-tree-view/JsonTreeRow.cjs +2 -1
- package/dist/components/ui/json-tree-view/JsonTreeRow.js +2 -1
- package/dist/components/ui/json-tree-view/JsonTypeBadge.cjs +43 -6
- package/dist/components/ui/json-tree-view/JsonTypeBadge.d.ts +6 -3
- package/dist/components/ui/json-tree-view/JsonTypeBadge.js +44 -7
- package/dist/components/ui/json-tree-view/index.d.ts +1 -1
- package/dist/components/ui/json-tree-view/strings.cjs +1 -0
- package/dist/components/ui/json-tree-view/strings.d.ts +10 -2
- package/dist/components/ui/json-tree-view/strings.js +1 -0
- package/dist/components/ui/prompt-value-control.cjs +3 -1
- package/dist/components/ui/prompt-value-control.d.ts +5 -0
- package/dist/components/ui/prompt-value-control.js +3 -1
- package/dist/components/ui/variable-value-control.cjs +3 -1
- package/dist/components/ui/variable-value-control.d.ts +5 -0
- package/dist/components/ui/variable-value-control.js +3 -1
- package/dist/index.cjs +13 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/styles.css +41 -0
- package/package.json +1 -1
- package/dist/templates/Forms/form-builder-example.d.ts +0 -1
|
@@ -24,11 +24,9 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
27
|
+
multiStepSchema: ()=>multiStepSchema,
|
|
28
28
|
cascadingDropdownsSchema: ()=>cascadingDropdownsSchema,
|
|
29
29
|
fileUploadSchema: ()=>fileUploadSchema,
|
|
30
|
-
computedFieldsSchema: ()=>computedFieldsSchema,
|
|
31
|
-
multiStepSchema: ()=>multiStepSchema,
|
|
32
30
|
conditionalQuestionsSchema: ()=>conditionalQuestionsSchema,
|
|
33
31
|
conditionalSectionsSchema: ()=>conditionalSectionsSchema,
|
|
34
32
|
FileUploadExample: ()=>FileUploadExample
|
|
@@ -36,10 +34,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
36
34
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
37
35
|
const external_react_namespaceObject = require("react");
|
|
38
36
|
const external_sonner_namespaceObject = require("sonner");
|
|
37
|
+
const badge_cjs_namespaceObject = require("../ui/badge.cjs");
|
|
38
|
+
const card_cjs_namespaceObject = require("../ui/card.cjs");
|
|
39
39
|
const external_metadata_form_cjs_namespaceObject = require("./metadata-form.cjs");
|
|
40
40
|
const external_rules_engine_cjs_namespaceObject = require("./rules-engine.cjs");
|
|
41
|
-
const card_cjs_namespaceObject = require("../ui/card.cjs");
|
|
42
|
-
const badge_cjs_namespaceObject = require("../ui/badge.cjs");
|
|
43
41
|
const cascadingDropdownsSchema = {
|
|
44
42
|
id: 'user-registration',
|
|
45
43
|
title: 'User Registration',
|
|
@@ -137,86 +135,6 @@ const cascadingDropdownsSchema = {
|
|
|
137
135
|
}
|
|
138
136
|
]
|
|
139
137
|
};
|
|
140
|
-
const computedFieldsSchema = {
|
|
141
|
-
id: 'product-configurator',
|
|
142
|
-
title: 'Product Configuration',
|
|
143
|
-
description: 'Customize your product',
|
|
144
|
-
sections: [
|
|
145
|
-
{
|
|
146
|
-
id: 'product-selection',
|
|
147
|
-
title: 'Select Your Product',
|
|
148
|
-
fields: [
|
|
149
|
-
{
|
|
150
|
-
name: 'category',
|
|
151
|
-
type: 'select',
|
|
152
|
-
label: 'Product Category',
|
|
153
|
-
dataSource: {
|
|
154
|
-
type: 'fetch',
|
|
155
|
-
url: '/api/product-categories',
|
|
156
|
-
method: 'GET',
|
|
157
|
-
transform: 'data.categories.map(c => ({ label: c.name, value: c.id }))'
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
name: 'product',
|
|
162
|
-
type: 'select',
|
|
163
|
-
label: 'Select Product',
|
|
164
|
-
dataSource: {
|
|
165
|
-
type: 'remote',
|
|
166
|
-
endpoint: '/api/products',
|
|
167
|
-
params: {
|
|
168
|
-
categoryId: '$category'
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
rules: [
|
|
172
|
-
new external_rules_engine_cjs_namespaceObject.RuleBuilder('show-product-when-category-selected').when('category').isNot('').show().require().build()
|
|
173
|
-
]
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
name: 'variant',
|
|
177
|
-
type: 'select',
|
|
178
|
-
label: 'Product Variant (includes price)',
|
|
179
|
-
dataSource: {
|
|
180
|
-
type: 'remote',
|
|
181
|
-
endpoint: '/api/product-variants',
|
|
182
|
-
params: {
|
|
183
|
-
productId: '$product'
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
rules: [
|
|
187
|
-
new external_rules_engine_cjs_namespaceObject.RuleBuilder('show-variant-when-product-selected').when('product').isNot('').show().require().build()
|
|
188
|
-
]
|
|
189
|
-
}
|
|
190
|
-
]
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
id: 'order',
|
|
194
|
-
title: 'Order Details',
|
|
195
|
-
fields: [
|
|
196
|
-
{
|
|
197
|
-
name: 'quantity',
|
|
198
|
-
type: 'number',
|
|
199
|
-
label: 'Quantity',
|
|
200
|
-
placeholder: '1',
|
|
201
|
-
min: 1,
|
|
202
|
-
max: 100,
|
|
203
|
-
defaultValue: 1,
|
|
204
|
-
validation: {
|
|
205
|
-
required: true,
|
|
206
|
-
min: 1,
|
|
207
|
-
max: 100
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
name: 'notes',
|
|
212
|
-
type: 'textarea',
|
|
213
|
-
label: 'Order Notes',
|
|
214
|
-
placeholder: 'Any special instructions...'
|
|
215
|
-
}
|
|
216
|
-
]
|
|
217
|
-
}
|
|
218
|
-
]
|
|
219
|
-
};
|
|
220
138
|
const conditionalSectionsSchema = {
|
|
221
139
|
id: 'job-application',
|
|
222
140
|
title: 'Job Application',
|
|
@@ -473,107 +391,6 @@ const conditionalQuestionsSchema = {
|
|
|
473
391
|
}
|
|
474
392
|
]
|
|
475
393
|
};
|
|
476
|
-
const automationJobSchema = {
|
|
477
|
-
id: 'automation-job-config',
|
|
478
|
-
title: 'Configure Automation Job',
|
|
479
|
-
description: 'Set up an automation process execution',
|
|
480
|
-
sections: [
|
|
481
|
-
{
|
|
482
|
-
id: 'process',
|
|
483
|
-
title: 'Process Selection',
|
|
484
|
-
fields: [
|
|
485
|
-
{
|
|
486
|
-
name: 'folder',
|
|
487
|
-
type: 'select',
|
|
488
|
-
label: 'Orchestrator Folder',
|
|
489
|
-
dataSource: {
|
|
490
|
-
type: 'fetch',
|
|
491
|
-
url: '/api/orchestrator/folders',
|
|
492
|
-
method: 'GET',
|
|
493
|
-
transform: 'data.value.map(f => ({ label: f.DisplayName, value: f.Id }))'
|
|
494
|
-
}
|
|
495
|
-
},
|
|
496
|
-
{
|
|
497
|
-
name: 'process',
|
|
498
|
-
type: 'select',
|
|
499
|
-
label: 'Process Package',
|
|
500
|
-
dataSource: {
|
|
501
|
-
type: 'remote',
|
|
502
|
-
endpoint: '/api/orchestrator/processes',
|
|
503
|
-
params: {
|
|
504
|
-
folderId: '$folder'
|
|
505
|
-
}
|
|
506
|
-
},
|
|
507
|
-
rules: [
|
|
508
|
-
new external_rules_engine_cjs_namespaceObject.RuleBuilder('show-process').when('folder').isNot('').show().require().build()
|
|
509
|
-
]
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
name: 'version',
|
|
513
|
-
type: 'select',
|
|
514
|
-
label: 'Package Version',
|
|
515
|
-
dataSource: {
|
|
516
|
-
type: 'remote',
|
|
517
|
-
endpoint: '/api/orchestrator/package-versions',
|
|
518
|
-
params: {
|
|
519
|
-
processKey: '$process'
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
rules: [
|
|
523
|
-
new external_rules_engine_cjs_namespaceObject.RuleBuilder('show-version').when('process').isNot('').show().require().build()
|
|
524
|
-
]
|
|
525
|
-
}
|
|
526
|
-
]
|
|
527
|
-
},
|
|
528
|
-
{
|
|
529
|
-
id: 'execution',
|
|
530
|
-
title: 'Execution Settings',
|
|
531
|
-
fields: [
|
|
532
|
-
{
|
|
533
|
-
name: 'robot',
|
|
534
|
-
type: 'select',
|
|
535
|
-
label: 'Robot',
|
|
536
|
-
dataSource: {
|
|
537
|
-
type: 'remote',
|
|
538
|
-
endpoint: '/api/orchestrator/robots',
|
|
539
|
-
params: {
|
|
540
|
-
folderId: '$folder'
|
|
541
|
-
}
|
|
542
|
-
},
|
|
543
|
-
rules: [
|
|
544
|
-
new external_rules_engine_cjs_namespaceObject.RuleBuilder('show-robot').when('folder').isNot('').show().require().build()
|
|
545
|
-
]
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
name: 'priority',
|
|
549
|
-
type: 'select',
|
|
550
|
-
label: 'Priority',
|
|
551
|
-
options: [
|
|
552
|
-
{
|
|
553
|
-
label: 'Low',
|
|
554
|
-
value: 'Low'
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
label: 'Normal',
|
|
558
|
-
value: 'Normal'
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
label: 'High',
|
|
562
|
-
value: 'High'
|
|
563
|
-
}
|
|
564
|
-
],
|
|
565
|
-
defaultValue: 'Normal'
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
name: 'inputArguments',
|
|
569
|
-
type: 'textarea',
|
|
570
|
-
label: 'Input Arguments (JSON)',
|
|
571
|
-
placeholder: '{"argument1": "value1"}'
|
|
572
|
-
}
|
|
573
|
-
]
|
|
574
|
-
}
|
|
575
|
-
]
|
|
576
|
-
};
|
|
577
394
|
const multiStepSchema = {
|
|
578
395
|
id: 'user-onboarding',
|
|
579
396
|
title: "Welcome! Let's set up your account",
|
|
@@ -940,18 +757,14 @@ function FileUploadExample() {
|
|
|
940
757
|
});
|
|
941
758
|
}
|
|
942
759
|
exports.FileUploadExample = __webpack_exports__.FileUploadExample;
|
|
943
|
-
exports.automationJobSchema = __webpack_exports__.automationJobSchema;
|
|
944
760
|
exports.cascadingDropdownsSchema = __webpack_exports__.cascadingDropdownsSchema;
|
|
945
|
-
exports.computedFieldsSchema = __webpack_exports__.computedFieldsSchema;
|
|
946
761
|
exports.conditionalQuestionsSchema = __webpack_exports__.conditionalQuestionsSchema;
|
|
947
762
|
exports.conditionalSectionsSchema = __webpack_exports__.conditionalSectionsSchema;
|
|
948
763
|
exports.fileUploadSchema = __webpack_exports__.fileUploadSchema;
|
|
949
764
|
exports.multiStepSchema = __webpack_exports__.multiStepSchema;
|
|
950
765
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
951
766
|
"FileUploadExample",
|
|
952
|
-
"automationJobSchema",
|
|
953
767
|
"cascadingDropdownsSchema",
|
|
954
|
-
"computedFieldsSchema",
|
|
955
768
|
"conditionalQuestionsSchema",
|
|
956
769
|
"conditionalSectionsSchema",
|
|
957
770
|
"fileUploadSchema",
|
|
@@ -13,11 +13,6 @@ import type { FormSchema } from './form-schema';
|
|
|
13
13
|
* Country -> State -> City selection with remote data fetching.
|
|
14
14
|
*/
|
|
15
15
|
export declare const cascadingDropdownsSchema: FormSchema;
|
|
16
|
-
/**
|
|
17
|
-
* Demonstrates cascading product selection.
|
|
18
|
-
* Category -> Product -> Variant with pricing shown in variant label.
|
|
19
|
-
*/
|
|
20
|
-
export declare const computedFieldsSchema: FormSchema;
|
|
21
16
|
/**
|
|
22
17
|
* Demonstrates conditional sections and multi-select fields.
|
|
23
18
|
* Shows different fields based on experience level.
|
|
@@ -28,11 +23,6 @@ export declare const conditionalSectionsSchema: FormSchema;
|
|
|
28
23
|
* Shows follow-up questions based on ratings.
|
|
29
24
|
*/
|
|
30
25
|
export declare const conditionalQuestionsSchema: FormSchema;
|
|
31
|
-
/**
|
|
32
|
-
* Demonstrates UiPath Orchestrator-style cascading selection.
|
|
33
|
-
* Folder -> Process -> Version -> Robot selection.
|
|
34
|
-
*/
|
|
35
|
-
export declare const automationJobSchema: FormSchema;
|
|
36
26
|
/**
|
|
37
27
|
* Demonstrates multi-step form wizard pattern.
|
|
38
28
|
* Step-by-step user onboarding with data pre-loading.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { toast } from "sonner";
|
|
4
|
+
import { Badge } from "../ui/badge.js";
|
|
5
|
+
import { Card, CardContent, CardHeader, CardTitle } from "../ui/card.js";
|
|
4
6
|
import { MetadataForm } from "./metadata-form.js";
|
|
5
7
|
import { RuleBuilder } from "./rules-engine.js";
|
|
6
|
-
import { Card, CardContent, CardHeader, CardTitle } from "../ui/card.js";
|
|
7
|
-
import { Badge } from "../ui/badge.js";
|
|
8
8
|
const cascadingDropdownsSchema = {
|
|
9
9
|
id: 'user-registration',
|
|
10
10
|
title: 'User Registration',
|
|
@@ -102,86 +102,6 @@ const cascadingDropdownsSchema = {
|
|
|
102
102
|
}
|
|
103
103
|
]
|
|
104
104
|
};
|
|
105
|
-
const computedFieldsSchema = {
|
|
106
|
-
id: 'product-configurator',
|
|
107
|
-
title: 'Product Configuration',
|
|
108
|
-
description: 'Customize your product',
|
|
109
|
-
sections: [
|
|
110
|
-
{
|
|
111
|
-
id: 'product-selection',
|
|
112
|
-
title: 'Select Your Product',
|
|
113
|
-
fields: [
|
|
114
|
-
{
|
|
115
|
-
name: 'category',
|
|
116
|
-
type: 'select',
|
|
117
|
-
label: 'Product Category',
|
|
118
|
-
dataSource: {
|
|
119
|
-
type: 'fetch',
|
|
120
|
-
url: '/api/product-categories',
|
|
121
|
-
method: 'GET',
|
|
122
|
-
transform: 'data.categories.map(c => ({ label: c.name, value: c.id }))'
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: 'product',
|
|
127
|
-
type: 'select',
|
|
128
|
-
label: 'Select Product',
|
|
129
|
-
dataSource: {
|
|
130
|
-
type: 'remote',
|
|
131
|
-
endpoint: '/api/products',
|
|
132
|
-
params: {
|
|
133
|
-
categoryId: '$category'
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
rules: [
|
|
137
|
-
new RuleBuilder('show-product-when-category-selected').when('category').isNot('').show().require().build()
|
|
138
|
-
]
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
name: 'variant',
|
|
142
|
-
type: 'select',
|
|
143
|
-
label: 'Product Variant (includes price)',
|
|
144
|
-
dataSource: {
|
|
145
|
-
type: 'remote',
|
|
146
|
-
endpoint: '/api/product-variants',
|
|
147
|
-
params: {
|
|
148
|
-
productId: '$product'
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
rules: [
|
|
152
|
-
new RuleBuilder('show-variant-when-product-selected').when('product').isNot('').show().require().build()
|
|
153
|
-
]
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
id: 'order',
|
|
159
|
-
title: 'Order Details',
|
|
160
|
-
fields: [
|
|
161
|
-
{
|
|
162
|
-
name: 'quantity',
|
|
163
|
-
type: 'number',
|
|
164
|
-
label: 'Quantity',
|
|
165
|
-
placeholder: '1',
|
|
166
|
-
min: 1,
|
|
167
|
-
max: 100,
|
|
168
|
-
defaultValue: 1,
|
|
169
|
-
validation: {
|
|
170
|
-
required: true,
|
|
171
|
-
min: 1,
|
|
172
|
-
max: 100
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
name: 'notes',
|
|
177
|
-
type: 'textarea',
|
|
178
|
-
label: 'Order Notes',
|
|
179
|
-
placeholder: 'Any special instructions...'
|
|
180
|
-
}
|
|
181
|
-
]
|
|
182
|
-
}
|
|
183
|
-
]
|
|
184
|
-
};
|
|
185
105
|
const conditionalSectionsSchema = {
|
|
186
106
|
id: 'job-application',
|
|
187
107
|
title: 'Job Application',
|
|
@@ -438,107 +358,6 @@ const conditionalQuestionsSchema = {
|
|
|
438
358
|
}
|
|
439
359
|
]
|
|
440
360
|
};
|
|
441
|
-
const automationJobSchema = {
|
|
442
|
-
id: 'automation-job-config',
|
|
443
|
-
title: 'Configure Automation Job',
|
|
444
|
-
description: 'Set up an automation process execution',
|
|
445
|
-
sections: [
|
|
446
|
-
{
|
|
447
|
-
id: 'process',
|
|
448
|
-
title: 'Process Selection',
|
|
449
|
-
fields: [
|
|
450
|
-
{
|
|
451
|
-
name: 'folder',
|
|
452
|
-
type: 'select',
|
|
453
|
-
label: 'Orchestrator Folder',
|
|
454
|
-
dataSource: {
|
|
455
|
-
type: 'fetch',
|
|
456
|
-
url: '/api/orchestrator/folders',
|
|
457
|
-
method: 'GET',
|
|
458
|
-
transform: 'data.value.map(f => ({ label: f.DisplayName, value: f.Id }))'
|
|
459
|
-
}
|
|
460
|
-
},
|
|
461
|
-
{
|
|
462
|
-
name: 'process',
|
|
463
|
-
type: 'select',
|
|
464
|
-
label: 'Process Package',
|
|
465
|
-
dataSource: {
|
|
466
|
-
type: 'remote',
|
|
467
|
-
endpoint: '/api/orchestrator/processes',
|
|
468
|
-
params: {
|
|
469
|
-
folderId: '$folder'
|
|
470
|
-
}
|
|
471
|
-
},
|
|
472
|
-
rules: [
|
|
473
|
-
new RuleBuilder('show-process').when('folder').isNot('').show().require().build()
|
|
474
|
-
]
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
name: 'version',
|
|
478
|
-
type: 'select',
|
|
479
|
-
label: 'Package Version',
|
|
480
|
-
dataSource: {
|
|
481
|
-
type: 'remote',
|
|
482
|
-
endpoint: '/api/orchestrator/package-versions',
|
|
483
|
-
params: {
|
|
484
|
-
processKey: '$process'
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
rules: [
|
|
488
|
-
new RuleBuilder('show-version').when('process').isNot('').show().require().build()
|
|
489
|
-
]
|
|
490
|
-
}
|
|
491
|
-
]
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
id: 'execution',
|
|
495
|
-
title: 'Execution Settings',
|
|
496
|
-
fields: [
|
|
497
|
-
{
|
|
498
|
-
name: 'robot',
|
|
499
|
-
type: 'select',
|
|
500
|
-
label: 'Robot',
|
|
501
|
-
dataSource: {
|
|
502
|
-
type: 'remote',
|
|
503
|
-
endpoint: '/api/orchestrator/robots',
|
|
504
|
-
params: {
|
|
505
|
-
folderId: '$folder'
|
|
506
|
-
}
|
|
507
|
-
},
|
|
508
|
-
rules: [
|
|
509
|
-
new RuleBuilder('show-robot').when('folder').isNot('').show().require().build()
|
|
510
|
-
]
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
name: 'priority',
|
|
514
|
-
type: 'select',
|
|
515
|
-
label: 'Priority',
|
|
516
|
-
options: [
|
|
517
|
-
{
|
|
518
|
-
label: 'Low',
|
|
519
|
-
value: 'Low'
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
label: 'Normal',
|
|
523
|
-
value: 'Normal'
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
label: 'High',
|
|
527
|
-
value: 'High'
|
|
528
|
-
}
|
|
529
|
-
],
|
|
530
|
-
defaultValue: 'Normal'
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
name: 'inputArguments',
|
|
534
|
-
type: 'textarea',
|
|
535
|
-
label: 'Input Arguments (JSON)',
|
|
536
|
-
placeholder: '{"argument1": "value1"}'
|
|
537
|
-
}
|
|
538
|
-
]
|
|
539
|
-
}
|
|
540
|
-
]
|
|
541
|
-
};
|
|
542
361
|
const multiStepSchema = {
|
|
543
362
|
id: 'user-onboarding',
|
|
544
363
|
title: "Welcome! Let's set up your account",
|
|
@@ -904,4 +723,4 @@ function FileUploadExample() {
|
|
|
904
723
|
]
|
|
905
724
|
});
|
|
906
725
|
}
|
|
907
|
-
export { FileUploadExample,
|
|
726
|
+
export { FileUploadExample, cascadingDropdownsSchema, conditionalQuestionsSchema, conditionalSectionsSchema, fileUploadSchema, multiStepSchema };
|
|
@@ -445,6 +445,8 @@ export interface CustomFieldComponentProps {
|
|
|
445
445
|
controlRef?: React.Ref<ValueModeControlHandle>;
|
|
446
446
|
/** In the field anatomy: the label's id, for a component registered with `labelTarget: 'labelledby'`. */
|
|
447
447
|
labelId?: string;
|
|
448
|
+
/** Id of the changed-field note while the field is flagged; put it on the focusable control. */
|
|
449
|
+
'aria-describedby'?: string;
|
|
448
450
|
[key: string]: unknown;
|
|
449
451
|
}
|
|
450
452
|
/** Custom components by name, each bare or with its geometry inside the field anatomy. */
|
|
@@ -457,6 +459,10 @@ export interface FormContext<T extends FieldValues = FieldValues> {
|
|
|
457
459
|
isSubmitting: boolean;
|
|
458
460
|
isDirty: boolean;
|
|
459
461
|
currentStep?: number;
|
|
462
|
+
/** Names of fields to flag as changed (see `MetadataFormProps.changedFields`). */
|
|
463
|
+
changedFields?: ReadonlySet<string>;
|
|
464
|
+
/** Screen-reader text announced on a changed field. */
|
|
465
|
+
changedFieldLabel?: string;
|
|
460
466
|
evaluateConditions: (conditions: FieldCondition[]) => boolean;
|
|
461
467
|
fetchData: (source: DataSource) => Promise<FieldOption[]>;
|
|
462
468
|
registerCustomComponent: (name: string, component: React.ComponentType<CustomFieldComponentProps>) => void;
|
|
@@ -56,7 +56,7 @@ const external_rules_engine_cjs_namespaceObject = require("./rules-engine.cjs");
|
|
|
56
56
|
const external_validation_converter_cjs_namespaceObject = require("./validation-converter.cjs");
|
|
57
57
|
const external_value_modes_cjs_namespaceObject = require("./value-modes.cjs");
|
|
58
58
|
const DEFAULT_PLUGINS = [];
|
|
59
|
-
function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete, stepVariant = 'wizard', sectionVariant = 'card', activeStepId, onActiveStepChange, container = 'form' }) {
|
|
59
|
+
function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete, stepVariant = 'wizard', sectionVariant = 'card', activeStepId, onActiveStepChange, container = 'form', changedFields, changedFieldLabel }) {
|
|
60
60
|
const [currentStep, setCurrentStep] = (0, external_react_namespaceObject.useState)(0);
|
|
61
61
|
const [customComponents, setCustomComponents] = (0, external_react_namespaceObject.useState)({});
|
|
62
62
|
const [isInitialized, setIsInitialized] = (0, external_react_namespaceObject.useState)(false);
|
|
@@ -121,11 +121,17 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
|
|
|
121
121
|
pluginsRef.current = plugins;
|
|
122
122
|
const onSubmitRef = (0, external_react_namespaceObject.useRef)(onSubmit);
|
|
123
123
|
onSubmitRef.current = onSubmit;
|
|
124
|
+
const changedFieldsKey = changedFields?.join('\0') ?? '';
|
|
125
|
+
const changedFieldSet = (0, external_react_namespaceObject.useMemo)(()=>changedFieldsKey ? new Set(changedFieldsKey.split('\0')) : void 0, [
|
|
126
|
+
changedFieldsKey
|
|
127
|
+
]);
|
|
124
128
|
const context = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
125
129
|
const readValues = (values)=>(0, external_value_modes_cjs_namespaceObject.literalValues)(values, stableSchema, valueModeRegistry.codecs);
|
|
126
130
|
return {
|
|
127
131
|
schema: stableSchema,
|
|
128
132
|
form,
|
|
133
|
+
changedFields: changedFieldSet,
|
|
134
|
+
changedFieldLabel,
|
|
129
135
|
get values () {
|
|
130
136
|
return valuesRef.current;
|
|
131
137
|
},
|
|
@@ -159,6 +165,8 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
|
|
|
159
165
|
stableSchema,
|
|
160
166
|
form,
|
|
161
167
|
currentStep,
|
|
168
|
+
changedFieldSet,
|
|
169
|
+
changedFieldLabel,
|
|
162
170
|
valueModeRegistry,
|
|
163
171
|
fieldActionRegistry,
|
|
164
172
|
formStrings,
|
|
@@ -56,5 +56,12 @@ export interface MetadataFormProps {
|
|
|
56
56
|
* Suppressing the action row is the schema's job, not this prop's: pass `actions: []`.
|
|
57
57
|
*/
|
|
58
58
|
container?: 'form' | 'div';
|
|
59
|
+
/**
|
|
60
|
+
* Names of fields (matching `field.name`) to flag as changed, e.g. after an agent edit.
|
|
61
|
+
* Each gets an accent and a screen-reader label. Omit to flag none.
|
|
62
|
+
*/
|
|
63
|
+
changedFields?: readonly string[];
|
|
64
|
+
/** Screen-reader text for a changed field. Defaults to "Changed"; pass a translated string. */
|
|
65
|
+
changedFieldLabel?: string;
|
|
59
66
|
}
|
|
60
|
-
export declare function MetadataForm({ schema, plugins, onSubmit, className, disabled, autoComplete, stepVariant, sectionVariant, activeStepId, onActiveStepChange, container, }: MetadataFormProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
export declare function MetadataForm({ schema, plugins, onSubmit, className, disabled, autoComplete, stepVariant, sectionVariant, activeStepId, onActiveStepChange, container, changedFields, changedFieldLabel, }: MetadataFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,7 +17,7 @@ import { RulesEngine } from "./rules-engine.js";
|
|
|
17
17
|
import { modeAwareSchema, validationConfigToZod } from "./validation-converter.js";
|
|
18
18
|
import { buildValueModeRegistry, codecContext, isEmptyModeValue, literalValueOf, literalValues, resolveCodec } from "./value-modes.js";
|
|
19
19
|
const DEFAULT_PLUGINS = [];
|
|
20
|
-
function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete, stepVariant = 'wizard', sectionVariant = 'card', activeStepId, onActiveStepChange, container = 'form' }) {
|
|
20
|
+
function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete, stepVariant = 'wizard', sectionVariant = 'card', activeStepId, onActiveStepChange, container = 'form', changedFields, changedFieldLabel }) {
|
|
21
21
|
const [currentStep, setCurrentStep] = useState(0);
|
|
22
22
|
const [customComponents, setCustomComponents] = useState({});
|
|
23
23
|
const [isInitialized, setIsInitialized] = useState(false);
|
|
@@ -82,11 +82,17 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
|
|
|
82
82
|
pluginsRef.current = plugins;
|
|
83
83
|
const onSubmitRef = useRef(onSubmit);
|
|
84
84
|
onSubmitRef.current = onSubmit;
|
|
85
|
+
const changedFieldsKey = changedFields?.join('\0') ?? '';
|
|
86
|
+
const changedFieldSet = useMemo(()=>changedFieldsKey ? new Set(changedFieldsKey.split('\0')) : void 0, [
|
|
87
|
+
changedFieldsKey
|
|
88
|
+
]);
|
|
85
89
|
const context = useMemo(()=>{
|
|
86
90
|
const readValues = (values)=>literalValues(values, stableSchema, valueModeRegistry.codecs);
|
|
87
91
|
return {
|
|
88
92
|
schema: stableSchema,
|
|
89
93
|
form,
|
|
94
|
+
changedFields: changedFieldSet,
|
|
95
|
+
changedFieldLabel,
|
|
90
96
|
get values () {
|
|
91
97
|
return valuesRef.current;
|
|
92
98
|
},
|
|
@@ -120,6 +126,8 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
|
|
|
120
126
|
stableSchema,
|
|
121
127
|
form,
|
|
122
128
|
currentStep,
|
|
129
|
+
changedFieldSet,
|
|
130
|
+
changedFieldLabel,
|
|
123
131
|
valueModeRegistry,
|
|
124
132
|
fieldActionRegistry,
|
|
125
133
|
formStrings,
|
|
@@ -38,6 +38,7 @@ const input_cjs_namespaceObject = require("../ui/input.cjs");
|
|
|
38
38
|
const input_group_cjs_namespaceObject = require("../ui/input-group.cjs");
|
|
39
39
|
const prompt_value_control_cjs_namespaceObject = require("../ui/prompt-value-control.cjs");
|
|
40
40
|
const variable_value_control_cjs_namespaceObject = require("../ui/variable-value-control.cjs");
|
|
41
|
+
const external_aria_ids_cjs_namespaceObject = require("./aria-ids.cjs");
|
|
41
42
|
const external_field_actions_cjs_namespaceObject = require("./field-actions.cjs");
|
|
42
43
|
const external_field_control_cjs_namespaceObject = require("./field-control.cjs");
|
|
43
44
|
const external_form_strings_cjs_namespaceObject = require("./form-strings.cjs");
|
|
@@ -95,7 +96,7 @@ const TEXT_GEOMETRY = {
|
|
|
95
96
|
labelTarget: 'control',
|
|
96
97
|
insertable: true
|
|
97
98
|
};
|
|
98
|
-
function FieldAnatomy({ field, context, customComponents, disabled, required, options, formField, error }) {
|
|
99
|
+
function FieldAnatomy({ field, context, customComponents, disabled, required, options, formField, error, describedBy }) {
|
|
99
100
|
const form = (0, external_react_hook_form_namespaceObject.useFormContext)();
|
|
100
101
|
const registry = context.valueModes ?? external_value_modes_cjs_namespaceObject.DEFAULT_VALUE_MODE_REGISTRY;
|
|
101
102
|
const actionRegistry = context.fieldActions ?? external_field_actions_cjs_namespaceObject.DEFAULT_FIELD_ACTION_REGISTRY;
|
|
@@ -104,6 +105,7 @@ function FieldAnatomy({ field, context, customComponents, disabled, required, op
|
|
|
104
105
|
const { name } = field;
|
|
105
106
|
const errorId = `${name}-error`;
|
|
106
107
|
const labelId = `${name}-label`;
|
|
108
|
+
const controlDescribedBy = (0, external_aria_ids_cjs_namespaceObject.joinIds)(error && errorId, describedBy);
|
|
107
109
|
const formVariables = context.variables;
|
|
108
110
|
const variables = (0, external_react_namespaceObject.useCallback)(()=>(0, external_field_actions_cjs_namespaceObject.resolveVariables)(formVariables, field), [
|
|
109
111
|
formVariables,
|
|
@@ -263,6 +265,7 @@ function FieldAnatomy({ field, context, customComponents, disabled, required, op
|
|
|
263
265
|
required,
|
|
264
266
|
error,
|
|
265
267
|
errorId,
|
|
268
|
+
describedBy,
|
|
266
269
|
valueModeProps: ()=>({
|
|
267
270
|
value: inner,
|
|
268
271
|
onChange: (next)=>writeInner(next),
|
|
@@ -286,7 +289,7 @@ function FieldAnatomy({ field, context, customComponents, disabled, required, op
|
|
|
286
289
|
controlProps: {
|
|
287
290
|
'data-slot': 'input-group-control',
|
|
288
291
|
'aria-invalid': error ? true : void 0,
|
|
289
|
-
'aria-describedby':
|
|
292
|
+
'aria-describedby': controlDescribedBy,
|
|
290
293
|
'aria-errormessage': error ? errorId : void 0
|
|
291
294
|
}
|
|
292
295
|
})
|
|
@@ -520,7 +523,7 @@ function resolveControl(input) {
|
|
|
520
523
|
source: 'fallback'
|
|
521
524
|
};
|
|
522
525
|
}
|
|
523
|
-
function FallbackControl({ field, binding, disabled, error, errorId }) {
|
|
526
|
+
function FallbackControl({ field, binding, disabled, error, errorId, describedBy }) {
|
|
524
527
|
const { value } = binding;
|
|
525
528
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Input, {
|
|
526
529
|
id: field.name,
|
|
@@ -532,7 +535,7 @@ function FallbackControl({ field, binding, disabled, error, errorId }) {
|
|
|
532
535
|
placeholder: field.placeholder,
|
|
533
536
|
disabled: disabled,
|
|
534
537
|
"aria-invalid": error ? true : void 0,
|
|
535
|
-
"aria-describedby": error
|
|
538
|
+
"aria-describedby": (0, external_aria_ids_cjs_namespaceObject.joinIds)(error && errorId, describedBy),
|
|
536
539
|
"aria-errormessage": error ? errorId : void 0
|
|
537
540
|
});
|
|
538
541
|
}
|
|
@@ -561,7 +564,8 @@ function builtInLiteral(input) {
|
|
|
561
564
|
required: required,
|
|
562
565
|
error: error,
|
|
563
566
|
controlRef: input.controlRef,
|
|
564
|
-
labelId: input.labelId
|
|
567
|
+
labelId: input.labelId,
|
|
568
|
+
"aria-describedby": (0, external_aria_ids_cjs_namespaceObject.joinIds)(field.componentProps?.['aria-describedby'], input.describedBy)
|
|
565
569
|
}),
|
|
566
570
|
geometry: registrationGeometry(registration),
|
|
567
571
|
source: 'custom'
|
|
@@ -574,7 +578,8 @@ function builtInLiteral(input) {
|
|
|
574
578
|
options: options,
|
|
575
579
|
disabled: disabled,
|
|
576
580
|
invalid: !!error,
|
|
577
|
-
strings: strings.boolean
|
|
581
|
+
strings: strings.boolean,
|
|
582
|
+
describedBy: input.describedBy
|
|
578
583
|
}),
|
|
579
584
|
geometry: external_field_control_cjs_namespaceObject.FIELD_CONTROL_GEOMETRY[field.type] ?? unfittedGeometry(field),
|
|
580
585
|
source: 'field-type'
|
|
@@ -6,6 +6,8 @@ export interface ModeAwareFieldProps {
|
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
required: boolean;
|
|
8
8
|
options: FieldOption[];
|
|
9
|
+
/** Further ids for the control's aria-describedby, after the error message's. */
|
|
10
|
+
describedBy?: string;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* Renders a field with `valueModes`, `headerActions`, `menuActions` or `badge` as the field anatomy:
|