bkper-js 2.1.0 → 2.2.1

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/lib/index.d.ts CHANGED
@@ -623,6 +623,87 @@ export declare class App {
623
623
  update(): Promise<App>;
624
624
  }
625
625
 
626
+ /**
627
+ * Class that represents an [[Account]] or [[Group]] balance on a window of time (Day / Month / Year).
628
+ *
629
+ * @public
630
+ */
631
+ declare class Balance {
632
+ json: bkper.Balance;
633
+ private container;
634
+ constructor(container: BalancesContainer, balancePlain: bkper.Balance);
635
+ /**
636
+ * The day of the balance. Days starts on 1 to 31.
637
+ *
638
+ * Day can be 0 (zero) in case of Monthly or Early [[Periodicity]] of the [[BalancesReport]]
639
+ */
640
+ getDay(): number;
641
+ /**
642
+ * The month of the balance. Months starts on 1 (January) to 12 (December)
643
+ *
644
+ * Month can be 0 (zero) in case of Early [[Periodicity]] of the [[BalancesReport]]
645
+ */
646
+ getMonth(): number;
647
+ /**
648
+ * The year of the balance
649
+ */
650
+ getYear(): number;
651
+ /**
652
+ * Date object constructed based on [[Book]] time zone offset. Usefull for
653
+ *
654
+ * If Month or Day is zero, the date will be constructed with first Month (January) or Day (1).
655
+ */
656
+ getDate(): Date;
657
+ /**
658
+ * The Fuzzy Date of the balance, based on [[Periodicity]] of the [[BalancesReport]] query, composed by Year, Month and Day.
659
+ *
660
+ * The format is **YYYYMMDD**. Very usefull for ordering and indexing
661
+ *
662
+ * Month and Day can be 0 (zero), depending on the granularity of the [[Periodicity]].
663
+ *
664
+ * *Example:*
665
+ *
666
+ * **20180125** - 25, January, 2018 - DAILY Periodicity
667
+ *
668
+ * **20180100** - January, 2018 - MONTHLY Periodicity
669
+ *
670
+ * **20180000** - 2018 - YEARLY Periodicity
671
+ */
672
+ getFuzzyDate(): number;
673
+ /**
674
+ * The cumulative balance to the date, based on the credit nature of the container
675
+ */
676
+ getCumulativeBalance(): Amount;
677
+ /**
678
+ * The raw cumulative balance to the date.
679
+ */
680
+ getCumulativeBalanceRaw(): Amount;
681
+ /**
682
+ * The cumulative credit to the date.
683
+ */
684
+ getCumulativeCredit(): Amount;
685
+ /**
686
+ * The cumulative debit to the date.
687
+ */
688
+ getCumulativeDebit(): Amount;
689
+ /**
690
+ * The balance on the date period, based on credit nature of the container.
691
+ */
692
+ getPeriodBalance(): Amount;
693
+ /**
694
+ * The raw balance on the date period.
695
+ */
696
+ getPeriodBalanceRaw(): Amount;
697
+ /**
698
+ * The credit on the date period.
699
+ */
700
+ getPeriodCredit(): Amount;
701
+ /**
702
+ * The debit on the date period.
703
+ */
704
+ getPeriodDebit(): Amount;
705
+ }
706
+
626
707
  /**
627
708
  * The container of balances of an [[Account]] or [[Group]]
628
709
  *
@@ -642,13 +723,13 @@ export declare interface BalancesContainer {
642
723
  *
643
724
  * @returns The [[Account]] or [[Group]] name
644
725
  */
645
- getName: () => string | undefined;
726
+ getName: () => string;
646
727
  /**
647
728
  * Gets the [[Account]] or [[Group]] name without spaces or special characters.
648
729
  *
649
730
  * @returns The [[Account]] or [[Group]] name without spaces or special characters
650
731
  */
651
- getNormalizedName: () => string | undefined;
732
+ getNormalizedName: () => string;
652
733
  /**
653
734
  * Gets the [[Group]] associated with this container.
654
735
  *
@@ -667,6 +748,12 @@ export declare interface BalancesContainer {
667
748
  * @returns The parent BalanceContainer
668
749
  */
669
750
  getParent: () => BalancesContainer | null;
