iobroker-ucl 1.3.1 → 1.3.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/homematicFunctions.js +2 -0
- package/homematicFunctions.ts +47 -45
- package/html.js +10 -10
- package/html.ts +29 -29
- package/package.json +1 -1
- package/shellyClasses.ts +16 -16
- package/shellyFunctions.js +7 -0
- package/shellyFunctions.ts +49 -42
- package/zigbeeClasses.ts +28 -28
- package/zigbeeFunctions.js +4 -0
- package/zigbeeFunctions.ts +56 -52
package/homematicFunctions.js
CHANGED
@@ -216,6 +216,7 @@ function createHomeaticDimmer(adapter, rawId, baseState, etage, raum, device, al
|
|
216
216
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOffExitHouseWinter, turnOffExitHouseWinter, deviceHomematicDimmer);
|
217
217
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOnEnterHouseSummer, turnOnEnterHouseSummer, deviceHomematicDimmer);
|
218
218
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOnEnterHouseWinter, turnOnEnterHouseWinter, deviceHomematicDimmer);
|
219
|
+
this.clearHomematicCaches(adapter);
|
219
220
|
}
|
220
221
|
exports.createHomeaticDimmer = createHomeaticDimmer;
|
221
222
|
// Wandschalter:
|
@@ -281,6 +282,7 @@ function createHomeaticWandschalter(adapter, rawId, baseState, etage, raum, devi
|
|
281
282
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOffExitHouseWinter, turnOffExitHouseWinter, deviceHomematicWandschalter);
|
282
283
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOnEnterHouseSummer, turnOnEnterHouseSummer, deviceHomematicWandschalter);
|
283
284
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOnEnterHouseWinter, turnOnEnterHouseWinter, deviceHomematicWandschalter);
|
285
|
+
this.clearHomematicCaches(adapter);
|
284
286
|
}
|
285
287
|
exports.createHomeaticWandschalter = createHomeaticWandschalter;
|
286
288
|
function createDatenpunktSingle(adapter, deviceRawId, attributeType, attributeName, attributeValue, category) {
|
package/homematicFunctions.ts
CHANGED
@@ -166,7 +166,7 @@ export function createHomeaticDimmer(adapter: any, rawId: number, baseState: str
|
|
166
166
|
}
|
167
167
|
|
168
168
|
// additionalStates4TurnOff: string[]
|
169
|
-
|
169
|
+
let db_additionalStates4TurnOff = null;
|
170
170
|
tasterBooleanOff.forEach(value => {
|
171
171
|
if (db_additionalStates4TurnOff == null) {
|
172
172
|
// @ts-ignore
|
@@ -179,7 +179,7 @@ export function createHomeaticDimmer(adapter: any, rawId: number, baseState: str
|
|
179
179
|
createDatenpunktSingle(adapter, rawId, attributeTypeString, attribute_TasterBooleanOff, db_additionalStates4TurnOff, deviceHomematicDimmer);
|
180
180
|
|
181
181
|
// alexaSmartNamesForOn:string[]
|
182
|
-
|
182
|
+
let db_alexaSmartNamesForOn = null;
|
183
183
|
alexaSmartNamesForOn.forEach(value => {
|
184
184
|
if (db_alexaSmartNamesForOn == null) {
|
185
185
|
// @ts-ignore
|
@@ -192,7 +192,7 @@ export function createHomeaticDimmer(adapter: any, rawId: number, baseState: str
|
|
192
192
|
createDatenpunktSingle(adapter, rawId, attributeTypeString, attribute_AlexaSmartNamesForOn, db_alexaSmartNamesForOn, deviceHomematicDimmer);
|
193
193
|
|
194
194
|
// alexaActionNamesForOn:string[]
|
195
|
-
|
195
|
+
let db_alexaActionNamesForOn = null;
|
196
196
|
alexaActionNamesForOn.forEach(value => {
|
197
197
|
if (db_alexaActionNamesForOn == null) {
|
198
198
|
// @ts-ignore
|
@@ -205,7 +205,7 @@ export function createHomeaticDimmer(adapter: any, rawId: number, baseState: str
|
|
205
205
|
createDatenpunktSingle(adapter, rawId, attributeTypeString, attribute_AlexaActionNamesForOn, db_alexaActionNamesForOn, deviceHomematicDimmer);
|
206
206
|
|
207
207
|
// alexaSmartNamesForOff:string[]
|
208
|
-
|
208
|
+
let db_alexaSmartNamesForOff = null;
|
209
209
|
alexaSmartNamesForOff.forEach(value => {
|
210
210
|
if (db_alexaSmartNamesForOff == null) {
|
211
211
|
// @ts-ignore
|
@@ -218,7 +218,7 @@ export function createHomeaticDimmer(adapter: any, rawId: number, baseState: str
|
|
218
218
|
createDatenpunktSingle(adapter, rawId, attributeTypeString, attribute_AlexaSmartNamesForOff, db_alexaSmartNamesForOff, deviceHomematicDimmer);
|
219
219
|
|
220
220
|
// alexaActionNamesForOff:string[]
|
221
|
-
|
221
|
+
let db_alexaActionNamesForOff = null;
|
222
222
|
alexaActionNamesForOff.forEach(value => {
|
223
223
|
if (db_alexaActionNamesForOff == null) {
|
224
224
|
// @ts-ignore
|
@@ -236,6 +236,7 @@ export function createHomeaticDimmer(adapter: any, rawId: number, baseState: str
|
|
236
236
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOffExitHouseWinter, turnOffExitHouseWinter, deviceHomematicDimmer);
|
237
237
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOnEnterHouseSummer, turnOnEnterHouseSummer, deviceHomematicDimmer);
|
238
238
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOnEnterHouseWinter, turnOnEnterHouseWinter, deviceHomematicDimmer);
|
239
|
+
this.clearHomematicCaches(adapter);
|
239
240
|
}
|
240
241
|
|
241
242
|
// Wandschalter:
|
@@ -248,7 +249,7 @@ export function createHomeaticWandschalter(adapter:any, rawId: number, baseState
|
|
248
249
|
createHomematicDevice(adapter, rawId, baseState, etage, raum, device, deviceHomematicWandschalter);
|
249
250
|
|
250
251
|
// alexaSmartNamesForOn:string[]
|
251
|
-
|
252
|
+
let db_alexaSmartNamesForOn = null;
|
252
253
|
alexaSmartNamesForOn.forEach(value => {
|
253
254
|
if (db_alexaSmartNamesForOn == null) {
|
254
255
|
// @ts-ignore
|
@@ -261,7 +262,7 @@ export function createHomeaticWandschalter(adapter:any, rawId: number, baseState
|
|
261
262
|
createDatenpunktSingle(adapter, rawId, attributeTypeString, attribute_AlexaSmartNamesForOn, db_alexaSmartNamesForOn, deviceHomematicWandschalter);
|
262
263
|
|
263
264
|
// alexaActionNamesForOn:string[]
|
264
|
-
|
265
|
+
let db_alexaActionNamesForOn = null;
|
265
266
|
alexaActionNamesForOn.forEach(value => {
|
266
267
|
if (db_alexaActionNamesForOn == null) {
|
267
268
|
// @ts-ignore
|
@@ -274,7 +275,7 @@ export function createHomeaticWandschalter(adapter:any, rawId: number, baseState
|
|
274
275
|
createDatenpunktSingle(adapter, rawId, attributeTypeString, attribute_AlexaActionNamesForOn, db_alexaActionNamesForOn, deviceHomematicWandschalter);
|
275
276
|
|
276
277
|
// alexaSmartNamesForOff:string[]
|
277
|
-
|
278
|
+
let db_alexaSmartNamesForOff = null;
|
278
279
|
alexaSmartNamesForOff.forEach(value => {
|
279
280
|
if (db_alexaSmartNamesForOff == null) {
|
280
281
|
// @ts-ignore
|
@@ -287,7 +288,7 @@ export function createHomeaticWandschalter(adapter:any, rawId: number, baseState
|
|
287
288
|
createDatenpunktSingle(adapter, rawId, attributeTypeString, attribute_AlexaSmartNamesForOff, db_alexaSmartNamesForOff, deviceHomematicWandschalter);
|
288
289
|
|
289
290
|
// alexaActionNamesForOff:string[]
|
290
|
-
|
291
|
+
let db_alexaActionNamesForOff = null;
|
291
292
|
alexaActionNamesForOff.forEach(value => {
|
292
293
|
if (db_alexaActionNamesForOff == null) {
|
293
294
|
// @ts-ignore
|
@@ -305,10 +306,11 @@ export function createHomeaticWandschalter(adapter:any, rawId: number, baseState
|
|
305
306
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOffExitHouseWinter, turnOffExitHouseWinter, deviceHomematicWandschalter);
|
306
307
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOnEnterHouseSummer, turnOnEnterHouseSummer, deviceHomematicWandschalter);
|
307
308
|
createDatenpunktSingle(adapter, rawId, attributeTypeBoolean, attribute_TurnOnEnterHouseWinter, turnOnEnterHouseWinter, deviceHomematicWandschalter);
|
309
|
+
this.clearHomematicCaches(adapter);
|
308
310
|
}
|
309
311
|
|
310
312
|
function createDatenpunktSingle(adapter: any, deviceRawId, attributeType, attributeName, attributeValue, category) {
|
311
|
-
|
313
|
+
let stateDatenpunkt = "0_userdata.0.devices.homematic." + category + "." + deviceRawId + "." + attributeName;
|
312
314
|
adapter.createState(stateDatenpunkt, attributeValue, {
|
313
315
|
name: "H" + deviceRawId.toString().padStart(2, '0'),
|
314
316
|
desc: "",
|
@@ -326,7 +328,7 @@ export function loadHomematicRollladen(adapter: any) {
|
|
326
328
|
// @ts-ignore
|
327
329
|
cacheRollladenArray = [];
|
328
330
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
329
|
-
|
331
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
330
332
|
if (adapter.getState(datenpunktKey).val == deviceHomematicRollladen) {
|
331
333
|
// @ts-ignore
|
332
334
|
cacheRollladenArray.push(new HomematicRollladen(adapter,
|
@@ -350,7 +352,7 @@ export function loadHomematicWandthermostate(adapter: any) {
|
|
350
352
|
// @ts-ignore
|
351
353
|
cacheWandthermostateArray = [];
|
352
354
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
353
|
-
|
355
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
354
356
|
if (adapter.getState(datenpunktKey).val == deviceHomematicWandthermostat) {
|
355
357
|
// @ts-ignore
|
356
358
|
cacheWandthermostateArray.push(new HomematicWandthermostat(adapter,
|
@@ -374,7 +376,7 @@ export function loadHomematicPraesenzmelder(adapter: any) {
|
|
374
376
|
// @ts-ignore
|
375
377
|
cachePraesenzmelderArray = [];
|
376
378
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
377
|
-
|
379
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
378
380
|
if (adapter.getState(datenpunktKey).val == deviceHomematicPraesenzmelder) {
|
379
381
|
// @ts-ignore
|
380
382
|
cachePraesenzmelderArray.push(new HomematicPraesenzmelder(adapter,
|
@@ -398,7 +400,7 @@ export function loadHomematicWetterstationen(adapter: any) {
|
|
398
400
|
// @ts-ignore
|
399
401
|
cacheWetterstationenArray = [];
|
400
402
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
401
|
-
|
403
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
402
404
|
if (adapter.getState(datenpunktKey).val == deviceHomematicWetterstation) {
|
403
405
|
// @ts-ignore
|
404
406
|
cacheWetterstationenArray.push(new HomematicWetterstation(adapter,
|
@@ -422,7 +424,7 @@ export function loadHomematicDoors(adapter: any) {
|
|
422
424
|
// @ts-ignore
|
423
425
|
cacheDoorsArray = [];
|
424
426
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
425
|
-
|
427
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
426
428
|
if (adapter.getState(datenpunktKey).val == deviceHomematicDoor) {
|
427
429
|
// @ts-ignore
|
428
430
|
cacheDoorsArray.push(new HomematicDoor(adapter,
|
@@ -447,7 +449,7 @@ export function loadHomematicWandschalter(adapter: any) {
|
|
447
449
|
// @ts-ignore
|
448
450
|
cacheWandschalterArray = [];
|
449
451
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
450
|
-
|
452
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
451
453
|
if (adapter.getState(datenpunktKey).val == deviceHomematicWandschalter) {
|
452
454
|
// @ts-ignore
|
453
455
|
cacheWandschalterArray.push(new HomematicWandschalter(adapter,
|
@@ -480,7 +482,7 @@ export function loadHomematicFussbodenheizungen(adapter: any) {
|
|
480
482
|
// @ts-ignore
|
481
483
|
cacheFussbodenheizungenArray = [];
|
482
484
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
483
|
-
|
485
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
484
486
|
if (adapter.getState(datenpunktKey).val == deviceHomematicFussbodenheizung) {
|
485
487
|
// @ts-ignore
|
486
488
|
cacheFussbodenheizungenArray.push(new HomematicFussbodenheizung(adapter,
|
@@ -504,7 +506,7 @@ export function loadHomematicWandtaster(adapter: any) {
|
|
504
506
|
// @ts-ignore
|
505
507
|
cacheWandtasterArray = [];
|
506
508
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
507
|
-
|
509
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
508
510
|
if (adapter.getState(datenpunktKey).val == deviceHomematicWandtaster) {
|
509
511
|
// @ts-ignore
|
510
512
|
cacheWandtasterArray.push(new HomematicWandtaster(adapter,
|
@@ -528,7 +530,7 @@ export function loadHomematicAccessPoints(adapter: any) {
|
|
528
530
|
// @ts-ignore
|
529
531
|
cacheAccessPointsArray = [];
|
530
532
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
531
|
-
|
533
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
532
534
|
if (adapter.getState(datenpunktKey).val == deviceHomematicAccessPoint) {
|
533
535
|
// @ts-ignore
|
534
536
|
cacheAccessPointsArray.push(new HomematicAccessPoint(adapter,
|
@@ -552,7 +554,7 @@ export function loadHomematicTemperatursensoren(adapter: any) {
|
|
552
554
|
// @ts-ignore
|
553
555
|
cacheTemperatursensorenArray = [];
|
554
556
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
555
|
-
|
557
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
556
558
|
if (adapter.getState(datenpunktKey).val == deviceHomematicTemperatursensor) {
|
557
559
|
// @ts-ignore
|
558
560
|
cacheTemperatursensorenArray.push(new HomematicTemperatursensor(adapter,
|
@@ -576,7 +578,7 @@ export function loadHomematicRauchmelder(adapter: any) {
|
|
576
578
|
// @ts-ignore
|
577
579
|
cacheRauchmelderArray = [];
|
578
580
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
579
|
-
|
581
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
580
582
|
if (adapter.getState(datenpunktKey).val == deviceHomematicRauchmelder) {
|
581
583
|
// @ts-ignore
|
582
584
|
cacheRauchmelderArray.push(new HomematicRauchmelder(adapter,
|
@@ -600,7 +602,7 @@ export function loadHomematicFunktschaltaktoren(adapter: any) {
|
|
600
602
|
// @ts-ignore
|
601
603
|
cacheFunkschaltaktorenArray = [];
|
602
604
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
603
|
-
|
605
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
604
606
|
if (adapter.getState(datenpunktKey).val == deviceHomematicFunkSchaltaktor) {
|
605
607
|
// @ts-ignore
|
606
608
|
cacheFunkschaltaktorenArray.push(new HomematicFunkschaltaktor(adapter,
|
@@ -624,7 +626,7 @@ export function loadHomematicWindows(adapter: any) {
|
|
624
626
|
// @ts-ignore
|
625
627
|
cacheWindowsArray = [];
|
626
628
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
627
|
-
|
629
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
628
630
|
if (adapter.getState(datenpunktKey).val == deviceHomematicWindow) {
|
629
631
|
// @ts-ignore
|
630
632
|
cacheWindowsArray.push(new HomematicWindow(adapter,
|
@@ -648,7 +650,7 @@ export function loadHomematicSteckdosen(adapter: any) {
|
|
648
650
|
// @ts-ignore
|
649
651
|
cacheSteckdosenArray = [];
|
650
652
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
651
|
-
|
653
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
652
654
|
if (adapter.getState(datenpunktKey).val == deviceHomematicSteckdose) {
|
653
655
|
// @ts-ignore
|
654
656
|
cacheSteckdosenArray.push(new HomematicSteckdose(adapter,
|
@@ -672,7 +674,7 @@ export function loadHomematicHeizkoerper(adapter: any) {
|
|
672
674
|
// @ts-ignore
|
673
675
|
cacheHeizkoerperArray = [];
|
674
676
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
675
|
-
|
677
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
676
678
|
if (adapter.getState(datenpunktKey).val == deviceHomematicHeizkoerper) {
|
677
679
|
// @ts-ignore
|
678
680
|
cacheHeizkoerperArray.push(new HomematicHeizkoerper(adapter,
|
@@ -696,11 +698,11 @@ export function loadHomematicDimmer(adapter: any) {
|
|
696
698
|
// @ts-ignore
|
697
699
|
cacheDimmerArray = [];
|
698
700
|
adapter.$('state[id=0_userdata.0.devices.homematic.*.*.category]').each(datenpunktKey => { // 0_userdata.0.devices.homematic.30.type
|
699
|
-
|
701
|
+
let datenpunktPraefix = datenpunktKey.replaceAll(".category", "");
|
700
702
|
if (adapter.getState(datenpunktKey).val == deviceHomematicDimmer) {
|
701
703
|
|
702
704
|
// Einschalt-Scheme:
|
703
|
-
|
705
|
+
let alexaOnScheme = null;
|
704
706
|
if (adapter.getState(datenpunktPraefix + "." + attributeDimmer_alexaScheme_aktiv, ).val == true) {
|
705
707
|
// @ts-ignore
|
706
708
|
alexaOnScheme = new DimmerAlexaScheme(null,
|
@@ -709,7 +711,7 @@ export function loadHomematicDimmer(adapter: any) {
|
|
709
711
|
}
|
710
712
|
|
711
713
|
// Weitere Schemes als Array:
|
712
|
-
|
714
|
+
let schemeArray = [];
|
713
715
|
|
714
716
|
// alexaScheme1: InstanceType<typeof DimmerAlexaScheme>
|
715
717
|
if (adapter.getState(datenpunktPraefix + "." + attributeDimmer_alexaScheme1_aktiv ).val == true) {
|
@@ -745,7 +747,7 @@ export function loadHomematicDimmer(adapter: any) {
|
|
745
747
|
}
|
746
748
|
|
747
749
|
// Weitere Schemes als Array:
|
748
|
-
|
750
|
+
let tasterSchemeArray = [];
|
749
751
|
|
750
752
|
// tasterScheme1: InstanceType<typeof DimmerTasterScheme>
|
751
753
|
if (adapter.getState(datenpunktPraefix + "." + attributeDimmer_tasterScheme1_aktiv ).val == true) {
|
@@ -815,7 +817,7 @@ export function loadHomematicDevicesAll(adapter: any) {
|
|
815
817
|
}*/
|
816
818
|
|
817
819
|
// @ts-ignore
|
818
|
-
|
820
|
+
let homematicAllArray = [];
|
819
821
|
|
820
822
|
adapter.loadHomematicWandthermostate(adapter).forEach(homematic => {
|
821
823
|
// @ts-ignore
|
@@ -886,7 +888,7 @@ export function loadHomematicDevicesAll(adapter: any) {
|
|
886
888
|
}
|
887
889
|
|
888
890
|
function toStringArray(databaseValue) { // z.B. "Werkbank|Arbeiten|Keller"
|
889
|
-
|
891
|
+
let stringArray = [];
|
890
892
|
if (databaseValue == null) {
|
891
893
|
return stringArray;
|
892
894
|
} else {
|
@@ -916,34 +918,34 @@ function clearHomematicCaches(adapter: any) {
|
|
916
918
|
|
917
919
|
function sortArray(inputArray) {
|
918
920
|
inputArray.sort((a,b) => {
|
919
|
-
|
920
|
-
|
921
|
+
let elementA = a;
|
922
|
+
let elementB = b;
|
921
923
|
|
922
|
-
|
923
|
-
|
924
|
-
|
924
|
+
let etageA = elementA.getEtage();
|
925
|
+
let etageB = elementB.getEtage();
|
926
|
+
let compareEtage = getEtageSortIndex(etageA).localeCompare(getEtageSortIndex(etageB));
|
925
927
|
if (compareEtage != 0) {
|
926
928
|
return compareEtage;
|
927
929
|
}
|
928
930
|
|
929
|
-
|
930
|
-
|
931
|
-
|
931
|
+
let typA = elementA.getCategory();
|
932
|
+
let typB = elementB.getCategory();
|
933
|
+
let compareTyp = typA.localeCompare(typB);
|
932
934
|
if (compareTyp != 0) {
|
933
935
|
return compareTyp;
|
934
936
|
}
|
935
937
|
|
936
938
|
|
937
|
-
|
938
|
-
|
939
|
-
|
939
|
+
let raumA = elementA.getRaum();
|
940
|
+
let raumB = elementB.getRaum();
|
941
|
+
let compareRaum = raumA.localeCompare(raumB);
|
940
942
|
if (compareRaum != 0) {
|
941
943
|
return compareRaum;
|
942
944
|
}
|
943
945
|
|
944
|
-
|
945
|
-
|
946
|
-
|
946
|
+
let deviceA = elementA.getDevice();
|
947
|
+
let deviceB = elementB.getDevice();
|
948
|
+
let compareDevice = deviceA.localeCompare(deviceB);
|
947
949
|
if (compareDevice != 0) {
|
948
950
|
return compareDevice;
|
949
951
|
}
|
package/html.js
CHANGED
@@ -185,9 +185,9 @@ var HtmlCreator = /** @class */ (function () {
|
|
185
185
|
}
|
186
186
|
if (table.isDoubleHeaderVisible() == true) {
|
187
187
|
html += " <tr class=\"style1\"> \n";
|
188
|
-
var
|
188
|
+
var skipColumns_1 = 0;
|
189
189
|
table.getColumns().forEach(function (column) {
|
190
|
-
if (
|
190
|
+
if (skipColumns_1 == 0) {
|
191
191
|
var colSpan = column.getOnTopColumnColSpan();
|
192
192
|
if (colSpan == null) {
|
193
193
|
colSpan = 1;
|
@@ -206,10 +206,10 @@ var HtmlCreator = /** @class */ (function () {
|
|
206
206
|
}
|
207
207
|
//html += " <th colspan=\"" + colSpan + "\" style=\"text-align:left " + cellBackground + "\"><font size=2px\">" + column.getOnTopColumnName() + "</th></font> \n";
|
208
208
|
html += " <th class=\"style1\" colspan=\"" + colSpan + "\" + style=\" " + cellBackground + cellAlignment + "\">" + column.getOnTopColumnName() + "</th>";
|
209
|
-
|
209
|
+
skipColumns_1 += colSpan - 1;
|
210
210
|
}
|
211
211
|
else {
|
212
|
-
|
212
|
+
skipColumns_1--;
|
213
213
|
}
|
214
214
|
});
|
215
215
|
html += " </tr> \n";
|
@@ -276,27 +276,27 @@ var HtmlCreator = /** @class */ (function () {
|
|
276
276
|
});
|
277
277
|
html += " </tr> \n";
|
278
278
|
// Separator Thick:
|
279
|
-
var
|
279
|
+
var found2 = false;
|
280
280
|
for (var i = 0; i < _this.separatorRowAfterObjectThick.length; i++) {
|
281
281
|
if (_this.separatorRowAfterObjectThick[i] == row) {
|
282
|
-
|
282
|
+
found2 = true;
|
283
283
|
break;
|
284
284
|
}
|
285
285
|
}
|
286
|
-
if (
|
286
|
+
if (found2) {
|
287
287
|
html += " <tr class=\"style1\"> \n";
|
288
288
|
html += " <td class=\"style1\" colspan=\"" + table.getColumns().length + "\" style=\"padding: 6px; background-color:#212121\"></td>";
|
289
289
|
html += " </tr> \n";
|
290
290
|
}
|
291
291
|
// Separator Thin:
|
292
|
-
var
|
292
|
+
var found3 = false;
|
293
293
|
for (var i = 0; i < _this.separatorRowAfterObjectThin.length; i++) {
|
294
294
|
if (_this.separatorRowAfterObjectThin[i] == row) {
|
295
|
-
|
295
|
+
found3 = true;
|
296
296
|
break;
|
297
297
|
}
|
298
298
|
}
|
299
|
-
if (
|
299
|
+
if (found3) {
|
300
300
|
html += " <tr class=\"style1\"> \n";
|
301
301
|
html += " <td class=\"style1\" colspan=\"" + table.getColumns().length + "\" style=\"padding: 2px; background-color:#AAAAAA\"></td>";
|
302
302
|
html += " </tr> \n";
|
package/html.ts
CHANGED
@@ -145,7 +145,7 @@
|
|
145
145
|
|
146
146
|
|
147
147
|
public createHTML() {
|
148
|
-
|
148
|
+
let html = "";
|
149
149
|
|
150
150
|
html += "<html> \n";
|
151
151
|
html += " <head> \n";
|
@@ -211,7 +211,7 @@
|
|
211
211
|
|
212
212
|
|
213
213
|
// Max. Columns ermitteln:
|
214
|
-
|
214
|
+
let maxCols = 0;
|
215
215
|
this.tables.forEach(table => {
|
216
216
|
if (table.getColumns().length > maxCols) {
|
217
217
|
maxCols = table.getColumns().length;
|
@@ -220,7 +220,7 @@
|
|
220
220
|
|
221
221
|
|
222
222
|
|
223
|
-
|
223
|
+
let tableIndex = 0;
|
224
224
|
this.tables.forEach(table => {
|
225
225
|
if (tableIndex++ != 0) {
|
226
226
|
html += " <tr class=\"style1\"><td class=\"style1\" colspan=\"" + maxCols + "\" style=\"padding: 6px; background-color:#212121\"></td></tr>";
|
@@ -228,24 +228,24 @@
|
|
228
228
|
|
229
229
|
if (table.isDoubleHeaderVisible() == true) {
|
230
230
|
html += " <tr class=\"style1\"> \n";
|
231
|
-
|
231
|
+
let skipColumns : number = 0;
|
232
232
|
table.getColumns().forEach(column => {
|
233
233
|
if (skipColumns == 0) {
|
234
|
-
|
234
|
+
let colSpan = column.getOnTopColumnColSpan();
|
235
235
|
if (colSpan == null) {
|
236
236
|
colSpan = 1;
|
237
237
|
}
|
238
238
|
|
239
239
|
// Alignment:
|
240
|
-
|
241
|
-
|
240
|
+
let userAlignemt = column.getOnTopCellAlignment();
|
241
|
+
let cellAlignment = " text-align:left";
|
242
242
|
if (userAlignemt != null) {
|
243
243
|
cellAlignment = " text-align:" + userAlignemt;
|
244
244
|
}
|
245
245
|
|
246
246
|
// Background-Color:
|
247
|
-
|
248
|
-
|
247
|
+
let userBackground = column.getOnTopBackgroundColor();
|
248
|
+
let cellBackground = "";
|
249
249
|
if (userBackground != null) {
|
250
250
|
cellBackground = " background-color:" + userBackground + ";";
|
251
251
|
}
|
@@ -268,10 +268,10 @@
|
|
268
268
|
table.getColumns().forEach(column => {
|
269
269
|
|
270
270
|
// Background-Color:
|
271
|
-
|
271
|
+
let userBackground = column.getColumnHeaderBackgroundColor();
|
272
272
|
if (userBackground != null) {
|
273
273
|
//html += " <th><font size=2px\">" + column.getColumnName() + "</th></font> \n";
|
274
|
-
|
274
|
+
let cellBackground = " background-color:" + userBackground + ";";
|
275
275
|
html += " <th class=\"style1\" style=\" " + cellBackground + "\">" + "<font size=2px\">" + column.getColumnName() + "</font></th>";
|
276
276
|
} else {
|
277
277
|
html += " <th class=\"style1\"><font size=2px\">" + column.getColumnName() + "</th></font> \n";
|
@@ -289,37 +289,37 @@
|
|
289
289
|
}
|
290
290
|
|
291
291
|
|
292
|
-
|
292
|
+
let rowIndex: number = -1;
|
293
293
|
table.getRows().forEach(row=> {
|
294
294
|
rowIndex++;
|
295
295
|
html += " <tr class=\"style1\"> \n";
|
296
296
|
table.getColumns().forEach(column => {
|
297
|
-
|
297
|
+
let cellValue = column.getValueAt(row, rowIndex);
|
298
298
|
|
299
299
|
// Alignment:
|
300
|
-
|
301
|
-
|
300
|
+
let userAlignemt = column.getCellAlignment(row);
|
301
|
+
let cellAlignment = "text-align:left";
|
302
302
|
if (userAlignemt != null) {
|
303
303
|
cellAlignment = "text-align:" + userAlignemt + ";";
|
304
304
|
}
|
305
305
|
|
306
306
|
// Width:
|
307
|
-
|
308
|
-
|
307
|
+
let userWidth = column.getColumnnWidth();
|
308
|
+
let cellWidth = "";
|
309
309
|
if (userWidth != null && userWidth != -1) {
|
310
310
|
cellWidth = "width=\"" + userWidth + "px\"; ";
|
311
311
|
}
|
312
312
|
|
313
313
|
// Background-Color:
|
314
|
-
|
315
|
-
|
314
|
+
let userBackground = column.getCellBackgroundColor(row, rowIndex);
|
315
|
+
let cellBackground = "";
|
316
316
|
if (userBackground != null) {
|
317
317
|
cellBackground = "background-color:" + userBackground + ";";
|
318
318
|
}
|
319
319
|
|
320
320
|
// Foreground-Color:
|
321
|
-
|
322
|
-
|
321
|
+
let userForeground = column.getCellForegroundColor(row, rowIndex);
|
322
|
+
let cellForegorund = "";
|
323
323
|
if (userForeground != null) {
|
324
324
|
cellForegorund = "color:" + userForeground + ";";
|
325
325
|
}
|
@@ -335,28 +335,28 @@
|
|
335
335
|
html += " </tr> \n";
|
336
336
|
|
337
337
|
// Separator Thick:
|
338
|
-
|
339
|
-
for(
|
338
|
+
let found2 = false;
|
339
|
+
for(let i = 0; i < this.separatorRowAfterObjectThick.length; i++) {
|
340
340
|
if (this.separatorRowAfterObjectThick[i] == row) {
|
341
|
-
|
341
|
+
found2 = true;
|
342
342
|
break;
|
343
343
|
}
|
344
344
|
}
|
345
|
-
if (
|
345
|
+
if (found2) {
|
346
346
|
html += " <tr class=\"style1\"> \n";
|
347
347
|
html += " <td class=\"style1\" colspan=\"" + table.getColumns().length + "\" style=\"padding: 6px; background-color:#212121\"></td>";
|
348
348
|
html += " </tr> \n";
|
349
349
|
}
|
350
350
|
|
351
351
|
// Separator Thin:
|
352
|
-
|
353
|
-
for(
|
352
|
+
let found3 = false;
|
353
|
+
for(let i = 0; i < this.separatorRowAfterObjectThin.length; i++) {
|
354
354
|
if (this.separatorRowAfterObjectThin[i] == row) {
|
355
|
-
|
355
|
+
found3 = true;
|
356
356
|
break;
|
357
357
|
}
|
358
358
|
}
|
359
|
-
if (
|
359
|
+
if (found3) {
|
360
360
|
html += " <tr class=\"style1\"> \n";
|
361
361
|
html += " <td class=\"style1\" colspan=\"" + table.getColumns().length + "\" style=\"padding: 2px; background-color:#AAAAAA\"></td>";
|
362
362
|
html += " </tr> \n";
|