@json-editor/json-editor 2.8.0 → 2.9.0-beta.1
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 +29 -1
- package/README.md +30 -9
- package/dist/jsoneditor.js +2 -2
- package/dist/nonmin/jsoneditor.js +1211 -126
- package/dist/nonmin/jsoneditor.js.map +1 -1
- package/docs/index.html +22 -10
- package/docs/meta_schema.json +3 -2
- package/docs/starrating.html +2 -6
- package/package.json +4 -2
- package/src/defaults.js +9 -1
- package/src/editor.js +17 -3
- package/src/editors/array.js +7 -4
- package/src/editors/multiselect.js +1 -0
- package/src/editors/object.css +3 -3
- package/src/editors/object.css.js +1 -1
- package/src/editors/object.js +5 -2
- package/src/editors/table.js +11 -4
- package/src/editors/upload.js +3 -2
- package/src/schemaloader.js +112 -19
- package/src/themes/barebones.js +3 -1
- package/src/themes/bootstrap5.css +97 -0
- package/src/themes/bootstrap5.css.js +3 -0
- package/src/themes/bootstrap5.js +623 -0
- package/src/themes/index.js +2 -0
- package/src/themes/tailwind.js +2 -2
- package/tests/codeceptjs/core_test.js +128 -17
- package/tests/codeceptjs/editors/array_test.js +6 -5
- package/tests/codeceptjs/editors/button_test.js +7 -6
- package/tests/codeceptjs/editors/checkbox_test.js +3 -2
- package/tests/codeceptjs/editors/integer_test.js +3 -2
- package/tests/codeceptjs/editors/issues/issue-gh-1158_test.js +10 -0
- package/tests/codeceptjs/editors/issues/issue-gh-1257_test.js +13 -0
- package/tests/codeceptjs/editors/number_test.js +2 -1
- package/tests/codeceptjs/editors/object_test.js +39 -38
- package/tests/codeceptjs/editors/option-no_default_values_test.js +1 -1
- package/tests/codeceptjs/editors/programmatic-changes_test.js +3 -2
- package/tests/codeceptjs/editors/tabs_test.js +5 -3
- package/tests/codeceptjs/editors/validation_test.js +3 -1
- package/tests/codeceptjs/meta-schema_test.js +72 -4
- package/tests/codeceptjs/schemaloader_test.js +2 -1
- package/tests/codeceptjs/test-config.js +3 -0
- package/tests/codeceptjs/themes_test.js +14 -0
- package/tests/pages/anyof-2.html +90 -0
- package/tests/pages/anyof.html +1 -1
- package/tests/pages/{table-move-events.html → array-events-table.html} +0 -0
- package/tests/pages/{array-move-events.html → array-events.html} +0 -0
- package/tests/pages/container-attributes.html +50 -0
- package/tests/pages/issues/issue-gh-1158.html +50 -0
- package/tests/pages/issues/issue-gh-1233-failing.html +46 -0
- package/tests/pages/issues/issue-gh-1233-passing.html +49 -0
- package/tests/pages/issues/issue-gh-1257.html +77 -0
- package/tests/pages/meta-schema.html +747 -0
- package/tests/pages/meta_schema.json +3 -16
- package/tests/pages/oneof-2.html +90 -0
- package/tests/pages/per-editor-options.html +44 -0
- package/tests/pages/references.html +6 -0
- package/tests/pages/stepper.html +2 -2
- package/tests/pages/themes.html +2 -0
- package/tests/unit/schemaloader.spec.js +108 -2
|
@@ -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.9.0-beta.1"
|
|
7
7
|
* * @author Jeremy Dorn
|
|
8
8
|
* * @see https://github.com/jdorn/json-editor/
|
|
9
9
|
* * @see https://github.com/json-editor/json-editor
|
|
@@ -849,6 +849,49 @@ module.exports = function (object, key, value) {
|
|
|
849
849
|
};
|
|
850
850
|
|
|
851
851
|
|
|
852
|
+
/***/ }),
|
|
853
|
+
|
|
854
|
+
/***/ "./node_modules/core-js/internals/date-to-iso-string.js":
|
|
855
|
+
/*!**************************************************************!*\
|
|
856
|
+
!*** ./node_modules/core-js/internals/date-to-iso-string.js ***!
|
|
857
|
+
\**************************************************************/
|
|
858
|
+
/*! no static exports found */
|
|
859
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
860
|
+
|
|
861
|
+
"use strict";
|
|
862
|
+
|
|
863
|
+
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
864
|
+
var padStart = __webpack_require__(/*! ../internals/string-pad */ "./node_modules/core-js/internals/string-pad.js").start;
|
|
865
|
+
|
|
866
|
+
var abs = Math.abs;
|
|
867
|
+
var DatePrototype = Date.prototype;
|
|
868
|
+
var getTime = DatePrototype.getTime;
|
|
869
|
+
var nativeDateToISOString = DatePrototype.toISOString;
|
|
870
|
+
|
|
871
|
+
// `Date.prototype.toISOString` method implementation
|
|
872
|
+
// https://tc39.es/ecma262/#sec-date.prototype.toisostring
|
|
873
|
+
// PhantomJS / old WebKit fails here:
|
|
874
|
+
module.exports = (fails(function () {
|
|
875
|
+
return nativeDateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
|
|
876
|
+
}) || !fails(function () {
|
|
877
|
+
nativeDateToISOString.call(new Date(NaN));
|
|
878
|
+
})) ? function toISOString() {
|
|
879
|
+
if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
|
|
880
|
+
var date = this;
|
|
881
|
+
var year = date.getUTCFullYear();
|
|
882
|
+
var milliseconds = date.getUTCMilliseconds();
|
|
883
|
+
var sign = year < 0 ? '-' : year > 9999 ? '+' : '';
|
|
884
|
+
return sign + padStart(abs(year), sign ? 6 : 4, 0) +
|
|
885
|
+
'-' + padStart(date.getUTCMonth() + 1, 2, 0) +
|
|
886
|
+
'-' + padStart(date.getUTCDate(), 2, 0) +
|
|
887
|
+
'T' + padStart(date.getUTCHours(), 2, 0) +
|
|
888
|
+
':' + padStart(date.getUTCMinutes(), 2, 0) +
|
|
889
|
+
':' + padStart(date.getUTCSeconds(), 2, 0) +
|
|
890
|
+
'.' + padStart(milliseconds, 3, 0) +
|
|
891
|
+
'Z';
|
|
892
|
+
} : nativeDateToISOString;
|
|
893
|
+
|
|
894
|
+
|
|
852
895
|
/***/ }),
|
|
853
896
|
|
|
854
897
|
/***/ "./node_modules/core-js/internals/define-iterator.js":
|
|
@@ -3429,6 +3472,48 @@ module.exports = {
|
|
|
3429
3472
|
};
|
|
3430
3473
|
|
|
3431
3474
|
|
|
3475
|
+
/***/ }),
|
|
3476
|
+
|
|
3477
|
+
/***/ "./node_modules/core-js/internals/string-pad.js":
|
|
3478
|
+
/*!******************************************************!*\
|
|
3479
|
+
!*** ./node_modules/core-js/internals/string-pad.js ***!
|
|
3480
|
+
\******************************************************/
|
|
3481
|
+
/*! no static exports found */
|
|
3482
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3483
|
+
|
|
3484
|
+
// https://github.com/tc39/proposal-string-pad-start-end
|
|
3485
|
+
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
|
|
3486
|
+
var repeat = __webpack_require__(/*! ../internals/string-repeat */ "./node_modules/core-js/internals/string-repeat.js");
|
|
3487
|
+
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
|
|
3488
|
+
|
|
3489
|
+
var ceil = Math.ceil;
|
|
3490
|
+
|
|
3491
|
+
// `String.prototype.{ padStart, padEnd }` methods implementation
|
|
3492
|
+
var createMethod = function (IS_END) {
|
|
3493
|
+
return function ($this, maxLength, fillString) {
|
|
3494
|
+
var S = String(requireObjectCoercible($this));
|
|
3495
|
+
var stringLength = S.length;
|
|
3496
|
+
var fillStr = fillString === undefined ? ' ' : String(fillString);
|
|
3497
|
+
var intMaxLength = toLength(maxLength);
|
|
3498
|
+
var fillLen, stringFiller;
|
|
3499
|
+
if (intMaxLength <= stringLength || fillStr == '') return S;
|
|
3500
|
+
fillLen = intMaxLength - stringLength;
|
|
3501
|
+
stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length));
|
|
3502
|
+
if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
|
|
3503
|
+
return IS_END ? S + stringFiller : stringFiller + S;
|
|
3504
|
+
};
|
|
3505
|
+
};
|
|
3506
|
+
|
|
3507
|
+
module.exports = {
|
|
3508
|
+
// `String.prototype.padStart` method
|
|
3509
|
+
// https://tc39.es/ecma262/#sec-string.prototype.padstart
|
|
3510
|
+
start: createMethod(false),
|
|
3511
|
+
// `String.prototype.padEnd` method
|
|
3512
|
+
// https://tc39.es/ecma262/#sec-string.prototype.padend
|
|
3513
|
+
end: createMethod(true)
|
|
3514
|
+
};
|
|
3515
|
+
|
|
3516
|
+
|
|
3432
3517
|
/***/ }),
|
|
3433
3518
|
|
|
3434
3519
|
/***/ "./node_modules/core-js/internals/string-repeat.js":
|
|
@@ -4558,6 +4643,26 @@ $({ target: 'Date', stat: true }, {
|
|
|
4558
4643
|
});
|
|
4559
4644
|
|
|
4560
4645
|
|
|
4646
|
+
/***/ }),
|
|
4647
|
+
|
|
4648
|
+
/***/ "./node_modules/core-js/modules/es.date.to-iso-string.js":
|
|
4649
|
+
/*!***************************************************************!*\
|
|
4650
|
+
!*** ./node_modules/core-js/modules/es.date.to-iso-string.js ***!
|
|
4651
|
+
\***************************************************************/
|
|
4652
|
+
/*! no static exports found */
|
|
4653
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
4654
|
+
|
|
4655
|
+
var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
|
|
4656
|
+
var toISOString = __webpack_require__(/*! ../internals/date-to-iso-string */ "./node_modules/core-js/internals/date-to-iso-string.js");
|
|
4657
|
+
|
|
4658
|
+
// `Date.prototype.toISOString` method
|
|
4659
|
+
// https://tc39.es/ecma262/#sec-date.prototype.toisostring
|
|
4660
|
+
// PhantomJS / old WebKit has a broken implementations
|
|
4661
|
+
$({ target: 'Date', proto: true, forced: Date.prototype.toISOString !== toISOString }, {
|
|
4662
|
+
toISOString: toISOString
|
|
4663
|
+
});
|
|
4664
|
+
|
|
4665
|
+
|
|
4561
4666
|
/***/ }),
|
|
4562
4667
|
|
|
4563
4668
|
/***/ "./node_modules/core-js/modules/es.date.to-string.js":
|
|
@@ -8237,6 +8342,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8237
8342
|
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
|
|
8238
8343
|
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
8239
8344
|
/* harmony import */ var _resolvers_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./resolvers.js */ "./src/resolvers.js");
|
|
8345
|
+
/* harmony import */ var _editors_index_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./editors/index.js */ "./src/editors/index.js");
|
|
8240
8346
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8241
8347
|
|
|
8242
8348
|
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."); }
|
|
@@ -8267,6 +8373,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
8267
8373
|
|
|
8268
8374
|
|
|
8269
8375
|
|
|
8376
|
+
|
|
8270
8377
|
|
|
8271
8378
|
/* default theme */
|
|
8272
8379
|
|
|
@@ -8280,7 +8387,6 @@ var callbacks = {};
|
|
|
8280
8387
|
var themes = {};
|
|
8281
8388
|
var templates = {};
|
|
8282
8389
|
var iconlibs = {};
|
|
8283
|
-
var editors = {};
|
|
8284
8390
|
var languages = {}; // eslint-disable-next-line camelcase
|
|
8285
8391
|
|
|
8286
8392
|
var custom_validators = [];
|
|
@@ -8540,6 +8646,16 @@ languages.en = {
|
|
|
8540
8646
|
*/
|
|
8541
8647
|
error_hostname: 'The hostname has the wrong format',
|
|
8542
8648
|
|
|
8649
|
+
/**
|
|
8650
|
+
* When uploads max size limit is exceeded
|
|
8651
|
+
*/
|
|
8652
|
+
upload_max_size: 'Filesize too large. Max size is ',
|
|
8653
|
+
|
|
8654
|
+
/**
|
|
8655
|
+
* When the mime type does not match the type of the file
|
|
8656
|
+
*/
|
|
8657
|
+
upload_wrong_file_format: 'Wrong file format. Allowed format(s): ',
|
|
8658
|
+
|
|
8543
8659
|
/**
|
|
8544
8660
|
* Text/Title on Save button
|
|
8545
8661
|
*/
|
|
@@ -8677,12 +8793,12 @@ languages.en = {
|
|
|
8677
8793
|
};
|
|
8678
8794
|
/* Default per-editor options */
|
|
8679
8795
|
|
|
8680
|
-
Object.entries(editors).forEach(function (_ref) {
|
|
8796
|
+
Object.entries(_editors_index_js__WEBPACK_IMPORTED_MODULE_19__["editors"]).forEach(function (_ref) {
|
|
8681
8797
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
8682
8798
|
i = _ref2[0],
|
|
8683
8799
|
editor = _ref2[1];
|
|
8684
8800
|
|
|
8685
|
-
editors[i].options = editor.options || {};
|
|
8801
|
+
_editors_index_js__WEBPACK_IMPORTED_MODULE_19__["editors"][i].options = editor.options || {};
|
|
8686
8802
|
});
|
|
8687
8803
|
/* Default upload handler */
|
|
8688
8804
|
|
|
@@ -8738,7 +8854,7 @@ var defaults = {
|
|
|
8738
8854
|
callbacks: callbacks,
|
|
8739
8855
|
templates: templates,
|
|
8740
8856
|
iconlibs: iconlibs,
|
|
8741
|
-
editors: editors,
|
|
8857
|
+
editors: _editors_index_js__WEBPACK_IMPORTED_MODULE_19__["editors"],
|
|
8742
8858
|
languages: languages,
|
|
8743
8859
|
resolvers: _resolvers_js__WEBPACK_IMPORTED_MODULE_18__["resolvers"],
|
|
8744
8860
|
custom_validators: custom_validators,
|
|
@@ -9082,6 +9198,7 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
9082
9198
|
key: "setContainer",
|
|
9083
9199
|
value: function setContainer(container) {
|
|
9084
9200
|
this.container = container;
|
|
9201
|
+
this.setContainerAttributes();
|
|
9085
9202
|
if (this.schema.id) this.container.setAttribute('data-schemaid', this.schema.id);
|
|
9086
9203
|
if (this.schema.type && typeof this.schema.type === 'string') this.container.setAttribute('data-schematype', this.schema.type);
|
|
9087
9204
|
this.container.setAttribute('data-schemapath', this.path);
|
|
@@ -9512,12 +9629,13 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
9512
9629
|
if (type === 'number') return this.isDefaultRequired() ? 0.0 : undefined;
|
|
9513
9630
|
if (type === 'boolean') return this.isDefaultRequired() ? false : undefined;
|
|
9514
9631
|
if (type === 'integer') return this.isDefaultRequired() ? 0 : undefined;
|
|
9515
|
-
if (type === 'string') return '';
|
|
9632
|
+
if (type === 'string') return this.isDefaultRequired() ? '' : undefined;
|
|
9633
|
+
if (type === 'null') return null;
|
|
9516
9634
|
if (type === 'object') return {};
|
|
9517
9635
|
if (type === 'array') return [];
|
|
9518
9636
|
}
|
|
9519
9637
|
|
|
9520
|
-
return
|
|
9638
|
+
return undefined;
|
|
9521
9639
|
}
|
|
9522
9640
|
}, {
|
|
9523
9641
|
key: "getTitle",
|
|
@@ -9582,7 +9700,7 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
9582
9700
|
|
|
9583
9701
|
if (typeof el === 'string') name = el;
|
|
9584
9702
|
/* Object */
|
|
9585
|
-
else if (el.title && used[el.title] <= 1) name = el.title;else if (el.format && used[el.format] <= 1) name = el.format;else if (el.type && used[el.type] <= 1) name = el.type;else if (el.description && used[el.description] <= 1) name = el.
|
|
9703
|
+
else if (el.title && used[el.title] <= 1) name = el.title;else if (el.format && used[el.format] <= 1) name = el.format;else if (el.type && used[el.type] <= 1) name = el.type;else if (el.description && used[el.description] <= 1) name = el.description;else if (el.title) name = el.title;else if (el.format) name = el.format;else if (el.type) name = el.type;else if (el.description) name = el.description;else if (JSON.stringify(el).length < 500) name = JSON.stringify(el);else name = 'type';
|
|
9586
9704
|
disp.push(name);
|
|
9587
9705
|
});
|
|
9588
9706
|
/* Replace identical display text with "text 1", "text 2", etc. */
|
|
@@ -9618,10 +9736,25 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
9618
9736
|
});
|
|
9619
9737
|
}
|
|
9620
9738
|
}
|
|
9739
|
+
}, {
|
|
9740
|
+
key: "setContainerAttributes",
|
|
9741
|
+
value: function setContainerAttributes() {
|
|
9742
|
+
var _this9 = this;
|
|
9743
|
+
|
|
9744
|
+
if (this.schema.options && this.schema.options.containerAttributes) {
|
|
9745
|
+
var containerAttributes = this.schema.options.containerAttributes;
|
|
9746
|
+
var protectedAttributes = ['data-schemapath', 'data-schematype', 'data-schemaid'];
|
|
9747
|
+
Object.keys(containerAttributes).forEach(function (key) {
|
|
9748
|
+
if (!protectedAttributes.includes(key.toLowerCase())) {
|
|
9749
|
+
_this9.container.setAttribute(key, containerAttributes[key]);
|
|
9750
|
+
}
|
|
9751
|
+
});
|
|
9752
|
+
}
|
|
9753
|
+
}
|
|
9621
9754
|
}, {
|
|
9622
9755
|
key: "expandCallbacks",
|
|
9623
9756
|
value: function expandCallbacks(scope, options) {
|
|
9624
|
-
var
|
|
9757
|
+
var _this10 = this;
|
|
9625
9758
|
|
|
9626
9759
|
var callback = this.defaults.callbacks[scope];
|
|
9627
9760
|
Object.entries(options).forEach(function (_ref) {
|
|
@@ -9630,9 +9763,9 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
9630
9763
|
value = _ref2[1];
|
|
9631
9764
|
|
|
9632
9765
|
if (value === Object(value)) {
|
|
9633
|
-
options[key] =
|
|
9766
|
+
options[key] = _this10.expandCallbacks(scope, value);
|
|
9634
9767
|
} else if (typeof value === 'string' && _typeof(callback) === 'object' && typeof callback[value] === 'function') {
|
|
9635
|
-
options[key] = callback[value].bind(null,
|
|
9768
|
+
options[key] = callback[value].bind(null, _this10);
|
|
9636
9769
|
}
|
|
9637
9770
|
});
|
|
9638
9771
|
return options;
|
|
@@ -10600,6 +10733,7 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
10600
10733
|
|
|
10601
10734
|
var newActiveTab = null;
|
|
10602
10735
|
var editor = _this8.rows[i];
|
|
10736
|
+
var editorValue = editor.getValue();
|
|
10603
10737
|
|
|
10604
10738
|
_this8.setValue(newval);
|
|
10605
10739
|
|
|
@@ -10617,7 +10751,7 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
10617
10751
|
|
|
10618
10752
|
_this8.onChange(true);
|
|
10619
10753
|
|
|
10620
|
-
_this8.jsoneditor.trigger('deleteRow',
|
|
10754
|
+
_this8.jsoneditor.trigger('deleteRow', editorValue);
|
|
10621
10755
|
});
|
|
10622
10756
|
|
|
10623
10757
|
if (holder) {
|
|
@@ -10863,7 +10997,7 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
10863
10997
|
var rows = _this14.getValue();
|
|
10864
10998
|
|
|
10865
10999
|
var newActiveTab = null;
|
|
10866
|
-
var
|
|
11000
|
+
var editorValue = rows.pop();
|
|
10867
11001
|
|
|
10868
11002
|
_this14.setValue(rows);
|
|
10869
11003
|
|
|
@@ -10879,7 +11013,7 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
10879
11013
|
|
|
10880
11014
|
_this14.onChange(true);
|
|
10881
11015
|
|
|
10882
|
-
_this14.jsoneditor.trigger('deleteRow',
|
|
11016
|
+
_this14.jsoneditor.trigger('deleteRow', editorValue);
|
|
10883
11017
|
});
|
|
10884
11018
|
this.controls.appendChild(button);
|
|
10885
11019
|
return button;
|
|
@@ -10899,13 +11033,15 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
10899
11033
|
return false;
|
|
10900
11034
|
}
|
|
10901
11035
|
|
|
11036
|
+
var values = _this15.getValue();
|
|
11037
|
+
|
|
10902
11038
|
_this15.empty(true);
|
|
10903
11039
|
|
|
10904
11040
|
_this15.setValue([]);
|
|
10905
11041
|
|
|
10906
11042
|
_this15.onChange(true);
|
|
10907
11043
|
|
|
10908
|
-
_this15.jsoneditor.trigger('deleteAllRows');
|
|
11044
|
+
_this15.jsoneditor.trigger('deleteAllRows', values);
|
|
10909
11045
|
});
|
|
10910
11046
|
this.controls.appendChild(button);
|
|
10911
11047
|
return button;
|
|
@@ -15475,6 +15611,7 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
15475
15611
|
|
|
15476
15612
|
this.select_options = {};
|
|
15477
15613
|
this.select_values = {};
|
|
15614
|
+
this.option_titles = [];
|
|
15478
15615
|
this.option_keys = [];
|
|
15479
15616
|
this.option_enum = [];
|
|
15480
15617
|
var i;
|
|
@@ -16002,7 +16139,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16002
16139
|
".property-selector": "width:295px;max-height:160px;padding:5px%200;overflow-y:auto;overflow-x:hidden;padding-left:5px",
|
|
16003
16140
|
".property-selector-input": "width:220px;margin-bottom:0;display:inline-block",
|
|
16004
16141
|
".json-editor-btntype-toggle": "margin:0%2010px%200%200",
|
|
16005
|
-
".je-edit-json--textarea": "height:170px
|
|
16142
|
+
".je-edit-json--textarea": "height:170px;width:300px;display:block"
|
|
16006
16143
|
});
|
|
16007
16144
|
/* eslint-enable */
|
|
16008
16145
|
|
|
@@ -16815,6 +16952,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
16815
16952
|
editor.build();
|
|
16816
16953
|
editor.postBuild();
|
|
16817
16954
|
editor.setOptInCheckbox(editor.header);
|
|
16955
|
+
editor.setValue(editor.getDefault(), true);
|
|
16818
16956
|
|
|
16819
16957
|
if (_this7.editors[key].options.hidden) {
|
|
16820
16958
|
holder.style.display = 'none';
|
|
@@ -16923,7 +17061,8 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
16923
17061
|
this.addproperty_holder.appendChild(spacer);
|
|
16924
17062
|
/* Close properties modal if clicked outside modal */
|
|
16925
17063
|
|
|
16926
|
-
|
|
17064
|
+
this.onOutsideModalClickListener = this.onOutsideModalClick.bind(this);
|
|
17065
|
+
document.addEventListener('click', this.onOutsideModalClickListener, true);
|
|
16927
17066
|
/* Description */
|
|
16928
17067
|
|
|
16929
17068
|
if (this.schema.description) {
|
|
@@ -17404,7 +17543,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
17404
17543
|
this.cached_editors = null;
|
|
17405
17544
|
if (this.editor_holder && this.editor_holder.parentNode) this.editor_holder.parentNode.removeChild(this.editor_holder);
|
|
17406
17545
|
this.editor_holder = null;
|
|
17407
|
-
document.removeEventListener('click', this.
|
|
17546
|
+
document.removeEventListener('click', this.onOutsideModalClickListener, true);
|
|
17408
17547
|
|
|
17409
17548
|
_get(_getPrototypeOf(ObjectEditor.prototype), "destroy", this).call(this);
|
|
17410
17549
|
}
|
|
@@ -21014,6 +21153,7 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
21014
21153
|
}
|
|
21015
21154
|
|
|
21016
21155
|
if (typeof value !== 'undefined') this.rows[i].setValue(value);
|
|
21156
|
+
return this.rows[i];
|
|
21017
21157
|
}
|
|
21018
21158
|
}, {
|
|
21019
21159
|
key: "_createDeleteButton",
|
|
@@ -21035,13 +21175,16 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
21035
21175
|
|
|
21036
21176
|
var value = _this4.getValue();
|
|
21037
21177
|
|
|
21178
|
+
var rows = _this4.getValue();
|
|
21179
|
+
|
|
21180
|
+
var editorValue = rows[j];
|
|
21038
21181
|
value.splice(j, 1);
|
|
21039
21182
|
|
|
21040
21183
|
_this4.setValue(value);
|
|
21041
21184
|
|
|
21042
21185
|
_this4.onChange(true);
|
|
21043
21186
|
|
|
21044
|
-
_this4.jsoneditor.trigger('deleteRow',
|
|
21187
|
+
_this4.jsoneditor.trigger('deleteRow', editorValue);
|
|
21045
21188
|
});
|
|
21046
21189
|
holder.appendChild(button);
|
|
21047
21190
|
return button;
|
|
@@ -21240,13 +21383,13 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
21240
21383
|
|
|
21241
21384
|
var rows = _this10.getValue();
|
|
21242
21385
|
|
|
21243
|
-
var
|
|
21386
|
+
var editorValue = rows.pop();
|
|
21244
21387
|
|
|
21245
21388
|
_this10.setValue(rows);
|
|
21246
21389
|
|
|
21247
21390
|
_this10.onChange(true);
|
|
21248
21391
|
|
|
21249
|
-
_this10.jsoneditor.trigger('deleteRow',
|
|
21392
|
+
_this10.jsoneditor.trigger('deleteRow', editorValue);
|
|
21250
21393
|
});
|
|
21251
21394
|
this.controls.appendChild(button);
|
|
21252
21395
|
return button;
|
|
@@ -21266,11 +21409,13 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
21266
21409
|
return false;
|
|
21267
21410
|
}
|
|
21268
21411
|
|
|
21412
|
+
var values = _this11.getValue();
|
|
21413
|
+
|
|
21269
21414
|
_this11.setValue([]);
|
|
21270
21415
|
|
|
21271
21416
|
_this11.onChange(true);
|
|
21272
21417
|
|
|
21273
|
-
_this11.jsoneditor.trigger('deleteAllRows');
|
|
21418
|
+
_this11.jsoneditor.trigger('deleteAllRows', values);
|
|
21274
21419
|
});
|
|
21275
21420
|
this.controls.appendChild(button);
|
|
21276
21421
|
return button;
|
|
@@ -21425,6 +21570,7 @@ var UploadEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
21425
21570
|
if (!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
|
|
21426
21571
|
if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
|
|
21427
21572
|
if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
|
|
21573
|
+
if (this.options.hidden) this.container.style.display = 'none';
|
|
21428
21574
|
/* Editor options */
|
|
21429
21575
|
|
|
21430
21576
|
this.options = this.expandCallbacks('upload', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_27__["extend"])({}, {
|
|
@@ -21528,9 +21674,9 @@ var UploadEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
21528
21674
|
|
|
21529
21675
|
if (files && files.length) {
|
|
21530
21676
|
if (_this.options.max_upload_size !== 0 && files[0].size > _this.options.max_upload_size) {
|
|
21531
|
-
_this.theme.addInputError(_this.uploader, "
|
|
21677
|
+
_this.theme.addInputError(_this.uploader, "".concat(_this.translate('upload_max_size'), " ").concat(_this.options.max_upload_size));
|
|
21532
21678
|
} else if (_this.options.mime_type.length !== 0 && !_this.isValidMimeType(files[0].type, _this.options.mime_type)) {
|
|
21533
|
-
_this.theme.addInputError(_this.uploader, "
|
|
21679
|
+
_this.theme.addInputError(_this.uploader, "".concat(_this.translate('upload_wrong_file_format'), " ").concat(_this.options.mime_type.toString()));
|
|
21534
21680
|
} else {
|
|
21535
21681
|
if (_this.fileDisplay) _this.fileDisplay.value = files[0].name;
|
|
21536
21682
|
var fr = new window.FileReader();
|
|
@@ -23080,19 +23226,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23080
23226
|
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_22__);
|
|
23081
23227
|
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
|
|
23082
23228
|
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_23__);
|
|
23083
|
-
/* harmony import */ var
|
|
23084
|
-
/* harmony import */ var
|
|
23085
|
-
/* harmony import */ var
|
|
23086
|
-
/* harmony import */ var
|
|
23087
|
-
/* harmony import */ var
|
|
23088
|
-
/* harmony import */ var
|
|
23089
|
-
/* harmony import */ var
|
|
23090
|
-
/* harmony import */ var
|
|
23091
|
-
/* harmony import */ var
|
|
23092
|
-
/* harmony import */ var
|
|
23093
|
-
/* harmony import */ var
|
|
23094
|
-
/* harmony import */ var
|
|
23095
|
-
/* harmony import */ var
|
|
23229
|
+
/* harmony import */ var core_js_modules_es_date_to_iso_string_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.date.to-iso-string.js */ "./node_modules/core-js/modules/es.date.to-iso-string.js");
|
|
23230
|
+
/* harmony import */ var core_js_modules_es_date_to_iso_string_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_iso_string_js__WEBPACK_IMPORTED_MODULE_24__);
|
|
23231
|
+
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
|
|
23232
|
+
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_25__);
|
|
23233
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
23234
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_26__);
|
|
23235
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
23236
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_27__);
|
|
23237
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
23238
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_28__);
|
|
23239
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
23240
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_29__);
|
|
23241
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
|
|
23242
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_30__);
|
|
23243
|
+
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
|
|
23244
|
+
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_31__);
|
|
23245
|
+
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./utilities.js */ "./src/utilities.js");
|
|
23096
23246
|
|
|
23097
23247
|
|
|
23098
23248
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
@@ -23138,6 +23288,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
23138
23288
|
|
|
23139
23289
|
|
|
23140
23290
|
|
|
23291
|
+
|
|
23292
|
+
|
|
23141
23293
|
|
|
23142
23294
|
|
|
23143
23295
|
|
|
@@ -23254,7 +23406,7 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23254
23406
|
allOf: function allOf(schema, extended) {
|
|
23255
23407
|
var _this3 = this;
|
|
23256
23408
|
|
|
23257
|
-
var _extended = Object(
|
|
23409
|
+
var _extended = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_32__["extend"])({}, extended);
|
|
23258
23410
|
|
|
23259
23411
|
Object.entries(schema.allOf).forEach(function (_ref5) {
|
|
23260
23412
|
var _ref6 = _slicedToArray(_ref5, 2),
|
|
@@ -23293,7 +23445,7 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23293
23445
|
oneOf: function oneOf(schema, extended) {
|
|
23294
23446
|
var _this5 = this;
|
|
23295
23447
|
|
|
23296
|
-
var tmp = Object(
|
|
23448
|
+
var tmp = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_32__["extend"])({}, extended);
|
|
23297
23449
|
delete tmp.oneOf;
|
|
23298
23450
|
schema.oneOf.reduce(function (e, s, i) {
|
|
23299
23451
|
e.oneOf[i] = _this5.extendSchemas(_this5.expandSchema(s), tmp);
|
|
@@ -23359,7 +23511,7 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23359
23511
|
value: function expandRefs(schema, recurseAllOf) {
|
|
23360
23512
|
var _this6 = this;
|
|
23361
23513
|
|
|
23362
|
-
var _schema = Object(
|
|
23514
|
+
var _schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_32__["extend"])({}, schema);
|
|
23363
23515
|
|
|
23364
23516
|
if (!_schema.$ref) return _schema; // This split the ref to get the Json point if it exists
|
|
23365
23517
|
// exemple #/counter/1#/definition/address +
|
|
@@ -23384,7 +23536,7 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23384
23536
|
/* if reference not found */
|
|
23385
23537
|
// eslint-disable-next-line no-console
|
|
23386
23538
|
console.warn("reference:'".concat(ref, "' not found!"));
|
|
23387
|
-
} else if (recurseAllOf && Object(
|
|
23539
|
+
} else if (recurseAllOf && Object(_utilities_js__WEBPACK_IMPORTED_MODULE_32__["hasOwnProperty"])(this.refs[ref], 'allOf')) {
|
|
23388
23540
|
var allOf = this.refs[ref].allOf;
|
|
23389
23541
|
Object.keys(allOf).forEach(function (key) {
|
|
23390
23542
|
allOf[key] = _this6.expandRefs(allOf[key], true);
|
|
@@ -23442,7 +23594,7 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23442
23594
|
func.call(_this7, schema);
|
|
23443
23595
|
}
|
|
23444
23596
|
});
|
|
23445
|
-
var extended = Object(
|
|
23597
|
+
var extended = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_32__["extend"])({}, schema);
|
|
23446
23598
|
Object.entries(this._subSchema2).forEach(function (_ref9) {
|
|
23447
23599
|
var _ref10 = _slicedToArray(_ref9, 2),
|
|
23448
23600
|
key = _ref10[0],
|
|
@@ -23638,7 +23790,7 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23638
23790
|
waiting = 0; // Loop into all schema references
|
|
23639
23791
|
|
|
23640
23792
|
_loop = /*#__PURE__*/regeneratorRuntime.mark(function _loop() {
|
|
23641
|
-
var uri, urnResolver, urn,
|
|
23793
|
+
var uri, urnResolver, urn, response, _externalSchema, url, externalSchema, schemaFromCache, _response, newfileBase, pathItems;
|
|
23642
23794
|
|
|
23643
23795
|
return regeneratorRuntime.wrap(function _loop$(_context2) {
|
|
23644
23796
|
while (1) {
|
|
@@ -23689,9 +23841,9 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23689
23841
|
return urnResolver(urn);
|
|
23690
23842
|
|
|
23691
23843
|
case 17:
|
|
23692
|
-
|
|
23844
|
+
response = _context2.sent;
|
|
23693
23845
|
_context2.prev = 18;
|
|
23694
|
-
_externalSchema = JSON.parse(
|
|
23846
|
+
_externalSchema = JSON.parse(response);
|
|
23695
23847
|
_context2.next = 26;
|
|
23696
23848
|
break;
|
|
23697
23849
|
|
|
@@ -23727,7 +23879,7 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23727
23879
|
throw new Error("Failed to parse external ref ".concat(urn));
|
|
23728
23880
|
|
|
23729
23881
|
case 37:
|
|
23730
|
-
if (!(typeof
|
|
23882
|
+
if (!(typeof response === 'boolean')) {
|
|
23731
23883
|
_context2.next = 39;
|
|
23732
23884
|
break;
|
|
23733
23885
|
}
|
|
@@ -23748,7 +23900,22 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23748
23900
|
case 42:
|
|
23749
23901
|
waiting++;
|
|
23750
23902
|
url = _this10._joinUrl(uri, fileBase);
|
|
23751
|
-
|
|
23903
|
+
externalSchema = void 0;
|
|
23904
|
+
|
|
23905
|
+
if (_this10.options.ajax_cache_responses) {
|
|
23906
|
+
schemaFromCache = _this10.cacheGet(url);
|
|
23907
|
+
|
|
23908
|
+
if (schemaFromCache) {
|
|
23909
|
+
externalSchema = schemaFromCache;
|
|
23910
|
+
}
|
|
23911
|
+
}
|
|
23912
|
+
|
|
23913
|
+
if (externalSchema) {
|
|
23914
|
+
_context2.next = 61;
|
|
23915
|
+
break;
|
|
23916
|
+
}
|
|
23917
|
+
|
|
23918
|
+
_context2.next = 49;
|
|
23752
23919
|
return new Promise(function (resolve) {
|
|
23753
23920
|
var r = new XMLHttpRequest();
|
|
23754
23921
|
if (_this10.options.ajaxCredentials) r.withCredentials = _this10.options.ajaxCredentials;
|
|
@@ -23766,39 +23933,43 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23766
23933
|
r.send();
|
|
23767
23934
|
});
|
|
23768
23935
|
|
|
23769
|
-
case
|
|
23770
|
-
|
|
23936
|
+
case 49:
|
|
23937
|
+
_response = _context2.sent;
|
|
23771
23938
|
|
|
23772
|
-
if (!(typeof
|
|
23773
|
-
_context2.next =
|
|
23939
|
+
if (!(typeof _response === 'undefined')) {
|
|
23940
|
+
_context2.next = 52;
|
|
23774
23941
|
break;
|
|
23775
23942
|
}
|
|
23776
23943
|
|
|
23777
23944
|
throw new Error("Failed to fetch ref via ajax - ".concat(uri));
|
|
23778
23945
|
|
|
23779
|
-
case
|
|
23780
|
-
|
|
23781
|
-
|
|
23782
|
-
|
|
23783
|
-
|
|
23946
|
+
case 52:
|
|
23947
|
+
_context2.prev = 52;
|
|
23948
|
+
externalSchema = JSON.parse(_response.responseText);
|
|
23949
|
+
|
|
23950
|
+
if (_this10.options.ajax_cache_responses) {
|
|
23951
|
+
_this10.cacheSet(url, externalSchema);
|
|
23952
|
+
}
|
|
23953
|
+
|
|
23954
|
+
_context2.next = 61;
|
|
23784
23955
|
break;
|
|
23785
23956
|
|
|
23786
|
-
case
|
|
23787
|
-
_context2.prev =
|
|
23788
|
-
_context2.t2 = _context2["catch"](
|
|
23957
|
+
case 57:
|
|
23958
|
+
_context2.prev = 57;
|
|
23959
|
+
_context2.t2 = _context2["catch"](52);
|
|
23789
23960
|
// eslint-disable-next-line no-console
|
|
23790
23961
|
console.log(_context2.t2);
|
|
23791
23962
|
throw new Error("Failed to parse external ref ".concat(url));
|
|
23792
23963
|
|
|
23793
|
-
case
|
|
23964
|
+
case 61:
|
|
23794
23965
|
if (!(!(typeof externalSchema === 'boolean' || _typeof(externalSchema) === 'object') || externalSchema === null || Array.isArray(externalSchema))) {
|
|
23795
|
-
_context2.next =
|
|
23966
|
+
_context2.next = 63;
|
|
23796
23967
|
break;
|
|
23797
23968
|
}
|
|
23798
23969
|
|
|
23799
23970
|
throw new Error("External ref does not contain a valid schema - ".concat(url));
|
|
23800
23971
|
|
|
23801
|
-
case
|
|
23972
|
+
case 63:
|
|
23802
23973
|
_this10.refs[uri] = externalSchema;
|
|
23803
23974
|
newfileBase = _this10._getFileBaseFromFileLocation(url); // Add leading slash.
|
|
23804
23975
|
|
|
@@ -23807,15 +23978,15 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23807
23978
|
url = (uri.substr(0, 1) === '/' ? '/' : '') + pathItems.pop();
|
|
23808
23979
|
}
|
|
23809
23980
|
|
|
23810
|
-
_context2.next =
|
|
23981
|
+
_context2.next = 68;
|
|
23811
23982
|
return _this10._asyncloadExternalRefs(externalSchema, url, newfileBase);
|
|
23812
23983
|
|
|
23813
|
-
case
|
|
23984
|
+
case 68:
|
|
23814
23985
|
case "end":
|
|
23815
23986
|
return _context2.stop();
|
|
23816
23987
|
}
|
|
23817
23988
|
}
|
|
23818
|
-
}, _loop, null, [[14, 33], [18, 22], [
|
|
23989
|
+
}, _loop, null, [[14, 33], [18, 22], [52, 57]]);
|
|
23819
23990
|
});
|
|
23820
23991
|
_i2 = 0, _Object$keys = Object.keys(refs);
|
|
23821
23992
|
|
|
@@ -23869,8 +24040,8 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23869
24040
|
value: function extendSchemas(obj1, obj2) {
|
|
23870
24041
|
var _this11 = this;
|
|
23871
24042
|
|
|
23872
|
-
obj1 = Object(
|
|
23873
|
-
obj2 = Object(
|
|
24043
|
+
obj1 = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_32__["extend"])({}, obj1);
|
|
24044
|
+
obj2 = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_32__["extend"])({}, obj2);
|
|
23874
24045
|
var extended = {};
|
|
23875
24046
|
|
|
23876
24047
|
var isRequiredOrDefaultProperties = function isRequiredOrDefaultProperties(prop, val) {
|
|
@@ -23949,6 +24120,99 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
23949
24120
|
});
|
|
23950
24121
|
return extended;
|
|
23951
24122
|
}
|
|
24123
|
+
/**
|
|
24124
|
+
* Gets a cache key namespaced for JSON Editor.
|
|
24125
|
+
*
|
|
24126
|
+
* @param {*} key
|
|
24127
|
+
* The schema's key, e.g., URL.
|
|
24128
|
+
* @returns {string}
|
|
24129
|
+
* A namespaced cache key, by prefixing "je-cache::".
|
|
24130
|
+
*/
|
|
24131
|
+
|
|
24132
|
+
}, {
|
|
24133
|
+
key: "getCacheKey",
|
|
24134
|
+
value: function getCacheKey(key) {
|
|
24135
|
+
return ['je-cache', key].join('::');
|
|
24136
|
+
}
|
|
24137
|
+
/**
|
|
24138
|
+
* Returns the schema cache buster from JSON Editor settings.
|
|
24139
|
+
*
|
|
24140
|
+
* @returns {string}
|
|
24141
|
+
* The configured cache buster, if any. Otherwise, returns the current date
|
|
24142
|
+
* in ISO 8601 simplified format (e.g., 2011-10-05 for October 5, 2011).
|
|
24143
|
+
*/
|
|
24144
|
+
|
|
24145
|
+
}, {
|
|
24146
|
+
key: "getCacheBuster",
|
|
24147
|
+
value: function getCacheBuster() {
|
|
24148
|
+
return this.options.ajax_cache_buster || new Date().toISOString().slice(0, 10);
|
|
24149
|
+
}
|
|
24150
|
+
/**
|
|
24151
|
+
* Sets a schema into localStorage cache.
|
|
24152
|
+
*
|
|
24153
|
+
* @param {string} key
|
|
24154
|
+
* The schema's key, e.g., URL.
|
|
24155
|
+
* @param {mixed} data
|
|
24156
|
+
* The schema to store. Can be any data type.
|
|
24157
|
+
*/
|
|
24158
|
+
|
|
24159
|
+
}, {
|
|
24160
|
+
key: "cacheSet",
|
|
24161
|
+
value: function cacheSet(key, data) {
|
|
24162
|
+
try {
|
|
24163
|
+
window.localStorage.setItem(this.getCacheKey(key), JSON.stringify({
|
|
24164
|
+
cacheBuster: this.getCacheBuster(),
|
|
24165
|
+
schema: data
|
|
24166
|
+
}));
|
|
24167
|
+
} catch (e) {
|
|
24168
|
+
// eslint-disable-next-line no-console
|
|
24169
|
+
console.error(e);
|
|
24170
|
+
}
|
|
24171
|
+
}
|
|
24172
|
+
/**
|
|
24173
|
+
* Fetches a schema from localStorage cache.
|
|
24174
|
+
*
|
|
24175
|
+
* @param {string} key
|
|
24176
|
+
* The schema's key, e.g., URL.
|
|
24177
|
+
*
|
|
24178
|
+
* @returns {mixed}
|
|
24179
|
+
* If found, returns the schema.
|
|
24180
|
+
*/
|
|
24181
|
+
|
|
24182
|
+
}, {
|
|
24183
|
+
key: "cacheGet",
|
|
24184
|
+
value: function cacheGet(key) {
|
|
24185
|
+
try {
|
|
24186
|
+
var resultRaw = window.localStorage.getItem(this.getCacheKey(key));
|
|
24187
|
+
|
|
24188
|
+
if (resultRaw) {
|
|
24189
|
+
var resultDecoded = JSON.parse(resultRaw);
|
|
24190
|
+
|
|
24191
|
+
if (resultDecoded.cacheBuster && resultDecoded.schema) {
|
|
24192
|
+
if (resultDecoded.cacheBuster === this.getCacheBuster()) {
|
|
24193
|
+
return resultDecoded.schema;
|
|
24194
|
+
}
|
|
24195
|
+
}
|
|
24196
|
+
|
|
24197
|
+
this.cacheDelete(key);
|
|
24198
|
+
}
|
|
24199
|
+
} catch (e) {
|
|
24200
|
+
// eslint-disable-next-line no-console
|
|
24201
|
+
console.error(e);
|
|
24202
|
+
}
|
|
24203
|
+
}
|
|
24204
|
+
/**
|
|
24205
|
+
* Deletes a schema from localStorage cache.
|
|
24206
|
+
*
|
|
24207
|
+
* @param {string} key
|
|
24208
|
+
* The schema's key, e.g., URL.
|
|
24209
|
+
*/
|
|
24210
|
+
|
|
24211
|
+
}, {
|
|
24212
|
+
key: "cacheDelete",
|
|
24213
|
+
value: function cacheDelete(key) {
|
|
24214
|
+
window.localStorage.removeItem(this.getCacheKey(key));
|
|
24215
|
+
}
|
|
23952
24216
|
}]);
|
|
23953
24217
|
|
|
23954
24218
|
return SchemaLoader;
|
|
@@ -25223,7 +25487,10 @@ var barebonesTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
25223
25487
|
var group = this.closest(input, '.form-control');
|
|
25224
25488
|
input.errmsg = document.createElement('div');
|
|
25225
25489
|
input.errmsg.setAttribute('class', 'errmsg');
|
|
25226
|
-
|
|
25490
|
+
|
|
25491
|
+
if (group.nodeName) {
|
|
25492
|
+
group.appendChild(input.errmsg);
|
|
25493
|
+
}
|
|
25227
25494
|
} else {
|
|
25228
25495
|
input.errmsg.style.display = 'block';
|
|
25229
25496
|
}
|
|
@@ -26591,10 +26858,10 @@ bootstrap4Theme.rules = _bootstrap4_css_js__WEBPACK_IMPORTED_MODULE_24__["defaul
|
|
|
26591
26858
|
|
|
26592
26859
|
/***/ }),
|
|
26593
26860
|
|
|
26594
|
-
/***/ "./src/themes/
|
|
26595
|
-
|
|
26596
|
-
!*** ./src/themes/
|
|
26597
|
-
|
|
26861
|
+
/***/ "./src/themes/bootstrap5.css.js":
|
|
26862
|
+
/*!**************************************!*\
|
|
26863
|
+
!*** ./src/themes/bootstrap5.css.js ***!
|
|
26864
|
+
\**************************************/
|
|
26598
26865
|
/*! exports provided: default */
|
|
26599
26866
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
26600
26867
|
|
|
@@ -26602,12 +26869,19 @@ bootstrap4Theme.rules = _bootstrap4_css_js__WEBPACK_IMPORTED_MODULE_24__["defaul
|
|
|
26602
26869
|
__webpack_require__.r(__webpack_exports__);
|
|
26603
26870
|
/* eslint-disable */
|
|
26604
26871
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
26605
|
-
".
|
|
26606
|
-
".
|
|
26607
|
-
".
|
|
26608
|
-
".
|
|
26609
|
-
".
|
|
26610
|
-
".je-
|
|
26872
|
+
".form-group": "margin-bottom:1rem",
|
|
26873
|
+
".form-text": "display:block",
|
|
26874
|
+
".jsoneditor-twbs5-text-button": "background:none;padding:0;border:0;color:currentColor",
|
|
26875
|
+
"td > .form-group": "margin-bottom:0",
|
|
26876
|
+
".json-editor-btn-upload": "margin-top:1rem",
|
|
26877
|
+
".je-noindent .card": "padding:0;border:0",
|
|
26878
|
+
".je-tooltip:hover::before": "display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",
|
|
26879
|
+
".je-tooltip:hover::after": "display:block;position:absolute;font-size:0.8em;color:%23fff",
|
|
26880
|
+
".select2-container--default .select2-selection--single": "height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",
|
|
26881
|
+
".select2-container--default .select2-selection--single .select2-selection__arrow": "height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",
|
|
26882
|
+
".select2-container--default .select2-selection--single .select2-selection__rendered": "line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",
|
|
26883
|
+
".selectize-control.form-control": "padding:0",
|
|
26884
|
+
".selectize-dropdown.form-control": "padding:0;height:auto",
|
|
26611
26885
|
".je-upload-preview img": "float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",
|
|
26612
26886
|
".je-dropzone": "position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",
|
|
26613
26887
|
".je-dropzone:before": "position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",
|
|
@@ -26618,46 +26892,65 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26618
26892
|
|
|
26619
26893
|
/***/ }),
|
|
26620
26894
|
|
|
26621
|
-
/***/ "./src/themes/
|
|
26622
|
-
|
|
26623
|
-
!*** ./src/themes/
|
|
26624
|
-
|
|
26625
|
-
/*! exports provided:
|
|
26895
|
+
/***/ "./src/themes/bootstrap5.js":
|
|
26896
|
+
/*!**********************************!*\
|
|
26897
|
+
!*** ./src/themes/bootstrap5.js ***!
|
|
26898
|
+
\**********************************/
|
|
26899
|
+
/*! exports provided: bootstrap5Theme */
|
|
26626
26900
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
26627
26901
|
|
|
26628
26902
|
"use strict";
|
|
26629
26903
|
__webpack_require__.r(__webpack_exports__);
|
|
26630
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
26631
|
-
/* harmony import */ var
|
|
26632
|
-
/* harmony import */ var
|
|
26633
|
-
/* harmony import */ var
|
|
26634
|
-
/* harmony import */ var
|
|
26635
|
-
/* harmony import */ var
|
|
26636
|
-
/* harmony import */ var
|
|
26637
|
-
/* harmony import */ var
|
|
26638
|
-
/* harmony import */ var
|
|
26639
|
-
/* harmony import */ var
|
|
26640
|
-
/* harmony import */ var
|
|
26641
|
-
/* harmony import */ var
|
|
26642
|
-
/* harmony import */ var
|
|
26643
|
-
/* harmony import */ var
|
|
26644
|
-
/* harmony import */ var
|
|
26645
|
-
/* harmony import */ var
|
|
26646
|
-
/* harmony import */ var
|
|
26647
|
-
/* harmony import */ var
|
|
26648
|
-
/* harmony import */ var
|
|
26649
|
-
/* harmony import */ var
|
|
26650
|
-
/* harmony import */ var
|
|
26651
|
-
/* harmony import */ var
|
|
26652
|
-
/* harmony import */ var
|
|
26653
|
-
/* harmony import */ var
|
|
26654
|
-
/* harmony import */ var
|
|
26655
|
-
/* harmony import */ var
|
|
26656
|
-
/* harmony import */ var
|
|
26657
|
-
/* harmony import */ var
|
|
26658
|
-
/* harmony import */ var
|
|
26659
|
-
/* harmony import */ var
|
|
26660
|
-
/* harmony import */ var
|
|
26904
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bootstrap5Theme", function() { return bootstrap5Theme; });
|
|
26905
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
|
|
26906
|
+
/* 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__);
|
|
26907
|
+
/* 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");
|
|
26908
|
+
/* 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__);
|
|
26909
|
+
/* harmony import */ var core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.number.to-fixed.js */ "./node_modules/core-js/modules/es.number.to-fixed.js");
|
|
26910
|
+
/* harmony import */ var core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
26911
|
+
/* harmony import */ var core_js_modules_es_date_now_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.date.now.js */ "./node_modules/core-js/modules/es.date.now.js");
|
|
26912
|
+
/* harmony import */ var core_js_modules_es_date_now_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_now_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
26913
|
+
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
|
|
26914
|
+
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
26915
|
+
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
|
|
26916
|
+
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
26917
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
|
|
26918
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
26919
|
+
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
|
|
26920
|
+
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
26921
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
26922
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
26923
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
|
|
26924
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
26925
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
|
|
26926
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
26927
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
|
|
26928
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
26929
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
|
|
26930
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
26931
|
+
/* 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");
|
|
26932
|
+
/* 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__);
|
|
26933
|
+
/* 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");
|
|
26934
|
+
/* 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__);
|
|
26935
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
26936
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
26937
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
26938
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
26939
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
26940
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
26941
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
26942
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
26943
|
+
/* 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");
|
|
26944
|
+
/* 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__);
|
|
26945
|
+
/* 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");
|
|
26946
|
+
/* 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__);
|
|
26947
|
+
/* 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");
|
|
26948
|
+
/* 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__);
|
|
26949
|
+
/* 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");
|
|
26950
|
+
/* 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__);
|
|
26951
|
+
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
|
|
26952
|
+
/* harmony import */ var _bootstrap5_css_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./bootstrap5.css.js */ "./src/themes/bootstrap5.css.js");
|
|
26953
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../utilities */ "./src/utilities.js");
|
|
26661
26954
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
26662
26955
|
|
|
26663
26956
|
|
|
@@ -26675,9 +26968,798 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
26675
26968
|
|
|
26676
26969
|
|
|
26677
26970
|
|
|
26678
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26679
26971
|
|
|
26680
|
-
|
|
26972
|
+
|
|
26973
|
+
|
|
26974
|
+
|
|
26975
|
+
|
|
26976
|
+
|
|
26977
|
+
|
|
26978
|
+
|
|
26979
|
+
|
|
26980
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26981
|
+
|
|
26982
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
26983
|
+
|
|
26984
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
26985
|
+
|
|
26986
|
+
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
|
26987
|
+
|
|
26988
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
26989
|
+
|
|
26990
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
26991
|
+
|
|
26992
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
26993
|
+
|
|
26994
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
26995
|
+
|
|
26996
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
26997
|
+
|
|
26998
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26999
|
+
|
|
27000
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27001
|
+
|
|
27002
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
27003
|
+
|
|
27004
|
+
|
|
27005
|
+
|
|
27006
|
+
|
|
27007
|
+
/* Theme config options that allows changing various aspects of the output */
|
|
27008
|
+
|
|
27009
|
+
var options = {
|
|
27010
|
+
disable_theme_rules: false,
|
|
27011
|
+
input_size: 'normal',
|
|
27012
|
+
|
|
27013
|
+
/* Size of input and select elements. "small", "normal", "large" */
|
|
27014
|
+
object_indent: true,
|
|
27015
|
+
|
|
27016
|
+
/* Indent nested object elements (use nested .card layout) */
|
|
27017
|
+
object_background: 'bg-light',
|
|
27018
|
+
|
|
27019
|
+
/* Bootstrap 4 card background modifier class */
|
|
27020
|
+
object_text: '',
|
|
27021
|
+
|
|
27022
|
+
/* Bootstrap 5 card text color modifier class */
|
|
27023
|
+
table_border: false,
|
|
27024
|
+
|
|
27025
|
+
/* Add border to array "table" row and cells */
|
|
27026
|
+
table_zebrastyle: false,
|
|
27027
|
+
|
|
27028
|
+
/* Add "zebra style" to array "table" rows */
|
|
27029
|
+
tooltip: 'bootstrap'
|
|
27030
|
+
/* how to display tooltips (infoText). Can be `browser` for native `title`, `css` for simple CSS Styling, or `bootstrap` for TWBS/Popper.js handling */
|
|
27031
|
+
|
|
27032
|
+
};
|
|
27033
|
+
var bootstrap5Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
27034
|
+
_inherits(bootstrap5Theme, _AbstractTheme);
|
|
27035
|
+
|
|
27036
|
+
var _super = _createSuper(bootstrap5Theme);
|
|
27037
|
+
|
|
27038
|
+
function bootstrap5Theme(jsoneditor) {
|
|
27039
|
+
_classCallCheck(this, bootstrap5Theme);
|
|
27040
|
+
|
|
27041
|
+
return _super.call(this, jsoneditor, options);
|
|
27042
|
+
}
|
|
27043
|
+
|
|
27044
|
+
_createClass(bootstrap5Theme, [{
|
|
27045
|
+
key: "getSelectInput",
|
|
27046
|
+
value: function getSelectInput(options, multiple) {
|
|
27047
|
+
var el = _get(_getPrototypeOf(bootstrap5Theme.prototype), "getSelectInput", this).call(this, options);
|
|
27048
|
+
|
|
27049
|
+
el.classList.add('form-control');
|
|
27050
|
+
el.classList.add('form-select');
|
|
27051
|
+
if (this.options.input_size === 'small') el.classList.add('form-control-sm');
|
|
27052
|
+
if (this.options.input_size === 'large') el.classList.add('form-control-lg');
|
|
27053
|
+
return el;
|
|
27054
|
+
}
|
|
27055
|
+
}, {
|
|
27056
|
+
key: "getContainer",
|
|
27057
|
+
value: function getContainer() {
|
|
27058
|
+
var el = document.createElement('div');
|
|
27059
|
+
if (!this.options.object_indent) el.classList.add('je-noindent');
|
|
27060
|
+
return el;
|
|
27061
|
+
}
|
|
27062
|
+
}, {
|
|
27063
|
+
key: "setGridColumnSize",
|
|
27064
|
+
value: function setGridColumnSize(el, size, offset) {
|
|
27065
|
+
el.classList.add("col-md-".concat(size));
|
|
27066
|
+
|
|
27067
|
+
if (offset) {
|
|
27068
|
+
el.classList.add("offset-md-".concat(offset));
|
|
27069
|
+
}
|
|
27070
|
+
}
|
|
27071
|
+
}, {
|
|
27072
|
+
key: "afterInputReady",
|
|
27073
|
+
value: function afterInputReady(input) {
|
|
27074
|
+
if (input.controlgroup) return;
|
|
27075
|
+
/* set id/for */
|
|
27076
|
+
|
|
27077
|
+
/* is not working for: [type=file], [type=checkbox] */
|
|
27078
|
+
|
|
27079
|
+
var id = input.name;
|
|
27080
|
+
input.id = id;
|
|
27081
|
+
/* 2x parentNode, b/c range input has an <div> wrapper */
|
|
27082
|
+
|
|
27083
|
+
var label = input.parentNode.parentNode.getElementsByTagName('label')[0];
|
|
27084
|
+
|
|
27085
|
+
if (label) {
|
|
27086
|
+
label.classList.add('form-label');
|
|
27087
|
+
label.htmlFor = id;
|
|
27088
|
+
}
|
|
27089
|
+
|
|
27090
|
+
input.controlgroup = this.closest(input, '.form-group');
|
|
27091
|
+
}
|
|
27092
|
+
}, {
|
|
27093
|
+
key: "getTextareaInput",
|
|
27094
|
+
value: function getTextareaInput() {
|
|
27095
|
+
var el = document.createElement('textarea');
|
|
27096
|
+
el.classList.add('form-control');
|
|
27097
|
+
if (this.options.input_size === 'small') el.classList.add('form-control-sm');
|
|
27098
|
+
if (this.options.input_size === 'large') el.classList.add('form-control-lg');
|
|
27099
|
+
return el;
|
|
27100
|
+
}
|
|
27101
|
+
}, {
|
|
27102
|
+
key: "getRangeInput",
|
|
27103
|
+
value: function getRangeInput(min, max, step) {
|
|
27104
|
+
var el = _get(_getPrototypeOf(bootstrap5Theme.prototype), "getRangeInput", this).call(this, min, max, step);
|
|
27105
|
+
|
|
27106
|
+
el.classList.remove('form-control');
|
|
27107
|
+
el.classList.add('form-range');
|
|
27108
|
+
return el;
|
|
27109
|
+
}
|
|
27110
|
+
}, {
|
|
27111
|
+
key: "getStepperButtons",
|
|
27112
|
+
value: function getStepperButtons(input) {
|
|
27113
|
+
var inputGroup = document.createElement('div');
|
|
27114
|
+
var minusBtn = document.createElement('button');
|
|
27115
|
+
minusBtn.setAttribute('type', 'button');
|
|
27116
|
+
var plusBtn = document.createElement('button');
|
|
27117
|
+
plusBtn.setAttribute('type', 'button');
|
|
27118
|
+
inputGroup.appendChild(minusBtn);
|
|
27119
|
+
inputGroup.appendChild(input);
|
|
27120
|
+
inputGroup.appendChild(plusBtn);
|
|
27121
|
+
inputGroup.classList.add('input-group');
|
|
27122
|
+
minusBtn.classList.add('btn');
|
|
27123
|
+
minusBtn.classList.add('btn-secondary');
|
|
27124
|
+
minusBtn.classList.add('stepper-down');
|
|
27125
|
+
plusBtn.classList.add('btn');
|
|
27126
|
+
plusBtn.classList.add('btn-secondary');
|
|
27127
|
+
plusBtn.classList.add('stepper-up');
|
|
27128
|
+
var readonly = input.getAttribute('readonly');
|
|
27129
|
+
|
|
27130
|
+
if (readonly) {
|
|
27131
|
+
minusBtn.setAttribute('disabled', true);
|
|
27132
|
+
plusBtn.setAttribute('disabled', true);
|
|
27133
|
+
}
|
|
27134
|
+
|
|
27135
|
+
minusBtn.textContent = '-';
|
|
27136
|
+
plusBtn.textContent = '+';
|
|
27137
|
+
|
|
27138
|
+
var initialize = function initialize(input, min) {
|
|
27139
|
+
if (min) {
|
|
27140
|
+
input.value = Number(min);
|
|
27141
|
+
} else {
|
|
27142
|
+
input.value = Number(input.value);
|
|
27143
|
+
}
|
|
27144
|
+
|
|
27145
|
+
input.setAttribute('initialized', '1');
|
|
27146
|
+
};
|
|
27147
|
+
|
|
27148
|
+
var min = input.getAttribute('min');
|
|
27149
|
+
var max = input.getAttribute('max');
|
|
27150
|
+
input.addEventListener('change', function () {
|
|
27151
|
+
if (!input.getAttribute('initialized')) {
|
|
27152
|
+
input.setAttribute('initialized', '1');
|
|
27153
|
+
}
|
|
27154
|
+
});
|
|
27155
|
+
minusBtn.addEventListener('click', function () {
|
|
27156
|
+
if (!input.getAttribute('initialized')) {
|
|
27157
|
+
initialize(input, min);
|
|
27158
|
+
} else if (min) {
|
|
27159
|
+
if (Number(input.value) > Number(min)) {
|
|
27160
|
+
input.stepDown();
|
|
27161
|
+
}
|
|
27162
|
+
} else {
|
|
27163
|
+
input.stepDown();
|
|
27164
|
+
}
|
|
27165
|
+
|
|
27166
|
+
Object(_utilities__WEBPACK_IMPORTED_MODULE_25__["trigger"])(input, 'change');
|
|
27167
|
+
});
|
|
27168
|
+
plusBtn.addEventListener('click', function () {
|
|
27169
|
+
if (!input.getAttribute('initialized')) {
|
|
27170
|
+
initialize(input, min);
|
|
27171
|
+
} else if (max) {
|
|
27172
|
+
if (Number(input.value) < Number(max)) {
|
|
27173
|
+
input.stepUp();
|
|
27174
|
+
}
|
|
27175
|
+
} else {
|
|
27176
|
+
input.stepUp();
|
|
27177
|
+
}
|
|
27178
|
+
|
|
27179
|
+
Object(_utilities__WEBPACK_IMPORTED_MODULE_25__["trigger"])(input, 'change');
|
|
27180
|
+
});
|
|
27181
|
+
return inputGroup;
|
|
27182
|
+
}
|
|
27183
|
+
}, {
|
|
27184
|
+
key: "getFormInputField",
|
|
27185
|
+
value: function getFormInputField(type) {
|
|
27186
|
+
var el = _get(_getPrototypeOf(bootstrap5Theme.prototype), "getFormInputField", this).call(this, type);
|
|
27187
|
+
|
|
27188
|
+
if (type !== 'checkbox' && type !== 'radio') {
|
|
27189
|
+
el.classList.add('form-control');
|
|
27190
|
+
if (this.options.input_size === 'small') el.classList.add('form-control-sm');
|
|
27191
|
+
if (this.options.input_size === 'large') el.classList.add('form-control-lg');
|
|
27192
|
+
}
|
|
27193
|
+
|
|
27194
|
+
return el;
|
|
27195
|
+
}
|
|
27196
|
+
}, {
|
|
27197
|
+
key: "getFormControl",
|
|
27198
|
+
value: function getFormControl(label, input, description, infoText) {
|
|
27199
|
+
var group = document.createElement('div');
|
|
27200
|
+
group.classList.add('form-group');
|
|
27201
|
+
|
|
27202
|
+
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
27203
|
+
var check = document.createElement('div');
|
|
27204
|
+
check.classList.add('form-check');
|
|
27205
|
+
input.classList.add('form-check-input');
|
|
27206
|
+
label.classList.add('form-check-label');
|
|
27207
|
+
var unique = (Date.now() * Math.random()).toFixed(0);
|
|
27208
|
+
input.setAttribute('id', unique);
|
|
27209
|
+
label.setAttribute('for', unique);
|
|
27210
|
+
check.appendChild(input);
|
|
27211
|
+
check.appendChild(label);
|
|
27212
|
+
if (infoText) check.appendChild(infoText);
|
|
27213
|
+
group.appendChild(check);
|
|
27214
|
+
} else {
|
|
27215
|
+
if (label) {
|
|
27216
|
+
label.classList.add('form-label');
|
|
27217
|
+
group.appendChild(label);
|
|
27218
|
+
if (infoText) group.appendChild(infoText);
|
|
27219
|
+
}
|
|
27220
|
+
|
|
27221
|
+
group.appendChild(input);
|
|
27222
|
+
}
|
|
27223
|
+
|
|
27224
|
+
if (description) {
|
|
27225
|
+
group.appendChild(description);
|
|
27226
|
+
}
|
|
27227
|
+
|
|
27228
|
+
return group;
|
|
27229
|
+
}
|
|
27230
|
+
}, {
|
|
27231
|
+
key: "getInfoButton",
|
|
27232
|
+
value: function getInfoButton(text) {
|
|
27233
|
+
var button = document.createElement('button');
|
|
27234
|
+
/* shoud be a <button> but no fitting tbws style... */
|
|
27235
|
+
|
|
27236
|
+
button.type = 'button';
|
|
27237
|
+
button.classList.add('ms-3', 'jsoneditor-twbs5-text-button');
|
|
27238
|
+
button.setAttribute('data-toggle', 'tooltip');
|
|
27239
|
+
button.setAttribute('data-placement', 'auto');
|
|
27240
|
+
button.title = text;
|
|
27241
|
+
var icon = document.createTextNode('ⓘ');
|
|
27242
|
+
button.appendChild(icon);
|
|
27243
|
+
|
|
27244
|
+
if (this.options.tooltip === 'bootstrap') {
|
|
27245
|
+
if (window.jQuery && window.jQuery().tooltip) {
|
|
27246
|
+
window.jQuery(button).tooltip();
|
|
27247
|
+
} else {
|
|
27248
|
+
// eslint-disable-next-line no-console
|
|
27249
|
+
console.warn('Could not find popper jQuery plugin of Bootstrap.');
|
|
27250
|
+
}
|
|
27251
|
+
} else if (this.options.tooltip === 'css') {
|
|
27252
|
+
button.classList.add('je-tooltip');
|
|
27253
|
+
}
|
|
27254
|
+
/* else -> nothing todo for native [title] handling */
|
|
27255
|
+
|
|
27256
|
+
|
|
27257
|
+
return button;
|
|
27258
|
+
}
|
|
27259
|
+
/**
|
|
27260
|
+
* Generates a checkbox...
|
|
27261
|
+
*
|
|
27262
|
+
* Overwriten from master theme to get rid of inline styles.
|
|
27263
|
+
*/
|
|
27264
|
+
|
|
27265
|
+
}, {
|
|
27266
|
+
key: "getCheckbox",
|
|
27267
|
+
value: function getCheckbox() {
|
|
27268
|
+
var el = this.getFormInputField('checkbox');
|
|
27269
|
+
return el;
|
|
27270
|
+
}
|
|
27271
|
+
/**
|
|
27272
|
+
* Multiple checkboxes in a row.
|
|
27273
|
+
*
|
|
27274
|
+
*/
|
|
27275
|
+
|
|
27276
|
+
}, {
|
|
27277
|
+
key: "getMultiCheckboxHolder",
|
|
27278
|
+
value: function getMultiCheckboxHolder(controls, label, description, infoText) {
|
|
27279
|
+
var el = document.createElement('div');
|
|
27280
|
+
el.classList.add('form-group');
|
|
27281
|
+
|
|
27282
|
+
if (label) {
|
|
27283
|
+
el.appendChild(label);
|
|
27284
|
+
|
|
27285
|
+
if (infoText) {
|
|
27286
|
+
label.appendChild(infoText);
|
|
27287
|
+
}
|
|
27288
|
+
}
|
|
27289
|
+
/* for inline view we need an container so it doesnt wrap in the "row" of the <label> */
|
|
27290
|
+
|
|
27291
|
+
|
|
27292
|
+
var container = document.createElement('div');
|
|
27293
|
+
Object.values(controls).forEach(function (c) {
|
|
27294
|
+
/* controls are already parsed by getFormControl() so they have an .form-group */
|
|
27295
|
+
|
|
27296
|
+
/* wrapper we need to get rid of... */
|
|
27297
|
+
var ctrl = c.firstChild;
|
|
27298
|
+
container.appendChild(ctrl);
|
|
27299
|
+
});
|
|
27300
|
+
el.appendChild(container);
|
|
27301
|
+
if (description) el.appendChild(description);
|
|
27302
|
+
return el;
|
|
27303
|
+
}
|
|
27304
|
+
/**
|
|
27305
|
+
* Single radio element
|
|
27306
|
+
*/
|
|
27307
|
+
|
|
27308
|
+
}, {
|
|
27309
|
+
key: "getFormRadio",
|
|
27310
|
+
value: function getFormRadio(attributes) {
|
|
27311
|
+
var el = this.getFormInputField('radio');
|
|
27312
|
+
|
|
27313
|
+
for (var key in attributes) {
|
|
27314
|
+
el.setAttribute(key, attributes[key]);
|
|
27315
|
+
}
|
|
27316
|
+
|
|
27317
|
+
el.classList.add('form-check-input');
|
|
27318
|
+
return el;
|
|
27319
|
+
}
|
|
27320
|
+
/**
|
|
27321
|
+
* Add the <label> for the single radio from getFormRadio()
|
|
27322
|
+
*
|
|
27323
|
+
*/
|
|
27324
|
+
|
|
27325
|
+
}, {
|
|
27326
|
+
key: "getFormRadioLabel",
|
|
27327
|
+
value: function getFormRadioLabel(text, req) {
|
|
27328
|
+
var el = document.createElement('label');
|
|
27329
|
+
el.classList.add('form-check-label');
|
|
27330
|
+
el.appendChild(document.createTextNode(text));
|
|
27331
|
+
return el;
|
|
27332
|
+
}
|
|
27333
|
+
/**
|
|
27334
|
+
* Stack the radios from getFormRadio()/getFormRadioLabel()
|
|
27335
|
+
*
|
|
27336
|
+
*/
|
|
27337
|
+
|
|
27338
|
+
}, {
|
|
27339
|
+
key: "getFormRadioControl",
|
|
27340
|
+
value: function getFormRadioControl(label, input, compact) {
|
|
27341
|
+
var el = document.createElement('div');
|
|
27342
|
+
el.classList.add('form-check');
|
|
27343
|
+
el.appendChild(input);
|
|
27344
|
+
el.appendChild(label);
|
|
27345
|
+
|
|
27346
|
+
if (compact) {
|
|
27347
|
+
el.classList.add('form-check-inline');
|
|
27348
|
+
}
|
|
27349
|
+
|
|
27350
|
+
return el;
|
|
27351
|
+
}
|
|
27352
|
+
}, {
|
|
27353
|
+
key: "getIndentedPanel",
|
|
27354
|
+
value: function getIndentedPanel() {
|
|
27355
|
+
var el = document.createElement('div');
|
|
27356
|
+
el.classList.add('card', 'card-body', 'my-3');
|
|
27357
|
+
|
|
27358
|
+
if (this.options.object_background) {
|
|
27359
|
+
el.classList.add(this.options.object_background);
|
|
27360
|
+
}
|
|
27361
|
+
|
|
27362
|
+
if (this.options.object_text) {
|
|
27363
|
+
el.classList.add(this.options.object_text);
|
|
27364
|
+
}
|
|
27365
|
+
/* for better twbs card styling we should be able to return a nested div */
|
|
27366
|
+
|
|
27367
|
+
|
|
27368
|
+
return el;
|
|
27369
|
+
}
|
|
27370
|
+
}, {
|
|
27371
|
+
key: "getFormInputDescription",
|
|
27372
|
+
value: function getFormInputDescription(text) {
|
|
27373
|
+
var el = document.createElement('small');
|
|
27374
|
+
el.classList.add('form-text');
|
|
27375
|
+
el.classList.add('d-block');
|
|
27376
|
+
|
|
27377
|
+
if (window.DOMPurify) {
|
|
27378
|
+
el.innerHTML = window.DOMPurify.sanitize(text);
|
|
27379
|
+
} else {
|
|
27380
|
+
el.textContent = this.cleanText(text);
|
|
27381
|
+
}
|
|
27382
|
+
|
|
27383
|
+
return el;
|
|
27384
|
+
}
|
|
27385
|
+
}, {
|
|
27386
|
+
key: "getHeader",
|
|
27387
|
+
value: function getHeader(text, pathDepth) {
|
|
27388
|
+
var el = document.createElement('h3');
|
|
27389
|
+
el.classList.add('card-title');
|
|
27390
|
+
el.classList.add('level-' + pathDepth);
|
|
27391
|
+
|
|
27392
|
+
if (typeof text === 'string') {
|
|
27393
|
+
el.textContent = text;
|
|
27394
|
+
} else {
|
|
27395
|
+
el.appendChild(text);
|
|
27396
|
+
}
|
|
27397
|
+
|
|
27398
|
+
el.style.display = 'inline-block';
|
|
27399
|
+
return el;
|
|
27400
|
+
}
|
|
27401
|
+
}, {
|
|
27402
|
+
key: "getHeaderButtonHolder",
|
|
27403
|
+
value: function getHeaderButtonHolder() {
|
|
27404
|
+
var el = this.getButtonHolder();
|
|
27405
|
+
return el;
|
|
27406
|
+
}
|
|
27407
|
+
}, {
|
|
27408
|
+
key: "getButtonHolder",
|
|
27409
|
+
value: function getButtonHolder() {
|
|
27410
|
+
var el = document.createElement('span');
|
|
27411
|
+
el.classList.add('btn-group');
|
|
27412
|
+
return el;
|
|
27413
|
+
}
|
|
27414
|
+
}, {
|
|
27415
|
+
key: "getFormButtonHolder",
|
|
27416
|
+
value: function getFormButtonHolder(buttonAlign) {
|
|
27417
|
+
var el = this.getButtonHolder();
|
|
27418
|
+
el.classList.add('d-block');
|
|
27419
|
+
if (buttonAlign === 'center') el.classList.add('text-center');else if (buttonAlign === 'right') el.classList.add('text-end');
|
|
27420
|
+
return el;
|
|
27421
|
+
}
|
|
27422
|
+
}, {
|
|
27423
|
+
key: "getButton",
|
|
27424
|
+
value: function getButton(text, icon, title) {
|
|
27425
|
+
var el = _get(_getPrototypeOf(bootstrap5Theme.prototype), "getButton", this).call(this, text, icon, title);
|
|
27426
|
+
|
|
27427
|
+
el.classList.add('btn', 'btn-secondary', 'btn-sm');
|
|
27428
|
+
return el;
|
|
27429
|
+
}
|
|
27430
|
+
}, {
|
|
27431
|
+
key: "getTable",
|
|
27432
|
+
value: function getTable() {
|
|
27433
|
+
var el = document.createElement('table');
|
|
27434
|
+
el.classList.add('table', 'table-sm');
|
|
27435
|
+
|
|
27436
|
+
if (this.options.table_border) {
|
|
27437
|
+
el.classList.add('table-bordered');
|
|
27438
|
+
}
|
|
27439
|
+
|
|
27440
|
+
if (this.options.table_zebrastyle) {
|
|
27441
|
+
el.classList.add('table-striped');
|
|
27442
|
+
}
|
|
27443
|
+
|
|
27444
|
+
return el;
|
|
27445
|
+
}
|
|
27446
|
+
}, {
|
|
27447
|
+
key: "getErrorMessage",
|
|
27448
|
+
value: function getErrorMessage(text) {
|
|
27449
|
+
var el = document.createElement('div');
|
|
27450
|
+
el.classList.add('alert', 'alert-danger');
|
|
27451
|
+
el.setAttribute('role', 'alert');
|
|
27452
|
+
el.appendChild(document.createTextNode(text));
|
|
27453
|
+
return el;
|
|
27454
|
+
}
|
|
27455
|
+
/**
|
|
27456
|
+
* input validation on <input>
|
|
27457
|
+
*/
|
|
27458
|
+
|
|
27459
|
+
}, {
|
|
27460
|
+
key: "addInputError",
|
|
27461
|
+
value: function addInputError(input, text) {
|
|
27462
|
+
if (!input.controlgroup) return;
|
|
27463
|
+
input.controlgroup.classList.add('is-invalid');
|
|
27464
|
+
|
|
27465
|
+
if (!input.errmsg) {
|
|
27466
|
+
input.errmsg = document.createElement('p');
|
|
27467
|
+
input.errmsg.classList.add('invalid-feedback');
|
|
27468
|
+
input.controlgroup.appendChild(input.errmsg);
|
|
27469
|
+
input.errmsg.style.display = 'block';
|
|
27470
|
+
}
|
|
27471
|
+
|
|
27472
|
+
input.errmsg.style.display = 'block';
|
|
27473
|
+
input.errmsg.textContent = text;
|
|
27474
|
+
}
|
|
27475
|
+
}, {
|
|
27476
|
+
key: "removeInputError",
|
|
27477
|
+
value: function removeInputError(input) {
|
|
27478
|
+
if (!input.errmsg) return;
|
|
27479
|
+
input.errmsg.style.display = 'none';
|
|
27480
|
+
input.controlgroup.classList.remove('is-invalid');
|
|
27481
|
+
}
|
|
27482
|
+
}, {
|
|
27483
|
+
key: "getTabHolder",
|
|
27484
|
+
value: function getTabHolder(propertyName) {
|
|
27485
|
+
var el = document.createElement('div');
|
|
27486
|
+
var pName = typeof propertyName === 'undefined' ? '' : propertyName;
|
|
27487
|
+
el.innerHTML = "<div class='col-md-2' id='".concat(pName, "'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(pName, "'></div></div>");
|
|
27488
|
+
el.classList.add('row');
|
|
27489
|
+
return el;
|
|
27490
|
+
}
|
|
27491
|
+
}, {
|
|
27492
|
+
key: "addTab",
|
|
27493
|
+
value: function addTab(holder, tab) {
|
|
27494
|
+
holder.children[0].children[0].appendChild(tab);
|
|
27495
|
+
}
|
|
27496
|
+
}, {
|
|
27497
|
+
key: "getTabContentHolder",
|
|
27498
|
+
value: function getTabContentHolder(tabHolder) {
|
|
27499
|
+
return tabHolder.children[1].children[0];
|
|
27500
|
+
}
|
|
27501
|
+
}, {
|
|
27502
|
+
key: "getTopTabHolder",
|
|
27503
|
+
value: function getTopTabHolder(propertyName) {
|
|
27504
|
+
var pName = typeof propertyName === 'undefined' ? '' : propertyName;
|
|
27505
|
+
var el = document.createElement('div');
|
|
27506
|
+
el.classList.add('card');
|
|
27507
|
+
el.innerHTML = "<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(pName, "'></ul></div><div class='card-body'><div class='tab-content' id='").concat(pName, "'></div></div>");
|
|
27508
|
+
return el;
|
|
27509
|
+
}
|
|
27510
|
+
}, {
|
|
27511
|
+
key: "getTab",
|
|
27512
|
+
value: function getTab(text, tabId) {
|
|
27513
|
+
var liel = document.createElement('li');
|
|
27514
|
+
liel.classList.add('nav-item');
|
|
27515
|
+
var ael = document.createElement('a');
|
|
27516
|
+
ael.classList.add('nav-link');
|
|
27517
|
+
ael.setAttribute('href', "#".concat(tabId));
|
|
27518
|
+
ael.setAttribute('data-toggle', 'tab');
|
|
27519
|
+
ael.appendChild(text);
|
|
27520
|
+
liel.appendChild(ael);
|
|
27521
|
+
return liel;
|
|
27522
|
+
}
|
|
27523
|
+
}, {
|
|
27524
|
+
key: "getTopTab",
|
|
27525
|
+
value: function getTopTab(text, tabId) {
|
|
27526
|
+
var el = document.createElement('li');
|
|
27527
|
+
el.classList.add('nav-item');
|
|
27528
|
+
var a = document.createElement('a');
|
|
27529
|
+
a.classList.add('nav-link');
|
|
27530
|
+
a.setAttribute('href', "#".concat(tabId));
|
|
27531
|
+
a.setAttribute('data-toggle', 'tab');
|
|
27532
|
+
a.appendChild(text);
|
|
27533
|
+
el.appendChild(a);
|
|
27534
|
+
return el;
|
|
27535
|
+
}
|
|
27536
|
+
}, {
|
|
27537
|
+
key: "getTabContent",
|
|
27538
|
+
value: function getTabContent() {
|
|
27539
|
+
var el = document.createElement('div');
|
|
27540
|
+
el.classList.add('tab-pane');
|
|
27541
|
+
el.setAttribute('role', 'tabpanel');
|
|
27542
|
+
return el;
|
|
27543
|
+
}
|
|
27544
|
+
}, {
|
|
27545
|
+
key: "getTopTabContent",
|
|
27546
|
+
value: function getTopTabContent() {
|
|
27547
|
+
var el = document.createElement('div');
|
|
27548
|
+
el.classList.add('tab-pane');
|
|
27549
|
+
el.setAttribute('role', 'tabpanel');
|
|
27550
|
+
return el;
|
|
27551
|
+
}
|
|
27552
|
+
}, {
|
|
27553
|
+
key: "markTabActive",
|
|
27554
|
+
value: function markTabActive(row) {
|
|
27555
|
+
row.tab.firstChild.classList.add('active');
|
|
27556
|
+
|
|
27557
|
+
if (typeof row.rowPane !== 'undefined') {
|
|
27558
|
+
row.rowPane.classList.add('active');
|
|
27559
|
+
} else {
|
|
27560
|
+
row.container.classList.add('active');
|
|
27561
|
+
}
|
|
27562
|
+
}
|
|
27563
|
+
}, {
|
|
27564
|
+
key: "markTabInactive",
|
|
27565
|
+
value: function markTabInactive(row) {
|
|
27566
|
+
row.tab.firstChild.classList.remove('active');
|
|
27567
|
+
|
|
27568
|
+
if (typeof row.rowPane !== 'undefined') {
|
|
27569
|
+
row.rowPane.classList.remove('active');
|
|
27570
|
+
} else {
|
|
27571
|
+
row.container.classList.remove('active');
|
|
27572
|
+
}
|
|
27573
|
+
}
|
|
27574
|
+
}, {
|
|
27575
|
+
key: "insertBasicTopTab",
|
|
27576
|
+
value: function insertBasicTopTab(tab, newTabsHolder) {
|
|
27577
|
+
newTabsHolder.children[0].children[0].insertBefore(tab, newTabsHolder.children[0].children[0].firstChild);
|
|
27578
|
+
}
|
|
27579
|
+
}, {
|
|
27580
|
+
key: "addTopTab",
|
|
27581
|
+
value: function addTopTab(holder, tab) {
|
|
27582
|
+
holder.children[0].children[0].appendChild(tab);
|
|
27583
|
+
}
|
|
27584
|
+
}, {
|
|
27585
|
+
key: "getTopTabContentHolder",
|
|
27586
|
+
value: function getTopTabContentHolder(tabHolder) {
|
|
27587
|
+
return tabHolder.children[1].children[0];
|
|
27588
|
+
}
|
|
27589
|
+
}, {
|
|
27590
|
+
key: "getFirstTab",
|
|
27591
|
+
value: function getFirstTab(holder) {
|
|
27592
|
+
return holder.firstChild.firstChild.firstChild;
|
|
27593
|
+
}
|
|
27594
|
+
}, {
|
|
27595
|
+
key: "getProgressBar",
|
|
27596
|
+
value: function getProgressBar() {
|
|
27597
|
+
var min = 0;
|
|
27598
|
+
var max = 100;
|
|
27599
|
+
var start = 0;
|
|
27600
|
+
var container = document.createElement('div');
|
|
27601
|
+
container.classList.add('progress');
|
|
27602
|
+
var bar = document.createElement('div');
|
|
27603
|
+
bar.classList.add('progress-bar');
|
|
27604
|
+
bar.setAttribute('role', 'progressbar');
|
|
27605
|
+
bar.setAttribute('aria-valuenow', start);
|
|
27606
|
+
bar.setAttribute('aria-valuemin', min);
|
|
27607
|
+
bar.setAttribute('aria-valuenax', max);
|
|
27608
|
+
bar.innerHTML = "".concat(start, "%");
|
|
27609
|
+
container.appendChild(bar);
|
|
27610
|
+
return container;
|
|
27611
|
+
}
|
|
27612
|
+
}, {
|
|
27613
|
+
key: "updateProgressBar",
|
|
27614
|
+
value: function updateProgressBar(progressBar, progress) {
|
|
27615
|
+
if (!progressBar) return;
|
|
27616
|
+
var bar = progressBar.firstChild;
|
|
27617
|
+
var percentage = "".concat(progress, "%");
|
|
27618
|
+
bar.setAttribute('aria-valuenow', progress);
|
|
27619
|
+
bar.style.width = percentage;
|
|
27620
|
+
bar.innerHTML = percentage;
|
|
27621
|
+
}
|
|
27622
|
+
}, {
|
|
27623
|
+
key: "updateProgressBarUnknown",
|
|
27624
|
+
value: function updateProgressBarUnknown(progressBar) {
|
|
27625
|
+
if (!progressBar) return;
|
|
27626
|
+
var bar = progressBar.firstChild;
|
|
27627
|
+
progressBar.classList.add('progress', 'progress-striped', 'active');
|
|
27628
|
+
bar.removeAttribute('aria-valuenow');
|
|
27629
|
+
bar.style.width = '100%';
|
|
27630
|
+
bar.innerHTML = '';
|
|
27631
|
+
}
|
|
27632
|
+
}, {
|
|
27633
|
+
key: "getBlockLink",
|
|
27634
|
+
value: function getBlockLink() {
|
|
27635
|
+
var link = document.createElement('a');
|
|
27636
|
+
link.classList.add('mb-3', 'd-inline-block');
|
|
27637
|
+
return link;
|
|
27638
|
+
}
|
|
27639
|
+
/**
|
|
27640
|
+
* Link after successfull upload
|
|
27641
|
+
*/
|
|
27642
|
+
|
|
27643
|
+
}, {
|
|
27644
|
+
key: "getLinksHolder",
|
|
27645
|
+
value: function getLinksHolder() {
|
|
27646
|
+
var el = document.createElement('div');
|
|
27647
|
+
return el;
|
|
27648
|
+
}
|
|
27649
|
+
}, {
|
|
27650
|
+
key: "getInputGroup",
|
|
27651
|
+
value: function getInputGroup(input, buttons) {
|
|
27652
|
+
if (!input) return;
|
|
27653
|
+
var inputGroupContainer = document.createElement('div');
|
|
27654
|
+
inputGroupContainer.classList.add('input-group');
|
|
27655
|
+
inputGroupContainer.appendChild(input);
|
|
27656
|
+
|
|
27657
|
+
for (var i = 0; i < buttons.length; i++) {
|
|
27658
|
+
/* this uses the getButton() wrapper, so we have to remove the panel/ctrl spacing for this case */
|
|
27659
|
+
buttons[i].classList.remove('me-2', 'btn-secondary');
|
|
27660
|
+
buttons[i].classList.add('btn-outline-secondary');
|
|
27661
|
+
inputGroupContainer.appendChild(buttons[i]);
|
|
27662
|
+
}
|
|
27663
|
+
|
|
27664
|
+
return inputGroupContainer;
|
|
27665
|
+
}
|
|
27666
|
+
}]);
|
|
27667
|
+
|
|
27668
|
+
return bootstrap5Theme;
|
|
27669
|
+
}(_theme_js__WEBPACK_IMPORTED_MODULE_23__["AbstractTheme"]);
|
|
27670
|
+
/* Custom stylesheet rules. format: "selector" : "CSS rules" */
|
|
27671
|
+
|
|
27672
|
+
bootstrap5Theme.rules = _bootstrap5_css_js__WEBPACK_IMPORTED_MODULE_24__["default"];
|
|
27673
|
+
|
|
27674
|
+
/***/ }),
|
|
27675
|
+
|
|
27676
|
+
/***/ "./src/themes/html.css.js":
|
|
27677
|
+
/*!********************************!*\
|
|
27678
|
+
!*** ./src/themes/html.css.js ***!
|
|
27679
|
+
\********************************/
|
|
27680
|
+
/*! exports provided: default */
|
|
27681
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
27682
|
+
|
|
27683
|
+
"use strict";
|
|
27684
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27685
|
+
/* eslint-disable */
|
|
27686
|
+
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
27687
|
+
".je-form-input-label": "display:block;margin-bottom:3px;font-weight:bold",
|
|
27688
|
+
".je-form-input-description": "display:inline-block;margin:0;font-size:0.8em;font-style:italic",
|
|
27689
|
+
".je-indented-panel": "padding:5px;margin:10px;border-radius:3px;border:1px%20solid%20%23ddd",
|
|
27690
|
+
".je-child-editor-holder": "margin-bottom:8px",
|
|
27691
|
+
".je-header-button-holder": "display:inline-block;margin-left:10px;font-size:0.8em;vertical-align:middle",
|
|
27692
|
+
".je-table": "margin-bottom:5px;border-bottom:1px%20solid%20%23ccc",
|
|
27693
|
+
".je-upload-preview img": "float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",
|
|
27694
|
+
".je-dropzone": "position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",
|
|
27695
|
+
".je-dropzone:before": "position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",
|
|
27696
|
+
".je-dropzone.valid-dropzone": "background:green",
|
|
27697
|
+
".je-dropzone.invalid-dropzone": "background:red"
|
|
27698
|
+
});
|
|
27699
|
+
/* eslint-enable */
|
|
27700
|
+
|
|
27701
|
+
/***/ }),
|
|
27702
|
+
|
|
27703
|
+
/***/ "./src/themes/html.js":
|
|
27704
|
+
/*!****************************!*\
|
|
27705
|
+
!*** ./src/themes/html.js ***!
|
|
27706
|
+
\****************************/
|
|
27707
|
+
/*! exports provided: htmlTheme */
|
|
27708
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
27709
|
+
|
|
27710
|
+
"use strict";
|
|
27711
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27712
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "htmlTheme", function() { return htmlTheme; });
|
|
27713
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
|
|
27714
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
27715
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
|
|
27716
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
27717
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
|
|
27718
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
27719
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
|
|
27720
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
27721
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
|
|
27722
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
27723
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
27724
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
27725
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
27726
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
27727
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
27728
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
27729
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
27730
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
27731
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
27732
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
27733
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
27734
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
27735
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
27736
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
27737
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
27738
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
27739
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
27740
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
27741
|
+
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
|
|
27742
|
+
/* harmony import */ var _html_css_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./html.css.js */ "./src/themes/html.css.js");
|
|
27743
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
27744
|
+
|
|
27745
|
+
|
|
27746
|
+
|
|
27747
|
+
|
|
27748
|
+
|
|
27749
|
+
|
|
27750
|
+
|
|
27751
|
+
|
|
27752
|
+
|
|
27753
|
+
|
|
27754
|
+
|
|
27755
|
+
|
|
27756
|
+
|
|
27757
|
+
|
|
27758
|
+
|
|
27759
|
+
|
|
27760
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27761
|
+
|
|
27762
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
26681
27763
|
|
|
26682
27764
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
26683
27765
|
|
|
@@ -26814,13 +27896,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26814
27896
|
/* harmony import */ var _html_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./html.js */ "./src/themes/html.js");
|
|
26815
27897
|
/* harmony import */ var _bootstrap3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bootstrap3.js */ "./src/themes/bootstrap3.js");
|
|
26816
27898
|
/* harmony import */ var _bootstrap4_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bootstrap4.js */ "./src/themes/bootstrap4.js");
|
|
26817
|
-
/* harmony import */ var
|
|
26818
|
-
/* harmony import */ var
|
|
26819
|
-
/* harmony import */ var
|
|
26820
|
-
/* harmony import */ var
|
|
27899
|
+
/* harmony import */ var _bootstrap5_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bootstrap5.js */ "./src/themes/bootstrap5.js");
|
|
27900
|
+
/* harmony import */ var _jqueryui_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./jqueryui.js */ "./src/themes/jqueryui.js");
|
|
27901
|
+
/* harmony import */ var _barebones_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./barebones.js */ "./src/themes/barebones.js");
|
|
27902
|
+
/* harmony import */ var _spectre_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./spectre.js */ "./src/themes/spectre.js");
|
|
27903
|
+
/* harmony import */ var _tailwind_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tailwind.js */ "./src/themes/tailwind.js");
|
|
26821
27904
|
// import { bootstrap2Theme } from './bootstrap2'
|
|
26822
27905
|
|
|
26823
27906
|
|
|
27907
|
+
|
|
26824
27908
|
// import { foundationTheme, foundation3Theme, foundation4Theme, foundation5Theme, foundation6Theme } from './foundation.js'
|
|
26825
27909
|
|
|
26826
27910
|
|
|
@@ -26833,16 +27917,17 @@ var themes = {
|
|
|
26833
27917
|
// bootstrap2: bootstrap2Theme,
|
|
26834
27918
|
bootstrap3: _bootstrap3_js__WEBPACK_IMPORTED_MODULE_1__["bootstrap3Theme"],
|
|
26835
27919
|
bootstrap4: _bootstrap4_js__WEBPACK_IMPORTED_MODULE_2__["bootstrap4Theme"],
|
|
27920
|
+
bootstrap5: _bootstrap5_js__WEBPACK_IMPORTED_MODULE_3__["bootstrap5Theme"],
|
|
26836
27921
|
// foundation: foundationTheme,
|
|
26837
27922
|
// foundation3: foundation3Theme,
|
|
26838
27923
|
// foundation4: foundation4Theme,
|
|
26839
27924
|
// foundation5: foundation5Theme,
|
|
26840
27925
|
// foundation6: foundation6Theme,
|
|
26841
|
-
jqueryui:
|
|
26842
|
-
barebones:
|
|
27926
|
+
jqueryui: _jqueryui_js__WEBPACK_IMPORTED_MODULE_4__["jqueryuiTheme"],
|
|
27927
|
+
barebones: _barebones_js__WEBPACK_IMPORTED_MODULE_5__["barebonesTheme"],
|
|
26843
27928
|
// materialize: materializeTheme,
|
|
26844
|
-
spectre:
|
|
26845
|
-
tailwind:
|
|
27929
|
+
spectre: _spectre_js__WEBPACK_IMPORTED_MODULE_6__["spectreTheme"],
|
|
27930
|
+
tailwind: _tailwind_js__WEBPACK_IMPORTED_MODULE_7__["tailwindTheme"]
|
|
26846
27931
|
};
|
|
26847
27932
|
|
|
26848
27933
|
/***/ }),
|
|
@@ -28339,7 +29424,7 @@ var tailwindTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
28339
29424
|
value: function addInputError(input, text) {
|
|
28340
29425
|
if (!input.controlgroup) return;
|
|
28341
29426
|
input.controlgroup.classList.add('has-error');
|
|
28342
|
-
input.classList.add('
|
|
29427
|
+
input.controlgroup.classList.add('text-red-600');
|
|
28343
29428
|
|
|
28344
29429
|
if (!input.errmsg) {
|
|
28345
29430
|
input.errmsg = document.createElement('p');
|
|
@@ -28356,7 +29441,7 @@ var tailwindTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
28356
29441
|
value: function removeInputError(input) {
|
|
28357
29442
|
if (!input.errmsg) return;
|
|
28358
29443
|
input.errmsg.style.display = 'none';
|
|
28359
|
-
input.classList.remove('
|
|
29444
|
+
input.controlgroup.classList.remove('text-red-600');
|
|
28360
29445
|
input.controlgroup.classList.remove('has-error');
|
|
28361
29446
|
}
|
|
28362
29447
|
}, {
|