@fluid-experimental/property-changeset 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.0

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.
Files changed (205) hide show
  1. package/dist/ajvFactory.cjs +19 -0
  2. package/dist/ajvFactory.cjs.map +1 -0
  3. package/dist/ajvFactory.d.cts +7 -0
  4. package/dist/ajvFactory.d.cts.map +1 -0
  5. package/dist/changeset.d.ts +3 -6
  6. package/dist/changeset.d.ts.map +1 -1
  7. package/dist/changeset.js +75 -75
  8. package/dist/changeset.js.map +1 -1
  9. package/dist/changeset_operations/array.d.ts +6 -2
  10. package/dist/changeset_operations/array.d.ts.map +1 -1
  11. package/dist/changeset_operations/array.js +94 -96
  12. package/dist/changeset_operations/array.js.map +1 -1
  13. package/dist/changeset_operations/arrayChangesetIterator.d.ts +2 -5
  14. package/dist/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
  15. package/dist/changeset_operations/arrayChangesetIterator.js +11 -12
  16. package/dist/changeset_operations/arrayChangesetIterator.js.map +1 -1
  17. package/dist/changeset_operations/changesetConflictTypes.d.ts.map +1 -1
  18. package/dist/changeset_operations/changesetConflictTypes.js +2 -2
  19. package/dist/changeset_operations/changesetConflictTypes.js.map +1 -1
  20. package/dist/changeset_operations/indexedCollection.d.ts +1 -4
  21. package/dist/changeset_operations/indexedCollection.d.ts.map +1 -1
  22. package/dist/changeset_operations/indexedCollection.js +48 -49
  23. package/dist/changeset_operations/indexedCollection.js.map +1 -1
  24. package/dist/changeset_operations/isEmptyChangeset.d.ts +1 -4
  25. package/dist/changeset_operations/isEmptyChangeset.d.ts.map +1 -1
  26. package/dist/changeset_operations/isEmptyChangeset.js +9 -9
  27. package/dist/changeset_operations/isEmptyChangeset.js.map +1 -1
  28. package/dist/helpers/typeidHelper.d.ts +0 -3
  29. package/dist/helpers/typeidHelper.d.ts.map +1 -1
  30. package/dist/helpers/typeidHelper.js +10 -10
  31. package/dist/helpers/typeidHelper.js.map +1 -1
  32. package/dist/index.d.ts +8 -8
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +19 -19
  35. package/dist/index.js.map +1 -1
  36. package/dist/isReservedKeyword.d.ts.map +1 -1
  37. package/dist/isReservedKeyword.js +2 -2
  38. package/dist/isReservedKeyword.js.map +1 -1
  39. package/dist/package.json +3 -0
  40. package/dist/pathHelper.d.ts +0 -3
  41. package/dist/pathHelper.d.ts.map +1 -1
  42. package/dist/pathHelper.js +2 -2
  43. package/dist/pathHelper.js.map +1 -1
  44. package/dist/rebase.js +8 -8
  45. package/dist/rebase.js.map +1 -1
  46. package/dist/templateSchema.d.ts.map +1 -1
  47. package/dist/templateSchema.js +2 -2
  48. package/dist/templateSchema.js.map +1 -1
  49. package/dist/templateValidator.d.ts +1 -1
  50. package/dist/templateValidator.d.ts.map +1 -1
  51. package/dist/templateValidator.js +49 -54
  52. package/dist/templateValidator.js.map +1 -1
  53. package/dist/test/array.spec.js +34 -36
  54. package/dist/test/array.spec.js.map +1 -1
  55. package/dist/test/indexedCollection.spec.js +9 -6
  56. package/dist/test/indexedCollection.spec.js.map +1 -1
  57. package/dist/test/map.spec.js +4 -4
  58. package/dist/test/map.spec.js.map +1 -1
  59. package/dist/test/pathHelper.spec.js +185 -185
  60. package/dist/test/pathHelper.spec.js.map +1 -1
  61. package/dist/test/reversibleCs.spec.js +5 -5
  62. package/dist/test/reversibleCs.spec.js.map +1 -1
  63. package/dist/test/schemaValidator.js +12 -11
  64. package/dist/test/schemaValidator.js.map +1 -1
  65. package/dist/test/schemas/badBothPropertiesAndTypeid.js +18 -18
  66. package/dist/test/schemas/badBothPropertiesAndTypeid.js.map +1 -1
  67. package/dist/test/schemas/badInvalidSemverInTypeid.js +40 -40
  68. package/dist/test/schemas/badInvalidSemverInTypeid.js.map +1 -1
  69. package/dist/test/schemas/badMissingSemverInTypeid.js +40 -40
  70. package/dist/test/schemas/badMissingSemverInTypeid.js.map +1 -1
  71. package/dist/test/schemas/badNestedProperties.js +40 -40
  72. package/dist/test/schemas/badNestedProperties.js.map +1 -1
  73. package/dist/test/schemas/badPrimitiveTypeid.js +25 -25
  74. package/dist/test/schemas/badPrimitiveTypeid.js.map +1 -1
  75. package/dist/test/schemas/badVersionedTypeid.js +41 -41
  76. package/dist/test/schemas/badVersionedTypeid.js.map +1 -1
  77. package/dist/test/schemas/goodColorPalette.js +15 -15
  78. package/dist/test/schemas/goodColorPalette.js.map +1 -1
  79. package/dist/test/schemas/goodDraftAsVersion.js +12 -12
  80. package/dist/test/schemas/goodDraftAsVersion.js.map +1 -1
  81. package/dist/test/schemas/goodPointId.js +40 -40
  82. package/dist/test/schemas/goodPointId.js.map +1 -1
  83. package/dist/test/schemas/goodReferenceAndRegular.js +16 -16
  84. package/dist/test/schemas/goodReferenceAndRegular.js.map +1 -1
  85. package/dist/test/schemas/goodReservedTypes.js +22 -22
  86. package/dist/test/schemas/goodReservedTypes.js.map +1 -1
  87. package/dist/test/schemas/goodUIBorder.js +34 -34
  88. package/dist/test/schemas/goodUIBorder.js.map +1 -1
  89. package/dist/test/schemas/index.js +55 -0
  90. package/dist/test/schemas/index.js.map +1 -0
  91. package/dist/test/tsconfig.cjs.tsbuildinfo +1 -0
  92. package/dist/test/validator/templateSyntax.spec.js +20 -25
  93. package/dist/test/validator/templateSyntax.spec.js.map +1 -1
  94. package/dist/test/validator/templateValidator.spec.js +118 -89
  95. package/dist/test/validator/templateValidator.spec.js.map +1 -1
  96. package/dist/test/validator/typeidHelper.spec.js +42 -41
  97. package/dist/test/validator/typeidHelper.spec.js.map +1 -1
  98. package/dist/utils.d.ts +17 -13
  99. package/dist/utils.d.ts.map +1 -1
  100. package/dist/utils.js +79 -79
  101. package/dist/utils.js.map +1 -1
  102. package/dist/validationResultBuilder.d.ts +2 -1
  103. package/dist/validationResultBuilder.d.ts.map +1 -1
  104. package/dist/validationResultBuilder.js.map +1 -1
  105. package/lib/ajvFactory.cjs +19 -0
  106. package/lib/ajvFactory.cjs.map +1 -0
  107. package/lib/ajvFactory.d.cts +7 -0
  108. package/lib/ajvFactory.d.cts.map +1 -0
  109. package/lib/changeset.d.ts +3 -6
  110. package/lib/changeset.d.ts.map +1 -1
  111. package/lib/changeset.js +16 -16
  112. package/lib/changeset.js.map +1 -1
  113. package/lib/changeset_operations/array.d.ts +6 -2
  114. package/lib/changeset_operations/array.d.ts.map +1 -1
  115. package/lib/changeset_operations/array.js +7 -9
  116. package/lib/changeset_operations/array.js.map +1 -1
  117. package/lib/changeset_operations/arrayChangesetIterator.d.ts +2 -5
  118. package/lib/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
  119. package/lib/changeset_operations/arrayChangesetIterator.js +3 -4
  120. package/lib/changeset_operations/arrayChangesetIterator.js.map +1 -1
  121. package/lib/changeset_operations/changesetConflictTypes.d.ts.map +1 -1
  122. package/lib/changeset_operations/changesetConflictTypes.js.map +1 -1
  123. package/lib/changeset_operations/indexedCollection.d.ts +1 -4
  124. package/lib/changeset_operations/indexedCollection.d.ts.map +1 -1
  125. package/lib/changeset_operations/indexedCollection.js +10 -11
  126. package/lib/changeset_operations/indexedCollection.js.map +1 -1
  127. package/lib/changeset_operations/isEmptyChangeset.d.ts +1 -4
  128. package/lib/changeset_operations/isEmptyChangeset.d.ts.map +1 -1
  129. package/lib/changeset_operations/isEmptyChangeset.js +3 -3
  130. package/lib/changeset_operations/isEmptyChangeset.js.map +1 -1
  131. package/lib/helpers/typeidHelper.d.ts +0 -3
  132. package/lib/helpers/typeidHelper.d.ts.map +1 -1
  133. package/lib/helpers/typeidHelper.js +1 -1
  134. package/lib/helpers/typeidHelper.js.map +1 -1
  135. package/lib/index.d.ts +8 -8
  136. package/lib/index.d.ts.map +1 -1
  137. package/lib/index.js +8 -8
  138. package/lib/index.js.map +1 -1
  139. package/lib/isReservedKeyword.d.ts.map +1 -1
  140. package/lib/isReservedKeyword.js.map +1 -1
  141. package/lib/pathHelper.d.ts +0 -3
  142. package/lib/pathHelper.d.ts.map +1 -1
  143. package/lib/pathHelper.js.map +1 -1
  144. package/lib/rebase.js +2 -2
  145. package/lib/rebase.js.map +1 -1
  146. package/lib/templateSchema.d.ts.map +1 -1
  147. package/lib/templateSchema.js.map +1 -1
  148. package/lib/templateValidator.d.ts +1 -1
  149. package/lib/templateValidator.d.ts.map +1 -1
  150. package/lib/templateValidator.js +24 -29
  151. package/lib/templateValidator.js.map +1 -1
  152. package/lib/test/array.spec.js +768 -0
  153. package/lib/test/array.spec.js.map +1 -0
  154. package/lib/test/indexedCollection.spec.js +75 -0
  155. package/lib/test/indexedCollection.spec.js.map +1 -0
  156. package/lib/test/map.spec.js +17 -0
  157. package/lib/test/map.spec.js.map +1 -0
  158. package/lib/test/pathHelper.spec.js +435 -0
  159. package/lib/test/pathHelper.spec.js.map +1 -0
  160. package/lib/test/reversibleCs.spec.js +42 -0
  161. package/lib/test/reversibleCs.spec.js.map +1 -0
  162. package/lib/test/schemaValidator.js +103 -0
  163. package/lib/test/schemaValidator.js.map +1 -0
  164. package/lib/test/schemas/badBothPropertiesAndTypeid.js +24 -0
  165. package/lib/test/schemas/badBothPropertiesAndTypeid.js.map +1 -0
  166. package/lib/test/schemas/badInvalidSemverInTypeid.js +46 -0
  167. package/lib/test/schemas/badInvalidSemverInTypeid.js.map +1 -0
  168. package/lib/test/schemas/badMissingSemverInTypeid.js +46 -0
  169. package/lib/test/schemas/badMissingSemverInTypeid.js.map +1 -0
  170. package/lib/test/schemas/badNestedProperties.js +46 -0
  171. package/lib/test/schemas/badNestedProperties.js.map +1 -0
  172. package/lib/test/schemas/badPrimitiveTypeid.js +31 -0
  173. package/lib/test/schemas/badPrimitiveTypeid.js.map +1 -0
  174. package/lib/test/schemas/badVersionedTypeid.js +47 -0
  175. package/lib/test/schemas/badVersionedTypeid.js.map +1 -0
  176. package/lib/test/schemas/goodColorPalette.js +21 -0
  177. package/lib/test/schemas/goodColorPalette.js.map +1 -0
  178. package/lib/test/schemas/goodDraftAsVersion.js +18 -0
  179. package/lib/test/schemas/goodDraftAsVersion.js.map +1 -0
  180. package/lib/test/schemas/goodPointId.js +46 -0
  181. package/lib/test/schemas/goodPointId.js.map +1 -0
  182. package/lib/test/schemas/goodReferenceAndRegular.js +22 -0
  183. package/lib/test/schemas/goodReferenceAndRegular.js.map +1 -0
  184. package/lib/test/schemas/goodReservedTypes.js +29 -0
  185. package/lib/test/schemas/goodReservedTypes.js.map +1 -0
  186. package/lib/test/schemas/goodUIBorder.js +41 -0
  187. package/lib/test/schemas/goodUIBorder.js.map +1 -0
  188. package/lib/test/schemas/index.js +29 -0
  189. package/lib/test/schemas/index.js.map +1 -0
  190. package/lib/test/tsconfig.tsbuildinfo +1 -0
  191. package/lib/test/validator/templateSyntax.spec.js +83 -0
  192. package/lib/test/validator/templateSyntax.spec.js.map +1 -0
  193. package/lib/test/validator/templateValidator.spec.js +1022 -0
  194. package/lib/test/validator/templateValidator.spec.js.map +1 -0
  195. package/lib/test/validator/typeidHelper.spec.js +142 -0
  196. package/lib/test/validator/typeidHelper.spec.js.map +1 -0
  197. package/lib/utils.d.ts +17 -13
  198. package/lib/utils.d.ts.map +1 -1
  199. package/lib/utils.js +23 -23
  200. package/lib/utils.js.map +1 -1
  201. package/lib/validationResultBuilder.d.ts +2 -1
  202. package/lib/validationResultBuilder.d.ts.map +1 -1
  203. package/lib/validationResultBuilder.js.map +1 -1
  204. package/package.json +37 -16
  205. package/dist/test/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /*!
3
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ajvFactory = void 0;
11
+ const ajv_1 = __importDefault(require("ajv"));
12
+ const ajv_keywords_1 = __importDefault(require("ajv-keywords"));
13
+ exports.ajvFactory = new ajv_1.default({
14
+ allErrors: true,
15
+ verbose: true,
16
+ });
17
+ (0, ajv_keywords_1.default)(exports.ajvFactory, "prohibited");
18
+ (0, ajv_keywords_1.default)(exports.ajvFactory, "typeof");
19
+ //# sourceMappingURL=ajvFactory.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ajvFactory.cjs","sourceRoot":"","sources":["../src/ajvFactory.cts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,8CAAsB;AACtB,gEAAuC;AAE1B,QAAA,UAAU,GAAG,IAAI,aAAG,CAAC;IACjC,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,IAAA,sBAAW,EAAC,kBAAU,EAAE,YAAY,CAAC,CAAC;AACtC,IAAA,sBAAW,EAAC,kBAAU,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport Ajv from \"ajv\";\nimport ajvKeywords from \"ajv-keywords\";\n\nexport const ajvFactory = new Ajv({\n\tallErrors: true,\n\tverbose: true,\n});\n\najvKeywords(ajvFactory, \"prohibited\");\najvKeywords(ajvFactory, \"typeof\");\n"]}
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import Ajv from "ajv";
6
+ export declare const ajvFactory: Ajv;
7
+ //# sourceMappingURL=ajvFactory.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ajvFactory.d.cts","sourceRoot":"","sources":["../src/ajvFactory.cts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,GAAG,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,UAAU,KAGrB,CAAC"}
@@ -2,12 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- /**
6
- * @fileoverview Serialized representation of the changes in a repository
7
- */
8
- import { ChangeSetArrayFunctions } from "./changeset_operations/array";
9
- import { ConflictType } from "./changeset_operations/changesetConflictTypes";
10
- import { ChangeSetIndexedCollectionFunctions } from "./changeset_operations/indexedCollection";
5
+ import { ChangeSetArrayFunctions } from "./changeset_operations/array.js";
6
+ import { ConflictType } from "./changeset_operations/changesetConflictTypes.js";
7
+ import { ChangeSetIndexedCollectionFunctions } from "./changeset_operations/indexedCollection.js";
11
8
  export interface ApplyChangeSetOptions {
12
9
  /**
13
10
  * Additional meta information which help later to obtain more compact changeset during the apply operation.
@@ -1 +1 @@
1
- {"version":3,"file":"changeset.d.ts","sourceRoot":"","sources":["../src/changeset.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;GAEG;AAaH,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAGvE,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,EAAE,mCAAmC,EAAE,MAAM,0CAA0C,CAAC;AAW/F,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,yBAAyB,CAAC,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAE1C;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACpE,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC;AACtC,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAChC,MAAM,WAAW,YAAY;IAC5B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;CACxC;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACrB,MAAM,CAAC,YAAY,s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AAO,EACvB,UAAU,CAAC,EAAE,qBAAqB;IAiInC;;;;;;;;;;;;OAYG;IACI,gBAAgB,CACtB,YAAY,EAAE,mBAAmB,EACjC,aAAa,EAAE,YAAY,EAAE,EAC7B,UAAU,CAAC,EAAE,sBAAsB,GACjC,mBAAmB;IAWtB;;;;;;;;;OASG;IACH,OAAO,CAAC,2BAA2B;IAmMnC;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,yCAAyC;IAiFjD;;;;;OAKG;IACH,OAAO,CAAC,oCAAoC;IAqN5C;;;;;;;OAOG;IACI,sBAAsB,CAAC,qBAAqB,EAAE,mBAAmB;IA8BxE;;;;;;OAMG;IACI,yBAAyB,CAAC,cAAc,EAAE,OAAO;IA0HxD;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;IAmB/B;;;OAGG;IACH,OAAO,CAAC,qCAAqC;IAsK7C;;;;;OAKG;IACI,kBAAkB;CAWzB"}
package/dist/changeset.js CHANGED
@@ -3,35 +3,35 @@
3
3
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
4
  * Licensed under the MIT License.
5
5
  */
6
- /**
7
- * @fileoverview Serialized representation of the changes in a repository
8
- */
9
6
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
11
8
  };
