Your IP : 216.73.216.26


Current Path : /home2/wtmwscom/public_html/post/scripts/
Upload File :
Current File : /home2/wtmwscom/public_html/post/scripts/Portal_010.js

define("Portal.Tracking.Track.mvc$model", ["OutSystems/ClientRuntime/Main", "Portal.model", "MultiLingual.controller", "Portal.controller", "Portal.EP_Layouts.InteractivePageLayout.mvc$model", "OutSystemsUI.Navigation.Breadcrumbs.mvc$model", "OutSystemsUI.Navigation.BreadcrumbsItem.mvc$model", "Portal.EP_Common.Support.mvc$model", "Portal.Tracking.TrackAndTraceDetail.mvc$model", "MultiLingual.controller$GetTranslation", "Portal.referencesHealth", "Portal.referencesHealth$MultiLingual", "Portal.controller$RequireCaptcha", "Portal.controller$CheckEmptyLocale"], function (OutSystems, PortalModel, MultiLingualController, PortalController, Portal_EP_Layouts_InteractivePageLayout_mvcModel, OutSystemsUI_Navigation_Breadcrumbs_mvcModel, OutSystemsUI_Navigation_BreadcrumbsItem_mvcModel, Portal_EP_Common_Support_mvcModel, Portal_Tracking_TrackAndTraceDetail_mvcModel) {
var OS = OutSystems.Internal;


var VariablesRecord = (function (_super) {
__extends(VariablesRecord, _super);
function VariablesRecord(defaults) {
_super.apply(this, arguments);
}
VariablesRecord.attributesToDeclare = function () {
return [
this.attr("IsLoadingNextStep", "isLoadingNextStepVar", "IsLoadingNextStep", true, false, OS.Types.Boolean, function () {
return false;
}, false), 
this.attr("TrackingNumber", "trackingNumberIn", "TrackingNumber", true, false, OS.Types.Text, function () {
return "";
}, false), 
this.attr("_trackingNumberInDataFetchStatus", "_trackingNumberInDataFetchStatus", "_trackingNumberInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false), 
this.attr("locale", "localeIn", "locale", true, false, OS.Types.Text, function () {
return "";
}, false), 
this.attr("_localeInDataFetchStatus", "_localeInDataFetchStatus", "_localeInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false)
].concat(_super.attributesToDeclare.call(this));
};
VariablesRecord.init();
return VariablesRecord;
})(OS.DataTypes.GenericRecord);
var WidgetsRecord = (function (_super) {
__extends(WidgetsRecord, _super);
function WidgetsRecord() {
_super.apply(this, arguments);
}
WidgetsRecord.getWidgetsType = function () {
return {};
};

return WidgetsRecord;
})(OS.Model.BaseWidgetRecordMap);
var Model = (function (_super) {
__extends(Model, _super);
function Model() {
_super.apply(this, arguments);
}
Model.getVariablesRecordConstructor = function () {
return VariablesRecord;
};
Model.getWidgetsRecordConstructor = function () {
return WidgetsRecord;
};
Model._hasValidationWidgetsValue = undefined;
Object.defineProperty(Model, "hasValidationWidgets", {
enumerable: true,
configurable: true,
get: function () {
if((Model._hasValidationWidgetsValue === undefined)) {
Model._hasValidationWidgetsValue = ((((Portal_EP_Layouts_InteractivePageLayout_mvcModel.hasValidationWidgets || OutSystemsUI_Navigation_Breadcrumbs_mvcModel.hasValidationWidgets) || OutSystemsUI_Navigation_BreadcrumbsItem_mvcModel.hasValidationWidgets) || Portal_EP_Common_Support_mvcModel.hasValidationWidgets) || Portal_Tracking_TrackAndTraceDetail_mvcModel.hasValidationWidgets);
}

return Model._hasValidationWidgetsValue;
}
});

Model.prototype.setInputs = function (inputs) {
if("TrackingNumber" in inputs) {
this.variables.trackingNumberIn = OS.DataConversion.ServerDataConverter.from(inputs.TrackingNumber, OS.Types.Text);
}

if("locale" in inputs) {
this.variables.localeIn = OS.DataConversion.ServerDataConverter.from(inputs.locale, OS.Types.Text);
}

};
return Model;
})(OS.Model.BaseViewModel);
return new OS.Model.ModelFactory(Model);
});
define("Portal.Tracking.Track.mvc$view", ["OutSystems/ClientRuntime/Main", "Portal.model", "Portal.controller", "MultiLingual.controller", "react", "OutSystems/ReactView/Main", "Portal.Tracking.Track.mvc$model", "Portal.Tracking.Track.mvc$controller", "Portal.clientVariables", "Portal.EP_Layouts.InteractivePageLayout.mvc$view", "OutSystems/ReactWidgets/Main", "OutSystemsUI.Navigation.Breadcrumbs.mvc$view", "OutSystemsUI.Navigation.BreadcrumbsItem.mvc$view", "Portal.EP_Common.Support.mvc$view", "Portal.Tracking.TrackAndTraceDetail.mvc$view", "MultiLingual.controller$GetTranslation", "Portal.referencesHealth", "Portal.referencesHealth$MultiLingual", "Portal.controller$RequireCaptcha", "Portal.controller$CheckEmptyLocale"], function (OutSystems, PortalModel, PortalController, MultiLingualController, React, OSView, Portal_Tracking_Track_mvc_model, Portal_Tracking_Track_mvc_controller, PortalClientVariables, Portal_EP_Layouts_InteractivePageLayout_mvc_view, OSWidgets, OutSystemsUI_Navigation_Breadcrumbs_mvc_view, OutSystemsUI_Navigation_BreadcrumbsItem_mvc_view, Portal_EP_Common_Support_mvc_view, Portal_Tracking_TrackAndTraceDetail_mvc_view) {
    var OS = OutSystems.Internal;
var PlaceholderContent = OSView.Widget.PlaceholderContent;
var IteratorPlaceholderContent = OSView.Widget.IteratorPlaceholderContent;


    var View = (function (_super) {
        __extends(View,_super);
        function View() {
            try {
                this.initialize.apply(this, arguments);
            } catch (error) {
                View.handleError(error);
                throw error;
            }
        }
        View.prototype.initialize = function() {
            _super.apply(this, arguments);
        };
        View.displayName = "Tracking.Track";
        View.getCssDependencies = function() {
            return ["css/OutSystemsReactWidgets.css", "css/OutSystemsUI.OutSystemsUI.css", "css/Portal.Portal.css", "css/Portal.Portal.extra.css"];
        };
        View.getJsDependencies = function() {
            return [];
        };
        View.getBlocks = function() {
            return [Portal_EP_Layouts_InteractivePageLayout_mvc_view, OutSystemsUI_Navigation_Breadcrumbs_mvc_view, OutSystemsUI_Navigation_BreadcrumbsItem_mvc_view, Portal_EP_Common_Support_mvc_view, Portal_Tracking_TrackAndTraceDetail_mvc_view];
        };
        Object.defineProperty(View.prototype, "modelFactory", {
            get: function () {
                return Portal_Tracking_Track_mvc_model;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(View.prototype, "controllerFactory", {
            get: function () {
                return Portal_Tracking_Track_mvc_controller;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(View.prototype, "title", {
            get: function () {
                return "Track and Trace";
            },
            enumerable: true,
            configurable: true
        });
        View.prototype.internalRender = function() {
            var model = this.model;
            var controller = this.controller;
            var idService = this.idService;
            var validationService = controller.validationService;
            var widgetsRecordProvider = this.widgetsRecordProvider;
            var callContext = controller.callContext();
            var $if = View.ifWidget;
            var asPrimitiveValue = View.asPrimitiveValue;
            var _this = this;

            return React.createElement("div", this.getRootNodeProperties(), React.createElement(Portal_EP_Layouts_InteractivePageLayout_mvc_view, {
inputs: {
locale: model.variables.localeIn,
IsLoadingNextStep: model.variables.isLoadingNextStepVar,
ExtendedClass: "TrackAndTrace",
BannerURL: OS.Navigation.VersionedURL.getVersionedUrl("img/Portal.EP_19.jpg")
},
events: {
_handleError: function (ex) {
controller.handleError(ex);
},
userLoggedIn$Action: function () {
var eventHandlerContext = callContext.clone();
controller.doNothing$Action(controller.callContext(eventHandlerContext));

;
},
localeChanged$Action: function (newLocaleIn) {
var eventHandlerContext = callContext.clone();
controller.reloadScreen$Action(newLocaleIn, controller.callContext(eventHandlerContext));

;
},
localeEmpty$Action: function (clientLocaleIn) {
var eventHandlerContext = callContext.clone();
controller.reloadScreen$Action(clientLocaleIn, controller.callContext(eventHandlerContext));

;
},
logoClicked$Action: function () {
var eventHandlerContext = callContext.clone();
controller.goToHome$Action(controller.callContext(eventHandlerContext));

;
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "0",
alias: "1"
},
_widgetRecordProvider: widgetsRecordProvider,
placeholders: {
menuPlaceholder: PlaceholderContent.Empty,
pageTitle: new PlaceholderContent(function () {
return [React.createElement(OSWidgets.Expression, {
value: model.getCachedValue(idService.getId("rZmIt2zmBk2DxjtivaeJ1w.Value"), function () {
return MultiLingualController.default.getTranslation$Action("track-and-trace-track-title", "Track a package", callContext).translationOut;
}),
_idProps: {
service: idService,
uuid: "1"
},
_widgetRecordProvider: widgetsRecordProvider
})];
}),
breadcrumbs: new PlaceholderContent(function () {
return [React.createElement(OutSystemsUI_Navigation_Breadcrumbs_mvc_view, {
inputs: {},
events: {
_handleError: function (ex) {
controller.handleError(ex);
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "2",
alias: "2"
},
_widgetRecordProvider: widgetsRecordProvider,
placeholders: {
content: new PlaceholderContent(function () {
return [React.createElement(OutSystemsUI_Navigation_BreadcrumbsItem_mvc_view, {
inputs: {
ExtendedClass: "BreadcrumbsItem"
},
events: {
_handleError: function (ex) {
controller.handleError(ex);
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "3",
alias: "3"
},
_widgetRecordProvider: widgetsRecordProvider,
placeholders: {
title: new PlaceholderContent(function () {
return [React.createElement(OSWidgets.Link, {
enabled: true,
transition: OS.Transitions.createTransition(OS.Transitions.TransitionAnimation.Default),
url: OS.Navigation.generateScreenURL("/Portal/Home", {
locale: model.variables.localeIn
}),
visible: true,
_idProps: {
service: idService,
uuid: "4"
},
_widgetRecordProvider: widgetsRecordProvider
}, React.createElement(OSWidgets.Text, {
extendedProperties: {
"data-trans": "breadcrumbs-general-home",
style: "color: #fff;"
},
text: ["Home"],
_idProps: {
service: idService,
uuid: "5"
},
_widgetRecordProvider: widgetsRecordProvider
}))];
}),
icon: new PlaceholderContent(function () {
return [React.createElement(OSWidgets.Icon, {
icon: "angle-right",
iconSize: /*FontSize*/ 0,
style: "icon",
visible: true,
_idProps: {
service: idService,
uuid: "6"
},
_widgetRecordProvider: widgetsRecordProvider
})];
})
},
_dependencies: [asPrimitiveValue(model.variables.localeIn)]
}), React.createElement(OutSystemsUI_Navigation_BreadcrumbsItem_mvc_view, {
inputs: {
ExtendedClass: "BreadcrumbsItem"
},
events: {
_handleError: function (ex) {
controller.handleError(ex);
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "7",
alias: "4"
},
_widgetRecordProvider: widgetsRecordProvider,
placeholders: {
title: new PlaceholderContent(function () {
return [React.createElement(OSWidgets.Link, {
enabled: true,
transition: OS.Transitions.createTransition(OS.Transitions.TransitionAnimation.Default),
url: OS.Navigation.generateScreenURL("/Portal/ServiceCatalog", {
locale: model.variables.localeIn
}),
visible: true,
_idProps: {
service: idService,
uuid: "8"
},
_widgetRecordProvider: widgetsRecordProvider
}, React.createElement(OSWidgets.Text, {
extendedProperties: {
"data-trans": "dashboard-sidebar-sidebarheadingservices"
},
text: ["Services"],
_idProps: {
service: idService,
uuid: "9"
},
_widgetRecordProvider: widgetsRecordProvider
}))];
}),
icon: new PlaceholderContent(function () {
return [React.createElement(OSWidgets.Icon, {
icon: "angle-right",
iconSize: /*FontSize*/ 0,
style: "icon",
visible: true,
_idProps: {
service: idService,
uuid: "10"
},
_widgetRecordProvider: widgetsRecordProvider
})];
})
},
_dependencies: [asPrimitiveValue(model.variables.localeIn)]
}), React.createElement(OutSystemsUI_Navigation_BreadcrumbsItem_mvc_view, {
inputs: {
ExtendedClass: "BreadcrumbsItem"
},
events: {
_handleError: function (ex) {
controller.handleError(ex);
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "11",
alias: "5"
},
_widgetRecordProvider: widgetsRecordProvider,
placeholders: {
title: new PlaceholderContent(function () {
return [React.createElement(OSWidgets.Expression, {
value: model.getCachedValue(idService.getId("mbuHa84x6U2OQ3gNdWOHAg.Value"), function () {
return MultiLingualController.default.getTranslation$Action("track-and-trace-track-title", "Track a package", callContext).translationOut;
}),
_idProps: {
service: idService,
uuid: "12"
},
_widgetRecordProvider: widgetsRecordProvider
})];
}),
icon: PlaceholderContent.Empty
},
_dependencies: []
})];
})
},
_dependencies: [asPrimitiveValue(model.variables.localeIn)]
})];
}),
support: new PlaceholderContent(function () {
return [React.createElement(Portal_EP_Common_Support_mvc_view, {
inputs: {
Locale: model.variables.localeIn
},
events: {
_handleError: function (ex) {
controller.handleError(ex);
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "13",
alias: "6"
},
_widgetRecordProvider: widgetsRecordProvider,
_dependencies: []
})];
}),
pageContent: new PlaceholderContent(function () {
return [React.createElement(Portal_Tracking_TrackAndTraceDetail_mvc_view, {
inputs: {
locale: model.variables.localeIn,
TrackingNumberUserInput: model.getCachedValue(idService.getId("+bAxw9YQW0yAijT0bfjc4Q.TrackingNumberUserInput"), function () {
return OS.BuiltinFunctions.toUpper(model.variables.trackingNumberIn);
}, function () {
return model.variables.trackingNumberIn;
})
},
events: {
_handleError: function (ex) {
controller.handleError(ex);
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "14",
alias: "7"
},
_widgetRecordProvider: widgetsRecordProvider,
_dependencies: []
})];
})
},
_dependencies: [asPrimitiveValue(model.variables.trackingNumberIn), asPrimitiveValue(model.variables.localeIn)]
}));
        };
        return View;
    })(OSView.BaseView.BaseWebScreen);
	
    return View;
});
define("Portal.Tracking.Track.mvc$controller", ["OutSystems/ClientRuntime/Main", "Portal.model", "Portal.controller", "MultiLingual.controller", "Portal.languageResources", "Portal.clientVariables", "Portal.Tracking.controller", "MultiLingual.controller$GetTranslation", "Portal.referencesHealth", "Portal.referencesHealth$MultiLingual", "Portal.controller$RequireCaptcha", "Portal.controller$CheckEmptyLocale"], function (OutSystems, PortalModel, PortalController, MultiLingualController, PortalLanguageResources, PortalClientVariables, Portal_TrackingController) {
var OS = OutSystems.Internal;
var Controller = (function (_super) {
__extends(Controller, _super);
function Controller() {
_super.apply(this, arguments);
var controller = this.controller;
this.clientActionProxies = {};
this.dataFetchDependenciesOriginal = {};
this.dataFetchDependentsGraph = {};
this.useImprovedDataFetch = false;
this.hasDependenciesBetweenSources = false;
this.shouldSendClientVarsToDataSources = false;
}
// Server Actions

// Aggregates and Data Actions

Controller.prototype.dataFetchActionNames = [];
// Client Actions
Controller.prototype._doNothing$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("DoNothing");
callContext = controller.callContext(callContext);
};
Controller.prototype._reloadScreen$Action = function (newLanguageIn, callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("ReloadScreen");
callContext = controller.callContext(callContext);
var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("Portal.Tracking.Track.ReloadScreen$vars"))());
vars.value.newLanguageInLocal = newLanguageIn;
// Destination: /Portal/Track
return OS.Navigation.navigateTo(OS.Navigation.generateScreenURL("/Portal/Track", {
locale: vars.value.newLanguageInLocal,
TrackingNumber: model.variables.trackingNumberIn
}), OS.Transitions.createTransition(OS.Transitions.TransitionAnimation.Default), callContext, true);
};
Controller.registerVariableGroupType("Portal.Tracking.Track.ReloadScreen$vars", [{
name: "NewLanguage",
attrName: "newLanguageInLocal",
mandatory: true,
dataType: OS.Types.Text,
defaultValue: function () {
return "";
}
}]);
Controller.prototype._onInitialize$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("OnInitialize");
callContext = controller.callContext(callContext);
return OS.Flow.executeAsyncFlow(function () {
// Execute Action: CheckEmptyLocale
model.flush();
return PortalController.default.checkEmptyLocale$Action(callContext).then(function () {
// Execute Action: RequireCaptcha
model.flush();
return PortalController.default.requireCaptcha$Action(callContext);
});
});
};
Controller.prototype._goToHome$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("GoToHome");
callContext = controller.callContext(callContext);
// Destination: /Portal/Home
return OS.Navigation.navigateTo(OS.Navigation.generateScreenURL("/Portal/Home", {
locale: model.variables.localeIn
}), OS.Transitions.createTransition(OS.Transitions.TransitionAnimation.Default), callContext, true);
};

Controller.prototype.doNothing$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._doNothing$Action, callContext);

};
Controller.prototype.reloadScreen$Action = function (newLanguageIn, callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._reloadScreen$Action, callContext, newLanguageIn);

};
Controller.prototype.onInitialize$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._onInitialize$Action, callContext);

};
Controller.prototype.goToHome$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._goToHome$Action, callContext);

};

// Event Handler Actions
Controller.prototype.onInitializeEventHandler = function (callContext) {
var controller = this.controller;
var model = this.model;
var idService = this.idService;

return controller.onInitialize$Action(callContext);

};
Controller.prototype.onReadyEventHandler = null;
Controller.prototype.onRenderEventHandler = null;
Controller.prototype.onDestroyEventHandler = null;
Controller.prototype.onParametersChangedEventHandler = null;
Controller.prototype.handleError = function (ex) {
return Portal_TrackingController.default.handleError(ex, this.callContext());
};
Controller.checkPermissions = function () {
};
Controller.prototype.getDefaultTimeout = function () {
return PortalController.default.defaultTimeout;
};
return Controller;
})(OS.Controller.BaseViewController);
return new OS.Controller.ControllerFactory(Controller, PortalLanguageResources);
});