react-dialogger 1.1.82 β 1.1.83
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 +34 -0
- package/docs/philosophy.md +81 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,6 +12,17 @@ You can find the example code about the project on our [Codesandbox](https://cod
|
|
|
12
12
|
# Youtube
|
|
13
13
|
You can watch simple example on Youtube [Youtube](https://www.youtube.com/watch?v=vhSroEgdj1c)
|
|
14
14
|
|
|
15
|
+
# Why react-dialogger?
|
|
16
|
+
> react-dialogger is built for React applications that need dynamic, runtime-managed dialogs rather than static JSX-based modals.
|
|
17
|
+
It enables centralized dialog configuration, action-driven logic, and dialog-owned state, making complex dialog flows easier to manage and scale.
|
|
18
|
+
Perfect for applications with dynamic forms, async workflows, and advanced UI orchestration.
|
|
19
|
+
|
|
20
|
+
## Philosophy
|
|
21
|
+
|
|
22
|
+
To understand why react-dialogger exists and when to use it,
|
|
23
|
+
see the detailed philosophy document:
|
|
24
|
+
|
|
25
|
+
π [Dialogger Philosophy](./docs/philosophy.md)
|
|
15
26
|
|
|
16
27
|
# react-dialogger - Custom Dialog Component Documentation
|
|
17
28
|
|
|
@@ -330,6 +341,29 @@ This basic usage setup enables you to quickly configure and display a custom dia
|
|
|
330
341
|
> This package is a continuation of the `react-araci` package.
|
|
331
342
|
> Due to an error, `react-araci` was removed, and it has been decided to continue under the new package name **`react-dialogger`**.
|
|
332
343
|
|
|
344
|
+
|
|
345
|
+
## React-Dialogger vs MUI Dialog / AntD Modal
|
|
346
|
+
```js
|
|
347
|
+
| Feature / Aspect | **react-dialogger** | **MUI Dialog** | **AntD Modal** |
|
|
348
|
+
| ----------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------------- |
|
|
349
|
+
| **Dialog Creation** | Runtime / dynamic (`new Dialog().show()`) | JSX-based, usually static (`<Dialog open={...} />`) | JSX-based, usually static (`<Modal visible={...} />`) |
|
|
350
|
+
| **State Management** | Dialog owns its own state (`initialValues`, `setValues`) | State often in React components | State often in React components |
|
|
351
|
+
| **Centralized Global Config** | `baseDialogOptions` allows global styling, intents, localization | Global theme only, per-dialog config needed | Global config via `ConfigProvider`, per-modal override needed |
|
|
352
|
+
| **Actions / Buttons** | Action-driven, first-class citizens (`DialogAction`) with intents & onClick | Children buttons, manual click handling | `okText` / `cancelText` props and footer buttons |
|
|
353
|
+
| **Dynamic Header & Body** | Fully dynamic via functions | JSX render, can be dynamic but bound to component | JSX render, can be dynamic but bound to component |
|
|
354
|
+
| **Dialog Overwrites / Flexibility** | Local overrides of global options | Limited, mostly via props | Limited, mostly via props |
|
|
355
|
+
| **Complex Flows / Wizards** | Fully supported via action chaining and dialog-owned state | Needs extra state management | Needs extra state management |
|
|
356
|
+
| **Async / Runtime Use** | Designed for runtime invocation | Typically requires state lift | Typically requires state lift |
|
|
357
|
+
| **Animation / Backdrop** | Built-in customizable animations & backdrop settings | Default MUI transitions | Default AntD transitions |
|
|
358
|
+
| **Use Case** | Large, dynamic, enterprise apps, multi-step wizards, async workflows | Standard dialogs with simple static content | Standard dialogs with simple static content |
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
333
367
|
## π© Contact
|
|
334
368
|
For support or inquiries, please reach out via email:
|
|
335
369
|
βοΈ [developer@appinsource.eu](mailto:developer@appinsource.eu)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
## Philosophy
|
|
2
|
+
## Why react-dialogger Exists
|
|
3
|
+
|
|
4
|
+
Modern React applications often require dialogs that are **dynamic, stateful, and context-aware**.
|
|
5
|
+
However, most dialog solutions are built around **static JSX components** that are tightly coupled to the component tree and local state.
|
|
6
|
+
|
|
7
|
+
**react-dialogger** was created to overcome these limitations.
|
|
8
|
+
|
|
9
|
+
Instead of treating dialogs as static UI components, react-dialogger treats them as **runtime-managed UI flows**.
|
|
10
|
+
|
|
11
|
+
> Dialogs are not rendered β they are **invoked**.
|
|
12
|
+
|
|
13
|
+
### The Core Idea
|
|
14
|
+
react-dialogger is built on three fundamental principles:
|
|
15
|
+
|
|
16
|
+
### 1. Runtime-First Dialog Creation
|
|
17
|
+
Dialogs are created when needed, not pre-declared in JSX.
|
|
18
|
+
```ts
|
|
19
|
+
new Dialog().setHeader(...).setBody(...).addActions(...).show();
|
|
20
|
+
```
|
|
21
|
+
This allows dialogs to be triggered from:
|
|
22
|
+
* async operations
|
|
23
|
+
* validation flows
|
|
24
|
+
* business logic
|
|
25
|
+
* service layers
|
|
26
|
+
|
|
27
|
+
without coupling them to React render cycles.
|
|
28
|
+
|
|
29
|
+
### 2. Centralized Configuration, Local Overrides
|
|
30
|
+
With baseDialogOptions, applications define a global dialog behavior and style once.
|
|
31
|
+
* Consistent UI and UX
|
|
32
|
+
* Shared intents, localization, and defaults
|
|
33
|
+
* Predictable behavior across the app
|
|
34
|
+
|
|
35
|
+
At the same time, each dialog can override these options when necessary, keeping flexibility without sacrificing consistency.
|
|
36
|
+
|
|
37
|
+
### 3. Action-Driven Architecture
|
|
38
|
+
In react-dialogger, actions are first-class citizens.
|
|
39
|
+
Dialogs donβt own logic β actions do.
|
|
40
|
+
```ts
|
|
41
|
+
new DialogAction('confirm')
|
|
42
|
+
.setIntent('positive')
|
|
43
|
+
.onClick((button, dialog) => {
|
|
44
|
+
dialog.setValue('confirmed', true);
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
#### <b>This makes dialog flows:</b>
|
|
48
|
+
* explicit
|
|
49
|
+
* testable
|
|
50
|
+
* reusable
|
|
51
|
+
* easy to reason about
|
|
52
|
+
|
|
53
|
+
### Dialog State Belongs to the Dialog
|
|
54
|
+
Instead of pushing dialog state into React components, react-dialogger allows dialogs to own their own state.
|
|
55
|
+
```ts
|
|
56
|
+
dialog.initialValues({ step: 1 });
|
|
57
|
+
dialog.setValue('step', 2);
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This keeps React components:
|
|
61
|
+
* cleaner
|
|
62
|
+
* simpler
|
|
63
|
+
* focused on rendering, not orchestration
|
|
64
|
+
|
|
65
|
+
## When to Use react-dialogger
|
|
66
|
+
### β
Best suited for:
|
|
67
|
+
* Large or enterprise React applications
|
|
68
|
+
* Dynamic forms and wizards
|
|
69
|
+
* Async or flow-based UI logic
|
|
70
|
+
* Centralized dialog management
|
|
71
|
+
* Complex dialog interactions
|
|
72
|
+
|
|
73
|
+
### β Not ideal for:
|
|
74
|
+
* Single static modal dialogs
|
|
75
|
+
* Very simple UI-only popups
|
|
76
|
+
* Cases where JSX-only dialogs are sufficient
|
|
77
|
+
|
|
78
|
+
## In One Sentence
|
|
79
|
+
|
|
80
|
+
> react-dialogger is a runtime dialog orchestration system for React, designed to manage complex dialog flows with centralized configuration and action-driven logic.
|
|
81
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.83",
|
|
4
4
|
"description": "This package is a continuation of the react-araci package. Due to an error, react-araci was removed, and it has been decided to continue under the new package name react-dialogger",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Sueleyman Topaloglu",
|