@ardimedia/angular-portal-azure 0.2.273 → 0.2.275

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.
@@ -0,0 +1,330 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return function (d, b) {
7
+ extendStatics(d, b);
8
+ function __() { this.constructor = d; }
9
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
+ };
11
+ })();
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ var exception_1 = require("./exception");
14
+ var usercontrolbase_1 = require("./usercontrolbase");
15
+ var Blade = (function (_super) {
16
+ __extends(Blade, _super);
17
+ // #region Constructor
18
+ function Blade($scope, portalService, path, title, subtitle, width) {
19
+ if (subtitle === void 0) { subtitle = ''; }
20
+ if (width === void 0) { width = 200; }
21
+ var _this = _super.call(this, $scope, portalService) || this;
22
+ // #endregion
23
+ // #region Properties
24
+ /** HACK: 2016-11-06/hp
25
+ [angular-portal-blade] needs [this] as the controller.
26
+ We don't know how to provide [this] to the directive.
27
+ So we came up with this [vm] property.*/
28
+ _this.vm = {};
29
+ _this.visibility = 'collapse';
30
+ _this.title = '';
31
+ _this.subTitle = '';
32
+ _this.width = { 'width': '0' };
33
+ _this.widthStackLayout = { 'width': '50px' };
34
+ _this.isInnerHtml = true;
35
+ _this.statusBar = '';
36
+ _this.statusBarClass = '';
37
+ // #endregion
38
+ // #endregion
39
+ // #region Commands
40
+ _this.isCommandBrowse = false;
41
+ _this.commandBrowse = function () { _this.onCommandBrowse(); };
42
+ _this.commandBrowseText = '';
43
+ _this.isCommandCancel = false;
44
+ _this.commandCancel = function () { _this.onCommandCancel(); };
45
+ _this.commandCancelText = '';
46
+ _this.isCommandCopy = false;
47
+ _this.commandCopy = function () { _this.onCommandCopy(); };
48
+ _this.commandCopyText = '';
49
+ _this.isCommandDelete = false;
50
+ _this.commandDelete = function () { _this.onCommandDelete(); };
51
+ _this.commandDeleteText = '';
52
+ _this.isCommandDocument = false;
53
+ _this.commandDocument = function () { _this.onCommandDocument(); };
54
+ _this.commandDocumentText = '';
55
+ _this.isCommandDocument2 = false;
56
+ _this.commandDocument2 = function () { _this.onCommandDocument2(); };
57
+ _this.commandDocument2Text = '';
58
+ _this.isCommandDocument3 = false;
59
+ _this.commandDocument3 = function () { _this.onCommandDocument3(); };
60
+ _this.commandDocument3Text = '';
61
+ _this.isCommandDocument4 = false;
62
+ _this.commandDocument4 = function () { _this.onCommandDocument4(); };
63
+ _this.commandDocument4Text = '';
64
+ _this.isCommandDocument5 = false;
65
+ _this.commandDocument5 = function () { _this.onCommandDocument5(); };
66
+ _this.commandDocument5Text = '';
67
+ _this.isCommandNew = false;
68
+ _this.commandNew = function () { _this.onCommandNew(); };
69
+ _this.commandNewText = '';
70
+ _this.isCommandOrder = false;
71
+ _this.commandOrder = function () { _this.onCommandOrder(); };
72
+ _this.commandOrderText = '';
73
+ _this.isCommandRestart = false;
74
+ _this.commandRestart = function () { _this.onCommandRestart(); };
75
+ _this.commandRestartText = '';
76
+ _this.isCommandSave = false;
77
+ _this.commandSave = function () { _this.onCommandSaveBefore(); };
78
+ _this.commandSaveText = '';
79
+ _this.isCommandSearch = false;
80
+ _this.commandSearch = function () { _this.onCommandSearch(); };
81
+ _this.commandSearchText = '';
82
+ _this.isCommandStart = false;
83
+ _this.commandStart = function () { _this.onCommandStart(); };
84
+ _this.commandStartText = '';
85
+ _this.isCommandStop = false;
86
+ _this.commandStop = function () { _this.onCommandStop(); };
87
+ _this.commandStopText = '';
88
+ _this.isCommandSwap = false;
89
+ _this.commandSwap = function () { _this.onCommandSwap(); };
90
+ _this.commandSwapText = '';
91
+ _this.isCommandExcel = false;
92
+ _this.commandExcel = function () { _this.onCommandExcel(); };
93
+ _this.commandExcelText = '';
94
+ _this.vm = _this;
95
+ _this.path = path;
96
+ _this.title = title;
97
+ _this.subTitle = subtitle;
98
+ _this.width.width = width + 'px';
99
+ _this.widthStackLayout.width = width - 50 + 'px'; // 50 = padding (left and right)
100
+ if (!portalService) {
101
+ throw new Error('[angularportalazure.Blade] constructor parameter \'portalService\' must be provided.');
102
+ }
103
+ if (!path) {
104
+ throw new Error('[angularportalazure.Blade] constructor parameter \'path\' must be a string.');
105
+ }
106
+ if (!title && title !== '') {
107
+ throw new Error('[angularportalazure.Blade] constructor parameter \'title\' must be a string when provided.');
108
+ }
109
+ if (!subtitle && subtitle !== '') {
110
+ throw new Error('[angularportalazure.Blade] constructor parameter \'subtitle\' must be a string when provided.');
111
+ }
112
+ if (!width && width !== 0) {
113
+ throw new Error('[angularportalazure.Blade] constructor parameter \'width\' must be a number when provided.');
114
+ }
115
+ if (width < 50) {
116
+ throw new Error('[angularportalazure.Blade] constructor parameter \'width\' must be at least 50.');
117
+ }
118
+ // Set 'this.portalService.areaBlades.blades[index]' to 'this'
119
+ // 'this.portalService.areaBlades.blades[index]' was generated during AddBlade
120
+ _this.portalService.areaBlades.blades.forEach(function (blade, index) {
121
+ if (blade.path === _this.path) {
122
+ _this.portalService.areaBlades.blades[index] = _this;
123
+ }
124
+ });
125
+ _this.setupWindowResizeListener(function () { _this.setBladeHeights(); });
126
+ _this.setBladeHeights();
127
+ return _this;
128
+ }
129
+ Object.defineProperty(Blade.prototype, "path", {
130
+ get: function () {
131
+ return this._path;
132
+ },
133
+ // For the moment we do not distinguish between lower and upper case path name
134
+ set: function (newPath) {
135
+ if (newPath == null) {
136
+ return;
137
+ }
138
+ this._path = newPath.toLowerCase();
139
+ },
140
+ enumerable: true,
141
+ configurable: true
142
+ });
143
+ // #endregion
144
+ // #region Methods
145
+ Blade.prototype.activate = function () {
146
+ this.onActivate();
147
+ this.onActivated();
148
+ };
149
+ /** Override */
150
+ Blade.prototype.onActivate = function () {
151
+ };
152
+ /** Override */
153
+ Blade.prototype.onActivated = function () {
154
+ };
155
+ Blade.prototype.navigateTo = function (path) {
156
+ this.onNavigateTo(path);
157
+ };
158
+ /** Must be overridden. */
159
+ Blade.prototype.onNavigateTo = function (value) {
160
+ throw new Error('[angularportalazure.Blade] \'onNavigateTo\' is an abstract function. Define one in the derived class.');
161
+ };
162
+ // At the moment we do not distinguish between lower and upper case path name
163
+ Blade.prototype.comparePaths = function (path1, path2) {
164
+ if (path1 == null) {
165
+ return false;
166
+ }
167
+ if (path2 == null) {
168
+ return false;
169
+ }
170
+ if (path1.toLowerCase() === path2.toLowerCase()) {
171
+ return true;
172
+ }
173
+ else {
174
+ return false;
175
+ }
176
+ };
177
+ /** close blade. */
178
+ Blade.prototype.close = function () {
179
+ if (!this.onClose) {
180
+ return; // do not close blade
181
+ }
182
+ if (this.portalService.areaBlades !== undefined) {
183
+ this.portalService.areaBlades.clearPath(this.path);
184
+ }
185
+ else {
186
+ throw new Error('[angularportalazure.Blade] path: \'' + this.path + '\' could not be removed, since no \'this.portalService.areaBlades\' available.');
187
+ }
188
+ };
189
+ /** Override */
190
+ Blade.prototype.onClose = function () {
191
+ return true;
192
+ };
193
+ // #region Set StatusBar
194
+ Blade.prototype.clearStatusBar = function () {
195
+ this.statusBar = '';
196
+ this.statusBarClass = '';
197
+ };
198
+ Blade.prototype.setStatusBar = function (text, style) {
199
+ this.statusBar = text ? text : '';
200
+ this.statusBarClass = style ? style : '';
201
+ };
202
+ Blade.prototype.setStatusBarCopyData = function () {
203
+ this.statusBar = 'Daten kopieren...';
204
+ this.statusBarClass = 'apa-statusbar-info';
205
+ };
206
+ Blade.prototype.setStatusBarLoadData = function () {
207
+ this.statusBar = 'Daten laden...';
208
+ this.statusBarClass = 'apa-statusbar-info';
209
+ };
210
+ Blade.prototype.setStatusBarSaveData = function () {
211
+ this.statusBar = 'Daten speichern...';
212
+ this.statusBarClass = 'apa-statusbar-info';
213
+ };
214
+ Blade.prototype.setStatusBarDeleteData = function () {
215
+ this.statusBar = 'Daten löschen...';
216
+ this.statusBarClass = 'apa-statusbar-info';
217
+ };
218
+ Blade.prototype.setStatusBarDeleteDataCanceled = function () {
219
+ this.statusBar = 'Löschen abgebrochen.';
220
+ this.statusBarClass = 'apa-statusbar-info';
221
+ };
222
+ Blade.prototype.setStatusBarInfo = function (text) {
223
+ this.statusBar = text;
224
+ this.statusBarClass = 'apa-statusbar-info';
225
+ };
226
+ Blade.prototype.setStatusBarError = function (text) {
227
+ this.statusBar = text;
228
+ this.statusBarClass = 'apa-statusbar-error';
229
+ };
230
+ Blade.prototype.setStatusBarNoDataFound = function () {
231
+ this.statusBar = 'Keine Daten gefunden!';
232
+ this.statusBarClass = 'apa-statusbar-error';
233
+ };
234
+ Blade.prototype.setStatusBarException = function (exception) {
235
+ this.statusBar = exception_1.Exception.getOneLineMessage(exception);
236
+ this.statusBarClass = 'apa-statusbar-error';
237
+ };
238
+ // #endregion
239
+ // #region Commands
240
+ Blade.prototype.onCommandBrowse = function () {
241
+ throw new Error('[angularportalazure.Blade] \'onCommandBrowse\' is an abstract function. Define one in the derived class.');
242
+ };
243
+ Blade.prototype.onCommandCancel = function () {
244
+ throw new Error('[angularportalazure.Blade] \'onCommandCancel\' is an abstract function. Define one in the derived class.');
245
+ };
246
+ Blade.prototype.onCommandCopy = function () {
247
+ throw new Error('[angularportalazure.Blade] \'onCommandCopy\' is an abstract function. Define one in the derived class.');
248
+ };
249
+ Blade.prototype.onCommandDelete = function () {
250
+ throw new Error('[angularportalazure.Blade] \'onCommandDelete\' is an abstract function. Define one in the derived class.');
251
+ };
252
+ Blade.prototype.onCommandDocument = function () {
253
+ throw new Error('[angularportalazure.Blade] \'onCommandDocument\' is an abstract function. Define one in the derived class.');
254
+ };
255
+ Blade.prototype.onCommandDocument2 = function () {
256
+ throw new Error('[angularportalazure.Blade] \'onCommandDocument2\' is an abstract function. Define one in the derived class.');
257
+ };
258
+ Blade.prototype.onCommandDocument3 = function () {
259
+ throw new Error('[angularportalazure.Blade] \'onCommandDocument3\' is an abstract function. Define one in the derived class.');
260
+ };
261
+ Blade.prototype.onCommandDocument4 = function () {
262
+ throw new Error('[angularportalazure.Blade] \'onCommandDocument4\' is an abstract function. Define one in the derived class.');
263
+ };
264
+ Blade.prototype.onCommandDocument5 = function () {
265
+ throw new Error('[angularportalazure.Blade] \'onCommandDocument5\' is an abstract function. Define one in the derived class.');
266
+ };
267
+ Blade.prototype.onCommandNew = function () {
268
+ throw new Error('[angularportalazure.Blade] \'onCommandNew\' is an abstract function. Define one in the derived class.');
269
+ };
270
+ Blade.prototype.onCommandOrder = function () {
271
+ throw new Error('[angularportalazure.Blade] \'onCommandOrder\' is an abstract function. Define one in the derived class.');
272
+ };
273
+ Blade.prototype.onCommandRestart = function () {
274
+ throw new Error('[angularportalazure.Blade] \'onCommandRestart\' is an abstract function. Define one in the derived class.');
275
+ };
276
+ Blade.prototype.onCommandSaveBefore = function () {
277
+ var _this = this;
278
+ if (this.isCommandSave) {
279
+ this.isCommandSave = false;
280
+ this.onCommandSave().then(function () {
281
+ _this.isCommandSave = true;
282
+ }).catch(function () {
283
+ _this.isCommandSave = true;
284
+ });
285
+ }
286
+ };
287
+ Blade.prototype.onCommandSave = function () {
288
+ throw new Error('[angularportalazure.Blade] \'onCommandSave\' is an abstract function. Define one in the derived class.');
289
+ };
290
+ Blade.prototype.onCommandSearch = function () {
291
+ throw new Error('[angularportalazure.Blade] \'onCommandSearch\' is an abstract function. Define one in the derived class.');
292
+ };
293
+ Blade.prototype.onCommandStart = function () {
294
+ throw new Error('[angularportalazure.Blade] \'onCommandStart\' is an abstract function. Define one in the derived class.');
295
+ };
296
+ Blade.prototype.onCommandStop = function () {
297
+ throw new Error('[angularportalazure.Blade] \'onCommandStop\' is an abstract function. Define one in the derived class.');
298
+ };
299
+ Blade.prototype.onCommandSwap = function () {
300
+ throw new Error('[angularportalazure.Blade] \'onCommandSwap\' is an abstract function. Define one in the derived class.');
301
+ };
302
+ Blade.prototype.onCommandExcel = function () {
303
+ throw new Error('[angularportalazure.Blade] \'onCommandExcel\' is an abstract function. Define one in the derived class.');
304
+ };
305
+ // #endregion
306
+ //#endregion
307
+ /** Change title, as soon as watchExpression changes. watchExpression is either a variable ore an expression, e.g. [name1 + name2] */
308
+ Blade.prototype.setTitle = function (watchExpression, func) {
309
+ var _this = this;
310
+ if (this.watcherTitle === undefined) {
311
+ if (this.$scope !== null) {
312
+ // angular1
313
+ this.watcherTitle = this.$scope.$watch(watchExpression, function () { func(); });
314
+ this.$scope.$on('$destroy', function () { _this.watcherTitle(); });
315
+ }
316
+ else {
317
+ // angular2
318
+ console.log('[Blade.setTitle()] not supported for angular2. use [ngOnChanges] instead.');
319
+ }
320
+ }
321
+ };
322
+ Blade.prototype.setBladeHeights = function () {
323
+ this.bladeContentHeight = this.portalService.$window.innerHeight - 40 - 125; // 40 = topbar, 125 = blade header
324
+ this.bladeContentHeightInner = this.bladeContentHeight - 50 - 3; // 50 = padding (top and bottom), somehow we miss 3px
325
+ // this.portalService.$timeout(() => {
326
+ // }, 50);
327
+ };
328
+ return Blade;
329
+ }(usercontrolbase_1.UserControlBase));
330
+ exports.Blade = Blade;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return function (d, b) {
7
+ extendStatics(d, b);
8
+ function __() { this.constructor = d; }
9
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
+ };
11
+ })();
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ var blade_1 = require("./blade");
14
+ var BladeData = (function (_super) {
15
+ __extends(BladeData, _super);
16
+ // #region Constructor
17
+ function BladeData($scope, portalService, path, title, subtitle, width) {
18
+ if (subtitle === void 0) { subtitle = ''; }
19
+ if (width === void 0) { width = 300; }
20
+ return _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
21
+ }
22
+ // #endregion
23
+ BladeData.prototype.onLoadItem = function () {
24
+ this.visibility = 'collapse';
25
+ this.setStatusBarLoadData();
26
+ };
27
+ BladeData.prototype.onLoadItems = function () {
28
+ this.visibility = 'collapse';
29
+ this.setStatusBarLoadData();
30
+ };
31
+ BladeData.prototype.onLoadedItem = function () {
32
+ this.visibility = 'visible';
33
+ this.clearStatusBar();
34
+ };
35
+ BladeData.prototype.onLoadedItems = function () {
36
+ this.visibility = 'visible';
37
+ this.clearStatusBar();
38
+ };
39
+ return BladeData;
40
+ }(blade_1.Blade));
41
+ exports.BladeData = BladeData;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return function (d, b) {
7
+ extendStatics(d, b);
8
+ function __() { this.constructor = d; }
9
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
+ };
11
+ })();
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ var bladedata_1 = require("./bladedata");
14
+ var BladeDetail = (function (_super) {
15
+ __extends(BladeDetail, _super);
16
+ // #region Constructor
17
+ function BladeDetail($scope, portalService, path, title, subtitle, width) {
18
+ if (subtitle === void 0) { subtitle = ''; }
19
+ if (width === void 0) { width = 200; }
20
+ var _this = _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
21
+ // #endregion
22
+ // #region Properties
23
+ _this.item = {};
24
+ _this.commandNewText = 'neu';
25
+ _this.commandSaveText = 'speichern';
26
+ _this.commandDeleteText = 'löschen';
27
+ _this.commandCancelText = 'abbrechen';
28
+ return _this;
29
+ }
30
+ // #endregion
31
+ // #region Methods
32
+ BladeDetail.prototype.loadItem = function (func) {
33
+ var _this = this;
34
+ this.onLoadItem();
35
+ func().then(function (data) {
36
+ _this.item = data;
37
+ _this.onLoadedItem();
38
+ }).catch(function (exception) {
39
+ _this.setStatusBarException(exception);
40
+ });
41
+ };
42
+ BladeDetail.prototype.saveItem = function (func) {
43
+ var _this = this;
44
+ this.onSaveItem();
45
+ // Is form valid
46
+ if (!this.formblade.$valid) {
47
+ this.statusBar = 'Speichern nicht möglich! [Console] enthält weitere Informationen.';
48
+ this.statusBarClass = 'apa-statusbar-error';
49
+ console.log(this.formblade);
50
+ return;
51
+ }
52
+ func().then(function (data) {
53
+ _this.item = data;
54
+ _this.onSavedItem();
55
+ }).catch(function (exception) {
56
+ _this.setStatusBarException(exception);
57
+ });
58
+ };
59
+ BladeDetail.prototype.onSaveItem = function () {
60
+ this.setStatusBarSaveData();
61
+ };
62
+ BladeDetail.prototype.onSavedItem = function () {
63
+ this.clearStatusBar();
64
+ };
65
+ BladeDetail.prototype.onCommandCancel = function () {
66
+ this.close();
67
+ };
68
+ return BladeDetail;
69
+ }(bladedata_1.BladeData));
70
+ exports.BladeDetail = BladeDetail;
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return function (d, b) {
7
+ extendStatics(d, b);
8
+ function __() { this.constructor = d; }
9
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
+ };
11
+ })();
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ var bladedata_1 = require("./bladedata");
14
+ var BladeGrid = (function (_super) {
15
+ __extends(BladeGrid, _super);
16
+ // #region Constructor
17
+ function BladeGrid($scope, portalService, path, title, subtitle, width) {
18
+ if (subtitle === void 0) { subtitle = ''; }
19
+ if (width === void 0) { width = 200; }
20
+ var _this = _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
21
+ // #endregion
22
+ // #region Properties
23
+ _this.items = [];
24
+ return _this;
25
+ }
26
+ // #endregion
27
+ // #region Methods
28
+ BladeGrid.prototype.loadItems = function (func) {
29
+ var _this = this;
30
+ this.onLoadItems();
31
+ func().then(function (data) {
32
+ _this.items = data;
33
+ _this.onLoadedItems();
34
+ }).catch(function (exception) {
35
+ _this.setStatusBarException(exception);
36
+ });
37
+ };
38
+ // #region Filter
39
+ BladeGrid.prototype.onFilter = function (actual, expected) {
40
+ // #region Documentation
41
+ // > onFilter will be called for each item in an array
42
+ // > If the item is an native type (string, number), the filter will be called with the native type in the parameter 'actual'
43
+ // > If the item is an object, the filter will be called with each property of the object in the parameter 'actual'
44
+ // > If the item is an object, the filter will also be called with the object in the parameter 'actual'
45
+ // #endregion
46
+ // #region Helper functions
47
+ // Implemenation detail:
48
+ // > We implemented the following functions with in-line-functions, since onFilter is not called within the scope of a class (this. not working).
49
+ // Function to convert 'number' to 'string'
50
+ var convertToString = function (value) {
51
+ return value + ''; // convert to string, so the next statements will process the value as a string
52
+ };
53
+ // Function which figures out, if the 'expected' value is found in the 'actual' value
54
+ var valueFound = function (actual, expected) {
55
+ expectedSplitted.forEach(function (expectedItem, index) {
56
+ if (actual.toLowerCase().indexOf(expectedItem) > -1) {
57
+ expectedSplitted[index] = ''; // expected has been found, initialize it now
58
+ }
59
+ });
60
+ };
61
+ // Function to process an object
62
+ var processObject = function (actual) {
63
+ for (var actualProperty in actual) {
64
+ if (actual.hasOwnProperty(actualProperty)) {
65
+ var actualValue = actual[actualProperty];
66
+ if (typeof actual === 'number') {
67
+ actualValue = convertToString(actual);
68
+ }
69
+ if (typeof actualValue === 'string') {
70
+ if (actualValue.indexOf('object:') > -1) {
71
+ continue;
72
+ }
73
+ valueFound(actualValue, expected);
74
+ }
75
+ }
76
+ else {
77
+ // Process inherited properties
78
+ processObject(actual[actualProperty]);
79
+ }
80
+ }
81
+ };
82
+ // #endregion
83
+ // #region Initialize
84
+ // Prepare 'expected' value
85
+ expected = expected.toLowerCase();
86
+ // Split the search string into its parts if separated by blanks
87
+ var expectedSplitted = expected.split(' ');
88
+ // #endregion
89
+ // #region Process depending on type
90
+ // Process property, typeof 'object'
91
+ if (typeof actual === 'object') {
92
+ processObject(actual);
93
+ }
94
+ // Process property, typeof 'number'
95
+ if (typeof actual === 'number') {
96
+ actual = convertToString(actual);
97
+ }
98
+ // Process property, typeof 'string'
99
+ if (typeof actual === 'string') {
100
+ valueFound(actual, expected);
101
+ }
102
+ // #endregion
103
+ // #region Verify if all expected has been found
104
+ var foundCount = 0;
105
+ expectedSplitted.forEach(function (expectedItem) {
106
+ if (expectedItem === '') {
107
+ foundCount++;
108
+ }
109
+ });
110
+ // #endregion
111
+ // #region Return result
112
+ if (foundCount === expectedSplitted.length) {
113
+ return true;
114
+ }
115
+ else {
116
+ return false;
117
+ }
118
+ // #endregion
119
+ };
120
+ return BladeGrid;
121
+ }(bladedata_1.BladeData));
122
+ exports.BladeGrid = BladeGrid;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return function (d, b) {
7
+ extendStatics(d, b);
8
+ function __() { this.constructor = d; }
9
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
+ };
11
+ })();
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ var bladedata_1 = require("./bladedata");
14
+ var BladeNav = (function (_super) {
15
+ __extends(BladeNav, _super);
16
+ // #region Constructor
17
+ function BladeNav($scope, portalService, path, title, subtitle, width) {
18
+ if (title === void 0) { title = ''; }
19
+ if (subtitle === void 0) { subtitle = ''; }
20
+ if (width === void 0) { width = 315; }
21
+ var _this = _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
22
+ // #endregion
23
+ // #region Properties
24
+ _this.items = new Array();
25
+ _this.isNav = true;
26
+ _this.isInnerHtml = false;
27
+ return _this;
28
+ }
29
+ // #endregion
30
+ // #region Methods
31
+ BladeNav.prototype.onNavigateTo = function (path) {
32
+ if (path === '') {
33
+ return;
34
+ }
35
+ this.portalService.areaBlades.raiseAddBladeEvent({ path: path, pathSender: this.path });
36
+ };
37
+ return BladeNav;
38
+ }(bladedata_1.BladeData));
39
+ exports.BladeNav = BladeNav;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var BladeNavItem = (function () {
4
+ // #region Constructor
5
+ function BladeNavItem(title, cssClass, bladePath, hrefPath, roles, isVisible, callback, bladeNav) {
6
+ if (title === void 0) { title = ''; }
7
+ if (cssClass === void 0) { cssClass = ''; }
8
+ if (bladePath === void 0) { bladePath = ''; }
9
+ if (hrefPath === void 0) { hrefPath = ''; }
10
+ if (roles === void 0) { roles = ''; }
11
+ if (isVisible === void 0) { isVisible = true; }
12
+ if (callback === void 0) { callback = null; }
13
+ if (bladeNav === void 0) { bladeNav = null; }
14
+ this.title = title;
15
+ this.cssClass = cssClass;
16
+ this.bladePath = bladePath;
17
+ this.hrefPath = hrefPath;
18
+ this.roles = roles;
19
+ this.isVisible = isVisible;
20
+ this.callback = callback;
21
+ this.bladeNav = bladeNav;
22
+ }
23
+ // #endregion
24
+ // #region Methods
25
+ BladeNavItem.prototype.onNavItemClick = function () {
26
+ if (this.callback != null) {
27
+ this.callback();
28
+ }
29
+ };
30
+ return BladeNavItem;
31
+ }());
32
+ exports.BladeNavItem = BladeNavItem;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });