iobroker.telegram-menu 2.4.2 → 2.4.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/README.md +6 -0
- package/admin/build/index.js +59 -59
- package/admin/build/index.js.map +3 -3
- package/admin/css/style.css +7 -0
- package/admin/i18n/de/translations.json +1 -1
- package/admin/i18n/en/translations.json +1 -1
- package/admin/words.js +3 -3
- package/build/app/dynamicValue.js +12 -11
- package/build/app/dynamicValue.js.map +2 -2
- package/build/app/processData.js +9 -9
- package/build/app/processData.js.map +2 -2
- package/build/app/setstate.js +1 -0
- package/build/app/setstate.js.map +2 -2
- package/build/lib/utilities.js +3 -1
- package/build/lib/utilities.js.map +3 -3
- package/build/main.js +18 -4
- package/build/main.js.map +2 -2
- package/build/types/types.js.map +1 -1
- package/io-package.json +14 -14
- package/package.json +4 -4
package/build/types/types.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { MockAdapter } from '@iobroker/testing';\nimport type TelegramMenu from '../main';\nimport type { BooleanString, Echart, EventAction, GetAction, HttpRequest, Pic, RowsNav, SetAction } from '@/types/app';\n\nexport type ListOfMenus = string[];\n\nexport type IsUserActiveCheckbox = Record<string, boolean>;\nexport type MenusWithUsers = Record<string, string[]>;\n\nexport type Action = Record<string, Actions>;\n\nexport type Navigation = string[][];\n\nexport interface UserListWithChatId {\n chatID: string;\n name: string;\n}\n\nexport interface Checkboxes {\n oneTiKey: boolean;\n resKey: boolean;\n checkboxNoValueFound: boolean;\n sendMenuAfterRestart: boolean;\n}\n\nexport interface Actions {\n get: GetAction[];\n set: SetAction[];\n pic: Pic[];\n httpRequest: HttpRequest[];\n echarts: Echart[];\n events: EventAction[];\n}\n\nexport type StartSides = Record<string, string>;\n\nexport type NewObjectStructure = Record<string, Part>;\n\nexport type UsersInGroup = { [key: string]: string[] };\n\nexport type MenuData = Record<string, NewObjectStructure>;\n\nexport interface DataObject {\n action?: Record<string, Actions | undefined>;\n nav: Record<string, RowsNav[]>;\n}\n\nexport interface UserObjectActions {\n [key: string]: {\n nav?: string[][];\n parse_mode?: boolean;\n text?: string;\n switch?: Switch[];\n echarts?: { background: string; echartsInstance: string; filename: string; preset: string; theme: string }[];\n };\n}\n\nexport interface Part {\n text?: string;\n nav?: Navigation;\n parse_mode?: boolean;\n getData?: GetData[];\n switch?: Switch[];\n sendPic?: SendPic[];\n location?: Location[];\n echarts?: ModifiedEchart[];\n httpRequest?: ModifiedHttpRequest[];\n url?: string;\n user?: string;\n password?: string;\n filename?: string;\n}\n\nexport interface ModifiedEchart {\n background: string;\n echartsInstance: string;\n filename: string;\n preset: string;\n theme: string;\n}\n\nexport interface SendPic {\n delay: number;\n id: string;\n fileName: string;\n}\n\nexport interface ModifiedHttpRequest {\n url: string;\n user: string;\n password: string;\n filename: string;\n delay: string;\n}\n\nexport interface GetData {\n id: string;\n text: string;\n parse_mode: boolean;\n newline: BooleanString;\n}\n\nexport type ParseModeType = 'HTML' | 'Markdown';\n\nexport interface Location {\n latitude: string;\n longitude: string;\n}\n\nexport interface SetDynamicValueObj {\n [key: string]: SetDynamicValue;\n}\n\nexport interface SetDynamicValue {\n id: string;\n ack: boolean;\n returnText: string;\n userToSend: string;\n parse_mode: boolean;\n confirm: string;\n telegramParams: TelegramParams;\n valueType: string;\n}\n\nexport type Newline = BooleanString;\n\nexport interface BindingObject {\n values: Record<string, string>;\n}\n\nexport interface splittedNavigation {\n nav: string[][];\n call: string;\n text: string;\n parse_mode: boolean;\n}\n\nexport interface Switch {\n id: string;\n value: string;\n toggle: boolean;\n confirm: BooleanString;\n returnText: string;\n parse_mode: boolean;\n ack: boolean;\n}\n\nexport interface GenerateActionsArrayOfEntries {\n objName: string;\n name: string;\n loop: string;\n elements: GenerateActionsArrayOfElements[];\n}\n\nexport interface GenerateActionsArrayOfElements {\n name: string;\n value?: string;\n index?: number;\n type?: string;\n}\n\nexport interface GenerateActionsNewObject {\n preset?: string;\n echartsInstance?: string;\n background?: string;\n theme?: string;\n url?: string;\n user?: string;\n password?: string;\n id?: string;\n filename?: string;\n delay?: string;\n text?: string;\n newline?: string;\n parse_mode?: boolean;\n}\n\nexport type SplittedData = string[];\n\nexport interface SetStateIds {\n id: string;\n confirm: BooleanString | boolean;\n returnText: string;\n userToSend: string;\n parse_mode?: boolean;\n}\n\nexport type GroupWithUser = string;\n\nexport interface Message {\n time: number;\n}\n\nexport type WhatShouldDelete = 'all' | 'last';\n\nexport type Keyboard = { inline_keyboard: KeyboardItems[][] } | string[][] | undefined;\n\nexport interface KeyboardItems {\n text: string;\n callback_data: string;\n}\n\nexport type LastText = Record<string, string>;\n\nexport type ValArray = Record<string, string>;\n\nexport interface KeyboardItem {\n text: string;\n callback_data: string;\n}\n\nexport type BackMenu = Record<string, BackMenuList | undefined>;\n\ntype BackMenuList = { list: string[]; last: string };\n\nexport interface CheckEveryMenuForDataType {\n menuData: MenuData; // checked !!!!\n
|
|
4
|
+
"sourcesContent": ["import type { MockAdapter } from '@iobroker/testing';\nimport type TelegramMenu from '../main';\nimport type { BooleanString, Echart, EventAction, GetAction, HttpRequest, Pic, RowsNav, SetAction } from '@/types/app';\n\nexport type ListOfMenus = string[];\n\nexport type IsUserActiveCheckbox = Record<string, boolean>;\nexport type MenusWithUsers = Record<string, string[]>;\n\nexport type Action = Record<string, Actions>;\n\nexport type Navigation = string[][];\n\nexport interface UserListWithChatId {\n chatID: string;\n name: string;\n}\n\nexport interface Checkboxes {\n oneTiKey: boolean;\n resKey: boolean;\n checkboxNoValueFound: boolean;\n sendMenuAfterRestart: boolean;\n}\n\nexport interface Actions {\n get: GetAction[];\n set: SetAction[];\n pic: Pic[];\n httpRequest: HttpRequest[];\n echarts: Echart[];\n events: EventAction[];\n}\n\nexport type StartSides = Record<string, string>;\n\nexport type NewObjectStructure = Record<string, Part>;\n\nexport type UsersInGroup = { [key: string]: string[] };\n\nexport type MenuData = Record<string, NewObjectStructure>;\n\nexport interface DataObject {\n action?: Record<string, Actions | undefined>;\n nav: Record<string, RowsNav[]>;\n}\n\nexport interface UserObjectActions {\n [key: string]: {\n nav?: string[][];\n parse_mode?: boolean;\n text?: string;\n switch?: Switch[];\n echarts?: { background: string; echartsInstance: string; filename: string; preset: string; theme: string }[];\n };\n}\n\nexport interface Part {\n text?: string;\n nav?: Navigation;\n parse_mode?: boolean;\n getData?: GetData[];\n switch?: Switch[];\n sendPic?: SendPic[];\n location?: Location[];\n echarts?: ModifiedEchart[];\n httpRequest?: ModifiedHttpRequest[];\n url?: string;\n user?: string;\n password?: string;\n filename?: string;\n}\n\nexport interface ModifiedEchart {\n background: string;\n echartsInstance: string;\n filename: string;\n preset: string;\n theme: string;\n}\n\nexport interface SendPic {\n delay: number;\n id: string;\n fileName: string;\n}\n\nexport interface ModifiedHttpRequest {\n url: string;\n user: string;\n password: string;\n filename: string;\n delay: string;\n}\n\nexport interface GetData {\n id: string;\n text: string;\n parse_mode: boolean;\n newline: BooleanString;\n}\n\nexport type ParseModeType = 'HTML' | 'Markdown';\n\nexport interface Location {\n latitude: string;\n longitude: string;\n}\n\nexport interface SetDynamicValueObj {\n [key: string]: SetDynamicValue;\n}\n\nexport interface SetDynamicValue {\n id: string;\n ack: boolean;\n returnText: string;\n userToSend: string;\n parse_mode: boolean;\n confirm: string;\n telegramParams: TelegramParams;\n valueType: string;\n navToGoTo?: string;\n}\n\nexport type Newline = BooleanString;\n\nexport interface BindingObject {\n values: Record<string, string>;\n}\n\nexport interface splittedNavigation {\n nav: string[][];\n call: string;\n text: string;\n parse_mode: boolean;\n}\n\nexport interface Switch {\n id: string;\n value: string;\n toggle: boolean;\n confirm: BooleanString;\n returnText: string;\n parse_mode: boolean;\n ack: boolean;\n}\n\nexport interface GenerateActionsArrayOfEntries {\n objName: string;\n name: string;\n loop: string;\n elements: GenerateActionsArrayOfElements[];\n}\n\nexport interface GenerateActionsArrayOfElements {\n name: string;\n value?: string;\n index?: number;\n type?: string;\n}\n\nexport interface GenerateActionsNewObject {\n preset?: string;\n echartsInstance?: string;\n background?: string;\n theme?: string;\n url?: string;\n user?: string;\n password?: string;\n id?: string;\n filename?: string;\n delay?: string;\n text?: string;\n newline?: string;\n parse_mode?: boolean;\n}\n\nexport type SplittedData = string[];\n\nexport interface SetStateIds {\n id: string;\n confirm: BooleanString | boolean;\n returnText: string;\n userToSend: string;\n parse_mode?: boolean;\n}\n\nexport type GroupWithUser = string;\n\nexport interface Message {\n time: number;\n}\n\nexport type WhatShouldDelete = 'all' | 'last';\n\nexport type Keyboard = { inline_keyboard: KeyboardItems[][] } | string[][] | undefined;\n\nexport interface KeyboardItems {\n text: string;\n callback_data: string;\n}\n\nexport type LastText = Record<string, string>;\n\nexport type ValArray = Record<string, string>;\n\nexport interface KeyboardItem {\n text: string;\n callback_data: string;\n}\n\nexport type BackMenu = Record<string, BackMenuList | undefined>;\n\ntype BackMenuList = { list: string[]; last: string };\n\nexport interface CheckEveryMenuForDataType {\n menuData: MenuData; // checked !!!!\n navToGoTo: string;\n menus: string[];\n isUserActiveCheckbox: IsUserActiveCheckbox;\n token: string;\n directoryPicture: string;\n timeoutKey: string;\n userToSend: string;\n telegramParams: TelegramParams;\n}\n\nexport interface ProcessDataType {\n menuData: MenuData;\n calledValue: string;\n groupWithUser: GroupWithUser;\n allMenusWithData: MenuData;\n menus: string[];\n isUserActiveCheckbox: IsUserActiveCheckbox;\n token: string;\n directoryPicture: string;\n timeoutKey: string;\n groupData: NewObjectStructure;\n userToSend: string;\n telegramParams: TelegramParams;\n}\n\nexport interface BackMenuType {\n allMenusWithData: MenuData;\n menus: string[];\n userToSend: string;\n telegramParams: TelegramParams;\n}\n\nexport type AllMenusWithData = Record<string, NewObjectStructure>;\n\nexport interface TelegramParams {\n telegramInstance: string;\n resize_keyboard: boolean;\n one_time_keyboard: boolean;\n userListWithChatID: UserListWithChatId[];\n}\n\nexport interface SetMenuValue {\n part: Part;\n userToSend: string;\n telegramParams: TelegramParams;\n menuNumber: 1 | 2;\n}\n\nexport interface CreateMenu {\n cbData: string;\n menuToHandle: string;\n text?: string;\n}\n\nexport interface ExchangeValueReturn {\n newValue: string | number | boolean;\n textToSend: string;\n error: boolean;\n}\n\nexport type PrimitiveType = string | number | boolean;\n\nexport type Adapter = MockAdapter | TelegramMenu;\n\nexport interface Timeouts {\n key: string;\n timeout: ioBroker.Timeout;\n}\n\nexport interface StringReplacerObj {\n val: string;\n newValue: string;\n}\n\nexport interface DecomposeTextReturnType {\n startindex: number;\n endindex: number;\n substring: string;\n textExcludeSubstring: string;\n substringExcludeSearch: string;\n}\n\nexport interface EvaluateReturnType {\n val: any;\n error: boolean;\n}\n\nexport interface Telegram {\n textToSend?: string;\n keyboard?: Keyboard;\n parse_mode?: boolean;\n userToSend: string;\n telegramParams: TelegramParams;\n}\n\nexport interface ExtractTimeValues {\n milliseconds: number;\n seconds: number;\n minutes: number;\n hours: number;\n day: number;\n month: number;\n year: number;\n}\n\nexport interface GetTimeWithPad {\n ms: string;\n s: string;\n m: string;\n h: string;\n d: string;\n mo: string;\n y: string;\n}\n\nexport type Messages = Record<string, MessageInfos[]>;\n\nexport interface MessageInfos {\n id: ioBroker.StateValue;\n time?: number;\n request?: ioBroker.StateValue | null | undefined;\n}\n\nexport interface CallSubMenu {\n jsonStringNav: string;\n userToSend: string;\n telegramParams: TelegramParams;\n part: Part;\n allMenusWithData: AllMenusWithData;\n menus: string[];\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "telegram-menu",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.3",
|
|
5
5
|
"news": {
|
|
6
|
+
"2.4.3": {
|
|
7
|
+
"en": "FIX: #332 Copy dropdown\nFIX: SetDynamicValue \nFIX: Change value in getStatus",
|
|
8
|
+
"de": "FIX: #332 Dropdown kopieren\nFIX: SetDynamicValue\nFIX: Wert ändern in getStatus",
|
|
9
|
+
"ru": "FIX: #332 Copy dropdown\nОригинальное название: SetDynamicValue\nFIX: Изменение стоимости GetStatus",
|
|
10
|
+
"pt": "FIX: #332 Descarte de cópia\nFIX: SetDynamicValue\nFIX: Valor de mudança no getStatus",
|
|
11
|
+
"nl": "FIX: #332 Kopiëren dropdown\nFIX: SetDynamicValue\nFIX: Wijzig waarde in getStatus",
|
|
12
|
+
"fr": "FIXE: #332 Copier la liste déroulante\nFIX: SetDynamicValue\nFIX: Modifier la valeur de getStatus",
|
|
13
|
+
"it": "FIX: #332 Copia a discesa\nFIX: SetDynamicValue\nFIX: Cambia valore in getStatus",
|
|
14
|
+
"es": "FIX: #332 Copia desplegable\nFIX: SetDynamicValue\nFIX: Cambiar el valor en getStatus",
|
|
15
|
+
"pl": "FIX: # 332 Kopiuj zrzut\nFIX: SetDynamicValue\nFIX: Zmień wartość w getStatus",
|
|
16
|
+
"uk": "FIX: #332 Копіювати спад\nFIX: SetDynamicValue\nFIX: Зміна значення в getStatus",
|
|
17
|
+
"zh-cn": "FIX: #332 复制下拉\nFIX: 设置动态变量\nFIX: 获取状态中更改值"
|
|
18
|
+
},
|
|
6
19
|
"2.4.2": {
|
|
7
20
|
"en": "FIX: Error returnText is empty",
|
|
8
21
|
"de": "FIX: Fehlerrückgabe Text ist leer",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "FIX: # 279 Backslash jest w wiadomości przy użyciu nowej linii",
|
|
81
94
|
"uk": "FIX: #279 Backslash знаходиться в повідомленні при використанні newline",
|
|
82
95
|
"zh-cn": "FIX: # 279 使用新线时反斜线在信件中"
|
|
83
|
-
},
|
|
84
|
-
"2.2.3": {
|
|
85
|
-
"en": "FIX: #279 Backslash is in the message when using newline",
|
|
86
|
-
"de": "FIX: #279 Backslash ist in der Nachricht bei der Verwendung von newline",
|
|
87
|
-
"ru": "FIX: #279 Backslash находится в сообщении при использовании новой линии",
|
|
88
|
-
"pt": "FIX: #279 Backslash está na mensagem ao usar newline",
|
|
89
|
-
"nl": "FIX: #279 Backslash zit in het bericht bij het gebruik van nieuwe regel",
|
|
90
|
-
"fr": "FIX: #279 Backslash est dans le message lorsque vous utilisez newline",
|
|
91
|
-
"it": "FIX: #279 Backslash è nel messaggio quando si utilizza la nuova linea",
|
|
92
|
-
"es": "FIX: #279 Backslash está en el mensaje al usar newline",
|
|
93
|
-
"pl": "FIX: # 279 Backslash jest w wiadomości przy użyciu nowej linii",
|
|
94
|
-
"uk": "FIX: #279 Backslash знаходиться в повідомленні при використанні newline",
|
|
95
|
-
"zh-cn": "FIX: # 279 使用新线时反斜线在信件中"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.telegram-menu",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "Easily create Telegram Menus",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "MiRo1310",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"@alcalzone/release-script-plugin-license": "^3.7.0",
|
|
32
32
|
"@alcalzone/release-script-plugin-manual-review": "^3.7.0",
|
|
33
33
|
"@iobroker/adapter-dev": "^1.4.0",
|
|
34
|
-
"@iobroker/eslint-config": "^2.0.
|
|
34
|
+
"@iobroker/eslint-config": "^2.0.2",
|
|
35
35
|
"@iobroker/testing": "^5.0.4",
|
|
36
36
|
"@tsconfig/node20": "^20.1.5",
|
|
37
37
|
"@types/chai": "^4.3.14",
|
|
38
38
|
"@types/chai-as-promised": "^7.1.8",
|
|
39
39
|
"@types/mocha": "^10.0.10",
|
|
40
|
-
"@types/node": "^22.15.
|
|
40
|
+
"@types/node": "^22.15.29",
|
|
41
41
|
"@types/sinon-chai": "^3.2.12",
|
|
42
42
|
"chai": "^4.5.0",
|
|
43
43
|
"chai-as-promised": "^7.1.1",
|
|
44
|
-
"mocha": "^11.
|
|
44
|
+
"mocha": "^11.5.0",
|
|
45
45
|
"rimraf": "^6.0.1",
|
|
46
46
|
"sinon": "^19.0.4",
|
|
47
47
|
"sinon-chai": "^3.7.0",
|