123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588 |
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- var Unibase;
- (function (Unibase) {
- let Platform;
- (function (Platform) {
- let Forms;
- (function (Forms) {
- let Managers;
- (function (Managers) {
- class FormManager extends Platform.Core.BaseManager {
- getControls() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getcontrols';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshFormJson(FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/refreshformsjson/formid/' + FormId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return response;
- });
- });
- }
- refreshAllFormJson() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/refreshallformsjson/np';
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return response;
- });
- });
- }
- getControlsByAppId(InstalledAppId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/controls/installedappid/' + InstalledAppId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getControl(ControlId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/controls/' + ControlId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getActionProvider(actionprovidertype) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getformaction/actionprovidertype/' + actionprovidertype;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getAllFormActionProviders() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getallformactionproviders';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshControls() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/refreshcontrols/np';
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- return response.message;
- });
- });
- }
- saveControl(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/controls';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- getControlProperties(ControlId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/controlproperties/controlid/' + ControlId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- loadControlsByDataTypeId(DataTypeId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/controls/datatypeid/' + DataTypeId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getSections(FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/sections/formid/' + FormId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- loadAppForms(InstalledAppId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/get/installedappid/' + InstalledAppId;
- var forms;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormsByAppId(FormId, InstalledAppId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/get/formid/' + FormId + '/installedappid/' + InstalledAppId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getForms() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/get';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormData(FormId, PkId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/get/formid/' + FormId + '/pkid/' + PkId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getForm(FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/get/formid/' + FormId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormbyUniqueId(FormUniqueId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getform/formuniqueid/' + FormUniqueId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- saveForm(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/saveasnewform';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- refreshForms() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/refreshforms/np';
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- return response.message;
- });
- });
- }
- refreshAutocompletes() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/executedeleteprocedures/np';
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- return response.message;
- });
- });
- }
- refreshAllForms() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/refreshallforms/formid/0';
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return response.message;
- });
- });
- }
- duplicateForm(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/DuplicateForm';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- exportForm(FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/exportform/' + FormId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- getSubFormsByParentForm(ParentFormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getsubformsbyparent/' + ParentFormId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormProperty(FormPropertyId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/formproperty/' + FormPropertyId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormProperties(FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/formproperties/formid/' + FormId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- deleteFormProperty(DocPropertyId, FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/formproperties/docpropertyid/' + DocPropertyId + '/formid/' + FormId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return response;
- });
- });
- }
- getFormRoleByAppConfiguration(AppConfigurationId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/formroles/appconfigurationid/' + AppConfigurationId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormRoles(AppConfigurationId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getformrolesbyconfigid/configurationid/' + AppConfigurationId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormRolesConfiguration(AppConfigurationId, FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getformrolesconfiguration/appconfigurationid/' + AppConfigurationId + '/formid/' + FormId + '/roleid/' + 0;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormRolesByInstalledAppId(Installedappid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getappforms/installedappid/' + Installedappid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormRolesByFormId(FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/formroles/formid/' + FormId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- dynamicAutoComplete(DocPropertyId, ColumnName, Value, Formpropertyid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/autocomplete/docpropertyid/' + DocPropertyId + '/columnname/' + ColumnName + '/value/' + Value + '/formpropertyid/' + Formpropertyid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- dynamicselect2(DocPropertyId, ColumnName, Value, Formpropertyid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/select2/docpropertyid/' + DocPropertyId + '/columnname/' + ColumnName + '/value/' + Value + '/formpropertyid/' + Formpropertyid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getselect2data(formpropertyId, Idcoulmn) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getselect2databyidcolumn/formpropertyid/' + formpropertyId + '/idcolumn/' + Idcoulmn;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- dynamicMultiSelectList(DocPropertyId, Ids, columnname, Value, search, Pagesize, PageIndex, FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/GetDynamicMultiSelectLists/docpropertyid/' + DocPropertyId + '/ids/' + Ids + '/columnname/' + columnname + '/value/' + Value + '/search/' + search + '/pagesize/' + Pagesize + '/pageindex/' + PageIndex + '/formid/' + FormId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- Unibase.Forms.Controls.multiselectlist.Instance().count = response.result.Count;
- return response.result.Data;
- });
- });
- }
- dynamicDropDown(DropDownColumnId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/dynamicdropdowncolumns/dropdowncolumnid/' + DropDownColumnId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- dynamicCheckBoxReportData(CheckBoxColumnId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/dynamiccheckboxreportdata/checkboxcolumnid/' + CheckBoxColumnId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getDropDown(drpDwnColumnId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/dropdowncolumns/' + drpDwnColumnId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getDropDownColumns(DocPropertyId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/dropdowncolumns/docpropertyid/' + DocPropertyId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- deleteOptionForControl(DropDownColumnId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/dropdowncolumns/' + DropDownColumnId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getCheckBoxColumns(DocPropertyId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/checkboxcolumns/docpropertyid/' + DocPropertyId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- deleteOptionForCheckboxControl(CheckBoxColumnId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/deleteOptionForCheckboxControl/' + CheckBoxColumnId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- dynamicSave(FormId, postData) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/savedynform/' + FormId;
- return yield this.dataHelper().postAsync(url, postData).then(function (response) {
- return response;
- });
- });
- }
- saveFormValidation(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/formvalidations';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- deleteFormValidation(formvalidationid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/formvalidation/formvalidationid/' + formvalidationid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormValidation(FormValidationId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/formvalidation/' + FormValidationId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getActionProviders(FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getactionproviders/formid/' + FormId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormActionProviderById(FormActionProviderId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getformactionproviderbyid/formactionproviderid/' + FormActionProviderId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- saveDefaultSaveSetting(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/platform/forms/savedefaultsavesetting';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- refreshActionProviders() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/refreshactionproviders/np';
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- return response.message;
- });
- });
- }
- getFormsAutoComplete(term, authtoken) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getformsautocomplete/term/' + term + '/authtoken/' + authtoken;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- dynamicDelete(Id, AppConfigId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/DynamicDelete/id/' + Id + '/appconfigid/' + AppConfigId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getFormByAppConfiguration(AppConfigurationId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getformbyappconfiguration/AppConfigurationId/' + AppConfigurationId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getScanPropertyData(Formpropertyid, Text, Column, Value) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/scanproperty/formpropertyid/' + Formpropertyid + '/text/' + Text + '/columnname/' + Column + '/value/' + Value;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null && response.result != "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getAutocompleteSelectedData(DocPropertyId, IdColumnValue, FormPropertyId, FormId) {
- return __awaiter(this, void 0, void 0, function* () {
- var url = _appsettings.server_url() + '/apis/v4/unibase/platform/forms/createnewsaveddata/docpropertyid/' + DocPropertyId + '/idcolumnvalue/' + IdColumnValue + '/formpropertyid/' + FormPropertyId + '/formid/' + FormId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- updateImagePickerData() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/updateimagepickerdata/np';
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- return response.message;
- });
- });
- }
- updateLock(InstalledAppId, FromDate, ToDate, IsLock) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/updatelocktable/installedappid/' + Number(InstalledAppId) + '/fromdate/' + FromDate + '/todate/' + ToDate + '/islock/' + IsLock;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new FormManager();
- return this._instance;
- }
- }
- Managers.FormManager = FormManager;
- })(Managers = Forms.Managers || (Forms.Managers = {}));
- })(Forms = Platform.Forms || (Platform.Forms = {}));
- })(Platform = Unibase.Platform || (Unibase.Platform = {}));
- })(Unibase || (Unibase = {}));
|