@fluidframework/tree 2.53.1 → 2.60.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.
- package/.eslintrc.cjs +0 -19
- package/.mocharc.customBenchmarks.cjs +1 -9
- package/CHANGELOG.md +56 -0
- package/api-report/tree.alpha.api.md +50 -36
- package/api-report/tree.beta.api.md +15 -1
- package/api-report/{tree.legacy.alpha.api.md → tree.legacy.beta.api.md} +5 -5
- package/api-report/tree.legacy.public.api.md +1 -1
- package/api-report/tree.public.api.md +1 -1
- package/dist/alpha.d.ts +8 -2
- package/dist/beta.d.ts +3 -0
- package/dist/codec/codec.d.ts +43 -6
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +22 -2
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/index.d.ts +1 -1
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +4 -1
- package/dist/codec/index.js.map +1 -1
- package/dist/external-utilities/index.d.ts +1 -1
- package/dist/external-utilities/index.d.ts.map +1 -1
- package/dist/external-utilities/index.js +2 -1
- package/dist/external-utilities/index.js.map +1 -1
- package/dist/external-utilities/typeboxValidator.d.ts +6 -1
- package/dist/external-utilities/typeboxValidator.d.ts.map +1 -1
- package/dist/external-utilities/typeboxValidator.js +7 -1
- package/dist/external-utilities/typeboxValidator.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +10 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +28 -5
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +19 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +10 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +59 -4
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +9 -2
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +46 -8
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +91 -16
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +14 -0
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +10 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +8 -3
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +17 -6
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +3 -0
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +13 -8
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +76 -38
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +178 -0
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +322 -0
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -0
- package/dist/feature-libraries/forest-summary/index.d.ts +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/index.js +2 -1
- package/dist/feature-libraries/forest-summary/index.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +1 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +2 -1
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +6 -9
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/treeCompressionUtils.d.ts +15 -0
- package/dist/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
- package/dist/feature-libraries/treeCompressionUtils.js +16 -1
- package/dist/feature-libraries/treeCompressionUtils.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/jsonDomainSchema.d.ts +1 -1
- package/dist/jsonDomainSchema.d.ts.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +23 -6
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +4 -1
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/tree.d.ts.map +1 -1
- package/dist/shared-tree/tree.js +3 -0
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +9 -11
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +2 -2
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +13 -0
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/sharedTreeAttributes.d.ts +2 -2
- package/dist/sharedTreeAttributes.js +2 -2
- package/dist/sharedTreeAttributes.js.map +1 -1
- package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/conciseTree.js +1 -1
- package/dist/simple-tree/api/conciseTree.js.map +1 -1
- package/dist/simple-tree/api/customTree.d.ts +39 -11
- package/dist/simple-tree/api/customTree.d.ts.map +1 -1
- package/dist/simple-tree/api/customTree.js +79 -19
- package/dist/simple-tree/api/customTree.js.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts +7 -2
- package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.js +1 -0
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +2 -1
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +4 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +9 -6
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +8 -7
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +13 -17
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +21 -25
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts +20 -0
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -0
- package/dist/simple-tree/api/schemaFactoryBeta.js +26 -0
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -0
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +0 -2
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +6 -3
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/transactionTypes.d.ts +1 -0
- package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/transactionTypes.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +68 -74
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/verboseTree.js +3 -3
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts +6 -0
- package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -1
- package/dist/simple-tree/core/simpleNodeSchemaBase.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +3 -4
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js +0 -3
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +1 -1
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +4 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +2 -3
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +12 -0
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts +0 -3
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +0 -3
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/tableSchema.d.ts +11 -80
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +200 -117
- package/dist/tableSchema.js.map +1 -1
- package/dist/treeFactory.d.ts +1 -2
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +1 -2
- package/dist/treeFactory.js.map +1 -1
- package/lib/alpha.d.ts +8 -2
- package/lib/beta.d.ts +3 -0
- package/lib/codec/codec.d.ts +43 -6
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +19 -1
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/index.d.ts +1 -1
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.js.map +1 -1
- package/lib/external-utilities/index.d.ts +1 -1
- package/lib/external-utilities/index.d.ts.map +1 -1
- package/lib/external-utilities/index.js +1 -1
- package/lib/external-utilities/index.js.map +1 -1
- package/lib/external-utilities/typeboxValidator.d.ts +6 -1
- package/lib/external-utilities/typeboxValidator.d.ts.map +1 -1
- package/lib/external-utilities/typeboxValidator.js +6 -0
- package/lib/external-utilities/typeboxValidator.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +10 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +27 -5
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +19 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +10 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +59 -4
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +10 -3
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +46 -8
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +87 -14
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +14 -0
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +9 -0
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +8 -3
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +18 -7
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +3 -0
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +13 -8
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +75 -37
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +178 -0
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +318 -0
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -0
- package/lib/feature-libraries/forest-summary/index.d.ts +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/index.js +1 -1
- package/lib/feature-libraries/forest-summary/index.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +1 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +3 -3
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +6 -9
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/treeCompressionUtils.d.ts +15 -0
- package/lib/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
- package/lib/feature-libraries/treeCompressionUtils.js +15 -0
- package/lib/feature-libraries/treeCompressionUtils.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/jsonDomainSchema.d.ts +1 -1
- package/lib/jsonDomainSchema.d.ts.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +23 -6
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +4 -1
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/tree.d.ts.map +1 -1
- package/lib/shared-tree/tree.js +3 -0
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +9 -11
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +2 -2
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +13 -0
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/sharedTreeAttributes.d.ts +2 -2
- package/lib/sharedTreeAttributes.js +2 -2
- package/lib/sharedTreeAttributes.js.map +1 -1
- package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/conciseTree.js +2 -2
- package/lib/simple-tree/api/conciseTree.js.map +1 -1
- package/lib/simple-tree/api/customTree.d.ts +39 -11
- package/lib/simple-tree/api/customTree.d.ts.map +1 -1
- package/lib/simple-tree/api/customTree.js +79 -19
- package/lib/simple-tree/api/customTree.js.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts +7 -2
- package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.js +1 -0
- package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +2 -1
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +2 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +9 -6
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +6 -6
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +13 -17
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +22 -26
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts +20 -0
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -0
- package/lib/simple-tree/api/schemaFactoryBeta.js +22 -0
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -0
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +0 -2
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +6 -3
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/transactionTypes.d.ts +1 -0
- package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/transactionTypes.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +68 -74
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/verboseTree.js +4 -4
- package/lib/simple-tree/api/verboseTree.js.map +1 -1
- package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts +6 -0
- package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -1
- package/lib/simple-tree/core/simpleNodeSchemaBase.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +3 -4
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js +0 -3
- package/lib/simple-tree/fieldSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +1 -1
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +2 -3
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +12 -0
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts +0 -3
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +0 -3
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/tableSchema.d.ts +11 -80
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +201 -118
- package/lib/tableSchema.js.map +1 -1
- package/lib/treeFactory.d.ts +1 -2
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +1 -2
- package/lib/treeFactory.js.map +1 -1
- package/package.json +21 -21
- package/src/codec/codec.ts +52 -7
- package/src/codec/index.ts +4 -0
- package/src/external-utilities/index.ts +1 -1
- package/src/external-utilities/typeboxValidator.ts +7 -1
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +38 -4
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +10 -3
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +96 -8
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +123 -19
- package/src/feature-libraries/chunked-forest/codec/format.ts +11 -0
- package/src/feature-libraries/chunked-forest/codec/index.ts +4 -0
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +28 -3
- package/src/feature-libraries/chunked-forest/index.ts +2 -0
- package/src/feature-libraries/forest-summary/codec.ts +3 -0
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +118 -50
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +511 -0
- package/src/feature-libraries/forest-summary/index.ts +1 -1
- package/src/feature-libraries/index.ts +5 -1
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +8 -4
- package/src/feature-libraries/treeCompressionUtils.ts +19 -0
- package/src/index.ts +6 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/schematizingTreeView.ts +1 -1
- package/src/shared-tree/sharedTree.ts +37 -4
- package/src/shared-tree/sharedTreeChangeFamily.ts +2 -2
- package/src/shared-tree/tree.ts +3 -0
- package/src/shared-tree/treeAlpha.ts +10 -11
- package/src/shared-tree/treeCheckout.ts +2 -2
- package/src/shared-tree-core/sharedTreeCore.ts +17 -0
- package/src/sharedTreeAttributes.ts +2 -2
- package/src/simple-tree/api/conciseTree.ts +2 -1
- package/src/simple-tree/api/customTree.ts +102 -32
- package/src/simple-tree/api/getJsonSchema.ts +7 -2
- package/src/simple-tree/api/index.ts +3 -0
- package/src/simple-tree/api/schemaCreationUtilities.ts +1 -1
- package/src/simple-tree/api/schemaFactory.ts +21 -14
- package/src/simple-tree/api/schemaFactoryAlpha.ts +29 -30
- package/src/simple-tree/api/schemaFactoryBeta.ts +28 -0
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +7 -3
- package/src/simple-tree/api/transactionTypes.ts +1 -0
- package/src/simple-tree/api/tree.ts +75 -81
- package/src/simple-tree/api/verboseTree.ts +42 -39
- package/src/simple-tree/core/simpleNodeSchemaBase.ts +6 -0
- package/src/simple-tree/fieldSchema.ts +3 -4
- package/src/simple-tree/index.ts +3 -0
- package/src/simple-tree/node-kinds/record/recordNode.ts +2 -3
- package/src/simple-tree/simpleSchema.ts +12 -0
- package/src/simple-tree/toStoredSchema.ts +0 -3
- package/src/tableSchema.ts +261 -243
- package/src/treeFactory.ts +1 -2
package/lib/tableSchema.d.ts
CHANGED
|
@@ -420,21 +420,6 @@ export declare namespace TableSchema {
|
|
|
420
420
|
*/
|
|
421
421
|
readonly row: string | TreeNodeFromImplicitAllowedTypes<TRow>;
|
|
422
422
|
}
|
|
423
|
-
/**
|
|
424
|
-
* {@link TableSchema.Table.insertColumn} parameters.
|
|
425
|
-
* @alpha
|
|
426
|
-
*/
|
|
427
|
-
interface InsertColumnParameters<TColumn extends ImplicitAllowedTypes> {
|
|
428
|
-
/**
|
|
429
|
-
* The index at which to insert the new column.
|
|
430
|
-
* @remarks If not provided, the column will be appended to the end of the table.
|
|
431
|
-
*/
|
|
432
|
-
readonly index?: number | undefined;
|
|
433
|
-
/**
|
|
434
|
-
* The column to insert.
|
|
435
|
-
*/
|
|
436
|
-
readonly column: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>;
|
|
437
|
-
}
|
|
438
423
|
/**
|
|
439
424
|
* {@link TableSchema.Table.insertColumns} parameters.
|
|
440
425
|
* @alpha
|
|
@@ -450,21 +435,6 @@ export declare namespace TableSchema {
|
|
|
450
435
|
*/
|
|
451
436
|
readonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
452
437
|
}
|
|
453
|
-
/**
|
|
454
|
-
* {@link TableSchema.Table.insertRow} parameters.
|
|
455
|
-
* @alpha
|
|
456
|
-
*/
|
|
457
|
-
interface InsertRowParameters<TRow extends ImplicitAllowedTypes> {
|
|
458
|
-
/**
|
|
459
|
-
* The index at which to insert the new row.
|
|
460
|
-
* @remarks If not provided, the row will be appended to the end of the table.
|
|
461
|
-
*/
|
|
462
|
-
readonly index?: number | undefined;
|
|
463
|
-
/**
|
|
464
|
-
* The row to insert.
|
|
465
|
-
*/
|
|
466
|
-
readonly row: InsertableTreeNodeFromImplicitAllowedTypes<TRow>;
|
|
467
|
-
}
|
|
468
438
|
/**
|
|
469
439
|
* {@link TableSchema.Table.insertRows} parameters.
|
|
470
440
|
* @alpha
|
|
@@ -524,14 +494,6 @@ export declare namespace TableSchema {
|
|
|
524
494
|
* @param key - A key that uniquely distinguishes a cell in the table, represented as a combination of the column ID and row ID.
|
|
525
495
|
*/
|
|
526
496
|
getCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
527
|
-
/**
|
|
528
|
-
* Inserts a column into the table.
|
|
529
|
-
*
|
|
530
|
-
* @throws Throws an error if the specified index is out of range.
|
|
531
|
-
*
|
|
532
|
-
* No column is inserted in this case.
|
|
533
|
-
*/
|
|
534
|
-
insertColumn(params: InsertColumnParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>;
|
|
535
497
|
/**
|
|
536
498
|
* Inserts 0 or more columns into the table.
|
|
537
499
|
*
|
|
@@ -540,19 +502,6 @@ export declare namespace TableSchema {
|
|
|
540
502
|
* No columns are inserted in this case.
|
|
541
503
|
*/
|
|
542
504
|
insertColumns(params: InsertColumnsParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
543
|
-
/**
|
|
544
|
-
* Inserts a row into the table.
|
|
545
|
-
*
|
|
546
|
-
* @throws
|
|
547
|
-
* Throws an error in the following cases:
|
|
548
|
-
*
|
|
549
|
-
* - The row contains cells, but the table does not contain matching columns for one or more of those cells.
|
|
550
|
-
*
|
|
551
|
-
* - The specified index is out of range.
|
|
552
|
-
*
|
|
553
|
-
* No row is inserted in these cases.
|
|
554
|
-
*/
|
|
555
|
-
insertRow(params: InsertRowParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>;
|
|
556
505
|
/**
|
|
557
506
|
* Inserts 0 or more rows into the table.
|
|
558
507
|
*
|
|
@@ -572,19 +521,19 @@ export declare namespace TableSchema {
|
|
|
572
521
|
*/
|
|
573
522
|
setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
|
|
574
523
|
/**
|
|
575
|
-
* Removes
|
|
524
|
+
* Removes a range of columns from the table.
|
|
525
|
+
*
|
|
576
526
|
* @remarks
|
|
577
527
|
* Also removes any corresponding cells from the table's rows.
|
|
578
528
|
*
|
|
579
529
|
* Note: this operation can be slow for tables with many rows.
|
|
580
530
|
* We are actively working on improving the performance of this operation, but for now it may have a negative
|
|
581
531
|
* impact on performance.
|
|
582
|
-
*
|
|
583
|
-
* @param
|
|
584
|
-
* @throws Throws an error if the
|
|
585
|
-
* In this case, no columns are removed.
|
|
532
|
+
* @param index - The starting index of the range to remove. Default: `0`.
|
|
533
|
+
* @param count - The number of columns to remove. Default: all remaining columns starting from `index`.
|
|
534
|
+
* @throws Throws an error if the specified range is invalid. In this case, no columns are removed.
|
|
586
535
|
*/
|
|
587
|
-
|
|
536
|
+
removeColumns(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
588
537
|
/**
|
|
589
538
|
* Removes 0 or more columns from the table.
|
|
590
539
|
* @remarks
|
|
@@ -615,25 +564,12 @@ export declare namespace TableSchema {
|
|
|
615
564
|
*/
|
|
616
565
|
removeColumns(columns: readonly string[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
617
566
|
/**
|
|
618
|
-
* Removes
|
|
619
|
-
*
|
|
620
|
-
* @
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
* Note: this operation can be slow for tables with many rows.
|
|
624
|
-
* We are actively working on improving the performance of this operation, but for now it may have a negative
|
|
625
|
-
* impact on performance.
|
|
626
|
-
*
|
|
627
|
-
* @returns The removed columns.
|
|
628
|
-
*/
|
|
629
|
-
removeAllColumns(): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
630
|
-
/**
|
|
631
|
-
* Removes the specified row from the table.
|
|
632
|
-
* @param row - The {@link TableSchema.Row | row} or {@link TableSchema.Row.id | row ID} to remove.
|
|
633
|
-
* @throws Throws an error if the row is not in the table.
|
|
634
|
-
* In this case, no rows are removed.
|
|
567
|
+
* Removes a range of rows from the table.
|
|
568
|
+
* @param index - The starting index of the range to remove. Default: `0`.
|
|
569
|
+
* @param count - The number of rows to remove. Default: all remaining rows starting from `index`.
|
|
570
|
+
* @throws Throws an error if the specified range is invalid. In this case, no rows are removed.
|
|
635
571
|
*/
|
|
636
|
-
|
|
572
|
+
removeRows(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
637
573
|
/**
|
|
638
574
|
* Removes 0 or more rows from the table.
|
|
639
575
|
* @param rows - The rows to remove.
|
|
@@ -648,11 +584,6 @@ export declare namespace TableSchema {
|
|
|
648
584
|
* In this case, no rows are removed.
|
|
649
585
|
*/
|
|
650
586
|
removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
651
|
-
/**
|
|
652
|
-
* Removes all rows from the table.
|
|
653
|
-
* @returns The removed rows.
|
|
654
|
-
*/
|
|
655
|
-
removeAllRows(): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
656
587
|
/**
|
|
657
588
|
* Removes the cell at the specified location in the table.
|
|
658
589
|
* @returns The cell if it exists, otherwise undefined.
|
package/lib/tableSchema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableSchema.d.ts","sourceRoot":"","sources":["../src/tableSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAEzB,KAAK,0CAA0C,EAC/C,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,gCAAgC,EAErC,KAAK,mBAAmB,EACxB,KAAK,QAAQ,EACb,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,EACzC,KAAK,gBAAgB,EACrB,aAAa,EACb,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAGlC,MAAM,wBAAwB,CAAC;AA+DhC;;;;;;;;;GASG;AACH,yBAAiB,kBAAkB,CAAC;IACnC;;;;;;;OAOG;IACH,KAAY,gBAAgB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IAE7E;;;;;OAKG;IACH,UAAiB,wBAAwB,CAAC,cAAc,SAAS,kBAAkB;QAClF;;;WAGG;QACH,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC;KACvC;IAED;;;;;OAKG;IACH,UAAiB,qBAAqB,CAAC,WAAW,SAAS,oBAAoB;QAC9E;;WAEG;QACH,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;KAC3B;IAID;;;;OAIG;IACH,KAAY,uBAAuB,CAClC,cAAc,SAAS,kBAAkB,GAAG,kBAAkB,EAC9D,KAAK,SAAS,oBAAoB,GAAG,oBAAoB,IACtD,wBAAwB,CAAC,cAA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,CAAC;IACF;;;;;;OAMG;IACH,SAAgB,KAAK,CACpB,KAAK,CAAC,MAAM,SAAS,MAAM,GAAG,SAAS,EACvC,KAAK,CAAC,KAAK,SAAS,oBAAoB,EACxC,KAAK,CAAC,IAAI,SAAS,kBAAkB,CAAC,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,EAElE,MAAM,EAAE,kBAAkB,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG;QACvF,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;KACnB,GACC,kBAAkB,CAAC,eAAe,CACpC,MAAM,EACN,KAAK,EACL,kBAAkB,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,EACvF,IAAI,CACJ,CAAC;IACF;;;;;;;OAOG;IACH,SAAgB,KAAK,CACpB,KAAK,CAAC,MAAM,SAAS,MAAM,GAAG,SAAS,EACvC,KAAK,CAAC,KAAK,SAAS,oBAAoB,EACxC,KAAK,CAAC,OAAO,SAAS,kBAAkB,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,EACxE,KAAK,CAAC,IAAI,SAAS,kBAAkB,CAAC,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,EAElE,MAAM,EAAE,kBAAkB,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG;QACvF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;KACnB,GACC,kBAAkB,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;CA4BpE"}
|
package/lib/tableSchema.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { fail } from "@fluidframework/core-utils/internal";
|
|
6
6
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
7
7
|
import { Tree, TreeAlpha } from "./shared-tree/index.js";
|
|
8
8
|
import { TreeArrayNode, SchemaFactory, isArrayNodeSchema, } from "./simple-tree/index.js";
|
|
@@ -60,7 +60,7 @@ export var System_TableSchema;
|
|
|
60
60
|
*/
|
|
61
61
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify
|
|
62
62
|
function createColumnSchema(inputSchemaFactory, cellSchema, propsSchema) {
|
|
63
|
-
const schemaFactory = inputSchemaFactory.
|
|
63
|
+
const schemaFactory = inputSchemaFactory.scopedFactoryAlpha(tableSchemaFactorySubScope);
|
|
64
64
|
// Note: `columnFields` is broken into two parts to work around a TypeScript bug
|
|
65
65
|
// that results in broken `.d.ts` output.
|
|
66
66
|
// See definition of `ColumnInsertableType` below.
|
|
@@ -125,7 +125,7 @@ export var System_TableSchema;
|
|
|
125
125
|
*/
|
|
126
126
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify
|
|
127
127
|
function createRowSchema(inputSchemaFactory, cellSchema, propsSchema) {
|
|
128
|
-
const schemaFactory = inputSchemaFactory.
|
|
128
|
+
const schemaFactory = inputSchemaFactory.scopedFactoryAlpha(tableSchemaFactorySubScope);
|
|
129
129
|
// Note: `rowFields` is broken into two parts to work around a TypeScript bug
|
|
130
130
|
// that results in broken `.d.ts` output.
|
|
131
131
|
// See definition of `RowInsertableType` below.
|
|
@@ -220,7 +220,7 @@ export var System_TableSchema;
|
|
|
220
220
|
*/
|
|
221
221
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify
|
|
222
222
|
function createTableSchema(inputSchemaFactory, _cellSchema, columnSchema, rowSchema) {
|
|
223
|
-
const schemaFactory = inputSchemaFactory.
|
|
223
|
+
const schemaFactory = inputSchemaFactory.scopedFactoryAlpha(tableSchemaFactorySubScope);
|
|
224
224
|
/**
|
|
225
225
|
* {@link Table} fields.
|
|
226
226
|
* @remarks Extracted for re-use in returned type signature defined later in this function.
|
|
@@ -252,23 +252,16 @@ export var System_TableSchema;
|
|
|
252
252
|
}
|
|
253
253
|
getCell(key) {
|
|
254
254
|
const { column: columnOrId, row: rowOrId } = key;
|
|
255
|
-
const row = this.
|
|
255
|
+
const row = this._tryGetRow(rowOrId);
|
|
256
256
|
if (row === undefined) {
|
|
257
257
|
return undefined;
|
|
258
258
|
}
|
|
259
|
-
const column = this.
|
|
259
|
+
const column = this._tryGetColumn(columnOrId);
|
|
260
260
|
if (column === undefined) {
|
|
261
261
|
return undefined;
|
|
262
262
|
}
|
|
263
263
|
return row.getCell(column);
|
|
264
264
|
}
|
|
265
|
-
insertColumn({ column, index, }) {
|
|
266
|
-
const inserted = this.insertColumns({
|
|
267
|
-
columns: [column],
|
|
268
|
-
index,
|
|
269
|
-
});
|
|
270
|
-
return inserted[0] ?? oob();
|
|
271
|
-
}
|
|
272
265
|
insertColumns({ columns, index, }) {
|
|
273
266
|
// Ensure index is valid
|
|
274
267
|
if (index !== undefined) {
|
|
@@ -287,13 +280,6 @@ export var System_TableSchema;
|
|
|
287
280
|
// Inserting the input nodes into the tree hydrates them, making them usable as nodes.
|
|
288
281
|
return columns;
|
|
289
282
|
}
|
|
290
|
-
insertRow({ row, index, }) {
|
|
291
|
-
const inserted = this.insertRows({
|
|
292
|
-
rows: [row],
|
|
293
|
-
index,
|
|
294
|
-
});
|
|
295
|
-
return inserted[0] ?? oob();
|
|
296
|
-
}
|
|
297
283
|
insertRows({ index, rows, }) {
|
|
298
284
|
// #region Input validation
|
|
299
285
|
// Ensure index is valid
|
|
@@ -310,7 +296,7 @@ export var System_TableSchema;
|
|
|
310
296
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
311
297
|
const keys = Object.keys(newRow.cells);
|
|
312
298
|
for (const key of keys) {
|
|
313
|
-
if (!this.
|
|
299
|
+
if (!this._containsColumnWithId(key)) {
|
|
314
300
|
throw new UsageError(`Attempted to insert row a cell under column ID "${key}", but the table does not contain a column with that ID.`);
|
|
315
301
|
}
|
|
316
302
|
}
|
|
@@ -333,113 +319,101 @@ export var System_TableSchema;
|
|
|
333
319
|
setCell({ key, cell, }) {
|
|
334
320
|
const { column: columnOrId, row: rowOrId } = key;
|
|
335
321
|
const row = this._getRow(rowOrId);
|
|
336
|
-
if (row === undefined) {
|
|
337
|
-
const rowId = this._getRowId(rowOrId);
|
|
338
|
-
throw new UsageError(`No row with ID "${rowId}" exists in the table.`);
|
|
339
|
-
}
|
|
340
322
|
const column = this._getColumn(columnOrId);
|
|
341
|
-
if (column === undefined) {
|
|
342
|
-
const columnId = this._getColumnId(columnOrId);
|
|
343
|
-
throw new UsageError(`No column with ID "${columnId}" exists in the table.`);
|
|
344
|
-
}
|
|
345
323
|
row.setCell(column, cell);
|
|
346
324
|
}
|
|
347
|
-
removeColumns(
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
325
|
+
removeColumns(indexOrColumns, count = undefined) {
|
|
326
|
+
if (typeof indexOrColumns === "number" || indexOrColumns === undefined) {
|
|
327
|
+
let removedColumns;
|
|
328
|
+
const startIndex = indexOrColumns ?? 0;
|
|
329
|
+
const _count = count ?? this.columns.length - startIndex;
|
|
330
|
+
// If there are no columns to remove, do nothing
|
|
331
|
+
if (_count === 0) {
|
|
332
|
+
return [];
|
|
333
|
+
}
|
|
334
|
+
Table._assertValidRange({ index: startIndex, count: _count }, this.columns);
|
|
335
|
+
this._applyEditsInBatch(() => {
|
|
336
|
+
const columnsToRemove = this.columns.slice(startIndex, startIndex + _count);
|
|
337
|
+
// First, remove all cells that correspond to each column from each row:
|
|
338
|
+
for (const column of columnsToRemove) {
|
|
339
|
+
this._removeCells(column);
|
|
340
|
+
}
|
|
341
|
+
// Second, remove the column nodes:
|
|
342
|
+
Table._removeRange({
|
|
343
|
+
index: startIndex,
|
|
344
|
+
count: _count,
|
|
345
|
+
}, this.columns);
|
|
346
|
+
removedColumns = columnsToRemove;
|
|
347
|
+
});
|
|
348
|
+
return removedColumns ?? fail(0xc1f /* Transaction did not complete. */);
|
|
356
349
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
// So if we throw an error here for any row, no columns will be removed.
|
|
362
|
-
for (const columnToRemove of columns) {
|
|
363
|
-
const removedRow = this.removeColumn(columnToRemove);
|
|
364
|
-
removedColumns.push(removedRow);
|
|
350
|
+
else {
|
|
351
|
+
// If there are no columns to remove, do nothing
|
|
352
|
+
if (indexOrColumns.length === 0) {
|
|
353
|
+
return [];
|
|
365
354
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
if (index === -1) {
|
|
373
|
-
const columnId = this._getColumnId(columnOrId);
|
|
374
|
-
throw new UsageError(`Specified column with ID "${columnId}" does not exist in the table.`);
|
|
375
|
-
}
|
|
376
|
-
assert(column !== undefined, 0xc10 /* column should not be undefined */);
|
|
377
|
-
Tree.runTransaction(this, () => {
|
|
378
|
-
// Remove the corresponding cell from all rows.
|
|
379
|
-
for (const row of this.rows) {
|
|
380
|
-
// TypeScript is unable to narrow the row type correctly here, hence the cast.
|
|
381
|
-
// See: https://github.com/microsoft/TypeScript/issues/52144
|
|
382
|
-
row.removeCell(column);
|
|
355
|
+
// Resolve any IDs to actual nodes.
|
|
356
|
+
// This validates that all of the rows exist before starting transaction.
|
|
357
|
+
// This improves user-facing error experience.
|
|
358
|
+
const columnsToRemove = [];
|
|
359
|
+
for (const columnOrIdToRemove of indexOrColumns) {
|
|
360
|
+
columnsToRemove.push(this._getColumn(columnOrIdToRemove));
|
|
383
361
|
}
|
|
384
|
-
this.
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
362
|
+
this._applyEditsInBatch(() => {
|
|
363
|
+
// Note, throwing an error within a transaction will abort the entire transaction.
|
|
364
|
+
// So if we throw an error here for any column, no columns will be removed.
|
|
365
|
+
for (const columnToRemove of columnsToRemove) {
|
|
366
|
+
// Remove the corresponding cell from all rows.
|
|
367
|
+
for (const row of this.rows) {
|
|
368
|
+
// TypeScript is unable to narrow the row type correctly here, hence the cast.
|
|
369
|
+
// See: https://github.com/microsoft/TypeScript/issues/52144
|
|
370
|
+
row.removeCell(columnToRemove);
|
|
371
|
+
}
|
|
372
|
+
// We have already validated that all of the columns exist above, so this is safe.
|
|
373
|
+
this.columns.removeAt(this.columns.indexOf(columnToRemove));
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
return columnsToRemove;
|
|
377
|
+
}
|
|
392
378
|
}
|
|
393
|
-
removeRows(
|
|
379
|
+
removeRows(indexOrRows, count) {
|
|
380
|
+
if (typeof indexOrRows === "number" || indexOrRows === undefined) {
|
|
381
|
+
const startIndex = indexOrRows ?? 0;
|
|
382
|
+
const _count = count ?? this.columns.length - startIndex;
|
|
383
|
+
// If there are no rows to remove, do nothing
|
|
384
|
+
if (_count === 0) {
|
|
385
|
+
return [];
|
|
386
|
+
}
|
|
387
|
+
return Table._removeRange({
|
|
388
|
+
index: startIndex,
|
|
389
|
+
count: _count,
|
|
390
|
+
}, this.rows);
|
|
391
|
+
}
|
|
394
392
|
// If there are no rows to remove, do nothing
|
|
395
|
-
if (
|
|
393
|
+
if (indexOrRows.length === 0) {
|
|
396
394
|
return [];
|
|
397
395
|
}
|
|
398
|
-
//
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
396
|
+
// Resolve any IDs to actual nodes.
|
|
397
|
+
// This validates that all of the rows exist before starting transaction.
|
|
398
|
+
// This improves user-facing error experience.
|
|
399
|
+
const rowsToRemove = [];
|
|
400
|
+
for (const rowToRemove of indexOrRows) {
|
|
401
|
+
rowsToRemove.push(this._getRow(rowToRemove));
|
|
402
402
|
}
|
|
403
|
-
|
|
404
|
-
const removedRows = [];
|
|
405
|
-
Tree.runTransaction(this, () => {
|
|
403
|
+
this._applyEditsInBatch(() => {
|
|
406
404
|
// Note, throwing an error within a transaction will abort the entire transaction.
|
|
407
405
|
// So if we throw an error here for any row, no rows will be removed.
|
|
408
|
-
for (const rowToRemove of
|
|
409
|
-
|
|
410
|
-
|
|
406
|
+
for (const rowToRemove of rowsToRemove) {
|
|
407
|
+
// We have already validated that all of the rows exist above, so this is safe.
|
|
408
|
+
this.rows.removeAt(this.rows.indexOf(rowToRemove));
|
|
411
409
|
}
|
|
412
410
|
});
|
|
413
|
-
return
|
|
414
|
-
}
|
|
415
|
-
removeRow(rowOrId) {
|
|
416
|
-
const rowToRemove = this._getRow(rowOrId);
|
|
417
|
-
const index = rowToRemove === undefined ? -1 : this.rows.indexOf(rowToRemove);
|
|
418
|
-
// If the row does not exist in the table, throw an error.
|
|
419
|
-
if (index === -1) {
|
|
420
|
-
const rowId = this._getRowId(rowOrId);
|
|
421
|
-
throw new UsageError(`Specified row with ID "${rowId}" does not exist in the table.`);
|
|
422
|
-
}
|
|
423
|
-
this.rows.removeAt(index);
|
|
424
|
-
return rowToRemove;
|
|
425
|
-
}
|
|
426
|
-
removeAllRows() {
|
|
427
|
-
// TypeScript is unable to narrow the row type correctly here, hence the cast.
|
|
428
|
-
// See: https://github.com/microsoft/TypeScript/issues/52144
|
|
429
|
-
return this.removeRows(this.rows);
|
|
411
|
+
return rowsToRemove;
|
|
430
412
|
}
|
|
431
413
|
removeCell(key) {
|
|
432
414
|
const { column: columnOrId, row: rowOrId } = key;
|
|
433
415
|
const row = this._getRow(rowOrId);
|
|
434
|
-
if (row === undefined) {
|
|
435
|
-
const rowId = this._getRowId(rowOrId);
|
|
436
|
-
throw new UsageError(`Specified row with ID "${rowId}" does not exist in the table.`);
|
|
437
|
-
}
|
|
438
416
|
const column = this._getColumn(columnOrId);
|
|
439
|
-
if (column === undefined) {
|
|
440
|
-
const columnId = this._getColumnId(columnOrId);
|
|
441
|
-
throw new UsageError(`Specified column with ID "${columnId}" does not exist in the table.`);
|
|
442
|
-
}
|
|
443
417
|
const cell = row.getCell(column.id);
|
|
444
418
|
if (cell === undefined) {
|
|
445
419
|
return undefined;
|
|
@@ -447,28 +421,137 @@ export var System_TableSchema;
|
|
|
447
421
|
row.removeCell(column.id);
|
|
448
422
|
return cell;
|
|
449
423
|
}
|
|
424
|
+
/**
|
|
425
|
+
* Removes the cell corresponding with the specified column from each row in the table.
|
|
426
|
+
*/
|
|
427
|
+
_removeCells(column) {
|
|
428
|
+
for (const row of this.rows) {
|
|
429
|
+
// TypeScript is unable to narrow the row type correctly here, hence the cast.
|
|
430
|
+
// See: https://github.com/microsoft/TypeScript/issues/52144
|
|
431
|
+
row.removeCell(column);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
static _assertValidRange(range, array) {
|
|
435
|
+
const { index, count } = range;
|
|
436
|
+
if (index < 0 || index >= array.length) {
|
|
437
|
+
throw new UsageError(`Start index out of bounds. Expected index to be on [0, ${array.length - 1}], but got ${index}.`);
|
|
438
|
+
}
|
|
439
|
+
if (count < 0) {
|
|
440
|
+
throw new UsageError(`Expected non-negative count. Got ${count}.`);
|
|
441
|
+
}
|
|
442
|
+
const end = index + count; // exclusive
|
|
443
|
+
if (end > array.length) {
|
|
444
|
+
throw new UsageError(`End index out of bounds. Expected end to be on [${index}, ${array.length}], but got ${end}.`);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Applies the provided edits in a "batch".
|
|
449
|
+
*
|
|
450
|
+
* @remarks
|
|
451
|
+
* For hydrated trees, this will be done in a transaction to ensure atomicity.
|
|
452
|
+
*
|
|
453
|
+
* Transactions are not supported for unhydrated trees, so we cannot run a transaction in that case.
|
|
454
|
+
* But since there are no collaborators, this is not an issue.
|
|
455
|
+
*/
|
|
456
|
+
_applyEditsInBatch(applyEdits) {
|
|
457
|
+
const branch = TreeAlpha.branch(this);
|
|
458
|
+
if (branch === undefined) {
|
|
459
|
+
// If this node does not have a corresponding branch, then it is unhydrated.
|
|
460
|
+
// I.e., it is not part of a collaborative session yet.
|
|
461
|
+
// Therefore, we don't need to run the edits as a transaction.
|
|
462
|
+
applyEdits();
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
branch.runTransaction(() => {
|
|
466
|
+
applyEdits();
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Attempts to resolve the provided Column node or ID to a Column node in the table.
|
|
472
|
+
* Returns `undefined` if there is no match.
|
|
473
|
+
* @remarks Searches for a match based strictly on the ID and returns that result.
|
|
474
|
+
*/
|
|
475
|
+
_tryGetColumn(columnOrId) {
|
|
476
|
+
const columnId = this._getColumnId(columnOrId);
|
|
477
|
+
return this.getColumn(columnId);
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Attempts to resolve the provided Column node or ID to a Column node in the table.
|
|
481
|
+
* @throws Throws a `UsageError` if there is no match.
|
|
482
|
+
* @remarks Searches for a match based strictly on the ID and returns that result.
|
|
483
|
+
*/
|
|
450
484
|
_getColumn(columnOrId) {
|
|
451
|
-
|
|
485
|
+
const column = this._tryGetColumn(columnOrId);
|
|
486
|
+
if (column === undefined) {
|
|
487
|
+
this._throwMissingColumnError(this._getColumnId(columnOrId));
|
|
488
|
+
}
|
|
489
|
+
return column;
|
|
452
490
|
}
|
|
491
|
+
/**
|
|
492
|
+
* Resolves a Column node or ID to its ID.
|
|
493
|
+
* If an ID is provided, it is returned as-is.
|
|
494
|
+
* If a node is provided, its ID is returned.
|
|
495
|
+
*/
|
|
453
496
|
_getColumnId(columnOrId) {
|
|
454
497
|
return typeof columnOrId === "string" ? columnOrId : columnOrId.id;
|
|
455
498
|
}
|
|
499
|
+
/**
|
|
500
|
+
* Checks if a Column with the specified ID exists in the table.
|
|
501
|
+
*/
|
|
502
|
+
_containsColumnWithId(columnId) {
|
|
503
|
+
return this._tryGetColumn(columnId) !== undefined;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Throw a `UsageError` for a missing Column by its ID.
|
|
507
|
+
*/
|
|
508
|
+
_throwMissingColumnError(columnId) {
|
|
509
|
+
throw new UsageError(`No column with ID "${columnId}" exists in the table.`);
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Attempts to resolve the provided Row node or ID to a Row node in the table.
|
|
513
|
+
* Returns `undefined` if there is no match.
|
|
514
|
+
* @remarks Searches for a match based strictly on the ID and returns that result.
|
|
515
|
+
*/
|
|
516
|
+
_tryGetRow(rowOrId) {
|
|
517
|
+
const rowId = this._getRowId(rowOrId);
|
|
518
|
+
return this.getRow(rowId);
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Attempts to resolve the provided Row node or ID to a Row node in the table.
|
|
522
|
+
* @throws Throws a `UsageError` if there is no match.
|
|
523
|
+
* @remarks Searches for a match based strictly on the ID and returns that result.
|
|
524
|
+
*/
|
|
456
525
|
_getRow(rowOrId) {
|
|
457
|
-
|
|
526
|
+
const row = this._tryGetRow(rowOrId);
|
|
527
|
+
if (row === undefined) {
|
|
528
|
+
this._throwMissingRowError(this._getRowId(rowOrId));
|
|
529
|
+
}
|
|
530
|
+
return row;
|
|
458
531
|
}
|
|
532
|
+
/**
|
|
533
|
+
* Resolves a Row node or ID to its ID.
|
|
534
|
+
* If an ID is provided, it is returned as-is.
|
|
535
|
+
* If a node is provided, its ID is returned.
|
|
536
|
+
*/
|
|
459
537
|
_getRowId(rowOrId) {
|
|
460
538
|
return typeof rowOrId === "string" ? rowOrId : rowOrId.id;
|
|
461
539
|
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
540
|
+
/**
|
|
541
|
+
* Throw a `UsageError` for a missing Row by its ID.
|
|
542
|
+
*/
|
|
543
|
+
_throwMissingRowError(rowId) {
|
|
544
|
+
throw new UsageError(`No row with ID "${rowId}" exists in the table.`);
|
|
466
545
|
}
|
|
467
|
-
|
|
468
|
-
|
|
546
|
+
static _removeRange(range, array) {
|
|
547
|
+
Table._assertValidRange(range, array);
|
|
548
|
+
const { index, count } = range;
|
|
549
|
+
const end = index + count; // exclusive
|
|
550
|
+
// TypeScript is unable to narrow the array element type correctly here, hence the cast.
|
|
469
551
|
// See: https://github.com/microsoft/TypeScript/issues/52144
|
|
470
|
-
|
|
471
|
-
|
|
552
|
+
const removedRows = array.slice(index, end);
|
|
553
|
+
array.removeRange(index, end);
|
|
554
|
+
return removedRows;
|
|
472
555
|
}
|
|
473
556
|
/**
|
|
474
557
|
* Ensure that the specified index is a valid location for item insertion in the destination list.
|