@json-editor/json-editor 2.13.1 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +2 -1
- package/dist/jsoneditor.js +1 -1
- package/dist/jsoneditor.js.LICENSE.txt +1 -1
- package/dist/nonmin/jsoneditor.js +418 -220
- package/dist/nonmin/jsoneditor.js.map +1 -1
- package/docs/imask.html +1 -1
- package/docs/meta_schema.json +3 -0
- package/package.json +1 -1
- package/src/defaults.js +7 -2
- package/src/editor.js +15 -1
- package/src/editors/array/selectize.js +13 -0
- package/src/editors/array.js +16 -3
- package/src/editors/button.js +1 -0
- package/src/editors/checkbox.js +17 -1
- package/src/editors/info.js +1 -1
- package/src/editors/multiple.js +6 -1
- package/src/editors/multiselect.js +3 -2
- package/src/editors/object.js +24 -14
- package/src/editors/select.js +17 -5
- package/src/editors/starrating.js +5 -1
- package/src/editors/string.js +2 -2
- package/src/editors/table.js +3 -2
- package/src/theme.js +56 -4
- package/src/themes/barebones.js +1 -0
- package/src/themes/bootstrap3.js +49 -3
- package/src/themes/bootstrap4.js +38 -13
- package/src/themes/bootstrap5.js +37 -7
- package/src/themes/html.js +1 -0
- package/src/themes/spectre.js +15 -7
- package/src/validator.js +6 -4
- package/tests/codeceptjs/core_test.js +50 -0
- package/tests/codeceptjs/editors/array_test.js +7 -0
- package/tests/codeceptjs/editors/button_test.js +7 -1
- package/tests/codeceptjs/editors/checkbox_test.js +1 -1
- package/tests/codeceptjs/editors/integer_test.js +1 -1
- package/tests/codeceptjs/editors/multiselect_test.js +1 -1
- package/tests/codeceptjs/editors/number_test.js +1 -1
- package/tests/codeceptjs/editors/object_test.js +7 -0
- package/tests/codeceptjs/editors/radio_test.js +1 -2
- package/tests/codeceptjs/editors/rating_test.js +1 -2
- package/tests/codeceptjs/editors/select_test.js +1 -1
- package/tests/codeceptjs/editors/string_test.js +1 -1
- package/tests/codeceptjs/issues/issue-gh-1453_test.js +18 -0
- package/tests/codeceptjs/issues/issue-gh-1461_test.js +14 -0
- package/tests/codeceptjs/issues/issue-gh-1463_test.js +9 -0
- package/tests/codeceptjs/issues/issue-gh-1471_test.js +17 -0
- package/tests/codeceptjs/issues/issue-gh-812_test.js +2 -2
- package/tests/codeceptjs/meta-schema_test.js +1 -1
- package/tests/codeceptjs/schemaloader_test.js +1 -1
- package/tests/pages/advanced.html +1 -1
- package/tests/pages/anyof-2.html +1 -0
- package/tests/pages/anyof.html +4 -2
- package/tests/pages/array-anyof.html +5 -2
- package/tests/pages/array-checkboxes-infotext.html +5 -2
- package/tests/pages/array-checkboxes.html +5 -2
- package/tests/pages/array-choices.html +5 -2
- package/tests/pages/array-events-table.html +5 -2
- package/tests/pages/array-events.html +7 -3
- package/tests/pages/array-header-template.html +1 -0
- package/tests/pages/array-integers.html +5 -2
- package/tests/pages/array-multiselects.html +5 -2
- package/tests/pages/array-nested-arrays.html +5 -2
- package/tests/pages/array-numbers.html +5 -2
- package/tests/pages/array-objects.html +5 -2
- package/tests/pages/array-ratings.html +5 -2
- package/tests/pages/array-selectize-create.html +1 -0
- package/tests/pages/array-selectize.html +5 -2
- package/tests/pages/array-selects.html +5 -2
- package/tests/pages/array-strings.html +5 -2
- package/tests/pages/array-table-responsive.html +1 -0
- package/tests/pages/array-unique-items-sort.html +5 -2
- package/tests/pages/array.html +5 -2
- package/tests/pages/autocomplete.html +3 -1
- package/tests/pages/button-callbacks.html +4 -2
- package/tests/pages/button-icons.html +2 -1
- package/tests/pages/button_state_mode_1.html +1 -0
- package/tests/pages/button_state_mode_2.html +1 -0
- package/tests/pages/checkbox-labels.html +4 -2
- package/tests/pages/colorpicker-no-3rd-party.html +4 -2
- package/tests/pages/colorpicker-use-vanilla-picker.html +4 -2
- package/tests/pages/container-attributes.html +1 -0
- package/tests/pages/contains.html +1 -0
- package/tests/pages/core.html +5 -3
- package/tests/pages/datetime.html +2 -0
- package/tests/pages/dependentRequired.html +1 -0
- package/tests/pages/dependentSchemas.html +1 -0
- package/tests/pages/disable-button-in-object-editors.html +57 -0
- package/tests/pages/error-messages.html +1 -0
- package/tests/pages/form-name.html +4 -1
- package/tests/pages/grid-strict.html +3 -2
- package/tests/pages/grid.html +3 -2
- package/tests/pages/if-else.html +1 -0
- package/tests/pages/if-then-else-allOf.html +1 -0
- package/tests/pages/if-then-else-disable-fields.html +1 -0
- package/tests/pages/if-then-else.html +1 -0
- package/tests/pages/if-then.html +1 -0
- package/tests/pages/inheritance.html +6 -2
- package/tests/pages/integer.html +4 -2
- package/tests/pages/issues/_template.html +1 -1
- package/tests/pages/issues/issue-gh-1158-2.html +1 -1
- package/tests/pages/issues/issue-gh-1158.html +1 -1
- package/tests/pages/issues/issue-gh-1364.html +1 -1
- package/tests/pages/issues/issue-gh-1367.html +1 -1
- package/tests/pages/issues/issue-gh-1453.html +45 -0
- package/tests/pages/issues/issue-gh-1461.html +55 -0
- package/tests/pages/issues/issue-gh-1463.html +41 -0
- package/tests/pages/issues/issue-gh-1471.html +49 -0
- package/tests/pages/issues/issue-gh-812.html +3 -2
- package/tests/pages/issues/issue-gh-823-meta-schema.html +1 -1
- package/tests/pages/issues/issue-gh-848.html +1 -1
- package/tests/pages/keep_only_existing_values.html +1 -0
- package/tests/pages/load-events.html +1 -0
- package/tests/pages/maxContains.html +1 -0
- package/tests/pages/meta-schema.html +4 -0
- package/tests/pages/meta_schema.json +3 -0
- package/tests/pages/minContains.html +1 -0
- package/tests/pages/number.html +4 -2
- package/tests/pages/object-case-sensitive-property-search-false.html +2 -1
- package/tests/pages/object-case-sensitive-property-search-true.html +2 -1
- package/tests/pages/object-no-additional-properties.html +5 -2
- package/tests/pages/object-no-duplicated-id.html +2 -0
- package/tests/pages/object-required-properties.html +5 -3
- package/tests/pages/object-show-opt-in.html +3 -2
- package/tests/pages/object-with-dependencies-array.html +4 -2
- package/tests/pages/object-with-dependencies.html +2 -0
- package/tests/pages/object.html +5 -3
- package/tests/pages/oneof-2.html +1 -0
- package/tests/pages/oneof.html +4 -2
- package/tests/pages/option-dependencies.html +1 -0
- package/tests/pages/option-no_default_values.html +4 -2
- package/tests/pages/per-editor-options.html +1 -1
- package/tests/pages/programmatic-changes.html +4 -3
- package/tests/pages/range.html +4 -2
- package/tests/pages/read-only.html +36 -5
- package/tests/pages/ready.html +2 -1
- package/tests/pages/references.html +1 -1
- package/tests/pages/select.html +4 -3
- package/tests/pages/show-validation-errors.html +73 -0
- package/tests/pages/stepper-manual.html +4 -2
- package/tests/pages/stepper.html +4 -2
- package/tests/pages/string-ace-editor.html +4 -2
- package/tests/pages/string-cleave.html +4 -2
- package/tests/pages/string-custom-attributes.html +4 -2
- package/tests/pages/string-formats.html +4 -2
- package/tests/pages/string-formats2.html +4 -2
- package/tests/pages/string-jodit-editor.html +4 -2
- package/tests/pages/string-sceditor.html +4 -2
- package/tests/pages/string-simplemde-editor.html +4 -2
- package/tests/pages/table.html +4 -2
- package/tests/pages/tabs.html +1 -1
- package/tests/pages/themes.html +38 -52
- package/tests/pages/title-hidden.html +75 -0
- package/tests/pages/translate-property.html +2 -1
- package/tests/pages/urn.html +4 -2
- package/tests/pages/use-name-attributes.html +2 -1
- package/tests/pages/uuid.html +2 -0
- package/tests/pages/validation.html +2 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* * @name JSON Editor
|
|
4
4
|
* * @description JSON Schema Based Editor
|
|
5
5
|
* * This library is the continuation of jdorn's great work (see also https://github.com/jdorn/json-editor/issues/800)
|
|
6
|
-
* * @version "2.
|
|
6
|
+
* * @version "2.14.0"
|
|
7
7
|
* * @author Jeremy Dorn
|
|
8
8
|
* * @see https://github.com/jdorn/json-editor/
|
|
9
9
|
* * @see https://github.com/json-editor/json-editor
|
|
@@ -456,7 +456,11 @@ languages.en = {
|
|
|
456
456
|
/**
|
|
457
457
|
* Warning when deleting a node
|
|
458
458
|
*/
|
|
459
|
-
button_delete_node_warning: 'Are you sure you want to remove this item?'
|
|
459
|
+
button_delete_node_warning: 'Are you sure you want to remove this item?',
|
|
460
|
+
/**
|
|
461
|
+
* Warning when deleting a node
|
|
462
|
+
*/
|
|
463
|
+
table_controls: 'Controls'
|
|
460
464
|
};
|
|
461
465
|
|
|
462
466
|
/* Default per-editor options */
|
|
@@ -504,7 +508,8 @@ var options = {
|
|
|
504
508
|
use_default_values: true,
|
|
505
509
|
max_depth: 0,
|
|
506
510
|
button_state_mode: 1,
|
|
507
|
-
case_sensitive_property_search: true
|
|
511
|
+
case_sensitive_property_search: true,
|
|
512
|
+
show_errors: 'interaction'
|
|
508
513
|
};
|
|
509
514
|
|
|
510
515
|
/* This assignment was previously in index.js but makes more sense here */
|
|
@@ -666,6 +671,7 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
666
671
|
this.original_schema = options.schema;
|
|
667
672
|
this.schema = this.jsoneditor.expandSchema(this.original_schema);
|
|
668
673
|
this.active = true;
|
|
674
|
+
this.isUiOnly = false;
|
|
669
675
|
this.options = (0,_utilities_js__WEBPACK_IMPORTED_MODULE_32__.extend)({}, this.options || {}, this.schema.options || {}, options.schema.options || {}, options);
|
|
670
676
|
this.formname = this.jsoneditor.options.form_name_root || 'root';
|
|
671
677
|
if (!options.path && !this.schema.id) this.schema.id = this.formname;
|
|
@@ -704,6 +710,10 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
704
710
|
key: "register",
|
|
705
711
|
value: function register() {
|
|
706
712
|
this.jsoneditor.registerEditor(this);
|
|
713
|
+
if (this.input && !this.label) {
|
|
714
|
+
var ariaLabel = this.getTitle() || this.formname;
|
|
715
|
+
this.input.setAttribute('aria-label', ariaLabel);
|
|
716
|
+
}
|
|
707
717
|
this.onChange();
|
|
708
718
|
}
|
|
709
719
|
}, {
|
|
@@ -863,9 +873,12 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
863
873
|
var _this4 = this;
|
|
864
874
|
/* the active/deactive checbox control. */
|
|
865
875
|
|
|
876
|
+
this.optInLabel = this.theme.getHiddenLabel(this.formname + ' opt-in');
|
|
877
|
+
this.optInLabel.setAttribute('for', this.formname + '-opt-in');
|
|
866
878
|
this.optInCheckbox = document.createElement('input');
|
|
867
879
|
this.optInCheckbox.setAttribute('type', 'checkbox');
|
|
868
880
|
this.optInCheckbox.setAttribute('style', 'margin: 0 10px 0 0;');
|
|
881
|
+
this.optInCheckbox.setAttribute('id', this.formname + '-opt-in');
|
|
869
882
|
this.optInCheckbox.classList.add('json-editor-opt-in');
|
|
870
883
|
this.optInCheckbox.addEventListener('click', function () {
|
|
871
884
|
if (_this4.isActive()) {
|
|
@@ -883,6 +896,7 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
883
896
|
if (parentOptInEnabled || !parentOptInDisabled && globalOptIn || !parentOptInDefined && globalOptIn) {
|
|
884
897
|
/* and control to type object editors if they are not required */
|
|
885
898
|
if (this.parent && this.parent.schema.type === 'object' && !this.isRequired() && this.header) {
|
|
899
|
+
this.header.appendChild(this.optInLabel);
|
|
886
900
|
this.header.appendChild(this.optInCheckbox);
|
|
887
901
|
this.header.insertBefore(this.optInCheckbox, this.header.firstChild);
|
|
888
902
|
}
|
|
@@ -903,6 +917,10 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
903
917
|
this.setValue(this.getDefault(), true);
|
|
904
918
|
this.updateHeaderText();
|
|
905
919
|
this.onWatchedFieldChange();
|
|
920
|
+
if (this.options.titleHidden) {
|
|
921
|
+
this.theme.visuallyHidden(this.label);
|
|
922
|
+
this.theme.visuallyHidden(this.header);
|
|
923
|
+
}
|
|
906
924
|
}
|
|
907
925
|
}, {
|
|
908
926
|
key: "setupWatchListeners",
|
|
@@ -1271,7 +1289,7 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
1271
1289
|
}, {
|
|
1272
1290
|
key: "getTitle",
|
|
1273
1291
|
value: function getTitle() {
|
|
1274
|
-
return this.translateProperty(this.schema.title || this.key);
|
|
1292
|
+
return this.translateProperty(this.schema.title || this.key || this.formname);
|
|
1275
1293
|
}
|
|
1276
1294
|
}, {
|
|
1277
1295
|
key: "enable",
|
|
@@ -1831,7 +1849,7 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
1831
1849
|
key: "build",
|
|
1832
1850
|
value: function build() {
|
|
1833
1851
|
if (!this.options.compact) {
|
|
1834
|
-
this.header = document.createElement('
|
|
1852
|
+
this.header = document.createElement('span');
|
|
1835
1853
|
this.header.textContent = this.getTitle();
|
|
1836
1854
|
this.title = this.theme.getHeader(this.header, this.getPathDepth());
|
|
1837
1855
|
this.container.appendChild(this.title);
|
|
@@ -1890,6 +1908,14 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
1890
1908
|
/* Add controls */
|
|
1891
1909
|
this.addControls();
|
|
1892
1910
|
}
|
|
1911
|
+
}, {
|
|
1912
|
+
key: "postBuild",
|
|
1913
|
+
value: function postBuild() {
|
|
1914
|
+
_get(_getPrototypeOf(ArrayEditor.prototype), "postBuild", this).call(this);
|
|
1915
|
+
if (this.schema.readOnly || this.schema.readonly) {
|
|
1916
|
+
this.disable();
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1893
1919
|
}, {
|
|
1894
1920
|
key: "onChildEditorChange",
|
|
1895
1921
|
value: function onChildEditorChange(editor) {
|
|
@@ -2081,7 +2107,12 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
2081
2107
|
/* Make sure value has between minItems and maxItems items in it */
|
|
2082
2108
|
value = this.ensureArraySize(value);
|
|
2083
2109
|
var serialized = JSON.stringify(value);
|
|
2084
|
-
if (serialized === this.serialized)
|
|
2110
|
+
if (serialized === this.serialized) {
|
|
2111
|
+
if (initial) {
|
|
2112
|
+
this.refreshValue(initial);
|
|
2113
|
+
}
|
|
2114
|
+
return;
|
|
2115
|
+
}
|
|
2085
2116
|
value.forEach(function (val, i) {
|
|
2086
2117
|
if (_this5.rows[i]) {
|
|
2087
2118
|
/* TODO: don't set the row's value if it hasn't changed */
|
|
@@ -2191,7 +2222,7 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
2191
2222
|
/* Get the value for this editor */
|
|
2192
2223
|
_this6.value[i] = editor.getValue();
|
|
2193
2224
|
});
|
|
2194
|
-
if (
|
|
2225
|
+
if (this.setupButtons(minItems) && !this.collapsed) {
|
|
2195
2226
|
this.controls.style.display = 'inline-block';
|
|
2196
2227
|
} else {
|
|
2197
2228
|
this.controls.style.display = 'none';
|
|
@@ -3111,6 +3142,16 @@ var ArraySelectizeEditor = /*#__PURE__*/function (_MultiSelectEditor) {
|
|
|
3111
3142
|
/* Add new event handler. */
|
|
3112
3143
|
/* Note: Must use the "on()" method and not addEventListener() */
|
|
3113
3144
|
this.selectize_instance.on('change', this.multiselectChangeHandler);
|
|
3145
|
+
var label = this.theme.getHiddenLabel(this.formname);
|
|
3146
|
+
this.input.setAttribute('id', this.formname + '-hidden-input');
|
|
3147
|
+
label.setAttribute('for', this.formname + '-hidden-input');
|
|
3148
|
+
this.input.parentNode.insertBefore(label, this.input);
|
|
3149
|
+
var selectizeControl = this.selectize_instance.$control[0];
|
|
3150
|
+
if (selectizeControl) {
|
|
3151
|
+
var selectizeLabel = this.theme.getHiddenLabel(this.formname);
|
|
3152
|
+
selectizeLabel.setAttribute('for', this.formname + '-selectized');
|
|
3153
|
+
selectizeControl.appendChild(selectizeLabel);
|
|
3154
|
+
}
|
|
3114
3155
|
}
|
|
3115
3156
|
_get(_getPrototypeOf(ArraySelectizeEditor.prototype), "afterInputReady", this).call(this);
|
|
3116
3157
|
}
|
|
@@ -3707,6 +3748,7 @@ var ButtonEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
3707
3748
|
_classCallCheck(this, ButtonEditor);
|
|
3708
3749
|
_this = _super.call(this, options, defaults);
|
|
3709
3750
|
_this.active = false;
|
|
3751
|
+
_this.isUiOnly = true;
|
|
3710
3752
|
|
|
3711
3753
|
/* Set field to required in schema otherwise it will not be displayed */
|
|
3712
3754
|
if (_this.parent && _this.parent.schema) {
|
|
@@ -3910,6 +3952,9 @@ var CheckboxEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
3910
3952
|
var changed = this.getValue() !== value;
|
|
3911
3953
|
this.value = value;
|
|
3912
3954
|
this.input.checked = this.value;
|
|
3955
|
+
if (!initial) {
|
|
3956
|
+
this.is_dirty = true;
|
|
3957
|
+
}
|
|
3913
3958
|
this.onChange(changed);
|
|
3914
3959
|
}
|
|
3915
3960
|
}, {
|
|
@@ -3955,6 +4000,7 @@ var CheckboxEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
3955
4000
|
e.preventDefault();
|
|
3956
4001
|
e.stopPropagation();
|
|
3957
4002
|
_this.value = e.currentTarget.checked;
|
|
4003
|
+
_this.is_dirty = true;
|
|
3958
4004
|
_this.onChange(true);
|
|
3959
4005
|
});
|
|
3960
4006
|
this.container.appendChild(this.control);
|
|
@@ -3986,7 +4032,15 @@ var CheckboxEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
3986
4032
|
key: "showValidationErrors",
|
|
3987
4033
|
value: function showValidationErrors(errors) {
|
|
3988
4034
|
var _this2 = this;
|
|
3989
|
-
|
|
4035
|
+
var showErrors = this.jsoneditor.options.show_errors;
|
|
4036
|
+
var changeOrInteraction = showErrors === 'change' || showErrors === 'interaction';
|
|
4037
|
+
var never = showErrors === 'never';
|
|
4038
|
+
if (never) {
|
|
4039
|
+
return;
|
|
4040
|
+
}
|
|
4041
|
+
if (changeOrInteraction && !this.is_dirty) {
|
|
4042
|
+
return;
|
|
4043
|
+
}
|
|
3990
4044
|
var addMessage = function addMessage(messages, error) {
|
|
3991
4045
|
if (error.path === _this2.path) {
|
|
3992
4046
|
messages.push(error.message);
|
|
@@ -5652,7 +5706,7 @@ var InfoEditor = /*#__PURE__*/function (_ButtonEditor) {
|
|
|
5652
5706
|
key: "build",
|
|
5653
5707
|
value: function build() {
|
|
5654
5708
|
this.options.compact = false;
|
|
5655
|
-
this.header = this.label = this.theme.
|
|
5709
|
+
this.header = this.label = this.theme.getLabelLike(this.getTitle());
|
|
5656
5710
|
this.description = this.theme.getDescription(this.schema.description || '');
|
|
5657
5711
|
this.control = this.theme.getFormControl(this.label, this.description, null);
|
|
5658
5712
|
this.container.appendChild(this.control);
|
|
@@ -6400,10 +6454,14 @@ var MultipleEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
6400
6454
|
value: function build() {
|
|
6401
6455
|
var _this3 = this;
|
|
6402
6456
|
var container = this.container;
|
|
6403
|
-
this.header = this.label = this.theme.
|
|
6457
|
+
this.header = this.label = this.theme.getLabelLike(this.getTitle(), this.isRequired());
|
|
6404
6458
|
this.switcher = this.theme.getSwitcher(this.display_text);
|
|
6459
|
+
this.switcher.setAttribute('id', this.formname + 'switcher');
|
|
6460
|
+
this.switcherLabel = this.theme.getHiddenLabel(this.formname + ' switcher');
|
|
6461
|
+
this.switcherLabel.setAttribute('for', this.formname + 'switcher');
|
|
6405
6462
|
if (!this["if"]) {
|
|
6406
6463
|
this.container.appendChild(this.header);
|
|
6464
|
+
container.appendChild(this.switcherLabel);
|
|
6407
6465
|
container.appendChild(this.switcher);
|
|
6408
6466
|
}
|
|
6409
6467
|
this.switcher.addEventListener('change', function (e) {
|
|
@@ -6802,7 +6860,7 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
6802
6860
|
value: function build() {
|
|
6803
6861
|
var _this2 = this;
|
|
6804
6862
|
var i;
|
|
6805
|
-
if (!this.options.compact) this.header = this.label = this.theme.
|
|
6863
|
+
if (!this.options.compact) this.header = this.label = this.theme.getLabelLike(this.getTitle(), this.isRequired());
|
|
6806
6864
|
if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
|
|
6807
6865
|
if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
|
|
6808
6866
|
if (this.options.compact) this.container.classList.add('compact');
|
|
@@ -6826,6 +6884,7 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
6826
6884
|
this.control = this.theme.getMultiCheckboxHolder(this.controls, this.label, this.description, this.infoButton);
|
|
6827
6885
|
this.inputs.controlgroup = this.inputs.controls = this.control; /* Enable error messages for checkboxes */
|
|
6828
6886
|
} else {
|
|
6887
|
+
if (!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
|
|
6829
6888
|
this.input_type = 'select';
|
|
6830
6889
|
this.input = this.theme.getSelectInput(this.option_keys, true);
|
|
6831
6890
|
this.theme.setSelectOptions(this.input, this.option_keys, this.option_enum.map(function (e) {
|
|
@@ -6837,7 +6896,7 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
6837
6896
|
for (i = 0; i < this.option_keys.length; i++) {
|
|
6838
6897
|
this.select_options[this.option_keys[i]] = this.input.children[i];
|
|
6839
6898
|
}
|
|
6840
|
-
this.control = this.theme.getFormControl(this.label, this.input, this.description, this.infoButton);
|
|
6899
|
+
this.control = this.theme.getFormControl(this.label, this.input, this.description, this.infoButton, this.formname);
|
|
6841
6900
|
}
|
|
6842
6901
|
if (this.schema.readOnly || this.schema.readonly) {
|
|
6843
6902
|
this.disable(true);
|
|
@@ -7477,7 +7536,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
7477
7536
|
_get(_getPrototypeOf(ObjectEditor.prototype), "enable", this).call(this);
|
|
7478
7537
|
if (this.editors) {
|
|
7479
7538
|
Object.values(this.editors).forEach(function (e) {
|
|
7480
|
-
if (e.isActive()) {
|
|
7539
|
+
if (e.isActive() || e.isUiOnly) {
|
|
7481
7540
|
e.enable();
|
|
7482
7541
|
}
|
|
7483
7542
|
e.optInCheckbox.disabled = false;
|
|
@@ -7495,7 +7554,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
7495
7554
|
_get(_getPrototypeOf(ObjectEditor.prototype), "disable", this).call(this);
|
|
7496
7555
|
if (this.editors) {
|
|
7497
7556
|
Object.values(this.editors).forEach(function (e) {
|
|
7498
|
-
if (e.isActive()) {
|
|
7557
|
+
if (e.isActive() || e.isUiOnly) {
|
|
7499
7558
|
e.disable(alwaysDisabled);
|
|
7500
7559
|
}
|
|
7501
7560
|
e.optInCheckbox.disabled = true;
|
|
@@ -7978,7 +8037,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
7978
8037
|
} else {
|
|
7979
8038
|
this.header = '';
|
|
7980
8039
|
if (!this.options.compact) {
|
|
7981
|
-
this.header = document.createElement('
|
|
8040
|
+
this.header = document.createElement('span');
|
|
7982
8041
|
this.header.textContent = this.getTitle();
|
|
7983
8042
|
}
|
|
7984
8043
|
this.title = this.theme.getHeader(this.header, this.getPathDepth());
|
|
@@ -7991,7 +8050,11 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
7991
8050
|
|
|
7992
8051
|
/* Edit JSON modal */
|
|
7993
8052
|
this.editjson_holder = this.theme.getModal();
|
|
8053
|
+
this.editjson_textarea_label = this.theme.getHiddenLabel(this.translate('button_edit_json'));
|
|
8054
|
+
this.editjson_textarea_label.setAttribute('for', this.path + '-' + 'edit-json-textarea');
|
|
7994
8055
|
this.editjson_textarea = this.theme.getTextareaInput();
|
|
8056
|
+
this.editjson_textarea.setAttribute('id', this.path + '-' + 'edit-json-textarea');
|
|
8057
|
+
this.editjson_textarea.setAttribute('aria-labelledby', this.path + '-' + 'edit-json-textarea');
|
|
7995
8058
|
this.editjson_textarea.classList.add('je-edit-json--textarea');
|
|
7996
8059
|
this.editjson_save = this.getButton('button_save', 'save', 'button_save');
|
|
7997
8060
|
this.editjson_save.classList.add('json-editor-btntype-save');
|
|
@@ -8014,6 +8077,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8014
8077
|
e.stopPropagation();
|
|
8015
8078
|
_this7.hideEditJSON();
|
|
8016
8079
|
});
|
|
8080
|
+
this.editjson_holder.appendChild(this.editjson_textarea_label);
|
|
8017
8081
|
this.editjson_holder.appendChild(this.editjson_textarea);
|
|
8018
8082
|
this.editjson_holder.appendChild(this.editjson_save);
|
|
8019
8083
|
this.editjson_holder.appendChild(this.editjson_copy);
|
|
@@ -8027,7 +8091,11 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8027
8091
|
this.addproperty_add.classList.add('json-editor-btntype-add');
|
|
8028
8092
|
this.addproperty_input = this.theme.getFormInputField('text');
|
|
8029
8093
|
this.addproperty_input.setAttribute('placeholder', 'Property name...');
|
|
8094
|
+
this.addproperty_input_label = this.theme.getHiddenLabel(this.translate('button_properties'));
|
|
8095
|
+
this.addproperty_input_label.setAttribute('for', this.path + '-' + 'property-selector');
|
|
8030
8096
|
this.addproperty_input.classList.add('property-selector-input');
|
|
8097
|
+
this.addproperty_input.setAttribute('id', this.path + '-' + 'property-selector');
|
|
8098
|
+
this.addproperty_input.setAttribute('aria-labelledby', this.path + '-' + 'property-selector');
|
|
8031
8099
|
this.addproperty_add.addEventListener('click', function (e) {
|
|
8032
8100
|
e.preventDefault();
|
|
8033
8101
|
e.stopPropagation();
|
|
@@ -8044,7 +8112,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8044
8112
|
}
|
|
8045
8113
|
});
|
|
8046
8114
|
this.addproperty_input.addEventListener('input', function (e) {
|
|
8047
|
-
e.target.previousSibling.childNodes.forEach(function (value) {
|
|
8115
|
+
e.target.previousSibling.previousSibling.childNodes.forEach(function (value) {
|
|
8048
8116
|
var searchTerm = value.innerText;
|
|
8049
8117
|
var propertyTitle = e.target.value;
|
|
8050
8118
|
var caseSensitivePropertySearch = _this7.options.case_sensitive_property_search || _this7.jsoneditor.options.case_sensitive_property_search;
|
|
@@ -8060,6 +8128,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8060
8128
|
});
|
|
8061
8129
|
});
|
|
8062
8130
|
this.addproperty_holder.appendChild(this.addproperty_list);
|
|
8131
|
+
this.addproperty_holder.appendChild(this.addproperty_input_label);
|
|
8063
8132
|
this.addproperty_holder.appendChild(this.addproperty_input);
|
|
8064
8133
|
this.addproperty_holder.appendChild(this.addproperty_add);
|
|
8065
8134
|
var spacer = document.createElement('div');
|
|
@@ -8211,6 +8280,9 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8211
8280
|
/* Do it again now that we know the approximate heights of elements */
|
|
8212
8281
|
this.layoutEditors();
|
|
8213
8282
|
}
|
|
8283
|
+
if (this.schema.readOnly || this.schema.readonly) {
|
|
8284
|
+
this.disable();
|
|
8285
|
+
}
|
|
8214
8286
|
}
|
|
8215
8287
|
}, {
|
|
8216
8288
|
key: "deactivateNonRequiredProperties",
|
|
@@ -8265,15 +8337,9 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8265
8337
|
key: "copyJSON",
|
|
8266
8338
|
value: function copyJSON() {
|
|
8267
8339
|
if (!this.editjson_holder) return;
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
ta.style.position = 'absolute';
|
|
8272
|
-
ta.style.left = '-9999px';
|
|
8273
|
-
document.body.appendChild(ta);
|
|
8274
|
-
ta.select();
|
|
8275
|
-
document.execCommand('copy');
|
|
8276
|
-
document.body.removeChild(ta);
|
|
8340
|
+
navigator.clipboard.writeText(this.editjson_textarea.value)["catch"](function (e) {
|
|
8341
|
+
return window.alert(e);
|
|
8342
|
+
});
|
|
8277
8343
|
}
|
|
8278
8344
|
}, {
|
|
8279
8345
|
key: "saveJSON",
|
|
@@ -8327,7 +8393,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8327
8393
|
labelText = key;
|
|
8328
8394
|
}
|
|
8329
8395
|
var label = this.theme.getCheckboxLabel(labelText);
|
|
8330
|
-
var control = this.theme.getFormControl(label, checkbox);
|
|
8396
|
+
var control = this.theme.getFormControl(label, checkbox, null, null, this.path + '-' + key);
|
|
8331
8397
|
control.style.paddingBottom = control.style.marginBottom = control.style.paddingTop = control.style.marginTop = 0;
|
|
8332
8398
|
control.style.height = 'auto';
|
|
8333
8399
|
/* control.style.overflowY = 'hidden'; */
|
|
@@ -9283,9 +9349,11 @@ var SelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
9283
9349
|
sanitized = this.enum_values[0];
|
|
9284
9350
|
}
|
|
9285
9351
|
if (this.value === sanitized) return;
|
|
9286
|
-
if (initial) this.is_dirty = false;else if (this.jsoneditor.options.show_errors === 'change') this.is_dirty = true;
|
|
9287
9352
|
this.input.value = this.enum_options[this.enum_values.indexOf(sanitized)];
|
|
9288
9353
|
this.value = sanitized;
|
|
9354
|
+
if (!initial) {
|
|
9355
|
+
this.is_dirty = true;
|
|
9356
|
+
}
|
|
9289
9357
|
this.onChange();
|
|
9290
9358
|
this.change();
|
|
9291
9359
|
}
|
|
@@ -9441,7 +9509,7 @@ var SelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
9441
9509
|
e.stopPropagation();
|
|
9442
9510
|
_this2.onInputChange();
|
|
9443
9511
|
});
|
|
9444
|
-
this.control = this.theme.getFormControl(this.label, this.input, this.description, this.infoButton);
|
|
9512
|
+
this.control = this.theme.getFormControl(this.label, this.input, this.description, this.infoButton, this.formname);
|
|
9445
9513
|
this.container.appendChild(this.control);
|
|
9446
9514
|
this.value = this.enum_values[0];
|
|
9447
9515
|
|
|
@@ -9612,7 +9680,15 @@ var SelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
9612
9680
|
key: "showValidationErrors",
|
|
9613
9681
|
value: function showValidationErrors(errors) {
|
|
9614
9682
|
var _this3 = this;
|
|
9615
|
-
|
|
9683
|
+
var showErrors = this.jsoneditor.options.show_errors;
|
|
9684
|
+
var changeOrInteraction = showErrors === 'change' || showErrors === 'interaction';
|
|
9685
|
+
var never = showErrors === 'never';
|
|
9686
|
+
if (never) {
|
|
9687
|
+
return;
|
|
9688
|
+
}
|
|
9689
|
+
if (changeOrInteraction && !this.is_dirty) {
|
|
9690
|
+
return;
|
|
9691
|
+
}
|
|
9616
9692
|
var addMessage = function addMessage(messages, error) {
|
|
9617
9693
|
if (error.path === _this3.path) {
|
|
9618
9694
|
messages.push(error.message);
|
|
@@ -10605,7 +10681,7 @@ var StarratingEditor = /*#__PURE__*/function (_StringEditor) {
|
|
|
10605
10681
|
key: "build",
|
|
10606
10682
|
value: function build() {
|
|
10607
10683
|
var _this = this;
|
|
10608
|
-
if (!this.options.compact) this.header = this.label = this.theme.
|
|
10684
|
+
if (!this.options.compact) this.header = this.label = this.theme.getLabelLike(this.getTitle(), this.isRequired());
|
|
10609
10685
|
if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
|
|
10610
10686
|
if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
|
|
10611
10687
|
if (this.options.compact) this.container.classList.add('compact');
|
|
@@ -10644,6 +10720,9 @@ var StarratingEditor = /*#__PURE__*/function (_StringEditor) {
|
|
|
10644
10720
|
if (this.options.displayValue) {
|
|
10645
10721
|
radioLabel.classList.add('starrating-display-enabled');
|
|
10646
10722
|
}
|
|
10723
|
+
var radioText = this.theme.getHiddenText('label');
|
|
10724
|
+
radioText.textContent = i;
|
|
10725
|
+
radioLabel.appendChild(radioText);
|
|
10647
10726
|
this.ratingContainer.appendChild(radioInput);
|
|
10648
10727
|
this.ratingContainer.appendChild(radioLabel);
|
|
10649
10728
|
}
|
|
@@ -10989,7 +11068,6 @@ var StringEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
10989
11068
|
if (this.jsoneditor.options.use_name_attributes) {
|
|
10990
11069
|
this.input.setAttribute('name', this.formname);
|
|
10991
11070
|
}
|
|
10992
|
-
this.input.setAttribute('aria-label', this.formname);
|
|
10993
11071
|
}
|
|
10994
11072
|
}, {
|
|
10995
11073
|
key: "unregister",
|
|
@@ -11078,7 +11156,8 @@ var StringEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
11078
11156
|
if (max % this.schema.multipleOf) max = Math.floor(max / this.schema.multipleOf) * this.schema.multipleOf;
|
|
11079
11157
|
step = this.schema.multipleOf;
|
|
11080
11158
|
}
|
|
11081
|
-
this.input = this.theme.getRangeInput(min, max, step);
|
|
11159
|
+
this.input = this.theme.getRangeInput(min, max, step, this.description, this.formname);
|
|
11160
|
+
this.input.setAttribute('id', this.formname);
|
|
11082
11161
|
/* HTML5 Input type */
|
|
11083
11162
|
} else {
|
|
11084
11163
|
this.input_type = 'text';
|
|
@@ -11530,7 +11609,7 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
11530
11609
|
this.item_default = tmp.getDefault();
|
|
11531
11610
|
this.width = tmp.getNumColumns() + 2;
|
|
11532
11611
|
if (!this.options.compact) {
|
|
11533
|
-
this.header = document.createElement('
|
|
11612
|
+
this.header = document.createElement('span');
|
|
11534
11613
|
this.header.textContent = this.getTitle();
|
|
11535
11614
|
this.title = this.theme.getHeader(this.header, this.getPathDepth());
|
|
11536
11615
|
this.container.appendChild(this.title);
|
|
@@ -11574,8 +11653,9 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
11574
11653
|
this.row_holder.innerHTML = '';
|
|
11575
11654
|
|
|
11576
11655
|
/* Row Controls column */
|
|
11577
|
-
this.controls_header_cell = this.theme.getTableHeaderCell('
|
|
11656
|
+
this.controls_header_cell = this.theme.getTableHeaderCell(this.translate('table_controls'));
|
|
11578
11657
|
this.controls_header_cell.setAttribute('aria-hidden', 'true');
|
|
11658
|
+
this.controls_header_cell.style.visibility = 'hidden';
|
|
11579
11659
|
this.header_row.appendChild(this.controls_header_cell);
|
|
11580
11660
|
|
|
11581
11661
|
/* Add controls */
|
|
@@ -15288,10 +15368,18 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15288
15368
|
if (req) el.classList.add('required');
|
|
15289
15369
|
return el;
|
|
15290
15370
|
}
|
|
15371
|
+
}, {
|
|
15372
|
+
key: "getLabelLike",
|
|
15373
|
+
value: function getLabelLike(text, req) {
|
|
15374
|
+
var el = document.createElement('b');
|
|
15375
|
+
el.appendChild(document.createTextNode(text));
|
|
15376
|
+
if (req) el.classList.add('required');
|
|
15377
|
+
return el;
|
|
15378
|
+
}
|
|
15291
15379
|
}, {
|
|
15292
15380
|
key: "getHeader",
|
|
15293
15381
|
value: function getHeader(text, pathDepth) {
|
|
15294
|
-
var el = document.createElement('
|
|
15382
|
+
var el = document.createElement('span');
|
|
15295
15383
|
if (typeof text === 'string') {
|
|
15296
15384
|
el.textContent = text;
|
|
15297
15385
|
} else {
|
|
@@ -15365,7 +15453,7 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15365
15453
|
}
|
|
15366
15454
|
}, {
|
|
15367
15455
|
key: "getFormRadioControl",
|
|
15368
|
-
value: function getFormRadioControl(label, input, compact) {
|
|
15456
|
+
value: function getFormRadioControl(label, input, compact, formName) {
|
|
15369
15457
|
var el = document.createElement('div');
|
|
15370
15458
|
el.appendChild(label);
|
|
15371
15459
|
input.style.width = 'auto';
|
|
@@ -15373,6 +15461,11 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15373
15461
|
if (compact) {
|
|
15374
15462
|
el.classList.add('je-radio-control--compact');
|
|
15375
15463
|
}
|
|
15464
|
+
if (input.tagName.toLowerCase() !== 'div' && formName && label && input) {
|
|
15465
|
+
input.setAttribute('id', formName);
|
|
15466
|
+
input.setAttribute('aria-labelledby', formName);
|
|
15467
|
+
label.setAttribute('for', formName);
|
|
15468
|
+
}
|
|
15376
15469
|
return el;
|
|
15377
15470
|
}
|
|
15378
15471
|
}, {
|
|
@@ -15418,13 +15511,41 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15418
15511
|
el.classList.add('je-textarea');
|
|
15419
15512
|
return el;
|
|
15420
15513
|
}
|
|
15514
|
+
}, {
|
|
15515
|
+
key: "getHiddenLabel",
|
|
15516
|
+
value: function getHiddenLabel(text) {
|
|
15517
|
+
var el = document.createElement('label');
|
|
15518
|
+
el.textContent = text;
|
|
15519
|
+
el.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;');
|
|
15520
|
+
return el;
|
|
15521
|
+
}
|
|
15522
|
+
}, {
|
|
15523
|
+
key: "visuallyHidden",
|
|
15524
|
+
value: function visuallyHidden(element) {
|
|
15525
|
+
if (!element) {
|
|
15526
|
+
return;
|
|
15527
|
+
}
|
|
15528
|
+
element.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;');
|
|
15529
|
+
}
|
|
15530
|
+
}, {
|
|
15531
|
+
key: "getHiddenText",
|
|
15532
|
+
value: function getHiddenText(text) {
|
|
15533
|
+
var el = document.createElement('span');
|
|
15534
|
+
el.textContent = text;
|
|
15535
|
+
el.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;');
|
|
15536
|
+
return el;
|
|
15537
|
+
}
|
|
15421
15538
|
}, {
|
|
15422
15539
|
key: "getRangeInput",
|
|
15423
|
-
value: function getRangeInput(min, max, step) {
|
|
15540
|
+
value: function getRangeInput(min, max, step, description, formName) {
|
|
15424
15541
|
var el = this.getFormInputField('range');
|
|
15425
15542
|
el.setAttribute('min', min);
|
|
15426
15543
|
el.setAttribute('max', max);
|
|
15427
15544
|
el.setAttribute('step', step);
|
|
15545
|
+
if (description) {
|
|
15546
|
+
description.setAttribute('id', formName + '-description');
|
|
15547
|
+
el.setAttribute('aria-describedby', formName + '-description');
|
|
15548
|
+
}
|
|
15428
15549
|
return el;
|
|
15429
15550
|
}
|
|
15430
15551
|
}, {
|
|
@@ -15484,7 +15605,7 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15484
15605
|
}
|
|
15485
15606
|
}, {
|
|
15486
15607
|
key: "getRangeOutput",
|
|
15487
|
-
value: function getRangeOutput(input
|
|
15608
|
+
value: function getRangeOutput(input) {
|
|
15488
15609
|
var output = document.createElement('output');
|
|
15489
15610
|
var updateOutput = function updateOutput(e) {
|
|
15490
15611
|
output.value = e.currentTarget.value;
|
|
@@ -15529,6 +15650,14 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15529
15650
|
if (infoText && label) label.appendChild(infoText);
|
|
15530
15651
|
el.appendChild(input);
|
|
15531
15652
|
}
|
|
15653
|
+
if (input.tagName.toLowerCase() !== 'div' && input && label && formName) {
|
|
15654
|
+
label.setAttribute('for', formName);
|
|
15655
|
+
input.setAttribute('id', formName);
|
|
15656
|
+
}
|
|
15657
|
+
if (input.tagName.toLowerCase() !== 'div' && input && description) {
|
|
15658
|
+
description.setAttribute('id', formName + '-description');
|
|
15659
|
+
input.setAttribute('aria-describedby', formName + '-description');
|
|
15660
|
+
}
|
|
15532
15661
|
if (description) el.appendChild(description);
|
|
15533
15662
|
return el;
|
|
15534
15663
|
}
|
|
@@ -15665,7 +15794,9 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15665
15794
|
}
|
|
15666
15795
|
}, {
|
|
15667
15796
|
key: "addInputError",
|
|
15668
|
-
value: function addInputError(input, text) {
|
|
15797
|
+
value: function addInputError(input, text) {
|
|
15798
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
15799
|
+
}
|
|
15669
15800
|
}, {
|
|
15670
15801
|
key: "removeInputError",
|
|
15671
15802
|
value: function removeInputError(input) {}
|
|
@@ -16021,6 +16152,7 @@ var barebonesTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16021
16152
|
}
|
|
16022
16153
|
input.errmsg.innerHTML = '';
|
|
16023
16154
|
input.errmsg.appendChild(document.createTextNode(text));
|
|
16155
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
16024
16156
|
}
|
|
16025
16157
|
}, {
|
|
16026
16158
|
key: "removeInputError",
|
|
@@ -16191,9 +16323,9 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16191
16323
|
}
|
|
16192
16324
|
}, {
|
|
16193
16325
|
key: "getRangeInput",
|
|
16194
|
-
value: function getRangeInput(min, max, step) {
|
|
16326
|
+
value: function getRangeInput(min, max, step, description, formName) {
|
|
16195
16327
|
/* TODO: use better slider */
|
|
16196
|
-
return _get(_getPrototypeOf(bootstrap3Theme.prototype), "getRangeInput", this).call(this, min, max, step);
|
|
16328
|
+
return _get(_getPrototypeOf(bootstrap3Theme.prototype), "getRangeInput", this).call(this, min, max, step, description, formName);
|
|
16197
16329
|
}
|
|
16198
16330
|
}, {
|
|
16199
16331
|
key: "getFormInputField",
|
|
@@ -16204,9 +16336,33 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16204
16336
|
}
|
|
16205
16337
|
return el;
|
|
16206
16338
|
}
|
|
16339
|
+
}, {
|
|
16340
|
+
key: "getHiddenLabel",
|
|
16341
|
+
value: function getHiddenLabel(text) {
|
|
16342
|
+
var el = document.createElement('label');
|
|
16343
|
+
el.textContent = text;
|
|
16344
|
+
el.classList.add('sr-only');
|
|
16345
|
+
return el;
|
|
16346
|
+
}
|
|
16347
|
+
}, {
|
|
16348
|
+
key: "visuallyHidden",
|
|
16349
|
+
value: function visuallyHidden(element) {
|
|
16350
|
+
if (!element) {
|
|
16351
|
+
return;
|
|
16352
|
+
}
|
|
16353
|
+
element.classList.add('sr-only');
|
|
16354
|
+
}
|
|
16355
|
+
}, {
|
|
16356
|
+
key: "getHiddenText",
|
|
16357
|
+
value: function getHiddenText(text) {
|
|
16358
|
+
var el = document.createElement('span');
|
|
16359
|
+
el.textContent = text;
|
|
16360
|
+
el.classList.add('sr-only');
|
|
16361
|
+
return el;
|
|
16362
|
+
}
|
|
16207
16363
|
}, {
|
|
16208
16364
|
key: "getFormControl",
|
|
16209
|
-
value: function getFormControl(label, input, description, infoText) {
|
|
16365
|
+
value: function getFormControl(label, input, description, infoText, formName) {
|
|
16210
16366
|
var group = document.createElement('div');
|
|
16211
16367
|
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
16212
16368
|
group.classList.add(input.type);
|
|
@@ -16223,6 +16379,14 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16223
16379
|
group.appendChild(input);
|
|
16224
16380
|
}
|
|
16225
16381
|
if (description) group.appendChild(description);
|
|
16382
|
+
if (input.tagName.toLowerCase() !== 'div' && input && label && formName) {
|
|
16383
|
+
label.setAttribute('for', formName);
|
|
16384
|
+
input.setAttribute('id', formName);
|
|
16385
|
+
}
|
|
16386
|
+
if (input.tagName.toLowerCase() !== 'div' && input && description) {
|
|
16387
|
+
description.setAttribute('id', formName + '-description');
|
|
16388
|
+
input.setAttribute('aria-describedby', formName + '-description');
|
|
16389
|
+
}
|
|
16226
16390
|
return group;
|
|
16227
16391
|
}
|
|
16228
16392
|
}, {
|
|
@@ -16269,6 +16433,18 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16269
16433
|
if (window.DOMPurify) el.innerHTML = window.DOMPurify.sanitize(text);else el.textContent = this.cleanText(text);
|
|
16270
16434
|
return el;
|
|
16271
16435
|
}
|
|
16436
|
+
}, {
|
|
16437
|
+
key: "getHeader",
|
|
16438
|
+
value: function getHeader(text, pathDepth) {
|
|
16439
|
+
var el = document.createElement('span');
|
|
16440
|
+
el.classList.add('h3');
|
|
16441
|
+
if (typeof text === 'string') {
|
|
16442
|
+
el.textContent = text;
|
|
16443
|
+
} else {
|
|
16444
|
+
el.appendChild(text);
|
|
16445
|
+
}
|
|
16446
|
+
return el;
|
|
16447
|
+
}
|
|
16272
16448
|
}, {
|
|
16273
16449
|
key: "getHeaderButtonHolder",
|
|
16274
16450
|
value: function getHeaderButtonHolder() {
|
|
@@ -16322,6 +16498,7 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16322
16498
|
input.errmsg.style.display = '';
|
|
16323
16499
|
}
|
|
16324
16500
|
input.errmsg.textContent = text;
|
|
16501
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
16325
16502
|
}
|
|
16326
16503
|
}, {
|
|
16327
16504
|
key: "removeInputError",
|
|
@@ -16524,57 +16701,51 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16524
16701
|
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
16525
16702
|
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ "./node_modules/core-js/modules/es.number.constructor.js");
|
|
16526
16703
|
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
16527
|
-
/* harmony import */ var
|
|
16528
|
-
/* harmony import */ var
|
|
16529
|
-
/* harmony import */ var
|
|
16530
|
-
/* harmony import */ var
|
|
16531
|
-
/* harmony import */ var
|
|
16532
|
-
/* harmony import */ var
|
|
16533
|
-
/* harmony import */ var
|
|
16534
|
-
/* harmony import */ var
|
|
16535
|
-
/* harmony import */ var
|
|
16536
|
-
/* harmony import */ var
|
|
16537
|
-
/* harmony import */ var
|
|
16538
|
-
/* harmony import */ var
|
|
16539
|
-
/* harmony import */ var
|
|
16540
|
-
/* harmony import */ var
|
|
16541
|
-
/* harmony import */ var
|
|
16542
|
-
/* harmony import */ var
|
|
16543
|
-
/* harmony import */ var
|
|
16544
|
-
/* harmony import */ var
|
|
16545
|
-
/* harmony import */ var
|
|
16546
|
-
/* harmony import */ var
|
|
16547
|
-
/* harmony import */ var
|
|
16548
|
-
/* harmony import */ var
|
|
16549
|
-
/* harmony import */ var
|
|
16550
|
-
/* harmony import */ var
|
|
16551
|
-
/* harmony import */ var
|
|
16552
|
-
/* harmony import */ var
|
|
16553
|
-
/* harmony import */ var
|
|
16554
|
-
/* harmony import */ var
|
|
16555
|
-
/* harmony import */ var
|
|
16556
|
-
/* harmony import */ var
|
|
16557
|
-
/* harmony import */ var
|
|
16558
|
-
/* harmony import */ var
|
|
16559
|
-
/* harmony import */ var
|
|
16560
|
-
/* harmony import */ var
|
|
16561
|
-
/* harmony import */ var
|
|
16562
|
-
/* harmony import */ var
|
|
16563
|
-
/* harmony import */ var
|
|
16564
|
-
/* harmony import */ var
|
|
16565
|
-
/* harmony import */ var
|
|
16566
|
-
/* harmony import */ var
|
|
16567
|
-
/* harmony import */ var
|
|
16568
|
-
/* harmony import */ var
|
|
16569
|
-
/* harmony import */ var
|
|
16570
|
-
/* harmony import */ var
|
|
16571
|
-
/* harmony import */ var
|
|
16572
|
-
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_24__);
|
|
16573
|
-
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
16574
|
-
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25__);
|
|
16575
|
-
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
|
|
16576
|
-
/* harmony import */ var _bootstrap4_css_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./bootstrap4.css.js */ "./src/themes/bootstrap4.css.js");
|
|
16577
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../utilities */ "./src/utilities.js");
|
|
16704
|
+
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
|
|
16705
|
+
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
16706
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
16707
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
16708
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
|
|
16709
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
16710
|
+
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
|
|
16711
|
+
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
16712
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
16713
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
16714
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
|
|
16715
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
16716
|
+
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.function.bind.js */ "./node_modules/core-js/modules/es.function.bind.js");
|
|
16717
|
+
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
16718
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
|
|
16719
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
16720
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
|
|
16721
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
16722
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
|
|
16723
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
16724
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
16725
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
16726
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
|
|
16727
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
16728
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16729
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
16730
|
+
/* harmony import */ var core_js_modules_es_symbol_to_primitive_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ "./node_modules/core-js/modules/es.symbol.to-primitive.js");
|
|
16731
|
+
/* harmony import */ var core_js_modules_es_symbol_to_primitive_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_to_primitive_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
16732
|
+
/* harmony import */ var core_js_modules_es_date_to_primitive_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ "./node_modules/core-js/modules/es.date.to-primitive.js");
|
|
16733
|
+
/* harmony import */ var core_js_modules_es_date_to_primitive_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_primitive_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
16734
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
16735
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
16736
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
16737
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
16738
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
16739
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19__);
|
|
16740
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
16741
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20__);
|
|
16742
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
16743
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21__);
|
|
16744
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
16745
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__);
|
|
16746
|
+
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
|
|
16747
|
+
/* harmony import */ var _bootstrap4_css_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./bootstrap4.css.js */ "./src/themes/bootstrap4.css.js");
|
|
16748
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../utilities */ "./src/utilities.js");
|
|
16578
16749
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
16579
16750
|
|
|
16580
16751
|
|
|
@@ -16595,9 +16766,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
16595
16766
|
|
|
16596
16767
|
|
|
16597
16768
|
|
|
16598
|
-
|
|
16599
|
-
|
|
16600
|
-
|
|
16601
16769
|
|
|
16602
16770
|
|
|
16603
16771
|
|
|
@@ -16705,8 +16873,8 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16705
16873
|
}
|
|
16706
16874
|
}, {
|
|
16707
16875
|
key: "getRangeInput",
|
|
16708
|
-
value: function getRangeInput(min, max, step) {
|
|
16709
|
-
var el = _get(_getPrototypeOf(bootstrap4Theme.prototype), "getRangeInput", this).call(this, min, max, step);
|
|
16876
|
+
value: function getRangeInput(min, max, step, description, formName) {
|
|
16877
|
+
var el = _get(_getPrototypeOf(bootstrap4Theme.prototype), "getRangeInput", this).call(this, min, max, step, description, formName);
|
|
16710
16878
|
if (this.options.custom_forms === true) {
|
|
16711
16879
|
el.classList.remove('form-control');
|
|
16712
16880
|
el.classList.add('custom-range');
|
|
@@ -16769,7 +16937,7 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16769
16937
|
} else {
|
|
16770
16938
|
input.stepDown();
|
|
16771
16939
|
}
|
|
16772
|
-
(0,
|
|
16940
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_25__.trigger)(input, 'change');
|
|
16773
16941
|
});
|
|
16774
16942
|
plusBtn.addEventListener('click', function () {
|
|
16775
16943
|
if (!input.getAttribute('initialized')) {
|
|
@@ -16781,7 +16949,7 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16781
16949
|
} else {
|
|
16782
16950
|
input.stepUp();
|
|
16783
16951
|
}
|
|
16784
|
-
(0,
|
|
16952
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_25__.trigger)(input, 'change');
|
|
16785
16953
|
});
|
|
16786
16954
|
return inputGroup;
|
|
16787
16955
|
}
|
|
@@ -16802,9 +16970,33 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16802
16970
|
}
|
|
16803
16971
|
return el;
|
|
16804
16972
|
}
|
|
16973
|
+
}, {
|
|
16974
|
+
key: "getHiddenLabel",
|
|
16975
|
+
value: function getHiddenLabel(text) {
|
|
16976
|
+
var el = document.createElement('label');
|
|
16977
|
+
el.textContent = text;
|
|
16978
|
+
el.classList.add('sr-only');
|
|
16979
|
+
return el;
|
|
16980
|
+
}
|
|
16981
|
+
}, {
|
|
16982
|
+
key: "visuallyHidden",
|
|
16983
|
+
value: function visuallyHidden(element) {
|
|
16984
|
+
if (!element) {
|
|
16985
|
+
return;
|
|
16986
|
+
}
|
|
16987
|
+
element.classList.add('sr-only');
|
|
16988
|
+
}
|
|
16989
|
+
}, {
|
|
16990
|
+
key: "getHiddenText",
|
|
16991
|
+
value: function getHiddenText(text) {
|
|
16992
|
+
var el = document.createElement('span');
|
|
16993
|
+
el.textContent = text;
|
|
16994
|
+
el.classList.add('sr-only');
|
|
16995
|
+
return el;
|
|
16996
|
+
}
|
|
16805
16997
|
}, {
|
|
16806
16998
|
key: "getFormControl",
|
|
16807
|
-
value: function getFormControl(label, input, description, infoText) {
|
|
16999
|
+
value: function getFormControl(label, input, description, infoText, formName) {
|
|
16808
17000
|
var group = document.createElement('div');
|
|
16809
17001
|
group.classList.add('form-group');
|
|
16810
17002
|
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
@@ -16823,9 +17015,6 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16823
17015
|
check.classList.add('custom-radio');
|
|
16824
17016
|
}
|
|
16825
17017
|
}
|
|
16826
|
-
var unique = (Date.now() * Math.random()).toFixed(0);
|
|
16827
|
-
input.setAttribute('id', unique);
|
|
16828
|
-
label.setAttribute('for', unique);
|
|
16829
17018
|
check.appendChild(input);
|
|
16830
17019
|
check.appendChild(label);
|
|
16831
17020
|
if (infoText) check.appendChild(infoText);
|
|
@@ -16840,6 +17029,14 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16840
17029
|
if (description) {
|
|
16841
17030
|
group.appendChild(description);
|
|
16842
17031
|
}
|
|
17032
|
+
if (input.tagName.toLowerCase() !== 'div' && input && label && formName) {
|
|
17033
|
+
label.setAttribute('for', formName);
|
|
17034
|
+
input.setAttribute('id', formName);
|
|
17035
|
+
}
|
|
17036
|
+
if (input.tagName.toLowerCase() !== 'div' && input && description) {
|
|
17037
|
+
description.setAttribute('id', formName + '-description');
|
|
17038
|
+
input.setAttribute('aria-describedby', formName + '-description');
|
|
17039
|
+
}
|
|
16843
17040
|
return group;
|
|
16844
17041
|
}
|
|
16845
17042
|
}, {
|
|
@@ -17005,10 +17202,8 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17005
17202
|
}, {
|
|
17006
17203
|
key: "getHeader",
|
|
17007
17204
|
value: function getHeader(text, pathDepth) {
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
var el = document.createElement('h3');
|
|
17205
|
+
var el = document.createElement('span');
|
|
17206
|
+
el.classList.add('h3');
|
|
17012
17207
|
el.classList.add('card-title');
|
|
17013
17208
|
el.classList.add('level-' + pathDepth);
|
|
17014
17209
|
if (typeof text === 'string') {
|
|
@@ -17017,9 +17212,6 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17017
17212
|
el.appendChild(text);
|
|
17018
17213
|
}
|
|
17019
17214
|
el.style.display = 'inline-block';
|
|
17020
|
-
|
|
17021
|
-
/* cardHeader.appendChild(el) */
|
|
17022
|
-
|
|
17023
17215
|
return el;
|
|
17024
17216
|
}
|
|
17025
17217
|
}, {
|
|
@@ -17096,6 +17288,7 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17096
17288
|
}
|
|
17097
17289
|
input.errmsg.style.display = 'block';
|
|
17098
17290
|
input.errmsg.textContent = text;
|
|
17291
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
17099
17292
|
}
|
|
17100
17293
|
}, {
|
|
17101
17294
|
key: "removeInputError",
|
|
@@ -17289,10 +17482,10 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17289
17482
|
}
|
|
17290
17483
|
}]);
|
|
17291
17484
|
return bootstrap4Theme;
|
|
17292
|
-
}(
|
|
17485
|
+
}(_theme_js__WEBPACK_IMPORTED_MODULE_23__.AbstractTheme);
|
|
17293
17486
|
|
|
17294
17487
|
/* Custom stylesheet rules. format: "selector" : "CSS rules" */
|
|
17295
|
-
bootstrap4Theme.rules =
|
|
17488
|
+
bootstrap4Theme.rules = _bootstrap4_css_js__WEBPACK_IMPORTED_MODULE_24__["default"];
|
|
17296
17489
|
|
|
17297
17490
|
/***/ }),
|
|
17298
17491
|
|
|
@@ -17347,57 +17540,51 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17347
17540
|
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
17348
17541
|
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ "./node_modules/core-js/modules/es.number.constructor.js");
|
|
17349
17542
|
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
17350
|
-
/* harmony import */ var
|
|
17351
|
-
/* harmony import */ var
|
|
17352
|
-
/* harmony import */ var
|
|
17353
|
-
/* harmony import */ var
|
|
17354
|
-
/* harmony import */ var
|
|
17355
|
-
/* harmony import */ var
|
|
17356
|
-
/* harmony import */ var
|
|
17357
|
-
/* harmony import */ var
|
|
17358
|
-
/* harmony import */ var
|
|
17359
|
-
/* harmony import */ var
|
|
17360
|
-
/* harmony import */ var
|
|
17361
|
-
/* harmony import */ var
|
|
17362
|
-
/* harmony import */ var
|
|
17363
|
-
/* harmony import */ var
|
|
17364
|
-
/* harmony import */ var
|
|
17365
|
-
/* harmony import */ var
|
|
17366
|
-
/* harmony import */ var
|
|
17367
|
-
/* harmony import */ var
|
|
17368
|
-
/* harmony import */ var
|
|
17369
|
-
/* harmony import */ var
|
|
17370
|
-
/* harmony import */ var
|
|
17371
|
-
/* harmony import */ var
|
|
17372
|
-
/* harmony import */ var
|
|
17373
|
-
/* harmony import */ var
|
|
17374
|
-
/* harmony import */ var
|
|
17375
|
-
/* harmony import */ var
|
|
17376
|
-
/* harmony import */ var
|
|
17377
|
-
/* harmony import */ var
|
|
17378
|
-
/* harmony import */ var
|
|
17379
|
-
/* harmony import */ var
|
|
17380
|
-
/* harmony import */ var
|
|
17381
|
-
/* harmony import */ var
|
|
17382
|
-
/* harmony import */ var
|
|
17383
|
-
/* harmony import */ var
|
|
17384
|
-
/* harmony import */ var
|
|
17385
|
-
/* harmony import */ var
|
|
17386
|
-
/* harmony import */ var
|
|
17387
|
-
/* harmony import */ var
|
|
17388
|
-
/* harmony import */ var
|
|
17389
|
-
/* harmony import */ var
|
|
17390
|
-
/* harmony import */ var
|
|
17391
|
-
/* harmony import */ var
|
|
17392
|
-
/* harmony import */ var
|
|
17393
|
-
/* harmony import */ var
|
|
17394
|
-
/* harmony import */ var
|
|
17395
|
-
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_24__);
|
|
17396
|
-
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
17397
|
-
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25__);
|
|
17398
|
-
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
|
|
17399
|
-
/* harmony import */ var _bootstrap5_css_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./bootstrap5.css.js */ "./src/themes/bootstrap5.css.js");
|
|
17400
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../utilities */ "./src/utilities.js");
|
|
17543
|
+
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
|
|
17544
|
+
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
17545
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
17546
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
17547
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
|
|
17548
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
17549
|
+
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
|
|
17550
|
+
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
17551
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
17552
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
17553
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
|
|
17554
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
17555
|
+
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.function.bind.js */ "./node_modules/core-js/modules/es.function.bind.js");
|
|
17556
|
+
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
17557
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
|
|
17558
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
17559
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
|
|
17560
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
17561
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
|
|
17562
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
17563
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
17564
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
17565
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
|
|
17566
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
17567
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
17568
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
17569
|
+
/* harmony import */ var core_js_modules_es_symbol_to_primitive_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ "./node_modules/core-js/modules/es.symbol.to-primitive.js");
|
|
17570
|
+
/* harmony import */ var core_js_modules_es_symbol_to_primitive_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_to_primitive_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
17571
|
+
/* harmony import */ var core_js_modules_es_date_to_primitive_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ "./node_modules/core-js/modules/es.date.to-primitive.js");
|
|
17572
|
+
/* harmony import */ var core_js_modules_es_date_to_primitive_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_primitive_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
17573
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
17574
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
17575
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
17576
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
17577
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
17578
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19__);
|
|
17579
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
17580
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20__);
|
|
17581
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
17582
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21__);
|
|
17583
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
17584
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__);
|
|
17585
|
+
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
|
|
17586
|
+
/* harmony import */ var _bootstrap5_css_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./bootstrap5.css.js */ "./src/themes/bootstrap5.css.js");
|
|
17587
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../utilities */ "./src/utilities.js");
|
|
17401
17588
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
17402
17589
|
|
|
17403
17590
|
|
|
@@ -17418,9 +17605,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
17418
17605
|
|
|
17419
17606
|
|
|
17420
17607
|
|
|
17421
|
-
|
|
17422
|
-
|
|
17423
|
-
|
|
17424
17608
|
|
|
17425
17609
|
|
|
17426
17610
|
|
|
@@ -17521,8 +17705,8 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17521
17705
|
}
|
|
17522
17706
|
}, {
|
|
17523
17707
|
key: "getRangeInput",
|
|
17524
|
-
value: function getRangeInput(min, max, step) {
|
|
17525
|
-
var el = _get(_getPrototypeOf(bootstrap5Theme.prototype), "getRangeInput", this).call(this, min, max, step);
|
|
17708
|
+
value: function getRangeInput(min, max, step, description, formName) {
|
|
17709
|
+
var el = _get(_getPrototypeOf(bootstrap5Theme.prototype), "getRangeInput", this).call(this, min, max, step, description, formName);
|
|
17526
17710
|
el.classList.remove('form-control');
|
|
17527
17711
|
el.classList.add('form-range');
|
|
17528
17712
|
return el;
|
|
@@ -17577,7 +17761,7 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17577
17761
|
} else {
|
|
17578
17762
|
input.stepDown();
|
|
17579
17763
|
}
|
|
17580
|
-
(0,
|
|
17764
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_25__.trigger)(input, 'change');
|
|
17581
17765
|
});
|
|
17582
17766
|
plusBtn.addEventListener('click', function () {
|
|
17583
17767
|
if (!input.getAttribute('initialized')) {
|
|
@@ -17589,7 +17773,7 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17589
17773
|
} else {
|
|
17590
17774
|
input.stepUp();
|
|
17591
17775
|
}
|
|
17592
|
-
(0,
|
|
17776
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_25__.trigger)(input, 'change');
|
|
17593
17777
|
});
|
|
17594
17778
|
return inputGroup;
|
|
17595
17779
|
}
|
|
@@ -17606,7 +17790,7 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17606
17790
|
}
|
|
17607
17791
|
}, {
|
|
17608
17792
|
key: "getFormControl",
|
|
17609
|
-
value: function getFormControl(label, input, description, infoText) {
|
|
17793
|
+
value: function getFormControl(label, input, description, infoText, formName) {
|
|
17610
17794
|
var group = document.createElement('div');
|
|
17611
17795
|
group.classList.add('form-group');
|
|
17612
17796
|
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
@@ -17614,9 +17798,14 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17614
17798
|
check.classList.add('form-check');
|
|
17615
17799
|
input.classList.add('form-check-input');
|
|
17616
17800
|
label.classList.add('form-check-label');
|
|
17617
|
-
|
|
17618
|
-
|
|
17619
|
-
|
|
17801
|
+
if (input.tagName.toLowerCase() !== 'div' && input && label && formName) {
|
|
17802
|
+
label.setAttribute('for', formName);
|
|
17803
|
+
input.setAttribute('id', formName);
|
|
17804
|
+
}
|
|
17805
|
+
if (input.tagName.toLowerCase() !== 'div' && input && description) {
|
|
17806
|
+
description.setAttribute('id', formName + '-description');
|
|
17807
|
+
input.setAttribute('aria-describedby', formName + '-description');
|
|
17808
|
+
}
|
|
17620
17809
|
check.appendChild(input);
|
|
17621
17810
|
check.appendChild(label);
|
|
17622
17811
|
if (infoText) check.appendChild(infoText);
|
|
@@ -17634,6 +17823,30 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17634
17823
|
}
|
|
17635
17824
|
return group;
|
|
17636
17825
|
}
|
|
17826
|
+
}, {
|
|
17827
|
+
key: "getHiddenLabel",
|
|
17828
|
+
value: function getHiddenLabel(text) {
|
|
17829
|
+
var el = document.createElement('label');
|
|
17830
|
+
el.textContent = text;
|
|
17831
|
+
el.classList.add('visually-hidden');
|
|
17832
|
+
return el;
|
|
17833
|
+
}
|
|
17834
|
+
}, {
|
|
17835
|
+
key: "visuallyHidden",
|
|
17836
|
+
value: function visuallyHidden(element) {
|
|
17837
|
+
if (!element) {
|
|
17838
|
+
return;
|
|
17839
|
+
}
|
|
17840
|
+
element.classList.add('visually-hidden');
|
|
17841
|
+
}
|
|
17842
|
+
}, {
|
|
17843
|
+
key: "getHiddenText",
|
|
17844
|
+
value: function getHiddenText(text) {
|
|
17845
|
+
var el = document.createElement('span');
|
|
17846
|
+
el.textContent = text;
|
|
17847
|
+
el.classList.add('sr-only');
|
|
17848
|
+
return el;
|
|
17849
|
+
}
|
|
17637
17850
|
}, {
|
|
17638
17851
|
key: "getInfoButton",
|
|
17639
17852
|
value: function getInfoButton(text) {
|
|
@@ -17775,7 +17988,8 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17775
17988
|
}, {
|
|
17776
17989
|
key: "getHeader",
|
|
17777
17990
|
value: function getHeader(text, pathDepth) {
|
|
17778
|
-
var el = document.createElement('
|
|
17991
|
+
var el = document.createElement('span');
|
|
17992
|
+
el.classList.add('h3');
|
|
17779
17993
|
el.classList.add('card-title');
|
|
17780
17994
|
el.classList.add('level-' + pathDepth);
|
|
17781
17995
|
if (typeof text === 'string') {
|
|
@@ -17860,6 +18074,7 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17860
18074
|
}
|
|
17861
18075
|
input.errmsg.style.display = 'block';
|
|
17862
18076
|
input.errmsg.textContent = text;
|
|
18077
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
17863
18078
|
}
|
|
17864
18079
|
}, {
|
|
17865
18080
|
key: "removeInputError",
|
|
@@ -18050,10 +18265,10 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
18050
18265
|
}
|
|
18051
18266
|
}]);
|
|
18052
18267
|
return bootstrap5Theme;
|
|
18053
|
-
}(
|
|
18268
|
+
}(_theme_js__WEBPACK_IMPORTED_MODULE_23__.AbstractTheme);
|
|
18054
18269
|
|
|
18055
18270
|
/* Custom stylesheet rules. format: "selector" : "CSS rules" */
|
|
18056
|
-
bootstrap5Theme.rules =
|
|
18271
|
+
bootstrap5Theme.rules = _bootstrap5_css_js__WEBPACK_IMPORTED_MODULE_24__["default"];
|
|
18057
18272
|
|
|
18058
18273
|
/***/ }),
|
|
18059
18274
|
|
|
@@ -18239,6 +18454,7 @@ var htmlTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
18239
18454
|
}
|
|
18240
18455
|
input.errmsg.innerHTML = '';
|
|
18241
18456
|
input.errmsg.appendChild(document.createTextNode(text));
|
|
18457
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
18242
18458
|
}
|
|
18243
18459
|
}, {
|
|
18244
18460
|
key: "removeInputError",
|
|
@@ -18888,7 +19104,7 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
18888
19104
|
}, {
|
|
18889
19105
|
key: "getHeader",
|
|
18890
19106
|
value: function getHeader(text, pathDepth) {
|
|
18891
|
-
var el = document.createElement('
|
|
19107
|
+
var el = document.createElement('span');
|
|
18892
19108
|
if (typeof text === 'string') {
|
|
18893
19109
|
el.textContent = text;
|
|
18894
19110
|
} else {
|
|
@@ -18987,14 +19203,11 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
18987
19203
|
/* Create input field for type="range" */
|
|
18988
19204
|
}, {
|
|
18989
19205
|
key: "getRangeInput",
|
|
18990
|
-
value: function getRangeInput(min, max, step) {
|
|
18991
|
-
var el = this.
|
|
19206
|
+
value: function getRangeInput(min, max, step, description, formName) {
|
|
19207
|
+
var el = _get(_getPrototypeOf(spectreTheme.prototype), "getRangeInput", this).call(this, min, max, step, description, formName);
|
|
18992
19208
|
el.classList.add('slider');
|
|
18993
19209
|
el.classList.remove('form-input');
|
|
18994
19210
|
el.setAttribute('oninput', 'this.setAttribute("value", this.value)');
|
|
18995
|
-
el.setAttribute('min', min);
|
|
18996
|
-
el.setAttribute('max', max);
|
|
18997
|
-
el.setAttribute('step', step);
|
|
18998
19211
|
return el;
|
|
18999
19212
|
}
|
|
19000
19213
|
}, {
|
|
@@ -19024,7 +19237,7 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
19024
19237
|
}
|
|
19025
19238
|
}, {
|
|
19026
19239
|
key: "getFormControl",
|
|
19027
|
-
value: function getFormControl(label, input, description, infoText) {
|
|
19240
|
+
value: function getFormControl(label, input, description, infoText, formName) {
|
|
19028
19241
|
var group = document.createElement('div');
|
|
19029
19242
|
group.classList.add('form-group');
|
|
19030
19243
|
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
@@ -19043,6 +19256,14 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
19043
19256
|
if (this.options.input_size === 'small') input.classList.add('input-sm', 'select-sm');else if (this.options.input_size === 'large') input.classList.add('input-lg', 'select-lg');
|
|
19044
19257
|
if (input.type !== 'checkbox') group.appendChild(input);
|
|
19045
19258
|
if (description) group.appendChild(description);
|
|
19259
|
+
if (input.tagName.toLowerCase() !== 'div' && input && label && formName) {
|
|
19260
|
+
label.setAttribute('for', formName);
|
|
19261
|
+
input.setAttribute('id', formName);
|
|
19262
|
+
}
|
|
19263
|
+
if (input.tagName.toLowerCase() !== 'div' && input && description) {
|
|
19264
|
+
description.setAttribute('id', formName + '-description');
|
|
19265
|
+
input.setAttribute('aria-describedby', formName + '-description');
|
|
19266
|
+
}
|
|
19046
19267
|
return group;
|
|
19047
19268
|
}
|
|
19048
19269
|
|
|
@@ -19208,6 +19429,7 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
19208
19429
|
}
|
|
19209
19430
|
input.errmsg.classList.remove('d-hide');
|
|
19210
19431
|
input.errmsg.textContent = text;
|
|
19432
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
19211
19433
|
}
|
|
19212
19434
|
}, {
|
|
19213
19435
|
key: "removeInputError",
|
|
@@ -20123,12 +20345,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20123
20345
|
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
20124
20346
|
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
20125
20347
|
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
20126
|
-
/* harmony import */ var
|
|
20127
|
-
/* harmony import */ var
|
|
20128
|
-
/* harmony import */ var
|
|
20129
|
-
/* harmony import */ var
|
|
20130
|
-
/* harmony import */ var
|
|
20131
|
-
/* harmony import */ var
|
|
20348
|
+
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.some.js */ "./node_modules/core-js/modules/es.array.some.js");
|
|
20349
|
+
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
20350
|
+
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
|
|
20351
|
+
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
20352
|
+
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
|
|
20353
|
+
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
20132
20354
|
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
|
|
20133
20355
|
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
20134
20356
|
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
|
|
@@ -20187,11 +20409,11 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
20187
20409
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20188
20410
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20189
20411
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20412
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
20190
20413
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20191
20414
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20192
20415
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
20193
20416
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20194
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
20195
20417
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
20196
20418
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20197
20419
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -20351,7 +20573,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
20351
20573
|
return [];
|
|
20352
20574
|
},
|
|
20353
20575
|
"const": function _const(schema, value, path) {
|
|
20354
|
-
var valid = JSON.stringify(schema["const"]) === JSON.stringify(value)
|
|
20576
|
+
var valid = JSON.stringify(schema["const"]) === JSON.stringify(value);
|
|
20355
20577
|
if (!valid) {
|
|
20356
20578
|
return [{
|
|
20357
20579
|
path: path,
|
|
@@ -21175,9 +21397,9 @@ var Validator = /*#__PURE__*/function () {
|
|
|
21175
21397
|
return [];
|
|
21176
21398
|
};
|
|
21177
21399
|
var validatorRx = {
|
|
21178
|
-
date: /^(\d{4}\D\d{2}\D\d{2})
|
|
21179
|
-
time: /^(\d{2}:\d{2}(?::\d{2})?)
|
|
21180
|
-
'datetime-local': /^(\d{4}\D\d{2}\D\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)
|
|
21400
|
+
date: /^(\d{4}\D\d{2}\D\d{2})$/,
|
|
21401
|
+
time: /^(\d{2}:\d{2}(?::\d{2})?)$/,
|
|
21402
|
+
'datetime-local': /^(\d{4}\D\d{2}\D\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)$/
|
|
21181
21403
|
};
|
|
21182
21404
|
var format = {
|
|
21183
21405
|
date: '"YYYY-MM-DD"',
|
|
@@ -27269,30 +27491,6 @@ $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
|
|
27269
27491
|
});
|
|
27270
27492
|
|
|
27271
27493
|
|
|
27272
|
-
/***/ }),
|
|
27273
|
-
|
|
27274
|
-
/***/ "./node_modules/core-js/modules/es.date.now.js":
|
|
27275
|
-
/*!*****************************************************!*\
|
|
27276
|
-
!*** ./node_modules/core-js/modules/es.date.now.js ***!
|
|
27277
|
-
\*****************************************************/
|
|
27278
|
-
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
27279
|
-
|
|
27280
|
-
// TODO: Remove from `core-js@4`
|
|
27281
|
-
var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
|
|
27282
|
-
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
|
|
27283
|
-
|
|
27284
|
-
var $Date = Date;
|
|
27285
|
-
var thisTimeValue = uncurryThis($Date.prototype.getTime);
|
|
27286
|
-
|
|
27287
|
-
// `Date.now` method
|
|
27288
|
-
// https://tc39.es/ecma262/#sec-date.now
|
|
27289
|
-
$({ target: 'Date', stat: true }, {
|
|
27290
|
-
now: function now() {
|
|
27291
|
-
return thisTimeValue(new $Date());
|
|
27292
|
-
}
|
|
27293
|
-
});
|
|
27294
|
-
|
|
27295
|
-
|
|
27296
27494
|
/***/ }),
|
|
27297
27495
|
|
|
27298
27496
|
/***/ "./node_modules/core-js/modules/es.date.to-iso-string.js":
|