jedison 1.12.1 → 1.12.3
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 +9 -0
- package/dist/cjs/jedison.cjs +1 -1
- package/dist/cjs/jedison.cjs.map +1 -1
- package/dist/esm/jedison.js +495 -2
- package/dist/esm/jedison.js.map +1 -1
- package/dist/umd/jedison.umd.js +1 -1
- package/dist/umd/jedison.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/jedison.js
CHANGED
|
@@ -2207,6 +2207,9 @@ class Editor {
|
|
|
2207
2207
|
}
|
|
2208
2208
|
adaptForTable() {
|
|
2209
2209
|
}
|
|
2210
|
+
// eslint-disable-next-line no-unused-vars
|
|
2211
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
2212
|
+
}
|
|
2210
2213
|
/**
|
|
2211
2214
|
* Adds attributes to generated html elements if specified in schema x-options
|
|
2212
2215
|
*/
|
|
@@ -2817,7 +2820,12 @@ class InstanceMultiple extends Instance {
|
|
|
2817
2820
|
this.activeInstance.setValue(value, false, initiator);
|
|
2818
2821
|
}
|
|
2819
2822
|
this.activeInstance.children.forEach((child) => child.register());
|
|
2820
|
-
this.
|
|
2823
|
+
const newValue = this.activeInstance.getValueRaw();
|
|
2824
|
+
const valueWillChange = different(this.value, newValue);
|
|
2825
|
+
this.setValue(newValue, true, initiator);
|
|
2826
|
+
if (!valueWillChange) {
|
|
2827
|
+
this.emit("change", initiator);
|
|
2828
|
+
}
|
|
2821
2829
|
}
|
|
2822
2830
|
onSetValue() {
|
|
2823
2831
|
if (different(this.activeInstance.getValueRaw(), this.value)) {
|
|
@@ -3378,6 +3386,9 @@ class EditorRadios extends EditorBoolean {
|
|
|
3378
3386
|
adaptForTable() {
|
|
3379
3387
|
this.theme.adaptForTableRadiosControl(this.control);
|
|
3380
3388
|
}
|
|
3389
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3390
|
+
this.theme.adaptForHorizontalRadiosControl(this.control, labelCol, inputCol);
|
|
3391
|
+
}
|
|
3381
3392
|
addEventListeners() {
|
|
3382
3393
|
this.control.radios.forEach((radio) => {
|
|
3383
3394
|
radio.addEventListener("change", () => {
|
|
@@ -3422,6 +3433,9 @@ class EditorBooleanSelect extends EditorBoolean {
|
|
|
3422
3433
|
adaptForTable() {
|
|
3423
3434
|
this.theme.adaptForTableSelectControl(this.control);
|
|
3424
3435
|
}
|
|
3436
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3437
|
+
this.theme.adaptForHorizontalSelectControl(this.control, labelCol, inputCol);
|
|
3438
|
+
}
|
|
3425
3439
|
addEventListeners() {
|
|
3426
3440
|
this.control.input.addEventListener("change", () => {
|
|
3427
3441
|
const value = this.control.input.value === "true";
|
|
@@ -3450,6 +3464,9 @@ class EditorBooleanCheckbox extends EditorBoolean {
|
|
|
3450
3464
|
adaptForTable(td) {
|
|
3451
3465
|
this.theme.adaptForTableCheckboxControl(this.control, td);
|
|
3452
3466
|
}
|
|
3467
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3468
|
+
this.theme.adaptForHorizontalCheckboxControl(this.control, labelCol, inputCol);
|
|
3469
|
+
}
|
|
3453
3470
|
addEventListeners() {
|
|
3454
3471
|
this.control.input.addEventListener("change", () => {
|
|
3455
3472
|
this.instance.setValue(this.control.input.checked, true, "user");
|
|
@@ -3555,6 +3572,9 @@ class EditorStringRadios extends EditorString {
|
|
|
3555
3572
|
adaptForTable() {
|
|
3556
3573
|
this.theme.adaptForTableRadiosControl(this.control);
|
|
3557
3574
|
}
|
|
3575
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3576
|
+
this.theme.adaptForHorizontalRadiosControl(this.control, labelCol, inputCol);
|
|
3577
|
+
}
|
|
3558
3578
|
addEventListeners() {
|
|
3559
3579
|
this.control.radios.forEach((radio) => {
|
|
3560
3580
|
radio.addEventListener("change", () => {
|
|
@@ -3638,6 +3658,9 @@ class EditorStringSelect extends EditorString {
|
|
|
3638
3658
|
adaptForTable() {
|
|
3639
3659
|
this.theme.adaptForTableSelectControl(this.control);
|
|
3640
3660
|
}
|
|
3661
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3662
|
+
this.theme.adaptForHorizontalSelectControl(this.control, labelCol, inputCol);
|
|
3663
|
+
}
|
|
3641
3664
|
addEventListeners() {
|
|
3642
3665
|
this.control.input.addEventListener("change", () => {
|
|
3643
3666
|
this.instance.setValue(this.control.input.value, true, "user");
|
|
@@ -3676,6 +3699,9 @@ class EditorStringTextarea extends EditorString {
|
|
|
3676
3699
|
adaptForTable() {
|
|
3677
3700
|
this.theme.adaptForTableTextareaControl(this.control);
|
|
3678
3701
|
}
|
|
3702
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3703
|
+
this.theme.adaptForHorizontalTextareaControl(this.control, labelCol, inputCol);
|
|
3704
|
+
}
|
|
3679
3705
|
addEventListeners() {
|
|
3680
3706
|
const eventType = this.getValidationEventType();
|
|
3681
3707
|
this.control.input.addEventListener(eventType, () => {
|
|
@@ -3710,6 +3736,9 @@ class EditorStringAwesomplete extends EditorString {
|
|
|
3710
3736
|
console.error("Awesomplete is not available or not loaded correctly.", e);
|
|
3711
3737
|
}
|
|
3712
3738
|
}
|
|
3739
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3740
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
3741
|
+
}
|
|
3713
3742
|
addEventListeners() {
|
|
3714
3743
|
this.control.input.addEventListener("awesomplete-selectcomplete", () => {
|
|
3715
3744
|
this.instance.setValue(this.control.input.value, true, "user");
|
|
@@ -3752,6 +3781,9 @@ class EditorStringEmojiButton extends EditorString {
|
|
|
3752
3781
|
}, emojiButtonOptions);
|
|
3753
3782
|
this.emojiButton = new window.EmojiButton(options);
|
|
3754
3783
|
}
|
|
3784
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3785
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
3786
|
+
}
|
|
3755
3787
|
addEventListeners() {
|
|
3756
3788
|
this.emojiButton.on("emoji", (emoji) => {
|
|
3757
3789
|
this.control.input.value = emoji;
|
|
@@ -3816,6 +3848,9 @@ class EditorStringInput extends EditorString {
|
|
|
3816
3848
|
adaptForTable() {
|
|
3817
3849
|
this.theme.adaptForTableInputControl(this.control);
|
|
3818
3850
|
}
|
|
3851
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3852
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
3853
|
+
}
|
|
3819
3854
|
addEventListeners() {
|
|
3820
3855
|
const eventType = this.getValidationEventType();
|
|
3821
3856
|
this.control.input.addEventListener(eventType, () => {
|
|
@@ -3862,6 +3897,9 @@ class EditorNumberRadios extends EditorNumber {
|
|
|
3862
3897
|
adaptForTable() {
|
|
3863
3898
|
this.theme.adaptForTableRadiosControl(this.control);
|
|
3864
3899
|
}
|
|
3900
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3901
|
+
this.theme.adaptForHorizontalRadiosControl(this.control, labelCol, inputCol);
|
|
3902
|
+
}
|
|
3865
3903
|
addEventListeners() {
|
|
3866
3904
|
this.control.radios.forEach((radio) => {
|
|
3867
3905
|
radio.addEventListener("change", () => {
|
|
@@ -3948,6 +3986,9 @@ class EditorNumberSelect extends EditorNumber {
|
|
|
3948
3986
|
adaptForTable() {
|
|
3949
3987
|
this.theme.adaptForTableSelectControl(this.control);
|
|
3950
3988
|
}
|
|
3989
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3990
|
+
this.theme.adaptForHorizontalSelectControl(this.control, labelCol, inputCol);
|
|
3991
|
+
}
|
|
3951
3992
|
addEventListeners() {
|
|
3952
3993
|
this.control.input.addEventListener("change", () => {
|
|
3953
3994
|
const value = this.sanitize(this.control.input.value);
|
|
@@ -3993,6 +4034,9 @@ class EditorNumberInput extends EditorNumber {
|
|
|
3993
4034
|
adaptForTable() {
|
|
3994
4035
|
this.theme.adaptForTableInputControl(this.control);
|
|
3995
4036
|
}
|
|
4037
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
4038
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
4039
|
+
}
|
|
3996
4040
|
addEventListeners() {
|
|
3997
4041
|
const eventType = this.getValidationEventType();
|
|
3998
4042
|
this.control.input.addEventListener(eventType, () => {
|
|
@@ -4099,7 +4143,9 @@ class EditorObject extends Editor {
|
|
|
4099
4143
|
}
|
|
4100
4144
|
build() {
|
|
4101
4145
|
this.propertyActivators = {};
|
|
4102
|
-
|
|
4146
|
+
const card = getSchemaXOption(this.instance.schema, "card") ?? this.instance.jedison.getOption("card");
|
|
4147
|
+
const config = this.getObjectControlConfig();
|
|
4148
|
+
this.control = card === false ? this.theme.getObjectControlFlat(config) : this.theme.getObjectControl(config);
|
|
4103
4149
|
this.control.jsonData.input.value = JSON.stringify(this.instance.getValue(), null, 2);
|
|
4104
4150
|
}
|
|
4105
4151
|
announcePropertyAdded(propertyName, child) {
|
|
@@ -4121,6 +4167,9 @@ class EditorObject extends Editor {
|
|
|
4121
4167
|
this.announcePropertyAdded(propertyName, child);
|
|
4122
4168
|
postAction();
|
|
4123
4169
|
}
|
|
4170
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
4171
|
+
this.theme.adaptForHorizontalObjectControl(this.control, labelCol, inputCol, this.getTitle());
|
|
4172
|
+
}
|
|
4124
4173
|
addEventListeners() {
|
|
4125
4174
|
this.control.quickAddPropertyBtn.addEventListener("click", () => {
|
|
4126
4175
|
this.addProperty(this.control.quickAddPropertyControl.input, () => {
|
|
@@ -4570,6 +4619,25 @@ class EditorObjectAccordion extends EditorObject {
|
|
|
4570
4619
|
});
|
|
4571
4620
|
}
|
|
4572
4621
|
}
|
|
4622
|
+
class EditorObjectHorizontal extends EditorObject {
|
|
4623
|
+
static resolves(schema) {
|
|
4624
|
+
return getSchemaType(schema) === "object" && getSchemaXOption(schema, "format") === "horizontal";
|
|
4625
|
+
}
|
|
4626
|
+
build() {
|
|
4627
|
+
super.build();
|
|
4628
|
+
this.theme.initHorizontalObject(this.control.container);
|
|
4629
|
+
}
|
|
4630
|
+
refreshEditors() {
|
|
4631
|
+
const labelColumns = getSchemaXOption(this.instance.schema, "labelColumns");
|
|
4632
|
+
const inputColumns = getSchemaXOption(this.instance.schema, "inputColumns");
|
|
4633
|
+
super.refreshEditors();
|
|
4634
|
+
this.instance.children.forEach((child) => {
|
|
4635
|
+
if (child.isActive) {
|
|
4636
|
+
child.ui.adaptForHorizontal(labelColumns, inputColumns);
|
|
4637
|
+
}
|
|
4638
|
+
});
|
|
4639
|
+
}
|
|
4640
|
+
}
|
|
4573
4641
|
class EditorArray extends Editor {
|
|
4574
4642
|
static resolves(schema) {
|
|
4575
4643
|
return getSchemaType(schema) === "array";
|
|
@@ -4618,6 +4686,9 @@ class EditorArray extends Editor {
|
|
|
4618
4686
|
doDeleteAll();
|
|
4619
4687
|
}
|
|
4620
4688
|
}
|
|
4689
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
4690
|
+
this.theme.adaptForHorizontalArrayControl(this.control, labelCol, inputCol, this.getTitle());
|
|
4691
|
+
}
|
|
4621
4692
|
addEventListeners() {
|
|
4622
4693
|
this.control.addBtn.addEventListener("click", () => {
|
|
4623
4694
|
this.instance.addItem("user");
|
|
@@ -5273,6 +5344,9 @@ class EditorArrayChoices extends Editor {
|
|
|
5273
5344
|
console.error("Choices is not available or not loaded correctly.", e);
|
|
5274
5345
|
}
|
|
5275
5346
|
}
|
|
5347
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5348
|
+
this.theme.adaptForHorizontalSelectControl(this.control, labelCol, inputCol);
|
|
5349
|
+
}
|
|
5276
5350
|
addEventListeners() {
|
|
5277
5351
|
this.control.input.addEventListener("change", () => {
|
|
5278
5352
|
const value = this.choicesInstance.getValue(true);
|
|
@@ -5495,6 +5569,9 @@ class EditorMultiple extends Editor {
|
|
|
5495
5569
|
adaptForTable(td) {
|
|
5496
5570
|
this.theme.adaptForTableMultipleControl(this.control, td);
|
|
5497
5571
|
}
|
|
5572
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5573
|
+
this.theme.adaptForHorizontalMultipleControl(this.control, labelCol, inputCol, this.getTitle());
|
|
5574
|
+
}
|
|
5498
5575
|
addEventListeners() {
|
|
5499
5576
|
if (this.switcherInput === "select") {
|
|
5500
5577
|
this.control.switcher.input.addEventListener("change", () => {
|
|
@@ -5589,6 +5666,9 @@ class EditorNull extends Editor {
|
|
|
5589
5666
|
info: this.getInfo()
|
|
5590
5667
|
});
|
|
5591
5668
|
}
|
|
5669
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5670
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
5671
|
+
}
|
|
5592
5672
|
sanitize() {
|
|
5593
5673
|
return null;
|
|
5594
5674
|
}
|
|
@@ -5615,6 +5695,9 @@ class EditorStringSimpleMDE extends EditorString {
|
|
|
5615
5695
|
console.error("simpleMDE is not available or not loaded correctly.", e);
|
|
5616
5696
|
}
|
|
5617
5697
|
}
|
|
5698
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5699
|
+
this.theme.adaptForHorizontalTextareaControl(this.control, labelCol, inputCol);
|
|
5700
|
+
}
|
|
5618
5701
|
addEventListeners() {
|
|
5619
5702
|
this.simplemde.codemirror.on("blur", () => {
|
|
5620
5703
|
const mdeText = this.simplemde.value();
|
|
@@ -5669,6 +5752,9 @@ class EditorStringQuill extends EditorString {
|
|
|
5669
5752
|
console.error("Quill is not available or not loaded correctly.", e);
|
|
5670
5753
|
}
|
|
5671
5754
|
}
|
|
5755
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5756
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
5757
|
+
}
|
|
5672
5758
|
addEventListeners() {
|
|
5673
5759
|
this.quill.root.addEventListener("blur", () => {
|
|
5674
5760
|
const quillText = this.quill.getText();
|
|
@@ -5731,6 +5817,9 @@ class EditorStringJodit extends EditorString {
|
|
|
5731
5817
|
console.error("Jodit is not available or not loaded correctly.", e);
|
|
5732
5818
|
}
|
|
5733
5819
|
}
|
|
5820
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5821
|
+
this.theme.adaptForHorizontalTextareaControl(this.control, labelCol, inputCol);
|
|
5822
|
+
}
|
|
5734
5823
|
addEventListeners() {
|
|
5735
5824
|
this.jodit.events.on("change", () => {
|
|
5736
5825
|
const joditValue = this.jodit.value;
|
|
@@ -5799,6 +5888,9 @@ class EditorStringPickr extends EditorString {
|
|
|
5799
5888
|
console.error("Pickr is not available or not loaded correctly.", e);
|
|
5800
5889
|
}
|
|
5801
5890
|
}
|
|
5891
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5892
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
5893
|
+
}
|
|
5802
5894
|
addEventListeners() {
|
|
5803
5895
|
}
|
|
5804
5896
|
refreshUI() {
|
|
@@ -5845,6 +5937,9 @@ class EditorStringFlatpickr extends EditorString {
|
|
|
5845
5937
|
console.error("Flatpickr is not available or not loaded correctly.", e);
|
|
5846
5938
|
}
|
|
5847
5939
|
}
|
|
5940
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5941
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
5942
|
+
}
|
|
5848
5943
|
addEventListeners() {
|
|
5849
5944
|
this.control.input.addEventListener("change", () => {
|
|
5850
5945
|
this.instance.setValue(this.control.input.value, true, "user");
|
|
@@ -5887,6 +5982,9 @@ class EditorStringIMask extends EditorString {
|
|
|
5887
5982
|
console.error("IMask is not available or not loaded or configured correctly.", e);
|
|
5888
5983
|
}
|
|
5889
5984
|
}
|
|
5985
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5986
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
5987
|
+
}
|
|
5890
5988
|
addEventListeners() {
|
|
5891
5989
|
this.imask.on("accept", () => {
|
|
5892
5990
|
const value = this.useMaskedValue ? this.imask.value : this.imask.unmaskedValue;
|
|
@@ -5934,6 +6032,9 @@ class EditorNumberIMask extends EditorNumber {
|
|
|
5934
6032
|
console.error("IMask is not available or not loaded or configured correctly.", e);
|
|
5935
6033
|
}
|
|
5936
6034
|
}
|
|
6035
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6036
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
6037
|
+
}
|
|
5937
6038
|
addEventListeners() {
|
|
5938
6039
|
this.imask.on("accept", () => {
|
|
5939
6040
|
const value = this.imask.typedValue;
|
|
@@ -5980,6 +6081,9 @@ class EditorNumberRaty extends EditorNumber {
|
|
|
5980
6081
|
this.theme.visuallyHidden(this.control.label);
|
|
5981
6082
|
this.theme.visuallyHidden(this.control.description);
|
|
5982
6083
|
}
|
|
6084
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6085
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
6086
|
+
}
|
|
5983
6087
|
refreshDisabledState() {
|
|
5984
6088
|
if (this.disabled || this.readOnly) {
|
|
5985
6089
|
this.raty.readOnly(true);
|
|
@@ -6009,6 +6113,9 @@ class EditorAnyJson extends Editor {
|
|
|
6009
6113
|
this.jsonErrorEl.style.color = "red";
|
|
6010
6114
|
this.control.container.appendChild(this.jsonErrorEl);
|
|
6011
6115
|
}
|
|
6116
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6117
|
+
this.theme.adaptForHorizontalTextareaControl(this.control, labelCol, inputCol);
|
|
6118
|
+
}
|
|
6012
6119
|
addEventListeners() {
|
|
6013
6120
|
this.control.input.addEventListener("change", () => {
|
|
6014
6121
|
try {
|
|
@@ -6167,6 +6274,9 @@ class EditorArrayCheckboxes extends Editor {
|
|
|
6167
6274
|
adaptForTable(td) {
|
|
6168
6275
|
this.theme.adaptForTableCheckboxesControl(this.control, td);
|
|
6169
6276
|
}
|
|
6277
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6278
|
+
this.theme.adaptForHorizontalCheckboxesControl(this.control, labelCol, inputCol);
|
|
6279
|
+
}
|
|
6170
6280
|
addEventListeners() {
|
|
6171
6281
|
this.control.checkboxes.forEach((checkbox) => {
|
|
6172
6282
|
checkbox.addEventListener("change", () => {
|
|
@@ -6267,6 +6377,9 @@ class EditorNumberRange extends EditorNumber {
|
|
|
6267
6377
|
adaptForTable() {
|
|
6268
6378
|
this.theme.adaptForTableInputControl(this.control);
|
|
6269
6379
|
}
|
|
6380
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6381
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
6382
|
+
}
|
|
6270
6383
|
addEventListeners() {
|
|
6271
6384
|
this.control.input.addEventListener("input", () => {
|
|
6272
6385
|
this.control.output.textContent = parseFloat(this.control.input.value);
|
|
@@ -6341,6 +6454,9 @@ class EditorStringAce extends EditorString {
|
|
|
6341
6454
|
console.error("Ace editor is not available or not loaded correctly.", e);
|
|
6342
6455
|
}
|
|
6343
6456
|
}
|
|
6457
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6458
|
+
this.theme.adaptForHorizontalTextareaControl(this.control, labelCol, inputCol);
|
|
6459
|
+
}
|
|
6344
6460
|
addEventListeners() {
|
|
6345
6461
|
if (!this.aceEditor) return;
|
|
6346
6462
|
this.aceEditor.on("blur", () => {
|
|
@@ -6421,6 +6537,9 @@ class EditorStringFilepond extends EditorString {
|
|
|
6421
6537
|
console.error("FilePond is not available or not loaded correctly.", e);
|
|
6422
6538
|
}
|
|
6423
6539
|
}
|
|
6540
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6541
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
6542
|
+
}
|
|
6424
6543
|
addEventListeners() {
|
|
6425
6544
|
}
|
|
6426
6545
|
refreshUI() {
|
|
@@ -6471,6 +6590,7 @@ class UiResolver {
|
|
|
6471
6590
|
EditorObjectCategories,
|
|
6472
6591
|
EditorObjectNav,
|
|
6473
6592
|
EditorObjectAccordion,
|
|
6593
|
+
EditorObjectHorizontal,
|
|
6474
6594
|
EditorObject,
|
|
6475
6595
|
EditorArrayChoices,
|
|
6476
6596
|
EditorArrayCheckboxes,
|
|
@@ -8302,6 +8422,161 @@ class Theme {
|
|
|
8302
8422
|
switcherSlot
|
|
8303
8423
|
};
|
|
8304
8424
|
}
|
|
8425
|
+
/**
|
|
8426
|
+
* Flat variant of getObjectControl — same interface but no fieldset/legend/collapse/panel-body.
|
|
8427
|
+
* Children render directly in a plain container div.
|
|
8428
|
+
*/
|
|
8429
|
+
getObjectControlFlat(config) {
|
|
8430
|
+
var _a;
|
|
8431
|
+
const container = document.createElement("div");
|
|
8432
|
+
const actions = this.getActionsSlot();
|
|
8433
|
+
const body = document.createElement("div");
|
|
8434
|
+
const ariaLive = this.getPropertiesAriaLive();
|
|
8435
|
+
const messages = this.getMessagesSlot();
|
|
8436
|
+
const childrenSlot = this.getChildrenSlot();
|
|
8437
|
+
const propertiesActivators = this.getPropertiesActivators();
|
|
8438
|
+
const info = this.getInfo(config.info);
|
|
8439
|
+
const description = this.getDescription({ content: config.description });
|
|
8440
|
+
const jsonData = this.getJsonData({ id: "json-data-" + config.id });
|
|
8441
|
+
const propertiesContainer = this.getPropertiesSlot({ id: "properties-slot-" + config.id });
|
|
8442
|
+
const propertiesToggle = this.getPropertiesToggle({
|
|
8443
|
+
content: config.propertiesToggleContent,
|
|
8444
|
+
id: "properties-slot-toggle-" + config.id,
|
|
8445
|
+
icon: "properties",
|
|
8446
|
+
propertiesContainer
|
|
8447
|
+
});
|
|
8448
|
+
const quickAddPropertyContainer = this.getQuickAddPropertySlot({ id: "quick-add-property-slot-" + config.id });
|
|
8449
|
+
const quickAddPropertyControl = this.getInputControl({
|
|
8450
|
+
type: "text",
|
|
8451
|
+
id: "jedi-quick-add-property-input-" + config.id,
|
|
8452
|
+
title: config.addPropertyContent
|
|
8453
|
+
});
|
|
8454
|
+
const quickAddPropertyBtn = this.getAddPropertyButton({ content: config.addPropertyContent, icon: "add" });
|
|
8455
|
+
const quickAddPropertyToggle = this.getQuickAddPropertyToggle({
|
|
8456
|
+
content: config.addPropertyContent,
|
|
8457
|
+
icon: "add",
|
|
8458
|
+
propertiesContainer: quickAddPropertyContainer
|
|
8459
|
+
});
|
|
8460
|
+
const collapse = document.createElement("div");
|
|
8461
|
+
const collapseToggle = document.createElement("div");
|
|
8462
|
+
const infoContainer = document.createElement("div");
|
|
8463
|
+
const switcherSlot = document.createElement("div");
|
|
8464
|
+
switcherSlot.classList.add("jedi-switcher-slot");
|
|
8465
|
+
const legend = document.createElement("div");
|
|
8466
|
+
legend.classList.add("jedi-editor-legend");
|
|
8467
|
+
legend.style.display = "flex";
|
|
8468
|
+
legend.style.justifyContent = "space-between";
|
|
8469
|
+
legend.style.alignItems = "center";
|
|
8470
|
+
const left = document.createElement("div");
|
|
8471
|
+
left.classList.add("jedi-editor-legend-left");
|
|
8472
|
+
const right = document.createElement("div");
|
|
8473
|
+
right.classList.add("jedi-editor-legend-right");
|
|
8474
|
+
right.style.display = "flex";
|
|
8475
|
+
right.style.alignItems = "center";
|
|
8476
|
+
legend.appendChild(left);
|
|
8477
|
+
legend.appendChild(right);
|
|
8478
|
+
const legendText = document.createElement("label");
|
|
8479
|
+
legendText.classList.add("jedi-title", "jedi-legend");
|
|
8480
|
+
legendText.textContent = config.title || "";
|
|
8481
|
+
if (config.titleHidden) {
|
|
8482
|
+
this.visuallyHidden(legendText);
|
|
8483
|
+
}
|
|
8484
|
+
left.appendChild(legendText);
|
|
8485
|
+
if (((_a = config == null ? void 0 : config.info) == null ? void 0 : _a.variant) === "modal") {
|
|
8486
|
+
this.infoAsModal(info, config.id, config.info);
|
|
8487
|
+
}
|
|
8488
|
+
if (config.editJsonData) {
|
|
8489
|
+
container.appendChild(jsonData.dialog);
|
|
8490
|
+
}
|
|
8491
|
+
const innerWrapper = document.createElement("div");
|
|
8492
|
+
innerWrapper.appendChild(legend);
|
|
8493
|
+
innerWrapper.appendChild(propertiesContainer);
|
|
8494
|
+
innerWrapper.appendChild(quickAddPropertyContainer);
|
|
8495
|
+
container.appendChild(innerWrapper);
|
|
8496
|
+
if (config.addProperty) {
|
|
8497
|
+
quickAddPropertyContainer.appendChild(quickAddPropertyControl.container);
|
|
8498
|
+
quickAddPropertyContainer.appendChild(quickAddPropertyBtn);
|
|
8499
|
+
}
|
|
8500
|
+
if (config.description) {
|
|
8501
|
+
body.appendChild(description);
|
|
8502
|
+
}
|
|
8503
|
+
body.appendChild(messages);
|
|
8504
|
+
if (config.readOnly === false) {
|
|
8505
|
+
right.appendChild(switcherSlot);
|
|
8506
|
+
right.appendChild(actions);
|
|
8507
|
+
}
|
|
8508
|
+
body.appendChild(childrenSlot);
|
|
8509
|
+
innerWrapper.appendChild(body);
|
|
8510
|
+
if (config.editJsonData) {
|
|
8511
|
+
actions.appendChild(jsonData.toggle);
|
|
8512
|
+
}
|
|
8513
|
+
if (config.addProperty) {
|
|
8514
|
+
actions.appendChild(quickAddPropertyToggle);
|
|
8515
|
+
}
|
|
8516
|
+
if (config.enablePropertiesToggle) {
|
|
8517
|
+
actions.appendChild(propertiesToggle);
|
|
8518
|
+
propertiesContainer.appendChild(ariaLive);
|
|
8519
|
+
propertiesContainer.appendChild(propertiesActivators);
|
|
8520
|
+
}
|
|
8521
|
+
if (config.enableCollapseToggle) {
|
|
8522
|
+
actions.appendChild(collapseToggle);
|
|
8523
|
+
}
|
|
8524
|
+
return {
|
|
8525
|
+
container,
|
|
8526
|
+
collapse,
|
|
8527
|
+
collapseToggle,
|
|
8528
|
+
description,
|
|
8529
|
+
body,
|
|
8530
|
+
actions,
|
|
8531
|
+
messages,
|
|
8532
|
+
childrenSlot,
|
|
8533
|
+
propertiesToggle,
|
|
8534
|
+
jsonData,
|
|
8535
|
+
propertiesContainer,
|
|
8536
|
+
quickAddPropertyContainer,
|
|
8537
|
+
quickAddPropertyControl,
|
|
8538
|
+
quickAddPropertyBtn,
|
|
8539
|
+
quickAddPropertyToggle,
|
|
8540
|
+
ariaLive,
|
|
8541
|
+
propertiesActivators,
|
|
8542
|
+
legend,
|
|
8543
|
+
legendText,
|
|
8544
|
+
infoContainer,
|
|
8545
|
+
right,
|
|
8546
|
+
switcherSlot,
|
|
8547
|
+
innerWrapper
|
|
8548
|
+
};
|
|
8549
|
+
}
|
|
8550
|
+
// eslint-disable-next-line no-unused-vars
|
|
8551
|
+
initHorizontalObject(container) {
|
|
8552
|
+
}
|
|
8553
|
+
// eslint-disable-next-line no-unused-vars
|
|
8554
|
+
adaptForHorizontalInputControl(control, labelCol, inputCol) {
|
|
8555
|
+
}
|
|
8556
|
+
// eslint-disable-next-line no-unused-vars
|
|
8557
|
+
adaptForHorizontalTextareaControl(control, labelCol, inputCol) {
|
|
8558
|
+
}
|
|
8559
|
+
// eslint-disable-next-line no-unused-vars
|
|
8560
|
+
adaptForHorizontalSelectControl(control, labelCol, inputCol) {
|
|
8561
|
+
}
|
|
8562
|
+
// eslint-disable-next-line no-unused-vars
|
|
8563
|
+
adaptForHorizontalCheckboxControl(control, labelCol, inputCol) {
|
|
8564
|
+
}
|
|
8565
|
+
// eslint-disable-next-line no-unused-vars
|
|
8566
|
+
adaptForHorizontalRadiosControl(control, labelCol, inputCol) {
|
|
8567
|
+
}
|
|
8568
|
+
// eslint-disable-next-line no-unused-vars
|
|
8569
|
+
adaptForHorizontalCheckboxesControl(control, labelCol, inputCol) {
|
|
8570
|
+
}
|
|
8571
|
+
// eslint-disable-next-line no-unused-vars
|
|
8572
|
+
adaptForHorizontalArrayControl(control, labelCol, inputCol, title) {
|
|
8573
|
+
}
|
|
8574
|
+
// eslint-disable-next-line no-unused-vars
|
|
8575
|
+
adaptForHorizontalObjectControl(control, labelCol, inputCol, title) {
|
|
8576
|
+
}
|
|
8577
|
+
// eslint-disable-next-line no-unused-vars
|
|
8578
|
+
adaptForHorizontalMultipleControl(control, labelCol, inputCol, title) {
|
|
8579
|
+
}
|
|
8305
8580
|
/**
|
|
8306
8581
|
* Returns an accordion item wrapping a child editor.
|
|
8307
8582
|
* Used by EditorObjectAccordionProperties to wrap each property.
|
|
@@ -9297,6 +9572,81 @@ class ThemeBootstrap3 extends Theme {
|
|
|
9297
9572
|
}
|
|
9298
9573
|
return control;
|
|
9299
9574
|
}
|
|
9575
|
+
initHorizontalObject(container) {
|
|
9576
|
+
container.classList.add("form-horizontal");
|
|
9577
|
+
}
|
|
9578
|
+
_adaptHorizontalControl(control, labelCol, inputCol) {
|
|
9579
|
+
if (!control.label || control.label.classList.contains("control-label")) return;
|
|
9580
|
+
const lc = labelCol ?? 3;
|
|
9581
|
+
const ic = inputCol ?? 6;
|
|
9582
|
+
control.container.classList.add("form-group");
|
|
9583
|
+
control.label.classList.add("control-label", `col-sm-${lc}`);
|
|
9584
|
+
const wrapper = document.createElement("div");
|
|
9585
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
9586
|
+
Array.from(control.container.children).filter((el) => el !== control.label).forEach((el) => wrapper.appendChild(el));
|
|
9587
|
+
control.container.appendChild(wrapper);
|
|
9588
|
+
}
|
|
9589
|
+
adaptForHorizontalInputControl(control, labelCol, inputCol) {
|
|
9590
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
9591
|
+
}
|
|
9592
|
+
adaptForHorizontalTextareaControl(control, labelCol, inputCol) {
|
|
9593
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
9594
|
+
}
|
|
9595
|
+
adaptForHorizontalSelectControl(control, labelCol, inputCol) {
|
|
9596
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
9597
|
+
}
|
|
9598
|
+
adaptForHorizontalCheckboxControl(control, labelCol, inputCol) {
|
|
9599
|
+
if (control.formGroup.parentElement !== control.container) return;
|
|
9600
|
+
const lc = labelCol ?? 3;
|
|
9601
|
+
const ic = inputCol ?? 6;
|
|
9602
|
+
control.container.classList.add("form-group");
|
|
9603
|
+
const wrapper = document.createElement("div");
|
|
9604
|
+
wrapper.classList.add(`col-sm-${ic}`, `col-sm-offset-${lc}`);
|
|
9605
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
9606
|
+
control.container.appendChild(wrapper);
|
|
9607
|
+
}
|
|
9608
|
+
adaptForHorizontalRadiosControl(control, labelCol, inputCol) {
|
|
9609
|
+
if (control.legend.parentElement !== control.fieldset) return;
|
|
9610
|
+
const lc = labelCol ?? 3;
|
|
9611
|
+
const ic = inputCol ?? 6;
|
|
9612
|
+
control.container.classList.add("form-group");
|
|
9613
|
+
control.legend.classList.add("control-label", `col-sm-${lc}`);
|
|
9614
|
+
control.container.insertBefore(control.legend, control.fieldset);
|
|
9615
|
+
const wrapper = document.createElement("div");
|
|
9616
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
9617
|
+
control.fieldset.replaceWith(wrapper);
|
|
9618
|
+
wrapper.appendChild(control.fieldset);
|
|
9619
|
+
control.fieldset.classList.remove("panel", "panel-default");
|
|
9620
|
+
}
|
|
9621
|
+
adaptForHorizontalCheckboxesControl(control, labelCol, inputCol) {
|
|
9622
|
+
this.adaptForHorizontalRadiosControl(control, labelCol, inputCol);
|
|
9623
|
+
}
|
|
9624
|
+
_adaptHorizontalComplexControl(control, labelCol, inputCol, title) {
|
|
9625
|
+
if (control.container.classList.contains("jedi-horizontal")) return;
|
|
9626
|
+
const lc = labelCol ?? 3;
|
|
9627
|
+
const ic = inputCol ?? 6;
|
|
9628
|
+
const fakeLabel = document.createElement("label");
|
|
9629
|
+
fakeLabel.classList.add("control-label", `col-sm-${lc}`);
|
|
9630
|
+
fakeLabel.textContent = title || "";
|
|
9631
|
+
const wrapper = document.createElement("div");
|
|
9632
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
9633
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
9634
|
+
control.container.classList.add("form-group", "jedi-horizontal");
|
|
9635
|
+
control.container.appendChild(fakeLabel);
|
|
9636
|
+
control.container.appendChild(wrapper);
|
|
9637
|
+
if (control.legendText) {
|
|
9638
|
+
control.legendText.style.display = "none";
|
|
9639
|
+
}
|
|
9640
|
+
}
|
|
9641
|
+
adaptForHorizontalArrayControl(control, labelCol, inputCol, title) {
|
|
9642
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
9643
|
+
}
|
|
9644
|
+
adaptForHorizontalObjectControl(control, labelCol, inputCol, title) {
|
|
9645
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
9646
|
+
}
|
|
9647
|
+
adaptForHorizontalMultipleControl(control, labelCol, inputCol, title) {
|
|
9648
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
9649
|
+
}
|
|
9300
9650
|
getAccordionItem(config) {
|
|
9301
9651
|
const collapseId = config.id + "-acc-collapse";
|
|
9302
9652
|
const container = document.createElement("div");
|
|
@@ -9749,6 +10099,77 @@ class ThemeBootstrap4 extends Theme {
|
|
|
9749
10099
|
}
|
|
9750
10100
|
return control;
|
|
9751
10101
|
}
|
|
10102
|
+
_adaptHorizontalControl(control, labelCol, inputCol) {
|
|
10103
|
+
if (!control.label || control.label.classList.contains("col-form-label")) return;
|
|
10104
|
+
const lc = labelCol ?? 3;
|
|
10105
|
+
const ic = inputCol ?? 6;
|
|
10106
|
+
control.container.classList.add("row");
|
|
10107
|
+
control.label.classList.add("col-form-label", "text-sm-right", `col-sm-${lc}`);
|
|
10108
|
+
const wrapper = document.createElement("div");
|
|
10109
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10110
|
+
Array.from(control.container.children).filter((el) => el !== control.label).forEach((el) => wrapper.appendChild(el));
|
|
10111
|
+
control.container.appendChild(wrapper);
|
|
10112
|
+
}
|
|
10113
|
+
adaptForHorizontalInputControl(control, labelCol, inputCol) {
|
|
10114
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10115
|
+
}
|
|
10116
|
+
adaptForHorizontalTextareaControl(control, labelCol, inputCol) {
|
|
10117
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10118
|
+
}
|
|
10119
|
+
adaptForHorizontalSelectControl(control, labelCol, inputCol) {
|
|
10120
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10121
|
+
}
|
|
10122
|
+
adaptForHorizontalCheckboxControl(control, labelCol, inputCol) {
|
|
10123
|
+
if (control.formGroup.parentElement !== control.container) return;
|
|
10124
|
+
const lc = labelCol ?? 3;
|
|
10125
|
+
const ic = inputCol ?? 6;
|
|
10126
|
+
control.container.classList.add("row");
|
|
10127
|
+
const wrapper = document.createElement("div");
|
|
10128
|
+
wrapper.classList.add(`col-sm-${ic}`, `offset-sm-${lc}`);
|
|
10129
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
10130
|
+
control.container.appendChild(wrapper);
|
|
10131
|
+
}
|
|
10132
|
+
adaptForHorizontalRadiosControl(control, labelCol, inputCol) {
|
|
10133
|
+
if (control.legend.parentElement !== control.fieldset) return;
|
|
10134
|
+
const lc = labelCol ?? 3;
|
|
10135
|
+
const ic = inputCol ?? 6;
|
|
10136
|
+
control.container.classList.add("row");
|
|
10137
|
+
control.legend.classList.add("col-form-label", "text-sm-right", `col-sm-${lc}`);
|
|
10138
|
+
control.container.insertBefore(control.legend, control.fieldset);
|
|
10139
|
+
const wrapper = document.createElement("div");
|
|
10140
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10141
|
+
control.fieldset.replaceWith(wrapper);
|
|
10142
|
+
wrapper.appendChild(control.fieldset);
|
|
10143
|
+
}
|
|
10144
|
+
adaptForHorizontalCheckboxesControl(control, labelCol, inputCol) {
|
|
10145
|
+
this.adaptForHorizontalRadiosControl(control, labelCol, inputCol);
|
|
10146
|
+
}
|
|
10147
|
+
_adaptHorizontalComplexControl(control, labelCol, inputCol, title) {
|
|
10148
|
+
if (control.container.classList.contains("jedi-horizontal")) return;
|
|
10149
|
+
const lc = labelCol ?? 3;
|
|
10150
|
+
const ic = inputCol ?? 6;
|
|
10151
|
+
const fakeLabel = document.createElement("label");
|
|
10152
|
+
fakeLabel.classList.add("col-form-label", "text-sm-right", `col-sm-${lc}`);
|
|
10153
|
+
fakeLabel.textContent = title || "";
|
|
10154
|
+
const wrapper = document.createElement("div");
|
|
10155
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10156
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
10157
|
+
control.container.classList.add("row", "jedi-horizontal");
|
|
10158
|
+
control.container.appendChild(fakeLabel);
|
|
10159
|
+
control.container.appendChild(wrapper);
|
|
10160
|
+
if (control.legendText) {
|
|
10161
|
+
control.legendText.style.display = "none";
|
|
10162
|
+
}
|
|
10163
|
+
}
|
|
10164
|
+
adaptForHorizontalArrayControl(control, labelCol, inputCol, title) {
|
|
10165
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10166
|
+
}
|
|
10167
|
+
adaptForHorizontalObjectControl(control, labelCol, inputCol, title) {
|
|
10168
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10169
|
+
}
|
|
10170
|
+
adaptForHorizontalMultipleControl(control, labelCol, inputCol, title) {
|
|
10171
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10172
|
+
}
|
|
9752
10173
|
getAccordionItem(config) {
|
|
9753
10174
|
const collapseId = config.id + "-acc-collapse";
|
|
9754
10175
|
const container = document.createElement("div");
|
|
@@ -10217,6 +10638,77 @@ class ThemeBootstrap5 extends Theme {
|
|
|
10217
10638
|
}
|
|
10218
10639
|
return control;
|
|
10219
10640
|
}
|
|
10641
|
+
_adaptHorizontalControl(control, labelCol, inputCol) {
|
|
10642
|
+
if (!control.label || control.label.classList.contains("col-form-label")) return;
|
|
10643
|
+
const lc = labelCol ?? 3;
|
|
10644
|
+
const ic = inputCol ?? 6;
|
|
10645
|
+
control.container.classList.add("row");
|
|
10646
|
+
control.label.classList.add("col-form-label", "text-sm-end", `col-sm-${lc}`);
|
|
10647
|
+
const wrapper = document.createElement("div");
|
|
10648
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10649
|
+
Array.from(control.container.children).filter((el) => el !== control.label).forEach((el) => wrapper.appendChild(el));
|
|
10650
|
+
control.container.appendChild(wrapper);
|
|
10651
|
+
}
|
|
10652
|
+
adaptForHorizontalInputControl(control, labelCol, inputCol) {
|
|
10653
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10654
|
+
}
|
|
10655
|
+
adaptForHorizontalTextareaControl(control, labelCol, inputCol) {
|
|
10656
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10657
|
+
}
|
|
10658
|
+
adaptForHorizontalSelectControl(control, labelCol, inputCol) {
|
|
10659
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10660
|
+
}
|
|
10661
|
+
adaptForHorizontalCheckboxControl(control, labelCol, inputCol) {
|
|
10662
|
+
if (control.formGroup.parentElement !== control.container) return;
|
|
10663
|
+
const lc = labelCol ?? 3;
|
|
10664
|
+
const ic = inputCol ?? 6;
|
|
10665
|
+
control.container.classList.add("row");
|
|
10666
|
+
const wrapper = document.createElement("div");
|
|
10667
|
+
wrapper.classList.add(`col-sm-${ic}`, `offset-sm-${lc}`);
|
|
10668
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
10669
|
+
control.container.appendChild(wrapper);
|
|
10670
|
+
}
|
|
10671
|
+
adaptForHorizontalRadiosControl(control, labelCol, inputCol) {
|
|
10672
|
+
if (control.legend.parentElement !== control.fieldset) return;
|
|
10673
|
+
const lc = labelCol ?? 3;
|
|
10674
|
+
const ic = inputCol ?? 6;
|
|
10675
|
+
control.container.classList.add("row");
|
|
10676
|
+
control.legend.classList.add("col-form-label", "text-sm-end", `col-sm-${lc}`);
|
|
10677
|
+
control.container.insertBefore(control.legend, control.fieldset);
|
|
10678
|
+
const wrapper = document.createElement("div");
|
|
10679
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10680
|
+
control.fieldset.replaceWith(wrapper);
|
|
10681
|
+
wrapper.appendChild(control.fieldset);
|
|
10682
|
+
}
|
|
10683
|
+
adaptForHorizontalCheckboxesControl(control, labelCol, inputCol) {
|
|
10684
|
+
this.adaptForHorizontalRadiosControl(control, labelCol, inputCol);
|
|
10685
|
+
}
|
|
10686
|
+
_adaptHorizontalComplexControl(control, labelCol, inputCol, title) {
|
|
10687
|
+
if (control.container.classList.contains("jedi-horizontal")) return;
|
|
10688
|
+
const lc = labelCol ?? 3;
|
|
10689
|
+
const ic = inputCol ?? 6;
|
|
10690
|
+
const fakeLabel = document.createElement("label");
|
|
10691
|
+
fakeLabel.classList.add("col-form-label", "text-sm-end", `col-sm-${lc}`);
|
|
10692
|
+
fakeLabel.textContent = title || "";
|
|
10693
|
+
const wrapper = document.createElement("div");
|
|
10694
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10695
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
10696
|
+
control.container.classList.add("row", "jedi-horizontal");
|
|
10697
|
+
control.container.appendChild(fakeLabel);
|
|
10698
|
+
control.container.appendChild(wrapper);
|
|
10699
|
+
if (control.legendText) {
|
|
10700
|
+
control.legendText.style.display = "none";
|
|
10701
|
+
}
|
|
10702
|
+
}
|
|
10703
|
+
adaptForHorizontalArrayControl(control, labelCol, inputCol, title) {
|
|
10704
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10705
|
+
}
|
|
10706
|
+
adaptForHorizontalObjectControl(control, labelCol, inputCol, title) {
|
|
10707
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10708
|
+
}
|
|
10709
|
+
adaptForHorizontalMultipleControl(control, labelCol, inputCol, title) {
|
|
10710
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10711
|
+
}
|
|
10220
10712
|
getAccordionItem(config) {
|
|
10221
10713
|
const collapseId = config.id + "-acc-collapse";
|
|
10222
10714
|
const container = document.createElement("div");
|
|
@@ -10666,6 +11158,7 @@ const index = {
|
|
|
10666
11158
|
EditorObjectCategories,
|
|
10667
11159
|
EditorObjectNav,
|
|
10668
11160
|
EditorObjectAccordion,
|
|
11161
|
+
EditorObjectHorizontal,
|
|
10669
11162
|
EditorObject,
|
|
10670
11163
|
EditorArrayChoices,
|
|
10671
11164
|
EditorArrayNav,
|