@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.
- package/_generated/ClientResources.js +1549 -0
- package/_generated/Framework.js +97 -0
- package/_generated/Svg.js +201 -0
- package/bootstrapper/BreadcrumbsKnockoutBinding.js +25 -0
- package/bootstrapper/CSS/Callout.css +43 -0
- package/bootstrapper/CSS/Common.css +22 -0
- package/bootstrapper/CSS/FormFields.css +133 -0
- package/bootstrapper/CSS/InlineBlock.css +34 -0
- package/bootstrapper/CSS/ParameterGroups.css +77 -0
- package/bootstrapper/CSS/Pivot.css +25 -0
- package/bootstrapper/CSS/Wizard.css +197 -0
- package/bootstrapper/CalloutBinding.js +52 -0
- package/bootstrapper/CollapsibleKnockoutBinding.js +70 -0
- package/bootstrapper/CopyBinding.js +150 -0
- package/bootstrapper/FilterFlyoutKnockoutBinding.js +114 -0
- package/bootstrapper/FormFields.js +397 -0
- package/bootstrapper/InlineBlockBinding.js +69 -0
- package/bootstrapper/JQueryUIBindings.js +152 -0
- package/bootstrapper/KnockoutBindings.js +635 -0
- package/bootstrapper/LoadingBinding.js +54 -0
- package/bootstrapper/MonacoEditorKnockoutBinding.js +67 -0
- package/bootstrapper/ParameterGroupsBinding.js +289 -0
- package/bootstrapper/PivotKnockoutBinding.js +61 -0
- package/bootstrapper/StatusCalendarFlyoutKnockoutBinding.js +398 -0
- package/bootstrapper/StatusCalendarKnockoutBinding.js +107 -0
- package/bootstrapper/TelemetryKnockoutBinding.js +68 -0
- package/bootstrapper/WinJSButtonKnockoutBinding.js +72 -0
- package/bootstrapper/WinJSKnockoutBindings.js +49 -0
- package/bootstrapper/WizardBinding.js +611 -0
- package/bootstrapper/startup.js +29 -0
- package/libs/VivaGraphControl/Content/CSS/Graph.css +157 -0
- package/libs/VivaGraphControl/Content/CSS/LightTheme.css +699 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Base/Base.TriggerableLifetimeManager.js +190 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Base/Base.js +647 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Base/Image.js +113 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Base/KnockoutExtensions.js +1064 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/DockedBalloon.js +18 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/Animation.js +192 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/Commands/MoveNodes.js +83 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/Geometry.js +167 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphEntityViewModel.js +260 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphViewModel.js +338 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphWidget.Constants.js +178 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphWidget.js +5190 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/MouseCapture.js +148 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/SvgUtils.js +164 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Detection.js +658 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Resize.js +241 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Util.Private.js +236 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Util.js +905 -0
- package/libs/WinJS/WinJs.min.js +61909 -0
- package/libs/WinJS/ui-light.css +8500 -0
- package/package.json +15 -0
- package/scripts/AppContext.js +262 -0
- package/scripts/ExposureControl.js +11 -0
- package/scripts/Framework/Model/ActivityWindowCache.js +390 -0
- package/scripts/Framework/Model/ArmDataFactoryCache.js +77 -0
- package/scripts/Framework/Model/Contracts/Activity.js +83 -0
- package/scripts/Framework/Model/Contracts/ActivityWindow.js +185 -0
- package/scripts/Framework/Model/Contracts/BaseEncodable.js +106 -0
- package/scripts/Framework/Model/Contracts/Common.js +19 -0
- package/scripts/Framework/Model/Contracts/DataArtifact.js +100 -0
- package/scripts/Framework/Model/Contracts/Diagram.js +9 -0
- package/scripts/Framework/Model/Contracts/Encodable.js +113 -0
- package/scripts/Framework/Model/Contracts/Gateway.js +98 -0
- package/scripts/Framework/Model/Contracts/LinkedService.js +200 -0
- package/scripts/Framework/Model/Contracts/Pipeline.js +197 -0
- package/scripts/Framework/Model/DataCache.js +105 -0
- package/scripts/Framework/Model/DataFactoryCache.js +24 -0
- package/scripts/Framework/Model/Filter.js +186 -0
- package/scripts/Framework/Model/Helpers/ActivityWindowHelper.js +185 -0
- package/scripts/Framework/Model/MonitoringView.js +40 -0
- package/scripts/Framework/Shared/Constants.js +27 -0
- package/scripts/Framework/Shared/DataConstants.js +61 -0
- package/scripts/Framework/Shared/Disposable.js +53 -0
- package/scripts/Framework/Shared/IconResources.js +59 -0
- package/scripts/Framework/Shared/Resources/IbizaSvgs.js +241 -0
- package/scripts/Framework/Shared/TypeDeclarations.js +4 -0
- package/scripts/Framework/Telemetry/Telemetry.js +78 -0
- package/scripts/Framework/UI/Breadcrumbs.js +84 -0
- package/scripts/Framework/UI/Command.js +231 -0
- package/scripts/Framework/UI/ContextMenu.js +80 -0
- package/scripts/Framework/UI/Loader.js +11 -0
- package/scripts/Framework/UI/Menu.js +65 -0
- package/scripts/Framework/UI/PanelMessage.js +25 -0
- package/scripts/Framework/UI/Refresh.js +70 -0
- package/scripts/Framework/UI/Spinner.js +61 -0
- package/scripts/Framework/UI/StatusCalendar.js +1070 -0
- package/scripts/Framework/UI/Toolbar.js +84 -0
- package/scripts/Framework/Util/Datetime.js +258 -0
- package/scripts/Framework/Util/Log.js +10 -0
- package/scripts/Framework/Util/ResourceIdUtil.js +56 -0
- package/scripts/Framework/Util/Security.js +73 -0
- package/scripts/Framework/Util/Util.js +332 -0
- package/scripts/Framework/Views/HoverFlyout.js +92 -0
- package/scripts/Handlers/ErrorHandler.js +176 -0
- package/scripts/Handlers/MessageHandler.js +115 -0
- package/scripts/Handlers/MonitoringViewHandler.js +199 -0
- package/scripts/Handlers/RoutingHandler.js +364 -0
- package/scripts/Handlers/WinJSHandlers.js +265 -0
- package/scripts/MonitoringViewContext.js +75 -0
- package/scripts/Services/AzureInsightsService.js +162 -0
- package/scripts/Services/AzureResourceManagerService.js +869 -0
- package/scripts/Services/BaseService.js +232 -0
- package/scripts/Services/DataFactoryService.js +204 -0
- package/scripts/Services/HDInsightArmService.js +59 -0
- package/scripts/ViewContext.js +9 -0
- package/stylesheets/main.css +1042 -0
- package/views/Edit/DateTimeFilterViewModel.js +211 -0
- package/views/Edit/FilterViewModel.js +131 -0
- package/views/Shared/ProvisioningState.js +11 -0
|
@@ -0,0 +1,611 @@
|
|
|
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
|
+
"../scripts/Framework/Util/Log",
|
|
15
|
+
"../_generated/Framework",
|
|
16
|
+
"text!./Templates/WizardTemplate.html",
|
|
17
|
+
"css!./CSS/Wizard.css",
|
|
18
|
+
"css!./CSS/Common.css",
|
|
19
|
+
], function (require, exports, Log, Framework) {
|
|
20
|
+
"use strict";
|
|
21
|
+
var logger = Log.getLogger({ loggerName: "WizardBinding" });
|
|
22
|
+
var genericErrorMessage =
|
|
23
|
+
"Please fix the errors on this page before continuing";
|
|
24
|
+
var Wizard = (function (_super) {
|
|
25
|
+
__extends(Wizard, _super);
|
|
26
|
+
function Wizard(wizardConfig, finalAction, finalStep) {
|
|
27
|
+
var _this = this;
|
|
28
|
+
_super.call(this);
|
|
29
|
+
this.nextEnabled = ko.observable(true);
|
|
30
|
+
this.currentStep = ko.observable();
|
|
31
|
+
this.currentSubstep = ko.observable();
|
|
32
|
+
this.stepLoading = ko.observable(false);
|
|
33
|
+
this.validating = ko.observable(false);
|
|
34
|
+
this.waitingForOnNextCallback = ko.observable(false);
|
|
35
|
+
this.loading = ko
|
|
36
|
+
.computed(function () {
|
|
37
|
+
return (
|
|
38
|
+
_this.stepLoading() ||
|
|
39
|
+
_this.validating() ||
|
|
40
|
+
_this.waitingForOnNextCallback()
|
|
41
|
+
);
|
|
42
|
+
})
|
|
43
|
+
.extend({ throttle: 100 });
|
|
44
|
+
this.hasPrevNextButtons = ko.observable(true);
|
|
45
|
+
this.showFinalNextButton = ko.observable(false);
|
|
46
|
+
this.navItems = ko.observableArray();
|
|
47
|
+
this.visibleNavItems = ko.observableArray();
|
|
48
|
+
this.finalItemIndex = ko.computed(function () {
|
|
49
|
+
return _this.visibleNavItems().length + 1;
|
|
50
|
+
});
|
|
51
|
+
this.pivots = ko.observableArray();
|
|
52
|
+
this.pivotGroups = ko.observableArray();
|
|
53
|
+
this.errorMessage = ko.observable();
|
|
54
|
+
this.wizardSteps = wizardConfig.steps;
|
|
55
|
+
this.headerTemplate = wizardConfig.headerTemplate;
|
|
56
|
+
this.headerViewModel = wizardConfig.headerViewModel;
|
|
57
|
+
this.pivotMap = {};
|
|
58
|
+
this.pivotGroupsMap = {};
|
|
59
|
+
this.finalAction = finalAction;
|
|
60
|
+
this.panelHidden = wizardConfig.panelHidden;
|
|
61
|
+
this.wizardSteps.forEach(function (step) {
|
|
62
|
+
if (!step.subheaderText) {
|
|
63
|
+
step.subheaderText = ko.observable();
|
|
64
|
+
}
|
|
65
|
+
_this.navItems.push({
|
|
66
|
+
completed: ko.observable(false),
|
|
67
|
+
selected: ko.observable(false),
|
|
68
|
+
wizardStep: step,
|
|
69
|
+
validating: false,
|
|
70
|
+
});
|
|
71
|
+
_this.pivotMap[step.name] = ko.observableArray();
|
|
72
|
+
_this.pivotGroupsMap[step.name] = ko.observableArray();
|
|
73
|
+
if (step.substeps) {
|
|
74
|
+
if (step.viewModel) {
|
|
75
|
+
logger.logError(
|
|
76
|
+
"Wizard should not define both view model and sub-steps, view model setting will have no effect"
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
if (step.template) {
|
|
80
|
+
logger.logError(
|
|
81
|
+
"Wizard should not define both template and sub-steps, template setting will have no effect"
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
step.substeps.forEach(function (substep) {
|
|
85
|
+
_this.pivotMap[step.name].push({
|
|
86
|
+
completed: ko.observable(false),
|
|
87
|
+
selected: ko.observable(false),
|
|
88
|
+
wizardStep: substep,
|
|
89
|
+
validating: false,
|
|
90
|
+
groupId: substep.groupId,
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
var processedGroups_1 = {};
|
|
94
|
+
_this.pivotMap[step.name]().forEach(function (pivot) {
|
|
95
|
+
if (!pivot.groupId) {
|
|
96
|
+
_this.pivotGroupsMap[step.name].push({
|
|
97
|
+
completed: ko.computed(function () {
|
|
98
|
+
return pivot.completed();
|
|
99
|
+
}),
|
|
100
|
+
selected: ko.computed(function () {
|
|
101
|
+
return pivot.selected();
|
|
102
|
+
}),
|
|
103
|
+
cloacked: ko.computed(function () {
|
|
104
|
+
return (
|
|
105
|
+
pivot.wizardStep.cloacked && pivot.wizardStep.cloacked()
|
|
106
|
+
);
|
|
107
|
+
}),
|
|
108
|
+
displayText: pivot.wizardStep.displayText,
|
|
109
|
+
groupId: pivot.groupId,
|
|
110
|
+
name: pivot.wizardStep.name,
|
|
111
|
+
});
|
|
112
|
+
} else {
|
|
113
|
+
if (processedGroups_1[pivot.groupId] === undefined) {
|
|
114
|
+
_this.pivotGroupsMap[step.name].push({
|
|
115
|
+
completed: ko.computed(function () {
|
|
116
|
+
var completed = true;
|
|
117
|
+
_this.pivotMap[step.name]().forEach(function (p) {
|
|
118
|
+
if (p.groupId === pivot.groupId) {
|
|
119
|
+
completed =
|
|
120
|
+
completed &&
|
|
121
|
+
(p.completed() ||
|
|
122
|
+
(p.wizardStep.cloacked && p.wizardStep.cloacked()));
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
return completed;
|
|
126
|
+
}),
|
|
127
|
+
selected: ko.computed(function () {
|
|
128
|
+
var selected = false;
|
|
129
|
+
_this.pivotMap[step.name]().forEach(function (p) {
|
|
130
|
+
if (p.groupId === pivot.groupId) {
|
|
131
|
+
selected = selected || p.selected();
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
return selected;
|
|
135
|
+
}),
|
|
136
|
+
cloacked: ko.computed(function () {
|
|
137
|
+
return _this.pivotMap[step.name]().every(function (s) {
|
|
138
|
+
return s.wizardStep.cloacked && s.wizardStep.cloacked();
|
|
139
|
+
});
|
|
140
|
+
}),
|
|
141
|
+
displayText: pivot.wizardStep.displayText,
|
|
142
|
+
groupId: pivot.groupId,
|
|
143
|
+
name: pivot.wizardStep.name,
|
|
144
|
+
});
|
|
145
|
+
processedGroups_1[pivot.groupId] = "processed";
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
var findNextPivot = function (initialIndex) {
|
|
152
|
+
var index = initialIndex;
|
|
153
|
+
while (
|
|
154
|
+
index < _this.pivots().length &&
|
|
155
|
+
_this.pivots()[index].wizardStep.cloacked &&
|
|
156
|
+
_this.pivots()[index].wizardStep.cloacked()
|
|
157
|
+
) {
|
|
158
|
+
index++;
|
|
159
|
+
}
|
|
160
|
+
return index;
|
|
161
|
+
};
|
|
162
|
+
var findPreviousPivot = function (initialIndex) {
|
|
163
|
+
var index = initialIndex;
|
|
164
|
+
while (
|
|
165
|
+
index >= 0 &&
|
|
166
|
+
_this.pivots()[index].wizardStep.cloacked &&
|
|
167
|
+
_this.pivots()[index].wizardStep.cloacked()
|
|
168
|
+
) {
|
|
169
|
+
index--;
|
|
170
|
+
}
|
|
171
|
+
return index;
|
|
172
|
+
};
|
|
173
|
+
this.hasFinalStep = false;
|
|
174
|
+
if (finalStep) {
|
|
175
|
+
this.finalNavItem = {
|
|
176
|
+
completed: ko.observable(false),
|
|
177
|
+
selected: ko.observable(false),
|
|
178
|
+
wizardStep: finalStep,
|
|
179
|
+
validating: false,
|
|
180
|
+
};
|
|
181
|
+
this.hasFinalStep = true;
|
|
182
|
+
this.pivotMap[finalStep.name] = ko.observableArray();
|
|
183
|
+
this.pivotGroupsMap[finalStep.name] = ko.observableArray();
|
|
184
|
+
}
|
|
185
|
+
this.selectNavItem = function (item, forward) {
|
|
186
|
+
_this.currentStep(item.wizardStep.name);
|
|
187
|
+
var currentIndex = _this.getIndexByName(
|
|
188
|
+
_this.navItems,
|
|
189
|
+
_this.currentStep()
|
|
190
|
+
);
|
|
191
|
+
if (currentIndex === -1) {
|
|
192
|
+
currentIndex = _this.navItems().length;
|
|
193
|
+
}
|
|
194
|
+
_this.navItems().forEach(function (n, index) {
|
|
195
|
+
n.selected(n === item);
|
|
196
|
+
if (index > currentIndex && _this.hasPrevNextButtons()) {
|
|
197
|
+
n.completed(false);
|
|
198
|
+
_this.pivotMap[n.wizardStep.name]().forEach(function (p) {
|
|
199
|
+
p.completed(false);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
if (_this.finalNavItem && _this.finalNavItem !== item) {
|
|
204
|
+
_this.finalNavItem.selected(false);
|
|
205
|
+
if (_this.hasPrevNextButtons()) {
|
|
206
|
+
_this.finalNavItem.completed(false);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
item.selected(true);
|
|
210
|
+
var pivots = _this.pivotMap[item.wizardStep.name]();
|
|
211
|
+
_this.pivots(pivots);
|
|
212
|
+
_this.pivotGroups(_this.pivotGroupsMap[item.wizardStep.name]());
|
|
213
|
+
if (pivots && pivots.length > 0) {
|
|
214
|
+
if (forward) {
|
|
215
|
+
var index = findNextPivot(0);
|
|
216
|
+
_this.selectPivot(pivots[index], true);
|
|
217
|
+
} else {
|
|
218
|
+
var index = findPreviousPivot(pivots.length - 1);
|
|
219
|
+
_this.selectPivot(pivots[index], false);
|
|
220
|
+
}
|
|
221
|
+
} else {
|
|
222
|
+
_this.currentSubstep("");
|
|
223
|
+
_this.renderItem(item, forward);
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
this.selectNavItemByClick = function (item) {
|
|
227
|
+
if (item.completed() && item.wizardStep.name !== _this.currentStep()) {
|
|
228
|
+
_this.selectNavItem(item, true);
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
this.selectPivot = function (item, forwardNavigation) {
|
|
232
|
+
_this.currentSubstep(item.wizardStep.name);
|
|
233
|
+
_this.pivots().forEach(function (p) {
|
|
234
|
+
p.selected(p === item);
|
|
235
|
+
});
|
|
236
|
+
_this.renderItem(item, forwardNavigation);
|
|
237
|
+
};
|
|
238
|
+
this.selectPivotGroup = function (pivotGroup) {
|
|
239
|
+
if (pivotGroup.completed()) {
|
|
240
|
+
var pivot = _this.pivots().filter(function (p) {
|
|
241
|
+
return p.wizardStep.name === pivotGroup.name;
|
|
242
|
+
})[0];
|
|
243
|
+
_this.selectPivot(pivot, false);
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
var goNext = function () {
|
|
247
|
+
if (_this.selectedItem.wizardStep.onStepComplete) {
|
|
248
|
+
_this.selectedItem.wizardStep.onStepComplete();
|
|
249
|
+
}
|
|
250
|
+
if (_this.pivots()) {
|
|
251
|
+
var selectedIndex_1 = _this.getSelectedIndex(_this.pivots);
|
|
252
|
+
selectedIndex_1 = findNextPivot(selectedIndex_1 + 1);
|
|
253
|
+
if (selectedIndex_1 < _this.pivots().length) {
|
|
254
|
+
_this.selectedItem.completed(true);
|
|
255
|
+
_this.selectPivot(_this.pivots()[selectedIndex_1], true);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
var selectedIndex = _this.getSelectedIndex(_this.navItems);
|
|
260
|
+
if (selectedIndex === -1) {
|
|
261
|
+
_this.executeFinalAction();
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (selectedIndex < _this.navItems().length - 1) {
|
|
265
|
+
_this.selectedItem.completed(true);
|
|
266
|
+
_this.navItems()[selectedIndex].completed(true);
|
|
267
|
+
do {
|
|
268
|
+
selectedIndex++;
|
|
269
|
+
} while (
|
|
270
|
+
selectedIndex < _this.navItems().length &&
|
|
271
|
+
_this.navItems()[selectedIndex].wizardStep.cloacked &&
|
|
272
|
+
_this.navItems()[selectedIndex].wizardStep.cloacked()
|
|
273
|
+
);
|
|
274
|
+
if (selectedIndex === _this.navItems().length) {
|
|
275
|
+
_this.executeFinalAction();
|
|
276
|
+
} else {
|
|
277
|
+
_this.selectNavItem(_this.navItems()[selectedIndex], true);
|
|
278
|
+
}
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
_this.executeFinalAction();
|
|
282
|
+
};
|
|
283
|
+
this.previous = function () {
|
|
284
|
+
if (_this.selectedItem.wizardStep.onPrevious) {
|
|
285
|
+
_this.selectedItem.wizardStep.onPrevious();
|
|
286
|
+
}
|
|
287
|
+
if (_this.pivots()) {
|
|
288
|
+
var selectedIndex_2 = _this.getSelectedIndex(_this.pivots);
|
|
289
|
+
if (selectedIndex_2 > 0) {
|
|
290
|
+
selectedIndex_2 = findPreviousPivot(selectedIndex_2 - 1);
|
|
291
|
+
if (selectedIndex_2 >= 0) {
|
|
292
|
+
_this.selectedItem.validating = false;
|
|
293
|
+
_this.selectPivot(_this.pivots()[selectedIndex_2], false);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
var selectedIndex = _this.getSelectedIndex(_this.navItems);
|
|
299
|
+
selectedIndex =
|
|
300
|
+
selectedIndex === -1 ? _this.navItems().length : selectedIndex;
|
|
301
|
+
if (selectedIndex > 0) {
|
|
302
|
+
_this.selectedItem.validating = false;
|
|
303
|
+
do {
|
|
304
|
+
selectedIndex--;
|
|
305
|
+
} while (
|
|
306
|
+
_this.navItems()[selectedIndex].wizardStep.cloacked &&
|
|
307
|
+
_this.navItems()[selectedIndex].wizardStep.cloacked()
|
|
308
|
+
);
|
|
309
|
+
_this.selectNavItem(_this.navItems()[selectedIndex], false);
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
this.next = function () {
|
|
313
|
+
_this.selectedItem.validating = true;
|
|
314
|
+
var onNextPromise = Q(null);
|
|
315
|
+
if (_this.selectedItem.wizardStep.onNext) {
|
|
316
|
+
_this.waitingForOnNextCallback(true);
|
|
317
|
+
var promise = _this.selectedItem.wizardStep.onNext();
|
|
318
|
+
if (promise) {
|
|
319
|
+
onNextPromise = promise;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
onNextPromise
|
|
323
|
+
.then(
|
|
324
|
+
function () {
|
|
325
|
+
if (_this.validationObservable) {
|
|
326
|
+
if (_this.validationObservable()) {
|
|
327
|
+
goNext();
|
|
328
|
+
} else {
|
|
329
|
+
_this.errorMessage(genericErrorMessage);
|
|
330
|
+
_this.createValidationSubscription();
|
|
331
|
+
if (_this.selectedItem.wizardStep.logErrorMessage) {
|
|
332
|
+
_this.selectedItem.wizardStep.logErrorMessage(
|
|
333
|
+
_this.errorMessage()
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
} else if (_this.validateable && _this.validateable()) {
|
|
338
|
+
_this.validating(true);
|
|
339
|
+
_this
|
|
340
|
+
.validateable()
|
|
341
|
+
.isValid()
|
|
342
|
+
.then(function (result) {
|
|
343
|
+
if (result.valid) {
|
|
344
|
+
goNext();
|
|
345
|
+
} else {
|
|
346
|
+
if (_this.selectedItem.wizardStep.useCustomErrorMessage) {
|
|
347
|
+
_this.errorMessage(result.message);
|
|
348
|
+
} else {
|
|
349
|
+
_this.errorMessage(genericErrorMessage);
|
|
350
|
+
}
|
|
351
|
+
_this.createValidationSubscription();
|
|
352
|
+
if (_this.selectedItem.wizardStep.logErrorMessage) {
|
|
353
|
+
_this.selectedItem.wizardStep.logErrorMessage(
|
|
354
|
+
result.message || genericErrorMessage
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
})
|
|
359
|
+
.finally(function () {
|
|
360
|
+
_this.validating(false);
|
|
361
|
+
});
|
|
362
|
+
} else {
|
|
363
|
+
goNext();
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
function (reason) {
|
|
367
|
+
if (_this.selectedItem.wizardStep.logErrorMessage) {
|
|
368
|
+
_this.selectedItem.wizardStep.logErrorMessage(
|
|
369
|
+
JSON.stringify(reason)
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
)
|
|
374
|
+
.finally(function () {
|
|
375
|
+
_this.waitingForOnNextCallback(false);
|
|
376
|
+
});
|
|
377
|
+
};
|
|
378
|
+
this.nextButtonText = ko.pureComputed(function () {
|
|
379
|
+
var showNext = function (observableArray, nextIndex) {
|
|
380
|
+
var shouldShow = false;
|
|
381
|
+
for (
|
|
382
|
+
var i = nextIndex;
|
|
383
|
+
i < observableArray().length && !shouldShow;
|
|
384
|
+
i++
|
|
385
|
+
) {
|
|
386
|
+
if (
|
|
387
|
+
!observableArray()[i].wizardStep.cloacked ||
|
|
388
|
+
!observableArray()[i].wizardStep.cloacked()
|
|
389
|
+
) {
|
|
390
|
+
shouldShow = true;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
return shouldShow;
|
|
394
|
+
};
|
|
395
|
+
var selectedIndex = _this.getSelectedIndex(_this.navItems);
|
|
396
|
+
if (selectedIndex === -1) {
|
|
397
|
+
return ClientResources.wizardRetry;
|
|
398
|
+
}
|
|
399
|
+
if (_this.hasFinalStep) {
|
|
400
|
+
return ClientResources.wizardNext;
|
|
401
|
+
}
|
|
402
|
+
var shouldShowNext = showNext(_this.navItems, selectedIndex + 1);
|
|
403
|
+
if (!shouldShowNext && _this.pivots().length > 0) {
|
|
404
|
+
var selectedPivotIndex = _this.getSelectedIndex(_this.pivots);
|
|
405
|
+
shouldShowNext = showNext(_this.pivots, selectedPivotIndex + 1);
|
|
406
|
+
}
|
|
407
|
+
return shouldShowNext
|
|
408
|
+
? ClientResources.wizardNext
|
|
409
|
+
: ClientResources.wizardFinish;
|
|
410
|
+
});
|
|
411
|
+
this._lifetimeManager.registerForDispose(this.nextButtonText);
|
|
412
|
+
this.previousButtonVisible = ko.pureComputed(function () {
|
|
413
|
+
var index = 0;
|
|
414
|
+
while (
|
|
415
|
+
index < _this.navItems().length &&
|
|
416
|
+
_this.navItems()[index].wizardStep.cloacked &&
|
|
417
|
+
_this.navItems()[index].wizardStep.cloacked()
|
|
418
|
+
) {
|
|
419
|
+
index++;
|
|
420
|
+
}
|
|
421
|
+
var firstStep = _this.navItems()[index].wizardStep;
|
|
422
|
+
if (firstStep.substeps !== undefined && firstStep.substeps.length > 0) {
|
|
423
|
+
return firstStep.substeps[0].name !== _this.currentSubstep();
|
|
424
|
+
} else {
|
|
425
|
+
return firstStep.name !== _this.currentStep();
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
this.nextButtonVisible = ko.pureComputed(function () {
|
|
429
|
+
var selectedIndex = _this.getSelectedIndex(_this.navItems);
|
|
430
|
+
if (selectedIndex === -1 && !_this.showFinalNextButton()) {
|
|
431
|
+
return false;
|
|
432
|
+
} else {
|
|
433
|
+
return true;
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
this._lifetimeManager.registerForDispose(this.previousButtonVisible);
|
|
437
|
+
this._lifetimeManager.registerForDispose(this.nextButtonVisible);
|
|
438
|
+
this._lifetimeManager.registerForDispose(this.finalItemIndex);
|
|
439
|
+
this.visiblePivotGroupsCount = ko.computed(function () {
|
|
440
|
+
return _this.pivotGroups().filter(function (pg) {
|
|
441
|
+
return !pg.cloacked();
|
|
442
|
+
}).length;
|
|
443
|
+
});
|
|
444
|
+
ko.computed(function () {
|
|
445
|
+
_this.visibleNavItems(
|
|
446
|
+
_this.navItems().filter(function (itm) {
|
|
447
|
+
return !itm.wizardStep.cloacked || !itm.wizardStep.cloacked();
|
|
448
|
+
})
|
|
449
|
+
);
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
Wizard.prototype.setElement = function (element) {
|
|
453
|
+
this.element = element;
|
|
454
|
+
};
|
|
455
|
+
Wizard.prototype.dispose = function () {
|
|
456
|
+
if (this.validationSubscripton) {
|
|
457
|
+
this.validationSubscripton.dispose();
|
|
458
|
+
}
|
|
459
|
+
if (this.errorMessageSubscripton) {
|
|
460
|
+
this.errorMessageSubscripton.dispose();
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
Wizard.prototype.initialize = function () {
|
|
464
|
+
if (this.headerTemplate && this.headerViewModel) {
|
|
465
|
+
var headerContentElement = $(this.element).find(".wizardHeader")[0];
|
|
466
|
+
$(headerContentElement).html(this.headerTemplate);
|
|
467
|
+
ko.applyBindings(this.headerViewModel, headerContentElement);
|
|
468
|
+
}
|
|
469
|
+
this.selectNavItem(
|
|
470
|
+
this.navItems().filter(function (itm) {
|
|
471
|
+
return !itm.wizardStep.cloacked || !itm.wizardStep.cloacked();
|
|
472
|
+
})[0],
|
|
473
|
+
true
|
|
474
|
+
);
|
|
475
|
+
};
|
|
476
|
+
Wizard.prototype.executeFinalAction = function () {
|
|
477
|
+
if (this.finalAction) {
|
|
478
|
+
this.finalAction();
|
|
479
|
+
this.selectedItem.completed(true);
|
|
480
|
+
if (this.finalNavItem) {
|
|
481
|
+
this.selectNavItem(this.finalNavItem, true);
|
|
482
|
+
this.finalNavItem.completed(true);
|
|
483
|
+
this.hasPrevNextButtons(false);
|
|
484
|
+
this.showFinalNextButton(false);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
Wizard.prototype.getSelectedIndex = function (observableArray) {
|
|
489
|
+
var ret = -1;
|
|
490
|
+
observableArray().forEach(function (itm, i) {
|
|
491
|
+
if (itm.selected()) {
|
|
492
|
+
ret = i;
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
return ret;
|
|
496
|
+
};
|
|
497
|
+
Wizard.prototype.getIndexByName = function (observableArray, name) {
|
|
498
|
+
var ret = -1;
|
|
499
|
+
observableArray().forEach(function (itm, i) {
|
|
500
|
+
if (itm.wizardStep.name === name) {
|
|
501
|
+
ret = i;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
return ret;
|
|
505
|
+
};
|
|
506
|
+
Wizard.prototype.createValidationSubscription = function () {
|
|
507
|
+
var _this = this;
|
|
508
|
+
if (this.validationSubscripton) {
|
|
509
|
+
this.validationSubscripton.dispose();
|
|
510
|
+
this.validationSubscripton = null;
|
|
511
|
+
}
|
|
512
|
+
if (this.errorMessageSubscripton) {
|
|
513
|
+
this.errorMessageSubscripton.dispose();
|
|
514
|
+
this.errorMessageSubscripton = null;
|
|
515
|
+
}
|
|
516
|
+
var observableToSubscribe =
|
|
517
|
+
this.validationObservable ||
|
|
518
|
+
(this.validateable() && this.validateable().valid);
|
|
519
|
+
if (observableToSubscribe) {
|
|
520
|
+
this.validationSubscripton = observableToSubscribe.subscribe(function (
|
|
521
|
+
value
|
|
522
|
+
) {
|
|
523
|
+
_this.nextEnabled(value);
|
|
524
|
+
});
|
|
525
|
+
this.nextEnabled(observableToSubscribe());
|
|
526
|
+
}
|
|
527
|
+
if (this.validateable() && this.validateable().errorMessageOb) {
|
|
528
|
+
this.errorMessageSubscripton =
|
|
529
|
+
this.validateable().errorMessageOb.subscribe(function (value) {
|
|
530
|
+
_this.errorMessage(value);
|
|
531
|
+
});
|
|
532
|
+
this.errorMessage(this.validateable().errorMessageOb());
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
Wizard.prototype.renderItem = function (item, forwardNavigation) {
|
|
536
|
+
var _this = this;
|
|
537
|
+
item.validating = false;
|
|
538
|
+
var wizardContentElement = $(this.element).find(".wizardContentClass")[0];
|
|
539
|
+
ko.cleanNode(wizardContentElement);
|
|
540
|
+
var templateCopy = item.wizardStep.template;
|
|
541
|
+
var template;
|
|
542
|
+
if (typeof templateCopy === "string") {
|
|
543
|
+
template = templateCopy;
|
|
544
|
+
} else {
|
|
545
|
+
template = templateCopy();
|
|
546
|
+
}
|
|
547
|
+
$(wizardContentElement).html(template);
|
|
548
|
+
ko.applyBindings(item.wizardStep.viewModel, wizardContentElement);
|
|
549
|
+
this.validationObservable = item.wizardStep.validationObservable;
|
|
550
|
+
this.validateable = item.wizardStep.validateable;
|
|
551
|
+
if (item.validating) {
|
|
552
|
+
this.createValidationSubscription();
|
|
553
|
+
} else {
|
|
554
|
+
this.nextEnabled(true);
|
|
555
|
+
}
|
|
556
|
+
if (this.validatableSubscription) {
|
|
557
|
+
this.validatableSubscription.dispose();
|
|
558
|
+
}
|
|
559
|
+
if (item.wizardStep.validateable) {
|
|
560
|
+
this.validatableSubscription = item.wizardStep.validateable.subscribe(
|
|
561
|
+
function (validateable) {
|
|
562
|
+
item.validating = false;
|
|
563
|
+
_this.nextEnabled(true);
|
|
564
|
+
}
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
this.selectedItem = item;
|
|
568
|
+
var onLoadResult = undefined;
|
|
569
|
+
if (item.wizardStep.onForwardLoad && forwardNavigation) {
|
|
570
|
+
onLoadResult = item.wizardStep.onForwardLoad();
|
|
571
|
+
} else if (item.wizardStep.onLoad) {
|
|
572
|
+
onLoadResult = item.wizardStep.onLoad(forwardNavigation);
|
|
573
|
+
}
|
|
574
|
+
if (onLoadResult) {
|
|
575
|
+
this.stepLoading(true);
|
|
576
|
+
onLoadResult.finally(function () {
|
|
577
|
+
_this.stepLoading(false);
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
return Wizard;
|
|
582
|
+
})(Framework.Disposable.RootDisposable);
|
|
583
|
+
exports.Wizard = Wizard;
|
|
584
|
+
var WizardBindingHandler = (function () {
|
|
585
|
+
function WizardBindingHandler() {}
|
|
586
|
+
WizardBindingHandler.prototype.init = function (
|
|
587
|
+
element,
|
|
588
|
+
valueAccessor,
|
|
589
|
+
allBindingsAccessor,
|
|
590
|
+
viewModel,
|
|
591
|
+
bindingContext
|
|
592
|
+
) {
|
|
593
|
+
element.innerHTML = WizardBindingHandler.template;
|
|
594
|
+
var wizardVM = allBindingsAccessor.get(WizardBindingHandler.bindingName);
|
|
595
|
+
if (!(wizardVM instanceof Wizard)) {
|
|
596
|
+
logger.logDebug("viewModel has to be instance of Wizard");
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
var bindingElement = $(element).find(".wizardBindingElement")[0];
|
|
600
|
+
ko.applyBindings(wizardVM, bindingElement);
|
|
601
|
+
wizardVM.setElement(element);
|
|
602
|
+
wizardVM.initialize();
|
|
603
|
+
return { controlsDescendantBindings: false };
|
|
604
|
+
};
|
|
605
|
+
WizardBindingHandler.template = require("text!./Templates/WizardTemplate.html");
|
|
606
|
+
WizardBindingHandler.bindingName = "wizard";
|
|
607
|
+
return WizardBindingHandler;
|
|
608
|
+
})();
|
|
609
|
+
exports.WizardBindingHandler = WizardBindingHandler;
|
|
610
|
+
});
|
|
611
|
+
//# sourceMappingURL=WizardBinding.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
requirejs.config({
|
|
2
|
+
paths: {
|
|
3
|
+
"Viva.Controls":
|
|
4
|
+
"node_modules/@ms-atlas-module/datastudio-datafactory/libs/VivaGraphControl/Content/Scripts/Viva.Controls",
|
|
5
|
+
VivaCSS:
|
|
6
|
+
"node_modules/@ms-atlas-module/datastudio-datafactory/libs/VivaGraphControl/Content/CSS",
|
|
7
|
+
},
|
|
8
|
+
shim: {
|
|
9
|
+
"Viva.Controls/Controls/Visualization/Graph/GraphWidget": {
|
|
10
|
+
deps: ["css!VivaCSS/LightTheme.css", "css!VivaCSS/Graph.css"],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
define([
|
|
15
|
+
"require",
|
|
16
|
+
"exports",
|
|
17
|
+
"../libs/WinJS/WinJs.min",
|
|
18
|
+
"css!../libs/WinJS/ui-light.css",
|
|
19
|
+
"../_generated/ClientResources",
|
|
20
|
+
"css!../stylesheets/main.css",
|
|
21
|
+
"../scripts/ExposureControl",
|
|
22
|
+
], function (require, exports) {
|
|
23
|
+
WinJS.Application.start();
|
|
24
|
+
WinJS.UI.disableAnimations();
|
|
25
|
+
require(["./KnockoutBindings"], function (knockoutBindings) {
|
|
26
|
+
knockoutBindings.Bootstrapper.initialize();
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=startup.js.map
|