12
9
  Object.defineProperty(exports, "__esModule", { value: true });
13
10
  exports.ChangeSet = void 0;
14
- const isObject_1 = __importDefault(require("lodash/isObject"));
15
- const isString_1 = __importDefault(require("lodash/isString"));
11
+ /**
12
+ * @fileoverview Serialized representation of the changes in a repository
13
+ */
14
+ const property_common_1 = require("@fluid-experimental/property-common");
16
15
  const fastest_json_copy_1 = require("fastest-json-copy");
17
- const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
18
- const extend_1 = __importDefault(require("lodash/extend"));
19
- const each_1 = __importDefault(require("lodash/each"));
16
+ const each_js_1 = __importDefault(require("lodash/each.js"));
17
+ const extend_js_1 = __importDefault(require("lodash/extend.js"));
18
+ const isEmpty_js_1 = __importDefault(require("lodash/isEmpty.js"));
19
+ const isObject_js_1 = __importDefault(require("lodash/isObject.js"));
20
+ const isString_js_1 = __importDefault(require("lodash/isString.js"));
20
21
  // @ts-ignore
21
- const property_common_1 = require("@fluid-experimental/property-common");
22
- const typeidHelper_1 = require("./helpers/typeidHelper");
23
- const array_1 = require("./changeset_operations/array");
24
- const arrayChangesetIterator_1 = require("./changeset_operations/arrayChangesetIterator");
25
- const changesetConflictTypes_1 = require("./changeset_operations/changesetConflictTypes");
22
+ const array_js_1 = require("./changeset_operations/array.js");
23
+ const arrayChangesetIterator_js_1 = require("./changeset_operations/arrayChangesetIterator.js");
24
+ const changesetConflictTypes_js_1 = require("./changeset_operations/changesetConflictTypes.js");
26
25
  // Add the indexed collection functions into the prototype of the ChangeSet
