@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,67 @@
|
|
|
1
|
+
define(["require", "exports"], function (require, exports) {
|
|
2
|
+
"use strict";
|
|
3
|
+
var MonacoEditorKnockoutBinding = (function () {
|
|
4
|
+
function MonacoEditorKnockoutBinding() {}
|
|
5
|
+
MonacoEditorKnockoutBinding.prototype.init = function (
|
|
6
|
+
element,
|
|
7
|
+
valueAccessor,
|
|
8
|
+
allBindingsAccessor,
|
|
9
|
+
viewModel,
|
|
10
|
+
bindingContext
|
|
11
|
+
) {
|
|
12
|
+
var monacoElem = valueAccessor();
|
|
13
|
+
var container;
|
|
14
|
+
var updateValueComputed;
|
|
15
|
+
var isDisposed = false;
|
|
16
|
+
var createEditor = function () {
|
|
17
|
+
$(element).empty();
|
|
18
|
+
require(["vs/editor/editor.main"], function () {
|
|
19
|
+
if (isDisposed) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
container = Monaco.Editor.create(element, {
|
|
23
|
+
value: monacoElem.monacoGeneralSettings.value(),
|
|
24
|
+
mode: monacoElem.monacoGeneralSettings.mode,
|
|
25
|
+
readOnly:
|
|
26
|
+
monacoElem.monacoGeneralSettings.readOnly !== undefined
|
|
27
|
+
? monacoElem.monacoGeneralSettings.readOnly
|
|
28
|
+
: false,
|
|
29
|
+
});
|
|
30
|
+
container.addListener("change", function (val) {
|
|
31
|
+
monacoElem.monacoGeneralSettings.value(container.getValue());
|
|
32
|
+
});
|
|
33
|
+
updateValueComputed = ko.computed(function () {
|
|
34
|
+
var value = valueAccessor().monacoGeneralSettings.value();
|
|
35
|
+
if (container) {
|
|
36
|
+
container.setValue(value);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
if (monacoElem.monacoContainerVisible()) {
|
|
42
|
+
createEditor();
|
|
43
|
+
} else {
|
|
44
|
+
var subscription_1 = monacoElem.monacoContainerVisible.subscribe(
|
|
45
|
+
function (isVisible) {
|
|
46
|
+
if (isVisible) {
|
|
47
|
+
subscription_1.dispose();
|
|
48
|
+
createEditor();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
|
|
54
|
+
isDisposed = true;
|
|
55
|
+
if (container) {
|
|
56
|
+
updateValueComputed.dispose();
|
|
57
|
+
container.dispose();
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return { controlsDescendantBindings: true };
|
|
61
|
+
};
|
|
62
|
+
MonacoEditorKnockoutBinding.className = "monacoEditor";
|
|
63
|
+
return MonacoEditorKnockoutBinding;
|
|
64
|
+
})();
|
|
65
|
+
exports.MonacoEditorKnockoutBinding = MonacoEditorKnockoutBinding;
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=MonacoEditorKnockoutBinding.js.map
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"require",
|
|
3
|
+
"exports",
|
|
4
|
+
"./FormFields",
|
|
5
|
+
"../scripts/Framework/Util/Log",
|
|
6
|
+
"../scripts/Framework/Shared/DataConstants",
|
|
7
|
+
"css!./CSS/ParameterGroups.css",
|
|
8
|
+
"text!./Templates/ParameterGroupsTemplate.html",
|
|
9
|
+
], function (require, exports, FormFields_1, Log_1, DataConstants_1) {
|
|
10
|
+
"use strict";
|
|
11
|
+
var logger = Log_1.getLogger({
|
|
12
|
+
loggerName: "ParameterGroupsBinding",
|
|
13
|
+
});
|
|
14
|
+
var ParameterGroupsBinding = (function () {
|
|
15
|
+
function ParameterGroupsBinding() {}
|
|
16
|
+
ParameterGroupsBinding.prototype.init = function (
|
|
17
|
+
element,
|
|
18
|
+
valueAccessor,
|
|
19
|
+
allBindingsAccessor,
|
|
20
|
+
viewModel,
|
|
21
|
+
bindingContext
|
|
22
|
+
) {
|
|
23
|
+
var parameterViewModel = new ParameterGroupsViewModel(
|
|
24
|
+
valueAccessor().paramGroups,
|
|
25
|
+
valueAccessor().isSingleGroup,
|
|
26
|
+
valueAccessor().groupsTooltip,
|
|
27
|
+
valueAccessor().readOnly
|
|
28
|
+
);
|
|
29
|
+
element.innerHTML = ParameterGroupsBinding.template;
|
|
30
|
+
ko.applyBindingsToDescendants(parameterViewModel, element);
|
|
31
|
+
return { controlsDescendantBindings: true };
|
|
32
|
+
};
|
|
33
|
+
ParameterGroupsBinding.className = "parameterGroups";
|
|
34
|
+
ParameterGroupsBinding.template = require("text!./Templates/ParameterGroupsTemplate.html");
|
|
35
|
+
return ParameterGroupsBinding;
|
|
36
|
+
})();
|
|
37
|
+
exports.ParameterGroupsBinding = ParameterGroupsBinding;
|
|
38
|
+
var ParameterGroupsViewModel = (function () {
|
|
39
|
+
function ParameterGroupsViewModel(
|
|
40
|
+
paramGroups,
|
|
41
|
+
isSingleGroup,
|
|
42
|
+
groupsTooltip,
|
|
43
|
+
readOnly
|
|
44
|
+
) {
|
|
45
|
+
var _this = this;
|
|
46
|
+
if (isSingleGroup === void 0) {
|
|
47
|
+
isSingleGroup = true;
|
|
48
|
+
}
|
|
49
|
+
if (groupsTooltip === void 0) {
|
|
50
|
+
groupsTooltip = "";
|
|
51
|
+
}
|
|
52
|
+
if (readOnly === void 0) {
|
|
53
|
+
readOnly = false;
|
|
54
|
+
}
|
|
55
|
+
this.paramNameHeading = ClientResources.paramNameHeading;
|
|
56
|
+
this.paramValueHeading = ClientResources.paramValueHeading;
|
|
57
|
+
this.groups = ko.observableArray();
|
|
58
|
+
this.readOnly = ko.observable();
|
|
59
|
+
this.customClass = "smallWidthField";
|
|
60
|
+
this.isSingleGroup = ko.observable(true);
|
|
61
|
+
this.groupsTooltip = "";
|
|
62
|
+
this.deleteClicked = function (selectedParam) {
|
|
63
|
+
ko.utils
|
|
64
|
+
.arrayFirst(_this.originalGroups(), function (group) {
|
|
65
|
+
return group.title === selectedParam.groupTitle;
|
|
66
|
+
})
|
|
67
|
+
.params.remove(function (param) {
|
|
68
|
+
return param.key === selectedParam.key;
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
this.addClicked = function () {
|
|
72
|
+
_this.newParamProperties.name.validationEnabled(true);
|
|
73
|
+
_this.isAddClicked(true);
|
|
74
|
+
var passedParam = {
|
|
75
|
+
key: ko.observable(_this.newParamProperties.name.value()),
|
|
76
|
+
value: ko.observable(_this.newParamProperties.value.value()),
|
|
77
|
+
};
|
|
78
|
+
if (passedParam.key() === "") {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (_this.isSingleGroup()) {
|
|
82
|
+
if (
|
|
83
|
+
!_this.isKeyAlreadyAdded(
|
|
84
|
+
_this.originalGroups()[0].params,
|
|
85
|
+
passedParam.key
|
|
86
|
+
)
|
|
87
|
+
) {
|
|
88
|
+
_this.addPairAndResetFields(
|
|
89
|
+
_this.originalGroups()[0].params,
|
|
90
|
+
passedParam
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
var selectedGroup = ko.utils.arrayFirst(
|
|
95
|
+
_this.originalGroups(),
|
|
96
|
+
function (group) {
|
|
97
|
+
return group.title === _this.displayinGroups.value();
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
if (!_this.isKeyAlreadyAdded(selectedGroup.params, passedParam.key)) {
|
|
101
|
+
_this.addPairAndResetFields(selectedGroup.params, passedParam);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (!_this.isSingleGroup()) {
|
|
105
|
+
_this.displayinGroups.value.subscribe(function (value) {
|
|
106
|
+
_this.isKeyUnique(true);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
_this.newParamProperties.name.value.subscribe(function (value) {
|
|
110
|
+
_this.isKeyUnique(true);
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
this.readOnly(readOnly);
|
|
114
|
+
this.originalGroups = paramGroups;
|
|
115
|
+
this.isSingleGroup(isSingleGroup);
|
|
116
|
+
this.groupsTooltip = groupsTooltip;
|
|
117
|
+
paramGroups.subscribe(this.initializeNewGroups, this);
|
|
118
|
+
this.initializeNewGroups(paramGroups());
|
|
119
|
+
this.newParamProperties = {
|
|
120
|
+
name: new FormFields_1.ValidatedBoxViewModel({
|
|
121
|
+
label: this.paramNameHeading,
|
|
122
|
+
defaultValue: "",
|
|
123
|
+
validations: [
|
|
124
|
+
function (name) {
|
|
125
|
+
return _this.keyValidation(name);
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
}),
|
|
129
|
+
value: new FormFields_1.ValidatedBoxViewModel({
|
|
130
|
+
label: this.paramValueHeading,
|
|
131
|
+
defaultValue: "",
|
|
132
|
+
}),
|
|
133
|
+
};
|
|
134
|
+
this.isKeyUnique = ko.observable(true);
|
|
135
|
+
this.isAddClicked = ko.observable(false);
|
|
136
|
+
var existingGroups = ko.observableArray([]);
|
|
137
|
+
this.groups().forEach(function (gr) {
|
|
138
|
+
existingGroups.push({ value: gr.title, displayText: gr.title });
|
|
139
|
+
});
|
|
140
|
+
this.displayinGroups = new FormFields_1.ValidatedSelectBoxViewModel(
|
|
141
|
+
existingGroups,
|
|
142
|
+
{ label: "Groups", infoBalloon: this.groupsTooltip }
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
ParameterGroupsViewModel.prototype.isKeyAlreadyAdded = function (
|
|
146
|
+
group,
|
|
147
|
+
key
|
|
148
|
+
) {
|
|
149
|
+
var keyValue = key();
|
|
150
|
+
var groupCopy = group();
|
|
151
|
+
for (var i = 0; i < groupCopy.length; i++) {
|
|
152
|
+
if (groupCopy[i].key() === keyValue) {
|
|
153
|
+
this.isKeyUnique(false);
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return false;
|
|
158
|
+
};
|
|
159
|
+
ParameterGroupsViewModel.prototype.addPairAndResetFields = function (
|
|
160
|
+
group,
|
|
161
|
+
newParam
|
|
162
|
+
) {
|
|
163
|
+
group.push(newParam);
|
|
164
|
+
this.isAddClicked(false);
|
|
165
|
+
this.newParamProperties.name.value("");
|
|
166
|
+
this.newParamProperties.value.value("");
|
|
167
|
+
};
|
|
168
|
+
ParameterGroupsViewModel.prototype.initializeNewGroups = function (
|
|
169
|
+
updatedList
|
|
170
|
+
) {
|
|
171
|
+
var _this = this;
|
|
172
|
+
updatedList.forEach(function (group) {
|
|
173
|
+
if (
|
|
174
|
+
!_this.groups().some(function (groupWithForm) {
|
|
175
|
+
return groupWithForm.title === group.title;
|
|
176
|
+
})
|
|
177
|
+
) {
|
|
178
|
+
_this.addGroup(group);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
ParameterGroupsViewModel.prototype.addGroup = function (group) {
|
|
183
|
+
var _this = this;
|
|
184
|
+
var validatedParams = ko.observableArray();
|
|
185
|
+
group.params().forEach(function (param) {
|
|
186
|
+
_this.addParam(param, validatedParams, group.title);
|
|
187
|
+
});
|
|
188
|
+
this.groups.push({ title: group.title, params: validatedParams });
|
|
189
|
+
group.params.subscribe(
|
|
190
|
+
function (arrayUpdates) {
|
|
191
|
+
var existingGroup;
|
|
192
|
+
_this.groups().forEach(function (groupWithForm) {
|
|
193
|
+
if (group.title === groupWithForm.title) {
|
|
194
|
+
existingGroup = groupWithForm;
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
if (existingGroup) {
|
|
199
|
+
arrayUpdates.forEach(function (arrayChange) {
|
|
200
|
+
if (arrayChange.moved || arrayChange.moved === 0) {
|
|
201
|
+
logger.logError("Group parameters should not be moved");
|
|
202
|
+
} else if (
|
|
203
|
+
arrayChange.status ===
|
|
204
|
+
DataConstants_1.ObsArrayChangeStatus.added
|
|
205
|
+
) {
|
|
206
|
+
_this.addParam(
|
|
207
|
+
arrayChange.value,
|
|
208
|
+
existingGroup.params,
|
|
209
|
+
existingGroup.title
|
|
210
|
+
);
|
|
211
|
+
} else if (
|
|
212
|
+
arrayChange.status ===
|
|
213
|
+
DataConstants_1.ObsArrayChangeStatus.deleted
|
|
214
|
+
) {
|
|
215
|
+
existingGroup.params().forEach(function (validatedParam) {
|
|
216
|
+
if (validatedParam.key === arrayChange.value.key) {
|
|
217
|
+
existingGroup.params.remove(validatedParam);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
} else {
|
|
222
|
+
logger.logError(
|
|
223
|
+
"Unrecognized ko arrayChange status: " + arrayChange.status
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
} else {
|
|
228
|
+
logger.logError(
|
|
229
|
+
"Group with title " +
|
|
230
|
+
group.title +
|
|
231
|
+
" was expected in paramter binding groups but was not found."
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
null,
|
|
236
|
+
"arrayChange"
|
|
237
|
+
);
|
|
238
|
+
};
|
|
239
|
+
ParameterGroupsViewModel.prototype.addParam = function (
|
|
240
|
+
param,
|
|
241
|
+
destination,
|
|
242
|
+
groupTitle
|
|
243
|
+
) {
|
|
244
|
+
var newParam = {
|
|
245
|
+
key: param.key,
|
|
246
|
+
value: param.value,
|
|
247
|
+
keyForm: new FormFields_1.ValidatedBoxViewModel({
|
|
248
|
+
label: "",
|
|
249
|
+
defaultValue: param.key(),
|
|
250
|
+
}),
|
|
251
|
+
valueForm: new FormFields_1.ValidatedBoxViewModel({
|
|
252
|
+
label: "",
|
|
253
|
+
defaultValue: param.value(),
|
|
254
|
+
}),
|
|
255
|
+
groupTitle: groupTitle,
|
|
256
|
+
};
|
|
257
|
+
newParam.keyForm.value.subscribe(param.key);
|
|
258
|
+
newParam.valueForm.value.subscribe(param.value);
|
|
259
|
+
destination.push(newParam);
|
|
260
|
+
};
|
|
261
|
+
ParameterGroupsViewModel.prototype.keyValidation = function (name) {
|
|
262
|
+
if (name) {
|
|
263
|
+
if (this.isKeyUnique()) {
|
|
264
|
+
return Q({
|
|
265
|
+
valid: true,
|
|
266
|
+
message: "",
|
|
267
|
+
});
|
|
268
|
+
} else {
|
|
269
|
+
return Q({
|
|
270
|
+
valid: false,
|
|
271
|
+
message: ClientResources.ValidationNameAlreadyTaken,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
} else if (this.isAddClicked()) {
|
|
275
|
+
return Q({
|
|
276
|
+
valid: false,
|
|
277
|
+
message: ClientResources.ValidationFieldIsRequired,
|
|
278
|
+
});
|
|
279
|
+
} else {
|
|
280
|
+
return Q({
|
|
281
|
+
valid: true,
|
|
282
|
+
message: "",
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
return ParameterGroupsViewModel;
|
|
287
|
+
})();
|
|
288
|
+
});
|
|
289
|
+
//# sourceMappingURL=ParameterGroupsBinding.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"require",
|
|
3
|
+
"exports",
|
|
4
|
+
"css!./CSS/Pivot.css",
|
|
5
|
+
"text!./Templates/PivotTemplate.html",
|
|
6
|
+
], function (require, exports) {
|
|
7
|
+
"use strict";
|
|
8
|
+
var PivotViewModel = (function () {
|
|
9
|
+
function PivotViewModel(pivotItems, initialSelection) {
|
|
10
|
+
this.displayPivotItems = pivotItems.map(function (pivotItem, index) {
|
|
11
|
+
return {
|
|
12
|
+
header: pivotItem.header,
|
|
13
|
+
viewModel: pivotItem.viewModel,
|
|
14
|
+
template: pivotItem.template,
|
|
15
|
+
selected: ko.observable(index === initialSelection ? true : false),
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
this.existingSelection = ko.observable(
|
|
19
|
+
this.displayPivotItems[initialSelection]
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
return PivotViewModel;
|
|
23
|
+
})();
|
|
24
|
+
var PivotKnockoutBinding = (function () {
|
|
25
|
+
function PivotKnockoutBinding() {}
|
|
26
|
+
PivotKnockoutBinding.prototype.init = function (
|
|
27
|
+
element,
|
|
28
|
+
valueAccessor,
|
|
29
|
+
allBindingsAccessor,
|
|
30
|
+
viewModel,
|
|
31
|
+
bindingContext
|
|
32
|
+
) {
|
|
33
|
+
var initialSelection = valueAccessor().initialSelection
|
|
34
|
+
? valueAccessor().initialSelection
|
|
35
|
+
: 0;
|
|
36
|
+
var pivotViewModel = new PivotViewModel(
|
|
37
|
+
valueAccessor().pivotItems,
|
|
38
|
+
initialSelection
|
|
39
|
+
);
|
|
40
|
+
var selectionChangedCallback = valueAccessor().onSelectionChanged;
|
|
41
|
+
pivotViewModel.handlePivotItemSelection = function (selectedItem) {
|
|
42
|
+
if (selectedItem !== pivotViewModel.existingSelection()) {
|
|
43
|
+
pivotViewModel.existingSelection().selected(false);
|
|
44
|
+
selectedItem.selected(true);
|
|
45
|
+
pivotViewModel.existingSelection(selectedItem);
|
|
46
|
+
if (selectionChangedCallback) {
|
|
47
|
+
selectionChangedCallback(selectedItem);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
element.innerHTML = PivotKnockoutBinding.template;
|
|
52
|
+
ko.applyBindingsToDescendants(pivotViewModel, element);
|
|
53
|
+
return { controlsDescendantBindings: true };
|
|
54
|
+
};
|
|
55
|
+
PivotKnockoutBinding.className = "pivot";
|
|
56
|
+
PivotKnockoutBinding.template = require("text!./Templates/PivotTemplate.html");
|
|
57
|
+
return PivotKnockoutBinding;
|
|
58
|
+
})();
|
|
59
|
+
exports.PivotKnockoutBinding = PivotKnockoutBinding;
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=PivotKnockoutBinding.js.map
|