@micromag/fields 0.3.797 → 0.3.800
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/assets/css/styles.css +2 -1
- package/es/all.js +28 -2
- package/es/index.js +755 -631
- package/package.json +9 -9
package/es/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
20
20
|
import { createNullableOnChange, isMessage, getFileName, getStyleFromBox, getStyleFromColor, getFontFamilyFromFont, getGridLayoutName, getShadowCoords, getColorAsString, getStyleFromLink, getStyleFromHighlight, getStyleFromText } from '@micromag/core/utils';
|
|
21
21
|
import { faAngleRight } from '@fortawesome/free-solid-svg-icons/faAngleRight';
|
|
22
22
|
import { faSlidersH } from '@fortawesome/free-solid-svg-icons/faSlidersH';
|
|
23
|
+
import Switch from 'rc-switch';
|
|
23
24
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
24
25
|
import { faBars } from '@fortawesome/free-solid-svg-icons/faBars';
|
|
25
26
|
import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
|
|
@@ -30,10 +31,10 @@ import isFunction from 'lodash/isFunction';
|
|
|
30
31
|
import { ReactSortable } from 'react-sortablejs';
|
|
31
32
|
import get from 'lodash/get';
|
|
32
33
|
import MediaGallery from '@micromag/media-gallery';
|
|
34
|
+
import isArray from 'lodash/isArray';
|
|
35
|
+
import isEmpty from 'lodash/isEmpty';
|
|
33
36
|
import isString from 'lodash/isString';
|
|
34
37
|
import Fuse from 'fuse.js';
|
|
35
|
-
import isEmpty from 'lodash/isEmpty';
|
|
36
|
-
import isArray from 'lodash/isArray';
|
|
37
38
|
import Slider from 'rc-slider';
|
|
38
39
|
import tinycolor from 'tinycolor2';
|
|
39
40
|
import { SketchPicker } from 'react-color';
|
|
@@ -55,7 +56,6 @@ import Select from 'react-select';
|
|
|
55
56
|
import { CKEditor } from '@ckeditor/ckeditor5-react';
|
|
56
57
|
import { getCSRFHeaders } from '@folklore/fetch';
|
|
57
58
|
import { useUppyConfig } from '@panneau/uppy';
|
|
58
|
-
import Switch from 'rc-switch';
|
|
59
59
|
import AsyncCreatableSelect from 'react-select/async-creatable';
|
|
60
60
|
import { faCircle } from '@fortawesome/free-solid-svg-icons/faCircle';
|
|
61
61
|
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';
|
|
@@ -172,6 +172,32 @@ var alignment = {
|
|
|
172
172
|
fields: [alignHorizontal, alignVertical]
|
|
173
173
|
};
|
|
174
174
|
|
|
175
|
+
var alternative = {
|
|
176
|
+
id: 'alternative',
|
|
177
|
+
component: 'alternative'
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
var alternatives = {
|
|
181
|
+
id: 'alternatives',
|
|
182
|
+
isList: true,
|
|
183
|
+
fields: [{
|
|
184
|
+
name: 'audio',
|
|
185
|
+
type: 'audio-element',
|
|
186
|
+
withToggle: true,
|
|
187
|
+
label: defineMessage({
|
|
188
|
+
id: "hzt68m",
|
|
189
|
+
defaultMessage: [{
|
|
190
|
+
"type": 0,
|
|
191
|
+
"value": "Audio"
|
|
192
|
+
}]
|
|
193
|
+
}),
|
|
194
|
+
defaultValue: {
|
|
195
|
+
autoPlay: true,
|
|
196
|
+
withControls: true
|
|
197
|
+
}
|
|
198
|
+
}]
|
|
199
|
+
};
|
|
200
|
+
|
|
175
201
|
var answer = {
|
|
176
202
|
id: 'answer',
|
|
177
203
|
component: 'field-with-form',
|
|
@@ -1301,7 +1327,7 @@ var entriesWithVisual = _objectSpread(_objectSpread({}, entries), {}, {
|
|
|
1301
1327
|
var entry = {
|
|
1302
1328
|
id: 'entry',
|
|
1303
1329
|
component: 'field-with-form',
|
|
1304
|
-
labelPath: 'title.body',
|
|
1330
|
+
labelPath: ['title.body', 'description.body'],
|
|
1305
1331
|
fields: [{
|
|
1306
1332
|
name: 'title',
|
|
1307
1333
|
type: 'heading-element',
|
|
@@ -2880,6 +2906,8 @@ var allFields = /*#__PURE__*/Object.freeze({
|
|
|
2880
2906
|
alignHorizontal: alignHorizontal,
|
|
2881
2907
|
alignVertical: alignVertical,
|
|
2882
2908
|
alignment: alignment,
|
|
2909
|
+
alternative: alternative,
|
|
2910
|
+
alternatives: alternatives,
|
|
2883
2911
|
answer: answer,
|
|
2884
2912
|
answers: answers,
|
|
2885
2913
|
audio: audio,
|
|
@@ -3000,9 +3028,9 @@ var getSelectOptions = function getSelectOptions(options) {
|
|
|
3000
3028
|
});
|
|
3001
3029
|
};
|
|
3002
3030
|
|
|
3003
|
-
var styles$
|
|
3031
|
+
var styles$K = {"container":"micromag-fields-radios-container","item":"micromag-fields-radios-item"};
|
|
3004
3032
|
|
|
3005
|
-
var propTypes$
|
|
3033
|
+
var propTypes$1B = {
|
|
3006
3034
|
name: PropTypes.string,
|
|
3007
3035
|
value: PropTypes.string,
|
|
3008
3036
|
options: PropTypes$1.selectOptions,
|
|
@@ -3013,7 +3041,7 @@ var propTypes$1A = {
|
|
|
3013
3041
|
onChange: PropTypes.func,
|
|
3014
3042
|
uncheckable: PropTypes.bool
|
|
3015
3043
|
};
|
|
3016
|
-
var defaultProps$
|
|
3044
|
+
var defaultProps$1B = {
|
|
3017
3045
|
name: null,
|
|
3018
3046
|
value: null,
|
|
3019
3047
|
options: [],
|
|
@@ -3038,14 +3066,14 @@ var Radios = function Radios(_ref) {
|
|
|
3038
3066
|
return getSelectOptions(options);
|
|
3039
3067
|
}, [options]);
|
|
3040
3068
|
return /*#__PURE__*/React.createElement("div", {
|
|
3041
|
-
className: classNames(['btn-group', 'btn-group-toggle', styles$
|
|
3069
|
+
className: classNames(['btn-group', 'btn-group-toggle', styles$K.container, _defineProperty({}, className, className !== null)]),
|
|
3042
3070
|
"data-toggle": "buttons"
|
|
3043
3071
|
}, finalOptions.map(function (_ref3, index) {
|
|
3044
3072
|
var optionValue = _ref3.value,
|
|
3045
3073
|
label = _ref3.label;
|
|
3046
3074
|
return /*#__PURE__*/React.createElement("label", {
|
|
3047
3075
|
key: "radio-".concat(optionValue, "-").concat(index + 1),
|
|
3048
|
-
className: classNames(['btn', styles$
|
|
3076
|
+
className: classNames(['btn', styles$K.item, withBackground ? 'btn-secondary' : 'btn-outline-secondary', _defineProperty(_defineProperty({
|
|
3049
3077
|
active: optionValue === value
|
|
3050
3078
|
}, activeClassName, activeClassName !== null && optionValue === value), buttonClassName, buttonClassName !== null)])
|
|
3051
3079
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -3068,18 +3096,18 @@ var Radios = function Radios(_ref) {
|
|
|
3068
3096
|
}), ' ', /*#__PURE__*/React.createElement(Label, null, label));
|
|
3069
3097
|
}));
|
|
3070
3098
|
};
|
|
3071
|
-
Radios.propTypes = propTypes$
|
|
3072
|
-
Radios.defaultProps = defaultProps$
|
|
3099
|
+
Radios.propTypes = propTypes$1B;
|
|
3100
|
+
Radios.defaultProps = defaultProps$1B;
|
|
3073
3101
|
|
|
3074
|
-
var styles$
|
|
3102
|
+
var styles$J = {"container":"micromag-fields-border-style-container","button":"micromag-fields-border-style-button","type":"micromag-fields-border-style-type","borders":"micromag-fields-border-style-borders"};
|
|
3075
3103
|
|
|
3076
|
-
var propTypes$
|
|
3104
|
+
var propTypes$1A = {
|
|
3077
3105
|
types: PropTypes.arrayOf(PropTypes.string),
|
|
3078
3106
|
value: PropTypes.string,
|
|
3079
3107
|
className: PropTypes.string,
|
|
3080
3108
|
onChange: PropTypes.func
|
|
3081
3109
|
};
|
|
3082
|
-
var defaultProps$
|
|
3110
|
+
var defaultProps$1A = {
|
|
3083
3111
|
types: [{
|
|
3084
3112
|
name: '300x200',
|
|
3085
3113
|
width: 300,
|
|
@@ -3107,7 +3135,7 @@ var AdFormatField = function AdFormatField(_ref) {
|
|
|
3107
3135
|
return {
|
|
3108
3136
|
value: type,
|
|
3109
3137
|
label: /*#__PURE__*/React.createElement("div", {
|
|
3110
|
-
className: styles$
|
|
3138
|
+
className: styles$J.type
|
|
3111
3139
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3112
3140
|
style: {
|
|
3113
3141
|
width: type.width / 10,
|
|
@@ -3118,22 +3146,22 @@ var AdFormatField = function AdFormatField(_ref) {
|
|
|
3118
3146
|
};
|
|
3119
3147
|
}),
|
|
3120
3148
|
value: value || (types ? types[0] : null),
|
|
3121
|
-
className: classNames([styles$
|
|
3122
|
-
buttonClassName: styles$
|
|
3149
|
+
className: classNames([styles$J.container, _defineProperty({}, className, className !== null)]),
|
|
3150
|
+
buttonClassName: styles$J.button,
|
|
3123
3151
|
onChange: onChange
|
|
3124
3152
|
});
|
|
3125
3153
|
};
|
|
3126
|
-
AdFormatField.propTypes = propTypes$
|
|
3127
|
-
AdFormatField.defaultProps = defaultProps$
|
|
3154
|
+
AdFormatField.propTypes = propTypes$1A;
|
|
3155
|
+
AdFormatField.defaultProps = defaultProps$1A;
|
|
3128
3156
|
|
|
3129
|
-
var styles$
|
|
3157
|
+
var styles$I = {"icon":"micromag-fields-align-horizontal-icon","left":"micromag-fields-align-horizontal-left","middle":"micromag-fields-align-horizontal-middle","right":"micromag-fields-align-horizontal-right"};
|
|
3130
3158
|
|
|
3131
|
-
var propTypes$
|
|
3159
|
+
var propTypes$1z = {
|
|
3132
3160
|
value: PropTypes.oneOf(['left', 'middle', 'right']),
|
|
3133
3161
|
className: PropTypes.string,
|
|
3134
3162
|
onChange: PropTypes.func
|
|
3135
3163
|
};
|
|
3136
|
-
var defaultProps$
|
|
3164
|
+
var defaultProps$1z = {
|
|
3137
3165
|
value: null,
|
|
3138
3166
|
className: null,
|
|
3139
3167
|
onChange: null
|
|
@@ -3143,7 +3171,7 @@ var AlignHorizontal = function AlignHorizontal(_ref) {
|
|
|
3143
3171
|
className = _ref.className,
|
|
3144
3172
|
onChange = _ref.onChange;
|
|
3145
3173
|
return /*#__PURE__*/React.createElement("div", {
|
|
3146
|
-
className: classNames([styles$
|
|
3174
|
+
className: classNames([styles$I.container, _defineProperty({}, className, className !== null)])
|
|
3147
3175
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3148
3176
|
className: classNames(['d-flex', 'align-items-center'])
|
|
3149
3177
|
}, /*#__PURE__*/React.createElement(Radios, {
|
|
@@ -3151,20 +3179,20 @@ var AlignHorizontal = function AlignHorizontal(_ref) {
|
|
|
3151
3179
|
return {
|
|
3152
3180
|
value: type,
|
|
3153
3181
|
label: /*#__PURE__*/React.createElement("div", {
|
|
3154
|
-
className: classNames([styles$
|
|
3182
|
+
className: classNames([styles$I.icon, styles$I[type]])
|
|
3155
3183
|
}, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null))
|
|
3156
3184
|
};
|
|
3157
3185
|
}),
|
|
3158
3186
|
value: value !== null ? value : null,
|
|
3159
|
-
className: classNames([styles$
|
|
3160
|
-
buttonClassName: styles$
|
|
3187
|
+
className: classNames([styles$I.container, _defineProperty({}, className, className !== null)]),
|
|
3188
|
+
buttonClassName: styles$I.button,
|
|
3161
3189
|
onChange: onChange
|
|
3162
3190
|
})));
|
|
3163
3191
|
};
|
|
3164
|
-
AlignHorizontal.propTypes = propTypes$
|
|
3165
|
-
AlignHorizontal.defaultProps = defaultProps$
|
|
3192
|
+
AlignHorizontal.propTypes = propTypes$1z;
|
|
3193
|
+
AlignHorizontal.defaultProps = defaultProps$1z;
|
|
3166
3194
|
|
|
3167
|
-
var styles$
|
|
3195
|
+
var styles$H = {};
|
|
3168
3196
|
|
|
3169
3197
|
var icons$1 = {
|
|
3170
3198
|
top: function top(props) {
|
|
@@ -3177,13 +3205,13 @@ var icons$1 = {
|
|
|
3177
3205
|
return /*#__PURE__*/React.createElement("div", props, "bottom");
|
|
3178
3206
|
}
|
|
3179
3207
|
};
|
|
3180
|
-
var propTypes$
|
|
3208
|
+
var propTypes$1y = {
|
|
3181
3209
|
value: PropTypes.oneOf(['top', 'bottom', 'middle']),
|
|
3182
3210
|
defaultValue: PropTypes.oneOf(['top', 'bottom', 'middle']),
|
|
3183
3211
|
className: PropTypes.string,
|
|
3184
3212
|
onChange: PropTypes.func
|
|
3185
3213
|
};
|
|
3186
|
-
var defaultProps$
|
|
3214
|
+
var defaultProps$1y = {
|
|
3187
3215
|
value: null,
|
|
3188
3216
|
defaultValue: null,
|
|
3189
3217
|
className: null,
|
|
@@ -3199,7 +3227,7 @@ var AlignVertical = function AlignVertical(_ref) {
|
|
|
3199
3227
|
onChange(newVal);
|
|
3200
3228
|
}, [finalValue]);
|
|
3201
3229
|
return /*#__PURE__*/React.createElement("div", {
|
|
3202
|
-
className: classNames([styles$
|
|
3230
|
+
className: classNames([styles$H.container, _defineProperty({}, className, className !== null)])
|
|
3203
3231
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3204
3232
|
className: classNames(['d-flex', 'align-items-center', 'mb-2'])
|
|
3205
3233
|
}, /*#__PURE__*/React.createElement(Radios, {
|
|
@@ -3208,41 +3236,41 @@ var AlignVertical = function AlignVertical(_ref) {
|
|
|
3208
3236
|
return {
|
|
3209
3237
|
value: type,
|
|
3210
3238
|
label: /*#__PURE__*/React.createElement("div", {
|
|
3211
|
-
className: styles$
|
|
3239
|
+
className: styles$H.type
|
|
3212
3240
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
3213
|
-
className: styles$
|
|
3241
|
+
className: styles$H.icon
|
|
3214
3242
|
}))
|
|
3215
3243
|
};
|
|
3216
3244
|
}),
|
|
3217
3245
|
value: finalValue !== null ? finalValue : null,
|
|
3218
|
-
className: classNames([styles$
|
|
3219
|
-
buttonClassName: styles$
|
|
3246
|
+
className: classNames([styles$H.container, _defineProperty({}, className, className !== null)]),
|
|
3247
|
+
buttonClassName: styles$H.button,
|
|
3220
3248
|
onChange: onAlignChange
|
|
3221
3249
|
})));
|
|
3222
3250
|
};
|
|
3223
|
-
AlignVertical.propTypes = propTypes$
|
|
3224
|
-
AlignVertical.defaultProps = defaultProps$
|
|
3251
|
+
AlignVertical.propTypes = propTypes$1y;
|
|
3252
|
+
AlignVertical.defaultProps = defaultProps$1y;
|
|
3225
3253
|
|
|
3226
|
-
var styles$
|
|
3254
|
+
var styles$G = {"label":"micromag-fields-alignment-label"};
|
|
3227
3255
|
|
|
3228
3256
|
var icons = {
|
|
3229
3257
|
horizontal: {
|
|
3230
3258
|
left: function left(props) {
|
|
3231
3259
|
return /*#__PURE__*/React.createElement("div", props, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3232
3260
|
icon: faArrowLeft,
|
|
3233
|
-
className: styles$
|
|
3261
|
+
className: styles$G.icon
|
|
3234
3262
|
}));
|
|
3235
3263
|
},
|
|
3236
3264
|
middle: function middle(props) {
|
|
3237
3265
|
return /*#__PURE__*/React.createElement("div", props, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3238
3266
|
icon: faDotCircle,
|
|
3239
|
-
className: styles$
|
|
3267
|
+
className: styles$G.icon
|
|
3240
3268
|
}));
|
|
3241
3269
|
},
|
|
3242
3270
|
right: function right(props) {
|
|
3243
3271
|
return /*#__PURE__*/React.createElement("div", props, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3244
3272
|
icon: faArrowRight,
|
|
3245
|
-
className: styles$
|
|
3273
|
+
className: styles$G.icon
|
|
3246
3274
|
}));
|
|
3247
3275
|
}
|
|
3248
3276
|
},
|
|
@@ -3250,24 +3278,24 @@ var icons = {
|
|
|
3250
3278
|
top: function top(props) {
|
|
3251
3279
|
return /*#__PURE__*/React.createElement("div", props, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3252
3280
|
icon: faArrowUp,
|
|
3253
|
-
className: styles$
|
|
3281
|
+
className: styles$G.icon
|
|
3254
3282
|
}));
|
|
3255
3283
|
},
|
|
3256
3284
|
middle: function middle(props) {
|
|
3257
3285
|
return /*#__PURE__*/React.createElement("div", props, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3258
3286
|
icon: faDotCircle,
|
|
3259
|
-
className: styles$
|
|
3287
|
+
className: styles$G.icon
|
|
3260
3288
|
}));
|
|
3261
3289
|
},
|
|
3262
3290
|
bottom: function bottom(props) {
|
|
3263
3291
|
return /*#__PURE__*/React.createElement("div", props, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3264
3292
|
icon: faArrowDown,
|
|
3265
|
-
className: styles$
|
|
3293
|
+
className: styles$G.icon
|
|
3266
3294
|
}));
|
|
3267
3295
|
}
|
|
3268
3296
|
}
|
|
3269
3297
|
};
|
|
3270
|
-
var propTypes$
|
|
3298
|
+
var propTypes$1x = {
|
|
3271
3299
|
alignment: PropTypes.shape({
|
|
3272
3300
|
horizontal: PropTypes.oneOf(['left', 'right', 'middle']),
|
|
3273
3301
|
vertical: PropTypes.oneOf(['top', 'bottom', 'middle'])
|
|
@@ -3279,7 +3307,7 @@ var propTypes$1w = {
|
|
|
3279
3307
|
className: PropTypes.string,
|
|
3280
3308
|
onChange: PropTypes.func
|
|
3281
3309
|
};
|
|
3282
|
-
var defaultProps$
|
|
3310
|
+
var defaultProps$1x = {
|
|
3283
3311
|
alignment: {
|
|
3284
3312
|
horizontal: 'middle',
|
|
3285
3313
|
vertical: 'middle'
|
|
@@ -3318,13 +3346,13 @@ var Alignment = function Alignment(_ref) {
|
|
|
3318
3346
|
onChange(nextValue);
|
|
3319
3347
|
}, [value, onChange]);
|
|
3320
3348
|
return /*#__PURE__*/React.createElement("div", {
|
|
3321
|
-
className: classNames([styles$
|
|
3349
|
+
className: classNames([styles$G.container, _defineProperty({}, className, className !== null)])
|
|
3322
3350
|
}, Object.keys(alignment).map(function (axis) {
|
|
3323
3351
|
return /*#__PURE__*/React.createElement("div", {
|
|
3324
3352
|
key: axis,
|
|
3325
3353
|
className: classNames(['d-flex', 'align-items-center', 'mb-2'])
|
|
3326
3354
|
}, /*#__PURE__*/React.createElement("small", {
|
|
3327
|
-
className: styles$
|
|
3355
|
+
className: styles$G.label
|
|
3328
3356
|
}, axis === 'horizontal' ? /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
3329
3357
|
id: "xTJlyi",
|
|
3330
3358
|
defaultMessage: [{
|
|
@@ -3343,29 +3371,29 @@ var Alignment = function Alignment(_ref) {
|
|
|
3343
3371
|
return {
|
|
3344
3372
|
value: type,
|
|
3345
3373
|
label: /*#__PURE__*/React.createElement("div", {
|
|
3346
|
-
className: styles$
|
|
3374
|
+
className: styles$G.type
|
|
3347
3375
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
3348
|
-
className: styles$
|
|
3376
|
+
className: styles$G.icon
|
|
3349
3377
|
}))
|
|
3350
3378
|
};
|
|
3351
3379
|
}),
|
|
3352
3380
|
value: value !== null ? value[axis] : null,
|
|
3353
|
-
className: classNames([styles$
|
|
3354
|
-
buttonClassName: styles$
|
|
3381
|
+
className: classNames([styles$G.container, _defineProperty({}, className, className !== null)]),
|
|
3382
|
+
buttonClassName: styles$G.button,
|
|
3355
3383
|
onChange: axis === 'horizontal' ? onHorizontalAlignChange : onVerticalAlignChange
|
|
3356
3384
|
}));
|
|
3357
3385
|
}));
|
|
3358
3386
|
};
|
|
3359
|
-
Alignment.propTypes = propTypes$
|
|
3360
|
-
Alignment.defaultProps = defaultProps$
|
|
3387
|
+
Alignment.propTypes = propTypes$1x;
|
|
3388
|
+
Alignment.defaultProps = defaultProps$1x;
|
|
3361
3389
|
|
|
3362
|
-
var styles$
|
|
3390
|
+
var styles$F = {"container":"micromag-fields-field-errors-container","error":"micromag-fields-field-errors-error"};
|
|
3363
3391
|
|
|
3364
|
-
var propTypes$
|
|
3392
|
+
var propTypes$1w = {
|
|
3365
3393
|
errors: PropTypes$1.errors,
|
|
3366
3394
|
className: PropTypes.string
|
|
3367
3395
|
};
|
|
3368
|
-
var defaultProps$
|
|
3396
|
+
var defaultProps$1w = {
|
|
3369
3397
|
errors: null,
|
|
3370
3398
|
className: null
|
|
3371
3399
|
};
|
|
@@ -3373,23 +3401,23 @@ var FieldErrors$1 = function FieldErrors(_ref) {
|
|
|
3373
3401
|
var errors = _ref.errors,
|
|
3374
3402
|
className = _ref.className;
|
|
3375
3403
|
return errors !== null && errors.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
3376
|
-
className: classNames([styles$
|
|
3404
|
+
className: classNames([styles$F.container, _defineProperty({}, className, className !== null)])
|
|
3377
3405
|
}, errors.map(function (error) {
|
|
3378
3406
|
return /*#__PURE__*/React.createElement("div", {
|
|
3379
3407
|
key: "error-".concat(error),
|
|
3380
|
-
className: classNames(['invalid-feedback', styles$
|
|
3408
|
+
className: classNames(['invalid-feedback', styles$F.error])
|
|
3381
3409
|
}, error);
|
|
3382
3410
|
})) : null;
|
|
3383
3411
|
};
|
|
3384
|
-
FieldErrors$1.propTypes = propTypes$
|
|
3385
|
-
FieldErrors$1.defaultProps = defaultProps$
|
|
3412
|
+
FieldErrors$1.propTypes = propTypes$1w;
|
|
3413
|
+
FieldErrors$1.defaultProps = defaultProps$1w;
|
|
3386
3414
|
|
|
3387
|
-
var propTypes$
|
|
3415
|
+
var propTypes$1v = {
|
|
3388
3416
|
children: PropTypes$1.label,
|
|
3389
3417
|
muted: PropTypes.bool,
|
|
3390
3418
|
className: PropTypes.string
|
|
3391
3419
|
};
|
|
3392
|
-
var defaultProps$
|
|
3420
|
+
var defaultProps$1v = {
|
|
3393
3421
|
children: null,
|
|
3394
3422
|
muted: true,
|
|
3395
3423
|
className: null
|
|
@@ -3405,8 +3433,39 @@ var FieldErrors = function FieldErrors(_ref) {
|
|
|
3405
3433
|
}, className, className !== null)])
|
|
3406
3434
|
}, /*#__PURE__*/React.createElement(Label, null, children));
|
|
3407
3435
|
};
|
|
3408
|
-
FieldErrors.propTypes = propTypes$
|
|
3409
|
-
FieldErrors.defaultProps = defaultProps$
|
|
3436
|
+
FieldErrors.propTypes = propTypes$1v;
|
|
3437
|
+
FieldErrors.defaultProps = defaultProps$1v;
|
|
3438
|
+
|
|
3439
|
+
var styles$E = {"container":"micromag-fields-toggle-container"};
|
|
3440
|
+
|
|
3441
|
+
var propTypes$1u = {
|
|
3442
|
+
value: PropTypes.bool,
|
|
3443
|
+
defaultValue: PropTypes.bool,
|
|
3444
|
+
className: PropTypes.string,
|
|
3445
|
+
onChange: PropTypes.func
|
|
3446
|
+
};
|
|
3447
|
+
var defaultProps$1u = {
|
|
3448
|
+
value: null,
|
|
3449
|
+
defaultValue: null,
|
|
3450
|
+
className: null,
|
|
3451
|
+
onChange: null
|
|
3452
|
+
};
|
|
3453
|
+
var ToggleField = function ToggleField(_ref) {
|
|
3454
|
+
var value = _ref.value,
|
|
3455
|
+
defaultValue = _ref.defaultValue,
|
|
3456
|
+
className = _ref.className,
|
|
3457
|
+
onChange = _ref.onChange;
|
|
3458
|
+
var finalValue = value === null && (defaultValue === true || defaultValue === 'true') ? true : value;
|
|
3459
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3460
|
+
className: classNames([styles$E.container, _defineProperty({}, className, className !== null)])
|
|
3461
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
3462
|
+
checked: finalValue !== null ? finalValue : false,
|
|
3463
|
+
onChange: onChange
|
|
3464
|
+
}));
|
|
3465
|
+
};
|
|
3466
|
+
ToggleField.propTypes = propTypes$1u;
|
|
3467
|
+
ToggleField.defaultProps = defaultProps$1u;
|
|
3468
|
+
ToggleField.isHorizontal = true;
|
|
3410
3469
|
|
|
3411
3470
|
var styles$D = {"resetButton":"micromag-fields-field-row-resetButton","colLabel":"micromag-fields-field-row-colLabel","colValue":"micromag-fields-field-row-colValue","colButtonWidth":"micromag-fields-field-row-colButtonWidth","colMinWidth":"micromag-fields-field-row-colMinWidth","settingsButton":"micromag-fields-field-row-settingsButton"};
|
|
3412
3471
|
|
|
@@ -3414,6 +3473,10 @@ var propTypes$1t = {
|
|
|
3414
3473
|
label: PropTypes$1.label,
|
|
3415
3474
|
errors: PropTypes$1.errors,
|
|
3416
3475
|
help: PropTypes$1.label,
|
|
3476
|
+
value: PropTypes.any,
|
|
3477
|
+
// eslint-disable-line react/forbid-prop-types
|
|
3478
|
+
defaultValue: PropTypes.any,
|
|
3479
|
+
// eslint-disable-line react/forbid-prop-types
|
|
3417
3480
|
children: PropTypes.node,
|
|
3418
3481
|
isSection: PropTypes.bool,
|
|
3419
3482
|
isHorizontal: PropTypes.bool,
|
|
@@ -3421,12 +3484,14 @@ var propTypes$1t = {
|
|
|
3421
3484
|
withoutLabel: PropTypes.bool,
|
|
3422
3485
|
withoutCaret: PropTypes.bool,
|
|
3423
3486
|
withSettings: PropTypes.bool,
|
|
3487
|
+
withToggle: PropTypes.bool,
|
|
3424
3488
|
withForm: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
3425
3489
|
withValue: PropTypes.bool,
|
|
3426
3490
|
buttonTheme: PropTypes$1.buttonTheme,
|
|
3427
3491
|
buttonOutline: PropTypes.bool,
|
|
3428
3492
|
gotoSettings: PropTypes.func,
|
|
3429
3493
|
gotoForm: PropTypes.func,
|
|
3494
|
+
onChange: PropTypes.func,
|
|
3430
3495
|
className: PropTypes.string,
|
|
3431
3496
|
labelClassName: PropTypes.string,
|
|
3432
3497
|
buttonClassName: PropTypes.string
|
|
@@ -3436,18 +3501,22 @@ var defaultProps$1t = {
|
|
|
3436
3501
|
errors: null,
|
|
3437
3502
|
help: null,
|
|
3438
3503
|
children: null,
|
|
3504
|
+
value: null,
|
|
3505
|
+
defaultValue: null,
|
|
3439
3506
|
isSection: false,
|
|
3440
3507
|
isHorizontal: false,
|
|
3441
3508
|
isListItem: false,
|
|
3442
3509
|
withoutLabel: false,
|
|
3443
3510
|
withoutCaret: false,
|
|
3444
3511
|
withSettings: false,
|
|
3512
|
+
withToggle: false,
|
|
3445
3513
|
withForm: false,
|
|
3446
3514
|
withValue: false,
|
|
3447
3515
|
buttonTheme: null,
|
|
3448
3516
|
buttonOutline: false,
|
|
3449
3517
|
gotoSettings: null,
|
|
3450
3518
|
gotoForm: null,
|
|
3519
|
+
onChange: null,
|
|
3451
3520
|
className: null,
|
|
3452
3521
|
labelClassName: null,
|
|
3453
3522
|
buttonClassName: null
|
|
@@ -3457,6 +3526,8 @@ var FieldRow = function FieldRow(_ref) {
|
|
|
3457
3526
|
var label = _ref.label,
|
|
3458
3527
|
errors = _ref.errors,
|
|
3459
3528
|
help = _ref.help,
|
|
3529
|
+
value = _ref.value,
|
|
3530
|
+
defaultValue = _ref.defaultValue,
|
|
3460
3531
|
children = _ref.children,
|
|
3461
3532
|
isSection = _ref.isSection,
|
|
3462
3533
|
isHorizontal = _ref.isHorizontal,
|
|
@@ -3464,12 +3535,14 @@ var FieldRow = function FieldRow(_ref) {
|
|
|
3464
3535
|
withoutLabel = _ref.withoutLabel,
|
|
3465
3536
|
withoutCaret = _ref.withoutCaret,
|
|
3466
3537
|
withSettings = _ref.withSettings,
|
|
3538
|
+
withToggle = _ref.withToggle,
|
|
3467
3539
|
withForm = _ref.withForm,
|
|
3468
3540
|
withValue = _ref.withValue,
|
|
3469
3541
|
buttonTheme = _ref.buttonTheme,
|
|
3470
3542
|
buttonOutline = _ref.buttonOutline,
|
|
3471
3543
|
gotoForm = _ref.gotoForm,
|
|
3472
3544
|
gotoSettings = _ref.gotoSettings,
|
|
3545
|
+
onChange = _ref.onChange,
|
|
3473
3546
|
className = _ref.className,
|
|
3474
3547
|
labelClassName = _ref.labelClassName,
|
|
3475
3548
|
buttonClassName = _ref.buttonClassName;
|
|
@@ -3494,6 +3567,7 @@ var FieldRow = function FieldRow(_ref) {
|
|
|
3494
3567
|
errors: errors
|
|
3495
3568
|
}) : null;
|
|
3496
3569
|
var hasIndicationsUnder = helpElement !== null || errorsElement !== null;
|
|
3570
|
+
var toggled = !withToggle || value !== null;
|
|
3497
3571
|
var labelElement = label !== null ? /*#__PURE__*/React.createElement("label", {
|
|
3498
3572
|
className: classNames((_classNames = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_classNames, styles$D.colLabel, isHorizontal), 'col-form-label', isHorizontal || withSettings), 'form-label', !isHorizontal && !withSettings), 'col-auto', isHorizontal), "col", !isHorizontal && withSettings), 'py-0', isHorizontal), 'pt-2', isHorizontal && hasIndicationsUnder), 'me-1', isHorizontal), 'align-self-center', isHorizontal && !hasIndicationsUnder), 'fw-normal', !isSection), _defineProperty(_defineProperty(_classNames, 'fw-bold', isSection), labelClassName, labelClassName !== null)))
|
|
3499
3573
|
}, /*#__PURE__*/React.createElement(Label, null, label)) : null;
|
|
@@ -3508,7 +3582,7 @@ var FieldRow = function FieldRow(_ref) {
|
|
|
3508
3582
|
}, labelElement, /*#__PURE__*/React.createElement("span", {
|
|
3509
3583
|
className: classNames(['col', styles$D.colValue, 'align-self-center', _defineProperty(_defineProperty({}, styles$D.colMinWidth, isListItem), styles$D.colButtonWidth, isClickable && buttonTheme !== null)])
|
|
3510
3584
|
}, /*#__PURE__*/React.createElement("span", {
|
|
3511
|
-
className: classNames(['d-flex', 'justify-content-end'
|
|
3585
|
+
className: classNames(['d-flex', 'justify-content-end'])
|
|
3512
3586
|
}, children), helpElement !== null || errorsElement !== null ? /*#__PURE__*/React.createElement("span", {
|
|
3513
3587
|
className: classNames(['d-flex', 'mt-1',
|
|
3514
3588
|
// 'w-100',
|
|
@@ -3522,11 +3596,19 @@ var FieldRow = function FieldRow(_ref) {
|
|
|
3522
3596
|
className: containerClassName
|
|
3523
3597
|
}, rowInner);
|
|
3524
3598
|
}
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
},
|
|
3599
|
+
var onToggleChange = useCallback(function (newValue) {
|
|
3600
|
+
if (onChange !== null) {
|
|
3601
|
+
onChange(newValue ? defaultValue || {} : null);
|
|
3602
|
+
}
|
|
3603
|
+
}, [withToggle, onChange, defaultValue]);
|
|
3604
|
+
var toggleElement = withToggle ? /*#__PURE__*/React.createElement("div", {
|
|
3605
|
+
className: classNames(['col-auto'])
|
|
3606
|
+
}, /*#__PURE__*/React.createElement(ToggleField, {
|
|
3607
|
+
value: toggled,
|
|
3608
|
+
onChange: onToggleChange,
|
|
3609
|
+
className: "ms-1"
|
|
3610
|
+
})) : null;
|
|
3611
|
+
var settingsElement = toggled && withSettings ? /*#__PURE__*/React.createElement("div", {
|
|
3530
3612
|
className: classNames(['col-auto'])
|
|
3531
3613
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
3532
3614
|
className: styles$D.settingsButton,
|
|
@@ -3535,7 +3617,12 @@ var FieldRow = function FieldRow(_ref) {
|
|
|
3535
3617
|
disabled: !withValue
|
|
3536
3618
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3537
3619
|
icon: faSlidersH
|
|
3538
|
-
})))
|
|
3620
|
+
}))) : null;
|
|
3621
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3622
|
+
className: containerClassName
|
|
3623
|
+
}, withLabel && (settingsElement !== null || toggleElement !== null) ? /*#__PURE__*/React.createElement("div", {
|
|
3624
|
+
className: classNames(['row', 'align-items-center', 'gx-1'])
|
|
3625
|
+
}, labelElement, settingsElement, toggleElement) : withLabel ? labelElement : null, isClickable ? /*#__PURE__*/React.createElement(Button, {
|
|
3539
3626
|
className: classNames([styles$D.arrow, 'd-block', 'w-100', 'px-2', _defineProperty({
|
|
3540
3627
|
'bg-dark': buttonTheme === null
|
|
3541
3628
|
}, buttonClassName, buttonClassName !== null)]),
|
|
@@ -3551,8 +3638,8 @@ var FieldRow = function FieldRow(_ref) {
|
|
|
3551
3638
|
FieldRow.propTypes = propTypes$1t;
|
|
3552
3639
|
FieldRow.defaultProps = defaultProps$1t;
|
|
3553
3640
|
|
|
3554
|
-
var _excluded$
|
|
3555
|
-
_excluded2$3 = ["component", "fields", "settings", "withoutLabel", "withoutFieldRow", "withForm", "withModal", "isList", "canClear"];
|
|
3641
|
+
var _excluded$C = ["name", "type", "component", "label", "help", "errors", "fields", "isHorizontal", "isSection", "isListItem", "withForm", "withModal", "withToggle", "value", "onChange", "gotoFieldForm", "closeFieldForm", "className", "labelClassName", "fieldClassName"],
|
|
3642
|
+
_excluded2$3 = ["component", "fields", "settings", "withoutLabel", "withoutFieldRow", "withForm", "withModal", "isList", "canClear", "withToggle"];
|
|
3556
3643
|
var propTypes$1s = {
|
|
3557
3644
|
name: PropTypes.string,
|
|
3558
3645
|
// .isRequired,
|
|
@@ -3610,6 +3697,7 @@ var Field = function Field(_ref) {
|
|
|
3610
3697
|
isListItem = _ref.isListItem,
|
|
3611
3698
|
providedWithForm = _ref.withForm,
|
|
3612
3699
|
providedWithModal = _ref.withModal,
|
|
3700
|
+
providedWithToggle = _ref.withToggle,
|
|
3613
3701
|
value = _ref.value,
|
|
3614
3702
|
onChange = _ref.onChange,
|
|
3615
3703
|
gotoFieldForm = _ref.gotoFieldForm,
|
|
@@ -3617,7 +3705,7 @@ var Field = function Field(_ref) {
|
|
|
3617
3705
|
className = _ref.className,
|
|
3618
3706
|
labelClassName = _ref.labelClassName,
|
|
3619
3707
|
fieldClassName = _ref.fieldClassName,
|
|
3620
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3708
|
+
props = _objectWithoutProperties(_ref, _excluded$C);
|
|
3621
3709
|
var fieldsManager = useFieldsManager();
|
|
3622
3710
|
var FieldsComponent = fieldsManager.getComponent('fields');
|
|
3623
3711
|
var _ref2 = (type !== null ? fieldsManager.getDefinition(type) || null : null) || {
|
|
@@ -3641,6 +3729,8 @@ var Field = function Field(_ref) {
|
|
|
3641
3729
|
isList = _ref2$isList === void 0 ? false : _ref2$isList,
|
|
3642
3730
|
_ref2$canClear = _ref2.canClear,
|
|
3643
3731
|
canClear = _ref2$canClear === void 0 ? false : _ref2$canClear,
|
|
3732
|
+
_ref2$withToggle = _ref2.withToggle,
|
|
3733
|
+
withToggle = _ref2$withToggle === void 0 ? providedWithToggle : _ref2$withToggle,
|
|
3644
3734
|
fieldProps = _objectWithoutProperties(_ref2, _excluded2$3);
|
|
3645
3735
|
var FieldComponent = useFieldComponent(fieldComponent);
|
|
3646
3736
|
var isFields = FieldComponent === FieldsComponent;
|
|
@@ -3662,7 +3752,7 @@ var Field = function Field(_ref) {
|
|
|
3662
3752
|
var finalIsHorizontal = isHorizontal !== null ? isHorizontal : FieldComponent.isHorizontal || finalWithForm !== false && isListItem || finalWithModal !== false && isListItem || null;
|
|
3663
3753
|
var finalWithoutLabel = withoutLabel || FieldComponent.withoutLabel || false;
|
|
3664
3754
|
var finalWithSettings = settings !== null || typeof FieldComponent.withSettings !== 'undefined' && FieldComponent.withSettings || typeof FieldComponent.settingsComponent !== 'undefined' || false;
|
|
3665
|
-
var fieldElement = /*#__PURE__*/React.createElement(FieldComponent, Object.assign({
|
|
3755
|
+
var fieldElement = !withToggle || value !== null ? /*#__PURE__*/React.createElement(FieldComponent, Object.assign({
|
|
3666
3756
|
isHorizontal: finalIsHorizontal && !isFields,
|
|
3667
3757
|
isList: isList,
|
|
3668
3758
|
canClear: canClear,
|
|
@@ -3678,8 +3768,10 @@ var Field = function Field(_ref) {
|
|
|
3678
3768
|
onChange: onChange,
|
|
3679
3769
|
gotoFieldForm: gotoFieldForm,
|
|
3680
3770
|
gotoForm: gotoForm
|
|
3681
|
-
}));
|
|
3771
|
+
})) : null;
|
|
3682
3772
|
return !withoutFieldRow ? /*#__PURE__*/React.createElement(FieldRow, Object.assign({}, props, fieldProps, {
|
|
3773
|
+
value: value,
|
|
3774
|
+
onChange: onChange,
|
|
3683
3775
|
label: label,
|
|
3684
3776
|
errors: errors,
|
|
3685
3777
|
help: help,
|
|
@@ -3688,6 +3780,7 @@ var Field = function Field(_ref) {
|
|
|
3688
3780
|
isListItem: isListItem,
|
|
3689
3781
|
withoutLabel: finalWithoutLabel,
|
|
3690
3782
|
withSettings: finalWithSettings,
|
|
3783
|
+
withToggle: withToggle,
|
|
3691
3784
|
withForm: finalWithForm,
|
|
3692
3785
|
withValue: value !== null,
|
|
3693
3786
|
gotoSettings: gotoSettings,
|
|
@@ -3909,10 +4002,63 @@ var Fields = function Fields(_ref) {
|
|
|
3909
4002
|
Fields.propTypes = propTypes$1r;
|
|
3910
4003
|
Fields.defaultProps = defaultProps$1r;
|
|
3911
4004
|
|
|
3912
|
-
var styles$B = {
|
|
4005
|
+
var styles$B = {};
|
|
3913
4006
|
|
|
3914
|
-
var _excluded$
|
|
4007
|
+
var _excluded$B = ["value", "className", "onChange", "fields", "toggleLabel"];
|
|
3915
4008
|
var propTypes$1q = {
|
|
4009
|
+
value: PropTypes$1.badge,
|
|
4010
|
+
className: PropTypes.string,
|
|
4011
|
+
onChange: PropTypes.func
|
|
4012
|
+
};
|
|
4013
|
+
var defaultProps$1q = {
|
|
4014
|
+
value: null,
|
|
4015
|
+
className: null,
|
|
4016
|
+
onChange: null
|
|
4017
|
+
};
|
|
4018
|
+
var Alternative = function Alternative(_ref) {
|
|
4019
|
+
var value = _ref.value,
|
|
4020
|
+
className = _ref.className,
|
|
4021
|
+
onChange = _ref.onChange,
|
|
4022
|
+
fields = _ref.fields,
|
|
4023
|
+
toggleLabel = _ref.toggleLabel,
|
|
4024
|
+
props = _objectWithoutProperties(_ref, _excluded$B);
|
|
4025
|
+
var finalFields = useMemo(function () {
|
|
4026
|
+
return [{
|
|
4027
|
+
name: 'active',
|
|
4028
|
+
type: 'toggle',
|
|
4029
|
+
isHorizontal: true,
|
|
4030
|
+
label: toggleLabel
|
|
4031
|
+
}].concat(_toConsumableArray(value !== null ? fields : []));
|
|
4032
|
+
}, [fields, value, toggleLabel]);
|
|
4033
|
+
console.log({
|
|
4034
|
+
value: value,
|
|
4035
|
+
fields: fields,
|
|
4036
|
+
finalFields: finalFields
|
|
4037
|
+
});
|
|
4038
|
+
var onUpdateValue = useCallback(function (newValue) {
|
|
4039
|
+
var _ref2 = newValue || {},
|
|
4040
|
+
_ref2$active = _ref2.active,
|
|
4041
|
+
nowActive = _ref2$active === void 0 ? false : _ref2$active;
|
|
4042
|
+
if (onChange !== null) {
|
|
4043
|
+
onChange(nowActive ? newValue : null);
|
|
4044
|
+
}
|
|
4045
|
+
}, [onChange]);
|
|
4046
|
+
return /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
4047
|
+
className: classNames([styles$B.container, _defineProperty({}, className, className !== null)]),
|
|
4048
|
+
fieldClassName: styles$B.field
|
|
4049
|
+
}, props, {
|
|
4050
|
+
fields: finalFields,
|
|
4051
|
+
value: value,
|
|
4052
|
+
onChange: onUpdateValue
|
|
4053
|
+
}));
|
|
4054
|
+
};
|
|
4055
|
+
Alternative.propTypes = propTypes$1q;
|
|
4056
|
+
Alternative.defaultProps = defaultProps$1q;
|
|
4057
|
+
|
|
4058
|
+
var styles$A = {"container":"micromag-fields-slide-container","noValue":"micromag-fields-slide-noValue","value":"micromag-fields-slide-value","panel":"micromag-fields-slide-panel"};
|
|
4059
|
+
|
|
4060
|
+
var _excluded$A = ["value", "isForm", "className"];
|
|
4061
|
+
var propTypes$1p = {
|
|
3916
4062
|
value: PropTypes.shape({
|
|
3917
4063
|
text: PropTypes.string,
|
|
3918
4064
|
image: PropTypes$1.imageMedia
|
|
@@ -3920,7 +4066,7 @@ var propTypes$1q = {
|
|
|
3920
4066
|
isForm: PropTypes.bool,
|
|
3921
4067
|
className: PropTypes.string
|
|
3922
4068
|
};
|
|
3923
|
-
var defaultProps$
|
|
4069
|
+
var defaultProps$1p = {
|
|
3924
4070
|
value: null,
|
|
3925
4071
|
isForm: false,
|
|
3926
4072
|
className: null
|
|
@@ -3934,7 +4080,7 @@ var AnswerField = function AnswerField(_ref) {
|
|
|
3934
4080
|
_ref2$text = _ref2.text,
|
|
3935
4081
|
text = _ref2$text === void 0 ? null : _ref2$text;
|
|
3936
4082
|
return isForm ? /*#__PURE__*/React.createElement("div", {
|
|
3937
|
-
className: classNames([styles$
|
|
4083
|
+
className: classNames([styles$A.panel, _defineProperty({}, className, className !== null)])
|
|
3938
4084
|
}, /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
3939
4085
|
className: classNames([{
|
|
3940
4086
|
'p-2': isForm,
|
|
@@ -3943,18 +4089,18 @@ var AnswerField = function AnswerField(_ref) {
|
|
|
3943
4089
|
}, props, {
|
|
3944
4090
|
value: value
|
|
3945
4091
|
}))) : /*#__PURE__*/React.createElement("div", {
|
|
3946
|
-
className: classNames([styles$
|
|
4092
|
+
className: classNames([styles$A.container, _defineProperty({}, className, className !== null)])
|
|
3947
4093
|
}, text !== null ? /*#__PURE__*/React.createElement("span", {
|
|
3948
|
-
className: styles$
|
|
4094
|
+
className: styles$A.value
|
|
3949
4095
|
}, text) : /*#__PURE__*/React.createElement("span", {
|
|
3950
|
-
className: styles$
|
|
4096
|
+
className: styles$A.noValue
|
|
3951
4097
|
}, "Entrez une question..."));
|
|
3952
4098
|
};
|
|
3953
|
-
AnswerField.propTypes = propTypes$
|
|
3954
|
-
AnswerField.defaultProps = defaultProps$
|
|
4099
|
+
AnswerField.propTypes = propTypes$1p;
|
|
4100
|
+
AnswerField.defaultProps = defaultProps$1p;
|
|
3955
4101
|
|
|
3956
4102
|
var _excluded$z = ["name", "value", "getDefaultValue", "noItemLabel", "addItemLabel", "itemFieldLabel", "itemComponent", "itemsField", "itemsProps", "className", "withoutSort", "withoutAddItem", "withoutDeleteItem", "onChange", "isFieldForm", "gotoFieldForm", "closeFieldForm"];
|
|
3957
|
-
var propTypes$
|
|
4103
|
+
var propTypes$1o = {
|
|
3958
4104
|
name: PropTypes.string,
|
|
3959
4105
|
value: PropTypes.arrayOf(PropTypes.object),
|
|
3960
4106
|
// eslint-disable-line
|
|
@@ -3975,7 +4121,7 @@ var propTypes$1p = {
|
|
|
3975
4121
|
closeFieldForm: PropTypes.func,
|
|
3976
4122
|
onChange: PropTypes.func
|
|
3977
4123
|
};
|
|
3978
|
-
var defaultProps$
|
|
4124
|
+
var defaultProps$1o = {
|
|
3979
4125
|
name: null,
|
|
3980
4126
|
value: null,
|
|
3981
4127
|
getDefaultValue: null,
|
|
@@ -4218,14 +4364,14 @@ var ItemsField = function ItemsField(_ref2) {
|
|
|
4218
4364
|
}]
|
|
4219
4365
|
})) : null));
|
|
4220
4366
|
};
|
|
4221
|
-
ItemsField.propTypes = propTypes$
|
|
4222
|
-
ItemsField.defaultProps = defaultProps$
|
|
4367
|
+
ItemsField.propTypes = propTypes$1o;
|
|
4368
|
+
ItemsField.defaultProps = defaultProps$1o;
|
|
4223
4369
|
|
|
4224
4370
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
4225
|
-
var propTypes$
|
|
4371
|
+
var propTypes$1n = {
|
|
4226
4372
|
value: PropTypes$1.answers
|
|
4227
4373
|
};
|
|
4228
|
-
var defaultProps$
|
|
4374
|
+
var defaultProps$1n = {
|
|
4229
4375
|
value: null
|
|
4230
4376
|
};
|
|
4231
4377
|
var AnswersField = function AnswersField(props) {
|
|
@@ -4247,13 +4393,21 @@ var AnswersField = function AnswersField(props) {
|
|
|
4247
4393
|
itemComponent: AnswerField
|
|
4248
4394
|
}, props));
|
|
4249
4395
|
};
|
|
4250
|
-
AnswersField.propTypes = propTypes$
|
|
4251
|
-
AnswersField.defaultProps = defaultProps$
|
|
4396
|
+
AnswersField.propTypes = propTypes$1n;
|
|
4397
|
+
AnswersField.defaultProps = defaultProps$1n;
|
|
4252
4398
|
|
|
4253
|
-
var styles$
|
|
4399
|
+
var styles$z = {"thumbnail":"micromag-fields-field-with-form-thumbnail","label":"micromag-fields-field-with-form-label","clearButton":"micromag-fields-field-with-form-clearButton"};
|
|
4254
4400
|
|
|
4255
4401
|
var _excluded$y = ["value", "isForm", "canClear", "noValueLabel", "label", "labelPath", "withTitleLabel", "thumbnail", "thumbnailPath", "isHorizontal", "className", "onChange", "closeForm", "children", "field"];
|
|
4256
|
-
|
|
4402
|
+
function getItemLabel(item, labelPath, defaultValue) {
|
|
4403
|
+
return (isArray(labelPath) ? labelPath : [labelPath]).reduce(function (acc, path) {
|
|
4404
|
+
if (!isEmpty(acc)) {
|
|
4405
|
+
return acc;
|
|
4406
|
+
}
|
|
4407
|
+
return path !== null ? get(item, path, defaultValue) : defaultValue;
|
|
4408
|
+
}, defaultValue);
|
|
4409
|
+
}
|
|
4410
|
+
var propTypes$1m = {
|
|
4257
4411
|
value: PropTypes.any,
|
|
4258
4412
|
// eslint-disable-line
|
|
4259
4413
|
isForm: PropTypes.bool,
|
|
@@ -4271,7 +4425,7 @@ var propTypes$1n = {
|
|
|
4271
4425
|
onChange: PropTypes.func,
|
|
4272
4426
|
closeForm: PropTypes.func
|
|
4273
4427
|
};
|
|
4274
|
-
var defaultProps$
|
|
4428
|
+
var defaultProps$1m = {
|
|
4275
4429
|
value: null,
|
|
4276
4430
|
isForm: false,
|
|
4277
4431
|
canClear: false,
|
|
@@ -4324,7 +4478,7 @@ var FieldWithForm = function FieldWithForm(_ref) {
|
|
|
4324
4478
|
onChange: onChange
|
|
4325
4479
|
}));
|
|
4326
4480
|
}
|
|
4327
|
-
var labelValue = label !== null ? label :
|
|
4481
|
+
var labelValue = label !== null ? label : getItemLabel(value, labelPath, null);
|
|
4328
4482
|
var labelElement = null;
|
|
4329
4483
|
var labelString = null;
|
|
4330
4484
|
if (labelValue !== null && isMessage(labelValue)) {
|
|
@@ -4344,7 +4498,7 @@ var FieldWithForm = function FieldWithForm(_ref) {
|
|
|
4344
4498
|
} else if (thumbnailSrc !== null) {
|
|
4345
4499
|
thumbElement = /*#__PURE__*/React.createElement("img", {
|
|
4346
4500
|
src: thumbnailSrc,
|
|
4347
|
-
className: styles$
|
|
4501
|
+
className: styles$z.thumbnail,
|
|
4348
4502
|
alt: label
|
|
4349
4503
|
});
|
|
4350
4504
|
}
|
|
@@ -4367,14 +4521,14 @@ var FieldWithForm = function FieldWithForm(_ref) {
|
|
|
4367
4521
|
}, !isHorizontal && thumbnailElement !== null ? /*#__PURE__*/React.createElement("span", {
|
|
4368
4522
|
className: "col-auto"
|
|
4369
4523
|
}, thumbnailElement) : null, /*#__PURE__*/React.createElement("span", {
|
|
4370
|
-
className: classNames([styles$
|
|
4524
|
+
className: classNames([styles$z.label, 'col', 'text-monospace', 'text-start', 'text-truncate', 'fw-bold', {
|
|
4371
4525
|
'text-start': !isHorizontal,
|
|
4372
4526
|
'text-end': isHorizontal
|
|
4373
4527
|
}])
|
|
4374
4528
|
}, labelElement), isHorizontal && thumbnailElement !== null ? /*#__PURE__*/React.createElement("span", {
|
|
4375
4529
|
className: "col-auto ps-0"
|
|
4376
4530
|
}, thumbnailElement) : null, value !== null && canClear ? /*#__PURE__*/React.createElement(ClearButton, {
|
|
4377
|
-
className: styles$
|
|
4531
|
+
className: styles$z.clearButton,
|
|
4378
4532
|
onClick: onClear
|
|
4379
4533
|
}) : null)) : /*#__PURE__*/React.createElement("span", {
|
|
4380
4534
|
className: classNames(['col', 'text-body-secondary', {
|
|
@@ -4390,14 +4544,14 @@ var FieldWithForm = function FieldWithForm(_ref) {
|
|
|
4390
4544
|
}]
|
|
4391
4545
|
}))));
|
|
4392
4546
|
};
|
|
4393
|
-
FieldWithForm.propTypes = propTypes$
|
|
4394
|
-
FieldWithForm.defaultProps = defaultProps$
|
|
4547
|
+
FieldWithForm.propTypes = propTypes$1m;
|
|
4548
|
+
FieldWithForm.defaultProps = defaultProps$1m;
|
|
4395
4549
|
FieldWithForm.withForm = true;
|
|
4396
4550
|
|
|
4397
|
-
var styles$
|
|
4551
|
+
var styles$y = {"clearButton":"micromag-fields-media-modal-clearButton","previewButton":"micromag-fields-media-modal-previewButton","dialog":"micromag-fields-media-modal-dialog","thumbnail":"micromag-fields-media-modal-thumbnail","dialogBody":"micromag-fields-media-modal-dialogBody","shaded":"micromag-fields-media-modal-shaded","small":"micromag-fields-media-modal-small"};
|
|
4398
4552
|
|
|
4399
4553
|
var _excluded$x = ["title", "value", "type", "noValueLabel", "isHorizontal", "onChange", "onRequestClose", "multiple", "thumbnail", "thumbnailPath", "className", "buttonsClassName"];
|
|
4400
|
-
var propTypes$
|
|
4554
|
+
var propTypes$1l = {
|
|
4401
4555
|
title: PropTypes.string,
|
|
4402
4556
|
value: PropTypes$1.media,
|
|
4403
4557
|
type: PropTypes.string,
|
|
@@ -4411,7 +4565,7 @@ var propTypes$1m = {
|
|
|
4411
4565
|
className: PropTypes.string,
|
|
4412
4566
|
buttonsClassName: PropTypes.string
|
|
4413
4567
|
};
|
|
4414
|
-
var defaultProps$
|
|
4568
|
+
var defaultProps$1l = {
|
|
4415
4569
|
title: null,
|
|
4416
4570
|
value: null,
|
|
4417
4571
|
type: null,
|
|
@@ -4467,7 +4621,7 @@ var MediaModal = function MediaModal(_ref) {
|
|
|
4467
4621
|
} else if (thumbnailSrc !== null) {
|
|
4468
4622
|
thumbnailElement = /*#__PURE__*/React.createElement("img", {
|
|
4469
4623
|
src: thumbnailSrc,
|
|
4470
|
-
className: styles$
|
|
4624
|
+
className: styles$y.thumbnail,
|
|
4471
4625
|
alt: label
|
|
4472
4626
|
});
|
|
4473
4627
|
}
|
|
@@ -4584,12 +4738,12 @@ var MediaModal = function MediaModal(_ref) {
|
|
|
4584
4738
|
className: "d-flex w-100 align-items-center justify-content-between mw-100 overflow-hidden"
|
|
4585
4739
|
}, /*#__PURE__*/React.createElement("button", {
|
|
4586
4740
|
type: "button",
|
|
4587
|
-
className: classNames([styles$
|
|
4741
|
+
className: classNames([styles$y.previewButton, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles$y.shaded, !isHorizontal), styles$y.small, isHorizontal), 'p-2', !isHorizontal), 'mx-auto', !isHorizontal), 'bg-dark', !isHorizontal), 'flex-grow-1', true)]),
|
|
4588
4742
|
onClick: onOpen
|
|
4589
4743
|
}, /*#__PURE__*/React.createElement("span", {
|
|
4590
4744
|
className: "row"
|
|
4591
4745
|
}, /*#__PURE__*/React.createElement("span", {
|
|
4592
|
-
className: classNames([styles$
|
|
4746
|
+
className: classNames([styles$y.label, 'col', 'w-75', 'text-monospace', 'text-truncate', {
|
|
4593
4747
|
'fw-bold': value !== null,
|
|
4594
4748
|
'text-start': !isHorizontal,
|
|
4595
4749
|
'text-end': isHorizontal
|
|
@@ -4608,12 +4762,12 @@ var MediaModal = function MediaModal(_ref) {
|
|
|
4608
4762
|
}))), thumbnailElement !== null ? /*#__PURE__*/React.createElement("span", {
|
|
4609
4763
|
className: "col-auto ps-0"
|
|
4610
4764
|
}, thumbnailElement) : null)), value !== null ? /*#__PURE__*/React.createElement(ClearButton, {
|
|
4611
|
-
className: classNames([styles$
|
|
4765
|
+
className: classNames([styles$y.clearButton]),
|
|
4612
4766
|
onClick: onClearMedia
|
|
4613
4767
|
}) : null)), modalOpen ? /*#__PURE__*/React.createElement(Modal, null, /*#__PURE__*/React.createElement(ModalDialog, {
|
|
4614
4768
|
title: dialogTitle,
|
|
4615
|
-
className: classNames([styles$
|
|
4616
|
-
bodyClassName: styles$
|
|
4769
|
+
className: classNames([styles$y.dialog, _defineProperty({}, className, className)]),
|
|
4770
|
+
bodyClassName: styles$y.dialogBody,
|
|
4617
4771
|
size: "xl",
|
|
4618
4772
|
onClose: onClose,
|
|
4619
4773
|
buttons: !mediaFormOpen ? [{
|
|
@@ -4653,16 +4807,16 @@ var MediaModal = function MediaModal(_ref) {
|
|
|
4653
4807
|
onMediaFormClose: onMediaFormClose
|
|
4654
4808
|
}))) : null);
|
|
4655
4809
|
};
|
|
4656
|
-
MediaModal.propTypes = propTypes$
|
|
4657
|
-
MediaModal.defaultProps = defaultProps$
|
|
4810
|
+
MediaModal.propTypes = propTypes$1l;
|
|
4811
|
+
MediaModal.defaultProps = defaultProps$1l;
|
|
4658
4812
|
MediaModal.withModal = true;
|
|
4659
4813
|
|
|
4660
4814
|
var _excluded$w = ["closeForm", "onChange"];
|
|
4661
|
-
var propTypes$
|
|
4815
|
+
var propTypes$1k = {
|
|
4662
4816
|
onChange: PropTypes.func,
|
|
4663
4817
|
closeForm: PropTypes.func
|
|
4664
4818
|
};
|
|
4665
|
-
var defaultProps$
|
|
4819
|
+
var defaultProps$1k = {
|
|
4666
4820
|
onChange: null,
|
|
4667
4821
|
closeForm: null
|
|
4668
4822
|
};
|
|
@@ -4683,15 +4837,15 @@ var MediaField = function MediaField(_ref) {
|
|
|
4683
4837
|
onChange: closeOnChange
|
|
4684
4838
|
}, props));
|
|
4685
4839
|
};
|
|
4686
|
-
MediaField.propTypes = propTypes$
|
|
4687
|
-
MediaField.defaultProps = defaultProps$
|
|
4840
|
+
MediaField.propTypes = propTypes$1k;
|
|
4841
|
+
MediaField.defaultProps = defaultProps$1k;
|
|
4688
4842
|
MediaField.withForm = true;
|
|
4689
4843
|
|
|
4690
4844
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
4691
|
-
var propTypes$
|
|
4845
|
+
var propTypes$1j = {
|
|
4692
4846
|
value: PropTypes$1.audioMedia
|
|
4693
4847
|
};
|
|
4694
|
-
var defaultProps$
|
|
4848
|
+
var defaultProps$1j = {
|
|
4695
4849
|
value: null
|
|
4696
4850
|
};
|
|
4697
4851
|
var AudioField = function AudioField(props) {
|
|
@@ -4707,11 +4861,11 @@ var AudioField = function AudioField(props) {
|
|
|
4707
4861
|
type: "audio"
|
|
4708
4862
|
}));
|
|
4709
4863
|
};
|
|
4710
|
-
AudioField.propTypes = propTypes$
|
|
4711
|
-
AudioField.defaultProps = defaultProps$
|
|
4864
|
+
AudioField.propTypes = propTypes$1j;
|
|
4865
|
+
AudioField.defaultProps = defaultProps$1j;
|
|
4712
4866
|
AudioField.withForm = true;
|
|
4713
4867
|
|
|
4714
|
-
var propTypes$
|
|
4868
|
+
var propTypes$1i = {
|
|
4715
4869
|
// eslint-disable-next-line react/forbid-prop-types
|
|
4716
4870
|
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
4717
4871
|
current: PropTypes.object
|
|
@@ -4728,7 +4882,7 @@ var propTypes$1j = {
|
|
|
4728
4882
|
onChange: PropTypes.func,
|
|
4729
4883
|
className: PropTypes.string
|
|
4730
4884
|
};
|
|
4731
|
-
var defaultProps$
|
|
4885
|
+
var defaultProps$1i = {
|
|
4732
4886
|
inputRef: null,
|
|
4733
4887
|
type: 'text',
|
|
4734
4888
|
value: null,
|
|
@@ -4781,17 +4935,17 @@ var TextField = function TextField(_ref) {
|
|
|
4781
4935
|
className: "input-group-text"
|
|
4782
4936
|
}, prefix), input) : input;
|
|
4783
4937
|
};
|
|
4784
|
-
TextField.propTypes = propTypes$
|
|
4785
|
-
TextField.defaultProps = defaultProps$
|
|
4938
|
+
TextField.propTypes = propTypes$1i;
|
|
4939
|
+
TextField.defaultProps = defaultProps$1i;
|
|
4786
4940
|
var TextField$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4787
4941
|
return /*#__PURE__*/React.createElement(TextField, Object.assign({}, props, {
|
|
4788
4942
|
inputRef: ref
|
|
4789
4943
|
}));
|
|
4790
4944
|
});
|
|
4791
4945
|
|
|
4792
|
-
var styles$
|
|
4946
|
+
var styles$x = {"container":"micromag-fields-autocomplete-container","list":"micromag-fields-autocomplete-list","item":"micromag-fields-autocomplete-item"};
|
|
4793
4947
|
|
|
4794
|
-
var propTypes$
|
|
4948
|
+
var propTypes$1h = {
|
|
4795
4949
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
4796
4950
|
label: PropTypes.string,
|
|
4797
4951
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
@@ -4813,7 +4967,7 @@ var propTypes$1i = {
|
|
|
4813
4967
|
onChange: PropTypes.func,
|
|
4814
4968
|
children: PropTypes.node
|
|
4815
4969
|
};
|
|
4816
|
-
var defaultProps$
|
|
4970
|
+
var defaultProps$1h = {
|
|
4817
4971
|
items: [],
|
|
4818
4972
|
value: null,
|
|
4819
4973
|
searchOptions: {
|
|
@@ -4873,15 +5027,15 @@ var AutocompleteField = function AutocompleteField(_ref) {
|
|
|
4873
5027
|
}
|
|
4874
5028
|
}, [onChange, showEmpty]);
|
|
4875
5029
|
var listItems = children !== null ? /*#__PURE__*/React.createElement("div", {
|
|
4876
|
-
className: styles$
|
|
5030
|
+
className: styles$x.list
|
|
4877
5031
|
}, children) : /*#__PURE__*/React.createElement("div", {
|
|
4878
|
-
className: styles$
|
|
5032
|
+
className: styles$x.list
|
|
4879
5033
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
4880
5034
|
className: "list-group bg-light"
|
|
4881
5035
|
}, maxedList.map(function (_ref2) {
|
|
4882
5036
|
var item = _ref2.item;
|
|
4883
5037
|
return /*#__PURE__*/React.createElement("li", {
|
|
4884
|
-
className: classNames(['list-group-item', styles$
|
|
5038
|
+
className: classNames(['list-group-item', styles$x.item]),
|
|
4885
5039
|
key: "auto-".concat(item.label)
|
|
4886
5040
|
}, /*#__PURE__*/React.createElement("button", {
|
|
4887
5041
|
type: "button",
|
|
@@ -4891,26 +5045,26 @@ var AutocompleteField = function AutocompleteField(_ref) {
|
|
|
4891
5045
|
}, item.label));
|
|
4892
5046
|
})));
|
|
4893
5047
|
return /*#__PURE__*/React.createElement("div", {
|
|
4894
|
-
className: classNames([styles$
|
|
5048
|
+
className: classNames([styles$x.container, _defineProperty({}, className, className !== null)])
|
|
4895
5049
|
}, /*#__PURE__*/React.createElement(TextField$1, {
|
|
4896
5050
|
value: value,
|
|
4897
|
-
buttonClassName: styles$
|
|
5051
|
+
buttonClassName: styles$x.button,
|
|
4898
5052
|
placeholder: placeholder,
|
|
4899
5053
|
onChange: onInputChange
|
|
4900
5054
|
}), open ? listItems : null);
|
|
4901
5055
|
};
|
|
4902
|
-
AutocompleteField.propTypes = propTypes$
|
|
4903
|
-
AutocompleteField.defaultProps = defaultProps$
|
|
5056
|
+
AutocompleteField.propTypes = propTypes$1h;
|
|
5057
|
+
AutocompleteField.defaultProps = defaultProps$1h;
|
|
4904
5058
|
|
|
4905
|
-
var styles$
|
|
5059
|
+
var styles$w = {"container":"micromag-fields-badge-container","field":"micromag-fields-badge-field","active":"micromag-fields-badge-active"};
|
|
4906
5060
|
|
|
4907
5061
|
var _excluded$v = ["value", "className", "onChange"];
|
|
4908
|
-
var propTypes$
|
|
5062
|
+
var propTypes$1g = {
|
|
4909
5063
|
value: PropTypes$1.badge,
|
|
4910
5064
|
className: PropTypes.string,
|
|
4911
5065
|
onChange: PropTypes.func
|
|
4912
5066
|
};
|
|
4913
|
-
var defaultProps$
|
|
5067
|
+
var defaultProps$1g = {
|
|
4914
5068
|
value: null,
|
|
4915
5069
|
className: null,
|
|
4916
5070
|
onChange: null
|
|
@@ -4952,17 +5106,17 @@ var Badge = function Badge(_ref) {
|
|
|
4952
5106
|
}
|
|
4953
5107
|
}, [onChange, value]);
|
|
4954
5108
|
return /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
4955
|
-
className: classNames([styles$
|
|
4956
|
-
fieldClassName: styles$
|
|
5109
|
+
className: classNames([styles$w.container, _defineProperty(_defineProperty({}, className, className !== null), styles$w.active, active)]),
|
|
5110
|
+
fieldClassName: styles$w.field
|
|
4957
5111
|
}, props, {
|
|
4958
5112
|
value: value,
|
|
4959
5113
|
onChange: onUpdateValue
|
|
4960
5114
|
}));
|
|
4961
5115
|
};
|
|
4962
|
-
Badge.propTypes = propTypes$
|
|
4963
|
-
Badge.defaultProps = defaultProps$
|
|
5116
|
+
Badge.propTypes = propTypes$1g;
|
|
5117
|
+
Badge.defaultProps = defaultProps$1g;
|
|
4964
5118
|
|
|
4965
|
-
var styles$
|
|
5119
|
+
var styles$v = {"container":"micromag-fields-slider-container","slider":"micromag-fields-slider-slider","input":"micromag-fields-slider-input","unit":"micromag-fields-slider-unit"};
|
|
4966
5120
|
|
|
4967
5121
|
// const roundEven = value => 2 * Math.round(value / 2);
|
|
4968
5122
|
|
|
@@ -4989,7 +5143,7 @@ var generateSteps = function generateSteps(steps, style) {
|
|
|
4989
5143
|
}));
|
|
4990
5144
|
}, {});
|
|
4991
5145
|
};
|
|
4992
|
-
var propTypes$
|
|
5146
|
+
var propTypes$1f = {
|
|
4993
5147
|
value: PropTypes.string,
|
|
4994
5148
|
min: PropTypes.number,
|
|
4995
5149
|
max: PropTypes.number,
|
|
@@ -5004,7 +5158,7 @@ var propTypes$1g = {
|
|
|
5004
5158
|
className: PropTypes.string,
|
|
5005
5159
|
onChange: PropTypes.func
|
|
5006
5160
|
};
|
|
5007
|
-
var defaultProps$
|
|
5161
|
+
var defaultProps$1f = {
|
|
5008
5162
|
value: null,
|
|
5009
5163
|
min: 0,
|
|
5010
5164
|
max: 100,
|
|
@@ -5041,7 +5195,7 @@ var SliderField = function SliderField(_ref) {
|
|
|
5041
5195
|
return (isArray(marks) ? generateSteps(marks, marksStyle) : marks) || (marksStep !== null ? generateSteps(rangeFromStep(min, max, marksStep), marksStyle) : null) || (marksCount !== null ? generateSteps(rangeFromCount(min, max, marksCount), marksStyle) : null) || undefined;
|
|
5042
5196
|
}, [min, max, marks, marksStep, marksCount, marksStyle]);
|
|
5043
5197
|
var slider = /*#__PURE__*/React.createElement("div", {
|
|
5044
|
-
className: styles$
|
|
5198
|
+
className: styles$v.slider
|
|
5045
5199
|
}, /*#__PURE__*/React.createElement(Slider, {
|
|
5046
5200
|
value: value !== null ? value : 0,
|
|
5047
5201
|
min: min,
|
|
@@ -5050,7 +5204,7 @@ var SliderField = function SliderField(_ref) {
|
|
|
5050
5204
|
onChange: customOnChange
|
|
5051
5205
|
}));
|
|
5052
5206
|
return /*#__PURE__*/React.createElement("div", {
|
|
5053
|
-
className: classNames([styles$
|
|
5207
|
+
className: classNames([styles$v.container, _defineProperty(_defineProperty({}, styles$v.withInput, withInput), className, className !== null)])
|
|
5054
5208
|
}, withInput ? /*#__PURE__*/React.createElement("div", {
|
|
5055
5209
|
className: "row align-items-center no-gutters"
|
|
5056
5210
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -5061,23 +5215,23 @@ var SliderField = function SliderField(_ref) {
|
|
|
5061
5215
|
type: "number",
|
|
5062
5216
|
value: value,
|
|
5063
5217
|
onChange: customOnChange,
|
|
5064
|
-
className: styles$
|
|
5218
|
+
className: styles$v.input
|
|
5065
5219
|
})), unit !== null ? /*#__PURE__*/React.createElement("div", {
|
|
5066
|
-
className: classNames(['col-auto', styles$
|
|
5220
|
+
className: classNames(['col-auto', styles$v.unit])
|
|
5067
5221
|
}, unit) : null) : slider);
|
|
5068
5222
|
};
|
|
5069
|
-
SliderField.propTypes = propTypes$
|
|
5070
|
-
SliderField.defaultProps = defaultProps$
|
|
5223
|
+
SliderField.propTypes = propTypes$1f;
|
|
5224
|
+
SliderField.defaultProps = defaultProps$1f;
|
|
5071
5225
|
|
|
5072
|
-
var styles$
|
|
5226
|
+
var styles$u = {"container":"micromag-fields-border-width-container"};
|
|
5073
5227
|
|
|
5074
|
-
var propTypes$
|
|
5228
|
+
var propTypes$1e = {
|
|
5075
5229
|
value: PropTypes.string,
|
|
5076
5230
|
sizes: PropTypes.arrayOf(PropTypes.number),
|
|
5077
5231
|
className: PropTypes.string,
|
|
5078
5232
|
onChange: PropTypes.func
|
|
5079
5233
|
};
|
|
5080
|
-
var defaultProps$
|
|
5234
|
+
var defaultProps$1e = {
|
|
5081
5235
|
value: null,
|
|
5082
5236
|
sizes: [0, 2, 6, 10, 20, 30],
|
|
5083
5237
|
className: null,
|
|
@@ -5094,20 +5248,20 @@ var BorderRadius = function BorderRadius(_ref) {
|
|
|
5094
5248
|
max: sizes[sizes.length - 1],
|
|
5095
5249
|
marks: sizes,
|
|
5096
5250
|
withInput: true,
|
|
5097
|
-
className: classNames([styles$
|
|
5251
|
+
className: classNames([styles$u.container, _defineProperty({}, className, className !== null)]),
|
|
5098
5252
|
onChange: onChange
|
|
5099
5253
|
});
|
|
5100
5254
|
};
|
|
5101
|
-
BorderRadius.propTypes = propTypes$
|
|
5102
|
-
BorderRadius.defaultProps = defaultProps$
|
|
5255
|
+
BorderRadius.propTypes = propTypes$1e;
|
|
5256
|
+
BorderRadius.defaultProps = defaultProps$1e;
|
|
5103
5257
|
|
|
5104
|
-
var propTypes$
|
|
5258
|
+
var propTypes$1d = {
|
|
5105
5259
|
types: PropTypes.arrayOf(PropTypes.string),
|
|
5106
5260
|
value: PropTypes.string,
|
|
5107
5261
|
className: PropTypes.string,
|
|
5108
5262
|
onChange: PropTypes.func
|
|
5109
5263
|
};
|
|
5110
|
-
var defaultProps$
|
|
5264
|
+
var defaultProps$1d = {
|
|
5111
5265
|
types: ['solid', 'dotted', 'dashed'],
|
|
5112
5266
|
value: null,
|
|
5113
5267
|
className: null,
|
|
@@ -5131,9 +5285,9 @@ var BorderStyle = function BorderStyle(_ref) {
|
|
|
5131
5285
|
return {
|
|
5132
5286
|
value: type,
|
|
5133
5287
|
label: /*#__PURE__*/React.createElement("div", {
|
|
5134
|
-
className: styles$
|
|
5288
|
+
className: styles$J.type
|
|
5135
5289
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5136
|
-
className: styles$
|
|
5290
|
+
className: styles$J.borders,
|
|
5137
5291
|
style: {
|
|
5138
5292
|
border: "2px ".concat(type, " currentColor")
|
|
5139
5293
|
}
|
|
@@ -5141,21 +5295,21 @@ var BorderStyle = function BorderStyle(_ref) {
|
|
|
5141
5295
|
};
|
|
5142
5296
|
}),
|
|
5143
5297
|
value: value || null,
|
|
5144
|
-
className: classNames([styles$
|
|
5145
|
-
buttonClassName: styles$
|
|
5298
|
+
className: classNames([styles$J.container, _defineProperty({}, className, className !== null)]),
|
|
5299
|
+
buttonClassName: styles$J.button,
|
|
5146
5300
|
onChange: onBorderStyleChange
|
|
5147
5301
|
})));
|
|
5148
5302
|
};
|
|
5149
|
-
BorderStyle.propTypes = propTypes$
|
|
5150
|
-
BorderStyle.defaultProps = defaultProps$
|
|
5303
|
+
BorderStyle.propTypes = propTypes$1d;
|
|
5304
|
+
BorderStyle.defaultProps = defaultProps$1d;
|
|
5151
5305
|
|
|
5152
|
-
var propTypes$
|
|
5306
|
+
var propTypes$1c = {
|
|
5153
5307
|
value: PropTypes.string,
|
|
5154
5308
|
sizes: PropTypes.arrayOf(PropTypes.number),
|
|
5155
5309
|
className: PropTypes.string,
|
|
5156
5310
|
onChange: PropTypes.func
|
|
5157
5311
|
};
|
|
5158
|
-
var defaultProps$
|
|
5312
|
+
var defaultProps$1c = {
|
|
5159
5313
|
value: null,
|
|
5160
5314
|
sizes: [1, 2, 4, 8, 10, 14, 20],
|
|
5161
5315
|
className: null,
|
|
@@ -5172,17 +5326,17 @@ var BorderWidth = function BorderWidth(_ref) {
|
|
|
5172
5326
|
max: sizes[sizes.length - 1],
|
|
5173
5327
|
marks: sizes,
|
|
5174
5328
|
withInput: true,
|
|
5175
|
-
className: classNames([styles$
|
|
5329
|
+
className: classNames([styles$u.container, _defineProperty({}, className, className !== null)]),
|
|
5176
5330
|
onChange: onChange
|
|
5177
5331
|
});
|
|
5178
5332
|
};
|
|
5179
|
-
BorderWidth.propTypes = propTypes$
|
|
5180
|
-
BorderWidth.defaultProps = defaultProps$
|
|
5333
|
+
BorderWidth.propTypes = propTypes$1c;
|
|
5334
|
+
BorderWidth.defaultProps = defaultProps$1c;
|
|
5181
5335
|
|
|
5182
|
-
var styles$
|
|
5336
|
+
var styles$t = {"preview":"micromag-fields-box-style-preview","box":"micromag-fields-box-style-box"};
|
|
5183
5337
|
|
|
5184
5338
|
var _excluded$u = ["value", "fields", "onChange", "closeForm", "withAlignment"];
|
|
5185
|
-
var propTypes$
|
|
5339
|
+
var propTypes$1b = {
|
|
5186
5340
|
value: PropTypes$1.boxStyle,
|
|
5187
5341
|
fields: PropTypes.arrayOf(PropTypes$1.formField),
|
|
5188
5342
|
isForm: PropTypes.bool,
|
|
@@ -5192,7 +5346,7 @@ var propTypes$1c = {
|
|
|
5192
5346
|
onChange: PropTypes.func,
|
|
5193
5347
|
closeForm: PropTypes.func
|
|
5194
5348
|
};
|
|
5195
|
-
var defaultProps$
|
|
5349
|
+
var defaultProps$1b = {
|
|
5196
5350
|
value: null,
|
|
5197
5351
|
fields: null,
|
|
5198
5352
|
isForm: false,
|
|
@@ -5210,9 +5364,9 @@ var BoxStyleForm = function BoxStyleForm(_ref) {
|
|
|
5210
5364
|
_ref.withAlignment;
|
|
5211
5365
|
var props = _objectWithoutProperties(_ref, _excluded$u);
|
|
5212
5366
|
var previewElement = value !== null ? /*#__PURE__*/React.createElement("span", {
|
|
5213
|
-
className: styles$
|
|
5367
|
+
className: styles$t.preview
|
|
5214
5368
|
}, /*#__PURE__*/React.createElement("span", {
|
|
5215
|
-
className: styles$
|
|
5369
|
+
className: styles$t.box,
|
|
5216
5370
|
style: _objectSpread(_objectSpread({}, getStyleFromBox(value)), {}, {
|
|
5217
5371
|
padding: 0
|
|
5218
5372
|
})
|
|
@@ -5232,20 +5386,20 @@ var BoxStyleForm = function BoxStyleForm(_ref) {
|
|
|
5232
5386
|
})
|
|
5233
5387
|
}, props));
|
|
5234
5388
|
};
|
|
5235
|
-
BoxStyleForm.propTypes = propTypes$
|
|
5236
|
-
BoxStyleForm.defaultProps = defaultProps$
|
|
5389
|
+
BoxStyleForm.propTypes = propTypes$1b;
|
|
5390
|
+
BoxStyleForm.defaultProps = defaultProps$1b;
|
|
5237
5391
|
BoxStyleForm.withForm = true;
|
|
5238
5392
|
|
|
5239
|
-
var styles$
|
|
5393
|
+
var styles$s = {"container":"micromag-fields-button-layout-container","button":"micromag-fields-button-layout-button","placeholderText":"micromag-fields-button-layout-placeholderText","placeholderTextOver":"micromag-fields-button-layout-placeholderTextOver","active":"micromag-fields-button-layout-active"};
|
|
5240
5394
|
|
|
5241
|
-
var propTypes$
|
|
5395
|
+
var propTypes$1a = {
|
|
5242
5396
|
types: PropTypes.arrayOf(PropTypes.string),
|
|
5243
5397
|
value: PropTypes.string,
|
|
5244
5398
|
defaultValue: PropTypes.string,
|
|
5245
5399
|
className: PropTypes.string,
|
|
5246
5400
|
onChange: PropTypes.func
|
|
5247
5401
|
};
|
|
5248
|
-
var defaultProps$
|
|
5402
|
+
var defaultProps$1a = {
|
|
5249
5403
|
types: ['label-bottom', 'label-top', 'no-label', 'label-over'],
|
|
5250
5404
|
value: null,
|
|
5251
5405
|
defaultValue: null,
|
|
@@ -5271,13 +5425,13 @@ var ButtonLayout = function ButtonLayout(_ref) {
|
|
|
5271
5425
|
width: "1.25em",
|
|
5272
5426
|
height: "1em"
|
|
5273
5427
|
}), /*#__PURE__*/React.createElement(PlaceholderText, {
|
|
5274
|
-
className: styles$
|
|
5428
|
+
className: styles$s.placeholderText,
|
|
5275
5429
|
lines: 1,
|
|
5276
5430
|
lineMargin: 1
|
|
5277
5431
|
}));
|
|
5278
5432
|
case 'label-top':
|
|
5279
5433
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(PlaceholderText, {
|
|
5280
|
-
className: styles$
|
|
5434
|
+
className: styles$s.placeholderText,
|
|
5281
5435
|
lines: 1,
|
|
5282
5436
|
lineMargin: 1
|
|
5283
5437
|
}), /*#__PURE__*/React.createElement(PlaceholderImage, {
|
|
@@ -5294,7 +5448,7 @@ var ButtonLayout = function ButtonLayout(_ref) {
|
|
|
5294
5448
|
width: "1.5em",
|
|
5295
5449
|
height: "1.5em"
|
|
5296
5450
|
}), /*#__PURE__*/React.createElement(PlaceholderText, {
|
|
5297
|
-
className: classNames([styles$
|
|
5451
|
+
className: classNames([styles$s.placeholderText, styles$s.placeholderTextOver]),
|
|
5298
5452
|
lines: 1,
|
|
5299
5453
|
withInvertedColors: false
|
|
5300
5454
|
}));
|
|
@@ -5314,25 +5468,25 @@ var ButtonLayout = function ButtonLayout(_ref) {
|
|
|
5314
5468
|
};
|
|
5315
5469
|
}),
|
|
5316
5470
|
value: finalValue || null,
|
|
5317
|
-
className: classNames([styles$
|
|
5318
|
-
buttonClassName: styles$
|
|
5319
|
-
activeClassName: styles$
|
|
5471
|
+
className: classNames([styles$s.container, _defineProperty({}, className, className !== null)]),
|
|
5472
|
+
buttonClassName: styles$s.button,
|
|
5473
|
+
activeClassName: styles$s.active,
|
|
5320
5474
|
onChange: onButtonLayoutChange,
|
|
5321
5475
|
uncheckable: true
|
|
5322
5476
|
})));
|
|
5323
5477
|
};
|
|
5324
|
-
ButtonLayout.propTypes = propTypes$
|
|
5325
|
-
ButtonLayout.defaultProps = defaultProps$
|
|
5478
|
+
ButtonLayout.propTypes = propTypes$1a;
|
|
5479
|
+
ButtonLayout.defaultProps = defaultProps$1a;
|
|
5326
5480
|
|
|
5327
|
-
var styles$
|
|
5481
|
+
var styles$r = {"container":"micromag-fields-call-to-action-container","field":"micromag-fields-call-to-action-field","active":"micromag-fields-call-to-action-active"};
|
|
5328
5482
|
|
|
5329
5483
|
var _excluded$t = ["value", "className", "onChange"];
|
|
5330
|
-
var propTypes$
|
|
5484
|
+
var propTypes$19 = {
|
|
5331
5485
|
value: PropTypes$1.callToAction,
|
|
5332
5486
|
className: PropTypes.string,
|
|
5333
5487
|
onChange: PropTypes.func
|
|
5334
5488
|
};
|
|
5335
|
-
var defaultProps$
|
|
5489
|
+
var defaultProps$19 = {
|
|
5336
5490
|
value: null,
|
|
5337
5491
|
className: null,
|
|
5338
5492
|
onChange: null
|
|
@@ -5381,24 +5535,24 @@ var CallToAction = function CallToAction(_ref) {
|
|
|
5381
5535
|
}
|
|
5382
5536
|
}, [onChange, value]);
|
|
5383
5537
|
return /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
5384
|
-
className: classNames([styles$
|
|
5385
|
-
fieldClassName: styles$
|
|
5538
|
+
className: classNames([styles$r.container, _defineProperty(_defineProperty({}, className, className !== null), styles$r.active, active)]),
|
|
5539
|
+
fieldClassName: styles$r.field
|
|
5386
5540
|
}, props, {
|
|
5387
5541
|
value: value,
|
|
5388
5542
|
onChange: onUpdateValue
|
|
5389
5543
|
}));
|
|
5390
5544
|
};
|
|
5391
|
-
CallToAction.propTypes = propTypes$
|
|
5392
|
-
CallToAction.defaultProps = defaultProps$
|
|
5545
|
+
CallToAction.propTypes = propTypes$19;
|
|
5546
|
+
CallToAction.defaultProps = defaultProps$19;
|
|
5393
5547
|
|
|
5394
5548
|
var _excluded$s = ["value", "className", "onChange"],
|
|
5395
5549
|
_excluded2$2 = ["paddingRight", "paddingBottom"];
|
|
5396
|
-
var propTypes$
|
|
5550
|
+
var propTypes$18 = {
|
|
5397
5551
|
value: PropTypes$1.activeForm,
|
|
5398
5552
|
className: PropTypes.string,
|
|
5399
5553
|
onChange: PropTypes.func
|
|
5400
5554
|
};
|
|
5401
|
-
var defaultProps$
|
|
5555
|
+
var defaultProps$18 = {
|
|
5402
5556
|
value: null,
|
|
5403
5557
|
className: null,
|
|
5404
5558
|
onChange: null
|
|
@@ -5449,9 +5603,9 @@ var CallToActionForm = function CallToActionForm(_ref) {
|
|
|
5449
5603
|
_getStyleFromBox.paddingBottom;
|
|
5450
5604
|
var stylesWithoutPadding = _objectWithoutProperties(_getStyleFromBox, _excluded2$2);
|
|
5451
5605
|
var previewElement = value !== null ? /*#__PURE__*/React.createElement("span", {
|
|
5452
|
-
className: styles$
|
|
5606
|
+
className: styles$t.preview
|
|
5453
5607
|
}, /*#__PURE__*/React.createElement("span", {
|
|
5454
|
-
className: styles$
|
|
5608
|
+
className: styles$t.box,
|
|
5455
5609
|
style: _objectSpread(_objectSpread({}, stylesWithoutPadding), {}, {
|
|
5456
5610
|
padding: 0
|
|
5457
5611
|
})
|
|
@@ -5472,20 +5626,20 @@ var CallToActionForm = function CallToActionForm(_ref) {
|
|
|
5472
5626
|
})
|
|
5473
5627
|
}, props));
|
|
5474
5628
|
};
|
|
5475
|
-
CallToActionForm.propTypes = propTypes$
|
|
5476
|
-
CallToActionForm.defaultProps = defaultProps$
|
|
5629
|
+
CallToActionForm.propTypes = propTypes$18;
|
|
5630
|
+
CallToActionForm.defaultProps = defaultProps$18;
|
|
5477
5631
|
|
|
5478
|
-
var styles$
|
|
5632
|
+
var styles$q = {"container":"micromag-fields-toggle-section-container","field":"micromag-fields-toggle-section-field","enabled":"micromag-fields-toggle-section-enabled"};
|
|
5479
5633
|
|
|
5480
5634
|
var _excluded$r = ["value", "toggleField", "className", "onChange"];
|
|
5481
|
-
var propTypes$
|
|
5635
|
+
var propTypes$17 = {
|
|
5482
5636
|
// eslint-disable-next-line react/forbid-prop-types
|
|
5483
5637
|
value: PropTypes.object,
|
|
5484
5638
|
toggleField: PropTypes.string,
|
|
5485
5639
|
className: PropTypes.string,
|
|
5486
5640
|
onChange: PropTypes.func
|
|
5487
5641
|
};
|
|
5488
|
-
var defaultProps$
|
|
5642
|
+
var defaultProps$17 = {
|
|
5489
5643
|
value: null,
|
|
5490
5644
|
toggleField: null,
|
|
5491
5645
|
className: null,
|
|
@@ -5507,19 +5661,19 @@ var ToggleSection = function ToggleSection(_ref) {
|
|
|
5507
5661
|
}
|
|
5508
5662
|
}, [onChange, value]);
|
|
5509
5663
|
return /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
5510
|
-
className: classNames([styles$
|
|
5511
|
-
fieldClassName: styles$
|
|
5664
|
+
className: classNames([styles$q.container, _defineProperty(_defineProperty({}, className, className !== null), styles$q.enabled, valueEnabled)]),
|
|
5665
|
+
fieldClassName: styles$q.field
|
|
5512
5666
|
}, props, {
|
|
5513
5667
|
value: value,
|
|
5514
5668
|
onChange: onUpdateValue
|
|
5515
5669
|
}));
|
|
5516
5670
|
};
|
|
5517
|
-
ToggleSection.propTypes = propTypes$
|
|
5518
|
-
ToggleSection.defaultProps = defaultProps$
|
|
5671
|
+
ToggleSection.propTypes = propTypes$17;
|
|
5672
|
+
ToggleSection.defaultProps = defaultProps$17;
|
|
5519
5673
|
|
|
5520
|
-
var styles$
|
|
5674
|
+
var styles$p = {"container":"micromag-fields-date-container","input":"micromag-fields-date-input"};
|
|
5521
5675
|
|
|
5522
|
-
var propTypes$
|
|
5676
|
+
var propTypes$16 = {
|
|
5523
5677
|
name: PropTypes.string,
|
|
5524
5678
|
value: PropTypes.number,
|
|
5525
5679
|
withTime: PropTypes.bool,
|
|
@@ -5527,7 +5681,7 @@ var propTypes$17 = {
|
|
|
5527
5681
|
className: PropTypes.string,
|
|
5528
5682
|
onChange: PropTypes.func
|
|
5529
5683
|
};
|
|
5530
|
-
var defaultProps$
|
|
5684
|
+
var defaultProps$16 = {
|
|
5531
5685
|
name: null,
|
|
5532
5686
|
value: null,
|
|
5533
5687
|
withTime: false,
|
|
@@ -5549,10 +5703,10 @@ var DateField = function DateField(_ref) {
|
|
|
5549
5703
|
}
|
|
5550
5704
|
}, [onChange]);
|
|
5551
5705
|
return /*#__PURE__*/React.createElement("div", {
|
|
5552
|
-
className: classNames([styles$
|
|
5706
|
+
className: classNames([styles$p.container, _defineProperty({}, className, className !== null)])
|
|
5553
5707
|
}, /*#__PURE__*/React.createElement("input", {
|
|
5554
5708
|
type: withTime ? 'datetime-local' : 'date',
|
|
5555
|
-
className: classNames([styles$
|
|
5709
|
+
className: classNames([styles$p.input, 'form-control', 'ms-auto']),
|
|
5556
5710
|
name: name,
|
|
5557
5711
|
value: value !== null ? value : '',
|
|
5558
5712
|
autoComplete: "off",
|
|
@@ -5560,17 +5714,17 @@ var DateField = function DateField(_ref) {
|
|
|
5560
5714
|
placeholder: placeholder
|
|
5561
5715
|
}));
|
|
5562
5716
|
};
|
|
5563
|
-
DateField.propTypes = propTypes$
|
|
5564
|
-
DateField.defaultProps = defaultProps$
|
|
5717
|
+
DateField.propTypes = propTypes$16;
|
|
5718
|
+
DateField.defaultProps = defaultProps$16;
|
|
5565
5719
|
|
|
5566
|
-
var propTypes$
|
|
5720
|
+
var propTypes$15 = {
|
|
5567
5721
|
name: PropTypes.string,
|
|
5568
5722
|
value: PropTypes$1.textElement,
|
|
5569
5723
|
withTime: PropTypes.bool,
|
|
5570
5724
|
placeholder: PropTypes.string,
|
|
5571
5725
|
onChange: PropTypes.func
|
|
5572
5726
|
};
|
|
5573
|
-
var defaultProps$
|
|
5727
|
+
var defaultProps$15 = {
|
|
5574
5728
|
name: null,
|
|
5575
5729
|
value: null,
|
|
5576
5730
|
withTime: false,
|
|
@@ -5595,7 +5749,7 @@ var DateElement = function DateElement(_ref) {
|
|
|
5595
5749
|
}, [value, onChange]);
|
|
5596
5750
|
return /*#__PURE__*/React.createElement("input", {
|
|
5597
5751
|
type: withTime ? 'datetime-local' : 'date',
|
|
5598
|
-
className: classNames([styles$
|
|
5752
|
+
className: classNames([styles$p.input, 'form-control', 'ms-auto']),
|
|
5599
5753
|
name: name,
|
|
5600
5754
|
value: bodyValue !== null ? bodyValue : '',
|
|
5601
5755
|
autoComplete: "off",
|
|
@@ -5603,16 +5757,16 @@ var DateElement = function DateElement(_ref) {
|
|
|
5603
5757
|
placeholder: placeholder
|
|
5604
5758
|
});
|
|
5605
5759
|
};
|
|
5606
|
-
DateElement.propTypes = propTypes$
|
|
5607
|
-
DateElement.defaultProps = defaultProps$
|
|
5760
|
+
DateElement.propTypes = propTypes$15;
|
|
5761
|
+
DateElement.defaultProps = defaultProps$15;
|
|
5608
5762
|
|
|
5609
5763
|
var _excluded$q = ["value", "className", "onChange"];
|
|
5610
|
-
var propTypes$
|
|
5764
|
+
var propTypes$14 = {
|
|
5611
5765
|
value: PropTypes$1.callToAction,
|
|
5612
5766
|
className: PropTypes.string,
|
|
5613
5767
|
onChange: PropTypes.func
|
|
5614
5768
|
};
|
|
5615
|
-
var defaultProps$
|
|
5769
|
+
var defaultProps$14 = {
|
|
5616
5770
|
value: null,
|
|
5617
5771
|
className: null,
|
|
5618
5772
|
onChange: null
|
|
@@ -5656,23 +5810,23 @@ var ShareIncentive = function ShareIncentive(_ref) {
|
|
|
5656
5810
|
}
|
|
5657
5811
|
}, [onChange, value]);
|
|
5658
5812
|
return /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
5659
|
-
className: classNames([styles$
|
|
5660
|
-
fieldClassName: styles$
|
|
5813
|
+
className: classNames([styles$r.container, _defineProperty(_defineProperty({}, className, className !== null), styles$r.active, active)]),
|
|
5814
|
+
fieldClassName: styles$r.field
|
|
5661
5815
|
}, props, {
|
|
5662
5816
|
value: value,
|
|
5663
5817
|
onChange: onUpdateValue
|
|
5664
5818
|
}));
|
|
5665
5819
|
};
|
|
5666
|
-
ShareIncentive.propTypes = propTypes$
|
|
5667
|
-
ShareIncentive.defaultProps = defaultProps$
|
|
5820
|
+
ShareIncentive.propTypes = propTypes$14;
|
|
5821
|
+
ShareIncentive.defaultProps = defaultProps$14;
|
|
5668
5822
|
|
|
5669
5823
|
var _excluded$p = ["value", "className", "onChange"];
|
|
5670
|
-
var propTypes$
|
|
5824
|
+
var propTypes$13 = {
|
|
5671
5825
|
value: PropTypes$1.activeForm,
|
|
5672
5826
|
className: PropTypes.string,
|
|
5673
5827
|
onChange: PropTypes.func
|
|
5674
5828
|
};
|
|
5675
|
-
var defaultProps$
|
|
5829
|
+
var defaultProps$13 = {
|
|
5676
5830
|
value: null,
|
|
5677
5831
|
className: null,
|
|
5678
5832
|
onChange: null
|
|
@@ -5724,18 +5878,18 @@ var ShareIncentiveForm = function ShareIncentiveForm(_ref) {
|
|
|
5724
5878
|
})
|
|
5725
5879
|
}, props));
|
|
5726
5880
|
};
|
|
5727
|
-
ShareIncentiveForm.propTypes = propTypes$
|
|
5728
|
-
ShareIncentiveForm.defaultProps = defaultProps$
|
|
5881
|
+
ShareIncentiveForm.propTypes = propTypes$13;
|
|
5882
|
+
ShareIncentiveForm.defaultProps = defaultProps$13;
|
|
5729
5883
|
|
|
5730
|
-
var styles$
|
|
5884
|
+
var styles$o = {"container":"micromag-fields-card-layout-container","button":"micromag-fields-card-layout-button","layout":"micromag-fields-card-layout-layout"};
|
|
5731
5885
|
|
|
5732
|
-
var propTypes$
|
|
5886
|
+
var propTypes$12 = {
|
|
5733
5887
|
types: PropTypes.arrayOf(PropTypes.string),
|
|
5734
5888
|
value: PropTypes.string,
|
|
5735
5889
|
className: PropTypes.string,
|
|
5736
5890
|
onChange: PropTypes.func
|
|
5737
5891
|
};
|
|
5738
|
-
var defaultProps$
|
|
5892
|
+
var defaultProps$12 = {
|
|
5739
5893
|
types: ['content-top', 'content-bottom', 'content-split'],
|
|
5740
5894
|
value: null,
|
|
5741
5895
|
className: null,
|
|
@@ -5754,7 +5908,7 @@ var CardLayout = function CardLayout(_ref) {
|
|
|
5754
5908
|
switch (type) {
|
|
5755
5909
|
case 'content-top':
|
|
5756
5910
|
return /*#__PURE__*/React.createElement("div", {
|
|
5757
|
-
className: styles$
|
|
5911
|
+
className: styles$o.layout
|
|
5758
5912
|
}, /*#__PURE__*/React.createElement(PlaceholderTitle, {
|
|
5759
5913
|
lines: 1,
|
|
5760
5914
|
lineMargin: 1
|
|
@@ -5767,7 +5921,7 @@ var CardLayout = function CardLayout(_ref) {
|
|
|
5767
5921
|
}));
|
|
5768
5922
|
case 'content-bottom':
|
|
5769
5923
|
return /*#__PURE__*/React.createElement("div", {
|
|
5770
|
-
className: styles$
|
|
5924
|
+
className: styles$o.layout
|
|
5771
5925
|
}, /*#__PURE__*/React.createElement(PlaceholderImage, {
|
|
5772
5926
|
width: "100%",
|
|
5773
5927
|
height: "1.25em"
|
|
@@ -5780,7 +5934,7 @@ var CardLayout = function CardLayout(_ref) {
|
|
|
5780
5934
|
}));
|
|
5781
5935
|
case 'content-split':
|
|
5782
5936
|
return /*#__PURE__*/React.createElement("div", {
|
|
5783
|
-
className: styles$
|
|
5937
|
+
className: styles$o.layout
|
|
5784
5938
|
}, /*#__PURE__*/React.createElement(PlaceholderTitle, {
|
|
5785
5939
|
lines: 1,
|
|
5786
5940
|
lineMargin: 1
|
|
@@ -5807,18 +5961,18 @@ var CardLayout = function CardLayout(_ref) {
|
|
|
5807
5961
|
};
|
|
5808
5962
|
}),
|
|
5809
5963
|
value: value || null,
|
|
5810
|
-
className: classNames([styles$
|
|
5811
|
-
buttonClassName: styles$
|
|
5964
|
+
className: classNames([styles$o.container, _defineProperty({}, className, className !== null)]),
|
|
5965
|
+
buttonClassName: styles$o.button,
|
|
5812
5966
|
onChange: onButtonLayoutChange,
|
|
5813
5967
|
uncheckable: true
|
|
5814
5968
|
})));
|
|
5815
5969
|
};
|
|
5816
|
-
CardLayout.propTypes = propTypes$
|
|
5817
|
-
CardLayout.defaultProps = defaultProps$
|
|
5970
|
+
CardLayout.propTypes = propTypes$12;
|
|
5971
|
+
CardLayout.defaultProps = defaultProps$12;
|
|
5818
5972
|
|
|
5819
|
-
var styles$
|
|
5973
|
+
var styles$n = {"item":"micromag-fields-checkboxes-item"};
|
|
5820
5974
|
|
|
5821
|
-
var propTypes$
|
|
5975
|
+
var propTypes$11 = {
|
|
5822
5976
|
name: PropTypes.string,
|
|
5823
5977
|
value: PropTypes.arrayOf(PropTypes.string),
|
|
5824
5978
|
singleChoice: PropTypes.bool,
|
|
@@ -5827,7 +5981,7 @@ var propTypes$12 = {
|
|
|
5827
5981
|
buttonClassName: PropTypes.string,
|
|
5828
5982
|
onChange: PropTypes.func
|
|
5829
5983
|
};
|
|
5830
|
-
var defaultProps$
|
|
5984
|
+
var defaultProps$11 = {
|
|
5831
5985
|
name: null,
|
|
5832
5986
|
value: null,
|
|
5833
5987
|
singleChoice: false,
|
|
@@ -5848,7 +6002,7 @@ var Checkboxes = function Checkboxes(_ref) {
|
|
|
5848
6002
|
return getSelectOptions(options);
|
|
5849
6003
|
}, [options]);
|
|
5850
6004
|
return /*#__PURE__*/React.createElement("div", {
|
|
5851
|
-
className: classNames(['btn-group', 'btn-group-toggle', styles$
|
|
6005
|
+
className: classNames(['btn-group', 'btn-group-toggle', styles$n.container, _defineProperty({}, className, className !== null)]),
|
|
5852
6006
|
"data-toggle": "buttons"
|
|
5853
6007
|
}, finalOptions.map(function (_ref3) {
|
|
5854
6008
|
var optionValue = _ref3.value,
|
|
@@ -5856,7 +6010,7 @@ var Checkboxes = function Checkboxes(_ref) {
|
|
|
5856
6010
|
var active = value !== null && isArray(value) && value.indexOf(optionValue) !== -1 || !isArray(value) && value === optionValue;
|
|
5857
6011
|
return /*#__PURE__*/React.createElement("label", {
|
|
5858
6012
|
key: "radio-".concat(optionValue),
|
|
5859
|
-
className: classNames(['btn', 'btn-outline-secondary', styles$
|
|
6013
|
+
className: classNames(['btn', 'btn-outline-secondary', styles$n.item, _defineProperty(_defineProperty({}, buttonClassName, buttonClassName !== null), "active", active)])
|
|
5860
6014
|
}, /*#__PURE__*/React.createElement("input", {
|
|
5861
6015
|
type: "checkbox",
|
|
5862
6016
|
name: "".concat(name, "[]"),
|
|
@@ -5890,14 +6044,14 @@ var Checkboxes = function Checkboxes(_ref) {
|
|
|
5890
6044
|
}), ' ', label);
|
|
5891
6045
|
}));
|
|
5892
6046
|
};
|
|
5893
|
-
Checkboxes.propTypes = propTypes$
|
|
5894
|
-
Checkboxes.defaultProps = defaultProps$
|
|
6047
|
+
Checkboxes.propTypes = propTypes$11;
|
|
6048
|
+
Checkboxes.defaultProps = defaultProps$11;
|
|
5895
6049
|
|
|
5896
6050
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
5897
|
-
var propTypes$
|
|
6051
|
+
var propTypes$10 = {
|
|
5898
6052
|
value: PropTypes$1.closedCaptionsMedia
|
|
5899
6053
|
};
|
|
5900
|
-
var defaultProps$
|
|
6054
|
+
var defaultProps$10 = {
|
|
5901
6055
|
value: null
|
|
5902
6056
|
};
|
|
5903
6057
|
var ClosedCaptionField = function ClosedCaptionField(props) {
|
|
@@ -5913,11 +6067,11 @@ var ClosedCaptionField = function ClosedCaptionField(props) {
|
|
|
5913
6067
|
type: "subtitle"
|
|
5914
6068
|
}));
|
|
5915
6069
|
};
|
|
5916
|
-
ClosedCaptionField.propTypes = propTypes$
|
|
5917
|
-
ClosedCaptionField.defaultProps = defaultProps$
|
|
6070
|
+
ClosedCaptionField.propTypes = propTypes$10;
|
|
6071
|
+
ClosedCaptionField.defaultProps = defaultProps$10;
|
|
5918
6072
|
ClosedCaptionField.withForm = true;
|
|
5919
6073
|
|
|
5920
|
-
var propTypes
|
|
6074
|
+
var propTypes$$ = {
|
|
5921
6075
|
value: PropTypes.shape({
|
|
5922
6076
|
color: PropTypes.string,
|
|
5923
6077
|
alpha: PropTypes.number
|
|
@@ -5926,7 +6080,7 @@ var propTypes$10 = {
|
|
|
5926
6080
|
className: PropTypes.string,
|
|
5927
6081
|
onChange: PropTypes.func
|
|
5928
6082
|
};
|
|
5929
|
-
var defaultProps
|
|
6083
|
+
var defaultProps$$ = {
|
|
5930
6084
|
value: null,
|
|
5931
6085
|
disableAlpha: false,
|
|
5932
6086
|
className: null,
|
|
@@ -5990,13 +6144,13 @@ var ColorPickerField = function ColorPickerField(_ref) {
|
|
|
5990
6144
|
disableAlpha: disableAlpha
|
|
5991
6145
|
}));
|
|
5992
6146
|
};
|
|
5993
|
-
ColorPickerField.propTypes = propTypes
|
|
5994
|
-
ColorPickerField.defaultProps = defaultProps
|
|
6147
|
+
ColorPickerField.propTypes = propTypes$$;
|
|
6148
|
+
ColorPickerField.defaultProps = defaultProps$$;
|
|
5995
6149
|
|
|
5996
|
-
var styles$
|
|
6150
|
+
var styles$m = {"preview":"micromag-fields-color-preview","color":"micromag-fields-color-color","picker":"micromag-fields-color-picker"};
|
|
5997
6151
|
|
|
5998
6152
|
var _excluded$o = ["value", "onChange", "closeForm", "disableAlpha", "canClear"];
|
|
5999
|
-
var propTypes
|
|
6153
|
+
var propTypes$_ = {
|
|
6000
6154
|
value: PropTypes.shape({
|
|
6001
6155
|
color: PropTypes.string,
|
|
6002
6156
|
alpha: PropTypes.number
|
|
@@ -6009,7 +6163,7 @@ var propTypes$$ = {
|
|
|
6009
6163
|
onChange: PropTypes.func,
|
|
6010
6164
|
closeForm: PropTypes.func
|
|
6011
6165
|
};
|
|
6012
|
-
var defaultProps
|
|
6166
|
+
var defaultProps$_ = {
|
|
6013
6167
|
value: null,
|
|
6014
6168
|
isForm: false,
|
|
6015
6169
|
isHorizontal: false,
|
|
@@ -6033,9 +6187,9 @@ var ColorField = function ColorField(_ref) {
|
|
|
6033
6187
|
return color !== null ? tinycolor(color).toHexString() : null;
|
|
6034
6188
|
}, [color]);
|
|
6035
6189
|
var previewElement = value !== null && color !== null ? /*#__PURE__*/React.createElement("span", {
|
|
6036
|
-
className: styles$
|
|
6190
|
+
className: styles$m.preview
|
|
6037
6191
|
}, /*#__PURE__*/React.createElement("span", {
|
|
6038
|
-
className: styles$
|
|
6192
|
+
className: styles$m.color,
|
|
6039
6193
|
style: _objectSpread({}, getStyleFromColor(value))
|
|
6040
6194
|
})) : null;
|
|
6041
6195
|
var onClickReset = useCallback(function () {
|
|
@@ -6062,7 +6216,7 @@ var ColorField = function ColorField(_ref) {
|
|
|
6062
6216
|
}, props), /*#__PURE__*/React.createElement("div", {
|
|
6063
6217
|
className: "p-2"
|
|
6064
6218
|
}, /*#__PURE__*/React.createElement(ColorPickerField, {
|
|
6065
|
-
className: styles$
|
|
6219
|
+
className: styles$m.picker,
|
|
6066
6220
|
value: value,
|
|
6067
6221
|
onChange: onChange,
|
|
6068
6222
|
disableAlpha: disableAlpha
|
|
@@ -6092,32 +6246,32 @@ var ColorField = function ColorField(_ref) {
|
|
|
6092
6246
|
}]
|
|
6093
6247
|
})) : null)));
|
|
6094
6248
|
};
|
|
6095
|
-
ColorField.propTypes = propTypes
|
|
6096
|
-
ColorField.defaultProps = defaultProps
|
|
6249
|
+
ColorField.propTypes = propTypes$_;
|
|
6250
|
+
ColorField.defaultProps = defaultProps$_;
|
|
6097
6251
|
ColorField.withForm = true;
|
|
6098
6252
|
|
|
6099
6253
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
6100
|
-
var propTypes$
|
|
6101
|
-
var defaultProps$
|
|
6254
|
+
var propTypes$Z = {};
|
|
6255
|
+
var defaultProps$Z = {};
|
|
6102
6256
|
var ContainerStyleField = function ContainerStyleField(props) {
|
|
6103
6257
|
return /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
6104
6258
|
isList: true
|
|
6105
6259
|
}, props));
|
|
6106
6260
|
};
|
|
6107
|
-
ContainerStyleField.propTypes = propTypes$
|
|
6108
|
-
ContainerStyleField.defaultProps = defaultProps$
|
|
6261
|
+
ContainerStyleField.propTypes = propTypes$Z;
|
|
6262
|
+
ContainerStyleField.defaultProps = defaultProps$Z;
|
|
6109
6263
|
|
|
6110
|
-
var styles$
|
|
6264
|
+
var styles$l = {};
|
|
6111
6265
|
|
|
6112
6266
|
var _excluded$n = ["value", "fields", "name", "className", "onChange"];
|
|
6113
|
-
var propTypes$
|
|
6267
|
+
var propTypes$Y = {
|
|
6114
6268
|
value: PropTypes$1.conversation,
|
|
6115
6269
|
fields: PropTypes$1.formFields,
|
|
6116
6270
|
name: PropTypes.string.isRequired,
|
|
6117
6271
|
className: PropTypes.string,
|
|
6118
6272
|
onChange: PropTypes.func
|
|
6119
6273
|
};
|
|
6120
|
-
var defaultProps$
|
|
6274
|
+
var defaultProps$Y = {
|
|
6121
6275
|
value: null,
|
|
6122
6276
|
fields: null,
|
|
6123
6277
|
className: null,
|
|
@@ -6143,7 +6297,7 @@ var Conversation = function Conversation(_ref) {
|
|
|
6143
6297
|
};
|
|
6144
6298
|
});
|
|
6145
6299
|
return /*#__PURE__*/React.createElement("div", {
|
|
6146
|
-
className: classNames([styles$
|
|
6300
|
+
className: classNames([styles$l.container, _defineProperty({}, className, className !== null)])
|
|
6147
6301
|
}, /*#__PURE__*/React.createElement(FieldContextProvider, {
|
|
6148
6302
|
context: {
|
|
6149
6303
|
options: speakerOptions
|
|
@@ -6155,18 +6309,18 @@ var Conversation = function Conversation(_ref) {
|
|
|
6155
6309
|
onChange: onChange
|
|
6156
6310
|
}, props))));
|
|
6157
6311
|
};
|
|
6158
|
-
Conversation.propTypes = propTypes$
|
|
6159
|
-
Conversation.defaultProps = defaultProps$
|
|
6312
|
+
Conversation.propTypes = propTypes$Y;
|
|
6313
|
+
Conversation.defaultProps = defaultProps$Y;
|
|
6160
6314
|
|
|
6161
|
-
var styles$
|
|
6315
|
+
var styles$k = {"container":"micromag-fields-custom-answer-container","field":"micromag-fields-custom-answer-field","active":"micromag-fields-custom-answer-active"};
|
|
6162
6316
|
|
|
6163
6317
|
var _excluded$m = ["value", "className", "onChange"];
|
|
6164
|
-
var propTypes$
|
|
6318
|
+
var propTypes$X = {
|
|
6165
6319
|
value: PropTypes$1.customAnswer,
|
|
6166
6320
|
className: PropTypes.string,
|
|
6167
6321
|
onChange: PropTypes.func
|
|
6168
6322
|
};
|
|
6169
|
-
var defaultProps$
|
|
6323
|
+
var defaultProps$X = {
|
|
6170
6324
|
value: null,
|
|
6171
6325
|
className: null,
|
|
6172
6326
|
onChange: null
|
|
@@ -6208,17 +6362,17 @@ var CustomAnswer = function CustomAnswer(_ref) {
|
|
|
6208
6362
|
}
|
|
6209
6363
|
}, [onChange, value]);
|
|
6210
6364
|
return /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
6211
|
-
className: classNames([styles$
|
|
6212
|
-
fieldClassName: styles$
|
|
6365
|
+
className: classNames([styles$k.container, _defineProperty(_defineProperty({}, className, className !== null), styles$k.active, active)]),
|
|
6366
|
+
fieldClassName: styles$k.field
|
|
6213
6367
|
}, props, {
|
|
6214
6368
|
value: value,
|
|
6215
6369
|
onChange: onUpdateValue
|
|
6216
6370
|
}));
|
|
6217
6371
|
};
|
|
6218
|
-
CustomAnswer.propTypes = propTypes$
|
|
6219
|
-
CustomAnswer.defaultProps = defaultProps$
|
|
6372
|
+
CustomAnswer.propTypes = propTypes$X;
|
|
6373
|
+
CustomAnswer.defaultProps = defaultProps$X;
|
|
6220
6374
|
|
|
6221
|
-
var propTypes$
|
|
6375
|
+
var propTypes$W = {
|
|
6222
6376
|
name: PropTypes.string,
|
|
6223
6377
|
fields: PropTypes$1.formFields,
|
|
6224
6378
|
value: PropTypes.object,
|
|
@@ -6228,7 +6382,7 @@ var propTypes$X = {
|
|
|
6228
6382
|
closeFieldForm: PropTypes.func,
|
|
6229
6383
|
onChange: PropTypes.func
|
|
6230
6384
|
};
|
|
6231
|
-
var defaultProps$
|
|
6385
|
+
var defaultProps$W = {
|
|
6232
6386
|
name: null,
|
|
6233
6387
|
fields: [],
|
|
6234
6388
|
value: null,
|
|
@@ -6286,29 +6440,29 @@ var ElementField = function ElementField(_ref) {
|
|
|
6286
6440
|
isList: isList
|
|
6287
6441
|
});
|
|
6288
6442
|
};
|
|
6289
|
-
ElementField.propTypes = propTypes$
|
|
6290
|
-
ElementField.defaultProps = defaultProps$
|
|
6443
|
+
ElementField.propTypes = propTypes$W;
|
|
6444
|
+
ElementField.defaultProps = defaultProps$W;
|
|
6291
6445
|
|
|
6292
6446
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
6293
|
-
var propTypes$
|
|
6294
|
-
var defaultProps$
|
|
6447
|
+
var propTypes$V = {};
|
|
6448
|
+
var defaultProps$V = {};
|
|
6295
6449
|
var ElementList = function ElementList(props) {
|
|
6296
6450
|
return /*#__PURE__*/React.createElement(ElementField, Object.assign({
|
|
6297
6451
|
isList: true
|
|
6298
6452
|
}, props));
|
|
6299
6453
|
};
|
|
6300
|
-
ElementList.propTypes = propTypes$
|
|
6301
|
-
ElementList.defaultProps = defaultProps$
|
|
6454
|
+
ElementList.propTypes = propTypes$V;
|
|
6455
|
+
ElementList.defaultProps = defaultProps$V;
|
|
6302
6456
|
|
|
6303
|
-
var styles$
|
|
6457
|
+
var styles$j = {"container":"micromag-fields-fit-container","frame":"micromag-fields-fit-frame","inner":"micromag-fields-fit-inner","button":"micromag-fields-fit-button","shape":"micromag-fields-fit-shape","media":"micromag-fields-fit-media","cover":"micromag-fields-fit-cover","contain":"micromag-fields-fit-contain","fill":"micromag-fields-fit-fill","none":"micromag-fields-fit-none"};
|
|
6304
6458
|
|
|
6305
|
-
var propTypes$
|
|
6459
|
+
var propTypes$U = {
|
|
6306
6460
|
values: PropTypes.arrayOf(PropTypes$1.objectFitSize),
|
|
6307
6461
|
value: PropTypes$1.objectFitSize,
|
|
6308
6462
|
className: PropTypes.string,
|
|
6309
6463
|
onChange: PropTypes.func
|
|
6310
6464
|
};
|
|
6311
|
-
var defaultProps$
|
|
6465
|
+
var defaultProps$U = {
|
|
6312
6466
|
values: ['cover', 'contain', null],
|
|
6313
6467
|
// TODO, maybe add 'fill', 'scale-down', ?
|
|
6314
6468
|
value: null,
|
|
@@ -6325,30 +6479,30 @@ var ObjectFitSize = function ObjectFitSize(_ref) {
|
|
|
6325
6479
|
return {
|
|
6326
6480
|
value: val,
|
|
6327
6481
|
label: /*#__PURE__*/React.createElement("div", {
|
|
6328
|
-
className: classNames([styles$
|
|
6482
|
+
className: classNames([styles$j.frame, styles$j[val || 'none']])
|
|
6329
6483
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6330
|
-
className: styles$
|
|
6484
|
+
className: styles$j.shape
|
|
6331
6485
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6332
|
-
className: styles$
|
|
6486
|
+
className: styles$j.inner
|
|
6333
6487
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6334
|
-
className: styles$
|
|
6488
|
+
className: styles$j.media
|
|
6335
6489
|
}))))
|
|
6336
6490
|
};
|
|
6337
6491
|
}),
|
|
6338
6492
|
value: value,
|
|
6339
|
-
className: classNames([styles$
|
|
6340
|
-
buttonClassName: styles$
|
|
6493
|
+
className: classNames([styles$j.container, _defineProperty({}, className, className !== null)]),
|
|
6494
|
+
buttonClassName: styles$j.button,
|
|
6341
6495
|
onChange: onChange
|
|
6342
6496
|
});
|
|
6343
6497
|
};
|
|
6344
|
-
ObjectFitSize.propTypes = propTypes$
|
|
6345
|
-
ObjectFitSize.defaultProps = defaultProps$
|
|
6498
|
+
ObjectFitSize.propTypes = propTypes$U;
|
|
6499
|
+
ObjectFitSize.defaultProps = defaultProps$U;
|
|
6346
6500
|
|
|
6347
6501
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
6348
|
-
var propTypes$
|
|
6502
|
+
var propTypes$T = {
|
|
6349
6503
|
value: PropTypes$1.fontMedia
|
|
6350
6504
|
};
|
|
6351
|
-
var defaultProps$
|
|
6505
|
+
var defaultProps$T = {
|
|
6352
6506
|
value: null
|
|
6353
6507
|
};
|
|
6354
6508
|
var FontField = function FontField(props) {
|
|
@@ -6364,8 +6518,8 @@ var FontField = function FontField(props) {
|
|
|
6364
6518
|
type: "font"
|
|
6365
6519
|
}));
|
|
6366
6520
|
};
|
|
6367
|
-
FontField.propTypes = propTypes$
|
|
6368
|
-
FontField.defaultProps = defaultProps$
|
|
6521
|
+
FontField.propTypes = propTypes$T;
|
|
6522
|
+
FontField.defaultProps = defaultProps$T;
|
|
6369
6523
|
FontField.withForm = true;
|
|
6370
6524
|
|
|
6371
6525
|
var _excluded$l = ["value", "onChange", "closeForm", "maxFontsVisible", "isForm", "canClear"],
|
|
@@ -6376,7 +6530,7 @@ var normalize = function normalize(str) {
|
|
|
6376
6530
|
var fontEquals = function fontEquals(fontA, fontB) {
|
|
6377
6531
|
return fontA === fontB || isObject(fontA) && isObject(fontB) && fontA.type === fontB.type && fontA.name === fontB.name;
|
|
6378
6532
|
};
|
|
6379
|
-
var propTypes$
|
|
6533
|
+
var propTypes$S = {
|
|
6380
6534
|
value: PropTypes$1.font,
|
|
6381
6535
|
isForm: PropTypes.bool,
|
|
6382
6536
|
isHorizontal: PropTypes.bool,
|
|
@@ -6386,7 +6540,7 @@ var propTypes$T = {
|
|
|
6386
6540
|
onChange: PropTypes.func,
|
|
6387
6541
|
closeForm: PropTypes.func
|
|
6388
6542
|
};
|
|
6389
|
-
var defaultProps$
|
|
6543
|
+
var defaultProps$S = {
|
|
6390
6544
|
value: null,
|
|
6391
6545
|
isForm: false,
|
|
6392
6546
|
isHorizontal: false,
|
|
@@ -6574,15 +6728,15 @@ var FontFamily = function FontFamily(_ref) {
|
|
|
6574
6728
|
}]
|
|
6575
6729
|
}))) : null);
|
|
6576
6730
|
};
|
|
6577
|
-
FontFamily.propTypes = propTypes$
|
|
6578
|
-
FontFamily.defaultProps = defaultProps$
|
|
6731
|
+
FontFamily.propTypes = propTypes$S;
|
|
6732
|
+
FontFamily.defaultProps = defaultProps$S;
|
|
6579
6733
|
FontFamily.withForm = true;
|
|
6580
6734
|
|
|
6581
6735
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
6582
|
-
var propTypes$
|
|
6736
|
+
var propTypes$R = {
|
|
6583
6737
|
value: PropTypes$1.imageMedias
|
|
6584
6738
|
};
|
|
6585
|
-
var defaultProps$
|
|
6739
|
+
var defaultProps$R = {
|
|
6586
6740
|
value: null
|
|
6587
6741
|
};
|
|
6588
6742
|
var FontsField = function FontsField(props) {
|
|
@@ -6604,12 +6758,12 @@ var FontsField = function FontsField(props) {
|
|
|
6604
6758
|
itemComponent: FontField
|
|
6605
6759
|
}, props));
|
|
6606
6760
|
};
|
|
6607
|
-
FontsField.propTypes = propTypes$
|
|
6608
|
-
FontsField.defaultProps = defaultProps$
|
|
6761
|
+
FontsField.propTypes = propTypes$R;
|
|
6762
|
+
FontsField.defaultProps = defaultProps$R;
|
|
6609
6763
|
|
|
6610
|
-
var styles$
|
|
6764
|
+
var styles$i = {"container":"micromag-fields-number-container","clearButton":"micromag-fields-number-clearButton","input":"micromag-fields-number-input","arrow":"micromag-fields-number-arrow","arrowIcon":"micromag-fields-number-arrowIcon","dataListItems":"micromag-fields-number-dataListItems","dataListItem":"micromag-fields-number-dataListItem","dataListItemButton":"micromag-fields-number-dataListItemButton","fullWidth":"micromag-fields-number-fullWidth"};
|
|
6611
6765
|
|
|
6612
|
-
var propTypes$
|
|
6766
|
+
var propTypes$Q = {
|
|
6613
6767
|
name: PropTypes.string,
|
|
6614
6768
|
value: PropTypes.number,
|
|
6615
6769
|
min: PropTypes.number,
|
|
@@ -6624,7 +6778,7 @@ var propTypes$R = {
|
|
|
6624
6778
|
className: PropTypes.string,
|
|
6625
6779
|
onChange: PropTypes.func
|
|
6626
6780
|
};
|
|
6627
|
-
var defaultProps$
|
|
6781
|
+
var defaultProps$Q = {
|
|
6628
6782
|
name: null,
|
|
6629
6783
|
value: null,
|
|
6630
6784
|
min: null,
|
|
@@ -6689,10 +6843,10 @@ var NumberField = function NumberField(_ref) {
|
|
|
6689
6843
|
}
|
|
6690
6844
|
}, [onChange]);
|
|
6691
6845
|
return /*#__PURE__*/React.createElement("div", {
|
|
6692
|
-
className: classNames([styles$
|
|
6846
|
+
className: classNames([styles$i.container, _defineProperty({}, className, className !== null), _defineProperty({}, styles$i.fullWidth, fullWidth)])
|
|
6693
6847
|
}, /*#__PURE__*/React.createElement("input", {
|
|
6694
6848
|
type: "number",
|
|
6695
|
-
className: classNames([styles$
|
|
6849
|
+
className: classNames([styles$i.input, 'form-control', 'ms-auto']),
|
|
6696
6850
|
name: name,
|
|
6697
6851
|
value: value !== null ? value : '',
|
|
6698
6852
|
min: min,
|
|
@@ -6704,21 +6858,21 @@ var NumberField = function NumberField(_ref) {
|
|
|
6704
6858
|
onBlur: onInputBlur,
|
|
6705
6859
|
placeholder: placeholder
|
|
6706
6860
|
}), value === null && hasDataList ? /*#__PURE__*/React.createElement("div", {
|
|
6707
|
-
className: styles$
|
|
6861
|
+
className: styles$i.arrow
|
|
6708
6862
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
6709
|
-
className: styles$
|
|
6863
|
+
className: styles$i.arrowIcon,
|
|
6710
6864
|
icon: faChevronDown
|
|
6711
6865
|
})) : null, value !== null ? /*#__PURE__*/React.createElement(ClearButton, {
|
|
6712
|
-
className: styles$
|
|
6866
|
+
className: styles$i.clearButton,
|
|
6713
6867
|
onClick: onClear
|
|
6714
6868
|
}) : null, hasDataList && dataListActive ? /*#__PURE__*/React.createElement("ul", {
|
|
6715
|
-
className: styles$
|
|
6869
|
+
className: styles$i.dataListItems
|
|
6716
6870
|
}, dataList.map(function (dataListValue) {
|
|
6717
6871
|
return /*#__PURE__*/React.createElement("li", {
|
|
6718
6872
|
key: "data-list-".concat(dataListValue),
|
|
6719
|
-
className: styles$
|
|
6873
|
+
className: styles$i.dataListItem
|
|
6720
6874
|
}, /*#__PURE__*/React.createElement("button", {
|
|
6721
|
-
className: styles$
|
|
6875
|
+
className: styles$i.dataListItemButton,
|
|
6722
6876
|
type: "button",
|
|
6723
6877
|
onTouchStart: function onTouchStart() {
|
|
6724
6878
|
onDataListClick(dataListValue);
|
|
@@ -6729,14 +6883,14 @@ var NumberField = function NumberField(_ref) {
|
|
|
6729
6883
|
}, dataListValue));
|
|
6730
6884
|
})) : null);
|
|
6731
6885
|
};
|
|
6732
|
-
NumberField.propTypes = propTypes$
|
|
6733
|
-
NumberField.defaultProps = defaultProps$
|
|
6886
|
+
NumberField.propTypes = propTypes$Q;
|
|
6887
|
+
NumberField.defaultProps = defaultProps$Q;
|
|
6734
6888
|
|
|
6735
6889
|
var _excluded$k = ["sizes"];
|
|
6736
|
-
var propTypes$
|
|
6890
|
+
var propTypes$P = {
|
|
6737
6891
|
sizes: PropTypes.arrayOf(PropTypes.number)
|
|
6738
6892
|
};
|
|
6739
|
-
var defaultProps$
|
|
6893
|
+
var defaultProps$P = {
|
|
6740
6894
|
sizes: [12, 14, 16, 18, 20, 24, 28, 32, 48]
|
|
6741
6895
|
};
|
|
6742
6896
|
var FontSize = function FontSize(_ref) {
|
|
@@ -6746,12 +6900,12 @@ var FontSize = function FontSize(_ref) {
|
|
|
6746
6900
|
dataList: sizes
|
|
6747
6901
|
}));
|
|
6748
6902
|
};
|
|
6749
|
-
FontSize.propTypes = propTypes$
|
|
6750
|
-
FontSize.defaultProps = defaultProps$
|
|
6903
|
+
FontSize.propTypes = propTypes$P;
|
|
6904
|
+
FontSize.defaultProps = defaultProps$P;
|
|
6751
6905
|
FontSize.isHorizontal = true;
|
|
6752
6906
|
|
|
6753
6907
|
var _excluded$j = ["value", "options", "onChange"];
|
|
6754
|
-
var propTypes$
|
|
6908
|
+
var propTypes$O = {
|
|
6755
6909
|
value: PropTypes.shape({}),
|
|
6756
6910
|
options: PropTypes.arrayOf(PropTypes.shape({
|
|
6757
6911
|
value: PropTypes.string,
|
|
@@ -6759,7 +6913,7 @@ var propTypes$P = {
|
|
|
6759
6913
|
})),
|
|
6760
6914
|
onChange: PropTypes.func
|
|
6761
6915
|
};
|
|
6762
|
-
var defaultProps$
|
|
6916
|
+
var defaultProps$O = {
|
|
6763
6917
|
options: [{
|
|
6764
6918
|
value: 'bold',
|
|
6765
6919
|
label: /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
@@ -6805,16 +6959,16 @@ var FontStyles$1 = function FontStyles(_ref) {
|
|
|
6805
6959
|
onChange: onInputChange
|
|
6806
6960
|
}, props));
|
|
6807
6961
|
};
|
|
6808
|
-
FontStyles$1.propTypes = propTypes$
|
|
6809
|
-
FontStyles$1.defaultProps = defaultProps$
|
|
6962
|
+
FontStyles$1.propTypes = propTypes$O;
|
|
6963
|
+
FontStyles$1.defaultProps = defaultProps$O;
|
|
6810
6964
|
|
|
6811
6965
|
var _excluded$i = ["value", "options", "onChange"];
|
|
6812
|
-
var propTypes$
|
|
6966
|
+
var propTypes$N = {
|
|
6813
6967
|
value: PropTypes.shape({}),
|
|
6814
6968
|
options: PropTypes.arrayOf(PropTypes.object),
|
|
6815
6969
|
onChange: PropTypes.func
|
|
6816
6970
|
};
|
|
6817
|
-
var defaultProps$
|
|
6971
|
+
var defaultProps$N = {
|
|
6818
6972
|
options: [{
|
|
6819
6973
|
value: 'capitalize',
|
|
6820
6974
|
label: /*#__PURE__*/React.createElement("strong", null, "Aa")
|
|
@@ -6840,17 +6994,17 @@ var TextTransform = function TextTransform(_ref) {
|
|
|
6840
6994
|
uncheckable: true
|
|
6841
6995
|
}, props));
|
|
6842
6996
|
};
|
|
6843
|
-
TextTransform.propTypes = propTypes$
|
|
6844
|
-
TextTransform.defaultProps = defaultProps$
|
|
6997
|
+
TextTransform.propTypes = propTypes$N;
|
|
6998
|
+
TextTransform.defaultProps = defaultProps$N;
|
|
6845
6999
|
TextTransform.isHorizontal = true;
|
|
6846
7000
|
|
|
6847
7001
|
var _excluded$h = ["value", "transformName", "onChange"];
|
|
6848
|
-
var propTypes$
|
|
7002
|
+
var propTypes$M = {
|
|
6849
7003
|
value: PropTypes.shape({}),
|
|
6850
7004
|
transformName: PropTypes.string,
|
|
6851
7005
|
onChange: PropTypes.func
|
|
6852
7006
|
};
|
|
6853
|
-
var defaultProps$
|
|
7007
|
+
var defaultProps$M = {
|
|
6854
7008
|
transformName: 'transform',
|
|
6855
7009
|
value: null,
|
|
6856
7010
|
onChange: null
|
|
@@ -6872,17 +7026,17 @@ var FontStyleTransform = function FontStyleTransform(_ref) {
|
|
|
6872
7026
|
onChange: onTransformChange
|
|
6873
7027
|
}, props));
|
|
6874
7028
|
};
|
|
6875
|
-
FontStyleTransform.propTypes = propTypes$
|
|
6876
|
-
FontStyleTransform.defaultProps = defaultProps$
|
|
7029
|
+
FontStyleTransform.propTypes = propTypes$M;
|
|
7030
|
+
FontStyleTransform.defaultProps = defaultProps$M;
|
|
6877
7031
|
FontStyleTransform.isHorizontal = true;
|
|
6878
7032
|
|
|
6879
7033
|
var _excluded$g = ["value", "options", "onChange"];
|
|
6880
|
-
var propTypes$
|
|
7034
|
+
var propTypes$L = {
|
|
6881
7035
|
value: PropTypes.string,
|
|
6882
7036
|
options: PropTypes.arrayOf(PropTypes.object),
|
|
6883
7037
|
onChange: PropTypes.func
|
|
6884
7038
|
};
|
|
6885
|
-
var defaultProps$
|
|
7039
|
+
var defaultProps$L = {
|
|
6886
7040
|
options: [{
|
|
6887
7041
|
value: 'left',
|
|
6888
7042
|
label: /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
@@ -6914,19 +7068,19 @@ var TextAlign = function TextAlign(_ref) {
|
|
|
6914
7068
|
uncheckable: true
|
|
6915
7069
|
}, props));
|
|
6916
7070
|
};
|
|
6917
|
-
TextAlign.propTypes = propTypes$
|
|
6918
|
-
TextAlign.defaultProps = defaultProps$
|
|
7071
|
+
TextAlign.propTypes = propTypes$L;
|
|
7072
|
+
TextAlign.defaultProps = defaultProps$L;
|
|
6919
7073
|
|
|
6920
|
-
var styles$
|
|
7074
|
+
var styles$h = {"item":"micromag-fields-font-style-with-align-item","button":"micromag-fields-font-style-with-align-button"};
|
|
6921
7075
|
|
|
6922
|
-
var propTypes$
|
|
7076
|
+
var propTypes$K = {
|
|
6923
7077
|
value: PropTypes.shape({}),
|
|
6924
7078
|
fontStyleName: PropTypes.string,
|
|
6925
7079
|
alignName: PropTypes.string,
|
|
6926
7080
|
className: PropTypes.string,
|
|
6927
7081
|
onChange: PropTypes.func
|
|
6928
7082
|
};
|
|
6929
|
-
var defaultProps$
|
|
7083
|
+
var defaultProps$K = {
|
|
6930
7084
|
fontStyleName: 'fontStyle',
|
|
6931
7085
|
alignName: 'align',
|
|
6932
7086
|
value: null,
|
|
@@ -6954,29 +7108,29 @@ var FontStyles = function FontStyles(_ref) {
|
|
|
6954
7108
|
}
|
|
6955
7109
|
}, [value, alignName, onChange]);
|
|
6956
7110
|
return /*#__PURE__*/React.createElement("div", {
|
|
6957
|
-
className: classNames(['d-flex', styles$
|
|
7111
|
+
className: classNames(['d-flex', styles$h.container, _defineProperty({}, className, className !== null)])
|
|
6958
7112
|
}, /*#__PURE__*/React.createElement(FontStyles$1, {
|
|
6959
|
-
className: styles$
|
|
6960
|
-
buttonClassName: styles$
|
|
7113
|
+
className: styles$h.item,
|
|
7114
|
+
buttonClassName: styles$h.button,
|
|
6961
7115
|
value: fontStyleValue,
|
|
6962
7116
|
onChange: onFontStyleChange
|
|
6963
7117
|
}), /*#__PURE__*/React.createElement(TextAlign, {
|
|
6964
|
-
className: styles$
|
|
6965
|
-
buttonClassName: styles$
|
|
7118
|
+
className: styles$h.item,
|
|
7119
|
+
buttonClassName: styles$h.button,
|
|
6966
7120
|
value: alignValue,
|
|
6967
7121
|
onChange: onAlignChange
|
|
6968
7122
|
}));
|
|
6969
7123
|
};
|
|
6970
|
-
FontStyles.propTypes = propTypes$
|
|
6971
|
-
FontStyles.defaultProps = defaultProps$
|
|
7124
|
+
FontStyles.propTypes = propTypes$K;
|
|
7125
|
+
FontStyles.defaultProps = defaultProps$K;
|
|
6972
7126
|
|
|
6973
|
-
var propTypes$
|
|
7127
|
+
var propTypes$J = {
|
|
6974
7128
|
value: PropTypes.string,
|
|
6975
7129
|
sizes: PropTypes.arrayOf(PropTypes.number),
|
|
6976
7130
|
className: PropTypes.string,
|
|
6977
7131
|
onChange: PropTypes.func
|
|
6978
7132
|
};
|
|
6979
|
-
var defaultProps$
|
|
7133
|
+
var defaultProps$J = {
|
|
6980
7134
|
value: null,
|
|
6981
7135
|
sizes: [100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
6982
7136
|
className: null,
|
|
@@ -6993,23 +7147,23 @@ var FontWeight = function FontWeight(_ref) {
|
|
|
6993
7147
|
max: sizes[sizes.length - 1],
|
|
6994
7148
|
marks: sizes,
|
|
6995
7149
|
marksStep: 100,
|
|
6996
|
-
className: classNames([styles$
|
|
7150
|
+
className: classNames([styles$u.container, _defineProperty({}, className, className !== null)]),
|
|
6997
7151
|
onChange: onChange
|
|
6998
7152
|
});
|
|
6999
7153
|
};
|
|
7000
|
-
FontWeight.propTypes = propTypes$
|
|
7001
|
-
FontWeight.defaultProps = defaultProps$
|
|
7154
|
+
FontWeight.propTypes = propTypes$J;
|
|
7155
|
+
FontWeight.defaultProps = defaultProps$J;
|
|
7002
7156
|
|
|
7003
|
-
var styles$
|
|
7157
|
+
var styles$g = {"container":"micromag-fields-geo-position-container","autoComplete":"micromag-fields-geo-position-autoComplete","address":"micromag-fields-geo-position-address","map":"micromag-fields-geo-position-map","pin":"micromag-fields-geo-position-pin","infos":"micromag-fields-geo-position-infos","coords":"micromag-fields-geo-position-coords","coord":"micromag-fields-geo-position-coord"};
|
|
7004
7158
|
|
|
7005
|
-
var propTypes$
|
|
7159
|
+
var propTypes$I = {
|
|
7006
7160
|
value: PropTypes$1.geoPosition,
|
|
7007
7161
|
defaultCenter: PropTypes$1.geoPosition,
|
|
7008
7162
|
defaultZoom: PropTypes.number,
|
|
7009
7163
|
className: PropTypes.string,
|
|
7010
7164
|
onChange: PropTypes.func
|
|
7011
7165
|
};
|
|
7012
|
-
var defaultProps$
|
|
7166
|
+
var defaultProps$I = {
|
|
7013
7167
|
value: null,
|
|
7014
7168
|
defaultCenter: {
|
|
7015
7169
|
lat: 45.5,
|
|
@@ -7136,9 +7290,9 @@ var GeoPosition = function GeoPosition(_ref2) {
|
|
|
7136
7290
|
};
|
|
7137
7291
|
}, [client]);
|
|
7138
7292
|
return /*#__PURE__*/React.createElement("div", {
|
|
7139
|
-
className: classNames([styles$
|
|
7293
|
+
className: classNames([styles$g.container, _defineProperty({}, className, className !== null)])
|
|
7140
7294
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7141
|
-
className: classNames([styles$
|
|
7295
|
+
className: classNames([styles$g.autoComplete, 'input-group'])
|
|
7142
7296
|
}, /*#__PURE__*/React.createElement("button", {
|
|
7143
7297
|
type: "button",
|
|
7144
7298
|
onClick: onSearchButtonClick,
|
|
@@ -7148,7 +7302,7 @@ var GeoPosition = function GeoPosition(_ref2) {
|
|
|
7148
7302
|
})), /*#__PURE__*/React.createElement("input", {
|
|
7149
7303
|
type: "text",
|
|
7150
7304
|
ref: addressInputRef,
|
|
7151
|
-
className: classNames([styles$
|
|
7305
|
+
className: classNames([styles$g.address, 'form-control']),
|
|
7152
7306
|
value: address,
|
|
7153
7307
|
placeholder: intl.formatMessage({
|
|
7154
7308
|
id: "KB7N5E",
|
|
@@ -7162,7 +7316,7 @@ var GeoPosition = function GeoPosition(_ref2) {
|
|
|
7162
7316
|
setAddress(e.target.value);
|
|
7163
7317
|
}
|
|
7164
7318
|
})), /*#__PURE__*/React.createElement("div", {
|
|
7165
|
-
className: styles$
|
|
7319
|
+
className: styles$g.map
|
|
7166
7320
|
}, /*#__PURE__*/React.createElement(Map, {
|
|
7167
7321
|
center: value || defaultCenter,
|
|
7168
7322
|
zoom: zoom,
|
|
@@ -7172,11 +7326,11 @@ var GeoPosition = function GeoPosition(_ref2) {
|
|
|
7172
7326
|
withoutStyle: true,
|
|
7173
7327
|
zoomControl: true
|
|
7174
7328
|
}), mapReady ? /*#__PURE__*/React.createElement("img", {
|
|
7175
|
-
className: styles$
|
|
7329
|
+
className: styles$g.pin,
|
|
7176
7330
|
src: Pin,
|
|
7177
7331
|
alt: "Pin"
|
|
7178
7332
|
}) : null), /*#__PURE__*/React.createElement("div", {
|
|
7179
|
-
className: styles$
|
|
7333
|
+
className: styles$g.infos
|
|
7180
7334
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
7181
7335
|
id: "XhgKcw",
|
|
7182
7336
|
defaultMessage: [{
|
|
@@ -7184,11 +7338,11 @@ var GeoPosition = function GeoPosition(_ref2) {
|
|
|
7184
7338
|
"value": "Move the map to position the place"
|
|
7185
7339
|
}]
|
|
7186
7340
|
})), /*#__PURE__*/React.createElement("div", {
|
|
7187
|
-
className: styles$
|
|
7341
|
+
className: styles$g.coords
|
|
7188
7342
|
}, /*#__PURE__*/React.createElement("label", {
|
|
7189
|
-
className: styles$
|
|
7343
|
+
className: styles$g.coord
|
|
7190
7344
|
}, /*#__PURE__*/React.createElement("span", {
|
|
7191
|
-
className: styles$
|
|
7345
|
+
className: styles$g.coordLabel
|
|
7192
7346
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
7193
7347
|
id: "zDH24s",
|
|
7194
7348
|
defaultMessage: [{
|
|
@@ -7204,9 +7358,9 @@ var GeoPosition = function GeoPosition(_ref2) {
|
|
|
7204
7358
|
onChange: onLatitudeChange,
|
|
7205
7359
|
fullWidth: true
|
|
7206
7360
|
})), /*#__PURE__*/React.createElement("label", {
|
|
7207
|
-
className: styles$
|
|
7361
|
+
className: styles$g.coord
|
|
7208
7362
|
}, /*#__PURE__*/React.createElement("span", {
|
|
7209
|
-
className: styles$
|
|
7363
|
+
className: styles$g.coordLabel
|
|
7210
7364
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
7211
7365
|
id: "THKV4v",
|
|
7212
7366
|
defaultMessage: [{
|
|
@@ -7223,12 +7377,12 @@ var GeoPosition = function GeoPosition(_ref2) {
|
|
|
7223
7377
|
fullWidth: true
|
|
7224
7378
|
}))));
|
|
7225
7379
|
};
|
|
7226
|
-
GeoPosition.propTypes = propTypes$
|
|
7227
|
-
GeoPosition.defaultProps = defaultProps$
|
|
7380
|
+
GeoPosition.propTypes = propTypes$I;
|
|
7381
|
+
GeoPosition.defaultProps = defaultProps$I;
|
|
7228
7382
|
|
|
7229
|
-
var styles$
|
|
7383
|
+
var styles$f = {"container":"micromag-fields-grid-layout-container","button":"micromag-fields-grid-layout-button","grid":"micromag-fields-grid-layout-grid","column":"micromag-fields-grid-layout-column"};
|
|
7230
7384
|
|
|
7231
|
-
var propTypes$
|
|
7385
|
+
var propTypes$H = {
|
|
7232
7386
|
grids: PropTypes.arrayOf(PropTypes$1.gridLayout),
|
|
7233
7387
|
value: PropTypes.arrayOf(PropTypes.shape({
|
|
7234
7388
|
rows: PropTypes.number,
|
|
@@ -7237,7 +7391,7 @@ var propTypes$I = {
|
|
|
7237
7391
|
className: PropTypes.string,
|
|
7238
7392
|
onChange: PropTypes.func
|
|
7239
7393
|
};
|
|
7240
|
-
var defaultProps$
|
|
7394
|
+
var defaultProps$H = {
|
|
7241
7395
|
grids: [],
|
|
7242
7396
|
value: null,
|
|
7243
7397
|
className: null,
|
|
@@ -7254,27 +7408,27 @@ var GridLayout = function GridLayout(_ref) {
|
|
|
7254
7408
|
value: layout,
|
|
7255
7409
|
label: /*#__PURE__*/React.createElement(Grid, {
|
|
7256
7410
|
layout: layout,
|
|
7257
|
-
className: styles$
|
|
7258
|
-
columnClassName: styles$
|
|
7411
|
+
className: styles$f.grid,
|
|
7412
|
+
columnClassName: styles$f.column
|
|
7259
7413
|
})
|
|
7260
7414
|
};
|
|
7261
7415
|
}),
|
|
7262
7416
|
value: value !== null ? grids.find(function (it) {
|
|
7263
7417
|
return getGridLayoutName(it) === getGridLayoutName(value);
|
|
7264
7418
|
}) || null : null,
|
|
7265
|
-
className: classNames([styles$
|
|
7266
|
-
buttonClassName: styles$
|
|
7419
|
+
className: classNames([styles$f.container, _defineProperty({}, className, className !== null)]),
|
|
7420
|
+
buttonClassName: styles$f.button,
|
|
7267
7421
|
onChange: onChange
|
|
7268
7422
|
});
|
|
7269
7423
|
};
|
|
7270
|
-
GridLayout.propTypes = propTypes$
|
|
7271
|
-
GridLayout.defaultProps = defaultProps$
|
|
7424
|
+
GridLayout.propTypes = propTypes$H;
|
|
7425
|
+
GridLayout.defaultProps = defaultProps$H;
|
|
7272
7426
|
|
|
7273
7427
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
7274
|
-
var propTypes$
|
|
7428
|
+
var propTypes$G = {
|
|
7275
7429
|
value: PropTypes$1.imageMedia
|
|
7276
7430
|
};
|
|
7277
|
-
var defaultProps$
|
|
7431
|
+
var defaultProps$G = {
|
|
7278
7432
|
value: null
|
|
7279
7433
|
};
|
|
7280
7434
|
var ImageField = function ImageField(props) {
|
|
@@ -7290,15 +7444,15 @@ var ImageField = function ImageField(props) {
|
|
|
7290
7444
|
type: "image"
|
|
7291
7445
|
}));
|
|
7292
7446
|
};
|
|
7293
|
-
ImageField.propTypes = propTypes$
|
|
7294
|
-
ImageField.defaultProps = defaultProps$
|
|
7447
|
+
ImageField.propTypes = propTypes$G;
|
|
7448
|
+
ImageField.defaultProps = defaultProps$G;
|
|
7295
7449
|
ImageField.withForm = true;
|
|
7296
7450
|
|
|
7297
7451
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
7298
|
-
var propTypes$
|
|
7452
|
+
var propTypes$F = {
|
|
7299
7453
|
value: PropTypes$1.imageMedias
|
|
7300
7454
|
};
|
|
7301
|
-
var defaultProps$
|
|
7455
|
+
var defaultProps$F = {
|
|
7302
7456
|
value: null
|
|
7303
7457
|
};
|
|
7304
7458
|
var ImagesField = function ImagesField(props) {
|
|
@@ -7320,27 +7474,27 @@ var ImagesField = function ImagesField(props) {
|
|
|
7320
7474
|
itemComponent: ImageField
|
|
7321
7475
|
}, props));
|
|
7322
7476
|
};
|
|
7323
|
-
ImagesField.propTypes = propTypes$
|
|
7324
|
-
ImagesField.defaultProps = defaultProps$
|
|
7477
|
+
ImagesField.propTypes = propTypes$F;
|
|
7478
|
+
ImagesField.defaultProps = defaultProps$F;
|
|
7325
7479
|
|
|
7326
7480
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
7327
|
-
var propTypes$
|
|
7328
|
-
var defaultProps$
|
|
7481
|
+
var propTypes$E = {};
|
|
7482
|
+
var defaultProps$E = {};
|
|
7329
7483
|
var ImageStyleField = function ImageStyleField(props) {
|
|
7330
7484
|
return /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
7331
7485
|
isList: true
|
|
7332
7486
|
}, props));
|
|
7333
7487
|
};
|
|
7334
|
-
ImageStyleField.propTypes = propTypes$
|
|
7335
|
-
ImageStyleField.defaultProps = defaultProps$
|
|
7488
|
+
ImageStyleField.propTypes = propTypes$E;
|
|
7489
|
+
ImageStyleField.defaultProps = defaultProps$E;
|
|
7336
7490
|
|
|
7337
7491
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
7338
7492
|
// import ImageField from './Image';
|
|
7339
7493
|
|
|
7340
|
-
var propTypes$
|
|
7494
|
+
var propTypes$D = {
|
|
7341
7495
|
value: PropTypes$1.imageMedias
|
|
7342
7496
|
};
|
|
7343
|
-
var defaultProps$
|
|
7497
|
+
var defaultProps$D = {
|
|
7344
7498
|
value: null
|
|
7345
7499
|
};
|
|
7346
7500
|
var ImagesWithCaptionField = function ImagesWithCaptionField(props) {
|
|
@@ -7361,10 +7515,10 @@ var ImagesWithCaptionField = function ImagesWithCaptionField(props) {
|
|
|
7361
7515
|
})
|
|
7362
7516
|
}, props));
|
|
7363
7517
|
};
|
|
7364
|
-
ImagesWithCaptionField.propTypes = propTypes$
|
|
7365
|
-
ImagesWithCaptionField.defaultProps = defaultProps$
|
|
7518
|
+
ImagesWithCaptionField.propTypes = propTypes$D;
|
|
7519
|
+
ImagesWithCaptionField.defaultProps = defaultProps$D;
|
|
7366
7520
|
|
|
7367
|
-
var propTypes$
|
|
7521
|
+
var propTypes$C = {
|
|
7368
7522
|
id: PropTypes.string,
|
|
7369
7523
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
7370
7524
|
errors: PropTypes$1.errors,
|
|
@@ -7372,7 +7526,7 @@ var propTypes$D = {
|
|
|
7372
7526
|
className: PropTypes.string,
|
|
7373
7527
|
onChange: PropTypes.func
|
|
7374
7528
|
};
|
|
7375
|
-
var defaultProps$
|
|
7529
|
+
var defaultProps$C = {
|
|
7376
7530
|
id: null,
|
|
7377
7531
|
value: null,
|
|
7378
7532
|
errors: null,
|
|
@@ -7401,16 +7555,16 @@ var TextareaField = function TextareaField(_ref) {
|
|
|
7401
7555
|
required: required
|
|
7402
7556
|
});
|
|
7403
7557
|
};
|
|
7404
|
-
TextareaField.propTypes = propTypes$
|
|
7405
|
-
TextareaField.defaultProps = defaultProps$
|
|
7558
|
+
TextareaField.propTypes = propTypes$C;
|
|
7559
|
+
TextareaField.defaultProps = defaultProps$C;
|
|
7406
7560
|
|
|
7407
7561
|
var _excluded$f = ["value", "onChange", "multiline"];
|
|
7408
|
-
var propTypes$
|
|
7562
|
+
var propTypes$B = {
|
|
7409
7563
|
value: PropTypes$1.inputElement,
|
|
7410
7564
|
multiline: PropTypes.bool,
|
|
7411
7565
|
onChange: PropTypes.func
|
|
7412
7566
|
};
|
|
7413
|
-
var defaultProps$
|
|
7567
|
+
var defaultProps$B = {
|
|
7414
7568
|
multiline: false,
|
|
7415
7569
|
value: null,
|
|
7416
7570
|
onChange: null
|
|
@@ -7437,19 +7591,19 @@ var TextElement$1 = function TextElement(_ref) {
|
|
|
7437
7591
|
onChange: onLabelChange
|
|
7438
7592
|
}));
|
|
7439
7593
|
};
|
|
7440
|
-
TextElement$1.propTypes = propTypes$
|
|
7441
|
-
TextElement$1.defaultProps = defaultProps$
|
|
7594
|
+
TextElement$1.propTypes = propTypes$B;
|
|
7595
|
+
TextElement$1.defaultProps = defaultProps$B;
|
|
7442
7596
|
|
|
7443
|
-
var styles$
|
|
7597
|
+
var styles$e = {"container":"micromag-fields-input-group-container"};
|
|
7444
7598
|
|
|
7445
|
-
var propTypes$
|
|
7599
|
+
var propTypes$A = {
|
|
7446
7600
|
prepend: PropTypes.node,
|
|
7447
7601
|
children: PropTypes.node,
|
|
7448
7602
|
append: PropTypes.node,
|
|
7449
7603
|
size: PropTypes.oneOf([null, 'sm', 'lg']),
|
|
7450
7604
|
className: PropTypes.string
|
|
7451
7605
|
};
|
|
7452
|
-
var defaultProps$
|
|
7606
|
+
var defaultProps$A = {
|
|
7453
7607
|
prepend: null,
|
|
7454
7608
|
children: null,
|
|
7455
7609
|
append: null,
|
|
@@ -7463,20 +7617,20 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
7463
7617
|
size = _ref.size,
|
|
7464
7618
|
className = _ref.className;
|
|
7465
7619
|
return /*#__PURE__*/React.createElement("div", {
|
|
7466
|
-
className: classNames(['input-group', _defineProperty({}, "input-group-".concat(size), size !== null), styles$
|
|
7620
|
+
className: classNames(['input-group', _defineProperty({}, "input-group-".concat(size), size !== null), styles$e.container, _defineProperty({}, className, className !== null)])
|
|
7467
7621
|
}, isString(prepend) ? /*#__PURE__*/React.createElement("div", {
|
|
7468
7622
|
className: "input-group-text"
|
|
7469
7623
|
}, prepend) : prepend, children, isString(append) ? /*#__PURE__*/React.createElement("div", {
|
|
7470
7624
|
className: "input-group-text"
|
|
7471
7625
|
}, append) : append);
|
|
7472
7626
|
};
|
|
7473
|
-
InputGroup.propTypes = propTypes$
|
|
7474
|
-
InputGroup.defaultProps = defaultProps$
|
|
7627
|
+
InputGroup.propTypes = propTypes$A;
|
|
7628
|
+
InputGroup.defaultProps = defaultProps$A;
|
|
7475
7629
|
|
|
7476
|
-
var styles$
|
|
7630
|
+
var styles$d = {"buttonLabel":"micromag-fields-keypad-layout-buttonLabel","keypad":"micromag-fields-keypad-layout-keypad","preview":"micromag-fields-keypad-layout-preview","buttonVisual":"micromag-fields-keypad-layout-buttonVisual"};
|
|
7477
7631
|
|
|
7478
7632
|
var _excluded$e = ["value", "onChange", "closeForm"];
|
|
7479
|
-
var propTypes$
|
|
7633
|
+
var propTypes$z = {
|
|
7480
7634
|
value: PropTypes.shape({
|
|
7481
7635
|
color: PropTypes.string,
|
|
7482
7636
|
alpha: PropTypes.number
|
|
@@ -7485,7 +7639,7 @@ var propTypes$A = {
|
|
|
7485
7639
|
onChange: PropTypes.func,
|
|
7486
7640
|
closeForm: PropTypes.func
|
|
7487
7641
|
};
|
|
7488
|
-
var defaultProps$
|
|
7642
|
+
var defaultProps$z = {
|
|
7489
7643
|
value: null,
|
|
7490
7644
|
className: null,
|
|
7491
7645
|
onChange: null,
|
|
@@ -7505,22 +7659,22 @@ var KeypadLayout = function KeypadLayout(_ref) {
|
|
|
7505
7659
|
spacing = _ref2$spacing === void 0 ? null : _ref2$spacing;
|
|
7506
7660
|
var finalSpacingPreview = Math.max(0, Math.min(4, spacing));
|
|
7507
7661
|
value !== null ? /*#__PURE__*/React.createElement(Keypad, {
|
|
7508
|
-
className: styles$
|
|
7662
|
+
className: styles$d.keypad,
|
|
7509
7663
|
align: columnAlign,
|
|
7510
7664
|
columns: columns,
|
|
7511
7665
|
spacing: finalSpacingPreview,
|
|
7512
7666
|
items: [1, 2, 3, 4].map(function (n) {
|
|
7513
7667
|
return /*#__PURE__*/React.createElement("div", {
|
|
7514
7668
|
key: n,
|
|
7515
|
-
className: classNames([styles$
|
|
7669
|
+
className: classNames([styles$d.preview, {
|
|
7516
7670
|
// [styles.isPopupEmpty]: isPopupEmpty,
|
|
7517
7671
|
}])
|
|
7518
7672
|
}, /*#__PURE__*/React.createElement(PlaceholderImage, {
|
|
7519
|
-
className: styles$
|
|
7673
|
+
className: styles$d.buttonVisual,
|
|
7520
7674
|
height: 20
|
|
7521
7675
|
}), /*#__PURE__*/React.createElement(PlaceholderText, {
|
|
7522
7676
|
lines: 1,
|
|
7523
|
-
className: styles$
|
|
7677
|
+
className: styles$d.buttonLabel
|
|
7524
7678
|
}));
|
|
7525
7679
|
})
|
|
7526
7680
|
}) : null;
|
|
@@ -7543,10 +7697,10 @@ var KeypadLayout = function KeypadLayout(_ref) {
|
|
|
7543
7697
|
})
|
|
7544
7698
|
}, props)));
|
|
7545
7699
|
};
|
|
7546
|
-
KeypadLayout.propTypes = propTypes$
|
|
7547
|
-
KeypadLayout.defaultProps = defaultProps$
|
|
7700
|
+
KeypadLayout.propTypes = propTypes$z;
|
|
7701
|
+
KeypadLayout.defaultProps = defaultProps$z;
|
|
7548
7702
|
|
|
7549
|
-
var styles$
|
|
7703
|
+
var styles$c = {"previewButton":"micromag-fields-keypad-layout-form-previewButton","previewKeypad":"micromag-fields-keypad-layout-form-previewKeypad","previewKey":"micromag-fields-keypad-layout-form-previewKey","oneColumn":"micromag-fields-keypad-layout-form-oneColumn"};
|
|
7550
7704
|
|
|
7551
7705
|
var _excluded$d = ["value", "onChange", "closeForm"];
|
|
7552
7706
|
function getPreviewItemsByColumns(columns) {
|
|
@@ -7563,7 +7717,7 @@ function getPreviewItemsByColumns(columns) {
|
|
|
7563
7717
|
return [1, 2, 3];
|
|
7564
7718
|
}
|
|
7565
7719
|
}
|
|
7566
|
-
var propTypes$
|
|
7720
|
+
var propTypes$y = {
|
|
7567
7721
|
value: PropTypes.shape({
|
|
7568
7722
|
color: PropTypes.string,
|
|
7569
7723
|
alpha: PropTypes.number
|
|
@@ -7574,7 +7728,7 @@ var propTypes$z = {
|
|
|
7574
7728
|
onChange: PropTypes.func,
|
|
7575
7729
|
closeForm: PropTypes.func
|
|
7576
7730
|
};
|
|
7577
|
-
var defaultProps$
|
|
7731
|
+
var defaultProps$y = {
|
|
7578
7732
|
value: null,
|
|
7579
7733
|
isForm: false,
|
|
7580
7734
|
isHorizontal: false,
|
|
@@ -7628,7 +7782,7 @@ var KeypadLayoutForm = function KeypadLayoutForm(_ref) {
|
|
|
7628
7782
|
}
|
|
7629
7783
|
}
|
|
7630
7784
|
var label = /*#__PURE__*/React.createElement("div", {
|
|
7631
|
-
className: styles$
|
|
7785
|
+
className: styles$c.previewLabel
|
|
7632
7786
|
}, columns, ' ', intl.formatMessage({
|
|
7633
7787
|
id: "mgjMWG",
|
|
7634
7788
|
defaultMessage: [{
|
|
@@ -7637,16 +7791,16 @@ var KeypadLayoutForm = function KeypadLayoutForm(_ref) {
|
|
|
7637
7791
|
}]
|
|
7638
7792
|
}), ' ', ", ", getAlignIntlLabel(columnAlign), ", ", spacing, "px");
|
|
7639
7793
|
var previewElement = value !== null ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Keypad, {
|
|
7640
|
-
className: classNames([styles$
|
|
7794
|
+
className: classNames([styles$c.previewKeypad, _defineProperty({}, styles$c.oneColumn, columns === 1)]),
|
|
7641
7795
|
align: columnAlign,
|
|
7642
7796
|
columns: columns,
|
|
7643
7797
|
spacing: finalSpacingPreview,
|
|
7644
7798
|
items: previewItems.map(function (n) {
|
|
7645
7799
|
return /*#__PURE__*/React.createElement("div", {
|
|
7646
7800
|
key: n,
|
|
7647
|
-
className: styles$
|
|
7801
|
+
className: styles$c.previewKey
|
|
7648
7802
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7649
|
-
className: styles$
|
|
7803
|
+
className: styles$c.previewButton
|
|
7650
7804
|
}));
|
|
7651
7805
|
})
|
|
7652
7806
|
})) : null;
|
|
@@ -7659,21 +7813,21 @@ var KeypadLayoutForm = function KeypadLayoutForm(_ref) {
|
|
|
7659
7813
|
thumbnail: previewElement
|
|
7660
7814
|
}, props));
|
|
7661
7815
|
};
|
|
7662
|
-
KeypadLayoutForm.propTypes = propTypes$
|
|
7663
|
-
KeypadLayoutForm.defaultProps = defaultProps$
|
|
7816
|
+
KeypadLayoutForm.propTypes = propTypes$y;
|
|
7817
|
+
KeypadLayoutForm.defaultProps = defaultProps$y;
|
|
7664
7818
|
|
|
7665
7819
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
7666
|
-
var propTypes$
|
|
7667
|
-
var defaultProps$
|
|
7820
|
+
var propTypes$x = {};
|
|
7821
|
+
var defaultProps$x = {};
|
|
7668
7822
|
var MapField = function MapField(props) {
|
|
7669
7823
|
return /*#__PURE__*/React.createElement(Fields, props);
|
|
7670
7824
|
};
|
|
7671
|
-
MapField.propTypes = propTypes$
|
|
7672
|
-
MapField.defaultProps = defaultProps$
|
|
7825
|
+
MapField.propTypes = propTypes$x;
|
|
7826
|
+
MapField.defaultProps = defaultProps$x;
|
|
7673
7827
|
|
|
7674
|
-
var styles$
|
|
7828
|
+
var styles$b = {"container":"micromag-fields-margin-container","icon":"micromag-fields-margin-icon","slider":"micromag-fields-margin-slider"};
|
|
7675
7829
|
|
|
7676
|
-
var propTypes$
|
|
7830
|
+
var propTypes$w = {
|
|
7677
7831
|
value: PropTypes.number,
|
|
7678
7832
|
unit: PropTypes.string,
|
|
7679
7833
|
direction: PropTypes.oneOf(['top', 'bottom']),
|
|
@@ -7683,7 +7837,7 @@ var propTypes$x = {
|
|
|
7683
7837
|
className: PropTypes.string,
|
|
7684
7838
|
onChange: PropTypes.func
|
|
7685
7839
|
};
|
|
7686
|
-
var defaultProps$
|
|
7840
|
+
var defaultProps$w = {
|
|
7687
7841
|
value: null,
|
|
7688
7842
|
unit: 'pt',
|
|
7689
7843
|
direction: 'top',
|
|
@@ -7703,10 +7857,10 @@ var MarginField = function MarginField(_ref) {
|
|
|
7703
7857
|
className = _ref.className,
|
|
7704
7858
|
_onChange = _ref.onChange;
|
|
7705
7859
|
return /*#__PURE__*/React.createElement("div", {
|
|
7706
|
-
className: classNames([styles$
|
|
7860
|
+
className: classNames([styles$b.container, _defineProperty({}, className, className !== null)])
|
|
7707
7861
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
7708
7862
|
icon: direction === 'top' ? faArrowUp : faArrowDown,
|
|
7709
|
-
className: styles$
|
|
7863
|
+
className: styles$b.icon
|
|
7710
7864
|
}), /*#__PURE__*/React.createElement(SliderField, {
|
|
7711
7865
|
value: value,
|
|
7712
7866
|
min: min,
|
|
@@ -7721,24 +7875,24 @@ var MarginField = function MarginField(_ref) {
|
|
|
7721
7875
|
onChange: function onChange(newValue) {
|
|
7722
7876
|
return _onChange !== null ? _onChange(newValue !== 0 ? newValue : null) : null;
|
|
7723
7877
|
},
|
|
7724
|
-
className: styles$
|
|
7878
|
+
className: styles$b.slider
|
|
7725
7879
|
}));
|
|
7726
7880
|
};
|
|
7727
|
-
MarginField.propTypes = propTypes$
|
|
7728
|
-
MarginField.defaultProps = defaultProps$
|
|
7881
|
+
MarginField.propTypes = propTypes$w;
|
|
7882
|
+
MarginField.defaultProps = defaultProps$w;
|
|
7729
7883
|
MarginField.isHorizontal = true;
|
|
7730
7884
|
|
|
7731
|
-
var styles$
|
|
7885
|
+
var styles$a = {"container":"micromag-fields-marker-container","noValue":"micromag-fields-marker-noValue","value":"micromag-fields-marker-value","panel":"micromag-fields-marker-panel"};
|
|
7732
7886
|
|
|
7733
7887
|
var _excluded$c = ["isForm", "value", "className"];
|
|
7734
|
-
var propTypes$
|
|
7888
|
+
var propTypes$v = {
|
|
7735
7889
|
value: PropTypes.shape({
|
|
7736
7890
|
text: PropTypes.string
|
|
7737
7891
|
}),
|
|
7738
7892
|
isForm: PropTypes.bool,
|
|
7739
7893
|
className: PropTypes.string
|
|
7740
7894
|
};
|
|
7741
|
-
var defaultProps$
|
|
7895
|
+
var defaultProps$v = {
|
|
7742
7896
|
value: null,
|
|
7743
7897
|
isForm: false,
|
|
7744
7898
|
className: null
|
|
@@ -7752,23 +7906,23 @@ var MarkerField = function MarkerField(_ref) {
|
|
|
7752
7906
|
_ref2$title = _ref2.title,
|
|
7753
7907
|
title = _ref2$title === void 0 ? null : _ref2$title;
|
|
7754
7908
|
return isForm ? /*#__PURE__*/React.createElement("div", {
|
|
7755
|
-
className: classNames([styles$
|
|
7909
|
+
className: classNames([styles$a.panel, _defineProperty({}, className, className !== null)])
|
|
7756
7910
|
}, /*#__PURE__*/React.createElement(Fields, Object.assign({}, props, {
|
|
7757
7911
|
value: value
|
|
7758
7912
|
}))) : /*#__PURE__*/React.createElement("div", {
|
|
7759
|
-
className: classNames([styles$
|
|
7913
|
+
className: classNames([styles$a.container, _defineProperty({}, className, className !== null)])
|
|
7760
7914
|
}, title !== null ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
7761
|
-
className: styles$
|
|
7915
|
+
className: styles$a.value
|
|
7762
7916
|
}, title.body)) : /*#__PURE__*/React.createElement("span", {
|
|
7763
|
-
className: styles$
|
|
7917
|
+
className: styles$a.noValue
|
|
7764
7918
|
}, "Entrez les infos..."));
|
|
7765
7919
|
};
|
|
7766
|
-
MarkerField.propTypes = propTypes$
|
|
7767
|
-
MarkerField.defaultProps = defaultProps$
|
|
7920
|
+
MarkerField.propTypes = propTypes$v;
|
|
7921
|
+
MarkerField.defaultProps = defaultProps$v;
|
|
7768
7922
|
|
|
7769
7923
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
7770
|
-
var propTypes$
|
|
7771
|
-
var defaultProps$
|
|
7924
|
+
var propTypes$u = {};
|
|
7925
|
+
var defaultProps$u = {};
|
|
7772
7926
|
var MarkersField = function MarkersField(props) {
|
|
7773
7927
|
return /*#__PURE__*/React.createElement(ItemsField, Object.assign({
|
|
7774
7928
|
noItemLabel: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -7788,19 +7942,19 @@ var MarkersField = function MarkersField(props) {
|
|
|
7788
7942
|
itemComponent: MarkerField
|
|
7789
7943
|
}, props));
|
|
7790
7944
|
};
|
|
7791
|
-
MarkersField.propTypes = propTypes$
|
|
7792
|
-
MarkersField.defaultProps = defaultProps$
|
|
7945
|
+
MarkersField.propTypes = propTypes$u;
|
|
7946
|
+
MarkersField.defaultProps = defaultProps$u;
|
|
7793
7947
|
|
|
7794
|
-
var styles$
|
|
7948
|
+
var styles$9 = {"container":"micromag-fields-media-thumbnail-container","radios":"micromag-fields-media-thumbnail-radios","thumbnail":"micromag-fields-media-thumbnail-thumbnail","button":"micromag-fields-media-thumbnail-button"};
|
|
7795
7949
|
|
|
7796
7950
|
var _excluded$b = ["value", "onChange", "className", "isForm"];
|
|
7797
|
-
var propTypes$
|
|
7951
|
+
var propTypes$t = {
|
|
7798
7952
|
value: PropTypes.oneOf([PropTypes.string, PropTypes$1.imageMedia]),
|
|
7799
7953
|
isForm: PropTypes.bool,
|
|
7800
7954
|
onChange: PropTypes.func,
|
|
7801
7955
|
className: PropTypes.string
|
|
7802
7956
|
};
|
|
7803
|
-
var defaultProps$
|
|
7957
|
+
var defaultProps$t = {
|
|
7804
7958
|
value: null,
|
|
7805
7959
|
isForm: false,
|
|
7806
7960
|
onChange: null,
|
|
@@ -7834,27 +7988,27 @@ function MediaThumbnail(_ref) {
|
|
|
7834
7988
|
label: /*#__PURE__*/React.createElement("img", {
|
|
7835
7989
|
src: url,
|
|
7836
7990
|
alt: handle,
|
|
7837
|
-
className: styles$
|
|
7991
|
+
className: styles$9.thumbnail
|
|
7838
7992
|
})
|
|
7839
7993
|
};
|
|
7840
7994
|
}) : null;
|
|
7841
7995
|
}, [media]);
|
|
7842
7996
|
return isForm ? /*#__PURE__*/React.createElement("div", {
|
|
7843
|
-
className: classNames([styles$
|
|
7997
|
+
className: classNames([styles$9.container, _defineProperty({}, className, className !== null)])
|
|
7844
7998
|
}, /*#__PURE__*/React.createElement(ImageField, Object.assign({}, props, {
|
|
7845
7999
|
isForm: true,
|
|
7846
8000
|
value: isObject(value) ? value : null,
|
|
7847
8001
|
onChange: onChange
|
|
7848
8002
|
}))) : /*#__PURE__*/React.createElement("div", {
|
|
7849
|
-
className: classNames([styles$
|
|
8003
|
+
className: classNames([styles$9.container, _defineProperty({}, className, className !== null)])
|
|
7850
8004
|
}, options !== null ? /*#__PURE__*/React.createElement("div", {
|
|
7851
8005
|
className: "mb-4"
|
|
7852
8006
|
}, /*#__PURE__*/React.createElement(Radios, Object.assign({
|
|
7853
8007
|
value: !isObject(value) ? value : null,
|
|
7854
8008
|
options: options || [],
|
|
7855
8009
|
onChange: onChange,
|
|
7856
|
-
className: styles$
|
|
7857
|
-
buttonClassName: styles$
|
|
8010
|
+
className: styles$9.radios,
|
|
8011
|
+
buttonClassName: styles$9.button
|
|
7858
8012
|
}, props))) : null, /*#__PURE__*/React.createElement(FieldRow, Object.assign({}, props, {
|
|
7859
8013
|
withForm: true
|
|
7860
8014
|
}), /*#__PURE__*/React.createElement(ImageField, Object.assign({
|
|
@@ -7862,11 +8016,11 @@ function MediaThumbnail(_ref) {
|
|
|
7862
8016
|
onChange: onChange
|
|
7863
8017
|
}, props))));
|
|
7864
8018
|
}
|
|
7865
|
-
MediaThumbnail.propTypes = propTypes$
|
|
7866
|
-
MediaThumbnail.defaultProps = defaultProps$
|
|
8019
|
+
MediaThumbnail.propTypes = propTypes$t;
|
|
8020
|
+
MediaThumbnail.defaultProps = defaultProps$t;
|
|
7867
8021
|
|
|
7868
8022
|
var _excluded$a = ["type", "value", "fields", "noValueLabel", "withoutThumbnail", "onChange", "closeForm"];
|
|
7869
|
-
var propTypes$
|
|
8023
|
+
var propTypes$s = {
|
|
7870
8024
|
type: PropTypes.oneOfType([PropTypes$1.mediaTypes, PropTypes.arrayOf(PropTypes$1.mediaTypes)]),
|
|
7871
8025
|
value: PropTypes$1.media,
|
|
7872
8026
|
fields: PropTypes$1.formFields,
|
|
@@ -7875,7 +8029,7 @@ var propTypes$t = {
|
|
|
7875
8029
|
onChange: PropTypes.func,
|
|
7876
8030
|
closeForm: PropTypes.func
|
|
7877
8031
|
};
|
|
7878
|
-
var defaultProps$
|
|
8032
|
+
var defaultProps$s = {
|
|
7879
8033
|
type: null,
|
|
7880
8034
|
value: null,
|
|
7881
8035
|
fields: null,
|
|
@@ -7916,8 +8070,8 @@ var MessageField = function MessageField(_ref) {
|
|
|
7916
8070
|
})
|
|
7917
8071
|
}, props));
|
|
7918
8072
|
};
|
|
7919
|
-
MessageField.propTypes = propTypes$
|
|
7920
|
-
MessageField.defaultProps = defaultProps$
|
|
8073
|
+
MessageField.propTypes = propTypes$s;
|
|
8074
|
+
MessageField.defaultProps = defaultProps$s;
|
|
7921
8075
|
MessageField.withForm = true;
|
|
7922
8076
|
|
|
7923
8077
|
var _excluded$9 = ["icon", "iconRotation", "isHorizontal", "className"];
|
|
@@ -7926,13 +8080,13 @@ var fontAwesomeIconType = PropTypes.shape({
|
|
|
7926
8080
|
iconName: PropTypes.string,
|
|
7927
8081
|
prefix: PropTypes.string
|
|
7928
8082
|
});
|
|
7929
|
-
var propTypes$
|
|
8083
|
+
var propTypes$r = {
|
|
7930
8084
|
icon: PropTypes.oneOfType([PropTypes.node, fontAwesomeIconType]),
|
|
7931
8085
|
iconRotation: PropTypes.number,
|
|
7932
8086
|
isHorizontal: PropTypes.bool,
|
|
7933
8087
|
className: PropTypes.string
|
|
7934
8088
|
};
|
|
7935
|
-
var defaultProps$
|
|
8089
|
+
var defaultProps$r = {
|
|
7936
8090
|
icon: null,
|
|
7937
8091
|
iconRotation: 0,
|
|
7938
8092
|
isHorizontal: false,
|
|
@@ -7957,19 +8111,19 @@ var NumberWithIcon = function NumberWithIcon(_ref) {
|
|
|
7957
8111
|
icon: icon
|
|
7958
8112
|
})), /*#__PURE__*/React.createElement(NumberField, props));
|
|
7959
8113
|
};
|
|
7960
|
-
NumberWithIcon.propTypes = propTypes$
|
|
7961
|
-
NumberWithIcon.defaultProps = defaultProps$
|
|
8114
|
+
NumberWithIcon.propTypes = propTypes$r;
|
|
8115
|
+
NumberWithIcon.defaultProps = defaultProps$r;
|
|
7962
8116
|
NumberWithIcon.isHorizontal = true;
|
|
7963
8117
|
|
|
7964
|
-
var styles$
|
|
8118
|
+
var styles$8 = {"spacing":"micromag-fields-padding-spacing"};
|
|
7965
8119
|
|
|
7966
8120
|
var _excluded$8 = ["value", "className", "onChange"];
|
|
7967
|
-
var propTypes$
|
|
8121
|
+
var propTypes$q = {
|
|
7968
8122
|
value: PropTypes.number,
|
|
7969
8123
|
className: PropTypes.string,
|
|
7970
8124
|
onChange: PropTypes.func
|
|
7971
8125
|
};
|
|
7972
|
-
var defaultProps$
|
|
8126
|
+
var defaultProps$q = {
|
|
7973
8127
|
value: null,
|
|
7974
8128
|
className: null,
|
|
7975
8129
|
onChange: null
|
|
@@ -7989,11 +8143,11 @@ var Spacing = function Spacing(_ref) {
|
|
|
7989
8143
|
onChange: onChange
|
|
7990
8144
|
}, props)));
|
|
7991
8145
|
};
|
|
7992
|
-
Spacing.propTypes = propTypes$
|
|
7993
|
-
Spacing.defaultProps = defaultProps$
|
|
8146
|
+
Spacing.propTypes = propTypes$q;
|
|
8147
|
+
Spacing.defaultProps = defaultProps$q;
|
|
7994
8148
|
|
|
7995
8149
|
var _excluded$7 = ["value", "onChange", "closeForm"];
|
|
7996
|
-
var propTypes$
|
|
8150
|
+
var propTypes$p = {
|
|
7997
8151
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
7998
8152
|
top: PropTypes.string,
|
|
7999
8153
|
left: PropTypes.string,
|
|
@@ -8006,7 +8160,7 @@ var propTypes$q = {
|
|
|
8006
8160
|
onChange: PropTypes.func,
|
|
8007
8161
|
closeForm: PropTypes.func
|
|
8008
8162
|
};
|
|
8009
|
-
var defaultProps$
|
|
8163
|
+
var defaultProps$p = {
|
|
8010
8164
|
value: null,
|
|
8011
8165
|
isForm: false,
|
|
8012
8166
|
isHorizontal: false,
|
|
@@ -8066,7 +8220,7 @@ var PaddingField = function PaddingField(_ref) {
|
|
|
8066
8220
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8067
8221
|
className: "d-flex w-100 align-content-center justify-content-center my-2"
|
|
8068
8222
|
}, /*#__PURE__*/React.createElement(Spacing, {
|
|
8069
|
-
className: styles$
|
|
8223
|
+
className: styles$8.spacing,
|
|
8070
8224
|
value: defaultValue || top,
|
|
8071
8225
|
onChange: function onChange(val) {
|
|
8072
8226
|
return onSpacingChange(val, 'top');
|
|
@@ -8081,7 +8235,7 @@ var PaddingField = function PaddingField(_ref) {
|
|
|
8081
8235
|
})), /*#__PURE__*/React.createElement("div", {
|
|
8082
8236
|
className: "d-flex w-100 align-content-center justify-content-between my-2"
|
|
8083
8237
|
}, /*#__PURE__*/React.createElement(Spacing, {
|
|
8084
|
-
className: styles$
|
|
8238
|
+
className: styles$8.spacing,
|
|
8085
8239
|
value: defaultValue || left,
|
|
8086
8240
|
onChange: function onChange(val) {
|
|
8087
8241
|
return onSpacingChange(val, 'left');
|
|
@@ -8094,7 +8248,7 @@ var PaddingField = function PaddingField(_ref) {
|
|
|
8094
8248
|
}]
|
|
8095
8249
|
})
|
|
8096
8250
|
}), /*#__PURE__*/React.createElement(Spacing, {
|
|
8097
|
-
className: styles$
|
|
8251
|
+
className: styles$8.spacing,
|
|
8098
8252
|
value: defaultValue || right,
|
|
8099
8253
|
onChange: function onChange(val) {
|
|
8100
8254
|
return onSpacingChange(val, 'right');
|
|
@@ -8109,7 +8263,7 @@ var PaddingField = function PaddingField(_ref) {
|
|
|
8109
8263
|
})), /*#__PURE__*/React.createElement("div", {
|
|
8110
8264
|
className: "d-flex w-100 align-content-center justify-content-center my-2"
|
|
8111
8265
|
}, /*#__PURE__*/React.createElement(Spacing, {
|
|
8112
|
-
className: styles$
|
|
8266
|
+
className: styles$8.spacing,
|
|
8113
8267
|
value: defaultValue || bottom,
|
|
8114
8268
|
onChange: function onChange(val) {
|
|
8115
8269
|
return onSpacingChange(val, 'bottom');
|
|
@@ -8147,13 +8301,13 @@ var PaddingField = function PaddingField(_ref) {
|
|
|
8147
8301
|
}]
|
|
8148
8302
|
})) : null)));
|
|
8149
8303
|
};
|
|
8150
|
-
PaddingField.propTypes = propTypes$
|
|
8151
|
-
PaddingField.defaultProps = defaultProps$
|
|
8304
|
+
PaddingField.propTypes = propTypes$p;
|
|
8305
|
+
PaddingField.defaultProps = defaultProps$p;
|
|
8152
8306
|
PaddingField.withForm = true;
|
|
8153
8307
|
|
|
8154
|
-
var styles$
|
|
8308
|
+
var styles$7 = {"container":"micromag-fields-position-container","button":"micromag-fields-position-button","rotateLeft":"micromag-fields-position-rotateLeft","rotateRight":"micromag-fields-position-rotateRight"};
|
|
8155
8309
|
|
|
8156
|
-
var propTypes$
|
|
8310
|
+
var propTypes$o = {
|
|
8157
8311
|
name: PropTypes.string,
|
|
8158
8312
|
value: PropTypes.string,
|
|
8159
8313
|
axisOptions: PropTypes.arrayOf(PropTypes.string),
|
|
@@ -8162,7 +8316,7 @@ var propTypes$p = {
|
|
|
8162
8316
|
buttonClassName: PropTypes.string,
|
|
8163
8317
|
onChange: PropTypes.func
|
|
8164
8318
|
};
|
|
8165
|
-
var defaultProps$
|
|
8319
|
+
var defaultProps$o = {
|
|
8166
8320
|
name: null,
|
|
8167
8321
|
value: null,
|
|
8168
8322
|
axisOptions: ['top', 'center', 'bottom'],
|
|
@@ -8177,47 +8331,47 @@ var Icon = function Icon(_ref) {
|
|
|
8177
8331
|
case 'top-left':
|
|
8178
8332
|
return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
8179
8333
|
icon: faArrowUp,
|
|
8180
|
-
className: styles$
|
|
8334
|
+
className: styles$7.rotateLeft
|
|
8181
8335
|
});
|
|
8182
8336
|
case 'top-center':
|
|
8183
8337
|
return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
8184
8338
|
icon: faArrowUp,
|
|
8185
|
-
className: styles$
|
|
8339
|
+
className: styles$7.icon
|
|
8186
8340
|
});
|
|
8187
8341
|
case 'top-right':
|
|
8188
8342
|
return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
8189
8343
|
icon: faArrowUp,
|
|
8190
|
-
className: styles$
|
|
8344
|
+
className: styles$7.rotateRight
|
|
8191
8345
|
});
|
|
8192
8346
|
case 'center-left':
|
|
8193
8347
|
return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
8194
8348
|
icon: faArrowLeft,
|
|
8195
|
-
className: styles$
|
|
8349
|
+
className: styles$7.icon
|
|
8196
8350
|
});
|
|
8197
8351
|
case 'center-center':
|
|
8198
8352
|
return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
8199
8353
|
icon: faDotCircle,
|
|
8200
|
-
className: styles$
|
|
8354
|
+
className: styles$7.icon
|
|
8201
8355
|
});
|
|
8202
8356
|
case 'center-right':
|
|
8203
8357
|
return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
8204
8358
|
icon: faArrowRight,
|
|
8205
|
-
className: styles$
|
|
8359
|
+
className: styles$7.icon
|
|
8206
8360
|
});
|
|
8207
8361
|
case 'bottom-left':
|
|
8208
8362
|
return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
8209
8363
|
icon: faArrowDown,
|
|
8210
|
-
className: styles$
|
|
8364
|
+
className: styles$7.rotateRight
|
|
8211
8365
|
});
|
|
8212
8366
|
case 'bottom-center':
|
|
8213
8367
|
return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
8214
8368
|
icon: faArrowDown,
|
|
8215
|
-
className: styles$
|
|
8369
|
+
className: styles$7.icon
|
|
8216
8370
|
});
|
|
8217
8371
|
case 'bottom-right':
|
|
8218
8372
|
return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
8219
8373
|
icon: faArrowDown,
|
|
8220
|
-
className: styles$
|
|
8374
|
+
className: styles$7.rotateLeft
|
|
8221
8375
|
});
|
|
8222
8376
|
}
|
|
8223
8377
|
return null;
|
|
@@ -8245,7 +8399,7 @@ var Position = function Position(_ref2) {
|
|
|
8245
8399
|
_ref3$crossAlign = _ref3.crossAlign,
|
|
8246
8400
|
crossAlign = _ref3$crossAlign === void 0 ? null : _ref3$crossAlign;
|
|
8247
8401
|
return /*#__PURE__*/React.createElement("div", {
|
|
8248
|
-
className: classNames(['btn-group', 'btn-group-toggle', styles$
|
|
8402
|
+
className: classNames(['btn-group', 'btn-group-toggle', styles$7.container, _defineProperty({}, className, className !== null)]),
|
|
8249
8403
|
"data-toggle": "buttons"
|
|
8250
8404
|
}, axisOptions.map(function (_ref5) {
|
|
8251
8405
|
var axisOption = _ref5.value,
|
|
@@ -8255,7 +8409,7 @@ var Position = function Position(_ref2) {
|
|
|
8255
8409
|
crossLabel = _ref6.label;
|
|
8256
8410
|
return /*#__PURE__*/React.createElement("label", {
|
|
8257
8411
|
key: "radio-".concat(axisOption, "-").concat(crossOption),
|
|
8258
|
-
className: classNames(['btn', 'btn-outline-secondary', _defineProperty(_defineProperty(_defineProperty({}, styles$
|
|
8412
|
+
className: classNames(['btn', 'btn-outline-secondary', _defineProperty(_defineProperty(_defineProperty({}, styles$7.button, true), "active", axisOption === axisAlign && crossOption === crossAlign), buttonClassName, buttonClassName !== null)])
|
|
8259
8413
|
}, /*#__PURE__*/React.createElement("input", {
|
|
8260
8414
|
type: "radio",
|
|
8261
8415
|
name: name,
|
|
@@ -8276,30 +8430,30 @@ var Position = function Position(_ref2) {
|
|
|
8276
8430
|
});
|
|
8277
8431
|
}));
|
|
8278
8432
|
};
|
|
8279
|
-
Position.propTypes = propTypes$
|
|
8280
|
-
Position.defaultProps = defaultProps$
|
|
8433
|
+
Position.propTypes = propTypes$o;
|
|
8434
|
+
Position.defaultProps = defaultProps$o;
|
|
8281
8435
|
|
|
8282
8436
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
8283
|
-
var propTypes$
|
|
8284
|
-
var defaultProps$
|
|
8437
|
+
var propTypes$n = {};
|
|
8438
|
+
var defaultProps$n = {};
|
|
8285
8439
|
var QuestionField = function QuestionField(props) {
|
|
8286
8440
|
return /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
8287
8441
|
isList: true
|
|
8288
8442
|
}, props));
|
|
8289
8443
|
};
|
|
8290
|
-
QuestionField.propTypes = propTypes$
|
|
8291
|
-
QuestionField.defaultProps = defaultProps$
|
|
8444
|
+
QuestionField.propTypes = propTypes$n;
|
|
8445
|
+
QuestionField.defaultProps = defaultProps$n;
|
|
8292
8446
|
|
|
8293
|
-
var styles$
|
|
8447
|
+
var styles$6 = {"container":"micromag-fields-layout-container","button":"micromag-fields-layout-button","layout":"micromag-fields-layout-layout","screen":"micromag-fields-layout-screen"};
|
|
8294
8448
|
|
|
8295
8449
|
var _excluded$6 = ["value", "screenState", "className", "onChange"];
|
|
8296
|
-
var propTypes$
|
|
8450
|
+
var propTypes$m = {
|
|
8297
8451
|
value: PropTypes.string,
|
|
8298
8452
|
screenState: PropTypes.string,
|
|
8299
8453
|
className: PropTypes.string,
|
|
8300
8454
|
onChange: PropTypes.func
|
|
8301
8455
|
};
|
|
8302
|
-
var defaultProps$
|
|
8456
|
+
var defaultProps$m = {
|
|
8303
8457
|
value: null,
|
|
8304
8458
|
screenState: null,
|
|
8305
8459
|
className: null,
|
|
@@ -8320,7 +8474,7 @@ var ScreenLayoutField = function ScreenLayoutField(_ref) {
|
|
|
8320
8474
|
return {
|
|
8321
8475
|
value: layout,
|
|
8322
8476
|
label: /*#__PURE__*/React.createElement("div", {
|
|
8323
|
-
className: styles$
|
|
8477
|
+
className: styles$6.layout
|
|
8324
8478
|
}, /*#__PURE__*/React.createElement(ScreenPlaceholder, {
|
|
8325
8479
|
screen: {
|
|
8326
8480
|
type: id,
|
|
@@ -8328,29 +8482,29 @@ var ScreenLayoutField = function ScreenLayoutField(_ref) {
|
|
|
8328
8482
|
},
|
|
8329
8483
|
screenState: screenState,
|
|
8330
8484
|
withSize: true,
|
|
8331
|
-
className: styles$
|
|
8485
|
+
className: styles$6.screen
|
|
8332
8486
|
}))
|
|
8333
8487
|
};
|
|
8334
8488
|
}),
|
|
8335
8489
|
value: value || (layouts ? layouts[0] : null),
|
|
8336
|
-
className: classNames([styles$
|
|
8337
|
-
buttonClassName: styles$
|
|
8490
|
+
className: classNames([styles$6.container, _defineProperty({}, className, className !== null)]),
|
|
8491
|
+
buttonClassName: styles$6.button,
|
|
8338
8492
|
onChange: onChange
|
|
8339
8493
|
});
|
|
8340
8494
|
};
|
|
8341
|
-
ScreenLayoutField.propTypes = propTypes$
|
|
8342
|
-
ScreenLayoutField.defaultProps = defaultProps$
|
|
8495
|
+
ScreenLayoutField.propTypes = propTypes$m;
|
|
8496
|
+
ScreenLayoutField.defaultProps = defaultProps$m;
|
|
8343
8497
|
|
|
8344
|
-
var styles$
|
|
8498
|
+
var styles$5 = {"lightCaret":"micromag-fields-select-lightCaret"};
|
|
8345
8499
|
|
|
8346
|
-
var propTypes$
|
|
8500
|
+
var propTypes$l = {
|
|
8347
8501
|
value: PropTypes.string,
|
|
8348
8502
|
options: PropTypes$1.selectOptions,
|
|
8349
8503
|
disabled: PropTypes.bool,
|
|
8350
8504
|
className: PropTypes.string,
|
|
8351
8505
|
onChange: PropTypes.func
|
|
8352
8506
|
};
|
|
8353
|
-
var defaultProps$
|
|
8507
|
+
var defaultProps$l = {
|
|
8354
8508
|
value: null,
|
|
8355
8509
|
options: [],
|
|
8356
8510
|
disabled: false,
|
|
@@ -8367,7 +8521,7 @@ var SelectField = function SelectField(_ref) {
|
|
|
8367
8521
|
return getSelectOptions(options);
|
|
8368
8522
|
}, [options]);
|
|
8369
8523
|
return /*#__PURE__*/React.createElement("select", {
|
|
8370
|
-
className: classNames([styles$
|
|
8524
|
+
className: classNames([styles$5.container, 'form-select', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles$5.lightCaret, !disabled), 'bg-dark', !disabled), 'text-light', !disabled), 'text-dark', disabled), className, className !== null)]),
|
|
8371
8525
|
value: value || '',
|
|
8372
8526
|
disabled: disabled,
|
|
8373
8527
|
onChange: function onChange(e) {
|
|
@@ -8384,8 +8538,8 @@ var SelectField = function SelectField(_ref) {
|
|
|
8384
8538
|
}, optionLabel);
|
|
8385
8539
|
}));
|
|
8386
8540
|
};
|
|
8387
|
-
SelectField.propTypes = propTypes$
|
|
8388
|
-
SelectField.defaultProps = defaultProps$
|
|
8541
|
+
SelectField.propTypes = propTypes$l;
|
|
8542
|
+
SelectField.defaultProps = defaultProps$l;
|
|
8389
8543
|
|
|
8390
8544
|
var selectTheme = function selectTheme(theme) {
|
|
8391
8545
|
return _objectSpread(_objectSpread({}, theme), {}, {
|
|
@@ -8419,7 +8573,7 @@ var selectTheme = function selectTheme(theme) {
|
|
|
8419
8573
|
|
|
8420
8574
|
var _excluded$5 = ["name", "value", "options", "withoutReset", "disabled", "className", "onChange"],
|
|
8421
8575
|
_excluded2 = ["label"];
|
|
8422
|
-
var propTypes$
|
|
8576
|
+
var propTypes$k = {
|
|
8423
8577
|
name: PropTypes.string,
|
|
8424
8578
|
value: PropTypes.string,
|
|
8425
8579
|
options: PropTypes$1.selectOptions,
|
|
@@ -8428,7 +8582,7 @@ var propTypes$l = {
|
|
|
8428
8582
|
className: PropTypes.string,
|
|
8429
8583
|
onChange: PropTypes.func
|
|
8430
8584
|
};
|
|
8431
|
-
var defaultProps$
|
|
8585
|
+
var defaultProps$k = {
|
|
8432
8586
|
name: null,
|
|
8433
8587
|
value: null,
|
|
8434
8588
|
options: [],
|
|
@@ -8482,18 +8636,18 @@ var SelectAdvancedField = function SelectAdvancedField(_ref) {
|
|
|
8482
8636
|
theme: selectTheme
|
|
8483
8637
|
}));
|
|
8484
8638
|
};
|
|
8485
|
-
SelectAdvancedField.propTypes = propTypes$
|
|
8486
|
-
SelectAdvancedField.defaultProps = defaultProps$
|
|
8639
|
+
SelectAdvancedField.propTypes = propTypes$k;
|
|
8640
|
+
SelectAdvancedField.defaultProps = defaultProps$k;
|
|
8487
8641
|
|
|
8488
|
-
var styles$
|
|
8642
|
+
var styles$4 = {"container":"micromag-fields-shadow-angle-container","button":"micromag-fields-shadow-angle-button","type":"micromag-fields-shadow-angle-type","icon":"micromag-fields-shadow-angle-icon"};
|
|
8489
8643
|
|
|
8490
|
-
var propTypes$
|
|
8644
|
+
var propTypes$j = {
|
|
8491
8645
|
types: PropTypes.arrayOf(PropTypes.string),
|
|
8492
8646
|
value: PropTypes.string,
|
|
8493
8647
|
className: PropTypes.string,
|
|
8494
8648
|
onChange: PropTypes.func
|
|
8495
8649
|
};
|
|
8496
|
-
var defaultProps$
|
|
8650
|
+
var defaultProps$j = {
|
|
8497
8651
|
types: [45, 90, -45, -90],
|
|
8498
8652
|
value: null,
|
|
8499
8653
|
className: null,
|
|
@@ -8520,9 +8674,9 @@ var ShadowAngle = function ShadowAngle(_ref) {
|
|
|
8520
8674
|
return {
|
|
8521
8675
|
value: type,
|
|
8522
8676
|
label: /*#__PURE__*/React.createElement("div", {
|
|
8523
|
-
className: styles$
|
|
8677
|
+
className: styles$4.type
|
|
8524
8678
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8525
|
-
className: styles$
|
|
8679
|
+
className: styles$4.icon,
|
|
8526
8680
|
style: {
|
|
8527
8681
|
border: "2px solid currentColor",
|
|
8528
8682
|
position: 'relative',
|
|
@@ -8532,16 +8686,16 @@ var ShadowAngle = function ShadowAngle(_ref) {
|
|
|
8532
8686
|
};
|
|
8533
8687
|
}),
|
|
8534
8688
|
value: value || null,
|
|
8535
|
-
className: classNames([styles$
|
|
8536
|
-
buttonClassName: styles$
|
|
8689
|
+
className: classNames([styles$4.container, _defineProperty({}, className, className !== null)]),
|
|
8690
|
+
buttonClassName: styles$4.button,
|
|
8537
8691
|
onChange: onShadowAngleChange
|
|
8538
8692
|
})));
|
|
8539
8693
|
};
|
|
8540
|
-
ShadowAngle.propTypes = propTypes$
|
|
8541
|
-
ShadowAngle.defaultProps = defaultProps$
|
|
8694
|
+
ShadowAngle.propTypes = propTypes$j;
|
|
8695
|
+
ShadowAngle.defaultProps = defaultProps$j;
|
|
8542
8696
|
|
|
8543
8697
|
var _excluded$4 = ["value", "isForm", "className"];
|
|
8544
|
-
var propTypes$
|
|
8698
|
+
var propTypes$i = {
|
|
8545
8699
|
value: PropTypes.shape({
|
|
8546
8700
|
text: PropTypes.string,
|
|
8547
8701
|
image: PropTypes$1.imageMedia
|
|
@@ -8549,7 +8703,7 @@ var propTypes$j = {
|
|
|
8549
8703
|
isForm: PropTypes.bool,
|
|
8550
8704
|
className: PropTypes.string
|
|
8551
8705
|
};
|
|
8552
|
-
var defaultProps$
|
|
8706
|
+
var defaultProps$i = {
|
|
8553
8707
|
value: null,
|
|
8554
8708
|
isForm: false,
|
|
8555
8709
|
className: null
|
|
@@ -8563,7 +8717,7 @@ var SlideField = function SlideField(_ref) {
|
|
|
8563
8717
|
_ref2$text = _ref2.text,
|
|
8564
8718
|
text = _ref2$text === void 0 ? null : _ref2$text;
|
|
8565
8719
|
return isForm ? /*#__PURE__*/React.createElement("div", {
|
|
8566
|
-
className: classNames([styles$
|
|
8720
|
+
className: classNames([styles$A.panel, _defineProperty({}, className, className !== null)])
|
|
8567
8721
|
}, /*#__PURE__*/React.createElement(Fields, Object.assign({
|
|
8568
8722
|
className: classNames([{
|
|
8569
8723
|
'p-2': isForm,
|
|
@@ -8572,64 +8726,64 @@ var SlideField = function SlideField(_ref) {
|
|
|
8572
8726
|
}, props, {
|
|
8573
8727
|
value: value
|
|
8574
8728
|
}))) : /*#__PURE__*/React.createElement("div", {
|
|
8575
|
-
className: classNames([styles$
|
|
8729
|
+
className: classNames([styles$A.container, _defineProperty({}, className, className !== null)])
|
|
8576
8730
|
}, text !== null ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
8577
|
-
className: styles$
|
|
8731
|
+
className: styles$A.value
|
|
8578
8732
|
}, text)) : /*#__PURE__*/React.createElement("span", {
|
|
8579
|
-
className: styles$
|
|
8733
|
+
className: styles$A.noValue
|
|
8580
8734
|
}, "Entrez les infos..."));
|
|
8581
8735
|
};
|
|
8582
|
-
SlideField.propTypes = propTypes$
|
|
8583
|
-
SlideField.defaultProps = defaultProps$
|
|
8736
|
+
SlideField.propTypes = propTypes$i;
|
|
8737
|
+
SlideField.defaultProps = defaultProps$i;
|
|
8584
8738
|
|
|
8585
8739
|
/* eslint-disable react/no-array-index-key, react/button-has-type, react/jsx-props-no-spreading */
|
|
8586
|
-
var propTypes$
|
|
8740
|
+
var propTypes$h = {
|
|
8587
8741
|
unit: PropTypes.string,
|
|
8588
8742
|
withInput: PropTypes.bool
|
|
8589
8743
|
};
|
|
8590
|
-
var defaultProps$
|
|
8744
|
+
var defaultProps$h = {
|
|
8591
8745
|
unit: '%',
|
|
8592
8746
|
withInput: true
|
|
8593
8747
|
};
|
|
8594
8748
|
var SliderPixelField$1 = function SliderPixelField(props) {
|
|
8595
8749
|
return /*#__PURE__*/React.createElement(SliderField, props);
|
|
8596
8750
|
};
|
|
8597
|
-
SliderPixelField$1.propTypes = propTypes$
|
|
8598
|
-
SliderPixelField$1.defaultProps = defaultProps$
|
|
8751
|
+
SliderPixelField$1.propTypes = propTypes$h;
|
|
8752
|
+
SliderPixelField$1.defaultProps = defaultProps$h;
|
|
8599
8753
|
|
|
8600
8754
|
/* eslint-disable react/no-array-index-key, react/button-has-type, react/jsx-props-no-spreading */
|
|
8601
|
-
var propTypes$
|
|
8755
|
+
var propTypes$g = {
|
|
8602
8756
|
unit: PropTypes.string,
|
|
8603
8757
|
withInput: PropTypes.bool
|
|
8604
8758
|
};
|
|
8605
|
-
var defaultProps$
|
|
8759
|
+
var defaultProps$g = {
|
|
8606
8760
|
unit: 'px',
|
|
8607
8761
|
withInput: true
|
|
8608
8762
|
};
|
|
8609
8763
|
var SliderPixelField = function SliderPixelField(props) {
|
|
8610
8764
|
return /*#__PURE__*/React.createElement(SliderField, props);
|
|
8611
8765
|
};
|
|
8612
|
-
SliderPixelField.propTypes = propTypes$
|
|
8613
|
-
SliderPixelField.defaultProps = defaultProps$
|
|
8766
|
+
SliderPixelField.propTypes = propTypes$g;
|
|
8767
|
+
SliderPixelField.defaultProps = defaultProps$g;
|
|
8614
8768
|
|
|
8615
8769
|
/* eslint-disable react/no-array-index-key, react/button-has-type, react/jsx-props-no-spreading */
|
|
8616
|
-
var propTypes$
|
|
8770
|
+
var propTypes$f = {
|
|
8617
8771
|
unit: PropTypes.string,
|
|
8618
8772
|
withInput: PropTypes.bool
|
|
8619
8773
|
};
|
|
8620
|
-
var defaultProps$
|
|
8774
|
+
var defaultProps$f = {
|
|
8621
8775
|
unit: 'pt',
|
|
8622
8776
|
withInput: true
|
|
8623
8777
|
};
|
|
8624
8778
|
var SliderPointField = function SliderPointField(props) {
|
|
8625
8779
|
return /*#__PURE__*/React.createElement(SliderField, props);
|
|
8626
8780
|
};
|
|
8627
|
-
SliderPointField.propTypes = propTypes$
|
|
8628
|
-
SliderPointField.defaultProps = defaultProps$
|
|
8781
|
+
SliderPointField.propTypes = propTypes$f;
|
|
8782
|
+
SliderPointField.defaultProps = defaultProps$f;
|
|
8629
8783
|
|
|
8630
8784
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
8631
|
-
var propTypes$
|
|
8632
|
-
var defaultProps$
|
|
8785
|
+
var propTypes$e = {};
|
|
8786
|
+
var defaultProps$e = {};
|
|
8633
8787
|
var SlidesField = function SlidesField(props) {
|
|
8634
8788
|
return /*#__PURE__*/React.createElement(ItemsField, Object.assign({
|
|
8635
8789
|
noItemLabel: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -8649,17 +8803,17 @@ var SlidesField = function SlidesField(props) {
|
|
|
8649
8803
|
itemComponent: SlideField
|
|
8650
8804
|
}, props));
|
|
8651
8805
|
};
|
|
8652
|
-
SlidesField.propTypes = propTypes$
|
|
8653
|
-
SlidesField.defaultProps = defaultProps$
|
|
8806
|
+
SlidesField.propTypes = propTypes$e;
|
|
8807
|
+
SlidesField.defaultProps = defaultProps$e;
|
|
8654
8808
|
|
|
8655
|
-
var styles$
|
|
8809
|
+
var styles$3 = {"container":"micromag-fields-static-field-container","icon":"micromag-fields-static-field-icon"};
|
|
8656
8810
|
|
|
8657
|
-
var propTypes$
|
|
8811
|
+
var propTypes$d = {
|
|
8658
8812
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),
|
|
8659
8813
|
name: PropTypes.string,
|
|
8660
8814
|
className: PropTypes.string
|
|
8661
8815
|
};
|
|
8662
|
-
var defaultProps$
|
|
8816
|
+
var defaultProps$d = {
|
|
8663
8817
|
value: null,
|
|
8664
8818
|
name: null,
|
|
8665
8819
|
className: null
|
|
@@ -8669,25 +8823,25 @@ var StaticField = function StaticField(_ref) {
|
|
|
8669
8823
|
name = _ref.name,
|
|
8670
8824
|
className = _ref.className;
|
|
8671
8825
|
return /*#__PURE__*/React.createElement("div", {
|
|
8672
|
-
className: classNames([styles$
|
|
8826
|
+
className: classNames([styles$3.container, _defineProperty({}, className, className !== null)])
|
|
8673
8827
|
}, name === 'user' ? /*#__PURE__*/React.createElement("div", {
|
|
8674
|
-
className: styles$
|
|
8828
|
+
className: styles$3.icon
|
|
8675
8829
|
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
8676
|
-
className: styles$
|
|
8830
|
+
className: styles$3.field
|
|
8677
8831
|
}, value !== null ? value : null));
|
|
8678
8832
|
};
|
|
8679
|
-
StaticField.propTypes = propTypes$
|
|
8680
|
-
StaticField.defaultProps = defaultProps$
|
|
8833
|
+
StaticField.propTypes = propTypes$d;
|
|
8834
|
+
StaticField.defaultProps = defaultProps$d;
|
|
8681
8835
|
|
|
8682
8836
|
/* eslint-disable react/no-array-index-key, react/button-has-type, react/jsx-props-no-spreading */
|
|
8683
|
-
var propTypes$
|
|
8837
|
+
var propTypes$c = {
|
|
8684
8838
|
options: PropTypes.arrayOf(PropTypes.string),
|
|
8685
8839
|
isForm: PropTypes.bool,
|
|
8686
8840
|
value: PropTypes.string,
|
|
8687
8841
|
className: PropTypes.string,
|
|
8688
8842
|
onChange: PropTypes.func
|
|
8689
8843
|
};
|
|
8690
|
-
var defaultProps$
|
|
8844
|
+
var defaultProps$c = {
|
|
8691
8845
|
options: ['_blank', 'self'],
|
|
8692
8846
|
isForm: false,
|
|
8693
8847
|
value: null,
|
|
@@ -8707,8 +8861,8 @@ var TargetField = function TargetField(_ref) {
|
|
|
8707
8861
|
onChange: onChange
|
|
8708
8862
|
})) : /*#__PURE__*/React.createElement("div", null, value);
|
|
8709
8863
|
};
|
|
8710
|
-
TargetField.propTypes = propTypes$
|
|
8711
|
-
TargetField.defaultProps = defaultProps$
|
|
8864
|
+
TargetField.propTypes = propTypes$c;
|
|
8865
|
+
TargetField.defaultProps = defaultProps$c;
|
|
8712
8866
|
TargetField.withForm = true;
|
|
8713
8867
|
|
|
8714
8868
|
/**
|
|
@@ -8741,9 +8895,9 @@ var useCKEditor = function useCKEditor() {
|
|
|
8741
8895
|
return loadedPackage || {};
|
|
8742
8896
|
};
|
|
8743
8897
|
|
|
8744
|
-
var styles$
|
|
8898
|
+
var styles$2 = {"container":"micromag-fields-text-editor-container","size-sm":"micromag-fields-text-editor-size-sm","size-lg":"micromag-fields-text-editor-size-lg"};
|
|
8745
8899
|
|
|
8746
|
-
var propTypes$
|
|
8900
|
+
var propTypes$b = {
|
|
8747
8901
|
value: PropTypes.string,
|
|
8748
8902
|
size: PropTypes$1.formControlSize,
|
|
8749
8903
|
className: PropTypes.string,
|
|
@@ -8757,7 +8911,7 @@ var propTypes$c = {
|
|
|
8757
8911
|
onFocus: PropTypes.func,
|
|
8758
8912
|
disabled: PropTypes.bool
|
|
8759
8913
|
};
|
|
8760
|
-
var defaultProps$
|
|
8914
|
+
var defaultProps$b = {
|
|
8761
8915
|
value: null,
|
|
8762
8916
|
size: null,
|
|
8763
8917
|
className: null,
|
|
@@ -8871,7 +9025,7 @@ var TextEditorField = function TextEditorField(_ref) {
|
|
|
8871
9025
|
}, [onChange]);
|
|
8872
9026
|
return /*#__PURE__*/React.createElement("div", {
|
|
8873
9027
|
id: id,
|
|
8874
|
-
className: classNames([styles$
|
|
9028
|
+
className: classNames([styles$2.container, _defineProperty(_defineProperty({}, styles$2["size-".concat(size)], size !== null), className, className !== null)])
|
|
8875
9029
|
}, Editor !== null ? /*#__PURE__*/React.createElement(CKEditor, {
|
|
8876
9030
|
editor: !withFullEditor ? InlineEditor : Editor,
|
|
8877
9031
|
config: finalEditorConfig,
|
|
@@ -8888,11 +9042,11 @@ var TextEditorField = function TextEditorField(_ref) {
|
|
|
8888
9042
|
style: getStyleFromHighlight(highlightStyle)
|
|
8889
9043
|
}) : null);
|
|
8890
9044
|
};
|
|
8891
|
-
TextEditorField.propTypes = propTypes$
|
|
8892
|
-
TextEditorField.defaultProps = defaultProps$
|
|
9045
|
+
TextEditorField.propTypes = propTypes$b;
|
|
9046
|
+
TextEditorField.defaultProps = defaultProps$b;
|
|
8893
9047
|
|
|
8894
9048
|
var _excluded$3 = ["value", "onChange", "inline", "textOnly", "onFocus", "disabled"];
|
|
8895
|
-
var propTypes$
|
|
9049
|
+
var propTypes$a = {
|
|
8896
9050
|
value: PropTypes$1.textElement,
|
|
8897
9051
|
inline: PropTypes.bool,
|
|
8898
9052
|
textOnly: PropTypes.bool,
|
|
@@ -8900,7 +9054,7 @@ var propTypes$b = {
|
|
|
8900
9054
|
onFocus: PropTypes.func,
|
|
8901
9055
|
disabled: PropTypes.bool
|
|
8902
9056
|
};
|
|
8903
|
-
var defaultProps$
|
|
9057
|
+
var defaultProps$a = {
|
|
8904
9058
|
inline: false,
|
|
8905
9059
|
textOnly: false,
|
|
8906
9060
|
value: null,
|
|
@@ -8948,13 +9102,13 @@ var TextElement = function TextElement(_ref) {
|
|
|
8948
9102
|
disabled: disabled
|
|
8949
9103
|
}));
|
|
8950
9104
|
};
|
|
8951
|
-
TextElement.propTypes = propTypes$
|
|
8952
|
-
TextElement.defaultProps = defaultProps$
|
|
9105
|
+
TextElement.propTypes = propTypes$a;
|
|
9106
|
+
TextElement.defaultProps = defaultProps$a;
|
|
8953
9107
|
|
|
8954
|
-
var styles$
|
|
9108
|
+
var styles$1 = {"previewButton":"micromag-fields-text-modal-previewButton","dialog":"micromag-fields-text-modal-dialog","editor":"micromag-fields-text-modal-editor","dialogBody":"micromag-fields-text-modal-dialogBody","preview":"micromag-fields-text-modal-preview"};
|
|
8955
9109
|
|
|
8956
9110
|
var _excluded$2 = ["title", "value", "editorConfig", "inline", "withHighlightColors", "className", "onRequestClose", "onChange"];
|
|
8957
|
-
var propTypes$
|
|
9111
|
+
var propTypes$9 = {
|
|
8958
9112
|
title: PropTypes.string,
|
|
8959
9113
|
value: PropTypes.shape({
|
|
8960
9114
|
body: PropTypes.string
|
|
@@ -8966,7 +9120,7 @@ var propTypes$a = {
|
|
|
8966
9120
|
onRequestClose: PropTypes.func,
|
|
8967
9121
|
className: PropTypes.string
|
|
8968
9122
|
};
|
|
8969
|
-
var defaultProps$
|
|
9123
|
+
var defaultProps$9 = {
|
|
8970
9124
|
title: null,
|
|
8971
9125
|
value: null,
|
|
8972
9126
|
editorConfig: null,
|
|
@@ -9043,10 +9197,10 @@ var TextModal = function TextModal(_ref) {
|
|
|
9043
9197
|
}, [setModalOpen, onRequestClose]);
|
|
9044
9198
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
|
|
9045
9199
|
type: "button",
|
|
9046
|
-
className: styles$
|
|
9200
|
+
className: styles$1.previewButton,
|
|
9047
9201
|
onClick: onOpen
|
|
9048
9202
|
}, /*#__PURE__*/React.createElement(TextElement, {
|
|
9049
|
-
className: styles$
|
|
9203
|
+
className: styles$1.preview,
|
|
9050
9204
|
inline: true,
|
|
9051
9205
|
value: value,
|
|
9052
9206
|
disabled: true,
|
|
@@ -9059,13 +9213,13 @@ var TextModal = function TextModal(_ref) {
|
|
|
9059
9213
|
"value": "Edit text"
|
|
9060
9214
|
}]
|
|
9061
9215
|
}),
|
|
9062
|
-
className: classNames([styles$
|
|
9063
|
-
bodyClassName: styles$
|
|
9216
|
+
className: classNames([styles$1.dialog, _defineProperty({}, className, className)]),
|
|
9217
|
+
bodyClassName: styles$1.dialogBody,
|
|
9064
9218
|
onClose: onClose,
|
|
9065
9219
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
9066
9220
|
className: "p-2"
|
|
9067
9221
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
9068
|
-
className: styles$
|
|
9222
|
+
className: styles$1.close,
|
|
9069
9223
|
theme: "primary",
|
|
9070
9224
|
onClick: onClose
|
|
9071
9225
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -9078,18 +9232,18 @@ var TextModal = function TextModal(_ref) {
|
|
|
9078
9232
|
}, /*#__PURE__*/React.createElement(TextEditorField, Object.assign({}, props, {
|
|
9079
9233
|
value: bodyValue,
|
|
9080
9234
|
onChange: onBodyChange,
|
|
9081
|
-
className: styles$
|
|
9235
|
+
className: styles$1.editor,
|
|
9082
9236
|
inline: inline,
|
|
9083
9237
|
withHighlightColors: withHighlightColors,
|
|
9084
9238
|
withFullEditor: true,
|
|
9085
9239
|
editorConfig: finalEditorConfig
|
|
9086
9240
|
})))) : null);
|
|
9087
9241
|
};
|
|
9088
|
-
TextModal.propTypes = propTypes$
|
|
9089
|
-
TextModal.defaultProps = defaultProps$
|
|
9242
|
+
TextModal.propTypes = propTypes$9;
|
|
9243
|
+
TextModal.defaultProps = defaultProps$9;
|
|
9090
9244
|
|
|
9091
9245
|
var _excluded$1 = ["value", "fields", "sections", "onChange", "closeForm"];
|
|
9092
|
-
var propTypes$
|
|
9246
|
+
var propTypes$8 = {
|
|
9093
9247
|
value: PropTypes.shape({
|
|
9094
9248
|
color: PropTypes.string,
|
|
9095
9249
|
alpha: PropTypes.number
|
|
@@ -9104,7 +9258,7 @@ var propTypes$9 = {
|
|
|
9104
9258
|
onChange: PropTypes.func,
|
|
9105
9259
|
closeForm: PropTypes.func
|
|
9106
9260
|
};
|
|
9107
|
-
var defaultProps$
|
|
9261
|
+
var defaultProps$8 = {
|
|
9108
9262
|
value: null,
|
|
9109
9263
|
fields: [],
|
|
9110
9264
|
isForm: false,
|
|
@@ -9152,41 +9306,10 @@ var TextStyleForm = function TextStyleForm(_ref) {
|
|
|
9152
9306
|
})
|
|
9153
9307
|
}, props));
|
|
9154
9308
|
};
|
|
9155
|
-
TextStyleForm.propTypes = propTypes$
|
|
9156
|
-
TextStyleForm.defaultProps = defaultProps$
|
|
9309
|
+
TextStyleForm.propTypes = propTypes$8;
|
|
9310
|
+
TextStyleForm.defaultProps = defaultProps$8;
|
|
9157
9311
|
TextStyleForm.withForm = true;
|
|
9158
9312
|
|
|
9159
|
-
var styles$1 = {"container":"micromag-fields-toggle-container"};
|
|
9160
|
-
|
|
9161
|
-
var propTypes$8 = {
|
|
9162
|
-
value: PropTypes.bool,
|
|
9163
|
-
defaultValue: PropTypes.bool,
|
|
9164
|
-
className: PropTypes.string,
|
|
9165
|
-
onChange: PropTypes.func
|
|
9166
|
-
};
|
|
9167
|
-
var defaultProps$8 = {
|
|
9168
|
-
value: null,
|
|
9169
|
-
defaultValue: null,
|
|
9170
|
-
className: null,
|
|
9171
|
-
onChange: null
|
|
9172
|
-
};
|
|
9173
|
-
var ToggleField = function ToggleField(_ref) {
|
|
9174
|
-
var value = _ref.value,
|
|
9175
|
-
defaultValue = _ref.defaultValue,
|
|
9176
|
-
className = _ref.className,
|
|
9177
|
-
onChange = _ref.onChange;
|
|
9178
|
-
var finalValue = value === null && (defaultValue === true || defaultValue === 'true') ? true : value;
|
|
9179
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
9180
|
-
className: classNames([styles$1.container, _defineProperty({}, className, className !== null)])
|
|
9181
|
-
}, /*#__PURE__*/React.createElement(Switch, {
|
|
9182
|
-
checked: finalValue !== null ? finalValue : false,
|
|
9183
|
-
onChange: onChange
|
|
9184
|
-
}));
|
|
9185
|
-
};
|
|
9186
|
-
ToggleField.propTypes = propTypes$8;
|
|
9187
|
-
ToggleField.defaultProps = defaultProps$8;
|
|
9188
|
-
ToggleField.isHorizontal = true;
|
|
9189
|
-
|
|
9190
9313
|
var styles = {"container":"micromag-fields-tokens-container"};
|
|
9191
9314
|
|
|
9192
9315
|
var propTypes$7 = {
|
|
@@ -9541,6 +9664,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
9541
9664
|
AlignHorizontal: AlignHorizontal,
|
|
9542
9665
|
AlignVertical: AlignVertical,
|
|
9543
9666
|
Alignment: Alignment,
|
|
9667
|
+
Alternative: Alternative,
|
|
9544
9668
|
Answer: AnswerField,
|
|
9545
9669
|
Answers: AnswersField,
|
|
9546
9670
|
Audio: AudioField,
|
|
@@ -9651,4 +9775,4 @@ var FieldsProvider = function FieldsProvider(_ref) {
|
|
|
9651
9775
|
FieldsProvider.propTypes = propTypes;
|
|
9652
9776
|
FieldsProvider.defaultProps = defaultProps;
|
|
9653
9777
|
|
|
9654
|
-
export { AdFormatField as AdFormat, AlignHorizontal, AlignVertical, Alignment, AnswerField as Answer, AnswersField as Answers, AudioField as Audio, AutocompleteField as Autocomplete, Badge, BorderRadius, BorderStyle, BorderWidth, BoxStyleForm, ButtonLayout, CallToAction, CallToActionForm, CardLayout, Checkboxes, ClosedCaptionField as ClosedCaptions, ColorField as Color, ColorPickerField as ColorPicker, ContainerStyleField as ContainerStyle, Conversation, CustomAnswer, DateField as Date, DateElement, ElementField as Element, ElementList, FieldWithForm, Fields, FieldsProvider, ObjectFitSize as Fit, FontField as Font, FontFamily, FontSize, FontStyles$1 as FontStyle, FontStyleTransform, FontStyles as FontStyleWithAlign, FontWeight, FontsField as Fonts, GeoPosition, GridLayout, ImageField as Image, ImageStyleField as ImageStyle, ImagesField as Images, ImagesWithCaptionField as ImagesWithCaption, TextElement$1 as InputElement, InputGroup, ItemsField as Items, KeypadLayout, KeypadLayoutForm, MapField as Map, MarginField as Margin, MarkerField as Marker, MarkersField as Markers, MediaField as Media, MediaModal, MediaThumbnail, MessageField as Message, NumberField as Number, NumberWithIcon, PaddingField as Padding, Position, QuestionField as Question, Radios, ScreenLayoutField as ScreenLayout, SelectField as Select, SelectAdvancedField as SelectAdvanced, ShadowAngle, ShareIncentive, ShareIncentiveForm, SlideField as Slide, SliderField as Slider, SliderPixelField$1 as SliderPercentage, SliderPixelField as SliderPixel, SliderPointField as SliderPoint, SlidesField as Slides, Spacing, StaticField, TargetField as Target, TextField$1 as Text, TextEditorField as TextEditor, TextElement, TextModal, TextStyleForm, TextTransform, TextareaField as Textarea, ToggleField as Toggle, ToggleSection, Tokens, TrueFalse, UrlField as Url, VideoField as Video, VisualField as Visual, VisualsField as Visuals, VisualsWithCaptionField as VisualsWithCaption, manager as default, manager };
|
|
9778
|
+
export { AdFormatField as AdFormat, AlignHorizontal, AlignVertical, Alignment, Alternative, AnswerField as Answer, AnswersField as Answers, AudioField as Audio, AutocompleteField as Autocomplete, Badge, BorderRadius, BorderStyle, BorderWidth, BoxStyleForm, ButtonLayout, CallToAction, CallToActionForm, CardLayout, Checkboxes, ClosedCaptionField as ClosedCaptions, ColorField as Color, ColorPickerField as ColorPicker, ContainerStyleField as ContainerStyle, Conversation, CustomAnswer, DateField as Date, DateElement, ElementField as Element, ElementList, FieldWithForm, Fields, FieldsProvider, ObjectFitSize as Fit, FontField as Font, FontFamily, FontSize, FontStyles$1 as FontStyle, FontStyleTransform, FontStyles as FontStyleWithAlign, FontWeight, FontsField as Fonts, GeoPosition, GridLayout, ImageField as Image, ImageStyleField as ImageStyle, ImagesField as Images, ImagesWithCaptionField as ImagesWithCaption, TextElement$1 as InputElement, InputGroup, ItemsField as Items, KeypadLayout, KeypadLayoutForm, MapField as Map, MarginField as Margin, MarkerField as Marker, MarkersField as Markers, MediaField as Media, MediaModal, MediaThumbnail, MessageField as Message, NumberField as Number, NumberWithIcon, PaddingField as Padding, Position, QuestionField as Question, Radios, ScreenLayoutField as ScreenLayout, SelectField as Select, SelectAdvancedField as SelectAdvanced, ShadowAngle, ShareIncentive, ShareIncentiveForm, SlideField as Slide, SliderField as Slider, SliderPixelField$1 as SliderPercentage, SliderPixelField as SliderPixel, SliderPointField as SliderPoint, SlidesField as Slides, Spacing, StaticField, TargetField as Target, TextField$1 as Text, TextEditorField as TextEditor, TextElement, TextModal, TextStyleForm, TextTransform, TextareaField as Textarea, ToggleField as Toggle, ToggleSection, Tokens, TrueFalse, UrlField as Url, VideoField as Video, VisualField as Visual, VisualsField as Visuals, VisualsWithCaptionField as VisualsWithCaption, manager as default, manager };
|