27
- const indexedCollection_1 = require("./changeset_operations/indexedCollection");
28
- const isEmptyChangeset_1 = require("./changeset_operations/isEmptyChangeset");
29
- const isReservedKeyword_1 = require("./isReservedKeyword");
30
- const utils_1 = require("./utils");
31
- const templateValidator_1 = require("./templateValidator");
32
- const operationTypes_1 = require("./changeset_operations/operationTypes");
26
+ const indexedCollection_js_1 = require("./changeset_operations/indexedCollection.js");
27
+ const isEmptyChangeset_js_1 = require("./changeset_operations/isEmptyChangeset.js");
28
+ const operationTypes_js_1 = require("./changeset_operations/operationTypes.js");
29
+ const typeidHelper_js_1 = require("./helpers/typeidHelper.js");
30
+ const isReservedKeyword_js_1 = require("./isReservedKeyword.js");
31
+ const templateValidator_js_1 = require("./templateValidator.js");
32
+ const utils_js_1 = require("./utils.js");
33
33
  const { PROPERTY_PATH_DELIMITER, MSG } = property_common_1.constants;
34
- const { extractContext, isPrimitiveType } = typeidHelper_1.TypeIdHelper;
34
+ const { extractContext, isPrimitiveType } = typeidHelper_js_1.TypeIdHelper;
35
35
  /**
36
36
  * The ChangeSet represents an operation to be done (or that was done) on the data. It encapsulate one or
37
37
  * many addition/insertion and deletion of properties. The ChangeSetObject also provides functionality
@@ -47,7 +47,7 @@ class ChangeSet {
47
47
  if (in_changes === undefined || in_changes === null) {
48
48
  this._changes = {};
49
49
  }
50
- else if ((0, isString_1.default)(in_changes)) {
50
+ else if ((0, isString_js_1.default)(in_changes)) {
51
51
  // Stringified Serialized JSON
52
52
  this._changes = JSON.parse(in_changes);
53
53
  }
@@ -115,8 +115,8 @@ class ChangeSet {
115
115
  if (in_changeSet instanceof ChangeSet) {
116
116
  changes = in_changeSet.getSerializedChangeSet();
117
117
  }
118
- if (!(0, isObject_1.default)(this._changes) || Array.isArray(this._changes)) {
119
- const oldValue = (0, isObject_1.default)(changes) && changes.value !== undefined
118
+ if (!(0, isObject_js_1.default)(this._changes) || Array.isArray(this._changes)) {
119
+ const oldValue = (0, isObject_js_1.default)(changes) && changes.value !== undefined
120
120
  ? changes.value
121
121
  : changes;
122
122
  this._changes = Array.isArray(oldValue) ? oldValue.slice() : oldValue;
@@ -142,9 +142,9 @@ class ChangeSet {
142
142
  in_appliedPropertyChanges.remove) {
143
143
  this._performApplyAfterOnPropertyIndexedCollection(io_basePropertyChanges, in_appliedPropertyChanges, "NodeProperty", in_options); // TODO: recursively propagate the typeid?
144
144
  }
145
- if (!(0, isEmpty_1.default)(in_appliedPropertyChanges.insertTemplates)) {
145
+ if (!(0, isEmpty_js_1.default)(in_appliedPropertyChanges.insertTemplates)) {
146
146
  io_basePropertyChanges.insertTemplates = io_basePropertyChanges.insertTemplates || {};
147
- (0, extend_1.default)(io_basePropertyChanges.insertTemplates, in_appliedPropertyChanges.insertTemplates);
147
+ (0, extend_js_1.default)(io_basePropertyChanges.insertTemplates, in_appliedPropertyChanges.insertTemplates);
148
148
  }
149
149
  // Apply ChangeSet to the properties
150
150
  const modifiedTypeids = Object.keys(in_appliedPropertyChanges);
@@ -161,7 +161,7 @@ class ChangeSet {
161
161
  this.performApplyAfterOnPropertyWithTypeid(changedKeys[j], baseChanges, in_appliedPropertyChanges[typeid], typeid, in_removeEmpty, in_options);
162
162
  }
163
163
  // Remove the type when it no longer contains any changed keys
164
- if (in_removeEmpty && (0, isEmpty_1.default)(io_basePropertyChanges[typeid])) {
164
+ if (in_removeEmpty && (0, isEmpty_js_1.default)(io_basePropertyChanges[typeid])) {
165
165
  delete io_basePropertyChanges[typeid];
166
166
  }
167
167
  }
@@ -212,7 +212,7 @@ class ChangeSet {
212
212
  in_baseChanges[in_changedKey] = in_baseChanges[in_changedKey] || {};
213
213
  this._performApplyAfterOnPropertyIndexedCollection(in_baseChanges[in_changedKey], in_appliedPropertyChanges[in_changedKey], splitTypeid.typeid, in_options);
214
214
  // Remove the key, when it no longer contains a changeset
215
- if (in_removeEmpty && (0, isEmpty_1.default)(in_baseChanges[in_changedKey])) {
215
+ if (in_removeEmpty && (0, isEmpty_js_1.default)(in_baseChanges[in_changedKey])) {
216
216
  delete in_baseChanges[in_changedKey];
217
217
  }
218
218
  }
@@ -222,7 +222,7 @@ class ChangeSet {
222
222
  let baseIsSetChange = false;
223
223
  let oldValue;
224
224
  if (splitTypeid.typeid === "String" &&
225
- ((0, isString_1.default)(in_baseChanges[in_changedKey]) ||
225
+ ((0, isString_js_1.default)(in_baseChanges[in_changedKey]) ||
226
226
  (in_baseChanges[in_changedKey] &&
227
227
  in_baseChanges[in_changedKey].hasOwnProperty("value")))) {
228
228
  oldValue = in_baseChanges[in_changedKey].oldValue;
@@ -240,10 +240,10 @@ class ChangeSet {
240
240
  baseIsSetChange = true;
241
241
  }
242
242
  let appliedChanges = in_appliedPropertyChanges[in_changedKey];
243
- if ((0, isObject_1.default)(appliedChanges) && appliedChanges.hasOwnProperty("value")) {
243
+ if ((0, isObject_js_1.default)(appliedChanges) && appliedChanges.hasOwnProperty("value")) {
244
244
  appliedChanges = appliedChanges.value;
245
245
  }
246
- if (splitTypeid.typeid === "String" && (0, isString_1.default)(appliedChanges)) {
246
+ if (splitTypeid.typeid === "String" && (0, isString_js_1.default)(appliedChanges)) {
247
247
  // we've got a 'set' command and just overwrite the changes
248
248
  in_baseChanges[in_changedKey] =
249
249
  baseIsSetChange && oldValue !== undefined
@@ -259,7 +259,7 @@ class ChangeSet {
259
259
  if (baseIsSetChange) {
260
260
  // we have to convert back to a string, if it had been converted before
261
261
  let newValue;
262
- newValue = (0, isEmpty_1.default)(in_baseChanges[in_changedKey])
262
+ newValue = (0, isEmpty_js_1.default)(in_baseChanges[in_changedKey])
263
263
  ? ""
264
264
  : in_baseChanges[in_changedKey].insert[0][1];
265
265
  in_baseChanges[in_changedKey] =
@@ -349,18 +349,18 @@ class ChangeSet {
349
349
  false, // don't use square brackets (use dots instead)
350
350
  out_conflicts, in_options);
351
351
  }
352
- if (!(0, isEmpty_1.default)(io_rebasePropertyChangeSet.insertTemplates)) {
352
+ if (!(0, isEmpty_js_1.default)(io_rebasePropertyChangeSet.insertTemplates)) {
353
353
  const typeids = Object.keys(io_rebasePropertyChangeSet.insertTemplates);
354
354
  const templateMismatchChangeSet = { insertTemplates: {} };
355
355
  const templateMismatchConflict = {
356
356
  type: ChangeSet.ConflictType.MISMATCH_TEMPLATES,
357
357
  conflictingChange: templateMismatchChangeSet,
358
358
  };
359
- (0, each_1.default)(typeids, function (typeid) {
359
+ (0, each_js_1.default)(typeids, function (typeid) {
360
360
  const template = io_rebasePropertyChangeSet.insertTemplates[typeid];
361
361
  if (in_ownPropertyChangeSet.insertTemplates &&
362
362
  in_ownPropertyChangeSet.insertTemplates[typeid]) {
363
- const isEqual = templateValidator_1.TemplateValidator.Utils.psetDeepEquals(template, in_ownPropertyChangeSet.insertTemplates[template.typeid]);
363
+ const isEqual = templateValidator_js_1.TemplateValidator.Utils.psetDeepEquals(template, in_ownPropertyChangeSet.insertTemplates[template.typeid]);
364
364
  if (!isEqual) {
365
365
  if (in_options && in_options.throwOnTemplateMismatch) {
366
366
  throw new Error(MSG.TEMPLATE_MISMATCH + typeid);
@@ -374,10 +374,10 @@ class ChangeSet {
374
374
  }
375
375
  });
376
376
  // Remove insertTemplates key if it is empty
377
- if ((0, isEmpty_1.default)(io_rebasePropertyChangeSet.insertTemplates)) {
377
+ if ((0, isEmpty_js_1.default)(io_rebasePropertyChangeSet.insertTemplates)) {
378
378
  delete io_rebasePropertyChangeSet.insertTemplates;
379
379
  }
380
- if (!(0, isEmpty_1.default)(templateMismatchConflict.conflictingChange.insertTemplates)) {
380
+ if (!(0, isEmpty_js_1.default)(templateMismatchConflict.conflictingChange.insertTemplates)) {
381
381
  out_conflicts.push(templateMismatchConflict);
382
382
  }
383
383
  }
@@ -400,7 +400,7 @@ class ChangeSet {
400
400
  for (let z = 0; z < tempPaths.length; z++) {
401
401
  if (tempPaths[z] in io_rebasePropertyChangeSet.modify[tempTypeid]) {
402
402
  let rebasedPropContent = io_rebasePropertyChangeSet.modify[tempTypeid][tempPaths[z]];
403
- if ((0, isObject_1.default)(rebasedPropContent) &&
403
+ if ((0, isObject_js_1.default)(rebasedPropContent) &&
404
404
  "oldValue" in rebasedPropContent) {
405
405
  rebasedPropContent.oldValue =
406
406
  in_ownPropertyChangeSet.modify[tempTypeid][tempPaths[z]].value;
@@ -418,7 +418,7 @@ class ChangeSet {
418
418
  if (typeid in io_rebasePropertyChangeSet &&
419
419
  paths[j] in io_rebasePropertyChangeSet[typeid]) {
420
420
  let rebasedPropContent = io_rebasePropertyChangeSet[typeid][paths[j]];
421
- if ((0, isObject_1.default)(rebasedPropContent) && "oldValue" in rebasedPropContent) {
421
+ if ((0, isObject_js_1.default)(rebasedPropContent) && "oldValue" in rebasedPropContent) {
422
422
  // if oldValue already be update above, we don't need to update
423
423
  if (io_rebasePropertyChangeSet[typeid][paths[j]].oldValue !==
424
424
  in_ownPropertyChangeSet[typeid][paths[j]].value) {
@@ -451,17 +451,17 @@ class ChangeSet {
451
451
  }
452
452
  }
453
453
  // Remove the typeid, when it no longer contains any keys
454
- if ((0, isEmpty_1.default)(io_rebasePropertyChangeSet[typeid][paths[j]])) {
454
+ if ((0, isEmpty_js_1.default)(io_rebasePropertyChangeSet[typeid][paths[j]])) {
455
455
  delete io_rebasePropertyChangeSet[typeid][paths[j]];
456
456
  }
457
457
  }
458
458
  // Remove the typeid, when it no longer contains any keys
459
- if ((0, isEmpty_1.default)(io_rebasePropertyChangeSet[typeid])) {
459
+ if ((0, isEmpty_js_1.default)(io_rebasePropertyChangeSet[typeid])) {
460
460
  delete io_rebasePropertyChangeSet[typeid];
461
461
  }
462
462
  }
463
463
  // If there were conflicts in the set operations, report them
464
- if (!(0, isEmpty_1.default)(changeSet)) {
464
+ if (!(0, isEmpty_js_1.default)(changeSet)) {
465
465
  const conflict = {
466
466
  path: in_basePath,
467
467
  type: ChangeSet.ConflictType.COLLIDING_SET,
@@ -496,21 +496,21 @@ class ChangeSet {
496
496
  this._rebaseIndexedCollectionChangeSetForProperty(in_ownPropertyChangeSet[in_key], io_rebasePropertyChangeSet[in_key], in_basePath, splitTypeid.typeid, true, // use square brackets
497
497
  out_conflicts, in_options);
498
498
  // Remove the key, when it no longer contains a changeset
499
- if (in_removeEmpty && (0, isEmpty_1.default)(io_rebasePropertyChangeSet[in_key])) {
499
+ if (in_removeEmpty && (0, isEmpty_js_1.default)(io_rebasePropertyChangeSet[in_key])) {
500
500
  delete io_rebasePropertyChangeSet[in_key];
501
501
  }
502
502
  }
503
503
  else if (splitTypeid.context === "array") {
504
504
  this._rebaseArrayChangeSetForProperty(in_ownPropertyChangeSet[in_key], io_rebasePropertyChangeSet[in_key], in_basePath, out_conflicts, splitTypeid.typeid, in_options);
505
505
  // Remove the key, when it no longer contains a changeset
506
- if (in_removeEmpty && (0, isEmpty_1.default)(io_rebasePropertyChangeSet[in_key])) {
506
+ if (in_removeEmpty && (0, isEmpty_js_1.default)(io_rebasePropertyChangeSet[in_key])) {
507
507
  delete io_rebasePropertyChangeSet[in_key];
508
508
  }
509
509
  }
510
510
  else if (splitTypeid.typeid === "String") {
511
511
  this._rebaseChangeSetForString(in_ownPropertyChangeSet[in_key], io_rebasePropertyChangeSet, in_key, in_basePath, out_conflicts, in_options);
512
512
  // Remove the key, when it no longer contains a changeset
513
- if (in_removeEmpty && (0, isEmpty_1.default)(io_rebasePropertyChangeSet[in_key])) {
513
+ if (in_removeEmpty && (0, isEmpty_js_1.default)(io_rebasePropertyChangeSet[in_key])) {
514
514
  delete io_rebasePropertyChangeSet[in_key];
515
515
  }
516
516
  }
@@ -572,10 +572,10 @@ class ChangeSet {
572
572
  }
573
573
  let oldValue = current;
574
574
  // store it in reversibleChangeSet
575
- if (type === "String" && !(0, isString_1.default)(nestedChangeset)) {
575
+ if (type === "String" && !(0, isString_js_1.default)(nestedChangeset)) {
576
576
  // String is a special case
577
577
  let oldString;
578
- if ((0, isString_1.default)(oldValue)) {
578
+ if ((0, isString_js_1.default)(oldValue)) {
579
579
  oldString = oldValue;
580
580
  }
581
581
  if (nestedChangeset.modify) {
@@ -591,7 +591,7 @@ class ChangeSet {
591
591
  let entry = nestedChangeset.remove[i];
592
592
  let entryOffset = entry[0];
593
593
  let removeRangeLength = entry[1];
594
- if ((0, isString_1.default)(removeRangeLength)) {
594
+ if ((0, isString_js_1.default)(removeRangeLength)) {
595
595
  removeRangeLength = entry[1].length;
596
596
  }
597
597
  entry[1] = oldString.slice(entryOffset, entryOffset + removeRangeLength);
@@ -741,8 +741,8 @@ class ChangeSet {
741
741
  */
