@agile-ts/core
Advanced tools
Comparing version 0.0.16 to 0.0.17
# Change Log | ||
## 0.0.17 | ||
### Patch Changes | ||
- 7aeadd5: #### :rocket: New Feature | ||
- `core`, `react`, `vue` | ||
- [#144](https://github.com/agile-ts/agile/pull/144) Vue integration ([@bennodev19](https://github.com/bennodev19)) | ||
#### :nail_care: Polish | ||
- `core`, `react`, `vue` | ||
- [#144](https://github.com/agile-ts/agile/pull/144) Vue integration ([@bennodev19](https://github.com/bennodev19)) | ||
- Fixed typos in ReadMe's | ||
#### Committers: 1 | ||
- BennoDev ([@bennodev19](https://github.com/bennodev19)) | ||
- Updated dependencies [7aeadd5] | ||
- @agile-ts/logger@0.0.4 | ||
- @agile-ts/utils@0.0.4 | ||
## 0.0.16 | ||
@@ -4,0 +27,0 @@ |
@@ -250,4 +250,4 @@ import { Agile, Item, Group, GroupKey, Selector, SelectorKey, StorageKey, GroupConfigInterface, CollectionPersistent, GroupAddConfigInterface, SideEffectConfigInterface, SelectorConfigInterface } from '../internal'; | ||
* @param itemKeys - ItemKey/s that are moved | ||
* @param oldGroupKey - GroupKey of the Group that currently keeps the Items | ||
* @param newGroupKey - GroupKey of the Group into which the Items should be moved | ||
* @param oldGroupKey - GroupKey of the Group that currently keeps the Items at itemKey/s | ||
* @param newGroupKey - GroupKey of the Group into which the Items at itemKey/s are moved | ||
* @param config - Config | ||
@@ -254,0 +254,0 @@ */ |
@@ -22,3 +22,3 @@ import { Agile, Observer, SubscriptionContainer, ComponentSubscriptionContainer, CallbackSubscriptionContainer, SubscriptionContainerConfigInterface } from '../../internal'; | ||
[key: string]: Observer; | ||
}, config?: SubscriptionContainerConfigInterface): { | ||
}, config?: RegisterSubscriptionConfigInterface): { | ||
subscriptionContainer: SubscriptionContainer; | ||
@@ -36,3 +36,3 @@ props: { | ||
*/ | ||
subscribeWithSubsArray(integrationInstance: any, subs?: Array<Observer>, config?: SubscriptionContainerConfigInterface): SubscriptionContainer; | ||
subscribeWithSubsArray(integrationInstance: any, subs?: Array<Observer>, config?: RegisterSubscriptionConfigInterface): SubscriptionContainer; | ||
/** | ||
@@ -51,3 +51,3 @@ * @internal | ||
*/ | ||
registerSubscription(integrationInstance: any, subs?: Array<Observer>, config?: SubscriptionContainerConfigInterface): SubscriptionContainer; | ||
registerSubscription(integrationInstance: any, subs?: Array<Observer>, config?: RegisterSubscriptionConfigInterface): SubscriptionContainer; | ||
/** | ||
@@ -62,3 +62,3 @@ * @internal | ||
*/ | ||
registerComponentSubscription(componentInstance: any, subs?: Array<Observer>, config?: SubscriptionContainerConfigInterface): ComponentSubscriptionContainer; | ||
registerComponentSubscription(componentInstance: any, subs?: Array<Observer>, config?: RegisterSubscriptionConfigInterface): ComponentSubscriptionContainer; | ||
/** | ||
@@ -71,3 +71,3 @@ * @internal | ||
*/ | ||
registerCallbackSubscription(callbackFunction: () => void, subs?: Array<Observer>, config?: SubscriptionContainerConfigInterface): CallbackSubscriptionContainer; | ||
registerCallbackSubscription(callbackFunction: () => void, subs?: Array<Observer>, config?: RegisterSubscriptionConfigInterface): CallbackSubscriptionContainer; | ||
/** | ||
@@ -86,1 +86,9 @@ * @internal | ||
} | ||
/** | ||
* @param waitForMount - Whether the subscriptionContainer should only become ready | ||
* when the Component has been mounted. (default = agileInstance.config.waitForMount) | ||
*/ | ||
interface RegisterSubscriptionConfigInterface extends SubscriptionContainerConfigInterface { | ||
waitForMount?: boolean; | ||
} | ||
export {}; |
@@ -84,2 +84,5 @@ "use strict"; | ||
registerSubscription(integrationInstance, subs = [], config = {}) { | ||
config = internal_1.defineConfig(config, { | ||
waitForMount: this.agileInstance().config.waitForMount, | ||
}); | ||
if (internal_1.isFunction(integrationInstance)) | ||
@@ -90,5 +93,5 @@ return this.registerCallbackSubscription(integrationInstance, subs, config); | ||
registerComponentSubscription(componentInstance, subs = [], config = {}) { | ||
const componentSubscriptionContainer = new internal_1.ComponentSubscriptionContainer(componentInstance, subs, config); | ||
const componentSubscriptionContainer = new internal_1.ComponentSubscriptionContainer(componentInstance, subs, internal_1.removeProperties(config, ['waitForMount'])); | ||
this.componentSubs.add(componentSubscriptionContainer); | ||
if (this.agileInstance().config.waitForMount) { | ||
if (config.waitForMount) { | ||
if (this.mountedComponents.has(componentInstance)) | ||
@@ -110,3 +113,3 @@ componentSubscriptionContainer.ready = true; | ||
registerCallbackSubscription(callbackFunction, subs = [], config = {}) { | ||
const callbackSubscriptionContainer = new internal_1.CallbackSubscriptionContainer(callbackFunction, subs, config); | ||
const callbackSubscriptionContainer = new internal_1.CallbackSubscriptionContainer(callbackFunction, subs, internal_1.removeProperties(config, ['waitForMount'])); | ||
this.callbackSubs.add(callbackSubscriptionContainer); | ||
@@ -113,0 +116,0 @@ callbackSubscriptionContainer.ready = true; |
{ | ||
"name": "@agile-ts/core", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"author": "BennoDev", | ||
@@ -46,4 +46,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"@agile-ts/utils": "^0.0.3", | ||
"@agile-ts/logger": "^0.0.3" | ||
"@agile-ts/utils": "^0.0.4", | ||
"@agile-ts/logger": "^0.0.4" | ||
}, | ||
@@ -50,0 +50,0 @@ "publishConfig": { |
@@ -58,3 +58,3 @@ <img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/header_background.png" alt="AgileTs"> | ||
``` | ||
To learn out more, check out our [Quick Start Guides](https://agile-ts.org/docs/Installation.md). | ||
Want to learn more? Check out our [Quick Start Guides](https://agile-ts.org/docs/Installation.md). | ||
@@ -67,3 +67,3 @@ ### ⛳️ Sandbox | ||
- [React-Native](https://snack.expo.io/@bennodev/agilets-first-state) | ||
- Vue (coming soon) | ||
- [Vue](https://codesandbox.io/s/agilets-first-state-i5xxs) | ||
- Angular (coming soon) | ||
@@ -81,3 +81,4 @@ | ||
AgileTs is a global, simple, well-tested State Management Framework implemented in Typescript. | ||
It offers a reimagined API that focuses on **developer experience** and allows you to **quickly** and **easily** manage your States. | ||
It offers a reimagined API that focuses on **developer experience** | ||
and allows you to **easily** manage your States. | ||
Besides States, AgileTs offers some other powerful APIs that make your life easier. | ||
@@ -88,13 +89,13 @@ The philosophy behind AgileTs is simple: | ||
Write minimalistic, boilerplate-free code that captures your intent. | ||
```ts | ||
MY_STATE.set('jeff'); // Update State value | ||
MY_STATE.undo(); // Undo latest State value change | ||
MY_STATE.is({hello: "jeff"}); // Check if State has the value '{hello: "jeff"}' | ||
MY_STATE.watch((value) => {console.log(value);}); // Watch on State changes | ||
``` | ||
**Some straightforward syntax examples:** | ||
**Some more straightforward syntax examples:** | ||
- Mutate and Check States with simple Functions | ||
- Store State in any Storage, like the [Local Storage](https://www.w3schools.com/html/html5_webstorage.asp) | ||
```ts | ||
MY_STATE.undo(); // Undo latest change | ||
MY_STATE.is({hello: "jeff"}); // Check if State has the Value '{hello: "jeff"}' | ||
MY_STATE.watch((value) => {console.log(value);}); // Watch on State changes | ||
``` | ||
- Store State in any Storage, like [Local Storage](https://www.w3schools.com/html/html5_webstorage.asp) | ||
```ts | ||
MY_STATE.persist("storage-key"); | ||
@@ -124,3 +125,3 @@ ``` | ||
AgileTs is designed to take all business logic out of UI-Components and put them in a central place, often called `core`. | ||
The benefit of keeping logic separate to UI-Components is to make your code more decoupled, portable, and above all, easily testable. | ||
The benefit of keeping logic separate to UI-Components is to make your code more decoupled, portable, scalable, and above all, easily testable. | ||
@@ -130,3 +131,3 @@ ### 🎯 Easy to Use | ||
Learn the powerful tools of AgileTs in a short amount of time. An excellent place to start are | ||
our [Quick Start](https://agile-ts.org/docs/Installation) Guides, or if you don't like to follow any tutorials, | ||
our [Quick Start Guides](https://agile-ts.org/docs/Installation), or if you don't like to follow any tutorials, | ||
you can jump straight into our [Example](https://agile-ts.org/docs/examples/Introduction) Section. | ||
@@ -141,5 +142,6 @@ | ||
To properly use AgileTs, in a UI-Framework, we need to install **two** packages. | ||
In order to properly use AgileTs, in a UI-Framework, we need to install **two** packages. | ||
- The _Core Package_, which acts as the brain of AgileTs and manages all your States | ||
- The [`core`](https://agile-ts.org/docs/core) package, which contains the State Management Logic of AgileTs | ||
and therefore offers powerful classes such as the [`State Class`](https://agile-ts.org/docs/core/state). | ||
``` | ||
@@ -149,3 +151,4 @@ npm install @agile-ts/core | ||
- and a _fitting Integration_ for your preferred UI-Framework. In my case, the [React Integration](https://www.npmjs.com/package/@agile-ts/react). | ||
- And on the other hand, a _fitting Integration_ for your preferred UI-Framework. | ||
In my case, the [React Integration](https://www.npmjs.com/package/@agile-ts/react). | ||
Check [here](https://agile-ts.org/docs/frameworks) if your desired Framework is supported, too. | ||
@@ -166,3 +169,3 @@ ``` | ||
And I promise you. You will be able to use AgileTs in no time. | ||
In case you have any further questions, don't hesitate to join our [Community Discord](https://discord.gg/T9GzreAwPH). | ||
If you have any further questions, don't hesitate to join our [Community Discord](https://discord.gg/T9GzreAwPH). | ||
@@ -177,3 +180,3 @@ | ||
Get a part of AgileTs and start contributing. We welcome any meaningful contribution. 😀 | ||
To find out more, check out the [CONTRIBUTING.md](https://github.com/agile-ts/agile/blob/master/CONTRIBUTING.md). | ||
To find out more about contributing, check out the [CONTRIBUTING.md](https://github.com/agile-ts/agile/blob/master/CONTRIBUTING.md). | ||
@@ -195,2 +198,3 @@ <a href="https://codeclimate.com/github/agile-ts/agile/coverage.svg"> | ||
| [@agile-ts/react](/packages/react) | [![badge](https://img.shields.io/npm/v/@agile-ts/react.svg?style=flat-square)](https://www.npmjs.com/package/@agile-ts/react) | React Integration | | ||
| [@agile-ts/vue](/packages/vue) | [![badge](https://img.shields.io/npm/v/@agile-ts/vue.svg?style=flat-square)](https://www.npmjs.com/package/@agile-ts/vue) | Vue Integration | | ||
| [@agile-ts/api](/packages/api) | [![badge](https://img.shields.io/npm/v/@agile-ts/api.svg?style=flat-square)](https://www.npmjs.com/package/@agile-ts/api) | Promise based API | | ||
@@ -197,0 +201,0 @@ | [@agile-ts/multieditor](/packages/multieditor) | [![badge](https://img.shields.io/npm/v/@agile-ts/multieditor.svg?style=flat-square)](https://www.npmjs.com/package/@agile-ts/multieditor) | Simple Form Manager | |
196337
4727
203
+ Added@agile-ts/logger@0.0.4(transitive)
+ Added@agile-ts/utils@0.0.4(transitive)
- Removed@agile-ts/logger@0.0.3(transitive)
- Removed@agile-ts/utils@0.0.3(transitive)
Updated@agile-ts/logger@^0.0.4
Updated@agile-ts/utils@^0.0.4