751
+ /**
752
+ * Gets all [[Balances]] of the container
753
+ *
754
+ * @returns All [[Balances]] of the container
755
+ */
756
+ getBalances: () => Balance[];
670
757
  /**
671
758
  * Gets the depth in the parent chain up to the root.
672
759
  *
@@ -694,7 +781,7 @@ export declare interface BalancesContainer {
694
781
  *
695
782
  * @returns True if its a permanent Account
696
783
  */
697
- isPermanent: () => boolean | undefined;
784
+ isPermanent: () => boolean;
698
785
  /**
699
786
  * Gets whether this balance container is from an [[Account]].
700
787
  *
@@ -725,6 +812,14 @@ export declare interface BalancesContainer {
725
812
  * @returns The cumulative raw balance to the date
726
813
  */
727
814
  getCumulativeBalanceRaw: () => Amount;
815
+ /**
816
+ * The cumulative credit to the date.
817
+ */
818
+ getCumulativeCredit(): Amount;
819
+ /**
820
+ * The cumulative debit to the date.
821
+ */
822
+ getCumulativeDebit(): Amount;
728
823
  /**
729
824
  * Gets the cumulative balance formatted according to [[Book]] decimal format and fraction digits.
730
825
  *
@@ -737,6 +832,14 @@ export declare interface BalancesContainer {
737
832
  * @returns The cumulative raw balance formatted according to [[Book]] decimal format and fraction digits
738
833
  */
739
834
  getCumulativeBalanceRawText: () => string;
835
+ /**
836
+ * The cumulative credit formatted according to [[Book]] decimal format and fraction digits.
837
+ */
838
+ getCumulativeCreditText(): string;
839
+ /**
840
+ * The cumulative credit formatted according to [[Book]] decimal format and fraction digits.
841
+ */
842
+ getCumulativeDebitText(): string;
740
843
  /**
741
844
  * Gets the balance on the date period.
742
845
  *
@@ -749,6 +852,14 @@ export declare interface BalancesContainer {
749
852
  * @returns The raw balance on the date period
750
853
  */
751
854
  getPeriodBalanceRaw: () => Amount;
855
+ /**
856
+ * The credit on the date period.
857
+ */
858
+ getPeriodCredit(): Amount;
859
+ /**
860
+ * The debit on the date period.
861
+ */
862
+ getPeriodDebit(): Amount;
752
863
  /**
753
864
  * Gets the balance on the date period formatted according to [[Book]] decimal format and fraction digits.
754
865
  *
@@ -761,6 +872,35 @@ export declare interface BalancesContainer {
761
872
  * @returns The raw balance on the date period formatted according to [[Book]] decimal format and fraction digits
762
873
  */
763
874
  getPeriodBalanceRawText: () => string;
