@ms-atlas-module/datastudio-datafactory 0.1.36

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.

Potentially problematic release.


This version of @ms-atlas-module/datastudio-datafactory might be problematic. Click here for more details.

Files changed (111) hide show
  1. package/_generated/ClientResources.js +1549 -0
  2. package/_generated/Framework.js +97 -0
  3. package/_generated/Svg.js +201 -0
  4. package/bootstrapper/BreadcrumbsKnockoutBinding.js +25 -0
  5. package/bootstrapper/CSS/Callout.css +43 -0
  6. package/bootstrapper/CSS/Common.css +22 -0
  7. package/bootstrapper/CSS/FormFields.css +133 -0
  8. package/bootstrapper/CSS/InlineBlock.css +34 -0
  9. package/bootstrapper/CSS/ParameterGroups.css +77 -0
  10. package/bootstrapper/CSS/Pivot.css +25 -0
  11. package/bootstrapper/CSS/Wizard.css +197 -0
  12. package/bootstrapper/CalloutBinding.js +52 -0
  13. package/bootstrapper/CollapsibleKnockoutBinding.js +70 -0
  14. package/bootstrapper/CopyBinding.js +150 -0
  15. package/bootstrapper/FilterFlyoutKnockoutBinding.js +114 -0
  16. package/bootstrapper/FormFields.js +397 -0
  17. package/bootstrapper/InlineBlockBinding.js +69 -0
  18. package/bootstrapper/JQueryUIBindings.js +152 -0
  19. package/bootstrapper/KnockoutBindings.js +635 -0
  20. package/bootstrapper/LoadingBinding.js +54 -0
  21. package/bootstrapper/MonacoEditorKnockoutBinding.js +67 -0
  22. package/bootstrapper/ParameterGroupsBinding.js +289 -0
  23. package/bootstrapper/PivotKnockoutBinding.js +61 -0
  24. package/bootstrapper/StatusCalendarFlyoutKnockoutBinding.js +398 -0
  25. package/bootstrapper/StatusCalendarKnockoutBinding.js +107 -0
  26. package/bootstrapper/TelemetryKnockoutBinding.js +68 -0
  27. package/bootstrapper/WinJSButtonKnockoutBinding.js +72 -0
  28. package/bootstrapper/WinJSKnockoutBindings.js +49 -0
  29. package/bootstrapper/WizardBinding.js +611 -0
  30. package/bootstrapper/startup.js +29 -0
  31. package/libs/VivaGraphControl/Content/CSS/Graph.css +157 -0
  32. package/libs/VivaGraphControl/Content/CSS/LightTheme.css +699 -0
  33. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Base/Base.TriggerableLifetimeManager.js +190 -0
  34. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Base/Base.js +647 -0
  35. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Base/Image.js +113 -0
  36. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Base/KnockoutExtensions.js +1064 -0
  37. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/DockedBalloon.js +18 -0
  38. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/Animation.js +192 -0
  39. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/Commands/MoveNodes.js +83 -0
  40. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/Geometry.js +167 -0
  41. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphEntityViewModel.js +260 -0
  42. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphViewModel.js +338 -0
  43. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphWidget.Constants.js +178 -0
  44. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphWidget.js +5190 -0
  45. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/MouseCapture.js +148 -0
  46. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/SvgUtils.js +164 -0
  47. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Detection.js +658 -0
  48. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Resize.js +241 -0
  49. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Util.Private.js +236 -0
  50. package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Util.js +905 -0
  51. package/libs/WinJS/WinJs.min.js +61909 -0
  52. package/libs/WinJS/ui-light.css +8500 -0
  53. package/package.json +15 -0
  54. package/scripts/AppContext.js +262 -0
  55. package/scripts/ExposureControl.js +11 -0
  56. package/scripts/Framework/Model/ActivityWindowCache.js +390 -0
  57. package/scripts/Framework/Model/ArmDataFactoryCache.js +77 -0
  58. package/scripts/Framework/Model/Contracts/Activity.js +83 -0
  59. package/scripts/Framework/Model/Contracts/ActivityWindow.js +185 -0
  60. package/scripts/Framework/Model/Contracts/BaseEncodable.js +106 -0
  61. package/scripts/Framework/Model/Contracts/Common.js +19 -0
  62. package/scripts/Framework/Model/Contracts/DataArtifact.js +100 -0
  63. package/scripts/Framework/Model/Contracts/Diagram.js +9 -0
  64. package/scripts/Framework/Model/Contracts/Encodable.js +113 -0
  65. package/scripts/Framework/Model/Contracts/Gateway.js +98 -0
  66. package/scripts/Framework/Model/Contracts/LinkedService.js +200 -0
  67. package/scripts/Framework/Model/Contracts/Pipeline.js +197 -0
  68. package/scripts/Framework/Model/DataCache.js +105 -0
  69. package/scripts/Framework/Model/DataFactoryCache.js +24 -0
  70. package/scripts/Framework/Model/Filter.js +186 -0
  71. package/scripts/Framework/Model/Helpers/ActivityWindowHelper.js +185 -0
  72. package/scripts/Framework/Model/MonitoringView.js +40 -0
  73. package/scripts/Framework/Shared/Constants.js +27 -0
  74. package/scripts/Framework/Shared/DataConstants.js +61 -0
  75. package/scripts/Framework/Shared/Disposable.js +53 -0
  76. package/scripts/Framework/Shared/IconResources.js +59 -0
  77. package/scripts/Framework/Shared/Resources/IbizaSvgs.js +241 -0
  78. package/scripts/Framework/Shared/TypeDeclarations.js +4 -0
  79. package/scripts/Framework/Telemetry/Telemetry.js +78 -0
  80. package/scripts/Framework/UI/Breadcrumbs.js +84 -0
  81. package/scripts/Framework/UI/Command.js +231 -0
  82. package/scripts/Framework/UI/ContextMenu.js +80 -0
  83. package/scripts/Framework/UI/Loader.js +11 -0
  84. package/scripts/Framework/UI/Menu.js +65 -0
  85. package/scripts/Framework/UI/PanelMessage.js +25 -0
  86. package/scripts/Framework/UI/Refresh.js +70 -0
  87. package/scripts/Framework/UI/Spinner.js +61 -0
  88. package/scripts/Framework/UI/StatusCalendar.js +1070 -0
  89. package/scripts/Framework/UI/Toolbar.js +84 -0
  90. package/scripts/Framework/Util/Datetime.js +258 -0
  91. package/scripts/Framework/Util/Log.js +10 -0
  92. package/scripts/Framework/Util/ResourceIdUtil.js +56 -0
  93. package/scripts/Framework/Util/Security.js +73 -0
  94. package/scripts/Framework/Util/Util.js +332 -0
  95. package/scripts/Framework/Views/HoverFlyout.js +92 -0
  96. package/scripts/Handlers/ErrorHandler.js +176 -0
  97. package/scripts/Handlers/MessageHandler.js +115 -0
  98. package/scripts/Handlers/MonitoringViewHandler.js +199 -0
  99. package/scripts/Handlers/RoutingHandler.js +364 -0
  100. package/scripts/Handlers/WinJSHandlers.js +265 -0
  101. package/scripts/MonitoringViewContext.js +75 -0
  102. package/scripts/Services/AzureInsightsService.js +162 -0
  103. package/scripts/Services/AzureResourceManagerService.js +869 -0
  104. package/scripts/Services/BaseService.js +232 -0
  105. package/scripts/Services/DataFactoryService.js +204 -0
  106. package/scripts/Services/HDInsightArmService.js +59 -0
  107. package/scripts/ViewContext.js +9 -0
  108. package/stylesheets/main.css +1042 -0
  109. package/views/Edit/DateTimeFilterViewModel.js +211 -0
  110. package/views/Edit/FilterViewModel.js +131 -0
  111. package/views/Shared/ProvisioningState.js +11 -0
