remult 0.21.1 → 0.22.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/README.md +47 -46
- package/SseSubscriptionServer.js +9 -9
- package/ably.js +1 -1
- package/esm/SseSubscriptionServer.js +11 -11
- package/esm/ably.js +2 -2
- package/esm/angular/interfaces/index.d.ts +1 -0
- package/esm/angular/interfaces/index.js +1 -0
- package/esm/angular/interfaces/src/column-collection.d.ts +70 -0
- package/esm/angular/interfaces/src/column-collection.js +341 -0
- package/esm/angular/interfaces/src/data-area-settings.d.ts +15 -0
- package/esm/angular/interfaces/src/data-area-settings.js +35 -0
- package/esm/angular/interfaces/src/data-control-interfaces.d.ts +36 -0
- package/esm/angular/interfaces/src/data-control-interfaces.js +57 -0
- package/esm/angular/interfaces/src/dataList.d.ts +13 -0
- package/esm/angular/interfaces/src/dataList.js +42 -0
- package/esm/angular/interfaces/src/filter-helper.d.ts +13 -0
- package/esm/angular/interfaces/src/filter-helper.js +59 -0
- package/esm/angular/interfaces/src/grid-settings.d.ts +145 -0
- package/esm/angular/interfaces/src/grid-settings.js +387 -0
- package/esm/angular/interfaces/src/public_api.d.ts +4 -0
- package/esm/angular/interfaces/src/public_api.js +4 -0
- package/esm/angular/src/angular/RemultAngularPluginsService.d.ts +4 -0
- package/esm/angular/src/angular/RemultAngularPluginsService.js +3 -0
- package/esm/angular/src/angular/data-control/data-control2.component.d.ts +49 -0
- package/esm/angular/src/angular/data-control/data-control2.component.js +138 -0
- package/esm/core/SseSubscriptionServer.d.ts +33 -0
- package/esm/core/SseSubscriptionServer.js +107 -0
- package/esm/core/assign.d.ts +1 -0
- package/esm/core/assign.js +5 -0
- package/esm/core/classType.d.ts +3 -0
- package/esm/core/classType.js +1 -0
- package/esm/core/index.d.ts +27 -0
- package/esm/core/index.js +25 -0
- package/esm/core/inputTypes.d.ts +9 -0
- package/esm/core/inputTypes.js +9 -0
- package/esm/core/live-query/data-provider-live-query-storage.d.ts +22 -0
- package/esm/core/live-query/data-provider-live-query-storage.js +71 -0
- package/esm/core/postgres/index.d.ts +2 -0
- package/esm/core/postgres/index.js +2 -0
- package/esm/core/postgres/postgres-data-provider.d.ts +36 -0
- package/esm/core/postgres/postgres-data-provider.js +120 -0
- package/esm/core/postgres/schema-builder.d.ts +17 -0
- package/esm/core/postgres/schema-builder.js +153 -0
- package/esm/core/remult-fresh.d.ts +17 -0
- package/esm/core/remult-fresh.js +29 -0
- package/esm/core/remult-knex/index.d.ts +30 -0
- package/esm/core/remult-knex/index.js +446 -0
- package/esm/core/remult-mongo.d.ts +24 -0
- package/esm/core/remult-mongo.js +254 -0
- package/esm/core/server/JsonEntityFileStorage.d.ts +10 -0
- package/esm/core/server/JsonEntityFileStorage.js +25 -0
- package/esm/core/server/core.d.ts +4 -0
- package/esm/core/server/core.js +4 -0
- package/esm/core/server/expressBridge.d.ts +182 -0
- package/esm/core/server/expressBridge.js +938 -0
- package/esm/core/server/index.d.ts +6 -0
- package/esm/core/server/index.js +9 -0
- package/esm/core/server/initAsyncHooks.d.ts +1 -0
- package/esm/core/server/initAsyncHooks.js +9 -0
- package/esm/core/server/initDataProvider.d.ts +2 -0
- package/esm/core/server/initDataProvider.js +14 -0
- package/esm/core/src/__EntityValueProvider.d.ts +11 -0
- package/esm/core/src/__EntityValueProvider.js +1 -0
- package/esm/core/src/__RowsOfDataForTesting.d.ts +3 -0
- package/esm/core/src/__RowsOfDataForTesting.js +1 -0
- package/esm/core/src/backend-tests/backend-database-test-setup.backend-spec.d.ts +6 -0
- package/esm/core/src/backend-tests/backend-database-test-setup.backend-spec.js +147 -0
- package/esm/core/src/backend-tests/my-test.backend-spec.d.ts +1 -0
- package/esm/core/src/backend-tests/my-test.backend-spec.js +197 -0
- package/esm/core/src/backend-tests/test-http-server.backend-spec.d.ts +1 -0
- package/esm/core/src/backend-tests/test-http-server.backend-spec.js +167 -0
- package/esm/core/src/buildRestDataProvider.d.ts +31 -0
- package/esm/core/src/buildRestDataProvider.js +113 -0
- package/esm/core/src/column-interfaces.d.ts +154 -0
- package/esm/core/src/column-interfaces.js +7 -0
- package/esm/core/src/column.d.ts +58 -0
- package/esm/core/src/column.js +174 -0
- package/esm/core/src/context.d.ts +134 -0
- package/esm/core/src/context.js +286 -0
- package/esm/core/src/data-api.d.ts +39 -0
- package/esm/core/src/data-api.js +279 -0
- package/esm/core/src/data-interfaces.d.ts +41 -0
- package/esm/core/src/data-interfaces.js +12 -0
- package/esm/core/src/data-providers/array-entity-data-provider.d.ts +22 -0
- package/esm/core/src/data-providers/array-entity-data-provider.js +252 -0
- package/esm/core/src/data-providers/in-memory-database.d.ts +9 -0
- package/esm/core/src/data-providers/in-memory-database.js +14 -0
- package/esm/core/src/data-providers/json-data-provider.d.ts +12 -0
- package/esm/core/src/data-providers/json-data-provider.js +55 -0
- package/esm/core/src/data-providers/rest-data-provider.d.ts +49 -0
- package/esm/core/src/data-providers/rest-data-provider.js +256 -0
- package/esm/core/src/data-providers/sql-database.d.ts +33 -0
- package/esm/core/src/data-providers/sql-database.js +384 -0
- package/esm/core/src/data-providers/web-sql-data-provider.d.ts +24 -0
- package/esm/core/src/data-providers/web-sql-data-provider.js +143 -0
- package/esm/core/src/entity.d.ts +91 -0
- package/esm/core/src/entity.js +1 -0
- package/esm/core/src/filter/filter-consumer-bridge-to-sql-request.d.ts +50 -0
- package/esm/core/src/filter/filter-consumer-bridge-to-sql-request.js +150 -0
- package/esm/core/src/filter/filter-consumer-bridge-to-url-builder.d.ts +1 -0
- package/esm/core/src/filter/filter-consumer-bridge-to-url-builder.js +1 -0
- package/esm/core/src/filter/filter-interfaces.d.ts +85 -0
- package/esm/core/src/filter/filter-interfaces.js +477 -0
- package/esm/core/src/live-query/LiveQueryClient.d.ts +20 -0
- package/esm/core/src/live-query/LiveQueryClient.js +188 -0
- package/esm/core/src/live-query/SseSubscriptionClient.d.ts +5 -0
- package/esm/core/src/live-query/SseSubscriptionClient.js +86 -0
- package/esm/core/src/live-query/SubscriptionChannel.d.ts +72 -0
- package/esm/core/src/live-query/SubscriptionChannel.js +123 -0
- package/esm/core/src/live-query/SubscriptionServer.d.ts +53 -0
- package/esm/core/src/live-query/SubscriptionServer.js +111 -0
- package/esm/core/src/live-query/live-query-tests.spec.d.ts +6 -0
- package/esm/core/src/live-query/live-query-tests.spec.js +952 -0
- package/esm/core/src/remult-proxy.d.ts +35 -0
- package/esm/core/src/remult-proxy.js +113 -0
- package/esm/core/src/remult3/DecoratorReplacer.d.ts +10 -0
- package/esm/core/src/remult3/DecoratorReplacer.js +20 -0
- package/esm/core/src/remult3/RepositoryImplementation.d.ts +355 -0
- package/esm/core/src/remult3/RepositoryImplementation.js +2109 -0
- package/esm/core/src/remult3/index.d.ts +2 -0
- package/esm/core/src/remult3/index.js +2 -0
- package/esm/core/src/remult3/remult3.d.ts +395 -0
- package/esm/core/src/remult3/remult3.js +2 -0
- package/esm/core/src/server-action.d.ts +81 -0
- package/esm/core/src/server-action.js +394 -0
- package/esm/core/src/shared-tests/db-tests-setup.d.ts +32 -0
- package/esm/core/src/shared-tests/db-tests-setup.js +78 -0
- package/esm/core/src/shared-tests/db-tests.db-tests.d.ts +25 -0
- package/esm/core/src/shared-tests/db-tests.db-tests.js +810 -0
- package/esm/core/src/shared-tests/deleteAll.d.ts +2 -0
- package/esm/core/src/shared-tests/deleteAll.js +4 -0
- package/esm/core/src/shared-tests/entityWithValidations.d.ts +14 -0
- package/esm/core/src/shared-tests/entityWithValidations.js +43 -0
- package/esm/core/src/shared-tests/index.d.ts +4 -0
- package/esm/core/src/shared-tests/index.js +4 -0
- package/esm/core/src/shared-tests/test-custom-id-column.spec.d.ts +1 -0
- package/esm/core/src/shared-tests/test-custom-id-column.spec.js +67 -0
- package/esm/core/src/shared-tests/test-special-value.spec.d.ts +10 -0
- package/esm/core/src/shared-tests/test-special-value.spec.js +73 -0
- package/esm/core/src/shared-tests/test-update-with-null.spec.d.ts +1 -0
- package/esm/core/src/shared-tests/test-update-with-null.spec.js +31 -0
- package/esm/core/src/sort.d.ts +16 -0
- package/esm/core/src/sort.js +103 -0
- package/esm/core/src/sql-command.d.ts +19 -0
- package/esm/core/src/sql-command.js +1 -0
- package/esm/core/src/test.d.ts +3 -0
- package/esm/core/src/test.js +12 -0
- package/esm/core/src/tests/Done.d.ts +5 -0
- package/esm/core/src/tests/Done.js +9 -0
- package/esm/core/src/tests/RowProvider.spec.d.ts +16 -0
- package/esm/core/src/tests/RowProvider.spec.js +631 -0
- package/esm/core/src/tests/TestDataApiResponse.d.ts +10 -0
- package/esm/core/src/tests/TestDataApiResponse.js +22 -0
- package/esm/core/src/tests/basicRowFunctionality.spec.d.ts +8 -0
- package/esm/core/src/tests/basicRowFunctionality.spec.js +2103 -0
- package/esm/core/src/tests/c.d.ts +8 -0
- package/esm/core/src/tests/c.js +13 -0
- package/esm/core/src/tests/createData.d.ts +7 -0
- package/esm/core/src/tests/createData.js +22 -0
- package/esm/core/src/tests/d.d.ts +6 -0
- package/esm/core/src/tests/d.js +11 -0
- package/esm/core/src/tests/dWithPrefilter.d.ts +7 -0
- package/esm/core/src/tests/dWithPrefilter.js +18 -0
- package/esm/core/src/tests/entityForCustomFilter.d.ts +16 -0
- package/esm/core/src/tests/entityForCustomFilter.js +33 -0
- package/esm/core/src/tests/entityWithValidationsOnColumn.d.ts +5 -0
- package/esm/core/src/tests/entityWithValidationsOnColumn.js +13 -0
- package/esm/core/src/tests/frontend-database-tests-setup.spec.d.ts +4 -0
- package/esm/core/src/tests/frontend-database-tests-setup.spec.js +37 -0
- package/esm/core/src/tests/h.d.ts +6 -0
- package/esm/core/src/tests/h.js +24 -0
- package/esm/core/src/tests/remult-3-basic-tests.spec.d.ts +1 -0
- package/esm/core/src/tests/remult-3-basic-tests.spec.js +236 -0
- package/esm/core/src/tests/remult-3-entities.d.ts +23 -0
- package/esm/core/src/tests/remult-3-entities.js +39 -0
- package/esm/core/src/tests/tasks.d.ts +6 -0
- package/esm/core/src/tests/tasks.js +10 -0
- package/esm/core/src/tests/test-context-as-storage.spec.d.ts +0 -0
- package/esm/core/src/tests/test-context-as-storage.spec.js +1 -0
- package/esm/core/src/tests/test-data-api/predefined-filter.spec.d.ts +1 -0
- package/esm/core/src/tests/test-data-api/predefined-filter.spec.js +389 -0
- package/esm/core/src/tests/test-data-api/test-put-with-validation.spec.d.ts +5 -0
- package/esm/core/src/tests/test-data-api/test-put-with-validation.spec.js +152 -0
- package/esm/core/src/tests/test-decorator-precedence.spec.d.ts +1 -0
- package/esm/core/src/tests/test-decorator-precedence.spec.js +38 -0
- package/esm/core/src/tests/test-default-value.spec.d.ts +1 -0
- package/esm/core/src/tests/test-default-value.spec.js +33 -0
- package/esm/core/src/tests/test-entity-inheritance.spec.d.ts +14 -0
- package/esm/core/src/tests/test-entity-inheritance.spec.js +82 -0
- package/esm/core/src/tests/test-exceptions.spec.d.ts +1 -0
- package/esm/core/src/tests/test-exceptions.spec.js +375 -0
- package/esm/core/src/tests/test-json.spec.d.ts +1 -0
- package/esm/core/src/tests/test-json.spec.js +115 -0
- package/esm/core/src/tests/test-many-to-one-relation-in-entity.spec.d.ts +9 -0
- package/esm/core/src/tests/test-many-to-one-relation-in-entity.spec.js +809 -0
- package/esm/core/src/tests/test-non-active-record.spec.d.ts +1 -0
- package/esm/core/src/tests/test-non-active-record.spec.js +66 -0
- package/esm/core/src/tests/test-object-column.spec.d.ts +1 -0
- package/esm/core/src/tests/test-object-column.spec.js +189 -0
- package/esm/core/src/tests/test-paged-foreach.spec.d.ts +1 -0
- package/esm/core/src/tests/test-paged-foreach.spec.js +328 -0
- package/esm/core/src/tests/test-remult-angular.spec.d.ts +1 -0
- package/esm/core/src/tests/test-remult-angular.spec.js +23 -0
- package/esm/core/src/tests/test-server-controller.spec.d.ts +7 -0
- package/esm/core/src/tests/test-server-controller.spec.js +489 -0
- package/esm/core/src/tests/test-server-expressions.spec.d.ts +1 -0
- package/esm/core/src/tests/test-server-expressions.spec.js +178 -0
- package/esm/core/src/tests/test-server-method-on-entity.spec.d.ts +1 -0
- package/esm/core/src/tests/test-server-method-on-entity.spec.js +306 -0
- package/esm/core/src/tests/test-sql-expression.spec.d.ts +5 -0
- package/esm/core/src/tests/test-sql-expression.spec.js +205 -0
- package/esm/core/src/tests/test-sql.spec.d.ts +1 -0
- package/esm/core/src/tests/test-sql.spec.js +170 -0
- package/esm/core/src/tests/test-subscribe.spec.d.ts +1 -0
- package/esm/core/src/tests/test-subscribe.spec.js +135 -0
- package/esm/core/src/tests/test-type-recovery.spec.d.ts +1 -0
- package/esm/core/src/tests/test-type-recovery.spec.js +49 -0
- package/esm/core/src/tests/test-where-api.spec.d.ts +1 -0
- package/esm/core/src/tests/test-where-api.spec.js +434 -0
- package/esm/core/src/tests/testHelper.spec.d.ts +36 -0
- package/esm/core/src/tests/testHelper.spec.js +226 -0
- package/esm/core/src/tests/testModel/models.d.ts +16 -0
- package/esm/core/src/tests/testModel/models.js +25 -0
- package/esm/core/src/validators.d.ts +14 -0
- package/esm/core/src/validators.js +33 -0
- package/esm/core/src/valueConverters.d.ts +13 -0
- package/esm/core/src/valueConverters.js +197 -0
- package/esm/core/urlBuilder.d.ts +6 -0
- package/esm/core/urlBuilder.js +20 -0
- package/esm/graphql.js +194 -73
- package/esm/index.d.ts +10 -10
- package/esm/index.js +8 -8
- package/esm/inputTypes.js +1 -1
- package/esm/live-query/data-provider-live-query-storage.d.ts +3 -3
- package/esm/live-query/data-provider-live-query-storage.js +12 -9
- package/esm/myLog.js +2 -2
- package/esm/postgres/postgres-data-provider.d.ts +2 -2
- package/esm/postgres/postgres-data-provider.js +20 -14
- package/esm/postgres/schema-builder.d.ts +1 -1
- package/esm/postgres/schema-builder.js +28 -21
- package/esm/remult-express.js +2 -2
- package/esm/remult-fastify.js +9 -7
- package/esm/remult-fresh.d.ts +1 -1
- package/esm/remult-fresh.js +5 -8
- package/esm/remult-knex/index.d.ts +4 -4
- package/esm/remult-knex/index.js +75 -59
- package/esm/remult-mongo.js +36 -27
- package/esm/remult-next.d.ts +3 -3
- package/esm/remult-next.js +17 -11
- package/esm/remult-sveltekit.js +10 -10
- package/esm/server/JsonEntityFileStorage.js +3 -1
- package/esm/server/core.d.ts +2 -2
- package/esm/server/core.js +2 -2
- package/esm/server/expressBridge.d.ts +3 -12
- package/esm/server/expressBridge.js +265 -278
- package/esm/server/index.d.ts +2 -2
- package/esm/server/index.js +5 -2
- package/esm/server/initAsyncHooks.js +1 -1
- package/esm/server/initDataProvider.js +1 -1
- package/esm/src/backend-tests/backend-database-test-setup.backend-spec.d.ts +1 -1
- package/esm/src/backend-tests/backend-database-test-setup.backend-spec.js +47 -38
- package/esm/src/buildRestDataProvider.d.ts +1 -1
- package/esm/src/buildRestDataProvider.js +21 -13
- package/esm/src/column-interfaces.d.ts +9 -9
- package/esm/src/column.d.ts +4 -0
- package/esm/src/column.js +23 -11
- package/esm/src/context.d.ts +20 -8
- package/esm/src/context.js +65 -24
- package/esm/src/data-api.d.ts +0 -1
- package/esm/src/data-api.js +38 -37
- package/esm/src/data-interfaces.d.ts +1 -1
- package/esm/src/data-interfaces.js +1 -1
- package/esm/src/data-providers/array-entity-data-provider.js +9 -9
- package/esm/src/data-providers/in-memory-database.d.ts +1 -1
- package/esm/src/data-providers/in-memory-database.js +3 -1
- package/esm/src/data-providers/json-data-provider.js +8 -8
- package/esm/src/data-providers/rest-data-provider.d.ts +1 -1
- package/esm/src/data-providers/rest-data-provider.js +52 -36
- package/esm/src/data-providers/sql-database.d.ts +5 -5
- package/esm/src/data-providers/sql-database.js +53 -36
- package/esm/src/data-providers/web-sql-data-provider.d.ts +4 -4
- package/esm/src/data-providers/web-sql-data-provider.js +15 -13
- package/esm/src/entity.d.ts +24 -24
- package/esm/src/filter/filter-consumer-bridge-to-sql-request.d.ts +4 -4
- package/esm/src/filter/filter-consumer-bridge-to-sql-request.js +35 -20
- package/esm/src/filter/filter-interfaces.d.ts +7 -7
- package/esm/src/filter/filter-interfaces.js +108 -88
- package/esm/src/live-query/LiveQueryClient.js +37 -29
- package/esm/src/live-query/SseSubscriptionClient.d.ts +1 -1
- package/esm/src/live-query/SseSubscriptionClient.js +14 -14
- package/esm/src/live-query/SubscriptionChannel.d.ts +3 -3
- package/esm/src/live-query/SubscriptionChannel.js +27 -25
- package/esm/src/live-query/SubscriptionServer.js +24 -20
- package/esm/src/remult-proxy.d.ts +1 -1
- package/esm/src/remult-proxy.js +87 -29
- package/esm/src/remult3/DecoratorReplacer.d.ts +2 -2
- package/esm/src/remult3/RepositoryImplementation.d.ts +51 -41
- package/esm/src/remult3/RepositoryImplementation.js +336 -206
- package/esm/src/remult3/remult3.d.ts +56 -51
- package/esm/src/remult3/remult3.js +0 -1
- package/esm/src/server-action.d.ts +12 -5
- package/esm/src/server-action.js +79 -53
- package/esm/src/shared-tests/db-tests-setup.d.ts +8 -8
- package/esm/src/shared-tests/db-tests-setup.js +10 -10
- package/esm/src/shared-tests/db-tests.db-tests.d.ts +1 -1
- package/esm/src/shared-tests/db-tests.db-tests.js +279 -177
- package/esm/src/shared-tests/deleteAll.d.ts +1 -1
- package/esm/src/shared-tests/deleteAll.js +1 -1
- package/esm/src/shared-tests/entityWithValidations.js +1 -1
- package/esm/src/shared-tests/test-custom-id-column.spec.js +4 -4
- package/esm/src/shared-tests/test-special-value.spec.js +12 -12
- package/esm/src/shared-tests/test-update-with-null.spec.js +10 -6
- package/esm/src/sort.d.ts +2 -2
- package/esm/src/sort.js +12 -10
- package/esm/src/tests/TestDataApiResponse.d.ts +1 -1
- package/esm/src/tests/TestDataApiResponse.js +3 -4
- package/esm/src/tests/createData.js +2 -2
- package/esm/src/tests/d.js +1 -1
- package/esm/src/tests/dWithPrefilter.js +1 -1
- package/esm/src/tests/entityForCustomFilter.d.ts +4 -4
- package/esm/src/tests/entityForCustomFilter.js +12 -4
- package/esm/src/tests/entityWithValidationsOnColumn.js +1 -1
- package/esm/src/tests/frontend-database-tests-setup.spec.d.ts +1 -1
- package/esm/src/tests/frontend-database-tests-setup.spec.js +14 -14
- package/esm/src/tests/h.js +4 -4
- package/esm/src/tests/remult-3-entities.d.ts +2 -2
- package/esm/src/tests/remult-3-entities.js +6 -6
- package/esm/src/tests/testHelper.spec.d.ts +7 -7
- package/esm/src/tests/testHelper.spec.js +50 -39
- package/esm/src/tests/testModel/models.js +4 -4
- package/esm/src/validators.d.ts +1 -1
- package/esm/src/validators.js +10 -7
- package/esm/src/valueConverters.d.ts +1 -1
- package/esm/src/valueConverters.js +68 -55
- package/esm/test-servers/shared/Task.d.ts +9 -0
- package/esm/test-servers/shared/Task.js +32 -0
- package/esm/test.d.ts +5 -0
- package/esm/test.js +6 -0
- package/graphql.js +157 -45
- package/index.d.ts +10 -10
- package/inputTypes.js +1 -1
- package/live-query/data-provider-live-query-storage.d.ts +3 -3
- package/live-query/data-provider-live-query-storage.js +7 -4
- package/myLog.js +2 -2
- package/package.json +2 -2
- package/postgres/postgres-data-provider.d.ts +2 -2
- package/postgres/postgres-data-provider.js +21 -16
- package/postgres/schema-builder.d.ts +1 -1
- package/postgres/schema-builder.js +22 -15
- package/remult-express.js +1 -1
- package/remult-fastify.js +7 -7
- package/remult-fresh.d.ts +1 -1
- package/remult-fresh.js +1 -4
- package/remult-knex/index.d.ts +4 -4
- package/remult-knex/index.js +50 -35
- package/remult-mongo.js +33 -23
- package/remult-next.d.ts +3 -3
- package/remult-next.js +15 -11
- package/remult-sveltekit.js +14 -15
- package/server/core.d.ts +2 -2
- package/server/expressBridge.d.ts +3 -12
- package/server/expressBridge.js +278 -279
- package/server/index.d.ts +2 -2
- package/server/index.js +5 -2
- package/server/initAsyncHooks.js +2 -2
- package/server/initDataProvider.js +1 -1
- package/src/backend-tests/backend-database-test-setup.backend-spec.d.ts +1 -1
- package/src/backend-tests/backend-database-test-setup.backend-spec.js +40 -31
- package/src/buildRestDataProvider.d.ts +1 -1
- package/src/buildRestDataProvider.js +18 -10
- package/src/column-interfaces.d.ts +9 -9
- package/src/column.d.ts +4 -0
- package/src/column.js +20 -8
- package/src/context.d.ts +20 -8
- package/src/context.js +61 -18
- package/src/data-api.d.ts +0 -1
- package/src/data-api.js +40 -43
- package/src/data-interfaces.d.ts +1 -1
- package/src/data-providers/array-entity-data-provider.js +2 -2
- package/src/data-providers/in-memory-database.d.ts +1 -1
- package/src/data-providers/in-memory-database.js +3 -1
- package/src/data-providers/json-data-provider.js +33 -15
- package/src/data-providers/rest-data-provider.d.ts +1 -1
- package/src/data-providers/rest-data-provider.js +47 -32
- package/src/data-providers/sql-database.d.ts +5 -5
- package/src/data-providers/sql-database.js +41 -24
- package/src/data-providers/web-sql-data-provider.d.ts +4 -4
- package/src/data-providers/web-sql-data-provider.js +10 -8
- package/src/entity.d.ts +24 -24
- package/src/filter/filter-consumer-bridge-to-sql-request.d.ts +4 -4
- package/src/filter/filter-consumer-bridge-to-sql-request.js +34 -17
- package/src/filter/filter-interfaces.d.ts +7 -7
- package/src/filter/filter-interfaces.js +73 -47
- package/src/live-query/LiveQueryClient.js +35 -25
- package/src/live-query/SseSubscriptionClient.d.ts +1 -1
- package/src/live-query/SseSubscriptionClient.js +80 -76
- package/src/live-query/SubscriptionChannel.d.ts +3 -3
- package/src/live-query/SubscriptionChannel.js +26 -18
- package/src/live-query/SubscriptionServer.js +23 -17
- package/src/remult-proxy.d.ts +1 -1
- package/src/remult-proxy.js +84 -35
- package/src/remult3/DecoratorReplacer.d.ts +2 -2
- package/src/remult3/RepositoryImplementation.d.ts +51 -41
- package/src/remult3/RepositoryImplementation.js +402 -257
- package/src/remult3/remult3.d.ts +56 -51
- package/src/remult3/remult3.js +0 -1
- package/src/server-action.d.ts +12 -5
- package/src/server-action.js +78 -48
- package/src/shared-tests/db-tests-setup.d.ts +8 -8
- package/src/shared-tests/db-tests-setup.js +6 -6
- package/src/shared-tests/db-tests.db-tests.d.ts +1 -1
- package/src/shared-tests/db-tests.db-tests.js +350 -153
- package/src/shared-tests/deleteAll.d.ts +1 -1
- package/src/shared-tests/entityWithValidations.js +1 -1
- package/src/shared-tests/test-custom-id-column.spec.js +4 -4
- package/src/shared-tests/test-special-value.spec.js +9 -9
- package/src/shared-tests/test-update-with-null.spec.js +8 -4
- package/src/sort.d.ts +2 -2
- package/src/sort.js +9 -7
- package/src/tests/TestDataApiResponse.d.ts +1 -1
- package/src/tests/TestDataApiResponse.js +3 -4
- package/src/tests/createData.js +1 -1
- package/src/tests/d.js +1 -1
- package/src/tests/dWithPrefilter.js +1 -1
- package/src/tests/entityForCustomFilter.d.ts +4 -4
- package/src/tests/entityForCustomFilter.js +16 -6
- package/src/tests/entityWithValidationsOnColumn.js +1 -1
- package/src/tests/frontend-database-tests-setup.spec.d.ts +1 -1
- package/src/tests/frontend-database-tests-setup.spec.js +8 -8
- package/src/tests/h.js +3 -3
- package/src/tests/remult-3-entities.d.ts +2 -2
- package/src/tests/remult-3-entities.js +8 -4
- package/src/tests/testHelper.spec.d.ts +7 -7
- package/src/tests/testHelper.spec.js +38 -27
- package/src/tests/testModel/models.js +3 -3
- package/src/validators.d.ts +1 -1
- package/src/validators.js +18 -9
- package/src/valueConverters.d.ts +1 -1
- package/src/valueConverters.js +38 -21
- package/esm/remult-svletekit.d.ts +0 -3
- package/esm/remult-svletekit.js +0 -83
- package/esm/src/id-entity.d.ts +0 -4
- package/esm/src/id-entity.js +0 -8
- package/esm/src/remult3/getId.d.ts +0 -2
- package/esm/src/remult3/getId.js +0 -7
- package/postgres/getEntityTypescriptPostgres.d.ts +0 -1
- package/postgres/getEntityTypescriptPostgres.js +0 -125
- package/src/id-entity.d.ts +0 -4
- package/src/id-entity.js +0 -17
- package/src/remult3/getId.d.ts +0 -2
- package/src/remult3/getId.js +0 -11
package/README.md
CHANGED
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
</a>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
<br/>
|
|
32
31
|
|
|
33
32
|
<div align="center">
|
|
@@ -55,13 +54,13 @@
|
|
|
55
54
|
as a single source of truth for your API, frontend type-safe API client and
|
|
56
55
|
backend ORM**.
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
- :zap: Zero-boilerplate CRUD API routes with paging, sorting, and filtering for Express / Fastify / Next.js / NestJS / Koa / others...
|
|
58
|
+
- :ok_hand: Fullstack type-safety for API queries, mutations and RPC, without code generation
|
|
59
|
+
- :sparkles: Input validation, defined once, runs both on the backend and on the frontend for best UX
|
|
60
|
+
- :lock: Fine-grained code-based API authorization
|
|
61
|
+
- :relieved: Incrementally adoptable
|
|
62
|
+
- :rocket: Production ready
|
|
63
|
+
- :mega: **NEW - Zero-boilerplate realtime live-queries**
|
|
65
64
|
|
|
66
65
|
### Status
|
|
67
66
|
|
|
@@ -104,17 +103,17 @@ npm i remult
|
|
|
104
103
|
```ts
|
|
105
104
|
// shared/product.ts
|
|
106
105
|
|
|
107
|
-
import { Entity, Fields } from "remult"
|
|
106
|
+
import { Entity, Fields } from "remult"
|
|
108
107
|
|
|
109
108
|
@Entity("products", {
|
|
110
|
-
allowApiCrud: true
|
|
109
|
+
allowApiCrud: true
|
|
111
110
|
})
|
|
112
111
|
export class Product {
|
|
113
112
|
@Fields.string()
|
|
114
|
-
name = ""
|
|
113
|
+
name = ""
|
|
115
114
|
|
|
116
115
|
@Fields.number()
|
|
117
|
-
unitPrice = 0
|
|
116
|
+
unitPrice = 0
|
|
118
117
|
}
|
|
119
118
|
```
|
|
120
119
|
|
|
@@ -123,20 +122,22 @@ export class Product {
|
|
|
123
122
|
```ts
|
|
124
123
|
// backend/index.ts
|
|
125
124
|
|
|
126
|
-
import express from "express"
|
|
127
|
-
import { remultExpress } from "remult/remult-express"
|
|
128
|
-
import { Product } from "../shared/product"
|
|
125
|
+
import express from "express"
|
|
126
|
+
import { remultExpress } from "remult/remult-express"
|
|
127
|
+
import { Product } from "../shared/product"
|
|
129
128
|
|
|
130
|
-
const port = 3001
|
|
131
|
-
const app = express()
|
|
129
|
+
const port = 3001
|
|
130
|
+
const app = express()
|
|
132
131
|
|
|
133
|
-
app.use(
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
app.use(
|
|
133
|
+
remultExpress({
|
|
134
|
+
entities: [Product]
|
|
135
|
+
})
|
|
136
|
+
)
|
|
136
137
|
|
|
137
138
|
app.listen(port, () => {
|
|
138
|
-
console.log(`Example API listening at http://localhost:${port}`)
|
|
139
|
-
})
|
|
139
|
+
console.log(`Example API listening at http://localhost:${port}`)
|
|
140
|
+
})
|
|
140
141
|
```
|
|
141
142
|
|
|
142
143
|
### :rocket: API Ready
|
|
@@ -152,15 +153,15 @@ app.listen(port, () => {
|
|
|
152
153
|
```ts
|
|
153
154
|
// frontend/code.ts
|
|
154
155
|
|
|
155
|
-
import { remult } from "remult"
|
|
156
|
-
import { Product } from "../shared/product"
|
|
156
|
+
import { remult } from "remult"
|
|
157
|
+
import { Product } from "../shared/product"
|
|
157
158
|
|
|
158
159
|
async function increasePriceOfTofu(priceIncrease: number) {
|
|
159
|
-
const productsRepo = remult.repo(Product)
|
|
160
|
+
const productsRepo = remult.repo(Product)
|
|
160
161
|
|
|
161
|
-
const product = await productsRepo.findFirst({ name: "Tofu" })
|
|
162
|
-
product.unitPrice += priceIncrease
|
|
163
|
-
productsRepo.save(product)
|
|
162
|
+
const product = await productsRepo.findFirst({ name: "Tofu" }) // filter is passed through API request all the way to the db
|
|
163
|
+
product.unitPrice += priceIncrease
|
|
164
|
+
productsRepo.save(product) // mutation request updates the db with no boilerplate code
|
|
164
165
|
}
|
|
165
166
|
```
|
|
166
167
|
|
|
@@ -180,46 +181,46 @@ static async increasePriceOfTofu(priceIncrease: number) {
|
|
|
180
181
|
### :ballot_box_with_check: Data validation and constraints - defined once
|
|
181
182
|
|
|
182
183
|
```ts
|
|
183
|
-
import { Entity, Fields, Validators } from "remult"
|
|
184
|
+
import { Entity, Fields, Validators } from "remult"
|
|
184
185
|
|
|
185
186
|
@Entity("products", {
|
|
186
|
-
allowApiCrud: true
|
|
187
|
+
allowApiCrud: true
|
|
187
188
|
})
|
|
188
189
|
export class Product {
|
|
189
190
|
@Fields.string({
|
|
190
|
-
validate: Validators.required
|
|
191
|
+
validate: Validators.required
|
|
191
192
|
})
|
|
192
|
-
name = ""
|
|
193
|
+
name = ""
|
|
193
194
|
|
|
194
195
|
@Fields.string<Product>({
|
|
195
196
|
validate: (product) => {
|
|
196
197
|
if (product.description.trim().length < 50) {
|
|
197
|
-
throw "too short"
|
|
198
|
+
throw "too short"
|
|
198
199
|
}
|
|
199
|
-
}
|
|
200
|
+
}
|
|
200
201
|
})
|
|
201
|
-
description = ""
|
|
202
|
+
description = ""
|
|
202
203
|
|
|
203
204
|
@Fields.number({
|
|
204
205
|
validate: (_, field) => {
|
|
205
206
|
if (field.value < 0) {
|
|
206
|
-
field.error = "must not be less than 0"
|
|
207
|
+
field.error = "must not be less than 0" // or: throw "must not be less than 0";
|
|
207
208
|
}
|
|
208
|
-
}
|
|
209
|
+
}
|
|
209
210
|
})
|
|
210
|
-
unitPrice = 0
|
|
211
|
+
unitPrice = 0
|
|
211
212
|
}
|
|
212
213
|
```
|
|
213
214
|
|
|
214
215
|
### Enforced in frontend:
|
|
215
216
|
|
|
216
217
|
```ts
|
|
217
|
-
const product = productsRepo.create()
|
|
218
|
+
const product = productsRepo.create()
|
|
218
219
|
|
|
219
220
|
try {
|
|
220
|
-
await productsRepo.save(product)
|
|
221
|
+
await productsRepo.save(product)
|
|
221
222
|
} catch (e: any) {
|
|
222
|
-
console.error(e.message)
|
|
223
|
+
console.error(e.message) // Browser console will display - "Name: required"
|
|
223
224
|
}
|
|
224
225
|
```
|
|
225
226
|
|
|
@@ -236,18 +237,18 @@ try {
|
|
|
236
237
|
```ts
|
|
237
238
|
@Entity<Article>("Articles", {
|
|
238
239
|
allowApiRead: true,
|
|
239
|
-
allowApiInsert: (remult) => remult.authenticated(),
|
|
240
|
-
allowApiUpdate: (
|
|
240
|
+
allowApiInsert: (_, remult) => remult.authenticated(),
|
|
241
|
+
allowApiUpdate: (article, remult) => article.author.id == remult.user.id
|
|
241
242
|
})
|
|
242
243
|
export class Article {
|
|
243
244
|
@Fields.string({ allowApiUpdate: false })
|
|
244
|
-
slug = ""
|
|
245
|
+
slug = ""
|
|
245
246
|
|
|
246
247
|
@Field(() => Profile, { allowApiUpdate: false })
|
|
247
|
-
author!: Profile
|
|
248
|
+
author!: Profile
|
|
248
249
|
|
|
249
250
|
@Fields.string()
|
|
250
|
-
content = ""
|
|
251
|
+
content = ""
|
|
251
252
|
}
|
|
252
253
|
```
|
|
253
254
|
|
package/SseSubscriptionServer.js
CHANGED
|
@@ -31,7 +31,7 @@ var SseSubscriptionServer = /** @class */ (function () {
|
|
|
31
31
|
delete c.channels[channel];
|
|
32
32
|
else
|
|
33
33
|
c.channels[channel] = true;
|
|
34
|
-
res.success({ status:
|
|
34
|
+
res.success({ status: 'ok' });
|
|
35
35
|
this.debug();
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
@@ -84,14 +84,14 @@ var SseSubscriptionServer = /** @class */ (function () {
|
|
|
84
84
|
res.writeHead(200, {
|
|
85
85
|
'Content-Type': 'text/event-stream',
|
|
86
86
|
'Cache-Control': 'no-cache',
|
|
87
|
-
|
|
87
|
+
Connection: 'keep-alive',
|
|
88
88
|
});
|
|
89
89
|
var cc = new clientConnection(res);
|
|
90
90
|
//const lastEventId = req.headers['last-event-id'];
|
|
91
91
|
this.connections.push(cc);
|
|
92
92
|
this.debug();
|
|
93
93
|
//@ts-ignore
|
|
94
|
-
req.on(
|
|
94
|
+
req.on('close', function () {
|
|
95
95
|
cc.close();
|
|
96
96
|
_this.connections = _this.connections.filter(function (s) { return s !== cc; });
|
|
97
97
|
_this.debug();
|
|
@@ -102,7 +102,7 @@ var SseSubscriptionServer = /** @class */ (function () {
|
|
|
102
102
|
SseSubscriptionServer.prototype.debug = function () {
|
|
103
103
|
this.debugFileSaver(this.connections.map(function (x) { return ({
|
|
104
104
|
id: x.connectionId,
|
|
105
|
-
channels: x.channels
|
|
105
|
+
channels: x.channels,
|
|
106
106
|
}); }));
|
|
107
107
|
};
|
|
108
108
|
return SseSubscriptionServer;
|
|
@@ -114,7 +114,7 @@ var clientConnection = /** @class */ (function () {
|
|
|
114
114
|
this.channels = {};
|
|
115
115
|
this.closed = false;
|
|
116
116
|
this.connectionId = uuid_1.v4();
|
|
117
|
-
this.write(this.connectionId,
|
|
117
|
+
this.write(this.connectionId, 'connectionId');
|
|
118
118
|
this.sendLiveMessage();
|
|
119
119
|
}
|
|
120
120
|
clientConnection.prototype.close = function () {
|
|
@@ -123,11 +123,11 @@ var clientConnection = /** @class */ (function () {
|
|
|
123
123
|
this.closed = true;
|
|
124
124
|
};
|
|
125
125
|
clientConnection.prototype.write = function (eventData, eventType) {
|
|
126
|
-
if (eventType === void 0) { eventType =
|
|
127
|
-
var event =
|
|
126
|
+
if (eventType === void 0) { eventType = 'message'; }
|
|
127
|
+
var event = 'event:' + eventType;
|
|
128
128
|
// if (id != undefined)
|
|
129
129
|
// event += "\nid:" + id;
|
|
130
|
-
this.response.write(event +
|
|
130
|
+
this.response.write(event + '\ndata:' + eventData + '\n\n');
|
|
131
131
|
if (this.response.flush)
|
|
132
132
|
this.response.flush();
|
|
133
133
|
};
|
|
@@ -135,7 +135,7 @@ var clientConnection = /** @class */ (function () {
|
|
|
135
135
|
var _this = this;
|
|
136
136
|
if (this.closed)
|
|
137
137
|
return;
|
|
138
|
-
this.write(
|
|
138
|
+
this.write('', 'keep-alive');
|
|
139
139
|
this.timeOutRef = setTimeout(function () {
|
|
140
140
|
_this.sendLiveMessage();
|
|
141
141
|
}, 45000);
|
package/ably.js
CHANGED
|
@@ -22,7 +22,7 @@ export class SseSubscriptionServer {
|
|
|
22
22
|
delete c.channels[channel];
|
|
23
23
|
else
|
|
24
24
|
c.channels[channel] = true;
|
|
25
|
-
res.success({ status:
|
|
25
|
+
res.success({ status: 'ok' });
|
|
26
26
|
this.debug();
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
@@ -49,25 +49,25 @@ export class SseSubscriptionServer {
|
|
|
49
49
|
res.writeHead(200, {
|
|
50
50
|
'Content-Type': 'text/event-stream',
|
|
51
51
|
'Cache-Control': 'no-cache',
|
|
52
|
-
|
|
52
|
+
Connection: 'keep-alive',
|
|
53
53
|
});
|
|
54
54
|
const cc = new clientConnection(res);
|
|
55
55
|
//const lastEventId = req.headers['last-event-id'];
|
|
56
56
|
this.connections.push(cc);
|
|
57
57
|
this.debug();
|
|
58
58
|
//@ts-ignore
|
|
59
|
-
req.on(
|
|
59
|
+
req.on('close', () => {
|
|
60
60
|
cc.close();
|
|
61
|
-
this.connections = this.connections.filter(s => s !== cc);
|
|
61
|
+
this.connections = this.connections.filter((s) => s !== cc);
|
|
62
62
|
this.debug();
|
|
63
63
|
});
|
|
64
64
|
return cc;
|
|
65
65
|
}
|
|
66
66
|
//@internal
|
|
67
67
|
debug() {
|
|
68
|
-
this.debugFileSaver(this.connections.map(x => ({
|
|
68
|
+
this.debugFileSaver(this.connections.map((x) => ({
|
|
69
69
|
id: x.connectionId,
|
|
70
|
-
channels: x.channels
|
|
70
|
+
channels: x.channels,
|
|
71
71
|
})));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -77,7 +77,7 @@ export class clientConnection {
|
|
|
77
77
|
this.channels = {};
|
|
78
78
|
this.closed = false;
|
|
79
79
|
this.connectionId = uuid();
|
|
80
|
-
this.write(this.connectionId,
|
|
80
|
+
this.write(this.connectionId, 'connectionId');
|
|
81
81
|
this.sendLiveMessage();
|
|
82
82
|
}
|
|
83
83
|
close() {
|
|
@@ -85,18 +85,18 @@ export class clientConnection {
|
|
|
85
85
|
clearTimeout(this.timeOutRef);
|
|
86
86
|
this.closed = true;
|
|
87
87
|
}
|
|
88
|
-
write(eventData, eventType =
|
|
89
|
-
let event =
|
|
88
|
+
write(eventData, eventType = 'message') {
|
|
89
|
+
let event = 'event:' + eventType;
|
|
90
90
|
// if (id != undefined)
|
|
91
91
|
// event += "\nid:" + id;
|
|
92
|
-
this.response.write(event +
|
|
92
|
+
this.response.write(event + '\ndata:' + eventData + '\n\n');
|
|
93
93
|
if (this.response.flush)
|
|
94
94
|
this.response.flush();
|
|
95
95
|
}
|
|
96
96
|
sendLiveMessage() {
|
|
97
97
|
if (this.closed)
|
|
98
98
|
return;
|
|
99
|
-
this.write(
|
|
99
|
+
this.write('', 'keep-alive');
|
|
100
100
|
this.timeOutRef = setTimeout(() => {
|
|
101
101
|
this.sendLiveMessage();
|
|
102
102
|
}, 45000);
|
package/esm/ably.js
CHANGED
|
@@ -9,12 +9,12 @@ export class AblySubscriptionClient {
|
|
|
9
9
|
},
|
|
10
10
|
subscribe: async (channel, handler) => {
|
|
11
11
|
let myHandler = (y) => handler(y.data);
|
|
12
|
-
await this.ably.channels.get(channel).subscribe(y => myHandler(y));
|
|
12
|
+
await this.ably.channels.get(channel).subscribe((y) => myHandler(y));
|
|
13
13
|
return () => {
|
|
14
14
|
myHandler = () => { };
|
|
15
15
|
this.ably.channels.get(channel).unsubscribe();
|
|
16
16
|
};
|
|
17
|
-
}
|
|
17
|
+
},
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/public_api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/public_api';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { FieldMetadata, FieldRef, EntityMetadata, ValueListItem, Remult, Repository, EntityOrderBy, EntityFilter } from "remult";
|
|
2
|
+
import { DataControlInfo, DataControlSettings, ValueOrEntityExpression } from "./data-control-interfaces";
|
|
3
|
+
import { FilterHelper } from "./filter-helper";
|
|
4
|
+
export declare class FieldCollection<rowType = any> {
|
|
5
|
+
currentRow: () => any;
|
|
6
|
+
private allowUpdate;
|
|
7
|
+
filterHelper: FilterHelper<rowType>;
|
|
8
|
+
private showArea;
|
|
9
|
+
private _getRowColumn;
|
|
10
|
+
constructor(currentRow: () => any, allowUpdate: () => boolean, filterHelper: FilterHelper<rowType>, showArea: () => boolean, _getRowColumn: (row: rowType, col: FieldMetadata) => FieldRef<any, any>);
|
|
11
|
+
__showArea(): boolean;
|
|
12
|
+
__getColumn(map: DataControlSettings, record: any): any;
|
|
13
|
+
__visible(col: DataControlSettings, row: any): boolean;
|
|
14
|
+
allowClick(col: DataControlSettings<any, any>, row: any): boolean;
|
|
15
|
+
getRowColumn<T>(args: {
|
|
16
|
+
col: DataControlSettings<any>;
|
|
17
|
+
row: any;
|
|
18
|
+
}, what: (c: FieldRef<any, any>, row: any) => T): T;
|
|
19
|
+
__dataControlStyle(map: DataControlSettings): string;
|
|
20
|
+
private settingsByKey;
|
|
21
|
+
allowDesignMode: boolean;
|
|
22
|
+
add(...columns: DataControlInfo<rowType>[]): Promise<void>;
|
|
23
|
+
add(...columns: string[]): Promise<void>;
|
|
24
|
+
private doWhenWeHaveContext;
|
|
25
|
+
private remult;
|
|
26
|
+
setContext(remult: Remult): void;
|
|
27
|
+
buildDropDown(s: DataControlSettings): Promise<void>;
|
|
28
|
+
designMode: boolean;
|
|
29
|
+
colListChanged(): void;
|
|
30
|
+
_colListChangeListeners: (() => void)[];
|
|
31
|
+
onColListChange(action: (() => void)): void;
|
|
32
|
+
moveCol(col: DataControlSettings, move: number): void;
|
|
33
|
+
filterRows(col: DataControlSettings): void;
|
|
34
|
+
clearFilter(col: DataControlSettings): void;
|
|
35
|
+
_shouldShowFilterDialog(col: DataControlSettings): boolean;
|
|
36
|
+
deleteCol(col: DataControlSettings): void;
|
|
37
|
+
addCol(col: DataControlSettings, newCol: DataControlSettings): void;
|
|
38
|
+
_getEditable(col: DataControlSettings, row: rowType): boolean;
|
|
39
|
+
_click(col: DataControlSettings, row: any): void;
|
|
40
|
+
_getColDisplayValue(col: DataControlSettings, row: rowType): any;
|
|
41
|
+
_getColDataType(col: DataControlSettings): string;
|
|
42
|
+
_getColumnClass(col: DataControlSettings, row: any): any;
|
|
43
|
+
_getError(col: DataControlSettings, r: any): any;
|
|
44
|
+
autoGenerateColumnsBasedOnData(defs: EntityMetadata<any>): void;
|
|
45
|
+
__changeWidth(col: DataControlSettings, what: number): void;
|
|
46
|
+
_colValueChanged(col: DataControlSettings, row: any): false | undefined;
|
|
47
|
+
items: DataControlSettings[];
|
|
48
|
+
private gridColumns;
|
|
49
|
+
private nonGridColumns;
|
|
50
|
+
numOfColumnsInGrid: number;
|
|
51
|
+
private _lastColumnCount;
|
|
52
|
+
private _lastNumOfColumnsInGrid;
|
|
53
|
+
private augmented;
|
|
54
|
+
augment(augmenter: dataControlAugmenter, s: DataControlSettings): void;
|
|
55
|
+
private _initColumnsArrays;
|
|
56
|
+
getGridColumns(augmenter: dataControlAugmenter): DataControlSettings<any, any>[];
|
|
57
|
+
getNonGridColumns(augmenter: dataControlAugmenter): DataControlSettings<any, any>[];
|
|
58
|
+
}
|
|
59
|
+
export declare function valueOrEntityExpressionToValue<T, entityType>(f: ValueOrEntityExpression<T, entityType>, e: entityType): T;
|
|
60
|
+
/** returns an array of values that can be used in the value list property of a data control object */
|
|
61
|
+
export declare function getEntityValueList<T>(repository: Repository<T>, args?: {
|
|
62
|
+
idField?: (e: EntityMetadata<T>) => FieldMetadata;
|
|
63
|
+
captionField?: (e: EntityMetadata<T>) => FieldMetadata;
|
|
64
|
+
orderBy?: EntityOrderBy<T>;
|
|
65
|
+
where?: EntityFilter<T>;
|
|
66
|
+
}): Promise<ExtendedValueListItem[]>;
|
|
67
|
+
export interface ExtendedValueListItem extends ValueListItem {
|
|
68
|
+
entity?: any;
|
|
69
|
+
}
|
|
70
|
+
export declare type dataControlAugmenter = (f: FieldMetadata, op: DataControlSettings) => void;
|