875
+ /**
876
+ * The credit on the date period formatted according to [[Book]] decimal format and fraction digits
877
+ */
878
+ getPeriodCreditText(): string;
879
+ /**
880
+ * The debit on the date period formatted according to [[Book]] decimal format and fraction digits
881
+ */
882
+ getPeriodDebitText(): string;
883
+ /**
884
+ * Gets the custom properties stored in this Account or Group.
885
+ */
886
+ getProperties(): {
887
+ [key: string]: string;
888
+ };
889
+ /**
890
+ *
891
+ * Gets the property value for given keys. First property found will be retrieved
892
+ *
893
+ * @param keys The property key
894
+ */
895
+ getProperty(...keys: string[]): string | undefined;
896
+ /**
897
+ * Gets the custom properties keys stored in the associated [[Account]] or [[Group]].
898
+ */
899
+ getPropertyKeys(): string[];
900
+ /**
901
+ * Creates a BalancesDataTableBuilder to generate a two-dimensional array with all [[BalancesContainers]]
902
+ */
903
+ createDataTable(): BalancesDataTableBuilder;
764
904
  /**
765
905
  * Gets all child [[BalancesContainers]].
766
906
  *
@@ -779,6 +919,171 @@ export declare interface BalancesContainer {
779
919
  getBalancesContainer: (name: string) => BalancesContainer;
780
920
  }
781
921
 
922
+ /**
923
+ * A BalancesDataTableBuilder is used to setup and build two-dimensional arrays containing balance information.
924
+ *
925
+ * @public
926
+ */
927
+ declare class BalancesDataTableBuilder implements BalancesDataTableBuilder {
928
+ private balanceType;
929
+ private balancesContainers;
930
+ private periodicity;
931
+ private shouldFormatDate;
932
+ private shouldHideDates;
933
+ private shouldHideNames;
934
+ private shouldFormatValue;
935
+ private book;
936
+ private shouldTranspose;
937
+ private shouldTrial;
938
+ private shouldPeriod;
939
+ private shouldRaw;
940
+ private shouldAddProperties;
941
+ private maxDepth;
942
+ private expandAllAccounts;
943
+ private expandAllGroups;
944
+ private skipRoot;
945
+ constructor(book: Book, balancesContainers: BalancesContainer[], periodicity: Periodicity);
946
+ private getBalance;
947
+ private getRepresentativeBalance;
948
+ private getBalanceText;
949
+ /**
950
+ * Defines whether the dates should be formatted based on date pattern and periodicity of the [[Book]].
951
+ *
952
+ * @returns This builder with respective formatting option, for chaining.
953
+ */
954
+ formatDates(format: boolean): BalancesDataTableBuilder;
955
+ /**
956
+ * Defines whether the value should be formatted based on decimal separator of the [[Book]].
957
+ *
958
+ * @returns This builder with respective formatting option, for chaining.
959
+ */
960
+ formatValues(format: boolean): BalancesDataTableBuilder;
961
+ /**
962
+ * Defines whether Groups should expand its child accounts. true to expand itself, -1 to expand all subgroups. -2 to expand all accounts.
963
+ *
964
+ *
965
+ * @returns This builder with respective expanded option, for chaining.
966
+ */
967
+ expanded(expanded: boolean | number): BalancesDataTableBuilder;
968
+ /**
969
+ * Fluent method to set the [[BalanceType]] for the builder.
970
+ *
971
+ * @param type The type of balance for this data table
972
+ *
973
+ * For **TOTAL** [[BalanceType]], the table format looks like:
974
+ *
975
+ * ```
976
+ * _____________________
977
+ * | Expenses | -4568.23 |
978
+ * | Income | 5678.93 |
979
+ * | ... | ... |
980
+ * |___________|__________|
981
+ *
982
+ * ```
983
+ * Two columns, and each [[Account]] or [[Group]] per line.
984
+ *
985
+ * For **PERIOD** or **CUMULATIVE** [[BalanceType]], the table will be a time table, and the format looks like:
986
+ *
987
+ * ```
988
+ * _____________________________________________
989
+ * | | Expenses | Income | ... |
990
+ * | 15/01/2014 | -2345.23 | 3452.93 | ... |
991
+ * | 15/02/2014 | -2345.93 | 3456.46 | ... |
992
+ * | 15/03/2014 | -2456.45 | 3567.87 | ... |
993
+ * | ... | ... | ... | ... |
994
+ * |____________|___________|_________|__________|
995
+ *
996
+ * ```
997
+ *
998
+ * First column will be the Date column, and one column for each [[Account]] or [[Group]].
999
+ *
1000
+ * @returns This builder with respective balance type, for chaining.
1001
+ */
1002
+ type(type: BalanceType): BalancesDataTableBuilder;
1003
+ /**
1004
+ * Defines whether should rows and columns should be transposed.
1005
+ *
1006
+ * For **TOTAL** [[BalanceType]], the **transposed** table looks like:
1007
+ *
1008
+ * ```
1009
+ * _____________________________
1010
+ * | Expenses | Income | ... |
1011
+ * | -4568.23 | 5678.93 | ... |
1012
+ * |___________|_________|_______|
1013
+ *
1014
+ * ```
1015
+ * Two rows, and each [[Account]] or [[Group]] per column.
1016
+ *
1017
+ *
1018
+ * For **PERIOD** or **CUMULATIVE** [[BalanceType]], the **transposed** table will be a time table, and the format looks like:
1019
+ *
1020
+ * ```
1021
+ * _______________________________________________________________
1022
+ * | | 15/01/2014 | 15/02/2014 | 15/03/2014 | ... |
1023
+ * | Expenses | -2345.23 | -2345.93 | -2456.45 | ... |
1024
+ * | Income | 3452.93 | 3456.46 | 3567.87 | ... |
1025
+ * | ... | ... | ... | ... | ... |
1026
+ * |____________|____________|____________|____________|___________|
1027
+ *
1028
+ * ```
1029
+ *
1030
+ * First column will be each [[Account]] or [[Group]], and one column for each Date.
1031
+ *
1032
+ * @returns This builder with respective transposed option, for chaining.
1033
+ */
1034
+ transposed(transposed: boolean): BalancesDataTableBuilder;
1035
+ /**
1036
+ * Defines whether the dates should be hidden for **PERIOD** or **CUMULATIVE** [[BalanceType]].
1037
+ *
1038
+ * @returns This builder with respective hide dates option, for chaining.
1039
+ */
1040
+ hideDates(hide: boolean): BalancesDataTableBuilder;
1041
+ /**
1042
+ * Defines whether the [[Accounts]] and [[Groups]] names should be hidden.
1043
+ *
1044
+ * @returns This builder with respective hide names option, for chaining.
1045
+ */
1046
+ hideNames(hide: boolean): BalancesDataTableBuilder;
1047
+ /**
1048
+ * Defines whether include custom [[Accounts]] and [[Groups]] properties.
1049
+ *
1050
+ * @returns This builder with respective include properties option, for chaining.
1051
+ */
1052
+ properties(include: boolean): BalancesDataTableBuilder;
1053
+ /**
1054
+ * Defines whether should split **TOTAL** [[BalanceType]] into debit and credit.
1055
+ *
1056
+ * @returns This builder with respective trial option, for chaining.
1057
+ */
1058
+ trial(trial: boolean): BalancesDataTableBuilder;
1059
+ /**
1060
+ * Defines whether should force use of period balances for **TOTAL** [[BalanceType]].
1061
+ *
1062
+ * @returns This builder with respective trial option, for chaining.
1063
+ */
1064
+ period(period: boolean): BalancesDataTableBuilder;
1065
+ /**
1066
+ * Defines whether should show raw balances, no matter the credit nature of the Account or Group.
1067
+ *
1068
+ * @returns This builder with respective trial option, for chaining.
1069
+ */
1070
+ raw(raw: boolean): BalancesDataTableBuilder;
1071
+ /**
1072
+ *
1073
+ * Builds an two-dimensional array with the balances.
1074
+ *
1075
+ */
1076
+ build(): any[][];
1077
+ private addPropertyKeys;
1078
+ private flattenContainers;
1079
+ private flattenAllAccounts;
1080
+ private sortContainersFunction;
1081
+ private flattenMaxDepth;
1082
+ private flattenAllGroups;
1083
+ private buildTotalDataTable_;
1084
+ private buildTimeDataTable_;
1085
+ }
1086
+
782
1087
  /**
783
1088
  * Class representing a Balance Report, generated when calling [Book.getBalanceReport](#book_getbalancesreport)
784
1089
  *
@@ -822,6 +1127,26 @@ export declare class BalancesReport {
822
1127
 
823
1128
  }
824
1129
 
1130
+ /**
1131
+ * Enum that represents balance types.
1132
+ *
1133
+ * @public
1134
+ */
1135
+ declare enum BalanceType {
1136
+ /**
1137
+ * Total balance
1138
+ */
1139
+ TOTAL = "TOTAL",
1140
+ /**
1141
+ * Period balance
1142
+ */
1143
+ PERIOD = "PERIOD",
1144
+ /**
1145
+ * Cumulative balance
1146
+ */
1147
+ CUMULATIVE = "CUMULATIVE"
1148
+ }
1149
+
825
1150
  /**
826
1151
  * This is the main entry point of the [bkper-js](https://www.npmjs.com/package/bkper-js) library.
827
1152
  *
@@ -1039,7 +1364,7 @@ export declare class Book {
1039
1364
  *
1040
1365
  * @returns The date pattern of the Book. Current: dd/MM/yyyy | MM/dd/yyyy | yyyy/MM/dd
1041
1366
  */
