PageSourceSearch

https://wslr.org/wp-content/plugins/smart-forms/js/bundle/datastores_bundle.js?ver=5

js wslr.org collected 2026-10-03 22:56:45 UTC 17,013 bytes, 392 lines download raw bytes

vendor: 3,651 bytes, lines 1-88
1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ 		// Flag the module as loaded
23/******/ 		module.l = true;
24/******/
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28/******/
29/******/
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32/******/
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35/******/
36/******/ 	// define getter function for harmony exports
37/******/ 	__webpack_require__.d = function(exports, name, getter) {
38/******/ 		if(!__webpack_require__.o(exports, name)) {
39/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40/******/ 		}
41/******/ 	};
42/******/
43/******/ 	// define __esModule on exports
44/******/ 	__webpack_require__.r = function(exports) {
45/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47/******/ 		}
48/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49/******/ 	};
50/******/
51/******/ 	// create a fake namespace object
52/******/ 	// mode & 1: value is a module id, require it
53/******/ 	// mode & 2: merge all properties of value into the ns
54/******/ 	// mode & 4: return value when already ns object
55/******/ 	// mode & 8|1: behave like require
56/******/ 	__webpack_require__.t = function(value, mode) {
57/******/ 		if(mode & 1) value = __webpack_require__(value);
58/******/ 		if(mode & 8) return value;
59/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60/******/ 		var ns = Object.create(null);
61/******/ 		__webpack_require__.r(ns);
62/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64/******/ 		return ns;
65/******/ 	};
66/******/
67/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68/******/ 	__webpack_require__.n = function(module) {
69/******/ 		var getter = module && module.__esModule ?
70/******/ 			function getDefault() { return module['default']; } :
71/******/ 			function getModuleExports() { return module; };
72/******/ 		__webpack_require__.d(getter, 'a', getter);
73/******/ 		return getter;
74/******/ 	};
75/******/
76/******/ 	// Object.prototype.hasOwnProperty.call
77/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78/******/
79/******/ 	// __webpack_public_path__
80/******/ 	__webpack_require__.p = "";
81/******/
82/******/
83/******/ 	// Load entry module and return exports
84/******/ 	return __webpack_require__(__webpack_require__.s = "./formBuilder/dataStores/SmartFormsDataStoreBootstrap.ts");
85/******/ })
86/************************************************************************/
87/******/ ({
88
89/***/ "./formBuilder/dataStores/SmartFormBasicDataStore.ts":
90/*!***********************************************************!*\
91  !*** ./formBuilder/dataStores/SmartFormBasicDataStore.ts ***!
92  \***********************************************************/
93/*! no static exports found */
94/***/ (function(module, exports, __webpack_require__) {
95
96"use strict";
97
98Object.defineProperty(exports, "__esModule", { value: true });
99var SmartFormBasicDataStore = /** @class */ (function () {
100    function SmartFormBasicDataStore(defaultValue) {
101        this.defaultValue = 'value';
102        if (typeof defaultValue != null)
103            this.defaultValue = defaultValue;
104    }
105    SmartFormBasicDataStore.prototype.toString = function () {
106        return this[this.defaultValue];
107    };
108    SmartFormBasicDataStore.prototype.Clone = function () {
109        return Object.assign(Object.create(Object.getPrototypeOf(this)), this);
110    };
111    return SmartFormBasicDataStore;
112}());
113exports.SmartFormBasicDataStore = SmartFormBasicDataStore;
114
115
116/***/ }),
117
118/***/ "./formBuilder/dataStores/SmartFormCurrencyDataStore.ts":
119/*!**************************************************************!*\
120  !*** ./formBuilder/dataStores/SmartFormCurrencyDataStore.ts ***!
121  \**************************************************************/
122/*! no static exports found */
123/***/ (function(module, exports, __webpack_require__) {
124
125"use strict";
126
127Object.defineProperty(exports, "__esModule", { value: true });
128var SmartFormCurrencyDataStore = /** @class */ (function () {
129    function SmartFormCurrencyDataStore(defaultValue) {
130        this.defaultValue = 'numericalValue';
131        if (typeof defaultValue != null)
132            this.defaultValue = defaultValue;
133    }
134    SmartFormCurrencyDataStore.prototype.toString = function () {
135        return this.numericalValue;
136    };
137    SmartFormCurrencyDataStore.prototype.Clone = function () {
138        return Object.assign(Object.create(Object.getPrototypeOf(this)), this);
139    };
140    return SmartFormCurrencyDataStore;
141}());
142exports.SmartFormCurrencyDataStore = SmartFormCurrencyDataStore;
143
144
145/***/ }),
146
147/***/ "./formBuilder/dataStores/SmartFormDateDataStore.ts":
148/*!**********************************************************!*\
149  !*** ./formBuilder/dataStores/SmartFormDateDataStore.ts ***!
150  \**********************************************************/
151/*! no static exports found */
152/***/ (function(module, exports, __webpack_require__) {
153
154"use strict";
155
156var __extends = (this && this.__extends) || (function () {
157    var extendStatics = function (d, b) {
158        extendStatics = Object.setPrototypeOf ||
159            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
160            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
161        return extendStatics(d, b);
162    };
163    return function (d, b) {
164        extendStatics(d, b);
165        function __() { this.constructor = d; }
166        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
167    };
168})();
169Object.defineProperty(exports, "__esModule", { value: true });
170var SmartFormBasicDataStore_1 = __webpack_require__(/*! ./SmartFormBasicDataStore */ "./formBuilder/dataStores/SmartFormBasicDataStore.ts");
171var SmartFormDateDataStore = /** @class */ (function (_super) {
172    __extends(SmartFormDateDataStore, _super);
173    function SmartFormDateDataStore() {
174        return _super !== null && _super.apply(this, arguments) || this;
175    }
176    SmartFormDateDataStore.prototype.GetTime = function () {
177        return this.numericalValue;
178    };
179    SmartFormDateDataStore.prototype.AddDays = function (daysToAdd) {
180        var clonedObject = this.Clone();
181        if (clonedObject.numericalValue > 0) {
182            var date = new Date(clonedObject.numericalValue);
183            date.setDate(date.getDate() + daysToAdd);
184            clonedObject.UpdateDate(date.getTime());
185        }
186        return clonedObject;
187    };
188    SmartFormDateDataStore.prototype.AddMonths = function (monthsToAdd) {
189        var clonedObject = this.Clone();
190        if (clonedObject.numericalValue > 0) {
191            var date = new Date(clonedObject.numericalValue);
192            date.setMonth(date.getMonth() + monthsToAdd);
193            clonedObject.UpdateDate(date.getTime());
194        }
195        return clonedObject;
196    };
197    SmartFormDateDataStore.prototype.AddYears = function (yearsToAdd) {
198        var clonedObject = this.Clone();
199        if (clonedObject.numericalValue > 0) {
200            var date = new Date(clonedObject.numericalValue);
201            date.setFullYear(date.getFullYear() + yearsToAdd);
202            clonedObject.UpdateDate(date.getTime());
203        }
204        return clonedObject;
205    };
206    SmartFormDateDataStore.prototype.GetDayOfWeek = function () {
207        return new Date(this.numericalValue).getDay();
208    };
209    SmartFormDateDataStore.prototype.IsBetween = function (firstDate, secondDate) {
210        firstDate = this.ParseToDate(firstDate);
211        secondDate = this.ParseToDate(secondDate);
212        var currentDate = this.GetDate();
213        if (this.IsValidDate(firstDate) && this.IsValidDate(secondDate) && this.IsValidDate(currentDate))
214            return firstDate <= currentDate && secondDate >= currentDate;
215        return false;
216    };
217    SmartFormDateDataStore.prototype.ParseToDate = function (date) {
218        if (date == null)
219            return null;
220        if (typeof date == "string") {
221            var datePart = date.split('-');
222            if (datePart.length != 3)
223                return null;
224            return new Date(datePart[0], datePart[1] - 1, datePart[2], 0, 0, 0);
225        }
226        return null;
227    };
228    SmartFormDateDataStore.prototype.GetDate = function () {
229        return this.ParseToDate(this.value);
230    };
231    SmartFormDateDataStore.prototype.UpdateDate = function (numericalValue) {
232        this.numericalValue = numericalValue;
233        var date = new Date(this.numericalValue);
234        var month = date.getMonth() + 1;
235        var day = date.getDate();
236        var dateLabel = date.getFullYear() + '-' + (month < 10 ? '0' : '') + month + '-' + (day < 10 ? '0' : '') + day;
237        this.label = dateLabel;
238        this.value = dateLabel;
239        this.OriginalValues.value = dateLabel;
240        this.OriginalValues.formattedValue = rnJQuery.datepicker.formatDate(this.OriginalValues.format, date);
241    };
242    SmartFormDateDataStore.prototype.IsValidDate = function (d) {
243        return d instanceof Date && !isNaN(d);
244    };
245    return SmartFormDateDataStore;
246}(SmartFormBasicDataStore_1.SmartFormBasicDataStore));
247exports.SmartFormDateDataStore = SmartFormDateDataStore;
248
249
250/***/ }),
251
252/***/ "./formBuilder/dataStores/SmartFormMultipleItemsDataStore.ts":
253/*!*******************************************************************!*\
254  !*** ./formBuilder/dataStores/SmartFormMultipleItemsDataStore.ts ***!
255  \*******************************************************************/
256/*! no static exports found */
257/***/ (function(module, exports, __webpack_require__) {
258
259"use strict";
260
261var __extends = (this && this.__extends) || (function () {
262    var extendStatics = function (d, b) {
263        extendStatics = Object.setPrototypeOf ||
264            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
265            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
266        return extendStatics(d, b);
267    };
268    return function (d, b) {
269        extendStatics(d, b);
270        function __() { this.constructor = d; }
271        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
272    };
273})();
274Object.defineProperty(exports, "__esModule", { value: true });
275var SmartFormBasicDataStore_1 = __webpack_require__(/*! ./SmartFormBasicDataStore */ "./formBuilder/dataStores/SmartFormBasicDataStore.ts");
276var SmartFormMultipleItemsDataStore = /** @class */ (function (_super) {
277    __extends(SmartFormMultipleItemsDataStore, _super);
278    function SmartFormMultipleItemsDataStore() {
279        return _super !== null && _super.apply(this, arguments) || this;
280    }
281    SmartFormMultipleItemsDataStore.prototype.toString = function () {
282        return RedNaoGetValueFromArray(this.selectedValues);
283    };
284    SmartFormMultipleItemsDataStore.prototype.IsSelected = function (label) {
285        for (var i = 0; i < this.selectedValues.length; i++) {
286            if (this.selectedValues[i].label == label)
287                return true;
288        }
289        return false;
290    };
291    ;
292    return SmartFormMultipleItemsDataStore;
293}(SmartFormBasicDataStore_1.SmartFormBasicDataStore));
294exports.SmartFormMultipleItemsDataStore = SmartFormMultipleItemsDataStore;
295
296
297/***/ }),
298
299/***/ "./formBuilder/dataStores/SmartFormRepeaterDataStore.ts":
300/*!**************************************************************!*\
301  !*** ./formBuilder/dataStores/SmartFormRepeaterDataStore.ts ***!
302  \**************************************************************/
303/*! no static exports found */
304/***/ (function(module, exports, __webpack_require__) {
305
306"use strict";
307
308var __extends = (this && this.__extends) || (function () {
309    var extendStatics = function (d, b) {
310        extendStatics = Object.setPrototypeOf ||
311            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
312            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
313        return extendStatics(d, b);
314    };
315    return function (d, b) {
316        extendStatics(d, b);
317        function __() { this.constructor = d; }
318        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
319    };
320})();
321Object.defineProperty(exports, "__esModule", { value: true });
322var SmartFormBasicDataStore_1 = __webpack_require__(/*! ./SmartFormBasicDataStore */ "./formBuilder/dataStores/SmartFormBasicDataStore.ts");
323var SmartFormRepeaterDataStore = /** @class */ (function (_super) {
324    __extends(SmartFormRepeaterDataStore, _super);
325    function SmartFormRepeaterDataStore(instance) {
326        var _this = _super.call(this, 'value') || this;
327        _this.instance = instance;
328        _this.rows = [];
329        return _this;
330    }
331    SmartFormRepeaterDataStore.prototype.toString = function () {
332        alert('Sorry a repeater field can not be used in formulas like this');
333    };
334    SmartFormRepeaterDataStore.prototype.Clone = function () {
335        return Object.assign(Object.create(Object.getPrototypeOf(this)), this);
336    };
337    SmartFormRepeaterDataStore.prototype.GetCount = function () {
338        if (this.instance._ignore)
339            return 0;
340        if (this.value == 0)
341            return 0;
342        return this.value.length;
343    };
344    SmartFormRepeaterDataStore.prototype.GetTotal = function (fieldId) {
345        if (this.instance._ignore)
346            return 0;
347        var data = RedNaoFormulaManagerVar.Data;
348        var total = 0;
349        for (var i = 0; i < this.value.length; i++) {
350            if (typeof data[fieldId + '_row_' + i] != 'undefined')
351                total += data[fieldId + '_row_' + i].toString();
352        }
353        return total;
354    };
355    SmartFormRepeaterDataStore.prototype.GetField = function (rowIndex, fieldId) {
356        if (this.instance._ignore)
357            return '';
358        if (rowIndex instanceof sfFormElementBase)
359            rowIndex = rowIndex.RowIndex;
360        if (typeof RedNaoFormulaManagerVar.Data[fieldId + '_row_' + rowIndex] == 'undefined')
361            return '';
362        else
363            return RedNaoFormulaManagerVar.Data[fieldId + '_row_' + rowIndex];
364    };
365    return SmartFormRepeaterDataStore;
366}(SmartFormBasicDataStore_1.SmartFormBasicDataStore));
367exports.SmartFormRepeaterDataStore = SmartFormRepeaterDataStore;
368
369
370/***/ }),
371
372/***/ "./formBuilder/dataStores/SmartFormsDataStoreBootstrap.ts":
373/*!****************************************************************!*\
374  !*** ./formBuilder/dataStores/SmartFormsDataStoreBootstrap.ts ***!
375  \****************************************************************/
376/*! no static exports found */
377/***/ (function(module, exports, __webpack_require__) {
378
379"use strict";
380
381Object.defineProperty(exports, "__esModule", { value: true });
382window.SmartFormMultipleItemsDataStore = __webpack_require__(/*! ./SmartFormMultipleItemsDataStore */ "./formBuilder/dataStores/SmartFormMultipleItemsDataStore.ts").SmartFormMultipleItemsDataStore;
383window.SmartFormBasicDataStore = __webpack_require__(/*! ./SmartFormBasicDataStore */ "./formBuilder/dataStores/SmartFormBasicDataStore.ts").SmartFormBasicDataStore;
384window.SmartFormDateDataStore = __webpack_require__(/*! ./SmartFormDateDataStore */ "./formBuilder/dataStores/SmartFormDateDataStore.ts").SmartFormDateDataStore;
385window.SmartFormRepeaterDataStore = __webpack_require__(/*! ./SmartFormRepeaterDataStore */ "./formBuilder/dataStores/SmartFormRepeaterDataStore.ts").SmartFormRepeaterDataStore;
386window.SmartFormCurrencyDataStore = __webpack_require__(/*! ./SmartFormCurrencyDataStore */ "./formBuilder/dataStores/SmartFormCurrencyDataStore.ts").SmartFormCurrencyDataStore;
387
388
389/***/ })
389
390
391/******/ });
392//# sourceMappingURL=datastores_bundle.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.