react-dialogger 1.1.86 → 1.1.87
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component } from "react";
|
|
2
2
|
import { DialogBase } from "./index.js";
|
|
3
|
-
import { ActionProps, ActionState, DialogActionType, TBVariant, TBColor, DialogActionOptionsType, TDialogStateListenerForActionCallbackType, ActionIntent } from "../types/index.js";
|
|
3
|
+
import { ActionProps, ActionState, DialogActionType, TBVariant, TBColor, DialogActionOptionsType, TDialogStateListenerForActionCallbackType, ActionIntent, ActionIntentsType } from "../types/index.js";
|
|
4
4
|
export declare const BASE_INTENTS: {
|
|
5
5
|
readonly positive: {
|
|
6
6
|
readonly color: "primary";
|
|
@@ -65,7 +65,7 @@ declare class DialogActionBase extends Component<ActionProps, ActionState> {
|
|
|
65
65
|
/**
|
|
66
66
|
* @deprecated use Options*/
|
|
67
67
|
isDisabled: () => boolean;
|
|
68
|
-
updateIntent
|
|
68
|
+
updateIntent(intent: ActionIntentsType): this;
|
|
69
69
|
setInProcess: (inProcess: boolean) => DialogActionBase;
|
|
70
70
|
isInProcess: () => boolean;
|
|
71
71
|
remove: () => void;
|
|
@@ -139,10 +139,6 @@ var DialogActionBase = /** @class */ (function (_super) {
|
|
|
139
139
|
_this.isDisabled = function () {
|
|
140
140
|
return _this.state.options.disabled;
|
|
141
141
|
};
|
|
142
|
-
_this.updateIntent = function (intent) {
|
|
143
|
-
_this.setState(function (prevState) { return (__assign(__assign({}, _this.state), { intent: intent })); });
|
|
144
|
-
return _this;
|
|
145
|
-
};
|
|
146
142
|
_this.setInProcess = function (inProcess) {
|
|
147
143
|
_this.setState(function (prevState) { return (__assign(__assign({}, prevState), { options: __assign(__assign({}, prevState.options), { disabled: inProcess }), inProcess: inProcess })); });
|
|
148
144
|
return _this;
|
|
@@ -266,6 +262,12 @@ var DialogActionBase = /** @class */ (function (_super) {
|
|
|
266
262
|
this._onClick = callback; // callback( this, this._dialogBaseComponent );
|
|
267
263
|
return this;
|
|
268
264
|
};
|
|
265
|
+
// updateIntent = ( intent: ActionIntent ): DialogActionBase => {
|
|
266
|
+
DialogActionBase.prototype.updateIntent = function (intent) {
|
|
267
|
+
var _this = this;
|
|
268
|
+
this.setState(function (prevState) { return (__assign(__assign({}, _this.state), { intent: intent })); });
|
|
269
|
+
return this;
|
|
270
|
+
};
|
|
269
271
|
return DialogActionBase;
|
|
270
272
|
}(react_1.Component));
|
|
271
273
|
exports.default = DialogActionBase;
|
package/models/DialogAction.js
CHANGED
|
@@ -30,7 +30,8 @@ var DialogAction = /** @class */ (function () {
|
|
|
30
30
|
return _this;
|
|
31
31
|
};
|
|
32
32
|
this.setOptions = function (options) {
|
|
33
|
-
_this.
|
|
33
|
+
_this._actionComponent.current.updateOptions(options);
|
|
34
|
+
// this._options = options;
|
|
34
35
|
return _this;
|
|
35
36
|
};
|
|
36
37
|
this.onClick = function (callback) {
|
|
@@ -65,6 +66,7 @@ var DialogAction = /** @class */ (function () {
|
|
|
65
66
|
});
|
|
66
67
|
DialogAction.prototype.setIntent = function (intent) {
|
|
67
68
|
this._intent = intent;
|
|
69
|
+
// this._actionComponent?.current?.updateIntent(intent)
|
|
68
70
|
return this;
|
|
69
71
|
};
|
|
70
72
|
DialogAction.prototype.intent = function () {
|
|
@@ -72,7 +74,9 @@ var DialogAction = /** @class */ (function () {
|
|
|
72
74
|
};
|
|
73
75
|
Object.defineProperty(DialogAction.prototype, "options", {
|
|
74
76
|
get: function () {
|
|
75
|
-
|
|
77
|
+
var _a, _b, _c;
|
|
78
|
+
// return this._options;
|
|
79
|
+
return (_c = (_b = (_a = this._actionComponent) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.options) !== null && _c !== void 0 ? _c : this._options;
|
|
76
80
|
},
|
|
77
81
|
enumerable: false,
|
|
78
82
|
configurable: true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.87",
|
|
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",
|