1042
- getDatePattern(): string | undefined;
1367
+ getDatePattern(): string;
1043
1368
  /**
1044
1369
  * Sets the date pattern of the Book. Current: dd/MM/yyyy | MM/dd/yyyy | yyyy/MM/dd
1045
1370
  *
@@ -0,0 +1,120 @@
1
+ import * as Utils from '../utils.js';
2
+ import { Amount } from "./Amount.js";
3
+ /**
4
+ * Class that represents an [[Account]] or [[Group]] balance on a window of time (Day / Month / Year).
5
+ *
6
+ * @public
7
+ */
8
+ export class Balance {
9
+ constructor(container, balancePlain) {
10
+ this.container = container;
11
+ this.json = balancePlain;
12
+ }
13
+ /**
14
+ * The day of the balance. Days starts on 1 to 31.
15
+ *
16
+ * Day can be 0 (zero) in case of Monthly or Early [[Periodicity]] of the [[BalancesReport]]
17
+ */
18
+ getDay() {
19
+ return this.json.day;
20
+ }
21
+ /**
22
+ * The month of the balance. Months starts on 1 (January) to 12 (December)
23
+ *
24
+ * Month can be 0 (zero) in case of Early [[Periodicity]] of the [[BalancesReport]]
25
+ */
26
+ getMonth() {
27
+ return this.json.month;
28
+ }
29
+ /**
30
+ * The year of the balance
31
+ */
32
+ getYear() {
33
+ return this.json.year;
34
+ }
35
+ /**
36
+ * Date object constructed based on [[Book]] time zone offset. Usefull for
37
+ *
38
+ * If Month or Day is zero, the date will be constructed with first Month (January) or Day (1).
39
+ */
40
+ getDate() {
41
+ var year = this.getYear();
42
+ var month = this.getMonth();
43
+ var day = this.getDay();
44
+ if (month == null || month == 0) {
45
+ year++;
46
+ }
47
+ if (day == null || day == 0) {
48
+ month++;
49
+ }
50
+ var date = Utils.createDate(year, month, day, this.container.getBalancesReport().getBook().getTimeZoneOffset());
51
+ return date;
52
+ }
53
+ /**
54
+ * The Fuzzy Date of the balance, based on [[Periodicity]] of the [[BalancesReport]] query, composed by Year, Month and Day.
55
+ *
56
+ * The format is **YYYYMMDD**. Very usefull for ordering and indexing
57
+ *
58
+ * Month and Day can be 0 (zero), depending on the granularity of the [[Periodicity]].
59
+ *
60
+ * *Example:*
61
+ *
62
+ * **20180125** - 25, January, 2018 - DAILY Periodicity
63
+ *
64
+ * **20180100** - January, 2018 - MONTHLY Periodicity
65
+ *
66
+ * **20180000** - 2018 - YEARLY Periodicity
67
+ */
68
+ getFuzzyDate() {
69
+ return this.json.fuzzyDate;
70
+ }
71
+ /**
72
+ * The cumulative balance to the date, based on the credit nature of the container
73
+ */
74
+ getCumulativeBalance() {
75
+ return Utils.getRepresentativeValue(this.getCumulativeBalanceRaw(), this.container.isCredit());
76
+ }
77
+ /**
78
+ * The raw cumulative balance to the date.
79
+ */
80
+ getCumulativeBalanceRaw() {
81
+ return new Amount(this.json.cumulativeBalance);
82
+ }
83
+ /**
84
+ * The cumulative credit to the date.
85
+ */
86
+ getCumulativeCredit() {
87
+ return new Amount(this.json.cumulativeCredit);
88
+ }
89
+ /**
90
+ * The cumulative debit to the date.
91
+ */
92
+ getCumulativeDebit() {
93
+ return new Amount(this.json.cumulativeDebit);
94
+ }
95
+ /**
96
+ * The balance on the date period, based on credit nature of the container.
97
+ */
98
+ getPeriodBalance() {
99
+ return Utils.getRepresentativeValue(this.getPeriodBalanceRaw(), this.container.isCredit());
100
+ }
101
+ /**
102
+ * The raw balance on the date period.
103
+ */
104
+ getPeriodBalanceRaw() {
105
+ return new Amount(this.json.periodBalance);
106
+ }
107
+ /**
108
+ * The credit on the date period.
109
+ */
110
+ getPeriodCredit() {
111
+ return new Amount(this.json.periodCredit);
112
+ }
113
+ /**
114
+ * The debit on the date period.
115
+ */
116
+ getPeriodDebit() {
117
+ return new Amount(this.json.periodDebit);
118
+ }
119
+ }
120
+ //# sourceMappingURL=Balance.js.map
@@ -9,6 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { getRepresentativeValue, normalizeName } from "../utils.js";
11
11
  import { Amount } from "./Amount.js";
