@focus8/settings-registry 0.8.4 → 0.8.5
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/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +145 -33
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
- package/src/index.ts +2460 -2296
- package/tsconfig.json +22 -22
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export type LockScreenImageMode = 'none' | 'background' | 'photoFrame';
|
|
|
28
28
|
export type PhotoFrameIntervalSeconds = 30 | 60 | 120 | 300;
|
|
29
29
|
export type EventVisibility = 'Public' | 'Private' | 'Custom';
|
|
30
30
|
export type SuggestEndTimeUnit = 'minutes' | 'hours';
|
|
31
|
+
export type ChronologicalDayViewDisplayMode = 'list' | 'timeline';
|
|
31
32
|
export type WeatherLocation = {
|
|
32
33
|
address: string;
|
|
33
34
|
name?: string;
|
|
@@ -63,6 +64,28 @@ export type SliderConfig = {
|
|
|
63
64
|
max: number;
|
|
64
65
|
step: number;
|
|
65
66
|
};
|
|
67
|
+
export type VisibilityCondition = {
|
|
68
|
+
dependsOn: string;
|
|
69
|
+
equals: unknown;
|
|
70
|
+
} | {
|
|
71
|
+
dependsOn: string;
|
|
72
|
+
notEquals: unknown;
|
|
73
|
+
} | {
|
|
74
|
+
dependsOn: string;
|
|
75
|
+
isTruthy: true;
|
|
76
|
+
};
|
|
77
|
+
/** Single condition or array of conditions (all must be true = AND). */
|
|
78
|
+
export type VisibilityRule = VisibilityCondition | VisibilityCondition[];
|
|
79
|
+
/** Alias — same shape, controls interactivity instead of visibility. */
|
|
80
|
+
export type DisabledRule = VisibilityCondition | VisibilityCondition[];
|
|
81
|
+
/**
|
|
82
|
+
* Evaluate a visibility/disabled rule against current setting values.
|
|
83
|
+
* Returns `true` if the setting should be visible (or disabled, depending on usage).
|
|
84
|
+
* `undefined` rule = always true (no restriction).
|
|
85
|
+
*/
|
|
86
|
+
export declare function evaluateVisibility(rule: VisibilityRule | undefined, getValue: (key: string) => unknown): boolean;
|
|
87
|
+
/** Convenience: returns true when the setting should be disabled. */
|
|
88
|
+
export declare function evaluateDisabled(rule: DisabledRule | undefined, getValue: (key: string) => unknown): boolean;
|
|
66
89
|
export declare const SETTINGS_CATEGORIES: readonly ["appearance", "calendarView", "calendars", "sound", "timer", "media", "lockScreen", "touch", "device", "language", "notification", "chronological", "eventForm", "chronologicalEventForm"];
|
|
67
90
|
export type SettingsCategory = (typeof SETTINGS_CATEGORIES)[number];
|
|
68
91
|
export declare const CATEGORY_LABELS: Record<SettingsCategory, string>;
|
|
@@ -131,6 +154,11 @@ export type SettingLabelDef = {
|
|
|
131
154
|
* the auto-generated label from `SettingsRegistry.getSettingLabel()`.
|
|
132
155
|
*/
|
|
133
156
|
export declare const SETTINGS_LABELS: Readonly<Record<string, SettingLabelDef>>;
|
|
157
|
+
/**
|
|
158
|
+
* Get the ordered list of setting keys for a given menu item.
|
|
159
|
+
* Returns keys matching the app's render order, filtered by EXCLUDED_DEVICE_SETTINGS and HIDDEN.
|
|
160
|
+
*/
|
|
161
|
+
export declare function getKeysForMenuItem(menuItemId: SettingsMenuItemId, reg?: SettingsRegistry): string[];
|
|
134
162
|
/**
|
|
135
163
|
* Group parsed setting entries using the app's menu structure (SETTINGS_MENU_ITEMS).
|
|
136
164
|
* Only includes menu items that have `keys` defined (editable settings).
|
|
@@ -161,6 +189,10 @@ export type SettingDef<T = unknown> = {
|
|
|
161
189
|
appMode?: 'ENROLLED';
|
|
162
190
|
/** Only show this setting for a specific calendar type (undefined = always) */
|
|
163
191
|
calendarType?: CalendarType;
|
|
192
|
+
/** Show this setting only when condition(s) are met */
|
|
193
|
+
visibleWhen?: VisibilityRule;
|
|
194
|
+
/** Disable (but still show) this setting when condition(s) are met */
|
|
195
|
+
disabledWhen?: DisabledRule;
|
|
164
196
|
};
|
|
165
197
|
export type RegistryConfig = {
|
|
166
198
|
/** Whether the device is in enrolled/kiosk mode */
|
|
@@ -212,6 +244,7 @@ declare function buildEntries(config: RegistryConfig): {
|
|
|
212
244
|
readonly 'sound.allowCustomReminderSounds': SettingDef<boolean>;
|
|
213
245
|
readonly 'sound.ttsEnabled': SettingDef<boolean>;
|
|
214
246
|
readonly 'sound.ttsRate': SettingDef<number>;
|
|
247
|
+
readonly 'timer.face': SettingDef<"ring" | "bars">;
|
|
215
248
|
readonly 'timer.showTimeRemaining': SettingDef<boolean>;
|
|
216
249
|
readonly 'timer.showEndTime': SettingDef<boolean>;
|
|
217
250
|
readonly 'timer.showRestartButton': SettingDef<boolean>;
|
|
@@ -260,6 +293,8 @@ declare function buildEntries(config: RegistryConfig): {
|
|
|
260
293
|
readonly 'chronological.quickSettings.showMediaVolume': SettingDef<boolean>;
|
|
261
294
|
readonly 'chronological.quickSettings.showBrightness': SettingDef<boolean>;
|
|
262
295
|
readonly 'chronological.quickSettings.showLockScreen': SettingDef<boolean>;
|
|
296
|
+
readonly 'chronological.quickSettings.showDayViewMode': SettingDef<boolean>;
|
|
297
|
+
readonly 'chronological.dayView.displayMode': SettingDef<ChronologicalDayViewDisplayMode>;
|
|
263
298
|
readonly 'chronological.timeOfDay.morningStart': SettingDef<number>;
|
|
264
299
|
readonly 'chronological.timeOfDay.forenoonStart': SettingDef<number>;
|
|
265
300
|
readonly 'chronological.timeOfDay.afternoonStart': SettingDef<number>;
|
|
@@ -351,6 +386,10 @@ export type ParsedSettingEntry = {
|
|
|
351
386
|
appMode?: 'ENROLLED';
|
|
352
387
|
/** Only show this setting for a specific calendar type (undefined = always) */
|
|
353
388
|
calendarType?: CalendarType;
|
|
389
|
+
/** Show this setting only when condition(s) are met */
|
|
390
|
+
visibleWhen?: VisibilityRule;
|
|
391
|
+
/** Disable (but still show) this setting when condition(s) are met */
|
|
392
|
+
disabledWhen?: DisabledRule;
|
|
354
393
|
};
|
|
355
394
|
export type ParsedSettingsGroup = {
|
|
356
395
|
/** The category key */
|
|
@@ -433,6 +472,7 @@ export declare function createSettingsRegistry(config?: Partial<RegistryConfig>)
|
|
|
433
472
|
readonly 'sound.allowCustomReminderSounds': SettingDef<boolean>;
|
|
434
473
|
readonly 'sound.ttsEnabled': SettingDef<boolean>;
|
|
435
474
|
readonly 'sound.ttsRate': SettingDef<number>;
|
|
475
|
+
readonly 'timer.face': SettingDef<"ring" | "bars">;
|
|
436
476
|
readonly 'timer.showTimeRemaining': SettingDef<boolean>;
|
|
437
477
|
readonly 'timer.showEndTime': SettingDef<boolean>;
|
|
438
478
|
readonly 'timer.showRestartButton': SettingDef<boolean>;
|
|
@@ -481,6 +521,8 @@ export declare function createSettingsRegistry(config?: Partial<RegistryConfig>)
|
|
|
481
521
|
readonly 'chronological.quickSettings.showMediaVolume': SettingDef<boolean>;
|
|
482
522
|
readonly 'chronological.quickSettings.showBrightness': SettingDef<boolean>;
|
|
483
523
|
readonly 'chronological.quickSettings.showLockScreen': SettingDef<boolean>;
|
|
524
|
+
readonly 'chronological.quickSettings.showDayViewMode': SettingDef<boolean>;
|
|
525
|
+
readonly 'chronological.dayView.displayMode': SettingDef<ChronologicalDayViewDisplayMode>;
|
|
484
526
|
readonly 'chronological.timeOfDay.morningStart': SettingDef<number>;
|
|
485
527
|
readonly 'chronological.timeOfDay.forenoonStart': SettingDef<number>;
|
|
486
528
|
readonly 'chronological.timeOfDay.afternoonStart': SettingDef<number>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AACvD,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;AACb,MAAM,MAAM,UAAU,G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AK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,EAAE,kBAAkB,EAAE,CAAC;CAChC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,YAAY,CAAC,EAAE,YAAY,EAC3B,QAAQ,GAAE,gBAAkC,GAC3C,mBAAmB,EAAE,CAmEvB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAoBzD;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,QAAQ,EAAE,gBAAgB,GACzB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUxB;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,QAAQ,GAAE,gBAAkC,GAC3C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUzB;AAMD,eAAO,MAAM,eAAe,kBAAyB,CAAC;AAQtD,wBAAgB,sBAAsB,CAAC,MAAM,GAAE,OAAO,CAAC,cAAc,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1E"}
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,32 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export const ALARM_TIMEOUTS = [5, 30, 60, 120, 180, 300, 600];
|
|
16
16
|
export const LOCK_SCREEN_MAX_IMAGES = 10;
|
|
17
|
+
/**
|
|
18
|
+
* Evaluate a visibility/disabled rule against current setting values.
|
|
19
|
+
* Returns `true` if the setting should be visible (or disabled, depending on usage).
|
|
20
|
+
* `undefined` rule = always true (no restriction).
|
|
21
|
+
*/
|
|
22
|
+
export function evaluateVisibility(rule, getValue) {
|
|
23
|
+
if (!rule)
|
|
24
|
+
return true;
|
|
25
|
+
const conditions = Array.isArray(rule) ? rule : [rule];
|
|
26
|
+
return conditions.every((c) => {
|
|
27
|
+
const value = getValue(c.dependsOn);
|
|
28
|
+
if ('equals' in c)
|
|
29
|
+
return value === c.equals;
|
|
30
|
+
if ('notEquals' in c)
|
|
31
|
+
return value !== c.notEquals;
|
|
32
|
+
if ('isTruthy' in c)
|
|
33
|
+
return !!value;
|
|
34
|
+
return true;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/** Convenience: returns true when the setting should be disabled. */
|
|
38
|
+
export function evaluateDisabled(rule, getValue) {
|
|
39
|
+
if (!rule)
|
|
40
|
+
return false;
|
|
41
|
+
return evaluateVisibility(rule, getValue);
|
|
42
|
+
}
|
|
17
43
|
// ---------------------------------------------------------------------------
|
|
18
44
|
// Setting categories — used for UI grouping and profile organization
|
|
19
45
|
// ---------------------------------------------------------------------------
|
|
@@ -167,6 +193,12 @@ export const SETTINGS_MENU_ITEMS = [
|
|
|
167
193
|
'calendarView.weekViewZoom',
|
|
168
194
|
'calendarView.calendarColumns',
|
|
169
195
|
'appearance.enableDayColors',
|
|
196
|
+
'chronological.dayView.displayMode',
|
|
197
|
+
'chronological.header.',
|
|
198
|
+
'chronological.footer.',
|
|
199
|
+
'chronological.menu.',
|
|
200
|
+
'chronological.quickSettings.',
|
|
201
|
+
'chronological.timeOfDay.',
|
|
170
202
|
],
|
|
171
203
|
},
|
|
172
204
|
{
|
|
@@ -192,9 +224,10 @@ export const SETTINGS_MENU_ITEMS = [
|
|
|
192
224
|
screens: ['notification'],
|
|
193
225
|
keys: [
|
|
194
226
|
'sound.reminderAlarmSound',
|
|
227
|
+
'sound.startAlarmSound',
|
|
228
|
+
'sound.endAlarmSound',
|
|
195
229
|
'sound.reminderAlarmTimeout',
|
|
196
230
|
'sound.reminderVolume',
|
|
197
|
-
'sound.allowCustomReminderSounds',
|
|
198
231
|
],
|
|
199
232
|
},
|
|
200
233
|
{
|
|
@@ -306,12 +339,9 @@ export const SETTINGS_MENU_ITEMS = [
|
|
|
306
339
|
screens: ['volume'],
|
|
307
340
|
appMode: 'ENROLLED',
|
|
308
341
|
keys: [
|
|
342
|
+
'sound.reminderVolume',
|
|
343
|
+
'sound.timerVolume',
|
|
309
344
|
'sound.mediaVolume',
|
|
310
|
-
'sound.startAlarmSound',
|
|
311
|
-
'sound.endAlarmSound',
|
|
312
|
-
'sound.ttsEnabled',
|
|
313
|
-
'sound.ttsRate',
|
|
314
|
-
'sound.alarmSound',
|
|
315
345
|
],
|
|
316
346
|
},
|
|
317
347
|
{
|
|
@@ -351,19 +381,17 @@ export const SETTINGS_MENU_ITEMS = [
|
|
|
351
381
|
'calendarView.autoReturnToTodayTimeoutSeconds',
|
|
352
382
|
],
|
|
353
383
|
},
|
|
354
|
-
{
|
|
355
|
-
id: 'profiles',
|
|
356
|
-
labelKey: 'SettingsProfiles.Title',
|
|
357
|
-
icon: 'BookCopy',
|
|
358
|
-
section: 'unit',
|
|
359
|
-
screens: ['profiles'],
|
|
360
|
-
},
|
|
361
384
|
{
|
|
362
385
|
id: 'tts',
|
|
363
386
|
labelKey: 'Settings.TtsTitle',
|
|
364
387
|
icon: 'Speech',
|
|
365
388
|
section: 'unit',
|
|
366
389
|
screens: ['tts'],
|
|
390
|
+
appMode: 'ENROLLED',
|
|
391
|
+
keys: [
|
|
392
|
+
'sound.ttsEnabled',
|
|
393
|
+
'sound.ttsRate',
|
|
394
|
+
],
|
|
367
395
|
},
|
|
368
396
|
{
|
|
369
397
|
id: 'updates',
|
|
@@ -449,6 +477,10 @@ export const SETTINGS_LABELS = {
|
|
|
449
477
|
labelKey: 'Settings.EnableDayColors',
|
|
450
478
|
descriptionKey: 'Settings.EnableDayColorsDescription',
|
|
451
479
|
},
|
|
480
|
+
// ── Chronological day view display mode ──────────────────────────────────
|
|
481
|
+
'chronological.dayView.displayMode': {
|
|
482
|
+
labelKey: 'Settings.DayViewDisplayMode',
|
|
483
|
+
},
|
|
452
484
|
// ── Calendar type ───────────────────────────────────────────────────────
|
|
453
485
|
'calendarView.type': {
|
|
454
486
|
labelKey: 'Settings.CalendarType',
|
|
@@ -519,6 +551,7 @@ export const SETTINGS_LABELS = {
|
|
|
519
551
|
},
|
|
520
552
|
'sound.ttsRate': { labelKey: 'Settings.TtsTitle' },
|
|
521
553
|
// ── Timer ───────────────────────────────────────────────────────────────
|
|
554
|
+
'timer.face': { labelKey: 'Settings.TimerFace' },
|
|
522
555
|
'timer.showTimeRemaining': { labelKey: 'Settings.TimerShowTimeRemaining' },
|
|
523
556
|
'timer.showEndTime': { labelKey: 'Settings.TimerShowEndTime' },
|
|
524
557
|
'timer.showRestartButton': { labelKey: 'Settings.TimerShowRestartButton' },
|
|
@@ -599,6 +632,9 @@ export const SETTINGS_LABELS = {
|
|
|
599
632
|
'chronological.footer.showNewEventButton': {
|
|
600
633
|
labelKey: 'ChronologicalFeatures.NewEventButton',
|
|
601
634
|
},
|
|
635
|
+
'chronological.footer.showNowButton': {
|
|
636
|
+
labelKey: 'ChronologicalFeatures.NowButton',
|
|
637
|
+
},
|
|
602
638
|
'chronological.footer.showSettingsButton': {
|
|
603
639
|
labelKey: 'ChronologicalFeatures.SettingsButton',
|
|
604
640
|
},
|
|
@@ -681,6 +717,32 @@ function registryKeyOrder() {
|
|
|
681
717
|
}
|
|
682
718
|
return _registryKeyOrder;
|
|
683
719
|
}
|
|
720
|
+
/**
|
|
721
|
+
* Get the ordered list of setting keys for a given menu item.
|
|
722
|
+
* Returns keys matching the app's render order, filtered by EXCLUDED_DEVICE_SETTINGS and HIDDEN.
|
|
723
|
+
*/
|
|
724
|
+
export function getKeysForMenuItem(menuItemId, reg = defaultRegistry) {
|
|
725
|
+
const menuItem = SETTINGS_MENU_ITEMS.find((m) => m.id === menuItemId);
|
|
726
|
+
if (!menuItem?.keys || menuItem.keys.length === 0)
|
|
727
|
+
return [];
|
|
728
|
+
const matched = reg.keys.filter((key) => {
|
|
729
|
+
if (EXCLUDED_DEVICE_SETTINGS.has(key))
|
|
730
|
+
return false;
|
|
731
|
+
const entry = reg.entries[key];
|
|
732
|
+
if (entry?.uiType === 'HIDDEN')
|
|
733
|
+
return false;
|
|
734
|
+
return menuItem.keys.some((k) => k.endsWith('.') ? key.startsWith(k) : key === k);
|
|
735
|
+
});
|
|
736
|
+
const order = registryKeyOrder();
|
|
737
|
+
matched.sort((a, b) => {
|
|
738
|
+
const aIdx = groupKeyIndex(a, menuItem.keys);
|
|
739
|
+
const bIdx = groupKeyIndex(b, menuItem.keys);
|
|
740
|
+
if (aIdx !== bIdx)
|
|
741
|
+
return aIdx - bIdx;
|
|
742
|
+
return (order.get(a) ?? Infinity) - (order.get(b) ?? Infinity);
|
|
743
|
+
});
|
|
744
|
+
return matched;
|
|
745
|
+
}
|
|
684
746
|
/**
|
|
685
747
|
* Group parsed setting entries using the app's menu structure (SETTINGS_MENU_ITEMS).
|
|
686
748
|
* Only includes menu items that have `keys` defined (editable settings).
|
|
@@ -802,6 +864,12 @@ function def(category, type, defaultValue, uiType, extra) {
|
|
|
802
864
|
if (extra?.calendarType) {
|
|
803
865
|
result.calendarType = extra.calendarType;
|
|
804
866
|
}
|
|
867
|
+
if (extra?.visibleWhen) {
|
|
868
|
+
result.visibleWhen = extra.visibleWhen;
|
|
869
|
+
}
|
|
870
|
+
if (extra?.disabledWhen) {
|
|
871
|
+
result.disabledWhen = extra.disabledWhen;
|
|
872
|
+
}
|
|
805
873
|
return result;
|
|
806
874
|
}
|
|
807
875
|
// ---------------------------------------------------------------------------
|
|
@@ -879,10 +947,13 @@ function buildEntries(config) {
|
|
|
879
947
|
'calendarView.showCalendarNames': def('calendarView', 'boolean', true, 'TOGGLE'),
|
|
880
948
|
'calendarView.calendarColumns': def('calendarView', 'json', [], 'CUSTOM_SPLIT_VIEW_CONFIG'),
|
|
881
949
|
'calendarView.autoReturnToTodayEnabled': def('calendarView', 'boolean', config.isEnrolled, 'TOGGLE'),
|
|
882
|
-
'calendarView.autoReturnToTodayTimeoutSeconds': def('calendarView', 'number', 300, 'SLIDER', {
|
|
950
|
+
'calendarView.autoReturnToTodayTimeoutSeconds': def('calendarView', 'number', 300, 'SLIDER', {
|
|
951
|
+
sliderConfig: { min: 30, max: 600, step: 30 },
|
|
952
|
+
visibleWhen: { dependsOn: 'calendarView.autoReturnToTodayEnabled', isTruthy: true },
|
|
953
|
+
}),
|
|
883
954
|
'calendarView.showWeatherOnEvents': def('calendarView', 'boolean', false, 'TOGGLE'),
|
|
884
955
|
'calendarView.showWeatherOnTimeline': def('calendarView', 'boolean', false, 'TOGGLE'),
|
|
885
|
-
'calendarView.weatherLocation': def('calendarView', 'json', null, 'CUSTOM_WEATHER_LOCATION'),
|
|
956
|
+
'calendarView.weatherLocation': def('calendarView', 'json', null, 'CUSTOM_WEATHER_LOCATION', { visibleWhen: { dependsOn: 'calendarView.showWeatherOnTimeline', isTruthy: true } }),
|
|
886
957
|
// ═══════════════════════════════════════════════════════════════════════
|
|
887
958
|
// Event form field visibility (time-based)
|
|
888
959
|
// ═══════════════════════════════════════════════════════════════════════
|
|
@@ -900,8 +971,13 @@ function buildEntries(config) {
|
|
|
900
971
|
// ═══════════════════════════════════════════════════════════════════════
|
|
901
972
|
// Sound & alerts
|
|
902
973
|
// ═══════════════════════════════════════════════════════════════════════
|
|
903
|
-
'sound.timerVolume': def('sound', 'number', 0.5, 'VOLUME_SLIDER'
|
|
904
|
-
|
|
974
|
+
'sound.timerVolume': def('sound', 'number', 0.5, 'VOLUME_SLIDER', {
|
|
975
|
+
visibleWhen: { dependsOn: 'sound.timerAlarmSound', notEquals: 'none' },
|
|
976
|
+
}),
|
|
977
|
+
'sound.reminderVolume': def('sound', 'number', 0.5, 'VOLUME_SLIDER', {
|
|
978
|
+
appMode: 'ENROLLED',
|
|
979
|
+
visibleWhen: { dependsOn: 'sound.reminderAlarmSound', notEquals: 'none' },
|
|
980
|
+
}),
|
|
905
981
|
'sound.mediaVolume': def('sound', 'number', 0.5, 'VOLUME_SLIDER', {
|
|
906
982
|
appMode: 'ENROLLED',
|
|
907
983
|
}),
|
|
@@ -909,28 +985,43 @@ function buildEntries(config) {
|
|
|
909
985
|
options: ALARM_SOUND_OPTIONS,
|
|
910
986
|
}),
|
|
911
987
|
'sound.reminderAlarmSound': def('sound', 'string', 'alarm1', 'SELECT', { options: ALARM_SOUND_OPTIONS }),
|
|
912
|
-
'sound.startAlarmSound': def('sound', 'string', 'alarm1', 'SELECT', {
|
|
913
|
-
|
|
988
|
+
'sound.startAlarmSound': def('sound', 'string', 'alarm1', 'SELECT', {
|
|
989
|
+
options: ALARM_SOUND_OPTIONS,
|
|
990
|
+
visibleWhen: { dependsOn: 'calendarView.type', equals: 'chronological' },
|
|
991
|
+
}),
|
|
992
|
+
'sound.endAlarmSound': def('sound', 'string', 'alarm1', 'SELECT', {
|
|
993
|
+
options: ALARM_SOUND_OPTIONS,
|
|
994
|
+
visibleWhen: { dependsOn: 'calendarView.type', equals: 'chronological' },
|
|
995
|
+
}),
|
|
914
996
|
'sound.timerAlarmSound': def('sound', 'string', 'alarm1', 'SELECT', { options: ALARM_SOUND_OPTIONS }),
|
|
915
|
-
'sound.timerAlarmTimeout': def('sound', 'number', 180, 'SELECT', {
|
|
916
|
-
|
|
917
|
-
|
|
997
|
+
'sound.timerAlarmTimeout': def('sound', 'number', 180, 'SELECT', {
|
|
998
|
+
options: ALARM_TIMEOUT_OPTIONS,
|
|
999
|
+
visibleWhen: { dependsOn: 'sound.timerAlarmSound', notEquals: 'none' },
|
|
1000
|
+
}),
|
|
1001
|
+
'sound.reminderAlarmTimeout': def('sound', 'number', 180, 'SELECT', {
|
|
1002
|
+
options: ALARM_TIMEOUT_OPTIONS,
|
|
1003
|
+
visibleWhen: { dependsOn: 'sound.reminderAlarmSound', notEquals: 'none' },
|
|
1004
|
+
}),
|
|
1005
|
+
'sound.allowCustomReminderSounds': def('sound', 'boolean', false, 'HIDDEN'),
|
|
918
1006
|
'sound.ttsEnabled': def('sound', 'boolean', config.isEnrolled, 'TOGGLE', { appMode: 'ENROLLED' }),
|
|
919
1007
|
'sound.ttsRate': def('sound', 'number', 1.0, 'SLIDER', {
|
|
920
1008
|
sliderConfig: { min: 0.5, max: 2, step: 0.1 },
|
|
921
1009
|
appMode: 'ENROLLED',
|
|
1010
|
+
visibleWhen: { dependsOn: 'sound.ttsEnabled', isTruthy: true },
|
|
922
1011
|
}),
|
|
923
1012
|
// ═══════════════════════════════════════════════════════════════════════
|
|
924
1013
|
// Timer
|
|
925
1014
|
// ═══════════════════════════════════════════════════════════════════════
|
|
926
|
-
'timer.
|
|
927
|
-
|
|
928
|
-
|
|
1015
|
+
'timer.face': def('timer', 'string', 'ring', 'SELECT', {
|
|
1016
|
+
options: [
|
|
1017
|
+
{ value: 'ring', labelKey: 'Timer.FaceRing' },
|
|
1018
|
+
{ value: 'bars', labelKey: 'Timer.FaceBars' },
|
|
1019
|
+
],
|
|
929
1020
|
}),
|
|
1021
|
+
'timer.showTimeRemaining': def('timer', 'boolean', true, 'TOGGLE'),
|
|
1022
|
+
'timer.showEndTime': def('timer', 'boolean', true, 'TOGGLE'),
|
|
930
1023
|
'timer.showRestartButton': def('timer', 'boolean', true, 'TOGGLE'),
|
|
931
|
-
'timer.showPauseButton': def('timer', 'boolean', true, 'TOGGLE',
|
|
932
|
-
calendarType: 'time-based',
|
|
933
|
-
}),
|
|
1024
|
+
'timer.showPauseButton': def('timer', 'boolean', true, 'TOGGLE'),
|
|
934
1025
|
// ═══════════════════════════════════════════════════════════════════════
|
|
935
1026
|
// Lock screen
|
|
936
1027
|
// ═══════════════════════════════════════════════════════════════════════
|
|
@@ -944,6 +1035,7 @@ function buildEntries(config) {
|
|
|
944
1035
|
{ value: 30, labelKey: 'Settings.Option.InactivityTimeout.30min' },
|
|
945
1036
|
{ value: 45, labelKey: 'Settings.Option.InactivityTimeout.45min' },
|
|
946
1037
|
],
|
|
1038
|
+
visibleWhen: { dependsOn: 'lockScreen.inactivityLockEnabled', isTruthy: true },
|
|
947
1039
|
}),
|
|
948
1040
|
'lockScreen.pin': def('lockScreen', 'string', '', 'PIN_INPUT'),
|
|
949
1041
|
'lockScreen.clockDisplay': def('lockScreen', 'string', 'digital', 'SELECT', {
|
|
@@ -959,7 +1051,7 @@ function buildEntries(config) {
|
|
|
959
1051
|
},
|
|
960
1052
|
],
|
|
961
1053
|
}),
|
|
962
|
-
'lockScreen.showHourNumbers': def('lockScreen', 'boolean', true, 'TOGGLE'),
|
|
1054
|
+
'lockScreen.showHourNumbers': def('lockScreen', 'boolean', true, 'TOGGLE', { visibleWhen: { dependsOn: 'lockScreen.clockDisplay', equals: 'analog' } }),
|
|
963
1055
|
'lockScreen.showDate': def('lockScreen', 'boolean', true, 'TOGGLE'),
|
|
964
1056
|
'lockScreen.imageMode': def('lockScreen', 'string', 'none', 'SELECT', {
|
|
965
1057
|
options: [
|
|
@@ -974,7 +1066,7 @@ function buildEntries(config) {
|
|
|
974
1066
|
},
|
|
975
1067
|
],
|
|
976
1068
|
}),
|
|
977
|
-
'lockScreen.backgroundImage': def('lockScreen', 'json', null, 'CUSTOM_IMAGE'),
|
|
1069
|
+
'lockScreen.backgroundImage': def('lockScreen', 'json', null, 'CUSTOM_IMAGE', { visibleWhen: { dependsOn: 'lockScreen.imageMode', equals: 'background' } }),
|
|
978
1070
|
'lockScreen.photoFrameIntervalSeconds': def('lockScreen', 'number', 60, 'SELECT', {
|
|
979
1071
|
options: [
|
|
980
1072
|
{ value: 30, labelKey: 'Settings.Option.PhotoFrameInterval.30sec' },
|
|
@@ -982,13 +1074,16 @@ function buildEntries(config) {
|
|
|
982
1074
|
{ value: 120, labelKey: 'Settings.Option.PhotoFrameInterval.2min' },
|
|
983
1075
|
{ value: 300, labelKey: 'Settings.Option.PhotoFrameInterval.5min' },
|
|
984
1076
|
],
|
|
1077
|
+
visibleWhen: { dependsOn: 'lockScreen.imageMode', equals: 'photoFrame' },
|
|
985
1078
|
}),
|
|
986
|
-
'lockScreen.photoFrameImages': def('lockScreen', 'json', [], 'CUSTOM_IMAGE_ARRAY'),
|
|
1079
|
+
'lockScreen.photoFrameImages': def('lockScreen', 'json', [], 'CUSTOM_IMAGE_ARRAY', { visibleWhen: { dependsOn: 'lockScreen.imageMode', equals: 'photoFrame' } }),
|
|
987
1080
|
// ═══════════════════════════════════════════════════════════════════════
|
|
988
1081
|
// Touch / gestures
|
|
989
1082
|
// ═══════════════════════════════════════════════════════════════════════
|
|
990
|
-
'touch.enableTapToCreate': def('touch', 'boolean', false, 'TOGGLE'),
|
|
991
|
-
'touch.enableDragDrop': def('touch', 'boolean', false, 'TOGGLE'
|
|
1083
|
+
'touch.enableTapToCreate': def('touch', 'boolean', false, 'TOGGLE', { disabledWhen: { dependsOn: 'sound.ttsEnabled', isTruthy: true } }),
|
|
1084
|
+
'touch.enableDragDrop': def('touch', 'boolean', false, 'TOGGLE', {
|
|
1085
|
+
disabledWhen: { dependsOn: 'sound.ttsEnabled', isTruthy: true },
|
|
1086
|
+
}),
|
|
992
1087
|
// ═══════════════════════════════════════════════════════════════════════
|
|
993
1088
|
// Device (not synced unless noted)
|
|
994
1089
|
// ═══════════════════════════════════════════════════════════════════════
|
|
@@ -1051,6 +1146,21 @@ function buildEntries(config) {
|
|
|
1051
1146
|
'chronological.quickSettings.showMediaVolume': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
1052
1147
|
'chronological.quickSettings.showBrightness': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
1053
1148
|
'chronological.quickSettings.showLockScreen': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
1149
|
+
'chronological.quickSettings.showDayViewMode': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
1150
|
+
// Day view display mode
|
|
1151
|
+
'chronological.dayView.displayMode': def('chronological', 'string', 'list', 'SELECT', {
|
|
1152
|
+
options: [
|
|
1153
|
+
{
|
|
1154
|
+
value: 'list',
|
|
1155
|
+
labelKey: 'Settings.Option.DayViewDisplayMode.List',
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
value: 'timeline',
|
|
1159
|
+
labelKey: 'Settings.Option.DayViewDisplayMode.Timeline',
|
|
1160
|
+
},
|
|
1161
|
+
],
|
|
1162
|
+
calendarType: 'chronological',
|
|
1163
|
+
}),
|
|
1054
1164
|
// Time-of-day periods
|
|
1055
1165
|
'chronological.timeOfDay.morningStart': def('chronological', 'number', 6, 'SLIDER', { sliderConfig: TIME_OF_DAY_SLIDER }),
|
|
1056
1166
|
'chronological.timeOfDay.forenoonStart': def('chronological', 'number', 9, 'SLIDER', { sliderConfig: TIME_OF_DAY_SLIDER }),
|
|
@@ -1291,6 +1401,8 @@ export function parseSettingsSnapshot(json, calendarType, registry = defaultRegi
|
|
|
1291
1401
|
...(entryDef?.sliderConfig && { sliderConfig: entryDef.sliderConfig }),
|
|
1292
1402
|
...(entryDef?.appMode && { appMode: entryDef.appMode }),
|
|
1293
1403
|
...(entryDef?.calendarType && { calendarType: entryDef.calendarType }),
|
|
1404
|
+
...(entryDef?.visibleWhen && { visibleWhen: entryDef.visibleWhen }),
|
|
1405
|
+
...(entryDef?.disabledWhen && { disabledWhen: entryDef.disabledWhen }),
|
|
1294
1406
|
});
|
|
1295
1407
|
}
|
|
1296
1408
|
// Determine which categories to show
|