testclasses.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. var __extends = (this && this.__extends) || function (d, b) {
  2. for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  3. function __() { this.constructor = d; }
  4. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  5. };
  6. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  7. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  8. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  9. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  10. return c > 3 && r && Object.defineProperty(target, key, r), r;
  11. };
  12. var BABYLON;
  13. (function (BABYLON) {
  14. var Address = (function (_super) {
  15. __extends(Address, _super);
  16. function Address() {
  17. _super.apply(this, arguments);
  18. }
  19. Object.defineProperty(Address.prototype, "street", {
  20. get: function () {
  21. return this._street;
  22. },
  23. set: function (value) {
  24. if (value === this._street) {
  25. return;
  26. }
  27. var old = this._street;
  28. this._street = value;
  29. this.onPropertyChanged("street", old, value);
  30. },
  31. enumerable: true,
  32. configurable: true
  33. });
  34. Object.defineProperty(Address.prototype, "city", {
  35. get: function () {
  36. return this._city;
  37. },
  38. set: function (value) {
  39. if (value === this._city) {
  40. return;
  41. }
  42. var old = this._city;
  43. this._city = value;
  44. this.onPropertyChanged("city", old, value);
  45. },
  46. enumerable: true,
  47. configurable: true
  48. });
  49. Object.defineProperty(Address.prototype, "postalCode", {
  50. get: function () {
  51. return this._postalCode;
  52. },
  53. set: function (value) {
  54. if (value === this._postalCode) {
  55. return;
  56. }
  57. var old = this._postalCode;
  58. this._postalCode = value;
  59. this.onPropertyChanged("postalCode", old, value);
  60. },
  61. enumerable: true,
  62. configurable: true
  63. });
  64. Address = __decorate([
  65. BABYLON.className("Address")
  66. ], Address);
  67. return Address;
  68. }(BABYLON.PropertyChangedBase));
  69. BABYLON.Address = Address;
  70. var Customer = (function (_super) {
  71. __extends(Customer, _super);
  72. function Customer() {
  73. _super.apply(this, arguments);
  74. }
  75. Object.defineProperty(Customer.prototype, "firstName", {
  76. /**
  77. * Customer First Name
  78. **/
  79. get: function () {
  80. return this._firstName;
  81. },
  82. set: function (value) {
  83. if (value === this._firstName) {
  84. return;
  85. }
  86. var old = this._firstName;
  87. this._firstName = value;
  88. this.onPropertyChanged("firstName", old, value);
  89. },
  90. enumerable: true,
  91. configurable: true
  92. });
  93. Object.defineProperty(Customer.prototype, "lastName", {
  94. /**
  95. * Customer Last Name
  96. **/
  97. get: function () {
  98. return this._lastName;
  99. },
  100. set: function (value) {
  101. if (value === this._lastName) {
  102. return;
  103. }
  104. var old = this._lastName;
  105. this._lastName = value;
  106. this.onPropertyChanged("lastName", old, value);
  107. },
  108. enumerable: true,
  109. configurable: true
  110. });
  111. Object.defineProperty(Customer.prototype, "mainAddress", {
  112. /**
  113. * Customer Main Address
  114. **/
  115. get: function () {
  116. if (!this._mainAddress) {
  117. this._mainAddress = new Address();
  118. }
  119. return this._mainAddress;
  120. },
  121. set: function (value) {
  122. if (value === this._mainAddress) {
  123. return;
  124. }
  125. var old = this._mainAddress;
  126. this._mainAddress = value;
  127. this.onPropertyChanged("mainAddress", old, value);
  128. },
  129. enumerable: true,
  130. configurable: true
  131. });
  132. Object.defineProperty(Customer.prototype, "age", {
  133. get: function () {
  134. return this._age;
  135. },
  136. set: function (value) {
  137. if (value === this._age) {
  138. return;
  139. }
  140. var old = this._age;
  141. this._age = value;
  142. this.onPropertyChanged("age", old, value);
  143. },
  144. enumerable: true,
  145. configurable: true
  146. });
  147. Customer = __decorate([
  148. BABYLON.className("Customer")
  149. ], Customer);
  150. return Customer;
  151. }(BABYLON.PropertyChangedBase));
  152. BABYLON.Customer = Customer;
  153. var CustomerViewModel = (function (_super) {
  154. __extends(CustomerViewModel, _super);
  155. function CustomerViewModel() {
  156. _super.call(this);
  157. }
  158. Object.defineProperty(CustomerViewModel.prototype, "age", {
  159. get: function () {
  160. return this._age;
  161. },
  162. set: function (value) {
  163. this._age = value;
  164. },
  165. enumerable: true,
  166. configurable: true
  167. });
  168. Object.defineProperty(CustomerViewModel.prototype, "city", {
  169. get: function () {
  170. return this._city;
  171. },
  172. set: function (value) {
  173. this._city = value;
  174. },
  175. enumerable: true,
  176. configurable: true
  177. });
  178. Object.defineProperty(CustomerViewModel.prototype, "firstName", {
  179. get: function () {
  180. return this._firstName;
  181. },
  182. set: function (value) {
  183. this._firstName = value;
  184. },
  185. enumerable: true,
  186. configurable: true
  187. });
  188. __decorate([
  189. BABYLON.dependencyProperty(0, function (pi) { return CustomerViewModel.ageProperty = pi; })
  190. ], CustomerViewModel.prototype, "age", null);
  191. __decorate([
  192. BABYLON.dependencyProperty(1, function (pi) { return CustomerViewModel.cityProperty = pi; })
  193. ], CustomerViewModel.prototype, "city", null);
  194. __decorate([
  195. BABYLON.dependencyProperty(2, function (pi) { return CustomerViewModel.firstNameProperty = pi; }, BABYLON.Binding.MODE_ONETIME)
  196. ], CustomerViewModel.prototype, "firstName", null);
  197. CustomerViewModel = __decorate([
  198. BABYLON.className("CustomerViewModel")
  199. ], CustomerViewModel);
  200. return CustomerViewModel;
  201. }(BABYLON.SmartPropertyBase));
  202. BABYLON.CustomerViewModel = CustomerViewModel;
  203. })(BABYLON || (BABYLON = {}));
  204. //# sourceMappingURL=testclasses.js.map