@json-editor/json-editor 2.13.2 → 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 +8 -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 +369 -195
- 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 +5 -1
- package/src/editor.js +14 -1
- package/src/editors/array/selectize.js +13 -0
- package/src/editors/array.js +9 -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 +20 -3
- package/src/editors/select.js +1 -1
- 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 +4 -3
- package/tests/codeceptjs/core_test.js +11 -0
- package/tests/codeceptjs/editors/array_test.js +7 -0
- package/tests/codeceptjs/editors/button_test.js +1 -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-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 +1 -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-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/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 */
|
|
@@ -706,6 +710,10 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
706
710
|
key: "register",
|
|
707
711
|
value: function register() {
|
|
708
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
|
+
}
|
|
709
717
|
this.onChange();
|
|
710
718
|
}
|
|
711
719
|
}, {
|
|
@@ -865,9 +873,12 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
865
873
|
var _this4 = this;
|
|
866
874
|
/* the active/deactive checbox control. */
|
|
867
875
|
|
|
876
|
+
this.optInLabel = this.theme.getHiddenLabel(this.formname + ' opt-in');
|
|
877
|
+
this.optInLabel.setAttribute('for', this.formname + '-opt-in');
|
|
868
878
|
this.optInCheckbox = document.createElement('input');
|
|
869
879
|
this.optInCheckbox.setAttribute('type', 'checkbox');
|
|
870
880
|
this.optInCheckbox.setAttribute('style', 'margin: 0 10px 0 0;');
|
|
881
|
+
this.optInCheckbox.setAttribute('id', this.formname + '-opt-in');
|
|
871
882
|
this.optInCheckbox.classList.add('json-editor-opt-in');
|
|
872
883
|
this.optInCheckbox.addEventListener('click', function () {
|
|
873
884
|
if (_this4.isActive()) {
|
|
@@ -885,6 +896,7 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
885
896
|
if (parentOptInEnabled || !parentOptInDisabled && globalOptIn || !parentOptInDefined && globalOptIn) {
|
|
886
897
|
/* and control to type object editors if they are not required */
|
|
887
898
|
if (this.parent && this.parent.schema.type === 'object' && !this.isRequired() && this.header) {
|
|
899
|
+
this.header.appendChild(this.optInLabel);
|
|
888
900
|
this.header.appendChild(this.optInCheckbox);
|
|
889
901
|
this.header.insertBefore(this.optInCheckbox, this.header.firstChild);
|
|
890
902
|
}
|
|
@@ -905,6 +917,10 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
905
917
|
this.setValue(this.getDefault(), true);
|
|
906
918
|
this.updateHeaderText();
|
|
907
919
|
this.onWatchedFieldChange();
|
|
920
|
+
if (this.options.titleHidden) {
|
|
921
|
+
this.theme.visuallyHidden(this.label);
|
|
922
|
+
this.theme.visuallyHidden(this.header);
|
|
923
|
+
}
|
|
908
924
|
}
|
|
909
925
|
}, {
|
|
910
926
|
key: "setupWatchListeners",
|
|
@@ -1273,7 +1289,7 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
1273
1289
|
}, {
|
|
1274
1290
|
key: "getTitle",
|
|
1275
1291
|
value: function getTitle() {
|
|
1276
|
-
return this.translateProperty(this.schema.title || this.key);
|
|
1292
|
+
return this.translateProperty(this.schema.title || this.key || this.formname);
|
|
1277
1293
|
}
|
|
1278
1294
|
}, {
|
|
1279
1295
|
key: "enable",
|
|
@@ -1833,7 +1849,7 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
1833
1849
|
key: "build",
|
|
1834
1850
|
value: function build() {
|
|
1835
1851
|
if (!this.options.compact) {
|
|
1836
|
-
this.header = document.createElement('
|
|
1852
|
+
this.header = document.createElement('span');
|
|
1837
1853
|
this.header.textContent = this.getTitle();
|
|
1838
1854
|
this.title = this.theme.getHeader(this.header, this.getPathDepth());
|
|
1839
1855
|
this.container.appendChild(this.title);
|
|
@@ -1892,6 +1908,14 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
1892
1908
|
/* Add controls */
|
|
1893
1909
|
this.addControls();
|
|
1894
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
|
+
}
|
|
1895
1919
|
}, {
|
|
1896
1920
|
key: "onChildEditorChange",
|
|
1897
1921
|
value: function onChildEditorChange(editor) {
|
|
@@ -3118,6 +3142,16 @@ var ArraySelectizeEditor = /*#__PURE__*/function (_MultiSelectEditor) {
|
|
|
3118
3142
|
/* Add new event handler. */
|
|
3119
3143
|
/* Note: Must use the "on()" method and not addEventListener() */
|
|
3120
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
|
+
}
|
|
3121
3155
|
}
|
|
3122
3156
|
_get(_getPrototypeOf(ArraySelectizeEditor.prototype), "afterInputReady", this).call(this);
|
|
3123
3157
|
}
|
|
@@ -5672,7 +5706,7 @@ var InfoEditor = /*#__PURE__*/function (_ButtonEditor) {
|
|
|
5672
5706
|
key: "build",
|
|
5673
5707
|
value: function build() {
|
|
5674
5708
|
this.options.compact = false;
|
|
5675
|
-
this.header = this.label = this.theme.
|
|
5709
|
+
this.header = this.label = this.theme.getLabelLike(this.getTitle());
|
|
5676
5710
|
this.description = this.theme.getDescription(this.schema.description || '');
|
|
5677
5711
|
this.control = this.theme.getFormControl(this.label, this.description, null);
|
|
5678
5712
|
this.container.appendChild(this.control);
|
|
@@ -6420,10 +6454,14 @@ var MultipleEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
6420
6454
|
value: function build() {
|
|
6421
6455
|
var _this3 = this;
|
|
6422
6456
|
var container = this.container;
|
|
6423
|
-
this.header = this.label = this.theme.
|
|
6457
|
+
this.header = this.label = this.theme.getLabelLike(this.getTitle(), this.isRequired());
|
|
6424
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');
|
|
6425
6462
|
if (!this["if"]) {
|
|
6426
6463
|
this.container.appendChild(this.header);
|
|
6464
|
+
container.appendChild(this.switcherLabel);
|
|
6427
6465
|
container.appendChild(this.switcher);
|
|
6428
6466
|
}
|
|
6429
6467
|
this.switcher.addEventListener('change', function (e) {
|
|
@@ -6822,7 +6860,7 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
6822
6860
|
value: function build() {
|
|
6823
6861
|
var _this2 = this;
|
|
6824
6862
|
var i;
|
|
6825
|
-
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());
|
|
6826
6864
|
if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
|
|
6827
6865
|
if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
|
|
6828
6866
|
if (this.options.compact) this.container.classList.add('compact');
|
|
@@ -6846,6 +6884,7 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
6846
6884
|
this.control = this.theme.getMultiCheckboxHolder(this.controls, this.label, this.description, this.infoButton);
|
|
6847
6885
|
this.inputs.controlgroup = this.inputs.controls = this.control; /* Enable error messages for checkboxes */
|
|
6848
6886
|
} else {
|
|
6887
|
+
if (!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
|
|
6849
6888
|
this.input_type = 'select';
|
|
6850
6889
|
this.input = this.theme.getSelectInput(this.option_keys, true);
|
|
6851
6890
|
this.theme.setSelectOptions(this.input, this.option_keys, this.option_enum.map(function (e) {
|
|
@@ -6857,7 +6896,7 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
6857
6896
|
for (i = 0; i < this.option_keys.length; i++) {
|
|
6858
6897
|
this.select_options[this.option_keys[i]] = this.input.children[i];
|
|
6859
6898
|
}
|
|
6860
|
-
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);
|
|
6861
6900
|
}
|
|
6862
6901
|
if (this.schema.readOnly || this.schema.readonly) {
|
|
6863
6902
|
this.disable(true);
|
|
@@ -7998,7 +8037,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
7998
8037
|
} else {
|
|
7999
8038
|
this.header = '';
|
|
8000
8039
|
if (!this.options.compact) {
|
|
8001
|
-
this.header = document.createElement('
|
|
8040
|
+
this.header = document.createElement('span');
|
|
8002
8041
|
this.header.textContent = this.getTitle();
|
|
8003
8042
|
}
|
|
8004
8043
|
this.title = this.theme.getHeader(this.header, this.getPathDepth());
|
|
@@ -8011,7 +8050,11 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8011
8050
|
|
|
8012
8051
|
/* Edit JSON modal */
|
|
8013
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');
|
|
8014
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');
|
|
8015
8058
|
this.editjson_textarea.classList.add('je-edit-json--textarea');
|
|
8016
8059
|
this.editjson_save = this.getButton('button_save', 'save', 'button_save');
|
|
8017
8060
|
this.editjson_save.classList.add('json-editor-btntype-save');
|
|
@@ -8034,6 +8077,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8034
8077
|
e.stopPropagation();
|
|
8035
8078
|
_this7.hideEditJSON();
|
|
8036
8079
|
});
|
|
8080
|
+
this.editjson_holder.appendChild(this.editjson_textarea_label);
|
|
8037
8081
|
this.editjson_holder.appendChild(this.editjson_textarea);
|
|
8038
8082
|
this.editjson_holder.appendChild(this.editjson_save);
|
|
8039
8083
|
this.editjson_holder.appendChild(this.editjson_copy);
|
|
@@ -8047,7 +8091,11 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8047
8091
|
this.addproperty_add.classList.add('json-editor-btntype-add');
|
|
8048
8092
|
this.addproperty_input = this.theme.getFormInputField('text');
|
|
8049
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');
|
|
8050
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');
|
|
8051
8099
|
this.addproperty_add.addEventListener('click', function (e) {
|
|
8052
8100
|
e.preventDefault();
|
|
8053
8101
|
e.stopPropagation();
|
|
@@ -8064,7 +8112,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8064
8112
|
}
|
|
8065
8113
|
});
|
|
8066
8114
|
this.addproperty_input.addEventListener('input', function (e) {
|
|
8067
|
-
e.target.previousSibling.childNodes.forEach(function (value) {
|
|
8115
|
+
e.target.previousSibling.previousSibling.childNodes.forEach(function (value) {
|
|
8068
8116
|
var searchTerm = value.innerText;
|
|
8069
8117
|
var propertyTitle = e.target.value;
|
|
8070
8118
|
var caseSensitivePropertySearch = _this7.options.case_sensitive_property_search || _this7.jsoneditor.options.case_sensitive_property_search;
|
|
@@ -8080,6 +8128,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8080
8128
|
});
|
|
8081
8129
|
});
|
|
8082
8130
|
this.addproperty_holder.appendChild(this.addproperty_list);
|
|
8131
|
+
this.addproperty_holder.appendChild(this.addproperty_input_label);
|
|
8083
8132
|
this.addproperty_holder.appendChild(this.addproperty_input);
|
|
8084
8133
|
this.addproperty_holder.appendChild(this.addproperty_add);
|
|
8085
8134
|
var spacer = document.createElement('div');
|
|
@@ -8231,6 +8280,9 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8231
8280
|
/* Do it again now that we know the approximate heights of elements */
|
|
8232
8281
|
this.layoutEditors();
|
|
8233
8282
|
}
|
|
8283
|
+
if (this.schema.readOnly || this.schema.readonly) {
|
|
8284
|
+
this.disable();
|
|
8285
|
+
}
|
|
8234
8286
|
}
|
|
8235
8287
|
}, {
|
|
8236
8288
|
key: "deactivateNonRequiredProperties",
|
|
@@ -8341,7 +8393,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8341
8393
|
labelText = key;
|
|
8342
8394
|
}
|
|
8343
8395
|
var label = this.theme.getCheckboxLabel(labelText);
|
|
8344
|
-
var control = this.theme.getFormControl(label, checkbox);
|
|
8396
|
+
var control = this.theme.getFormControl(label, checkbox, null, null, this.path + '-' + key);
|
|
8345
8397
|
control.style.paddingBottom = control.style.marginBottom = control.style.paddingTop = control.style.marginTop = 0;
|
|
8346
8398
|
control.style.height = 'auto';
|
|
8347
8399
|
/* control.style.overflowY = 'hidden'; */
|
|
@@ -9457,7 +9509,7 @@ var SelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
9457
9509
|
e.stopPropagation();
|
|
9458
9510
|
_this2.onInputChange();
|
|
9459
9511
|
});
|
|
9460
|
-
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);
|
|
9461
9513
|
this.container.appendChild(this.control);
|
|
9462
9514
|
this.value = this.enum_values[0];
|
|
9463
9515
|
|
|
@@ -10629,7 +10681,7 @@ var StarratingEditor = /*#__PURE__*/function (_StringEditor) {
|
|
|
10629
10681
|
key: "build",
|
|
10630
10682
|
value: function build() {
|
|
10631
10683
|
var _this = this;
|
|
10632
|
-
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());
|
|
10633
10685
|
if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
|
|
10634
10686
|
if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
|
|
10635
10687
|
if (this.options.compact) this.container.classList.add('compact');
|
|
@@ -10668,6 +10720,9 @@ var StarratingEditor = /*#__PURE__*/function (_StringEditor) {
|
|
|
10668
10720
|
if (this.options.displayValue) {
|
|
10669
10721
|
radioLabel.classList.add('starrating-display-enabled');
|
|
10670
10722
|
}
|
|
10723
|
+
var radioText = this.theme.getHiddenText('label');
|
|
10724
|
+
radioText.textContent = i;
|
|
10725
|
+
radioLabel.appendChild(radioText);
|
|
10671
10726
|
this.ratingContainer.appendChild(radioInput);
|
|
10672
10727
|
this.ratingContainer.appendChild(radioLabel);
|
|
10673
10728
|
}
|
|
@@ -11013,7 +11068,6 @@ var StringEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
11013
11068
|
if (this.jsoneditor.options.use_name_attributes) {
|
|
11014
11069
|
this.input.setAttribute('name', this.formname);
|
|
11015
11070
|
}
|
|
11016
|
-
this.input.setAttribute('aria-label', this.formname);
|
|
11017
11071
|
}
|
|
11018
11072
|
}, {
|
|
11019
11073
|
key: "unregister",
|
|
@@ -11102,7 +11156,8 @@ var StringEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
11102
11156
|
if (max % this.schema.multipleOf) max = Math.floor(max / this.schema.multipleOf) * this.schema.multipleOf;
|
|
11103
11157
|
step = this.schema.multipleOf;
|
|
11104
11158
|
}
|
|
11105
|
-
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);
|
|
11106
11161
|
/* HTML5 Input type */
|
|
11107
11162
|
} else {
|
|
11108
11163
|
this.input_type = 'text';
|
|
@@ -11554,7 +11609,7 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
11554
11609
|
this.item_default = tmp.getDefault();
|
|
11555
11610
|
this.width = tmp.getNumColumns() + 2;
|
|
11556
11611
|
if (!this.options.compact) {
|
|
11557
|
-
this.header = document.createElement('
|
|
11612
|
+
this.header = document.createElement('span');
|
|
11558
11613
|
this.header.textContent = this.getTitle();
|
|
11559
11614
|
this.title = this.theme.getHeader(this.header, this.getPathDepth());
|
|
11560
11615
|
this.container.appendChild(this.title);
|
|
@@ -11598,8 +11653,9 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
11598
11653
|
this.row_holder.innerHTML = '';
|
|
11599
11654
|
|
|
11600
11655
|
/* Row Controls column */
|
|
11601
|
-
this.controls_header_cell = this.theme.getTableHeaderCell('
|
|
11656
|
+
this.controls_header_cell = this.theme.getTableHeaderCell(this.translate('table_controls'));
|
|
11602
11657
|
this.controls_header_cell.setAttribute('aria-hidden', 'true');
|
|
11658
|
+
this.controls_header_cell.style.visibility = 'hidden';
|
|
11603
11659
|
this.header_row.appendChild(this.controls_header_cell);
|
|
11604
11660
|
|
|
11605
11661
|
/* Add controls */
|
|
@@ -15312,10 +15368,18 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15312
15368
|
if (req) el.classList.add('required');
|
|
15313
15369
|
return el;
|
|
15314
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
|
+
}
|
|
15315
15379
|
}, {
|
|
15316
15380
|
key: "getHeader",
|
|
15317
15381
|
value: function getHeader(text, pathDepth) {
|
|
15318
|
-
var el = document.createElement('
|
|
15382
|
+
var el = document.createElement('span');
|
|
15319
15383
|
if (typeof text === 'string') {
|
|
15320
15384
|
el.textContent = text;
|
|
15321
15385
|
} else {
|
|
@@ -15389,7 +15453,7 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15389
15453
|
}
|
|
15390
15454
|
}, {
|
|
15391
15455
|
key: "getFormRadioControl",
|
|
15392
|
-
value: function getFormRadioControl(label, input, compact) {
|
|
15456
|
+
value: function getFormRadioControl(label, input, compact, formName) {
|
|
15393
15457
|
var el = document.createElement('div');
|
|
15394
15458
|
el.appendChild(label);
|
|
15395
15459
|
input.style.width = 'auto';
|
|
@@ -15397,6 +15461,11 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15397
15461
|
if (compact) {
|
|
15398
15462
|
el.classList.add('je-radio-control--compact');
|
|
15399
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
|
+
}
|
|
15400
15469
|
return el;
|
|
15401
15470
|
}
|
|
15402
15471
|
}, {
|
|
@@ -15442,13 +15511,41 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15442
15511
|
el.classList.add('je-textarea');
|
|
15443
15512
|
return el;
|
|
15444
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
|
+
}
|
|
15445
15538
|
}, {
|
|
15446
15539
|
key: "getRangeInput",
|
|
15447
|
-
value: function getRangeInput(min, max, step) {
|
|
15540
|
+
value: function getRangeInput(min, max, step, description, formName) {
|
|
15448
15541
|
var el = this.getFormInputField('range');
|
|
15449
15542
|
el.setAttribute('min', min);
|
|
15450
15543
|
el.setAttribute('max', max);
|
|
15451
15544
|
el.setAttribute('step', step);
|
|
15545
|
+
if (description) {
|
|
15546
|
+
description.setAttribute('id', formName + '-description');
|
|
15547
|
+
el.setAttribute('aria-describedby', formName + '-description');
|
|
15548
|
+
}
|
|
15452
15549
|
return el;
|
|
15453
15550
|
}
|
|
15454
15551
|
}, {
|
|
@@ -15508,7 +15605,7 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15508
15605
|
}
|
|
15509
15606
|
}, {
|
|
15510
15607
|
key: "getRangeOutput",
|
|
15511
|
-
value: function getRangeOutput(input
|
|
15608
|
+
value: function getRangeOutput(input) {
|
|
15512
15609
|
var output = document.createElement('output');
|
|
15513
15610
|
var updateOutput = function updateOutput(e) {
|
|
15514
15611
|
output.value = e.currentTarget.value;
|
|
@@ -15553,6 +15650,14 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15553
15650
|
if (infoText && label) label.appendChild(infoText);
|
|
15554
15651
|
el.appendChild(input);
|
|
15555
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
|
+
}
|
|
15556
15661
|
if (description) el.appendChild(description);
|
|
15557
15662
|
return el;
|
|
15558
15663
|
}
|
|
@@ -15689,7 +15794,9 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
15689
15794
|
}
|
|
15690
15795
|
}, {
|
|
15691
15796
|
key: "addInputError",
|
|
15692
|
-
value: function addInputError(input, text) {
|
|
15797
|
+
value: function addInputError(input, text) {
|
|
15798
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
15799
|
+
}
|
|
15693
15800
|
}, {
|
|
15694
15801
|
key: "removeInputError",
|
|
15695
15802
|
value: function removeInputError(input) {}
|
|
@@ -16045,6 +16152,7 @@ var barebonesTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16045
16152
|
}
|
|
16046
16153
|
input.errmsg.innerHTML = '';
|
|
16047
16154
|
input.errmsg.appendChild(document.createTextNode(text));
|
|
16155
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
16048
16156
|
}
|
|
16049
16157
|
}, {
|
|
16050
16158
|
key: "removeInputError",
|
|
@@ -16215,9 +16323,9 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16215
16323
|
}
|
|
16216
16324
|
}, {
|
|
16217
16325
|
key: "getRangeInput",
|
|
16218
|
-
value: function getRangeInput(min, max, step) {
|
|
16326
|
+
value: function getRangeInput(min, max, step, description, formName) {
|
|
16219
16327
|
/* TODO: use better slider */
|
|
16220
|
-
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);
|
|
16221
16329
|
}
|
|
16222
16330
|
}, {
|
|
16223
16331
|
key: "getFormInputField",
|
|
@@ -16228,9 +16336,33 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16228
16336
|
}
|
|
16229
16337
|
return el;
|
|
16230
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
|
+
}
|
|
16231
16363
|
}, {
|
|
16232
16364
|
key: "getFormControl",
|
|
16233
|
-
value: function getFormControl(label, input, description, infoText) {
|
|
16365
|
+
value: function getFormControl(label, input, description, infoText, formName) {
|
|
16234
16366
|
var group = document.createElement('div');
|
|
16235
16367
|
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
16236
16368
|
group.classList.add(input.type);
|
|
@@ -16247,6 +16379,14 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16247
16379
|
group.appendChild(input);
|
|
16248
16380
|
}
|
|
16249
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
|
+
}
|
|
16250
16390
|
return group;
|
|
16251
16391
|
}
|
|
16252
16392
|
}, {
|
|
@@ -16293,6 +16433,18 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16293
16433
|
if (window.DOMPurify) el.innerHTML = window.DOMPurify.sanitize(text);else el.textContent = this.cleanText(text);
|
|
16294
16434
|
return el;
|
|
16295
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
|
+
}
|
|
16296
16448
|
}, {
|
|
16297
16449
|
key: "getHeaderButtonHolder",
|
|
16298
16450
|
value: function getHeaderButtonHolder() {
|
|
@@ -16346,6 +16498,7 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16346
16498
|
input.errmsg.style.display = '';
|
|
16347
16499
|
}
|
|
16348
16500
|
input.errmsg.textContent = text;
|
|
16501
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
16349
16502
|
}
|
|
16350
16503
|
}, {
|
|
16351
16504
|
key: "removeInputError",
|
|
@@ -16548,57 +16701,51 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16548
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__);
|
|
16549
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");
|
|
16550
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__);
|
|
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
|
|
16573
|
-
/* harmony import */ var
|
|
16574
|
-
/* harmony import */ var
|
|
16575
|
-
/* harmony import */ var
|
|
16576
|
-
/* harmony import */ var
|
|
16577
|
-
/* harmony import */ var
|
|
16578
|
-
/* harmony import */ var
|
|
16579
|
-
/* harmony import */ var
|
|
16580
|
-
/* harmony import */ var
|
|
16581
|
-
/* harmony import */ var
|
|
16582
|
-
/* harmony import */ var
|
|
16583
|
-
/* harmony import */ var
|
|
16584
|
-
/* harmony import */ var
|
|
16585
|
-
/* harmony import */ var
|
|
16586
|
-
/* harmony import */ var
|
|
16587
|
-
/* harmony import */ var
|
|
16588
|
-
/* harmony import */ var
|
|
16589
|
-
/* harmony import */ var
|
|
16590
|
-
/* harmony import */ var
|
|
16591
|
-
/* harmony import */ var
|
|
16592
|
-
/* harmony import */ var
|
|
16593
|
-
/* harmony import */ var
|
|
16594
|
-
/* harmony import */ var
|
|
16595
|
-
/* harmony import */ var
|
|
16596
|
-
/* 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__);
|
|
16597
|
-
/* 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");
|
|
16598
|
-
/* 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__);
|
|
16599
|
-
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
|
|
16600
|
-
/* harmony import */ var _bootstrap4_css_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./bootstrap4.css.js */ "./src/themes/bootstrap4.css.js");
|
|
16601
|
-
/* 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");
|
|
16602
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); }
|
|
16603
16750
|
|
|
16604
16751
|
|
|
@@ -16619,9 +16766,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
16619
16766
|
|
|
16620
16767
|
|
|
16621
16768
|
|
|
16622
|
-
|
|
16623
|
-
|
|
16624
|
-
|
|
16625
16769
|
|
|
16626
16770
|
|
|
16627
16771
|
|
|
@@ -16729,8 +16873,8 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16729
16873
|
}
|
|
16730
16874
|
}, {
|
|
16731
16875
|
key: "getRangeInput",
|
|
16732
|
-
value: function getRangeInput(min, max, step) {
|
|
16733
|
-
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);
|
|
16734
16878
|
if (this.options.custom_forms === true) {
|
|
16735
16879
|
el.classList.remove('form-control');
|
|
16736
16880
|
el.classList.add('custom-range');
|
|
@@ -16793,7 +16937,7 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16793
16937
|
} else {
|
|
16794
16938
|
input.stepDown();
|
|
16795
16939
|
}
|
|
16796
|
-
(0,
|
|
16940
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_25__.trigger)(input, 'change');
|
|
16797
16941
|
});
|
|
16798
16942
|
plusBtn.addEventListener('click', function () {
|
|
16799
16943
|
if (!input.getAttribute('initialized')) {
|
|
@@ -16805,7 +16949,7 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16805
16949
|
} else {
|
|
16806
16950
|
input.stepUp();
|
|
16807
16951
|
}
|
|
16808
|
-
(0,
|
|
16952
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_25__.trigger)(input, 'change');
|
|
16809
16953
|
});
|
|
16810
16954
|
return inputGroup;
|
|
16811
16955
|
}
|
|
@@ -16826,9 +16970,33 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16826
16970
|
}
|
|
16827
16971
|
return el;
|
|
16828
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
|
+
}
|
|
16829
16997
|
}, {
|
|
16830
16998
|
key: "getFormControl",
|
|
16831
|
-
value: function getFormControl(label, input, description, infoText) {
|
|
16999
|
+
value: function getFormControl(label, input, description, infoText, formName) {
|
|
16832
17000
|
var group = document.createElement('div');
|
|
16833
17001
|
group.classList.add('form-group');
|
|
16834
17002
|
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
@@ -16847,9 +17015,6 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16847
17015
|
check.classList.add('custom-radio');
|
|
16848
17016
|
}
|
|
16849
17017
|
}
|
|
16850
|
-
var unique = (Date.now() * Math.random()).toFixed(0);
|
|
16851
|
-
input.setAttribute('id', unique);
|
|
16852
|
-
label.setAttribute('for', unique);
|
|
16853
17018
|
check.appendChild(input);
|
|
16854
17019
|
check.appendChild(label);
|
|
16855
17020
|
if (infoText) check.appendChild(infoText);
|
|
@@ -16864,6 +17029,14 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
16864
17029
|
if (description) {
|
|
16865
17030
|
group.appendChild(description);
|
|
16866
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
|
+
}
|
|
16867
17040
|
return group;
|
|
16868
17041
|
}
|
|
16869
17042
|
}, {
|
|
@@ -17029,10 +17202,8 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17029
17202
|
}, {
|
|
17030
17203
|
key: "getHeader",
|
|
17031
17204
|
value: function getHeader(text, pathDepth) {
|
|
17032
|
-
|
|
17033
|
-
|
|
17034
|
-
|
|
17035
|
-
var el = document.createElement('h3');
|
|
17205
|
+
var el = document.createElement('span');
|
|
17206
|
+
el.classList.add('h3');
|
|
17036
17207
|
el.classList.add('card-title');
|
|
17037
17208
|
el.classList.add('level-' + pathDepth);
|
|
17038
17209
|
if (typeof text === 'string') {
|
|
@@ -17041,9 +17212,6 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17041
17212
|
el.appendChild(text);
|
|
17042
17213
|
}
|
|
17043
17214
|
el.style.display = 'inline-block';
|
|
17044
|
-
|
|
17045
|
-
/* cardHeader.appendChild(el) */
|
|
17046
|
-
|
|
17047
17215
|
return el;
|
|
17048
17216
|
}
|
|
17049
17217
|
}, {
|
|
@@ -17120,6 +17288,7 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17120
17288
|
}
|
|
17121
17289
|
input.errmsg.style.display = 'block';
|
|
17122
17290
|
input.errmsg.textContent = text;
|
|
17291
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
17123
17292
|
}
|
|
17124
17293
|
}, {
|
|
17125
17294
|
key: "removeInputError",
|
|
@@ -17313,10 +17482,10 @@ var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17313
17482
|
}
|
|
17314
17483
|
}]);
|
|
17315
17484
|
return bootstrap4Theme;
|
|
17316
|
-
}(
|
|
17485
|
+
}(_theme_js__WEBPACK_IMPORTED_MODULE_23__.AbstractTheme);
|
|
17317
17486
|
|
|
17318
17487
|
/* Custom stylesheet rules. format: "selector" : "CSS rules" */
|
|
17319
|
-
bootstrap4Theme.rules =
|
|
17488
|
+
bootstrap4Theme.rules = _bootstrap4_css_js__WEBPACK_IMPORTED_MODULE_24__["default"];
|
|
17320
17489
|
|
|
17321
17490
|
/***/ }),
|
|
17322
17491
|
|
|
@@ -17371,57 +17540,51 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17371
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__);
|
|
17372
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");
|
|
17373
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__);
|
|
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
|
|
17396
|
-
/* harmony import */ var
|
|
17397
|
-
/* harmony import */ var
|
|
17398
|
-
/* harmony import */ var
|
|
17399
|
-
/* harmony import */ var
|
|
17400
|
-
/* harmony import */ var
|
|
17401
|
-
/* harmony import */ var
|
|
17402
|
-
/* harmony import */ var
|
|
17403
|
-
/* harmony import */ var
|
|
17404
|
-
/* harmony import */ var
|
|
17405
|
-
/* harmony import */ var
|
|
17406
|
-
/* harmony import */ var
|
|
17407
|
-
/* harmony import */ var
|
|
17408
|
-
/* harmony import */ var
|
|
17409
|
-
/* harmony import */ var
|
|
17410
|
-
/* harmony import */ var
|
|
17411
|
-
/* harmony import */ var
|
|
17412
|
-
/* harmony import */ var
|
|
17413
|
-
/* harmony import */ var
|
|
17414
|
-
/* harmony import */ var
|
|
17415
|
-
/* harmony import */ var
|
|
17416
|
-
/* harmony import */ var
|
|
17417
|
-
/* harmony import */ var
|
|
17418
|
-
/* harmony import */ var
|
|
17419
|
-
/* 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__);
|
|
17420
|
-
/* 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");
|
|
17421
|
-
/* 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__);
|
|
17422
|
-
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
|
|
17423
|
-
/* harmony import */ var _bootstrap5_css_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./bootstrap5.css.js */ "./src/themes/bootstrap5.css.js");
|
|
17424
|
-
/* 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");
|
|
17425
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); }
|
|
17426
17589
|
|
|
17427
17590
|
|
|
@@ -17442,9 +17605,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
17442
17605
|
|
|
17443
17606
|
|
|
17444
17607
|
|
|
17445
|
-
|
|
17446
|
-
|
|
17447
|
-
|
|
17448
17608
|
|
|
17449
17609
|
|
|
17450
17610
|
|
|
@@ -17545,8 +17705,8 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17545
17705
|
}
|
|
17546
17706
|
}, {
|
|
17547
17707
|
key: "getRangeInput",
|
|
17548
|
-
value: function getRangeInput(min, max, step) {
|
|
17549
|
-
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);
|
|
17550
17710
|
el.classList.remove('form-control');
|
|
17551
17711
|
el.classList.add('form-range');
|
|
17552
17712
|
return el;
|
|
@@ -17601,7 +17761,7 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17601
17761
|
} else {
|
|
17602
17762
|
input.stepDown();
|
|
17603
17763
|
}
|
|
17604
|
-
(0,
|
|
17764
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_25__.trigger)(input, 'change');
|
|
17605
17765
|
});
|
|
17606
17766
|
plusBtn.addEventListener('click', function () {
|
|
17607
17767
|
if (!input.getAttribute('initialized')) {
|
|
@@ -17613,7 +17773,7 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17613
17773
|
} else {
|
|
17614
17774
|
input.stepUp();
|
|
17615
17775
|
}
|
|
17616
|
-
(0,
|
|
17776
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_25__.trigger)(input, 'change');
|
|
17617
17777
|
});
|
|
17618
17778
|
return inputGroup;
|
|
17619
17779
|
}
|
|
@@ -17630,7 +17790,7 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17630
17790
|
}
|
|
17631
17791
|
}, {
|
|
17632
17792
|
key: "getFormControl",
|
|
17633
|
-
value: function getFormControl(label, input, description, infoText) {
|
|
17793
|
+
value: function getFormControl(label, input, description, infoText, formName) {
|
|
17634
17794
|
var group = document.createElement('div');
|
|
17635
17795
|
group.classList.add('form-group');
|
|
17636
17796
|
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
@@ -17638,9 +17798,14 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17638
17798
|
check.classList.add('form-check');
|
|
17639
17799
|
input.classList.add('form-check-input');
|
|
17640
17800
|
label.classList.add('form-check-label');
|
|
17641
|
-
|
|
17642
|
-
|
|
17643
|
-
|
|
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
|
+
}
|
|
17644
17809
|
check.appendChild(input);
|
|
17645
17810
|
check.appendChild(label);
|
|
17646
17811
|
if (infoText) check.appendChild(infoText);
|
|
@@ -17658,6 +17823,30 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17658
17823
|
}
|
|
17659
17824
|
return group;
|
|
17660
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
|
+
}
|
|
17661
17850
|
}, {
|
|
17662
17851
|
key: "getInfoButton",
|
|
17663
17852
|
value: function getInfoButton(text) {
|
|
@@ -17799,7 +17988,8 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17799
17988
|
}, {
|
|
17800
17989
|
key: "getHeader",
|
|
17801
17990
|
value: function getHeader(text, pathDepth) {
|
|
17802
|
-
var el = document.createElement('
|
|
17991
|
+
var el = document.createElement('span');
|
|
17992
|
+
el.classList.add('h3');
|
|
17803
17993
|
el.classList.add('card-title');
|
|
17804
17994
|
el.classList.add('level-' + pathDepth);
|
|
17805
17995
|
if (typeof text === 'string') {
|
|
@@ -17884,6 +18074,7 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
17884
18074
|
}
|
|
17885
18075
|
input.errmsg.style.display = 'block';
|
|
17886
18076
|
input.errmsg.textContent = text;
|
|
18077
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
17887
18078
|
}
|
|
17888
18079
|
}, {
|
|
17889
18080
|
key: "removeInputError",
|
|
@@ -18074,10 +18265,10 @@ var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
18074
18265
|
}
|
|
18075
18266
|
}]);
|
|
18076
18267
|
return bootstrap5Theme;
|
|
18077
|
-
}(
|
|
18268
|
+
}(_theme_js__WEBPACK_IMPORTED_MODULE_23__.AbstractTheme);
|
|
18078
18269
|
|
|
18079
18270
|
/* Custom stylesheet rules. format: "selector" : "CSS rules" */
|
|
18080
|
-
bootstrap5Theme.rules =
|
|
18271
|
+
bootstrap5Theme.rules = _bootstrap5_css_js__WEBPACK_IMPORTED_MODULE_24__["default"];
|
|
18081
18272
|
|
|
18082
18273
|
/***/ }),
|
|
18083
18274
|
|
|
@@ -18263,6 +18454,7 @@ var htmlTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
18263
18454
|
}
|
|
18264
18455
|
input.errmsg.innerHTML = '';
|
|
18265
18456
|
input.errmsg.appendChild(document.createTextNode(text));
|
|
18457
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
18266
18458
|
}
|
|
18267
18459
|
}, {
|
|
18268
18460
|
key: "removeInputError",
|
|
@@ -18912,7 +19104,7 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
18912
19104
|
}, {
|
|
18913
19105
|
key: "getHeader",
|
|
18914
19106
|
value: function getHeader(text, pathDepth) {
|
|
18915
|
-
var el = document.createElement('
|
|
19107
|
+
var el = document.createElement('span');
|
|
18916
19108
|
if (typeof text === 'string') {
|
|
18917
19109
|
el.textContent = text;
|
|
18918
19110
|
} else {
|
|
@@ -19011,14 +19203,11 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
19011
19203
|
/* Create input field for type="range" */
|
|
19012
19204
|
}, {
|
|
19013
19205
|
key: "getRangeInput",
|
|
19014
|
-
value: function getRangeInput(min, max, step) {
|
|
19015
|
-
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);
|
|
19016
19208
|
el.classList.add('slider');
|
|
19017
19209
|
el.classList.remove('form-input');
|
|
19018
19210
|
el.setAttribute('oninput', 'this.setAttribute("value", this.value)');
|
|
19019
|
-
el.setAttribute('min', min);
|
|
19020
|
-
el.setAttribute('max', max);
|
|
19021
|
-
el.setAttribute('step', step);
|
|
19022
19211
|
return el;
|
|
19023
19212
|
}
|
|
19024
19213
|
}, {
|
|
@@ -19048,7 +19237,7 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
19048
19237
|
}
|
|
19049
19238
|
}, {
|
|
19050
19239
|
key: "getFormControl",
|
|
19051
|
-
value: function getFormControl(label, input, description, infoText) {
|
|
19240
|
+
value: function getFormControl(label, input, description, infoText, formName) {
|
|
19052
19241
|
var group = document.createElement('div');
|
|
19053
19242
|
group.classList.add('form-group');
|
|
19054
19243
|
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
@@ -19067,6 +19256,14 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
19067
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');
|
|
19068
19257
|
if (input.type !== 'checkbox') group.appendChild(input);
|
|
19069
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
|
+
}
|
|
19070
19267
|
return group;
|
|
19071
19268
|
}
|
|
19072
19269
|
|
|
@@ -19232,6 +19429,7 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
19232
19429
|
}
|
|
19233
19430
|
input.errmsg.classList.remove('d-hide');
|
|
19234
19431
|
input.errmsg.textContent = text;
|
|
19432
|
+
input.errmsg.setAttribute('role', 'alert');
|
|
19235
19433
|
}
|
|
19236
19434
|
}, {
|
|
19237
19435
|
key: "removeInputError",
|
|
@@ -21199,9 +21397,9 @@ var Validator = /*#__PURE__*/function () {
|
|
|
21199
21397
|
return [];
|
|
21200
21398
|
};
|
|
21201
21399
|
var validatorRx = {
|
|
21202
|
-
date: /^(\d{4}\D\d{2}\D\d{2})
|
|
21203
|
-
time: /^(\d{2}:\d{2}(?::\d{2})?)
|
|
21204
|
-
'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})?)$/
|
|
21205
21403
|
};
|
|
21206
21404
|
var format = {
|
|
21207
21405
|
date: '"YYYY-MM-DD"',
|
|
@@ -27293,30 +27491,6 @@ $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
|
|
27293
27491
|
});
|
|
27294
27492
|
|
|
27295
27493
|
|
|
27296
|
-
/***/ }),
|
|
27297
|
-
|
|
27298
|
-
/***/ "./node_modules/core-js/modules/es.date.now.js":
|
|
27299
|
-
/*!*****************************************************!*\
|
|
27300
|
-
!*** ./node_modules/core-js/modules/es.date.now.js ***!
|
|
27301
|
-
\*****************************************************/
|
|
27302
|
-
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
27303
|
-
|
|
27304
|
-
// TODO: Remove from `core-js@4`
|
|
27305
|
-
var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
|
|
27306
|
-
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
|
|
27307
|
-
|
|
27308
|
-
var $Date = Date;
|
|
27309
|
-
var thisTimeValue = uncurryThis($Date.prototype.getTime);
|
|
27310
|
-
|
|
27311
|
-
// `Date.now` method
|
|
27312
|
-
// https://tc39.es/ecma262/#sec-date.now
|
|
27313
|
-
$({ target: 'Date', stat: true }, {
|
|
27314
|
-
now: function now() {
|
|
27315
|
-
return thisTimeValue(new $Date());
|
|
27316
|
-
}
|
|
27317
|
-
});
|
|
27318
|
-
|
|
27319
|
-
|
|
27320
27494
|
/***/ }),
|
|
27321
27495
|
|
|
27322
27496
|
/***/ "./node_modules/core-js/modules/es.date.to-iso-string.js":
|