mvvm-mobx 1.0.0 → 1.0.3
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/dist/core/CounterFlag.js
CHANGED
|
@@ -85,11 +85,22 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
|
|
|
85
85
|
var e = new Error(message);
|
|
86
86
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
87
87
|
});
|
|
88
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
89
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
90
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
91
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
92
|
+
};
|
|
93
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
94
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
95
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
96
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
97
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
98
|
+
};
|
|
88
99
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
89
100
|
exports.CounterFlag = void 0;
|
|
90
101
|
const mobx_1 = require("mobx");
|
|
91
102
|
let CounterFlag = (() => {
|
|
92
|
-
var _a;
|
|
103
|
+
var _a, _CounterFlag_counter_accessor_storage;
|
|
93
104
|
let _instanceExtraInitializers = [];
|
|
94
105
|
let _counter_decorators;
|
|
95
106
|
let _counter_initializers = [];
|
|
@@ -98,8 +109,10 @@ let CounterFlag = (() => {
|
|
|
98
109
|
let _increment_decorators;
|
|
99
110
|
let _get_isActive_decorators;
|
|
100
111
|
return _a = class CounterFlag {
|
|
112
|
+
get counter() { return __classPrivateFieldGet(this, _CounterFlag_counter_accessor_storage, "f"); }
|
|
113
|
+
set counter(value) { __classPrivateFieldSet(this, _CounterFlag_counter_accessor_storage, value, "f"); }
|
|
101
114
|
constructor() {
|
|
102
|
-
this
|
|
115
|
+
_CounterFlag_counter_accessor_storage.set(this, (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _counter_initializers, 0)));
|
|
103
116
|
__runInitializers(this, _counter_extraInitializers);
|
|
104
117
|
(0, mobx_1.makeObservable)(this);
|
|
105
118
|
}
|
|
@@ -135,16 +148,17 @@ let CounterFlag = (() => {
|
|
|
135
148
|
return this.counter > 0;
|
|
136
149
|
}
|
|
137
150
|
},
|
|
151
|
+
_CounterFlag_counter_accessor_storage = new WeakMap(),
|
|
138
152
|
(() => {
|
|
139
153
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
140
154
|
_counter_decorators = [mobx_1.observable];
|
|
141
155
|
_using_decorators = [mobx_1.action];
|
|
142
156
|
_increment_decorators = [mobx_1.action];
|
|
143
157
|
_get_isActive_decorators = [mobx_1.computed];
|
|
158
|
+
__esDecorate(_a, null, _counter_decorators, { kind: "accessor", name: "counter", static: false, private: false, access: { has: obj => "counter" in obj, get: obj => obj.counter, set: (obj, value) => { obj.counter = value; } }, metadata: _metadata }, _counter_initializers, _counter_extraInitializers);
|
|
144
159
|
__esDecorate(_a, null, _using_decorators, { kind: "method", name: "using", static: false, private: false, access: { has: obj => "using" in obj, get: obj => obj.using }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
145
160
|
__esDecorate(_a, null, _increment_decorators, { kind: "method", name: "increment", static: false, private: false, access: { has: obj => "increment" in obj, get: obj => obj.increment }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
146
161
|
__esDecorate(_a, null, _get_isActive_decorators, { kind: "getter", name: "isActive", static: false, private: false, access: { has: obj => "isActive" in obj, get: obj => obj.isActive }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
147
|
-
__esDecorate(null, null, _counter_decorators, { kind: "field", name: "counter", static: false, private: false, access: { has: obj => "counter" in obj, get: obj => obj.counter, set: (obj, value) => { obj.counter = value; } }, metadata: _metadata }, _counter_initializers, _counter_extraInitializers);
|
|
148
162
|
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
149
163
|
})(),
|
|
150
164
|
_a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InteractionManager } from "./InteractionManager";
|
|
2
2
|
import { InteractionRequest } from "./InteractionRequest";
|
|
3
3
|
export declare class SingleConcurrentInteractionManager implements InteractionManager {
|
|
4
|
-
interactionRequest: InteractionRequest | null;
|
|
4
|
+
accessor interactionRequest: InteractionRequest | null;
|
|
5
5
|
private resolveFunc?;
|
|
6
6
|
constructor();
|
|
7
7
|
requestInteraction(interactionRequest: InteractionRequest): Promise<string | void>;
|
|
@@ -33,11 +33,22 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn,
|
|
|
33
33
|
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
34
|
done = true;
|
|
35
35
|
};
|
|
36
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
37
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
38
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
39
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
40
|
+
};
|
|
41
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
42
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
43
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
44
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
45
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
46
|
+
};
|
|
36
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
48
|
exports.SingleConcurrentInteractionManager = void 0;
|
|
38
49
|
const mobx_1 = require("mobx");
|
|
39
50
|
let SingleConcurrentInteractionManager = (() => {
|
|
40
|
-
var _a;
|
|
51
|
+
var _a, _SingleConcurrentInteractionManager_interactionRequest_accessor_storage;
|
|
41
52
|
let _instanceExtraInitializers = [];
|
|
42
53
|
let _interactionRequest_decorators;
|
|
43
54
|
let _interactionRequest_initializers = [];
|
|
@@ -45,8 +56,10 @@ let SingleConcurrentInteractionManager = (() => {
|
|
|
45
56
|
let _requestInteraction_decorators;
|
|
46
57
|
let _respond_decorators;
|
|
47
58
|
return _a = class SingleConcurrentInteractionManager {
|
|
59
|
+
get interactionRequest() { return __classPrivateFieldGet(this, _SingleConcurrentInteractionManager_interactionRequest_accessor_storage, "f"); }
|
|
60
|
+
set interactionRequest(value) { __classPrivateFieldSet(this, _SingleConcurrentInteractionManager_interactionRequest_accessor_storage, value, "f"); }
|
|
48
61
|
constructor() {
|
|
49
|
-
this
|
|
62
|
+
_SingleConcurrentInteractionManager_interactionRequest_accessor_storage.set(this, (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _interactionRequest_initializers, { title: '', content: '' })));
|
|
50
63
|
this.resolveFunc = __runInitializers(this, _interactionRequest_extraInitializers);
|
|
51
64
|
(0, mobx_1.makeObservable)(this);
|
|
52
65
|
this.interactionRequest = null;
|
|
@@ -63,14 +76,15 @@ let SingleConcurrentInteractionManager = (() => {
|
|
|
63
76
|
this.resolveFunc = undefined;
|
|
64
77
|
}
|
|
65
78
|
},
|
|
79
|
+
_SingleConcurrentInteractionManager_interactionRequest_accessor_storage = new WeakMap(),
|
|
66
80
|
(() => {
|
|
67
81
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
68
82
|
_interactionRequest_decorators = [mobx_1.observable];
|
|
69
83
|
_requestInteraction_decorators = [mobx_1.action];
|
|
70
84
|
_respond_decorators = [mobx_1.action];
|
|
85
|
+
__esDecorate(_a, null, _interactionRequest_decorators, { kind: "accessor", name: "interactionRequest", static: false, private: false, access: { has: obj => "interactionRequest" in obj, get: obj => obj.interactionRequest, set: (obj, value) => { obj.interactionRequest = value; } }, metadata: _metadata }, _interactionRequest_initializers, _interactionRequest_extraInitializers);
|
|
71
86
|
__esDecorate(_a, null, _requestInteraction_decorators, { kind: "method", name: "requestInteraction", static: false, private: false, access: { has: obj => "requestInteraction" in obj, get: obj => obj.requestInteraction }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
72
87
|
__esDecorate(_a, null, _respond_decorators, { kind: "method", name: "respond", static: false, private: false, access: { has: obj => "respond" in obj, get: obj => obj.respond }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
73
|
-
__esDecorate(null, null, _interactionRequest_decorators, { kind: "field", name: "interactionRequest", static: false, private: false, access: { has: obj => "interactionRequest" in obj, get: obj => obj.interactionRequest, set: (obj, value) => { obj.interactionRequest = value; } }, metadata: _metadata }, _interactionRequest_initializers, _interactionRequest_extraInitializers);
|
|
74
88
|
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
75
89
|
})(),
|
|
76
90
|
_a;
|