742
742
  _toReversibleChangeSet(in_oldSerializedState) {
743
743
  property_common_1.ConsoleUtils.assert(in_oldSerializedState !== undefined, `${MSG.ASSERTION_FAILED}Missing function parameter "in_oldSerializedState" of "_toReversibleChangeSet".`);
744
- if (!(0, isObject_1.default)(in_oldSerializedState) || Array.isArray(in_oldSerializedState)) {
745
- if (!(0, isObject_1.default)(this._changes) || Array.isArray(this._changes)) {
744
+ if (!(0, isObject_js_1.default)(in_oldSerializedState) || Array.isArray(in_oldSerializedState)) {
745
+ if (!(0, isObject_js_1.default)(this._changes) || Array.isArray(this._changes)) {
746
746
  this._changes = {
747
747
  oldValue: Array.isArray(in_oldSerializedState)
748
748
  ? in_oldSerializedState.slice()
@@ -758,7 +758,7 @@ class ChangeSet {
758
758
  }
759
759
  else {
760
760
  const workspace = { oldState: in_oldSerializedState };
761
- utils_1.Utils.traverseChangeSetRecursively(this._changes, {
761
+ utils_js_1.Utils.traverseChangeSetRecursively(this._changes, {
762
762
  preCallback: this._recursivelyBuildReversibleChangeSet,
763
763
  userData: workspace,
764
764
  });
@@ -783,7 +783,7 @@ class ChangeSet {
783
783
  if (isPrimitiveType(type)) {
784
784
  // remove old state
785
785
  let nestedChangeset = in_context.getNestedChangeSet();
786
- if (type === "String" && !(0, isString_1.default)(nestedChangeset)) {
786
+ if (type === "String" && !(0, isString_js_1.default)(nestedChangeset)) {
787
787
  // String is a special case
788
788
  if (nestedChangeset.modify) {
789
789
  for (let i = 0; i < nestedChangeset.modify.length; i++) {
@@ -795,7 +795,7 @@ class ChangeSet {
795
795
  for (let i = 0; i < nestedChangeset.remove.length; i++) {
796
796
  let entry = nestedChangeset.remove[i];
797
797
  let removeRangeLength = entry[1];
798
- if ((0, isString_1.default)(removeRangeLength)) {
798
+ if ((0, isString_js_1.default)(removeRangeLength)) {
799
799
  removeRangeLength = entry[1].length;
800
800
  }
801
801
  entry[1] = removeRangeLength;
@@ -875,13 +875,13 @@ class ChangeSet {
875
875
  }
876
876
  }
877
877
  };
878
- if ((0, isObject_1.default)(this._changes) &&
878
+ if ((0, isObject_js_1.default)(this._changes) &&
879
879
  this._changes.oldValue !== undefined &&
880
880
  this._changes.value !== undefined) {
881
881
  this._changes = this._changes.value;
882
882
  return;
883
883
  }
884
- utils_1.Utils.traverseChangeSetRecursively(this._changes, {
884
+ utils_js_1.Utils.traverseChangeSetRecursively(this._changes, {
885
885
  preCallback: callback,
886
886
  });
887
887
  }
@@ -899,8 +899,8 @@ class ChangeSet {
899
899
  }
900
900
  else {
901
901
  paths = [];
902
- (0, each_1.default)(in_changeSet, function (nestedChangeSet) {
903
- (0, each_1.default)(nestedChangeSet, function (nestedChangeSet2, path) {
902
+ (0, each_js_1.default)(in_changeSet, function (nestedChangeSet) {
903
+ (0, each_js_1.default)(nestedChangeSet, function (nestedChangeSet2, path) {
904
904
  paths.push(path);
905
905
  });
906
906
  });
@@ -930,10 +930,10 @@ class ChangeSet {
930
930
  }
931
931
  const nestedChangeset = in_context.getNestedChangeSet();
932
932
  if ((isPrimitiveType(type) && type !== "String") ||
933
- (type === "String" && (0, isString_1.default)(nestedChangeset.oldValue))) {
933
+ (type === "String" && (0, isString_js_1.default)(nestedChangeset.oldValue))) {
934
934
  // check if we were called with an irreversible changeset
935
935
  if (in_context.getOperationType() === "modify" &&
936
- (!(0, isObject_1.default)(nestedChangeset) ||
936
+ (!(0, isObject_js_1.default)(nestedChangeset) ||
937
937
  typeof nestedChangeset.oldValue === "undefined")) {
938
938
  throw new Error(MSG.OLD_VALUE_NOT_FOUND);
939
939
  }
@@ -942,10 +942,10 @@ class ChangeSet {
942
942
  nestedChangeset.oldValue = nestedChangeset.value;
943
943
  nestedChangeset.value = tmp;
944
944
  }
945
- else if ((type === "String" && !(0, isString_1.default)(nestedChangeset.oldValue)) ||
945
+ else if ((type === "String" && !(0, isString_js_1.default)(nestedChangeset.oldValue)) ||
946
946
  splitType.context === "array") {
947
947
  // String and Arrays need special treatment:
948
- const arrayIterator = new arrayChangesetIterator_1.ArrayChangeSetIterator(nestedChangeset);
948
+ const arrayIterator = new arrayChangesetIterator_js_1.ArrayChangeSetIterator(nestedChangeset);
949
949
  const resultChangeset = {};
950
950
  if (nestedChangeset.modify) {
951
951
  resultChangeset.modify = [];
@@ -959,7 +959,7 @@ class ChangeSet {
959
959
  // Successively invert the changes from the changeSet
960
960
  while (!arrayIterator.atEnd()) {
961
961
  switch (arrayIterator.opDescription.type) {
962
- case operationTypes_1.ArrayIteratorOperationTypes.INSERT:
962
+ case operationTypes_js_1.ArrayIteratorOperationTypes.INSERT:
963
963
  // Handle inserts
964
964
  resultChangeset.remove.push([
965
965
  arrayIterator.opDescription.operation[0] +
@@ -967,7 +967,7 @@ class ChangeSet {
967
967
  arrayIterator.opDescription.operation[1],
968
968
  ]);
969
969
  break;
970
- case operationTypes_1.ArrayIteratorOperationTypes.REMOVE:
970
+ case operationTypes_js_1.ArrayIteratorOperationTypes.REMOVE:
971
971
  // Handle removes
972
972
  resultChangeset.insert.push([
973
973
  arrayIterator.opDescription.operation[0] +
@@ -975,7 +975,7 @@ class ChangeSet {
975
975
  arrayIterator.opDescription.operation[1],
976
976
  ]);
977
977
  break;
978
- case operationTypes_1.ArrayIteratorOperationTypes.MODIFY:
978
+ case operationTypes_js_1.ArrayIteratorOperationTypes.MODIFY:
979
979
  // Handle modifies
980
980
  if (isPrimitiveType(splitType.typeid)) {
981
981
  resultChangeset.modify.push([
@@ -1021,7 +1021,7 @@ class ChangeSet {
1021
1021
  nestedChangeset.remove = undefined;
1022
1022
  delete nestedChangeset.remove;
1023
1023
  const isPrimitiveTypeid = isPrimitiveType(in_context.getSplitTypeID().typeid);
1024
- (0, each_1.default)(this._extractFirstLevelPaths(nestedChangeset.insert, isPrimitiveTypeid), function (path) {
1024
+ (0, each_js_1.default)(this._extractFirstLevelPaths(nestedChangeset.insert, isPrimitiveTypeid), function (path) {
1025
1025
  const fullPath = (0, property_common_1.joinPaths)(in_context.getFullPath(), path, PROPERTY_PATH_DELIMITER);
1026
1026
  in_context.getUserData()[fullPath] = true;
1027
1027
  });
@@ -1036,7 +1036,7 @@ class ChangeSet {
1036
1036
  delete nestedChangeset.insert;
1037
1037
  }
1038
1038
  const isPrimitiveTypeid = isPrimitiveType(in_context.getSplitTypeID().typeid);
1039
- (0, each_1.default)(this._extractFirstLevelPaths(nestedChangeset.remove, isPrimitiveTypeid), function (path) {
1039
+ (0, each_js_1.default)(this._extractFirstLevelPaths(nestedChangeset.remove, isPrimitiveTypeid), function (path) {
1040
1040
  const fullPath = (0, property_common_1.joinPaths)(in_context.getFullPath(), path, PROPERTY_PATH_DELIMITER);
1041
1041
  in_context.getUserData()[fullPath] = true;
1042
1042
  });
@@ -1057,26 +1057,26 @@ class ChangeSet {
1057
1057
  this._changes.oldValue = tmp;
1058
1058
  }
1059
1059
  else {
1060
- utils_1.Utils.traverseChangeSetRecursively(this._changes, {
1060
+ utils_js_1.Utils.traverseChangeSetRecursively(this._changes, {
1061
1061
  preCallback: this._recursivelyInvertReversibleChangeset.bind(this),
1062
1062
  });
1063
1063
  }
1064
1064
  }
1065
1065
  }
1066
1066
  exports.ChangeSet = ChangeSet;
1067
- ChangeSet.ConflictType = changesetConflictTypes_1.ConflictType;
1068
- ChangeSet.isEmptyChangeSet = isEmptyChangeset_1.isEmptyChangeSet;
1069
- ChangeSet.isReservedKeyword = isReservedKeyword_1.isReservedKeyword;
1067
+ ChangeSet.ConflictType = changesetConflictTypes_js_1.ConflictType;
1068
+ ChangeSet.isEmptyChangeSet = isEmptyChangeset_js_1.isEmptyChangeSet;
1069
+ ChangeSet.isReservedKeyword = isReservedKeyword_js_1.isReservedKeyword;
1070
1070
  ChangeSet.prototype._performApplyAfterOnPropertyArray =
1071
- array_1.ChangeSetArrayFunctions._performApplyAfterOnPropertyArray;
1071
+ array_js_1.ChangeSetArrayFunctions._performApplyAfterOnPropertyArray;
1072
1072
  ChangeSet.prototype._rebaseArrayChangeSetForProperty =
1073
- array_1.ChangeSetArrayFunctions._rebaseArrayChangeSetForProperty;
1074
- ChangeSet.prototype._rebaseChangeSetForString = array_1.ChangeSetArrayFunctions._rebaseChangeSetForString;
1073
+ array_js_1.ChangeSetArrayFunctions._rebaseArrayChangeSetForProperty;
1074
+ ChangeSet.prototype._rebaseChangeSetForString = array_js_1.ChangeSetArrayFunctions._rebaseChangeSetForString;
1075
1075
  // Add the indexed collection functions into the prototype of the ChangeSet
1076
1076
  ChangeSet.prototype._performApplyAfterOnPropertyIndexedCollection =
1077
- indexedCollection_1.ChangeSetIndexedCollectionFunctions._performApplyAfterOnPropertyIndexedCollection;
1077
+ indexedCollection_js_1.ChangeSetIndexedCollectionFunctions._performApplyAfterOnPropertyIndexedCollection;
1078
1078
  ChangeSet.prototype._cleanIndexedCollectionChangeSet =
1079
- indexedCollection_1.ChangeSetIndexedCollectionFunctions._cleanIndexedCollectionChangeSet;
1079
+ indexedCollection_js_1.ChangeSetIndexedCollectionFunctions._cleanIndexedCollectionChangeSet;
1080
1080
  ChangeSet.prototype._rebaseIndexedCollectionChangeSetForProperty =
1081
- indexedCollection_1.ChangeSetIndexedCollectionFunctions._rebaseIndexedCollectionChangeSetForProperty;
1081
+ indexedCollection_js_1.ChangeSetIndexedCollectionFunctions._rebaseIndexedCollectionChangeSetForProperty;
1082
1082
  //# sourceMappingURL=changeset.js.map