@fluidframework/tree 2.52.0 → 2.53.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 +14 -2
- package/CHANGELOG.md +125 -0
- package/api-report/tree.alpha.api.md +48 -41
- package/dist/alpha.d.ts +2 -1
- package/dist/core/tree/visitDelta.d.ts +1 -1
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -0
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js +3 -1
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +2 -4
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +3 -0
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +1 -0
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts +1 -1
- package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +4 -0
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +5 -5
- package/dist/feature-libraries/forest-summary/forestSummarizer.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 +4 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -0
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js +1 -0
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +1 -0
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +49 -20
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +3 -0
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +1 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +4 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/jsonDomainSchema.d.ts +5 -3
- package/dist/jsonDomainSchema.d.ts.map +1 -1
- package/dist/jsonDomainSchema.js.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/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +1 -1
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +0 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts +23 -60
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +59 -151
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +11 -11
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +9 -3
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts +2 -1
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +3 -0
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js +5 -1
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts +4 -4
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js +3 -6
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts +5 -9
- package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/dist/simple-tree/api/discrepancies.js +11 -10
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +3 -2
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +3 -2
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js +3 -4
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +9 -155
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +4 -47
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +157 -16
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +33 -11
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -3
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js +1 -7
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts +158 -0
- package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -0
- package/dist/simple-tree/api/schemaStatics.js +59 -0
- package/dist/simple-tree/api/schemaStatics.js.map +1 -0
- package/dist/simple-tree/api/storedSchema.d.ts +5 -3
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +4 -2
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/treeBeta.js +12 -6
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +46 -30
- package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/core/allowedTypes.js +20 -12
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +5 -3
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +6 -1
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts +25 -0
- package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -0
- package/dist/simple-tree/core/simpleNodeSchemaBase.js +7 -0
- package/dist/simple-tree/core/simpleNodeSchemaBase.js.map +1 -0
- package/dist/simple-tree/core/toStored.d.ts +32 -0
- package/dist/simple-tree/core/toStored.d.ts.map +1 -0
- package/dist/simple-tree/core/toStored.js +37 -0
- package/dist/simple-tree/core/toStored.js.map +1 -0
- package/dist/simple-tree/core/treeNode.d.ts +0 -3
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNode.js +3 -3
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +7 -2
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.d.ts +6 -1
- package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.js +11 -6
- package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/core/walkSchema.d.ts +19 -5
- package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/walkSchema.js +4 -2
- package/dist/simple-tree/core/walkSchema.js.map +1 -1
- package/dist/simple-tree/createContext.d.ts.map +1 -1
- package/dist/simple-tree/createContext.js +1 -1
- package/dist/simple-tree/createContext.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +2 -1
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js +1 -1
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +4 -4
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +9 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +1 -0
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +18 -4
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +9 -2
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +37 -26
- package/dist/simple-tree/node-kinds/object/objectNode.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 +9 -2
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/prepareForInsertion.d.ts +5 -5
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +10 -10
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +6 -21
- 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 +35 -11
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +68 -33
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/tableSchema.d.ts +25 -32
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +10 -24
- package/dist/tableSchema.js.map +1 -1
- package/docs/.attachments/cell-ordering/C-knows-of-ABC.png +0 -0
- package/docs/.attachments/cell-ordering/C-knows-of-C.png +0 -0
- package/docs/.attachments/cell-ordering/XvsA.png +0 -0
- package/docs/.attachments/cell-ordering/compose-a-b.png +0 -0
- package/docs/.attachments/cell-ordering/compose-a-ref-p1-b-ref-p2.png +0 -0
- package/docs/.attachments/cell-ordering/compose-b-no-ref-to-ca.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-ab-over-x.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-b-over-x.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-b2-over-x.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-b2.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-to-abprime.png +0 -0
- package/docs/.attachments/cell-ordering/rebase-to-bprime.png +0 -0
- package/docs/main/cell-ordering.md +638 -0
- package/lib/alpha.d.ts +2 -1
- package/lib/core/tree/visitDelta.d.ts +1 -1
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -0
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js +1 -0
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +2 -4
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +4 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -0
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts +1 -1
- package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +4 -0
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.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/fieldChangeHandler.d.ts +7 -0
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js +1 -0
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +1 -0
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +50 -21
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +3 -0
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +1 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +4 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/types.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/jsonDomainSchema.d.ts +5 -3
- package/lib/jsonDomainSchema.d.ts.map +1 -1
- package/lib/jsonDomainSchema.js.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/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +2 -2
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +0 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts +23 -60
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +60 -150
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +14 -14
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +10 -4
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts +2 -1
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +3 -0
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js +6 -2
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts +4 -4
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js +3 -6
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts +5 -9
- package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/lib/simple-tree/api/discrepancies.js +11 -10
- package/lib/simple-tree/api/discrepancies.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +3 -2
- 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/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js +4 -5
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +9 -155
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +2 -45
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +157 -16
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +23 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -3
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js +0 -5
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts +158 -0
- package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -0
- package/lib/simple-tree/api/schemaStatics.js +56 -0
- package/lib/simple-tree/api/schemaStatics.js.map +1 -0
- package/lib/simple-tree/api/storedSchema.d.ts +5 -3
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +6 -4
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/treeBeta.js +8 -2
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +46 -30
- package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/core/allowedTypes.js +23 -12
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +5 -3
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +3 -2
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts +25 -0
- package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -0
- package/lib/simple-tree/core/simpleNodeSchemaBase.js +6 -0
- package/lib/simple-tree/core/simpleNodeSchemaBase.js.map +1 -0
- package/lib/simple-tree/core/toStored.d.ts +32 -0
- package/lib/simple-tree/core/toStored.d.ts.map +1 -0
- package/lib/simple-tree/core/toStored.js +32 -0
- package/lib/simple-tree/core/toStored.js.map +1 -0
- package/lib/simple-tree/core/treeNode.d.ts +0 -3
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNode.js +3 -3
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +7 -2
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.d.ts +6 -1
- package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.js +9 -5
- package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/core/walkSchema.d.ts +19 -5
- package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/walkSchema.js +4 -2
- package/lib/simple-tree/core/walkSchema.js.map +1 -1
- package/lib/simple-tree/createContext.d.ts.map +1 -1
- package/lib/simple-tree/createContext.js +2 -2
- package/lib/simple-tree/createContext.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +2 -1
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js +1 -1
- package/lib/simple-tree/fieldSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +4 -4
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +2 -2
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +2 -1
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +21 -7
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +12 -5
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +16 -5
- package/lib/simple-tree/node-kinds/object/objectNode.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 +12 -5
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/prepareForInsertion.d.ts +5 -5
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/lib/simple-tree/prepareForInsertion.js +10 -10
- package/lib/simple-tree/prepareForInsertion.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +6 -21
- 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 +35 -11
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +67 -34
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/tableSchema.d.ts +25 -32
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +11 -25
- package/lib/tableSchema.js.map +1 -1
- package/package.json +21 -21
- package/src/core/tree/visitDelta.ts +3 -1
- package/src/feature-libraries/chunked-forest/index.ts +1 -0
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +12 -5
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -0
- package/src/feature-libraries/default-schema/noChangeCodecs.ts +1 -1
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
- package/src/feature-libraries/index.ts +2 -0
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +9 -0
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +1 -0
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +1 -0
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +61 -19
- package/src/feature-libraries/optional-field/optionalField.ts +4 -0
- package/src/feature-libraries/sequence-field/sequenceFieldChangeRebaser.ts +4 -0
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +4 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +4 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +4 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +1 -1
- package/src/feature-libraries/sequence-field/types.ts +1 -1
- package/src/index.ts +2 -1
- package/src/jsonDomainSchema.ts +4 -0
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +6 -2
- package/src/shared-tree/index.ts +0 -2
- package/src/shared-tree/schematizeTree.ts +83 -199
- package/src/shared-tree/schematizingTreeView.ts +26 -12
- package/src/shared-tree/treeAlpha.ts +18 -4
- package/src/shared-tree-core/defaultResubmitMachine.ts +2 -1
- package/src/simple-tree/api/configuration.ts +10 -2
- package/src/simple-tree/api/create.ts +5 -10
- package/src/simple-tree/api/discrepancies.ts +18 -17
- package/src/simple-tree/api/index.ts +2 -3
- package/src/simple-tree/api/schemaCompatibilityTester.ts +5 -9
- package/src/simple-tree/api/schemaFactory.ts +6 -250
- package/src/simple-tree/api/schemaFactoryAlpha.ts +174 -1
- package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -25
- package/src/simple-tree/api/schemaStatics.ts +291 -0
- package/src/simple-tree/api/storedSchema.ts +12 -5
- package/src/simple-tree/api/treeBeta.ts +9 -2
- package/src/simple-tree/core/allowedTypes.ts +71 -42
- package/src/simple-tree/core/index.ts +9 -1
- package/src/simple-tree/core/simpleNodeSchemaBase.ts +30 -0
- package/src/simple-tree/core/toStored.ts +58 -0
- package/src/simple-tree/core/treeNode.ts +3 -3
- package/src/simple-tree/core/treeNodeSchema.ts +8 -2
- package/src/simple-tree/core/treeNodeValid.ts +14 -5
- package/src/simple-tree/core/walkSchema.ts +23 -6
- package/src/simple-tree/createContext.ts +5 -2
- package/src/simple-tree/fieldSchema.ts +4 -2
- package/src/simple-tree/index.ts +15 -6
- package/src/simple-tree/leafNodeSchema.ts +2 -1
- package/src/simple-tree/node-kinds/array/arrayNode.ts +58 -37
- package/src/simple-tree/node-kinds/map/mapNode.ts +26 -2
- package/src/simple-tree/node-kinds/object/objectNode.ts +37 -4
- package/src/simple-tree/node-kinds/record/recordNode.ts +23 -2
- package/src/simple-tree/prepareForInsertion.ts +12 -7
- package/src/simple-tree/simpleSchema.ts +6 -26
- package/src/simple-tree/toStoredSchema.ts +107 -44
- package/src/tableSchema.ts +40 -35
|
@@ -7,7 +7,11 @@ import { assert, Lazy, fail, debugAssert } from "@fluidframework/core-utils/inte
|
|
|
7
7
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
8
8
|
import { isFluidHandle } from "@fluidframework/runtime-utils/internal";
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import {
|
|
11
|
+
ObjectNodeStoredSchema,
|
|
12
|
+
type FieldKey,
|
|
13
|
+
type TreeFieldStoredSchema,
|
|
14
|
+
} from "../../../core/index.js";
|
|
11
15
|
import {
|
|
12
16
|
FieldKinds,
|
|
13
17
|
isTreeValue,
|
|
@@ -86,7 +90,7 @@ import {
|
|
|
86
90
|
type FactoryContentObject,
|
|
87
91
|
type InsertableContent,
|
|
88
92
|
} from "../../unhydratedFlexTreeFromInsertable.js";
|
|
89
|
-
import { convertFieldKind } from "../../toStoredSchema.js";
|
|
93
|
+
import { convertField, convertFieldKind } from "../../toStoredSchema.js";
|
|
90
94
|
|
|
91
95
|
/**
|
|
92
96
|
* Generates the properties for an ObjectNode from its field schema object.
|
|
@@ -288,10 +292,19 @@ function createProxyHandler(
|
|
|
288
292
|
: false;
|
|
289
293
|
}
|
|
290
294
|
|
|
295
|
+
const innerNode = getOrCreateInnerNode(proxy);
|
|
296
|
+
|
|
297
|
+
const innerSchema = innerNode.context.schema.nodeSchema.get(brand(schema.identifier));
|
|
298
|
+
assert(
|
|
299
|
+
innerSchema instanceof ObjectNodeStoredSchema,
|
|
300
|
+
0xc18 /* Expected ObjectNodeStoredSchema */,
|
|
301
|
+
);
|
|
302
|
+
|
|
291
303
|
setField(
|
|
292
|
-
|
|
304
|
+
innerNode.getBoxed(fieldInfo.storedKey),
|
|
293
305
|
fieldInfo.schema,
|
|
294
306
|
value,
|
|
307
|
+
innerSchema.getFieldSchema(fieldInfo.storedKey),
|
|
295
308
|
);
|
|
296
309
|
return true;
|
|
297
310
|
},
|
|
@@ -348,8 +361,14 @@ export function setField(
|
|
|
348
361
|
field: FlexTreeField,
|
|
349
362
|
simpleFieldSchema: FieldSchema,
|
|
350
363
|
value: InsertableContent | undefined,
|
|
364
|
+
destinationSchema: TreeFieldStoredSchema,
|
|
351
365
|
): void {
|
|
352
|
-
const mapTree = prepareForInsertion(
|
|
366
|
+
const mapTree = prepareForInsertion(
|
|
367
|
+
value,
|
|
368
|
+
simpleFieldSchema,
|
|
369
|
+
field.context,
|
|
370
|
+
destinationSchema,
|
|
371
|
+
);
|
|
353
372
|
|
|
354
373
|
switch (field.schema) {
|
|
355
374
|
case FieldKinds.required.identifier: {
|
|
@@ -585,6 +604,20 @@ export function objectSchema<
|
|
|
585
604
|
flexKeyMap.values(),
|
|
586
605
|
({ schema }) => normalizeFieldSchema(schema).annotatedAllowedTypes,
|
|
587
606
|
),
|
|
607
|
+
(storedOptions) => {
|
|
608
|
+
const fields: Map<FieldKey, TreeFieldStoredSchema> = new Map();
|
|
609
|
+
for (const fieldSchema of flexKeyMap.values()) {
|
|
610
|
+
assert(
|
|
611
|
+
fieldSchema.schema instanceof FieldSchemaAlpha,
|
|
612
|
+
0xc19 /* Expected FieldSchemaAlpha */,
|
|
613
|
+
);
|
|
614
|
+
fields.set(
|
|
615
|
+
brand(fieldSchema.storedKey),
|
|
616
|
+
convertField(fieldSchema.schema, storedOptions),
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
return new ObjectNodeStoredSchema(fields, persistedMetadata);
|
|
620
|
+
},
|
|
588
621
|
));
|
|
589
622
|
}
|
|
590
623
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { Lazy } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { assert, Lazy } from "@fluidframework/core-utils/internal";
|
|
7
7
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
8
8
|
|
|
9
9
|
import { type JsonCompatibleReadOnlyObject, brand } from "../../../util/index.js";
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
type FlexContent,
|
|
35
35
|
CompatibilityLevel,
|
|
36
36
|
type TreeNodeSchemaPrivateData,
|
|
37
|
+
convertAllowedTypes,
|
|
37
38
|
} from "../../core/index.js";
|
|
38
39
|
import { getTreeNodeSchemaInitializedData } from "../../createContext.js";
|
|
39
40
|
import { tryGetTreeNodeForField } from "../../getTreeNodeForField.js";
|
|
@@ -51,12 +52,14 @@ import type {
|
|
|
51
52
|
TreeRecordNode,
|
|
52
53
|
} from "./recordNodeTypes.js";
|
|
53
54
|
import {
|
|
55
|
+
FieldKinds,
|
|
54
56
|
isTreeValue,
|
|
55
57
|
type FlexTreeNode,
|
|
56
58
|
type FlexTreeOptionalField,
|
|
57
59
|
} from "../../../feature-libraries/index.js";
|
|
58
60
|
import { prepareForInsertion } from "../../prepareForInsertion.js";
|
|
59
61
|
import { recordLikeDataToFlexContent } from "../common.js";
|
|
62
|
+
import { MapNodeStoredSchema } from "../../../core/index.js";
|
|
60
63
|
|
|
61
64
|
/**
|
|
62
65
|
* Create a proxy which implements the {@link TreeRecordNode} API.
|
|
@@ -122,11 +125,17 @@ function createRecordNodeProxy(
|
|
|
122
125
|
const innerNode = getOrCreateInnerNode(receiver);
|
|
123
126
|
const field = innerNode.getBoxed(brand(key)) as FlexTreeOptionalField;
|
|
124
127
|
const kernel = getKernel(receiver);
|
|
128
|
+
const innerSchema = innerNode.context.schema.nodeSchema.get(brand(schema.identifier));
|
|
129
|
+
assert(
|
|
130
|
+
innerSchema instanceof MapNodeStoredSchema,
|
|
131
|
+
0xc1a /* Expected MapNodeStoredSchema */,
|
|
132
|
+
);
|
|
125
133
|
|
|
126
134
|
const mapTree = prepareForInsertion(
|
|
127
135
|
value,
|
|
128
136
|
createFieldSchema(FieldKind.Optional, kernel.schema.info as ImplicitAllowedTypes),
|
|
129
137
|
innerNode.context,
|
|
138
|
+
innerSchema.mapFields,
|
|
130
139
|
);
|
|
131
140
|
|
|
132
141
|
field.editor.set(mapTree, field.length === 0);
|
|
@@ -390,7 +399,19 @@ export function recordSchema<
|
|
|
390
399
|
}
|
|
391
400
|
|
|
392
401
|
public static get [privateDataSymbol](): TreeNodeSchemaPrivateData {
|
|
393
|
-
return (privateData ??= createTreeNodeSchemaPrivateData(
|
|
402
|
+
return (privateData ??= createTreeNodeSchemaPrivateData(
|
|
403
|
+
this,
|
|
404
|
+
[info],
|
|
405
|
+
(storedOptions) =>
|
|
406
|
+
new MapNodeStoredSchema(
|
|
407
|
+
{
|
|
408
|
+
kind: FieldKinds.optional.identifier,
|
|
409
|
+
types: convertAllowedTypes(info, storedOptions),
|
|
410
|
+
persistedMetadata,
|
|
411
|
+
},
|
|
412
|
+
persistedMetadata,
|
|
413
|
+
),
|
|
414
|
+
));
|
|
394
415
|
}
|
|
395
416
|
}
|
|
396
417
|
|
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
FieldKey,
|
|
12
12
|
DetachedField,
|
|
13
13
|
TreeFieldStoredSchema,
|
|
14
|
+
TreeTypeSet,
|
|
14
15
|
} from "../core/index.js";
|
|
15
16
|
import {
|
|
16
17
|
type FlexTreeContext,
|
|
@@ -21,7 +22,7 @@ import {
|
|
|
21
22
|
type FlexibleNodeContent,
|
|
22
23
|
throwOutOfSchema,
|
|
23
24
|
} from "../feature-libraries/index.js";
|
|
24
|
-
import {
|
|
25
|
+
import type { ImplicitAnnotatedFieldSchema } from "./fieldSchema.js";
|
|
25
26
|
import {
|
|
26
27
|
type InsertableContent,
|
|
27
28
|
unhydratedFlexTreeFromInsertable,
|
|
@@ -36,7 +37,6 @@ import {
|
|
|
36
37
|
} from "./core/index.js";
|
|
37
38
|
import { debugAssert, oob } from "@fluidframework/core-utils/internal";
|
|
38
39
|
import { isFieldInSchema } from "../feature-libraries/index.js";
|
|
39
|
-
import { convertField } from "./toStoredSchema.js";
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* For now, schema validation for inserted content is always enabled.
|
|
@@ -58,12 +58,14 @@ export function prepareForInsertion<TIn extends InsertableContent | undefined>(
|
|
|
58
58
|
data: TIn,
|
|
59
59
|
schema: ImplicitAnnotatedFieldSchema,
|
|
60
60
|
destinationContext: FlexTreeContext,
|
|
61
|
+
destinationSchema: TreeFieldStoredSchema,
|
|
61
62
|
): TIn extends undefined ? undefined : FlexibleNodeContent {
|
|
62
63
|
return prepareForInsertionContextless(
|
|
63
64
|
data,
|
|
64
65
|
schema,
|
|
65
66
|
getSchemaAndPolicy(destinationContext),
|
|
66
67
|
destinationContext.isHydrated() ? destinationContext : undefined,
|
|
68
|
+
destinationSchema,
|
|
67
69
|
);
|
|
68
70
|
}
|
|
69
71
|
|
|
@@ -84,19 +86,18 @@ export function prepareArrayContentForInsertion(
|
|
|
84
86
|
data: readonly InsertableContent[],
|
|
85
87
|
schema: ImplicitAnnotatedAllowedTypes,
|
|
86
88
|
destinationContext: FlexTreeContext,
|
|
89
|
+
destinationSchema: TreeTypeSet,
|
|
87
90
|
): FlexibleFieldContent {
|
|
88
91
|
const mapTrees: UnhydratedFlexTreeNode[] = data.map((item) =>
|
|
89
92
|
unhydratedFlexTreeFromInsertable(item, schema),
|
|
90
93
|
);
|
|
91
94
|
|
|
92
|
-
const fieldSchema = convertField(normalizeFieldSchema(schema));
|
|
93
|
-
|
|
94
95
|
validateAndPrepare(
|
|
95
96
|
getSchemaAndPolicy(destinationContext),
|
|
96
97
|
destinationContext.isHydrated() ? destinationContext : undefined,
|
|
97
98
|
{
|
|
98
99
|
kind: FieldKinds.sequence.identifier,
|
|
99
|
-
types:
|
|
100
|
+
types: destinationSchema,
|
|
100
101
|
persistedMetadata: undefined,
|
|
101
102
|
},
|
|
102
103
|
mapTrees,
|
|
@@ -119,12 +120,12 @@ export function prepareForInsertionContextless<TIn extends InsertableContent | u
|
|
|
119
120
|
schema: ImplicitAnnotatedFieldSchema,
|
|
120
121
|
schemaAndPolicy: SchemaAndPolicy,
|
|
121
122
|
hydratedData: FlexTreeHydratedContextMinimal | undefined,
|
|
123
|
+
destinationSchema: TreeFieldStoredSchema,
|
|
122
124
|
): TIn extends undefined ? undefined : FlexibleNodeContent {
|
|
123
125
|
const mapTree = unhydratedFlexTreeFromInsertable(data, schema);
|
|
124
126
|
|
|
125
127
|
const contentArray = mapTree === undefined ? [] : [mapTree];
|
|
126
|
-
|
|
127
|
-
validateAndPrepare(schemaAndPolicy, hydratedData, fieldSchema, contentArray);
|
|
128
|
+
validateAndPrepare(schemaAndPolicy, hydratedData, destinationSchema, contentArray);
|
|
128
129
|
|
|
129
130
|
return mapTree;
|
|
130
131
|
}
|
|
@@ -146,6 +147,10 @@ function validateAndPrepare(
|
|
|
146
147
|
// This ensures that when `isFieldInSchema` requests identifiers (or any other contextual defaults),
|
|
147
148
|
// they were already creating used the more specific context we have access to from `hydratedData`.
|
|
148
149
|
prepareContentForHydration(mapTrees, hydratedData.checkout.forest, hydratedData);
|
|
150
|
+
// TODO: AB#45723
|
|
151
|
+
// Now that staged schema rely on this validation, its a bit odd we don't do it for insertion into unhydrated contexts.
|
|
152
|
+
// We can't simply enable it for them however due to contextual default fields which would not have been created yet (see comment above).
|
|
153
|
+
// Specifically at least clone can result in unhydrated trees which can end up violating their stored schema (but not view schema) just using the type safe APIs.
|
|
149
154
|
if (validateSchema === true) {
|
|
150
155
|
isFieldInSchema(mapTrees, fieldSchema, schemaAndPolicy, throwOutOfSchema);
|
|
151
156
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type { ValueSchema } from "../core/index.js";
|
|
7
7
|
import type { JsonCompatibleReadOnlyObject } from "../util/index.js";
|
|
8
|
-
import type { NodeKind,
|
|
8
|
+
import type { NodeKind, SimpleNodeSchemaBase } from "./core/index.js";
|
|
9
9
|
import type { FieldKind, FieldSchemaMetadata } from "./fieldSchema.js";
|
|
10
10
|
|
|
11
11
|
/*
|
|
@@ -13,30 +13,6 @@ import type { FieldKind, FieldSchemaMetadata } from "./fieldSchema.js";
|
|
|
13
13
|
* - Customize their JSON serialization to use these formats or provide some other serialization scheme.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
/**
|
|
17
|
-
* Base interface for {@link TreeNodeSchema} and {@link SimpleNodeSchema} types.
|
|
18
|
-
* Once simple schema is stable this doesn't have a reason to be kept `@system`, but it could be.
|
|
19
|
-
* @system
|
|
20
|
-
* @public
|
|
21
|
-
* @sealed
|
|
22
|
-
*/
|
|
23
|
-
export interface SimpleNodeSchemaBase<
|
|
24
|
-
out TNodeKind extends NodeKind,
|
|
25
|
-
out TCustomMetadata = unknown,
|
|
26
|
-
> {
|
|
27
|
-
/**
|
|
28
|
-
* The {@link NodeKind}.
|
|
29
|
-
*
|
|
30
|
-
* @remarks can be used to type-switch between implementations.
|
|
31
|
-
*/
|
|
32
|
-
readonly kind: TNodeKind;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* User-provided {@link NodeSchemaMetadata} for this schema.
|
|
36
|
-
*/
|
|
37
|
-
readonly metadata: NodeSchemaMetadata<TCustomMetadata>;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
16
|
/**
|
|
41
17
|
* A {@link SimpleNodeSchema} containing fields for alpha features.
|
|
42
18
|
*
|
|
@@ -230,7 +206,11 @@ export interface SimpleTreeSchema {
|
|
|
230
206
|
/**
|
|
231
207
|
* The complete set of node schema definitions recursively referenced by the tree's {@link SimpleTreeSchema.root}.
|
|
232
208
|
*
|
|
233
|
-
* @remarks
|
|
209
|
+
* @remarks
|
|
210
|
+
* The keys are the schemas' {@link TreeNodeSchemaCore.identifier | identifiers}.
|
|
211
|
+
*
|
|
212
|
+
* Information about if a schema is {@link SchemaStaticsAlpha.staged | staged} or not is not available as the "Simple Schema" layer of abstraction: they are included unconditionally.
|
|
213
|
+
* Options for filtering out staged schemas from view schema are available in {@link extractPersistedSchema}.
|
|
234
214
|
*/
|
|
235
215
|
readonly definitions: ReadonlyMap<string, SimpleNodeSchema>;
|
|
236
216
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { unreachableCase, fail } from "@fluidframework/core-utils/internal";
|
|
7
7
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
8
8
|
|
|
9
9
|
import {
|
|
@@ -20,27 +20,81 @@ import {
|
|
|
20
20
|
type TreeTypeSet,
|
|
21
21
|
} from "../core/index.js";
|
|
22
22
|
import { FieldKinds, type FlexFieldKind } from "../feature-libraries/index.js";
|
|
23
|
-
import { brand, getOrCreate } from "../util/index.js";
|
|
23
|
+
import { brand, getOrCreate, type JsonCompatibleReadOnlyObject } from "../util/index.js";
|
|
24
24
|
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
import {
|
|
26
|
+
allowedTypeFilter,
|
|
27
|
+
convertAllowedTypes,
|
|
28
|
+
getTreeNodeSchemaPrivateData,
|
|
29
|
+
isClassBasedSchema,
|
|
30
|
+
NodeKind,
|
|
31
|
+
type SimpleNodeSchemaBase,
|
|
32
|
+
type StoredSchemaGenerationOptions,
|
|
33
|
+
} from "./core/index.js";
|
|
34
|
+
import {
|
|
35
|
+
FieldKind,
|
|
36
|
+
FieldSchemaAlpha,
|
|
37
|
+
normalizeFieldSchema,
|
|
38
|
+
type ImplicitAnnotatedFieldSchema,
|
|
39
|
+
type ImplicitFieldSchema,
|
|
40
|
+
} from "./fieldSchema.js";
|
|
41
|
+
import type { SimpleFieldSchema, SimpleNodeSchema } from "./simpleSchema.js";
|
|
33
42
|
import { walkFieldSchema } from "./walkFieldSchema.js";
|
|
34
43
|
|
|
35
|
-
const viewToStoredCache = new WeakMap<
|
|
44
|
+
const viewToStoredCache = new WeakMap<
|
|
45
|
+
StoredSchemaGenerationOptions,
|
|
46
|
+
WeakMap<ImplicitFieldSchema, TreeStoredSchema>
|
|
47
|
+
>();
|
|
48
|
+
|
|
49
|
+
export const restrictiveStoredSchemaGenerationOptions: StoredSchemaGenerationOptions = {
|
|
50
|
+
includeStaged: () => false,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const permissiveStoredSchemaGenerationOptions: StoredSchemaGenerationOptions = {
|
|
54
|
+
includeStaged: () => true,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Converts a {@link ImplicitAnnotatedFieldSchema} into a {@link TreeStoredSchema} for use in schema upgrades.
|
|
59
|
+
*
|
|
60
|
+
* TODO: once upgrades are more flexible, this should take in more options, including the old schema and specific upgrades to enable.
|
|
61
|
+
*/
|
|
62
|
+
export function toUpgradeSchema(root: ImplicitAnnotatedFieldSchema): TreeStoredSchema {
|
|
63
|
+
return toStoredSchema(root, restrictiveStoredSchemaGenerationOptions);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Converts a {@link ImplicitAnnotatedFieldSchema} into a {@link TreeStoredSchema} for use as initial document schema.
|
|
68
|
+
*/
|
|
69
|
+
export function toInitialSchema(root: ImplicitAnnotatedFieldSchema): TreeStoredSchema {
|
|
70
|
+
return toStoredSchema(root, restrictiveStoredSchemaGenerationOptions);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Converts a {@link ImplicitAnnotatedFieldSchema} into a {@link TreeStoredSchema} to used for unhydrated nodes.
|
|
75
|
+
* @remarks
|
|
76
|
+
* This allows as much as possible, relying on further validation when inserting the content.
|
|
77
|
+
*
|
|
78
|
+
* TODO: this should get additional options to enable support for unknown optional fields.
|
|
79
|
+
*/
|
|
80
|
+
export const toUnhydratedSchema = permissiveStoredSchemaGenerationOptions;
|
|
36
81
|
|
|
37
82
|
/**
|
|
38
|
-
* Converts a {@link
|
|
83
|
+
* Converts a {@link ImplicitAnnotatedFieldSchema} into a {@link TreeStoredSchema}.
|
|
84
|
+
*
|
|
85
|
+
* @privateRemarks
|
|
86
|
+
* TODO:#38722 When runtime schema upgrades are implemented, this will need to be updated to check if
|
|
87
|
+
* a staged allowed type has been upgraded and if so, include it in the conversion.
|
|
88
|
+
*
|
|
39
89
|
* @throws
|
|
40
90
|
* Throws a `UsageError` if multiple schemas are encountered with the same identifier.
|
|
41
91
|
*/
|
|
42
|
-
export function toStoredSchema(
|
|
43
|
-
|
|
92
|
+
export function toStoredSchema(
|
|
93
|
+
root: ImplicitAnnotatedFieldSchema,
|
|
94
|
+
options: StoredSchemaGenerationOptions,
|
|
95
|
+
): TreeStoredSchema {
|
|
96
|
+
const cache = getOrCreate(viewToStoredCache, options, () => new WeakMap());
|
|
97
|
+
return getOrCreate(cache, root, () => {
|
|
44
98
|
const normalized = normalizeFieldSchema(root);
|
|
45
99
|
const nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();
|
|
46
100
|
walkFieldSchema(normalized, {
|
|
@@ -55,42 +109,39 @@ export function toStoredSchema(root: ImplicitFieldSchema): TreeStoredSchema {
|
|
|
55
109
|
}
|
|
56
110
|
nodeSchema.set(
|
|
57
111
|
brand(schema.identifier),
|
|
58
|
-
getStoredSchema(
|
|
112
|
+
getStoredSchema(
|
|
113
|
+
schema as SimpleNodeSchemaBase<NodeKind> as SimpleNodeSchema,
|
|
114
|
+
options,
|
|
115
|
+
),
|
|
59
116
|
);
|
|
60
117
|
},
|
|
118
|
+
allowedTypeFilter: (allowedType) => allowedTypeFilter(allowedType, options),
|
|
61
119
|
});
|
|
62
120
|
|
|
63
121
|
const result: TreeStoredSchema = {
|
|
64
122
|
nodeSchema,
|
|
65
|
-
rootFieldSchema: convertField(normalized),
|
|
123
|
+
rootFieldSchema: convertField(normalized, options),
|
|
66
124
|
};
|
|
67
125
|
return result;
|
|
68
126
|
});
|
|
69
127
|
}
|
|
70
128
|
|
|
71
|
-
/**
|
|
72
|
-
* Converts a {@link SimpleTreeSchema} into a {@link TreeStoredSchema}.
|
|
73
|
-
*/
|
|
74
|
-
export function simpleToStoredSchema(root: SimpleTreeSchema): TreeStoredSchema {
|
|
75
|
-
const nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();
|
|
76
|
-
for (const [identifier, schema] of root.definitions) {
|
|
77
|
-
nodeSchema.set(brand(identifier), getStoredSchema(schema));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const result: TreeStoredSchema = {
|
|
81
|
-
nodeSchema,
|
|
82
|
-
rootFieldSchema: convertField(root.root),
|
|
83
|
-
};
|
|
84
|
-
return result;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
129
|
/**
|
|
88
130
|
* Normalizes an {@link ImplicitFieldSchema} into a {@link TreeFieldSchema}.
|
|
89
131
|
*/
|
|
90
|
-
export function convertField(
|
|
132
|
+
export function convertField(
|
|
133
|
+
schema: SimpleFieldSchema | FieldSchemaAlpha,
|
|
134
|
+
options: StoredSchemaGenerationOptions,
|
|
135
|
+
): TreeFieldStoredSchema {
|
|
91
136
|
const kind: FieldKindIdentifier =
|
|
92
137
|
convertFieldKind.get(schema.kind)?.identifier ?? fail(0xae3 /* Invalid field kind */);
|
|
93
|
-
|
|
138
|
+
let types: TreeTypeSet;
|
|
139
|
+
// eslint-disable-next-line unicorn/prefer-ternary
|
|
140
|
+
if (schema instanceof FieldSchemaAlpha) {
|
|
141
|
+
types = convertAllowedTypes(schema.annotatedAllowedTypesNormalized, options);
|
|
142
|
+
} else {
|
|
143
|
+
types = schema.allowedTypesIdentifiers as TreeTypeSet;
|
|
144
|
+
}
|
|
94
145
|
return { kind, types, persistedMetadata: schema.persistedMetadata };
|
|
95
146
|
}
|
|
96
147
|
|
|
@@ -114,11 +165,16 @@ export const convertFieldKind: ReadonlyMap<FieldKind, FlexFieldKind> = new Map<
|
|
|
114
165
|
* TODO: AB#43548: Using a stored schema for unhydrated flex trees does not handle schema evolution features like "allowUnknownOptionalFields".
|
|
115
166
|
* Usage of this and the conversion which wrap it should be audited and reduced.
|
|
116
167
|
*/
|
|
117
|
-
export function getStoredSchema(
|
|
168
|
+
export function getStoredSchema(
|
|
169
|
+
schema: SimpleNodeSchema,
|
|
170
|
+
options: StoredSchemaGenerationOptions,
|
|
171
|
+
): TreeNodeStoredSchema {
|
|
172
|
+
if (isClassBasedSchema(schema)) {
|
|
173
|
+
return getTreeNodeSchemaPrivateData(schema).toStored(options);
|
|
174
|
+
}
|
|
118
175
|
const kind = schema.kind;
|
|
119
176
|
switch (kind) {
|
|
120
177
|
case NodeKind.Leaf: {
|
|
121
|
-
assert(schema.kind === NodeKind.Leaf, 0xa4a /* invalid kind */);
|
|
122
178
|
return new LeafNodeStoredSchema(schema.leafKind);
|
|
123
179
|
}
|
|
124
180
|
case NodeKind.Map:
|
|
@@ -136,18 +192,12 @@ export function getStoredSchema(schema: SimpleNodeSchema): TreeNodeStoredSchema
|
|
|
136
192
|
}
|
|
137
193
|
case NodeKind.Array: {
|
|
138
194
|
const types = schema.allowedTypesIdentifiers as TreeTypeSet;
|
|
139
|
-
|
|
140
|
-
kind: FieldKinds.sequence.identifier,
|
|
141
|
-
types,
|
|
142
|
-
persistedMetadata: schema.persistedMetadata,
|
|
143
|
-
};
|
|
144
|
-
const fields = new Map([[EmptyKey, field]]);
|
|
145
|
-
return new ObjectNodeStoredSchema(fields, schema.persistedMetadata);
|
|
195
|
+
return arrayNodeStoredSchema(types, schema.persistedMetadata);
|
|
146
196
|
}
|
|
147
197
|
case NodeKind.Object: {
|
|
148
198
|
const fields: Map<FieldKey, TreeFieldStoredSchema> = new Map();
|
|
149
199
|
for (const fieldSchema of schema.fields.values()) {
|
|
150
|
-
fields.set(brand(fieldSchema.storedKey), convertField(fieldSchema));
|
|
200
|
+
fields.set(brand(fieldSchema.storedKey), convertField(fieldSchema, options));
|
|
151
201
|
}
|
|
152
202
|
return new ObjectNodeStoredSchema(fields, schema.persistedMetadata);
|
|
153
203
|
}
|
|
@@ -156,3 +206,16 @@ export function getStoredSchema(schema: SimpleNodeSchema): TreeNodeStoredSchema
|
|
|
156
206
|
}
|
|
157
207
|
}
|
|
158
208
|
}
|
|
209
|
+
|
|
210
|
+
export function arrayNodeStoredSchema(
|
|
211
|
+
types: TreeTypeSet,
|
|
212
|
+
persistedMetadata: JsonCompatibleReadOnlyObject | undefined,
|
|
213
|
+
): ObjectNodeStoredSchema {
|
|
214
|
+
const field = {
|
|
215
|
+
kind: FieldKinds.sequence.identifier,
|
|
216
|
+
types,
|
|
217
|
+
persistedMetadata,
|
|
218
|
+
};
|
|
219
|
+
const fields = new Map([[EmptyKey, field]]);
|
|
220
|
+
return new ObjectNodeStoredSchema(fields, persistedMetadata);
|
|
221
|
+
}
|
package/src/tableSchema.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { oob } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { assert, oob } from "@fluidframework/core-utils/internal";
|
|
7
7
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
8
8
|
|
|
9
9
|
import { Tree, TreeAlpha } from "./shared-tree/index.js";
|
|
@@ -780,8 +780,20 @@ export namespace System_TableSchema {
|
|
|
780
780
|
`Specified column with ID "${columnId}" does not exist in the table.`,
|
|
781
781
|
);
|
|
782
782
|
}
|
|
783
|
-
|
|
784
|
-
|
|
783
|
+
assert(column !== undefined, 0xc10 /* column should not be undefined */);
|
|
784
|
+
|
|
785
|
+
Tree.runTransaction(this, () => {
|
|
786
|
+
// Remove the corresponding cell from all rows.
|
|
787
|
+
for (const row of this.rows) {
|
|
788
|
+
// TypeScript is unable to narrow the row type correctly here, hence the cast.
|
|
789
|
+
// See: https://github.com/microsoft/TypeScript/issues/52144
|
|
790
|
+
(row as RowValueType).removeCell(column);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
this.columns.removeAt(index);
|
|
794
|
+
});
|
|
795
|
+
|
|
796
|
+
return column;
|
|
785
797
|
}
|
|
786
798
|
|
|
787
799
|
public removeAllColumns(): ColumnValueType[] {
|
|
@@ -1081,29 +1093,6 @@ export namespace System_TableSchema {
|
|
|
1081
1093
|
* });
|
|
1082
1094
|
* ```
|
|
1083
1095
|
*
|
|
1084
|
-
* @example Removing column and cells in a transaction
|
|
1085
|
-
*
|
|
1086
|
-
* When removing a column, if you wish to ensure that all of its corresponding cells are also removed (and not
|
|
1087
|
-
* orphaned), you can remove the column and all of the relevant cells in a transaction.
|
|
1088
|
-
* Note that there are performance implications to this.
|
|
1089
|
-
*
|
|
1090
|
-
* ```typescript
|
|
1091
|
-
* // Remove column1 and all of its cells.
|
|
1092
|
-
* // The "transaction" method will ensure that all changes are applied atomically.
|
|
1093
|
-
* Tree.runTransaction(table, () => {
|
|
1094
|
-
* // Remove column1.
|
|
1095
|
-
* table.removeColumn(column1);
|
|
1096
|
-
*
|
|
1097
|
-
* // Remove the cell at column1 for each row.
|
|
1098
|
-
* for (const row of table.rows) {
|
|
1099
|
-
* table.removeCell({
|
|
1100
|
-
* column: column1,
|
|
1101
|
-
* row,
|
|
1102
|
-
* });
|
|
1103
|
-
* }
|
|
1104
|
-
* });
|
|
1105
|
-
* ```
|
|
1106
|
-
*
|
|
1107
1096
|
* @privateRemarks
|
|
1108
1097
|
* The above examples are backed by tests in `tableSchema.spec.ts`.
|
|
1109
1098
|
* Those tests and these examples should be kept in-sync to ensure that the examples are correct.
|
|
@@ -1530,14 +1519,16 @@ export namespace TableSchema {
|
|
|
1530
1519
|
|
|
1531
1520
|
/**
|
|
1532
1521
|
* Removes the specified column from the table.
|
|
1533
|
-
*
|
|
1534
1522
|
* @remarks
|
|
1535
|
-
*
|
|
1536
|
-
*
|
|
1523
|
+
* Also removes any corresponding cells from the table's rows.
|
|
1524
|
+
*
|
|
1525
|
+
* Note: this operation can be slow for tables with many rows.
|
|
1526
|
+
* We are actively working on improving the performance of this operation, but for now it may have a negative
|
|
1527
|
+
* impact on performance.
|
|
1537
1528
|
*
|
|
1538
1529
|
* @param column - The {@link TableSchema.Column | column} or {@link TableSchema.Column.id | column ID} to remove.
|
|
1539
1530
|
* @throws Throws an error if the column is not in the table.
|
|
1540
|
-
*
|
|
1531
|
+
* In this case, no columns are removed.
|
|
1541
1532
|
*/
|
|
1542
1533
|
removeColumn(
|
|
1543
1534
|
column: string | TreeNodeFromImplicitAllowedTypes<TColumn>,
|
|
@@ -1545,10 +1536,12 @@ export namespace TableSchema {
|
|
|
1545
1536
|
|
|
1546
1537
|
/**
|
|
1547
1538
|
* Removes 0 or more columns from the table.
|
|
1548
|
-
*
|
|
1549
1539
|
* @remarks
|
|
1550
|
-
*
|
|
1551
|
-
*
|
|
1540
|
+
* Also removes any corresponding cells from the table's rows.
|
|
1541
|
+
*
|
|
1542
|
+
* Note: this operation can be slow for tables with many rows.
|
|
1543
|
+
* We are actively working on improving the performance of this operation, but for now it may have a negative
|
|
1544
|
+
* impact on performance.
|
|
1552
1545
|
*
|
|
1553
1546
|
* @param columns - The columns to remove.
|
|
1554
1547
|
* @throws Throws an error if any of the columns are not in the table.
|
|
@@ -1561,8 +1554,11 @@ export namespace TableSchema {
|
|
|
1561
1554
|
* Removes 0 or more columns from the table.
|
|
1562
1555
|
*
|
|
1563
1556
|
* @remarks
|
|
1564
|
-
*
|
|
1565
|
-
*
|
|
1557
|
+
* Also removes any corresponding cells from the table's rows.
|
|
1558
|
+
*
|
|
1559
|
+
* Note: this operation can be slow for tables with many rows.
|
|
1560
|
+
* We are actively working on improving the performance of this operation, but for now it may have a negative
|
|
1561
|
+
* impact on performance.
|
|
1566
1562
|
*
|
|
1567
1563
|
* @param columns - The columns to remove, specified by their {@link TableSchema.Column.id}.
|
|
1568
1564
|
* @throws Throws an error if any of the columns are not in the table.
|
|
@@ -1572,6 +1568,14 @@ export namespace TableSchema {
|
|
|
1572
1568
|
|
|
1573
1569
|
/**
|
|
1574
1570
|
* Removes all columns from the table.
|
|
1571
|
+
*
|
|
1572
|
+
* @remarks
|
|
1573
|
+
* Also removes any corresponding cells from the table's rows.
|
|
1574
|
+
*
|
|
1575
|
+
* Note: this operation can be slow for tables with many rows.
|
|
1576
|
+
* We are actively working on improving the performance of this operation, but for now it may have a negative
|
|
1577
|
+
* impact on performance.
|
|
1578
|
+
*
|
|
1575
1579
|
* @returns The removed columns.
|
|
1576
1580
|
*/
|
|
1577
1581
|
removeAllColumns(): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
@@ -1580,6 +1584,7 @@ export namespace TableSchema {
|
|
|
1580
1584
|
* Removes the specified row from the table.
|
|
1581
1585
|
* @param row - The {@link TableSchema.Row | row} or {@link TableSchema.Row.id | row ID} to remove.
|
|
1582
1586
|
* @throws Throws an error if the row is not in the table.
|
|
1587
|
+
* In this case, no rows are removed.
|
|
1583
1588
|
*/
|
|
1584
1589
|
removeRow(
|
|
1585
1590
|
row: string | TreeNodeFromImplicitAllowedTypes<TRow>,
|