@bpmn-io/form-js-viewer 0.14.1 → 0.15.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/assets/form-js-base.css +94 -45
- package/dist/assets/form-js.css +90 -41
- package/dist/index.cjs +493 -304
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +493 -304
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +1 -1
- package/dist/types/core/EventBus.d.ts +1 -1
- package/dist/types/core/index.d.ts +2 -1
- package/dist/types/render/Renderer.d.ts +2 -2
- package/dist/types/render/components/Util.d.ts +2 -2
- package/dist/types/render/components/form-fields/Button.d.ts +9 -7
- package/dist/types/render/components/form-fields/Checkbox.d.ts +11 -9
- package/dist/types/render/components/form-fields/Checklist.d.ts +14 -12
- package/dist/types/render/components/form-fields/Datetime.d.ts +9 -7
- package/dist/types/render/components/form-fields/Default.d.ts +9 -7
- package/dist/types/render/components/form-fields/Image.d.ts +7 -5
- package/dist/types/render/components/form-fields/Number.d.ts +12 -10
- package/dist/types/render/components/form-fields/Radio.d.ts +14 -12
- package/dist/types/render/components/form-fields/Select.d.ts +14 -12
- package/dist/types/render/components/form-fields/Taglist.d.ts +14 -12
- package/dist/types/render/components/form-fields/Text.d.ts +9 -7
- package/dist/types/render/components/form-fields/Textarea.d.ts +11 -9
- package/dist/types/render/components/form-fields/Textfield.d.ts +11 -9
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -474,6 +474,30 @@ var FN_REF = '__fn';
|
|
|
474
474
|
var DEFAULT_PRIORITY = 1000;
|
|
475
475
|
var slice = Array.prototype.slice;
|
|
476
476
|
|
|
477
|
+
/**
|
|
478
|
+
* @typedef { {
|
|
479
|
+
* stopPropagation(): void;
|
|
480
|
+
* preventDefault(): void;
|
|
481
|
+
* cancelBubble: boolean;
|
|
482
|
+
* defaultPrevented: boolean;
|
|
483
|
+
* returnValue: any;
|
|
484
|
+
* } } Event
|
|
485
|
+
*/
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* @template E
|
|
489
|
+
*
|
|
490
|
+
* @typedef { (event: E & Event, ...any) => any } EventBusEventCallback
|
|
491
|
+
*/
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* @typedef { {
|
|
495
|
+
* priority: number;
|
|
496
|
+
* next: EventBusListener | null;
|
|
497
|
+
* callback: EventBusEventCallback<any>;
|
|
498
|
+
* } } EventBusListener
|
|
499
|
+
*/
|
|
500
|
+
|
|
477
501
|
/**
|
|
478
502
|
* A general purpose event bus.
|
|
479
503
|
*
|
|
@@ -558,6 +582,9 @@ var slice = Array.prototype.slice;
|
|
|
558
582
|
* ```
|
|
559
583
|
*/
|
|
560
584
|
function EventBus() {
|
|
585
|
+
/**
|
|
586
|
+
* @type { Record<string, EventBusListener> }
|
|
587
|
+
*/
|
|
561
588
|
this._listeners = {};
|
|
562
589
|
|
|
563
590
|
// cleanup on destroy on lowest priority to allow
|
|
@@ -577,10 +604,12 @@ function EventBus() {
|
|
|
577
604
|
*
|
|
578
605
|
* Returning anything but `undefined` from a listener will stop the listener propagation.
|
|
579
606
|
*
|
|
580
|
-
* @
|
|
581
|
-
*
|
|
582
|
-
* @param {
|
|
583
|
-
* @param {
|
|
607
|
+
* @template T
|
|
608
|
+
*
|
|
609
|
+
* @param {string|string[]} events to subscribe to
|
|
610
|
+
* @param {number} [priority=1000] listen priority
|
|
611
|
+
* @param {EventBusEventCallback<T>} callback
|
|
612
|
+
* @param {any} [that] callback context
|
|
584
613
|
*/
|
|
585
614
|
EventBus.prototype.on = function (events, priority, callback, that) {
|
|
586
615
|
events = isArray(events) ? events : [events];
|
|
@@ -612,14 +641,16 @@ EventBus.prototype.on = function (events, priority, callback, that) {
|
|
|
612
641
|
};
|
|
613
642
|
|
|
614
643
|
/**
|
|
615
|
-
* Register an event listener that is
|
|
644
|
+
* Register an event listener that is called only once.
|
|
645
|
+
*
|
|
646
|
+
* @template T
|
|
616
647
|
*
|
|
617
|
-
* @param {string}
|
|
618
|
-
* @param {number} [priority=1000] the priority
|
|
619
|
-
* @param {
|
|
620
|
-
* @param {
|
|
648
|
+
* @param {string|string[]} events to subscribe to
|
|
649
|
+
* @param {number} [priority=1000] the listen priority
|
|
650
|
+
* @param {EventBusEventCallback<T>} callback
|
|
651
|
+
* @param {any} [that] callback context
|
|
621
652
|
*/
|
|
622
|
-
EventBus.prototype.once = function (
|
|
653
|
+
EventBus.prototype.once = function (events, priority, callback, that) {
|
|
623
654
|
var self = this;
|
|
624
655
|
if (isFunction(priority)) {
|
|
625
656
|
that = callback;
|
|
@@ -632,7 +663,7 @@ EventBus.prototype.once = function (event, priority, callback, that) {
|
|
|
632
663
|
function wrappedCallback() {
|
|
633
664
|
wrappedCallback.__isTomb = true;
|
|
634
665
|
var result = callback.apply(that, arguments);
|
|
635
|
-
self.off(
|
|
666
|
+
self.off(events, wrappedCallback);
|
|
636
667
|
return result;
|
|
637
668
|
}
|
|
638
669
|
|
|
@@ -640,7 +671,7 @@ EventBus.prototype.once = function (event, priority, callback, that) {
|
|
|
640
671
|
// bound callbacks via {@link #off} using the original
|
|
641
672
|
// callback
|
|
642
673
|
wrappedCallback[FN_REF] = callback;
|
|
643
|
-
this.on(
|
|
674
|
+
this.on(events, priority, wrappedCallback);
|
|
644
675
|
};
|
|
645
676
|
|
|
646
677
|
/**
|
|
@@ -648,8 +679,8 @@ EventBus.prototype.once = function (event, priority, callback, that) {
|
|
|
648
679
|
*
|
|
649
680
|
* If no callback is given, all listeners for a given event name are being removed.
|
|
650
681
|
*
|
|
651
|
-
* @param {string|
|
|
652
|
-
* @param {
|
|
682
|
+
* @param {string|string[]} events
|
|
683
|
+
* @param {EventBusEventCallback} [callback]
|
|
653
684
|
*/
|
|
654
685
|
EventBus.prototype.off = function (events, callback) {
|
|
655
686
|
events = isArray(events) ? events : [events];
|
|
@@ -660,11 +691,11 @@ EventBus.prototype.off = function (events, callback) {
|
|
|
660
691
|
};
|
|
661
692
|
|
|
662
693
|
/**
|
|
663
|
-
* Create an
|
|
694
|
+
* Create an event recognized be the event bus.
|
|
664
695
|
*
|
|
665
|
-
* @param {Object} data
|
|
696
|
+
* @param {Object} data Event data.
|
|
666
697
|
*
|
|
667
|
-
* @return {
|
|
698
|
+
* @return {Event} An event that will be recognized by the event bus.
|
|
668
699
|
*/
|
|
669
700
|
EventBus.prototype.createEvent = function (data) {
|
|
670
701
|
var event = new InternalEvent();
|
|
@@ -673,10 +704,11 @@ EventBus.prototype.createEvent = function (data) {
|
|
|
673
704
|
};
|
|
674
705
|
|
|
675
706
|
/**
|
|
676
|
-
* Fires
|
|
707
|
+
* Fires an event.
|
|
677
708
|
*
|
|
678
709
|
* @example
|
|
679
710
|
*
|
|
711
|
+
* ```javascript
|
|
680
712
|
* // fire event by name
|
|
681
713
|
* events.fire('foo');
|
|
682
714
|
*
|
|
@@ -694,13 +726,13 @@ EventBus.prototype.createEvent = function (data) {
|
|
|
694
726
|
* });
|
|
695
727
|
*
|
|
696
728
|
* events.fire({ type: 'foo' }, 'I am bar!');
|
|
729
|
+
* ```
|
|
697
730
|
*
|
|
698
|
-
* @param {string} [
|
|
699
|
-
* @param {Object} [
|
|
700
|
-
* @param {...
|
|
731
|
+
* @param {string} [type] event type
|
|
732
|
+
* @param {Object} [data] event or event data
|
|
733
|
+
* @param {...any} [args] additional arguments the callback will be called with.
|
|
701
734
|
*
|
|
702
|
-
* @return {
|
|
703
|
-
* default action was prevented by listeners
|
|
735
|
+
* @return {any} The return value. Will be set to `false` if the default was prevented.
|
|
704
736
|
*/
|
|
705
737
|
EventBus.prototype.fire = function (type, data) {
|
|
706
738
|
var event, firstListener, returnValue, args;
|
|
@@ -752,6 +784,14 @@ EventBus.prototype.fire = function (type, data) {
|
|
|
752
784
|
}
|
|
753
785
|
return returnValue;
|
|
754
786
|
};
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Handle an error by firing an event.
|
|
790
|
+
*
|
|
791
|
+
* @param {Error} error The error to be handled.
|
|
792
|
+
*
|
|
793
|
+
* @return {boolean} Whether the error was handled.
|
|
794
|
+
*/
|
|
755
795
|
EventBus.prototype.handleError = function (error) {
|
|
756
796
|
return this.fire('error', {
|
|
757
797
|
error: error
|
|
@@ -760,6 +800,14 @@ EventBus.prototype.handleError = function (error) {
|
|
|
760
800
|
EventBus.prototype._destroy = function () {
|
|
761
801
|
this._listeners = {};
|
|
762
802
|
};
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* @param {Event} event
|
|
806
|
+
* @param {any[]} args
|
|
807
|
+
* @param {EventBusListener} listener
|
|
808
|
+
*
|
|
809
|
+
* @return {any}
|
|
810
|
+
*/
|
|
763
811
|
EventBus.prototype._invokeListeners = function (event, args, listener) {
|
|
764
812
|
var returnValue;
|
|
765
813
|
while (listener) {
|
|
@@ -772,6 +820,14 @@ EventBus.prototype._invokeListeners = function (event, args, listener) {
|
|
|
772
820
|
}
|
|
773
821
|
return returnValue;
|
|
774
822
|
};
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* @param {Event} event
|
|
826
|
+
* @param {any[]} args
|
|
827
|
+
* @param {EventBusListener} listener
|
|
828
|
+
*
|
|
829
|
+
* @return {any}
|
|
830
|
+
*/
|
|
775
831
|
EventBus.prototype._invokeListener = function (event, args, listener) {
|
|
776
832
|
var returnValue;
|
|
777
833
|
if (listener.callback.__isTomb) {
|
|
@@ -800,7 +856,7 @@ EventBus.prototype._invokeListener = function (event, args, listener) {
|
|
|
800
856
|
return returnValue;
|
|
801
857
|
};
|
|
802
858
|
|
|
803
|
-
|
|
859
|
+
/**
|
|
804
860
|
* Add new listener with a certain priority to the list
|
|
805
861
|
* of listeners (for the given event).
|
|
806
862
|
*
|
|
@@ -814,7 +870,7 @@ EventBus.prototype._invokeListener = function (event, args, listener) {
|
|
|
814
870
|
* * after: [ 1500, 1500, (new=1300), 1000, 1000, (new=1000) ]
|
|
815
871
|
*
|
|
816
872
|
* @param {string} event
|
|
817
|
-
* @param {
|
|
873
|
+
* @param {EventBusListener} listener
|
|
818
874
|
*/
|
|
819
875
|
EventBus.prototype._addListener = function (event, newListener) {
|
|
820
876
|
var listener = this._getListeners(event),
|
|
@@ -845,9 +901,20 @@ EventBus.prototype._addListener = function (event, newListener) {
|
|
|
845
901
|
// add new listener to back
|
|
846
902
|
previousListener.next = newListener;
|
|
847
903
|
};
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* @param {string} name
|
|
907
|
+
*
|
|
908
|
+
* @return {EventBusListener}
|
|
909
|
+
*/
|
|
848
910
|
EventBus.prototype._getListeners = function (name) {
|
|
849
911
|
return this._listeners[name];
|
|
850
912
|
};
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* @param {string} name
|
|
916
|
+
* @param {EventBusListener} listener
|
|
917
|
+
*/
|
|
851
918
|
EventBus.prototype._setListeners = function (name, listener) {
|
|
852
919
|
this._listeners[name] = listener;
|
|
853
920
|
};
|
|
@@ -895,9 +962,9 @@ InternalEvent.prototype.init = function (data) {
|
|
|
895
962
|
* Invoke function. Be fast...
|
|
896
963
|
*
|
|
897
964
|
* @param {Function} fn
|
|
898
|
-
* @param {
|
|
965
|
+
* @param {any[]} args
|
|
899
966
|
*
|
|
900
|
-
* @return {
|
|
967
|
+
* @return {any}
|
|
901
968
|
*/
|
|
902
969
|
function invokeFunction(fn, args) {
|
|
903
970
|
return fn.apply(null, args);
|
|
@@ -1492,16 +1559,18 @@ class Importer {
|
|
|
1492
1559
|
// if unavailable - get empty value from form field
|
|
1493
1560
|
|
|
1494
1561
|
if (_path) {
|
|
1495
|
-
const
|
|
1562
|
+
const {
|
|
1563
|
+
config: fieldConfig
|
|
1564
|
+
} = this._formFields.get(type);
|
|
1496
1565
|
let valueData = get(data, _path);
|
|
1497
|
-
if (!isUndefined(valueData) &&
|
|
1498
|
-
valueData =
|
|
1566
|
+
if (!isUndefined(valueData) && fieldConfig.sanitizeValue) {
|
|
1567
|
+
valueData = fieldConfig.sanitizeValue({
|
|
1499
1568
|
formField,
|
|
1500
1569
|
data,
|
|
1501
1570
|
value: valueData
|
|
1502
1571
|
});
|
|
1503
1572
|
}
|
|
1504
|
-
const initializedFieldValue = !isUndefined(valueData) ? valueData : !isUndefined(defaultValue) ? defaultValue :
|
|
1573
|
+
const initializedFieldValue = !isUndefined(valueData) ? valueData : !isUndefined(defaultValue) ? defaultValue : fieldConfig.emptyValue;
|
|
1505
1574
|
initializedData = {
|
|
1506
1575
|
...initializedData,
|
|
1507
1576
|
[_path[0]]: initializedFieldValue
|
|
@@ -1566,14 +1635,16 @@ function Button(props) {
|
|
|
1566
1635
|
})
|
|
1567
1636
|
});
|
|
1568
1637
|
}
|
|
1569
|
-
Button.
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1638
|
+
Button.config = {
|
|
1639
|
+
type: type$b,
|
|
1640
|
+
keyed: true,
|
|
1641
|
+
label: 'Button',
|
|
1642
|
+
group: 'action',
|
|
1643
|
+
create: (options = {}) => ({
|
|
1644
|
+
action: 'submit',
|
|
1645
|
+
...options
|
|
1646
|
+
})
|
|
1647
|
+
};
|
|
1577
1648
|
|
|
1578
1649
|
const FormRenderContext = createContext({
|
|
1579
1650
|
Empty: props => {
|
|
@@ -1637,13 +1708,16 @@ function Description(props) {
|
|
|
1637
1708
|
|
|
1638
1709
|
function Errors(props) {
|
|
1639
1710
|
const {
|
|
1640
|
-
errors
|
|
1711
|
+
errors,
|
|
1712
|
+
id
|
|
1641
1713
|
} = props;
|
|
1642
1714
|
if (!errors.length) {
|
|
1643
1715
|
return null;
|
|
1644
1716
|
}
|
|
1645
1717
|
return jsx("div", {
|
|
1646
1718
|
class: "fjs-form-field-error",
|
|
1719
|
+
"aria-live": "polite",
|
|
1720
|
+
id: id,
|
|
1647
1721
|
children: jsx("ul", {
|
|
1648
1722
|
children: errors.map(error => {
|
|
1649
1723
|
return jsx("li", {
|
|
@@ -1701,6 +1775,7 @@ function Checkbox(props) {
|
|
|
1701
1775
|
const {
|
|
1702
1776
|
formId
|
|
1703
1777
|
} = useContext(FormContext$1);
|
|
1778
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
1704
1779
|
return jsxs("div", {
|
|
1705
1780
|
class: classNames(formFieldClasses(type$a, {
|
|
1706
1781
|
errors,
|
|
@@ -1718,26 +1793,30 @@ function Checkbox(props) {
|
|
|
1718
1793
|
disabled: disabled,
|
|
1719
1794
|
id: prefixId(id, formId),
|
|
1720
1795
|
type: "checkbox",
|
|
1721
|
-
onChange: onChange
|
|
1796
|
+
onChange: onChange,
|
|
1797
|
+
"aria-describedby": errorMessageId
|
|
1722
1798
|
})
|
|
1723
1799
|
}), jsx(Description, {
|
|
1724
1800
|
description: description
|
|
1725
1801
|
}), jsx(Errors, {
|
|
1726
|
-
errors: errors
|
|
1802
|
+
errors: errors,
|
|
1803
|
+
id: errorMessageId
|
|
1727
1804
|
})]
|
|
1728
1805
|
});
|
|
1729
1806
|
}
|
|
1730
|
-
Checkbox.
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
Checkbox
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
value
|
|
1739
|
-
}) =>
|
|
1740
|
-
|
|
1807
|
+
Checkbox.config = {
|
|
1808
|
+
type: type$a,
|
|
1809
|
+
keyed: true,
|
|
1810
|
+
label: 'Checkbox',
|
|
1811
|
+
group: 'selection',
|
|
1812
|
+
emptyValue: false,
|
|
1813
|
+
sanitizeValue: ({
|
|
1814
|
+
value
|
|
1815
|
+
}) => value === true,
|
|
1816
|
+
create: (options = {}) => ({
|
|
1817
|
+
...options
|
|
1818
|
+
})
|
|
1819
|
+
};
|
|
1741
1820
|
|
|
1742
1821
|
// parses the options data from the provided form field and form data
|
|
1743
1822
|
function getValuesData(formField, formData) {
|
|
@@ -2103,6 +2182,7 @@ function Checklist(props) {
|
|
|
2103
2182
|
const {
|
|
2104
2183
|
formId
|
|
2105
2184
|
} = useContext(FormContext$1);
|
|
2185
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
2106
2186
|
return jsxs("div", {
|
|
2107
2187
|
class: classNames(formFieldClasses(type$9, {
|
|
2108
2188
|
errors,
|
|
@@ -2125,37 +2205,41 @@ function Checklist(props) {
|
|
|
2125
2205
|
disabled: disabled,
|
|
2126
2206
|
id: prefixId(`${id}-${index}`, formId),
|
|
2127
2207
|
type: "checkbox",
|
|
2128
|
-
onClick: () => toggleCheckbox(v.value)
|
|
2208
|
+
onClick: () => toggleCheckbox(v.value),
|
|
2209
|
+
"aria-describedby": errorMessageId
|
|
2129
2210
|
})
|
|
2130
2211
|
}, `${id}-${index}`);
|
|
2131
2212
|
}), jsx(Description, {
|
|
2132
2213
|
description: description
|
|
2133
2214
|
}), jsx(Errors, {
|
|
2134
|
-
errors: errors
|
|
2215
|
+
errors: errors,
|
|
2216
|
+
id: errorMessageId
|
|
2135
2217
|
})]
|
|
2136
2218
|
});
|
|
2137
2219
|
}
|
|
2138
|
-
Checklist.
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
}
|
|
2220
|
+
Checklist.config = {
|
|
2221
|
+
type: type$9,
|
|
2222
|
+
keyed: true,
|
|
2223
|
+
label: 'Checklist',
|
|
2224
|
+
group: 'selection',
|
|
2225
|
+
emptyValue: [],
|
|
2226
|
+
sanitizeValue: sanitizeMultiSelectValue,
|
|
2227
|
+
create: (options = {}) => {
|
|
2228
|
+
const defaults = {};
|
|
2229
|
+
|
|
2230
|
+
// provide default values if valuesKey isn't set
|
|
2231
|
+
if (!options.valuesKey) {
|
|
2232
|
+
defaults.values = [{
|
|
2233
|
+
label: 'Value',
|
|
2234
|
+
value: 'value'
|
|
2235
|
+
}];
|
|
2236
|
+
}
|
|
2237
|
+
return {
|
|
2238
|
+
...defaults,
|
|
2239
|
+
...options
|
|
2240
|
+
};
|
|
2147
2241
|
}
|
|
2148
|
-
return {
|
|
2149
|
-
...defaults,
|
|
2150
|
-
...options
|
|
2151
|
-
};
|
|
2152
2242
|
};
|
|
2153
|
-
Checklist.type = type$9;
|
|
2154
|
-
Checklist.label = 'Checklist';
|
|
2155
|
-
Checklist.keyed = true;
|
|
2156
|
-
Checklist.emptyValue = [];
|
|
2157
|
-
Checklist.sanitizeValue = sanitizeMultiSelectValue;
|
|
2158
|
-
Checklist.group = 'selection';
|
|
2159
2243
|
|
|
2160
2244
|
/**
|
|
2161
2245
|
* Returns the conditionally filtered data of a form reactively.
|
|
@@ -2255,9 +2339,6 @@ function FormField(props) {
|
|
|
2255
2339
|
field,
|
|
2256
2340
|
onChange
|
|
2257
2341
|
} = props;
|
|
2258
|
-
const {
|
|
2259
|
-
_path
|
|
2260
|
-
} = field;
|
|
2261
2342
|
const formFields = useService('formFields'),
|
|
2262
2343
|
form = useService('form');
|
|
2263
2344
|
const {
|
|
@@ -2274,8 +2355,8 @@ function FormField(props) {
|
|
|
2274
2355
|
if (!FormFieldComponent) {
|
|
2275
2356
|
throw new Error(`cannot render field <${field.type}>`);
|
|
2276
2357
|
}
|
|
2277
|
-
const value = get(data, _path);
|
|
2278
|
-
const fieldErrors = findErrors(errors, _path);
|
|
2358
|
+
const value = get(data, field._path);
|
|
2359
|
+
const fieldErrors = findErrors(errors, field._path);
|
|
2279
2360
|
const disabled = properties.readOnly || field.disabled || false;
|
|
2280
2361
|
const hidden = useCondition(field.conditional && field.conditional.hide || null);
|
|
2281
2362
|
if (hidden) {
|
|
@@ -2342,14 +2423,16 @@ function Default(props) {
|
|
|
2342
2423
|
}), components.length ? null : jsx(Empty, {})]
|
|
2343
2424
|
});
|
|
2344
2425
|
}
|
|
2345
|
-
Default.
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2426
|
+
Default.config = {
|
|
2427
|
+
type: 'default',
|
|
2428
|
+
keyed: false,
|
|
2429
|
+
label: null,
|
|
2430
|
+
group: null,
|
|
2431
|
+
create: (options = {}) => ({
|
|
2432
|
+
components: [],
|
|
2433
|
+
...options
|
|
2434
|
+
})
|
|
2435
|
+
};
|
|
2353
2436
|
|
|
2354
2437
|
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
2355
2438
|
var CalendarIcon = (({
|
|
@@ -2525,16 +2608,17 @@ function Datepicker(props) {
|
|
|
2525
2608
|
ref: dateInputRef,
|
|
2526
2609
|
type: "text",
|
|
2527
2610
|
id: fullId,
|
|
2528
|
-
class:
|
|
2611
|
+
class: "fjs-input",
|
|
2529
2612
|
disabled: disabled,
|
|
2530
2613
|
placeholder: "mm/dd/yyyy",
|
|
2531
2614
|
autoComplete: "off",
|
|
2532
2615
|
onFocus: onInputFocus,
|
|
2533
2616
|
onKeyDown: onInputKeyDown,
|
|
2534
|
-
onMouseDown:
|
|
2617
|
+
onMouseDown: () => !flatpickrInstance.isOpen && flatpickrInstance.open(),
|
|
2535
2618
|
onBlur: onInputBlur,
|
|
2536
|
-
onInput:
|
|
2537
|
-
"data-input": true
|
|
2619
|
+
onInput: () => setIsInputDirty(true),
|
|
2620
|
+
"data-input": true,
|
|
2621
|
+
"aria-describedby": props['aria-describedby']
|
|
2538
2622
|
})
|
|
2539
2623
|
})
|
|
2540
2624
|
})]
|
|
@@ -2791,7 +2875,8 @@ function Timepicker(props) {
|
|
|
2791
2875
|
},
|
|
2792
2876
|
onBlur: onInputBlur,
|
|
2793
2877
|
onKeyDown: onInputKeyDown,
|
|
2794
|
-
"data-input": true
|
|
2878
|
+
"data-input": true,
|
|
2879
|
+
"aria-describedby": props['aria-describedby']
|
|
2795
2880
|
}), dropdownIsOpen && jsx(DropdownList, {
|
|
2796
2881
|
values: timeOptions,
|
|
2797
2882
|
height: 150,
|
|
@@ -2927,6 +3012,7 @@ function Datetime(props) {
|
|
|
2927
3012
|
time
|
|
2928
3013
|
});
|
|
2929
3014
|
}, []);
|
|
3015
|
+
const errorMessageId = allErrors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
2930
3016
|
const datePickerProps = {
|
|
2931
3017
|
id,
|
|
2932
3018
|
label: dateLabel,
|
|
@@ -2936,7 +3022,8 @@ function Datetime(props) {
|
|
|
2936
3022
|
disabled,
|
|
2937
3023
|
disallowPassedDates,
|
|
2938
3024
|
date: dateTime.date,
|
|
2939
|
-
setDate
|
|
3025
|
+
setDate,
|
|
3026
|
+
'aria-describedby': errorMessageId
|
|
2940
3027
|
};
|
|
2941
3028
|
const timePickerProps = {
|
|
2942
3029
|
id,
|
|
@@ -2948,7 +3035,8 @@ function Datetime(props) {
|
|
|
2948
3035
|
use24h,
|
|
2949
3036
|
timeInterval,
|
|
2950
3037
|
time: dateTime.time,
|
|
2951
|
-
setTime
|
|
3038
|
+
setTime,
|
|
3039
|
+
'aria-describedby': errorMessageId
|
|
2952
3040
|
};
|
|
2953
3041
|
return jsxs("div", {
|
|
2954
3042
|
class: formFieldClasses(type$8, {
|
|
@@ -2967,25 +3055,28 @@ function Datetime(props) {
|
|
|
2967
3055
|
}), jsx(Description, {
|
|
2968
3056
|
description: description
|
|
2969
3057
|
}), jsx(Errors, {
|
|
2970
|
-
errors: allErrors
|
|
3058
|
+
errors: allErrors,
|
|
3059
|
+
id: errorMessageId
|
|
2971
3060
|
})]
|
|
2972
3061
|
});
|
|
2973
3062
|
}
|
|
2974
|
-
Datetime.
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
}
|
|
3063
|
+
Datetime.config = {
|
|
3064
|
+
type: type$8,
|
|
3065
|
+
keyed: true,
|
|
3066
|
+
label: 'Date time',
|
|
3067
|
+
group: 'basic-input',
|
|
3068
|
+
emptyValue: null,
|
|
3069
|
+
sanitizeValue: sanitizeDateTimePickerValue,
|
|
3070
|
+
create: (options = {}) => {
|
|
3071
|
+
const defaults = {};
|
|
3072
|
+
set(defaults, DATETIME_SUBTYPE_PATH, DATETIME_SUBTYPES.DATE);
|
|
3073
|
+
set(defaults, DATE_LABEL_PATH, 'Date');
|
|
3074
|
+
return {
|
|
3075
|
+
...defaults,
|
|
3076
|
+
...options
|
|
3077
|
+
};
|
|
3078
|
+
}
|
|
2982
3079
|
};
|
|
2983
|
-
Datetime.type = type$8;
|
|
2984
|
-
Datetime.keyed = true;
|
|
2985
|
-
Datetime.emptyValue = null;
|
|
2986
|
-
Datetime.sanitizeValue = sanitizeDateTimePickerValue;
|
|
2987
|
-
Datetime.label = 'Date time';
|
|
2988
|
-
Datetime.group = 'basic-input';
|
|
2989
3080
|
|
|
2990
3081
|
/**
|
|
2991
3082
|
* This file must not be changed or exchanged.
|
|
@@ -3029,7 +3120,7 @@ function Lightbox(props) {
|
|
|
3029
3120
|
href: "https://bpmn.io",
|
|
3030
3121
|
target: "_blank",
|
|
3031
3122
|
rel: "noopener",
|
|
3032
|
-
style: "margin: 15px 20px 15px 10px; align-self: center; color: #404040",
|
|
3123
|
+
style: "margin: 15px 20px 15px 10px; align-self: center; color: var(--cds-icon-primary, #404040)",
|
|
3033
3124
|
children: jsx(Logo, {})
|
|
3034
3125
|
}), jsxs("span", {
|
|
3035
3126
|
children: ["Web-based tooling for BPMN, DMN, and forms powered by ", jsx("a", {
|
|
@@ -3052,7 +3143,7 @@ function Link(props) {
|
|
|
3052
3143
|
rel: "noopener",
|
|
3053
3144
|
class: "fjs-powered-by-link",
|
|
3054
3145
|
title: "Powered by bpmn.io",
|
|
3055
|
-
style: "color: #404040",
|
|
3146
|
+
style: "color: var(--cds-text-primary, #404040)",
|
|
3056
3147
|
onClick: props.onClick,
|
|
3057
3148
|
children: jsx(Logo, {})
|
|
3058
3149
|
})
|
|
@@ -3080,8 +3171,12 @@ const noop = () => {};
|
|
|
3080
3171
|
function FormComponent(props) {
|
|
3081
3172
|
const form = useService('form');
|
|
3082
3173
|
const {
|
|
3083
|
-
schema
|
|
3174
|
+
schema,
|
|
3175
|
+
properties
|
|
3084
3176
|
} = form._getState();
|
|
3177
|
+
const {
|
|
3178
|
+
ariaLabel
|
|
3179
|
+
} = properties;
|
|
3085
3180
|
const {
|
|
3086
3181
|
onSubmit = noop,
|
|
3087
3182
|
onReset = noop,
|
|
@@ -3099,6 +3194,7 @@ function FormComponent(props) {
|
|
|
3099
3194
|
class: "fjs-form",
|
|
3100
3195
|
onSubmit: handleSubmit,
|
|
3101
3196
|
onReset: handleReset,
|
|
3197
|
+
"aria-label": ariaLabel,
|
|
3102
3198
|
noValidate: true,
|
|
3103
3199
|
children: [jsx(FormField, {
|
|
3104
3200
|
field: schema,
|
|
@@ -3109,7 +3205,7 @@ function FormComponent(props) {
|
|
|
3109
3205
|
|
|
3110
3206
|
const NODE_TYPE_TEXT = 3,
|
|
3111
3207
|
NODE_TYPE_ELEMENT = 1;
|
|
3112
|
-
const ALLOWED_NODES = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span', 'em', 'a', 'p', 'div', 'ul', 'ol', 'li', 'hr', 'blockquote', 'img', 'pre', 'code', 'br', 'strong'];
|
|
3208
|
+
const ALLOWED_NODES = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span', 'em', 'a', 'p', 'div', 'ul', 'ol', 'li', 'hr', 'blockquote', 'img', 'pre', 'code', 'br', 'strong', 'table', 'thead', 'tbody', 'tr', 'th', 'td'];
|
|
3113
3209
|
const ALLOWED_ATTRIBUTES = ['align', 'alt', 'class', 'href', 'id', 'name', 'rel', 'target', 'src'];
|
|
3114
3210
|
const ALLOWED_URI_PATTERN = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i; // eslint-disable-line no-useless-escape
|
|
3115
3211
|
const ALLOWED_IMAGE_SRC_PATTERN = /^(https?|data):.*/i; // eslint-disable-line no-useless-escape
|
|
@@ -3298,13 +3394,15 @@ function Image(props) {
|
|
|
3298
3394
|
})
|
|
3299
3395
|
});
|
|
3300
3396
|
}
|
|
3301
|
-
Image.
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
Image
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3397
|
+
Image.config = {
|
|
3398
|
+
type: type$7,
|
|
3399
|
+
keyed: false,
|
|
3400
|
+
label: 'Image view',
|
|
3401
|
+
group: 'presentation',
|
|
3402
|
+
create: (options = {}) => ({
|
|
3403
|
+
...options
|
|
3404
|
+
})
|
|
3405
|
+
};
|
|
3308
3406
|
|
|
3309
3407
|
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
3310
3408
|
var AngelDownIcon = (({
|
|
@@ -3371,10 +3469,10 @@ function Numberfield(props) {
|
|
|
3371
3469
|
|
|
3372
3470
|
// checks whether the value currently in the form data is practically different from the one in the input field cache
|
|
3373
3471
|
// this allows us to guarantee the field always displays valid form data, but without auto-simplifying values like 1.000 to 1
|
|
3374
|
-
const cacheValueMatchesState = useMemo(() => Numberfield.sanitizeValue({
|
|
3472
|
+
const cacheValueMatchesState = useMemo(() => Numberfield.config.sanitizeValue({
|
|
3375
3473
|
value,
|
|
3376
3474
|
formField: field
|
|
3377
|
-
}) === Numberfield.sanitizeValue({
|
|
3475
|
+
}) === Numberfield.config.sanitizeValue({
|
|
3378
3476
|
value: stringValueCache,
|
|
3379
3477
|
formField: field
|
|
3380
3478
|
}), [stringValueCache, value, field]);
|
|
@@ -3468,6 +3566,7 @@ function Numberfield(props) {
|
|
|
3468
3566
|
const {
|
|
3469
3567
|
formId
|
|
3470
3568
|
} = useContext(FormContext$1);
|
|
3569
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
3471
3570
|
return jsxs("div", {
|
|
3472
3571
|
class: formFieldClasses(type$6, {
|
|
3473
3572
|
errors,
|
|
@@ -3501,7 +3600,8 @@ function Numberfield(props) {
|
|
|
3501
3600
|
type: "text",
|
|
3502
3601
|
autoComplete: "off",
|
|
3503
3602
|
step: arrowIncrementValue,
|
|
3504
|
-
value: displayValue
|
|
3603
|
+
value: displayValue,
|
|
3604
|
+
"aria-describedby": errorMessageId
|
|
3505
3605
|
}), jsxs("div", {
|
|
3506
3606
|
class: classNames('fjs-number-arrow-container', {
|
|
3507
3607
|
'fjs-disabled': disabled
|
|
@@ -3528,31 +3628,34 @@ function Numberfield(props) {
|
|
|
3528
3628
|
}), jsx(Description, {
|
|
3529
3629
|
description: description
|
|
3530
3630
|
}), jsx(Errors, {
|
|
3531
|
-
errors: errors
|
|
3631
|
+
errors: errors,
|
|
3632
|
+
id: errorMessageId
|
|
3532
3633
|
})]
|
|
3533
3634
|
});
|
|
3534
3635
|
}
|
|
3535
|
-
Numberfield.
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3636
|
+
Numberfield.config = {
|
|
3637
|
+
type: type$6,
|
|
3638
|
+
keyed: true,
|
|
3639
|
+
label: 'Number',
|
|
3640
|
+
group: 'basic-input',
|
|
3641
|
+
emptyValue: null,
|
|
3642
|
+
sanitizeValue: ({
|
|
3643
|
+
value,
|
|
3644
|
+
formField
|
|
3645
|
+
}) => {
|
|
3646
|
+
// null state is allowed
|
|
3647
|
+
if (isNullEquivalentValue(value)) return null;
|
|
3648
|
+
|
|
3649
|
+
// if data cannot be parsed as a valid number, go into invalid NaN state
|
|
3650
|
+
if (!isValidNumber(value)) return 'NaN';
|
|
3651
|
+
|
|
3652
|
+
// otherwise parse to formatting type
|
|
3653
|
+
return formField.serializeToString ? value.toString() : Number(value);
|
|
3654
|
+
},
|
|
3655
|
+
create: (options = {}) => ({
|
|
3656
|
+
...options
|
|
3657
|
+
})
|
|
3550
3658
|
};
|
|
3551
|
-
Numberfield.type = type$6;
|
|
3552
|
-
Numberfield.keyed = true;
|
|
3553
|
-
Numberfield.label = 'Number';
|
|
3554
|
-
Numberfield.emptyValue = null;
|
|
3555
|
-
Numberfield.group = 'basic-input';
|
|
3556
3659
|
|
|
3557
3660
|
const type$5 = 'radio';
|
|
3558
3661
|
function Radio(props) {
|
|
@@ -3584,6 +3687,7 @@ function Radio(props) {
|
|
|
3584
3687
|
const {
|
|
3585
3688
|
formId
|
|
3586
3689
|
} = useContext(FormContext$1);
|
|
3690
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
3587
3691
|
return jsxs("div", {
|
|
3588
3692
|
class: formFieldClasses(type$5, {
|
|
3589
3693
|
errors,
|
|
@@ -3606,37 +3710,41 @@ function Radio(props) {
|
|
|
3606
3710
|
disabled: disabled,
|
|
3607
3711
|
id: prefixId(`${id}-${index}`, formId),
|
|
3608
3712
|
type: "radio",
|
|
3609
|
-
onClick: () => onChange(option.value)
|
|
3713
|
+
onClick: () => onChange(option.value),
|
|
3714
|
+
"aria-describedby": errorMessageId
|
|
3610
3715
|
})
|
|
3611
3716
|
}, `${id}-${index}`);
|
|
3612
3717
|
}), jsx(Description, {
|
|
3613
3718
|
description: description
|
|
3614
3719
|
}), jsx(Errors, {
|
|
3615
|
-
errors: errors
|
|
3720
|
+
errors: errors,
|
|
3721
|
+
id: errorMessageId
|
|
3616
3722
|
})]
|
|
3617
3723
|
});
|
|
3618
3724
|
}
|
|
3619
|
-
Radio.
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
}
|
|
3725
|
+
Radio.config = {
|
|
3726
|
+
type: type$5,
|
|
3727
|
+
keyed: true,
|
|
3728
|
+
label: 'Radio',
|
|
3729
|
+
group: 'selection',
|
|
3730
|
+
emptyValue: null,
|
|
3731
|
+
sanitizeValue: sanitizeSingleSelectValue,
|
|
3732
|
+
create: (options = {}) => {
|
|
3733
|
+
const defaults = {};
|
|
3734
|
+
|
|
3735
|
+
// provide default values if valuesKey isn't set
|
|
3736
|
+
if (!options.valuesKey) {
|
|
3737
|
+
defaults.values = [{
|
|
3738
|
+
label: 'Value',
|
|
3739
|
+
value: 'value'
|
|
3740
|
+
}];
|
|
3741
|
+
}
|
|
3742
|
+
return {
|
|
3743
|
+
...defaults,
|
|
3744
|
+
...options
|
|
3745
|
+
};
|
|
3628
3746
|
}
|
|
3629
|
-
return {
|
|
3630
|
-
...defaults,
|
|
3631
|
-
...options
|
|
3632
|
-
};
|
|
3633
3747
|
};
|
|
3634
|
-
Radio.type = type$5;
|
|
3635
|
-
Radio.label = 'Radio';
|
|
3636
|
-
Radio.keyed = true;
|
|
3637
|
-
Radio.emptyValue = null;
|
|
3638
|
-
Radio.sanitizeValue = sanitizeSingleSelectValue;
|
|
3639
|
-
Radio.group = 'selection';
|
|
3640
3748
|
|
|
3641
3749
|
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
3642
3750
|
var XMarkIcon = (({
|
|
@@ -3776,7 +3884,8 @@ function SearchableSelect(props) {
|
|
|
3776
3884
|
onBlur: () => {
|
|
3777
3885
|
setIsDropdownExpanded(false);
|
|
3778
3886
|
setFilter(valueLabel);
|
|
3779
|
-
}
|
|
3887
|
+
},
|
|
3888
|
+
"aria-describedby": props['aria-describedby']
|
|
3780
3889
|
}), displayState.displayCross && jsxs("span", {
|
|
3781
3890
|
class: "fjs-select-cross",
|
|
3782
3891
|
onMouseDown: e => {
|
|
@@ -3862,14 +3971,20 @@ function SimpleSelect(props) {
|
|
|
3862
3971
|
}),
|
|
3863
3972
|
onFocus: () => setIsDropdownExpanded(true),
|
|
3864
3973
|
onBlur: () => setIsDropdownExpanded(false),
|
|
3865
|
-
onMouseDown:
|
|
3866
|
-
tabIndex: disabled ? undefined : 0,
|
|
3974
|
+
onMouseDown: onMouseDown,
|
|
3867
3975
|
children: [jsx("div", {
|
|
3868
3976
|
class: classNames('fjs-select-display', {
|
|
3869
3977
|
'fjs-select-placeholder': !value
|
|
3870
3978
|
}),
|
|
3871
3979
|
id: prefixId(`${id}-display`, formId),
|
|
3872
3980
|
children: valueLabel || 'Select'
|
|
3981
|
+
}), !disabled && jsx("input", {
|
|
3982
|
+
id: prefixId(`${id}-search`, formId),
|
|
3983
|
+
class: "fjs-select-hidden-input",
|
|
3984
|
+
value: valueLabel,
|
|
3985
|
+
onFocus: () => setIsDropdownExpanded(true),
|
|
3986
|
+
onBlur: () => setIsDropdownExpanded(false),
|
|
3987
|
+
"aria-describedby": props['aria-describedby']
|
|
3873
3988
|
}), displayState.displayCross && jsx("span", {
|
|
3874
3989
|
class: "fjs-select-cross",
|
|
3875
3990
|
onMouseDown: e => {
|
|
@@ -3919,14 +4034,16 @@ function Select(props) {
|
|
|
3919
4034
|
const {
|
|
3920
4035
|
formId
|
|
3921
4036
|
} = useContext(FormContext$1);
|
|
4037
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
3922
4038
|
const selectProps = useMemo(() => ({
|
|
3923
4039
|
id,
|
|
3924
4040
|
disabled,
|
|
3925
4041
|
errors,
|
|
3926
4042
|
field,
|
|
3927
4043
|
value,
|
|
3928
|
-
onChange
|
|
3929
|
-
|
|
4044
|
+
onChange,
|
|
4045
|
+
'aria-describedby': errorMessageId
|
|
4046
|
+
}), [disabled, errors, field, id, value, onChange, errorMessageId]);
|
|
3930
4047
|
return jsxs("div", {
|
|
3931
4048
|
class: formFieldClasses(type$4, {
|
|
3932
4049
|
errors,
|
|
@@ -3939,7 +4056,7 @@ function Select(props) {
|
|
|
3939
4056
|
}
|
|
3940
4057
|
},
|
|
3941
4058
|
children: [jsx(Label, {
|
|
3942
|
-
id: prefixId(id
|
|
4059
|
+
id: prefixId(`${id}-search`, formId),
|
|
3943
4060
|
label: label,
|
|
3944
4061
|
required: required
|
|
3945
4062
|
}), searchable ? jsx(SearchableSelect, {
|
|
@@ -3949,31 +4066,34 @@ function Select(props) {
|
|
|
3949
4066
|
}), jsx(Description, {
|
|
3950
4067
|
description: description
|
|
3951
4068
|
}), jsx(Errors, {
|
|
3952
|
-
errors: errors
|
|
4069
|
+
errors: errors,
|
|
4070
|
+
id: errorMessageId
|
|
3953
4071
|
})]
|
|
3954
4072
|
});
|
|
3955
4073
|
}
|
|
3956
|
-
Select.
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
}
|
|
4074
|
+
Select.config = {
|
|
4075
|
+
type: type$4,
|
|
4076
|
+
keyed: true,
|
|
4077
|
+
label: 'Select',
|
|
4078
|
+
group: 'selection',
|
|
4079
|
+
emptyValue: null,
|
|
4080
|
+
sanitizeValue: sanitizeSingleSelectValue,
|
|
4081
|
+
create: (options = {}) => {
|
|
4082
|
+
const defaults = {};
|
|
4083
|
+
|
|
4084
|
+
// provide default values if valuesKey isn't set
|
|
4085
|
+
if (!options.valuesKey) {
|
|
4086
|
+
defaults.values = [{
|
|
4087
|
+
label: 'Value',
|
|
4088
|
+
value: 'value'
|
|
4089
|
+
}];
|
|
4090
|
+
}
|
|
4091
|
+
return {
|
|
4092
|
+
...defaults,
|
|
4093
|
+
...options
|
|
4094
|
+
};
|
|
3965
4095
|
}
|
|
3966
|
-
return {
|
|
3967
|
-
...defaults,
|
|
3968
|
-
...options
|
|
3969
|
-
};
|
|
3970
4096
|
};
|
|
3971
|
-
Select.type = type$4;
|
|
3972
|
-
Select.label = 'Select';
|
|
3973
|
-
Select.keyed = true;
|
|
3974
|
-
Select.emptyValue = null;
|
|
3975
|
-
Select.sanitizeValue = sanitizeSingleSelectValue;
|
|
3976
|
-
Select.group = 'selection';
|
|
3977
4097
|
|
|
3978
4098
|
const type$3 = 'taglist';
|
|
3979
4099
|
function Taglist(props) {
|
|
@@ -3995,6 +4115,7 @@ function Taglist(props) {
|
|
|
3995
4115
|
const {
|
|
3996
4116
|
formId
|
|
3997
4117
|
} = useContext(FormContext$1);
|
|
4118
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
3998
4119
|
const [filter, setFilter] = useState('');
|
|
3999
4120
|
const [filteredOptions, setFilteredOptions] = useState([]);
|
|
4000
4121
|
const [isDropdownExpanded, setIsDropdownExpanded] = useState(false);
|
|
@@ -4130,15 +4251,16 @@ function Taglist(props) {
|
|
|
4130
4251
|
onChange: onFilterChange,
|
|
4131
4252
|
type: "text",
|
|
4132
4253
|
value: filter,
|
|
4133
|
-
placeholder: disabled ?
|
|
4254
|
+
placeholder: disabled ? undefined : 'Search',
|
|
4134
4255
|
autoComplete: "off",
|
|
4135
|
-
onKeyDown:
|
|
4256
|
+
onKeyDown: onInputKeyDown,
|
|
4136
4257
|
onMouseDown: () => setIsEscapeClose(false),
|
|
4137
4258
|
onFocus: () => setIsDropdownExpanded(true),
|
|
4138
4259
|
onBlur: () => {
|
|
4139
4260
|
setIsDropdownExpanded(false);
|
|
4140
4261
|
setFilter('');
|
|
4141
|
-
}
|
|
4262
|
+
},
|
|
4263
|
+
"aria-describedby": errorMessageId
|
|
4142
4264
|
})]
|
|
4143
4265
|
}), jsx("div", {
|
|
4144
4266
|
class: "fjs-taglist-anchor",
|
|
@@ -4152,34 +4274,41 @@ function Taglist(props) {
|
|
|
4152
4274
|
}), jsx(Description, {
|
|
4153
4275
|
description: description
|
|
4154
4276
|
}), jsx(Errors, {
|
|
4155
|
-
errors: errors
|
|
4277
|
+
errors: errors,
|
|
4278
|
+
id: errorMessageId
|
|
4156
4279
|
})]
|
|
4157
4280
|
});
|
|
4158
4281
|
}
|
|
4159
|
-
Taglist.
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
}
|
|
4282
|
+
Taglist.config = {
|
|
4283
|
+
type: type$3,
|
|
4284
|
+
keyed: true,
|
|
4285
|
+
label: 'Tag list',
|
|
4286
|
+
group: 'selection',
|
|
4287
|
+
emptyValue: [],
|
|
4288
|
+
sanitizeValue: sanitizeMultiSelectValue,
|
|
4289
|
+
create: (options = {}) => {
|
|
4290
|
+
const defaults = {};
|
|
4291
|
+
|
|
4292
|
+
// provide default values if valuesKey isn't set
|
|
4293
|
+
if (!options.valuesKey) {
|
|
4294
|
+
defaults.values = [{
|
|
4295
|
+
label: 'Value',
|
|
4296
|
+
value: 'value'
|
|
4297
|
+
}];
|
|
4298
|
+
}
|
|
4299
|
+
return {
|
|
4300
|
+
...defaults,
|
|
4301
|
+
...options
|
|
4302
|
+
};
|
|
4168
4303
|
}
|
|
4169
|
-
return {
|
|
4170
|
-
...defaults,
|
|
4171
|
-
...options
|
|
4172
|
-
};
|
|
4173
4304
|
};
|
|
4174
|
-
Taglist.type = type$3;
|
|
4175
|
-
Taglist.label = 'Tag list';
|
|
4176
|
-
Taglist.keyed = true;
|
|
4177
|
-
Taglist.emptyValue = [];
|
|
4178
|
-
Taglist.sanitizeValue = sanitizeMultiSelectValue;
|
|
4179
|
-
Taglist.group = 'selection';
|
|
4180
4305
|
|
|
4181
4306
|
const type$2 = 'text';
|
|
4182
4307
|
function Text(props) {
|
|
4308
|
+
const form = useService('form');
|
|
4309
|
+
const {
|
|
4310
|
+
textLinkTarget
|
|
4311
|
+
} = form._getState().properties;
|
|
4183
4312
|
const {
|
|
4184
4313
|
field,
|
|
4185
4314
|
disableLinks
|
|
@@ -4201,9 +4330,20 @@ function Text(props) {
|
|
|
4201
4330
|
const html = markdownRenderer.render(markdown);
|
|
4202
4331
|
return sanitizeHTML(html);
|
|
4203
4332
|
}, [markdownRenderer, markdown]);
|
|
4204
|
-
const
|
|
4205
|
-
|
|
4206
|
-
|
|
4333
|
+
const OverridenTargetLink = useMemo(() => BuildOverridenTargetLink(textLinkTarget), [textLinkTarget]);
|
|
4334
|
+
const componentOverrides = useMemo(() => {
|
|
4335
|
+
if (disableLinks) {
|
|
4336
|
+
return {
|
|
4337
|
+
'a': DisabledLink
|
|
4338
|
+
};
|
|
4339
|
+
}
|
|
4340
|
+
if (textLinkTarget) {
|
|
4341
|
+
return {
|
|
4342
|
+
'a': OverridenTargetLink
|
|
4343
|
+
};
|
|
4344
|
+
}
|
|
4345
|
+
return {};
|
|
4346
|
+
}, [disableLinks, OverridenTargetLink, textLinkTarget]);
|
|
4207
4347
|
return jsx("div", {
|
|
4208
4348
|
class: formFieldClasses(type$2),
|
|
4209
4349
|
children: jsx(Markup, {
|
|
@@ -4213,21 +4353,35 @@ function Text(props) {
|
|
|
4213
4353
|
})
|
|
4214
4354
|
});
|
|
4215
4355
|
}
|
|
4216
|
-
Text.
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4356
|
+
Text.config = {
|
|
4357
|
+
type: type$2,
|
|
4358
|
+
keyed: false,
|
|
4359
|
+
label: 'Text view',
|
|
4360
|
+
group: 'presentation',
|
|
4361
|
+
create: (options = {}) => ({
|
|
4362
|
+
text: '# Text',
|
|
4363
|
+
...options
|
|
4364
|
+
})
|
|
4365
|
+
};
|
|
4366
|
+
function BuildOverridenTargetLink(target) {
|
|
4367
|
+
return function ({
|
|
4368
|
+
children,
|
|
4369
|
+
...rest
|
|
4370
|
+
}) {
|
|
4371
|
+
return jsx("a", {
|
|
4372
|
+
...rest,
|
|
4373
|
+
target: target,
|
|
4374
|
+
children: children
|
|
4375
|
+
});
|
|
4376
|
+
};
|
|
4377
|
+
}
|
|
4224
4378
|
function DisabledLink({
|
|
4225
|
-
|
|
4226
|
-
|
|
4379
|
+
children,
|
|
4380
|
+
...rest
|
|
4227
4381
|
}) {
|
|
4228
4382
|
return jsx("a", {
|
|
4383
|
+
...rest,
|
|
4229
4384
|
class: "fjs-disabled-link",
|
|
4230
|
-
href: href,
|
|
4231
4385
|
tabIndex: -1,
|
|
4232
4386
|
children: children
|
|
4233
4387
|
});
|
|
@@ -4266,6 +4420,7 @@ function Textfield(props) {
|
|
|
4266
4420
|
const {
|
|
4267
4421
|
formId
|
|
4268
4422
|
} = useContext(FormContext$1);
|
|
4423
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
4269
4424
|
return jsxs("div", {
|
|
4270
4425
|
class: formFieldClasses(type$1, {
|
|
4271
4426
|
errors,
|
|
@@ -4285,26 +4440,40 @@ function Textfield(props) {
|
|
|
4285
4440
|
id: prefixId(id, formId),
|
|
4286
4441
|
onInput: onChange,
|
|
4287
4442
|
type: "text",
|
|
4288
|
-
value: value
|
|
4443
|
+
value: value,
|
|
4444
|
+
"aria-describedby": errorMessageId
|
|
4289
4445
|
})
|
|
4290
4446
|
}), jsx(Description, {
|
|
4291
4447
|
description: description
|
|
4292
4448
|
}), jsx(Errors, {
|
|
4293
|
-
errors: errors
|
|
4449
|
+
errors: errors,
|
|
4450
|
+
id: errorMessageId
|
|
4294
4451
|
})]
|
|
4295
4452
|
});
|
|
4296
4453
|
}
|
|
4297
|
-
Textfield.
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4454
|
+
Textfield.config = {
|
|
4455
|
+
type: type$1,
|
|
4456
|
+
keyed: true,
|
|
4457
|
+
label: 'Text field',
|
|
4458
|
+
group: 'basic-input',
|
|
4459
|
+
emptyValue: '',
|
|
4460
|
+
sanitizeValue: ({
|
|
4461
|
+
value
|
|
4462
|
+
}) => {
|
|
4463
|
+
if (isArray(value) || isObject(value)) {
|
|
4464
|
+
return '';
|
|
4465
|
+
}
|
|
4466
|
+
|
|
4467
|
+
// sanitize newlines to spaces
|
|
4468
|
+
if (typeof value === 'string') {
|
|
4469
|
+
return value.replace(/[\r\n\t]/g, ' ');
|
|
4470
|
+
}
|
|
4471
|
+
return String(value);
|
|
4472
|
+
},
|
|
4473
|
+
create: (options = {}) => ({
|
|
4474
|
+
...options
|
|
4475
|
+
})
|
|
4476
|
+
};
|
|
4308
4477
|
|
|
4309
4478
|
const type = 'textarea';
|
|
4310
4479
|
function Textarea(props) {
|
|
@@ -4351,6 +4520,7 @@ function Textarea(props) {
|
|
|
4351
4520
|
const {
|
|
4352
4521
|
formId
|
|
4353
4522
|
} = useContext(FormContext$1);
|
|
4523
|
+
const errorMessageId = errors.length === 0 ? undefined : `${prefixId(id, formId)}-error-message`;
|
|
4354
4524
|
return jsxs("div", {
|
|
4355
4525
|
class: formFieldClasses(type, {
|
|
4356
4526
|
errors,
|
|
@@ -4366,25 +4536,29 @@ function Textarea(props) {
|
|
|
4366
4536
|
id: prefixId(id, formId),
|
|
4367
4537
|
onInput: onInput,
|
|
4368
4538
|
value: value,
|
|
4369
|
-
ref: textareaRef
|
|
4539
|
+
ref: textareaRef,
|
|
4540
|
+
"aria-describedby": errorMessageId
|
|
4370
4541
|
}), jsx(Description, {
|
|
4371
4542
|
description: description
|
|
4372
4543
|
}), jsx(Errors, {
|
|
4373
|
-
errors: errors
|
|
4544
|
+
errors: errors,
|
|
4545
|
+
id: errorMessageId
|
|
4374
4546
|
})]
|
|
4375
4547
|
});
|
|
4376
4548
|
}
|
|
4377
|
-
Textarea.
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
value
|
|
4386
|
-
|
|
4387
|
-
|
|
4549
|
+
Textarea.config = {
|
|
4550
|
+
type,
|
|
4551
|
+
keyed: true,
|
|
4552
|
+
label: 'Text area',
|
|
4553
|
+
group: 'basic-input',
|
|
4554
|
+
emptyValue: '',
|
|
4555
|
+
sanitizeValue: ({
|
|
4556
|
+
value
|
|
4557
|
+
}) => isArray(value) || isObject(value) ? '' : String(value),
|
|
4558
|
+
create: (options = {}) => ({
|
|
4559
|
+
...options
|
|
4560
|
+
})
|
|
4561
|
+
};
|
|
4388
4562
|
|
|
4389
4563
|
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
4390
4564
|
var ButtonIcon = (({
|
|
@@ -4393,10 +4567,11 @@ var ButtonIcon = (({
|
|
|
4393
4567
|
}) => /*#__PURE__*/React.createElement("svg", _extends$d({
|
|
4394
4568
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4395
4569
|
width: "54",
|
|
4396
|
-
height: "54"
|
|
4570
|
+
height: "54",
|
|
4571
|
+
fill: "currentcolor"
|
|
4397
4572
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4398
4573
|
fillRule: "evenodd",
|
|
4399
|
-
d: "M45 17a3 3 0 013 3v14a3 3 0 01-3 3H9a3 3 0 01-3-3V20a3 3 0 013-3h36zm-9 8.889H18v2.
|
|
4574
|
+
d: "M45 17a3 3 0 013 3v14a3 3 0 01-3 3H9a3 3 0 01-3-3V20a3 3 0 013-3h36zm-9 8.889H18v2.222h18v-2.222z"
|
|
4400
4575
|
})));
|
|
4401
4576
|
|
|
4402
4577
|
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
@@ -4406,7 +4581,8 @@ var CheckboxIcon = (({
|
|
|
4406
4581
|
}) => /*#__PURE__*/React.createElement("svg", _extends$c({
|
|
4407
4582
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4408
4583
|
width: "54",
|
|
4409
|
-
height: "54"
|
|
4584
|
+
height: "54",
|
|
4585
|
+
fill: "currentcolor"
|
|
4410
4586
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4411
4587
|
d: "M34 18H20a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V20a2 2 0 00-2-2zm-9 14l-5-5 1.41-1.41L25 29.17l7.59-7.59L34 23l-9 9z"
|
|
4412
4588
|
})));
|
|
@@ -4417,18 +4593,35 @@ var ChecklistIcon = (({
|
|
|
4417
4593
|
...props
|
|
4418
4594
|
}) => /*#__PURE__*/React.createElement("svg", _extends$b({
|
|
4419
4595
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4596
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
4420
4597
|
width: "54",
|
|
4421
4598
|
height: "54",
|
|
4422
|
-
fill: "
|
|
4423
|
-
}, props), /*#__PURE__*/React.createElement("
|
|
4424
|
-
fillRule: "evenodd"
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4599
|
+
fill: "currentcolor"
|
|
4600
|
+
}, props), /*#__PURE__*/React.createElement("g", {
|
|
4601
|
+
fillRule: "evenodd"
|
|
4602
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
4603
|
+
xlinkHref: "#a"
|
|
4604
|
+
}), /*#__PURE__*/React.createElement("use", {
|
|
4605
|
+
xlinkHref: "#a",
|
|
4606
|
+
y: "24"
|
|
4607
|
+
}), /*#__PURE__*/React.createElement("use", {
|
|
4608
|
+
xlinkHref: "#a",
|
|
4609
|
+
y: "12"
|
|
4610
|
+
})), /*#__PURE__*/React.createElement("use", {
|
|
4611
|
+
xlinkHref: "#b"
|
|
4612
|
+
}), /*#__PURE__*/React.createElement("use", {
|
|
4613
|
+
xlinkHref: "#b",
|
|
4614
|
+
y: "12"
|
|
4615
|
+
}), /*#__PURE__*/React.createElement("use", {
|
|
4616
|
+
xlinkHref: "#b",
|
|
4617
|
+
y: "24"
|
|
4618
|
+
}), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("path", {
|
|
4619
|
+
id: "a",
|
|
4620
|
+
d: "M18 12h-6v6h6v-6zm-6-2a2 2 0 00-2 2v6a2 2 0 002 2h6a2 2 0 002-2v-6a2 2 0 00-2-2h-6z"
|
|
4428
4621
|
}), /*#__PURE__*/React.createElement("path", {
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
})));
|
|
4622
|
+
id: "b",
|
|
4623
|
+
d: "M23 14.5a1 1 0 011-1h19a1 1 0 011 1v1a1 1 0 01-1 1H24a1 1 0 01-1-1v-1z"
|
|
4624
|
+
}))));
|
|
4432
4625
|
|
|
4433
4626
|
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
4434
4627
|
var DatetimeIcon = (({
|
|
@@ -4438,20 +4631,15 @@ var DatetimeIcon = (({
|
|
|
4438
4631
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4439
4632
|
width: "54",
|
|
4440
4633
|
height: "54",
|
|
4441
|
-
fill: "
|
|
4634
|
+
fill: "currentcolor"
|
|
4442
4635
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4443
|
-
fill: "#000",
|
|
4444
4636
|
fillRule: "evenodd",
|
|
4445
|
-
d: "M37.908 13.418h-5.004v-2.354h-1.766v2.354H21.13v-2.354h-1.766v2.354H14.
|
|
4446
|
-
clipRule: "evenodd"
|
|
4637
|
+
d: "M37.908 13.418h-5.004v-2.354h-1.766v2.354H21.13v-2.354h-1.766v2.354H14.36a2.07 2.07 0 00-2.06 2.06v23.549a2.07 2.07 0 002.06 2.06h6.77v-1.766h-6.358a.707.707 0 01-.706-.706V15.89c0-.39.316-.707.706-.707h4.592v2.355h1.766v-2.355h10.008v2.355h1.766v-2.355h4.592a.71.71 0 01.707.707v6.358h1.765v-6.77c0-1.133-.927-2.06-2.06-2.06z"
|
|
4447
4638
|
}), /*#__PURE__*/React.createElement("path", {
|
|
4448
|
-
fill: "#000",
|
|
4449
4639
|
d: "M35.13 37.603l1.237-1.237-3.468-3.475v-5.926h-1.754v6.654l3.984 3.984z"
|
|
4450
4640
|
}), /*#__PURE__*/React.createElement("path", {
|
|
4451
|
-
fill: "#000",
|
|
4452
4641
|
fillRule: "evenodd",
|
|
4453
|
-
d: "M23.08 36.962a9.678 9.678 0 1017.883-7.408 9.678 9.678 0 00-17.882 7.408zm4.54-10.292a7.924 7.924 0 118.805 13.177A7.924 7.924 0 0127.62 26.67z"
|
|
4454
|
-
clipRule: "evenodd"
|
|
4642
|
+
d: "M23.08 36.962a9.678 9.678 0 1017.883-7.408 9.678 9.678 0 00-17.882 7.408zm4.54-10.292a7.924 7.924 0 118.805 13.177A7.924 7.924 0 0127.62 26.67z"
|
|
4455
4643
|
})));
|
|
4456
4644
|
|
|
4457
4645
|
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
@@ -4459,18 +4647,15 @@ var TaglistIcon = (({
|
|
|
4459
4647
|
styles = {},
|
|
4460
4648
|
...props
|
|
4461
4649
|
}) => /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
4650
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4462
4651
|
width: "54",
|
|
4463
4652
|
height: "54",
|
|
4464
|
-
fill: "
|
|
4465
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
4653
|
+
fill: "currentcolor"
|
|
4466
4654
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4467
4655
|
fillRule: "evenodd",
|
|
4468
|
-
|
|
4469
|
-
d: "M45 16a3 3 0 013 3v16a3 3 0 01-3 3H9a3 3 0 01-3-3V19a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v16a1 1 0 001 1h36a1 1 0 001-1V19a1 1 0 00-1-1z",
|
|
4470
|
-
fill: "#000"
|
|
4656
|
+
d: "M45 16a3 3 0 013 3v16a3 3 0 01-3 3H9a3 3 0 01-3-3V19a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v16a1 1 0 001 1h36a1 1 0 001-1V19a1 1 0 00-1-1z"
|
|
4471
4657
|
}), /*#__PURE__*/React.createElement("path", {
|
|
4472
|
-
d: "M11 22a1 1 0 011-1h19a1 1 0 011 1v10a1 1 0 01-1 1H12a1 1 0 01-1-1V22z"
|
|
4473
|
-
fill: "#505562"
|
|
4658
|
+
d: "M11 22a1 1 0 011-1h19a1 1 0 011 1v10a1 1 0 01-1 1H12a1 1 0 01-1-1V22z"
|
|
4474
4659
|
})));
|
|
4475
4660
|
|
|
4476
4661
|
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
@@ -4482,22 +4667,22 @@ var FormIcon = (({
|
|
|
4482
4667
|
width: "54",
|
|
4483
4668
|
height: "54"
|
|
4484
4669
|
}, props), /*#__PURE__*/React.createElement("rect", {
|
|
4485
|
-
x: "15",
|
|
4486
|
-
y: "17",
|
|
4487
4670
|
width: "24",
|
|
4488
4671
|
height: "4",
|
|
4672
|
+
x: "15",
|
|
4673
|
+
y: "17",
|
|
4489
4674
|
rx: "1"
|
|
4490
4675
|
}), /*#__PURE__*/React.createElement("rect", {
|
|
4491
|
-
x: "15",
|
|
4492
|
-
y: "25",
|
|
4493
4676
|
width: "24",
|
|
4494
4677
|
height: "4",
|
|
4678
|
+
x: "15",
|
|
4679
|
+
y: "25",
|
|
4495
4680
|
rx: "1"
|
|
4496
4681
|
}), /*#__PURE__*/React.createElement("rect", {
|
|
4497
|
-
x: "15",
|
|
4498
|
-
y: "33",
|
|
4499
4682
|
width: "13",
|
|
4500
4683
|
height: "4",
|
|
4684
|
+
x: "15",
|
|
4685
|
+
y: "33",
|
|
4501
4686
|
rx: "1"
|
|
4502
4687
|
})));
|
|
4503
4688
|
|
|
@@ -4521,7 +4706,8 @@ var NumberIcon = (({
|
|
|
4521
4706
|
}) => /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
4522
4707
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4523
4708
|
width: "54",
|
|
4524
|
-
height: "54"
|
|
4709
|
+
height: "54",
|
|
4710
|
+
fill: "currentcolor"
|
|
4525
4711
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4526
4712
|
fillRule: "evenodd",
|
|
4527
4713
|
d: "M45 16a3 3 0 013 3v16a3 3 0 01-3 3H9a3 3 0 01-3-3V19a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v16a1 1 0 001 1h36a1 1 0 001-1V19a1 1 0 00-1-1zM35 28.444h7l-3.5 4-3.5-4zM35 26h7l-3.5-4-3.5 4z"
|
|
@@ -4534,9 +4720,10 @@ var RadioIcon = (({
|
|
|
4534
4720
|
}) => /*#__PURE__*/React.createElement("svg", _extends$5({
|
|
4535
4721
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4536
4722
|
width: "54",
|
|
4537
|
-
height: "54"
|
|
4723
|
+
height: "54",
|
|
4724
|
+
fill: "currentcolor"
|
|
4538
4725
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4539
|
-
d: "M27 22c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm0
|
|
4726
|
+
d: "M27 22c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm0 18a8 8 0 110-16 8 8 0 110 16z"
|
|
4540
4727
|
})));
|
|
4541
4728
|
|
|
4542
4729
|
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
@@ -4546,7 +4733,8 @@ var SelectIcon = (({
|
|
|
4546
4733
|
}) => /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
4547
4734
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4548
4735
|
width: "54",
|
|
4549
|
-
height: "54"
|
|
4736
|
+
height: "54",
|
|
4737
|
+
fill: "currentcolor"
|
|
4550
4738
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4551
4739
|
fillRule: "evenodd",
|
|
4552
4740
|
d: "M45 16a3 3 0 013 3v16a3 3 0 01-3 3H9a3 3 0 01-3-3V19a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v16a1 1 0 001 1h36a1 1 0 001-1V19a1 1 0 00-1-1zm-12 7h9l-4.5 6-4.5-6z"
|
|
@@ -4559,9 +4747,10 @@ var TextIcon = (({
|
|
|
4559
4747
|
}) => /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
4560
4748
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4561
4749
|
width: "54",
|
|
4562
|
-
height: "54"
|
|
4750
|
+
height: "54",
|
|
4751
|
+
fill: "currentcolor"
|
|
4563
4752
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4564
|
-
d: "M20.58 33.77h-3l-1.18-3.08H11l-1.1 3.08H7l5.27-13.54h2.89zm-5-5.36l-1.86-5-1.83 5zM22 20.23h5.41a15.47 15.47 0 012.4.14 3.42 3.42 0 011.41.55 3.47 3.47 0 011 1.14 3 3 0 01.42 1.58 3.26 3.26 0 01-1.91 2.94 3.63 3.63 0 011.91 1.22 3.28 3.28 0 01.66 2 4 4 0 01-.43 1.8 3.63 3.63 0 01-1.09 1.4 3.89 3.89 0 01-1.83.65q-.69.07-3.3.09H22zm2.73 2.25v3.13h3.8a1.79 1.79 0 001.1-.49 1.41 1.41 0 00.41-1 1.49 1.49 0 00-.35-1 1.54 1.54 0 00-1-.48c-.27 0-1.05-.05-2.34-.05zm0 5.39v3.62h2.57a11.52 11.52 0 001.88-.09 1.65 1.65 0 001-.54 1.6 1.6 0 00.38-1.14 1.75 1.75 0 00-.29-1 1.69 1.69 0 00-.86-.62 9.28 9.28 0 00-2.41-.
|
|
4753
|
+
d: "M20.58 33.77h-3l-1.18-3.08H11l-1.1 3.08H7l5.27-13.54h2.89zm-5-5.36l-1.86-5-1.83 5zM22 20.23h5.41a15.47 15.47 0 012.4.14 3.42 3.42 0 011.41.55 3.47 3.47 0 011 1.14 3 3 0 01.42 1.58 3.26 3.26 0 01-1.91 2.94 3.63 3.63 0 011.91 1.22 3.28 3.28 0 01.66 2 4 4 0 01-.43 1.8 3.63 3.63 0 01-1.09 1.4 3.89 3.89 0 01-1.83.65q-.69.07-3.3.09H22zm2.73 2.25v3.13h3.8a1.79 1.79 0 001.1-.49 1.41 1.41 0 00.41-1 1.49 1.49 0 00-.35-1 1.54 1.54 0 00-1-.48c-.27 0-1.05-.05-2.34-.05zm0 5.39v3.62h2.57a11.52 11.52 0 001.88-.09 1.65 1.65 0 001-.54 1.6 1.6 0 00.38-1.14 1.75 1.75 0 00-.29-1 1.69 1.69 0 00-.86-.62 9.28 9.28 0 00-2.41-.23zm19.62.92l2.65.84a5.94 5.94 0 01-2 3.29A5.74 5.74 0 0141.38 34a5.87 5.87 0 01-4.44-1.84 7.09 7.09 0 01-1.73-5A7.43 7.43 0 0137 21.87 6 6 0 0141.54 20a5.64 5.64 0 014 1.47A5.33 5.33 0 0147 24l-2.7.65a2.8 2.8 0 00-2.86-2.27A3.09 3.09 0 0039 23.42a5.31 5.31 0 00-.93 3.5 5.62 5.62 0 00.93 3.65 3 3 0 002.4 1.09 2.72 2.72 0 001.82-.66 4 4 0 001.13-2.21z"
|
|
4565
4754
|
})));
|
|
4566
4755
|
|
|
4567
4756
|
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
@@ -4571,7 +4760,8 @@ var TextfieldIcon = (({
|
|
|
4571
4760
|
}) => /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
4572
4761
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4573
4762
|
width: "54",
|
|
4574
|
-
height: "54"
|
|
4763
|
+
height: "54",
|
|
4764
|
+
fill: "currentcolor"
|
|
4575
4765
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4576
4766
|
fillRule: "evenodd",
|
|
4577
4767
|
d: "M45 16a3 3 0 013 3v16a3 3 0 01-3 3H9a3 3 0 01-3-3V19a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v16a1 1 0 001 1h36a1 1 0 001-1V19a1 1 0 00-1-1zm-32 4v10h-2V22h2z"
|
|
@@ -4584,10 +4774,11 @@ var TextareaIcon = (({
|
|
|
4584
4774
|
}) => /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
4585
4775
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4586
4776
|
width: "54",
|
|
4587
|
-
height: "54"
|
|
4777
|
+
height: "54",
|
|
4778
|
+
fill: "currentcolor"
|
|
4588
4779
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4589
4780
|
fillRule: "evenodd",
|
|
4590
|
-
d: "M45 13a3 3 0 013 3v22a3 3 0 01-3 3H9a3 3 0 01-3-3V16a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v22a1 1 0 001 1h36a1 1 0 001-1V16a1 1 0 00-1-1zm-1.136 15.5l.
|
|
4781
|
+
d: "M45 13a3 3 0 013 3v22a3 3 0 01-3 3H9a3 3 0 01-3-3V16a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v22a1 1 0 001 1h36a1 1 0 001-1V16a1 1 0 00-1-1zm-1.136 15.5l.849.849-6.364 6.364-.849-.849 6.364-6.364zm.264 3.5l.849.849-2.828 2.828-.849-.849L44.128 34zM13 19v10h-2V19h2z"
|
|
4591
4782
|
})));
|
|
4592
4783
|
|
|
4593
4784
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -4595,20 +4786,18 @@ var ImageIcon = (({
|
|
|
4595
4786
|
styles = {},
|
|
4596
4787
|
...props
|
|
4597
4788
|
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
4789
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4598
4790
|
width: "54",
|
|
4599
4791
|
height: "54",
|
|
4600
|
-
fill: "
|
|
4601
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
4792
|
+
fill: "currentcolor"
|
|
4602
4793
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
4603
4794
|
fillRule: "evenodd",
|
|
4604
|
-
clipRule: "evenodd",
|
|
4605
4795
|
d: "M34.636 21.91A3.818 3.818 0 1127 21.908a3.818 3.818 0 017.636 0zm-2 0A1.818 1.818 0 1129 21.908a1.818 1.818 0 013.636 0z",
|
|
4606
|
-
|
|
4796
|
+
clipRule: "evenodd"
|
|
4607
4797
|
}), /*#__PURE__*/React.createElement("path", {
|
|
4608
4798
|
fillRule: "evenodd",
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
fill: "#000"
|
|
4799
|
+
d: "M15 13a2 2 0 00-2 2v24a2 2 0 002 2h24a2 2 0 002-2V15a2 2 0 00-2-2H15zm24 2H15v12.45l4.71-4.709a1.91 1.91 0 012.702 0l6.695 6.695 2.656-1.77a1.91 1.91 0 012.411.239L39 32.73V15zM15 39v-8.754a.975.975 0 00.168-.135l5.893-5.893 6.684 6.685a1.911 1.911 0 002.41.238l2.657-1.77 6.02 6.02c.052.051.108.097.168.135V39H15z",
|
|
4800
|
+
clipRule: "evenodd"
|
|
4612
4801
|
})));
|
|
4613
4802
|
|
|
4614
4803
|
const iconsByType = type => {
|
|
@@ -4636,7 +4825,7 @@ class FormFields {
|
|
|
4636
4825
|
constructor() {
|
|
4637
4826
|
this._formFields = {};
|
|
4638
4827
|
formFields.forEach(formField => {
|
|
4639
|
-
this.register(formField.type, formField);
|
|
4828
|
+
this.register(formField.config.type, formField);
|
|
4640
4829
|
});
|
|
4641
4830
|
}
|
|
4642
4831
|
register(type, formField) {
|