@bpmn-io/form-js-playground 1.7.0 → 1.7.1
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/form-playground.umd.js +178 -102
- package/package.json +4 -4
|
@@ -54112,7 +54112,8 @@
|
|
|
54112
54112
|
}
|
|
54113
54113
|
function Description$2(props) {
|
|
54114
54114
|
const {
|
|
54115
|
-
description
|
|
54115
|
+
description,
|
|
54116
|
+
id
|
|
54116
54117
|
} = props;
|
|
54117
54118
|
const evaluatedDescription = useSingleLineTemplateEvaluation(description || '', {
|
|
54118
54119
|
debug: true
|
|
@@ -54121,6 +54122,7 @@
|
|
|
54121
54122
|
return null;
|
|
54122
54123
|
}
|
|
54123
54124
|
return e("div", {
|
|
54125
|
+
id: id,
|
|
54124
54126
|
class: "fjs-form-field-description",
|
|
54125
54127
|
children: evaluatedDescription
|
|
54126
54128
|
});
|
|
@@ -54149,6 +54151,7 @@
|
|
|
54149
54151
|
function Label$3(props) {
|
|
54150
54152
|
const {
|
|
54151
54153
|
id,
|
|
54154
|
+
htmlFor,
|
|
54152
54155
|
label,
|
|
54153
54156
|
collapseOnEmpty = true,
|
|
54154
54157
|
required = false
|
|
@@ -54157,12 +54160,14 @@
|
|
|
54157
54160
|
debug: true
|
|
54158
54161
|
});
|
|
54159
54162
|
return e("label", {
|
|
54160
|
-
|
|
54163
|
+
id: id,
|
|
54164
|
+
for: htmlFor,
|
|
54161
54165
|
class: classNames('fjs-form-field-label', {
|
|
54162
54166
|
'fjs-incollapsible-label': !collapseOnEmpty
|
|
54163
54167
|
}, props['class']),
|
|
54164
54168
|
children: [props.children, evaluatedLabel, required && e("span", {
|
|
54165
54169
|
class: "fjs-asterix",
|
|
54170
|
+
"aria-hidden": true,
|
|
54166
54171
|
children: "*"
|
|
54167
54172
|
})]
|
|
54168
54173
|
});
|
|
@@ -54172,7 +54177,6 @@
|
|
|
54172
54177
|
const {
|
|
54173
54178
|
disabled,
|
|
54174
54179
|
errors = [],
|
|
54175
|
-
errorMessageId,
|
|
54176
54180
|
domId,
|
|
54177
54181
|
onBlur,
|
|
54178
54182
|
onFocus,
|
|
@@ -54196,6 +54200,8 @@
|
|
|
54196
54200
|
value: target.checked
|
|
54197
54201
|
});
|
|
54198
54202
|
};
|
|
54203
|
+
const descriptionId = `${domId}-description`;
|
|
54204
|
+
const errorMessageId = `${domId}-error-message`;
|
|
54199
54205
|
return e("div", {
|
|
54200
54206
|
class: classNames(formFieldClasses(type$f, {
|
|
54201
54207
|
errors,
|
|
@@ -54205,7 +54211,7 @@
|
|
|
54205
54211
|
'fjs-checked': value
|
|
54206
54212
|
}),
|
|
54207
54213
|
children: [e(Label$3, {
|
|
54208
|
-
|
|
54214
|
+
htmlFor: domId,
|
|
54209
54215
|
label: label,
|
|
54210
54216
|
required: required,
|
|
54211
54217
|
children: e("input", {
|
|
@@ -54218,13 +54224,16 @@
|
|
|
54218
54224
|
onChange: onChange,
|
|
54219
54225
|
onBlur: () => onBlur && onBlur(),
|
|
54220
54226
|
onFocus: () => onFocus && onFocus(),
|
|
54221
|
-
|
|
54227
|
+
required: required,
|
|
54228
|
+
"aria-invalid": errors.length > 0,
|
|
54229
|
+
"aria-describedby": [descriptionId, errorMessageId].join(' ')
|
|
54222
54230
|
})
|
|
54223
54231
|
}), e(Description$2, {
|
|
54232
|
+
id: descriptionId,
|
|
54224
54233
|
description: description
|
|
54225
54234
|
}), e(Errors, {
|
|
54226
|
-
|
|
54227
|
-
|
|
54235
|
+
id: errorMessageId,
|
|
54236
|
+
errors: errors
|
|
54228
54237
|
})]
|
|
54229
54238
|
});
|
|
54230
54239
|
}
|
|
@@ -54246,7 +54255,6 @@
|
|
|
54246
54255
|
const {
|
|
54247
54256
|
disabled,
|
|
54248
54257
|
errors = [],
|
|
54249
|
-
errorMessageId,
|
|
54250
54258
|
domId,
|
|
54251
54259
|
onBlur,
|
|
54252
54260
|
onFocus,
|
|
@@ -54293,6 +54301,8 @@
|
|
|
54293
54301
|
values,
|
|
54294
54302
|
onChange: props.onChange
|
|
54295
54303
|
});
|
|
54304
|
+
const descriptionId = `${domId}-description`;
|
|
54305
|
+
const errorMessageId = `${domId}-error-message`;
|
|
54296
54306
|
return e("div", {
|
|
54297
54307
|
class: classNames(formFieldClasses(type$e, {
|
|
54298
54308
|
errors,
|
|
@@ -54307,7 +54317,7 @@
|
|
|
54307
54317
|
const itemDomId = `${domId}-${index}`;
|
|
54308
54318
|
const isChecked = hasEqualValue(o.value, values);
|
|
54309
54319
|
return e(Label$3, {
|
|
54310
|
-
|
|
54320
|
+
htmlFor: itemDomId,
|
|
54311
54321
|
label: o.label,
|
|
54312
54322
|
class: classNames({
|
|
54313
54323
|
'fjs-checked': isChecked
|
|
@@ -54323,14 +54333,17 @@
|
|
|
54323
54333
|
onClick: () => toggleCheckbox(o.value),
|
|
54324
54334
|
onBlur: onCheckboxBlur,
|
|
54325
54335
|
onFocus: onCheckboxFocus,
|
|
54326
|
-
|
|
54336
|
+
required: required,
|
|
54337
|
+
"aria-invalid": errors.length > 0,
|
|
54338
|
+
"aria-describedby": [descriptionId, errorMessageId].join(' ')
|
|
54327
54339
|
})
|
|
54328
54340
|
});
|
|
54329
54341
|
}), e(Description$2, {
|
|
54342
|
+
id: descriptionId,
|
|
54330
54343
|
description: description
|
|
54331
54344
|
}), e(Errors, {
|
|
54332
|
-
|
|
54333
|
-
|
|
54345
|
+
id: errorMessageId,
|
|
54346
|
+
errors: errors
|
|
54334
54347
|
})]
|
|
54335
54348
|
});
|
|
54336
54349
|
}
|
|
@@ -54409,6 +54422,7 @@
|
|
|
54409
54422
|
}
|
|
54410
54423
|
}, [viewerCommands, field, initialValue, initialValidationTrigger, indexes]);
|
|
54411
54424
|
const onBlur = A$1(() => {
|
|
54425
|
+
const value = get$1(data, valuePath);
|
|
54412
54426
|
if (initialValidationTrigger) {
|
|
54413
54427
|
setInitialValidationTrigger(false);
|
|
54414
54428
|
viewerCommands.updateFieldValidation(field, value, indexes);
|
|
@@ -54416,7 +54430,7 @@
|
|
|
54416
54430
|
eventBus.fire('formField.blur', {
|
|
54417
54431
|
formField: field
|
|
54418
54432
|
});
|
|
54419
|
-
}, [eventBus, field, indexes,
|
|
54433
|
+
}, [eventBus, field, indexes, viewerCommands, initialValidationTrigger, data, valuePath]);
|
|
54420
54434
|
const onFocus = A$1(() => {
|
|
54421
54435
|
eventBus.fire('formField.focus', {
|
|
54422
54436
|
formField: field
|
|
@@ -54440,7 +54454,6 @@
|
|
|
54440
54454
|
}
|
|
54441
54455
|
const domId = `${prefixId$2(field.id, formId, indexes)}`;
|
|
54442
54456
|
const fieldErrors = get$1(errors, [field.id, ...Object.values(indexes || {})]) || [];
|
|
54443
|
-
const errorMessageId = errors.length === 0 ? undefined : `${domId}-error-message`;
|
|
54444
54457
|
return e(Column, {
|
|
54445
54458
|
field: field,
|
|
54446
54459
|
class: gridColumnClasses(field),
|
|
@@ -54451,7 +54464,6 @@
|
|
|
54451
54464
|
...props,
|
|
54452
54465
|
disabled: disabled,
|
|
54453
54466
|
errors: fieldErrors,
|
|
54454
|
-
errorMessageId: errorMessageId,
|
|
54455
54467
|
domId: domId,
|
|
54456
54468
|
onChange: disabled || readonly ? noop$1$1 : onChangeIndexed,
|
|
54457
54469
|
onBlur: disabled || readonly ? noop$1$1 : onBlur,
|
|
@@ -54862,7 +54874,7 @@
|
|
|
54862
54874
|
return e("div", {
|
|
54863
54875
|
class: "fjs-datetime-subsection",
|
|
54864
54876
|
children: [e(Label$3, {
|
|
54865
|
-
|
|
54877
|
+
htmlFor: domId,
|
|
54866
54878
|
label: label,
|
|
54867
54879
|
collapseOnEmpty: collapseLabelOnEmpty,
|
|
54868
54880
|
required: required
|
|
@@ -55144,7 +55156,7 @@
|
|
|
55144
55156
|
return e("div", {
|
|
55145
55157
|
class: "fjs-datetime-subsection",
|
|
55146
55158
|
children: [e(Label$3, {
|
|
55147
|
-
|
|
55159
|
+
htmlFor: domId,
|
|
55148
55160
|
label: label,
|
|
55149
55161
|
collapseOnEmpty: collapseLabelOnEmpty,
|
|
55150
55162
|
required: required
|
|
@@ -55331,6 +55343,7 @@
|
|
|
55331
55343
|
});
|
|
55332
55344
|
}, []);
|
|
55333
55345
|
const errorMessageId = allErrors.length === 0 ? undefined : `${prefixId$2(id, formId)}-error-message`;
|
|
55346
|
+
const descriptionId = `${prefixId$2(id, formId)}-description`;
|
|
55334
55347
|
const datePickerProps = {
|
|
55335
55348
|
label: dateLabel,
|
|
55336
55349
|
collapseLabelOnEmpty: !timeLabel,
|
|
@@ -55343,7 +55356,7 @@
|
|
|
55343
55356
|
date: dateTime.date,
|
|
55344
55357
|
readonly,
|
|
55345
55358
|
setDate,
|
|
55346
|
-
'aria-describedby': errorMessageId
|
|
55359
|
+
'aria-describedby': [descriptionId, errorMessageId].join(' ')
|
|
55347
55360
|
};
|
|
55348
55361
|
const timePickerProps = {
|
|
55349
55362
|
label: timeLabel,
|
|
@@ -55358,7 +55371,7 @@
|
|
|
55358
55371
|
timeInterval,
|
|
55359
55372
|
time: dateTime.time,
|
|
55360
55373
|
setTime,
|
|
55361
|
-
'aria-describedby': errorMessageId
|
|
55374
|
+
'aria-describedby': [descriptionId, errorMessageId].join(' ')
|
|
55362
55375
|
};
|
|
55363
55376
|
return e("div", {
|
|
55364
55377
|
class: formFieldClasses(type$d, {
|
|
@@ -55377,6 +55390,7 @@
|
|
|
55377
55390
|
...timePickerProps
|
|
55378
55391
|
})]
|
|
55379
55392
|
}), e(Description$2, {
|
|
55393
|
+
id: descriptionId,
|
|
55380
55394
|
description: description
|
|
55381
55395
|
}), e(Errors, {
|
|
55382
55396
|
errors: allErrors,
|
|
@@ -55478,7 +55492,7 @@
|
|
|
55478
55492
|
readonly
|
|
55479
55493
|
}),
|
|
55480
55494
|
children: [e(Label$3, {
|
|
55481
|
-
|
|
55495
|
+
htmlFor: domId,
|
|
55482
55496
|
label: evaluatedLabel
|
|
55483
55497
|
}), !evaluatedUrl && e(IFramePlaceholder, {
|
|
55484
55498
|
text: "No content to show."
|
|
@@ -56283,7 +56297,6 @@
|
|
|
56283
56297
|
const {
|
|
56284
56298
|
disabled,
|
|
56285
56299
|
errors = [],
|
|
56286
|
-
errorMessageId,
|
|
56287
56300
|
domId,
|
|
56288
56301
|
onBlur,
|
|
56289
56302
|
onFocus,
|
|
@@ -56421,6 +56434,8 @@
|
|
|
56421
56434
|
e.preventDefault();
|
|
56422
56435
|
}
|
|
56423
56436
|
};
|
|
56437
|
+
const descriptionId = `${domId}-description`;
|
|
56438
|
+
const errorMessageId = `${domId}-error-message`;
|
|
56424
56439
|
return e("div", {
|
|
56425
56440
|
class: formFieldClasses(type$a, {
|
|
56426
56441
|
errors,
|
|
@@ -56428,7 +56443,7 @@
|
|
|
56428
56443
|
readonly
|
|
56429
56444
|
}),
|
|
56430
56445
|
children: [e(Label$3, {
|
|
56431
|
-
|
|
56446
|
+
htmlFor: domId,
|
|
56432
56447
|
label: label,
|
|
56433
56448
|
required: required
|
|
56434
56449
|
}), e(TemplatedInputAdorner, {
|
|
@@ -56463,7 +56478,9 @@
|
|
|
56463
56478
|
autoComplete: "off",
|
|
56464
56479
|
step: incrementAmount,
|
|
56465
56480
|
value: displayValue,
|
|
56466
|
-
"aria-describedby": errorMessageId
|
|
56481
|
+
"aria-describedby": [descriptionId, errorMessageId].join(' '),
|
|
56482
|
+
required: required,
|
|
56483
|
+
"aria-invalid": errors.length > 0
|
|
56467
56484
|
}), e("div", {
|
|
56468
56485
|
class: classNames('fjs-number-arrow-container', {
|
|
56469
56486
|
'fjs-disabled': disabled,
|
|
@@ -56489,10 +56506,11 @@
|
|
|
56489
56506
|
})]
|
|
56490
56507
|
})
|
|
56491
56508
|
}), e(Description$2, {
|
|
56509
|
+
id: descriptionId,
|
|
56492
56510
|
description: description
|
|
56493
56511
|
}), e(Errors, {
|
|
56494
|
-
|
|
56495
|
-
|
|
56512
|
+
id: errorMessageId,
|
|
56513
|
+
errors: errors
|
|
56496
56514
|
})]
|
|
56497
56515
|
});
|
|
56498
56516
|
}
|
|
@@ -56521,7 +56539,6 @@
|
|
|
56521
56539
|
const {
|
|
56522
56540
|
disabled,
|
|
56523
56541
|
errors = [],
|
|
56524
|
-
errorMessageId,
|
|
56525
56542
|
domId,
|
|
56526
56543
|
onBlur,
|
|
56527
56544
|
onFocus,
|
|
@@ -56567,6 +56584,8 @@
|
|
|
56567
56584
|
value,
|
|
56568
56585
|
onChange: props.onChange
|
|
56569
56586
|
});
|
|
56587
|
+
const descriptionId = `${domId}-description`;
|
|
56588
|
+
const errorMessageId = `${domId}-error-message`;
|
|
56570
56589
|
return e("div", {
|
|
56571
56590
|
class: formFieldClasses(type$9, {
|
|
56572
56591
|
errors,
|
|
@@ -56581,7 +56600,7 @@
|
|
|
56581
56600
|
const itemDomId = `${domId}-${index}`;
|
|
56582
56601
|
const isChecked = isEqual$1(option.value, value);
|
|
56583
56602
|
return e(Label$3, {
|
|
56584
|
-
|
|
56603
|
+
htmlFor: itemDomId,
|
|
56585
56604
|
label: option.label,
|
|
56586
56605
|
class: classNames({
|
|
56587
56606
|
'fjs-checked': isChecked
|
|
@@ -56597,14 +56616,17 @@
|
|
|
56597
56616
|
onClick: () => onChange(option.value),
|
|
56598
56617
|
onBlur: onRadioBlur,
|
|
56599
56618
|
onFocus: onRadioFocus,
|
|
56600
|
-
"aria-describedby": errorMessageId
|
|
56619
|
+
"aria-describedby": [descriptionId, errorMessageId].join(' '),
|
|
56620
|
+
required: required,
|
|
56621
|
+
"aria-invalid": errors.length > 0
|
|
56601
56622
|
})
|
|
56602
56623
|
}, index);
|
|
56603
56624
|
}), e(Description$2, {
|
|
56625
|
+
id: descriptionId,
|
|
56604
56626
|
description: description
|
|
56605
56627
|
}), e(Errors, {
|
|
56606
|
-
|
|
56607
|
-
|
|
56628
|
+
id: errorMessageId,
|
|
56629
|
+
errors: errors
|
|
56608
56630
|
})]
|
|
56609
56631
|
});
|
|
56610
56632
|
}
|
|
@@ -56680,7 +56702,7 @@
|
|
|
56680
56702
|
|
|
56681
56703
|
// whenever we change the underlying value, set the label to it
|
|
56682
56704
|
y(() => {
|
|
56683
|
-
setFilter(label);
|
|
56705
|
+
setFilter(label || '');
|
|
56684
56706
|
}, [label]);
|
|
56685
56707
|
const filteredOptions = d(() => {
|
|
56686
56708
|
if (loadState !== LOAD_STATES.LOADED) {
|
|
@@ -56760,7 +56782,7 @@
|
|
|
56760
56782
|
}, [onFocus]);
|
|
56761
56783
|
const onInputBlur = A$1(() => {
|
|
56762
56784
|
setIsDropdownExpanded(false);
|
|
56763
|
-
setFilter(label);
|
|
56785
|
+
setFilter(label || '');
|
|
56764
56786
|
onBlur && onBlur();
|
|
56765
56787
|
}, [onBlur, label]);
|
|
56766
56788
|
return e(d$1, {
|
|
@@ -56855,6 +56877,9 @@
|
|
|
56855
56877
|
}, [disabled, isDropdownExpanded, loadState, readonly, value]);
|
|
56856
56878
|
const onMouseDown = A$1(e => {
|
|
56857
56879
|
const input = inputRef.current;
|
|
56880
|
+
if (disabled || !input) {
|
|
56881
|
+
return;
|
|
56882
|
+
}
|
|
56858
56883
|
setIsDropdownExpanded(!isDropdownExpanded);
|
|
56859
56884
|
if (isDropdownExpanded) {
|
|
56860
56885
|
input.blur();
|
|
@@ -56862,7 +56887,7 @@
|
|
|
56862
56887
|
input.focus();
|
|
56863
56888
|
}
|
|
56864
56889
|
e.preventDefault();
|
|
56865
|
-
}, [isDropdownExpanded]);
|
|
56890
|
+
}, [disabled, isDropdownExpanded]);
|
|
56866
56891
|
const initialFocusIndex = d(() => value && findIndex$1(options, o => o.value === value) || 0, [options, value]);
|
|
56867
56892
|
const onInputFocus = A$1(() => {
|
|
56868
56893
|
if (!readonly) {
|
|
@@ -56933,7 +56958,6 @@
|
|
|
56933
56958
|
const {
|
|
56934
56959
|
disabled,
|
|
56935
56960
|
errors = [],
|
|
56936
|
-
errorMessageId,
|
|
56937
56961
|
domId,
|
|
56938
56962
|
onBlur,
|
|
56939
56963
|
onFocus,
|
|
@@ -56951,6 +56975,8 @@
|
|
|
56951
56975
|
const {
|
|
56952
56976
|
required
|
|
56953
56977
|
} = validate;
|
|
56978
|
+
const descriptionId = `${domId}-description`;
|
|
56979
|
+
const errorMessageId = `${domId}-error-message`;
|
|
56954
56980
|
const selectProps = {
|
|
56955
56981
|
domId,
|
|
56956
56982
|
disabled,
|
|
@@ -56961,7 +56987,9 @@
|
|
|
56961
56987
|
value,
|
|
56962
56988
|
onChange,
|
|
56963
56989
|
readonly,
|
|
56964
|
-
|
|
56990
|
+
required,
|
|
56991
|
+
'aria-invalid': errors.length > 0,
|
|
56992
|
+
'aria-describedby': [descriptionId, errorMessageId].join(' ')
|
|
56965
56993
|
};
|
|
56966
56994
|
return e("div", {
|
|
56967
56995
|
class: formFieldClasses(type$8, {
|
|
@@ -56976,7 +57004,7 @@
|
|
|
56976
57004
|
}
|
|
56977
57005
|
},
|
|
56978
57006
|
children: [e(Label$3, {
|
|
56979
|
-
|
|
57007
|
+
htmlFor: domId,
|
|
56980
57008
|
label: label,
|
|
56981
57009
|
required: required
|
|
56982
57010
|
}), searchable ? e(SearchableSelect, {
|
|
@@ -56984,10 +57012,11 @@
|
|
|
56984
57012
|
}) : e(SimpleSelect, {
|
|
56985
57013
|
...selectProps
|
|
56986
57014
|
}), e(Description$2, {
|
|
57015
|
+
id: descriptionId,
|
|
56987
57016
|
description: description
|
|
56988
57017
|
}), e(Errors, {
|
|
56989
|
-
|
|
56990
|
-
|
|
57018
|
+
id: errorMessageId,
|
|
57019
|
+
errors: errors
|
|
56991
57020
|
})]
|
|
56992
57021
|
});
|
|
56993
57022
|
}
|
|
@@ -57115,7 +57144,6 @@
|
|
|
57115
57144
|
const {
|
|
57116
57145
|
disabled,
|
|
57117
57146
|
errors = [],
|
|
57118
|
-
errorMessageId,
|
|
57119
57147
|
onFocus,
|
|
57120
57148
|
domId,
|
|
57121
57149
|
onBlur,
|
|
@@ -57251,6 +57279,8 @@
|
|
|
57251
57279
|
inputRef.current.focus();
|
|
57252
57280
|
};
|
|
57253
57281
|
const shouldDisplayDropdown = d(() => !disabled && loadState === LOAD_STATES.LOADED && isDropdownExpanded && !isEscapeClosed, [disabled, isDropdownExpanded, isEscapeClosed, loadState]);
|
|
57282
|
+
const descriptionId = `${domId}-description`;
|
|
57283
|
+
const errorMessageId = `${domId}-error-message`;
|
|
57254
57284
|
return e("div", {
|
|
57255
57285
|
ref: focusScopeRef,
|
|
57256
57286
|
class: formFieldClasses(type$5, {
|
|
@@ -57267,7 +57297,7 @@
|
|
|
57267
57297
|
children: [e(Label$3, {
|
|
57268
57298
|
label: label,
|
|
57269
57299
|
required: required,
|
|
57270
|
-
|
|
57300
|
+
htmlFor: domId
|
|
57271
57301
|
}), !disabled && !readonly && !!values.length && e(SkipLink, {
|
|
57272
57302
|
className: "fjs-taglist-skip-link",
|
|
57273
57303
|
label: "Skip to search",
|
|
@@ -57315,7 +57345,9 @@
|
|
|
57315
57345
|
onMouseDown: () => setIsEscapeClose(false),
|
|
57316
57346
|
onFocus: onInputFocus,
|
|
57317
57347
|
onBlur: onInputBlur,
|
|
57318
|
-
"aria-describedby": errorMessageId
|
|
57348
|
+
"aria-describedby": [descriptionId, errorMessageId].join(' '),
|
|
57349
|
+
required: required,
|
|
57350
|
+
"aria-invalid": errors.length > 0
|
|
57319
57351
|
})]
|
|
57320
57352
|
}), e("div", {
|
|
57321
57353
|
class: "fjs-taglist-anchor",
|
|
@@ -57327,10 +57359,11 @@
|
|
|
57327
57359
|
listenerElement: inputRef.current
|
|
57328
57360
|
})
|
|
57329
57361
|
}), e(Description$2, {
|
|
57362
|
+
id: descriptionId,
|
|
57330
57363
|
description: description
|
|
57331
57364
|
}), e(Errors, {
|
|
57332
|
-
|
|
57333
|
-
|
|
57365
|
+
id: errorMessageId,
|
|
57366
|
+
errors: errors
|
|
57334
57367
|
})]
|
|
57335
57368
|
});
|
|
57336
57369
|
}
|
|
@@ -57643,7 +57676,6 @@
|
|
|
57643
57676
|
const {
|
|
57644
57677
|
disabled,
|
|
57645
57678
|
errors = [],
|
|
57646
|
-
errorMessageId,
|
|
57647
57679
|
domId,
|
|
57648
57680
|
onBlur,
|
|
57649
57681
|
onFocus,
|
|
@@ -57679,6 +57711,8 @@
|
|
|
57679
57711
|
const onInputFocus = () => {
|
|
57680
57712
|
onFocus && onFocus();
|
|
57681
57713
|
};
|
|
57714
|
+
const descriptionId = `${domId}-description`;
|
|
57715
|
+
const errorMessageId = `${domId}-error-message`;
|
|
57682
57716
|
return e("div", {
|
|
57683
57717
|
class: formFieldClasses(type$2, {
|
|
57684
57718
|
errors,
|
|
@@ -57686,7 +57720,7 @@
|
|
|
57686
57720
|
readonly
|
|
57687
57721
|
}),
|
|
57688
57722
|
children: [e(Label$3, {
|
|
57689
|
-
|
|
57723
|
+
htmlFor: domId,
|
|
57690
57724
|
label: label,
|
|
57691
57725
|
required: required
|
|
57692
57726
|
}), e(TemplatedInputAdorner, {
|
|
@@ -57704,13 +57738,16 @@
|
|
|
57704
57738
|
onFocus: onInputFocus,
|
|
57705
57739
|
type: "text",
|
|
57706
57740
|
value: value,
|
|
57707
|
-
"aria-describedby": errorMessageId
|
|
57741
|
+
"aria-describedby": [descriptionId, errorMessageId].join(' '),
|
|
57742
|
+
required: required,
|
|
57743
|
+
"aria-invalid": errors.length > 0
|
|
57708
57744
|
})
|
|
57709
57745
|
}), e(Description$2, {
|
|
57746
|
+
id: descriptionId,
|
|
57710
57747
|
description: description
|
|
57711
57748
|
}), e(Errors, {
|
|
57712
|
-
|
|
57713
|
-
|
|
57749
|
+
id: errorMessageId,
|
|
57750
|
+
errors: errors
|
|
57714
57751
|
})]
|
|
57715
57752
|
});
|
|
57716
57753
|
}
|
|
@@ -57742,7 +57779,6 @@
|
|
|
57742
57779
|
const {
|
|
57743
57780
|
disabled,
|
|
57744
57781
|
errors = [],
|
|
57745
|
-
errorMessageId,
|
|
57746
57782
|
domId,
|
|
57747
57783
|
onBlur,
|
|
57748
57784
|
onFocus,
|
|
@@ -57786,6 +57822,8 @@
|
|
|
57786
57822
|
y(() => {
|
|
57787
57823
|
autoSizeTextarea(textareaRef.current);
|
|
57788
57824
|
}, []);
|
|
57825
|
+
const descriptionId = `${domId}-description`;
|
|
57826
|
+
const errorMessageId = `${domId}-error-message`;
|
|
57789
57827
|
return e("div", {
|
|
57790
57828
|
class: formFieldClasses(type$1, {
|
|
57791
57829
|
errors,
|
|
@@ -57793,7 +57831,7 @@
|
|
|
57793
57831
|
readonly
|
|
57794
57832
|
}),
|
|
57795
57833
|
children: [e(Label$3, {
|
|
57796
|
-
|
|
57834
|
+
htmlFor: domId,
|
|
57797
57835
|
label: label,
|
|
57798
57836
|
required: required
|
|
57799
57837
|
}), e("textarea", {
|
|
@@ -57806,12 +57844,15 @@
|
|
|
57806
57844
|
onFocus: onInputFocus,
|
|
57807
57845
|
value: value,
|
|
57808
57846
|
ref: textareaRef,
|
|
57809
|
-
"aria-describedby": errorMessageId
|
|
57847
|
+
"aria-describedby": [descriptionId, errorMessageId].join(' '),
|
|
57848
|
+
required: required,
|
|
57849
|
+
"aria-invalid": errors.length > 0
|
|
57810
57850
|
}), e(Description$2, {
|
|
57851
|
+
id: descriptionId,
|
|
57811
57852
|
description: description
|
|
57812
57853
|
}), e(Errors, {
|
|
57813
|
-
|
|
57814
|
-
|
|
57854
|
+
id: errorMessageId,
|
|
57855
|
+
errors: errors
|
|
57815
57856
|
})]
|
|
57816
57857
|
});
|
|
57817
57858
|
}
|
|
@@ -58027,7 +58068,7 @@
|
|
|
58027
58068
|
return e("div", {
|
|
58028
58069
|
class: formFieldClasses(type),
|
|
58029
58070
|
children: [e(Label$3, {
|
|
58030
|
-
|
|
58071
|
+
htmlFor: prefixId$2(id),
|
|
58031
58072
|
label: label
|
|
58032
58073
|
}), e("div", {
|
|
58033
58074
|
class: classNames('fjs-table-middle-container', {
|
|
@@ -58423,7 +58464,7 @@
|
|
|
58423
58464
|
}
|
|
58424
58465
|
}
|
|
58425
58466
|
const EXPRESSION_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'conditional.hide', 'description', 'label', 'source', 'readonly', 'text', 'validate.min', 'validate.max', 'validate.minLength', 'validate.maxLength', 'valuesExpression', 'url', 'dataSource', 'columnsExpression'];
|
|
58426
|
-
const TEMPLATE_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'description', 'label', 'source', 'text', 'url'];
|
|
58467
|
+
const TEMPLATE_PROPERTIES = ['alt', 'appearance.prefixAdorner', 'appearance.suffixAdorner', 'description', 'label', 'source', 'text', 'content', 'url'];
|
|
58427
58468
|
|
|
58428
58469
|
/**
|
|
58429
58470
|
* @typedef { import('../types').Schema } Schema
|
|
@@ -59452,47 +59493,17 @@
|
|
|
59452
59493
|
};
|
|
59453
59494
|
const parentExpressionContextInfo = F$1(LocalExpressionContext);
|
|
59454
59495
|
return e(d$1, {
|
|
59455
|
-
children: displayValues.map((value, index) => {
|
|
59456
|
-
|
|
59457
|
-
|
|
59458
|
-
|
|
59459
|
-
|
|
59460
|
-
|
|
59461
|
-
|
|
59462
|
-
|
|
59463
|
-
|
|
59464
|
-
|
|
59465
|
-
|
|
59466
|
-
parent: buildExpressionContext(parentExpressionContextInfo),
|
|
59467
|
-
i: [...parentExpressionContextInfo.i, index + 1]
|
|
59468
|
-
}), [index, value]);
|
|
59469
|
-
return !showRemove ? e(LocalExpressionContext.Provider, {
|
|
59470
|
-
value: localExpressionContextInfo,
|
|
59471
|
-
children: e(RowsRenderer, {
|
|
59472
|
-
...elementProps
|
|
59473
|
-
})
|
|
59474
|
-
}) : e("div", {
|
|
59475
|
-
class: "fjs-repeat-row-container",
|
|
59476
|
-
children: [e("div", {
|
|
59477
|
-
class: "fjs-repeat-row-rows",
|
|
59478
|
-
children: e(LocalExpressionContext.Provider, {
|
|
59479
|
-
value: localExpressionContextInfo,
|
|
59480
|
-
children: e(RowsRenderer, {
|
|
59481
|
-
...elementProps
|
|
59482
|
-
})
|
|
59483
|
-
})
|
|
59484
|
-
}), e("button", {
|
|
59485
|
-
class: "fjs-repeat-row-remove",
|
|
59486
|
-
type: "button",
|
|
59487
|
-
"aria-label": `Remove list item ${index + 1}`,
|
|
59488
|
-
onClick: () => onDeleteItem(index),
|
|
59489
|
-
children: e("div", {
|
|
59490
|
-
class: "fjs-repeat-row-remove-icon-container",
|
|
59491
|
-
children: e(DeleteSvg, {})
|
|
59492
|
-
})
|
|
59493
|
-
})]
|
|
59494
|
-
});
|
|
59495
|
-
})
|
|
59496
|
+
children: displayValues.map((value, index) => e(RepetitionScaffold, {
|
|
59497
|
+
index: index,
|
|
59498
|
+
value: value,
|
|
59499
|
+
parentExpressionContextInfo: parentExpressionContextInfo,
|
|
59500
|
+
repeaterField: repeaterField,
|
|
59501
|
+
RowsRenderer: RowsRenderer,
|
|
59502
|
+
indexes: indexes,
|
|
59503
|
+
onDeleteItem: onDeleteItem,
|
|
59504
|
+
showRemove: showRemove,
|
|
59505
|
+
...restProps
|
|
59506
|
+
}, index))
|
|
59496
59507
|
});
|
|
59497
59508
|
}
|
|
59498
59509
|
RepeatFooter(props) {
|
|
@@ -59584,6 +59595,73 @@
|
|
|
59584
59595
|
return nonCollapsedItems ? nonCollapsedItems : DEFAULT_NON_COLLAPSED_ITEMS;
|
|
59585
59596
|
}
|
|
59586
59597
|
}
|
|
59598
|
+
|
|
59599
|
+
/**
|
|
59600
|
+
* Individual repetition of a repeated field and context scaffolding.
|
|
59601
|
+
*
|
|
59602
|
+
* @param {Object} props
|
|
59603
|
+
* @param {number} props.index
|
|
59604
|
+
* @param {Object} props.value
|
|
59605
|
+
* @param {Object} props.parentExpressionContextInfo
|
|
59606
|
+
* @param {Object} props.repeaterField
|
|
59607
|
+
* @param {Function} props.RowsRenderer
|
|
59608
|
+
* @param {Object} props.indexes
|
|
59609
|
+
* @param {Function} props.onDeleteItem
|
|
59610
|
+
* @param {boolean} props.showRemove
|
|
59611
|
+
*/
|
|
59612
|
+
|
|
59613
|
+
const RepetitionScaffold = props => {
|
|
59614
|
+
const {
|
|
59615
|
+
index,
|
|
59616
|
+
value,
|
|
59617
|
+
parentExpressionContextInfo,
|
|
59618
|
+
repeaterField,
|
|
59619
|
+
RowsRenderer,
|
|
59620
|
+
indexes,
|
|
59621
|
+
onDeleteItem,
|
|
59622
|
+
showRemove,
|
|
59623
|
+
...restProps
|
|
59624
|
+
} = props;
|
|
59625
|
+
const elementProps = d(() => ({
|
|
59626
|
+
...restProps,
|
|
59627
|
+
indexes: {
|
|
59628
|
+
...(indexes || {}),
|
|
59629
|
+
[repeaterField.id]: index
|
|
59630
|
+
}
|
|
59631
|
+
}), [index, indexes, repeaterField.id, restProps]);
|
|
59632
|
+
const localExpressionContextInfo = d(() => ({
|
|
59633
|
+
data: parentExpressionContextInfo.data,
|
|
59634
|
+
this: value,
|
|
59635
|
+
parent: buildExpressionContext(parentExpressionContextInfo),
|
|
59636
|
+
i: [...parentExpressionContextInfo.i, index + 1]
|
|
59637
|
+
}), [index, parentExpressionContextInfo, value]);
|
|
59638
|
+
return !showRemove ? e(LocalExpressionContext.Provider, {
|
|
59639
|
+
value: localExpressionContextInfo,
|
|
59640
|
+
children: e(RowsRenderer, {
|
|
59641
|
+
...elementProps
|
|
59642
|
+
})
|
|
59643
|
+
}) : e("div", {
|
|
59644
|
+
class: "fjs-repeat-row-container",
|
|
59645
|
+
children: [e("div", {
|
|
59646
|
+
class: "fjs-repeat-row-rows",
|
|
59647
|
+
children: e(LocalExpressionContext.Provider, {
|
|
59648
|
+
value: localExpressionContextInfo,
|
|
59649
|
+
children: e(RowsRenderer, {
|
|
59650
|
+
...elementProps
|
|
59651
|
+
})
|
|
59652
|
+
})
|
|
59653
|
+
}), e("button", {
|
|
59654
|
+
class: "fjs-repeat-row-remove",
|
|
59655
|
+
type: "button",
|
|
59656
|
+
"aria-label": `Remove list item ${index + 1}`,
|
|
59657
|
+
onClick: () => onDeleteItem(index),
|
|
59658
|
+
children: e("div", {
|
|
59659
|
+
class: "fjs-repeat-row-remove-icon-container",
|
|
59660
|
+
children: e(DeleteSvg, {})
|
|
59661
|
+
})
|
|
59662
|
+
})]
|
|
59663
|
+
});
|
|
59664
|
+
};
|
|
59587
59665
|
RepeatRenderManager.$inject = ['form', 'formFields', 'formFieldRegistry', 'pathRegistry'];
|
|
59588
59666
|
const RepeatRenderModule$1 = {
|
|
59589
59667
|
__init__: ['repeatRenderManager'],
|
|
@@ -76540,11 +76618,10 @@
|
|
|
76540
76618
|
description,
|
|
76541
76619
|
editField,
|
|
76542
76620
|
field,
|
|
76543
|
-
id
|
|
76544
|
-
defaultValue = 60 // default value for spacer
|
|
76621
|
+
id
|
|
76545
76622
|
} = props;
|
|
76546
76623
|
const debounce = useService('debounce');
|
|
76547
|
-
const getValue = e => get(field, ['height'],
|
|
76624
|
+
const getValue = e => get(field, ['height'], null);
|
|
76548
76625
|
const setValue = (value, error) => {
|
|
76549
76626
|
if (error) {
|
|
76550
76627
|
return;
|
|
@@ -76571,7 +76648,7 @@
|
|
|
76571
76648
|
*/
|
|
76572
76649
|
const validate$7 = value => {
|
|
76573
76650
|
if (typeof value !== 'number') {
|
|
76574
|
-
return
|
|
76651
|
+
return 'A number is required.';
|
|
76575
76652
|
}
|
|
76576
76653
|
if (!Number.isInteger(value)) {
|
|
76577
76654
|
return 'Should be an integer.';
|
|
@@ -76583,7 +76660,6 @@
|
|
|
76583
76660
|
function IFrameHeightEntry(props) {
|
|
76584
76661
|
return [...HeightEntry({
|
|
76585
76662
|
...props,
|
|
76586
|
-
defaultValue: 300,
|
|
76587
76663
|
description: 'Height of the container in pixels.',
|
|
76588
76664
|
isDefaultVisible: field => field.type === 'iframe'
|
|
76589
76665
|
})];
|
|
@@ -76816,7 +76892,7 @@
|
|
|
76816
76892
|
|
|
76817
76893
|
const description = e(d$1, {
|
|
76818
76894
|
children: ["Supports HTML, styling, and templating. Styles are automatically scoped to the HTML component. ", e("a", {
|
|
76819
|
-
href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-html/",
|
|
76895
|
+
href: "https://docs.camunda.io/docs/next/components/modeler/forms/form-element-library/forms-element-library-html/",
|
|
76820
76896
|
target: "_blank",
|
|
76821
76897
|
children: "Learn more"
|
|
76822
76898
|
})]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-playground",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "A form-js playground",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"url": "https://github.com/bpmn-io"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@bpmn-io/form-js-editor": "^1.7.
|
|
48
|
-
"@bpmn-io/form-js-viewer": "^1.7.
|
|
47
|
+
"@bpmn-io/form-js-editor": "^1.7.1",
|
|
48
|
+
"@bpmn-io/form-js-viewer": "^1.7.1",
|
|
49
49
|
"@codemirror/autocomplete": "^6.12.0",
|
|
50
50
|
"@codemirror/commands": "^6.1.2",
|
|
51
51
|
"@codemirror/lang-json": "^6.0.1",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"rollup-plugin-css-only": "^4.0.0",
|
|
71
71
|
"style-loader": "^3.3.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "f6ffe2569d2d2f7fe6214ad5bb00b76f1d74ef1a"
|
|
74
74
|
}
|