@bpmn-io/form-js-playground 0.15.0-alpha.0 → 1.0.0-alpha.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/form-playground.umd.js +614 -209
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +6 -2
- package/dist/index.es.js.map +1 -1
- package/package.json +4 -4
|
@@ -50566,7 +50566,7 @@
|
|
|
50566
50566
|
container.classList.add(`${prefix}-container`);
|
|
50567
50567
|
return container;
|
|
50568
50568
|
}
|
|
50569
|
-
const EXPRESSION_PROPERTIES = ['alt', 'source', 'text'];
|
|
50569
|
+
const EXPRESSION_PROPERTIES = ['alt', 'source', 'readonly', 'text'];
|
|
50570
50570
|
const TEMPLATE_PROPERTIES = ['text'];
|
|
50571
50571
|
function findErrors(errors, path) {
|
|
50572
50572
|
return errors[pathStringify(path)];
|
|
@@ -50797,14 +50797,16 @@
|
|
|
50797
50797
|
};
|
|
50798
50798
|
function formFieldClasses(type, {
|
|
50799
50799
|
errors = [],
|
|
50800
|
-
disabled = false
|
|
50800
|
+
disabled = false,
|
|
50801
|
+
readonly = false
|
|
50801
50802
|
} = {}) {
|
|
50802
50803
|
if (!type) {
|
|
50803
50804
|
throw new Error('type required');
|
|
50804
50805
|
}
|
|
50805
50806
|
return classNames('fjs-form-field', `fjs-form-field-${type}`, {
|
|
50806
50807
|
'fjs-has-errors': errors.length > 0,
|
|
50807
|
-
'fjs-disabled': disabled
|
|
50808
|
+
'fjs-disabled': disabled,
|
|
50809
|
+
'fjs-readonly': readonly
|
|
50808
50810
|
});
|
|
50809
50811
|
}
|
|
50810
50812
|
function gridColumnClasses(formField) {
|
|
@@ -50818,7 +50820,7 @@
|
|
|
50818
50820
|
// always fall back to top-down on smallest screens
|
|
50819
50821
|
'cds--col-sm-16', 'cds--col-md-16');
|
|
50820
50822
|
}
|
|
50821
|
-
function prefixId(id, formId) {
|
|
50823
|
+
function prefixId$2(id, formId) {
|
|
50822
50824
|
if (formId) {
|
|
50823
50825
|
return `fjs-form-${formId}-${id}`;
|
|
50824
50826
|
}
|
|
@@ -50956,6 +50958,7 @@
|
|
|
50956
50958
|
disabled,
|
|
50957
50959
|
errors = [],
|
|
50958
50960
|
field,
|
|
50961
|
+
readonly,
|
|
50959
50962
|
value = false
|
|
50960
50963
|
} = props;
|
|
50961
50964
|
const {
|
|
@@ -50978,23 +50981,25 @@
|
|
|
50978
50981
|
const {
|
|
50979
50982
|
formId
|
|
50980
50983
|
} = F$1(FormContext$1);
|
|
50981
|
-
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
50984
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId$2(id, formId)}-error-message`;
|
|
50982
50985
|
return e$1("div", {
|
|
50983
50986
|
class: classNames(formFieldClasses(type$a, {
|
|
50984
50987
|
errors,
|
|
50985
|
-
disabled
|
|
50988
|
+
disabled,
|
|
50989
|
+
readonly
|
|
50986
50990
|
}), {
|
|
50987
50991
|
'fjs-checked': value
|
|
50988
50992
|
}),
|
|
50989
50993
|
children: [e$1(Label$1, {
|
|
50990
|
-
id: prefixId(id, formId),
|
|
50994
|
+
id: prefixId$2(id, formId),
|
|
50991
50995
|
label: label,
|
|
50992
50996
|
required: required,
|
|
50993
50997
|
children: e$1("input", {
|
|
50994
50998
|
checked: value,
|
|
50995
50999
|
class: "fjs-input",
|
|
50996
51000
|
disabled: disabled,
|
|
50997
|
-
|
|
51001
|
+
readOnly: readonly,
|
|
51002
|
+
id: prefixId$2(id, formId),
|
|
50998
51003
|
type: "checkbox",
|
|
50999
51004
|
onChange: onChange,
|
|
51000
51005
|
"aria-describedby": errorMessageId
|
|
@@ -51351,6 +51356,7 @@
|
|
|
51351
51356
|
disabled,
|
|
51352
51357
|
errors = [],
|
|
51353
51358
|
field,
|
|
51359
|
+
readonly,
|
|
51354
51360
|
value = []
|
|
51355
51361
|
} = props;
|
|
51356
51362
|
const {
|
|
@@ -51381,18 +51387,19 @@
|
|
|
51381
51387
|
const {
|
|
51382
51388
|
formId
|
|
51383
51389
|
} = F$1(FormContext$1);
|
|
51384
|
-
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
51390
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId$2(id, formId)}-error-message`;
|
|
51385
51391
|
return e$1("div", {
|
|
51386
51392
|
class: classNames(formFieldClasses(type$9, {
|
|
51387
51393
|
errors,
|
|
51388
|
-
disabled
|
|
51394
|
+
disabled,
|
|
51395
|
+
readonly
|
|
51389
51396
|
})),
|
|
51390
51397
|
children: [e$1(Label$1, {
|
|
51391
51398
|
label: label,
|
|
51392
51399
|
required: required
|
|
51393
51400
|
}), loadState == LOAD_STATES.LOADED && options.map((v, index) => {
|
|
51394
51401
|
return e$1(Label$1, {
|
|
51395
|
-
id: prefixId(`${id}-${index}`, formId),
|
|
51402
|
+
id: prefixId$2(`${id}-${index}`, formId),
|
|
51396
51403
|
label: v.label,
|
|
51397
51404
|
class: classNames({
|
|
51398
51405
|
'fjs-checked': value.includes(v.value)
|
|
@@ -51402,7 +51409,8 @@
|
|
|
51402
51409
|
checked: value.includes(v.value),
|
|
51403
51410
|
class: "fjs-input",
|
|
51404
51411
|
disabled: disabled,
|
|
51405
|
-
|
|
51412
|
+
readOnly: readonly,
|
|
51413
|
+
id: prefixId$2(`${id}-${index}`, formId),
|
|
51406
51414
|
type: "checkbox",
|
|
51407
51415
|
onClick: () => toggleCheckbox(v.value),
|
|
51408
51416
|
"aria-describedby": errorMessageId
|
|
@@ -51509,6 +51517,33 @@
|
|
|
51509
51517
|
});
|
|
51510
51518
|
}
|
|
51511
51519
|
|
|
51520
|
+
/**
|
|
51521
|
+
* Retrieve readonly value of a form field, given it can be an
|
|
51522
|
+
* expression optionally or configured globally.
|
|
51523
|
+
*
|
|
51524
|
+
* @typedef { import('../../types').FormProperties } FormProperties
|
|
51525
|
+
*
|
|
51526
|
+
* @param {any} formField
|
|
51527
|
+
* @param {FormProperties} properties
|
|
51528
|
+
*
|
|
51529
|
+
* @returns {boolean}
|
|
51530
|
+
*/
|
|
51531
|
+
function useReadonly(formField, properties = {}) {
|
|
51532
|
+
const expressionLanguage = useService$2('expressionLanguage');
|
|
51533
|
+
const conditionChecker = useService$2('conditionChecker', false);
|
|
51534
|
+
const filteredData = useFilteredFormData();
|
|
51535
|
+
const {
|
|
51536
|
+
readonly
|
|
51537
|
+
} = formField;
|
|
51538
|
+
if (properties.readOnly) {
|
|
51539
|
+
return true;
|
|
51540
|
+
}
|
|
51541
|
+
if (expressionLanguage && expressionLanguage.isExpression(readonly)) {
|
|
51542
|
+
return conditionChecker ? conditionChecker.check(readonly, filteredData) : false;
|
|
51543
|
+
}
|
|
51544
|
+
return readonly || false;
|
|
51545
|
+
}
|
|
51546
|
+
|
|
51512
51547
|
/**
|
|
51513
51548
|
* Template a string reactively based on form data. If the string is not a template, it is returned as is.
|
|
51514
51549
|
* Memoised to minimize re-renders
|
|
@@ -51554,7 +51589,10 @@
|
|
|
51554
51589
|
}
|
|
51555
51590
|
const value = get$1(data, field._path);
|
|
51556
51591
|
const fieldErrors = findErrors(errors, field._path);
|
|
51557
|
-
const
|
|
51592
|
+
const readonly = useReadonly(field, properties);
|
|
51593
|
+
|
|
51594
|
+
// add precedence: global readonly > form field disabled
|
|
51595
|
+
const disabled = !properties.readOnly && (properties.disabled || field.disabled || false);
|
|
51558
51596
|
const hidden = useCondition(field.conditional && field.conditional.hide || null);
|
|
51559
51597
|
if (hidden) {
|
|
51560
51598
|
return e$1(Empty, {});
|
|
@@ -51569,7 +51607,8 @@
|
|
|
51569
51607
|
...props,
|
|
51570
51608
|
disabled: disabled,
|
|
51571
51609
|
errors: fieldErrors,
|
|
51572
|
-
onChange: disabled ? noop$1$1 : onChange,
|
|
51610
|
+
onChange: disabled || readonly ? noop$1$1 : onChange,
|
|
51611
|
+
readonly: readonly,
|
|
51573
51612
|
value: value
|
|
51574
51613
|
})
|
|
51575
51614
|
})
|
|
@@ -51666,12 +51705,14 @@
|
|
|
51666
51705
|
inputRef,
|
|
51667
51706
|
children,
|
|
51668
51707
|
disabled,
|
|
51708
|
+
readonly,
|
|
51669
51709
|
hasErrors
|
|
51670
51710
|
} = props;
|
|
51671
51711
|
const onAdornmentClick = () => inputRef && inputRef.current && inputRef.current.focus();
|
|
51672
51712
|
return e$1("div", {
|
|
51673
51713
|
class: classNames('fjs-input-group', {
|
|
51674
|
-
'fjs-disabled': disabled
|
|
51714
|
+
'fjs-disabled': disabled,
|
|
51715
|
+
'fjs-readonly': readonly
|
|
51675
51716
|
}, {
|
|
51676
51717
|
'hasErrors': hasErrors
|
|
51677
51718
|
}),
|
|
@@ -51703,6 +51744,7 @@
|
|
|
51703
51744
|
disabled,
|
|
51704
51745
|
disallowPassedDates,
|
|
51705
51746
|
date,
|
|
51747
|
+
readonly,
|
|
51706
51748
|
setDate
|
|
51707
51749
|
} = props;
|
|
51708
51750
|
const dateInputRef = s$1();
|
|
@@ -51782,9 +51824,9 @@
|
|
|
51782
51824
|
}
|
|
51783
51825
|
}, [flatpickrInstance, isInputDirty]);
|
|
51784
51826
|
const onInputFocus = A$1(e => {
|
|
51785
|
-
if (!flatpickrInstance || focusScopeRef.current.contains(e.relatedTarget)) return;
|
|
51827
|
+
if (!flatpickrInstance || focusScopeRef.current.contains(e.relatedTarget) || readonly) return;
|
|
51786
51828
|
flatpickrInstance.open();
|
|
51787
|
-
}, [flatpickrInstance]);
|
|
51829
|
+
}, [flatpickrInstance, readonly]);
|
|
51788
51830
|
|
|
51789
51831
|
// simulate an enter press on blur to make sure the date value is submitted in all scenarios
|
|
51790
51832
|
const onInputBlur = A$1(e => {
|
|
@@ -51792,7 +51834,7 @@
|
|
|
51792
51834
|
dateInputRef.current.dispatchEvent(ENTER_KEYDOWN_EVENT);
|
|
51793
51835
|
setIsInputDirty(false);
|
|
51794
51836
|
}, [isInputDirty]);
|
|
51795
|
-
const fullId = `${prefixId(id, formId)}--date`;
|
|
51837
|
+
const fullId = `${prefixId$2(id, formId)}--date`;
|
|
51796
51838
|
return e$1("div", {
|
|
51797
51839
|
class: "fjs-datetime-subsection",
|
|
51798
51840
|
children: [e$1(Label$1, {
|
|
@@ -51803,6 +51845,7 @@
|
|
|
51803
51845
|
}), e$1(InputAdorner, {
|
|
51804
51846
|
pre: e$1(CalendarIcon, {}),
|
|
51805
51847
|
disabled: disabled,
|
|
51848
|
+
readonly: readonly,
|
|
51806
51849
|
rootRef: focusScopeRef,
|
|
51807
51850
|
inputRef: dateInputRef,
|
|
51808
51851
|
children: e$1("div", {
|
|
@@ -51816,11 +51859,12 @@
|
|
|
51816
51859
|
id: fullId,
|
|
51817
51860
|
class: "fjs-input",
|
|
51818
51861
|
disabled: disabled,
|
|
51862
|
+
readOnly: readonly,
|
|
51819
51863
|
placeholder: "mm/dd/yyyy",
|
|
51820
51864
|
autoComplete: "off",
|
|
51821
51865
|
onFocus: onInputFocus,
|
|
51822
51866
|
onKeyDown: onInputKeyDown,
|
|
51823
|
-
onMouseDown: () => !flatpickrInstance.isOpen && flatpickrInstance.open(),
|
|
51867
|
+
onMouseDown: () => !flatpickrInstance.isOpen && !readonly && flatpickrInstance.open(),
|
|
51824
51868
|
onBlur: onInputBlur,
|
|
51825
51869
|
onInput: () => setIsInputDirty(true),
|
|
51826
51870
|
"data-input": true,
|
|
@@ -51964,6 +52008,7 @@
|
|
|
51964
52008
|
formId,
|
|
51965
52009
|
required,
|
|
51966
52010
|
disabled,
|
|
52011
|
+
readonly,
|
|
51967
52012
|
use24h = false,
|
|
51968
52013
|
timeInterval,
|
|
51969
52014
|
time,
|
|
@@ -52057,7 +52102,7 @@
|
|
|
52057
52102
|
setDropdownIsOpen(false);
|
|
52058
52103
|
propagateRawToMinute(value);
|
|
52059
52104
|
};
|
|
52060
|
-
const fullId = `${prefixId(id, formId)}--time`;
|
|
52105
|
+
const fullId = `${prefixId$2(id, formId)}--time`;
|
|
52061
52106
|
return e$1("div", {
|
|
52062
52107
|
class: "fjs-datetime-subsection",
|
|
52063
52108
|
children: [e$1(Label$1, {
|
|
@@ -52069,6 +52114,7 @@
|
|
|
52069
52114
|
pre: e$1(ClockIcon, {}),
|
|
52070
52115
|
inputRef: timeInputRef,
|
|
52071
52116
|
disabled: disabled,
|
|
52117
|
+
readonly: readonly,
|
|
52072
52118
|
children: e$1("div", {
|
|
52073
52119
|
class: "fjs-timepicker fjs-timepicker-anchor",
|
|
52074
52120
|
children: [e$1("input", {
|
|
@@ -52078,10 +52124,11 @@
|
|
|
52078
52124
|
class: "fjs-input",
|
|
52079
52125
|
value: rawValue,
|
|
52080
52126
|
disabled: disabled,
|
|
52127
|
+
readOnly: readonly,
|
|
52081
52128
|
placeholder: use24h ? 'hh:mm' : 'hh:mm ?m',
|
|
52082
52129
|
autoComplete: "off",
|
|
52083
|
-
onFocus: () => useDropdown && setDropdownIsOpen(true),
|
|
52084
|
-
onClick: () => useDropdown && setDropdownIsOpen(true)
|
|
52130
|
+
onFocus: () => !readonly && useDropdown && setDropdownIsOpen(true),
|
|
52131
|
+
onClick: () => !readonly && useDropdown && setDropdownIsOpen(true)
|
|
52085
52132
|
|
|
52086
52133
|
// @ts-ignore
|
|
52087
52134
|
,
|
|
@@ -52112,6 +52159,7 @@
|
|
|
52112
52159
|
errors = [],
|
|
52113
52160
|
field,
|
|
52114
52161
|
onChange,
|
|
52162
|
+
readonly,
|
|
52115
52163
|
value = ''
|
|
52116
52164
|
} = props;
|
|
52117
52165
|
const {
|
|
@@ -52228,7 +52276,7 @@
|
|
|
52228
52276
|
time
|
|
52229
52277
|
});
|
|
52230
52278
|
}, []);
|
|
52231
|
-
const errorMessageId = allErrors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
52279
|
+
const errorMessageId = allErrors.length === 0 ? undefined : `${prefixId$2(id, formId)}-error-message`;
|
|
52232
52280
|
const datePickerProps = {
|
|
52233
52281
|
id,
|
|
52234
52282
|
label: dateLabel,
|
|
@@ -52238,6 +52286,7 @@
|
|
|
52238
52286
|
disabled,
|
|
52239
52287
|
disallowPassedDates,
|
|
52240
52288
|
date: dateTime.date,
|
|
52289
|
+
readonly,
|
|
52241
52290
|
setDate,
|
|
52242
52291
|
'aria-describedby': errorMessageId
|
|
52243
52292
|
};
|
|
@@ -52248,6 +52297,7 @@
|
|
|
52248
52297
|
formId,
|
|
52249
52298
|
required,
|
|
52250
52299
|
disabled,
|
|
52300
|
+
readonly,
|
|
52251
52301
|
use24h,
|
|
52252
52302
|
timeInterval,
|
|
52253
52303
|
time: dateTime.time,
|
|
@@ -52257,7 +52307,8 @@
|
|
|
52257
52307
|
return e$1("div", {
|
|
52258
52308
|
class: formFieldClasses(type$8, {
|
|
52259
52309
|
errors: allErrors,
|
|
52260
|
-
disabled
|
|
52310
|
+
disabled,
|
|
52311
|
+
readonly
|
|
52261
52312
|
}),
|
|
52262
52313
|
children: [e$1("div", {
|
|
52263
52314
|
class: classNames('fjs-vertical-group'),
|
|
@@ -52609,7 +52660,7 @@
|
|
|
52609
52660
|
alt: altText,
|
|
52610
52661
|
src: safeSource,
|
|
52611
52662
|
class: "fjs-image",
|
|
52612
|
-
id: prefixId(id, formId)
|
|
52663
|
+
id: prefixId$2(id, formId)
|
|
52613
52664
|
}), !safeSource && e$1("div", {
|
|
52614
52665
|
class: "fjs-image-placeholder",
|
|
52615
52666
|
children: e$1(ImagePlaceholder, {
|
|
@@ -52693,6 +52744,7 @@
|
|
|
52693
52744
|
errors = [],
|
|
52694
52745
|
field,
|
|
52695
52746
|
value,
|
|
52747
|
+
readonly,
|
|
52696
52748
|
onChange
|
|
52697
52749
|
} = props;
|
|
52698
52750
|
const {
|
|
@@ -52765,6 +52817,9 @@
|
|
|
52765
52817
|
});
|
|
52766
52818
|
}, [field, onChange, serializeToString]);
|
|
52767
52819
|
const increment = () => {
|
|
52820
|
+
if (readonly) {
|
|
52821
|
+
return;
|
|
52822
|
+
}
|
|
52768
52823
|
const base = isValidNumber$1(value) ? Big$1(value) : Big$1(0);
|
|
52769
52824
|
const stepFlooredValue = base.minus(base.mod(arrowIncrementValue));
|
|
52770
52825
|
|
|
@@ -52772,6 +52827,9 @@
|
|
|
52772
52827
|
setValue(stepFlooredValue.plus(arrowIncrementValue).toFixed());
|
|
52773
52828
|
};
|
|
52774
52829
|
const decrement = () => {
|
|
52830
|
+
if (readonly) {
|
|
52831
|
+
return;
|
|
52832
|
+
}
|
|
52775
52833
|
const base = isValidNumber$1(value) ? Big$1(value) : Big$1(0);
|
|
52776
52834
|
const offset = base.mod(arrowIncrementValue);
|
|
52777
52835
|
if (offset.cmp(0) === 0) {
|
|
@@ -52814,23 +52872,26 @@
|
|
|
52814
52872
|
const {
|
|
52815
52873
|
formId
|
|
52816
52874
|
} = F$1(FormContext$1);
|
|
52817
|
-
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
52875
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId$2(id, formId)}-error-message`;
|
|
52818
52876
|
return e$1("div", {
|
|
52819
52877
|
class: formFieldClasses(type$6, {
|
|
52820
52878
|
errors,
|
|
52821
|
-
disabled
|
|
52879
|
+
disabled,
|
|
52880
|
+
readonly
|
|
52822
52881
|
}),
|
|
52823
52882
|
children: [e$1(Label$1, {
|
|
52824
|
-
id: prefixId(id, formId),
|
|
52883
|
+
id: prefixId$2(id, formId),
|
|
52825
52884
|
label: label,
|
|
52826
52885
|
required: required
|
|
52827
52886
|
}), e$1(InputAdorner, {
|
|
52828
52887
|
disabled: disabled,
|
|
52888
|
+
readonly: readonly,
|
|
52829
52889
|
pre: prefixAdorner,
|
|
52830
52890
|
post: suffixAdorner,
|
|
52831
52891
|
children: e$1("div", {
|
|
52832
52892
|
class: classNames('fjs-vertical-group', {
|
|
52833
|
-
'fjs-disabled': disabled
|
|
52893
|
+
'fjs-disabled': disabled,
|
|
52894
|
+
'fjs-readonly': readonly
|
|
52834
52895
|
}, {
|
|
52835
52896
|
'hasErrors': errors.length
|
|
52836
52897
|
}),
|
|
@@ -52838,7 +52899,8 @@
|
|
|
52838
52899
|
ref: inputRef,
|
|
52839
52900
|
class: "fjs-input",
|
|
52840
52901
|
disabled: disabled,
|
|
52841
|
-
|
|
52902
|
+
readOnly: readonly,
|
|
52903
|
+
id: prefixId$2(id, formId),
|
|
52842
52904
|
onKeyDown: onKeyDown,
|
|
52843
52905
|
onKeyPress: onKeyPress
|
|
52844
52906
|
|
|
@@ -52853,7 +52915,8 @@
|
|
|
52853
52915
|
"aria-describedby": errorMessageId
|
|
52854
52916
|
}), e$1("div", {
|
|
52855
52917
|
class: classNames('fjs-number-arrow-container', {
|
|
52856
|
-
'fjs-disabled': disabled
|
|
52918
|
+
'fjs-disabled': disabled,
|
|
52919
|
+
'fjs-readonly': readonly
|
|
52857
52920
|
}),
|
|
52858
52921
|
children: [e$1("button", {
|
|
52859
52922
|
class: "fjs-number-arrow-up",
|
|
@@ -52911,6 +52974,7 @@
|
|
|
52911
52974
|
disabled,
|
|
52912
52975
|
errors = [],
|
|
52913
52976
|
field,
|
|
52977
|
+
readonly,
|
|
52914
52978
|
value
|
|
52915
52979
|
} = props;
|
|
52916
52980
|
const {
|
|
@@ -52935,18 +52999,19 @@
|
|
|
52935
52999
|
const {
|
|
52936
53000
|
formId
|
|
52937
53001
|
} = F$1(FormContext$1);
|
|
52938
|
-
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
53002
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId$2(id, formId)}-error-message`;
|
|
52939
53003
|
return e$1("div", {
|
|
52940
53004
|
class: formFieldClasses(type$5, {
|
|
52941
53005
|
errors,
|
|
52942
|
-
disabled
|
|
53006
|
+
disabled,
|
|
53007
|
+
readonly
|
|
52943
53008
|
}),
|
|
52944
53009
|
children: [e$1(Label$1, {
|
|
52945
53010
|
label: label,
|
|
52946
53011
|
required: required
|
|
52947
53012
|
}), loadState == LOAD_STATES.LOADED && options.map((option, index) => {
|
|
52948
53013
|
return e$1(Label$1, {
|
|
52949
|
-
id: prefixId(`${id}-${index}`, formId),
|
|
53014
|
+
id: prefixId$2(`${id}-${index}`, formId),
|
|
52950
53015
|
label: option.label,
|
|
52951
53016
|
class: classNames({
|
|
52952
53017
|
'fjs-checked': option.value === value
|
|
@@ -52956,7 +53021,8 @@
|
|
|
52956
53021
|
checked: option.value === value,
|
|
52957
53022
|
class: "fjs-input",
|
|
52958
53023
|
disabled: disabled,
|
|
52959
|
-
|
|
53024
|
+
readOnly: readonly,
|
|
53025
|
+
id: prefixId$2(`${id}-${index}`, formId),
|
|
52960
53026
|
type: "radio",
|
|
52961
53027
|
onClick: () => onChange(option.value),
|
|
52962
53028
|
"aria-describedby": errorMessageId
|
|
@@ -53028,6 +53094,7 @@
|
|
|
53028
53094
|
disabled,
|
|
53029
53095
|
errors,
|
|
53030
53096
|
field,
|
|
53097
|
+
readonly,
|
|
53031
53098
|
value
|
|
53032
53099
|
} = props;
|
|
53033
53100
|
const {
|
|
@@ -53100,11 +53167,11 @@
|
|
|
53100
53167
|
}, [isDropdownExpanded, isEscapeClosed]);
|
|
53101
53168
|
const displayState = d(() => {
|
|
53102
53169
|
const ds = {};
|
|
53103
|
-
ds.componentReady = !disabled && loadState === LOAD_STATES.LOADED;
|
|
53170
|
+
ds.componentReady = !disabled && !readonly && loadState === LOAD_STATES.LOADED;
|
|
53104
53171
|
ds.displayCross = ds.componentReady && value !== null && value !== undefined;
|
|
53105
|
-
ds.displayDropdown = !disabled && isDropdownExpanded && !isEscapeClosed;
|
|
53172
|
+
ds.displayDropdown = !disabled && !readonly && isDropdownExpanded && !isEscapeClosed;
|
|
53106
53173
|
return ds;
|
|
53107
|
-
}, [disabled, isDropdownExpanded, isEscapeClosed, loadState, value]);
|
|
53174
|
+
}, [disabled, isDropdownExpanded, isEscapeClosed, loadState, readonly, value]);
|
|
53108
53175
|
const onAngelMouseDown = A$1(e => {
|
|
53109
53176
|
setIsEscapeClose(false);
|
|
53110
53177
|
setIsDropdownExpanded(!isDropdownExpanded);
|
|
@@ -53114,17 +53181,19 @@
|
|
|
53114
53181
|
}, [isDropdownExpanded]);
|
|
53115
53182
|
return e$1(d$1, {
|
|
53116
53183
|
children: [e$1("div", {
|
|
53117
|
-
id: prefixId(`${id}`, formId),
|
|
53184
|
+
id: prefixId$2(`${id}`, formId),
|
|
53118
53185
|
class: classNames('fjs-input-group', {
|
|
53119
|
-
'disabled': disabled
|
|
53186
|
+
'disabled': disabled,
|
|
53187
|
+
'readonly': readonly
|
|
53120
53188
|
}, {
|
|
53121
53189
|
'hasErrors': errors.length
|
|
53122
53190
|
}),
|
|
53123
53191
|
children: [e$1("input", {
|
|
53124
53192
|
disabled: disabled,
|
|
53193
|
+
readOnly: readonly,
|
|
53125
53194
|
class: "fjs-input",
|
|
53126
53195
|
ref: searchbarRef,
|
|
53127
|
-
id: prefixId(`${id}-search`, formId),
|
|
53196
|
+
id: prefixId$2(`${id}-search`, formId),
|
|
53128
53197
|
onChange: onChange,
|
|
53129
53198
|
type: "text",
|
|
53130
53199
|
value: filter,
|
|
@@ -53177,6 +53246,7 @@
|
|
|
53177
53246
|
disabled,
|
|
53178
53247
|
errors,
|
|
53179
53248
|
field,
|
|
53249
|
+
readonly,
|
|
53180
53250
|
value
|
|
53181
53251
|
} = props;
|
|
53182
53252
|
const {
|
|
@@ -53202,9 +53272,9 @@
|
|
|
53202
53272
|
}, [field, props]);
|
|
53203
53273
|
const displayState = d(() => {
|
|
53204
53274
|
const ds = {};
|
|
53205
|
-
ds.componentReady = !disabled && loadState === LOAD_STATES.LOADED;
|
|
53275
|
+
ds.componentReady = !disabled && !readonly && loadState === LOAD_STATES.LOADED;
|
|
53206
53276
|
ds.displayCross = ds.componentReady && value !== null && value !== undefined;
|
|
53207
|
-
ds.displayDropdown = !disabled && isDropdownExpanded;
|
|
53277
|
+
ds.displayDropdown = !disabled && !readonly && isDropdownExpanded;
|
|
53208
53278
|
return ds;
|
|
53209
53279
|
}, [disabled, isDropdownExpanded, loadState, value]);
|
|
53210
53280
|
const onMouseDown = A$1(e => {
|
|
@@ -53221,9 +53291,10 @@
|
|
|
53221
53291
|
return e$1(d$1, {
|
|
53222
53292
|
children: [e$1("div", {
|
|
53223
53293
|
ref: selectRef,
|
|
53224
|
-
id: prefixId(`${id}`, formId),
|
|
53294
|
+
id: prefixId$2(`${id}`, formId),
|
|
53225
53295
|
class: classNames('fjs-input-group', {
|
|
53226
|
-
|
|
53296
|
+
disabled,
|
|
53297
|
+
readonly
|
|
53227
53298
|
}, {
|
|
53228
53299
|
'hasErrors': errors.length
|
|
53229
53300
|
}),
|
|
@@ -53234,14 +53305,14 @@
|
|
|
53234
53305
|
class: classNames('fjs-select-display', {
|
|
53235
53306
|
'fjs-select-placeholder': !value
|
|
53236
53307
|
}),
|
|
53237
|
-
id: prefixId(`${id}-display`, formId),
|
|
53308
|
+
id: prefixId$2(`${id}-display`, formId),
|
|
53238
53309
|
children: valueLabel || 'Select'
|
|
53239
53310
|
}), !disabled && e$1("input", {
|
|
53240
|
-
id: prefixId(`${id}-search`, formId),
|
|
53311
|
+
id: prefixId$2(`${id}-search`, formId),
|
|
53241
53312
|
class: "fjs-select-hidden-input",
|
|
53242
53313
|
value: valueLabel,
|
|
53243
|
-
onFocus: () => setIsDropdownExpanded(true),
|
|
53244
|
-
onBlur: () => setIsDropdownExpanded(false),
|
|
53314
|
+
onFocus: () => !readonly && setIsDropdownExpanded(true),
|
|
53315
|
+
onBlur: () => !readonly && setIsDropdownExpanded(false),
|
|
53245
53316
|
"aria-describedby": props['aria-describedby']
|
|
53246
53317
|
}), displayState.displayCross && e$1("span", {
|
|
53247
53318
|
class: "fjs-select-cross",
|
|
@@ -53276,6 +53347,7 @@
|
|
|
53276
53347
|
errors = [],
|
|
53277
53348
|
field,
|
|
53278
53349
|
onChange,
|
|
53350
|
+
readonly,
|
|
53279
53351
|
value
|
|
53280
53352
|
} = props;
|
|
53281
53353
|
const {
|
|
@@ -53291,7 +53363,7 @@
|
|
|
53291
53363
|
const {
|
|
53292
53364
|
formId
|
|
53293
53365
|
} = F$1(FormContext$1);
|
|
53294
|
-
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
53366
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId$2(id, formId)}-error-message`;
|
|
53295
53367
|
const selectProps = d(() => ({
|
|
53296
53368
|
id,
|
|
53297
53369
|
disabled,
|
|
@@ -53299,12 +53371,14 @@
|
|
|
53299
53371
|
field,
|
|
53300
53372
|
value,
|
|
53301
53373
|
onChange,
|
|
53374
|
+
readonly,
|
|
53302
53375
|
'aria-describedby': errorMessageId
|
|
53303
|
-
}), [disabled, errors, field, id, value, onChange, errorMessageId]);
|
|
53376
|
+
}), [disabled, errors, field, id, value, onChange, readonly, errorMessageId]);
|
|
53304
53377
|
return e$1("div", {
|
|
53305
53378
|
class: formFieldClasses(type$4, {
|
|
53306
53379
|
errors,
|
|
53307
|
-
disabled
|
|
53380
|
+
disabled,
|
|
53381
|
+
readonly
|
|
53308
53382
|
}),
|
|
53309
53383
|
onKeyDown: event => {
|
|
53310
53384
|
if (event.key === 'Enter') {
|
|
@@ -53313,7 +53387,7 @@
|
|
|
53313
53387
|
}
|
|
53314
53388
|
},
|
|
53315
53389
|
children: [e$1(Label$1, {
|
|
53316
|
-
id: prefixId(`${id}-search`, formId),
|
|
53390
|
+
id: prefixId$2(`${id}-search`, formId),
|
|
53317
53391
|
label: label,
|
|
53318
53392
|
required: required
|
|
53319
53393
|
}), searchable ? e$1(SearchableSelect, {
|
|
@@ -53357,6 +53431,7 @@
|
|
|
53357
53431
|
disabled,
|
|
53358
53432
|
errors = [],
|
|
53359
53433
|
field,
|
|
53434
|
+
readonly,
|
|
53360
53435
|
value: values = []
|
|
53361
53436
|
} = props;
|
|
53362
53437
|
const {
|
|
@@ -53371,7 +53446,7 @@
|
|
|
53371
53446
|
const {
|
|
53372
53447
|
formId
|
|
53373
53448
|
} = F$1(FormContext$1);
|
|
53374
|
-
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
53449
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId$2(id, formId)}-error-message`;
|
|
53375
53450
|
const [filter, setFilter] = l$2('');
|
|
53376
53451
|
const [filteredOptions, setFilteredOptions] = l$2([]);
|
|
53377
53452
|
const [isDropdownExpanded, setIsDropdownExpanded] = l$2(false);
|
|
@@ -53447,6 +53522,10 @@
|
|
|
53447
53522
|
break;
|
|
53448
53523
|
}
|
|
53449
53524
|
};
|
|
53525
|
+
const onBlur = () => {
|
|
53526
|
+
setIsDropdownExpanded(false);
|
|
53527
|
+
setFilter('');
|
|
53528
|
+
};
|
|
53450
53529
|
const onTagRemoveClick = (event, value) => {
|
|
53451
53530
|
const {
|
|
53452
53531
|
target
|
|
@@ -53463,7 +53542,8 @@
|
|
|
53463
53542
|
return e$1("div", {
|
|
53464
53543
|
class: formFieldClasses(type$3, {
|
|
53465
53544
|
errors,
|
|
53466
|
-
disabled
|
|
53545
|
+
disabled,
|
|
53546
|
+
readonly
|
|
53467
53547
|
}),
|
|
53468
53548
|
onKeyDown: event => {
|
|
53469
53549
|
if (event.key === 'Enter') {
|
|
@@ -53474,23 +53554,25 @@
|
|
|
53474
53554
|
children: [e$1(Label$1, {
|
|
53475
53555
|
label: label,
|
|
53476
53556
|
required: required,
|
|
53477
|
-
id: prefixId(`${id}-search`, formId)
|
|
53557
|
+
id: prefixId$2(`${id}-search`, formId)
|
|
53478
53558
|
}), e$1("div", {
|
|
53479
53559
|
class: classNames('fjs-taglist', {
|
|
53480
|
-
'fjs-disabled': disabled
|
|
53560
|
+
'fjs-disabled': disabled,
|
|
53561
|
+
'fjs-readonly': readonly
|
|
53481
53562
|
}),
|
|
53482
53563
|
children: [loadState === LOAD_STATES.LOADED && e$1("div", {
|
|
53483
53564
|
class: "fjs-taglist-tags",
|
|
53484
53565
|
children: values.map(v => {
|
|
53485
53566
|
return e$1("div", {
|
|
53486
53567
|
class: classNames('fjs-taglist-tag', {
|
|
53487
|
-
'fjs-disabled': disabled
|
|
53568
|
+
'fjs-disabled': disabled,
|
|
53569
|
+
'fjs-readonly': readonly
|
|
53488
53570
|
}),
|
|
53489
53571
|
onMouseDown: e => e.preventDefault(),
|
|
53490
53572
|
children: [e$1("span", {
|
|
53491
53573
|
class: "fjs-taglist-tag-label",
|
|
53492
53574
|
children: valueToOptionMap[v] ? valueToOptionMap[v].label : `unexpected value{${v}}`
|
|
53493
|
-
}), !disabled && e$1("button", {
|
|
53575
|
+
}), !disabled && !readonly && e$1("button", {
|
|
53494
53576
|
type: "button",
|
|
53495
53577
|
title: "Remove tag",
|
|
53496
53578
|
class: "fjs-taglist-tag-remove",
|
|
@@ -53501,20 +53583,20 @@
|
|
|
53501
53583
|
})
|
|
53502
53584
|
}), e$1("input", {
|
|
53503
53585
|
disabled: disabled,
|
|
53586
|
+
readOnly: readonly,
|
|
53504
53587
|
class: "fjs-taglist-input",
|
|
53505
53588
|
ref: searchbarRef,
|
|
53506
|
-
id: prefixId(`${id}-search`, formId),
|
|
53589
|
+
id: prefixId$2(`${id}-search`, formId),
|
|
53507
53590
|
onChange: onFilterChange,
|
|
53508
53591
|
type: "text",
|
|
53509
53592
|
value: filter,
|
|
53510
|
-
placeholder: disabled ? undefined : 'Search',
|
|
53593
|
+
placeholder: disabled || readonly ? undefined : 'Search',
|
|
53511
53594
|
autoComplete: "off",
|
|
53512
53595
|
onKeyDown: onInputKeyDown,
|
|
53513
53596
|
onMouseDown: () => setIsEscapeClose(false),
|
|
53514
|
-
onFocus: () => setIsDropdownExpanded(true),
|
|
53597
|
+
onFocus: () => !readonly && setIsDropdownExpanded(true),
|
|
53515
53598
|
onBlur: () => {
|
|
53516
|
-
|
|
53517
|
-
setFilter('');
|
|
53599
|
+
!readonly && onBlur();
|
|
53518
53600
|
},
|
|
53519
53601
|
"aria-describedby": errorMessageId
|
|
53520
53602
|
})]
|
|
@@ -53647,6 +53729,7 @@
|
|
|
53647
53729
|
disabled,
|
|
53648
53730
|
errors = [],
|
|
53649
53731
|
field,
|
|
53732
|
+
readonly,
|
|
53650
53733
|
value = ''
|
|
53651
53734
|
} = props;
|
|
53652
53735
|
const {
|
|
@@ -53674,24 +53757,27 @@
|
|
|
53674
53757
|
const {
|
|
53675
53758
|
formId
|
|
53676
53759
|
} = F$1(FormContext$1);
|
|
53677
|
-
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
53760
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId$2(id, formId)}-error-message`;
|
|
53678
53761
|
return e$1("div", {
|
|
53679
53762
|
class: formFieldClasses(type$1, {
|
|
53680
53763
|
errors,
|
|
53681
|
-
disabled
|
|
53764
|
+
disabled,
|
|
53765
|
+
readonly
|
|
53682
53766
|
}),
|
|
53683
53767
|
children: [e$1(Label$1, {
|
|
53684
|
-
id: prefixId(id, formId),
|
|
53768
|
+
id: prefixId$2(id, formId),
|
|
53685
53769
|
label: label,
|
|
53686
53770
|
required: required
|
|
53687
53771
|
}), e$1(InputAdorner, {
|
|
53688
53772
|
disabled: disabled,
|
|
53773
|
+
readonly: readonly,
|
|
53689
53774
|
pre: prefixAdorner,
|
|
53690
53775
|
post: suffixAdorner,
|
|
53691
53776
|
children: e$1("input", {
|
|
53692
53777
|
class: "fjs-input",
|
|
53693
53778
|
disabled: disabled,
|
|
53694
|
-
|
|
53779
|
+
readOnly: readonly,
|
|
53780
|
+
id: prefixId$2(id, formId),
|
|
53695
53781
|
onInput: onChange,
|
|
53696
53782
|
type: "text",
|
|
53697
53783
|
value: value,
|
|
@@ -53734,6 +53820,7 @@
|
|
|
53734
53820
|
disabled,
|
|
53735
53821
|
errors = [],
|
|
53736
53822
|
field,
|
|
53823
|
+
readonly,
|
|
53737
53824
|
value = ''
|
|
53738
53825
|
} = props;
|
|
53739
53826
|
const {
|
|
@@ -53773,20 +53860,22 @@
|
|
|
53773
53860
|
const {
|
|
53774
53861
|
formId
|
|
53775
53862
|
} = F$1(FormContext$1);
|
|
53776
|
-
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
53863
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId$2(id, formId)}-error-message`;
|
|
53777
53864
|
return e$1("div", {
|
|
53778
53865
|
class: formFieldClasses(type, {
|
|
53779
53866
|
errors,
|
|
53780
|
-
disabled
|
|
53867
|
+
disabled,
|
|
53868
|
+
readonly
|
|
53781
53869
|
}),
|
|
53782
53870
|
children: [e$1(Label$1, {
|
|
53783
|
-
id: prefixId(id, formId),
|
|
53871
|
+
id: prefixId$2(id, formId),
|
|
53784
53872
|
label: label,
|
|
53785
53873
|
required: required
|
|
53786
53874
|
}), e$1("textarea", {
|
|
53787
53875
|
class: "fjs-textarea",
|
|
53788
53876
|
disabled: disabled,
|
|
53789
|
-
|
|
53877
|
+
readonly: readonly,
|
|
53878
|
+
id: prefixId$2(id, formId),
|
|
53790
53879
|
onInput: onInput,
|
|
53791
53880
|
value: value,
|
|
53792
53881
|
ref: textareaRef,
|
|
@@ -54461,7 +54550,7 @@
|
|
|
54461
54550
|
const {
|
|
54462
54551
|
properties
|
|
54463
54552
|
} = this._getState();
|
|
54464
|
-
if (properties.readOnly) {
|
|
54553
|
+
if (properties.readOnly || properties.disabled) {
|
|
54465
54554
|
throw new Error('form is read-only');
|
|
54466
54555
|
}
|
|
54467
54556
|
const data = this._getSubmitData();
|
|
@@ -54689,7 +54778,7 @@
|
|
|
54689
54778
|
return conditionChecker.applyConditions(toFilter, data);
|
|
54690
54779
|
}
|
|
54691
54780
|
}
|
|
54692
|
-
const schemaVersion =
|
|
54781
|
+
const schemaVersion = 9;
|
|
54693
54782
|
|
|
54694
54783
|
/**
|
|
54695
54784
|
* Flatten array, one level deep.
|
|
@@ -56893,6 +56982,15 @@
|
|
|
56893
56982
|
'&.cm-editor.cm-focused': {
|
|
56894
56983
|
outline: 'none'
|
|
56895
56984
|
},
|
|
56985
|
+
'& .cm-completionInfo': {
|
|
56986
|
+
whiteSpace: 'pre-wrap',
|
|
56987
|
+
overflow: 'hidden',
|
|
56988
|
+
textOverflow: 'ellipsis'
|
|
56989
|
+
},
|
|
56990
|
+
// Don't wrap whitespace for custom HTML
|
|
56991
|
+
'& .cm-completionInfo > *': {
|
|
56992
|
+
whiteSpace: 'normal'
|
|
56993
|
+
},
|
|
56896
56994
|
'& .cm-completionInfo ul': {
|
|
56897
56995
|
margin: 0,
|
|
56898
56996
|
paddingLeft: '15px'
|
|
@@ -59738,9 +59836,17 @@
|
|
|
59738
59836
|
eventBus.on('selection.changed', scrollIntoView);
|
|
59739
59837
|
return () => eventBus.off('selection.changed', scrollIntoView);
|
|
59740
59838
|
}, [id]);
|
|
59839
|
+
h(() => {
|
|
59840
|
+
if (selection.isSelected(field)) {
|
|
59841
|
+
ref.current.focus();
|
|
59842
|
+
}
|
|
59843
|
+
}, [selection, field]);
|
|
59741
59844
|
function onClick(event) {
|
|
59742
59845
|
event.stopPropagation();
|
|
59743
59846
|
selection.toggle(field);
|
|
59847
|
+
|
|
59848
|
+
// properly focus on field
|
|
59849
|
+
ref.current.focus();
|
|
59744
59850
|
}
|
|
59745
59851
|
const classes = [];
|
|
59746
59852
|
if (props.class) {
|
|
@@ -59755,11 +59861,19 @@
|
|
|
59755
59861
|
const index = getFormFieldIndex(parentField, field);
|
|
59756
59862
|
modeling.removeFormField(field, parentField, index);
|
|
59757
59863
|
};
|
|
59864
|
+
const onKeyPress = event => {
|
|
59865
|
+
if (event.key === 'Enter') {
|
|
59866
|
+
event.stopPropagation();
|
|
59867
|
+
selection.toggle(field);
|
|
59868
|
+
}
|
|
59869
|
+
};
|
|
59758
59870
|
return e$1("div", {
|
|
59759
59871
|
class: classes.join(' '),
|
|
59760
59872
|
"data-id": id,
|
|
59761
59873
|
"data-field-type": type,
|
|
59874
|
+
tabIndex: type === 'default' ? -1 : 0,
|
|
59762
59875
|
onClick: onClick,
|
|
59876
|
+
onKeyPress: onKeyPress,
|
|
59763
59877
|
ref: ref,
|
|
59764
59878
|
children: [e$1(DebugColumns, {
|
|
59765
59879
|
field: field
|
|
@@ -59952,7 +60066,7 @@
|
|
|
59952
60066
|
errors: {},
|
|
59953
60067
|
properties: {
|
|
59954
60068
|
ariaLabel,
|
|
59955
|
-
|
|
60069
|
+
disabled: true
|
|
59956
60070
|
},
|
|
59957
60071
|
schema
|
|
59958
60072
|
};
|
|
@@ -62316,44 +62430,18 @@
|
|
|
62316
62430
|
fill: "none",
|
|
62317
62431
|
xmlns: "http://www.w3.org/2000/svg"
|
|
62318
62432
|
};
|
|
62319
|
-
var
|
|
62433
|
+
var FeelIcon$1 = function FeelIcon(props) {
|
|
62320
62434
|
return e$1("svg", {
|
|
62321
62435
|
...props,
|
|
62322
|
-
children:
|
|
62323
|
-
d: "
|
|
62324
|
-
fill: "
|
|
62325
|
-
})
|
|
62326
|
-
fillRule: "evenodd",
|
|
62327
|
-
clipRule: "evenodd",
|
|
62328
|
-
d: "M8 3.268A4.732 4.732 0 1 0 12.732 8H14a6 6 0 1 1-6-6v1.268Z",
|
|
62329
|
-
fill: "currentColor"
|
|
62330
|
-
}), e$1("path", {
|
|
62331
|
-
d: "m11.28 6.072-.832-.56 1.016-1.224L10 3.848l.312-.912 1.392.584L11.632 2h1.032l-.072 1.52 1.392-.584.312.912-1.464.44 1.008 1.224-.832.552-.864-1.296-.864 1.304Z",
|
|
62332
|
-
fill: "currentColor"
|
|
62333
|
-
})]
|
|
62334
|
-
});
|
|
62335
|
-
};
|
|
62336
|
-
FeelRequiredIcon.defaultProps = {
|
|
62337
|
-
viewBox: "0 0 16 16",
|
|
62338
|
-
fill: "none",
|
|
62339
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
62340
|
-
};
|
|
62341
|
-
var FeelOptionalIcon = function FeelOptionalIcon(props) {
|
|
62342
|
-
return e$1("svg", {
|
|
62343
|
-
...props,
|
|
62344
|
-
children: [e$1("path", {
|
|
62345
|
-
d: "M5.845 7.04V5.93h4.307v1.11H5.845Zm0 3.07V9h4.307v1.11H5.845Z",
|
|
62346
|
-
fill: "currentColor"
|
|
62347
|
-
}), e$1("path", {
|
|
62348
|
-
fillRule: "evenodd",
|
|
62349
|
-
clipRule: "evenodd",
|
|
62350
|
-
d: "M3.286 8a4.714 4.714 0 1 0 9.428 0 4.714 4.714 0 0 0-9.428 0ZM8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z",
|
|
62351
|
-
fill: "currentColor"
|
|
62352
|
-
})]
|
|
62436
|
+
children: e$1("path", {
|
|
62437
|
+
d: "M3.617 11.99c-.137.684-.392 1.19-.765 1.518-.362.328-.882.492-1.558.492H0l.309-1.579h1.264l1.515-7.64h-.912l.309-1.579h.911l.236-1.191c.137-.685.387-1.192.75-1.52C4.753.164 5.277 0 5.953 0h1.294L6.94 1.579H5.675l-.323 1.623h1.264l-.309 1.579H5.043l-1.426 7.208ZM5.605 11.021l3.029-4.155L7.28 3.202h2.073l.706 2.547h.176l1.691-2.547H14l-3.014 4.051 1.338 3.768H10.25l-.706-2.606H9.37L7.678 11.02H5.605Z",
|
|
62438
|
+
fill: "currentcolor"
|
|
62439
|
+
})
|
|
62353
62440
|
});
|
|
62354
62441
|
};
|
|
62355
|
-
|
|
62356
|
-
|
|
62442
|
+
FeelIcon$1.defaultProps = {
|
|
62443
|
+
width: "14",
|
|
62444
|
+
height: "14",
|
|
62357
62445
|
fill: "none",
|
|
62358
62446
|
xmlns: "http://www.w3.org/2000/svg"
|
|
62359
62447
|
};
|
|
@@ -62593,6 +62681,18 @@
|
|
|
62593
62681
|
* @param {setSticky} setSticky
|
|
62594
62682
|
*/
|
|
62595
62683
|
function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
|
|
62684
|
+
const [scrollContainer, setScrollContainer] = l$2(query(scrollContainerSelector));
|
|
62685
|
+
const updateScrollContainer = A$1(() => {
|
|
62686
|
+
const newScrollContainer = query(scrollContainerSelector);
|
|
62687
|
+
if (newScrollContainer !== scrollContainer) {
|
|
62688
|
+
setScrollContainer(newScrollContainer);
|
|
62689
|
+
}
|
|
62690
|
+
}, [scrollContainerSelector, scrollContainer]);
|
|
62691
|
+
y(() => {
|
|
62692
|
+
updateScrollContainer();
|
|
62693
|
+
}, [updateScrollContainer]);
|
|
62694
|
+
useEvent('propertiesPanel.attach', updateScrollContainer);
|
|
62695
|
+
useEvent('propertiesPanel.detach', updateScrollContainer);
|
|
62596
62696
|
y(() => {
|
|
62597
62697
|
const Observer = IntersectionObserver;
|
|
62598
62698
|
|
|
@@ -62600,33 +62700,36 @@
|
|
|
62600
62700
|
if (!Observer) {
|
|
62601
62701
|
return;
|
|
62602
62702
|
}
|
|
62603
|
-
|
|
62604
|
-
|
|
62605
|
-
|
|
62606
|
-
|
|
62607
|
-
entries.forEach(entry => {
|
|
62608
|
-
if (entry.intersectionRatio < 1) {
|
|
62609
|
-
setSticky(true);
|
|
62610
|
-
} else if (entry.intersectionRatio === 1) {
|
|
62611
|
-
setSticky(false);
|
|
62612
|
-
}
|
|
62613
|
-
});
|
|
62614
|
-
}, {
|
|
62615
|
-
root: scrollContainer,
|
|
62616
|
-
rootMargin: '0px 0px 999999% 0px',
|
|
62617
|
-
// Use bottom margin to avoid stickyness when scrolling out to bottom
|
|
62618
|
-
threshold: [1]
|
|
62619
|
-
});
|
|
62620
|
-
observer.observe(ref.current);
|
|
62703
|
+
|
|
62704
|
+
// TODO(@barmac): test this
|
|
62705
|
+
if (!ref.current || !scrollContainer) {
|
|
62706
|
+
return;
|
|
62621
62707
|
}
|
|
62708
|
+
const observer = new Observer(entries => {
|
|
62709
|
+
// scroll container is unmounted, do not update sticky state
|
|
62710
|
+
if (scrollContainer.scrollHeight === 0) {
|
|
62711
|
+
return;
|
|
62712
|
+
}
|
|
62713
|
+
entries.forEach(entry => {
|
|
62714
|
+
if (entry.intersectionRatio < 1) {
|
|
62715
|
+
setSticky(true);
|
|
62716
|
+
} else if (entry.intersectionRatio === 1) {
|
|
62717
|
+
setSticky(false);
|
|
62718
|
+
}
|
|
62719
|
+
});
|
|
62720
|
+
}, {
|
|
62721
|
+
root: scrollContainer,
|
|
62722
|
+
rootMargin: '0px 0px 999999% 0px',
|
|
62723
|
+
// Use bottom margin to avoid stickyness when scrolling out to bottom
|
|
62724
|
+
threshold: [1]
|
|
62725
|
+
});
|
|
62726
|
+
observer.observe(ref.current);
|
|
62622
62727
|
|
|
62623
62728
|
// Unobserve if unmounted
|
|
62624
62729
|
return () => {
|
|
62625
|
-
|
|
62626
|
-
observer.unobserve(ref.current);
|
|
62627
|
-
}
|
|
62730
|
+
observer.unobserve(ref.current);
|
|
62628
62731
|
};
|
|
62629
|
-
}, [ref,
|
|
62732
|
+
}, [ref.current, scrollContainer, setSticky]);
|
|
62630
62733
|
}
|
|
62631
62734
|
|
|
62632
62735
|
/**
|
|
@@ -62759,9 +62862,7 @@
|
|
|
62759
62862
|
})
|
|
62760
62863
|
});
|
|
62761
62864
|
}
|
|
62762
|
-
const DEFAULT_LAYOUT = {
|
|
62763
|
-
open: true
|
|
62764
|
-
};
|
|
62865
|
+
const DEFAULT_LAYOUT = {};
|
|
62765
62866
|
const DEFAULT_DESCRIPTION = {};
|
|
62766
62867
|
|
|
62767
62868
|
/**
|
|
@@ -62848,7 +62949,7 @@
|
|
|
62848
62949
|
const [layout, setLayout] = l$2(createLayout(layoutConfig));
|
|
62849
62950
|
|
|
62850
62951
|
// react to external changes in the layout config
|
|
62851
|
-
|
|
62952
|
+
useUpdateLayoutEffect(() => {
|
|
62852
62953
|
const newLayout = createLayout(layoutConfig);
|
|
62853
62954
|
setLayout(newLayout);
|
|
62854
62955
|
}, [layoutConfig]);
|
|
@@ -62925,7 +63026,7 @@
|
|
|
62925
63026
|
children: e$1(EventContext.Provider, {
|
|
62926
63027
|
value: eventContext,
|
|
62927
63028
|
children: e$1("div", {
|
|
62928
|
-
class:
|
|
63029
|
+
class: "bio-properties-panel",
|
|
62929
63030
|
children: [e$1(Header, {
|
|
62930
63031
|
element: element,
|
|
62931
63032
|
headerProvider: headerProvider
|
|
@@ -62969,14 +63070,14 @@
|
|
|
62969
63070
|
// hooks //////////////////
|
|
62970
63071
|
|
|
62971
63072
|
/**
|
|
62972
|
-
* This hook behaves like
|
|
63073
|
+
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
62973
63074
|
*
|
|
62974
63075
|
* @param {Function} effect
|
|
62975
63076
|
* @param {Array} deps
|
|
62976
63077
|
*/
|
|
62977
|
-
function
|
|
63078
|
+
function useUpdateLayoutEffect(effect, deps) {
|
|
62978
63079
|
const isMounted = s$1(false);
|
|
62979
|
-
|
|
63080
|
+
h(() => {
|
|
62980
63081
|
if (isMounted.current) {
|
|
62981
63082
|
return effect();
|
|
62982
63083
|
} else {
|
|
@@ -63594,14 +63695,13 @@
|
|
|
63594
63695
|
*/
|
|
63595
63696
|
function FeelIcon(props) {
|
|
63596
63697
|
const {
|
|
63597
|
-
label,
|
|
63598
63698
|
feel = false,
|
|
63599
63699
|
active,
|
|
63600
63700
|
disabled = false,
|
|
63601
63701
|
onClick = noop$2
|
|
63602
63702
|
} = props;
|
|
63603
|
-
const feelRequiredLabel = '
|
|
63604
|
-
const feelOptionalLabel = '
|
|
63703
|
+
const feelRequiredLabel = 'FEEL expression is mandatory';
|
|
63704
|
+
const feelOptionalLabel = `Click to ${active ? 'remove' : 'set a'} dynamic value with FEEL expression`;
|
|
63605
63705
|
const handleClick = e => {
|
|
63606
63706
|
onClick(e);
|
|
63607
63707
|
|
|
@@ -63614,10 +63714,124 @@
|
|
|
63614
63714
|
class: classNames('bio-properties-panel-feel-icon', active ? 'active' : null, feel === 'required' ? 'required' : 'optional'),
|
|
63615
63715
|
onClick: handleClick,
|
|
63616
63716
|
disabled: feel === 'required' || disabled,
|
|
63617
|
-
title:
|
|
63618
|
-
children:
|
|
63717
|
+
title: feel === 'required' ? feelRequiredLabel : feelOptionalLabel,
|
|
63718
|
+
children: e$1(FeelIcon$1, {})
|
|
63619
63719
|
});
|
|
63620
63720
|
}
|
|
63721
|
+
function ToggleSwitch(props) {
|
|
63722
|
+
const {
|
|
63723
|
+
id,
|
|
63724
|
+
label,
|
|
63725
|
+
onInput,
|
|
63726
|
+
value,
|
|
63727
|
+
switcherLabel,
|
|
63728
|
+
inline,
|
|
63729
|
+
onFocus,
|
|
63730
|
+
onBlur,
|
|
63731
|
+
inputRef
|
|
63732
|
+
} = props;
|
|
63733
|
+
const [localValue, setLocalValue] = l$2(value);
|
|
63734
|
+
const handleInputCallback = async () => {
|
|
63735
|
+
onInput(!value);
|
|
63736
|
+
};
|
|
63737
|
+
const handleInput = e => {
|
|
63738
|
+
handleInputCallback();
|
|
63739
|
+
setLocalValue(e.target.value);
|
|
63740
|
+
};
|
|
63741
|
+
y(() => {
|
|
63742
|
+
if (value === localValue) {
|
|
63743
|
+
return;
|
|
63744
|
+
}
|
|
63745
|
+
setLocalValue(value);
|
|
63746
|
+
}, [value]);
|
|
63747
|
+
return e$1("div", {
|
|
63748
|
+
class: classNames('bio-properties-panel-toggle-switch', {
|
|
63749
|
+
inline
|
|
63750
|
+
}),
|
|
63751
|
+
children: [e$1("label", {
|
|
63752
|
+
class: "bio-properties-panel-label",
|
|
63753
|
+
for: prefixId$6(id),
|
|
63754
|
+
children: label
|
|
63755
|
+
}), e$1("div", {
|
|
63756
|
+
class: "bio-properties-panel-field-wrapper",
|
|
63757
|
+
children: [e$1("label", {
|
|
63758
|
+
class: "bio-properties-panel-toggle-switch__switcher",
|
|
63759
|
+
children: [e$1("input", {
|
|
63760
|
+
ref: inputRef,
|
|
63761
|
+
id: prefixId$6(id),
|
|
63762
|
+
class: "bio-properties-panel-input",
|
|
63763
|
+
type: "checkbox",
|
|
63764
|
+
onFocus: onFocus,
|
|
63765
|
+
onBlur: onBlur,
|
|
63766
|
+
name: id,
|
|
63767
|
+
onInput: handleInput,
|
|
63768
|
+
checked: !!localValue
|
|
63769
|
+
}), e$1("span", {
|
|
63770
|
+
class: "bio-properties-panel-toggle-switch__slider"
|
|
63771
|
+
})]
|
|
63772
|
+
}), switcherLabel && e$1("p", {
|
|
63773
|
+
class: "bio-properties-panel-toggle-switch__label",
|
|
63774
|
+
children: switcherLabel
|
|
63775
|
+
})]
|
|
63776
|
+
})]
|
|
63777
|
+
});
|
|
63778
|
+
}
|
|
63779
|
+
|
|
63780
|
+
/**
|
|
63781
|
+
* @param {Object} props
|
|
63782
|
+
* @param {Object} props.element
|
|
63783
|
+
* @param {String} props.id
|
|
63784
|
+
* @param {String} props.description
|
|
63785
|
+
* @param {String} props.label
|
|
63786
|
+
* @param {String} props.switcherLabel
|
|
63787
|
+
* @param {Boolean} props.inline
|
|
63788
|
+
* @param {Function} props.getValue
|
|
63789
|
+
* @param {Function} props.setValue
|
|
63790
|
+
* @param {Function} props.onFocus
|
|
63791
|
+
* @param {Function} props.onBlur
|
|
63792
|
+
*/
|
|
63793
|
+
function ToggleSwitchEntry(props) {
|
|
63794
|
+
const {
|
|
63795
|
+
element,
|
|
63796
|
+
id,
|
|
63797
|
+
description,
|
|
63798
|
+
label,
|
|
63799
|
+
switcherLabel,
|
|
63800
|
+
inline,
|
|
63801
|
+
getValue,
|
|
63802
|
+
setValue,
|
|
63803
|
+
onFocus,
|
|
63804
|
+
onBlur
|
|
63805
|
+
} = props;
|
|
63806
|
+
const value = getValue(element);
|
|
63807
|
+
return e$1("div", {
|
|
63808
|
+
class: "bio-properties-panel-entry bio-properties-panel-toggle-switch-entry",
|
|
63809
|
+
"data-entry-id": id,
|
|
63810
|
+
children: [e$1(ToggleSwitch, {
|
|
63811
|
+
id: id,
|
|
63812
|
+
label: label,
|
|
63813
|
+
value: value,
|
|
63814
|
+
onInput: setValue,
|
|
63815
|
+
onFocus: onFocus,
|
|
63816
|
+
onBlur: onBlur,
|
|
63817
|
+
switcherLabel: switcherLabel,
|
|
63818
|
+
inline: inline
|
|
63819
|
+
}), e$1(Description$1, {
|
|
63820
|
+
forId: id,
|
|
63821
|
+
element: element,
|
|
63822
|
+
value: description
|
|
63823
|
+
})]
|
|
63824
|
+
});
|
|
63825
|
+
}
|
|
63826
|
+
function isEdited$7(node) {
|
|
63827
|
+
return node && !!node.checked;
|
|
63828
|
+
}
|
|
63829
|
+
|
|
63830
|
+
// helpers /////////////////
|
|
63831
|
+
|
|
63832
|
+
function prefixId$6(id) {
|
|
63833
|
+
return `bio-properties-panel-${id}`;
|
|
63834
|
+
}
|
|
63621
63835
|
const noop$1 = () => {};
|
|
63622
63836
|
function FeelTextfield(props) {
|
|
63623
63837
|
const {
|
|
@@ -63636,8 +63850,8 @@
|
|
|
63636
63850
|
const [localValue, _setLocalValue] = l$2(value);
|
|
63637
63851
|
const editorRef = useShowEntryEvent(id);
|
|
63638
63852
|
const containerRef = s$1();
|
|
63639
|
-
const feelActive = localValue.startsWith('=') || feel === 'required';
|
|
63640
|
-
const feelOnlyValue = localValue.startsWith('=') ? localValue.substring(1) : localValue;
|
|
63853
|
+
const feelActive = isString(localValue) && localValue.startsWith('=') || feel === 'required';
|
|
63854
|
+
const feelOnlyValue = isString(localValue) && localValue.startsWith('=') ? localValue.substring(1) : localValue;
|
|
63641
63855
|
const [focus, _setFocus] = l$2(undefined);
|
|
63642
63856
|
const setFocus = (offset = 0) => {
|
|
63643
63857
|
const hasFocus = containerRef.current.contains(document.activeElement);
|
|
@@ -63677,7 +63891,7 @@
|
|
|
63677
63891
|
return;
|
|
63678
63892
|
}
|
|
63679
63893
|
setLocalValue(newValue);
|
|
63680
|
-
if (!feelActive && newValue.startsWith('=')) {
|
|
63894
|
+
if (!feelActive && isString(newValue) && newValue.startsWith('=')) {
|
|
63681
63895
|
// focus is behind `=` sign that will be removed
|
|
63682
63896
|
setFocus(-1);
|
|
63683
63897
|
}
|
|
@@ -63740,9 +63954,11 @@
|
|
|
63740
63954
|
};
|
|
63741
63955
|
}, [containerRef, feelActive, handleFeelToggle, setFocus]);
|
|
63742
63956
|
return e$1("div", {
|
|
63743
|
-
class:
|
|
63957
|
+
class: classNames('bio-properties-panel-feel-entry', {
|
|
63958
|
+
'feel-active': feelActive
|
|
63959
|
+
}),
|
|
63744
63960
|
children: [e$1("label", {
|
|
63745
|
-
for: prefixId$
|
|
63961
|
+
for: prefixId$5(id),
|
|
63746
63962
|
class: "bio-properties-panel-label",
|
|
63747
63963
|
onClick: () => setFocus(),
|
|
63748
63964
|
children: [label, e$1(FeelIcon, {
|
|
@@ -63759,7 +63975,7 @@
|
|
|
63759
63975
|
disabled: feel !== 'optional' || disabled,
|
|
63760
63976
|
onClick: handleFeelToggle
|
|
63761
63977
|
}), feelActive ? e$1(CodeEditor, {
|
|
63762
|
-
id: prefixId$
|
|
63978
|
+
id: prefixId$5(id),
|
|
63763
63979
|
name: id,
|
|
63764
63980
|
onInput: handleLocalInput,
|
|
63765
63981
|
disabled: disabled,
|
|
@@ -63776,7 +63992,8 @@
|
|
|
63776
63992
|
...props,
|
|
63777
63993
|
onInput: handleLocalInput,
|
|
63778
63994
|
contentAttributes: {
|
|
63779
|
-
'id': prefixId$
|
|
63995
|
+
'id': prefixId$5(id),
|
|
63996
|
+
'aria-label': label
|
|
63780
63997
|
},
|
|
63781
63998
|
value: localValue,
|
|
63782
63999
|
ref: editorRef
|
|
@@ -63813,7 +64030,7 @@
|
|
|
63813
64030
|
}
|
|
63814
64031
|
};
|
|
63815
64032
|
return e$1("input", {
|
|
63816
|
-
id: prefixId$
|
|
64033
|
+
id: prefixId$5(id),
|
|
63817
64034
|
type: "text",
|
|
63818
64035
|
ref: inputRef,
|
|
63819
64036
|
name: id,
|
|
@@ -63851,7 +64068,7 @@
|
|
|
63851
64068
|
}
|
|
63852
64069
|
};
|
|
63853
64070
|
return e$1("textarea", {
|
|
63854
|
-
id: prefixId$
|
|
64071
|
+
id: prefixId$5(id),
|
|
63855
64072
|
type: "text",
|
|
63856
64073
|
ref: inputRef,
|
|
63857
64074
|
name: id,
|
|
@@ -63866,6 +64083,78 @@
|
|
|
63866
64083
|
"data-gramm": "false"
|
|
63867
64084
|
});
|
|
63868
64085
|
});
|
|
64086
|
+
const OptionalFeelToggleSwitch = x((props, ref) => {
|
|
64087
|
+
const {
|
|
64088
|
+
id,
|
|
64089
|
+
onInput,
|
|
64090
|
+
value,
|
|
64091
|
+
onFocus,
|
|
64092
|
+
onBlur,
|
|
64093
|
+
switcherLabel
|
|
64094
|
+
} = props;
|
|
64095
|
+
const inputRef = s$1();
|
|
64096
|
+
|
|
64097
|
+
// To be consistent with the FEEL editor, set focus at start of input
|
|
64098
|
+
// this ensures clean editing experience when switching with the keyboard
|
|
64099
|
+
ref.current = {
|
|
64100
|
+
focus: () => {
|
|
64101
|
+
const input = inputRef.current;
|
|
64102
|
+
if (!input) {
|
|
64103
|
+
return;
|
|
64104
|
+
}
|
|
64105
|
+
input.focus();
|
|
64106
|
+
}
|
|
64107
|
+
};
|
|
64108
|
+
return e$1(ToggleSwitch, {
|
|
64109
|
+
id: id,
|
|
64110
|
+
value: value,
|
|
64111
|
+
inputRef: inputRef,
|
|
64112
|
+
onInput: onInput,
|
|
64113
|
+
onFocus: onFocus,
|
|
64114
|
+
onBlur: onBlur,
|
|
64115
|
+
switcherLabel: switcherLabel
|
|
64116
|
+
});
|
|
64117
|
+
});
|
|
64118
|
+
x((props, ref) => {
|
|
64119
|
+
const {
|
|
64120
|
+
id,
|
|
64121
|
+
disabled,
|
|
64122
|
+
onInput,
|
|
64123
|
+
value,
|
|
64124
|
+
onFocus,
|
|
64125
|
+
onBlur
|
|
64126
|
+
} = props;
|
|
64127
|
+
const inputRef = s$1();
|
|
64128
|
+
const handleChange = ({
|
|
64129
|
+
target
|
|
64130
|
+
}) => {
|
|
64131
|
+
onInput(target.checked);
|
|
64132
|
+
};
|
|
64133
|
+
|
|
64134
|
+
// To be consistent with the FEEL editor, set focus at start of input
|
|
64135
|
+
// this ensures clean editing experience when switching with the keyboard
|
|
64136
|
+
ref.current = {
|
|
64137
|
+
focus: () => {
|
|
64138
|
+
const input = inputRef.current;
|
|
64139
|
+
if (!input) {
|
|
64140
|
+
return;
|
|
64141
|
+
}
|
|
64142
|
+
input.focus();
|
|
64143
|
+
}
|
|
64144
|
+
};
|
|
64145
|
+
return e$1("input", {
|
|
64146
|
+
ref: inputRef,
|
|
64147
|
+
id: prefixId$5(id),
|
|
64148
|
+
name: id,
|
|
64149
|
+
onFocus: onFocus,
|
|
64150
|
+
onBlur: onBlur,
|
|
64151
|
+
type: "checkbox",
|
|
64152
|
+
class: "bio-properties-panel-input",
|
|
64153
|
+
onChange: handleChange,
|
|
64154
|
+
checked: value,
|
|
64155
|
+
disabled: disabled
|
|
64156
|
+
});
|
|
64157
|
+
});
|
|
63869
64158
|
|
|
63870
64159
|
/**
|
|
63871
64160
|
* @param {Object} props
|
|
@@ -63973,6 +64262,33 @@
|
|
|
63973
64262
|
});
|
|
63974
64263
|
}
|
|
63975
64264
|
|
|
64265
|
+
/**
|
|
64266
|
+
* @param {Object} props
|
|
64267
|
+
* @param {Object} props.element
|
|
64268
|
+
* @param {String} props.id
|
|
64269
|
+
* @param {String} props.description
|
|
64270
|
+
* @param {Boolean} props.debounce
|
|
64271
|
+
* @param {Boolean} props.disabled
|
|
64272
|
+
* @param {Boolean} props.feel
|
|
64273
|
+
* @param {String} props.label
|
|
64274
|
+
* @param {Function} props.getValue
|
|
64275
|
+
* @param {Function} props.setValue
|
|
64276
|
+
* @param {Function} props.tooltipContainer
|
|
64277
|
+
* @param {Function} props.validate
|
|
64278
|
+
* @param {Function} props.show
|
|
64279
|
+
* @param {Function} props.example
|
|
64280
|
+
* @param {Function} props.variables
|
|
64281
|
+
* @param {Function} props.onFocus
|
|
64282
|
+
* @param {Function} props.onBlur
|
|
64283
|
+
*/
|
|
64284
|
+
function FeelToggleSwitchEntry(props) {
|
|
64285
|
+
return e$1(FeelEntry, {
|
|
64286
|
+
class: "bio-properties-panel-feel-toggle-switch",
|
|
64287
|
+
OptionalComponent: OptionalFeelToggleSwitch,
|
|
64288
|
+
...props
|
|
64289
|
+
});
|
|
64290
|
+
}
|
|
64291
|
+
|
|
63976
64292
|
/**
|
|
63977
64293
|
* @param {Object} props
|
|
63978
64294
|
* @param {Object} props.element
|
|
@@ -64001,13 +64317,19 @@
|
|
|
64001
64317
|
...props
|
|
64002
64318
|
});
|
|
64003
64319
|
}
|
|
64004
|
-
function isEdited$
|
|
64005
|
-
|
|
64320
|
+
function isEdited$6(node) {
|
|
64321
|
+
if (!node) {
|
|
64322
|
+
return false;
|
|
64323
|
+
}
|
|
64324
|
+
if (node.type === 'checkbox') {
|
|
64325
|
+
return !!node.checked || node.classList.contains('edited');
|
|
64326
|
+
}
|
|
64327
|
+
return !!node.value || node.classList.contains('edited');
|
|
64006
64328
|
}
|
|
64007
64329
|
|
|
64008
64330
|
// helpers /////////////////
|
|
64009
64331
|
|
|
64010
|
-
function prefixId$
|
|
64332
|
+
function prefixId$5(id) {
|
|
64011
64333
|
return `bio-properties-panel-${id}`;
|
|
64012
64334
|
}
|
|
64013
64335
|
function NumberField(props) {
|
|
@@ -64049,11 +64371,11 @@
|
|
|
64049
64371
|
return e$1("div", {
|
|
64050
64372
|
class: "bio-properties-panel-numberfield",
|
|
64051
64373
|
children: [e$1("label", {
|
|
64052
|
-
for: prefixId$
|
|
64374
|
+
for: prefixId$4(id),
|
|
64053
64375
|
class: "bio-properties-panel-label",
|
|
64054
64376
|
children: label
|
|
64055
64377
|
}), e$1("input", {
|
|
64056
|
-
id: prefixId$
|
|
64378
|
+
id: prefixId$4(id),
|
|
64057
64379
|
type: "number",
|
|
64058
64380
|
name: id,
|
|
64059
64381
|
spellCheck: "false",
|
|
@@ -64157,13 +64479,13 @@
|
|
|
64157
64479
|
})]
|
|
64158
64480
|
});
|
|
64159
64481
|
}
|
|
64160
|
-
function isEdited$
|
|
64482
|
+
function isEdited$4(node) {
|
|
64161
64483
|
return node && !!node.value;
|
|
64162
64484
|
}
|
|
64163
64485
|
|
|
64164
64486
|
// helpers /////////////////
|
|
64165
64487
|
|
|
64166
|
-
function prefixId$
|
|
64488
|
+
function prefixId$4(id) {
|
|
64167
64489
|
return `bio-properties-panel-${id}`;
|
|
64168
64490
|
}
|
|
64169
64491
|
function Select(props) {
|
|
@@ -64197,12 +64519,12 @@
|
|
|
64197
64519
|
return e$1("div", {
|
|
64198
64520
|
class: "bio-properties-panel-select",
|
|
64199
64521
|
children: [e$1("label", {
|
|
64200
|
-
for: prefixId$
|
|
64522
|
+
for: prefixId$3(id),
|
|
64201
64523
|
class: "bio-properties-panel-label",
|
|
64202
64524
|
children: label
|
|
64203
64525
|
}), e$1("select", {
|
|
64204
64526
|
ref: ref,
|
|
64205
|
-
id: prefixId$
|
|
64527
|
+
id: prefixId$3(id),
|
|
64206
64528
|
name: id,
|
|
64207
64529
|
class: "bio-properties-panel-input",
|
|
64208
64530
|
onInput: handleChange,
|
|
@@ -64309,13 +64631,13 @@
|
|
|
64309
64631
|
})]
|
|
64310
64632
|
});
|
|
64311
64633
|
}
|
|
64312
|
-
function isEdited$
|
|
64634
|
+
function isEdited$3(node) {
|
|
64313
64635
|
return node && !!node.value;
|
|
64314
64636
|
}
|
|
64315
64637
|
|
|
64316
64638
|
// helpers /////////////////
|
|
64317
64639
|
|
|
64318
|
-
function prefixId$
|
|
64640
|
+
function prefixId$3(id) {
|
|
64319
64641
|
return `bio-properties-panel-${id}`;
|
|
64320
64642
|
}
|
|
64321
64643
|
function resizeToContents(element) {
|
|
@@ -64363,12 +64685,12 @@
|
|
|
64363
64685
|
return e$1("div", {
|
|
64364
64686
|
class: "bio-properties-panel-textarea",
|
|
64365
64687
|
children: [e$1("label", {
|
|
64366
|
-
for: prefixId$
|
|
64688
|
+
for: prefixId$1(id),
|
|
64367
64689
|
class: "bio-properties-panel-label",
|
|
64368
64690
|
children: label
|
|
64369
64691
|
}), e$1("textarea", {
|
|
64370
64692
|
ref: ref,
|
|
64371
|
-
id: prefixId$
|
|
64693
|
+
id: prefixId$1(id),
|
|
64372
64694
|
name: id,
|
|
64373
64695
|
spellCheck: "false",
|
|
64374
64696
|
class: classNames('bio-properties-panel-input', monospace ? 'bio-properties-panel-input-monospace' : '', autoResize ? 'auto-resize' : ''),
|
|
@@ -64396,6 +64718,7 @@
|
|
|
64396
64718
|
* @param {Function} props.onBlur
|
|
64397
64719
|
* @param {number} props.rows
|
|
64398
64720
|
* @param {boolean} props.monospace
|
|
64721
|
+
* @param {Function} [props.validate]
|
|
64399
64722
|
* @param {boolean} [props.disabled]
|
|
64400
64723
|
*/
|
|
64401
64724
|
function TextAreaEntry(props) {
|
|
@@ -64410,12 +64733,38 @@
|
|
|
64410
64733
|
rows,
|
|
64411
64734
|
monospace,
|
|
64412
64735
|
disabled,
|
|
64736
|
+
validate,
|
|
64413
64737
|
onFocus,
|
|
64414
64738
|
onBlur,
|
|
64415
64739
|
autoResize
|
|
64416
64740
|
} = props;
|
|
64417
|
-
const
|
|
64418
|
-
const
|
|
64741
|
+
const [cachedInvalidValue, setCachedInvalidValue] = l$2(null);
|
|
64742
|
+
const globalError = useError(id);
|
|
64743
|
+
const [localError, setLocalError] = l$2(null);
|
|
64744
|
+
let value = getValue(element);
|
|
64745
|
+
const previousValue = usePrevious(value);
|
|
64746
|
+
y(() => {
|
|
64747
|
+
if (isFunction(validate)) {
|
|
64748
|
+
const newValidationError = validate(value) || null;
|
|
64749
|
+
setLocalError(newValidationError);
|
|
64750
|
+
}
|
|
64751
|
+
}, [value]);
|
|
64752
|
+
const onInput = newValue => {
|
|
64753
|
+
let newValidationError = null;
|
|
64754
|
+
if (isFunction(validate)) {
|
|
64755
|
+
newValidationError = validate(newValue) || null;
|
|
64756
|
+
}
|
|
64757
|
+
if (newValidationError) {
|
|
64758
|
+
setCachedInvalidValue(newValue);
|
|
64759
|
+
} else {
|
|
64760
|
+
setValue(newValue);
|
|
64761
|
+
}
|
|
64762
|
+
setLocalError(newValidationError);
|
|
64763
|
+
};
|
|
64764
|
+
if (previousValue === value && localError) {
|
|
64765
|
+
value = cachedInvalidValue;
|
|
64766
|
+
}
|
|
64767
|
+
const error = globalError || localError;
|
|
64419
64768
|
return e$1("div", {
|
|
64420
64769
|
class: classNames('bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
64421
64770
|
"data-entry-id": id,
|
|
@@ -64423,7 +64772,7 @@
|
|
|
64423
64772
|
id: id,
|
|
64424
64773
|
label: label,
|
|
64425
64774
|
value: value,
|
|
64426
|
-
onInput:
|
|
64775
|
+
onInput: onInput,
|
|
64427
64776
|
onFocus: onFocus,
|
|
64428
64777
|
onBlur: onBlur,
|
|
64429
64778
|
rows: rows,
|
|
@@ -64441,13 +64790,13 @@
|
|
|
64441
64790
|
})]
|
|
64442
64791
|
});
|
|
64443
64792
|
}
|
|
64444
|
-
function isEdited$
|
|
64793
|
+
function isEdited$1(node) {
|
|
64445
64794
|
return node && !!node.value;
|
|
64446
64795
|
}
|
|
64447
64796
|
|
|
64448
64797
|
// helpers /////////////////
|
|
64449
64798
|
|
|
64450
|
-
function prefixId$
|
|
64799
|
+
function prefixId$1(id) {
|
|
64451
64800
|
return `bio-properties-panel-${id}`;
|
|
64452
64801
|
}
|
|
64453
64802
|
function Textfield(props) {
|
|
@@ -64481,12 +64830,12 @@
|
|
|
64481
64830
|
return e$1("div", {
|
|
64482
64831
|
class: "bio-properties-panel-textfield",
|
|
64483
64832
|
children: [e$1("label", {
|
|
64484
|
-
for: prefixId
|
|
64833
|
+
for: prefixId(id),
|
|
64485
64834
|
class: "bio-properties-panel-label",
|
|
64486
64835
|
children: label
|
|
64487
64836
|
}), e$1("input", {
|
|
64488
64837
|
ref: ref,
|
|
64489
|
-
id: prefixId
|
|
64838
|
+
id: prefixId(id),
|
|
64490
64839
|
type: "text",
|
|
64491
64840
|
name: id,
|
|
64492
64841
|
spellCheck: "false",
|
|
@@ -64578,13 +64927,13 @@
|
|
|
64578
64927
|
})]
|
|
64579
64928
|
});
|
|
64580
64929
|
}
|
|
64581
|
-
function isEdited
|
|
64930
|
+
function isEdited(node) {
|
|
64582
64931
|
return node && !!node.value;
|
|
64583
64932
|
}
|
|
64584
64933
|
|
|
64585
64934
|
// helpers /////////////////
|
|
64586
64935
|
|
|
64587
|
-
function prefixId
|
|
64936
|
+
function prefixId(id) {
|
|
64588
64937
|
return `bio-properties-panel-${id}`;
|
|
64589
64938
|
}
|
|
64590
64939
|
|
|
@@ -64709,7 +65058,7 @@
|
|
|
64709
65058
|
component: Action,
|
|
64710
65059
|
editField: editField,
|
|
64711
65060
|
field: field,
|
|
64712
|
-
isEdited: isEdited$
|
|
65061
|
+
isEdited: isEdited$3
|
|
64713
65062
|
});
|
|
64714
65063
|
}
|
|
64715
65064
|
return entries;
|
|
@@ -64775,7 +65124,7 @@
|
|
|
64775
65124
|
component: AltText,
|
|
64776
65125
|
editField: editField,
|
|
64777
65126
|
field: field,
|
|
64778
|
-
isEdited: isEdited$
|
|
65127
|
+
isEdited: isEdited$6
|
|
64779
65128
|
});
|
|
64780
65129
|
}
|
|
64781
65130
|
return entries;
|
|
@@ -64819,7 +65168,7 @@
|
|
|
64819
65168
|
component: Columns,
|
|
64820
65169
|
field,
|
|
64821
65170
|
editField,
|
|
64822
|
-
isEdited: isEdited$
|
|
65171
|
+
isEdited: isEdited$3
|
|
64823
65172
|
}];
|
|
64824
65173
|
return entries;
|
|
64825
65174
|
}
|
|
@@ -64891,7 +65240,7 @@
|
|
|
64891
65240
|
component: Description,
|
|
64892
65241
|
editField: editField,
|
|
64893
65242
|
field: field,
|
|
64894
|
-
isEdited: isEdited
|
|
65243
|
+
isEdited: isEdited
|
|
64895
65244
|
});
|
|
64896
65245
|
}
|
|
64897
65246
|
return entries;
|
|
@@ -64944,21 +65293,21 @@
|
|
|
64944
65293
|
entries.push({
|
|
64945
65294
|
...defaultOptions,
|
|
64946
65295
|
component: DefaultValueCheckbox,
|
|
64947
|
-
isEdited: isEdited$
|
|
65296
|
+
isEdited: isEdited$3
|
|
64948
65297
|
});
|
|
64949
65298
|
}
|
|
64950
65299
|
if (type === 'number') {
|
|
64951
65300
|
entries.push({
|
|
64952
65301
|
...defaultOptions,
|
|
64953
65302
|
component: DefaultValueNumber,
|
|
64954
|
-
isEdited: isEdited
|
|
65303
|
+
isEdited: isEdited
|
|
64955
65304
|
});
|
|
64956
65305
|
}
|
|
64957
65306
|
if (type === 'radio' || type === 'select') {
|
|
64958
65307
|
entries.push({
|
|
64959
65308
|
...defaultOptions,
|
|
64960
65309
|
component: DefaultValueSingleSelect,
|
|
64961
|
-
isEdited: isEdited$
|
|
65310
|
+
isEdited: isEdited$3
|
|
64962
65311
|
});
|
|
64963
65312
|
}
|
|
64964
65313
|
|
|
@@ -64968,14 +65317,14 @@
|
|
|
64968
65317
|
entries.push({
|
|
64969
65318
|
...defaultOptions,
|
|
64970
65319
|
component: DefaultValueTextfield,
|
|
64971
|
-
isEdited: isEdited
|
|
65320
|
+
isEdited: isEdited
|
|
64972
65321
|
});
|
|
64973
65322
|
}
|
|
64974
65323
|
if (type === 'textarea') {
|
|
64975
65324
|
entries.push({
|
|
64976
65325
|
...defaultOptions,
|
|
64977
65326
|
component: DefaultValueTextarea,
|
|
64978
|
-
isEdited: isEdited$
|
|
65327
|
+
isEdited: isEdited$1
|
|
64979
65328
|
});
|
|
64980
65329
|
}
|
|
64981
65330
|
return entries;
|
|
@@ -65168,7 +65517,7 @@
|
|
|
65168
65517
|
component: Disabled,
|
|
65169
65518
|
editField: editField,
|
|
65170
65519
|
field: field,
|
|
65171
|
-
isEdited: isEdited$
|
|
65520
|
+
isEdited: isEdited$7
|
|
65172
65521
|
});
|
|
65173
65522
|
}
|
|
65174
65523
|
return entries;
|
|
@@ -65186,11 +65535,12 @@
|
|
|
65186
65535
|
const setValue = value => {
|
|
65187
65536
|
return editField(field, path, value);
|
|
65188
65537
|
};
|
|
65189
|
-
return
|
|
65538
|
+
return ToggleSwitchEntry({
|
|
65190
65539
|
element: field,
|
|
65191
65540
|
getValue,
|
|
65192
65541
|
id,
|
|
65193
65542
|
label: 'Disabled',
|
|
65543
|
+
inline: true,
|
|
65194
65544
|
setValue
|
|
65195
65545
|
});
|
|
65196
65546
|
}
|
|
@@ -65206,7 +65556,7 @@
|
|
|
65206
65556
|
component: Id,
|
|
65207
65557
|
editField: editField,
|
|
65208
65558
|
field: field,
|
|
65209
|
-
isEdited: isEdited
|
|
65559
|
+
isEdited: isEdited
|
|
65210
65560
|
});
|
|
65211
65561
|
}
|
|
65212
65562
|
return entries;
|
|
@@ -65285,7 +65635,7 @@
|
|
|
65285
65635
|
component: Key$1,
|
|
65286
65636
|
editField: editField,
|
|
65287
65637
|
field: field,
|
|
65288
|
-
isEdited: isEdited
|
|
65638
|
+
isEdited: isEdited
|
|
65289
65639
|
});
|
|
65290
65640
|
}
|
|
65291
65641
|
return entries;
|
|
@@ -65347,7 +65697,7 @@
|
|
|
65347
65697
|
field,
|
|
65348
65698
|
editField,
|
|
65349
65699
|
component: SimpleStringComponent,
|
|
65350
|
-
isEdited: isEdited
|
|
65700
|
+
isEdited: isEdited
|
|
65351
65701
|
};
|
|
65352
65702
|
}
|
|
65353
65703
|
const SimpleStringComponent = props => {
|
|
@@ -65464,7 +65814,7 @@
|
|
|
65464
65814
|
component: Source,
|
|
65465
65815
|
editField: editField,
|
|
65466
65816
|
field: field,
|
|
65467
|
-
isEdited: isEdited$
|
|
65817
|
+
isEdited: isEdited$6
|
|
65468
65818
|
});
|
|
65469
65819
|
}
|
|
65470
65820
|
return entries;
|
|
@@ -65518,7 +65868,7 @@
|
|
|
65518
65868
|
component: Text,
|
|
65519
65869
|
editField: editField,
|
|
65520
65870
|
field: field,
|
|
65521
|
-
isEdited: isEdited$
|
|
65871
|
+
isEdited: isEdited$6
|
|
65522
65872
|
}];
|
|
65523
65873
|
|
|
65524
65874
|
// todo: skipped to make the release without too much risk
|
|
@@ -65586,14 +65936,14 @@
|
|
|
65586
65936
|
entries.push({
|
|
65587
65937
|
id: id + '-decimalDigits',
|
|
65588
65938
|
component: NumberDecimalDigits,
|
|
65589
|
-
isEdited: isEdited$
|
|
65939
|
+
isEdited: isEdited$4,
|
|
65590
65940
|
editField,
|
|
65591
65941
|
field
|
|
65592
65942
|
});
|
|
65593
65943
|
entries.push({
|
|
65594
65944
|
id: id + '-step',
|
|
65595
65945
|
component: NumberArrowStep,
|
|
65596
|
-
isEdited: isEdited
|
|
65946
|
+
isEdited: isEdited,
|
|
65597
65947
|
editField,
|
|
65598
65948
|
field
|
|
65599
65949
|
});
|
|
@@ -65729,7 +66079,7 @@
|
|
|
65729
66079
|
const entries = [{
|
|
65730
66080
|
id: 'subtype',
|
|
65731
66081
|
component: DateTimeSubtypeSelect,
|
|
65732
|
-
isEdited: isEdited$
|
|
66082
|
+
isEdited: isEdited$3,
|
|
65733
66083
|
editField,
|
|
65734
66084
|
field
|
|
65735
66085
|
}];
|
|
@@ -65840,7 +66190,7 @@
|
|
|
65840
66190
|
entries.push({
|
|
65841
66191
|
id: id + '-timeInterval',
|
|
65842
66192
|
component: TimeIntervalSelect,
|
|
65843
|
-
isEdited: isEdited$
|
|
66193
|
+
isEdited: isEdited$3,
|
|
65844
66194
|
editField,
|
|
65845
66195
|
field
|
|
65846
66196
|
});
|
|
@@ -65918,7 +66268,7 @@
|
|
|
65918
66268
|
entries.push({
|
|
65919
66269
|
id: 'time-format',
|
|
65920
66270
|
component: TimeFormatSelect,
|
|
65921
|
-
isEdited: isEdited$
|
|
66271
|
+
isEdited: isEdited$3,
|
|
65922
66272
|
editField,
|
|
65923
66273
|
field
|
|
65924
66274
|
});
|
|
@@ -66174,7 +66524,7 @@
|
|
|
66174
66524
|
return [{
|
|
66175
66525
|
id: id + '-select',
|
|
66176
66526
|
component: ValuesSourceSelect,
|
|
66177
|
-
isEdited: isEdited$
|
|
66527
|
+
isEdited: isEdited$3,
|
|
66178
66528
|
editField,
|
|
66179
66529
|
field
|
|
66180
66530
|
}];
|
|
@@ -66231,7 +66581,7 @@
|
|
|
66231
66581
|
component: InputValuesKey,
|
|
66232
66582
|
label: 'Input values key',
|
|
66233
66583
|
description,
|
|
66234
|
-
isEdited: isEdited
|
|
66584
|
+
isEdited: isEdited,
|
|
66235
66585
|
editField,
|
|
66236
66586
|
field
|
|
66237
66587
|
}];
|
|
@@ -66366,7 +66716,7 @@
|
|
|
66366
66716
|
entries.push({
|
|
66367
66717
|
id: 'prefix-adorner',
|
|
66368
66718
|
component: PrefixAdorner,
|
|
66369
|
-
isEdited: isEdited
|
|
66719
|
+
isEdited: isEdited,
|
|
66370
66720
|
editField,
|
|
66371
66721
|
field,
|
|
66372
66722
|
onChange,
|
|
@@ -66375,7 +66725,7 @@
|
|
|
66375
66725
|
entries.push({
|
|
66376
66726
|
id: 'suffix-adorner',
|
|
66377
66727
|
component: SuffixAdorner,
|
|
66378
|
-
isEdited: isEdited
|
|
66728
|
+
isEdited: isEdited,
|
|
66379
66729
|
editField,
|
|
66380
66730
|
field,
|
|
66381
66731
|
onChange,
|
|
@@ -66418,6 +66768,54 @@
|
|
|
66418
66768
|
setValue: onChange('suffixAdorner')
|
|
66419
66769
|
});
|
|
66420
66770
|
}
|
|
66771
|
+
function ReadonlyEntry(props) {
|
|
66772
|
+
const {
|
|
66773
|
+
editField,
|
|
66774
|
+
field
|
|
66775
|
+
} = props;
|
|
66776
|
+
const {
|
|
66777
|
+
type
|
|
66778
|
+
} = field;
|
|
66779
|
+
const entries = [];
|
|
66780
|
+
if (INPUTS.includes(type)) {
|
|
66781
|
+
entries.push({
|
|
66782
|
+
id: 'readonly',
|
|
66783
|
+
component: Readonly,
|
|
66784
|
+
editField: editField,
|
|
66785
|
+
field: field,
|
|
66786
|
+
isEdited: isEdited$6
|
|
66787
|
+
});
|
|
66788
|
+
}
|
|
66789
|
+
return entries;
|
|
66790
|
+
}
|
|
66791
|
+
function Readonly(props) {
|
|
66792
|
+
const {
|
|
66793
|
+
editField,
|
|
66794
|
+
field,
|
|
66795
|
+
id
|
|
66796
|
+
} = props;
|
|
66797
|
+
const debounce = useService('debounce');
|
|
66798
|
+
const variables = useVariables().map(name => ({
|
|
66799
|
+
name
|
|
66800
|
+
}));
|
|
66801
|
+
const path = ['readonly'];
|
|
66802
|
+
const getValue = () => {
|
|
66803
|
+
return get(field, path, '');
|
|
66804
|
+
};
|
|
66805
|
+
const setValue = value => {
|
|
66806
|
+
return editField(field, path, value || false);
|
|
66807
|
+
};
|
|
66808
|
+
return FeelToggleSwitchEntry({
|
|
66809
|
+
debounce,
|
|
66810
|
+
element: field,
|
|
66811
|
+
feel: 'optional',
|
|
66812
|
+
getValue,
|
|
66813
|
+
id,
|
|
66814
|
+
label: 'Read only',
|
|
66815
|
+
setValue,
|
|
66816
|
+
variables
|
|
66817
|
+
});
|
|
66818
|
+
}
|
|
66421
66819
|
function ConditionEntry(props) {
|
|
66422
66820
|
const {
|
|
66423
66821
|
editField,
|
|
@@ -66428,7 +66826,7 @@
|
|
|
66428
66826
|
component: Condition,
|
|
66429
66827
|
editField: editField,
|
|
66430
66828
|
field: field,
|
|
66431
|
-
isEdited: isEdited$
|
|
66829
|
+
isEdited: isEdited$6
|
|
66432
66830
|
}];
|
|
66433
66831
|
}
|
|
66434
66832
|
function Condition(props) {
|
|
@@ -66506,6 +66904,9 @@
|
|
|
66506
66904
|
}), ...DisabledEntry({
|
|
66507
66905
|
field,
|
|
66508
66906
|
editField
|
|
66907
|
+
}), ...ReadonlyEntry({
|
|
66908
|
+
field,
|
|
66909
|
+
editField
|
|
66509
66910
|
})];
|
|
66510
66911
|
return {
|
|
66511
66912
|
id: 'general',
|
|
@@ -66593,7 +66994,7 @@
|
|
|
66593
66994
|
getValue,
|
|
66594
66995
|
field,
|
|
66595
66996
|
editField,
|
|
66596
|
-
isEdited: isEdited
|
|
66997
|
+
isEdited: isEdited,
|
|
66597
66998
|
onChange
|
|
66598
66999
|
});
|
|
66599
67000
|
}
|
|
@@ -66603,14 +67004,14 @@
|
|
|
66603
67004
|
component: MinLength,
|
|
66604
67005
|
getValue,
|
|
66605
67006
|
field,
|
|
66606
|
-
isEdited: isEdited$
|
|
67007
|
+
isEdited: isEdited$4,
|
|
66607
67008
|
onChange
|
|
66608
67009
|
}, {
|
|
66609
67010
|
id: 'maxLength',
|
|
66610
67011
|
component: MaxLength,
|
|
66611
67012
|
getValue,
|
|
66612
67013
|
field,
|
|
66613
|
-
isEdited: isEdited$
|
|
67014
|
+
isEdited: isEdited$4,
|
|
66614
67015
|
onChange
|
|
66615
67016
|
});
|
|
66616
67017
|
}
|
|
@@ -66620,7 +67021,7 @@
|
|
|
66620
67021
|
component: Pattern,
|
|
66621
67022
|
getValue,
|
|
66622
67023
|
field,
|
|
66623
|
-
isEdited: isEdited
|
|
67024
|
+
isEdited: isEdited,
|
|
66624
67025
|
onChange
|
|
66625
67026
|
});
|
|
66626
67027
|
}
|
|
@@ -66630,14 +67031,14 @@
|
|
|
66630
67031
|
component: Min,
|
|
66631
67032
|
getValue,
|
|
66632
67033
|
field,
|
|
66633
|
-
isEdited: isEdited$
|
|
67034
|
+
isEdited: isEdited$4,
|
|
66634
67035
|
onChange
|
|
66635
67036
|
}, {
|
|
66636
67037
|
id: 'max',
|
|
66637
67038
|
component: Max,
|
|
66638
67039
|
getValue,
|
|
66639
67040
|
field,
|
|
66640
|
-
isEdited: isEdited$
|
|
67041
|
+
isEdited: isEdited$4,
|
|
66641
67042
|
onChange
|
|
66642
67043
|
});
|
|
66643
67044
|
}
|
|
@@ -69011,7 +69412,9 @@
|
|
|
69011
69412
|
emit,
|
|
69012
69413
|
exporter: exporterConfig = {},
|
|
69013
69414
|
viewerProperties = {},
|
|
69014
|
-
editorProperties = {}
|
|
69415
|
+
editorProperties = {},
|
|
69416
|
+
viewerAdditionalModules = [],
|
|
69417
|
+
editorAdditionalModules = []
|
|
69015
69418
|
} = props;
|
|
69016
69419
|
const {
|
|
69017
69420
|
display: displayActions = true
|
|
@@ -69072,6 +69475,7 @@
|
|
|
69072
69475
|
}
|
|
69073
69476
|
});
|
|
69074
69477
|
const form = formRef.current = new Form({
|
|
69478
|
+
additionalModules: viewerAdditionalModules,
|
|
69075
69479
|
properties: {
|
|
69076
69480
|
...viewerProperties,
|
|
69077
69481
|
'ariaLabel': 'Form Preview'
|
|
@@ -69091,7 +69495,8 @@
|
|
|
69091
69495
|
properties: {
|
|
69092
69496
|
...editorProperties,
|
|
69093
69497
|
'ariaLabel': 'Form Definition'
|
|
69094
|
-
}
|
|
69498
|
+
},
|
|
69499
|
+
additionalModules: editorAdditionalModules
|
|
69095
69500
|
});
|
|
69096
69501
|
paletteRef.current = formEditor.get('palette');
|
|
69097
69502
|
propertiesPanelRef.current = formEditor.get('propertiesPanel');
|