jedison 1.12.2 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/cjs/jedison.cjs +1 -1
- package/dist/cjs/jedison.cjs.map +1 -1
- package/dist/esm/jedison.js +497 -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 +7 -5
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
|
*/
|
|
@@ -2783,6 +2786,12 @@ class InstanceMultiple extends Instance {
|
|
|
2783
2786
|
"Null"
|
|
2784
2787
|
];
|
|
2785
2788
|
}
|
|
2789
|
+
const switcherTypeLabels = getSchemaXOption(this.schema, "switcherTypeLabels") ?? this.jedison.getOption("switcherTypeLabels");
|
|
2790
|
+
if (switcherTypeLabels && typeof switcherTypeLabels === "object") {
|
|
2791
|
+
this.switcherOptionsLabels = this.switcherOptionsLabels.map(
|
|
2792
|
+
(label) => hasOwn(switcherTypeLabels, label) ? switcherTypeLabels[label] : label
|
|
2793
|
+
);
|
|
2794
|
+
}
|
|
2786
2795
|
this.schemas.forEach((schema) => {
|
|
2787
2796
|
const instance = this.jedison.createInstance({
|
|
2788
2797
|
jedison: this.jedison,
|
|
@@ -3383,6 +3392,9 @@ class EditorRadios extends EditorBoolean {
|
|
|
3383
3392
|
adaptForTable() {
|
|
3384
3393
|
this.theme.adaptForTableRadiosControl(this.control);
|
|
3385
3394
|
}
|
|
3395
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3396
|
+
this.theme.adaptForHorizontalRadiosControl(this.control, labelCol, inputCol);
|
|
3397
|
+
}
|
|
3386
3398
|
addEventListeners() {
|
|
3387
3399
|
this.control.radios.forEach((radio) => {
|
|
3388
3400
|
radio.addEventListener("change", () => {
|
|
@@ -3427,6 +3439,9 @@ class EditorBooleanSelect extends EditorBoolean {
|
|
|
3427
3439
|
adaptForTable() {
|
|
3428
3440
|
this.theme.adaptForTableSelectControl(this.control);
|
|
3429
3441
|
}
|
|
3442
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3443
|
+
this.theme.adaptForHorizontalSelectControl(this.control, labelCol, inputCol);
|
|
3444
|
+
}
|
|
3430
3445
|
addEventListeners() {
|
|
3431
3446
|
this.control.input.addEventListener("change", () => {
|
|
3432
3447
|
const value = this.control.input.value === "true";
|
|
@@ -3455,6 +3470,9 @@ class EditorBooleanCheckbox extends EditorBoolean {
|
|
|
3455
3470
|
adaptForTable(td) {
|
|
3456
3471
|
this.theme.adaptForTableCheckboxControl(this.control, td);
|
|
3457
3472
|
}
|
|
3473
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3474
|
+
this.theme.adaptForHorizontalCheckboxControl(this.control, labelCol, inputCol);
|
|
3475
|
+
}
|
|
3458
3476
|
addEventListeners() {
|
|
3459
3477
|
this.control.input.addEventListener("change", () => {
|
|
3460
3478
|
this.instance.setValue(this.control.input.checked, true, "user");
|
|
@@ -3560,6 +3578,9 @@ class EditorStringRadios extends EditorString {
|
|
|
3560
3578
|
adaptForTable() {
|
|
3561
3579
|
this.theme.adaptForTableRadiosControl(this.control);
|
|
3562
3580
|
}
|
|
3581
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3582
|
+
this.theme.adaptForHorizontalRadiosControl(this.control, labelCol, inputCol);
|
|
3583
|
+
}
|
|
3563
3584
|
addEventListeners() {
|
|
3564
3585
|
this.control.radios.forEach((radio) => {
|
|
3565
3586
|
radio.addEventListener("change", () => {
|
|
@@ -3643,6 +3664,9 @@ class EditorStringSelect extends EditorString {
|
|
|
3643
3664
|
adaptForTable() {
|
|
3644
3665
|
this.theme.adaptForTableSelectControl(this.control);
|
|
3645
3666
|
}
|
|
3667
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3668
|
+
this.theme.adaptForHorizontalSelectControl(this.control, labelCol, inputCol);
|
|
3669
|
+
}
|
|
3646
3670
|
addEventListeners() {
|
|
3647
3671
|
this.control.input.addEventListener("change", () => {
|
|
3648
3672
|
this.instance.setValue(this.control.input.value, true, "user");
|
|
@@ -3681,6 +3705,9 @@ class EditorStringTextarea extends EditorString {
|
|
|
3681
3705
|
adaptForTable() {
|
|
3682
3706
|
this.theme.adaptForTableTextareaControl(this.control);
|
|
3683
3707
|
}
|
|
3708
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3709
|
+
this.theme.adaptForHorizontalTextareaControl(this.control, labelCol, inputCol);
|
|
3710
|
+
}
|
|
3684
3711
|
addEventListeners() {
|
|
3685
3712
|
const eventType = this.getValidationEventType();
|
|
3686
3713
|
this.control.input.addEventListener(eventType, () => {
|
|
@@ -3715,6 +3742,9 @@ class EditorStringAwesomplete extends EditorString {
|
|
|
3715
3742
|
console.error("Awesomplete is not available or not loaded correctly.", e);
|
|
3716
3743
|
}
|
|
3717
3744
|
}
|
|
3745
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3746
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
3747
|
+
}
|
|
3718
3748
|
addEventListeners() {
|
|
3719
3749
|
this.control.input.addEventListener("awesomplete-selectcomplete", () => {
|
|
3720
3750
|
this.instance.setValue(this.control.input.value, true, "user");
|
|
@@ -3757,6 +3787,9 @@ class EditorStringEmojiButton extends EditorString {
|
|
|
3757
3787
|
}, emojiButtonOptions);
|
|
3758
3788
|
this.emojiButton = new window.EmojiButton(options);
|
|
3759
3789
|
}
|
|
3790
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3791
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
3792
|
+
}
|
|
3760
3793
|
addEventListeners() {
|
|
3761
3794
|
this.emojiButton.on("emoji", (emoji) => {
|
|
3762
3795
|
this.control.input.value = emoji;
|
|
@@ -3821,6 +3854,9 @@ class EditorStringInput extends EditorString {
|
|
|
3821
3854
|
adaptForTable() {
|
|
3822
3855
|
this.theme.adaptForTableInputControl(this.control);
|
|
3823
3856
|
}
|
|
3857
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3858
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
3859
|
+
}
|
|
3824
3860
|
addEventListeners() {
|
|
3825
3861
|
const eventType = this.getValidationEventType();
|
|
3826
3862
|
this.control.input.addEventListener(eventType, () => {
|
|
@@ -3867,6 +3903,9 @@ class EditorNumberRadios extends EditorNumber {
|
|
|
3867
3903
|
adaptForTable() {
|
|
3868
3904
|
this.theme.adaptForTableRadiosControl(this.control);
|
|
3869
3905
|
}
|
|
3906
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3907
|
+
this.theme.adaptForHorizontalRadiosControl(this.control, labelCol, inputCol);
|
|
3908
|
+
}
|
|
3870
3909
|
addEventListeners() {
|
|
3871
3910
|
this.control.radios.forEach((radio) => {
|
|
3872
3911
|
radio.addEventListener("change", () => {
|
|
@@ -3953,6 +3992,9 @@ class EditorNumberSelect extends EditorNumber {
|
|
|
3953
3992
|
adaptForTable() {
|
|
3954
3993
|
this.theme.adaptForTableSelectControl(this.control);
|
|
3955
3994
|
}
|
|
3995
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
3996
|
+
this.theme.adaptForHorizontalSelectControl(this.control, labelCol, inputCol);
|
|
3997
|
+
}
|
|
3956
3998
|
addEventListeners() {
|
|
3957
3999
|
this.control.input.addEventListener("change", () => {
|
|
3958
4000
|
const value = this.sanitize(this.control.input.value);
|
|
@@ -3998,6 +4040,9 @@ class EditorNumberInput extends EditorNumber {
|
|
|
3998
4040
|
adaptForTable() {
|
|
3999
4041
|
this.theme.adaptForTableInputControl(this.control);
|
|
4000
4042
|
}
|
|
4043
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
4044
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
4045
|
+
}
|
|
4001
4046
|
addEventListeners() {
|
|
4002
4047
|
const eventType = this.getValidationEventType();
|
|
4003
4048
|
this.control.input.addEventListener(eventType, () => {
|
|
@@ -4104,7 +4149,9 @@ class EditorObject extends Editor {
|
|
|
4104
4149
|
}
|
|
4105
4150
|
build() {
|
|
4106
4151
|
this.propertyActivators = {};
|
|
4107
|
-
|
|
4152
|
+
const card = getSchemaXOption(this.instance.schema, "card") ?? this.instance.jedison.getOption("card");
|
|
4153
|
+
const config = this.getObjectControlConfig();
|
|
4154
|
+
this.control = card === false ? this.theme.getObjectControlFlat(config) : this.theme.getObjectControl(config);
|
|
4108
4155
|
this.control.jsonData.input.value = JSON.stringify(this.instance.getValue(), null, 2);
|
|
4109
4156
|
}
|
|
4110
4157
|
announcePropertyAdded(propertyName, child) {
|
|
@@ -4126,6 +4173,9 @@ class EditorObject extends Editor {
|
|
|
4126
4173
|
this.announcePropertyAdded(propertyName, child);
|
|
4127
4174
|
postAction();
|
|
4128
4175
|
}
|
|
4176
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
4177
|
+
this.theme.adaptForHorizontalObjectControl(this.control, labelCol, inputCol, this.getTitle());
|
|
4178
|
+
}
|
|
4129
4179
|
addEventListeners() {
|
|
4130
4180
|
this.control.quickAddPropertyBtn.addEventListener("click", () => {
|
|
4131
4181
|
this.addProperty(this.control.quickAddPropertyControl.input, () => {
|
|
@@ -4575,6 +4625,25 @@ class EditorObjectAccordion extends EditorObject {
|
|
|
4575
4625
|
});
|
|
4576
4626
|
}
|
|
4577
4627
|
}
|
|
4628
|
+
class EditorObjectHorizontal extends EditorObject {
|
|
4629
|
+
static resolves(schema) {
|
|
4630
|
+
return getSchemaType(schema) === "object" && getSchemaXOption(schema, "format") === "horizontal";
|
|
4631
|
+
}
|
|
4632
|
+
build() {
|
|
4633
|
+
super.build();
|
|
4634
|
+
this.theme.initHorizontalObject(this.control.container);
|
|
4635
|
+
}
|
|
4636
|
+
refreshEditors() {
|
|
4637
|
+
const labelColumns = getSchemaXOption(this.instance.schema, "labelColumns");
|
|
4638
|
+
const inputColumns = getSchemaXOption(this.instance.schema, "inputColumns");
|
|
4639
|
+
super.refreshEditors();
|
|
4640
|
+
this.instance.children.forEach((child) => {
|
|
4641
|
+
if (child.isActive) {
|
|
4642
|
+
child.ui.adaptForHorizontal(labelColumns, inputColumns);
|
|
4643
|
+
}
|
|
4644
|
+
});
|
|
4645
|
+
}
|
|
4646
|
+
}
|
|
4578
4647
|
class EditorArray extends Editor {
|
|
4579
4648
|
static resolves(schema) {
|
|
4580
4649
|
return getSchemaType(schema) === "array";
|
|
@@ -4623,6 +4692,9 @@ class EditorArray extends Editor {
|
|
|
4623
4692
|
doDeleteAll();
|
|
4624
4693
|
}
|
|
4625
4694
|
}
|
|
4695
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
4696
|
+
this.theme.adaptForHorizontalArrayControl(this.control, labelCol, inputCol, this.getTitle());
|
|
4697
|
+
}
|
|
4626
4698
|
addEventListeners() {
|
|
4627
4699
|
this.control.addBtn.addEventListener("click", () => {
|
|
4628
4700
|
this.instance.addItem("user");
|
|
@@ -5278,6 +5350,9 @@ class EditorArrayChoices extends Editor {
|
|
|
5278
5350
|
console.error("Choices is not available or not loaded correctly.", e);
|
|
5279
5351
|
}
|
|
5280
5352
|
}
|
|
5353
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5354
|
+
this.theme.adaptForHorizontalSelectControl(this.control, labelCol, inputCol);
|
|
5355
|
+
}
|
|
5281
5356
|
addEventListeners() {
|
|
5282
5357
|
this.control.input.addEventListener("change", () => {
|
|
5283
5358
|
const value = this.choicesInstance.getValue(true);
|
|
@@ -5500,6 +5575,9 @@ class EditorMultiple extends Editor {
|
|
|
5500
5575
|
adaptForTable(td) {
|
|
5501
5576
|
this.theme.adaptForTableMultipleControl(this.control, td);
|
|
5502
5577
|
}
|
|
5578
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5579
|
+
this.theme.adaptForHorizontalMultipleControl(this.control, labelCol, inputCol, this.getTitle());
|
|
5580
|
+
}
|
|
5503
5581
|
addEventListeners() {
|
|
5504
5582
|
if (this.switcherInput === "select") {
|
|
5505
5583
|
this.control.switcher.input.addEventListener("change", () => {
|
|
@@ -5594,6 +5672,9 @@ class EditorNull extends Editor {
|
|
|
5594
5672
|
info: this.getInfo()
|
|
5595
5673
|
});
|
|
5596
5674
|
}
|
|
5675
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5676
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
5677
|
+
}
|
|
5597
5678
|
sanitize() {
|
|
5598
5679
|
return null;
|
|
5599
5680
|
}
|
|
@@ -5620,6 +5701,9 @@ class EditorStringSimpleMDE extends EditorString {
|
|
|
5620
5701
|
console.error("simpleMDE is not available or not loaded correctly.", e);
|
|
5621
5702
|
}
|
|
5622
5703
|
}
|
|
5704
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5705
|
+
this.theme.adaptForHorizontalTextareaControl(this.control, labelCol, inputCol);
|
|
5706
|
+
}
|
|
5623
5707
|
addEventListeners() {
|
|
5624
5708
|
this.simplemde.codemirror.on("blur", () => {
|
|
5625
5709
|
const mdeText = this.simplemde.value();
|
|
@@ -5674,6 +5758,9 @@ class EditorStringQuill extends EditorString {
|
|
|
5674
5758
|
console.error("Quill is not available or not loaded correctly.", e);
|
|
5675
5759
|
}
|
|
5676
5760
|
}
|
|
5761
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5762
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
5763
|
+
}
|
|
5677
5764
|
addEventListeners() {
|
|
5678
5765
|
this.quill.root.addEventListener("blur", () => {
|
|
5679
5766
|
const quillText = this.quill.getText();
|
|
@@ -5736,6 +5823,9 @@ class EditorStringJodit extends EditorString {
|
|
|
5736
5823
|
console.error("Jodit is not available or not loaded correctly.", e);
|
|
5737
5824
|
}
|
|
5738
5825
|
}
|
|
5826
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5827
|
+
this.theme.adaptForHorizontalTextareaControl(this.control, labelCol, inputCol);
|
|
5828
|
+
}
|
|
5739
5829
|
addEventListeners() {
|
|
5740
5830
|
this.jodit.events.on("change", () => {
|
|
5741
5831
|
const joditValue = this.jodit.value;
|
|
@@ -5804,6 +5894,9 @@ class EditorStringPickr extends EditorString {
|
|
|
5804
5894
|
console.error("Pickr is not available or not loaded correctly.", e);
|
|
5805
5895
|
}
|
|
5806
5896
|
}
|
|
5897
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5898
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
5899
|
+
}
|
|
5807
5900
|
addEventListeners() {
|
|
5808
5901
|
}
|
|
5809
5902
|
refreshUI() {
|
|
@@ -5850,6 +5943,9 @@ class EditorStringFlatpickr extends EditorString {
|
|
|
5850
5943
|
console.error("Flatpickr is not available or not loaded correctly.", e);
|
|
5851
5944
|
}
|
|
5852
5945
|
}
|
|
5946
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5947
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
5948
|
+
}
|
|
5853
5949
|
addEventListeners() {
|
|
5854
5950
|
this.control.input.addEventListener("change", () => {
|
|
5855
5951
|
this.instance.setValue(this.control.input.value, true, "user");
|
|
@@ -5892,6 +5988,9 @@ class EditorStringIMask extends EditorString {
|
|
|
5892
5988
|
console.error("IMask is not available or not loaded or configured correctly.", e);
|
|
5893
5989
|
}
|
|
5894
5990
|
}
|
|
5991
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
5992
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
5993
|
+
}
|
|
5895
5994
|
addEventListeners() {
|
|
5896
5995
|
this.imask.on("accept", () => {
|
|
5897
5996
|
const value = this.useMaskedValue ? this.imask.value : this.imask.unmaskedValue;
|
|
@@ -5939,6 +6038,9 @@ class EditorNumberIMask extends EditorNumber {
|
|
|
5939
6038
|
console.error("IMask is not available or not loaded or configured correctly.", e);
|
|
5940
6039
|
}
|
|
5941
6040
|
}
|
|
6041
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6042
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
6043
|
+
}
|
|
5942
6044
|
addEventListeners() {
|
|
5943
6045
|
this.imask.on("accept", () => {
|
|
5944
6046
|
const value = this.imask.typedValue;
|
|
@@ -5985,6 +6087,9 @@ class EditorNumberRaty extends EditorNumber {
|
|
|
5985
6087
|
this.theme.visuallyHidden(this.control.label);
|
|
5986
6088
|
this.theme.visuallyHidden(this.control.description);
|
|
5987
6089
|
}
|
|
6090
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6091
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
6092
|
+
}
|
|
5988
6093
|
refreshDisabledState() {
|
|
5989
6094
|
if (this.disabled || this.readOnly) {
|
|
5990
6095
|
this.raty.readOnly(true);
|
|
@@ -6014,6 +6119,9 @@ class EditorAnyJson extends Editor {
|
|
|
6014
6119
|
this.jsonErrorEl.style.color = "red";
|
|
6015
6120
|
this.control.container.appendChild(this.jsonErrorEl);
|
|
6016
6121
|
}
|
|
6122
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6123
|
+
this.theme.adaptForHorizontalTextareaControl(this.control, labelCol, inputCol);
|
|
6124
|
+
}
|
|
6017
6125
|
addEventListeners() {
|
|
6018
6126
|
this.control.input.addEventListener("change", () => {
|
|
6019
6127
|
try {
|
|
@@ -6172,6 +6280,9 @@ class EditorArrayCheckboxes extends Editor {
|
|
|
6172
6280
|
adaptForTable(td) {
|
|
6173
6281
|
this.theme.adaptForTableCheckboxesControl(this.control, td);
|
|
6174
6282
|
}
|
|
6283
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6284
|
+
this.theme.adaptForHorizontalCheckboxesControl(this.control, labelCol, inputCol);
|
|
6285
|
+
}
|
|
6175
6286
|
addEventListeners() {
|
|
6176
6287
|
this.control.checkboxes.forEach((checkbox) => {
|
|
6177
6288
|
checkbox.addEventListener("change", () => {
|
|
@@ -6272,6 +6383,9 @@ class EditorNumberRange extends EditorNumber {
|
|
|
6272
6383
|
adaptForTable() {
|
|
6273
6384
|
this.theme.adaptForTableInputControl(this.control);
|
|
6274
6385
|
}
|
|
6386
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6387
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
6388
|
+
}
|
|
6275
6389
|
addEventListeners() {
|
|
6276
6390
|
this.control.input.addEventListener("input", () => {
|
|
6277
6391
|
this.control.output.textContent = parseFloat(this.control.input.value);
|
|
@@ -6346,6 +6460,9 @@ class EditorStringAce extends EditorString {
|
|
|
6346
6460
|
console.error("Ace editor is not available or not loaded correctly.", e);
|
|
6347
6461
|
}
|
|
6348
6462
|
}
|
|
6463
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6464
|
+
this.theme.adaptForHorizontalTextareaControl(this.control, labelCol, inputCol);
|
|
6465
|
+
}
|
|
6349
6466
|
addEventListeners() {
|
|
6350
6467
|
if (!this.aceEditor) return;
|
|
6351
6468
|
this.aceEditor.on("blur", () => {
|
|
@@ -6426,6 +6543,9 @@ class EditorStringFilepond extends EditorString {
|
|
|
6426
6543
|
console.error("FilePond is not available or not loaded correctly.", e);
|
|
6427
6544
|
}
|
|
6428
6545
|
}
|
|
6546
|
+
adaptForHorizontal(labelCol, inputCol) {
|
|
6547
|
+
this.theme.adaptForHorizontalInputControl(this.control, labelCol, inputCol);
|
|
6548
|
+
}
|
|
6429
6549
|
addEventListeners() {
|
|
6430
6550
|
}
|
|
6431
6551
|
refreshUI() {
|
|
@@ -6476,6 +6596,7 @@ class UiResolver {
|
|
|
6476
6596
|
EditorObjectCategories,
|
|
6477
6597
|
EditorObjectNav,
|
|
6478
6598
|
EditorObjectAccordion,
|
|
6599
|
+
EditorObjectHorizontal,
|
|
6479
6600
|
EditorObject,
|
|
6480
6601
|
EditorArrayChoices,
|
|
6481
6602
|
EditorArrayCheckboxes,
|
|
@@ -6841,7 +6962,8 @@ class Jedison extends EventEmitter {
|
|
|
6841
6962
|
enforceEnum: true,
|
|
6842
6963
|
subErrors: false,
|
|
6843
6964
|
debug: false,
|
|
6844
|
-
audacity: true
|
|
6965
|
+
audacity: true,
|
|
6966
|
+
switcherTypeLabels: {}
|
|
6845
6967
|
}, options);
|
|
6846
6968
|
this.rootName = "#";
|
|
6847
6969
|
this.pathSeparator = "/";
|
|
@@ -8307,6 +8429,161 @@ class Theme {
|
|
|
8307
8429
|
switcherSlot
|
|
8308
8430
|
};
|
|
8309
8431
|
}
|
|
8432
|
+
/**
|
|
8433
|
+
* Flat variant of getObjectControl — same interface but no fieldset/legend/collapse/panel-body.
|
|
8434
|
+
* Children render directly in a plain container div.
|
|
8435
|
+
*/
|
|
8436
|
+
getObjectControlFlat(config) {
|
|
8437
|
+
var _a;
|
|
8438
|
+
const container = document.createElement("div");
|
|
8439
|
+
const actions = this.getActionsSlot();
|
|
8440
|
+
const body = document.createElement("div");
|
|
8441
|
+
const ariaLive = this.getPropertiesAriaLive();
|
|
8442
|
+
const messages = this.getMessagesSlot();
|
|
8443
|
+
const childrenSlot = this.getChildrenSlot();
|
|
8444
|
+
const propertiesActivators = this.getPropertiesActivators();
|
|
8445
|
+
const info = this.getInfo(config.info);
|
|
8446
|
+
const description = this.getDescription({ content: config.description });
|
|
8447
|
+
const jsonData = this.getJsonData({ id: "json-data-" + config.id });
|
|
8448
|
+
const propertiesContainer = this.getPropertiesSlot({ id: "properties-slot-" + config.id });
|
|
8449
|
+
const propertiesToggle = this.getPropertiesToggle({
|
|
8450
|
+
content: config.propertiesToggleContent,
|
|
8451
|
+
id: "properties-slot-toggle-" + config.id,
|
|
8452
|
+
icon: "properties",
|
|
8453
|
+
propertiesContainer
|
|
8454
|
+
});
|
|
8455
|
+
const quickAddPropertyContainer = this.getQuickAddPropertySlot({ id: "quick-add-property-slot-" + config.id });
|
|
8456
|
+
const quickAddPropertyControl = this.getInputControl({
|
|
8457
|
+
type: "text",
|
|
8458
|
+
id: "jedi-quick-add-property-input-" + config.id,
|
|
8459
|
+
title: config.addPropertyContent
|
|
8460
|
+
});
|
|
8461
|
+
const quickAddPropertyBtn = this.getAddPropertyButton({ content: config.addPropertyContent, icon: "add" });
|
|
8462
|
+
const quickAddPropertyToggle = this.getQuickAddPropertyToggle({
|
|
8463
|
+
content: config.addPropertyContent,
|
|
8464
|
+
icon: "add",
|
|
8465
|
+
propertiesContainer: quickAddPropertyContainer
|
|
8466
|
+
});
|
|
8467
|
+
const collapse = document.createElement("div");
|
|
8468
|
+
const collapseToggle = document.createElement("div");
|
|
8469
|
+
const infoContainer = document.createElement("div");
|
|
8470
|
+
const switcherSlot = document.createElement("div");
|
|
8471
|
+
switcherSlot.classList.add("jedi-switcher-slot");
|
|
8472
|
+
const legend = document.createElement("div");
|
|
8473
|
+
legend.classList.add("jedi-editor-legend");
|
|
8474
|
+
legend.style.display = "flex";
|
|
8475
|
+
legend.style.justifyContent = "space-between";
|
|
8476
|
+
legend.style.alignItems = "center";
|
|
8477
|
+
const left = document.createElement("div");
|
|
8478
|
+
left.classList.add("jedi-editor-legend-left");
|
|
8479
|
+
const right = document.createElement("div");
|
|
8480
|
+
right.classList.add("jedi-editor-legend-right");
|
|
8481
|
+
right.style.display = "flex";
|
|
8482
|
+
right.style.alignItems = "center";
|
|
8483
|
+
legend.appendChild(left);
|
|
8484
|
+
legend.appendChild(right);
|
|
8485
|
+
const legendText = document.createElement("label");
|
|
8486
|
+
legendText.classList.add("jedi-title", "jedi-legend");
|
|
8487
|
+
legendText.textContent = config.title || "";
|
|
8488
|
+
if (config.titleHidden) {
|
|
8489
|
+
this.visuallyHidden(legendText);
|
|
8490
|
+
}
|
|
8491
|
+
left.appendChild(legendText);
|
|
8492
|
+
if (((_a = config == null ? void 0 : config.info) == null ? void 0 : _a.variant) === "modal") {
|
|
8493
|
+
this.infoAsModal(info, config.id, config.info);
|
|
8494
|
+
}
|
|
8495
|
+
if (config.editJsonData) {
|
|
8496
|
+
container.appendChild(jsonData.dialog);
|
|
8497
|
+
}
|
|
8498
|
+
const innerWrapper = document.createElement("div");
|
|
8499
|
+
innerWrapper.appendChild(legend);
|
|
8500
|
+
innerWrapper.appendChild(propertiesContainer);
|
|
8501
|
+
innerWrapper.appendChild(quickAddPropertyContainer);
|
|
8502
|
+
container.appendChild(innerWrapper);
|
|
8503
|
+
if (config.addProperty) {
|
|
8504
|
+
quickAddPropertyContainer.appendChild(quickAddPropertyControl.container);
|
|
8505
|
+
quickAddPropertyContainer.appendChild(quickAddPropertyBtn);
|
|
8506
|
+
}
|
|
8507
|
+
if (config.description) {
|
|
8508
|
+
body.appendChild(description);
|
|
8509
|
+
}
|
|
8510
|
+
body.appendChild(messages);
|
|
8511
|
+
if (config.readOnly === false) {
|
|
8512
|
+
right.appendChild(switcherSlot);
|
|
8513
|
+
right.appendChild(actions);
|
|
8514
|
+
}
|
|
8515
|
+
body.appendChild(childrenSlot);
|
|
8516
|
+
innerWrapper.appendChild(body);
|
|
8517
|
+
if (config.editJsonData) {
|
|
8518
|
+
actions.appendChild(jsonData.toggle);
|
|
8519
|
+
}
|
|
8520
|
+
if (config.addProperty) {
|
|
8521
|
+
actions.appendChild(quickAddPropertyToggle);
|
|
8522
|
+
}
|
|
8523
|
+
if (config.enablePropertiesToggle) {
|
|
8524
|
+
actions.appendChild(propertiesToggle);
|
|
8525
|
+
propertiesContainer.appendChild(ariaLive);
|
|
8526
|
+
propertiesContainer.appendChild(propertiesActivators);
|
|
8527
|
+
}
|
|
8528
|
+
if (config.enableCollapseToggle) {
|
|
8529
|
+
actions.appendChild(collapseToggle);
|
|
8530
|
+
}
|
|
8531
|
+
return {
|
|
8532
|
+
container,
|
|
8533
|
+
collapse,
|
|
8534
|
+
collapseToggle,
|
|
8535
|
+
description,
|
|
8536
|
+
body,
|
|
8537
|
+
actions,
|
|
8538
|
+
messages,
|
|
8539
|
+
childrenSlot,
|
|
8540
|
+
propertiesToggle,
|
|
8541
|
+
jsonData,
|
|
8542
|
+
propertiesContainer,
|
|
8543
|
+
quickAddPropertyContainer,
|
|
8544
|
+
quickAddPropertyControl,
|
|
8545
|
+
quickAddPropertyBtn,
|
|
8546
|
+
quickAddPropertyToggle,
|
|
8547
|
+
ariaLive,
|
|
8548
|
+
propertiesActivators,
|
|
8549
|
+
legend,
|
|
8550
|
+
legendText,
|
|
8551
|
+
infoContainer,
|
|
8552
|
+
right,
|
|
8553
|
+
switcherSlot,
|
|
8554
|
+
innerWrapper
|
|
8555
|
+
};
|
|
8556
|
+
}
|
|
8557
|
+
// eslint-disable-next-line no-unused-vars
|
|
8558
|
+
initHorizontalObject(container) {
|
|
8559
|
+
}
|
|
8560
|
+
// eslint-disable-next-line no-unused-vars
|
|
8561
|
+
adaptForHorizontalInputControl(control, labelCol, inputCol) {
|
|
8562
|
+
}
|
|
8563
|
+
// eslint-disable-next-line no-unused-vars
|
|
8564
|
+
adaptForHorizontalTextareaControl(control, labelCol, inputCol) {
|
|
8565
|
+
}
|
|
8566
|
+
// eslint-disable-next-line no-unused-vars
|
|
8567
|
+
adaptForHorizontalSelectControl(control, labelCol, inputCol) {
|
|
8568
|
+
}
|
|
8569
|
+
// eslint-disable-next-line no-unused-vars
|
|
8570
|
+
adaptForHorizontalCheckboxControl(control, labelCol, inputCol) {
|
|
8571
|
+
}
|
|
8572
|
+
// eslint-disable-next-line no-unused-vars
|
|
8573
|
+
adaptForHorizontalRadiosControl(control, labelCol, inputCol) {
|
|
8574
|
+
}
|
|
8575
|
+
// eslint-disable-next-line no-unused-vars
|
|
8576
|
+
adaptForHorizontalCheckboxesControl(control, labelCol, inputCol) {
|
|
8577
|
+
}
|
|
8578
|
+
// eslint-disable-next-line no-unused-vars
|
|
8579
|
+
adaptForHorizontalArrayControl(control, labelCol, inputCol, title) {
|
|
8580
|
+
}
|
|
8581
|
+
// eslint-disable-next-line no-unused-vars
|
|
8582
|
+
adaptForHorizontalObjectControl(control, labelCol, inputCol, title) {
|
|
8583
|
+
}
|
|
8584
|
+
// eslint-disable-next-line no-unused-vars
|
|
8585
|
+
adaptForHorizontalMultipleControl(control, labelCol, inputCol, title) {
|
|
8586
|
+
}
|
|
8310
8587
|
/**
|
|
8311
8588
|
* Returns an accordion item wrapping a child editor.
|
|
8312
8589
|
* Used by EditorObjectAccordionProperties to wrap each property.
|
|
@@ -9302,6 +9579,81 @@ class ThemeBootstrap3 extends Theme {
|
|
|
9302
9579
|
}
|
|
9303
9580
|
return control;
|
|
9304
9581
|
}
|
|
9582
|
+
initHorizontalObject(container) {
|
|
9583
|
+
container.classList.add("form-horizontal");
|
|
9584
|
+
}
|
|
9585
|
+
_adaptHorizontalControl(control, labelCol, inputCol) {
|
|
9586
|
+
if (!control.label || control.label.classList.contains("control-label")) return;
|
|
9587
|
+
const lc = labelCol ?? 3;
|
|
9588
|
+
const ic = inputCol ?? 6;
|
|
9589
|
+
control.container.classList.add("form-group");
|
|
9590
|
+
control.label.classList.add("control-label", `col-sm-${lc}`);
|
|
9591
|
+
const wrapper = document.createElement("div");
|
|
9592
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
9593
|
+
Array.from(control.container.children).filter((el) => el !== control.label).forEach((el) => wrapper.appendChild(el));
|
|
9594
|
+
control.container.appendChild(wrapper);
|
|
9595
|
+
}
|
|
9596
|
+
adaptForHorizontalInputControl(control, labelCol, inputCol) {
|
|
9597
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
9598
|
+
}
|
|
9599
|
+
adaptForHorizontalTextareaControl(control, labelCol, inputCol) {
|
|
9600
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
9601
|
+
}
|
|
9602
|
+
adaptForHorizontalSelectControl(control, labelCol, inputCol) {
|
|
9603
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
9604
|
+
}
|
|
9605
|
+
adaptForHorizontalCheckboxControl(control, labelCol, inputCol) {
|
|
9606
|
+
if (control.formGroup.parentElement !== control.container) return;
|
|
9607
|
+
const lc = labelCol ?? 3;
|
|
9608
|
+
const ic = inputCol ?? 6;
|
|
9609
|
+
control.container.classList.add("form-group");
|
|
9610
|
+
const wrapper = document.createElement("div");
|
|
9611
|
+
wrapper.classList.add(`col-sm-${ic}`, `col-sm-offset-${lc}`);
|
|
9612
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
9613
|
+
control.container.appendChild(wrapper);
|
|
9614
|
+
}
|
|
9615
|
+
adaptForHorizontalRadiosControl(control, labelCol, inputCol) {
|
|
9616
|
+
if (control.legend.parentElement !== control.fieldset) return;
|
|
9617
|
+
const lc = labelCol ?? 3;
|
|
9618
|
+
const ic = inputCol ?? 6;
|
|
9619
|
+
control.container.classList.add("form-group");
|
|
9620
|
+
control.legend.classList.add("control-label", `col-sm-${lc}`);
|
|
9621
|
+
control.container.insertBefore(control.legend, control.fieldset);
|
|
9622
|
+
const wrapper = document.createElement("div");
|
|
9623
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
9624
|
+
control.fieldset.replaceWith(wrapper);
|
|
9625
|
+
wrapper.appendChild(control.fieldset);
|
|
9626
|
+
control.fieldset.classList.remove("panel", "panel-default");
|
|
9627
|
+
}
|
|
9628
|
+
adaptForHorizontalCheckboxesControl(control, labelCol, inputCol) {
|
|
9629
|
+
this.adaptForHorizontalRadiosControl(control, labelCol, inputCol);
|
|
9630
|
+
}
|
|
9631
|
+
_adaptHorizontalComplexControl(control, labelCol, inputCol, title) {
|
|
9632
|
+
if (control.container.classList.contains("jedi-horizontal")) return;
|
|
9633
|
+
const lc = labelCol ?? 3;
|
|
9634
|
+
const ic = inputCol ?? 6;
|
|
9635
|
+
const fakeLabel = document.createElement("label");
|
|
9636
|
+
fakeLabel.classList.add("control-label", `col-sm-${lc}`);
|
|
9637
|
+
fakeLabel.textContent = title || "";
|
|
9638
|
+
const wrapper = document.createElement("div");
|
|
9639
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
9640
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
9641
|
+
control.container.classList.add("form-group", "jedi-horizontal");
|
|
9642
|
+
control.container.appendChild(fakeLabel);
|
|
9643
|
+
control.container.appendChild(wrapper);
|
|
9644
|
+
if (control.legendText) {
|
|
9645
|
+
control.legendText.style.display = "none";
|
|
9646
|
+
}
|
|
9647
|
+
}
|
|
9648
|
+
adaptForHorizontalArrayControl(control, labelCol, inputCol, title) {
|
|
9649
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
9650
|
+
}
|
|
9651
|
+
adaptForHorizontalObjectControl(control, labelCol, inputCol, title) {
|
|
9652
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
9653
|
+
}
|
|
9654
|
+
adaptForHorizontalMultipleControl(control, labelCol, inputCol, title) {
|
|
9655
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
9656
|
+
}
|
|
9305
9657
|
getAccordionItem(config) {
|
|
9306
9658
|
const collapseId = config.id + "-acc-collapse";
|
|
9307
9659
|
const container = document.createElement("div");
|
|
@@ -9754,6 +10106,77 @@ class ThemeBootstrap4 extends Theme {
|
|
|
9754
10106
|
}
|
|
9755
10107
|
return control;
|
|
9756
10108
|
}
|
|
10109
|
+
_adaptHorizontalControl(control, labelCol, inputCol) {
|
|
10110
|
+
if (!control.label || control.label.classList.contains("col-form-label")) return;
|
|
10111
|
+
const lc = labelCol ?? 3;
|
|
10112
|
+
const ic = inputCol ?? 6;
|
|
10113
|
+
control.container.classList.add("row");
|
|
10114
|
+
control.label.classList.add("col-form-label", "text-sm-right", `col-sm-${lc}`);
|
|
10115
|
+
const wrapper = document.createElement("div");
|
|
10116
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10117
|
+
Array.from(control.container.children).filter((el) => el !== control.label).forEach((el) => wrapper.appendChild(el));
|
|
10118
|
+
control.container.appendChild(wrapper);
|
|
10119
|
+
}
|
|
10120
|
+
adaptForHorizontalInputControl(control, labelCol, inputCol) {
|
|
10121
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10122
|
+
}
|
|
10123
|
+
adaptForHorizontalTextareaControl(control, labelCol, inputCol) {
|
|
10124
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10125
|
+
}
|
|
10126
|
+
adaptForHorizontalSelectControl(control, labelCol, inputCol) {
|
|
10127
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10128
|
+
}
|
|
10129
|
+
adaptForHorizontalCheckboxControl(control, labelCol, inputCol) {
|
|
10130
|
+
if (control.formGroup.parentElement !== control.container) return;
|
|
10131
|
+
const lc = labelCol ?? 3;
|
|
10132
|
+
const ic = inputCol ?? 6;
|
|
10133
|
+
control.container.classList.add("row");
|
|
10134
|
+
const wrapper = document.createElement("div");
|
|
10135
|
+
wrapper.classList.add(`col-sm-${ic}`, `offset-sm-${lc}`);
|
|
10136
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
10137
|
+
control.container.appendChild(wrapper);
|
|
10138
|
+
}
|
|
10139
|
+
adaptForHorizontalRadiosControl(control, labelCol, inputCol) {
|
|
10140
|
+
if (control.legend.parentElement !== control.fieldset) return;
|
|
10141
|
+
const lc = labelCol ?? 3;
|
|
10142
|
+
const ic = inputCol ?? 6;
|
|
10143
|
+
control.container.classList.add("row");
|
|
10144
|
+
control.legend.classList.add("col-form-label", "text-sm-right", `col-sm-${lc}`);
|
|
10145
|
+
control.container.insertBefore(control.legend, control.fieldset);
|
|
10146
|
+
const wrapper = document.createElement("div");
|
|
10147
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10148
|
+
control.fieldset.replaceWith(wrapper);
|
|
10149
|
+
wrapper.appendChild(control.fieldset);
|
|
10150
|
+
}
|
|
10151
|
+
adaptForHorizontalCheckboxesControl(control, labelCol, inputCol) {
|
|
10152
|
+
this.adaptForHorizontalRadiosControl(control, labelCol, inputCol);
|
|
10153
|
+
}
|
|
10154
|
+
_adaptHorizontalComplexControl(control, labelCol, inputCol, title) {
|
|
10155
|
+
if (control.container.classList.contains("jedi-horizontal")) return;
|
|
10156
|
+
const lc = labelCol ?? 3;
|
|
10157
|
+
const ic = inputCol ?? 6;
|
|
10158
|
+
const fakeLabel = document.createElement("label");
|
|
10159
|
+
fakeLabel.classList.add("col-form-label", "text-sm-right", `col-sm-${lc}`);
|
|
10160
|
+
fakeLabel.textContent = title || "";
|
|
10161
|
+
const wrapper = document.createElement("div");
|
|
10162
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10163
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
10164
|
+
control.container.classList.add("row", "jedi-horizontal");
|
|
10165
|
+
control.container.appendChild(fakeLabel);
|
|
10166
|
+
control.container.appendChild(wrapper);
|
|
10167
|
+
if (control.legendText) {
|
|
10168
|
+
control.legendText.style.display = "none";
|
|
10169
|
+
}
|
|
10170
|
+
}
|
|
10171
|
+
adaptForHorizontalArrayControl(control, labelCol, inputCol, title) {
|
|
10172
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10173
|
+
}
|
|
10174
|
+
adaptForHorizontalObjectControl(control, labelCol, inputCol, title) {
|
|
10175
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10176
|
+
}
|
|
10177
|
+
adaptForHorizontalMultipleControl(control, labelCol, inputCol, title) {
|
|
10178
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10179
|
+
}
|
|
9757
10180
|
getAccordionItem(config) {
|
|
9758
10181
|
const collapseId = config.id + "-acc-collapse";
|
|
9759
10182
|
const container = document.createElement("div");
|
|
@@ -10222,6 +10645,77 @@ class ThemeBootstrap5 extends Theme {
|
|
|
10222
10645
|
}
|
|
10223
10646
|
return control;
|
|
10224
10647
|
}
|
|
10648
|
+
_adaptHorizontalControl(control, labelCol, inputCol) {
|
|
10649
|
+
if (!control.label || control.label.classList.contains("col-form-label")) return;
|
|
10650
|
+
const lc = labelCol ?? 3;
|
|
10651
|
+
const ic = inputCol ?? 6;
|
|
10652
|
+
control.container.classList.add("row");
|
|
10653
|
+
control.label.classList.add("col-form-label", "text-sm-end", `col-sm-${lc}`);
|
|
10654
|
+
const wrapper = document.createElement("div");
|
|
10655
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10656
|
+
Array.from(control.container.children).filter((el) => el !== control.label).forEach((el) => wrapper.appendChild(el));
|
|
10657
|
+
control.container.appendChild(wrapper);
|
|
10658
|
+
}
|
|
10659
|
+
adaptForHorizontalInputControl(control, labelCol, inputCol) {
|
|
10660
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10661
|
+
}
|
|
10662
|
+
adaptForHorizontalTextareaControl(control, labelCol, inputCol) {
|
|
10663
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10664
|
+
}
|
|
10665
|
+
adaptForHorizontalSelectControl(control, labelCol, inputCol) {
|
|
10666
|
+
this._adaptHorizontalControl(control, labelCol, inputCol);
|
|
10667
|
+
}
|
|
10668
|
+
adaptForHorizontalCheckboxControl(control, labelCol, inputCol) {
|
|
10669
|
+
if (control.formGroup.parentElement !== control.container) return;
|
|
10670
|
+
const lc = labelCol ?? 3;
|
|
10671
|
+
const ic = inputCol ?? 6;
|
|
10672
|
+
control.container.classList.add("row");
|
|
10673
|
+
const wrapper = document.createElement("div");
|
|
10674
|
+
wrapper.classList.add(`col-sm-${ic}`, `offset-sm-${lc}`);
|
|
10675
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
10676
|
+
control.container.appendChild(wrapper);
|
|
10677
|
+
}
|
|
10678
|
+
adaptForHorizontalRadiosControl(control, labelCol, inputCol) {
|
|
10679
|
+
if (control.legend.parentElement !== control.fieldset) return;
|
|
10680
|
+
const lc = labelCol ?? 3;
|
|
10681
|
+
const ic = inputCol ?? 6;
|
|
10682
|
+
control.container.classList.add("row");
|
|
10683
|
+
control.legend.classList.add("col-form-label", "text-sm-end", `col-sm-${lc}`);
|
|
10684
|
+
control.container.insertBefore(control.legend, control.fieldset);
|
|
10685
|
+
const wrapper = document.createElement("div");
|
|
10686
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10687
|
+
control.fieldset.replaceWith(wrapper);
|
|
10688
|
+
wrapper.appendChild(control.fieldset);
|
|
10689
|
+
}
|
|
10690
|
+
adaptForHorizontalCheckboxesControl(control, labelCol, inputCol) {
|
|
10691
|
+
this.adaptForHorizontalRadiosControl(control, labelCol, inputCol);
|
|
10692
|
+
}
|
|
10693
|
+
_adaptHorizontalComplexControl(control, labelCol, inputCol, title) {
|
|
10694
|
+
if (control.container.classList.contains("jedi-horizontal")) return;
|
|
10695
|
+
const lc = labelCol ?? 3;
|
|
10696
|
+
const ic = inputCol ?? 6;
|
|
10697
|
+
const fakeLabel = document.createElement("label");
|
|
10698
|
+
fakeLabel.classList.add("col-form-label", "text-sm-end", `col-sm-${lc}`);
|
|
10699
|
+
fakeLabel.textContent = title || "";
|
|
10700
|
+
const wrapper = document.createElement("div");
|
|
10701
|
+
wrapper.classList.add(`col-sm-${ic}`);
|
|
10702
|
+
Array.from(control.container.children).forEach((el) => wrapper.appendChild(el));
|
|
10703
|
+
control.container.classList.add("row", "jedi-horizontal");
|
|
10704
|
+
control.container.appendChild(fakeLabel);
|
|
10705
|
+
control.container.appendChild(wrapper);
|
|
10706
|
+
if (control.legendText) {
|
|
10707
|
+
control.legendText.style.display = "none";
|
|
10708
|
+
}
|
|
10709
|
+
}
|
|
10710
|
+
adaptForHorizontalArrayControl(control, labelCol, inputCol, title) {
|
|
10711
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10712
|
+
}
|
|
10713
|
+
adaptForHorizontalObjectControl(control, labelCol, inputCol, title) {
|
|
10714
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10715
|
+
}
|
|
10716
|
+
adaptForHorizontalMultipleControl(control, labelCol, inputCol, title) {
|
|
10717
|
+
this._adaptHorizontalComplexControl(control, labelCol, inputCol, title);
|
|
10718
|
+
}
|
|
10225
10719
|
getAccordionItem(config) {
|
|
10226
10720
|
const collapseId = config.id + "-acc-collapse";
|
|
10227
10721
|
const container = document.createElement("div");
|
|
@@ -10671,6 +11165,7 @@ const index = {
|
|
|
10671
11165
|
EditorObjectCategories,
|
|
10672
11166
|
EditorObjectNav,
|
|
10673
11167
|
EditorObjectAccordion,
|
|
11168
|
+
EditorObjectHorizontal,
|
|
10674
11169
|
EditorObject,
|
|
10675
11170
|
EditorArrayChoices,
|
|
10676
11171
|
EditorArrayNav,
|