@expressive/mvc 0.9.4 → 0.9.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/lib/index.d.ts +33 -33
- package/lib/index.esm.js +39 -39
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +39 -39
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -8,6 +8,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
10
|
|
|
11
|
+
const { assign, create, defineProperties, defineProperty, entries, getPrototypeOf, getOwnPropertyNames, getOwnPropertyDescriptor, getOwnPropertySymbols, values } = Object;
|
|
12
|
+
|
|
11
13
|
class Issue extends Error {
|
|
12
14
|
constructor() {
|
|
13
15
|
super(...arguments);
|
|
@@ -25,8 +27,6 @@ function issues(register) {
|
|
|
25
27
|
return Library;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
const { assign, create, defineProperties, defineProperty, entries, getPrototypeOf, getOwnPropertyNames, getOwnPropertyDescriptor, getOwnPropertySymbols, values } = Object;
|
|
29
|
-
|
|
30
30
|
const Oops$e = issues({
|
|
31
31
|
NotReady: (model, key) => `Value ${model}.${key} value is not yet available.`,
|
|
32
32
|
});
|
|
@@ -1372,43 +1372,6 @@ class MVC extends Model {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
}
|
|
1374
1374
|
|
|
1375
|
-
const LOCAL = "$debug local";
|
|
1376
|
-
const STATE = "$debug state";
|
|
1377
|
-
const UPDATE = "$debug update";
|
|
1378
|
-
const CONTROL = "$debug controller";
|
|
1379
|
-
defineProperties(Model.prototype, {
|
|
1380
|
-
[CONTROL]: {
|
|
1381
|
-
get() {
|
|
1382
|
-
return Control.get(this);
|
|
1383
|
-
}
|
|
1384
|
-
},
|
|
1385
|
-
[LOCAL]: {
|
|
1386
|
-
get() {
|
|
1387
|
-
return Subscriber.get(this);
|
|
1388
|
-
}
|
|
1389
|
-
},
|
|
1390
|
-
[STATE]: {
|
|
1391
|
-
get() {
|
|
1392
|
-
const { state } = Control.get(this);
|
|
1393
|
-
const output = {};
|
|
1394
|
-
state.forEach((value, key) => output[key] = value);
|
|
1395
|
-
return output;
|
|
1396
|
-
}
|
|
1397
|
-
},
|
|
1398
|
-
[UPDATE]: {
|
|
1399
|
-
get() {
|
|
1400
|
-
const source = Subscriber.get(this) || Control.get(this);
|
|
1401
|
-
return source && source.latest;
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
});
|
|
1405
|
-
const Debug = {
|
|
1406
|
-
CONTROL,
|
|
1407
|
-
LOCAL,
|
|
1408
|
-
STATE,
|
|
1409
|
-
UPDATE
|
|
1410
|
-
};
|
|
1411
|
-
|
|
1412
1375
|
const Oops$2 = issues({
|
|
1413
1376
|
BadProps: () => `Provider expects either a render function, 'get' or 'has' props.`
|
|
1414
1377
|
});
|
|
@@ -1538,6 +1501,43 @@ class Global extends MVC {
|
|
|
1538
1501
|
}
|
|
1539
1502
|
Global.keepAlive = true;
|
|
1540
1503
|
|
|
1504
|
+
const LOCAL = "$debug local";
|
|
1505
|
+
const STATE = "$debug state";
|
|
1506
|
+
const UPDATE = "$debug update";
|
|
1507
|
+
const CONTROL = "$debug controller";
|
|
1508
|
+
defineProperties(Model.prototype, {
|
|
1509
|
+
[CONTROL]: {
|
|
1510
|
+
get() {
|
|
1511
|
+
return Control.get(this);
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
[LOCAL]: {
|
|
1515
|
+
get() {
|
|
1516
|
+
return Subscriber.get(this);
|
|
1517
|
+
}
|
|
1518
|
+
},
|
|
1519
|
+
[STATE]: {
|
|
1520
|
+
get() {
|
|
1521
|
+
const { state } = Control.get(this);
|
|
1522
|
+
const output = {};
|
|
1523
|
+
state.forEach((value, key) => output[key] = value);
|
|
1524
|
+
return output;
|
|
1525
|
+
}
|
|
1526
|
+
},
|
|
1527
|
+
[UPDATE]: {
|
|
1528
|
+
get() {
|
|
1529
|
+
const source = Subscriber.get(this) || Control.get(this);
|
|
1530
|
+
return source && source.latest;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
});
|
|
1534
|
+
const Debug = {
|
|
1535
|
+
CONTROL,
|
|
1536
|
+
LOCAL,
|
|
1537
|
+
STATE,
|
|
1538
|
+
UPDATE
|
|
1539
|
+
};
|
|
1540
|
+
|
|
1541
1541
|
exports.Consumer = Consumer;
|
|
1542
1542
|
exports.Debug = Debug;
|
|
1543
1543
|
exports.Global = Global;
|