@dialecte/core 0.0.17 → 0.0.18
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/dist/{src/chain-methods → chain-methods}/chain-assembler.d.ts +4 -3
- package/dist/chain-methods/chain-assembler.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/chain-creator.d.ts +4 -3
- package/dist/chain-methods/chain-creator.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/index.d.ts +1 -0
- package/dist/chain-methods/ending/index.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/context.d.ts +3 -2
- package/dist/chain-methods/ending/queries/context.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/descendants/filter-utils.helper.d.ts +3 -2
- package/dist/chain-methods/ending/queries/descendants/filter-utils.helper.d.ts.map +1 -0
- package/dist/chain-methods/ending/queries/descendants/find-descendants-as-tree.d.ts +9 -0
- package/dist/chain-methods/ending/queries/descendants/find-descendants-as-tree.d.ts.map +1 -0
- package/dist/chain-methods/ending/queries/descendants/find-descendants.d.ts +16 -0
- package/dist/chain-methods/ending/queries/descendants/find-descendants.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/descendants/flatten-tree.helper.d.ts +2 -1
- package/dist/chain-methods/ending/queries/descendants/flatten-tree.helper.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/descendants/group-records.helper.d.ts +2 -1
- package/dist/chain-methods/ending/queries/descendants/group-records.helper.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/descendants/index.d.ts +1 -0
- package/dist/chain-methods/ending/queries/descendants/index.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/descendants/match-conditions.helper.d.ts +3 -2
- package/dist/chain-methods/ending/queries/descendants/match-conditions.helper.d.ts.map +1 -0
- package/dist/chain-methods/ending/queries/descendants/types.d.ts +35 -0
- package/dist/chain-methods/ending/queries/descendants/types.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/descendants/walk-ancestry.helper.d.ts +2 -1
- package/dist/chain-methods/ending/queries/descendants/walk-ancestry.helper.d.ts.map +1 -0
- package/dist/chain-methods/ending/queries/find-children.d.ts +9 -0
- package/dist/chain-methods/ending/queries/find-children.d.ts.map +1 -0
- package/dist/chain-methods/ending/queries/find-children.types.d.ts +6 -0
- package/dist/chain-methods/ending/queries/find-children.types.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/get-attributes-values.d.ts +2 -1
- package/dist/chain-methods/ending/queries/get-attributes-values.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/get-parent.d.ts +2 -1
- package/dist/chain-methods/ending/queries/get-parent.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/get-tree.d.ts +4 -3
- package/dist/chain-methods/ending/queries/get-tree.d.ts.map +1 -0
- package/dist/chain-methods/ending/queries/get-tree.types.d.ts +18 -0
- package/dist/chain-methods/ending/queries/get-tree.types.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/queries/index.d.ts +1 -0
- package/dist/chain-methods/ending/queries/index.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/ending/transaction/commit.d.ts +3 -2
- package/dist/chain-methods/ending/transaction/commit.d.ts.map +1 -0
- package/dist/chain-methods/ending/transaction/index.d.ts +2 -0
- package/dist/chain-methods/ending/transaction/index.d.ts.map +1 -0
- package/dist/chain-methods/ending/transaction/merge-operations.d.ts +33 -0
- package/dist/chain-methods/ending/transaction/merge-operations.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/index.d.ts +1 -0
- package/dist/chain-methods/index.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/mutations/clone.d.ts +3 -2
- package/dist/chain-methods/mutations/clone.d.ts.map +1 -0
- package/dist/chain-methods/mutations/clone.types.d.ts +17 -0
- package/dist/chain-methods/mutations/clone.types.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/mutations/create.d.ts +4 -3
- package/dist/chain-methods/mutations/create.d.ts.map +1 -0
- package/dist/chain-methods/mutations/create.types.d.ts +32 -0
- package/dist/chain-methods/mutations/create.types.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/mutations/delete.d.ts +5 -4
- package/dist/chain-methods/mutations/delete.d.ts.map +1 -0
- package/dist/chain-methods/mutations/delete.types.d.ts +6 -0
- package/dist/chain-methods/mutations/delete.types.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/mutations/index.d.ts +1 -0
- package/dist/chain-methods/mutations/index.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/mutations/update.d.ts +4 -3
- package/dist/chain-methods/mutations/update.d.ts.map +1 -0
- package/dist/chain-methods/mutations/update.types.d.ts +6 -0
- package/dist/chain-methods/mutations/update.types.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/navigation/go-to-element.d.ts +5 -4
- package/dist/chain-methods/navigation/go-to-element.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/navigation/go-to-parent.d.ts +6 -5
- package/dist/chain-methods/navigation/go-to-parent.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/navigation/index.d.ts +1 -0
- package/dist/chain-methods/navigation/index.d.ts.map +1 -0
- package/dist/chain-methods/navigation/types.d.ts +12 -0
- package/dist/chain-methods/navigation/types.d.ts.map +1 -0
- package/dist/{src/chain-methods → chain-methods}/types.d.ts +10 -9
- package/dist/chain-methods/types.d.ts.map +1 -0
- package/dist/{src/database → database}/index.d.ts +1 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/{src/database → database}/instance.d.ts +3 -2
- package/dist/database/instance.d.ts.map +1 -0
- package/dist/database/types.d.ts +8 -0
- package/dist/database/types.d.ts.map +1 -0
- package/dist/{src/dialecte → dialecte}/entrypoints.d.ts +5 -4
- package/dist/dialecte/entrypoints.d.ts.map +1 -0
- package/dist/{src/dialecte → dialecte}/index.d.ts +1 -0
- package/dist/dialecte/index.d.ts.map +1 -0
- package/dist/{src/dialecte → dialecte}/main.d.ts +3 -2
- package/dist/dialecte/main.d.ts.map +1 -0
- package/dist/{src/dialecte → dialecte}/state.d.ts +2 -1
- package/dist/dialecte/state.d.ts.map +1 -0
- package/dist/{src/dialecte → dialecte}/types.d.ts +7 -6
- package/dist/dialecte/types.d.ts.map +1 -0
- package/dist/{src/errors → errors}/codes.d.ts +1 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/{src/errors → errors}/errors.d.ts +3 -2
- package/dist/errors/errors.d.ts.map +1 -0
- package/dist/{src/errors → errors}/index.d.ts +1 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/types.d.ts +23 -0
- package/dist/errors/types.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/assert.d.ts +1 -0
- package/dist/helpers/assert.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/index.d.ts +1 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/record/converter.d.ts +2 -1
- package/dist/helpers/record/converter.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/record/guard.d.ts +2 -1
- package/dist/helpers/record/guard.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/record/index.d.ts +1 -0
- package/dist/helpers/record/index.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/record/operations.d.ts +2 -1
- package/dist/helpers/record/operations.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/record/query/find-by-attributes.d.ts +4 -3
- package/dist/helpers/record/query/find-by-attributes.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/record/query/index.d.ts +1 -0
- package/dist/helpers/record/query/index.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/record/query/record.d.ts +3 -2
- package/dist/helpers/record/query/record.d.ts.map +1 -0
- package/dist/helpers/record/query/types.d.ts +10 -0
- package/dist/helpers/record/query/types.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/record/standardizing.d.ts +2 -1
- package/dist/helpers/record/standardizing.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/test-fixtures/config.d.ts +36 -35
- package/dist/helpers/test-fixtures/config.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/test-fixtures/constant.d.ts +1 -0
- package/dist/helpers/test-fixtures/constant.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/test-fixtures/create-test-dialecte.d.ts +4 -3
- package/dist/helpers/test-fixtures/create-test-dialecte.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/test-fixtures/generated/constants.generated.d.ts +42 -41
- package/dist/helpers/test-fixtures/generated/constants.generated.d.ts.map +1 -0
- package/dist/helpers/test-fixtures/generated/definition.d.ts +3 -0
- package/dist/helpers/test-fixtures/generated/definition.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/test-fixtures/generated/index.d.ts +1 -0
- package/dist/helpers/test-fixtures/generated/index.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/test-fixtures/generated/types.generated.d.ts +38 -37
- package/dist/helpers/test-fixtures/generated/types.generated.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/test-fixtures/index.d.ts +1 -0
- package/dist/helpers/test-fixtures/index.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/test-fixtures/test-operations.d.ts +5 -4
- package/dist/helpers/test-fixtures/test-operations.d.ts.map +1 -0
- package/dist/helpers/test-fixtures/test-operations.types.d.ts +20 -0
- package/dist/helpers/test-fixtures/test-operations.types.d.ts.map +1 -0
- package/dist/{src/helpers → helpers}/test-fixtures/test-record.d.ts +3 -2
- package/dist/helpers/test-fixtures/test-record.d.ts.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/{src/io → io}/export/constant.d.ts +1 -0
- package/dist/io/export/constant.d.ts.map +1 -0
- package/dist/{src/io → io}/export/download-file.d.ts +2 -1
- package/dist/io/export/download-file.d.ts.map +1 -0
- package/dist/{src/io → io}/export/formatter.d.ts +1 -0
- package/dist/io/export/formatter.d.ts.map +1 -0
- package/dist/{src/io → io}/export/index.d.ts +1 -0
- package/dist/io/export/index.d.ts.map +1 -0
- package/dist/{src/io → io}/export/main.d.ts +2 -1
- package/dist/io/export/main.d.ts.map +1 -0
- package/dist/{src/io → io}/import/database-helpers.d.ts +2 -1
- package/dist/io/import/database-helpers.d.ts.map +1 -0
- package/dist/{src/io → io}/import/guards.d.ts +1 -0
- package/dist/io/import/guards.d.ts.map +1 -0
- package/dist/{src/io → io}/import/index.d.ts +1 -0
- package/dist/io/import/index.d.ts.map +1 -0
- package/dist/{src/io → io}/import/main.d.ts +2 -1
- package/dist/io/import/main.d.ts.map +1 -0
- package/dist/{src/io → io}/import/parser.d.ts +3 -2
- package/dist/io/import/parser.d.ts.map +1 -0
- package/dist/{src/io → io}/import/relationships.d.ts +2 -1
- package/dist/io/import/relationships.d.ts.map +1 -0
- package/dist/io/import/test.handler.d.ts +9 -0
- package/dist/io/import/test.handler.d.ts.map +1 -0
- package/dist/io/import/test.types.d.ts +4 -0
- package/dist/io/import/test.types.d.ts.map +1 -0
- package/dist/{src/io → io}/import/types.d.ts +5 -4
- package/dist/io/import/types.d.ts.map +1 -0
- package/dist/{src/io → io}/index.d.ts +1 -0
- package/dist/io/index.d.ts.map +1 -0
- package/dist/script/element-parent-mapping.d.ts +2 -0
- package/dist/script/element-parent-mapping.d.ts.map +1 -0
- package/dist/script/find-unreferenced-elements.d.ts +3 -0
- package/dist/script/find-unreferenced-elements.d.ts.map +1 -0
- package/dist/script/generate-definition.d.ts +3 -0
- package/dist/script/generate-definition.d.ts.map +1 -0
- package/dist/script/generate-definition.types.d.ts +86 -0
- package/dist/script/generate-definition.types.d.ts.map +1 -0
- package/dist/script/generate-test-fixtures.d.ts +16 -0
- package/dist/script/generate-test-fixtures.d.ts.map +1 -0
- package/dist/script/pyodide.d.ts +12 -0
- package/dist/script/pyodide.d.ts.map +1 -0
- package/dist/script/sorted-dexie-dump-json.d.ts +2 -0
- package/dist/script/sorted-dexie-dump-json.d.ts.map +1 -0
- package/dist/script/test-pyodide.d.ts +9 -0
- package/dist/script/test-pyodide.d.ts.map +1 -0
- package/dist/types/context.d.ts +16 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/{src/types → types}/definition.d.ts +7 -6
- package/dist/types/definition.d.ts.map +1 -0
- package/dist/{src/types → types}/dialecte-config.d.ts +32 -31
- package/dist/types/dialecte-config.d.ts.map +1 -0
- package/dist/{src/types → types}/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/{src/types → types}/io.d.ts +4 -3
- package/dist/types/io.d.ts.map +1 -0
- package/dist/{src/types → types}/operations.d.ts +6 -5
- package/dist/types/operations.d.ts.map +1 -0
- package/dist/types/records.d.ts +57 -0
- package/dist/types/records.d.ts.map +1 -0
- package/dist/{src/utils → utils}/attributes.d.ts +2 -1
- package/dist/utils/attributes.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +8 -8
- package/dist/env.d.ts +0 -1
- package/dist/src/chain-methods/ending/queries/descendants/find-descendants-as-tree.d.ts +0 -51
- package/dist/src/chain-methods/ending/queries/descendants/find-descendants.d.ts +0 -59
- package/dist/src/chain-methods/ending/queries/descendants/types.d.ts +0 -34
- package/dist/src/chain-methods/ending/queries/find-children.d.ts +0 -8
- package/dist/src/chain-methods/ending/queries/find-children.types.d.ts +0 -5
- package/dist/src/chain-methods/ending/queries/get-tree.types.d.ts +0 -17
- package/dist/src/chain-methods/ending/transaction/index.d.ts +0 -1
- package/dist/src/chain-methods/ending/transaction/merge-operations.d.ts +0 -20
- package/dist/src/chain-methods/mutations/clone.types.d.ts +0 -16
- package/dist/src/chain-methods/mutations/create.types.d.ts +0 -31
- package/dist/src/chain-methods/mutations/delete.types.d.ts +0 -5
- package/dist/src/chain-methods/mutations/update.types.d.ts +0 -5
- package/dist/src/chain-methods/navigation/types.d.ts +0 -11
- package/dist/src/database/types.d.ts +0 -8
- package/dist/src/errors/types.d.ts +0 -22
- package/dist/src/helpers/record/query/types.d.ts +0 -9
- package/dist/src/helpers/test-fixtures/generated/definition.d.ts +0 -1
- package/dist/src/helpers/test-fixtures/test-operations.types.d.ts +0 -19
- package/dist/src/index.d.ts +0 -7
- package/dist/src/types/context.d.ts +0 -15
- package/dist/src/types/records.d.ts +0 -56
- package/dist/src/utils/index.d.ts +0 -1
- package/dist/vitest.shims.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Chain } from './types';
|
|
2
|
+
import { DatabaseInstance } from '../database';
|
|
3
|
+
import { Context, AnyDialecteConfig, ElementsOf, ExtensionRegistry } from '../types';
|
|
4
4
|
export declare function chain<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig>>(params: {
|
|
5
5
|
dialecteConfig: GenericConfig;
|
|
6
6
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
@@ -8,3 +8,4 @@ export declare function chain<GenericConfig extends AnyDialecteConfig, GenericEl
|
|
|
8
8
|
extensions: GenericExtensionRegistry;
|
|
9
9
|
focusedTagName: GenericElement;
|
|
10
10
|
}): Chain<GenericConfig, GenericElement, GenericExtensionRegistry>;
|
|
11
|
+
//# sourceMappingURL=chain-assembler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain-assembler.d.ts","sourceRoot":"","sources":["../../src/chain-methods/chain-assembler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAExF,wBAAgB,KAAK,CACpB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,EAChE,MAAM,EAAE;IACT,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACjD,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,UAAU,EAAE,wBAAwB,CAAA;IACpC,cAAc,EAAE,cAAc,CAAA;CAC9B,GAAG,KAAK,CAAC,aAAa,EAAE,cAAc,EAAE,wBAAwB,CAAC,CA8CjE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { CoreChain, ChainFactory, ExtensionChain } from './types';
|
|
2
|
+
import { DatabaseInstance } from '../database';
|
|
3
|
+
import { Context, AnyDialecteConfig, ElementsOf, ExtensionRegistry } from '../types';
|
|
4
4
|
export declare function createCoreChain<GenericConfig extends AnyDialecteConfig, GenericFocusedElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = ExtensionRegistry<GenericConfig>>(params: {
|
|
5
5
|
chain: ChainFactory<GenericConfig, GenericExtensionRegistry>;
|
|
6
6
|
contextPromise: Promise<Context<GenericConfig, GenericFocusedElement>>;
|
|
@@ -15,3 +15,4 @@ export declare function createExtensionChain<GenericConfig extends AnyDialecteCo
|
|
|
15
15
|
dialecteConfig: GenericConfig;
|
|
16
16
|
contextPromise: Promise<Context<GenericConfig, GenericFocusedElement>>;
|
|
17
17
|
}): ExtensionChain<GenericConfig, GenericFocusedElement, GenericExtensionRegistry>;
|
|
18
|
+
//# sourceMappingURL=chain-creator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain-creator.d.ts","sourceRoot":"","sources":["../../src/chain-methods/chain-creator.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAExF,wBAAgB,eAAe,CAC9B,aAAa,SAAS,iBAAiB,EACvC,qBAAqB,SAAS,UAAU,CAAC,aAAa,CAAC,EACvD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC,CAAA;IACtE,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACjD,cAAc,EAAE,qBAAqB,CAAA;CACrC,GAAG,SAAS,CAAC,aAAa,EAAE,qBAAqB,EAAE,wBAAwB,CAAC,CAsG5E;AAED,wBAAgB,oBAAoB,CACnC,aAAa,SAAS,iBAAiB,EACvC,qBAAqB,SAAS,UAAU,CAAC,aAAa,CAAC,EACvD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,EAChE,MAAM,EAAE;IACT,cAAc,EAAE,qBAAqB,CAAA;IACrC,UAAU,EAAE,wBAAwB,CAAA;IACpC,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,aAAa,CAAA;IAC7B,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC,CAAA;CACtE,GAAG,cAAc,CAAC,aAAa,EAAE,qBAAqB,EAAE,wBAAwB,CAAC,CAsBjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/ending/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { AnyDialecteConfig, ElementsOf } from '../../../types';
|
|
2
|
+
import { Context } from '../../../types/context';
|
|
3
3
|
/**
|
|
4
4
|
* Get the internal chain context
|
|
5
5
|
*
|
|
@@ -9,3 +9,4 @@ import type { Context } from '../../../types/context';
|
|
|
9
9
|
export declare function createGetContextMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
10
10
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
11
11
|
}): () => Promise<Context<GenericConfig, GenericElement>>;
|
|
12
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACrC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IAAE,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;CAAE,SAElD,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAIzE"}
|
package/dist/{src/chain-methods → chain-methods}/ending/queries/descendants/filter-utils.helper.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { DescendantsFilter, FilterCondition } from './types';
|
|
2
|
+
import { AnyDialecteConfig, ElementsOf } from '../../../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Flatten nested filter to flat array of conditions
|
|
5
5
|
* Each condition represents a level in the descendant chain
|
|
@@ -10,3 +10,4 @@ export declare function flattenFilterToConditions<GenericConfig extends AnyDiale
|
|
|
10
10
|
* Extract all tag names from nested filter
|
|
11
11
|
*/
|
|
12
12
|
export declare function extractTags<GenericConfig extends AnyDialecteConfig>(filter: DescendantsFilter<GenericConfig>): ElementsOf<GenericConfig>[];
|
|
13
|
+
//# sourceMappingURL=filter-utils.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-utils.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/filter-utils.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE5D;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,SAAS,iBAAiB,EAChF,MAAM,EAAE,iBAAiB,CAAC,aAAa,CAAC,GACtC,eAAe,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAgB7D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,aAAa,SAAS,iBAAiB,EAClE,MAAM,EAAE,iBAAiB,CAAC,aAAa,CAAC,GACtC,UAAU,CAAC,aAAa,CAAC,EAAE,CAQ7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DatabaseInstance } from '../../../../database';
|
|
2
|
+
import { DescendantsFilter } from './types';
|
|
3
|
+
import { AnyDialecteConfig, Context, ElementsOf, TreeRecord } from '../../../../types';
|
|
4
|
+
export declare function createFindDescendantsAsTreeMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
5
|
+
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
6
|
+
dialecteConfig: GenericConfig;
|
|
7
|
+
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
8
|
+
}): <GenericFilter extends DescendantsFilter<GenericConfig>>(filter: GenericFilter) => Promise<TreeRecord<GenericConfig, GenericFilter["tagName"]>[]>;
|
|
9
|
+
//# sourceMappingURL=find-descendants-as-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-descendants-as-tree.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/find-descendants-as-tree.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAAe,UAAU,EAAE,MAAM,SAAS,CAAA;AAE9F,wBAAgB,iCAAiC,CAChD,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAGqC,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,UAClF,aAAa,KACnB,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CA6DjE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DatabaseInstance } from '../../../../database';
|
|
2
|
+
import { FindDescendantsReturn, DescendantsFilter } from './types';
|
|
3
|
+
import { AnyDialecteConfig, Context, ElementsOf } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* Find descendants matching filter with "any depth" semantic
|
|
6
|
+
*
|
|
7
|
+
* Two modes:
|
|
8
|
+
* 1. No filter → get all descendants from tree
|
|
9
|
+
* 2. With filter → query deepest level, validate ancestors at any depth
|
|
10
|
+
*/
|
|
11
|
+
export declare function createFindDescendantsMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
12
|
+
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
13
|
+
dialecteConfig: GenericConfig;
|
|
14
|
+
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
15
|
+
}): <GenericFilter extends DescendantsFilter<GenericConfig> | undefined>(filter?: GenericFilter) => FindDescendantsReturn<GenericConfig, GenericFilter, GenericElement>;
|
|
16
|
+
//# sourceMappingURL=find-descendants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-descendants.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/find-descendants.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAG7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAA8B,MAAM,SAAS,CAAA;AAEjG;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAC1C,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAIC,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAAG,SAAS,WACxD,aAAa,KAAG,qBAAqB,CAAC,aAAa,EAAE,aAAa,EAAE,cAAc,CAAC,CAqB9F"}
|
package/dist/{src/chain-methods → chain-methods}/ending/queries/descendants/flatten-tree.helper.d.ts
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AnyDialecteConfig, ChainRecord, ElementsOf, TreeRecord } from '../../../../types';
|
|
2
2
|
/**
|
|
3
3
|
* Flatten tree to flat list of all descendant records (excluding root)
|
|
4
4
|
*/
|
|
5
5
|
export declare function flattenTree<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(tree: TreeRecord<GenericConfig, GenericElement>): ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[];
|
|
6
|
+
//# sourceMappingURL=flatten-tree.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flatten-tree.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/flatten-tree.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAErF;;GAEG;AACH,wBAAgB,WAAW,CAC1B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAEhD,IAAI,EAAE,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,GAC7C,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAczD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AnyDialecteConfig, ChainRecord, ElementsOf } from '../../../../types';
|
|
2
2
|
/**
|
|
3
3
|
* Group records by tagName and deduplicate by id
|
|
4
4
|
*/
|
|
@@ -6,3 +6,4 @@ export declare function groupAndDeduplicate<GenericConfig extends AnyDialecteCon
|
|
|
6
6
|
collected: Map<string, Map<string, ChainRecord<GenericConfig, ElementsOf<GenericConfig>>>>;
|
|
7
7
|
collectTags: Set<string>;
|
|
8
8
|
}): Record<string, ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[]>;
|
|
9
|
+
//# sourceMappingURL=group-records.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-records.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/group-records.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,SAAS,iBAAiB,EAAE,MAAM,EAAE;IACpF,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1F,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACxB,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAkB1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,mBAAmB,SAAS,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { FilterCondition } from './types';
|
|
2
|
+
import { AnyDialecteConfig, ChainRecord, ElementsOf } from '../../../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Check if all required filter conditions exist in ancestry chain (any depth)
|
|
5
5
|
* Optional conditions (no attributes) are skipped if not found
|
|
@@ -8,3 +8,4 @@ export declare function matchesAllConditions<GenericConfig extends AnyDialecteCo
|
|
|
8
8
|
ancestry: ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[];
|
|
9
9
|
conditions: FilterCondition<GenericConfig, ElementsOf<GenericConfig>>[];
|
|
10
10
|
}): boolean;
|
|
11
|
+
//# sourceMappingURL=match-conditions.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match-conditions.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/match-conditions.helper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzE;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,SAAS,iBAAiB,EAAE,MAAM,EAAE;IACrF,QAAQ,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;IACjE,UAAU,EAAE,eAAe,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;CACvE,GAAG,OAAO,CA2BV"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FilterAttributes } from '../../../../helpers';
|
|
2
|
+
import { AnyDialecteConfig, DescendantsOf, ElementsOf, ChainRecord } from '../../../../types';
|
|
3
|
+
type Depth = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
4
|
+
type FilterNode<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, D extends number> = Depth[D] extends never ? never : {
|
|
5
|
+
[K in DescendantsOf<GenericConfig, GenericElement>]: {
|
|
6
|
+
tagName: K;
|
|
7
|
+
attributes?: FilterAttributes<GenericConfig, K>;
|
|
8
|
+
descendant?: FilterNode<GenericConfig, K, Depth[D]>;
|
|
9
|
+
};
|
|
10
|
+
}[DescendantsOf<GenericConfig, GenericElement>];
|
|
11
|
+
export type DescendantsFilter<GenericConfig extends AnyDialecteConfig> = {
|
|
12
|
+
[K in ElementsOf<GenericConfig>]: {
|
|
13
|
+
tagName: K;
|
|
14
|
+
attributes?: FilterAttributes<GenericConfig, K>;
|
|
15
|
+
descendant?: FilterNode<GenericConfig, K, 10>;
|
|
16
|
+
};
|
|
17
|
+
}[ElementsOf<GenericConfig>];
|
|
18
|
+
export type FilterCondition<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
|
|
19
|
+
tagName: GenericElement;
|
|
20
|
+
attributes?: FilterAttributes<GenericConfig, GenericElement>;
|
|
21
|
+
optional?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type ExtractTags<F> = F extends {
|
|
24
|
+
tagName: infer T;
|
|
25
|
+
} ? T | (F extends {
|
|
26
|
+
descendant?: infer D;
|
|
27
|
+
} ? ExtractTags<D> : never) : never;
|
|
28
|
+
export type ResultMap<GenericConfig extends AnyDialecteConfig, GenericTags extends string> = {
|
|
29
|
+
[K in GenericTags]: ChainRecord<GenericConfig, K>[];
|
|
30
|
+
};
|
|
31
|
+
export type FindDescendantsReturn<GenericConfig extends AnyDialecteConfig, GenericFilter extends DescendantsFilter<GenericConfig> | undefined, GenericElement extends ElementsOf<GenericConfig> = ElementsOf<GenericConfig>> = Promise<GenericFilter extends undefined ? {
|
|
32
|
+
[K in GenericElement | DescendantsOf<GenericConfig, GenericElement>]: ChainRecord<GenericConfig, K>[];
|
|
33
|
+
} : GenericFilter extends DescendantsFilter<GenericConfig> ? ResultMap<GenericConfig, ExtractTags<GenericFilter>> : never>;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAMxF,KAAK,KAAK,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;AAEtD,KAAK,UAAU,CACd,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,CAAC,SAAS,MAAM,IACb,KAAK,CAAC,CAAC,CAAC,SAAS,KAAK,GACvB,KAAK,GACL;KACC,CAAC,IAAI,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG;QACpD,OAAO,EAAE,CAAC,CAAA;QACV,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAC,CAAA;QAC/C,UAAU,CAAC,EAAE,UAAU,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;KACnD;CACD,CAAC,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;AAEjD,MAAM,MAAM,iBAAiB,CAAC,aAAa,SAAS,iBAAiB,IAAI;KACvE,CAAC,IAAI,UAAU,CAAC,aAAa,CAAC,GAAG;QACjC,OAAO,EAAE,CAAC,CAAA;QACV,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAC,CAAA;QAC/C,UAAU,CAAC,EAAE,UAAU,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;KAC7C;CACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;AAM5B,MAAM,MAAM,eAAe,CAC1B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAC7C;IACH,OAAO,EAAE,cAAc,CAAA;IACvB,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAMD,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC,CAAA;CAAE,GACxD,CAAC,GAAG,CAAC,CAAC,SAAS;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GACjE,KAAK,CAAA;AAMR,MAAM,MAAM,SAAS,CAAC,aAAa,SAAS,iBAAiB,EAAE,WAAW,SAAS,MAAM,IAAI;KAC3F,CAAC,IAAI,WAAW,GAAG,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;CACnD,CAAA;AAED,MAAM,MAAM,qBAAqB,CAChC,aAAa,SAAS,iBAAiB,EACvC,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAAG,SAAS,EAClE,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC,aAAa,CAAC,IACzE,OAAO,CACV,aAAa,SAAS,SAAS,GAC5B;KACC,CAAC,IAAI,cAAc,GAAG,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,WAAW,CAChF,aAAa,EACb,CAAC,CACD,EAAE;CACH,GACA,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,GACrD,SAAS,CAAC,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,GACpD,KAAK,CACT,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DatabaseInstance } from '../../../../database';
|
|
2
|
-
import
|
|
2
|
+
import { AnyDialecteConfig, ChainRecord, ElementsOf, Operation } from '../../../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Walk up from record to focus, collecting all ancestors
|
|
5
5
|
* Stops when reaching focus element (inclusive)
|
|
@@ -12,3 +12,4 @@ export declare function walkAncestryToFocus<GenericConfig extends AnyDialecteCon
|
|
|
12
12
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
13
13
|
stagedOperations: Operation<GenericConfig>[];
|
|
14
14
|
}): Promise<ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[]>;
|
|
15
|
+
//# sourceMappingURL=walk-ancestry.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walk-ancestry.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/walk-ancestry.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAG7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEpF;;;;GAIG;AACH,wBAAsB,mBAAmB,CACxC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IAClD,KAAK,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;IAC5D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACjD,gBAAgB,EAAE,SAAS,CAAC,aAAa,CAAC,EAAE,CAAA;CAC5C,GAAG,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CA0CnE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FindChildrenParams } from './find-children.types';
|
|
2
|
+
import { DatabaseInstance } from '../../../index';
|
|
3
|
+
import { AnyDialecteConfig, ElementsOf, Context, ChildrenOf, ChainRecord } from '../../../types';
|
|
4
|
+
export declare function createFindChildrenMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
5
|
+
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
6
|
+
dialecteConfig: GenericConfig;
|
|
7
|
+
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
8
|
+
}): <GenericChild extends ChildrenOf<GenericConfig, GenericElement>>(filters: FindChildrenParams<GenericConfig, GenericElement, GenericChild>) => Promise<Record<GenericChild, ChainRecord<GenericConfig, GenericChild>[]>>;
|
|
9
|
+
//# sourceMappingURL=find-children.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-children.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/find-children.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE9F,wBAAgB,wBAAwB,CACvC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAGuB,YAAY,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,EACpF,SAAS,kBAAkB,CAAC,aAAa,EAAE,cAAc,EAAE,YAAY,CAAC,KACtE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,aAAa,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,CA6B5E"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FilterAttributes } from '../../../helpers';
|
|
2
|
+
import { AnyDialecteConfig, ElementsOf, ChildrenOf } from '../../../types';
|
|
3
|
+
export type FindChildrenParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericChild extends ChildrenOf<GenericConfig, GenericElement>> = Partial<{
|
|
4
|
+
[K in GenericChild]: FilterAttributes<GenericConfig, K>;
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=find-children.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-children.types.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/find-children.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAExE,MAAM,MAAM,kBAAkB,CAC7B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,YAAY,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,IAC3D,OAAO,CAAC;KACV,CAAC,IAAI,YAAY,GAAG,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAC;CACvD,CAAC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AnyDialecteConfig, ElementsOf, Context, FullAttributeObjectOf } from '../../../types';
|
|
2
2
|
export declare function createGetAttributesValuesMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
3
3
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
4
4
|
}): <GenericAttribute extends FullAttributeObjectOf<GenericConfig, GenericElement>>() => Promise<Record<GenericAttribute["name"], GenericAttribute["value"]>>;
|
|
5
|
+
//# sourceMappingURL=get-attributes-values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-attributes-values.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/get-attributes-values.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE5F,wBAAgB,+BAA+B,CAC9C,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IAAE,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;CAAE,IAI3E,gBAAgB,SAAS,qBAAqB,CAAC,aAAa,EAAE,cAAc,CAAC,OACzE,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAKzE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DatabaseInstance } from '../../../index';
|
|
2
|
-
import
|
|
2
|
+
import { AnyDialecteConfig, ElementsOf, Context, ParentsOf, ChainRecord } from '../../../types';
|
|
3
3
|
export declare function createGetParentMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericParentElement extends ParentsOf<GenericConfig, GenericElement>>(params: {
|
|
4
4
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
5
5
|
dialecteConfig: GenericConfig;
|
|
6
6
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
7
7
|
}): () => Promise<ChainRecord<GenericConfig, GenericParentElement>>;
|
|
8
|
+
//# sourceMappingURL=get-parent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-parent.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/get-parent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE7F,wBAAgB,qBAAqB,CACpC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,oBAAoB,SAAS,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,EACpE,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,SAE0B,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC,CAiBnF"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { GetTreeParams } from './get-tree.types';
|
|
2
|
+
import { DatabaseInstance } from '../../../index';
|
|
3
|
+
import { AnyDialecteConfig, ElementsOf, Context, TreeRecord } from '../../../types';
|
|
4
4
|
export declare function createGetTreeMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
5
5
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
6
6
|
dialecteConfig: GenericConfig;
|
|
7
7
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
8
8
|
}): (params?: GetTreeParams<GenericConfig, GenericElement>) => Promise<TreeRecord<GenericConfig, GenericElement>>;
|
|
9
|
+
//# sourceMappingURL=get-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-tree.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/get-tree.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAgC,MAAM,kBAAkB,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAe,UAAU,EAAE,MAAM,SAAS,CAAA;AAE9F,wBAAgB,mBAAmB,CAClC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAIC,SAAQ,aAAa,CAAC,aAAa,EAAE,cAAc,CAAM,KACvD,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAmBrD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FilterAttributes } from '../../../helpers';
|
|
2
|
+
import { AnyDialecteConfig, ElementsOf, ChildrenOf } from '../../../types';
|
|
3
|
+
export type GetTreeParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
|
|
4
|
+
include?: IncludeFilter<GenericConfig, GenericElement>;
|
|
5
|
+
exclude?: ExcludeFilter<GenericConfig>[];
|
|
6
|
+
unwrap?: ElementsOf<GenericConfig>[];
|
|
7
|
+
};
|
|
8
|
+
export type IncludeFilter<GenericConfig extends AnyDialecteConfig, GenericParent extends ElementsOf<GenericConfig>> = ChildrenOf<GenericConfig, GenericParent> extends infer Child ? Child extends ElementsOf<GenericConfig> ? {
|
|
9
|
+
tagName: Child;
|
|
10
|
+
attributes?: FilterAttributes<GenericConfig, Child>;
|
|
11
|
+
children?: IncludeFilter<GenericConfig, Child>[];
|
|
12
|
+
} : never : never;
|
|
13
|
+
export type ExcludeFilter<GenericConfig extends AnyDialecteConfig> = {
|
|
14
|
+
tagName: ElementsOf<GenericConfig>;
|
|
15
|
+
attributes?: FilterAttributes<GenericConfig, ElementsOf<GenericConfig>>;
|
|
16
|
+
scope?: 'self' | 'children';
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=get-tree.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-tree.types.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/get-tree.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAExE,MAAM,MAAM,aAAa,CACxB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAC7C;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACtD,OAAO,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,EAAE,CAAA;IACxC,MAAM,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,EAAE,CAAA;CACpC,CAAA;AAGD,MAAM,MAAM,aAAa,CACxB,aAAa,SAAS,iBAAiB,EACvC,aAAa,SAAS,UAAU,CAAC,aAAa,CAAC,IAE/C,UAAU,CAAC,aAAa,EAAE,aAAa,CAAC,SAAS,MAAM,KAAK,GACzD,KAAK,SAAS,UAAU,CAAC,aAAa,CAAC,GACtC;IACA,OAAO,EAAE,KAAK,CAAA;IACd,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;IACnD,QAAQ,CAAC,EAAE,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,CAAA;CAChD,GACA,KAAK,GACN,KAAK,CAAA;AAGT,MAAM,MAAM,aAAa,CAAC,aAAa,SAAS,iBAAiB,IAAI;IACpE,OAAO,EAAE,UAAU,CAAC,aAAa,CAAC,CAAA;IAClC,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;IACvE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;CAC3B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA;AAEvC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,kBAAkB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { DatabaseInstance } from '../../../database';
|
|
2
|
+
import { AnyDialecteConfig, ElementsOf, Context } from '../../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Commit all staged operations to the database atomically.
|
|
5
5
|
* Terminal operation - returns Promise<void>, operations cleared after success.
|
|
@@ -13,3 +13,4 @@ export declare function createCommitMethod<GenericConfig extends AnyDialecteConf
|
|
|
13
13
|
dialecteConfig: GenericConfig;
|
|
14
14
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
15
15
|
}): () => Promise<void>;
|
|
16
|
+
//# sourceMappingURL=commit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/transaction/commit.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAErE;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CACjC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,SACgC,OAAO,CAAC,IAAI,CAAC,CA2E7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/transaction/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AnyDialecteConfig, Operation } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Merge operations by element ID to optimize database operations.
|
|
4
|
+
* Consolidates multiple operations on the same element into a single final operation.
|
|
5
|
+
*
|
|
6
|
+
* Merge rules:
|
|
7
|
+
* - created + updated → created (with final state)
|
|
8
|
+
* - created + deleted → no-op (removed)
|
|
9
|
+
* - updated + updated → updated (with final state)
|
|
10
|
+
* - updated + deleted → deleted (with original old state)
|
|
11
|
+
* - deleted → terminal (no further merging)
|
|
12
|
+
*
|
|
13
|
+
* @param operations - Array of staged operations to merge
|
|
14
|
+
* @returns Object containing arrays of merged creates, updates, and deletes
|
|
15
|
+
*/
|
|
16
|
+
export declare function mergeOperations<GenericConfig extends AnyDialecteConfig>(operations: Operation<GenericConfig>[]): {
|
|
17
|
+
creates: {
|
|
18
|
+
status: "created";
|
|
19
|
+
oldRecord: undefined;
|
|
20
|
+
newRecord: import('../../../types').RawRecord<GenericConfig, import('../../../types').ElementsOf<GenericConfig>>;
|
|
21
|
+
}[];
|
|
22
|
+
updates: {
|
|
23
|
+
status: "updated";
|
|
24
|
+
oldRecord: import('../../../types').RawRecord<GenericConfig, import('../../../types').ElementsOf<GenericConfig>>;
|
|
25
|
+
newRecord: import('../../../types').RawRecord<GenericConfig, import('../../../types').ElementsOf<GenericConfig>>;
|
|
26
|
+
}[];
|
|
27
|
+
deletes: {
|
|
28
|
+
status: "deleted";
|
|
29
|
+
oldRecord: import('../../../types').RawRecord<GenericConfig, import('../../../types').ElementsOf<GenericConfig>>;
|
|
30
|
+
newRecord: undefined;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=merge-operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-operations.d.ts","sourceRoot":"","sources":["../../../../src/chain-methods/ending/transaction/merge-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,aAAa,SAAS,iBAAiB,EACtE,UAAU,EAAE,SAAS,CAAC,aAAa,CAAC,EAAE;;;;;;;;;;;;;;;;EAuDtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chain-methods/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AAEjC,mBAAmB,SAAS,CAAA;AAC5B,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,aAAa,CAAA;AAChC,mBAAmB,cAAc,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeepCloneChildParams } from './clone.types';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { Chain, ChainFactory } from '../types';
|
|
3
|
+
import { AnyDialecteConfig, ElementsOf, ChildrenOf, Context, ExtensionRegistry } from '../../types';
|
|
4
4
|
/**
|
|
5
5
|
* Deep clones the child element under the current focused element.
|
|
6
6
|
*
|
|
@@ -15,3 +15,4 @@ export declare function createDeepCloneChildMethod<GenericConfig extends AnyDial
|
|
|
15
15
|
dialecteConfig: GenericConfig;
|
|
16
16
|
focusedTagName: GenericElement;
|
|
17
17
|
}): <GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>>(params: DeepCloneChildParams<GenericConfig, GenericChildElement>) => Chain<GenericConfig, GenericElement, GenericExtensionRegistry> | Chain<GenericConfig, GenericChildElement, GenericExtensionRegistry>;
|
|
18
|
+
//# sourceMappingURL=clone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/clone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAIpD,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,OAAO,EAEP,iBAAiB,EACjB,MAAM,SAAS,CAAA;AAEhB;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACzC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,cAAc,EAAE,cAAc,CAAA;CAC9B,IAGiB,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,EACrF,QAAQ,oBAAoB,CAAC,aAAa,EAAE,mBAAmB,CAAC,0IAsCjE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AnyDialecteConfig, ElementsOf, TreeRecord } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* DeepCloneChild with setFocus: true - narrows to child element type
|
|
4
|
+
*/
|
|
5
|
+
export type DeepCloneChildWithFocusParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
|
|
6
|
+
record: TreeRecord<GenericConfig, GenericElement>;
|
|
7
|
+
setFocus: true;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* DeepCloneChild with setFocus: false - stays on current element
|
|
11
|
+
*/
|
|
12
|
+
export type DeepCloneChildWithoutFocusParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
|
|
13
|
+
record: TreeRecord<GenericConfig, GenericElement>;
|
|
14
|
+
setFocus: false;
|
|
15
|
+
};
|
|
16
|
+
export type DeepCloneChildParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = DeepCloneChildWithFocusParams<GenericConfig, GenericElement> | DeepCloneChildWithoutFocusParams<GenericConfig, GenericElement>;
|
|
17
|
+
//# sourceMappingURL=clone.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone.types.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/clone.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAExE;;GAEG;AACH,MAAM,MAAM,6BAA6B,CACxC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAC7C;IACH,MAAM,EAAE,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACjD,QAAQ,EAAE,IAAI,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,gCAAgC,CAC3C,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAC7C;IACH,MAAM,EAAE,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IACjD,QAAQ,EAAE,KAAK,CAAA;CACf,CAAA;AAED,MAAM,MAAM,oBAAoB,CAC/B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAE9C,6BAA6B,CAAC,aAAa,EAAE,cAAc,CAAC,GAC5D,gCAAgC,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AddChildParams } from './create.types';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { ChainFactory } from '../types';
|
|
3
|
+
import { AnyDialecteConfig, ElementsOf, ChildrenOf, Context, ExtensionRegistry } from '../../types';
|
|
4
4
|
/**
|
|
5
5
|
* Creates a child element under the current focused element.
|
|
6
6
|
*
|
|
@@ -14,4 +14,5 @@ export declare function createAddChildMethod<GenericConfig extends AnyDialecteCo
|
|
|
14
14
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
15
15
|
dialecteConfig: GenericConfig;
|
|
16
16
|
focusedTagName: GenericElement;
|
|
17
|
-
}): <GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>>(params: AddChildParams<GenericConfig, GenericElement, GenericChildElement>) =>
|
|
17
|
+
}): <GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>>(params: AddChildParams<GenericConfig, GenericElement, GenericChildElement>) => import('../types').Chain<GenericConfig, GenericChildElement, GenericExtensionRegistry> | import('../types').Chain<GenericConfig, GenericElement, GenericExtensionRegistry>;
|
|
18
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAM/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,OAAO,EAGP,iBAAiB,EACjB,MAAM,SAAS,CAAA;AAEhB;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CACnC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,cAAc,EAAE,cAAc,CAAA;CAC9B,IAGiB,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,EACrF,QAAQ,cAAc,CAAC,aAAa,EAAE,cAAc,EAAE,mBAAmB,CAAC,gLAiE3E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AnyDialecteConfig, ElementsOf, ChildrenOf, Namespace, AttributesValueObjectOf, FullAttributeObjectOf } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* AddChild with setFocus: true - narrows to child element type
|
|
4
|
+
*/
|
|
5
|
+
export type AddChildParamsWithFocus<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>> = {
|
|
6
|
+
id?: `${string}-${string}-${string}-${string}-${string}`;
|
|
7
|
+
tagName: GenericChildElement;
|
|
8
|
+
namespace?: Namespace;
|
|
9
|
+
attributes: AttributesValueObjectOf<GenericConfig, GenericChildElement> | FullAttributeObjectOf<GenericConfig, GenericChildElement>[];
|
|
10
|
+
value?: string;
|
|
11
|
+
setFocus: true;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* AddChild with setFocus: false - stays on current element
|
|
15
|
+
*/
|
|
16
|
+
export type AddChildParamsWithoutFocus<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>> = {
|
|
17
|
+
id?: `${string}-${string}-${string}-${string}-${string}`;
|
|
18
|
+
tagName: GenericChildElement;
|
|
19
|
+
namespace?: Namespace;
|
|
20
|
+
attributes: AttributesValueObjectOf<GenericConfig, GenericChildElement> | FullAttributeObjectOf<GenericConfig, GenericChildElement>[];
|
|
21
|
+
value?: string;
|
|
22
|
+
setFocus?: false;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Union type for both addChild variants
|
|
26
|
+
*/
|
|
27
|
+
export type AddChildParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>> = AddChildParamsWithFocus<GenericConfig, GenericElement, GenericChildElement> | AddChildParamsWithoutFocus<GenericConfig, GenericElement, GenericChildElement>;
|
|
28
|
+
/**
|
|
29
|
+
* Any addChild params - for tests or generic operations
|
|
30
|
+
*/
|
|
31
|
+
export type AnyAddChildParams = AddChildParams<AnyDialecteConfig, string, string>;
|
|
32
|
+
//# sourceMappingURL=create.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.types.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/create.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,SAAS,EACT,uBAAuB,EACvB,qBAAqB,EACrB,MAAM,SAAS,CAAA;AAEhB;;GAEG;AACH,MAAM,MAAM,uBAAuB,CAClC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,IAClE;IACH,EAAE,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;IACxD,OAAO,EAAE,mBAAmB,CAAA;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,UAAU,EACP,uBAAuB,CAAC,aAAa,EAAE,mBAAmB,CAAC,GAC3D,qBAAqB,CAAC,aAAa,EAAE,mBAAmB,CAAC,EAAE,CAAA;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,IAAI,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,0BAA0B,CACrC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,IAClE;IACH,EAAE,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;IACxD,OAAO,EAAE,mBAAmB,CAAA;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,UAAU,EACP,uBAAuB,CAAC,aAAa,EAAE,mBAAmB,CAAC,GAC3D,qBAAqB,CAAC,aAAa,EAAE,mBAAmB,CAAC,EAAE,CAAA;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,KAAK,CAAA;CAChB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,CACzB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,IAEnE,uBAAuB,CAAC,aAAa,EAAE,cAAc,EAAE,mBAAmB,CAAC,GAC3E,0BAA0B,CAAC,aAAa,EAAE,cAAc,EAAE,mBAAmB,CAAC,CAAA;AAEjF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DatabaseInstance } from '../../index';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { ChainFactory } from '../types';
|
|
3
|
+
import { DeleteElementParams } from './delete.types';
|
|
4
|
+
import { AnyDialecteConfig, ElementsOf, Context, ParentsOf, ExtensionRegistry } from '../../types';
|
|
5
5
|
/**
|
|
6
6
|
* Deletes the current focused element.
|
|
7
7
|
* Returns builder focused on parent element.
|
|
@@ -16,4 +16,5 @@ export declare function createDeleteElementMethod<GenericConfig extends AnyDiale
|
|
|
16
16
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
17
17
|
dialecteConfig: GenericConfig;
|
|
18
18
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
19
|
-
}): <GenericParentElement extends ParentsOf<GenericConfig, GenericElement>>(params: DeleteElementParams<GenericConfig, GenericElement, GenericParentElement>) => import(
|
|
19
|
+
}): <GenericParentElement extends ParentsOf<GenericConfig, GenericElement>>(params: DeleteElementParams<GenericConfig, GenericElement, GenericParentElement>) => import('../../index').Chain<GenericConfig, GenericParentElement, GenericExtensionRegistry>;
|
|
20
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EAEV,OAAO,EACP,SAAS,EAGT,iBAAiB,EACjB,MAAM,SAAS,CAAA;AAEhB;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACxC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAGiB,oBAAoB,SAAS,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,EACrF,QAAQ,mBAAmB,CAAC,aAAa,EAAE,cAAc,EAAE,oBAAoB,CAAC,4FA+CjF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AnyDialecteConfig, ElementsOf, AnyElement, ParentsOf, AnyParent } from '../../types';
|
|
2
|
+
export type DeleteElementParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericParentElement extends ParentsOf<GenericConfig, GenericElement>> = {
|
|
3
|
+
parentTagName: GenericParentElement;
|
|
4
|
+
};
|
|
5
|
+
export type AnyDeleteParams = DeleteElementParams<AnyDialecteConfig, AnyElement, AnyParent>;
|
|
6
|
+
//# sourceMappingURL=delete.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.types.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/delete.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAE9F,MAAM,MAAM,mBAAmB,CAC9B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,oBAAoB,SAAS,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,IAClE;IAAE,aAAa,EAAE,oBAAoB,CAAA;CAAE,CAAA;AAE3C,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,iBAAiB,EAAE,UAAU,EAAE,SAAS,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,eAAe,CAAA;AAClC,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,gBAAgB,CAAA"}
|