@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,397 @@
|
|
|
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
|
+
"text!./Templates/FormFieldTemplate.html",
|
|
16
|
+
"text!./Templates/PasswordboxTemplate.html",
|
|
17
|
+
"text!./Templates/TextareaTemplate.html",
|
|
18
|
+
"text!./Templates/ComboboxTemplate.html",
|
|
19
|
+
"text!./Templates/TextboxTemplate.html",
|
|
20
|
+
"text!./Templates/TextboxWithPrefixTemplate.html",
|
|
21
|
+
"text!./Templates/FileInputTemplate.html",
|
|
22
|
+
"text!./images/Info.svg",
|
|
23
|
+
"css!./CSS/FormFields.css",
|
|
24
|
+
"css!./CSS/Common.css",
|
|
25
|
+
], function (require, exports, Log) {
|
|
26
|
+
"use strict";
|
|
27
|
+
var logger = Log.getLogger({ loggerName: "FormFields" });
|
|
28
|
+
function getDefaultOption(options) {
|
|
29
|
+
var defaultOptions = options.filter(function (opt) {
|
|
30
|
+
return opt.isDefault;
|
|
31
|
+
});
|
|
32
|
+
if (defaultOptions.length > 0) {
|
|
33
|
+
return defaultOptions[0];
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
exports.getDefaultOption = getDefaultOption;
|
|
38
|
+
var ValidatedBoxViewModel = (function () {
|
|
39
|
+
function ValidatedBoxViewModel(formFieldOptions) {
|
|
40
|
+
var _this = this;
|
|
41
|
+
this.value = ko.observable();
|
|
42
|
+
this.validationEnabled = ko.observable(false);
|
|
43
|
+
this.valid = ko.observable();
|
|
44
|
+
this.validating = ko.observable(false);
|
|
45
|
+
this.hasValidation = ko.observable(false);
|
|
46
|
+
this.errorMessage = ko.observable();
|
|
47
|
+
this.options = formFieldOptions;
|
|
48
|
+
if (this.options.enabled === undefined) {
|
|
49
|
+
this.options.enabled = ko.observable(true);
|
|
50
|
+
}
|
|
51
|
+
if (this.options.visible === undefined) {
|
|
52
|
+
this.options.visible = ko.observable(true);
|
|
53
|
+
}
|
|
54
|
+
this.labelText = formFieldOptions.label;
|
|
55
|
+
this.infoBalloonText = formFieldOptions.infoBalloon;
|
|
56
|
+
if (this.options.balloonSize === undefined) {
|
|
57
|
+
this.options.balloonSize = ko.observable("medium");
|
|
58
|
+
}
|
|
59
|
+
this.value(formFieldOptions.defaultValue);
|
|
60
|
+
this.required = ko.computed(function () {
|
|
61
|
+
var labelText = _this.labelText;
|
|
62
|
+
if (typeof labelText === "string") {
|
|
63
|
+
return formFieldOptions.required;
|
|
64
|
+
} else {
|
|
65
|
+
return formFieldOptions.required && !!labelText();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
this.placeholder = formFieldOptions.placeholder;
|
|
69
|
+
this.indicateSuccess = !!formFieldOptions.indicateSuccess;
|
|
70
|
+
this.id = "idFormField" + ValidatedBoxViewModel.currentId++;
|
|
71
|
+
this.setValidation(formFieldOptions.validations);
|
|
72
|
+
ko.computed(function () {
|
|
73
|
+
if (_this.validationEnabled()) {
|
|
74
|
+
_this.validating(true);
|
|
75
|
+
var valPromise_1 = undefined;
|
|
76
|
+
var capturedValue_1 = _this.value();
|
|
77
|
+
var getNextPromise = function (promise, index) {
|
|
78
|
+
if (promise === undefined) {
|
|
79
|
+
return _this._validate[index](capturedValue_1);
|
|
80
|
+
}
|
|
81
|
+
return promise.then(function (result) {
|
|
82
|
+
if (!result.valid) {
|
|
83
|
+
return Q(result);
|
|
84
|
+
} else {
|
|
85
|
+
return _this._validate[index](capturedValue_1);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
for (var i = 0; i < _this._validate.length; i++) {
|
|
90
|
+
valPromise_1 = getNextPromise(valPromise_1, i);
|
|
91
|
+
}
|
|
92
|
+
valPromise_1 = valPromise_1 || Q({ valid: true, message: "" });
|
|
93
|
+
_this._valPromise = valPromise_1;
|
|
94
|
+
_this._valPromise
|
|
95
|
+
.then(
|
|
96
|
+
function (result) {
|
|
97
|
+
if (valPromise_1 === _this._valPromise) {
|
|
98
|
+
_this.valid(result.valid);
|
|
99
|
+
if (!_this.valid()) {
|
|
100
|
+
_this.errorMessage(result.message);
|
|
101
|
+
}
|
|
102
|
+
if (_this.valid()) {
|
|
103
|
+
_this.errorMessage("");
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
function (reason) {
|
|
108
|
+
if (valPromise_1 === _this._valPromise) {
|
|
109
|
+
_this.errorMessage("Unable to validate");
|
|
110
|
+
_this.valid(false);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
.finally(function () {
|
|
115
|
+
_this.validating(false);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
ValidatedBoxViewModel.prototype.setValidation = function (valFunctions) {
|
|
121
|
+
this.hasValidation(valFunctions && valFunctions.length > 0);
|
|
122
|
+
this._validate = valFunctions;
|
|
123
|
+
};
|
|
124
|
+
ValidatedBoxViewModel.prototype.isValid = function () {
|
|
125
|
+
this.validationEnabled(true);
|
|
126
|
+
if (this.validating()) {
|
|
127
|
+
return this._valPromise;
|
|
128
|
+
} else {
|
|
129
|
+
return Q({ valid: this.valid(), message: this.errorMessage() });
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
Object.defineProperty(ValidatedBoxViewModel.prototype, "label", {
|
|
133
|
+
get: function () {
|
|
134
|
+
return ko.unwrap(this.labelText);
|
|
135
|
+
},
|
|
136
|
+
enumerable: true,
|
|
137
|
+
configurable: true,
|
|
138
|
+
});
|
|
139
|
+
ValidatedBoxViewModel.currentId = new Date().getTime();
|
|
140
|
+
return ValidatedBoxViewModel;
|
|
141
|
+
})();
|
|
142
|
+
exports.ValidatedBoxViewModel = ValidatedBoxViewModel;
|
|
143
|
+
var ValidatedSelectBoxViewModel = (function (_super) {
|
|
144
|
+
__extends(ValidatedSelectBoxViewModel, _super);
|
|
145
|
+
function ValidatedSelectBoxViewModel(
|
|
146
|
+
optionList,
|
|
147
|
+
formFieldOptions,
|
|
148
|
+
fullOptionList
|
|
149
|
+
) {
|
|
150
|
+
var _this = this;
|
|
151
|
+
_super.call(this, formFieldOptions);
|
|
152
|
+
this.focusing = ko.observable(false);
|
|
153
|
+
this.optionList = optionList;
|
|
154
|
+
this.fullOptionList = fullOptionList;
|
|
155
|
+
if (this.fullOptionList) {
|
|
156
|
+
this.focusing.subscribe(function (value) {
|
|
157
|
+
if (value) {
|
|
158
|
+
_this.optionList(_this.fullOptionList());
|
|
159
|
+
} else {
|
|
160
|
+
_this.optionList([
|
|
161
|
+
{
|
|
162
|
+
value: _this.value().toString(),
|
|
163
|
+
displayText: _this.displayText,
|
|
164
|
+
},
|
|
165
|
+
]);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
Object.defineProperty(
|
|
171
|
+
ValidatedSelectBoxViewModel.prototype,
|
|
172
|
+
"selectedOption",
|
|
173
|
+
{
|
|
174
|
+
get: function () {
|
|
175
|
+
var _this = this;
|
|
176
|
+
var options = this.optionList().filter(function (option) {
|
|
177
|
+
return option.value === _this.value().toString();
|
|
178
|
+
});
|
|
179
|
+
if (options.length >= 1) {
|
|
180
|
+
return options[0];
|
|
181
|
+
}
|
|
182
|
+
return undefined;
|
|
183
|
+
},
|
|
184
|
+
enumerable: true,
|
|
185
|
+
configurable: true,
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
Object.defineProperty(
|
|
189
|
+
ValidatedSelectBoxViewModel.prototype,
|
|
190
|
+
"displayText",
|
|
191
|
+
{
|
|
192
|
+
get: function () {
|
|
193
|
+
var _this = this;
|
|
194
|
+
var selectedOption = this.optionList().filter(function (option) {
|
|
195
|
+
return option.value === _this.value().toString();
|
|
196
|
+
});
|
|
197
|
+
if (selectedOption.length === 1) {
|
|
198
|
+
return selectedOption[0].displayText;
|
|
199
|
+
} else if (selectedOption.length > 1) {
|
|
200
|
+
logger.logWarning(
|
|
201
|
+
"The selected option matched {0} options from the list. Returning the display text of the first one.".format(
|
|
202
|
+
selectedOption.length
|
|
203
|
+
)
|
|
204
|
+
);
|
|
205
|
+
return selectedOption[0].displayText;
|
|
206
|
+
} else if (selectedOption.length === 0) {
|
|
207
|
+
return "";
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
enumerable: true,
|
|
211
|
+
configurable: true,
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
return ValidatedSelectBoxViewModel;
|
|
215
|
+
})(ValidatedBoxViewModel);
|
|
216
|
+
exports.ValidatedSelectBoxViewModel = ValidatedSelectBoxViewModel;
|
|
217
|
+
var ValidatedFileBoxViewModel = (function (_super) {
|
|
218
|
+
__extends(ValidatedFileBoxViewModel, _super);
|
|
219
|
+
function ValidatedFileBoxViewModel(formFieldOptions) {
|
|
220
|
+
_super.call(this, formFieldOptions);
|
|
221
|
+
this.accept = ko.observable("");
|
|
222
|
+
}
|
|
223
|
+
return ValidatedFileBoxViewModel;
|
|
224
|
+
})(ValidatedBoxViewModel);
|
|
225
|
+
exports.ValidatedFileBoxViewModel = ValidatedFileBoxViewModel;
|
|
226
|
+
var ValidatedFixedPrefixBoxViewModel = (function (_super) {
|
|
227
|
+
__extends(ValidatedFixedPrefixBoxViewModel, _super);
|
|
228
|
+
function ValidatedFixedPrefixBoxViewModel(staticPrefix, formFieldOptions) {
|
|
229
|
+
var _this = this;
|
|
230
|
+
_super.call(this, formFieldOptions);
|
|
231
|
+
this.keyEvent = function (data, event) {
|
|
232
|
+
var element = event.target;
|
|
233
|
+
if (event.which !== 37 && event.which !== 39 && !event.ctrlKey) {
|
|
234
|
+
if (element.selectionStart < _this.staticPrefix.length) {
|
|
235
|
+
if (element.selectionEnd > _this.staticPrefix.length) {
|
|
236
|
+
element.selectionStart = _this.staticPrefix.length;
|
|
237
|
+
} else {
|
|
238
|
+
element.selectionStart = element.selectionEnd;
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
} else if (element.selectionStart === _this.staticPrefix.length) {
|
|
242
|
+
if (
|
|
243
|
+
element.selectionEnd === _this.staticPrefix.length &&
|
|
244
|
+
event.which === 8
|
|
245
|
+
) {
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return true;
|
|
251
|
+
};
|
|
252
|
+
this.clipboardEvent = function (data, event) {
|
|
253
|
+
var element = event.target;
|
|
254
|
+
if (
|
|
255
|
+
event.type === "cut" &&
|
|
256
|
+
element.selectionStart < _this.staticPrefix.length
|
|
257
|
+
) {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
if (event.type === "paste") {
|
|
261
|
+
if (element.selectionStart < _this.staticPrefix.length) {
|
|
262
|
+
if (element.selectionEnd > _this.staticPrefix.length) {
|
|
263
|
+
element.selectionStart = _this.staticPrefix.length;
|
|
264
|
+
} else {
|
|
265
|
+
element.selectionStart = _this.staticPrefix.length;
|
|
266
|
+
element.selectionEnd = _this.staticPrefix.length;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return true;
|
|
271
|
+
};
|
|
272
|
+
this.staticPrefix = staticPrefix;
|
|
273
|
+
this.value(staticPrefix);
|
|
274
|
+
}
|
|
275
|
+
ValidatedFixedPrefixBoxViewModel.prototype.setPrefix = function (prefix) {
|
|
276
|
+
this.staticPrefix = prefix;
|
|
277
|
+
this.value(prefix + this.value());
|
|
278
|
+
};
|
|
279
|
+
return ValidatedFixedPrefixBoxViewModel;
|
|
280
|
+
})(ValidatedBoxViewModel);
|
|
281
|
+
exports.ValidatedFixedPrefixBoxViewModel = ValidatedFixedPrefixBoxViewModel;
|
|
282
|
+
var BoxViewModel = (function () {
|
|
283
|
+
function BoxViewModel(params) {
|
|
284
|
+
var _this = this;
|
|
285
|
+
this.validationImageClass = ko.observable(
|
|
286
|
+
BoxViewModel.baseValidationImageClass
|
|
287
|
+
);
|
|
288
|
+
this.viewModel = params.vm;
|
|
289
|
+
this.customClass = params.customClass;
|
|
290
|
+
this.warningMessage = params.vm.warningMessage;
|
|
291
|
+
ko.computed(function () {
|
|
292
|
+
if (!_this.viewModel.validationEnabled()) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
if (_this.viewModel.validating()) {
|
|
296
|
+
_this.validationImageClass(
|
|
297
|
+
BoxViewModel.baseValidationImageClass + " progresso"
|
|
298
|
+
);
|
|
299
|
+
} else if (_this.viewModel.valid() && _this.viewModel.indicateSuccess) {
|
|
300
|
+
_this.validationImageClass(
|
|
301
|
+
BoxViewModel.baseValidationImageClass + " successo"
|
|
302
|
+
);
|
|
303
|
+
} else if (!_this.viewModel.valid()) {
|
|
304
|
+
_this.validationImageClass(
|
|
305
|
+
BoxViewModel.baseValidationImageClass + " failo"
|
|
306
|
+
);
|
|
307
|
+
} else {
|
|
308
|
+
_this.validationImageClass(BoxViewModel.baseValidationImageClass);
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
BoxViewModel.formFieldTemplate = require("text!./Templates/FormFieldTemplate.html");
|
|
313
|
+
BoxViewModel.textboxInput = require("text!./Templates/TextboxTemplate.html");
|
|
314
|
+
BoxViewModel.textboxWithFixedPrefixInput = require("text!./Templates/TextboxWithPrefixTemplate.html");
|
|
315
|
+
BoxViewModel.comboboxInput = require("text!./Templates/ComboboxTemplate.html");
|
|
316
|
+
BoxViewModel.passwordInput = require("text!./Templates/PasswordboxTemplate.html");
|
|
317
|
+
BoxViewModel.fileInput = require("text!./Templates/FileInputTemplate.html");
|
|
318
|
+
BoxViewModel.textareaInput = require("text!./Templates/TextareaTemplate.html");
|
|
319
|
+
BoxViewModel.baseValidationImageClass = "validationImage";
|
|
320
|
+
return BoxViewModel;
|
|
321
|
+
})();
|
|
322
|
+
exports.BoxViewModel = BoxViewModel;
|
|
323
|
+
var SelectBoxViewModel = (function (_super) {
|
|
324
|
+
__extends(SelectBoxViewModel, _super);
|
|
325
|
+
function SelectBoxViewModel(params) {
|
|
326
|
+
_super.call(this, params);
|
|
327
|
+
this.optionList = params.vm.optionList;
|
|
328
|
+
}
|
|
329
|
+
return SelectBoxViewModel;
|
|
330
|
+
})(BoxViewModel);
|
|
331
|
+
exports.SelectBoxViewModel = SelectBoxViewModel;
|
|
332
|
+
var FileBoxViewModel = (function (_super) {
|
|
333
|
+
__extends(FileBoxViewModel, _super);
|
|
334
|
+
function FileBoxViewModel(params) {
|
|
335
|
+
_super.call(this, params);
|
|
336
|
+
this.accept = params.vm.accept;
|
|
337
|
+
this.fileChange = params.vm.fileChange;
|
|
338
|
+
}
|
|
339
|
+
return FileBoxViewModel;
|
|
340
|
+
})(BoxViewModel);
|
|
341
|
+
exports.FileBoxViewModel = FileBoxViewModel;
|
|
342
|
+
if (!ko.components.isRegistered("datafactory-validatedtextbox")) {
|
|
343
|
+
ko.components.register("datafactory-validatedtextbox", {
|
|
344
|
+
viewModel: BoxViewModel,
|
|
345
|
+
template: BoxViewModel.formFieldTemplate.replace(
|
|
346
|
+
"%%INPUTFIELD%%",
|
|
347
|
+
BoxViewModel.textboxInput
|
|
348
|
+
),
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
if (!ko.components.isRegistered("datafactory-validatedpasswordbox")) {
|
|
352
|
+
ko.components.register("datafactory-validatedpasswordbox", {
|
|
353
|
+
viewModel: BoxViewModel,
|
|
354
|
+
template: BoxViewModel.formFieldTemplate.replace(
|
|
355
|
+
"%%INPUTFIELD%%",
|
|
356
|
+
BoxViewModel.passwordInput
|
|
357
|
+
),
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
if (!ko.components.isRegistered("datafactory-validatedtextareabox")) {
|
|
361
|
+
ko.components.register("datafactory-validatedtextareabox", {
|
|
362
|
+
viewModel: BoxViewModel,
|
|
363
|
+
template: BoxViewModel.formFieldTemplate.replace(
|
|
364
|
+
"%%INPUTFIELD%%",
|
|
365
|
+
BoxViewModel.textareaInput
|
|
366
|
+
),
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
if (!ko.components.isRegistered("datafactory-validatedselectbox")) {
|
|
370
|
+
ko.components.register("datafactory-validatedselectbox", {
|
|
371
|
+
viewModel: SelectBoxViewModel,
|
|
372
|
+
template: BoxViewModel.formFieldTemplate.replace(
|
|
373
|
+
"%%INPUTFIELD%%",
|
|
374
|
+
BoxViewModel.comboboxInput
|
|
375
|
+
),
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
if (!ko.components.isRegistered("datafactory-validatedfixedprefixtextbox")) {
|
|
379
|
+
ko.components.register("datafactory-validatedfixedprefixtextbox", {
|
|
380
|
+
viewModel: BoxViewModel,
|
|
381
|
+
template: BoxViewModel.formFieldTemplate.replace(
|
|
382
|
+
"%%INPUTFIELD%%",
|
|
383
|
+
BoxViewModel.textboxWithFixedPrefixInput
|
|
384
|
+
),
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
if (!ko.components.isRegistered("datafactory-validatedfilebox")) {
|
|
388
|
+
ko.components.register("datafactory-validatedfilebox", {
|
|
389
|
+
viewModel: FileBoxViewModel,
|
|
390
|
+
template: BoxViewModel.formFieldTemplate.replace(
|
|
391
|
+
"%%INPUTFIELD%%",
|
|
392
|
+
BoxViewModel.fileInput
|
|
393
|
+
),
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
//# sourceMappingURL=FormFields.js.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
define([
|
|
2
|
+
"require",
|
|
3
|
+
"exports",
|
|
4
|
+
"../_generated/Framework",
|
|
5
|
+
"css!./CSS/InlineBlock.css",
|
|
6
|
+
"text!./Templates/InlineBlockTemplate.html",
|
|
7
|
+
], function (require, exports, Framework_1) {
|
|
8
|
+
"use strict";
|
|
9
|
+
(function (InlineBlockStatus) {
|
|
10
|
+
InlineBlockStatus[(InlineBlockStatus["Error"] = 0)] = "Error";
|
|
11
|
+
InlineBlockStatus[(InlineBlockStatus["Warning"] = 1)] = "Warning";
|
|
12
|
+
InlineBlockStatus[(InlineBlockStatus["Info"] = 2)] = "Info";
|
|
13
|
+
})(exports.InlineBlockStatus || (exports.InlineBlockStatus = {}));
|
|
14
|
+
var InlineBlockStatus = exports.InlineBlockStatus;
|
|
15
|
+
var InlineBlockBinding = (function () {
|
|
16
|
+
function InlineBlockBinding() {}
|
|
17
|
+
InlineBlockBinding.prototype.init = function (
|
|
18
|
+
element,
|
|
19
|
+
valueAccessor,
|
|
20
|
+
allBindingsAccessor,
|
|
21
|
+
viewModel,
|
|
22
|
+
bindingContext
|
|
23
|
+
) {
|
|
24
|
+
var va = valueAccessor();
|
|
25
|
+
var inlineBlockViewModel = new InlineBlockViewModel(
|
|
26
|
+
va.message,
|
|
27
|
+
va.status,
|
|
28
|
+
va.visible,
|
|
29
|
+
va.dismissible
|
|
30
|
+
);
|
|
31
|
+
element.innerHTML = InlineBlockBinding.template;
|
|
32
|
+
ko.applyBindingsToDescendants(inlineBlockViewModel, element);
|
|
33
|
+
return { controlsDescendantBindings: true };
|
|
34
|
+
};
|
|
35
|
+
InlineBlockBinding.className = "inlineBlockBinding";
|
|
36
|
+
InlineBlockBinding.template = require("text!./Templates/InlineBlockTemplate.html");
|
|
37
|
+
return InlineBlockBinding;
|
|
38
|
+
})();
|
|
39
|
+
exports.InlineBlockBinding = InlineBlockBinding;
|
|
40
|
+
var InlineBlockViewModel = (function () {
|
|
41
|
+
function InlineBlockViewModel(message, status, visible, dismissible) {
|
|
42
|
+
this.message = message;
|
|
43
|
+
this.visible = visible;
|
|
44
|
+
this.dismissible = dismissible;
|
|
45
|
+
this.closeIcon = Framework_1.Svg.close;
|
|
46
|
+
switch (status) {
|
|
47
|
+
case InlineBlockStatus.Error:
|
|
48
|
+
this.borderColor = "#E81123";
|
|
49
|
+
this.icon = Framework_1.Svg.alert_error;
|
|
50
|
+
break;
|
|
51
|
+
case InlineBlockStatus.Warning:
|
|
52
|
+
this.borderColor = "#FFB900";
|
|
53
|
+
this.icon = Framework_1.Svg.alert_warning;
|
|
54
|
+
break;
|
|
55
|
+
case InlineBlockStatus.Info:
|
|
56
|
+
this.borderColor = "#008CBB";
|
|
57
|
+
this.icon = Framework_1.Svg.alert_info;
|
|
58
|
+
break;
|
|
59
|
+
default:
|
|
60
|
+
throw new Error("Invalid enum");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
InlineBlockViewModel.prototype.hideInlineBlock = function () {
|
|
64
|
+
this.visible(false);
|
|
65
|
+
};
|
|
66
|
+
return InlineBlockViewModel;
|
|
67
|
+
})();
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=InlineBlockBinding.js.map
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
define(["require", "exports", "../_generated/Framework"], function (
|
|
2
|
+
require,
|
|
3
|
+
exports,
|
|
4
|
+
Framework_1
|
|
5
|
+
) {
|
|
6
|
+
"use strict";
|
|
7
|
+
var logger = Framework_1.Log.getLogger({
|
|
8
|
+
loggerName: "JQueryUIBindings",
|
|
9
|
+
});
|
|
10
|
+
var originalGoToToday = $.datepicker._gotoToday;
|
|
11
|
+
$.datepicker._gotoToday = function () {
|
|
12
|
+
var element = $(arguments[0]);
|
|
13
|
+
if (element) {
|
|
14
|
+
var method = element.data("setDatepickerToNow");
|
|
15
|
+
if (element.datetimepicker && method) {
|
|
16
|
+
method(element);
|
|
17
|
+
} else {
|
|
18
|
+
originalGoToToday.apply(this, arguments);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var DatetimeRangeBindingHandler = (function () {
|
|
23
|
+
function DatetimeRangeBindingHandler() {}
|
|
24
|
+
DatetimeRangeBindingHandler.getInitialValueAccessor = function () {
|
|
25
|
+
return {
|
|
26
|
+
currentValue: Framework_1.Datetime.getDateRangeObservable(),
|
|
27
|
+
isReady: ko.observable(false),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
DatetimeRangeBindingHandler.prototype.init = function (
|
|
31
|
+
element,
|
|
32
|
+
valueAccessor,
|
|
33
|
+
allBindingsAccessor,
|
|
34
|
+
viewModel,
|
|
35
|
+
bindingContext
|
|
36
|
+
) {
|
|
37
|
+
var valAccessor = valueAccessor();
|
|
38
|
+
var startDateElement = $(element).find(
|
|
39
|
+
"." + DatetimeRangeBindingHandler.startDateInputBoxClassName
|
|
40
|
+
);
|
|
41
|
+
var endDateElement = $(element).find(
|
|
42
|
+
"." + DatetimeRangeBindingHandler.endDateInputBoxClassName
|
|
43
|
+
);
|
|
44
|
+
if (startDateElement.length === 0 || endDateElement.length === 0) {
|
|
45
|
+
logger.logError(
|
|
46
|
+
"Could not find elements with class name {0} and/or {1} inside element {2}.".format(
|
|
47
|
+
DatetimeRangeBindingHandler.startDateInputBoxClassName,
|
|
48
|
+
DatetimeRangeBindingHandler.endDateInputBoxClassName,
|
|
49
|
+
element
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
var pauseUpdate = false;
|
|
54
|
+
var updateCurrentValue = function () {
|
|
55
|
+
var startDate = Framework_1.Datetime.convertAsStringFromLocalToUTC(
|
|
56
|
+
startDateElement.datetimepicker("getDate")
|
|
57
|
+
);
|
|
58
|
+
var endDate = Framework_1.Datetime.convertAsStringFromLocalToUTC(
|
|
59
|
+
endDateElement.datetimepicker("getDate")
|
|
60
|
+
);
|
|
61
|
+
pauseUpdate = true;
|
|
62
|
+
valAccessor.currentValue({
|
|
63
|
+
startDate: startDate,
|
|
64
|
+
endDate: endDate,
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
$.timepicker.datetimeRange(startDateElement, endDateElement, {
|
|
68
|
+
timeFormat: "hh:mm tt",
|
|
69
|
+
minInterval: 15 * 60 * 1000,
|
|
70
|
+
showOtherMonths: true,
|
|
71
|
+
start: {
|
|
72
|
+
onSelect: function (dateText) {
|
|
73
|
+
if (endDateElement.val() === "") {
|
|
74
|
+
endDateElement.datetimepicker("setDate", dateText);
|
|
75
|
+
}
|
|
76
|
+
updateCurrentValue();
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
end: {
|
|
80
|
+
onSelect: function (dateText) {
|
|
81
|
+
if (startDateElement.val() === "") {
|
|
82
|
+
startDateElement.datetimepicker("setDate", dateText);
|
|
83
|
+
}
|
|
84
|
+
updateCurrentValue();
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
var updateDatetimeRangeValue = function (dateRange) {
|
|
89
|
+
if (pauseUpdate) {
|
|
90
|
+
pauseUpdate = false;
|
|
91
|
+
} else {
|
|
92
|
+
setTimeout(function () {
|
|
93
|
+
startDateElement.datetimepicker(
|
|
94
|
+
"setDate",
|
|
95
|
+
Framework_1.Datetime.convertAsStringFromUTCToLocal(
|
|
96
|
+
dateRange.startDate
|
|
97
|
+
)
|
|
98
|
+
);
|
|
99
|
+
endDateElement.datetimepicker(
|
|
100
|
+
"setDate",
|
|
101
|
+
Framework_1.Datetime.convertAsStringFromUTCToLocal(
|
|
102
|
+
dateRange.endDate
|
|
103
|
+
)
|
|
104
|
+
);
|
|
105
|
+
valAccessor.isReady(true);
|
|
106
|
+
}, 1);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
var currentValueSubscription = valAccessor.currentValue.subscribe(
|
|
110
|
+
function (dateRange) {
|
|
111
|
+
updateDatetimeRangeValue(dateRange);
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
updateDatetimeRangeValue(valAccessor.currentValue());
|
|
115
|
+
var hideOnBlur = function (event) {
|
|
116
|
+
updateCurrentValue();
|
|
117
|
+
var inputElment = event.data;
|
|
118
|
+
if (!inputElment.datepicker("widget").is(":hover")) {
|
|
119
|
+
inputElment.datetimepicker("hide");
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
startDateElement.on("blur", startDateElement, hideOnBlur);
|
|
123
|
+
endDateElement.on("blur", endDateElement, hideOnBlur);
|
|
124
|
+
ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
|
|
125
|
+
startDateElement.datetimepicker("destroy");
|
|
126
|
+
endDateElement.datetimepicker("destroy");
|
|
127
|
+
currentValueSubscription.dispose();
|
|
128
|
+
startDateElement.off("blur", hideOnBlur);
|
|
129
|
+
endDateElement.off("blur", hideOnBlur);
|
|
130
|
+
});
|
|
131
|
+
startDateElement.data("setDatepickerToNow", setDatepickerToUTCNow);
|
|
132
|
+
endDateElement.data("setDatepickerToNow", setDatepickerToUTCNow);
|
|
133
|
+
return { controlsDescendantBindings: false };
|
|
134
|
+
};
|
|
135
|
+
DatetimeRangeBindingHandler.className = "datetimeRange";
|
|
136
|
+
DatetimeRangeBindingHandler.startDateInputBoxClassName =
|
|
137
|
+
"datetimeRangeStartDate";
|
|
138
|
+
DatetimeRangeBindingHandler.endDateInputBoxClassName =
|
|
139
|
+
"datetimeRangeEndDate";
|
|
140
|
+
return DatetimeRangeBindingHandler;
|
|
141
|
+
})();
|
|
142
|
+
exports.DatetimeRangeBindingHandler = DatetimeRangeBindingHandler;
|
|
143
|
+
function setDatepickerToUTCNow(element) {
|
|
144
|
+
if (element.datetimepicker) {
|
|
145
|
+
element.datetimepicker(
|
|
146
|
+
"setDate",
|
|
147
|
+
Framework_1.Datetime.convertAsStringFromUTCToLocal(new Date())
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
//# sourceMappingURL=JQueryUIBindings.js.map
|