@zajno/common 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/{lib/abstractions → abstractions}/controllers/IPluggableController.d.ts +0 -0
- package/{lib/abstractions → abstractions}/controllers/IPluggableController.d.ts.map +0 -0
- package/{lib/abstractions → abstractions}/controllers/IPluggableController.js +0 -0
- package/{lib/abstractions → abstractions}/controllers/IPluggableController.js.map +0 -0
- package/{lib/async → async}/arrays.d.ts +0 -0
- package/{lib/async → async}/arrays.d.ts.map +0 -0
- package/{lib/async → async}/arrays.extend.d.ts +0 -0
- package/{lib/async → async}/arrays.extend.d.ts.map +0 -0
- package/{lib/async → async}/arrays.extend.js +0 -0
- package/{lib/async → async}/arrays.extend.js.map +0 -0
- package/{lib/async → async}/arrays.js +0 -0
- package/{lib/async → async}/arrays.js.map +0 -0
- package/{lib/async → async}/misc.d.ts +0 -0
- package/{lib/async → async}/misc.d.ts.map +0 -0
- package/{lib/async → async}/misc.js +0 -0
- package/{lib/async → async}/misc.js.map +0 -0
- package/{lib/async → async}/timeout.d.ts +0 -0
- package/{lib/async → async}/timeout.d.ts.map +0 -0
- package/{lib/async → async}/timeout.js +0 -0
- package/{lib/async → async}/timeout.js.map +0 -0
- package/{lib/controllers → controllers}/PluggableController.d.ts +0 -0
- package/{lib/controllers → controllers}/PluggableController.d.ts.map +0 -0
- package/{lib/controllers → controllers}/PluggableController.js +0 -0
- package/{lib/controllers → controllers}/PluggableController.js.map +0 -0
- package/{lib/dates → dates}/calc.d.ts +0 -0
- package/{lib/dates → dates}/calc.d.ts.map +0 -0
- package/{lib/dates → dates}/calc.js +0 -0
- package/{lib/dates → dates}/calc.js.map +0 -0
- package/{lib/dates → dates}/convert.d.ts +0 -0
- package/{lib/dates → dates}/convert.d.ts.map +0 -0
- package/{lib/dates → dates}/convert.js +0 -0
- package/{lib/dates → dates}/convert.js.map +0 -0
- package/{lib/dates → dates}/datex.d.ts +0 -0
- package/{lib/dates → dates}/datex.d.ts.map +0 -0
- package/{lib/dates → dates}/datex.js +0 -0
- package/{lib/dates → dates}/datex.js.map +0 -0
- package/{lib/dates → dates}/format.d.ts +0 -0
- package/{lib/dates → dates}/format.d.ts.map +0 -0
- package/{lib/dates → dates}/format.js +0 -0
- package/{lib/dates → dates}/format.js.map +0 -0
- package/{lib/dates → dates}/index.d.ts +0 -0
- package/{lib/dates → dates}/index.d.ts.map +0 -0
- package/{lib/dates → dates}/index.js +0 -0
- package/{lib/dates → dates}/index.js.map +0 -0
- package/{lib/dates → dates}/parse.d.ts +0 -0
- package/{lib/dates → dates}/parse.d.ts.map +0 -0
- package/{lib/dates → dates}/parse.js +0 -0
- package/{lib/dates → dates}/parse.js.map +0 -0
- package/{lib/dates → dates}/period.d.ts +0 -0
- package/{lib/dates → dates}/period.d.ts.map +0 -0
- package/{lib/dates → dates}/period.js +0 -0
- package/{lib/dates → dates}/period.js.map +0 -0
- package/{lib/dates → dates}/shift.d.ts +0 -0
- package/{lib/dates → dates}/shift.d.ts.map +0 -0
- package/{lib/dates → dates}/shift.js +0 -0
- package/{lib/dates → dates}/shift.js.map +0 -0
- package/{lib/dates → dates}/types.d.ts +0 -0
- package/{lib/dates → dates}/types.d.ts.map +0 -0
- package/{lib/dates → dates}/types.js +0 -0
- package/{lib/dates → dates}/types.js.map +0 -0
- package/{lib/dates → dates}/yearDate.d.ts +0 -0
- package/{lib/dates → dates}/yearDate.d.ts.map +0 -0
- package/{lib/dates → dates}/yearDate.js +0 -0
- package/{lib/dates → dates}/yearDate.js.map +0 -0
- package/{lib/fields → fields}/filter.d.ts +0 -0
- package/{lib/fields → fields}/filter.d.ts.map +0 -0
- package/{lib/fields → fields}/filter.js +0 -0
- package/{lib/fields → fields}/filter.js.map +0 -0
- package/{lib/fields → fields}/index.d.ts +0 -0
- package/{lib/fields → fields}/index.d.ts.map +0 -0
- package/{lib/fields → fields}/index.js +0 -0
- package/{lib/fields → fields}/index.js.map +0 -0
- package/{lib/fields → fields}/transfer.d.ts +0 -0
- package/{lib/fields → fields}/transfer.d.ts.map +0 -0
- package/{lib/fields → fields}/transfer.js +0 -0
- package/{lib/fields → fields}/transfer.js.map +0 -0
- package/{lib/fields → fields}/update.d.ts +0 -0
- package/{lib/fields → fields}/update.d.ts.map +0 -0
- package/{lib/fields → fields}/update.js +0 -0
- package/{lib/fields → fields}/update.js.map +0 -0
- package/{lib/functions → functions}/assert.d.ts +0 -0
- package/{lib/functions → functions}/assert.d.ts.map +0 -0
- package/{lib/functions → functions}/assert.js +0 -0
- package/{lib/functions → functions}/assert.js.map +0 -0
- package/{lib/functions → functions}/disposer.d.ts +0 -0
- package/{lib/functions → functions}/disposer.d.ts.map +0 -0
- package/{lib/functions → functions}/disposer.js +0 -0
- package/{lib/functions → functions}/disposer.js.map +0 -0
- package/{lib/functions → functions}/safeCall.d.ts +0 -0
- package/{lib/functions → functions}/safeCall.d.ts.map +0 -0
- package/{lib/functions → functions}/safeCall.js +0 -0
- package/{lib/functions → functions}/safeCall.js.map +0 -0
- package/{lib/functions → functions}/throttle.d.ts +0 -0
- package/{lib/functions → functions}/throttle.d.ts.map +0 -0
- package/{lib/functions → functions}/throttle.js +0 -0
- package/{lib/functions → functions}/throttle.js.map +0 -0
- package/{lib/lazy → lazy}/light.d.ts +0 -0
- package/{lib/lazy → lazy}/light.d.ts.map +0 -0
- package/{lib/lazy → lazy}/light.js +0 -0
- package/{lib/lazy → lazy}/light.js.map +0 -0
- package/{lib/lazy → lazy}/promise.d.ts +0 -0
- package/{lib/lazy → lazy}/promise.d.ts.map +0 -0
- package/{lib/lazy → lazy}/promise.js +0 -0
- package/{lib/lazy → lazy}/promise.js.map +0 -0
- package/{lib/lazy → lazy}/singleton.d.ts +0 -0
- package/{lib/lazy → lazy}/singleton.d.ts.map +0 -0
- package/{lib/lazy → lazy}/singleton.js +0 -0
- package/{lib/lazy → lazy}/singleton.js.map +0 -0
- package/{lib/logger → logger}/abstractions.d.ts +0 -0
- package/{lib/logger → logger}/abstractions.d.ts.map +0 -0
- package/{lib/logger → logger}/abstractions.js +0 -0
- package/{lib/logger → logger}/abstractions.js.map +0 -0
- package/{lib/logger → logger}/batch.d.ts +0 -0
- package/{lib/logger → logger}/batch.d.ts.map +0 -0
- package/{lib/logger → logger}/batch.js +0 -0
- package/{lib/logger → logger}/batch.js.map +0 -0
- package/{lib/logger → logger}/console.d.ts +0 -0
- package/{lib/logger → logger}/console.d.ts.map +0 -0
- package/{lib/logger → logger}/console.js +0 -0
- package/{lib/logger → logger}/console.js.map +0 -0
- package/{lib/logger → logger}/file.d.ts +0 -0
- package/{lib/logger → logger}/file.d.ts.map +0 -0
- package/{lib/logger → logger}/file.js +0 -0
- package/{lib/logger → logger}/file.js.map +0 -0
- package/{lib/logger → logger}/index.d.ts +0 -0
- package/{lib/logger → logger}/index.d.ts.map +0 -0
- package/{lib/logger → logger}/index.js +0 -0
- package/{lib/logger → logger}/index.js.map +0 -0
- package/{lib/logger → logger}/named.d.ts +0 -0
- package/{lib/logger → logger}/named.d.ts.map +0 -0
- package/{lib/logger → logger}/named.js +0 -0
- package/{lib/logger → logger}/named.js.map +0 -0
- package/{lib/logger → logger}/proxy.d.ts +0 -0
- package/{lib/logger → logger}/proxy.d.ts.map +0 -0
- package/{lib/logger → logger}/proxy.js +0 -0
- package/{lib/logger → logger}/proxy.js.map +0 -0
- package/{lib/math → math}/arrays.d.ts +0 -0
- package/{lib/math → math}/arrays.d.ts.map +0 -0
- package/{lib/math → math}/arrays.js +0 -0
- package/{lib/math → math}/arrays.js.map +0 -0
- package/{lib/math → math}/calc.d.ts +0 -0
- package/{lib/math → math}/calc.d.ts.map +0 -0
- package/{lib/math → math}/calc.js +0 -0
- package/{lib/math → math}/calc.js.map +0 -0
- package/{lib/math → math}/distribution.d.ts +0 -0
- package/{lib/math → math}/distribution.d.ts.map +0 -0
- package/{lib/math → math}/distribution.js +0 -0
- package/{lib/math → math}/distribution.js.map +0 -0
- package/{lib/math → math}/index.d.ts +0 -0
- package/{lib/math → math}/index.d.ts.map +0 -0
- package/{lib/math → math}/index.js +0 -0
- package/{lib/math → math}/index.js.map +0 -0
- package/{lib/models → models}/EntityWithStatus.d.ts +0 -0
- package/{lib/models → models}/EntityWithStatus.d.ts.map +0 -0
- package/{lib/models → models}/EntityWithStatus.js +0 -0
- package/{lib/models → models}/EntityWithStatus.js.map +0 -0
- package/{lib/models → models}/File.d.ts +0 -0
- package/{lib/models → models}/File.d.ts.map +0 -0
- package/{lib/models → models}/File.js +0 -0
- package/{lib/models → models}/File.js.map +0 -0
- package/models/Model.d.ts +12 -0
- package/models/Model.d.ts.map +1 -0
- package/models/Model.js +23 -0
- package/models/Model.js.map +1 -0
- package/models/ValuesCollector.d.ts +26 -0
- package/models/ValuesCollector.d.ts.map +1 -0
- package/models/ValuesCollector.js +51 -0
- package/models/ValuesCollector.js.map +1 -0
- package/models/types.d.ts +19 -0
- package/models/types.d.ts.map +1 -0
- package/models/types.js +3 -0
- package/models/types.js.map +1 -0
- package/models/wrappers.d.ts +12 -0
- package/models/wrappers.d.ts.map +1 -0
- package/models/wrappers.js +43 -0
- package/models/wrappers.js.map +1 -0
- package/{lib/observing → observing}/event.d.ts +0 -0
- package/{lib/observing → observing}/event.d.ts.map +0 -0
- package/{lib/observing → observing}/event.js +0 -0
- package/{lib/observing → observing}/event.js.map +0 -0
- package/{lib/observing → observing}/progressTracker.d.ts +0 -0
- package/{lib/observing → observing}/progressTracker.d.ts.map +0 -0
- package/{lib/observing → observing}/progressTracker.js +0 -0
- package/{lib/observing → observing}/progressTracker.js.map +0 -0
- package/{lib/observing → observing}/throttledEvent.d.ts +0 -0
- package/{lib/observing → observing}/throttledEvent.d.ts.map +0 -0
- package/{lib/observing → observing}/throttledEvent.js +0 -0
- package/{lib/observing → observing}/throttledEvent.js.map +0 -0
- package/{lib/observing → observing}/timer.d.ts +0 -0
- package/{lib/observing → observing}/timer.d.ts.map +0 -0
- package/{lib/observing → observing}/timer.js +0 -0
- package/{lib/observing → observing}/timer.js.map +0 -0
- package/package.json +8 -11
- package/{lib/storage → storage}/abstractions.d.ts +0 -0
- package/{lib/storage → storage}/abstractions.d.ts.map +0 -0
- package/{lib/storage → storage}/abstractions.js +0 -0
- package/{lib/storage → storage}/abstractions.js.map +0 -0
- package/{lib/storage → storage}/asyncWrapper.d.ts +0 -0
- package/{lib/storage → storage}/asyncWrapper.d.ts.map +0 -0
- package/{lib/storage → storage}/asyncWrapper.js +0 -0
- package/{lib/storage → storage}/asyncWrapper.js.map +0 -0
- package/{lib/storage → storage}/index.d.ts +0 -0
- package/{lib/storage → storage}/index.d.ts.map +0 -0
- package/{lib/storage → storage}/index.js +0 -0
- package/{lib/storage → storage}/index.js.map +0 -0
- package/{lib/storage → storage}/keyStorage.d.ts +0 -0
- package/{lib/storage → storage}/keyStorage.d.ts.map +0 -0
- package/{lib/storage → storage}/keyStorage.js +0 -0
- package/{lib/storage → storage}/keyStorage.js.map +0 -0
- package/{lib/structures → structures}/helpers/enum.d.ts +0 -0
- package/{lib/structures → structures}/helpers/enum.d.ts.map +0 -0
- package/{lib/structures → structures}/helpers/enum.js +0 -0
- package/{lib/structures → structures}/helpers/enum.js.map +0 -0
- package/{lib/structures → structures}/helpers/name.d.ts +0 -0
- package/{lib/structures → structures}/helpers/name.d.ts.map +0 -0
- package/{lib/structures → structures}/helpers/name.js +0 -0
- package/{lib/structures → structures}/helpers/name.js.map +0 -0
- package/{lib/structures → structures}/linkedList.d.ts +0 -0
- package/{lib/structures → structures}/linkedList.d.ts.map +0 -0
- package/{lib/structures → structures}/linkedList.js +0 -0
- package/{lib/structures → structures}/linkedList.js.map +0 -0
- package/{lib/structures → structures}/pool.d.ts +0 -0
- package/{lib/structures → structures}/pool.d.ts.map +0 -0
- package/{lib/structures → structures}/pool.js +0 -0
- package/{lib/structures → structures}/pool.js.map +0 -0
- package/{lib/structures → structures}/queue/parallel.d.ts +0 -0
- package/{lib/structures → structures}/queue/parallel.d.ts.map +0 -0
- package/{lib/structures → structures}/queue/parallel.js +0 -0
- package/{lib/structures → structures}/queue/parallel.js.map +0 -0
- package/{lib/structures → structures}/queue/tasks.d.ts +0 -0
- package/{lib/structures → structures}/queue/tasks.d.ts.map +0 -0
- package/{lib/structures → structures}/queue/tasks.js +0 -0
- package/{lib/structures → structures}/queue/tasks.js.map +0 -0
- package/{lib/structures → structures}/tempoCache.d.ts +0 -0
- package/{lib/structures → structures}/tempoCache.d.ts.map +0 -0
- package/{lib/structures → structures}/tempoCache.js +0 -0
- package/{lib/structures → structures}/tempoCache.js.map +0 -0
- package/{lib/types → types}/comparator.d.ts +0 -0
- package/{lib/types → types}/comparator.d.ts.map +0 -0
- package/{lib/types → types}/comparator.js +0 -0
- package/{lib/types → types}/comparator.js.map +0 -0
- package/{lib/types → types}/deep.d.ts +0 -0
- package/{lib/types → types}/deep.d.ts.map +0 -0
- package/{lib/types → types}/deep.js +0 -0
- package/{lib/types → types}/deep.js.map +0 -0
- package/{lib/types → types}/functions.d.ts +0 -0
- package/{lib/types → types}/functions.d.ts.map +0 -0
- package/{lib/types → types}/functions.js +0 -0
- package/{lib/types → types}/functions.js.map +0 -0
- package/{lib/types → types}/getter.d.ts +0 -0
- package/{lib/types → types}/getter.d.ts.map +1 -1
- package/{lib/types → types}/getter.js +0 -3
- package/types/getter.js.map +1 -0
- package/{lib/types → types}/ident.d.ts +0 -0
- package/{lib/types → types}/ident.d.ts.map +0 -0
- package/{lib/types → types}/ident.js +0 -0
- package/{lib/types → types}/ident.js.map +0 -0
- package/{lib/types → types}/index.d.ts +3 -0
- package/{lib/types → types}/index.d.ts.map +1 -1
- package/{lib/types → types}/index.js +0 -0
- package/{lib/types → types}/index.js.map +0 -0
- package/{lib/validation → validation}/ValidationErrors.d.ts +0 -0
- package/{lib/validation → validation}/ValidationErrors.d.ts.map +0 -0
- package/{lib/validation → validation}/ValidationErrors.js +0 -0
- package/{lib/validation → validation}/ValidationErrors.js.map +0 -0
- package/{lib/validation → validation}/creditCard.d.ts +0 -0
- package/{lib/validation → validation}/creditCard.d.ts.map +0 -0
- package/{lib/validation → validation}/creditCard.js +0 -0
- package/{lib/validation → validation}/creditCard.js.map +0 -0
- package/{lib/validation → validation}/emails.d.ts +0 -0
- package/{lib/validation → validation}/emails.d.ts.map +0 -0
- package/{lib/validation → validation}/emails.js +0 -0
- package/{lib/validation → validation}/emails.js.map +0 -0
- package/{lib/validation → validation}/helpers.d.ts +0 -0
- package/{lib/validation → validation}/helpers.d.ts.map +0 -0
- package/{lib/validation → validation}/helpers.js +0 -0
- package/{lib/validation → validation}/helpers.js.map +0 -0
- package/{lib/validation → validation}/index.d.ts +0 -0
- package/{lib/validation → validation}/index.d.ts.map +0 -0
- package/{lib/validation → validation}/index.js +0 -0
- package/{lib/validation → validation}/index.js.map +0 -0
- package/{lib/validation → validation}/types.d.ts +0 -0
- package/{lib/validation → validation}/types.d.ts.map +0 -0
- package/{lib/validation → validation}/types.js +0 -0
- package/{lib/validation → validation}/types.js.map +0 -0
- package/{lib/validation → validation}/validators.d.ts +0 -0
- package/{lib/validation → validation}/validators.d.ts.map +0 -0
- package/{lib/validation → validation}/validators.js +0 -0
- package/{lib/validation → validation}/validators.js.map +0 -0
- package/{lib/validation → validation}/wrappers.d.ts +0 -0
- package/{lib/validation → validation}/wrappers.d.ts.map +0 -0
- package/{lib/validation → validation}/wrappers.js +0 -0
- package/{lib/validation → validation}/wrappers.js.map +0 -0
- package/.eslintignore +0 -5
- package/.eslintrc.js +0 -9
- package/.github/workflows/CI.yml +0 -48
- package/.gitignore +0 -13
- package/.nvmrc +0 -1
- package/coverage/clover.xml +0 -1280
- package/coverage/coverage-final.json +0 -43
- package/coverage/lcov-report/CommonModel.ts.html +0 -215
- package/coverage/lcov-report/FlagModel.ts.html +0 -290
- package/coverage/lcov-report/MultiSelectModel.ts.html +0 -614
- package/coverage/lcov-report/NumberModel.ts.html +0 -230
- package/coverage/lcov-report/SelectModel.ts.html +0 -503
- package/coverage/lcov-report/Validatable.ts.html +0 -386
- package/coverage/lcov-report/__tests__/helpers/expect.ts.html +0 -94
- package/coverage/lcov-report/__tests__/helpers/index.html +0 -131
- package/coverage/lcov-report/__tests__/helpers/main.ts.html +0 -121
- package/coverage/lcov-report/async/arrays.ts.html +0 -199
- package/coverage/lcov-report/async/index.html +0 -131
- package/coverage/lcov-report/async/timeout.ts.html +0 -337
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/dates/calc.ts.html +0 -301
- package/coverage/lcov-report/dates/convert.ts.html +0 -658
- package/coverage/lcov-report/dates/datex.ts.html +0 -211
- package/coverage/lcov-report/dates/format.ts.html +0 -403
- package/coverage/lcov-report/dates/index.html +0 -251
- package/coverage/lcov-report/dates/index.ts.html +0 -112
- package/coverage/lcov-report/dates/parse.ts.html +0 -157
- package/coverage/lcov-report/dates/period.ts.html +0 -154
- package/coverage/lcov-report/dates/shift.ts.html +0 -355
- package/coverage/lcov-report/dates/types.ts.html +0 -181
- package/coverage/lcov-report/dates/yearDate.ts.html +0 -193
- package/coverage/lcov-report/disposer.ts.html +0 -376
- package/coverage/lcov-report/enumHelper.ts.html +0 -454
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/fields/index.html +0 -116
- package/coverage/lcov-report/fields/update.ts.html +0 -457
- package/coverage/lcov-report/functions/disposer.ts.html +0 -376
- package/coverage/lcov-report/functions/index.html +0 -116
- package/coverage/lcov-report/functions/safeCall.ts.html +0 -103
- package/coverage/lcov-report/index.html +0 -311
- package/coverage/lcov-report/lazy/index.html +0 -131
- package/coverage/lcov-report/lazy/light.ts.html +0 -172
- package/coverage/lcov-report/lazy/promise.ts.html +0 -241
- package/coverage/lcov-report/lazy/singleton.ts.html +0 -181
- package/coverage/lcov-report/logger/batch.ts.html +0 -112
- package/coverage/lcov-report/logger/console.ts.html +0 -241
- package/coverage/lcov-report/logger/index.html +0 -176
- package/coverage/lcov-report/logger/index.ts.html +0 -298
- package/coverage/lcov-report/logger/named.ts.html +0 -226
- package/coverage/lcov-report/logger/proxy.ts.html +0 -172
- package/coverage/lcov-report/math/arrays.ts.html +0 -907
- package/coverage/lcov-report/math/calc.ts.html +0 -292
- package/coverage/lcov-report/math/distribution.ts.html +0 -145
- package/coverage/lcov-report/math/index.html +0 -161
- package/coverage/lcov-report/math/index.ts.html +0 -166
- package/coverage/lcov-report/observing/event.ts.html +0 -358
- package/coverage/lcov-report/observing/index.html +0 -116
- package/coverage/lcov-report/observing/transition.ts.html +0 -634
- package/coverage/lcov-report/parallel.ts.html +0 -550
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/queue/index.html +0 -116
- package/coverage/lcov-report/queue/parallel.ts.html +0 -499
- package/coverage/lcov-report/queue/tasks.ts.html +0 -358
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/__tests__/helpers/expect.ts.html +0 -94
- package/coverage/lcov-report/src/__tests__/helpers/index.html +0 -131
- package/coverage/lcov-report/src/__tests__/helpers/main.ts.html +0 -121
- package/coverage/lcov-report/src/async/arrays.ts.html +0 -199
- package/coverage/lcov-report/src/async/index.html +0 -131
- package/coverage/lcov-report/src/async/timeout.ts.html +0 -337
- package/coverage/lcov-report/src/cache.ts.html +0 -628
- package/coverage/lcov-report/src/dates/calc.ts.html +0 -301
- package/coverage/lcov-report/src/dates/convert.ts.html +0 -658
- package/coverage/lcov-report/src/dates/datex.ts.html +0 -211
- package/coverage/lcov-report/src/dates/format.ts.html +0 -403
- package/coverage/lcov-report/src/dates/index.html +0 -251
- package/coverage/lcov-report/src/dates/index.ts.html +0 -112
- package/coverage/lcov-report/src/dates/parse.ts.html +0 -157
- package/coverage/lcov-report/src/dates/period.ts.html +0 -154
- package/coverage/lcov-report/src/dates/shift.ts.html +0 -355
- package/coverage/lcov-report/src/dates/types.ts.html +0 -181
- package/coverage/lcov-report/src/dates/yearDate.ts.html +0 -193
- package/coverage/lcov-report/src/disposer.ts.html +0 -376
- package/coverage/lcov-report/src/enumHelper.ts.html +0 -454
- package/coverage/lcov-report/src/event.ts.html +0 -361
- package/coverage/lcov-report/src/fields/index.html +0 -116
- package/coverage/lcov-report/src/fields/update.ts.html +0 -457
- package/coverage/lcov-report/src/functions.ts.html +0 -127
- package/coverage/lcov-report/src/index.html +0 -251
- package/coverage/lcov-report/src/lazy/index.html +0 -161
- package/coverage/lcov-report/src/lazy/lazy.ts.html +0 -181
- package/coverage/lcov-report/src/lazy/light.ts.html +0 -172
- package/coverage/lcov-report/src/lazy/observable.ts.html +0 -196
- package/coverage/lcov-report/src/lazy/promise.ts.html +0 -241
- package/coverage/lcov-report/src/lazy/singleton.ts.html +0 -181
- package/coverage/lcov-report/src/lazy.light.ts.html +0 -172
- package/coverage/lcov-report/src/logger/batch.ts.html +0 -112
- package/coverage/lcov-report/src/logger/console.ts.html +0 -241
- package/coverage/lcov-report/src/logger/index.html +0 -176
- package/coverage/lcov-report/src/logger/index.ts.html +0 -298
- package/coverage/lcov-report/src/logger/named.ts.html +0 -226
- package/coverage/lcov-report/src/logger/proxy.ts.html +0 -172
- package/coverage/lcov-report/src/math/arrays.ts.html +0 -868
- package/coverage/lcov-report/src/math/calc.ts.html +0 -292
- package/coverage/lcov-report/src/math/distribution.ts.html +0 -145
- package/coverage/lcov-report/src/math/index.html +0 -161
- package/coverage/lcov-report/src/math/index.ts.html +0 -166
- package/coverage/lcov-report/src/observers.ts.html +0 -368
- package/coverage/lcov-report/src/observersMap.ts.html +0 -400
- package/coverage/lcov-report/src/observingCache.ts.html +0 -565
- package/coverage/lcov-report/src/queue/index.html +0 -131
- package/coverage/lcov-report/src/queue/parallel.ts.html +0 -511
- package/coverage/lcov-report/src/queue/tasks.ts.html +0 -358
- package/coverage/lcov-report/src/tempoCache.ts.html +0 -139
- package/coverage/lcov-report/src/transitionObserver.ts.html +0 -634
- package/coverage/lcov-report/src/types/comparator.ts.html +0 -103
- package/coverage/lcov-report/src/types/getter.ts.html +0 -127
- package/coverage/lcov-report/src/types/index.html +0 -146
- package/coverage/lcov-report/src/types/index.ts.html +0 -112
- package/coverage/lcov-report/src/types.ts.html +0 -175
- package/coverage/lcov-report/src/validation/ValidationErrors.ts.html +0 -163
- package/coverage/lcov-report/src/validation/creditCard.ts.html +0 -160
- package/coverage/lcov-report/src/validation/helpers.ts.html +0 -226
- package/coverage/lcov-report/src/validation/index.html +0 -206
- package/coverage/lcov-report/src/validation/index.ts.html +0 -112
- package/coverage/lcov-report/src/validation/types.ts.html +0 -139
- package/coverage/lcov-report/src/validation/validators.ts.html +0 -250
- package/coverage/lcov-report/src/validation/wrappers.ts.html +0 -163
- package/coverage/lcov-report/src/viewModels/CommonModel.ts.html +0 -220
- package/coverage/lcov-report/src/viewModels/FlagModel.ts.html +0 -295
- package/coverage/lcov-report/src/viewModels/LoadingModel.ts.html +0 -241
- package/coverage/lcov-report/src/viewModels/MultiSelectModel.ts.html +0 -619
- package/coverage/lcov-report/src/viewModels/NumberModel.ts.html +0 -235
- package/coverage/lcov-report/src/viewModels/SelectModel.ts.html +0 -541
- package/coverage/lcov-report/src/viewModels/TextModel.ts.html +0 -466
- package/coverage/lcov-report/src/viewModels/Validatable.ts.html +0 -391
- package/coverage/lcov-report/src/viewModels/index.html +0 -236
- package/coverage/lcov-report/src/viewModels/wrappers.ts.html +0 -232
- package/coverage/lcov-report/structures/helpers/enum.ts.html +0 -454
- package/coverage/lcov-report/structures/helpers/index.html +0 -116
- package/coverage/lcov-report/structures/index.html +0 -116
- package/coverage/lcov-report/structures/promiseCache.ts.html +0 -628
- package/coverage/lcov-report/structures/queue/index.html +0 -131
- package/coverage/lcov-report/structures/queue/parallel.ts.html +0 -511
- package/coverage/lcov-report/structures/queue/tasks.ts.html +0 -358
- package/coverage/lcov-report/structures/subscribersMap.ts.html +0 -400
- package/coverage/lcov-report/structures/subscribersPromiseCache.ts.html +0 -562
- package/coverage/lcov-report/structures/tempoCache.ts.html +0 -139
- package/coverage/lcov-report/tasks.ts.html +0 -355
- package/coverage/lcov-report/tempoCache.ts.html +0 -134
- package/coverage/lcov-report/timer.ts.html +0 -200
- package/coverage/lcov-report/types/comparator.ts.html +0 -103
- package/coverage/lcov-report/types/getter.ts.html +0 -127
- package/coverage/lcov-report/types/index.html +0 -146
- package/coverage/lcov-report/types/index.ts.html +0 -136
- package/coverage/lcov-report/update.ts.html +0 -374
- package/coverage/lcov-report/validation/ValidationErrors.ts.html +0 -163
- package/coverage/lcov-report/validation/creditCard.ts.html +0 -160
- package/coverage/lcov-report/validation/helpers.ts.html +0 -226
- package/coverage/lcov-report/validation/index.html +0 -206
- package/coverage/lcov-report/validation/index.ts.html +0 -112
- package/coverage/lcov-report/validation/types.ts.html +0 -139
- package/coverage/lcov-report/validation/validators.ts.html +0 -250
- package/coverage/lcov-report/validation/wrappers.ts.html +0 -163
- package/coverage/lcov-report/viewModels/CommonModel.ts.html +0 -215
- package/coverage/lcov-report/viewModels/FlagModel.ts.html +0 -290
- package/coverage/lcov-report/viewModels/LoadingModel.ts.html +0 -244
- package/coverage/lcov-report/viewModels/MultiSelectModel.ts.html +0 -614
- package/coverage/lcov-report/viewModels/NumberModel.ts.html +0 -230
- package/coverage/lcov-report/viewModels/SelectModel.ts.html +0 -536
- package/coverage/lcov-report/viewModels/TextModel.ts.html +0 -461
- package/coverage/lcov-report/viewModels/Validatable.ts.html +0 -386
- package/coverage/lcov-report/viewModels/index.html +0 -116
- package/coverage/lcov.info +0 -2763
- package/global-test-setup.js +0 -3
- package/jest.config.js +0 -10
- package/lib/types/getter.js.map +0 -1
- package/src/.DS_Store +0 -0
- package/src/__tests__/helpers/expect.ts +0 -3
- package/src/__tests__/helpers/main.ts +0 -12
- package/src/abstractions/controllers/IPluggableController.ts +0 -7
- package/src/async/__tests__/timeout.test.ts +0 -74
- package/src/async/arrays.extend.ts +0 -17
- package/src/async/arrays.ts +0 -38
- package/src/async/misc.ts +0 -26
- package/src/async/timeout.ts +0 -84
- package/src/controllers/PluggableController.ts +0 -35
- package/src/dates/__tests__/dates.test.ts +0 -1314
- package/src/dates/calc.ts +0 -72
- package/src/dates/convert.ts +0 -191
- package/src/dates/datex.ts +0 -42
- package/src/dates/format.ts +0 -106
- package/src/dates/index.ts +0 -9
- package/src/dates/parse.ts +0 -24
- package/src/dates/period.ts +0 -23
- package/src/dates/shift.ts +0 -90
- package/src/dates/types.ts +0 -32
- package/src/dates/yearDate.ts +0 -36
- package/src/fields/__tests__/fields.update.test.ts +0 -73
- package/src/fields/filter.ts +0 -27
- package/src/fields/index.ts +0 -4
- package/src/fields/transfer.ts +0 -85
- package/src/fields/update.ts +0 -124
- package/src/functions/assert.ts +0 -19
- package/src/functions/disposer.ts +0 -97
- package/src/functions/safeCall.ts +0 -6
- package/src/functions/throttle.ts +0 -96
- package/src/lazy/__tests__/lazy.test.ts +0 -48
- package/src/lazy/light.ts +0 -29
- package/src/lazy/promise.ts +0 -52
- package/src/lazy/singleton.ts +0 -32
- package/src/logger/__tests__/logger.test.ts +0 -206
- package/src/logger/abstractions.ts +0 -13
- package/src/logger/batch.ts +0 -9
- package/src/logger/console.ts +0 -52
- package/src/logger/file.ts +0 -66
- package/src/logger/index.ts +0 -71
- package/src/logger/named.ts +0 -47
- package/src/logger/proxy.ts +0 -29
- package/src/math/__tests__/arrays.test.ts +0 -196
- package/src/math/__tests__/calc.test.ts +0 -67
- package/src/math/__tests__/distribution.test.ts +0 -25
- package/src/math/__tests__/index.test.ts +0 -20
- package/src/math/arrays.ts +0 -274
- package/src/math/calc.ts +0 -69
- package/src/math/distribution.ts +0 -20
- package/src/math/index.ts +0 -27
- package/src/models/EntityWithStatus.ts +0 -58
- package/src/models/File.ts +0 -14
- package/src/observing/event.ts +0 -91
- package/src/observing/progressTracker.ts +0 -90
- package/src/observing/throttledEvent.ts +0 -20
- package/src/observing/timer.ts +0 -40
- package/src/storage/abstractions.ts +0 -18
- package/src/storage/asyncWrapper.ts +0 -24
- package/src/storage/index.ts +0 -2
- package/src/storage/keyStorage.ts +0 -40
- package/src/structures/__tests__/enumHelper.test.ts +0 -85
- package/src/structures/__tests__/tempoCache.test.ts +0 -31
- package/src/structures/helpers/enum.ts +0 -123
- package/src/structures/helpers/name.ts +0 -58
- package/src/structures/linkedList.ts +0 -129
- package/src/structures/pool.ts +0 -47
- package/src/structures/queue/__tests__/parallel.test.ts +0 -58
- package/src/structures/queue/__tests__/tasks.test.ts +0 -87
- package/src/structures/queue/parallel.ts +0 -142
- package/src/structures/queue/tasks.ts +0 -91
- package/src/structures/tempoCache.ts +0 -18
- package/src/types/comparator.ts +0 -6
- package/src/types/deep.ts +0 -18
- package/src/types/functions.ts +0 -8
- package/src/types/getter.ts +0 -14
- package/src/types/ident.ts +0 -8
- package/src/types/index.ts +0 -17
- package/src/validation/ValidationErrors.ts +0 -26
- package/src/validation/__tests__/index.test.ts +0 -8
- package/src/validation/__tests__/validator.test.ts +0 -107
- package/src/validation/creditCard.ts +0 -25
- package/src/validation/emails.ts +0 -5
- package/src/validation/helpers.ts +0 -47
- package/src/validation/index.ts +0 -9
- package/src/validation/types.ts +0 -18
- package/src/validation/validators.ts +0 -55
- package/src/validation/wrappers.ts +0 -26
- package/tsconfig.build.json +0 -10
- package/tsconfig.json +0 -32
- package/yarn-error.log +0 -3709
- package/yarn.lock +0 -3446
package/README.md
CHANGED
|
@@ -36,12 +36,12 @@ yarn add @zajno/common
|
|
|
36
36
|
2. In your code, use each module separately:
|
|
37
37
|
|
|
38
38
|
```typescript
|
|
39
|
-
import logger, { ILogger } from '@zajno/common/
|
|
39
|
+
import logger, { ILogger } from '@zajno/common/logger';
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
### Note on imports in v1
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Previously one had to import from like `@zajno/common/lib/logger` since compiling had been doing at `postinstall` time so Typescript with its config was a peer dependency. Currently it's not the case and this packages is provided with build artifacts (js + d.ts + source maps); so no need to include `/lib` part in imports anymore.
|
|
45
45
|
|
|
46
46
|
## Local development
|
|
47
47
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IValueModel } from './types';
|
|
2
|
+
import { Getter } from '../types/getter';
|
|
3
|
+
export declare class Model<T> implements IValueModel<T> {
|
|
4
|
+
private _value;
|
|
5
|
+
private readonly _defaultValue;
|
|
6
|
+
constructor(v?: Getter<T>);
|
|
7
|
+
get value(): T;
|
|
8
|
+
set value(v: T);
|
|
9
|
+
readonly setValue: (value: T) => void;
|
|
10
|
+
readonly reset: () => void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=Model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../src/models/Model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,KAAK,CAAC,CAAC,CAAE,YAAW,WAAW,CAAC,CAAC,CAAC;IAC3C,OAAO,CAAC,MAAM,CAAI;IAElB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAY;gBAE9B,CAAC,GAAE,MAAM,CAAC,CAAC,CAAQ;IAK/B,IAAW,KAAK,IACI,CAAC,CADqB;IAC1C,IAAW,KAAK,CAAC,CAAC,EAAE,CAAC,EAEpB;IAED,SAAgB,QAAQ,UAAW,CAAC,UAElC;IAEF,SAAgB,KAAK,aAEnB;CACL"}
|
package/models/Model.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Model = void 0;
|
|
4
|
+
const getter_1 = require("../types/getter");
|
|
5
|
+
class Model {
|
|
6
|
+
constructor(v = null) {
|
|
7
|
+
var _a;
|
|
8
|
+
this.setValue = (value) => {
|
|
9
|
+
this._value = value;
|
|
10
|
+
};
|
|
11
|
+
this.reset = () => {
|
|
12
|
+
this.setValue(getter_1.Getter.getValue(this._defaultValue));
|
|
13
|
+
};
|
|
14
|
+
this._value = (_a = getter_1.Getter.getValue(v)) !== null && _a !== void 0 ? _a : null;
|
|
15
|
+
this._defaultValue = v;
|
|
16
|
+
}
|
|
17
|
+
get value() { return this._value; }
|
|
18
|
+
set value(v) {
|
|
19
|
+
this.setValue(v);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.Model = Model;
|
|
23
|
+
//# sourceMappingURL=Model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Model.js","sourceRoot":"","sources":["../../src/models/Model.ts"],"names":[],"mappings":";;;AACA,4CAAyC;AAEzC,MAAa,KAAK;IAKd,YAAY,IAAe,IAAI;;QAUf,aAAQ,GAAG,CAAC,KAAQ,EAAE,EAAE;YACpC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,CAAC,CAAC;QAEc,UAAK,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,QAAQ,CAAC,eAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;QACvD,CAAC,CAAC;QAfE,IAAI,CAAC,MAAM,GAAG,MAAA,eAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,mCAAI,IAAI,CAAC;QACzC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED,IAAW,KAAK,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1C,IAAW,KAAK,CAAC,CAAI;QACjB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC;CASJ;AAtBD,sBAsBC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IValueModel } from './types';
|
|
2
|
+
export interface IValueCollector<TSource, TValue> {
|
|
3
|
+
getValue(source: TSource): TValue;
|
|
4
|
+
setValue(source: TSource, value: TValue): void;
|
|
5
|
+
}
|
|
6
|
+
declare type SimpleCollector<T> = {
|
|
7
|
+
get: () => T;
|
|
8
|
+
set: (t: T) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare type ModelCollectorsMap<T> = {
|
|
11
|
+
[P in keyof T]?: IValueModel<T[P]>;
|
|
12
|
+
};
|
|
13
|
+
export declare type CollectorsMap<T> = {
|
|
14
|
+
[P in keyof T]?: SimpleCollector<T[P]>;
|
|
15
|
+
};
|
|
16
|
+
export declare class ModelCollector<T extends Object> {
|
|
17
|
+
private readonly _collectors;
|
|
18
|
+
addModels(models: ModelCollectorsMap<T>): this;
|
|
19
|
+
addModel<TKey extends keyof T, TSource extends IValueModel<T[TKey]>>(key: TKey, source: TSource): this;
|
|
20
|
+
addCollector<TKey extends keyof T, TModel, TCollector extends IValueCollector<TModel, T[TKey]>>(key: TKey, model: TModel, collector: TCollector): this;
|
|
21
|
+
remove(key: keyof T): this;
|
|
22
|
+
collect(): T;
|
|
23
|
+
populate(data: T): void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=ValuesCollector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValuesCollector.d.ts","sourceRoot":"","sources":["../../src/models/ValuesCollector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,eAAe,CAAC,OAAO,EAAE,MAAM;IAC5C,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAClD;AAED,aAAK,eAAe,CAAC,CAAC,IAAI;IACtB,GAAG,EAAE,MAAM,CAAC,CAAC;IACb,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CACvB,CAAC;AAMF,oBAAY,kBAAkB,CAAC,CAAC,IAAI;KAC/B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACrC,CAAC;AAEF,oBAAY,aAAa,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACzC,CAAC;AAEF,qBAAa,cAAc,CAAC,CAAC,SAAS,MAAM;IAExC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+B;IAEpD,SAAS,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAKvC,QAAQ,CAAC,IAAI,SAAS,MAAM,CAAC,EAAE,OAAO,SAAS,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO;IAS/F,YAAY,CAAC,IAAI,SAAS,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,SAAS,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU;IAS/I,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC;IAMnB,OAAO,IAAI,CAAC;IAYZ,QAAQ,CAAC,IAAI,EAAE,CAAC;CAW1B"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelCollector = void 0;
|
|
4
|
+
class ModelCollector {
|
|
5
|
+
constructor() {
|
|
6
|
+
this._collectors = {};
|
|
7
|
+
}
|
|
8
|
+
addModels(models) {
|
|
9
|
+
Object.entries(models).forEach(pair => this.addModel(pair[0], pair[1]));
|
|
10
|
+
return this;
|
|
11
|
+
}
|
|
12
|
+
addModel(key, source) {
|
|
13
|
+
this._collectors[key] = {
|
|
14
|
+
get: () => source.value,
|
|
15
|
+
set: v => { source.value = v; },
|
|
16
|
+
};
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
addCollector(key, model, collector) {
|
|
20
|
+
this._collectors[key] = {
|
|
21
|
+
get: () => collector.getValue(model),
|
|
22
|
+
set: v => collector.setValue(model, v),
|
|
23
|
+
};
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
remove(key) {
|
|
27
|
+
delete this._collectors[key];
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
collect() {
|
|
31
|
+
const res = {};
|
|
32
|
+
Object.entries(this._collectors).forEach(pair => {
|
|
33
|
+
const key = pair[0];
|
|
34
|
+
const collector = pair[1];
|
|
35
|
+
res[key] = collector.get();
|
|
36
|
+
});
|
|
37
|
+
return res;
|
|
38
|
+
}
|
|
39
|
+
populate(data) {
|
|
40
|
+
Object.entries(data).forEach(pair => {
|
|
41
|
+
const key = pair[0];
|
|
42
|
+
const value = pair[1];
|
|
43
|
+
const collector = this._collectors[key];
|
|
44
|
+
if (collector) {
|
|
45
|
+
collector.set(value);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.ModelCollector = ModelCollector;
|
|
51
|
+
//# sourceMappingURL=ValuesCollector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValuesCollector.js","sourceRoot":"","sources":["../../src/models/ValuesCollector.ts"],"names":[],"mappings":";;;AAwBA,MAAa,cAAc;IAA3B;QAEqB,gBAAW,GAA2B,EAAG,CAAC;IAsD/D,CAAC;IApDU,SAAS,CAAC,MAA6B;QAC1C,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAY,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnF,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,QAAQ,CAA6D,GAAS,EAAE,MAAe;QAClG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG;YACpB,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK;YACvB,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;SAClC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,YAAY,CAAoF,GAAS,EAAE,KAAa,EAAE,SAAqB;QAClJ,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG;YACpB,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;YACpC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;SACzC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,MAAM,CAAC,GAAY;QACtB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAE7B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,OAAO;QACV,MAAM,GAAG,GAAG,EAAQ,CAAC;QAErB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAY,CAAC;YAC/B,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAgC,CAAC;YACzD,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,CAAC;IACf,CAAC;IAEM,QAAQ,CAAC,IAAO;QACnB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAChC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAY,CAAC;YAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAe,CAAC;YAEpC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACxC,IAAI,SAAS,EAAE;gBACX,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aACxB;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAxDD,wCAwDC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface IValueModelReadonly<TValue> {
|
|
2
|
+
readonly value: TValue;
|
|
3
|
+
}
|
|
4
|
+
export interface IValueModel<TValue> extends IValueModelReadonly<TValue> {
|
|
5
|
+
value: TValue;
|
|
6
|
+
}
|
|
7
|
+
export interface ILabel<T> {
|
|
8
|
+
readonly label: T;
|
|
9
|
+
}
|
|
10
|
+
export interface IResetableModel {
|
|
11
|
+
readonly reset: () => void;
|
|
12
|
+
readonly isDefault?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ICountableModel {
|
|
15
|
+
readonly count: number;
|
|
16
|
+
readonly selectedCount?: number;
|
|
17
|
+
readonly isEmpty: boolean;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/models/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,mBAAmB,CAAC,MAAM;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW,CAAC,MAAM,CAAE,SAAQ,mBAAmB,CAAC,MAAM,CAAC;IACpE,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,MAAM,CAAC,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC7B"}
|
package/models/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/models/types.ts"],"names":[],"mappings":""}
|