@bpmn-io/form-js-viewer 1.23.0 → 1.24.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/index.cjs +22 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +23 -25
- package/dist/index.es.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -4245,7 +4245,7 @@ function SearchableSelect(props) {
|
|
|
4245
4245
|
onChange: props.onChange
|
|
4246
4246
|
});
|
|
4247
4247
|
const getLabelCorrelation = useGetLabelCorrelation(options);
|
|
4248
|
-
const label = hooks.useMemo(() => value
|
|
4248
|
+
const label = hooks.useMemo(() => minDash.isDefined(value) ? getLabelCorrelation(value) : undefined, [value, getLabelCorrelation]);
|
|
4249
4249
|
|
|
4250
4250
|
// whenever we change the underlying value, set the label to it
|
|
4251
4251
|
hooks.useEffect(() => {
|
|
@@ -4263,7 +4263,7 @@ function SearchableSelect(props) {
|
|
|
4263
4263
|
const pickOption = hooks.useCallback(option => {
|
|
4264
4264
|
setFilter(option && option.label || '');
|
|
4265
4265
|
props.onChange({
|
|
4266
|
-
value: option
|
|
4266
|
+
value: option?.value ?? null
|
|
4267
4267
|
});
|
|
4268
4268
|
}, [props]);
|
|
4269
4269
|
const displayState = hooks.useMemo(() => {
|
|
@@ -4410,10 +4410,10 @@ function SimpleSelect(props) {
|
|
|
4410
4410
|
onChange: props.onChange
|
|
4411
4411
|
});
|
|
4412
4412
|
const getLabelCorrelation = useGetLabelCorrelation(options);
|
|
4413
|
-
const valueLabel = hooks.useMemo(() => value
|
|
4413
|
+
const valueLabel = hooks.useMemo(() => minDash.isDefined(value) ? getLabelCorrelation(value) : undefined, [value, getLabelCorrelation]);
|
|
4414
4414
|
const pickOption = hooks.useCallback(option => {
|
|
4415
4415
|
props.onChange({
|
|
4416
|
-
value: option
|
|
4416
|
+
value: option?.value ?? null
|
|
4417
4417
|
});
|
|
4418
4418
|
}, [props]);
|
|
4419
4419
|
const displayState = hooks.useMemo(() => {
|
|
@@ -5881,7 +5881,7 @@ const EMPTY_ARRAY$1 = [];
|
|
|
5881
5881
|
* @returns {import("preact").JSX.Element}
|
|
5882
5882
|
*/
|
|
5883
5883
|
function FilePicker(props) {
|
|
5884
|
-
/** @type {import("preact
|
|
5884
|
+
/** @type {import("preact").RefObject<HTMLInputElement>} */
|
|
5885
5885
|
const fileInputRef = hooks.useRef(null);
|
|
5886
5886
|
/** @type {import('../../FileRegistry').FileRegistry} */
|
|
5887
5887
|
const fileRegistry = useService('fileRegistry', false);
|
|
@@ -5971,7 +5971,6 @@ function FilePicker(props) {
|
|
|
5971
5971
|
children: [jsxRuntime.jsx("button", {
|
|
5972
5972
|
type: "button",
|
|
5973
5973
|
disabled: isInputDisabled,
|
|
5974
|
-
readOnly: readonly,
|
|
5975
5974
|
className: "fjs-button fjs-filepicker-button",
|
|
5976
5975
|
onClick: () => {
|
|
5977
5976
|
fileInputRef.current.click();
|
|
@@ -7003,10 +7002,10 @@ const MarkdownRendererModule = {
|
|
|
7003
7002
|
/**
|
|
7004
7003
|
* @typedef {import('didi').Injector} Injector
|
|
7005
7004
|
*
|
|
7006
|
-
* @typedef {import('../core/Types').ElementLike} ElementLike
|
|
7005
|
+
* @typedef {import('../core/Types.js').ElementLike} ElementLike
|
|
7007
7006
|
*
|
|
7008
|
-
* @typedef {import('../core/EventBus').default} EventBus
|
|
7009
|
-
* @typedef {import('./CommandHandler').default} CommandHandler
|
|
7007
|
+
* @typedef {import('../core/EventBus.js').default} EventBus
|
|
7008
|
+
* @typedef {import('./CommandHandler.js').default} CommandHandler
|
|
7010
7009
|
*
|
|
7011
7010
|
* @typedef { any } CommandContext
|
|
7012
7011
|
* @typedef { {
|
|
@@ -7802,7 +7801,6 @@ class RepeatRenderManager {
|
|
|
7802
7801
|
}),
|
|
7803
7802
|
children: [showAdd ? jsxRuntime.jsx("button", {
|
|
7804
7803
|
type: "button",
|
|
7805
|
-
readOnly: readonly,
|
|
7806
7804
|
disabled: disabled || readonly,
|
|
7807
7805
|
class: "fjs-repeat-render-add",
|
|
7808
7806
|
ref: addButtonRef,
|
|
@@ -8045,11 +8043,11 @@ function EventBus() {
|
|
|
8045
8043
|
*
|
|
8046
8044
|
* Returning anything but `undefined` from a listener will stop the listener propagation.
|
|
8047
8045
|
*
|
|
8048
|
-
* @template
|
|
8046
|
+
* @template {keyof EventMap} EventName
|
|
8049
8047
|
*
|
|
8050
|
-
* @param {
|
|
8048
|
+
* @param {EventName} events to subscribe to
|
|
8051
8049
|
* @param {number} [priority=1000] listen priority
|
|
8052
|
-
* @param {EventBusEventCallback<
|
|
8050
|
+
* @param {EventBusEventCallback<EventMap[EventName]>} callback
|
|
8053
8051
|
* @param {any} [that] callback context
|
|
8054
8052
|
*/
|
|
8055
8053
|
/**
|
|
@@ -8064,11 +8062,11 @@ function EventBus() {
|
|
|
8064
8062
|
*
|
|
8065
8063
|
* Returning anything but `undefined` from a listener will stop the listener propagation.
|
|
8066
8064
|
*
|
|
8067
|
-
* @template
|
|
8065
|
+
* @template T
|
|
8068
8066
|
*
|
|
8069
|
-
* @param {
|
|
8067
|
+
* @param {string|string[]} events to subscribe to
|
|
8070
8068
|
* @param {number} [priority=1000] listen priority
|
|
8071
|
-
* @param {EventBusEventCallback<
|
|
8069
|
+
* @param {EventBusEventCallback<T>} callback
|
|
8072
8070
|
* @param {any} [that] callback context
|
|
8073
8071
|
*/
|
|
8074
8072
|
EventBus.prototype.on = function (events, priority, callback, that) {
|
|
@@ -8105,21 +8103,21 @@ EventBus.prototype.on = function (events, priority, callback, that) {
|
|
|
8105
8103
|
*
|
|
8106
8104
|
* Register an event listener that is called only once.
|
|
8107
8105
|
*
|
|
8108
|
-
* @template
|
|
8106
|
+
* @template {keyof EventMap} EventName
|
|
8109
8107
|
*
|
|
8110
|
-
* @param {
|
|
8111
|
-
* @param {number} [priority=1000]
|
|
8112
|
-
* @param {EventBusEventCallback<
|
|
8108
|
+
* @param {EventName} events to subscribe to
|
|
8109
|
+
* @param {number} [priority=1000] listen priority
|
|
8110
|
+
* @param {EventBusEventCallback<EventMap[EventName]>} callback
|
|
8113
8111
|
* @param {any} [that] callback context
|
|
8114
8112
|
*/
|
|
8115
8113
|
/**
|
|
8116
8114
|
* Register an event listener that is called only once.
|
|
8117
8115
|
*
|
|
8118
|
-
* @template
|
|
8116
|
+
* @template T
|
|
8119
8117
|
*
|
|
8120
|
-
* @param {
|
|
8121
|
-
* @param {number} [priority=1000] listen priority
|
|
8122
|
-
* @param {EventBusEventCallback<
|
|
8118
|
+
* @param {string|string[]} events to subscribe to
|
|
8119
|
+
* @param {number} [priority=1000] the listen priority
|
|
8120
|
+
* @param {EventBusEventCallback<T>} callback
|
|
8123
8121
|
* @param {any} [that] callback context
|
|
8124
8122
|
*/
|
|
8125
8123
|
EventBus.prototype.once = function (events, priority, callback, that) {
|