12
+ import { Balance } from "./Balance.js";
13
+ import { BalancesDataTableBuilder } from "./BalancesDataTableBuilder.js";
12
14
  /** @internal */
13
15
  export class AccountBalancesContainer {
14
16
  constructor(parent, balancesReport, payload) {
@@ -50,7 +52,7 @@ export class AccountBalancesContainer {
50
52
  return this.payload.credit;
51
53
  }
52
54
  isPermanent() {
53
- return this.payload.permanent;
55
+ return this.payload.permanent || false;
54
56
  }
55
57
  isFromAccount() {
56
58
  return true;
@@ -67,27 +69,86 @@ export class AccountBalancesContainer {
67
69
  getCumulativeBalanceRaw() {
68
70
  return new Amount(this.payload.cumulativeBalance || 0);
69
71
  }
72
+ getCumulativeCredit() {
73
+ return new Amount(this.payload.cumulativeCredit || 0);
74
+ }
75
+ getCumulativeDebit() {
76
+ return new Amount(this.payload.cumulativeDebit || 0);
77
+ }
70
78
  getCumulativeBalanceText() {
71
79
  return this.balancesReport.getBook().formatValue(this.getCumulativeBalance());
72
80
  }
73
81
  getCumulativeBalanceRawText() {
74
82
  return this.balancesReport.getBook().formatValue(this.getCumulativeBalanceRaw());
75
83
  }
84
+ getCumulativeCreditText() {
85
+ return this.balancesReport.getBook().formatValue(this.getCumulativeCredit());
86
+ }
87
+ getCumulativeDebitText() {
88
+ return this.balancesReport.getBook().formatValue(this.getCumulativeDebit());
89
+ }
76
90
  getPeriodBalance() {
77
91
  return getRepresentativeValue(new Amount(this.payload.periodBalance || 0), this.isCredit());
78
92
  }
79
93
  getPeriodBalanceRaw() {
80
94
  return new Amount(this.payload.periodBalance || 0);
81
95
  }
96
+ getPeriodCredit() {
97
+ return new Amount(this.payload.periodCredit || 0);
98
+ }
99
+ getPeriodDebit() {
100
+ return new Amount(this.payload.periodDebit || 0);
101
+ }
82
102
  getPeriodBalanceText() {
83
103
  return this.balancesReport.getBook().formatValue(this.getPeriodBalance());
84
104
  }
85
105
  getPeriodBalanceRawText() {
86
106
  return this.balancesReport.getBook().formatValue(this.getPeriodBalanceRaw());
87
107
  }
108
+ getPeriodCreditText() {
109
+ return this.balancesReport.getBook().formatValue(this.getPeriodCredit());
110
+ }
111
+ getPeriodDebitText() {
112
+ return this.balancesReport.getBook().formatValue(this.getPeriodDebit());
113
+ }
114
+ createDataTable() {
115
+ return new BalancesDataTableBuilder(this.balancesReport.getBook(), [this], this.balancesReport.getPeriodicity());
116
+ }
88
117
  getBalancesContainers() {
89
118
  return [];
90
119
  }
120
+ getBalances() {
121
+ if (!this.payload.balances) {
122
+ return new Array();
123
+ }
124
+ return this.payload.balances.map(balancePlain => new Balance(this, balancePlain));
125
+ }
126
+ getProperties() {
127
+ return this.payload.properties != null ? Object.assign({}, this.payload.properties) : {};
128
+ }
129
+ getProperty(...keys) {
130
+ for (let index = 0; index < keys.length; index++) {
131
+ const key = keys[index];
132
+ let value = this.payload.properties != null ? this.payload.properties[key] : null;
133
+ if (value != null && value.trim() != '') {
134
+ return value;
135
+ }
136
+ }
137
+ return undefined;
138
+ }
139
+ getPropertyKeys() {
140
+ let properties = this.getProperties();
141
+ let propertyKeys = [];
142
+ if (properties) {
143
+ for (var key in properties) {
144
+ if (Object.prototype.hasOwnProperty.call(properties, key)) {
145
+ propertyKeys.push(key);
146
+ }
147
+ }
148
+ }
149
+ propertyKeys = propertyKeys.sort();
150
+ return propertyKeys;
151
+ }
91
152
  getBalancesContainer(name) {
92
153
  const normalizedName = normalizeName(name);
93
154
  if (this.getNormalizedName() == normalizedName) {