@lvce-editor/settings-view 1.11.0 → 1.12.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/dist/settingsViewWorkerMain.js +31 -14
- package/package.json +1 -1
|
@@ -1419,6 +1419,7 @@ const WordSeparators = 'Word Separators';
|
|
|
1419
1419
|
const WordSeparatorsDescription = 'Characters that will be used as word separators when doing word related navigations or operations';
|
|
1420
1420
|
const WrappingIndent = 'Wrapping Indent';
|
|
1421
1421
|
const WrappingIndentDescription = 'Controls the indentation of wrapped lines';
|
|
1422
|
+
const UnknownSettingType = 'Unknown setting type';
|
|
1422
1423
|
|
|
1423
1424
|
const autoSave = () => {
|
|
1424
1425
|
return i18nString(AutoSave);
|
|
@@ -2217,6 +2218,9 @@ const wrappingIndent = () => {
|
|
|
2217
2218
|
const wrappingIndentDescription = () => {
|
|
2218
2219
|
return i18nString(WrappingIndentDescription);
|
|
2219
2220
|
};
|
|
2221
|
+
const unknownSettingType = () => {
|
|
2222
|
+
return i18nString(UnknownSettingType);
|
|
2223
|
+
};
|
|
2220
2224
|
|
|
2221
2225
|
const getSettingItems = async () => {
|
|
2222
2226
|
return [{
|
|
@@ -3309,6 +3313,7 @@ const SettingsSearchInput = 'SettingsSearchInput';
|
|
|
3309
3313
|
const Button = 'Button';
|
|
3310
3314
|
const InputButton = 'InputButton';
|
|
3311
3315
|
const SearchFieldButton = 'SearchFieldButton';
|
|
3316
|
+
const Disabled = 'Disabled';
|
|
3312
3317
|
const MaskIcon = 'MaskIcon';
|
|
3313
3318
|
const MaskIconClearAll = 'MaskIconClearAll';
|
|
3314
3319
|
const SettingsItem = 'SettingsItem';
|
|
@@ -3347,14 +3352,20 @@ const HandleSettingInput = 'handleSettingInput';
|
|
|
3347
3352
|
const HandleSettingChecked = 'handleSettingChecked';
|
|
3348
3353
|
const HandleSettingSelect = 'handleSettingSelect';
|
|
3349
3354
|
|
|
3350
|
-
const
|
|
3355
|
+
const getButtonClassName = hasSearchValue => {
|
|
3356
|
+
if (hasSearchValue) {
|
|
3357
|
+
return mergeClassNames(Button, InputButton, SearchFieldButton);
|
|
3358
|
+
}
|
|
3359
|
+
return mergeClassNames(Button, InputButton, SearchFieldButton, Disabled);
|
|
3360
|
+
};
|
|
3361
|
+
const getSettingsInputButtonsDom = hasSearchValue => {
|
|
3351
3362
|
return [{
|
|
3352
3363
|
type: VirtualDomElements.Button,
|
|
3353
|
-
className:
|
|
3364
|
+
className: getButtonClassName(hasSearchValue),
|
|
3354
3365
|
childCount: 1,
|
|
3355
3366
|
ariaLabel: clear(),
|
|
3356
3367
|
name: Clear$1,
|
|
3357
|
-
|
|
3368
|
+
disabled: !hasSearchValue,
|
|
3358
3369
|
onClick: HandleClickClear
|
|
3359
3370
|
}, {
|
|
3360
3371
|
type: VirtualDomElements.Div,
|
|
@@ -3389,7 +3400,7 @@ const getSettingsHeaderDom = (filteredSettingsCount, hasSearchValue) => {
|
|
|
3389
3400
|
type: VirtualDomElements.Div,
|
|
3390
3401
|
className: SettingsInputWrapper,
|
|
3391
3402
|
childCount
|
|
3392
|
-
}, ...getSettingsInputDom(), ...getSettingsInputButtonsDom(), ...badgeDom];
|
|
3403
|
+
}, ...getSettingsInputDom(), ...getSettingsInputButtonsDom(hasSearchValue), ...badgeDom];
|
|
3393
3404
|
};
|
|
3394
3405
|
|
|
3395
3406
|
const getInputId = id => {
|
|
@@ -3406,7 +3417,8 @@ const getItemCheckBoxVirtualDom = item => {
|
|
|
3406
3417
|
return [{
|
|
3407
3418
|
type: VirtualDomElements.Div,
|
|
3408
3419
|
className: SettingsItem,
|
|
3409
|
-
childCount: 3
|
|
3420
|
+
childCount: 3,
|
|
3421
|
+
role: 'group'
|
|
3410
3422
|
}, {
|
|
3411
3423
|
type: VirtualDomElements.H3,
|
|
3412
3424
|
childCount: 1
|
|
@@ -3417,10 +3429,11 @@ const getItemCheckBoxVirtualDom = item => {
|
|
|
3417
3429
|
}, {
|
|
3418
3430
|
type: VirtualDomElements.Input,
|
|
3419
3431
|
className: CheckBox,
|
|
3420
|
-
inputType: 'checkbox',
|
|
3421
3432
|
childCount: 0,
|
|
3422
3433
|
id: domId,
|
|
3423
|
-
|
|
3434
|
+
inputType: 'checkbox',
|
|
3435
|
+
name: id,
|
|
3436
|
+
onChange: HandleSettingChecked
|
|
3424
3437
|
}, {
|
|
3425
3438
|
type: VirtualDomElements.Label,
|
|
3426
3439
|
childCount: 1,
|
|
@@ -3438,7 +3451,8 @@ const getItemNumberVirtualDom = item => {
|
|
|
3438
3451
|
return [{
|
|
3439
3452
|
type: VirtualDomElements.Div,
|
|
3440
3453
|
className: SettingsItem,
|
|
3441
|
-
childCount: 3
|
|
3454
|
+
childCount: 3,
|
|
3455
|
+
role: 'group'
|
|
3442
3456
|
}, {
|
|
3443
3457
|
type: VirtualDomElements.H3,
|
|
3444
3458
|
childCount: 1
|
|
@@ -3481,7 +3495,8 @@ const getItemSelectVirtualDom = item => {
|
|
|
3481
3495
|
return [{
|
|
3482
3496
|
type: VirtualDomElements.Div,
|
|
3483
3497
|
className: SettingsItem,
|
|
3484
|
-
childCount: 3
|
|
3498
|
+
childCount: 3,
|
|
3499
|
+
role: 'group'
|
|
3485
3500
|
}, {
|
|
3486
3501
|
type: VirtualDomElements.H3,
|
|
3487
3502
|
childCount: 1
|
|
@@ -3505,7 +3520,8 @@ const getItemStringVirtualDom = item => {
|
|
|
3505
3520
|
return [{
|
|
3506
3521
|
type: VirtualDomElements.Div,
|
|
3507
3522
|
className: SettingsItem,
|
|
3508
|
-
childCount: 3
|
|
3523
|
+
childCount: 3,
|
|
3524
|
+
role: 'group'
|
|
3509
3525
|
}, {
|
|
3510
3526
|
type: VirtualDomElements.H3,
|
|
3511
3527
|
childCount: 1
|
|
@@ -3527,8 +3543,9 @@ const getItemUnknownVirtualDom = () => {
|
|
|
3527
3543
|
return [{
|
|
3528
3544
|
type: VirtualDomElements.Div,
|
|
3529
3545
|
className: SettingsItem,
|
|
3530
|
-
childCount: 1
|
|
3531
|
-
|
|
3546
|
+
childCount: 1,
|
|
3547
|
+
role: 'group'
|
|
3548
|
+
}, text(unknownSettingType())];
|
|
3532
3549
|
};
|
|
3533
3550
|
|
|
3534
3551
|
const getItemVirtualDom = item => {
|
|
@@ -3720,10 +3737,10 @@ const renderEventListeners = () => {
|
|
|
3720
3737
|
params: ['handleSettingInput', 'event.target.name', 'event.target.value']
|
|
3721
3738
|
}, {
|
|
3722
3739
|
name: HandleSettingChecked,
|
|
3723
|
-
params: ['
|
|
3740
|
+
params: ['handleSettingChecked', 'event.target.name', 'event.target.value']
|
|
3724
3741
|
}, {
|
|
3725
3742
|
name: HandleSettingSelect,
|
|
3726
|
-
params: ['
|
|
3743
|
+
params: ['handleSettingSelect', 'event.target.name', 'event.target.value']
|
|
3727
3744
|
}];
|
|
3728
3745
|
};
|
|
3729
3746
|
|