@agilemotion/oui-react-js 1.2.6 → 1.2.8
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/ApplicationContext.js +244 -250
- package/dist/BasicApp.js +53 -97
- package/dist/BasicAppHome.js +86 -122
- package/dist/DynamicJS.js +65 -88
- package/dist/RestUtils.js +284 -315
- package/dist/TypedValue.js +15 -18
- package/dist/Utils.js +224 -262
- package/dist/assets/jss/components/authNavbarStyle.js +162 -164
- package/dist/assets/jss/components/buttonStyle.js +1 -1
- package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
- package/dist/assets/jss/components/cardBodyStyle.js +1 -1
- package/dist/assets/jss/components/cardFooterStyle.js +1 -1
- package/dist/assets/jss/components/cardHeaderStyle.js +1 -1
- package/dist/assets/jss/components/cardIconStyle.js +1 -1
- package/dist/assets/jss/components/cardStyle.js +1 -1
- package/dist/assets/jss/components/cardTextStyle.js +1 -1
- package/dist/assets/jss/components/customDropdownStyle.js +192 -194
- package/dist/assets/jss/components/customInputStyle.js +1 -1
- package/dist/assets/jss/components/dropdownStyle.js +107 -109
- package/dist/assets/jss/components/footerStyle.js +1 -1
- package/dist/assets/jss/components/headerLinksStyle.js +95 -97
- package/dist/assets/jss/components/headerStyle.js +60 -62
- package/dist/assets/jss/components/navbarLinksStyle.js +137 -139
- package/dist/assets/jss/components/navbarStyle.js +71 -73
- package/dist/assets/jss/components/sidebarStyle.js +453 -455
- package/dist/assets/jss/components/typographyStyle.js +1 -1
- package/dist/assets/jss/rootStyle.js +57 -57
- package/dist/assets/jss/views/layoutStyle.js +42 -44
- package/dist/assets/jss/views/loginBasicStyle.js +1 -1
- package/dist/assets/jss/views/loginStyle.js +87 -89
- package/dist/components/AlertBar.js +21 -23
- package/dist/components/AlertItem.js +23 -25
- package/dist/components/AlertTemplate.js +29 -30
- package/dist/components/Button.js +35 -37
- package/dist/components/ConfirmationDialog.js +3 -3
- package/dist/components/DataGrid.js +250 -276
- package/dist/components/DataGridColumn.js +34 -36
- package/dist/components/DataGridFilter.js +92 -94
- package/dist/components/DataGridHeading.js +32 -38
- package/dist/components/DocumentViewer.js +12 -11
- package/dist/components/Graph.js +34 -50
- package/dist/components/GraphNode.js +53 -56
- package/dist/components/HtmlPanel.js +6 -8
- package/dist/components/Icon.js +28 -58
- package/dist/components/LoadingIndicator.js +2 -2
- package/dist/components/PopupView.js +15 -17
- package/dist/components/RegularButton.js +20 -20
- package/dist/components/TabPage.js +23 -25
- package/dist/components/TabPanel.js +34 -34
- package/dist/components/TableCellContent.js +34 -34
- package/dist/components/TitleBar.js +16 -16
- package/dist/components/Toolbar.js +112 -118
- package/dist/components/Tooltip.js +35 -43
- package/dist/components/Tree.js +54 -60
- package/dist/components/card/Card.js +17 -17
- package/dist/components/card/CardAvatar.js +10 -10
- package/dist/components/card/CardBody.js +14 -14
- package/dist/components/card/CardFooter.js +13 -13
- package/dist/components/card/CardHeader.js +14 -14
- package/dist/components/card/CardIcon.js +7 -7
- package/dist/components/card/CardText.js +7 -7
- package/dist/components/customInput/CustomInput.js +17 -17
- package/dist/components/dashboard/BasicApp.js +25 -25
- package/dist/components/dashboard/BasicBusinessApp.js +116 -119
- package/dist/components/dashboard/components/Header.js +11 -11
- package/dist/components/dashboard/components/LeftDrawer.js +3 -3
- package/dist/components/dashboard/components/UserIdentity.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +85 -127
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +151 -191
- package/dist/components/footer/Footer.js +8 -8
- package/dist/components/footer/HomeFooter.js +34 -66
- package/dist/components/form/BaseField.js +78 -78
- package/dist/components/form/Checkbox.js +8 -10
- package/dist/components/form/DatePicker.js +15 -19
- package/dist/components/form/FieldSet.js +62 -88
- package/dist/components/form/Form.js +317 -318
- package/dist/components/form/GridField.js +81 -86
- package/dist/components/form/LabelField.js +10 -12
- package/dist/components/form/LookupField.js +40 -42
- package/dist/components/form/Section.js +37 -39
- package/dist/components/form/SelectItem.js +35 -39
- package/dist/components/form/TextField.js +18 -22
- package/dist/components/form/TimePicker.js +15 -19
- package/dist/components/form/TransferList.js +83 -91
- package/dist/components/form/UploadField.js +135 -145
- package/dist/components/grid/GridContainer.js +6 -6
- package/dist/components/grid/GridItem.js +6 -6
- package/dist/components/layout/CollapsiblePanel.js +18 -20
- package/dist/components/layout/Layout.js +70 -72
- package/dist/components/layout/View.js +134 -136
- package/dist/components/layout/ViewPort.js +56 -98
- package/dist/components/menu/CollapsibleMenu.js +26 -28
- package/dist/components/menu/MenuBars.js +53 -59
- package/dist/components/menu/MenuButton.js +70 -77
- package/dist/components/menu/MenuItem.js +15 -17
- package/dist/components/menu/MenuLink.js +9 -11
- package/dist/components/menu/PopupMenu.js +12 -16
- package/dist/components/navbars/AuthNavbar.js +12 -12
- package/dist/components/navbars/HomeNavbar.js +175 -222
- package/dist/components/navbars/NavbarLinks.js +45 -46
- package/dist/components/typography/Danger.js +3 -3
- package/dist/components/typography/Info.js +3 -3
- package/dist/components/typography/Link.js +3 -3
- package/dist/event/ActionHandlers.js +43 -57
- package/dist/event/Event.js +13 -16
- package/dist/event/EventListener.js +36 -39
- package/dist/event/EventType.js +1 -5
- package/dist/event/LoadDataActionHandler.js +8 -20
- package/dist/event/Observable.js +162 -198
- package/dist/event/RouteActionHandler.js +76 -88
- package/dist/event/ScriptActionHandler.js +8 -20
- package/dist/event/ServiceCallActionHandler.js +28 -40
- package/dist/event/SignalGraphActionHandler.js +7 -19
- package/dist/js/Addresses.js +15 -27
- package/dist/js/DynamicLib.js +11 -14
- package/dist/js/Validators.js +5 -6
- package/dist/redux/store/ConfigureStore.js +6 -6
- package/dist/redux/store/DashboardStore.js +83 -95
- package/dist/redux/store/History.js +1 -1
- package/dist/redux/store/SecurityStore.js +41 -45
- package/dist/security/TokenManager.js +30 -44
- package/dist/theme-default.js +1 -1
- package/dist/view/Dashboard.js +108 -114
- package/dist/view/Settings.js +2 -4
- package/dist/view/security/ChangePasswordBasic.js +96 -100
- package/dist/view/security/ForgotPassword.js +52 -56
- package/dist/view/security/ForgotPasswordBasic.js +48 -54
- package/dist/view/security/Login.js +58 -62
- package/dist/view/security/LoginBasic.js +50 -54
- package/dist/view/security/ResetPassword.js +58 -62
- package/dist/view/security/ResetPasswordBasic.js +89 -93
- package/dist/view/security/Security.js +12 -12
- package/package.json +1 -1
package/dist/event/Observable.js
CHANGED
|
@@ -29,38 +29,25 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symb
|
|
|
29
29
|
|
|
30
30
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
31
|
|
|
32
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
33
|
-
|
|
34
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
35
|
-
|
|
36
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
37
|
-
|
|
38
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
32
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
39
33
|
|
|
40
34
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
35
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_classCallCheck(this, Observable);
|
|
47
|
-
|
|
48
|
-
_defineProperty(this, "addSubscription", function (subscription) {
|
|
49
|
-
return _this.subscriptions.push(subscription);
|
|
50
|
-
});
|
|
36
|
+
class Observable {
|
|
37
|
+
constructor() {
|
|
38
|
+
_defineProperty(this, "addSubscription", subscription => this.subscriptions.push(subscription));
|
|
51
39
|
|
|
52
|
-
_defineProperty(this, "addSubscriptions",
|
|
40
|
+
_defineProperty(this, "addSubscriptions", (eventHandlingConfig, componentHandle, viewId) => {
|
|
53
41
|
if (!_Utils.default.isNull(eventHandlingConfig)) {
|
|
54
|
-
|
|
42
|
+
let subscriptions = eventHandlingConfig.subscriptions;
|
|
55
43
|
|
|
56
44
|
var _iterator = _createForOfIteratorHelper(subscriptions),
|
|
57
45
|
_step;
|
|
58
46
|
|
|
59
47
|
try {
|
|
60
48
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_this.addSubscription(new _EventListener.default(componentHandle, viewId, !_Utils.default.isNull(subscription.publisher) ? subscription.publisher : componentHandle.api.id, subscription.eventType, subscription.actions));
|
|
49
|
+
const subscription = _step.value;
|
|
50
|
+
this.addSubscription(new _EventListener.default(componentHandle, viewId, !_Utils.default.isNull(subscription.publisher) ? subscription.publisher : componentHandle.api.id, subscription.eventType, subscription.actions));
|
|
64
51
|
}
|
|
65
52
|
} catch (err) {
|
|
66
53
|
_iterator.e(err);
|
|
@@ -70,9 +57,9 @@ var Observable = /*#__PURE__*/function () {
|
|
|
70
57
|
}
|
|
71
58
|
});
|
|
72
59
|
|
|
73
|
-
_defineProperty(this, "addSystemSubscriptions",
|
|
60
|
+
_defineProperty(this, "addSystemSubscriptions", config => {
|
|
74
61
|
if (!_Utils.default.isNull(config.disabled)) {
|
|
75
|
-
|
|
62
|
+
let matches = config.disabled.match(_DynamicJS.TEMPLATE_REGEX);
|
|
76
63
|
|
|
77
64
|
if (!_Utils.default.isNull(matches)) {
|
|
78
65
|
var _iterator2 = _createForOfIteratorHelper(matches),
|
|
@@ -80,10 +67,9 @@ var Observable = /*#__PURE__*/function () {
|
|
|
80
67
|
|
|
81
68
|
try {
|
|
82
69
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
_this.addSystemGeneratedSubscription(component, config.id);
|
|
70
|
+
const match = _step2.value;
|
|
71
|
+
let component = match.replace("@#{", "").replace("}", "");
|
|
72
|
+
this.addSystemGeneratedSubscription(component, config.id);
|
|
87
73
|
}
|
|
88
74
|
} catch (err) {
|
|
89
75
|
_iterator2.e(err);
|
|
@@ -94,19 +80,17 @@ var Observable = /*#__PURE__*/function () {
|
|
|
94
80
|
}
|
|
95
81
|
|
|
96
82
|
if (!_Utils.default.isNull(config.visible)) {
|
|
97
|
-
|
|
83
|
+
let matches = config.visible.match(_DynamicJS.TEMPLATE_REGEX);
|
|
98
84
|
|
|
99
|
-
if (!_Utils.default.isNull(
|
|
100
|
-
var _iterator3 = _createForOfIteratorHelper(
|
|
85
|
+
if (!_Utils.default.isNull(matches)) {
|
|
86
|
+
var _iterator3 = _createForOfIteratorHelper(matches),
|
|
101
87
|
_step3;
|
|
102
88
|
|
|
103
89
|
try {
|
|
104
90
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
_this.addSystemGeneratedSubscription(_component, config.id);
|
|
91
|
+
const match = _step3.value;
|
|
92
|
+
let component = match.replace("@#{", "").replace("}", "");
|
|
93
|
+
this.addSystemGeneratedSubscription(component, config.id);
|
|
110
94
|
}
|
|
111
95
|
} catch (err) {
|
|
112
96
|
_iterator3.e(err);
|
|
@@ -117,19 +101,17 @@ var Observable = /*#__PURE__*/function () {
|
|
|
117
101
|
}
|
|
118
102
|
|
|
119
103
|
if (!_Utils.default.isNull(config.validator) && !_Utils.default.isNull(config.validator.nullable)) {
|
|
120
|
-
|
|
104
|
+
let matches = config.validator.nullable.match(_DynamicJS.TEMPLATE_REGEX);
|
|
121
105
|
|
|
122
|
-
if (!_Utils.default.isNull(
|
|
123
|
-
var _iterator4 = _createForOfIteratorHelper(
|
|
106
|
+
if (!_Utils.default.isNull(matches)) {
|
|
107
|
+
var _iterator4 = _createForOfIteratorHelper(matches),
|
|
124
108
|
_step4;
|
|
125
109
|
|
|
126
110
|
try {
|
|
127
111
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
_this.addSystemGeneratedSubscription(_component2, config.id);
|
|
112
|
+
const match = _step4.value;
|
|
113
|
+
let component = match.replace("@#{", "").replace("}", "");
|
|
114
|
+
this.addSystemGeneratedSubscription(component, config.id);
|
|
133
115
|
}
|
|
134
116
|
} catch (err) {
|
|
135
117
|
_iterator4.e(err);
|
|
@@ -140,25 +122,25 @@ var Observable = /*#__PURE__*/function () {
|
|
|
140
122
|
}
|
|
141
123
|
});
|
|
142
124
|
|
|
143
|
-
_defineProperty(this, "processSystemGeneratedSubscriptions",
|
|
144
|
-
|
|
125
|
+
_defineProperty(this, "processSystemGeneratedSubscriptions", componentId => {
|
|
126
|
+
let component = _ApplicationContext.default.resolveComponentApi(componentId);
|
|
145
127
|
|
|
146
128
|
if (!_Utils.default.isNull(component)) {
|
|
147
|
-
var _iterator5 = _createForOfIteratorHelper(
|
|
129
|
+
var _iterator5 = _createForOfIteratorHelper(this.systemGeneratedSubscriptions),
|
|
148
130
|
_step5;
|
|
149
131
|
|
|
150
132
|
try {
|
|
151
133
|
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
152
|
-
|
|
134
|
+
const subscription = _step5.value;
|
|
153
135
|
|
|
154
136
|
if (subscription.publisher === componentId) {
|
|
155
|
-
|
|
137
|
+
let component = _ApplicationContext.default.resolveComponentApi(subscription.subscriber);
|
|
156
138
|
|
|
157
|
-
if (!_Utils.default.isNull(
|
|
139
|
+
if (!_Utils.default.isNull(component)) {
|
|
158
140
|
if (!_Utils.default.isNull(subscription.callback)) {
|
|
159
141
|
subscription.callback();
|
|
160
|
-
} else if (!_Utils.default.isNull(
|
|
161
|
-
|
|
142
|
+
} else if (!_Utils.default.isNull(component.refresh)) {
|
|
143
|
+
component.refresh();
|
|
162
144
|
}
|
|
163
145
|
}
|
|
164
146
|
}
|
|
@@ -171,17 +153,17 @@ var Observable = /*#__PURE__*/function () {
|
|
|
171
153
|
}
|
|
172
154
|
});
|
|
173
155
|
|
|
174
|
-
_defineProperty(this, "addSystemGeneratedSubscription",
|
|
175
|
-
|
|
156
|
+
_defineProperty(this, "addSystemGeneratedSubscription", (publisher, subscriber, callback) => {
|
|
157
|
+
let found = false;
|
|
176
158
|
|
|
177
|
-
|
|
159
|
+
let currentViewid = _ApplicationContext.default.getCurrentView().config.id;
|
|
178
160
|
|
|
179
|
-
var _iterator6 = _createForOfIteratorHelper(
|
|
161
|
+
var _iterator6 = _createForOfIteratorHelper(this.systemGeneratedSubscriptions),
|
|
180
162
|
_step6;
|
|
181
163
|
|
|
182
164
|
try {
|
|
183
165
|
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
184
|
-
|
|
166
|
+
const systemGeneratedSubscription = _step6.value;
|
|
185
167
|
|
|
186
168
|
if (publisher === systemGeneratedSubscription.publisher && subscriber === systemGeneratedSubscription.subscriber && currentViewid === systemGeneratedSubscription.viewId) {
|
|
187
169
|
found = true;
|
|
@@ -194,13 +176,12 @@ var Observable = /*#__PURE__*/function () {
|
|
|
194
176
|
}
|
|
195
177
|
|
|
196
178
|
if (!found) {
|
|
197
|
-
|
|
179
|
+
let subscription = {};
|
|
198
180
|
subscription.publisher = publisher;
|
|
199
181
|
subscription.subscriber = subscriber;
|
|
200
182
|
subscription.callback = callback;
|
|
201
183
|
subscription.viewId = currentViewid;
|
|
202
|
-
|
|
203
|
-
_this.systemGeneratedSubscriptions.push(subscription);
|
|
184
|
+
this.systemGeneratedSubscriptions.push(subscription);
|
|
204
185
|
}
|
|
205
186
|
});
|
|
206
187
|
|
|
@@ -219,171 +200,154 @@ var Observable = /*#__PURE__*/function () {
|
|
|
219
200
|
*/
|
|
220
201
|
|
|
221
202
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
var
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
_ActionHandlers.default.invoke(action, be, subscription);
|
|
266
|
-
}
|
|
267
|
-
} else if (!_Utils.default.isNull(subscription.getCallback())) {
|
|
268
|
-
subscription.getCallback()(be);
|
|
269
|
-
}
|
|
203
|
+
/**
|
|
204
|
+
* Fires an event.
|
|
205
|
+
*
|
|
206
|
+
* @param eventType eventType the event type
|
|
207
|
+
* @param be the base event
|
|
208
|
+
* @return false if any subscriptions cancel the event.
|
|
209
|
+
*/
|
|
210
|
+
fireEvent(eventType, be) {
|
|
211
|
+
var _this = this;
|
|
212
|
+
|
|
213
|
+
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
214
|
+
var sourceId, viewId, _iterator7, _step7, subscription, j, action;
|
|
215
|
+
|
|
216
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
217
|
+
while (1) switch (_context.prev = _context.next) {
|
|
218
|
+
case 0:
|
|
219
|
+
// Components could be unloading on the cases where screens are busy closing,
|
|
220
|
+
// meaning the "current" object may be nullified, so we need the null check
|
|
221
|
+
// This happens on async events such as RPC_CALL. If there is no view masking,
|
|
222
|
+
// the REST call may return while the component has been destroyed, and the source's current could be null
|
|
223
|
+
// Proper masking when doing REST CALL should prevent this from happening. The null check provides the sort of defence
|
|
224
|
+
if (!_Utils.default.isNull(be.getSource())) {
|
|
225
|
+
sourceId = be.getSource().api.id;
|
|
226
|
+
viewId = be.viewId;
|
|
227
|
+
|
|
228
|
+
if (!_Utils.default.isNull(sourceId)) {
|
|
229
|
+
_iterator7 = _createForOfIteratorHelper(_this.subscriptions);
|
|
230
|
+
|
|
231
|
+
try {
|
|
232
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
233
|
+
subscription = _step7.value;
|
|
234
|
+
|
|
235
|
+
/*if (sourceId === 'jobTitlesMenuIem') {
|
|
236
|
+
console.log("CHECKING VIEW [" + subscription.getViewId() + " - " + viewId + "], PUB : ["
|
|
237
|
+
+ subscription.getPublisher() + " - " + sourceId + "], EVENT: [" + subscription.getEventType() + " - " + eventType + "]");
|
|
238
|
+
}*/
|
|
239
|
+
if ((subscription.getViewId() === viewId || _ApplicationContext.SYSTEM_EVENT === viewId) && subscription.getPublisher() === sourceId && subscription.getEventType() === eventType) {
|
|
240
|
+
if (!_Utils.default.isNull(subscription.getActions())) {
|
|
241
|
+
for (j = 0; j < subscription.getActions().length; j++) {
|
|
242
|
+
action = subscription.getActions()[j];
|
|
243
|
+
|
|
244
|
+
_ActionHandlers.default.invoke(action, be, subscription);
|
|
270
245
|
}
|
|
246
|
+
} else if (!_Utils.default.isNull(subscription.getCallback())) {
|
|
247
|
+
subscription.getCallback()(be);
|
|
271
248
|
}
|
|
272
|
-
} catch (err) {
|
|
273
|
-
_iterator7.e(err);
|
|
274
|
-
} finally {
|
|
275
|
-
_iterator7.f();
|
|
276
249
|
}
|
|
277
|
-
|
|
278
|
-
this.processSystemGeneratedSubscriptions(sourceId);
|
|
279
250
|
}
|
|
251
|
+
} catch (err) {
|
|
252
|
+
_iterator7.e(err);
|
|
253
|
+
} finally {
|
|
254
|
+
_iterator7.f();
|
|
280
255
|
}
|
|
281
256
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
return _context.stop();
|
|
257
|
+
_this.processSystemGeneratedSubscriptions(sourceId);
|
|
258
|
+
}
|
|
285
259
|
}
|
|
286
|
-
}
|
|
287
|
-
}, _callee, this);
|
|
288
|
-
}));
|
|
289
|
-
|
|
290
|
-
function fireEvent(_x, _x2) {
|
|
291
|
-
return _fireEvent.apply(this, arguments);
|
|
292
|
-
}
|
|
293
260
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
261
|
+
case 1:
|
|
262
|
+
case "end":
|
|
263
|
+
return _context.stop();
|
|
264
|
+
}
|
|
265
|
+
}, _callee);
|
|
266
|
+
}))();
|
|
267
|
+
}
|
|
300
268
|
|
|
301
|
-
|
|
302
|
-
|
|
269
|
+
getNextIndexToRemove(val, prop, listenerCollection) {
|
|
270
|
+
let counter = 0;
|
|
303
271
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
var listener = _step8.value;
|
|
272
|
+
var _iterator8 = _createForOfIteratorHelper(listenerCollection),
|
|
273
|
+
_step8;
|
|
307
274
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
275
|
+
try {
|
|
276
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
277
|
+
const listener = _step8.value;
|
|
311
278
|
|
|
312
|
-
|
|
279
|
+
if (listener[prop] === val) {
|
|
280
|
+
return counter;
|
|
313
281
|
}
|
|
314
|
-
} catch (err) {
|
|
315
|
-
_iterator8.e(err);
|
|
316
|
-
} finally {
|
|
317
|
-
_iterator8.f();
|
|
318
|
-
}
|
|
319
282
|
|
|
320
|
-
|
|
283
|
+
counter++;
|
|
284
|
+
}
|
|
285
|
+
} catch (err) {
|
|
286
|
+
_iterator8.e(err);
|
|
287
|
+
} finally {
|
|
288
|
+
_iterator8.f();
|
|
321
289
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
290
|
+
|
|
291
|
+
return -1;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Clears all event subscriptions
|
|
295
|
+
*
|
|
296
|
+
*/
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
clearAllEventListeners() {
|
|
300
|
+
this.subscriptions.splice(0, this.subscriptions.length);
|
|
301
|
+
this.systemGeneratedSubscriptions.splice(0, this.systemGeneratedSubscriptions.length);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Clears all event subscriptions for the specified view
|
|
306
|
+
*
|
|
307
|
+
* @param viewId the view
|
|
308
|
+
*/
|
|
309
|
+
clearEventListeners(viewId) {
|
|
310
|
+
let indexes = [];
|
|
311
|
+
let index = -2;
|
|
312
|
+
|
|
313
|
+
while ((index = this.getNextIndexToRemove(viewId, 'viewId', this.subscriptions)) !== -1) {
|
|
314
|
+
this.subscriptions.splice(index, 1);
|
|
332
315
|
}
|
|
333
|
-
}, {
|
|
334
|
-
key: "clearEventListeners",
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Clears all event subscriptions for the specified view
|
|
338
|
-
*
|
|
339
|
-
* @param viewId the view
|
|
340
|
-
*/
|
|
341
|
-
value: function clearEventListeners(viewId) {
|
|
342
|
-
var indexes = [];
|
|
343
|
-
var index = -2;
|
|
344
|
-
|
|
345
|
-
while ((index = this.getNextIndexToRemove(viewId, 'viewId', this.subscriptions)) !== -1) {
|
|
346
|
-
this.subscriptions.splice(index, 1);
|
|
347
|
-
}
|
|
348
316
|
|
|
349
|
-
|
|
350
|
-
|
|
317
|
+
if (!_Utils.default.isNull(this.systemGeneratedSubscriptions)) {
|
|
318
|
+
index = -2;
|
|
351
319
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
320
|
+
while ((index = this.getNextIndexToRemove(viewId, 'viewId', this.systemGeneratedSubscriptions)) !== -1) {
|
|
321
|
+
this.systemGeneratedSubscriptions.splice(index, 1);
|
|
355
322
|
}
|
|
356
323
|
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
var index = -2;
|
|
368
|
-
|
|
369
|
-
while ((index = this.getNextIndexToRemove(componentId, 'subscriber', this.subscriptions)) !== -1) {
|
|
370
|
-
this.subscriptions.splice(index, 1);
|
|
371
|
-
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Clears all event subscriptions for the specified view
|
|
328
|
+
*
|
|
329
|
+
* @param componentId the view
|
|
330
|
+
*/
|
|
331
|
+
clearComponentEventListeners(componentId) {
|
|
332
|
+
let indexes = [];
|
|
333
|
+
let index = -2;
|
|
372
334
|
|
|
373
|
-
|
|
374
|
-
|
|
335
|
+
while ((index = this.getNextIndexToRemove(componentId, 'subscriber', this.subscriptions)) !== -1) {
|
|
336
|
+
this.subscriptions.splice(index, 1);
|
|
337
|
+
}
|
|
375
338
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
339
|
+
if (!_Utils.default.isNull(this.systemGeneratedSubscriptions)) {
|
|
340
|
+
index = -2;
|
|
341
|
+
|
|
342
|
+
while ((index = this.getNextIndexToRemove(componentId, 'subscriber', this.systemGeneratedSubscriptions)) !== -1) {
|
|
343
|
+
this.systemGeneratedSubscriptions.splice(index, 1);
|
|
379
344
|
}
|
|
380
345
|
}
|
|
381
|
-
}
|
|
346
|
+
}
|
|
382
347
|
|
|
383
|
-
|
|
384
|
-
}();
|
|
348
|
+
}
|
|
385
349
|
|
|
386
|
-
|
|
350
|
+
const instance = new Observable();
|
|
387
351
|
Object.freeze(instance);
|
|
388
352
|
var _default = instance;
|
|
389
353
|
exports.default = _default;
|