breeze-client 2.1.2 → 2.1.3-mjs
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/LICENSE +1 -1
- package/adapter-ajax-angularjs/{breeze-client-adapter-ajax-angularjs.d.ts → index.d.ts} +1 -0
- package/adapter-ajax-fetch/{breeze-client-adapter-ajax-fetch.d.ts → index.d.ts} +1 -0
- package/adapter-ajax-httpclient/{breeze-client-adapter-ajax-httpclient.d.ts → index.d.ts} +1 -0
- package/adapter-ajax-jquery/{breeze-client-adapter-ajax-jquery.d.ts → index.d.ts} +1 -0
- package/adapter-ajax-post/{breeze-client-adapter-ajax-post.d.ts → index.d.ts} +1 -0
- package/adapter-data-service-odata/{breeze-client-adapter-data-service-odata.d.ts → index.d.ts} +1 -0
- package/adapter-data-service-webapi/{breeze-client-adapter-data-service-webapi.d.ts → index.d.ts} +1 -0
- package/adapter-model-library-backing-store/{breeze-client-adapter-model-library-backing-store.d.ts → index.d.ts} +1 -0
- package/adapter-model-library-ko/{breeze-client-adapter-model-library-ko.d.ts → index.d.ts} +1 -0
- package/adapter-uri-builder-json/{breeze-client-adapter-uri-builder-json.d.ts → index.d.ts} +1 -0
- package/adapter-uri-builder-odata/{breeze-client-adapter-uri-builder-odata.d.ts → index.d.ts} +1 -0
- package/esm2020/adapter-ajax-angularjs/adapter-ajax-angularjs.mjs +130 -0
- package/esm2020/adapter-ajax-angularjs/adapter-core.mjs +49 -0
- package/esm2020/adapter-ajax-angularjs/breeze-client-adapter-ajax-angularjs.mjs +5 -0
- package/esm2020/adapter-ajax-fetch/adapter-ajax-fetch.mjs +132 -0
- package/esm2020/adapter-ajax-fetch/adapter-core.mjs +49 -0
- package/esm2020/adapter-ajax-fetch/breeze-client-adapter-ajax-fetch.mjs +5 -0
- package/esm2020/adapter-ajax-httpclient/adapter-ajax-httpclient.mjs +137 -0
- package/esm2020/adapter-ajax-httpclient/adapter-core.mjs +49 -0
- package/esm2020/adapter-ajax-httpclient/breeze-client-adapter-ajax-httpclient.mjs +5 -0
- package/esm2020/adapter-ajax-jquery/adapter-ajax-jquery.mjs +103 -0
- package/esm2020/adapter-ajax-jquery/breeze-client-adapter-ajax-jquery.mjs +5 -0
- package/esm2020/adapter-ajax-post/adapter-ajax-post.mjs +77 -0
- package/esm2020/adapter-ajax-post/breeze-client-adapter-ajax-post.mjs +5 -0
- package/esm2020/adapter-data-service-odata/adapter-core.mjs +49 -0
- package/esm2020/adapter-data-service-odata/adapter-data-service-odata.mjs +456 -0
- package/esm2020/adapter-data-service-odata/breeze-client-adapter-data-service-odata.mjs +5 -0
- package/esm2020/adapter-data-service-webapi/adapter-data-service-webapi.mjs +93 -0
- package/esm2020/adapter-data-service-webapi/breeze-client-adapter-data-service-webapi.mjs +5 -0
- package/esm2020/adapter-model-library-backing-store/adapter-model-library-backing-store.mjs +268 -0
- package/esm2020/adapter-model-library-backing-store/breeze-client-adapter-model-library-backing-store.mjs +5 -0
- package/esm2020/adapter-model-library-ko/adapter-model-library-ko.mjs +240 -0
- package/esm2020/adapter-model-library-ko/breeze-client-adapter-model-library-ko.mjs +5 -0
- package/esm2020/adapter-uri-builder-json/adapter-core.mjs +49 -0
- package/esm2020/adapter-uri-builder-json/adapter-uri-builder-json.mjs +36 -0
- package/esm2020/adapter-uri-builder-json/breeze-client-adapter-uri-builder-json.mjs +5 -0
- package/esm2020/adapter-uri-builder-odata/adapter-core.mjs +49 -0
- package/esm2020/adapter-uri-builder-odata/adapter-uri-builder-odata.mjs +190 -0
- package/esm2020/adapter-uri-builder-odata/breeze-client-adapter-uri-builder-odata.mjs +5 -0
- package/esm2020/breeze-client.mjs +5 -0
- package/esm2020/index.mjs +2 -0
- package/esm2020/mixin-get-entity-graph/breeze-client-mixin-get-entity-graph.mjs +5 -0
- package/esm2020/mixin-get-entity-graph/mixin-get-entity-graph.mjs +269 -0
- package/esm2020/mixin-save-queuing/breeze-client-mixin-save-queuing.mjs +5 -0
- package/esm2020/mixin-save-queuing/mixin-save-queuing.mjs +400 -0
- package/esm2020/src/abstract-data-service-adapter.mjs +296 -0
- package/esm2020/src/array.mjs +4 -0
- package/esm2020/src/assert-param.mjs +312 -0
- package/esm2020/src/breeze.mjs +85 -0
- package/esm2020/src/complex-array.mjs +117 -0
- package/esm2020/src/config.mjs +223 -0
- package/esm2020/src/core.mjs +707 -0
- package/esm2020/src/csdl-metadata-parser.mjs +385 -0
- package/esm2020/src/data-service.mjs +203 -0
- package/esm2020/src/data-type.mjs +444 -0
- package/esm2020/src/default-property-interceptor.mjs +460 -0
- package/esm2020/src/entity-action.mjs +45 -0
- package/esm2020/src/entity-aspect.mjs +806 -0
- package/esm2020/src/entity-group.mjs +187 -0
- package/esm2020/src/entity-key.mjs +116 -0
- package/esm2020/src/entity-manager.mjs +2094 -0
- package/esm2020/src/entity-metadata.mjs +2109 -0
- package/esm2020/src/entity-query.mjs +996 -0
- package/esm2020/src/entity-state.mjs +99 -0
- package/esm2020/src/enum.mjs +141 -0
- package/esm2020/src/event.mjs +256 -0
- package/esm2020/src/interface-registry.mjs +41 -0
- package/esm2020/src/key-generator.mjs +108 -0
- package/esm2020/src/local-query-comparison-options.mjs +65 -0
- package/esm2020/src/mapping-context.mjs +405 -0
- package/esm2020/src/naming-convention.mjs +88 -0
- package/esm2020/src/observable-array.mjs +183 -0
- package/esm2020/src/predicate.mjs +1232 -0
- package/esm2020/src/primitive-array.mjs +85 -0
- package/esm2020/src/query-options.mjs +152 -0
- package/esm2020/src/relation-array.mjs +173 -0
- package/esm2020/src/save-options.mjs +41 -0
- package/esm2020/src/unattached-children-map.mjs +58 -0
- package/esm2020/src/validate.mjs +988 -0
- package/esm2020/src/validation-options.mjs +64 -0
- package/fesm2015/{breeze-client-adapter-ajax-angularjs.js → breeze-client-adapter-ajax-angularjs.mjs} +1 -1
- package/fesm2015/breeze-client-adapter-ajax-angularjs.mjs.map +1 -0
- package/fesm2015/{breeze-client-adapter-ajax-fetch.js → breeze-client-adapter-ajax-fetch.mjs} +5 -3
- package/fesm2015/breeze-client-adapter-ajax-fetch.mjs.map +1 -0
- package/fesm2015/{breeze-client-adapter-ajax-httpclient.js → breeze-client-adapter-ajax-httpclient.mjs} +1 -1
- package/fesm2015/breeze-client-adapter-ajax-httpclient.mjs.map +1 -0
- package/fesm2015/{breeze-client-adapter-ajax-jquery.js → breeze-client-adapter-ajax-jquery.mjs} +2 -2
- package/fesm2015/breeze-client-adapter-ajax-jquery.mjs.map +1 -0
- package/fesm2015/{breeze-client-adapter-ajax-post.js → breeze-client-adapter-ajax-post.mjs} +1 -1
- package/fesm2015/breeze-client-adapter-ajax-post.mjs.map +1 -0
- package/fesm2015/{breeze-client-adapter-data-service-odata.js → breeze-client-adapter-data-service-odata.mjs} +20 -22
- package/fesm2015/breeze-client-adapter-data-service-odata.mjs.map +1 -0
- package/fesm2015/{breeze-client-adapter-data-service-webapi.js → breeze-client-adapter-data-service-webapi.mjs} +13 -13
- package/fesm2015/breeze-client-adapter-data-service-webapi.mjs.map +1 -0
- package/fesm2015/{breeze-client-adapter-model-library-backing-store.js → breeze-client-adapter-model-library-backing-store.mjs} +13 -13
- package/fesm2015/breeze-client-adapter-model-library-backing-store.mjs.map +1 -0
- package/fesm2015/{breeze-client-adapter-model-library-ko.js → breeze-client-adapter-model-library-ko.mjs} +13 -13
- package/fesm2015/breeze-client-adapter-model-library-ko.mjs.map +1 -0
- package/fesm2015/{breeze-client-adapter-uri-builder-json.js → breeze-client-adapter-uri-builder-json.mjs} +8 -8
- package/fesm2015/breeze-client-adapter-uri-builder-json.mjs.map +1 -0
- package/fesm2015/{breeze-client-adapter-uri-builder-odata.js → breeze-client-adapter-uri-builder-odata.mjs} +85 -86
- package/fesm2015/breeze-client-adapter-uri-builder-odata.mjs.map +1 -0
- package/fesm2015/{breeze-client-mixin-get-entity-graph.js → breeze-client-mixin-get-entity-graph.mjs} +1 -1
- package/fesm2015/breeze-client-mixin-get-entity-graph.mjs.map +1 -0
- package/fesm2015/{breeze-client-mixin-save-queuing.js → breeze-client-mixin-save-queuing.mjs} +1 -1
- package/fesm2015/breeze-client-mixin-save-queuing.mjs.map +1 -0
- package/fesm2015/{breeze-client.js → breeze-client.mjs} +417 -422
- package/fesm2015/breeze-client.mjs.map +1 -0
- package/{fesm5/breeze-client-adapter-ajax-angularjs.js → fesm2020/breeze-client-adapter-ajax-angularjs.mjs} +41 -42
- package/fesm2020/breeze-client-adapter-ajax-angularjs.mjs.map +1 -0
- package/{fesm5/breeze-client-adapter-ajax-fetch.js → fesm2020/breeze-client-adapter-ajax-fetch.mjs} +44 -43
- package/fesm2020/breeze-client-adapter-ajax-fetch.mjs.map +1 -0
- package/{fesm5/breeze-client-adapter-ajax-httpclient.js → fesm2020/breeze-client-adapter-ajax-httpclient.mjs} +43 -44
- package/fesm2020/breeze-client-adapter-ajax-httpclient.mjs.map +1 -0
- package/{fesm5/breeze-client-adapter-ajax-jquery.js → fesm2020/breeze-client-adapter-ajax-jquery.mjs} +18 -19
- package/fesm2020/breeze-client-adapter-ajax-jquery.mjs.map +1 -0
- package/{fesm5/breeze-client-adapter-ajax-post.js → fesm2020/breeze-client-adapter-ajax-post.mjs} +8 -11
- package/fesm2020/breeze-client-adapter-ajax-post.mjs.map +1 -0
- package/{fesm5/breeze-client-adapter-data-service-odata.js → fesm2020/breeze-client-adapter-data-service-odata.mjs} +126 -134
- package/fesm2020/breeze-client-adapter-data-service-odata.mjs.map +1 -0
- package/{fesm5/breeze-client-adapter-data-service-webapi.js → fesm2020/breeze-client-adapter-data-service-webapi.mjs} +38 -42
- package/fesm2020/breeze-client-adapter-data-service-webapi.mjs.map +1 -0
- package/{fesm5/breeze-client-adapter-model-library-backing-store.js → fesm2020/breeze-client-adapter-model-library-backing-store.mjs} +63 -64
- package/fesm2020/breeze-client-adapter-model-library-backing-store.mjs.map +1 -0
- package/{fesm5/breeze-client-adapter-model-library-ko.js → fesm2020/breeze-client-adapter-model-library-ko.mjs} +57 -58
- package/fesm2020/breeze-client-adapter-model-library-ko.mjs.map +1 -0
- package/fesm2020/breeze-client-adapter-uri-builder-json.mjs +91 -0
- package/fesm2020/breeze-client-adapter-uri-builder-json.mjs.map +1 -0
- package/fesm2020/breeze-client-adapter-uri-builder-odata.mjs +245 -0
- package/fesm2020/breeze-client-adapter-uri-builder-odata.mjs.map +1 -0
- package/{fesm5/breeze-client-mixin-get-entity-graph.js → fesm2020/breeze-client-mixin-get-entity-graph.mjs} +45 -45
- package/fesm2020/breeze-client-mixin-get-entity-graph.mjs.map +1 -0
- package/{fesm5/breeze-client-mixin-save-queuing.js → fesm2020/breeze-client-mixin-save-queuing.mjs} +116 -126
- package/fesm2020/breeze-client-mixin-save-queuing.mjs.map +1 -0
- package/{fesm5/breeze-client.js → fesm2020/breeze-client.mjs} +3403 -3615
- package/fesm2020/breeze-client.mjs.map +1 -0
- package/mixin-get-entity-graph/{breeze-client-mixin-get-entity-graph.d.ts → index.d.ts} +1 -0
- package/mixin-save-queuing/{breeze-client-mixin-save-queuing.d.ts → index.d.ts} +1 -0
- package/package.json +126 -12
- package/src/entity-metadata.d.ts +6 -4
- package/src/entity-query.d.ts +1 -1
- package/adapter-ajax-angularjs/breeze-client-adapter-ajax-angularjs.metadata.json +0 -1
- package/adapter-ajax-angularjs/package.json +0 -13
- package/adapter-ajax-fetch/breeze-client-adapter-ajax-fetch.metadata.json +0 -1
- package/adapter-ajax-fetch/package.json +0 -13
- package/adapter-ajax-httpclient/breeze-client-adapter-ajax-httpclient.metadata.json +0 -1
- package/adapter-ajax-httpclient/package.json +0 -17
- package/adapter-ajax-jquery/breeze-client-adapter-ajax-jquery.metadata.json +0 -1
- package/adapter-ajax-jquery/package.json +0 -13
- package/adapter-ajax-post/breeze-client-adapter-ajax-post.metadata.json +0 -1
- package/adapter-ajax-post/package.json +0 -13
- package/adapter-data-service-odata/breeze-client-adapter-data-service-odata.metadata.json +0 -1
- package/adapter-data-service-odata/package.json +0 -13
- package/adapter-data-service-webapi/breeze-client-adapter-data-service-webapi.metadata.json +0 -1
- package/adapter-data-service-webapi/package.json +0 -13
- package/adapter-model-library-backing-store/breeze-client-adapter-model-library-backing-store.metadata.json +0 -1
- package/adapter-model-library-backing-store/package.json +0 -13
- package/adapter-model-library-ko/breeze-client-adapter-model-library-ko.metadata.json +0 -1
- package/adapter-model-library-ko/package.json +0 -13
- package/adapter-uri-builder-json/breeze-client-adapter-uri-builder-json.metadata.json +0 -1
- package/adapter-uri-builder-json/package.json +0 -13
- package/adapter-uri-builder-odata/breeze-client-adapter-uri-builder-odata.metadata.json +0 -1
- package/adapter-uri-builder-odata/package.json +0 -13
- package/breeze-client.d.ts +0 -8
- package/breeze-client.metadata.json +0 -1
- package/bundles/breeze-client-adapter-ajax-angularjs.umd.js +0 -190
- package/bundles/breeze-client-adapter-ajax-angularjs.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-ajax-angularjs.umd.min.js +0 -2
- package/bundles/breeze-client-adapter-ajax-angularjs.umd.min.js.map +0 -1
- package/bundles/breeze-client-adapter-ajax-fetch.umd.js +0 -190
- package/bundles/breeze-client-adapter-ajax-fetch.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-ajax-fetch.umd.min.js +0 -2
- package/bundles/breeze-client-adapter-ajax-fetch.umd.min.js.map +0 -1
- package/bundles/breeze-client-adapter-ajax-httpclient.umd.js +0 -195
- package/bundles/breeze-client-adapter-ajax-httpclient.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-ajax-httpclient.umd.min.js +0 -2
- package/bundles/breeze-client-adapter-ajax-httpclient.umd.min.js.map +0 -1
- package/bundles/breeze-client-adapter-ajax-jquery.umd.js +0 -115
- package/bundles/breeze-client-adapter-ajax-jquery.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-ajax-jquery.umd.min.js +0 -2
- package/bundles/breeze-client-adapter-ajax-jquery.umd.min.js.map +0 -1
- package/bundles/breeze-client-adapter-ajax-post.umd.js +0 -92
- package/bundles/breeze-client-adapter-ajax-post.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-ajax-post.umd.min.js +0 -2
- package/bundles/breeze-client-adapter-ajax-post.umd.min.js.map +0 -1
- package/bundles/breeze-client-adapter-data-service-odata.umd.js +0 -743
- package/bundles/breeze-client-adapter-data-service-odata.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-data-service-odata.umd.min.js +0 -16
- package/bundles/breeze-client-adapter-data-service-odata.umd.min.js.map +0 -1
- package/bundles/breeze-client-adapter-data-service-webapi.umd.js +0 -326
- package/bundles/breeze-client-adapter-data-service-webapi.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-data-service-webapi.umd.min.js +0 -16
- package/bundles/breeze-client-adapter-data-service-webapi.umd.min.js.map +0 -1
- package/bundles/breeze-client-adapter-model-library-backing-store.umd.js +0 -280
- package/bundles/breeze-client-adapter-model-library-backing-store.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-model-library-backing-store.umd.min.js +0 -2
- package/bundles/breeze-client-adapter-model-library-backing-store.umd.min.js.map +0 -1
- package/bundles/breeze-client-adapter-model-library-ko.umd.js +0 -252
- package/bundles/breeze-client-adapter-model-library-ko.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-model-library-ko.umd.min.js +0 -2
- package/bundles/breeze-client-adapter-model-library-ko.umd.min.js.map +0 -1
- package/bundles/breeze-client-adapter-uri-builder-json.umd.js +0 -96
- package/bundles/breeze-client-adapter-uri-builder-json.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-uri-builder-json.umd.min.js +0 -2
- package/bundles/breeze-client-adapter-uri-builder-json.umd.min.js.map +0 -1
- package/bundles/breeze-client-adapter-uri-builder-odata.umd.js +0 -262
- package/bundles/breeze-client-adapter-uri-builder-odata.umd.js.map +0 -1
- package/bundles/breeze-client-adapter-uri-builder-odata.umd.min.js +0 -2
- package/bundles/breeze-client-adapter-uri-builder-odata.umd.min.js.map +0 -1
- package/bundles/breeze-client-mixin-get-entity-graph.umd.js +0 -258
- package/bundles/breeze-client-mixin-get-entity-graph.umd.js.map +0 -1
- package/bundles/breeze-client-mixin-get-entity-graph.umd.min.js +0 -2
- package/bundles/breeze-client-mixin-get-entity-graph.umd.min.js.map +0 -1
- package/bundles/breeze-client-mixin-save-queuing.umd.js +0 -579
- package/bundles/breeze-client-mixin-save-queuing.umd.js.map +0 -1
- package/bundles/breeze-client-mixin-save-queuing.umd.min.js +0 -16
- package/bundles/breeze-client-mixin-save-queuing.umd.min.js.map +0 -1
- package/bundles/breeze-client.umd.js +0 -14094
- package/bundles/breeze-client.umd.js.map +0 -1
- package/bundles/breeze-client.umd.min.js +0 -16
- package/bundles/breeze-client.umd.min.js.map +0 -1
- package/esm2015/adapter-ajax-angularjs/adapter-ajax-angularjs.js +0 -130
- package/esm2015/adapter-ajax-angularjs/adapter-core.js +0 -49
- package/esm2015/adapter-ajax-angularjs/breeze-client-adapter-ajax-angularjs.js +0 -5
- package/esm2015/adapter-ajax-fetch/adapter-ajax-fetch.js +0 -130
- package/esm2015/adapter-ajax-fetch/adapter-core.js +0 -49
- package/esm2015/adapter-ajax-fetch/breeze-client-adapter-ajax-fetch.js +0 -5
- package/esm2015/adapter-ajax-httpclient/adapter-ajax-httpclient.js +0 -137
- package/esm2015/adapter-ajax-httpclient/adapter-core.js +0 -49
- package/esm2015/adapter-ajax-httpclient/breeze-client-adapter-ajax-httpclient.js +0 -5
- package/esm2015/adapter-ajax-jquery/adapter-ajax-jquery.js +0 -103
- package/esm2015/adapter-ajax-jquery/breeze-client-adapter-ajax-jquery.js +0 -5
- package/esm2015/adapter-ajax-post/adapter-ajax-post.js +0 -77
- package/esm2015/adapter-ajax-post/breeze-client-adapter-ajax-post.js +0 -5
- package/esm2015/adapter-data-service-odata/adapter-core.js +0 -49
- package/esm2015/adapter-data-service-odata/adapter-data-service-odata.js +0 -459
- package/esm2015/adapter-data-service-odata/breeze-client-adapter-data-service-odata.js +0 -5
- package/esm2015/adapter-data-service-webapi/adapter-data-service-webapi.js +0 -93
- package/esm2015/adapter-data-service-webapi/breeze-client-adapter-data-service-webapi.js +0 -5
- package/esm2015/adapter-model-library-backing-store/adapter-model-library-backing-store.js +0 -268
- package/esm2015/adapter-model-library-backing-store/breeze-client-adapter-model-library-backing-store.js +0 -5
- package/esm2015/adapter-model-library-ko/adapter-model-library-ko.js +0 -240
- package/esm2015/adapter-model-library-ko/breeze-client-adapter-model-library-ko.js +0 -5
- package/esm2015/adapter-uri-builder-json/adapter-core.js +0 -49
- package/esm2015/adapter-uri-builder-json/adapter-uri-builder-json.js +0 -36
- package/esm2015/adapter-uri-builder-json/breeze-client-adapter-uri-builder-json.js +0 -5
- package/esm2015/adapter-uri-builder-odata/adapter-core.js +0 -49
- package/esm2015/adapter-uri-builder-odata/adapter-uri-builder-odata.js +0 -192
- package/esm2015/adapter-uri-builder-odata/breeze-client-adapter-uri-builder-odata.js +0 -5
- package/esm2015/breeze-client.js +0 -9
- package/esm2015/index.js +0 -2
- package/esm2015/mixin-get-entity-graph/breeze-client-mixin-get-entity-graph.js +0 -5
- package/esm2015/mixin-get-entity-graph/mixin-get-entity-graph.js +0 -269
- package/esm2015/mixin-save-queuing/breeze-client-mixin-save-queuing.js +0 -5
- package/esm2015/mixin-save-queuing/mixin-save-queuing.js +0 -400
- package/esm2015/public_api.js +0 -2
- package/esm2015/src/abstract-data-service-adapter.js +0 -296
- package/esm2015/src/array.js +0 -4
- package/esm2015/src/assert-param.js +0 -312
- package/esm2015/src/breeze.js +0 -85
- package/esm2015/src/complex-array.js +0 -119
- package/esm2015/src/config.js +0 -223
- package/esm2015/src/core.js +0 -706
- package/esm2015/src/csdl-metadata-parser.js +0 -385
- package/esm2015/src/data-service.js +0 -203
- package/esm2015/src/data-type.js +0 -444
- package/esm2015/src/default-property-interceptor.js +0 -459
- package/esm2015/src/entity-action.js +0 -45
- package/esm2015/src/entity-aspect.js +0 -806
- package/esm2015/src/entity-group.js +0 -187
- package/esm2015/src/entity-key.js +0 -116
- package/esm2015/src/entity-manager.js +0 -2094
- package/esm2015/src/entity-metadata.js +0 -2109
- package/esm2015/src/entity-query.js +0 -996
- package/esm2015/src/entity-state.js +0 -99
- package/esm2015/src/enum.js +0 -141
- package/esm2015/src/event.js +0 -256
- package/esm2015/src/interface-registry.js +0 -41
- package/esm2015/src/key-generator.js +0 -108
- package/esm2015/src/local-query-comparison-options.js +0 -65
- package/esm2015/src/mapping-context.js +0 -405
- package/esm2015/src/naming-convention.js +0 -88
- package/esm2015/src/observable-array.js +0 -185
- package/esm2015/src/predicate.js +0 -1235
- package/esm2015/src/primitive-array.js +0 -87
- package/esm2015/src/query-options.js +0 -152
- package/esm2015/src/relation-array.js +0 -175
- package/esm2015/src/save-options.js +0 -41
- package/esm2015/src/unattached-children-map.js +0 -58
- package/esm2015/src/validate.js +0 -991
- package/esm2015/src/validation-options.js +0 -64
- package/esm5/adapter-ajax-angularjs/adapter-ajax-angularjs.js +0 -132
- package/esm5/adapter-ajax-angularjs/adapter-core.js +0 -49
- package/esm5/adapter-ajax-angularjs/breeze-client-adapter-ajax-angularjs.js +0 -5
- package/esm5/adapter-ajax-fetch/adapter-ajax-fetch.js +0 -132
- package/esm5/adapter-ajax-fetch/adapter-core.js +0 -49
- package/esm5/adapter-ajax-fetch/breeze-client-adapter-ajax-fetch.js +0 -5
- package/esm5/adapter-ajax-httpclient/adapter-ajax-httpclient.js +0 -139
- package/esm5/adapter-ajax-httpclient/adapter-core.js +0 -49
- package/esm5/adapter-ajax-httpclient/breeze-client-adapter-ajax-httpclient.js +0 -5
- package/esm5/adapter-ajax-jquery/adapter-ajax-jquery.js +0 -105
- package/esm5/adapter-ajax-jquery/breeze-client-adapter-ajax-jquery.js +0 -5
- package/esm5/adapter-ajax-post/adapter-ajax-post.js +0 -81
- package/esm5/adapter-ajax-post/breeze-client-adapter-ajax-post.js +0 -5
- package/esm5/adapter-data-service-odata/adapter-core.js +0 -49
- package/esm5/adapter-data-service-odata/adapter-data-service-odata.js +0 -466
- package/esm5/adapter-data-service-odata/breeze-client-adapter-data-service-odata.js +0 -5
- package/esm5/adapter-data-service-webapi/adapter-data-service-webapi.js +0 -98
- package/esm5/adapter-data-service-webapi/breeze-client-adapter-data-service-webapi.js +0 -5
- package/esm5/adapter-model-library-backing-store/adapter-model-library-backing-store.js +0 -270
- package/esm5/adapter-model-library-backing-store/breeze-client-adapter-model-library-backing-store.js +0 -5
- package/esm5/adapter-model-library-ko/adapter-model-library-ko.js +0 -242
- package/esm5/adapter-model-library-ko/breeze-client-adapter-model-library-ko.js +0 -5
- package/esm5/adapter-uri-builder-json/adapter-core.js +0 -49
- package/esm5/adapter-uri-builder-json/adapter-uri-builder-json.js +0 -38
- package/esm5/adapter-uri-builder-json/breeze-client-adapter-uri-builder-json.js +0 -5
- package/esm5/adapter-uri-builder-odata/adapter-core.js +0 -49
- package/esm5/adapter-uri-builder-odata/adapter-uri-builder-odata.js +0 -197
- package/esm5/adapter-uri-builder-odata/breeze-client-adapter-uri-builder-odata.js +0 -5
- package/esm5/breeze-client.js +0 -9
- package/esm5/index.js +0 -2
- package/esm5/mixin-get-entity-graph/breeze-client-mixin-get-entity-graph.js +0 -5
- package/esm5/mixin-get-entity-graph/mixin-get-entity-graph.js +0 -269
- package/esm5/mixin-save-queuing/breeze-client-mixin-save-queuing.js +0 -5
- package/esm5/mixin-save-queuing/mixin-save-queuing.js +0 -412
- package/esm5/public_api.js +0 -2
- package/esm5/src/abstract-data-service-adapter.js +0 -302
- package/esm5/src/array.js +0 -4
- package/esm5/src/assert-param.js +0 -317
- package/esm5/src/breeze.js +0 -85
- package/esm5/src/complex-array.js +0 -119
- package/esm5/src/config.js +0 -228
- package/esm5/src/core.js +0 -714
- package/esm5/src/csdl-metadata-parser.js +0 -385
- package/esm5/src/data-service.js +0 -207
- package/esm5/src/data-type.js +0 -451
- package/esm5/src/default-property-interceptor.js +0 -459
- package/esm5/src/entity-action.js +0 -52
- package/esm5/src/entity-aspect.js +0 -812
- package/esm5/src/entity-group.js +0 -189
- package/esm5/src/entity-key.js +0 -118
- package/esm5/src/entity-manager.js +0 -2112
- package/esm5/src/entity-metadata.js +0 -2144
- package/esm5/src/entity-query.js +0 -1023
- package/esm5/src/entity-state.js +0 -106
- package/esm5/src/enum.js +0 -144
- package/esm5/src/event.js +0 -259
- package/esm5/src/interface-registry.js +0 -43
- package/esm5/src/key-generator.js +0 -111
- package/esm5/src/local-query-comparison-options.js +0 -67
- package/esm5/src/mapping-context.js +0 -407
- package/esm5/src/naming-convention.js +0 -90
- package/esm5/src/observable-array.js +0 -201
- package/esm5/src/predicate.js +0 -1300
- package/esm5/src/primitive-array.js +0 -87
- package/esm5/src/query-options.js +0 -167
- package/esm5/src/relation-array.js +0 -175
- package/esm5/src/save-options.js +0 -43
- package/esm5/src/unattached-children-map.js +0 -60
- package/esm5/src/validate.js +0 -996
- package/esm5/src/validation-options.js +0 -66
- package/fesm2015/breeze-client-adapter-ajax-angularjs.js.map +0 -1
- package/fesm2015/breeze-client-adapter-ajax-fetch.js.map +0 -1
- package/fesm2015/breeze-client-adapter-ajax-httpclient.js.map +0 -1
- package/fesm2015/breeze-client-adapter-ajax-jquery.js.map +0 -1
- package/fesm2015/breeze-client-adapter-ajax-post.js.map +0 -1
- package/fesm2015/breeze-client-adapter-data-service-odata.js.map +0 -1
- package/fesm2015/breeze-client-adapter-data-service-webapi.js.map +0 -1
- package/fesm2015/breeze-client-adapter-model-library-backing-store.js.map +0 -1
- package/fesm2015/breeze-client-adapter-model-library-ko.js.map +0 -1
- package/fesm2015/breeze-client-adapter-uri-builder-json.js.map +0 -1
- package/fesm2015/breeze-client-adapter-uri-builder-odata.js.map +0 -1
- package/fesm2015/breeze-client-mixin-get-entity-graph.js.map +0 -1
- package/fesm2015/breeze-client-mixin-save-queuing.js.map +0 -1
- package/fesm2015/breeze-client.js.map +0 -1
- package/fesm5/breeze-client-adapter-ajax-angularjs.js.map +0 -1
- package/fesm5/breeze-client-adapter-ajax-fetch.js.map +0 -1
- package/fesm5/breeze-client-adapter-ajax-httpclient.js.map +0 -1
- package/fesm5/breeze-client-adapter-ajax-jquery.js.map +0 -1
- package/fesm5/breeze-client-adapter-ajax-post.js.map +0 -1
- package/fesm5/breeze-client-adapter-data-service-odata.js.map +0 -1
- package/fesm5/breeze-client-adapter-data-service-webapi.js.map +0 -1
- package/fesm5/breeze-client-adapter-model-library-backing-store.js.map +0 -1
- package/fesm5/breeze-client-adapter-model-library-ko.js.map +0 -1
- package/fesm5/breeze-client-adapter-uri-builder-json.js +0 -92
- package/fesm5/breeze-client-adapter-uri-builder-json.js.map +0 -1
- package/fesm5/breeze-client-adapter-uri-builder-odata.js +0 -250
- package/fesm5/breeze-client-adapter-uri-builder-odata.js.map +0 -1
- package/fesm5/breeze-client-mixin-get-entity-graph.js.map +0 -1
- package/fesm5/breeze-client-mixin-save-queuing.js.map +0 -1
- package/fesm5/breeze-client.js.map +0 -1
- package/mixin-get-entity-graph/breeze-client-mixin-get-entity-graph.metadata.json +0 -1
- package/mixin-get-entity-graph/package.json +0 -13
- package/mixin-save-queuing/breeze-client-mixin-save-queuing.metadata.json +0 -1
- package/mixin-save-queuing/package.json +0 -13
- package/public_api.d.ts +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2012-
|
|
2
|
+
* Copyright 2012-2023 IdeaBlade, Inc. All Rights Reserved.
|
|
3
3
|
* Use, reproduction, distribution, and modification of this code is subject to the terms and
|
|
4
4
|
* conditions of the IdeaBlade Breeze license, available at http://www.breezejs.com/license
|
|
5
5
|
*
|
|
@@ -142,15 +142,14 @@ class BreezeEnum {
|
|
|
142
142
|
/** See if this comment will make it into .d.ts */
|
|
143
143
|
let hasOwnProperty = uncurry(Object.prototype.hasOwnProperty);
|
|
144
144
|
let arraySlice = uncurry(Array.prototype.slice);
|
|
145
|
-
|
|
145
|
+
let isES5Supported = function () {
|
|
146
146
|
try {
|
|
147
147
|
return !!(Object.getPrototypeOf && Object.defineProperty({}, 'x', {}));
|
|
148
148
|
}
|
|
149
149
|
catch (e) {
|
|
150
150
|
return false;
|
|
151
151
|
}
|
|
152
|
-
};
|
|
153
|
-
let isES5Supported = ɵ0();
|
|
152
|
+
}();
|
|
154
153
|
// iterate over object
|
|
155
154
|
function objectForEach(obj, kvFn) {
|
|
156
155
|
for (let key in obj) {
|
|
@@ -588,6 +587,9 @@ function requireLibCore(libName) {
|
|
|
588
587
|
}
|
|
589
588
|
/** Execute fn while obj has tempValue for property */
|
|
590
589
|
function using(obj, property, tempValue, fn) {
|
|
590
|
+
if (!obj) {
|
|
591
|
+
return fn();
|
|
592
|
+
}
|
|
591
593
|
let originalValue = obj[property];
|
|
592
594
|
if (tempValue === originalValue) {
|
|
593
595
|
return fn();
|
|
@@ -723,7 +725,7 @@ function isNumeric(n) {
|
|
|
723
725
|
}
|
|
724
726
|
// end of is Functions
|
|
725
727
|
// string functions
|
|
726
|
-
function stringStartsWith(str, prefix) {
|
|
728
|
+
function stringStartsWith$1(str, prefix) {
|
|
727
729
|
// returns true for empty string or null prefix
|
|
728
730
|
if ((!str))
|
|
729
731
|
return false;
|
|
@@ -731,7 +733,7 @@ function stringStartsWith(str, prefix) {
|
|
|
731
733
|
return true;
|
|
732
734
|
return str.indexOf(prefix, 0) === 0;
|
|
733
735
|
}
|
|
734
|
-
function stringEndsWith(str, suffix) {
|
|
736
|
+
function stringEndsWith$1(str, suffix) {
|
|
735
737
|
// returns true for empty string or null suffix
|
|
736
738
|
if ((!str))
|
|
737
739
|
return false;
|
|
@@ -821,8 +823,8 @@ const core = {
|
|
|
821
823
|
isNumeric: isNumeric,
|
|
822
824
|
identity: identity,
|
|
823
825
|
noop: noop,
|
|
824
|
-
stringStartsWith: stringStartsWith,
|
|
825
|
-
stringEndsWith: stringEndsWith,
|
|
826
|
+
stringStartsWith: stringStartsWith$1,
|
|
827
|
+
stringEndsWith: stringEndsWith$1,
|
|
826
828
|
formatString: formatString,
|
|
827
829
|
titleCase: titleCaseSpace,
|
|
828
830
|
toJson: toJson,
|
|
@@ -1660,7 +1662,7 @@ class DataService {
|
|
|
1660
1662
|
@param config - A configuration object.
|
|
1661
1663
|
**/
|
|
1662
1664
|
constructor(config) {
|
|
1663
|
-
updateWithConfig(this, config);
|
|
1665
|
+
updateWithConfig$1(this, config);
|
|
1664
1666
|
}
|
|
1665
1667
|
/**
|
|
1666
1668
|
Returns a copy of this DataService with the specified properties applied.
|
|
@@ -1670,7 +1672,7 @@ class DataService {
|
|
|
1670
1672
|
if (!config)
|
|
1671
1673
|
return this;
|
|
1672
1674
|
let result = new DataService(this);
|
|
1673
|
-
return updateWithConfig(result, config);
|
|
1675
|
+
return updateWithConfig$1(result, config);
|
|
1674
1676
|
}
|
|
1675
1677
|
static resolve(dataServices) {
|
|
1676
1678
|
// final defaults
|
|
@@ -1741,7 +1743,7 @@ class DataService {
|
|
|
1741
1743
|
}
|
|
1742
1744
|
}
|
|
1743
1745
|
DataService.prototype._$typeName = "DataService";
|
|
1744
|
-
function updateWithConfig(obj, dsConfig) {
|
|
1746
|
+
function updateWithConfig$1(obj, dsConfig) {
|
|
1745
1747
|
if (dsConfig) {
|
|
1746
1748
|
assertConfig(dsConfig)
|
|
1747
1749
|
.whereParam("serviceName").isOptional()
|
|
@@ -1834,17 +1836,16 @@ const INT32_MIN = -2147483648;
|
|
|
1834
1836
|
const INT32_MAX = 2147483647;
|
|
1835
1837
|
const BYTE_MIN = 0;
|
|
1836
1838
|
const BYTE_MAX = 255;
|
|
1837
|
-
const ɵ0$1 = function (context) {
|
|
1838
|
-
if (context.property) {
|
|
1839
|
-
return context.property.resolveProperty("displayName") || context.propertyName || context.property.name;
|
|
1840
|
-
}
|
|
1841
|
-
else {
|
|
1842
|
-
return "Value";
|
|
1843
|
-
}
|
|
1844
|
-
};
|
|
1845
1839
|
// add common props and methods for every validator 'context' here.
|
|
1846
1840
|
let rootContext = {
|
|
1847
|
-
displayName:
|
|
1841
|
+
displayName: function (context) {
|
|
1842
|
+
if (context.property) {
|
|
1843
|
+
return context.property.resolveProperty("displayName") || context.propertyName || context.property.name;
|
|
1844
|
+
}
|
|
1845
|
+
else {
|
|
1846
|
+
return "Value";
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1848
1849
|
};
|
|
1849
1850
|
/**
|
|
1850
1851
|
Instances of the Validator class provide the logic to validate another object and provide a description of any errors
|
|
@@ -2701,7 +2702,14 @@ function makeRegExpValidator(validatorName, expression, defaultMessage, context)
|
|
|
2701
2702
|
};
|
|
2702
2703
|
return new Validator(validatorName, valFn, context);
|
|
2703
2704
|
}
|
|
2704
|
-
|
|
2705
|
+
// http://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers#JavaScript
|
|
2706
|
+
// function luhn(a: string, b: number, c: number, d: number, e: number) {
|
|
2707
|
+
// for (d = +a[b = a.length - 1], e = 0; b--; ) {
|
|
2708
|
+
// c = +a[b], d += ++e % 2 ? 2 * c % 10 + (c > 4) : c;
|
|
2709
|
+
// }
|
|
2710
|
+
// return !(d % 10);
|
|
2711
|
+
// };
|
|
2712
|
+
let luhn = (function () {
|
|
2705
2713
|
let luhnArr = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9];
|
|
2706
2714
|
return function (str) {
|
|
2707
2715
|
let counter = 0;
|
|
@@ -2716,15 +2724,7 @@ const ɵ1 = function () {
|
|
|
2716
2724
|
}
|
|
2717
2725
|
return (counter % 10 === 0);
|
|
2718
2726
|
};
|
|
2719
|
-
};
|
|
2720
|
-
// http://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers#JavaScript
|
|
2721
|
-
// function luhn(a: string, b: number, c: number, d: number, e: number) {
|
|
2722
|
-
// for (d = +a[b = a.length - 1], e = 0; b--; ) {
|
|
2723
|
-
// c = +a[b], d += ++e % 2 ? 2 * c % 10 + (c > 4) : c;
|
|
2724
|
-
// }
|
|
2725
|
-
// return !(d % 10);
|
|
2726
|
-
// };
|
|
2727
|
-
let luhn = (ɵ1)();
|
|
2727
|
+
})();
|
|
2728
2728
|
/**
|
|
2729
2729
|
A ValidationError is used to describe a failed validation.
|
|
2730
2730
|
|
|
@@ -4553,104 +4553,103 @@ function parseFnExpr(source, parts, tokens, exprContext) {
|
|
|
4553
4553
|
throw e;
|
|
4554
4554
|
}
|
|
4555
4555
|
}
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
}
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
return
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4556
|
+
// toFunctionVisitor
|
|
4557
|
+
let toFunctionVisitor = {
|
|
4558
|
+
isExtended: false,
|
|
4559
|
+
passthruPredicate: function () {
|
|
4560
|
+
throw new Error("Cannot execute an PassthruPredicate expression against the local cache: " + this.value);
|
|
4561
|
+
},
|
|
4562
|
+
unaryPredicate: function (context) {
|
|
4563
|
+
let predFn = this.pred.visit(context);
|
|
4564
|
+
switch (this.op.key) {
|
|
4565
|
+
case "not":
|
|
4566
|
+
return function (entity) {
|
|
4567
|
+
return !predFn(entity);
|
|
4568
|
+
};
|
|
4569
|
+
default:
|
|
4570
|
+
throw new Error("Invalid unary operator:" + this.op.key);
|
|
4571
|
+
}
|
|
4572
|
+
},
|
|
4573
|
+
binaryPredicate: function (context) {
|
|
4574
|
+
let expr1Fn = this.expr1.visit(context);
|
|
4575
|
+
let expr2Fn = this.expr2.visit(context);
|
|
4576
|
+
let dataType = this.expr1.dataType || this.expr2.dataType;
|
|
4577
|
+
let lqco = context.entityType.metadataStore.localQueryComparisonOptions;
|
|
4578
|
+
let predFn = getBinaryPredicateFn(this, dataType, lqco);
|
|
4579
|
+
if (predFn == null) {
|
|
4580
|
+
throw new Error("Invalid binaryPredicate operator:" + this.op.key);
|
|
4581
|
+
}
|
|
4582
|
+
return function (entity) {
|
|
4583
|
+
return predFn(expr1Fn(entity), expr2Fn(entity));
|
|
4584
|
+
};
|
|
4585
|
+
},
|
|
4586
|
+
andOrPredicate: function (context) {
|
|
4587
|
+
let predFns = this.preds.map((pred) => {
|
|
4588
|
+
return pred.visit(context);
|
|
4589
|
+
});
|
|
4590
|
+
switch (this.op.key) {
|
|
4591
|
+
case "and":
|
|
4592
|
+
return function (entity) {
|
|
4593
|
+
let result = predFns.reduce(function (prev, cur) {
|
|
4594
|
+
return prev && cur(entity);
|
|
4595
|
+
}, true);
|
|
4596
|
+
return result;
|
|
4597
|
+
};
|
|
4598
|
+
case "or":
|
|
4599
|
+
return function (entity) {
|
|
4600
|
+
let result = predFns.reduce(function (prev, cur) {
|
|
4601
|
+
return prev || cur(entity);
|
|
4602
|
+
}, false);
|
|
4603
|
+
return result;
|
|
4604
|
+
};
|
|
4605
|
+
default:
|
|
4606
|
+
throw new Error("Invalid boolean operator:" + this.op.key);
|
|
4607
|
+
}
|
|
4608
|
+
},
|
|
4609
|
+
anyAllPredicate: function (context) {
|
|
4610
|
+
let exprFn = this.expr.visit(context);
|
|
4611
|
+
let newContext = core.extend({}, context);
|
|
4612
|
+
newContext.entityType = this.expr.dataType;
|
|
4613
|
+
let predFn = this.pred.visit(newContext);
|
|
4614
|
+
let anyAllPredFn = getAnyAllPredicateFn(this.op);
|
|
4615
|
+
return function (entity) {
|
|
4616
|
+
return anyAllPredFn(exprFn(entity), predFn);
|
|
4617
|
+
};
|
|
4618
|
+
},
|
|
4619
|
+
litExpr: function () {
|
|
4620
|
+
let value = this.value;
|
|
4621
|
+
return function (entity) {
|
|
4622
|
+
return value;
|
|
4623
|
+
};
|
|
4624
|
+
},
|
|
4625
|
+
propExpr: function () {
|
|
4626
|
+
let propertyPath = this.propertyPath;
|
|
4627
|
+
let properties = propertyPath.split('.');
|
|
4628
|
+
if (properties.length === 1) {
|
|
4586
4629
|
return function (entity) {
|
|
4587
|
-
|
|
4588
|
-
return prev && cur(entity);
|
|
4589
|
-
}, true);
|
|
4590
|
-
return result;
|
|
4630
|
+
return entity.getProperty(propertyPath);
|
|
4591
4631
|
};
|
|
4592
|
-
|
|
4632
|
+
}
|
|
4633
|
+
else {
|
|
4593
4634
|
return function (entity) {
|
|
4594
|
-
|
|
4595
|
-
return prev || cur(entity);
|
|
4596
|
-
}, false);
|
|
4597
|
-
return result;
|
|
4635
|
+
return EntityAspect.getPropertyPathValue(entity, properties);
|
|
4598
4636
|
};
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
let predFn = this.pred.visit(newContext);
|
|
4607
|
-
let anyAllPredFn = getAnyAllPredicateFn(this.op);
|
|
4608
|
-
return function (entity) {
|
|
4609
|
-
return anyAllPredFn(exprFn(entity), predFn);
|
|
4610
|
-
};
|
|
4611
|
-
}, ɵ5 = function () {
|
|
4612
|
-
let value = this.value;
|
|
4613
|
-
return function (entity) {
|
|
4614
|
-
return value;
|
|
4615
|
-
};
|
|
4616
|
-
}, ɵ6 = function () {
|
|
4617
|
-
let propertyPath = this.propertyPath;
|
|
4618
|
-
let properties = propertyPath.split('.');
|
|
4619
|
-
if (properties.length === 1) {
|
|
4620
|
-
return function (entity) {
|
|
4621
|
-
return entity.getProperty(propertyPath);
|
|
4622
|
-
};
|
|
4623
|
-
}
|
|
4624
|
-
else {
|
|
4637
|
+
}
|
|
4638
|
+
},
|
|
4639
|
+
fnExpr: function (context) {
|
|
4640
|
+
let exprFns = this.exprs.map(function (expr) {
|
|
4641
|
+
return expr.visit(context);
|
|
4642
|
+
});
|
|
4643
|
+
let that = this;
|
|
4625
4644
|
return function (entity) {
|
|
4626
|
-
|
|
4645
|
+
let values = exprFns.map(function (exprFn) {
|
|
4646
|
+
let value = exprFn(entity);
|
|
4647
|
+
return value;
|
|
4648
|
+
});
|
|
4649
|
+
let result = that.localFn.apply(null, values);
|
|
4650
|
+
return result;
|
|
4627
4651
|
};
|
|
4628
4652
|
}
|
|
4629
|
-
}, ɵ7 = function (context) {
|
|
4630
|
-
let exprFns = this.exprs.map(function (expr) {
|
|
4631
|
-
return expr.visit(context);
|
|
4632
|
-
});
|
|
4633
|
-
let that = this;
|
|
4634
|
-
return function (entity) {
|
|
4635
|
-
let values = exprFns.map(function (exprFn) {
|
|
4636
|
-
let value = exprFn(entity);
|
|
4637
|
-
return value;
|
|
4638
|
-
});
|
|
4639
|
-
let result = that.localFn.apply(null, values);
|
|
4640
|
-
return result;
|
|
4641
|
-
};
|
|
4642
|
-
};
|
|
4643
|
-
// toFunctionVisitor
|
|
4644
|
-
let toFunctionVisitor = {
|
|
4645
|
-
isExtended: false,
|
|
4646
|
-
passthruPredicate: ɵ0$2,
|
|
4647
|
-
unaryPredicate: ɵ1$1,
|
|
4648
|
-
binaryPredicate: ɵ2,
|
|
4649
|
-
andOrPredicate: ɵ3,
|
|
4650
|
-
anyAllPredicate: ɵ4,
|
|
4651
|
-
litExpr: ɵ5,
|
|
4652
|
-
propExpr: ɵ6,
|
|
4653
|
-
fnExpr: ɵ7
|
|
4654
4653
|
};
|
|
4655
4654
|
function getAnyAllPredicateFn(op) {
|
|
4656
4655
|
switch (op.key) {
|
|
@@ -4717,12 +4716,12 @@ function getBinaryPredicateFn(binaryPredicate, dataType, lqco) {
|
|
|
4717
4716
|
break;
|
|
4718
4717
|
case 'startswith':
|
|
4719
4718
|
predFn = function (v1, v2) {
|
|
4720
|
-
return stringStartsWith
|
|
4719
|
+
return stringStartsWith(v1, v2, lqco);
|
|
4721
4720
|
};
|
|
4722
4721
|
break;
|
|
4723
4722
|
case 'endswith':
|
|
4724
4723
|
predFn = function (v1, v2) {
|
|
4725
|
-
return stringEndsWith
|
|
4724
|
+
return stringEndsWith(v1, v2, lqco);
|
|
4726
4725
|
};
|
|
4727
4726
|
break;
|
|
4728
4727
|
case 'contains':
|
|
@@ -4758,14 +4757,14 @@ function stringEquals(a, b, lqco) {
|
|
|
4758
4757
|
}
|
|
4759
4758
|
return a === b;
|
|
4760
4759
|
}
|
|
4761
|
-
function stringStartsWith
|
|
4760
|
+
function stringStartsWith(a, b, lqco) {
|
|
4762
4761
|
if (!lqco.isCaseSensitive) {
|
|
4763
4762
|
a = (a || "").toLowerCase();
|
|
4764
4763
|
b = (b || "").toLowerCase();
|
|
4765
4764
|
}
|
|
4766
4765
|
return core.stringStartsWith(a, b);
|
|
4767
4766
|
}
|
|
4768
|
-
function stringEndsWith
|
|
4767
|
+
function stringEndsWith(a, b, lqco) {
|
|
4769
4768
|
if (!lqco.isCaseSensitive) {
|
|
4770
4769
|
a = (a || "").toLowerCase();
|
|
4771
4770
|
b = (b || "").toLowerCase();
|
|
@@ -4779,92 +4778,91 @@ function stringContains(a, b, lqco) {
|
|
|
4779
4778
|
}
|
|
4780
4779
|
return a.indexOf(b) >= 0;
|
|
4781
4780
|
}
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
let predVal = this.pred.visit(context);
|
|
4786
|
-
let json = {};
|
|
4787
|
-
json[this.op.key] = predVal;
|
|
4788
|
-
return json;
|
|
4789
|
-
}, ɵ10 = function (context) {
|
|
4790
|
-
let expr1Val = this.expr1.visit(context);
|
|
4791
|
-
let expr2Val = this.expr2.visit(context);
|
|
4792
|
-
let json = {};
|
|
4793
|
-
if (this.expr2 instanceof PropExpr) {
|
|
4794
|
-
expr2Val = { value: expr2Val, isProperty: true };
|
|
4795
|
-
}
|
|
4796
|
-
if (this.op.key === "eq") {
|
|
4797
|
-
json[expr1Val] = expr2Val;
|
|
4798
|
-
}
|
|
4799
|
-
else {
|
|
4800
|
-
let value = {};
|
|
4801
|
-
json[expr1Val] = value;
|
|
4802
|
-
value[this.op.key] = expr2Val;
|
|
4803
|
-
}
|
|
4804
|
-
return json;
|
|
4805
|
-
}, ɵ11 = function (context) {
|
|
4806
|
-
let predVals = this.preds.map(function (pred) {
|
|
4807
|
-
return pred.visit(context);
|
|
4808
|
-
});
|
|
4809
|
-
if (!predVals || !predVals.length) {
|
|
4810
|
-
return {};
|
|
4811
|
-
}
|
|
4812
|
-
let json;
|
|
4813
|
-
// normalizeAnd clauses if possible.
|
|
4814
|
-
// passthru predicate will appear as string and their 'ands' can't be 'normalized'
|
|
4815
|
-
if (this.op.key === 'and' && predVals.length === 2 && !predVals.some((v) => v.or || typeof (v) === 'string')) {
|
|
4816
|
-
// normalize 'and' clauses - will return null if can't be combined.
|
|
4817
|
-
json = predVals.reduce(combine);
|
|
4818
|
-
}
|
|
4819
|
-
if (json == null) {
|
|
4820
|
-
json = {};
|
|
4821
|
-
json[this.op.key] = predVals;
|
|
4822
|
-
}
|
|
4823
|
-
return json;
|
|
4824
|
-
}, ɵ12 = function (context) {
|
|
4825
|
-
let exprVal = this.expr.visit(context);
|
|
4826
|
-
let newContext = core.extend({}, context);
|
|
4827
|
-
newContext.entityType = this.expr.dataType;
|
|
4828
|
-
let predVal = this.pred.visit(newContext);
|
|
4829
|
-
let json = {};
|
|
4830
|
-
let value = {};
|
|
4831
|
-
value[this.op.key] = predVal;
|
|
4832
|
-
json[exprVal] = value;
|
|
4833
|
-
return json;
|
|
4834
|
-
}, ɵ13 = function (context) {
|
|
4835
|
-
if (this.hasExplicitDataType || context.useExplicitDataType) {
|
|
4836
|
-
return { value: this.value, dataType: this.dataType.name };
|
|
4837
|
-
}
|
|
4838
|
-
else {
|
|
4781
|
+
// toJSONVisitor
|
|
4782
|
+
let toJSONVisitor = {
|
|
4783
|
+
passthruPredicate: function () {
|
|
4839
4784
|
return this.value;
|
|
4840
|
-
}
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4785
|
+
},
|
|
4786
|
+
unaryPredicate: function (context) {
|
|
4787
|
+
let predVal = this.pred.visit(context);
|
|
4788
|
+
let json = {};
|
|
4789
|
+
json[this.op.key] = predVal;
|
|
4790
|
+
return json;
|
|
4791
|
+
},
|
|
4792
|
+
binaryPredicate: function (context) {
|
|
4793
|
+
let expr1Val = this.expr1.visit(context);
|
|
4794
|
+
let expr2Val = this.expr2.visit(context);
|
|
4795
|
+
let json = {};
|
|
4796
|
+
if (this.expr2 instanceof PropExpr) {
|
|
4797
|
+
expr2Val = { value: expr2Val, isProperty: true };
|
|
4798
|
+
}
|
|
4799
|
+
if (this.op.key === "eq") {
|
|
4800
|
+
json[expr1Val] = expr2Val;
|
|
4801
|
+
}
|
|
4802
|
+
else {
|
|
4803
|
+
let value = {};
|
|
4804
|
+
json[expr1Val] = value;
|
|
4805
|
+
value[this.op.key] = expr2Val;
|
|
4806
|
+
}
|
|
4807
|
+
return json;
|
|
4808
|
+
},
|
|
4809
|
+
andOrPredicate: function (context) {
|
|
4810
|
+
let predVals = this.preds.map(function (pred) {
|
|
4811
|
+
return pred.visit(context);
|
|
4812
|
+
});
|
|
4813
|
+
if (!predVals || !predVals.length) {
|
|
4814
|
+
return {};
|
|
4815
|
+
}
|
|
4816
|
+
let json;
|
|
4817
|
+
// normalizeAnd clauses if possible.
|
|
4818
|
+
// passthru predicate will appear as string and their 'ands' can't be 'normalized'
|
|
4819
|
+
if (this.op.key === 'and' && predVals.length === 2 && !predVals.some((v) => v.or || typeof (v) === 'string')) {
|
|
4820
|
+
// normalize 'and' clauses - will return null if can't be combined.
|
|
4821
|
+
json = predVals.reduce(combine);
|
|
4822
|
+
}
|
|
4823
|
+
if (json == null) {
|
|
4824
|
+
json = {};
|
|
4825
|
+
json[this.op.key] = predVals;
|
|
4826
|
+
}
|
|
4827
|
+
return json;
|
|
4828
|
+
},
|
|
4829
|
+
anyAllPredicate: function (context) {
|
|
4830
|
+
let exprVal = this.expr.visit(context);
|
|
4831
|
+
let newContext = core.extend({}, context);
|
|
4832
|
+
newContext.entityType = this.expr.dataType;
|
|
4833
|
+
let predVal = this.pred.visit(newContext);
|
|
4834
|
+
let json = {};
|
|
4835
|
+
let value = {};
|
|
4836
|
+
value[this.op.key] = predVal;
|
|
4837
|
+
json[exprVal] = value;
|
|
4838
|
+
return json;
|
|
4839
|
+
},
|
|
4840
|
+
litExpr: function (context) {
|
|
4841
|
+
if (this.hasExplicitDataType || context.useExplicitDataType) {
|
|
4842
|
+
return { value: this.value, dataType: this.dataType.name };
|
|
4843
|
+
}
|
|
4844
|
+
else {
|
|
4845
|
+
return this.value;
|
|
4846
|
+
}
|
|
4847
|
+
},
|
|
4848
|
+
propExpr: function (context) {
|
|
4849
|
+
if (context.toNameOnServer) {
|
|
4850
|
+
if (!context.entityType) {
|
|
4851
|
+
console.warn(`No EntityType for propertyPath "${this.propertyPath}". ${core.strings.TO_TYPE}`);
|
|
4852
|
+
return this.propertyPath;
|
|
4853
|
+
}
|
|
4854
|
+
return context.entityType.clientPropertyPathToServer(this.propertyPath);
|
|
4855
|
+
}
|
|
4856
|
+
else {
|
|
4845
4857
|
return this.propertyPath;
|
|
4846
4858
|
}
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4859
|
+
},
|
|
4860
|
+
fnExpr: function (context) {
|
|
4861
|
+
let exprVals = this.exprs.map(function (expr) {
|
|
4862
|
+
return expr.visit(context);
|
|
4863
|
+
});
|
|
4864
|
+
return this.fnName + "(" + exprVals.join(",") + ")";
|
|
4851
4865
|
}
|
|
4852
|
-
}, ɵ15 = function (context) {
|
|
4853
|
-
let exprVals = this.exprs.map(function (expr) {
|
|
4854
|
-
return expr.visit(context);
|
|
4855
|
-
});
|
|
4856
|
-
return this.fnName + "(" + exprVals.join(",") + ")";
|
|
4857
|
-
};
|
|
4858
|
-
// toJSONVisitor
|
|
4859
|
-
let toJSONVisitor = {
|
|
4860
|
-
passthruPredicate: ɵ8,
|
|
4861
|
-
unaryPredicate: ɵ9,
|
|
4862
|
-
binaryPredicate: ɵ10,
|
|
4863
|
-
andOrPredicate: ɵ11,
|
|
4864
|
-
anyAllPredicate: ɵ12,
|
|
4865
|
-
litExpr: ɵ13,
|
|
4866
|
-
propExpr: ɵ14,
|
|
4867
|
-
fnExpr: ɵ15
|
|
4868
4866
|
};
|
|
4869
4867
|
function combine(j1, j2) {
|
|
4870
4868
|
let ok = Object.keys(j2).every(function (key) {
|
|
@@ -6115,12 +6113,12 @@ class EntityAspect {
|
|
|
6115
6113
|
let em = this.entityManager;
|
|
6116
6114
|
let needsSave = true;
|
|
6117
6115
|
if (entityState === EntityState.Unchanged) {
|
|
6118
|
-
clearOriginalValues(entity);
|
|
6116
|
+
clearOriginalValues$1(entity);
|
|
6119
6117
|
delete this.hasTempKey;
|
|
6120
6118
|
needsSave = false;
|
|
6121
6119
|
}
|
|
6122
6120
|
else if (entityState === EntityState.Added) {
|
|
6123
|
-
clearOriginalValues(entity);
|
|
6121
|
+
clearOriginalValues$1(entity);
|
|
6124
6122
|
// TODO: more to do here... like regenerating key ???
|
|
6125
6123
|
}
|
|
6126
6124
|
else if (entityState === EntityState.Deleted) {
|
|
@@ -6655,18 +6653,18 @@ class ComplexAspect {
|
|
|
6655
6653
|
return aspect.getPropertyPath(this.parentProperty.name + "." + propName);
|
|
6656
6654
|
}
|
|
6657
6655
|
}
|
|
6658
|
-
function clearOriginalValues(target) {
|
|
6656
|
+
function clearOriginalValues$1(target) {
|
|
6659
6657
|
let aspect = target.entityAspect || target.complexAspect;
|
|
6660
6658
|
aspect.originalValues = {};
|
|
6661
6659
|
let stype = target.entityType || target.complexType;
|
|
6662
6660
|
stype.complexProperties.forEach(function (cp) {
|
|
6663
6661
|
let cos = target.getProperty(cp.name);
|
|
6664
6662
|
if (cp.isScalar) {
|
|
6665
|
-
clearOriginalValues(cos);
|
|
6663
|
+
clearOriginalValues$1(cos);
|
|
6666
6664
|
}
|
|
6667
6665
|
else {
|
|
6668
6666
|
cos._acceptChanges();
|
|
6669
|
-
cos.forEach(clearOriginalValues);
|
|
6667
|
+
cos.forEach(clearOriginalValues$1);
|
|
6670
6668
|
}
|
|
6671
6669
|
});
|
|
6672
6670
|
}
|
|
@@ -6756,7 +6754,7 @@ The default value whenever NamingConventions are not specified.
|
|
|
6756
6754
|
NamingConvention.defaultInstance = new NamingConvention(NamingConvention.none);
|
|
6757
6755
|
NamingConvention.prototype._$typeName = "NamingConvention";
|
|
6758
6756
|
|
|
6759
|
-
const RX_COLLECTION = /Collection\((
|
|
6757
|
+
const RX_COLLECTION = /Collection\((.*)\)/;
|
|
6760
6758
|
function parse(metadataStore, schemas, altMetadata) {
|
|
6761
6759
|
metadataStore._entityTypeResourceMap = {};
|
|
6762
6760
|
schemas = core.toArray(schemas);
|
|
@@ -7114,7 +7112,7 @@ function parseTypeNameWithSchema(entityTypeName, schema) {
|
|
|
7114
7112
|
}
|
|
7115
7113
|
function getCollectionType(propertyType) {
|
|
7116
7114
|
const match = propertyType.match(RX_COLLECTION);
|
|
7117
|
-
return match ? match[
|
|
7115
|
+
return match ? match[1] : null;
|
|
7118
7116
|
}
|
|
7119
7117
|
function getNamespaceFor(shortName, schema) {
|
|
7120
7118
|
let ns;
|
|
@@ -7218,7 +7216,8 @@ function defaultPropertyInterceptor(property, newValue, rawAccessorFn) {
|
|
|
7218
7216
|
}
|
|
7219
7217
|
}
|
|
7220
7218
|
// exit if no change - extra cruft is because dateTimes don't compare cleanly.
|
|
7221
|
-
if (newValue === oldValue || (
|
|
7219
|
+
if (newValue === oldValue || (newValue === null && oldValue === undefined) ||
|
|
7220
|
+
(dataType && dataType.normalize && newValue && oldValue && dataType.normalize(newValue) === dataType.normalize(oldValue))) {
|
|
7222
7221
|
return;
|
|
7223
7222
|
}
|
|
7224
7223
|
// CANNOT DO NEXT LINE because it has the possibility of creating a new property
|
|
@@ -10052,7 +10051,7 @@ class ValidationOptions {
|
|
|
10052
10051
|
@param config - A configuration object.
|
|
10053
10052
|
**/
|
|
10054
10053
|
constructor(config) {
|
|
10055
|
-
updateWithConfig
|
|
10054
|
+
updateWithConfig(this, config);
|
|
10056
10055
|
}
|
|
10057
10056
|
/**
|
|
10058
10057
|
Returns a copy of this ValidationOptions with changes to the specified config properties.
|
|
@@ -10065,7 +10064,7 @@ class ValidationOptions {
|
|
|
10065
10064
|
if (!config)
|
|
10066
10065
|
return this;
|
|
10067
10066
|
let result = new ValidationOptions(this);
|
|
10068
|
-
updateWithConfig
|
|
10067
|
+
updateWithConfig(result, config);
|
|
10069
10068
|
return result;
|
|
10070
10069
|
}
|
|
10071
10070
|
/**
|
|
@@ -10089,7 +10088,7 @@ ValidationOptions.defaultInstance = new ValidationOptions({
|
|
|
10089
10088
|
validateOnPropertyChange: true
|
|
10090
10089
|
});
|
|
10091
10090
|
ValidationOptions.prototype._$typeName = "ValidationOptions";
|
|
10092
|
-
function updateWithConfig
|
|
10091
|
+
function updateWithConfig(options, config) {
|
|
10093
10092
|
if (config) {
|
|
10094
10093
|
assertConfig(config)
|
|
10095
10094
|
.whereParam("validateOnAttach").isBoolean().isOptional()
|
|
@@ -10653,7 +10652,7 @@ function mergeEntity(mc, node, meta) {
|
|
|
10653
10652
|
targetEntity.entityAspect.extraMetadata = meta.extraMetadata;
|
|
10654
10653
|
}
|
|
10655
10654
|
targetEntity.entityAspect.entityState = EntityState.Unchanged;
|
|
10656
|
-
clearOriginalValues
|
|
10655
|
+
clearOriginalValues(targetEntity);
|
|
10657
10656
|
// propertyName not specified because multiple props EntityChangedEventArgs
|
|
10658
10657
|
targetEntity.entityAspect.propertyChanged.publish({ entity: targetEntity, propertyName: null });
|
|
10659
10658
|
let action = isSaving ? EntityAction.MergeOnSave : EntityAction.MergeOnQuery;
|
|
@@ -10686,18 +10685,18 @@ function mergeEntity(mc, node, meta) {
|
|
|
10686
10685
|
return targetEntity;
|
|
10687
10686
|
}
|
|
10688
10687
|
// copied from entityAspect
|
|
10689
|
-
function clearOriginalValues
|
|
10688
|
+
function clearOriginalValues(target) {
|
|
10690
10689
|
let aspect = target.entityAspect || target.complexAspect;
|
|
10691
10690
|
aspect.originalValues = {};
|
|
10692
10691
|
let stype = target.entityType || target.complexType;
|
|
10693
10692
|
stype.complexProperties.forEach(function (cp) {
|
|
10694
10693
|
let cos = target.getProperty(cp.name);
|
|
10695
10694
|
if (cp.isScalar) {
|
|
10696
|
-
clearOriginalValues
|
|
10695
|
+
clearOriginalValues(cos);
|
|
10697
10696
|
}
|
|
10698
10697
|
else {
|
|
10699
10698
|
cos._acceptChanges();
|
|
10700
|
-
cos.forEach(clearOriginalValues
|
|
10699
|
+
cos.forEach(clearOriginalValues);
|
|
10701
10700
|
}
|
|
10702
10701
|
});
|
|
10703
10702
|
}
|
|
@@ -12995,119 +12994,118 @@ config.initializeAdapterInstances = function (irConfig) {
|
|
|
12995
12994
|
return core.objectMap(config, this.initializeAdapterInstance);
|
|
12996
12995
|
};
|
|
12997
12996
|
|
|
12998
|
-
const ɵ0$3 = function (...args) {
|
|
12999
|
-
if (this._inProgress) {
|
|
13000
|
-
return -1;
|
|
13001
|
-
}
|
|
13002
|
-
let goodAdds = this._getGoodAdds(args);
|
|
13003
|
-
if (!goodAdds.length) {
|
|
13004
|
-
return this.length;
|
|
13005
|
-
}
|
|
13006
|
-
this._beforeChange();
|
|
13007
|
-
let result;
|
|
13008
|
-
let objPrototype = Object.getPrototypeOf(this);
|
|
13009
|
-
if (objPrototype.push) {
|
|
13010
|
-
result = objPrototype.push.apply(this, goodAdds);
|
|
13011
|
-
}
|
|
13012
|
-
else {
|
|
13013
|
-
result = Array.prototype.push.apply(this, goodAdds);
|
|
13014
|
-
}
|
|
13015
|
-
processAdds(this, goodAdds);
|
|
13016
|
-
return result;
|
|
13017
|
-
}, ɵ1$2 = function (...args) {
|
|
13018
|
-
if (this._inProgress) {
|
|
13019
|
-
return -1;
|
|
13020
|
-
}
|
|
13021
|
-
let goodAdds = args;
|
|
13022
|
-
this._beforeChange();
|
|
13023
|
-
let result;
|
|
13024
|
-
let objPrototype = Object.getPrototypeOf(this);
|
|
13025
|
-
if (objPrototype.push) {
|
|
13026
|
-
result = objPrototype.push.apply(this, goodAdds);
|
|
13027
|
-
}
|
|
13028
|
-
else {
|
|
13029
|
-
result = Array.prototype.push.apply(this, goodAdds);
|
|
13030
|
-
}
|
|
13031
|
-
processAdds(this, goodAdds);
|
|
13032
|
-
return result;
|
|
13033
|
-
}, ɵ2$1 = function (...args) {
|
|
13034
|
-
let goodAdds = this._getGoodAdds(args);
|
|
13035
|
-
if (!goodAdds.length) {
|
|
13036
|
-
return this.length;
|
|
13037
|
-
}
|
|
13038
|
-
this._beforeChange();
|
|
13039
|
-
let result;
|
|
13040
|
-
let objPrototype = Object.getPrototypeOf(this);
|
|
13041
|
-
if (objPrototype.unshift) {
|
|
13042
|
-
result = objPrototype.unshift.apply(this, goodAdds);
|
|
13043
|
-
}
|
|
13044
|
-
else {
|
|
13045
|
-
result = Array.prototype.unshift.apply(this, goodAdds);
|
|
13046
|
-
}
|
|
13047
|
-
processAdds(this, goodAdds);
|
|
13048
|
-
return result;
|
|
13049
|
-
}, ɵ3$1 = function () {
|
|
13050
|
-
this._beforeChange();
|
|
13051
|
-
let result;
|
|
13052
|
-
let objPrototype = Object.getPrototypeOf(this);
|
|
13053
|
-
if (objPrototype.pop) {
|
|
13054
|
-
result = objPrototype.pop.apply(this);
|
|
13055
|
-
}
|
|
13056
|
-
else {
|
|
13057
|
-
result = Array.prototype.pop.apply(this);
|
|
13058
|
-
}
|
|
13059
|
-
processRemoves(this, [result]);
|
|
13060
|
-
return result;
|
|
13061
|
-
}, ɵ4$1 = function () {
|
|
13062
|
-
this._beforeChange();
|
|
13063
|
-
let result;
|
|
13064
|
-
let objPrototype = Object.getPrototypeOf(this);
|
|
13065
|
-
if (objPrototype.shift) {
|
|
13066
|
-
result = objPrototype.shift.apply(this);
|
|
13067
|
-
}
|
|
13068
|
-
else {
|
|
13069
|
-
result = Array.prototype.shift.apply(this);
|
|
13070
|
-
}
|
|
13071
|
-
processRemoves(this, [result]);
|
|
13072
|
-
return result;
|
|
13073
|
-
}, ɵ5$1 = function (...args) {
|
|
13074
|
-
let goodAdds = this._getGoodAdds(core.arraySlice(args, 2));
|
|
13075
|
-
let newArgs = core.arraySlice(args, 0, 2).concat(goodAdds);
|
|
13076
|
-
this._beforeChange();
|
|
13077
|
-
let result;
|
|
13078
|
-
let objPrototype = Object.getPrototypeOf(this);
|
|
13079
|
-
if (objPrototype.splice) {
|
|
13080
|
-
result = objPrototype.splice.apply(this, newArgs);
|
|
13081
|
-
}
|
|
13082
|
-
else {
|
|
13083
|
-
result = Array.prototype.splice.apply(this, newArgs);
|
|
13084
|
-
}
|
|
13085
|
-
processRemoves(this, result);
|
|
13086
|
-
if (goodAdds.length) {
|
|
13087
|
-
processAdds(this, goodAdds);
|
|
13088
|
-
}
|
|
13089
|
-
return result;
|
|
13090
|
-
}, ɵ6$1 = function () {
|
|
13091
|
-
return this.parent.entityAspect || this.parent.complexAspect.getEntityAspect();
|
|
13092
|
-
}, ɵ7$1 = function () {
|
|
13093
|
-
return this.getEntityAspect();
|
|
13094
|
-
}, ɵ8$1 = function () {
|
|
13095
|
-
let em = this.getEntityAspect().entityManager;
|
|
13096
|
-
return em && em._pendingPubs;
|
|
13097
|
-
}, ɵ9$1 = function () {
|
|
13098
|
-
// default is to do nothing
|
|
13099
|
-
};
|
|
13100
12997
|
let mixin = {
|
|
13101
|
-
push:
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
12998
|
+
push: function (...args) {
|
|
12999
|
+
if (this._inProgress) {
|
|
13000
|
+
return -1;
|
|
13001
|
+
}
|
|
13002
|
+
let goodAdds = this._getGoodAdds(args);
|
|
13003
|
+
if (!goodAdds.length) {
|
|
13004
|
+
return this.length;
|
|
13005
|
+
}
|
|
13006
|
+
this._beforeChange();
|
|
13007
|
+
let result;
|
|
13008
|
+
let objPrototype = Object.getPrototypeOf(this);
|
|
13009
|
+
if (objPrototype.push) {
|
|
13010
|
+
result = objPrototype.push.apply(this, goodAdds);
|
|
13011
|
+
}
|
|
13012
|
+
else {
|
|
13013
|
+
result = Array.prototype.push.apply(this, goodAdds);
|
|
13014
|
+
}
|
|
13015
|
+
processAdds$2(this, goodAdds);
|
|
13016
|
+
return result;
|
|
13017
|
+
},
|
|
13018
|
+
_push: function (...args) {
|
|
13019
|
+
if (this._inProgress) {
|
|
13020
|
+
return -1;
|
|
13021
|
+
}
|
|
13022
|
+
let goodAdds = args;
|
|
13023
|
+
this._beforeChange();
|
|
13024
|
+
let result;
|
|
13025
|
+
let objPrototype = Object.getPrototypeOf(this);
|
|
13026
|
+
if (objPrototype.push) {
|
|
13027
|
+
result = objPrototype.push.apply(this, goodAdds);
|
|
13028
|
+
}
|
|
13029
|
+
else {
|
|
13030
|
+
result = Array.prototype.push.apply(this, goodAdds);
|
|
13031
|
+
}
|
|
13032
|
+
processAdds$2(this, goodAdds);
|
|
13033
|
+
return result;
|
|
13034
|
+
},
|
|
13035
|
+
unshift: function (...args) {
|
|
13036
|
+
let goodAdds = this._getGoodAdds(args);
|
|
13037
|
+
if (!goodAdds.length) {
|
|
13038
|
+
return this.length;
|
|
13039
|
+
}
|
|
13040
|
+
this._beforeChange();
|
|
13041
|
+
let result;
|
|
13042
|
+
let objPrototype = Object.getPrototypeOf(this);
|
|
13043
|
+
if (objPrototype.unshift) {
|
|
13044
|
+
result = objPrototype.unshift.apply(this, goodAdds);
|
|
13045
|
+
}
|
|
13046
|
+
else {
|
|
13047
|
+
result = Array.prototype.unshift.apply(this, goodAdds);
|
|
13048
|
+
}
|
|
13049
|
+
processAdds$2(this, goodAdds);
|
|
13050
|
+
return result;
|
|
13051
|
+
},
|
|
13052
|
+
pop: function () {
|
|
13053
|
+
this._beforeChange();
|
|
13054
|
+
let result;
|
|
13055
|
+
let objPrototype = Object.getPrototypeOf(this);
|
|
13056
|
+
if (objPrototype.pop) {
|
|
13057
|
+
result = objPrototype.pop.apply(this);
|
|
13058
|
+
}
|
|
13059
|
+
else {
|
|
13060
|
+
result = Array.prototype.pop.apply(this);
|
|
13061
|
+
}
|
|
13062
|
+
processRemoves$2(this, [result]);
|
|
13063
|
+
return result;
|
|
13064
|
+
},
|
|
13065
|
+
shift: function () {
|
|
13066
|
+
this._beforeChange();
|
|
13067
|
+
let result;
|
|
13068
|
+
let objPrototype = Object.getPrototypeOf(this);
|
|
13069
|
+
if (objPrototype.shift) {
|
|
13070
|
+
result = objPrototype.shift.apply(this);
|
|
13071
|
+
}
|
|
13072
|
+
else {
|
|
13073
|
+
result = Array.prototype.shift.apply(this);
|
|
13074
|
+
}
|
|
13075
|
+
processRemoves$2(this, [result]);
|
|
13076
|
+
return result;
|
|
13077
|
+
},
|
|
13078
|
+
splice: function (...args) {
|
|
13079
|
+
let goodAdds = this._getGoodAdds(core.arraySlice(args, 2));
|
|
13080
|
+
let newArgs = core.arraySlice(args, 0, 2).concat(goodAdds);
|
|
13081
|
+
this._beforeChange();
|
|
13082
|
+
let result;
|
|
13083
|
+
let objPrototype = Object.getPrototypeOf(this);
|
|
13084
|
+
if (objPrototype.splice) {
|
|
13085
|
+
result = objPrototype.splice.apply(this, newArgs);
|
|
13086
|
+
}
|
|
13087
|
+
else {
|
|
13088
|
+
result = Array.prototype.splice.apply(this, newArgs);
|
|
13089
|
+
}
|
|
13090
|
+
processRemoves$2(this, result);
|
|
13091
|
+
if (goodAdds.length) {
|
|
13092
|
+
processAdds$2(this, goodAdds);
|
|
13093
|
+
}
|
|
13094
|
+
return result;
|
|
13095
|
+
},
|
|
13096
|
+
getEntityAspect: function () {
|
|
13097
|
+
return this.parent.entityAspect || this.parent.complexAspect.getEntityAspect();
|
|
13098
|
+
},
|
|
13099
|
+
_getEventParent: function () {
|
|
13100
|
+
return this.getEntityAspect();
|
|
13101
|
+
},
|
|
13102
|
+
_getPendingPubs: function () {
|
|
13103
|
+
let em = this.getEntityAspect().entityManager;
|
|
13104
|
+
return em && em._pendingPubs;
|
|
13105
|
+
},
|
|
13106
|
+
_beforeChange: function () {
|
|
13107
|
+
// default is to do nothing
|
|
13108
|
+
}
|
|
13111
13109
|
};
|
|
13112
13110
|
function updateEntityState(obsArray) {
|
|
13113
13111
|
let entityAspect = obsArray.getEntityAspect();
|
|
@@ -13140,14 +13138,14 @@ function initializeParent(obsArray, parent, parentProperty) {
|
|
|
13140
13138
|
obsArray.parent = parent;
|
|
13141
13139
|
obsArray.parentProperty = parentProperty;
|
|
13142
13140
|
}
|
|
13143
|
-
function processAdds(obsArray, adds) {
|
|
13141
|
+
function processAdds$2(obsArray, adds) {
|
|
13144
13142
|
obsArray._processAdds(adds);
|
|
13145
13143
|
// this is referencing the name of the method on the complexArray not the name of the event
|
|
13146
13144
|
//var args = { added: adds };
|
|
13147
13145
|
//args[obsArray._typeName] = obsArray;
|
|
13148
13146
|
publish(obsArray, "arrayChanged", { array: obsArray, added: adds });
|
|
13149
13147
|
}
|
|
13150
|
-
function processRemoves(obsArray, removes) {
|
|
13148
|
+
function processRemoves$2(obsArray, removes) {
|
|
13151
13149
|
obsArray._processRemoves(removes);
|
|
13152
13150
|
// this is referencing the name of the method on the array not the name of the event
|
|
13153
13151
|
publish(obsArray, "arrayChanged", { array: obsArray, removed: removes });
|
|
@@ -13178,23 +13176,6 @@ const observableArray = {
|
|
|
13178
13176
|
initializeParent: initializeParent
|
|
13179
13177
|
};
|
|
13180
13178
|
|
|
13181
|
-
const ɵ0$4 = function (callback, errorCallback) {
|
|
13182
|
-
let parent = this.parentEntity;
|
|
13183
|
-
let query = EntityQuery.fromEntityNavigation(this.parentEntity, this.navigationProperty);
|
|
13184
|
-
let em = parent.entityAspect.entityManager;
|
|
13185
|
-
return em.executeQuery(query, callback, errorCallback);
|
|
13186
|
-
}, ɵ1$3 = function () {
|
|
13187
|
-
return this.parentEntity.entityAspect;
|
|
13188
|
-
}, ɵ2$2 = function () {
|
|
13189
|
-
let em = this.parentEntity.entityAspect.entityManager;
|
|
13190
|
-
return em && em._pendingPubs;
|
|
13191
|
-
}, ɵ3$2 = function (adds) {
|
|
13192
|
-
return getGoodAdds(this, adds);
|
|
13193
|
-
}, ɵ4$2 = function (adds) {
|
|
13194
|
-
processAdds$1(this, adds);
|
|
13195
|
-
}, ɵ5$2 = function (removes) {
|
|
13196
|
-
processRemoves$1(this, removes);
|
|
13197
|
-
};
|
|
13198
13179
|
let relationArrayMixin = {
|
|
13199
13180
|
/**
|
|
13200
13181
|
Relation arrays are not actually classes, they are objects that mimic arrays. A relation array is collection of
|
|
@@ -13231,15 +13212,31 @@ let relationArrayMixin = {
|
|
|
13231
13212
|
@param [errorCallback] {Function}
|
|
13232
13213
|
@return {Promise}
|
|
13233
13214
|
**/
|
|
13234
|
-
load:
|
|
13235
|
-
|
|
13236
|
-
|
|
13215
|
+
load: function (callback, errorCallback) {
|
|
13216
|
+
let parent = this.parentEntity;
|
|
13217
|
+
let query = EntityQuery.fromEntityNavigation(this.parentEntity, this.navigationProperty);
|
|
13218
|
+
let em = parent.entityAspect.entityManager;
|
|
13219
|
+
return em.executeQuery(query, callback, errorCallback);
|
|
13220
|
+
},
|
|
13221
|
+
_getEventParent: function () {
|
|
13222
|
+
return this.parentEntity.entityAspect;
|
|
13223
|
+
},
|
|
13224
|
+
_getPendingPubs: function () {
|
|
13225
|
+
let em = this.parentEntity.entityAspect.entityManager;
|
|
13226
|
+
return em && em._pendingPubs;
|
|
13227
|
+
},
|
|
13237
13228
|
// virtual impls
|
|
13238
|
-
_getGoodAdds:
|
|
13239
|
-
|
|
13240
|
-
|
|
13229
|
+
_getGoodAdds: function (adds) {
|
|
13230
|
+
return getGoodAdds$1(this, adds);
|
|
13231
|
+
},
|
|
13232
|
+
_processAdds: function (adds) {
|
|
13233
|
+
processAdds$1(this, adds);
|
|
13234
|
+
},
|
|
13235
|
+
_processRemoves: function (removes) {
|
|
13236
|
+
processRemoves$1(this, removes);
|
|
13237
|
+
}
|
|
13241
13238
|
};
|
|
13242
|
-
function getGoodAdds(relationArray, adds) {
|
|
13239
|
+
function getGoodAdds$1(relationArray, adds) {
|
|
13243
13240
|
let goodAdds = checkForDups(relationArray, adds);
|
|
13244
13241
|
if (!goodAdds.length) {
|
|
13245
13242
|
return goodAdds;
|
|
@@ -13347,28 +13344,6 @@ function makeRelationArray(arr, parentEntity, navigationProperty) {
|
|
|
13347
13344
|
return core.extend(arrX, relationArrayMixin);
|
|
13348
13345
|
}
|
|
13349
13346
|
|
|
13350
|
-
const ɵ0$5 = function (adds) {
|
|
13351
|
-
return getGoodAdds$1(this, adds);
|
|
13352
|
-
}, ɵ1$4 = function () {
|
|
13353
|
-
observableArray.updateEntityState(this);
|
|
13354
|
-
}, ɵ2$3 = function (adds) {
|
|
13355
|
-
processAdds$2(this, adds);
|
|
13356
|
-
}, ɵ3$3 = function (removes) {
|
|
13357
|
-
processRemoves$2(this, removes);
|
|
13358
|
-
}, ɵ4$3 = function () {
|
|
13359
|
-
if (!this._origValues)
|
|
13360
|
-
return;
|
|
13361
|
-
let that = this;
|
|
13362
|
-
this.forEach(function (co) {
|
|
13363
|
-
clearAspect(co, that);
|
|
13364
|
-
});
|
|
13365
|
-
this.length = 0;
|
|
13366
|
-
this._origValues.forEach(function (co) {
|
|
13367
|
-
that.push(co);
|
|
13368
|
-
});
|
|
13369
|
-
}, ɵ5$3 = function () {
|
|
13370
|
-
this._origValues = null;
|
|
13371
|
-
};
|
|
13372
13347
|
let complexArrayMixin = {
|
|
13373
13348
|
// complexArray will have the following props
|
|
13374
13349
|
// parent
|
|
@@ -13403,22 +13378,43 @@ let complexArrayMixin = {
|
|
|
13403
13378
|
@readOnly
|
|
13404
13379
|
**/
|
|
13405
13380
|
// virtual impls
|
|
13406
|
-
_getGoodAdds:
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13381
|
+
_getGoodAdds: function (adds) {
|
|
13382
|
+
return getGoodAdds(this, adds);
|
|
13383
|
+
},
|
|
13384
|
+
_beforeChange: function () {
|
|
13385
|
+
observableArray.updateEntityState(this);
|
|
13386
|
+
},
|
|
13387
|
+
_processAdds: function (adds) {
|
|
13388
|
+
processAdds(this, adds);
|
|
13389
|
+
},
|
|
13390
|
+
_processRemoves: function (removes) {
|
|
13391
|
+
processRemoves(this, removes);
|
|
13392
|
+
},
|
|
13393
|
+
_rejectChanges: function () {
|
|
13394
|
+
if (!this._origValues)
|
|
13395
|
+
return;
|
|
13396
|
+
let that = this;
|
|
13397
|
+
this.forEach(function (co) {
|
|
13398
|
+
clearAspect(co, that);
|
|
13399
|
+
});
|
|
13400
|
+
this.length = 0;
|
|
13401
|
+
this._origValues.forEach(function (co) {
|
|
13402
|
+
that.push(co);
|
|
13403
|
+
});
|
|
13404
|
+
},
|
|
13405
|
+
_acceptChanges: function () {
|
|
13406
|
+
this._origValues = null;
|
|
13407
|
+
}
|
|
13412
13408
|
};
|
|
13413
13409
|
// local functions
|
|
13414
|
-
function getGoodAdds
|
|
13410
|
+
function getGoodAdds(complexArray, adds) {
|
|
13415
13411
|
// remove any that are already added here
|
|
13416
13412
|
return adds.filter(function (a) {
|
|
13417
13413
|
// return a.parent !== complexArray.parent; // TODO: check if this is actually a bug in original breezejs ???
|
|
13418
13414
|
return a.complexAspect == null || a.complexAspect.parent !== complexArray.parent;
|
|
13419
13415
|
});
|
|
13420
13416
|
}
|
|
13421
|
-
function processAdds
|
|
13417
|
+
function processAdds(complexArray, adds) {
|
|
13422
13418
|
adds.forEach(function (a) {
|
|
13423
13419
|
// if (a.parent != null) { // TODO: check if this is actually a bug in original breezejs ???
|
|
13424
13420
|
if (a.complexAspect && a.complexAspect.parent != null) {
|
|
@@ -13427,7 +13423,7 @@ function processAdds$2(complexArray, adds) {
|
|
|
13427
13423
|
setAspect(a, complexArray);
|
|
13428
13424
|
});
|
|
13429
13425
|
}
|
|
13430
|
-
function processRemoves
|
|
13426
|
+
function processRemoves(complexArray, removes) {
|
|
13431
13427
|
removes.forEach(function (a) {
|
|
13432
13428
|
clearAspect(a, complexArray);
|
|
13433
13429
|
});
|
|
@@ -13462,28 +13458,6 @@ function makeComplexArray(arr, parent, parentProperty) {
|
|
|
13462
13458
|
return core.extend(arrX, complexArrayMixin);
|
|
13463
13459
|
}
|
|
13464
13460
|
|
|
13465
|
-
const ɵ0$6 = function (adds) {
|
|
13466
|
-
return adds;
|
|
13467
|
-
}, ɵ1$5 = function () {
|
|
13468
|
-
let entityAspect = this.getEntityAspect();
|
|
13469
|
-
if (entityAspect.entityState.isUnchanged()) {
|
|
13470
|
-
entityAspect.setModified();
|
|
13471
|
-
}
|
|
13472
|
-
if (entityAspect.entityState.isModified() && !this._origValues) {
|
|
13473
|
-
this._origValues = this.slice(0);
|
|
13474
|
-
}
|
|
13475
|
-
}, ɵ2$4 = function (adds) {
|
|
13476
|
-
// nothing needed
|
|
13477
|
-
}, ɵ3$4 = function (removes) {
|
|
13478
|
-
// nothing needed;
|
|
13479
|
-
}, ɵ4$4 = function () {
|
|
13480
|
-
if (!this._origValues)
|
|
13481
|
-
return;
|
|
13482
|
-
this.length = 0;
|
|
13483
|
-
Array.prototype.push.apply(this, this._origValues);
|
|
13484
|
-
}, ɵ5$4 = function () {
|
|
13485
|
-
this._origValues = null;
|
|
13486
|
-
};
|
|
13487
13461
|
// TODO: mixin impl is not very typesafe
|
|
13488
13462
|
// Not needed
|
|
13489
13463
|
// interface IPrimitiveArray extends IObservableArray {
|
|
@@ -13525,12 +13499,33 @@ let primitiveArrayMixin = {
|
|
|
13525
13499
|
@readOnly
|
|
13526
13500
|
**/
|
|
13527
13501
|
// virtual impls
|
|
13528
|
-
_getGoodAdds:
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13502
|
+
_getGoodAdds: function (adds) {
|
|
13503
|
+
return adds;
|
|
13504
|
+
},
|
|
13505
|
+
_beforeChange: function () {
|
|
13506
|
+
let entityAspect = this.getEntityAspect();
|
|
13507
|
+
if (entityAspect.entityState.isUnchanged()) {
|
|
13508
|
+
entityAspect.setModified();
|
|
13509
|
+
}
|
|
13510
|
+
if (entityAspect.entityState.isModified() && !this._origValues) {
|
|
13511
|
+
this._origValues = this.slice(0);
|
|
13512
|
+
}
|
|
13513
|
+
},
|
|
13514
|
+
_processAdds: function (adds) {
|
|
13515
|
+
// nothing needed
|
|
13516
|
+
},
|
|
13517
|
+
_processRemoves: function (removes) {
|
|
13518
|
+
// nothing needed;
|
|
13519
|
+
},
|
|
13520
|
+
_rejectChanges: function () {
|
|
13521
|
+
if (!this._origValues)
|
|
13522
|
+
return;
|
|
13523
|
+
this.length = 0;
|
|
13524
|
+
Array.prototype.push.apply(this, this._origValues);
|
|
13525
|
+
},
|
|
13526
|
+
_acceptChanges: function () {
|
|
13527
|
+
this._origValues = null;
|
|
13528
|
+
}
|
|
13534
13529
|
};
|
|
13535
13530
|
// local functions
|
|
13536
13531
|
/** For use by breeze plugin authors only. The class is for use in building a [[IModelLibraryAdapter]] implementation.
|
|
@@ -13588,7 +13583,7 @@ const breeze = {
|
|
|
13588
13583
|
ValidationError: ValidationError,
|
|
13589
13584
|
ValidationOptions: ValidationOptions,
|
|
13590
13585
|
Validator: Validator,
|
|
13591
|
-
version: "2.1.
|
|
13586
|
+
version: "2.1.3"
|
|
13592
13587
|
};
|
|
13593
13588
|
/** @hidden @internal */
|
|
13594
13589
|
let win;
|
|
@@ -13605,5 +13600,5 @@ if (win) {
|
|
|
13605
13600
|
* Generated bundle index. Do not edit.
|
|
13606
13601
|
*/
|
|
13607
13602
|
|
|
13608
|
-
export { AbstractDataServiceAdapter, AndOrPredicate, AnyAllPredicate, AutoGeneratedKeyType, BinaryPredicate, BreezeConfig, BreezeEnum, BreezeEvent, ComplexAspect, ComplexType, DataProperty, DataService, DataType, EntityAction, EntityAspect, EntityKey, EntityManager, EntityQuery, EntityState, EntityType, ExpandClause, FetchStrategy, FilterQueryOp, FnExpr, InterfaceRegistry, JsonResultsAdapter, KeyGenerator, LitExpr, LocalQueryComparisonOptions, MappingContext, MergeStrategy, MetadataStore, NamingConvention, NavigationProperty, OrderByClause, Predicate, PropExpr, QueryOptions, SaveOptions, SelectClause, UnaryPredicate, ValidationError, ValidationOptions, Validator, assertConfig, assertParam, breeze, config, core, makeComplexArray, makePrimitiveArray, makeRelationArray
|
|
13609
|
-
//# sourceMappingURL=breeze-client.
|
|
13603
|
+
export { AbstractDataServiceAdapter, AndOrPredicate, AnyAllPredicate, AutoGeneratedKeyType, BinaryPredicate, BreezeConfig, BreezeEnum, BreezeEvent, ComplexAspect, ComplexType, DataProperty, DataService, DataType, EntityAction, EntityAspect, EntityKey, EntityManager, EntityQuery, EntityState, EntityType, ExpandClause, FetchStrategy, FilterQueryOp, FnExpr, InterfaceRegistry, JsonResultsAdapter, KeyGenerator, LitExpr, LocalQueryComparisonOptions, MappingContext, MergeStrategy, MetadataStore, NamingConvention, NavigationProperty, OrderByClause, Predicate, PropExpr, QueryOptions, SaveOptions, SelectClause, UnaryPredicate, ValidationError, ValidationOptions, Validator, assertConfig, assertParam, breeze, config, core, makeComplexArray, makePrimitiveArray, makeRelationArray };
|
|
13604
|
+
//# sourceMappingURL=breeze-client.mjs.map
|