@azrico/webobject 1.4.1 → 1.4.2
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.
|
@@ -9,12 +9,6 @@ export declare class WebObjectManager<T extends WebObject> extends ObjectManager
|
|
|
9
9
|
static readonly __web_type: string;
|
|
10
10
|
static readonly __save_message: boolean;
|
|
11
11
|
constructor();
|
|
12
|
-
/**
|
|
13
|
-
* use an option and detect its changes in real time. similar to recat state
|
|
14
|
-
* @param key name of the option
|
|
15
|
-
* @returns value of the option
|
|
16
|
-
*/
|
|
17
|
-
useOption(key: string): any;
|
|
18
12
|
/**
|
|
19
13
|
* Update meta value of this object , meta data is stored in meta_data variable
|
|
20
14
|
* @param key
|
|
@@ -78,33 +78,17 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager) {
|
|
|
78
78
|
return _this;
|
|
79
79
|
}
|
|
80
80
|
/* -------------------------------------------------------------------------- */
|
|
81
|
-
/*
|
|
81
|
+
/* Meta data */
|
|
82
82
|
/* -------------------------------------------------------------------------- */
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
85
|
-
* @param key
|
|
86
|
-
* @
|
|
84
|
+
* Update meta value of this object , meta data is stored in meta_data variable
|
|
85
|
+
* @param key
|
|
86
|
+
* @param value
|
|
87
|
+
* @param createIfNotExists should we create a new meta if key does not exist
|
|
88
|
+
* @param sendChange
|
|
89
|
+
* @returns
|
|
87
90
|
*/
|
|
88
91
|
_createClass(WebObjectManager, [{
|
|
89
|
-
key: "useOption",
|
|
90
|
-
value: function useOption(key) {
|
|
91
|
-
var _this2 = this;
|
|
92
|
-
return this.event_use("on_option_change", function () {
|
|
93
|
-
return Boolean(_this2.getOption(key));
|
|
94
|
-
}, [key], false);
|
|
95
|
-
}
|
|
96
|
-
/* -------------------------------------------------------------------------- */
|
|
97
|
-
/* Meta data */
|
|
98
|
-
/* -------------------------------------------------------------------------- */
|
|
99
|
-
/**
|
|
100
|
-
* Update meta value of this object , meta data is stored in meta_data variable
|
|
101
|
-
* @param key
|
|
102
|
-
* @param value
|
|
103
|
-
* @param createIfNotExists should we create a new meta if key does not exist
|
|
104
|
-
* @param sendChange
|
|
105
|
-
* @returns
|
|
106
|
-
*/
|
|
107
|
-
}, {
|
|
108
92
|
key: "setMetaValue",
|
|
109
93
|
value: function setMetaValue(key, value) {
|
|
110
94
|
var _this$obj;
|
|
@@ -70,6 +70,12 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
|
|
|
70
70
|
*/
|
|
71
71
|
toggleOption(key: string, value: any): Promise<void>;
|
|
72
72
|
setOption(key: string, value: any): Promise<any[] | undefined>;
|
|
73
|
+
/**
|
|
74
|
+
* use an option and detect its changes in real time. similar to recat state
|
|
75
|
+
* @param key name of the option
|
|
76
|
+
* @returns value of the option
|
|
77
|
+
*/
|
|
78
|
+
useOption(key: string): any;
|
|
73
79
|
/**
|
|
74
80
|
* Sets an option then does an action,
|
|
75
81
|
* after the action is run, updates the option again
|
|
@@ -459,6 +459,19 @@ var ObjectManager = /*#__PURE__*/function () {
|
|
|
459
459
|
}
|
|
460
460
|
return setOption;
|
|
461
461
|
}()
|
|
462
|
+
/**
|
|
463
|
+
* use an option and detect its changes in real time. similar to recat state
|
|
464
|
+
* @param key name of the option
|
|
465
|
+
* @returns value of the option
|
|
466
|
+
*/
|
|
467
|
+
}, {
|
|
468
|
+
key: "useOption",
|
|
469
|
+
value: function useOption(key) {
|
|
470
|
+
var _this = this;
|
|
471
|
+
return this.event_use("on_option_change", function () {
|
|
472
|
+
return Boolean(_this.getOption(key));
|
|
473
|
+
}, [key], true);
|
|
474
|
+
}
|
|
462
475
|
/**
|
|
463
476
|
* Sets an option then does an action,
|
|
464
477
|
* after the action is run, updates the option again
|