ballerina-core 1.0.256 → 1.0.258
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/bin/src/api-response-handler/coroutines/runner.js +20 -13
- package/bin/src/api-response-handler/state.js +13 -11
- package/bin/src/apiResultStatus/state.d.ts +10 -3
- package/bin/src/apiResultStatus/state.js +2 -5
- package/bin/src/async/domains/mirroring/domains/collection/coroutines/synchronizers.js +314 -196
- package/bin/src/async/domains/mirroring/domains/collection/state.js +126 -36
- package/bin/src/async/domains/mirroring/domains/entity/domains/loaded-collection/state.js +18 -11
- package/bin/src/async/domains/mirroring/domains/entity/domains/loaded-collection-entity/state.js +19 -19
- package/bin/src/async/domains/mirroring/domains/entity/domains/loaded-entities/state.js +1 -1
- package/bin/src/async/domains/mirroring/domains/entity/domains/loaded-entity/state.js +18 -18
- package/bin/src/async/domains/mirroring/domains/entity/state.js +18 -9
- package/bin/src/async/domains/mirroring/domains/singleton/coroutines/synchronizers.js +134 -83
- package/bin/src/async/domains/mirroring/domains/singleton/state.js +52 -8
- package/bin/src/async/domains/mirroring/domains/synchronization-result/state.d.ts +15 -9
- package/bin/src/async/domains/mirroring/domains/synchronization-result/state.js +1 -1
- package/bin/src/async/domains/mirroring/domains/synchronized-entities/state.js +7 -4
- package/bin/src/async/domains/promise/state.d.ts +9 -4
- package/bin/src/async/domains/promise/state.js +20 -9
- package/bin/src/async/domains/synchronized/coroutines/synchronize.js +80 -28
- package/bin/src/async/domains/synchronized/state.d.ts +14 -7
- package/bin/src/async/domains/synchronized/state.js +16 -6
- package/bin/src/async/state.d.ts +56 -45
- package/bin/src/async/state.js +115 -97
- package/bin/src/baseEntity/domains/identifiable/state.d.ts +15 -11
- package/bin/src/baseEntity/domains/identifiable/state.js +9 -9
- package/bin/src/collections/domains/array/state.d.ts +7 -7
- package/bin/src/collections/domains/array/state.js +5 -5
- package/bin/src/collections/domains/errors/state.d.ts +10 -10
- package/bin/src/collections/domains/errors/state.js +10 -10
- package/bin/src/collections/domains/immutable/domains/list/state.js +46 -44
- package/bin/src/collections/domains/immutable/domains/map/state.js +41 -23
- package/bin/src/collections/domains/immutable/domains/orderedMap/state.js +84 -65
- package/bin/src/collections/domains/immutable/domains/ordereredSet/state.d.ts +6 -6
- package/bin/src/collections/domains/immutable/domains/ordereredSet/state.js +6 -6
- package/bin/src/collections/domains/maybe/state.d.ts +9 -9
- package/bin/src/collections/domains/maybe/state.js +12 -9
- package/bin/src/collections/domains/product/state.d.ts +25 -19
- package/bin/src/collections/domains/product/state.js +13 -10
- package/bin/src/collections/domains/sum/state.d.ts +101 -77
- package/bin/src/collections/domains/sum/state.js +49 -32
- package/bin/src/collections/domains/valueOrErrors/state.js +81 -56
- package/bin/src/coroutines/builder.js +40 -19
- package/bin/src/coroutines/state.js +381 -306
- package/bin/src/coroutines/template.js +97 -59
- package/bin/src/debounced/coroutines/debounce.js +115 -89
- package/bin/src/debounced/state.js +62 -25
- package/bin/src/diagnostics/domains/message-box/state.d.ts +1 -1
- package/bin/src/diagnostics/domains/message-box/state.js +3 -3
- package/bin/src/foreignMutations/state.d.ts +3 -3
- package/bin/src/foreignMutations/state.js +1 -1
- package/bin/src/forms/domains/attachments/views/attachments-view.js +30 -8
- package/bin/src/forms/domains/collection/domains/reference/state.js +26 -20
- package/bin/src/forms/domains/collection/domains/selection/state.js +1 -1
- package/bin/src/forms/domains/dispatched-forms/built-ins/state.js +2007 -754
- package/bin/src/forms/domains/dispatched-forms/deserializer/coroutines/runner.d.ts.map +1 -1
- package/bin/src/forms/domains/dispatched-forms/deserializer/coroutines/runner.js +123 -44
- package/bin/src/forms/domains/dispatched-forms/deserializer/coroutines/runner.js.map +1 -1
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/enum/state.js +40 -27
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/primitive/state.js +21 -13
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/stream/state.js +43 -27
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/sumUnitDate/state.js +39 -22
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/serializable/state.d.ts +167 -0
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/serializable/state.d.ts.map +1 -0
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/serializable/state.js +367 -0
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/serializable/state.js.map +1 -0
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/types/state.d.ts +7 -29
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/types/state.d.ts.map +1 -1
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/types/state.js +1098 -572
- package/bin/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/types/state.js.map +1 -1
- package/bin/src/forms/domains/dispatched-forms/deserializer/state.d.ts +1 -0
- package/bin/src/forms/domains/dispatched-forms/deserializer/state.d.ts.map +1 -1
- package/bin/src/forms/domains/dispatched-forms/deserializer/state.js +322 -90
- package/bin/src/forms/domains/dispatched-forms/deserializer/state.js.map +1 -1
- package/bin/src/forms/domains/dispatched-forms/deserializer/template.js +3 -2
- package/bin/src/forms/domains/dispatched-forms/runner/coroutines/runner.d.ts +27 -4
- package/bin/src/forms/domains/dispatched-forms/runner/coroutines/runner.js +136 -82
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/base-64-file/state.js +3 -3
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/base-64-file/template.js +49 -23
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/boolean/state.js +3 -3
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/boolean/template.js +52 -24
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/date/state.js +18 -6
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/date/template.js +64 -30
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/enum/state.js +9 -6
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/enum/template.js +153 -60
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/enum-multiselect/state.js +1 -1
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/enum-multiselect/template.js +127 -50
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/injectables/state.js +40 -22
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/list/state.js +31 -13
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/list/template.js +452 -152
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/lookup-type/state.js +1 -1
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/lookup-type/template.js +29 -8
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/lookup-type/template.js.map +1 -1
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/map/state.js +61 -18
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/map/template.js +329 -90
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/number/state.js +3 -3
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/number/template.js +54 -23
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/one/coroutines/_debouncer.js +22 -10
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/one/coroutines/_initializeOne.js +49 -31
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/one/coroutines/_initializeStream.js +29 -10
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/one/coroutines/builder.js +2 -2
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/one/coroutines/runner.js +47 -26
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/one/state.js +88 -40
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/one/template.js +386 -152
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/readOnly/state.js +19 -10
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/readOnly/template.js +99 -33
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/record/state.js +32 -11
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/record/template.js +227 -82
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/searchable-infinite-stream/state.js +35 -13
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/searchable-infinite-stream/template.js +195 -68
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/searchable-infinite-stream-multiselect/state.js +36 -13
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/searchable-infinite-stream-multiselect/template.js +246 -106
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/secret/state.js +3 -3
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/secret/template.js +54 -23
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/state.js +40 -27
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/string/state.js +3 -3
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/string/template.js +58 -26
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/sum/state.js +22 -7
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/sum/template.js +188 -53
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/coroutines/builder.js +2 -2
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/coroutines/infiniteLoader.js +57 -24
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/coroutines/initialiseFiltersAndSorting.js +70 -20
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/coroutines/initialiseTable.d.ts.map +1 -1
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/coroutines/initialiseTable.js +88 -48
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/coroutines/initialiseTable.js.map +1 -1
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/coroutines/loadWithRetries.js +40 -20
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/coroutines/runner.js +43 -15
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/state.js +301 -137
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/state.js.map +1 -1
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/template.js +692 -240
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/tuple/state.js +20 -8
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/tuple/template.js +132 -35
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/union/state.js +21 -8
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/union/template.js +105 -33
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/unit/state.js +12 -9
- package/bin/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/unit/template.js +54 -20
- package/bin/src/forms/domains/dispatched-forms/runner/domains/deltas/state.js +716 -560
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/list/state.js +58 -18
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/lookup/state.js +45 -14
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/map/state.js +76 -18
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/multiSelection/state.js +82 -24
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/nestedDispatcher/state.js +37 -8
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/one/state.js +120 -36
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/primitive/state.js +145 -63
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/readOnly/state.js +44 -12
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/record/recordField/state.js +14 -4
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/record/state.js +81 -25
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/singleSelectionDispatcher/state.js +82 -24
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/sum/state.js +63 -20
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/table/state.js +248 -74
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/tupleDispatcher/state.js +61 -13
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/domains/unionDispatcher/state.js +92 -33
- package/bin/src/forms/domains/dispatched-forms/runner/domains/dispatcher/state.js +144 -45
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/create/coroutines/_init.js +203 -95
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/create/coroutines/_sync.js +79 -37
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/create/coroutines/builder.js +2 -2
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/create/coroutines/runner.js +19 -17
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/create/state.js +58 -11
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/create/template.js +73 -25
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/edit/coroutines/_init.js +205 -95
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/edit/coroutines/_sync.js +78 -37
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/edit/coroutines/builder.js +2 -2
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/edit/coroutines/runner.js +19 -17
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/edit/state.js +58 -11
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/edit/template.js +71 -25
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/passthrough/coroutines/runner.js +163 -85
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/passthrough/state.js +10 -4
- package/bin/src/forms/domains/dispatched-forms/runner/domains/kind/passthrough/template.js +72 -27
- package/bin/src/forms/domains/dispatched-forms/runner/domains/traversal/state.js +796 -436
- package/bin/src/forms/domains/dispatched-forms/runner/state.js +62 -38
- package/bin/src/forms/domains/dispatched-forms/runner/template.js +78 -25
- package/bin/src/forms/domains/launcher/coroutines/runner.js +120 -45
- package/bin/src/forms/domains/launcher/domains/create/coroutines/runner.js +240 -101
- package/bin/src/forms/domains/launcher/domains/create/state.js +62 -17
- package/bin/src/forms/domains/launcher/domains/create/template.js +84 -42
- package/bin/src/forms/domains/launcher/domains/edit/coroutines/runner.js +242 -103
- package/bin/src/forms/domains/launcher/domains/edit/state.js +62 -17
- package/bin/src/forms/domains/launcher/domains/edit/template.js +86 -43
- package/bin/src/forms/domains/launcher/domains/merger/state.d.ts +4 -4
- package/bin/src/forms/domains/launcher/domains/merger/state.js +35 -26
- package/bin/src/forms/domains/launcher/domains/passthrough/coroutines/runner.js +88 -42
- package/bin/src/forms/domains/launcher/domains/passthrough/state.js +44 -19
- package/bin/src/forms/domains/launcher/domains/passthrough/template.js +56 -34
- package/bin/src/forms/domains/launcher/state.js +6 -6
- package/bin/src/forms/domains/launcher/template.js +169 -85
- package/bin/src/forms/domains/parser/coroutines/runner.js +87 -25
- package/bin/src/forms/domains/parser/domains/built-ins/state.js +944 -533
- package/bin/src/forms/domains/parser/domains/deltas/state.js +444 -318
- package/bin/src/forms/domains/parser/domains/injectables/state.js +29 -26
- package/bin/src/forms/domains/parser/domains/layout/state.js +271 -183
- package/bin/src/forms/domains/parser/domains/predicates/domains/extractor/state.js +324 -162
- package/bin/src/forms/domains/parser/domains/predicates/state.js +1514 -984
- package/bin/src/forms/domains/parser/domains/renderer/state.js +1137 -480
- package/bin/src/forms/domains/parser/domains/types/state.js +355 -170
- package/bin/src/forms/domains/parser/domains/validator/state.js +417 -280
- package/bin/src/forms/domains/parser/state.js +612 -373
- package/bin/src/forms/domains/parser/template.js +1 -1
- package/bin/src/forms/domains/primitives/domains/base-64-file/state.js +5 -5
- package/bin/src/forms/domains/primitives/domains/base-64-file/template.js +38 -19
- package/bin/src/forms/domains/primitives/domains/boolean/state.js +5 -5
- package/bin/src/forms/domains/primitives/domains/boolean/template.js +38 -19
- package/bin/src/forms/domains/primitives/domains/date/state.js +18 -9
- package/bin/src/forms/domains/primitives/domains/date/template.js +51 -25
- package/bin/src/forms/domains/primitives/domains/enum/state.js +6 -6
- package/bin/src/forms/domains/primitives/domains/enum/template.js +117 -48
- package/bin/src/forms/domains/primitives/domains/enum-multiselect/state.js +1 -1
- package/bin/src/forms/domains/primitives/domains/enum-multiselect/template.js +99 -40
- package/bin/src/forms/domains/primitives/domains/list/state.js +14 -14
- package/bin/src/forms/domains/primitives/domains/list/template.js +200 -71
- package/bin/src/forms/domains/primitives/domains/map/state.js +14 -14
- package/bin/src/forms/domains/primitives/domains/map/template.js +294 -103
- package/bin/src/forms/domains/primitives/domains/number/state.js +5 -5
- package/bin/src/forms/domains/primitives/domains/number/template.js +38 -19
- package/bin/src/forms/domains/primitives/domains/searchable-infinite-stream/state.js +33 -16
- package/bin/src/forms/domains/primitives/domains/searchable-infinite-stream/template.js +171 -62
- package/bin/src/forms/domains/primitives/domains/searchable-infinite-stream-multiselect/state.js +1 -1
- package/bin/src/forms/domains/primitives/domains/searchable-infinite-stream-multiselect/template.js +182 -69
- package/bin/src/forms/domains/primitives/domains/secret/state.js +5 -5
- package/bin/src/forms/domains/primitives/domains/secret/template.js +38 -19
- package/bin/src/forms/domains/primitives/domains/string/state.js +5 -5
- package/bin/src/forms/domains/primitives/domains/string/template.js +42 -22
- package/bin/src/forms/domains/primitives/domains/sum/state.js +10 -10
- package/bin/src/forms/domains/primitives/domains/sum/template.js +141 -50
- package/bin/src/forms/domains/primitives/domains/tuple/state.js +9 -9
- package/bin/src/forms/domains/primitives/domains/tuple/template.js +100 -33
- package/bin/src/forms/domains/primitives/domains/unit/state.js +8 -8
- package/bin/src/forms/domains/primitives/domains/unit/template.js +22 -9
- package/bin/src/forms/domains/singleton/domains/form-label/state.d.ts +4 -4
- package/bin/src/forms/domains/singleton/domains/form-label/state.js +1 -1
- package/bin/src/forms/domains/singleton/state.js +12 -10
- package/bin/src/forms/domains/singleton/template.js +288 -113
- package/bin/src/fun/domains/curry/state.d.ts +4 -2
- package/bin/src/fun/domains/curry/state.js +1 -1
- package/bin/src/fun/domains/id/state.d.ts +1 -1
- package/bin/src/fun/domains/id/state.js +1 -1
- package/bin/src/fun/domains/predicate/domains/bool-expr.d.ts +57 -41
- package/bin/src/fun/domains/predicate/domains/bool-expr.js +76 -67
- package/bin/src/fun/domains/predicate/state.d.ts +9 -7
- package/bin/src/fun/domains/predicate/state.js +14 -10
- package/bin/src/fun/domains/simpleCallback/state.d.ts +1 -1
- package/bin/src/fun/domains/simpleCallback/state.js +1 -1
- package/bin/src/fun/domains/uncurry/state.d.ts +4 -2
- package/bin/src/fun/domains/uncurry/state.js +1 -1
- package/bin/src/fun/domains/unit/state.d.ts +1 -1
- package/bin/src/fun/domains/unit/state.js +1 -1
- package/bin/src/fun/domains/updater/domains/caseUpdater/state.d.ts +22 -7
- package/bin/src/fun/domains/updater/domains/caseUpdater/state.js +18 -10
- package/bin/src/fun/domains/updater/domains/mapUpdater/state.d.ts +24 -13
- package/bin/src/fun/domains/updater/domains/mapUpdater/state.js +40 -10
- package/bin/src/fun/domains/updater/domains/maybeUpdater/state.d.ts +19 -13
- package/bin/src/fun/domains/updater/domains/maybeUpdater/state.js +20 -9
- package/bin/src/fun/domains/updater/domains/orderedMapUpdater/state.d.ts +24 -13
- package/bin/src/fun/domains/updater/domains/orderedMapUpdater/state.js +47 -11
- package/bin/src/fun/domains/updater/domains/orderedSetUpdater/state.d.ts +20 -8
- package/bin/src/fun/domains/updater/domains/orderedSetUpdater/state.js +17 -5
- package/bin/src/fun/domains/updater/domains/replaceWith/state.d.ts +1 -1
- package/bin/src/fun/domains/updater/domains/replaceWith/state.js +1 -1
- package/bin/src/fun/domains/updater/domains/simpleUpdater/domains/baseSimpleUpdater/state.d.ts +13 -4
- package/bin/src/fun/domains/updater/domains/simpleUpdater/domains/baseSimpleUpdater/state.js +6 -4
- package/bin/src/fun/domains/updater/domains/simpleUpdater/state.d.ts +60 -22
- package/bin/src/fun/domains/updater/domains/simpleUpdater/state.js +42 -31
- package/bin/src/fun/domains/updater/state.d.ts +4 -4
- package/bin/src/fun/domains/updater/state.js +12 -10
- package/bin/src/fun/state.d.ts +3 -3
- package/bin/src/fun/state.js +9 -7
- package/bin/src/infinite-data-stream/coroutines/builder.js +1 -1
- package/bin/src/infinite-data-stream/coroutines/infiniteLoader.js +47 -20
- package/bin/src/infinite-data-stream/coroutines/runner.js +7 -7
- package/bin/src/infinite-data-stream/state.d.ts +84 -51
- package/bin/src/infinite-data-stream/state.js +125 -61
- package/bin/src/infinite-data-stream/template.js +3 -2
- package/bin/src/math/domains/DOMRect/state.d.ts +4 -4
- package/bin/src/math/domains/DOMRect/state.js +10 -8
- package/bin/src/math/domains/number/state.d.ts +5 -5
- package/bin/src/math/domains/number/state.js +5 -5
- package/bin/src/math/domains/rect/state.d.ts +8 -8
- package/bin/src/math/domains/rect/state.js +16 -15
- package/bin/src/math/domains/rgba/state.d.ts +17 -17
- package/bin/src/math/domains/rgba/state.js +77 -81
- package/bin/src/math/domains/size2/state.d.ts +8 -8
- package/bin/src/math/domains/size2/state.js +6 -6
- package/bin/src/math/domains/vector2/state.d.ts +10 -10
- package/bin/src/math/domains/vector2/state.js +8 -8
- package/bin/src/queue/state.js +23 -16
- package/bin/src/state/domains/repository/state.d.ts +15 -9
- package/bin/src/state/domains/repository/state.js +1 -1
- package/bin/src/template/state.js +163 -115
- package/bin/src/validation/state.js +38 -45
- package/bin/src/value/domains/mutable-value/state.js +3 -2
- package/bin/src/value/state.d.ts +9 -9
- package/bin/src/value/state.js +11 -8
- package/bin/src/value-infinite-data-stream/coroutines/builder.js +1 -1
- package/bin/src/value-infinite-data-stream/coroutines/infiniteLoader.js +55 -20
- package/bin/src/value-infinite-data-stream/coroutines/runner.js +6 -4
- package/bin/src/value-infinite-data-stream/state.js +199 -77
- package/bin/src/value-infinite-data-stream/template.js +4 -2
- package/bin/src/visibility/state.d.ts +5 -2
- package/bin/src/visibility/state.js +1 -1
- package/main.ts +1 -0
- package/package.json +1 -1
- package/src/forms/domains/dispatched-forms/deserializer/coroutines/runner.ts +2 -2
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/apis/state.ts +117 -111
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/list/state.ts +14 -5
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/lookup/state.ts +75 -18
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/map/state.ts +16 -6
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/nestedRenderer/state.ts +27 -9
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/one/state.ts +28 -8
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/readOnly/state.ts +13 -4
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/record/domains/recordFieldRenderer/state.ts +18 -7
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/record/state.ts +40 -14
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/sum/state.ts +15 -5
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/table/domains/tableCellRenderer/state.ts +20 -6
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/table/state.ts +101 -50
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/tuple/state.ts +22 -23
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/domains/union/state.ts +37 -19
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/forms/domains/renderer/state.ts +64 -6
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/serializable/state.ts +585 -0
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/domains/types/state.ts +592 -340
- package/src/forms/domains/dispatched-forms/deserializer/domains/specification/state.ts +364 -226
- package/src/forms/domains/dispatched-forms/deserializer/state.ts +1 -2
- package/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/lookup-type/template.tsx +1 -1
- package/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/state.ts +2 -2
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { CoTypedFactory } from "../../coroutines/builder";
|
|
2
2
|
import { AsyncState } from "../../../main";
|
|
3
3
|
export const HandleApiResponse = (asyncAccessor, handlers) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
const CheckerCo = CoTypedFactory();
|
|
5
|
+
return CheckerCo.GetState().then((_) => {
|
|
6
|
+
const asyncState = asyncAccessor(_);
|
|
7
|
+
return AsyncState.Operations.isLoading(asyncState)
|
|
8
|
+
? CheckerCo.Do(() => {})
|
|
9
|
+
: CheckerCo.Do(() => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
return AsyncState.Operations.status(asyncState) === "error"
|
|
12
|
+
? (_a = handlers.handleError) === null || _a === void 0
|
|
13
|
+
? void 0
|
|
14
|
+
: _a.call(
|
|
15
|
+
handlers,
|
|
16
|
+
asyncState.kind === "error" ? asyncState.error : undefined,
|
|
17
|
+
)
|
|
18
|
+
: (_b = handlers.handleSuccess) === null || _b === void 0
|
|
19
|
+
? void 0
|
|
20
|
+
: _b.call(handlers, _);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
16
23
|
};
|
|
17
|
-
//# sourceMappingURL=runner.js.map
|
|
24
|
+
//# sourceMappingURL=runner.js.map
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export const ApiResponseChecker = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
Default: (_) => ({
|
|
3
|
+
apiResponseChecked: _ !== null && _ !== void 0 ? _ : false,
|
|
4
|
+
}),
|
|
5
|
+
Updaters: () => ({
|
|
6
|
+
toChecked: () => (_) =>
|
|
7
|
+
Object.assign(Object.assign({}, _), { apiResponseChecked: true }),
|
|
8
|
+
toUnchecked: () => (_) =>
|
|
9
|
+
Object.assign(Object.assign({}, _), { apiResponseChecked: false }),
|
|
10
|
+
}),
|
|
11
|
+
Operations: {
|
|
12
|
+
checked: (_) => _.apiResponseChecked,
|
|
13
|
+
},
|
|
12
14
|
};
|
|
13
|
-
//# sourceMappingURL=state.js.map
|
|
15
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
export declare const errorPermanenceStatus: readonly [
|
|
1
|
+
export declare const errorPermanenceStatus: readonly [
|
|
2
|
+
"permanent failure",
|
|
3
|
+
"transient failure",
|
|
4
|
+
];
|
|
2
5
|
export type ErrorPermanenceStatus = (typeof errorPermanenceStatus)[number];
|
|
3
|
-
export declare const apiResultStatuses: readonly [
|
|
6
|
+
export declare const apiResultStatuses: readonly [
|
|
7
|
+
"success",
|
|
8
|
+
"permanent failure",
|
|
9
|
+
"transient failure",
|
|
10
|
+
];
|
|
4
11
|
export type ApiResultStatus = (typeof apiResultStatuses)[number];
|
|
5
|
-
//# sourceMappingURL=state.d.ts.map
|
|
12
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export const errorPermanenceStatus = [
|
|
2
|
-
"permanent failure",
|
|
3
|
-
"transient failure",
|
|
4
|
-
];
|
|
1
|
+
export const errorPermanenceStatus = ["permanent failure", "transient failure"];
|
|
5
2
|
export const apiResultStatuses = ["success", ...errorPermanenceStatus];
|
|
6
|
-
//# sourceMappingURL=state.js.map
|
|
3
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -1,220 +1,338 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
CoTypedFactory,
|
|
3
|
+
AsyncState,
|
|
4
|
+
replaceWith,
|
|
5
|
+
Entity,
|
|
6
|
+
Debounced,
|
|
7
|
+
} from "../../../../../../../main";
|
|
2
8
|
import { Fun } from "../../../../../../fun/state";
|
|
3
9
|
import { insideEntitySynchronizedAndDebounced } from "../../singleton/coroutines/synchronizers";
|
|
4
10
|
import { Collection, CollectionEntity } from "../state";
|
|
5
|
-
export const collectionEntityLoader =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
export const collectionEntityLoader =
|
|
12
|
+
(synchronizers) => (k, id, narrowing_k, widening_k, dependees) =>
|
|
13
|
+
Object.assign(
|
|
14
|
+
(mutation, mutationArg, entityId) => {
|
|
15
|
+
const Co = CoTypedFactory();
|
|
16
|
+
return Co.GetState().then((current) => {
|
|
17
|
+
const entities = narrowing_k(current).entities;
|
|
18
|
+
if (
|
|
19
|
+
!AsyncState.Operations.hasValue(entities.sync) ||
|
|
20
|
+
!entities.sync.value.get(entityId)
|
|
21
|
+
)
|
|
11
22
|
return Co.Return("completed");
|
|
12
|
-
|
|
13
|
-
.embed(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
return synchronizers[k][mutation](mutationArg)
|
|
24
|
+
.embed(
|
|
25
|
+
(_) => {
|
|
26
|
+
const entities = narrowing_k(_).entities;
|
|
27
|
+
if (AsyncState.Operations.hasValue(entities.sync)) {
|
|
28
|
+
const entity = entities.sync.value.get(entityId);
|
|
29
|
+
if (entity != undefined)
|
|
18
30
|
return Object.assign(Object.assign({}, _), entity);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
},
|
|
34
|
+
Fun(Collection().Updaters.Core.entity.set(entityId)).then(
|
|
35
|
+
widening_k,
|
|
36
|
+
),
|
|
37
|
+
)
|
|
38
|
+
.then((syncResult) =>
|
|
39
|
+
Co.All(dependees).then((syncResults) =>
|
|
40
|
+
Co.Return(
|
|
41
|
+
[syncResult, ...syncResults].some(
|
|
42
|
+
(_) => _ == "should be enqueued again",
|
|
43
|
+
)
|
|
44
|
+
? "should be enqueued again"
|
|
45
|
+
: "completed",
|
|
46
|
+
),
|
|
47
|
+
),
|
|
48
|
+
);
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
add: (entityId, entity, position) => {
|
|
53
|
+
const Co = CoTypedFactory();
|
|
54
|
+
const CoColl = CoTypedFactory();
|
|
55
|
+
return CoColl.SetState((_) => {
|
|
31
56
|
// alert("state set?!?")
|
|
32
57
|
// return Collection<Collections[k]>().Updaters.Core.entity.add([entityId, entity, position ?? { kind: "at the end" }])(_)
|
|
33
58
|
return _;
|
|
34
|
-
|
|
35
|
-
.embed(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
59
|
+
})
|
|
60
|
+
.embed(
|
|
61
|
+
(_) => Object.assign(Object.assign({}, _), narrowing_k(_)),
|
|
62
|
+
widening_k,
|
|
63
|
+
)
|
|
64
|
+
.then(() =>
|
|
65
|
+
synchronizers[k]
|
|
66
|
+
.add(entity)
|
|
67
|
+
.embed(
|
|
68
|
+
(_) => {
|
|
69
|
+
const entities = narrowing_k(_).entities;
|
|
70
|
+
if (AsyncState.Operations.hasValue(entities.sync)) {
|
|
71
|
+
const entity = entities.sync.value.get(entityId);
|
|
72
|
+
if (entity != undefined)
|
|
73
|
+
return Object.assign(Object.assign({}, _), entity);
|
|
74
|
+
}
|
|
75
|
+
return undefined;
|
|
76
|
+
},
|
|
77
|
+
Fun(Collection().Updaters.Core.entity.set(entityId)).then(
|
|
78
|
+
widening_k,
|
|
79
|
+
),
|
|
80
|
+
)
|
|
81
|
+
// )
|
|
82
|
+
// .then(_ =>
|
|
83
|
+
// CoColl.GetState().then(current => {
|
|
84
|
+
// if (!AsyncState.Operations.hasValue(current.entities.sync)) return CoColl.Return(unit)
|
|
85
|
+
// const syncedEntity = current.entities.sync.value.get(entityId)
|
|
86
|
+
// if (!syncedEntity || !AsyncState.Operations.hasValue(syncedEntity.value.value.sync)) return CoColl.Return(unit)
|
|
87
|
+
// if (id(syncedEntity.value.value.sync.value) == entityId) return CoColl.Return(unit)
|
|
88
|
+
// // otherwise, the id has changed (probably overridden by the API), let's save the new id
|
|
89
|
+
// return CoColl.SetState(
|
|
90
|
+
// Collection<Collections[k]>().Updaters.Core.entity.add([id(syncedEntity.value.value.sync.value), syncedEntity, position ?? { kind:"at the end" }]).then(
|
|
91
|
+
// Collection<Collections[k]>().Updaters.Core.entity.remove(entityId)
|
|
92
|
+
// )
|
|
93
|
+
// )
|
|
94
|
+
// }
|
|
95
|
+
// )
|
|
96
|
+
// .embed<Context & SynchronizedEntities, SynchronizedEntities>(_ => ({ ..._, ...(narrowing_k(_)) }), widening_k)
|
|
97
|
+
.then((syncResult) =>
|
|
98
|
+
Co.All(dependees).then((syncResults) =>
|
|
99
|
+
Co.Return(
|
|
100
|
+
[syncResult, ...syncResults].some(
|
|
101
|
+
(_) => _ == "should be enqueued again",
|
|
102
|
+
)
|
|
103
|
+
? "should be enqueued again"
|
|
104
|
+
: "completed",
|
|
105
|
+
),
|
|
106
|
+
),
|
|
107
|
+
),
|
|
108
|
+
);
|
|
109
|
+
},
|
|
110
|
+
remove: (entityId) => {
|
|
111
|
+
const Co = CoTypedFactory();
|
|
112
|
+
const CoColl = CoTypedFactory();
|
|
113
|
+
return CoColl.SetState(
|
|
114
|
+
// Collection<Collections[k]>().Updaters.Core.entity.remove(entityId)
|
|
115
|
+
Collection().Updaters.Core.removed(entityId, replaceWith(true)),
|
|
116
|
+
)
|
|
117
|
+
.embed(
|
|
118
|
+
(_) => Object.assign(Object.assign({}, _), narrowing_k(_)),
|
|
119
|
+
widening_k,
|
|
120
|
+
)
|
|
121
|
+
.then(() =>
|
|
122
|
+
synchronizers[k].remove(entityId).embed(
|
|
123
|
+
(_) => {
|
|
124
|
+
const entities = narrowing_k(_).entities;
|
|
125
|
+
if (AsyncState.Operations.hasValue(entities.sync)) {
|
|
126
|
+
const entity = entities.sync.value.get(entityId);
|
|
127
|
+
if (entity != undefined)
|
|
128
|
+
return Object.assign(Object.assign({}, _), entity);
|
|
129
|
+
}
|
|
130
|
+
return undefined;
|
|
131
|
+
},
|
|
132
|
+
Fun(Collection().Updaters.Core.entity.set(entityId)).then(
|
|
133
|
+
widening_k,
|
|
134
|
+
),
|
|
135
|
+
),
|
|
136
|
+
)
|
|
137
|
+
.then((_) =>
|
|
138
|
+
Co.GetState().then((current) => {
|
|
139
|
+
const entities = narrowing_k(current).entities;
|
|
140
|
+
if (!AsyncState.Operations.hasValue(entities.sync))
|
|
141
|
+
return Co.Return("completed");
|
|
41
142
|
const entity = entities.sync.value.get(entityId);
|
|
42
|
-
if (entity
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
.then((_) => Co.GetState().then((current) => {
|
|
86
|
-
const entities = narrowing_k(current).entities;
|
|
87
|
-
if (!AsyncState.Operations.hasValue(entities.sync))
|
|
88
|
-
return Co.Return("completed");
|
|
89
|
-
const entity = entities.sync.value.get(entityId);
|
|
90
|
-
if (!entity || entity.value.sync.kind == "error")
|
|
91
|
-
return Co.Return("completed");
|
|
92
|
-
return Co.All(dependees).then((syncResults) => Co.Return(syncResults.some((_) => _ == "should be enqueued again")
|
|
93
|
-
? "should be enqueued again"
|
|
94
|
-
: "completed"));
|
|
95
|
-
}));
|
|
96
|
-
},
|
|
97
|
-
wholeMutations: (mutation, mutationArg) => {
|
|
98
|
-
const Co = CoTypedFactory();
|
|
99
|
-
const CoColl = CoTypedFactory();
|
|
100
|
-
return CoColl.Seq([
|
|
101
|
-
synchronizers[k]["wholeMutations"][mutation](mutationArg)
|
|
102
|
-
.embed((_) => (Object.assign(Object.assign({}, _), _.entities)), Collection().Updaters.Core.entities),
|
|
103
|
-
])
|
|
104
|
-
.embed((_) => (Object.assign(Object.assign({}, _), narrowing_k(_))), widening_k)
|
|
105
|
-
.then((syncResult) => Co.All(dependees).then((syncResults) => Co.Return([syncResult, ...syncResults].some((_) => _ == "should be enqueued again")
|
|
106
|
-
? "should be enqueued again"
|
|
107
|
-
: "completed")));
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
export const collectionDirtySetter = () => (k, narrowing_k, widening_k) => (entityId, dirtyStatus) => {
|
|
143
|
+
if (!entity || entity.value.sync.kind == "error")
|
|
144
|
+
return Co.Return("completed");
|
|
145
|
+
return Co.All(dependees).then((syncResults) =>
|
|
146
|
+
Co.Return(
|
|
147
|
+
syncResults.some((_) => _ == "should be enqueued again")
|
|
148
|
+
? "should be enqueued again"
|
|
149
|
+
: "completed",
|
|
150
|
+
),
|
|
151
|
+
);
|
|
152
|
+
}),
|
|
153
|
+
);
|
|
154
|
+
},
|
|
155
|
+
wholeMutations: (mutation, mutationArg) => {
|
|
156
|
+
const Co = CoTypedFactory();
|
|
157
|
+
const CoColl = CoTypedFactory();
|
|
158
|
+
return CoColl.Seq([
|
|
159
|
+
synchronizers[k]["wholeMutations"]
|
|
160
|
+
[mutation](mutationArg)
|
|
161
|
+
.embed(
|
|
162
|
+
(_) => Object.assign(Object.assign({}, _), _.entities),
|
|
163
|
+
Collection().Updaters.Core.entities,
|
|
164
|
+
),
|
|
165
|
+
])
|
|
166
|
+
.embed(
|
|
167
|
+
(_) => Object.assign(Object.assign({}, _), narrowing_k(_)),
|
|
168
|
+
widening_k,
|
|
169
|
+
)
|
|
170
|
+
.then((syncResult) =>
|
|
171
|
+
Co.All(dependees).then((syncResults) =>
|
|
172
|
+
Co.Return(
|
|
173
|
+
[syncResult, ...syncResults].some(
|
|
174
|
+
(_) => _ == "should be enqueued again",
|
|
175
|
+
)
|
|
176
|
+
? "should be enqueued again"
|
|
177
|
+
: "completed",
|
|
178
|
+
),
|
|
179
|
+
),
|
|
180
|
+
);
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
);
|
|
184
|
+
export const collectionDirtySetter =
|
|
185
|
+
() => (k, narrowing_k, widening_k) => (entityId, dirtyStatus) => {
|
|
111
186
|
const CoEntity = CoTypedFactory();
|
|
112
187
|
const Co = CoTypedFactory();
|
|
113
|
-
return CoEntity.SetState(
|
|
188
|
+
return CoEntity.SetState(
|
|
189
|
+
CollectionEntity().Updaters.Core.entity(
|
|
190
|
+
Entity().Updaters.Core.value(
|
|
191
|
+
Debounced.Updaters.Core.dirty(replaceWith(dirtyStatus)),
|
|
192
|
+
),
|
|
193
|
+
),
|
|
194
|
+
).embed(
|
|
195
|
+
(_) => {
|
|
114
196
|
const _narrowed = narrowing_k(_);
|
|
115
197
|
const entities = _narrowed.entities;
|
|
116
198
|
if (AsyncState.Operations.hasValue(entities.sync)) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
199
|
+
const entity = entities.sync.value.get(entityId);
|
|
200
|
+
if (entity != undefined)
|
|
201
|
+
return Object.assign(Object.assign({}, _), entity);
|
|
120
202
|
}
|
|
121
203
|
return undefined;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
204
|
+
},
|
|
205
|
+
Fun(Collection().Updaters.Core.entity.set(entityId)).then(widening_k),
|
|
206
|
+
);
|
|
207
|
+
};
|
|
208
|
+
export const collectionCheckNotDirty =
|
|
209
|
+
() =>
|
|
210
|
+
([id, e]) => {
|
|
125
211
|
var _a;
|
|
126
|
-
return (
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
212
|
+
return (
|
|
213
|
+
AsyncState.Operations.hasValue(e.entities.sync) &&
|
|
214
|
+
((_a = e.entities.sync.value.get(id)) === null || _a === void 0
|
|
215
|
+
? void 0
|
|
216
|
+
: _a.value.dirty) != "not dirty"
|
|
217
|
+
);
|
|
218
|
+
};
|
|
219
|
+
export const collectionEntityUpdater = () => (widening_k) =>
|
|
220
|
+
Fun(([id, u]) =>
|
|
221
|
+
widening_k(Collection().Updaters.Template.entityValue(id, u)),
|
|
222
|
+
);
|
|
130
223
|
export const withTrivialComparator = (_) => [_, (_) => "=="];
|
|
131
224
|
export const collectionSynchronizationContext = (entityDescriptors) => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
Object.keys(entityDescriptors[k]["wholeMutations"]).forEach((field) => {
|
|
155
|
-
synchronizers[k]["wholeMutations"][field] = (mutationArg) => entityDescriptors[k]["wholeMutations"][field](mutationArg);
|
|
156
|
-
});
|
|
225
|
+
let synchronizers = {};
|
|
226
|
+
Object.keys(entityDescriptors).forEach((k_s) => {
|
|
227
|
+
const k = k_s;
|
|
228
|
+
synchronizers[k] = {};
|
|
229
|
+
Object.keys(entityDescriptors[k]).forEach((field) => {
|
|
230
|
+
// only update the mutation fields of the entity descriptor
|
|
231
|
+
if (
|
|
232
|
+
field != "entityName" &&
|
|
233
|
+
field != "narrowing" &&
|
|
234
|
+
field != "widening" &&
|
|
235
|
+
field != "dependees" &&
|
|
236
|
+
field != "add" &&
|
|
237
|
+
field != "remove" &&
|
|
238
|
+
field != "default" &&
|
|
239
|
+
field != "reload" &&
|
|
240
|
+
field != "reloadElement"
|
|
241
|
+
)
|
|
242
|
+
synchronizers[k][field] = (mutationArg) => {
|
|
243
|
+
return insideEntitySynchronizedAndDebounced(
|
|
244
|
+
entityDescriptors[k][field](mutationArg),
|
|
245
|
+
);
|
|
246
|
+
};
|
|
157
247
|
});
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
248
|
+
synchronizers[k]["add"] = (entity, position) =>
|
|
249
|
+
insideEntitySynchronizedAndDebounced(
|
|
250
|
+
entityDescriptors[k]["add"](entity, position),
|
|
251
|
+
);
|
|
252
|
+
synchronizers[k]["remove"] = (entityId) =>
|
|
253
|
+
insideEntitySynchronizedAndDebounced(
|
|
254
|
+
entityDescriptors[k]["remove"](entityId),
|
|
255
|
+
);
|
|
256
|
+
synchronizers[k]["wholeMutations"] = {};
|
|
257
|
+
Object.keys(entityDescriptors[k]["wholeMutations"]).forEach((field) => {
|
|
258
|
+
synchronizers[k]["wholeMutations"][field] = (mutationArg) =>
|
|
259
|
+
entityDescriptors[k]["wholeMutations"][field](mutationArg);
|
|
162
260
|
});
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
261
|
+
});
|
|
262
|
+
const loaders = {};
|
|
263
|
+
Object.keys(entityDescriptors).forEach((k_s) => {
|
|
264
|
+
const k = k_s;
|
|
265
|
+
loaders[k] = collectionEntityLoader(synchronizers)(
|
|
266
|
+
k,
|
|
267
|
+
entityDescriptors[k].id,
|
|
268
|
+
entityDescriptors[k].narrowing,
|
|
269
|
+
entityDescriptors[k].widening,
|
|
270
|
+
entityDescriptors[k].dependees,
|
|
271
|
+
);
|
|
272
|
+
});
|
|
273
|
+
const dirtyCheckers = {};
|
|
274
|
+
Object.keys(entityDescriptors).forEach((k_s) => {
|
|
275
|
+
const k = k_s;
|
|
276
|
+
dirtyCheckers[k] = Fun(collectionCheckNotDirty());
|
|
277
|
+
});
|
|
278
|
+
const dirtySetters = {};
|
|
279
|
+
Object.keys(entityDescriptors).forEach((k_s) => {
|
|
280
|
+
const k = k_s;
|
|
281
|
+
dirtySetters[k] = collectionDirtySetter()(
|
|
282
|
+
k,
|
|
283
|
+
entityDescriptors[k].narrowing,
|
|
284
|
+
entityDescriptors[k].widening,
|
|
285
|
+
);
|
|
286
|
+
});
|
|
287
|
+
const updaters = {};
|
|
288
|
+
Object.keys(entityDescriptors).forEach((k_s) => {
|
|
289
|
+
const k = k_s;
|
|
290
|
+
updaters[k] = collectionEntityUpdater()(entityDescriptors[k].widening);
|
|
291
|
+
});
|
|
292
|
+
const mutationComparators = {};
|
|
293
|
+
Object.keys(entityDescriptors).forEach((k_s) => {
|
|
294
|
+
const k = k_s;
|
|
295
|
+
mutationComparators[k] = {};
|
|
296
|
+
Object.keys(entityDescriptors[k]).forEach((field) => {
|
|
297
|
+
if (
|
|
298
|
+
field != "entityName" &&
|
|
299
|
+
field != "narrowing" &&
|
|
300
|
+
field != "widening" &&
|
|
301
|
+
field != "dependees" &&
|
|
302
|
+
field != "add" &&
|
|
303
|
+
field != "remove" &&
|
|
304
|
+
field != "default" &&
|
|
305
|
+
field != "reload"
|
|
306
|
+
)
|
|
307
|
+
mutationComparators[k][field] = entityDescriptors[k][field][1];
|
|
167
308
|
});
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
field != "widening" &&
|
|
186
|
-
field != "dependees" &&
|
|
187
|
-
field != "add" &&
|
|
188
|
-
field != "remove" &&
|
|
189
|
-
field != "default" &&
|
|
190
|
-
field != "reload")
|
|
191
|
-
mutationComparators[k][field] = entityDescriptors[k][field][1];
|
|
192
|
-
});
|
|
193
|
-
});
|
|
194
|
-
const wholeMutationComparators = {};
|
|
195
|
-
Object.keys(entityDescriptors).forEach((k_s) => {
|
|
196
|
-
const k = k_s;
|
|
197
|
-
wholeMutationComparators[k] = {};
|
|
198
|
-
Object.keys(entityDescriptors[k]).forEach((field) => {
|
|
199
|
-
if (field != "entityName" &&
|
|
200
|
-
field != "narrowing" &&
|
|
201
|
-
field != "widening" &&
|
|
202
|
-
field != "dependees" &&
|
|
203
|
-
field != "add" &&
|
|
204
|
-
field != "remove" &&
|
|
205
|
-
field != "default" &&
|
|
206
|
-
field != "reload")
|
|
207
|
-
wholeMutationComparators[k][field] = entityDescriptors[k][field][1];
|
|
208
|
-
});
|
|
309
|
+
});
|
|
310
|
+
const wholeMutationComparators = {};
|
|
311
|
+
Object.keys(entityDescriptors).forEach((k_s) => {
|
|
312
|
+
const k = k_s;
|
|
313
|
+
wholeMutationComparators[k] = {};
|
|
314
|
+
Object.keys(entityDescriptors[k]).forEach((field) => {
|
|
315
|
+
if (
|
|
316
|
+
field != "entityName" &&
|
|
317
|
+
field != "narrowing" &&
|
|
318
|
+
field != "widening" &&
|
|
319
|
+
field != "dependees" &&
|
|
320
|
+
field != "add" &&
|
|
321
|
+
field != "remove" &&
|
|
322
|
+
field != "default" &&
|
|
323
|
+
field != "reload"
|
|
324
|
+
)
|
|
325
|
+
wholeMutationComparators[k][field] = entityDescriptors[k][field][1];
|
|
209
326
|
});
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
327
|
+
});
|
|
328
|
+
return [
|
|
329
|
+
loaders,
|
|
330
|
+
dirtyCheckers,
|
|
331
|
+
dirtySetters,
|
|
332
|
+
updaters,
|
|
333
|
+
entityDescriptors,
|
|
334
|
+
mutationComparators,
|
|
335
|
+
wholeMutationComparators,
|
|
336
|
+
];
|
|
219
337
|
};
|
|
220
|
-
//# sourceMappingURL=synchronizers.js.map
|
|
338
|
+
//# sourceMappingURL=synchronizers.js.map
|