@ygracs/xepg-lib-js 0.0.26-b → 0.0.30

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.
@@ -0,0 +1,231 @@
1
+ /**
2
+ * A schedule info descriptor
3
+ */
4
+ export type IXEpgShedInfoDesc = {
5
+ /**
6
+ * - a schedule start time
7
+ */
8
+ time: number;
9
+ /**
10
+ * - schedule title
11
+ */
12
+ title: string;
13
+ /**
14
+ * - schedule category
15
+ */
16
+ cat?: string;
17
+ /**
18
+ * - schedule rating
19
+ */
20
+ pcmark?: number;
21
+ /**
22
+ * - schedule description
23
+ */
24
+ descr?: string;
25
+ };
26
+ export const IXEpgShedInfoDesc: IXEpgShedInfoDesc;
27
+ /**
28
+ * An XEPG-element options set (base)
29
+ */
30
+ export type OPT_epgelsett_bs = {
31
+ /**
32
+ * - parser options
33
+ */
34
+ parseOptions?: InstanceType<typeof TXmlContentParseOptions>;
35
+ };
36
+ /**
37
+ * An XEPG-element options set (base)
38
+ */
39
+ export type XEpgElementConfigBase = {
40
+ /**
41
+ * - parser options
42
+ */
43
+ parseOptions: InstanceType<typeof TXmlContentParseOptions>;
44
+ };
45
+ /**
46
+ * An extra options set
47
+ */
48
+ export type OPT_extra = {
49
+ /**
50
+ * - 'DTS'-settings
51
+ */
52
+ dts_src?: object;
53
+ /**
54
+ * - 'TZ'-settings
55
+ */
56
+ tz_src?: object;
57
+ };
58
+ /**
59
+ * An XEPG-element options set (extend)
60
+ */
61
+ export type OPT_epgelsett_ex = {
62
+ /**
63
+ * - parser options
64
+ */
65
+ parseOptions?: InstanceType<typeof TXmlContentParseOptions>;
66
+ dts_src?: object;
67
+ tz_src?: object;
68
+ };
69
+
70
+ /**
71
+ * This class implements an interface of a EPG-schedule element
72
+ * @since 0.0.22
73
+ */
74
+ export class TXEpgScheduleItem {
75
+ /**
76
+ * Creates an instance of the EPG-schedule element
77
+ */
78
+ constructor(obj: INode, opt?: OPT_epgelsett_ex, extra?: OPT_extra);
79
+ /**
80
+ * Contains a dtstype ID
81
+ */
82
+ get dtstype(): number;
83
+ /**
84
+ * Contains a TZ-offset
85
+ */
86
+ get curDocTZ(): number;
87
+ /**
88
+ * Contains a schedule start time as a timestamp
89
+ */
90
+ get time(): number;
91
+ /**
92
+ * Contains a schedule title
93
+ */
94
+ get title(): string;
95
+ /**
96
+ * Contains a schedule category
97
+ */
98
+ get category(): string;
99
+ /**
100
+ * Contains a schedule rating value (aka pcmark)
101
+ */
102
+ get rating(): number;
103
+ /**
104
+ * Contains a schedule description
105
+ */
106
+ get descr(): string;
107
+ /**
108
+ * Returns a schedule info item descriptor
109
+ */
110
+ getInfo(): IXEpgShedInfoDesc;
111
+ /**
112
+ * Sets a schedule start time.
113
+ */
114
+ setTime(value: number | string | Date): boolean;
115
+ /**
116
+ * Sets a schedule title.
117
+ */
118
+ setTitle(value: string): boolean;
119
+ /**
120
+ * Sets a schedule title.
121
+ */
122
+ setCategory(value: string): boolean;
123
+ /**
124
+ * Sets a schedule rating value.
125
+ */
126
+ setRating(value: number | string): boolean;
127
+ /**
128
+ * Sets a schedule description.
129
+ */
130
+ setDescr(value: string): boolean;
131
+ /**
132
+ * Returns an instance content as a string in an XML-format.
133
+ */
134
+ saveToXMLString(): string;
135
+ /**
136
+ * Loads an element content from a string.
137
+ * @since v0.0.24
138
+ * @throws {Error}
139
+ * @experimental
140
+ */
141
+ loadFromXMLString(xmlString: string): boolean;
142
+ #private;
143
+ }
144
+
145
+ /**
146
+ * This class implements an interface of a EPG-schedules list
147
+ */
148
+ export class TXEpgSchedulesList {
149
+ /**
150
+ * Creates an instance of the schedules list
151
+ */
152
+ constructor(obj: INode[], opt?: OPT_epgelsett_ex, extra?: OPT_extra);
153
+ /**
154
+ * Contains a quantity of a schedules
155
+ * @deprecated
156
+ * @todo \[since `v0.0.24`] deprecated. Use `TXEpgSchedulesList.count`
157
+ */
158
+ get schedQty(): number;
159
+ /**
160
+ * Contains a quantity of a schedules
161
+ * @since v0.0.24
162
+ */
163
+ get count(): number;
164
+ /**
165
+ * Contains a dtstype ID
166
+ */
167
+ get dtstype(): number;
168
+ /**
169
+ * Contains a TZ-offset
170
+ */
171
+ get curDocTZ(): number;
172
+ /**
173
+ * Indicates whether an instance has none member
174
+ * @since v0.0.24
175
+ */
176
+ isEmpty(): boolean;
177
+ /**
178
+ * Indicates whether an instance has any member
179
+ * @since v0.0.24
180
+ */
181
+ isNotEmpty(): boolean;
182
+ /**
183
+ * Checks whether a given value is a valid index and it fits the index range
184
+ * of an instance
185
+ * @since 0.0.20
186
+ * @deprecated
187
+ * @todo \[since v0.0.30] deprecated. Use {@link checkIndex} instead
188
+ */
189
+ chkIndex(value: number | string): boolean;
190
+ /**
191
+ * Checks whether a given value is a valid index and it fits the index range
192
+ * of an instance
193
+ * @since 0.0.30
194
+ */
195
+ checkIndex(value: number | string): boolean;
196
+ /**
197
+ * Returns a schedule element addressed by a given index
198
+ * @since 0.0.22
199
+ */
200
+ schedule(index: number | string): TXEpgScheduleItem | null;
201
+ /**
202
+ * Returns a schedule info item for instance element addressed
203
+ * by a given index
204
+ */
205
+ getScheduleInfo(index: number | string): IXEpgShedInfoDesc | null;
206
+ /**
207
+ * Returns a schedule info for instance members
208
+ */
209
+ getAllSchedulesInfo(): IXEpgShedInfoDesc[];
210
+ /**
211
+ * @protected
212
+ */
213
+ protected asJSON(): string;
214
+ [Symbol.iterator](): {
215
+ next: () => {
216
+ done: boolean;
217
+ value: TXEpgScheduleItem | null;
218
+ } | {
219
+ done: boolean;
220
+ value: undefined;
221
+ };
222
+ return(): {
223
+ done: boolean;
224
+ value: undefined;
225
+ };
226
+ };
227
+ #private;
228
+ }
229
+
230
+ import { TXmlContentParseOptions } from "@ygracs/xobj-lib-js";
231
+ import type { INode } from "@ygracs/xobj-lib-js";