@@ -0,0 +1,231 @@
1
+ var __extends =
2
+ (this && this.__extends) ||
3
+ function (d, b) {
4
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
5
+ function __() {
6
+ this.constructor = d;
7
+ }
8
+ d.prototype =
9
+ b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
10
+ };
11
+ define(["require", "exports", "../Shared/Disposable"], function (
12
+ require,
13
+ exports,
14
+ Disposable
15
+ ) {
16
+ "use strict";
17
+ var ObservableCommand = (function (_super) {
18
+ __extends(ObservableCommand, _super);
19
+ function ObservableCommand(command) {
20
+ _super.call(this);
21
+ this.tooltip = ko.observable(null);
22
+ this.showCssTooltip = ko.observable(false);
23
+ this.onclick = ko.observable(null);
24
+ this.disabled = ko.observable(false);
25
+ this.selected = ko.observable(false);
26
+ this.icon = ko.observable(null);
27
+ this.name = ko.observable(null);
28
+ this.label = ko.observable(null);
29
+ this.buttonType = ko.observable("button");
30
+ this.keepFill = false;
31
+ if (command.tooltip) {
32
+ this.tooltip(command.tooltip);
33
+ }
34
+ if (command.showCssTooltip) {
35
+ this.showCssTooltip(command.showCssTooltip);
36
+ }
37
+ if (command.onclick) {
38
+ this.onclick(command.onclick);
39
+ }
40
+ if (command.disabled) {
41
+ this.disabled(command.disabled);
42
+ }
43
+ if (command.icon) {
44
+ this.icon(command.icon);
45
+ }
46
+ if (command.name) {
47
+ this.name(command.name);
48
+ }
49
+ if (command.label) {
50
+ this.label(command.label);
51
+ }
52
+ if (command.buttonType) {
53
+ this.buttonType(command.buttonType);
54
+ }
55
+ if (command.selected) {
56
+ this.selected(command.selected);
57
+ }
58
+ if (command.keepFill) {
59
+ this.keepFill = command.keepFill;
60
+ }
61
+ }
62
+ return ObservableCommand;
63
+ })(Disposable.RootDisposable);
64
+ exports.ObservableCommand = ObservableCommand;
65
+ var AppBarCommand = (function (_super) {
66
+ __extends(AppBarCommand, _super);
67
+ function AppBarCommand() {
68
+ _super.apply(this, arguments);
69
+ this.ibizaIcon = ko.observable(null);
70
+ this.updated = ko.observable(null).extend({ notify: "always" });
71
+ }
72
+ return AppBarCommand;
73
+ })(WinJS.UI.AppBarCommand);
74
+ exports.AppBarCommand = AppBarCommand;
75
+ var MenuCommand = (function (_super) {
76
+ __extends(MenuCommand, _super);
77
+ function MenuCommand() {
78
+ _super.apply(this, arguments);
79
+ this.updated = ko.observable(null).extend({ notify: "always" });
80
+ }
81
+ return MenuCommand;
82
+ })(WinJS.UI.MenuCommand);
83
+ exports.MenuCommand = MenuCommand;
84
+ var Button = (function (_super) {
85
+ __extends(Button, _super);
86
+ function Button(lifetimeManager, command) {
87
+ _super.call(this, lifetimeManager);
88
+ if (command instanceof ObservableCommand) {
89
+ this._command = command;
90
+ } else {
91
+ this._command = new ObservableCommand(command);
92
+ }
93
+ }
94
+ Button.removeCSS = function (element) {
95
+ element.find("[fill]").attr("class", "svg-fill").removeAttr("fill");
96
+ element.find("[stroke]").attr("class", "svg-stroke").removeAttr("stroke");
97
+ return element[0].outerHTML || $("<div></div>").append(element).html();
98
+ };
99
+ Button._captureMouseEvent = function (buttonElement) {
100
+ var handler = function (event) {
101
+ event.stopImmediatePropagation();
102
+ event.stopPropagation();
103
+ event.cancelBubble = true;
104
+ };
105
+ buttonElement.onmousedown = handler;
106
+ buttonElement.onmousemove = handler;
107
+ buttonElement.onmouseleave = handler;
108
+ };
109
+ Button.prototype.menuCommand = function (element) {
110
+ if (element === void 0) {
111
+ element = null;
112
+ }
113
+ var button = new MenuCommand(element, {
114
+ disabled: this._command.disabled(),
115
+ onclick: this._command.onclick(),
116
+ label: this._command.label(),
117
+ type: this._command.buttonType(),
118
+ tooltip: null,
119
+ showCssTooltip: this._command.showCssTooltip(),
120
+ });
121
+ button._command = this._command;
122
+ this._syncObservables(button);
123
+ this._syncObservableProperty(button, "tooltip");
124
+ return button;
125
+ };
126
+ Button.prototype.appBarCommand = function (element) {
127
+ var _this = this;
128
+ if (element === void 0) {
129
+ element = null;
130
+ }
131
+ var button = new AppBarCommand(element, {
132
+ disabled: this._command.disabled(),
133
+ onclick: this._command.onclick(),
134
+ label: this._command.label(),
135
+ type: this._command.buttonType(),
136
+ selected: this._command.selected(),
137
+ tooltip: null,
138
+ showCssTooltip: this._command.showCssTooltip(),
139
+ });
140
+ Button._captureMouseEvent(button.element);
141
+ button._command = this._command;
142
+ this._updateIcon(button);
143
+ this._syncObservables(button);
144
+ this._lifetimeManager.registerForDispose(
145
+ this._command.icon.subscribe(function (icon) {
146
+ _this._updateIcon(button);
147
+ button.updated(true);
148
+ })
149
+ );
150
+ this._lifetimeManager.registerForDispose(button);
151
+ return button;
152
+ };
153
+ Button.prototype._syncObservables = function (object) {
154
+ this._syncObservableProperty(object, "label");
155
+ this._syncObservableProperty(object, "onclick");
156
+ this._syncObservableProperty(object, "disabled");
157
+ this._syncObservableProperty(object, "selected");
158
+ this._syncObservableProperty(object, "buttonType", "type");
159
+ this._syncObservableProperty(object, "showCssTooltip");
160
+ this._addTooltip(object);
161
+ };
162
+ Button.prototype._syncObservableProperty = function (
163
+ object,
164
+ srcProperty,
165
+ destProperty
166
+ ) {
167
+ if (destProperty === void 0) {
168
+ destProperty = null;
169
+ }
170
+ if (!destProperty) {
171
+ destProperty = srcProperty;
172
+ }
173
+ var makeSubscription = function (_object, _destProperty) {
174
+ return function (value) {
175
+ _object[_destProperty] = value;
176
+ _object.updated(true);
177
+ };
178
+ };
179
+ this._lifetimeManager.registerForDispose(
180
+ this._command[srcProperty].subscribe(
181
+ makeSubscription(object, destProperty)
182
+ )
183
+ );
184
+ };
185
+ Button.prototype._addTooltip = function (object) {
186
+ if (object._command.showCssTooltip()) {
187
+ object.element.setAttribute("data-tooltip", this._command.tooltip());
188
+ } else {
189
+ object.element.title = this._command.tooltip();
190
+ }
191
+ this._lifetimeManager.registerForDispose(
192
+ object._command.tooltip.subscribe(function (value) {
193
+ if (object._command.showCssTooltip()) {
194
+ object.element.setAttribute("data-tooltip", value);
195
+ } else {
196
+ object.element.title = value;
197
+ }
198
+ object.updated(true);
199
+ })
200
+ );
201
+ };
202
+ Button.prototype._updateIcon = function (appBarCommand) {
203
+ if (!this._command.icon()) {
204
+ appBarCommand.icon = null;
205
+ appBarCommand.ibizaIcon(null);
206
+ appBarCommand.element.innerHTML = appBarCommand.label;
207
+ return;
208
+ }
209
+ appBarCommand.element.innerHTML = "";
210
+ if (typeof this._command.icon() === "string") {
211
+ appBarCommand.element.innerHTML = this._command.icon();
212
+ if (!this._command.keepFill) {
213
+ Button.removeCSS($(appBarCommand.element));
214
+ }
215
+ appBarCommand.ibizaIcon(null);
216
+ return;
217
+ }
218
+ appBarCommand.ibizaIcon(this._command.icon());
219
+ if (!$(appBarCommand.element).is("[data-bind]")) {
220
+ appBarCommand.element.setAttribute("data-bind", "image: icon()");
221
+ ko.applyBindings(
222
+ { icon: appBarCommand.ibizaIcon },
223
+ appBarCommand.element
224
+ );
225
+ }
226
+ };
227
+ return Button;
228
+ })(Disposable.ChildDisposable);
229
+ exports.Button = Button;
230
+ });
231
+ //# sourceMappingURL=Command.js.map
@@ -0,0 +1,80 @@
1
+ define([
2
+ "require",
3
+ "exports",
4
+ "text!./Templates/ContextMenu.html",
5
+ "../Util/Log",
6
+ ], function (require, exports, contextMenuTemplate, Log) {
7
+ "use strict";
8
+ var contextMenuTemplate;
9
+ var logger = Log.getLogger({
10
+ loggerName: "ContextMenu",
11
+ });
12
+ var ContextMenu = (function () {
13
+ function ContextMenu() {
14
+ var _this = this;
15
+ this._hostElement = null;
16
+ this._contextMenuControl = null;
17
+ this._contextMenuPositionElement = null;
18
+ this._hostElement = $(contextMenuTemplate)[0];
19
+ var contextMenuWinJSHostDivSelector = ".contextMenuWinJSHostDiv";
20
+ var contextMenuPositionSelector = ".contextMenuPosition";
21
+ var contextMenuElement = this._hostElement.querySelector(
22
+ contextMenuWinJSHostDivSelector
23
+ );
24
+ WinJS.UI.processAll(contextMenuElement).then(
25
+ function (processedElement) {
26
+ _this._contextMenuControl = processedElement.winControl;
27
+ _this._contextMenuPositionElement = _this._hostElement.querySelector(
28
+ contextMenuPositionSelector
29
+ );
30
+ },
31
+ function (error) {
32
+ logger.logError(
33
+ "Failed to initialize context menu: ",
34
+ JSON.stringify(error)
35
+ );
36
+ }
37
+ );
38
+ var flyoutClickEater = $("body > section.win-flyoutmenuclickeater");
39
+ var preventContextMenuOnClickEater = function (event) {
40
+ event.preventDefault();
41
+ };
42
+ flyoutClickEater.on("contextmenu", preventContextMenuOnClickEater);
43
+ ko.utils.domNodeDisposal.addDisposeCallback(
44
+ this._hostElement,
45
+ function () {
46
+ if (_this._contextMenuControl) {
47
+ _this._contextMenuControl.dispose();
48
+ }
49
+ flyoutClickEater.off("contextmenu", preventContextMenuOnClickEater);
50
+ }
51
+ );
52
+ }
53
+ ContextMenu.createContextMenu = function (position, commandGroup) {
54
+ if (!ContextMenu._markupApplied) {
55
+ document.body.appendChild(ContextMenu._instance._hostElement);
56
+ ContextMenu._markupApplied = true;
57
+ }
58
+ var contextMenuControl = ContextMenu._instance._contextMenuControl;
59
+ var contextMenuPositionElement =
60
+ ContextMenu._instance._contextMenuPositionElement;
61
+ contextMenuControl.commands = commandGroup.commands;
62
+ var commandGroupCleanup = function () {
63
+ commandGroup.unbindViewModels();
64
+ contextMenuControl.removeEventListener(
65
+ "afterhide",
66
+ commandGroupCleanup
67
+ );
68
+ };
69
+ contextMenuControl.addEventListener("afterhide", commandGroupCleanup);
70
+ contextMenuPositionElement.style.top = position.clientY + "px";
71
+ contextMenuPositionElement.style.left = position.clientX + "px";
72
+ contextMenuControl.show(contextMenuPositionElement, "right");
73
+ };
74
+ ContextMenu._markupApplied = false;
75
+ ContextMenu._instance = new ContextMenu();
76
+ return ContextMenu;
77
+ })();
78
+ exports.ContextMenu = ContextMenu;
79
+ });
80
+ //# sourceMappingURL=ContextMenu.js.map
@@ -0,0 +1,11 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ (function (LoadingState) {
4
+ LoadingState[(LoadingState["Loading"] = 0)] = "Loading";
5
+ LoadingState[(LoadingState["BlockingUiLoading"] = 1)] = "BlockingUiLoading";
6
+ LoadingState[(LoadingState["Failed"] = 2)] = "Failed";
7
+ LoadingState[(LoadingState["Ready"] = 3)] = "Ready";
8
+ })(exports.LoadingState || (exports.LoadingState = {}));
9
+ var LoadingState = exports.LoadingState;
10
+ });
11
+ //# sourceMappingURL=Loader.js.map
@@ -0,0 +1,65 @@
1
+ var __extends =
2
+ (this && this.__extends) ||
3
+ function (d, b) {
4
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
5
+ function __() {
6
+ this.constructor = d;
7
+ }
8
+ d.prototype =
9
+ b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
10
+ };
11
+ define([
12
+ "require",
13
+ "exports",
14
+ "../Shared/Constants",
15
+ "../Shared/Disposable",
16
+ "./Command",
17
+ ], function (require, exports, Constants, Disposable, Command) {
18
+ "use strict";
19
+ var MenuViewModelBase = (function (_super) {
20
+ __extends(MenuViewModelBase, _super);
21
+ function MenuViewModelBase(lifetimeManager, element) {
22
+ var _this = this;
23
+ _super.call(this, lifetimeManager);
24
+ this.tooltip = "";
25
+ this.icon = null;
26
+ this._commands = ko.observableArray(null);
27
+ this.menu = ko.observable(null);
28
+ this.addMenuButton = function (command) {
29
+ var button = new Command.Button(_this._lifetimeManager, command);
30
+ var menuCommand = button.menuCommand();
31
+ _this._commands.push(menuCommand);
32
+ return menuCommand;
33
+ };
34
+ this.addDropdownButton = function (menuButton) {
35
+ $(menuButton.element).addClass(Constants.CSS.menuButtonClass);
36
+ $(_this.menu().element).addClass(Constants.CSS.dropdownMenuClass);
37
+ var menuButtonClicked = function (event) {
38
+ var handler = function (_event) {
39
+ $(menuButton.element).removeClass(Constants.CSS.hoveredClass);
40
+ _this.menu().removeEventListener("beforehide", handler);
41
+ };
42
+ _this.menu().addEventListener("beforehide", handler);
43
+ $(menuButton.element).addClass(Constants.CSS.hoveredClass);
44
+ _this.showMenu(menuButton.element);
45
+ };
46
+ menuButton._command.onclick(menuButtonClicked);
47
+ return menuButton;
48
+ };
49
+ element.setAttribute("data-win-control", "WinJS.UI.Menu");
50
+ WinJS.UI.processAll(element).then(function () {
51
+ _this.menu(element.winControl);
52
+ });
53
+ }
54
+ MenuViewModelBase.prototype.showMenu = function (anchor, type) {
55
+ if (type === void 0) {
56
+ type = "bottom";
57
+ }
58
+ this.menu().commands = this._commands();
59
+ this.menu().show(anchor, type);
60
+ };
61
+ return MenuViewModelBase;
62
+ })(Disposable.ChildDisposable);
63
+ exports.MenuViewModelBase = MenuViewModelBase;
64
+ });
65
+ //# sourceMappingURL=Menu.js.map
@@ -0,0 +1,25 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ var PanelMessage = (function () {
4
+ function PanelMessage() {}
5
+ PanelMessage.showMessage = function (message) {
6
+ if ($(PanelMessage._messageSelector).length === 0) {
7
+ $(PanelMessage._panelSelector).prepend(PanelMessage._template);
8
+ }
9
+ $(PanelMessage._messageSelector).html(message);
10
+ $(PanelMessage._switchSelector).addClass(this._switchClass);
11
+ };
12
+ PanelMessage.removeMessage = function () {
13
+ $(PanelMessage._switchSelector).removeClass(this._switchClass);
14
+ $(PanelMessage._messageSelector).remove();
15
+ };
16
+ PanelMessage._panelSelector = ".rightSidePanel";
17
+ PanelMessage._messageSelector = ".adf-panelMessage";
18
+ PanelMessage._switchSelector = ".rightSidePanel .switch";
19
+ PanelMessage._switchClass = "adf-panelMessageSwitch";
20
+ PanelMessage._template = '<div class="adf-panelMessage"></div>';
21
+ return PanelMessage;
22
+ })();
23
+ exports.PanelMessage = PanelMessage;
24
+ });
25
+ //# sourceMappingURL=PanelMessage.js.map
@@ -0,0 +1,70 @@
1
+ var __extends =
2
+ (this && this.__extends) ||
3
+ function (d, b) {
4
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
5
+ function __() {
6
+ this.constructor = d;
7
+ }
8
+ d.prototype =
9
+ b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
10
+ };
11
+ define(["require", "exports", "../Shared/Disposable"], function (
12
+ require,
13
+ exports,
14
+ Disposable
15
+ ) {
16
+ "use strict";
17
+ var REFRESH_FREQUENCY = 5000;
18
+ var RefreshHandler = (function (_super) {
19
+ __extends(RefreshHandler, _super);
20
+ function RefreshHandler(lifetimeManager) {
21
+ var _this = this;
22
+ _super.call(this, lifetimeManager);
23
+ this.createElement = function (moment) {
24
+ var timestamp = ko.observable(moment);
25
+ var html = ko.pureComputed(function () {
26
+ return _this._template.replace(
27
+ /\{TIMESTAMP\}/,
28
+ timestamp().fromNow()
29
+ );
30
+ });
31
+ var element = {
32
+ html: html,
33
+ timestamp: timestamp,
34
+ };
35
+ _this._timestamps.push(timestamp);
36
+ return element;
37
+ };
38
+ this._template = "Last refreshed {TIMESTAMP}.";
39
+ this._timeout = null;
40
+ this._timestamps = [];
41
+ this._updateTimestamps = function () {
42
+ if (_this._timeout === null) {
43
+ return;
44
+ }
45
+ _this._timestamps.forEach(function (timestamp) {
46
+ if (timestamp()) {
47
+ timestamp.notifySubscribers();
48
+ }
49
+ });
50
+ _this._timeout = window.setTimeout(
51
+ _this._updateTimestamps,
52
+ REFRESH_FREQUENCY
53
+ );
54
+ };
55
+ this._timeout = window.setTimeout(
56
+ this._updateTimestamps,
57
+ REFRESH_FREQUENCY
58
+ );
59
+ }
60
+ RefreshHandler.prototype.dispose = function () {
61
+ _super.prototype.dispose.call(this);
62
+ var tmp = this._timeout;
63
+ this._timeout = null;
64
+ clearTimeout(tmp);
65
+ };
66
+ return RefreshHandler;
67
+ })(Disposable.ChildDisposable);
68
+ exports.RefreshHandler = RefreshHandler;
69
+ });
70
+ //# sourceMappingURL=Refresh.js.map
@@ -0,0 +1,61 @@
1
+ define(["require", "exports", "../Util/Log"], function (require, exports, Log) {
2
+ "use strict";
3
+ var logger = Log.getLogger({
4
+ loggerName: "Spinner",
5
+ });
6
+ var SpinnerInstance = (function () {
7
+ function SpinnerInstance(viewModel) {
8
+ this._viewModel = viewModel;
9
+ this._isOn = false;
10
+ }
11
+ SpinnerInstance.prototype.on = function () {
12
+ if (!this._isOn) {
13
+ this._isOn = true;
14
+ this._viewModel.instanceOn();
15
+ } else {
16
+ logger.logError("Spinner being toggled out of order");
17
+ }
18
+ return this;
19
+ };
20
+ SpinnerInstance.prototype.off = function () {
21
+ if (this._isOn) {
22
+ this._isOn = false;
23
+ this._viewModel.instanceOff();
24
+ } else {
25
+ logger.logError("Spinner being toggled out of order");
26
+ }
27
+ return this;
28
+ };
29
+ SpinnerInstance.prototype.promise = function (promise) {
30
+ var _this = this;
31
+ var final = function (args) {
32
+ _this.off();
33
+ };
34
+ promise.then(final, final);
35
+ return promise;
36
+ };
37
+ return SpinnerInstance;
38
+ })();
39
+ exports.SpinnerInstance = SpinnerInstance;
40
+ var SpinnerViewModel = (function () {
41
+ function SpinnerViewModel() {
42
+ this._spinners = 0;
43
+ this.spinner = ko.observable("");
44
+ }
45
+ SpinnerViewModel.prototype.instanceOff = function () {
46
+ this._spinners--;
47
+ if (this._spinners === 0) {
48
+ this.spinner("");
49
+ }
50
+ };
51
+ SpinnerViewModel.prototype.instanceOn = function () {
52
+ this._spinners++;
53
+ };
54
+ SpinnerViewModel.prototype.getInstance = function () {
55
+ return new SpinnerInstance(this);
56
+ };
57
+ return SpinnerViewModel;
58
+ })();
59
+ exports.SpinnerViewModel = SpinnerViewModel;
60
+ });
61
+ //# sourceMappingURL=Spinner.js.map