@mchp-mcc/scf-pic8-interrupt-v3 1.0.0

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.
@@ -0,0 +1,3859 @@
1
+ var autoCreator =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = "./generated_module/src/autoCreator.ts");
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ "./generated_module/src/Utils.ts":
91
+ /*!***************************************!*\
92
+ !*** ./generated_module/src/Utils.ts ***!
93
+ \***************************************/
94
+ /*! exports provided: getKeys, values, forEach, map, assertNotNull, toDictionary */
95
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
96
+
97
+ "use strict";
98
+ __webpack_require__.r(__webpack_exports__);
99
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getKeys", function() { return getKeys; });
100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; });
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; });
102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assertNotNull", function() { return assertNotNull; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toDictionary", function() { return toDictionary; });
105
+ /** @returns the non-prototype keys of the given object */
106
+ var getKeys = function getKeys(obj) {
107
+ /* eslint-disable-line */
108
+ return Object.getOwnPropertyNames(obj);
109
+ };
110
+ var values = function values(obj) {
111
+ return getKeys(obj).map(function (key) {
112
+ return obj[key];
113
+ });
114
+ };
115
+ var forEach = function forEach(obj, action) {
116
+ getKeys(obj).forEach(function (key) {
117
+ return action(key, obj[key]);
118
+ });
119
+ };
120
+ var map = function map(obj, mapper) {
121
+ return getKeys(obj).map(function (key) {
122
+ return mapper(key, obj[key]);
123
+ });
124
+ };
125
+ var assertNotNull = function assertNotNull(val, msg) {
126
+ if (val == null) {
127
+ throw new Error(msg);
128
+ }
129
+ };
130
+ var toDictionary = function toDictionary(arr, keyMapper, valueMapper) {
131
+ var result = {};
132
+ arr.forEach(function (entry) {
133
+ result[keyMapper(entry)] = valueMapper(entry);
134
+ });
135
+ return result;
136
+ };
137
+
138
+ /***/ }),
139
+
140
+ /***/ "./generated_module/src/autoCreator.ts":
141
+ /*!*********************************************!*\
142
+ !*** ./generated_module/src/autoCreator.ts ***!
143
+ \*********************************************/
144
+ /*! exports provided: getCreatorFunctions */
145
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
146
+
147
+ "use strict";
148
+ __webpack_require__.r(__webpack_exports__);
149
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return getCreatorFunctions; });
150
+ /* harmony import */ var _getUserData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getUserData */ "./generated_module/src/getUserData.ts");
151
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
152
+
153
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
154
+
155
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
156
+
157
+
158
+
159
+ var createAutoCreator = function createAutoCreator(getCreatorFunctions) {
160
+ return function () {
161
+ return _objectSpread({
162
+ getModuleConfig: _getUserData__WEBPACK_IMPORTED_MODULE_0__["getModuleConfigFromFile"]
163
+ }, getCreatorFunctions());
164
+ };
165
+ };
166
+
167
+ var getCreatorFunctions = createAutoCreator(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getCreatorFunctions"]);
168
+
169
+ /***/ }),
170
+
171
+ /***/ "./generated_module/src/getUserData.ts":
172
+ /*!*********************************************!*\
173
+ !*** ./generated_module/src/getUserData.ts ***!
174
+ \*********************************************/
175
+ /*! exports provided: getCreatorFunctions, getDerivedData, getPinsDataFromFile, getPinsLogicFromFile, getModuleConfigFromFile */
176
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
177
+
178
+ "use strict";
179
+ __webpack_require__.r(__webpack_exports__);
180
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsDataFromFile", function() { return getPinsDataFromFile; });
181
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsLogicFromFile", function() { return getPinsLogicFromFile; });
182
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModuleConfigFromFile", function() { return getModuleConfigFromFile; });
183
+ /* harmony import */ var _src_CreatorFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../src/CreatorFunctions */ "./src/CreatorFunctions.ts");
184
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return _src_CreatorFunctions__WEBPACK_IMPORTED_MODULE_0__["getCreatorFunctions"]; });
185
+
186
+ /* harmony import */ var _src_DerivedData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../src/DerivedData */ "./src/DerivedData.ts");
187
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDerivedData", function() { return _src_DerivedData__WEBPACK_IMPORTED_MODULE_1__["getDerivedData"]; });
188
+
189
+
190
+
191
+ var getPinsDataFromFile = function getPinsDataFromFile() {
192
+ try {
193
+ return __webpack_require__(/*! ../../src/pinsdata.json */ "./src/pinsdata.json");
194
+ } catch (_unused) {
195
+ return undefined;
196
+ }
197
+ };
198
+ var getPinsLogicFromFile = function getPinsLogicFromFile() {
199
+ try {
200
+ return __webpack_require__(/*! ../../src/PinsLogic.ts */ "./src/PinsLogic.ts");
201
+ } catch (_unused2) {
202
+ return undefined;
203
+ }
204
+ };
205
+ var getModuleConfigFromFile = function getModuleConfigFromFile() {
206
+ try {
207
+ return __webpack_require__(/*! ../../src/moduleConfig.json */ "./src/moduleConfig.json");
208
+ } catch (_unused3) {
209
+ return undefined;
210
+ }
211
+ };
212
+
213
+ /***/ }),
214
+
215
+ /***/ "./generated_module/src/pins/PCPHelper.ts":
216
+ /*!************************************************!*\
217
+ !*** ./generated_module/src/pins/PCPHelper.ts ***!
218
+ \************************************************/
219
+ /*! exports provided: getPinsData, getPinsLogic */
220
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
221
+
222
+ "use strict";
223
+ __webpack_require__.r(__webpack_exports__);
224
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsData", function() { return getPinsData; });
225
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsLogic", function() { return getPinsLogic; });
226
+ /* harmony import */ var _getUserData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../getUserData */ "./generated_module/src/getUserData.ts");
227
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
228
+
229
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
230
+
231
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
232
+
233
+
234
+
235
+ var mockPinsLogic = function mockPinsLogic(getPinsData) {
236
+ var getCompletePinData = function getCompletePinData(appModel) {
237
+ return {};
238
+ };
239
+
240
+ var getRowData = function getRowData(appModel, rowData) {
241
+ return rowData;
242
+ };
243
+
244
+ return {
245
+ getCompletePinData: getCompletePinData,
246
+ getRowData: getRowData,
247
+ getPinsData: getPinsData
248
+ };
249
+ };
250
+
251
+ var getPinsData = function getPinsData() {
252
+ var _getPinsDataFromFile;
253
+
254
+ return (_getPinsDataFromFile = Object(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getPinsDataFromFile"])()) !== null && _getPinsDataFromFile !== void 0 ? _getPinsDataFromFile : {
255
+ rows: []
256
+ };
257
+ };
258
+ var getPinsLogic = function getPinsLogic() {
259
+ var pinsLogic = Object(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getPinsLogicFromFile"])();
260
+
261
+ if (pinsLogic) {
262
+ return _objectSpread(_objectSpread({}, pinsLogic), {}, {
263
+ getPinsData: getPinsData
264
+ });
265
+ } else {
266
+ return mockPinsLogic(getPinsData);
267
+ }
268
+ };
269
+
270
+ /***/ }),
271
+
272
+ /***/ "./node_modules/@microchip/initializer-system/lib/package.json":
273
+ /*!*********************************************************************!*\
274
+ !*** ./node_modules/@microchip/initializer-system/lib/package.json ***!
275
+ \*********************************************************************/
276
+ /*! exports provided: name, version, license, main, typings, scripts, husky, lint-staged, bitBucketRepository, repository, publishConfig, jest, dependencies, devDependencies, files, notificationEmail, default */
277
+ /***/ (function(module) {
278
+
279
+ module.exports = JSON.parse("{\"name\":\"@microchip/initializer-system\",\"version\":\"0.5.5\",\"license\":\"SEE LICENSE IN LICENSE.txt\",\"main\":\"lib/src/index.js\",\"typings\":\"./lib/src/index.d.ts\",\"scripts\":{\"build\":\"tsc\",\"test\":\"jest\",\"lint:nofix\":\"eslint \\\"./src/**/*.{ts,tsx}\\\" --quiet\",\"lint\":\"tsc --noEmit && yarn lint:nofix --fix\"},\"husky\":{\"hooks\":{\"pre-commit\":\"tsc --noEmit && lint-staged\"}},\"lint-staged\":{\"./src/**/*.{ts,tsx}\":[\"eslint --fix\"]},\"bitBucketRepository\":\"https://bitbucket.microchip.com/projects/SCF/repos/initializer-system/browse\",\"repository\":{\"type\":\"git\",\"url\":\"git+ssh://git@https://bitbucket.microchip.com/scm/scf/initializer-system.git\"},\"publishConfig\":{\"registry\":\"https://artifacts.microchip.com/artifactory/api/npm/npm/\"},\"jest\":{\"testPathIgnorePatterns\":[\"/node_modules/\",\"/run/\",\"/lib/\"],\"modulePathIgnorePatterns\":[\"<rootDir>/run\"],\"preset\":\"ts-jest\",\"collectCoverage\":true},\"dependencies\":{\"@microchip/scf-common\":\"^3.6.0\",\"@microchip/scf-interface\":\"^1.4.0\"},\"devDependencies\":{\"@types/jest\":\"^24.0.14\",\"@types/node\":\"^12.0.10\",\"@typescript-eslint/eslint-plugin\":\"^2.27.0\",\"@typescript-eslint/parser\":\"^2.27.0\",\"eslint\":\"^6.8.0\",\"eslint-config-prettier\":\"^6.10.1\",\"eslint-plugin-prettier\":\"^3.1.2\",\"husky\":\"^4.2.4\",\"jest\":\"^24.8.0\",\"lint-staged\":\"^10.2.0\",\"prettier\":\"^2.0.4\",\"ts-jest\":\"^24.0.2\",\"typescript\":\"^3.8.3\"},\"files\":[\"lib/**/*\"],\"notificationEmail\":\"03234d44.microchip.com@amer.teams.ms\"}");
280
+
281
+ /***/ }),
282
+
283
+ /***/ "./node_modules/@microchip/initializer-system/lib/src/index.js":
284
+ /*!*********************************************************************!*\
285
+ !*** ./node_modules/@microchip/initializer-system/lib/src/index.js ***!
286
+ \*********************************************************************/
287
+ /*! no static exports found */
288
+ /***/ (function(module, exports, __webpack_require__) {
289
+
290
+ "use strict";
291
+
292
+ Object.defineProperty(exports, "__esModule", { value: true });
293
+ var initializer_system_1 = __webpack_require__(/*! ./initializer-system */ "./node_modules/@microchip/initializer-system/lib/src/initializer-system.js");
294
+ exports.Interface = initializer_system_1.Interface;
295
+ exports.INIT_PRIORITY = initializer_system_1.INIT_PRIORITY;
296
+ exports.sortInitializers = initializer_system_1.sortInitializers;
297
+ //# sourceMappingURL=index.js.map
298
+
299
+ /***/ }),
300
+
301
+ /***/ "./node_modules/@microchip/initializer-system/lib/src/initializer-system.js":
302
+ /*!**********************************************************************************!*\
303
+ !*** ./node_modules/@microchip/initializer-system/lib/src/initializer-system.js ***!
304
+ \**********************************************************************************/
305
+ /*! no static exports found */
306
+ /***/ (function(module, exports, __webpack_require__) {
307
+
308
+ "use strict";
309
+
310
+ var __spreadArrays = (this && this.__spreadArrays) || function () {
311
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
312
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
313
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
314
+ r[k] = a[j];
315
+ return r;
316
+ };
317
+ var __importStar = (this && this.__importStar) || function (mod) {
318
+ if (mod && mod.__esModule) return mod;
319
+ var result = {};
320
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
321
+ result["default"] = mod;
322
+ return result;
323
+ };
324
+ Object.defineProperty(exports, "__esModule", { value: true });
325
+ var InterfaceTypes = __importStar(__webpack_require__(/*! @microchip/scf-interface */ "./node_modules/@microchip/scf-interface/lib/index.js"));
326
+ var pkgJson = __importStar(__webpack_require__(/*! ../package.json */ "./node_modules/@microchip/initializer-system/lib/package.json"));
327
+ var getInterfaceId = function () {
328
+ return {
329
+ name: InterfaceTypes.getInterfaceName(pkgJson),
330
+ version: InterfaceTypes.getInterfaceVersion(pkgJson),
331
+ };
332
+ };
333
+ exports.sortInitializers = function (initializers) {
334
+ var retinitializers = __spreadArrays(initializers);
335
+ retinitializers.sort(prioritySorter);
336
+ return retinitializers;
337
+ };
338
+ var prioritySorter = function (a, b) {
339
+ var _a, _b, _c, _d, _e, _f, _g, _h;
340
+ var result = 0;
341
+ var apriority = (_b = (_a = a === null || a === void 0 ? void 0 : a.initializer) === null || _a === void 0 ? void 0 : _a.priority) !== null && _b !== void 0 ? _b : INIT_PRIORITY.DEFAULT;
342
+ var bpriority = (_d = (_c = b === null || b === void 0 ? void 0 : b.initializer) === null || _c === void 0 ? void 0 : _c.priority) !== null && _d !== void 0 ? _d : INIT_PRIORITY.DEFAULT;
343
+ if (apriority < bpriority) {
344
+ result = -1;
345
+ }
346
+ else if (apriority > bpriority) {
347
+ result = 1;
348
+ }
349
+ else {
350
+ //same priority sort via intializer name alphabetically
351
+ result = (_h = (_f = (_e = a === null || a === void 0 ? void 0 : a.initializer) === null || _e === void 0 ? void 0 : _e.name) === null || _f === void 0 ? void 0 : _f.localeCompare((_g = b === null || b === void 0 ? void 0 : b.initializer) === null || _g === void 0 ? void 0 : _g.name)) !== null && _h !== void 0 ? _h : 0;
352
+ }
353
+ return result;
354
+ };
355
+ var INIT_PRIORITY;
356
+ (function (INIT_PRIORITY) {
357
+ INIT_PRIORITY[INIT_PRIORITY["START"] = 1] = "START";
358
+ INIT_PRIORITY[INIT_PRIORITY["PRE_PERIPHERAL"] = 50] = "PRE_PERIPHERAL";
359
+ INIT_PRIORITY[INIT_PRIORITY["PERIPHERAL"] = 100] = "PERIPHERAL";
360
+ INIT_PRIORITY[INIT_PRIORITY["POST_PERIPHERAL"] = 150] = "POST_PERIPHERAL";
361
+ INIT_PRIORITY[INIT_PRIORITY["DEFAULT"] = 200] = "DEFAULT";
362
+ INIT_PRIORITY[INIT_PRIORITY["PRE_SOFTWARE"] = 250] = "PRE_SOFTWARE";
363
+ INIT_PRIORITY[INIT_PRIORITY["SOFTWARE"] = 300] = "SOFTWARE";
364
+ INIT_PRIORITY[INIT_PRIORITY["POST_SOFTWARE"] = 350] = "POST_SOFTWARE";
365
+ INIT_PRIORITY[INIT_PRIORITY["END"] = 400] = "END";
366
+ })(INIT_PRIORITY = exports.INIT_PRIORITY || (exports.INIT_PRIORITY = {}));
367
+ var createMock = function () {
368
+ return {
369
+ interfaceId: getInterfaceId(),
370
+ payload: {
371
+ moduleName: "MyModule",
372
+ },
373
+ args: {},
374
+ results: {
375
+ requestId: {
376
+ initializer: {
377
+ name: "mymodule_init",
378
+ header: {
379
+ name: "mymodule.h",
380
+ path: "include/",
381
+ },
382
+ },
383
+ registerInit: [
384
+ {
385
+ name: "OSCCON1",
386
+ comment: "//Comments",
387
+ value: 55,
388
+ valueAsHex: "0x55",
389
+ },
390
+ ],
391
+ },
392
+ },
393
+ };
394
+ };
395
+ var createPrototypeImport = function () {
396
+ return {
397
+ interfaceId: getInterfaceId(),
398
+ };
399
+ };
400
+ var createPrototypeExport = function () {
401
+ return {
402
+ interfaces: [{ interfaceId: getInterfaceId() }],
403
+ };
404
+ };
405
+ exports.Interface = {
406
+ createPrototypeExport: createPrototypeExport,
407
+ createPrototypeImport: createPrototypeImport,
408
+ getInterfaceId: getInterfaceId,
409
+ createMock: createMock,
410
+ };
411
+ //# sourceMappingURL=initializer-system.js.map
412
+
413
+ /***/ }),
414
+
415
+ /***/ "./node_modules/@microchip/interrupt-manager-generic/lib/InterruptTableView/InterruptTableViewHelper.js":
416
+ /*!**************************************************************************************************************!*\
417
+ !*** ./node_modules/@microchip/interrupt-manager-generic/lib/InterruptTableView/InterruptTableViewHelper.js ***!
418
+ \**************************************************************************************************************/
419
+ /*! no static exports found */
420
+ /***/ (function(module, exports, __webpack_require__) {
421
+
422
+ "use strict";
423
+
424
+ Object.defineProperty(exports, "__esModule", { value: true });
425
+ exports.getTableOrder = exports.getInterruptTableView = void 0;
426
+ var StateHelper_1 = __webpack_require__(/*! ../manager_helper/StateHelper */ "./node_modules/@microchip/interrupt-manager-generic/lib/manager_helper/StateHelper.js");
427
+ exports.getInterruptTableView = function (state) {
428
+ var tables = [];
429
+ for (var _i = 1; _i < arguments.length; _i++) {
430
+ tables[_i - 1] = arguments[_i];
431
+ }
432
+ var interruptTables = tables === null || tables === void 0 ? void 0 : tables.map(function (table) {
433
+ if (table) {
434
+ return {
435
+ tableId: table.tableId,
436
+ tableDescription: table.tableDescription,
437
+ headers: table.headers,
438
+ rowData: table.rowData,
439
+ moduleIds: table.moduleIds,
440
+ showOrderColumn: table.showOrderColumn,
441
+ hasReorder: table.hasReorder,
442
+ order: exports.getTableOrder(state, table),
443
+ };
444
+ }
445
+ });
446
+ return {
447
+ interruptTables: interruptTables,
448
+ };
449
+ };
450
+ exports.getTableOrder = function (state, table) {
451
+ var _a;
452
+ return (_a = StateHelper_1.getIntTableOrderFromState(state, table.tableId)) !== null && _a !== void 0 ? _a : Object.keys(table.rowData);
453
+ };
454
+ //# sourceMappingURL=InterruptTableViewHelper.js.map
455
+
456
+ /***/ }),
457
+
458
+ /***/ "./node_modules/@microchip/interrupt-manager-generic/lib/InterruptTableView/TableActions.js":
459
+ /*!**************************************************************************************************!*\
460
+ !*** ./node_modules/@microchip/interrupt-manager-generic/lib/InterruptTableView/TableActions.js ***!
461
+ \**************************************************************************************************/
462
+ /*! no static exports found */
463
+ /***/ (function(module, exports, __webpack_require__) {
464
+
465
+ "use strict";
466
+
467
+ Object.defineProperty(exports, "__esModule", { value: true });
468
+ exports.cellUpdateAction = exports.Actions = void 0;
469
+ exports.Actions = {
470
+ CELL_UPDATE: "CELL_UPDATE",
471
+ ROW_UP: "ROW_UP",
472
+ ROW_DOWN: "ROW_DOWN",
473
+ ROW_SELECT: "ROW_SELECT",
474
+ ADD_ROW: "ADD_ROW",
475
+ DELETE_ROW: "DELETE_ROW",
476
+ };
477
+ exports.cellUpdateAction = function (tableId, moduleId, column, rowId, cellValue) {
478
+ return {
479
+ type: exports.Actions.CELL_UPDATE,
480
+ payload: {
481
+ tableId: tableId,
482
+ moduleId: moduleId,
483
+ column: column,
484
+ rowId: rowId,
485
+ cellValue: cellValue,
486
+ },
487
+ };
488
+ };
489
+ //# sourceMappingURL=TableActions.js.map
490
+
491
+ /***/ }),
492
+
493
+ /***/ "./node_modules/@microchip/interrupt-manager-generic/lib/InterruptTableView/reduce.js":
494
+ /*!********************************************************************************************!*\
495
+ !*** ./node_modules/@microchip/interrupt-manager-generic/lib/InterruptTableView/reduce.js ***!
496
+ \********************************************************************************************/
497
+ /*! no static exports found */
498
+ /***/ (function(module, exports, __webpack_require__) {
499
+
500
+ "use strict";
501
+
502
+ var __assign = (this && this.__assign) || function () {
503
+ __assign = Object.assign || function(t) {
504
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
505
+ s = arguments[i];
506
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
507
+ t[p] = s[p];
508
+ }
509
+ return t;
510
+ };
511
+ return __assign.apply(this, arguments);
512
+ };
513
+ Object.defineProperty(exports, "__esModule", { value: true });
514
+ exports.reduce = void 0;
515
+ var TableActions_1 = __webpack_require__(/*! ./TableActions */ "./node_modules/@microchip/interrupt-manager-generic/lib/InterruptTableView/TableActions.js");
516
+ exports.reduce = function (state, action) {
517
+ switch (action.type) {
518
+ case TableActions_1.Actions.CELL_UPDATE:
519
+ return CellUpdateReducer(state, action);
520
+ default:
521
+ return state;
522
+ }
523
+ };
524
+ var CellUpdateReducer = function (state, action) {
525
+ var _a, _b, _c;
526
+ var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
527
+ if (action.payload && ((_d = action.payload) === null || _d === void 0 ? void 0 : _d.moduleId) && ((_e = action.payload) === null || _e === void 0 ? void 0 : _e.rowId) && ((_f = action.payload) === null || _f === void 0 ? void 0 : _f.column)) {
528
+ return __assign(__assign({}, (state !== null && state !== void 0 ? state : {})), { interruptTables: __assign(__assign({}, ((_g = state === null || state === void 0 ? void 0 : state["interruptTables"]) !== null && _g !== void 0 ? _g : {})), { data: __assign(__assign({}, ((_j = (_h = state === null || state === void 0 ? void 0 : state["interruptTables"]) === null || _h === void 0 ? void 0 : _h.data) !== null && _j !== void 0 ? _j : {})), (_a = {}, _a[action.payload.moduleId] = __assign(__assign({}, ((_m = (_l = (_k = state === null || state === void 0 ? void 0 : state["interruptTables"]) === null || _k === void 0 ? void 0 : _k.data) === null || _l === void 0 ? void 0 : _l[action.payload.moduleId]) !== null && _m !== void 0 ? _m : {})), (_b = {}, _b[action.payload.rowId] = __assign(__assign({}, ((_s = (_q = (_p = (_o = state === null || state === void 0 ? void 0 : state["interruptTables"]) === null || _o === void 0 ? void 0 : _o.data) === null || _p === void 0 ? void 0 : _p[action.payload.moduleId]) === null || _q === void 0 ? void 0 : _q[(_r = action.payload) === null || _r === void 0 ? void 0 : _r.rowId]) !== null && _s !== void 0 ? _s : {})), (_c = {}, _c[action.payload.column] = action.payload.cellValue, _c)), _b)), _a)) }) });
529
+ }
530
+ };
531
+ //# sourceMappingURL=reduce.js.map
532
+
533
+ /***/ }),
534
+
535
+ /***/ "./node_modules/@microchip/interrupt-manager-generic/lib/index.js":
536
+ /*!************************************************************************!*\
537
+ !*** ./node_modules/@microchip/interrupt-manager-generic/lib/index.js ***!
538
+ \************************************************************************/
539
+ /*! no static exports found */
540
+ /***/ (function(module, exports, __webpack_require__) {
541
+
542
+ "use strict";
543
+
544
+ // export { InterruptTableHelper } from "./InterruptTableHelper";
545
+ // export {
546
+ // BaseTable,
547
+ // BaseTableColumns,
548
+ // BaseTableRowData,
549
+ // InterruptData,
550
+ // InterruptHeaderInfo,
551
+ // ColumnTypes,
552
+ // InterruptTableData,
553
+ // Row,
554
+ // } from "./types";
555
+ Object.defineProperty(exports, "__esModule", { value: true });
556
+ exports.reduce = exports.getInterruptTableView = exports.cellUpdateAction = exports.Actions = exports.getIntTableOrderFromState = exports.getIntTableDataFromState = exports.getInterruptTableState = exports.InterruptManagerHelper = exports.NoMetaModule = void 0;
557
+ var TableCell_1 = __webpack_require__(/*! ./types/TableCell */ "./node_modules/@microchip/interrupt-manager-generic/lib/types/TableCell.js");
558
+ Object.defineProperty(exports, "NoMetaModule", { enumerable: true, get: function () { return TableCell_1.NoMetaModule; } });
559
+ var InterruptManagerHelper_1 = __webpack_require__(/*! ./manager_helper/InterruptManagerHelper */ "./node_modules/@microchip/interrupt-manager-generic/lib/manager_helper/InterruptManagerHelper.js");
560
+ Object.defineProperty(exports, "InterruptManagerHelper", { enumerable: true, get: function () { return InterruptManagerHelper_1.InterruptManagerHelper; } });
561
+ var StateHelper_1 = __webpack_require__(/*! ./manager_helper/StateHelper */ "./node_modules/@microchip/interrupt-manager-generic/lib/manager_helper/StateHelper.js");
562
+ Object.defineProperty(exports, "getInterruptTableState", { enumerable: true, get: function () { return StateHelper_1.getInterruptTableState; } });
563
+ Object.defineProperty(exports, "getIntTableDataFromState", { enumerable: true, get: function () { return StateHelper_1.getIntTableDataFromState; } });
564
+ Object.defineProperty(exports, "getIntTableOrderFromState", { enumerable: true, get: function () { return StateHelper_1.getIntTableOrderFromState; } });
565
+ // export {
566
+ // InterruptTablesApp,
567
+ // Props as InterruptTablesProps,
568
+ // } from "./InterruptTableView/InterruptTablesApp";
569
+ var TableActions_1 = __webpack_require__(/*! ./InterruptTableView/TableActions */ "./node_modules/@microchip/interrupt-manager-generic/lib/InterruptTableView/TableActions.js");
570
+ Object.defineProperty(exports, "Actions", { enumerable: true, get: function () { return TableActions_1.Actions; } });
571
+ Object.defineProperty(exports, "cellUpdateAction", { enumerable: true, get: function () { return TableActions_1.cellUpdateAction; } });
572
+ var InterruptTableViewHelper_1 = __webpack_require__(/*! ./InterruptTableView/InterruptTableViewHelper */ "./node_modules/@microchip/interrupt-manager-generic/lib/InterruptTableView/InterruptTableViewHelper.js");
573
+ Object.defineProperty(exports, "getInterruptTableView", { enumerable: true, get: function () { return InterruptTableViewHelper_1.getInterruptTableView; } });
574
+ var reduce_1 = __webpack_require__(/*! ./InterruptTableView/reduce */ "./node_modules/@microchip/interrupt-manager-generic/lib/InterruptTableView/reduce.js");
575
+ Object.defineProperty(exports, "reduce", { enumerable: true, get: function () { return reduce_1.reduce; } });
576
+ //# sourceMappingURL=index.js.map
577
+
578
+ /***/ }),
579
+
580
+ /***/ "./node_modules/@microchip/interrupt-manager-generic/lib/manager_helper/InterruptManagerHelper.js":
581
+ /*!********************************************************************************************************!*\
582
+ !*** ./node_modules/@microchip/interrupt-manager-generic/lib/manager_helper/InterruptManagerHelper.js ***!
583
+ \********************************************************************************************************/
584
+ /*! no static exports found */
585
+ /***/ (function(module, exports, __webpack_require__) {
586
+
587
+ "use strict";
588
+
589
+ var __assign = (this && this.__assign) || function () {
590
+ __assign = Object.assign || function(t) {
591
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
592
+ s = arguments[i];
593
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
594
+ t[p] = s[p];
595
+ }
596
+ return t;
597
+ };
598
+ return __assign.apply(this, arguments);
599
+ };
600
+ Object.defineProperty(exports, "__esModule", { value: true });
601
+ exports.InterruptManagerHelper = void 0;
602
+ var TableCell_1 = __webpack_require__(/*! ../types/TableCell */ "./node_modules/@microchip/interrupt-manager-generic/lib/types/TableCell.js");
603
+ var StateHelper_1 = __webpack_require__(/*! ./StateHelper */ "./node_modules/@microchip/interrupt-manager-generic/lib/manager_helper/StateHelper.js");
604
+ var InterruptManagerHelper = /** @class */ (function () {
605
+ function InterruptManagerHelper(initTableData, state, initInterruptsData) {
606
+ var _this = this;
607
+ this.initInterruptsData = {};
608
+ this.interruptTableRowData = {};
609
+ this.interruptModuleIds = {};
610
+ this.extraData = {};
611
+ this.showTable = true;
612
+ this.addInterruptHookData = function (dataKey, data, moduleId) {
613
+ var _a;
614
+ var rowData = {};
615
+ Object.keys(data).forEach(function (buffKey) {
616
+ var _a;
617
+ var _b;
618
+ if (_this.initTableData.headers[buffKey].show) {
619
+ rowData = __assign(__assign({}, rowData), (_a = {}, _a[buffKey] = {
620
+ value: data[buffKey].value,
621
+ options: data[buffKey].options,
622
+ actions: (_b = data[buffKey].actions) === null || _b === void 0 ? void 0 : _b.map(function (action) {
623
+ var _a;
624
+ action.action.payload.value =
625
+ typeof action.action.payload.value === "boolean"
626
+ ? action.action.payload.value
627
+ ? "true"
628
+ : "false"
629
+ : action.action.payload.value;
630
+ action.action.meta =
631
+ moduleId === TableCell_1.NoMetaModule ||
632
+ ((_a = action.action.meta) === null || _a === void 0 ? void 0 : _a.to) === TableCell_1.NoMetaModule
633
+ ? undefined
634
+ : action.action.meta != undefined
635
+ ? action.action.meta
636
+ : {
637
+ to: moduleId,
638
+ };
639
+ return action;
640
+ }),
641
+ }, _a));
642
+ }
643
+ });
644
+ _this.interruptTableRowData = __assign(__assign({}, _this.interruptTableRowData), (_a = {}, _a[dataKey] = rowData, _a));
645
+ };
646
+ this.getModuleIds = function () { return _this.interruptModuleIds; };
647
+ this.initInterruptsData = initInterruptsData;
648
+ this.initTableData = initTableData;
649
+ this.state = state;
650
+ }
651
+ InterruptManagerHelper.prototype.dataMap = function (moduleId, dataToHook, rowIdMapper, dataMapper, extraDataMapper) {
652
+ var _this = this;
653
+ dataToHook.forEach(function (data) {
654
+ var _a, _b;
655
+ var _c;
656
+ var rowId = rowIdMapper(data);
657
+ var hookData = dataMapper(data, rowId);
658
+ if (hookData == undefined)
659
+ return;
660
+ var extraData = (_c = extraDataMapper === null || extraDataMapper === void 0 ? void 0 : extraDataMapper(data, rowId)) !== null && _c !== void 0 ? _c : data;
661
+ _this.interruptModuleIds = __assign(__assign({}, _this.interruptModuleIds), (_a = {}, _a[rowId] = moduleId, _a));
662
+ _this.extraData = __assign(__assign({}, _this.extraData), (_b = {}, _b[rowId] = extraData, _b));
663
+ _this.addInterruptHookData(rowId, hookData, moduleId);
664
+ });
665
+ return this;
666
+ };
667
+ InterruptManagerHelper.prototype.getRowDataElementValue = function (moduleId, colName, rowId, defaultVal) {
668
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
669
+ var tableState = StateHelper_1.getIntTableDataFromState(this.state);
670
+ if (((_c = (_b = (_a = tableState === null || tableState === void 0 ? void 0 : tableState.data) === null || _a === void 0 ? void 0 : _a[moduleId]) === null || _b === void 0 ? void 0 : _b[rowId]) === null || _c === void 0 ? void 0 : _c[colName]) != undefined) {
671
+ return (_f = (_e = (_d = tableState === null || tableState === void 0 ? void 0 : tableState.data) === null || _d === void 0 ? void 0 : _d[moduleId]) === null || _e === void 0 ? void 0 : _e[rowId]) === null || _f === void 0 ? void 0 : _f[colName];
672
+ }
673
+ else
674
+ return defaultVal !== null && defaultVal !== void 0 ? defaultVal : (_j = (_h = (_g = this.interruptTableRowData) === null || _g === void 0 ? void 0 : _g[rowId]) === null || _h === void 0 ? void 0 : _h[colName]) === null || _j === void 0 ? void 0 : _j.value;
675
+ };
676
+ InterruptManagerHelper.prototype.getProcessedTableData = function () {
677
+ var _this = this;
678
+ var _a;
679
+ if (this.showTable) {
680
+ var rowData_1 = {};
681
+ ((_a = this.order) !== null && _a !== void 0 ? _a : Object.keys(this.interruptTableRowData)).forEach(function (id) {
682
+ var _a;
683
+ rowData_1 = __assign(__assign({}, rowData_1), (_a = {}, _a[id] = _this.interruptTableRowData[id], _a));
684
+ });
685
+ return {
686
+ tableId: this.initTableData.tableId,
687
+ tableDescription: this.initTableData.tableDescription,
688
+ headers: this.initTableData.headers,
689
+ rowData: rowData_1,
690
+ moduleIds: this.interruptModuleIds,
691
+ hasReorder: this.initTableData.hasReorder,
692
+ showOrderColumn: this.initTableData.showOrderColumn,
693
+ order: this.order,
694
+ };
695
+ }
696
+ };
697
+ InterruptManagerHelper.prototype.setTableShow = function () {
698
+ this.showTable = true;
699
+ return this;
700
+ };
701
+ InterruptManagerHelper.prototype.unsetTableShow = function () {
702
+ this.showTable = false;
703
+ return this;
704
+ };
705
+ InterruptManagerHelper.prototype.getProcessedInterruptData = function () {
706
+ var _this = this;
707
+ var extractData = [];
708
+ for (var _i = 0; _i < arguments.length; _i++) {
709
+ extractData[_i] = arguments[_i];
710
+ }
711
+ var myReturn = [];
712
+ if (this.showTable) {
713
+ (this.order ? this.order : Object.keys(this.interruptTableRowData)).forEach(function (interruptId) {
714
+ var data = {};
715
+ extractData === null || extractData === void 0 ? void 0 : extractData.forEach(function (dataKey) {
716
+ var _a;
717
+ var _b, _c, _d, _e, _f;
718
+ data = __assign(__assign({}, data), (_a = {}, _a[dataKey] = (_d = (_c = (_b = _this.extraData) === null || _b === void 0 ? void 0 : _b[interruptId]) === null || _c === void 0 ? void 0 : _c[dataKey]) !== null && _d !== void 0 ? _d : (_f = (_e = _this.initInterruptsData) === null || _e === void 0 ? void 0 : _e[interruptId]) === null || _f === void 0 ? void 0 : _f[dataKey], _a));
719
+ });
720
+ myReturn.push(data);
721
+ });
722
+ }
723
+ return myReturn;
724
+ };
725
+ InterruptManagerHelper.prototype.setOrder = function (orderMap) {
726
+ var _this = this;
727
+ var rowIds = Object.keys(this.interruptTableRowData);
728
+ var storedData = {};
729
+ rowIds.forEach(function (rowId) {
730
+ var _a;
731
+ var _b, _c, _d, _e;
732
+ storedData = __assign(__assign({}, storedData), (_a = {}, _a[rowId] = __assign(__assign({}, ((_c = (_b = _this.initInterruptsData) === null || _b === void 0 ? void 0 : _b[rowId]) !== null && _c !== void 0 ? _c : {})), ((_e = (_d = _this.extraData) === null || _d === void 0 ? void 0 : _d[rowId]) !== null && _e !== void 0 ? _e : {})), _a));
733
+ });
734
+ var rowIdsOrdered = orderMap(rowIds, storedData);
735
+ this.order = rowIdsOrdered;
736
+ return this;
737
+ };
738
+ return InterruptManagerHelper;
739
+ }());
740
+ exports.InterruptManagerHelper = InterruptManagerHelper;
741
+ //# sourceMappingURL=InterruptManagerHelper.js.map
742
+
743
+ /***/ }),
744
+
745
+ /***/ "./node_modules/@microchip/interrupt-manager-generic/lib/manager_helper/StateHelper.js":
746
+ /*!*********************************************************************************************!*\
747
+ !*** ./node_modules/@microchip/interrupt-manager-generic/lib/manager_helper/StateHelper.js ***!
748
+ \*********************************************************************************************/
749
+ /*! no static exports found */
750
+ /***/ (function(module, exports, __webpack_require__) {
751
+
752
+ "use strict";
753
+
754
+ Object.defineProperty(exports, "__esModule", { value: true });
755
+ exports.getIntTableDataOfModuleFromState = exports.getIntTableDataFromState = exports.getIntTableOrderFromState = exports.getInterruptTableState = void 0;
756
+ exports.getInterruptTableState = function (state) {
757
+ return state === null || state === void 0 ? void 0 : state["interruptTables"];
758
+ };
759
+ exports.getIntTableOrderFromState = function (state, tableId) {
760
+ var _a, _b;
761
+ return (_b = (_a = exports.getInterruptTableState(state)) === null || _a === void 0 ? void 0 : _a.order) === null || _b === void 0 ? void 0 : _b[tableId];
762
+ };
763
+ exports.getIntTableDataFromState = function (state) {
764
+ var _a;
765
+ return (_a = exports.getInterruptTableState(state)) === null || _a === void 0 ? void 0 : _a.data;
766
+ };
767
+ exports.getIntTableDataOfModuleFromState = function (state, moduleId) {
768
+ var _a;
769
+ return (_a = exports.getIntTableDataFromState(state)) === null || _a === void 0 ? void 0 : _a[moduleId];
770
+ };
771
+ //# sourceMappingURL=StateHelper.js.map
772
+
773
+ /***/ }),
774
+
775
+ /***/ "./node_modules/@microchip/interrupt-manager-generic/lib/types/TableCell.js":
776
+ /*!**********************************************************************************!*\
777
+ !*** ./node_modules/@microchip/interrupt-manager-generic/lib/types/TableCell.js ***!
778
+ \**********************************************************************************/
779
+ /*! no static exports found */
780
+ /***/ (function(module, exports, __webpack_require__) {
781
+
782
+ "use strict";
783
+
784
+ Object.defineProperty(exports, "__esModule", { value: true });
785
+ exports.NoMetaModule = void 0;
786
+ exports.NoMetaModule = "___NOMETA___";
787
+ //# sourceMappingURL=TableCell.js.map
788
+
789
+ /***/ }),
790
+
791
+ /***/ "./node_modules/@microchip/interrupt-standard/lib/package.json":
792
+ /*!*********************************************************************!*\
793
+ !*** ./node_modules/@microchip/interrupt-standard/lib/package.json ***!
794
+ \*********************************************************************/
795
+ /*! exports provided: name, version, license, main, typings, scripts, husky, lint-staged, bitBucketRepository, repository, publishConfig, jest, dependencies, devDependencies, files, notificationEmail, default */
796
+ /***/ (function(module) {
797
+
798
+ module.exports = JSON.parse("{\"name\":\"@microchip/interrupt-standard\",\"version\":\"1.0.1\",\"license\":\"SEE LICENSE IN LICENSE.txt\",\"main\":\"lib/src/index.js\",\"typings\":\"./lib/src/index.d.ts\",\"scripts\":{\"build\":\"tsc\",\"test\":\"jest\",\"lint:nofix\":\"eslint \\\"./src/**/*.{ts,tsx}\\\" --quiet\",\"lint\":\"tsc --noEmit && yarn lint:nofix --fix\"},\"husky\":{\"hooks\":{\"pre-commit\":\"tsc --noEmit && lint-staged\"}},\"lint-staged\":{\"./src/**/*.{ts,tsx}\":[\"eslint --fix\"]},\"bitBucketRepository\":\"https://bitbucket.microchip.com/projects/SCF/repos/interrupt-standard/browse\",\"repository\":{\"type\":\"git\",\"url\":\"git+ssh://git@https://bitbucket.microchip.com/scm/scf/interrupt-standard.git\"},\"publishConfig\":{\"registry\":\"https://artifacts.microchip.com/artifactory/api/npm/npm/\"},\"jest\":{\"testPathIgnorePatterns\":[\"/node_modules/\",\"/run/\",\"/lib/\"],\"modulePathIgnorePatterns\":[\"<rootDir>/run\"],\"preset\":\"ts-jest\",\"collectCoverage\":true},\"dependencies\":{\"@microchip/scf-common\":\"^3.5.0\",\"@microchip/scf-interface\":\"^1.4.0\"},\"devDependencies\":{\"@types/jest\":\"^24.0.14\",\"@types/node\":\"^12.0.10\",\"@typescript-eslint/eslint-plugin\":\"^2.27.0\",\"@typescript-eslint/parser\":\"^2.27.0\",\"eslint\":\"^6.8.0\",\"eslint-config-prettier\":\"^6.10.1\",\"eslint-plugin-prettier\":\"^3.1.2\",\"husky\":\"^4.2.4\",\"jest\":\"^24.8.0\",\"lint-staged\":\"^10.2.0\",\"prettier\":\"^2.0.4\",\"ts-jest\":\"^24.0.2\",\"typescript\":\"^3.8.3\"},\"files\":[\"lib/**/*\"],\"notificationEmail\":\"03234d44.microchip.com@amer.teams.ms\"}");
799
+
800
+ /***/ }),
801
+
802
+ /***/ "./node_modules/@microchip/interrupt-standard/lib/src/index.js":
803
+ /*!*********************************************************************!*\
804
+ !*** ./node_modules/@microchip/interrupt-standard/lib/src/index.js ***!
805
+ \*********************************************************************/
806
+ /*! no static exports found */
807
+ /***/ (function(module, exports, __webpack_require__) {
808
+
809
+ "use strict";
810
+
811
+ Object.defineProperty(exports, "__esModule", { value: true });
812
+ var interrupt_standard_1 = __webpack_require__(/*! ./interrupt-standard */ "./node_modules/@microchip/interrupt-standard/lib/src/interrupt-standard.js");
813
+ exports.Interface = interrupt_standard_1.Interface;
814
+ //# sourceMappingURL=index.js.map
815
+
816
+ /***/ }),
817
+
818
+ /***/ "./node_modules/@microchip/interrupt-standard/lib/src/interrupt-standard.js":
819
+ /*!**********************************************************************************!*\
820
+ !*** ./node_modules/@microchip/interrupt-standard/lib/src/interrupt-standard.js ***!
821
+ \**********************************************************************************/
822
+ /*! no static exports found */
823
+ /***/ (function(module, exports, __webpack_require__) {
824
+
825
+ "use strict";
826
+
827
+ var __importStar = (this && this.__importStar) || function (mod) {
828
+ if (mod && mod.__esModule) return mod;
829
+ var result = {};
830
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
831
+ result["default"] = mod;
832
+ return result;
833
+ };
834
+ Object.defineProperty(exports, "__esModule", { value: true });
835
+ var InterfaceTypes = __importStar(__webpack_require__(/*! @microchip/scf-interface */ "./node_modules/@microchip/scf-interface/lib/index.js"));
836
+ var pkgJson = __importStar(__webpack_require__(/*! ../package.json */ "./node_modules/@microchip/interrupt-standard/lib/package.json"));
837
+ exports.getInterfaceId = function () {
838
+ return {
839
+ name: InterfaceTypes.getInterfaceName(pkgJson),
840
+ version: InterfaceTypes.getInterfaceVersion(pkgJson),
841
+ };
842
+ };
843
+ exports.createPrototypeImport = function () {
844
+ return {
845
+ interfaceId: exports.getInterfaceId(),
846
+ };
847
+ };
848
+ exports.createPrototypeExport = function () {
849
+ return {
850
+ interfaces: [{ interfaceId: exports.getInterfaceId() }],
851
+ };
852
+ };
853
+ var createMock = function () {
854
+ return {
855
+ interfaceId: exports.getInterfaceId(),
856
+ payload: {},
857
+ results: {
858
+ requestId: {
859
+ interruptList: [
860
+ {
861
+ module: "UART1",
862
+ name: "URXI",
863
+ isEnabled: true,
864
+ },
865
+ {
866
+ module: "UART1",
867
+ name: "UTXI",
868
+ isEnabled: true,
869
+ },
870
+ ],
871
+ interruptActions: {
872
+ URXI: {
873
+ isEnabled: [
874
+ {
875
+ validFor: true,
876
+ action: {
877
+ type: "[FORM] SUBMIT",
878
+ payload: {
879
+ tabId: "main",
880
+ path: "interrupt.urxi",
881
+ value: true,
882
+ },
883
+ },
884
+ },
885
+ {
886
+ validFor: false,
887
+ action: {
888
+ type: "[FORM] SUBMIT",
889
+ payload: {
890
+ tabId: "main",
891
+ path: "interrupt.urxi",
892
+ value: false,
893
+ },
894
+ },
895
+ },
896
+ ],
897
+ },
898
+ UTXI: {
899
+ isEnabled: [
900
+ {
901
+ validFor: true,
902
+ action: {
903
+ type: "[FORM] SUBMIT",
904
+ payload: {
905
+ tabId: "main",
906
+ path: "interrupt.utxi",
907
+ value: true,
908
+ },
909
+ },
910
+ },
911
+ {
912
+ validFor: false,
913
+ action: {
914
+ type: "[FORM] SUBMIT",
915
+ payload: {
916
+ tabId: "main",
917
+ path: "interrupt.utxi",
918
+ value: false,
919
+ },
920
+ },
921
+ },
922
+ ],
923
+ },
924
+ },
925
+ },
926
+ },
927
+ };
928
+ };
929
+ exports.Interface = {
930
+ createPrototypeExport: exports.createPrototypeExport,
931
+ createPrototypeImport: exports.createPrototypeImport,
932
+ getInterfaceId: exports.getInterfaceId,
933
+ createMock: createMock,
934
+ };
935
+ //# sourceMappingURL=interrupt-standard.js.map
936
+
937
+ /***/ }),
938
+
939
+ /***/ "./node_modules/@microchip/melody-automodule-interface/lib/src/Tables.js":
940
+ /*!*******************************************************************************!*\
941
+ !*** ./node_modules/@microchip/melody-automodule-interface/lib/src/Tables.js ***!
942
+ \*******************************************************************************/
943
+ /*! no static exports found */
944
+ /***/ (function(module, exports, __webpack_require__) {
945
+
946
+ "use strict";
947
+
948
+ Object.defineProperty(exports, "__esModule", { value: true });
949
+ exports.RowPrefix = void 0;
950
+ var RowPrefix;
951
+ (function (RowPrefix) {
952
+ RowPrefix["Default"] = "defaultRow_";
953
+ RowPrefix["Dynamic"] = "dynamicRow_";
954
+ })(RowPrefix = exports.RowPrefix || (exports.RowPrefix = {}));
955
+ //# sourceMappingURL=Tables.js.map
956
+
957
+ /***/ }),
958
+
959
+ /***/ "./node_modules/@microchip/scf-automodule-impl/lib/Utils.js":
960
+ /*!******************************************************************!*\
961
+ !*** ./node_modules/@microchip/scf-automodule-impl/lib/Utils.js ***!
962
+ \******************************************************************/
963
+ /*! no static exports found */
964
+ /***/ (function(module, exports, __webpack_require__) {
965
+
966
+ "use strict";
967
+
968
+ Object.defineProperty(exports, "__esModule", { value: true });
969
+ exports.toDictionary = exports.assertNotNull = exports.map = exports.forEach = exports.values = exports.getKeys = void 0;
970
+ /** @returns the non-prototype keys of the given object */
971
+ var getKeys = function (obj) {
972
+ return Object.getOwnPropertyNames(obj);
973
+ };
974
+ exports.getKeys = getKeys;
975
+ /**
976
+ * Gets the values of a map as a list
977
+ * @param obj
978
+ * @returns
979
+ */
980
+ var values = function (obj) {
981
+ return (0, exports.getKeys)(obj).map(function (key) { return obj[key]; });
982
+ };
983
+ exports.values = values;
984
+ var forEach = function (obj, action) {
985
+ (0, exports.getKeys)(obj).forEach(function (key) { return action(key, obj[key]); });
986
+ };
987
+ exports.forEach = forEach;
988
+ var map = function (obj, mapper) {
989
+ return (0, exports.getKeys)(obj).map(function (key) { return mapper(key, obj[key]); });
990
+ };
991
+ exports.map = map;
992
+ var assertNotNull = function (val, msg) {
993
+ if (val == null) {
994
+ throw new Error(msg);
995
+ }
996
+ };
997
+ exports.assertNotNull = assertNotNull;
998
+ var toDictionary = function (arr, keyMapper, valueMapper) {
999
+ var result = {};
1000
+ arr.forEach(function (entry) {
1001
+ result[keyMapper(entry)] = valueMapper(entry);
1002
+ });
1003
+ return result;
1004
+ };
1005
+ exports.toDictionary = toDictionary;
1006
+ //# sourceMappingURL=Utils.js.map
1007
+
1008
+ /***/ }),
1009
+
1010
+ /***/ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleHelpers.js":
1011
+ /*!*****************************************************************************************!*\
1012
+ !*** ./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleHelpers.js ***!
1013
+ \*****************************************************************************************/
1014
+ /*! no static exports found */
1015
+ /***/ (function(module, exports, __webpack_require__) {
1016
+
1017
+ "use strict";
1018
+
1019
+ var __assign = (this && this.__assign) || function () {
1020
+ __assign = Object.assign || function(t) {
1021
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1022
+ s = arguments[i];
1023
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
1024
+ t[p] = s[p];
1025
+ }
1026
+ return t;
1027
+ };
1028
+ return __assign.apply(this, arguments);
1029
+ };
1030
+ var __importDefault = (this && this.__importDefault) || function (mod) {
1031
+ return (mod && mod.__esModule) ? mod : { "default": mod };
1032
+ };
1033
+ Object.defineProperty(exports, "__esModule", { value: true });
1034
+ exports.getFriendlyInterfaceId = exports.getModuleDefaultDescription = exports.DependencySelector = exports.getProcessedHandle = exports.getSettingOptionsIfPresent = exports.getOverrideDefaultValue = exports.getSettingDefaultIfPresent = exports.getOptionValueByName = exports.getSettingFromComponent = exports.getSettingBits = exports.getRegisterValues = exports.hasConfigBits = exports.getComboOptions = exports.getDefaultValue = exports.castComponent = void 0;
1035
+ var CalculateRegisterValue_1 = __importDefault(__webpack_require__(/*! @microchip/scf-device/lib/CalculateRegisterValue */ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js"));
1036
+ var Setting_1 = __webpack_require__(/*! @microchip/scf-device/lib/Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
1037
+ var Arrays_1 = __webpack_require__(/*! @microchip/scf-device/lib/util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
1038
+ var Utils_1 = __webpack_require__(/*! ../Utils */ "./node_modules/@microchip/scf-automodule-impl/lib/Utils.js");
1039
+ var getConfigData_1 = __webpack_require__(/*! ./getConfigData */ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/getConfigData.js");
1040
+ var castComponent = function (component) {
1041
+ switch (component.category) {
1042
+ case "software":
1043
+ return component;
1044
+ case "import":
1045
+ return component;
1046
+ case "hardware":
1047
+ return component;
1048
+ default:
1049
+ throw Error("Unsupported Component Type");
1050
+ }
1051
+ };
1052
+ exports.castComponent = castComponent;
1053
+ var getDefaultValue = function (overrideDefaultValues, component) {
1054
+ var _a;
1055
+ return ((_a = overrideDefaultValues === null || overrideDefaultValues === void 0 ? void 0 : overrideDefaultValues(component.name)) !== null && _a !== void 0 ? _a : (component.type === "ComboBox"
1056
+ ? component.defaultValue.value
1057
+ : component.defaultValue));
1058
+ };
1059
+ exports.getDefaultValue = getDefaultValue;
1060
+ var getComboOptions = function (overrideOptions, component) {
1061
+ var _a, _b;
1062
+ return (_a = overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions(component.name)) !== null && _a !== void 0 ? _a : (_b = component === null || component === void 0 ? void 0 : component.defaultValue) === null || _b === void 0 ? void 0 : _b["options"];
1063
+ };
1064
+ exports.getComboOptions = getComboOptions;
1065
+ var hasConfigBits = function (interfaceName) {
1066
+ var _a;
1067
+ return ((_a = (0, exports.getFriendlyInterfaceId)(interfaceName)) === null || _a === void 0 ? void 0 : _a.indexOf("configuration_bits")) != -1;
1068
+ };
1069
+ exports.hasConfigBits = hasConfigBits;
1070
+ var getRegisterValues = function (model, interfaceName) {
1071
+ var _a;
1072
+ var registers = {};
1073
+ var config = (0, getConfigData_1.getConfigData)(model);
1074
+ interfaceName = (0, exports.getFriendlyInterfaceId)(interfaceName);
1075
+ (_a = config === null || config === void 0 ? void 0 : config.peripherals) === null || _a === void 0 ? void 0 : _a.forEach(function (peripheral) {
1076
+ var _a, _b, _c;
1077
+ var peripheralName = (_a = (0, exports.getFriendlyInterfaceId)(peripheral.interfaceId.name)) !== null && _a !== void 0 ? _a : "";
1078
+ if ((0, exports.hasConfigBits)(peripheralName))
1079
+ return;
1080
+ if ((interfaceName != undefined && peripheralName !== interfaceName) ||
1081
+ !peripheral.registers)
1082
+ return;
1083
+ (_c = (0, Utils_1.getKeys)((_b = peripheral.registers) !== null && _b !== void 0 ? _b : {})) === null || _c === void 0 ? void 0 : _c.forEach(function (regName) {
1084
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1085
+ var registerValue;
1086
+ var reg = (_b = (_a = model.getHardware(peripheralName)) === null || _a === void 0 ? void 0 : _a.getPeripheral().registers) === null || _b === void 0 ? void 0 : _b[regName];
1087
+ if (reg) {
1088
+ registerValue = {
1089
+ comment: "",
1090
+ value: 0,
1091
+ valueAsHex: "0x00",
1092
+ name: reg === null || reg === void 0 ? void 0 : reg.name,
1093
+ alias: (_c = reg === null || reg === void 0 ? void 0 : reg.alias) !== null && _c !== void 0 ? _c : reg === null || reg === void 0 ? void 0 : reg.name,
1094
+ settings: {},
1095
+ };
1096
+ }
1097
+ else {
1098
+ return;
1099
+ }
1100
+ var registerVal = CalculateRegisterValue_1.default.for(reg);
1101
+ var comments = [];
1102
+ (_d = peripheral.registers) === null || _d === void 0 ? void 0 : _d[regName].forEach(function (set) {
1103
+ var _a, _b, _c, _d, _e;
1104
+ var setting = (_a = reg.settings) === null || _a === void 0 ? void 0 : _a[set.setting];
1105
+ if (setting) {
1106
+ if (setting.type !== "R") {
1107
+ //Add Comments
1108
+ comments.push("".concat(set.setting, " ").concat(model.getComponentValue(set.name), "; "));
1109
+ }
1110
+ if (registerValue === null || registerValue === void 0 ? void 0 : registerValue.settings) {
1111
+ registerValue.settings[setting.alias] = (0, exports.getSettingBits)(reg, setting, (_b = model.getComponent(set.name)) === null || _b === void 0 ? void 0 : _b.value, (_c = config === null || config === void 0 ? void 0 : config.deviceType) !== null && _c !== void 0 ? _c : "PIC");
1112
+ }
1113
+ switch (set.type) {
1114
+ case "ComboBox":
1115
+ case "boolean":
1116
+ registerVal.withNumberValue(setting, (_e = (0, exports.getOptionValueByName)(setting, (_d = model.getComponent(set.name)) === null || _d === void 0 ? void 0 : _d.value)) !== null && _e !== void 0 ? _e : 0);
1117
+ break;
1118
+ case "number":
1119
+ registerVal.withNumberValue(setting, model.getComponentValue(set.name));
1120
+ break;
1121
+ case "register":
1122
+ case "string":
1123
+ registerVal.withNumberValue(setting, Number(model.getComponentValue(set.name)));
1124
+ break;
1125
+ default:
1126
+ break;
1127
+ }
1128
+ }
1129
+ });
1130
+ if (reg.settings) {
1131
+ registerValue.value = registerVal.asNumber();
1132
+ }
1133
+ else {
1134
+ registerValue.value = Number((_j = model.getComponentValue((_h = (_g = (_f = (_e = peripheral.registers) === null || _e === void 0 ? void 0 : _e[regName]) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.name) !== null && _h !== void 0 ? _h : "")) !== null && _j !== void 0 ? _j : 0);
1135
+ comments.push("".concat(registerValue.name, " ").concat(registerValue.value, "; "));
1136
+ }
1137
+ registerValue.valueAsHex =
1138
+ "0x" + registerValue.value.toString(16).toUpperCase();
1139
+ registerValue.comment = sortComments(comments, reg);
1140
+ registers[(_k = reg === null || reg === void 0 ? void 0 : reg.alias) !== null && _k !== void 0 ? _k : reg.name] = registerValue;
1141
+ });
1142
+ });
1143
+ return registers;
1144
+ };
1145
+ exports.getRegisterValues = getRegisterValues;
1146
+ var sortComments = function (comments, register) {
1147
+ comments.sort(function (a, b) {
1148
+ var _a, _b, _c, _d;
1149
+ var settingA = (_a = register.settings) === null || _a === void 0 ? void 0 : _a[(_b = a.split[" "]) === null || _b === void 0 ? void 0 : _b[0]];
1150
+ var settingB = (_c = register.settings) === null || _c === void 0 ? void 0 : _c[(_d = b.split(" ")) === null || _d === void 0 ? void 0 : _d[0]];
1151
+ return Number(settingB === null || settingB === void 0 ? void 0 : settingB.mask) - Number(settingA === null || settingA === void 0 ? void 0 : settingA.mask);
1152
+ });
1153
+ return comments.join("");
1154
+ };
1155
+ var getSettingBits = function (register, setting, value, deviceType) {
1156
+ var _a, _b;
1157
+ var setValNumber = Number((_b = (_a = (0, Setting_1.getOptionByAlias)(value, setting)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0);
1158
+ var settingValue = {
1159
+ alias: setting.alias,
1160
+ name: setting.name,
1161
+ value: setValNumber !== null && setValNumber !== void 0 ? setValNumber : 0,
1162
+ valueAsHex: "0x" + setValNumber.toString(16).toUpperCase(),
1163
+ valueAsDescription: value,
1164
+ bitName: deviceType === "PIC"
1165
+ ? "".concat(register.name, "bits.").concat(setting.name)
1166
+ : "".concat(register.name, ".").concat(setting.name),
1167
+ };
1168
+ return settingValue;
1169
+ };
1170
+ exports.getSettingBits = getSettingBits;
1171
+ var getRegisterFromComponent = function (hardware, component) {
1172
+ var _a, _b, _c, _d, _e;
1173
+ var registerName = (_a = component.name
1174
+ .replace(component.setting.toLowerCase(), "")) === null || _a === void 0 ? void 0 : _a.toUpperCase();
1175
+ var register = (_b = hardware === null || hardware === void 0 ? void 0 : hardware.registers) === null || _b === void 0 ? void 0 : _b[registerName];
1176
+ if (register) {
1177
+ return register;
1178
+ }
1179
+ else {
1180
+ var regName = (_c = component.name
1181
+ .replace(component.setting.toLowerCase(), "")) === null || _c === void 0 ? void 0 : _c.toUpperCase();
1182
+ var registers = (0, Utils_1.getKeys)((_d = hardware === null || hardware === void 0 ? void 0 : hardware.registers) !== null && _d !== void 0 ? _d : {});
1183
+ for (var _i = 0, _f = registers !== null && registers !== void 0 ? registers : []; _i < _f.length; _i++) {
1184
+ var reg = _f[_i];
1185
+ var modifiedRegName = reg.replace(/_/g, "");
1186
+ if (regName === modifiedRegName) {
1187
+ return (_e = hardware === null || hardware === void 0 ? void 0 : hardware.registers) === null || _e === void 0 ? void 0 : _e[reg];
1188
+ }
1189
+ }
1190
+ }
1191
+ };
1192
+ var getSettingFromComponent = function (model, component) {
1193
+ var _a;
1194
+ var config = (0, getConfigData_1.getConfigData)(model);
1195
+ var setting;
1196
+ if (model) {
1197
+ (_a = config === null || config === void 0 ? void 0 : config.peripherals) === null || _a === void 0 ? void 0 : _a.forEach(function (peripheral) {
1198
+ var _a, _b, _c;
1199
+ if (setting)
1200
+ return;
1201
+ var peripheralName = (0, exports.getFriendlyInterfaceId)(peripheral.interfaceId.name);
1202
+ var hardware = (_a = model.getHardware(peripheralName)) === null || _a === void 0 ? void 0 : _a.getPeripheral();
1203
+ var register = getRegisterFromComponent(hardware, component);
1204
+ if (register && !register.settings) {
1205
+ //No settings for this particular register. Create one
1206
+ setting = {
1207
+ alias: (_b = register.alias) !== null && _b !== void 0 ? _b : register.name,
1208
+ name: register.name,
1209
+ defaultValue: register.defaultValue,
1210
+ type: register.type,
1211
+ description: register.desc,
1212
+ porDefault: register.defaultValue,
1213
+ };
1214
+ }
1215
+ else {
1216
+ setting = (_c = register === null || register === void 0 ? void 0 : register.settings) === null || _c === void 0 ? void 0 : _c[component.setting];
1217
+ }
1218
+ });
1219
+ }
1220
+ return setting;
1221
+ };
1222
+ exports.getSettingFromComponent = getSettingFromComponent;
1223
+ var getOptionValueByName = function (setting, optionName) {
1224
+ if (!setting)
1225
+ return undefined;
1226
+ var optionValue = setting.porDefault;
1227
+ if (setting.options) {
1228
+ setting.options.forEach(function (option) {
1229
+ if (option.name === optionName || option.description === optionName) {
1230
+ optionValue = option.value;
1231
+ }
1232
+ });
1233
+ }
1234
+ return Number(optionValue);
1235
+ };
1236
+ exports.getOptionValueByName = getOptionValueByName;
1237
+ var getSettingDefaultIfPresent = function (component, setting, overrideDefaultValue) {
1238
+ var _a, _b;
1239
+ var defaultValue;
1240
+ if (overrideDefaultValue !== undefined) {
1241
+ return overrideDefaultValue;
1242
+ }
1243
+ if (component.overrideDefaultValue) {
1244
+ return component.overrideDefaultValue;
1245
+ }
1246
+ if (setting === null || setting === void 0 ? void 0 : setting.defaultValue) {
1247
+ var option = (0, Setting_1.getOptionByName)(setting.defaultValue, setting);
1248
+ defaultValue =
1249
+ (_b = option === null || option === void 0 ? void 0 : option[(_a = component.displayOptionSetting) !== null && _a !== void 0 ? _a : "alias"]) !== null && _b !== void 0 ? _b : setting.defaultValue;
1250
+ }
1251
+ return defaultValue;
1252
+ };
1253
+ exports.getSettingDefaultIfPresent = getSettingDefaultIfPresent;
1254
+ var getOverrideDefaultValue = function (component, model) {
1255
+ var _a, _b;
1256
+ return (_b = (_a = model.getDerivedFunctions()).overrideDefaultValues) === null || _b === void 0 ? void 0 : _b.call(_a, component.name);
1257
+ };
1258
+ exports.getOverrideDefaultValue = getOverrideDefaultValue;
1259
+ var getSettingOptionsIfPresent = function (component, setting, masterComponentValue) {
1260
+ var _a;
1261
+ var options = [""];
1262
+ if (setting) {
1263
+ var filteredOptions = component.mode
1264
+ ? filterModeOptions((_a = setting.options) !== null && _a !== void 0 ? _a : [], component, masterComponentValue)
1265
+ : setting.options;
1266
+ options = (0, Arrays_1.map)(filteredOptions !== null && filteredOptions !== void 0 ? filteredOptions : [], function (option) { var _a, _b; return (_b = option[(_a = component.displayOptionSetting) !== null && _a !== void 0 ? _a : "alias"]) !== null && _b !== void 0 ? _b : option.alias; });
1267
+ }
1268
+ return options;
1269
+ };
1270
+ exports.getSettingOptionsIfPresent = getSettingOptionsIfPresent;
1271
+ var filterModeOptions = function (options, component, masterComponentValue) {
1272
+ var _a, _b, _c, _d;
1273
+ if (((_a = component.mode) === null || _a === void 0 ? void 0 : _a.operation) != "filterOptions" || masterComponentValue == undefined)
1274
+ return options;
1275
+ //Determine mode
1276
+ var mode = (0, Arrays_1.find)((_d = (0, Utils_1.getKeys)((_c = (_b = component.mode) === null || _b === void 0 ? void 0 : _b.optionModes) !== null && _c !== void 0 ? _c : {})) !== null && _d !== void 0 ? _d : [], function (mode) {
1277
+ var _a, _b, _c, _d;
1278
+ var match = (_b = (_a = component.mode) === null || _a === void 0 ? void 0 : _a.optionModes) === null || _b === void 0 ? void 0 : _b[mode];
1279
+ if (match) {
1280
+ return ((_d = (_c = masterComponentValue === null || masterComponentValue === void 0 ? void 0 : masterComponentValue.match(match)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : -1) > 0;
1281
+ }
1282
+ return false;
1283
+ });
1284
+ var filteredOptions = (0, Arrays_1.filter)(options !== null && options !== void 0 ? options : [], function (option) {
1285
+ var _a, _b, _c, _d;
1286
+ if (option.mode && mode) {
1287
+ var match = (_b = (_a = component.mode) === null || _a === void 0 ? void 0 : _a.optionModes) === null || _b === void 0 ? void 0 : _b[mode];
1288
+ if (match) {
1289
+ return ((_d = (_c = option.mode.match(match)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : -1) > 0;
1290
+ }
1291
+ }
1292
+ return true;
1293
+ });
1294
+ return filteredOptions;
1295
+ };
1296
+ var getProcessedHandle = function (handle, payload) {
1297
+ var _a, _b, _c;
1298
+ if (handle) {
1299
+ handle = __assign(__assign({}, handle), { label: (_c = (_b = (_a = payload === null || payload === void 0 ? void 0 : payload.moduleName) !== null && _a !== void 0 ? _a : payload === null || payload === void 0 ? void 0 : payload.name) !== null && _b !== void 0 ? _b : handle.label) !== null && _c !== void 0 ? _c : handle.providerId + " : " + handle.exportId });
1300
+ }
1301
+ return handle;
1302
+ };
1303
+ exports.getProcessedHandle = getProcessedHandle;
1304
+ var DependencySelector = /** @class */ (function () {
1305
+ function DependencySelector(model, component) {
1306
+ var _this = this;
1307
+ this.noneSelection = { label: "None" };
1308
+ this.createOptionEntry = function (option) {
1309
+ return {
1310
+ label: _this.createOptionLabel(option.handle, option.payload),
1311
+ value: option,
1312
+ };
1313
+ };
1314
+ this.createOptionLabel = function (handle, payload) {
1315
+ var _a, _b;
1316
+ return (_b = (_a = (0, exports.getProcessedHandle)(handle, payload)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : "";
1317
+ };
1318
+ this.model = model;
1319
+ this.component = component;
1320
+ }
1321
+ DependencySelector.prototype.generateDropdownOptions = function () {
1322
+ var dropdownOptions = [];
1323
+ var thisImport = this.model.getImports()[this.component.importId];
1324
+ var options = thisImport === null || thisImport === void 0 ? void 0 : thisImport.options;
1325
+ if (this.shouldAllowUnselectDependency(thisImport, options)) {
1326
+ dropdownOptions.push(this.noneSelection);
1327
+ }
1328
+ if (options) {
1329
+ for (var option in options) {
1330
+ dropdownOptions.push(this.createOptionEntry(options[option]));
1331
+ }
1332
+ }
1333
+ return dropdownOptions;
1334
+ };
1335
+ DependencySelector.prototype.getDropdownOptionNames = function () {
1336
+ var names = [];
1337
+ this.generateDropdownOptions().forEach(function (option) { return names.push(option.label); });
1338
+ return names;
1339
+ };
1340
+ DependencySelector.prototype.shouldAllowUnselectDependency = function (thisImport, options) {
1341
+ return (thisImport != undefined &&
1342
+ thisImport.isUnassignable != false &&
1343
+ options !== undefined);
1344
+ };
1345
+ return DependencySelector;
1346
+ }());
1347
+ exports.DependencySelector = DependencySelector;
1348
+ function getModuleDefaultDescription() {
1349
+ //TODO: Need to refactor this so that gets it from the source.
1350
+ //Alternatively, we could get it during the automodule update process and fetch it from there...
1351
+ return undefined;
1352
+ }
1353
+ exports.getModuleDefaultDescription = getModuleDefaultDescription;
1354
+ var getFriendlyInterfaceId = function (interfaceName) {
1355
+ interfaceName = interfaceName === null || interfaceName === void 0 ? void 0 : interfaceName.replace(/ /g, "").replace(/-/g, "_");
1356
+ return interfaceName;
1357
+ };
1358
+ exports.getFriendlyInterfaceId = getFriendlyInterfaceId;
1359
+ //# sourceMappingURL=AutoModuleHelpers.js.map
1360
+
1361
+ /***/ }),
1362
+
1363
+ /***/ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/getConfigData.js":
1364
+ /*!*************************************************************************************!*\
1365
+ !*** ./node_modules/@microchip/scf-automodule-impl/lib/autoModule/getConfigData.js ***!
1366
+ \*************************************************************************************/
1367
+ /*! no static exports found */
1368
+ /***/ (function(module, exports, __webpack_require__) {
1369
+
1370
+ "use strict";
1371
+
1372
+ var __assign = (this && this.__assign) || function () {
1373
+ __assign = Object.assign || function(t) {
1374
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1375
+ s = arguments[i];
1376
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
1377
+ t[p] = s[p];
1378
+ }
1379
+ return t;
1380
+ };
1381
+ return __assign.apply(this, arguments);
1382
+ };
1383
+ Object.defineProperty(exports, "__esModule", { value: true });
1384
+ exports.getConfigData = void 0;
1385
+ /* eslint-disable @typescript-eslint/no-var-requires */
1386
+ var Utils_1 = __webpack_require__(/*! ../Utils */ "./node_modules/@microchip/scf-automodule-impl/lib/Utils.js");
1387
+ var getConfigData = function (model) {
1388
+ var _a, _b;
1389
+ var config = (_b = model === null || model === void 0 ? void 0 : (_a = model.getDerivedData()).getModuleConfig) === null || _b === void 0 ? void 0 : _b.call(_a);
1390
+ config = ConfigBuilder.for(config)
1391
+ .withDynamicConfigData(model)
1392
+ .withDynamicComponents(model)
1393
+ .build();
1394
+ return config;
1395
+ };
1396
+ exports.getConfigData = getConfigData;
1397
+ var ConfigBuilder = /** @class */ (function () {
1398
+ function ConfigBuilder(config) {
1399
+ var _this = this;
1400
+ this.build = function () {
1401
+ return _this.config;
1402
+ };
1403
+ this.withDynamicConfigData = function (model) {
1404
+ var _a;
1405
+ return new ConfigBuilder((_a = model === null || model === void 0 ? void 0 : model.getDerivedFunction("getDynamicConfigData", _this.config)) !== null && _a !== void 0 ? _a : _this.config);
1406
+ };
1407
+ this.withDynamicComponents = function (model) {
1408
+ var _a, _b;
1409
+ var dynamicComponents = (_b = model === null || model === void 0 ? void 0 : (_a = model.getDerivedFunctions()).getDynamicComponents) === null || _b === void 0 ? void 0 : _b.call(_a);
1410
+ if (dynamicComponents) {
1411
+ var dynamicComponentMap = (0, Utils_1.toDictionary)(dynamicComponents, function (component) {
1412
+ var _a;
1413
+ _this.config.UIGroups[component.group] =
1414
+ (_a = _this.config.UIGroups[component.group]) !== null && _a !== void 0 ? _a : component.group;
1415
+ return component.name;
1416
+ }, function (component) { return component; });
1417
+ _this.config.softwareData = __assign(__assign({}, _this.config.softwareData), dynamicComponentMap);
1418
+ }
1419
+ return new ConfigBuilder(_this.config);
1420
+ };
1421
+ this.config = config;
1422
+ }
1423
+ ConfigBuilder.for = function (config) {
1424
+ if (!config)
1425
+ throw console.error("Cannot find ModuleConfig");
1426
+ return new ConfigBuilder(config);
1427
+ };
1428
+ return ConfigBuilder;
1429
+ }());
1430
+ //# sourceMappingURL=getConfigData.js.map
1431
+
1432
+ /***/ }),
1433
+
1434
+ /***/ "./node_modules/@microchip/scf-automodule-impl/lib/interrupts/InterruptActions.js":
1435
+ /*!****************************************************************************************!*\
1436
+ !*** ./node_modules/@microchip/scf-automodule-impl/lib/interrupts/InterruptActions.js ***!
1437
+ \****************************************************************************************/
1438
+ /*! no static exports found */
1439
+ /***/ (function(module, exports, __webpack_require__) {
1440
+
1441
+ "use strict";
1442
+
1443
+ var __assign = (this && this.__assign) || function () {
1444
+ __assign = Object.assign || function(t) {
1445
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1446
+ s = arguments[i];
1447
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
1448
+ t[p] = s[p];
1449
+ }
1450
+ return t;
1451
+ };
1452
+ return __assign.apply(this, arguments);
1453
+ };
1454
+ Object.defineProperty(exports, "__esModule", { value: true });
1455
+ exports.getDefaultInterruptActions = exports.InterruptActionsBuilder = void 0;
1456
+ var AutoModuleHelpers_1 = __webpack_require__(/*! ../autoModule/AutoModuleHelpers */ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleHelpers.js");
1457
+ var InterruptActionsBuilder = /** @class */ (function () {
1458
+ function InterruptActionsBuilder(model) {
1459
+ var _this = this;
1460
+ this.actions = [];
1461
+ this.createActionFor = function (componentName) {
1462
+ var _a;
1463
+ _this.actions = _this.buildActions();
1464
+ _this.curComponent = componentName
1465
+ ? (_a = _this.model.getComponent(componentName)) === null || _a === void 0 ? void 0 : _a.component
1466
+ : undefined;
1467
+ _this.curComponentName = componentName;
1468
+ _this.tableRowId = undefined;
1469
+ _this.tableRowCol = undefined;
1470
+ _this.tableCellPath = undefined;
1471
+ return _this;
1472
+ };
1473
+ this.addActionIfEnabled = function (actionValue) {
1474
+ if (!_this.curComponentName || !_this.curComponent)
1475
+ return _this;
1476
+ if (!_this.isActionValueAcceptable(_this.curComponent, actionValue))
1477
+ return _this;
1478
+ var payload = {
1479
+ tabId: _this.curComponent.tabs[0],
1480
+ value: actionValue,
1481
+ };
1482
+ if (_this.curComponent.category === "table") {
1483
+ if (!_this.tableCellPath)
1484
+ return _this;
1485
+ payload = __assign(__assign({}, payload), { path: "".concat(_this.curComponent.group, ".").concat(_this.curComponent.name, ".").concat(_this.tableCellPath), rowId: _this.tableRowId });
1486
+ }
1487
+ else {
1488
+ payload = __assign(__assign({}, payload), { path: "".concat(_this.curComponent.group, ".").concat(_this.curComponent.name) });
1489
+ }
1490
+ _this.actions.push({
1491
+ validFor: true,
1492
+ action: {
1493
+ type: "[FORM] SUBMIT",
1494
+ payload: payload,
1495
+ },
1496
+ });
1497
+ return _this;
1498
+ };
1499
+ this.addActionIfDisabled = function (actionValue) {
1500
+ if (!_this.curComponentName || !_this.curComponent)
1501
+ return _this;
1502
+ if (!_this.isActionValueAcceptable(_this.curComponent, actionValue))
1503
+ return _this;
1504
+ var payload = {
1505
+ tabId: _this.curComponent.tabs[0],
1506
+ value: actionValue,
1507
+ };
1508
+ if (_this.curComponent.category === "table") {
1509
+ if (!_this.tableCellPath)
1510
+ return _this;
1511
+ payload = __assign(__assign({}, payload), { path: "".concat(_this.curComponent.group, ".").concat(_this.curComponent.name, ".").concat(_this.tableCellPath), rowId: _this.tableRowId });
1512
+ }
1513
+ else {
1514
+ payload = __assign(__assign({}, payload), { path: "".concat(_this.curComponent.group, ".").concat(_this.curComponent.name) });
1515
+ }
1516
+ _this.actions.push({
1517
+ validFor: false,
1518
+ action: {
1519
+ type: "[FORM] SUBMIT",
1520
+ payload: payload,
1521
+ },
1522
+ });
1523
+ return _this;
1524
+ };
1525
+ this.setPathToTableCell = function (rowIndex, colName) {
1526
+ var _a;
1527
+ if (((_a = _this.curComponent) === null || _a === void 0 ? void 0 : _a.category) !== "table")
1528
+ return _this;
1529
+ _this.tableRowId = rowIndex;
1530
+ _this.tableRowCol = colName;
1531
+ _this.tableCellPath = "".concat(rowIndex, ".").concat(colName);
1532
+ return _this;
1533
+ };
1534
+ this.isActionValueAcceptable = function (component, actionValue) {
1535
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1536
+ if (component.category === "hardware") {
1537
+ if (component.type === "ComboBox") {
1538
+ var options = (_a = (0, AutoModuleHelpers_1.getSettingFromComponent)(_this.model, component)) === null || _a === void 0 ? void 0 : _a.options;
1539
+ if (!(options === null || options === void 0 ? void 0 : options.some(function (option) {
1540
+ var _a;
1541
+ return option[(_a = component["displayOptionSetting"]) !== null && _a !== void 0 ? _a : "alias"] ===
1542
+ actionValue;
1543
+ }))) {
1544
+ return false;
1545
+ }
1546
+ }
1547
+ else if (component.type === "boolean") {
1548
+ // if (actionValue !== "enabled" && actionValue !== "disabled") {
1549
+ if (actionValue !== true && actionValue !== false) {
1550
+ return false;
1551
+ }
1552
+ }
1553
+ }
1554
+ else if (component.category === "software") {
1555
+ if (component.type === "ComboBox") {
1556
+ var options = component["options"];
1557
+ if (!(options === null || options === void 0 ? void 0 : options.some(function (option) { return option === actionValue; }))) {
1558
+ return false;
1559
+ }
1560
+ }
1561
+ else if (component.type === "boolean") {
1562
+ if (actionValue !== true && actionValue !== false) {
1563
+ return false;
1564
+ }
1565
+ }
1566
+ }
1567
+ else if (component.category === "table") {
1568
+ if (!_this.tableRowCol)
1569
+ return false;
1570
+ if (((_c = (_b = component.columns) === null || _b === void 0 ? void 0 : _b[_this.tableRowCol]) === null || _c === void 0 ? void 0 : _c.type) === "ComboBox") {
1571
+ var options = (_f = (_e = (_d = component.columns) === null || _d === void 0 ? void 0 : _d[_this.tableRowCol]) === null || _e === void 0 ? void 0 : _e.defaultValue) === null || _f === void 0 ? void 0 : _f["options"];
1572
+ if (!(options === null || options === void 0 ? void 0 : options.some(function (option) { return option === actionValue; }))) {
1573
+ return false;
1574
+ }
1575
+ }
1576
+ else if (((_h = (_g = component.columns) === null || _g === void 0 ? void 0 : _g[_this.tableRowCol]) === null || _h === void 0 ? void 0 : _h.type) === "boolean") {
1577
+ if (actionValue !== true && actionValue !== false) {
1578
+ return false;
1579
+ }
1580
+ }
1581
+ }
1582
+ return true;
1583
+ };
1584
+ this.buildActions = function () {
1585
+ return _this.actions;
1586
+ };
1587
+ this.model = model;
1588
+ }
1589
+ InterruptActionsBuilder.createActionBuilder = function (model) {
1590
+ return new InterruptActionsBuilder(model);
1591
+ };
1592
+ return InterruptActionsBuilder;
1593
+ }());
1594
+ exports.InterruptActionsBuilder = InterruptActionsBuilder;
1595
+ function getDefaultInterruptActions(model, componentName) {
1596
+ if (!componentName)
1597
+ return [];
1598
+ return (InterruptActionsBuilder.createActionBuilder(model)
1599
+ .createActionFor(componentName)
1600
+ .addActionIfEnabled(true)
1601
+ .addActionIfDisabled(false)
1602
+ // .addActionIfEnabled("enabled")
1603
+ // .addActionIfDisabled("disabled")
1604
+ .buildActions());
1605
+ }
1606
+ exports.getDefaultInterruptActions = getDefaultInterruptActions;
1607
+ //# sourceMappingURL=InterruptActions.js.map
1608
+
1609
+ /***/ }),
1610
+
1611
+ /***/ "./node_modules/@microchip/scf-automodule-impl/lib/tables/UidMapBuilder.js":
1612
+ /*!*********************************************************************************!*\
1613
+ !*** ./node_modules/@microchip/scf-automodule-impl/lib/tables/UidMapBuilder.js ***!
1614
+ \*********************************************************************************/
1615
+ /*! no static exports found */
1616
+ /***/ (function(module, exports, __webpack_require__) {
1617
+
1618
+ "use strict";
1619
+
1620
+ Object.defineProperty(exports, "__esModule", { value: true });
1621
+ exports.UidMapBuilder = void 0;
1622
+ var UidMapBuilder = /** @class */ (function () {
1623
+ function UidMapBuilder() {
1624
+ this.uidMap = {};
1625
+ }
1626
+ UidMapBuilder.prototype.addDefaultRows = function (rowData) {
1627
+ var _this = this;
1628
+ rowData.forEach(function (row, rowCount) {
1629
+ var _a;
1630
+ _this.uidMap[row.uid] = (_a = row.rowId) !== null && _a !== void 0 ? _a : rowCount;
1631
+ });
1632
+ return this;
1633
+ };
1634
+ UidMapBuilder.prototype.addDynamicRows = function (tableState) {
1635
+ var _this = this;
1636
+ tableState.forEach(function (row) {
1637
+ var uid = row === null || row === void 0 ? void 0 : row.uid;
1638
+ if (uid && uid.indexOf("dynamicRow_") > -1) {
1639
+ _this.incrementUidAndShift(uid, row.rowId);
1640
+ }
1641
+ });
1642
+ return this;
1643
+ };
1644
+ UidMapBuilder.prototype.removeRows = function (tableState) {
1645
+ var _this = this;
1646
+ tableState.forEach(function (row) {
1647
+ var uid = row === null || row === void 0 ? void 0 : row.uid;
1648
+ if (uid && (row === null || row === void 0 ? void 0 : row.dynamicallyRemoved)) {
1649
+ _this.uidMap[uid] = -1;
1650
+ }
1651
+ });
1652
+ return this;
1653
+ };
1654
+ UidMapBuilder.prototype.sortByValue = function () {
1655
+ var _this = this;
1656
+ var count = 0;
1657
+ var sortedUids = [];
1658
+ this.getUidKeys().forEach(function (uid) {
1659
+ var _a;
1660
+ sortedUids.push((_a = {}, _a[uid] = _this.uidMap[uid], _a));
1661
+ });
1662
+ sortedUids = sortedUids.sort(function (a, b) { return a[Object.keys(a)[0]] - b[Object.keys(b)[0]]; });
1663
+ sortedUids.forEach(function (uid) {
1664
+ var uidKey = Object.keys(uid)[0];
1665
+ if (_this.uidMap[uidKey] > -1) {
1666
+ _this.uidMap[uidKey] = count++;
1667
+ }
1668
+ });
1669
+ return this;
1670
+ };
1671
+ UidMapBuilder.prototype.create = function () {
1672
+ return this.uidMap;
1673
+ };
1674
+ UidMapBuilder.prototype.incrementUidAndShift = function (uid, rowId) {
1675
+ var _this = this;
1676
+ this.getUidKeys().forEach(function (uid) {
1677
+ if (_this.uidMap[uid] >= rowId) {
1678
+ _this.uidMap[uid]++;
1679
+ }
1680
+ });
1681
+ this.uidMap[uid] = rowId;
1682
+ };
1683
+ UidMapBuilder.prototype.getUidKeys = function () {
1684
+ return Object.keys(this.uidMap);
1685
+ };
1686
+ return UidMapBuilder;
1687
+ }());
1688
+ exports.UidMapBuilder = UidMapBuilder;
1689
+ //# sourceMappingURL=UidMapBuilder.js.map
1690
+
1691
+ /***/ }),
1692
+
1693
+ /***/ "./node_modules/@microchip/scf-automodule-impl/lib/tables/tables.js":
1694
+ /*!**************************************************************************!*\
1695
+ !*** ./node_modules/@microchip/scf-automodule-impl/lib/tables/tables.js ***!
1696
+ \**************************************************************************/
1697
+ /*! no static exports found */
1698
+ /***/ (function(module, exports, __webpack_require__) {
1699
+
1700
+ "use strict";
1701
+
1702
+ var __assign = (this && this.__assign) || function () {
1703
+ __assign = Object.assign || function(t) {
1704
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1705
+ s = arguments[i];
1706
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
1707
+ t[p] = s[p];
1708
+ }
1709
+ return t;
1710
+ };
1711
+ return __assign.apply(this, arguments);
1712
+ };
1713
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
1714
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1715
+ if (ar || !(i in from)) {
1716
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1717
+ ar[i] = from[i];
1718
+ }
1719
+ }
1720
+ return to.concat(ar || Array.prototype.slice.call(from));
1721
+ };
1722
+ Object.defineProperty(exports, "__esModule", { value: true });
1723
+ exports.getHeaderStyle = exports.getCellStyle = exports.getTableUiSchema = exports.getTableActions = exports.getCellValidationInfo = exports.createTableUids = exports.overrideDefaultsAndFilterRows = exports.getValueBasedOnState = exports.getTableFormData = exports.removeRowFromTable = exports.addRowToTable = exports.addRowsToTable = exports.overrideCellValue = exports.createInitialRows = exports.getInitialTableFormData = exports.calculateColumnWidth = exports.isTableInState = exports.overrideTableDefaultsWithChanges = exports.getTableHelpers = exports.getTableComponentSchema = void 0;
1724
+ var Tables_1 = __webpack_require__(/*! @microchip/melody-automodule-interface/lib/src/Tables */ "./node_modules/@microchip/melody-automodule-interface/lib/src/Tables.js");
1725
+ var Arrays_1 = __webpack_require__(/*! @microchip/scf-device/lib/util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
1726
+ var UidMapBuilder_1 = __webpack_require__(/*! ./UidMapBuilder */ "./node_modules/@microchip/scf-automodule-impl/lib/tables/UidMapBuilder.js");
1727
+ function getTableComponentSchema(component, viewModel) {
1728
+ var _a, _b, _c, _d;
1729
+ var tableColumns = {};
1730
+ for (var columnsKey in component.columns) {
1731
+ var rjsfType = void 0;
1732
+ if (component.columns[columnsKey].type === "ComboBox") {
1733
+ var colBox = component.columns[columnsKey];
1734
+ rjsfType = "string";
1735
+ tableColumns[columnsKey] = {
1736
+ type: rjsfType,
1737
+ title: colBox.title,
1738
+ default: getDefaultValue(viewModel.overrideDefaultValues, colBox, columnsKey, component.name),
1739
+ enum: getComboOptions(viewModel.overrideTableOptions, colBox, columnsKey, component.name),
1740
+ };
1741
+ }
1742
+ else {
1743
+ rjsfType = (_a = component === null || component === void 0 ? void 0 : component.columns[columnsKey]) === null || _a === void 0 ? void 0 : _a.type;
1744
+ tableColumns[columnsKey] = {
1745
+ type: rjsfType,
1746
+ title: component.columns[columnsKey].title,
1747
+ default: component.columns[columnsKey].defaultValue,
1748
+ };
1749
+ }
1750
+ }
1751
+ return {
1752
+ type: "array",
1753
+ title: (_d = (_c = (_b = viewModel.getDerivedFunction).overrideTitle) === null || _c === void 0 ? void 0 : _c.call(_b, component.name)) !== null && _d !== void 0 ? _d : component.description,
1754
+ items: {
1755
+ type: "object",
1756
+ properties: __assign({}, tableColumns),
1757
+ },
1758
+ };
1759
+ }
1760
+ exports.getTableComponentSchema = getTableComponentSchema;
1761
+ var getTableHelpers = function () {
1762
+ return {
1763
+ addRowToTable: addRowToTable,
1764
+ addRowsToTable: addRowsToTable,
1765
+ calculateColumnWidth: calculateColumnWidth,
1766
+ createInitialRows: createInitialRows,
1767
+ createTableUids: createTableUids,
1768
+ getCellStyle: getCellStyle,
1769
+ getCellValidationInfo: getCellValidationInfo,
1770
+ getHeaderStyle: getHeaderStyle,
1771
+ getInitialTableFormData: getInitialTableFormData,
1772
+ getTableActions: getTableActions,
1773
+ getTableFormData: getTableFormData,
1774
+ getTableUiSchema: getTableUiSchema,
1775
+ getValueBasedOnState: getValueBasedOnState,
1776
+ isTableInState: isTableInState,
1777
+ overrideCellValue: overrideCellValue,
1778
+ overrideDefaultsAndFilterRows: overrideDefaultsAndFilterRows,
1779
+ overrideTableDefaultsWithChanges: overrideTableDefaultsWithChanges,
1780
+ removeRowFromTable: removeRowFromTable,
1781
+ createUidMapBuilder: function () { return new UidMapBuilder_1.UidMapBuilder(); },
1782
+ };
1783
+ };
1784
+ exports.getTableHelpers = getTableHelpers;
1785
+ function overrideTableDefaultsWithChanges(rowChanged, initialFormData, uidMap) {
1786
+ var value = __spreadArray([], initialFormData, true);
1787
+ if (Array.isArray(rowChanged)) {
1788
+ rowChanged.forEach(function (changedRow) {
1789
+ var changedUid = changedRow.uid;
1790
+ var rowChangeNum = uidMap[changedUid];
1791
+ value[rowChangeNum] = __assign(__assign({}, value[rowChangeNum]), changedRow);
1792
+ });
1793
+ }
1794
+ return value;
1795
+ }
1796
+ exports.overrideTableDefaultsWithChanges = overrideTableDefaultsWithChanges;
1797
+ function isTableInState(tabState, component) {
1798
+ return (tabState && tabState[component.group] && tabState[component.group][component.name]);
1799
+ }
1800
+ exports.isTableInState = isTableInState;
1801
+ function calculateColumnWidth(columns) {
1802
+ if (!columns) {
1803
+ return {};
1804
+ }
1805
+ var runningWidth = 0;
1806
+ var booleanFields = 0;
1807
+ var columnWidths = {};
1808
+ for (var columnName in columns) {
1809
+ if (columns[columnName].type === "boolean") {
1810
+ var width = 8;
1811
+ booleanFields++;
1812
+ columnWidths[columnName] = width;
1813
+ runningWidth += width;
1814
+ }
1815
+ }
1816
+ for (var columnName in columns) {
1817
+ if (columns[columnName].type !== "boolean") {
1818
+ var width = (100 - runningWidth) / (Object.keys(columns).length - booleanFields);
1819
+ columnWidths[columnName] = width;
1820
+ }
1821
+ }
1822
+ return columnWidths;
1823
+ }
1824
+ exports.calculateColumnWidth = calculateColumnWidth;
1825
+ function getInitialTableFormData(table, columnNames, model) {
1826
+ var value = [];
1827
+ var tableFormData = {};
1828
+ columnNames.forEach(function (columnName) {
1829
+ if (!tableFormData[columnName]) {
1830
+ tableFormData[columnName] = getDefaultValue(model.getDerivedFunctions().overrideTableDefaultValues, table.columns[columnName], columnName, table.name);
1831
+ }
1832
+ });
1833
+ if (!(table === null || table === void 0 ? void 0 : table.rowData)) {
1834
+ value = createInitialRows(table, tableFormData);
1835
+ }
1836
+ else {
1837
+ var rowId_1 = 0;
1838
+ table === null || table === void 0 ? void 0 : table.rowData.forEach(function (row) {
1839
+ var rowDataCols = Object.keys(row);
1840
+ columnNames.forEach(function (colName) {
1841
+ var _a;
1842
+ if (rowDataCols.indexOf(colName) === -1) {
1843
+ row = __assign(__assign({}, row), (_a = {}, _a[colName] = tableFormData[colName], _a.uid = createRowUid(Tables_1.RowPrefix.Default, rowId_1), _a));
1844
+ }
1845
+ });
1846
+ value.push(__assign(__assign({}, row), { uid: createRowUid(Tables_1.RowPrefix.Default, rowId_1), rowId: rowId_1 }));
1847
+ rowId_1++;
1848
+ });
1849
+ }
1850
+ return value;
1851
+ }
1852
+ exports.getInitialTableFormData = getInitialTableFormData;
1853
+ function createInitialRows(table, tableFormData) {
1854
+ var _a;
1855
+ if (tableFormData === void 0) { tableFormData = {}; }
1856
+ var value = [];
1857
+ var initialRows = (_a = table === null || table === void 0 ? void 0 : table.defaultRowNum) !== null && _a !== void 0 ? _a : 1;
1858
+ for (var i = 0; i < initialRows; i++) {
1859
+ value.push(__assign(__assign({}, tableFormData), { rowId: i, uid: createRowUid(Tables_1.RowPrefix.Default, i) }));
1860
+ }
1861
+ return value;
1862
+ }
1863
+ exports.createInitialRows = createInitialRows;
1864
+ function overrideCellValue(tableData, cell) {
1865
+ var modifiedTableData = __spreadArray([], tableData, true);
1866
+ modifiedTableData[cell.rowId][cell.columnName] = cell.value;
1867
+ return modifiedTableData;
1868
+ }
1869
+ exports.overrideCellValue = overrideCellValue;
1870
+ function addRowsToTable(tableData, columns, newRow, numberOfRows) {
1871
+ if (numberOfRows <= 0) {
1872
+ return tableData;
1873
+ }
1874
+ var value = addRowToTable(tableData, columns, __assign(__assign({}, newRow), { uid: Tables_1.RowPrefix.Dynamic + (numberOfRows - 1) }));
1875
+ return addRowsToTable(value, columns, newRow, numberOfRows - 1);
1876
+ }
1877
+ exports.addRowsToTable = addRowsToTable;
1878
+ function addRowToTable(tableData, columns, newRow) {
1879
+ var _a;
1880
+ var columnNames = Object.keys(columns);
1881
+ var newRowCols = Object.keys(newRow);
1882
+ var newRowId = newRow.rowId;
1883
+ var filteredTableTemp = [];
1884
+ if (tableData.length === 0) {
1885
+ filteredTableTemp.push(newRow);
1886
+ return filteredTableTemp;
1887
+ }
1888
+ if (newRowId != null) {
1889
+ columnNames.forEach(function (colName) {
1890
+ var _a;
1891
+ var _b, _c;
1892
+ var defaultColumnWidth = calculateColumnWidth(columns);
1893
+ if (newRowCols.indexOf(colName) === -1) {
1894
+ newRow = __assign(__assign({}, newRow), (_a = {}, _a[colName] = (_c = (_b = columns[colName].defaultValue) === null || _b === void 0 ? void 0 : _b["value"]) !== null && _c !== void 0 ? _c : columns[colName].defaultValue, _a.columnWidth = columns[colName].columnWidth
1895
+ ? columns[colName].columnWidth + "%"
1896
+ : defaultColumnWidth[colName] + "%", _a));
1897
+ }
1898
+ });
1899
+ var tableFirstHalf = tableData.slice(0, newRowId);
1900
+ var tableSecondHalf = tableData.slice(newRowId);
1901
+ for (var i = 0; i < tableSecondHalf.length; i++) {
1902
+ var currentRowId = tableSecondHalf[i].rowId;
1903
+ tableSecondHalf[i] = __assign(__assign({}, tableSecondHalf[i]), { rowId: currentRowId + 1 });
1904
+ var actions = (_a = tableSecondHalf[i]) === null || _a === void 0 ? void 0 : _a.actions;
1905
+ if (actions) {
1906
+ tableSecondHalf[i]["actions"] = updateActionsRowId(actions, currentRowId + 1);
1907
+ }
1908
+ }
1909
+ tableFirstHalf.push(newRow);
1910
+ filteredTableTemp = __spreadArray(__spreadArray([], tableFirstHalf, true), tableSecondHalf, true);
1911
+ return filteredTableTemp;
1912
+ }
1913
+ return tableData;
1914
+ }
1915
+ exports.addRowToTable = addRowToTable;
1916
+ function removeRowFromTable(tableData, rowId) {
1917
+ var _a;
1918
+ var tableRemoved = tableData.filter(function (row) { return row.rowId !== rowId; });
1919
+ for (var i = 0; i < tableRemoved.length; i++) {
1920
+ tableRemoved[i].rowId = i;
1921
+ var actions = (_a = tableRemoved[i]) === null || _a === void 0 ? void 0 : _a.actions;
1922
+ if (actions) {
1923
+ tableRemoved[i]["actions"] = updateActionsRowId(actions, i);
1924
+ }
1925
+ }
1926
+ return tableRemoved;
1927
+ }
1928
+ exports.removeRowFromTable = removeRowFromTable;
1929
+ function getTableFormData(model, table, tab) {
1930
+ var _a;
1931
+ return ((_a = model.getDerivedFunction(table.name, table, model, tab)) !== null && _a !== void 0 ? _a : getValueBasedOnState(table, model, tab));
1932
+ }
1933
+ exports.getTableFormData = getTableFormData;
1934
+ function getValueBasedOnState(table, model, tab) {
1935
+ var columnNames = Object.keys(table.columns);
1936
+ var modelState = model.getState();
1937
+ var tabState = modelState ? modelState[tab] : undefined;
1938
+ var initialFormData = getInitialTableFormData(table, columnNames, model);
1939
+ if (!isTableInState(tabState, table)) {
1940
+ return initialFormData;
1941
+ }
1942
+ else {
1943
+ var rowChanged = tabState[table.group][table.name];
1944
+ var tableUids = createTableUids(table, tab, model, rowChanged);
1945
+ return overrideDefaultsAndFilterRows(rowChanged, initialFormData, table.columns, tableUids, table, tab);
1946
+ }
1947
+ }
1948
+ exports.getValueBasedOnState = getValueBasedOnState;
1949
+ function overrideDefaultsAndFilterRows(rowChanged, initialFormData, columns, tableUids, component, tab) {
1950
+ var modifiedForData = __spreadArray([], initialFormData, true);
1951
+ var keys = Object.keys(tableUids);
1952
+ rowChanged = rowChanged.filter(function (row) { return row != null; });
1953
+ rowChanged.forEach(function (row) {
1954
+ if (row.uid.indexOf(Tables_1.RowPrefix.Dynamic) > -1) {
1955
+ modifiedForData.push(row);
1956
+ }
1957
+ });
1958
+ var filteredModifed = [];
1959
+ keys.forEach(function (uid) {
1960
+ modifiedForData.forEach(function (row) {
1961
+ if (row.uid === uid) {
1962
+ filteredModifed[tableUids[uid]] = __assign(__assign({}, initialFormData[0]), row);
1963
+ }
1964
+ });
1965
+ });
1966
+ filteredModifed = filteredModifed.filter(function (row) { return row; });
1967
+ for (var i = 0; i < filteredModifed.length; i++) {
1968
+ if (filteredModifed[i].uid.indexOf(Tables_1.RowPrefix.Dynamic) > -1)
1969
+ continue;
1970
+ filteredModifed[i].rowId++;
1971
+ }
1972
+ var _loop_1 = function (i) {
1973
+ Object.keys(columns).forEach(function (columnName) {
1974
+ modifiedForData[i].actions = updateActionsRowId(createDefaultTableAction(component, i, columnName, tab, tableUids), i);
1975
+ });
1976
+ };
1977
+ for (var i = 0; i < modifiedForData.length; i++) {
1978
+ _loop_1(i);
1979
+ }
1980
+ return overrideTableDefaultsWithChanges(rowChanged, filteredModifed, tableUids);
1981
+ }
1982
+ exports.overrideDefaultsAndFilterRows = overrideDefaultsAndFilterRows;
1983
+ function createTableUids(component, tab, model, tableState) {
1984
+ var _a, _b, _c;
1985
+ var table = component;
1986
+ var dynamicTableData = model === null || model === void 0 ? void 0 : model.getDerivedFunction(component.name, component, model, tab);
1987
+ if (dynamicTableData) {
1988
+ var uidMap_1 = {};
1989
+ var rowNum_1 = 0;
1990
+ dynamicTableData.forEach(function (entry) {
1991
+ var uid = entry === null || entry === void 0 ? void 0 : entry.uid;
1992
+ if (uid !== undefined) {
1993
+ uidMap_1[uid] = rowNum_1++;
1994
+ }
1995
+ });
1996
+ return uidMap_1;
1997
+ }
1998
+ var rowData = table["rowData"];
1999
+ if (!dynamicTableData && rowData) {
2000
+ var _loop_2 = function (i) {
2001
+ if (!rowData[i].uid) {
2002
+ rowData[i].uid = createRowUid(Tables_1.RowPrefix.Default, i);
2003
+ }
2004
+ rowData[i].rowId =
2005
+ (_b = (_a = (0, Arrays_1.find)(tableState !== null && tableState !== void 0 ? tableState : [], function (row) { return row.uid === (rowData === null || rowData === void 0 ? void 0 : rowData[i].uid); })) === null || _a === void 0 ? void 0 : _a.rowId) !== null && _b !== void 0 ? _b : rowData[i].rowId;
2006
+ };
2007
+ for (var i = 0; i < rowData.length; i++) {
2008
+ _loop_2(i);
2009
+ }
2010
+ }
2011
+ else {
2012
+ rowData =
2013
+ dynamicTableData !== null && dynamicTableData !== void 0 ? dynamicTableData : createInitialRows(table).map(function (row) {
2014
+ var _a, _b;
2015
+ return __assign(__assign({}, (row !== null && row !== void 0 ? row : {})), { rowId: (_b = (_a = (0, Arrays_1.find)(tableState !== null && tableState !== void 0 ? tableState : [], function (r) { return r.uid === (row === null || row === void 0 ? void 0 : row.uid); })) === null || _a === void 0 ? void 0 : _a.rowId) !== null && _b !== void 0 ? _b : row.rowId });
2016
+ });
2017
+ }
2018
+ var uidMapBuilder = (_c = model === null || model === void 0 ? void 0 : model.getTableHelpers().createUidMapBuilder()) !== null && _c !== void 0 ? _c : (0, exports.getTableHelpers)().createUidMapBuilder();
2019
+ return uidMapBuilder
2020
+ .addDefaultRows(rowData)
2021
+ .addDynamicRows(tableState !== null && tableState !== void 0 ? tableState : [])
2022
+ .removeRows(tableState !== null && tableState !== void 0 ? tableState : [])
2023
+ .sortByValue()
2024
+ .create();
2025
+ }
2026
+ exports.createTableUids = createTableUids;
2027
+ function getCellValidationInfo(component) {
2028
+ var table = component;
2029
+ var colInfo = [];
2030
+ var columns = table.columns;
2031
+ for (var column in columns) {
2032
+ var colData = table.columns[column];
2033
+ if (colData === null || colData === void 0 ? void 0 : colData["cellValidator"]) {
2034
+ colInfo.push({
2035
+ type: colData["type"],
2036
+ minValue: colData["cellValidator"]["minValue"],
2037
+ maxValue: colData["cellValidator"]["maxValue"],
2038
+ errMessage: colData["cellValidator"]["errorMessage"],
2039
+ errTitle: colData["cellValidator"]["errorTitle"],
2040
+ cValidation: colData["cellValidator"]["cValidation"],
2041
+ cValidationErrTitle: colData["cellValidator"]["cValidationErrorTitle"],
2042
+ cValidationErrMessage: colData["cellValidator"]["cValidationErrorMessage"],
2043
+ });
2044
+ }
2045
+ }
2046
+ return colInfo;
2047
+ }
2048
+ exports.getCellValidationInfo = getCellValidationInfo;
2049
+ function getTableActions(component, tab, model, uids, rowFormData) {
2050
+ var _a, _b, _c, _d, _e;
2051
+ var table = component;
2052
+ var dynamicTableData;
2053
+ if (!rowFormData) {
2054
+ dynamicTableData = model === null || model === void 0 ? void 0 : model.getDerivedFunction(component.name, component, model, tab);
2055
+ }
2056
+ var rowData = (_b = (_a = rowFormData !== null && rowFormData !== void 0 ? rowFormData : dynamicTableData) !== null && _a !== void 0 ? _a : table["rowData"]) !== null && _b !== void 0 ? _b : createInitialRows(table);
2057
+ var columnNames = Object.keys(table.columns);
2058
+ var tableActions = { table: {} };
2059
+ var rowCount = 0;
2060
+ var tableState = (_e = (_d = (_c = model === null || model === void 0 ? void 0 : model.getState()) === null || _c === void 0 ? void 0 : _c[tab]) === null || _d === void 0 ? void 0 : _d[component.group]) === null || _e === void 0 ? void 0 : _e[component.name];
2061
+ rowData.forEach(function (row) {
2062
+ columnNames.forEach(function (columnName) {
2063
+ var _a, _b, _c, _d;
2064
+ if (!tableActions["table"][row.uid]) {
2065
+ tableActions["table"][row.uid] = {};
2066
+ }
2067
+ var uid;
2068
+ for (var uidsKey in uids) {
2069
+ if (uids[uidsKey] === row.rowId) {
2070
+ uid = uidsKey;
2071
+ }
2072
+ }
2073
+ uid = uid !== null && uid !== void 0 ? uid : createRowUid(Tables_1.RowPrefix.Default, rowCount);
2074
+ var defaultAction = createDefaultTableAction(component, rowCount, columnName, tab, uid);
2075
+ if (tableState) {
2076
+ var ind_1 = -1;
2077
+ var filtered = tableState.filter(function (row, index) {
2078
+ ind_1 = index;
2079
+ return row.uid === uid;
2080
+ });
2081
+ if (filtered.length) {
2082
+ defaultAction = createDefaultTableAction(component, ind_1, columnName, tab, uid !== null && uid !== void 0 ? uid : createRowUid(Tables_1.RowPrefix.Default, rowCount));
2083
+ }
2084
+ }
2085
+ if (component.columns[columnName].type == "ComboBox") {
2086
+ defaultAction["payload"] = __assign(__assign({}, defaultAction["payload"]), { options: getComboOptions((_a = model === null || model === void 0 ? void 0 : model.getDerivedFunctions()) === null || _a === void 0 ? void 0 : _a.overrideTableOptions, table.columns[columnName], columnName, component.name) });
2087
+ }
2088
+ var cellAction = (_c = (_b = row.actions) === null || _b === void 0 ? void 0 : _b[columnName]) !== null && _c !== void 0 ? _c : defaultAction;
2089
+ tableActions["table"][row.uid][columnName] =
2090
+ (_d = model === null || model === void 0 ? void 0 : model.getDerivedFunction("getActions", table.name, cellAction)) !== null && _d !== void 0 ? _d : cellAction;
2091
+ });
2092
+ rowCount++;
2093
+ });
2094
+ var uidKeys = Object.keys(uids);
2095
+ uidKeys.forEach(function (uidKey) {
2096
+ columnNames.forEach(function (columnName) {
2097
+ if (uids[uidKey] > -1) {
2098
+ if (!tableActions["table"][uidKey]) {
2099
+ tableActions["table"][uidKey] = {};
2100
+ tableActions["table"][uidKey][columnName] = createDefaultTableAction(table, uids[uidKey], columnName, tab, uidKey);
2101
+ }
2102
+ else if (!tableActions["table"][uidKey][columnName]) {
2103
+ tableActions["table"][uidKey][columnName] = createDefaultTableAction(table, uids[uidKey], columnName, tab, uidKey);
2104
+ }
2105
+ }
2106
+ });
2107
+ });
2108
+ return JSON.stringify(tableActions);
2109
+ }
2110
+ exports.getTableActions = getTableActions;
2111
+ function getTableUiSchema(table, columns) {
2112
+ var _a, _b;
2113
+ var tableUi = {
2114
+ tableCols: columns,
2115
+ search: table["isSearchable"],
2116
+ striped: true,
2117
+ bordered: false,
2118
+ };
2119
+ if (table["canRemoveRows"]) {
2120
+ tableUi = __assign(__assign({}, tableUi), { rightActions: getTableRightActions() });
2121
+ }
2122
+ if (table["canInsertRows"]) {
2123
+ tableUi = __assign(__assign({}, tableUi), { leftActions: getTableLeftActions() });
2124
+ }
2125
+ if (table.canMoveRowDown) {
2126
+ tableUi = __assign(__assign({}, tableUi), { leftActions: ((_a = tableUi.leftActions) !== null && _a !== void 0 ? _a : []).concat(getTableMoveRowActions()[0]) });
2127
+ }
2128
+ if (table.canMoveRowUp) {
2129
+ tableUi = __assign(__assign({}, tableUi), { leftActions: ((_b = tableUi.leftActions) !== null && _b !== void 0 ? _b : []).concat(getTableMoveRowActions()[1]) });
2130
+ }
2131
+ return {
2132
+ "ui:field": "table",
2133
+ className: "col-md-12 individualComponent",
2134
+ table: __assign({}, tableUi),
2135
+ };
2136
+ }
2137
+ exports.getTableUiSchema = getTableUiSchema;
2138
+ function getCellStyle(isReadonly) {
2139
+ var tdStyle = {
2140
+ overflow: "hidden",
2141
+ textOverflow: "ellipsis",
2142
+ };
2143
+ if (isReadonly) {
2144
+ tdStyle["backgroundColor"] = "#EEEEEE";
2145
+ }
2146
+ return tdStyle;
2147
+ }
2148
+ exports.getCellStyle = getCellStyle;
2149
+ function getHeaderStyle(maxHeaderSize, displayHeadersDiagonally) {
2150
+ return displayHeadersDiagonally
2151
+ ? getDiagonalHeaderStyles(maxHeaderSize)
2152
+ : getDefaultHeaderStyles(maxHeaderSize);
2153
+ }
2154
+ exports.getHeaderStyle = getHeaderStyle;
2155
+ function getDiagonalHeaderStyles(maxHeaderSize) {
2156
+ var headerSizeMultiplier = 3.3;
2157
+ return {
2158
+ position: "relative",
2159
+ bottom: "-7px",
2160
+ left: "6px",
2161
+ transformOrigin: "bottom left",
2162
+ transform: "rotate(-30deg)",
2163
+ paddingTop: "".concat(headerSizeMultiplier * maxHeaderSize, "px"),
2164
+ };
2165
+ }
2166
+ function getDefaultHeaderStyles(maxHeaderSize) {
2167
+ return {
2168
+ whiteSpace: "unset",
2169
+ maxWidth: "".concat(maxHeaderSize, "px"),
2170
+ };
2171
+ }
2172
+ function createDefaultTableAction(component, row, column, tab, uid) {
2173
+ return {
2174
+ type: "[Table] EDIT_CELL",
2175
+ payload: {
2176
+ tabId: tab !== null && tab !== void 0 ? tab : "main",
2177
+ path: "".concat(component === null || component === void 0 ? void 0 : component.group, ".").concat(component === null || component === void 0 ? void 0 : component.name),
2178
+ column: column,
2179
+ value: "%v",
2180
+ uid: uid,
2181
+ rowId: row,
2182
+ },
2183
+ };
2184
+ }
2185
+ function updateActionsRowId(currentActions, rowId) {
2186
+ var modifiedActions = __assign({}, currentActions);
2187
+ var columnNames = Object.keys(currentActions);
2188
+ columnNames.forEach(function (columnName) {
2189
+ var _a;
2190
+ var payload = (_a = modifiedActions[columnName]) === null || _a === void 0 ? void 0 : _a["payload"];
2191
+ if (payload) {
2192
+ var path = payload["path"].split(".");
2193
+ path[path.length - 2] = rowId;
2194
+ modifiedActions[columnName]["payload"]["rowId"] = rowId;
2195
+ modifiedActions[columnName]["payload"]["path"] = path.join(".");
2196
+ }
2197
+ });
2198
+ return modifiedActions;
2199
+ }
2200
+ var getDefaultValue = function (overrideDefaultValues, component, componentName, tableName) {
2201
+ var _a;
2202
+ return ((_a = overrideDefaultValues === null || overrideDefaultValues === void 0 ? void 0 : overrideDefaultValues(tableName, componentName)) !== null && _a !== void 0 ? _a : (component.type === "ComboBox"
2203
+ ? component.defaultValue.value
2204
+ : component.defaultValue));
2205
+ };
2206
+ var getComboOptions = function (overrideOptions, component, componentName, tableName) {
2207
+ var _a;
2208
+ var dynamicOptions = overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions(tableName, componentName);
2209
+ return dynamicOptions && dynamicOptions.length > 0
2210
+ ? dynamicOptions
2211
+ : (_a = component === null || component === void 0 ? void 0 : component.defaultValue) === null || _a === void 0 ? void 0 : _a["options"];
2212
+ };
2213
+ function getTableLeftActions() {
2214
+ return [
2215
+ {
2216
+ dataField: "insert-button",
2217
+ editable: false,
2218
+ displayName: "",
2219
+ columnWidth: "21px",
2220
+ width: "21px",
2221
+ tdStyle: { textOverflow: "unset" },
2222
+ },
2223
+ ];
2224
+ }
2225
+ function getTableRightActions() {
2226
+ return [
2227
+ {
2228
+ dataField: "delete-button",
2229
+ editable: false,
2230
+ displayName: "",
2231
+ columnWidth: "21px",
2232
+ width: "21px",
2233
+ tdStyle: { textOverflow: "unset" },
2234
+ },
2235
+ ];
2236
+ }
2237
+ function getTableMoveRowActions() {
2238
+ return [
2239
+ {
2240
+ dataField: "row-down-button",
2241
+ editable: false,
2242
+ displayName: "",
2243
+ columnWidth: "21px",
2244
+ width: "21px",
2245
+ },
2246
+ {
2247
+ dataField: "row-up-button",
2248
+ editable: false,
2249
+ displayName: "",
2250
+ columnWidth: "21px",
2251
+ width: "21px",
2252
+ },
2253
+ ];
2254
+ }
2255
+ function createRowUid(prefix, postfix) {
2256
+ return prefix + postfix;
2257
+ }
2258
+ //# sourceMappingURL=tables.js.map
2259
+
2260
+ /***/ }),
2261
+
2262
+ /***/ "./node_modules/@microchip/scf-common/lib/Processor.js":
2263
+ /*!*************************************************************!*\
2264
+ !*** ./node_modules/@microchip/scf-common/lib/Processor.js ***!
2265
+ \*************************************************************/
2266
+ /*! no static exports found */
2267
+ /***/ (function(module, exports, __webpack_require__) {
2268
+
2269
+ "use strict";
2270
+
2271
+ var __assign = (this && this.__assign) || function () {
2272
+ __assign = Object.assign || function(t) {
2273
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
2274
+ s = arguments[i];
2275
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
2276
+ t[p] = s[p];
2277
+ }
2278
+ return t;
2279
+ };
2280
+ return __assign.apply(this, arguments);
2281
+ };
2282
+ Object.defineProperty(exports, "__esModule", { value: true });
2283
+ exports.mapOptionLabels = exports.filterOptions = exports.isSingleton = exports.isUnassigned = exports.isAssigned = exports.hasOptions = exports.AlertTypes = void 0;
2284
+ var AlertTypes;
2285
+ (function (AlertTypes) {
2286
+ AlertTypes["Error"] = "error";
2287
+ AlertTypes["Warning"] = "warning";
2288
+ AlertTypes["Hint"] = "hint";
2289
+ })(AlertTypes = exports.AlertTypes || (exports.AlertTypes = {}));
2290
+ /**
2291
+ * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
2292
+ * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
2293
+ */
2294
+ function hasOptions(dep) {
2295
+ return dep.options !== undefined;
2296
+ }
2297
+ exports.hasOptions = hasOptions;
2298
+ /**
2299
+ * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
2300
+ * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
2301
+ */
2302
+ function isAssigned(dep) {
2303
+ return typeof dep.handle !== "undefined";
2304
+ }
2305
+ exports.isAssigned = isAssigned;
2306
+ /**
2307
+ * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
2308
+ * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
2309
+ */
2310
+ function isUnassigned(dep) {
2311
+ return typeof dep.handle === "undefined";
2312
+ }
2313
+ exports.isUnassigned = isUnassigned;
2314
+ /**
2315
+ * Type guard function for SingletonExport
2316
+ * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
2317
+ * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
2318
+ * @param resource the export to check on being a singleton
2319
+ * @deprecated No longer used. Replaced with dynamic singleton identification
2320
+ * at runtime.
2321
+ */
2322
+ function isSingleton(resource) {
2323
+ return typeof resource.isSingleton !== "undefined" && resource.isSingleton;
2324
+ }
2325
+ exports.isSingleton = isSingleton;
2326
+ /**
2327
+ * Returns a copy of `populatedImport` with all options removed which
2328
+ * cause `optionFilter` to return false.
2329
+ */
2330
+ function filterOptions(populatedImport, optionFilter) {
2331
+ if (populatedImport.options) {
2332
+ return __assign(__assign({}, populatedImport), { options: populatedImport.options.filter(optionFilter) });
2333
+ }
2334
+ return populatedImport;
2335
+ }
2336
+ exports.filterOptions = filterOptions;
2337
+ /**
2338
+ * Returns a copy of `populatedImport` with the options' handle labels
2339
+ * mapped according to `labelFactory`.
2340
+ */
2341
+ function mapOptionLabels(populatedImport, labelFactory) {
2342
+ if (populatedImport.options) {
2343
+ return __assign(__assign({}, populatedImport), { options: populatedImport.options.map(function (option) {
2344
+ return __assign(__assign({}, option), { handle: __assign(__assign({}, option.handle), { label: labelFactory(option) }) });
2345
+ }) });
2346
+ }
2347
+ return populatedImport;
2348
+ }
2349
+ exports.mapOptionLabels = mapOptionLabels;
2350
+ //# sourceMappingURL=Processor.js.map
2351
+
2352
+ /***/ }),
2353
+
2354
+ /***/ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js":
2355
+ /*!**************************************************************************!*\
2356
+ !*** ./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js ***!
2357
+ \**************************************************************************/
2358
+ /*! no static exports found */
2359
+ /***/ (function(module, exports, __webpack_require__) {
2360
+
2361
+ "use strict";
2362
+
2363
+ var __extends = (this && this.__extends) || (function () {
2364
+ var extendStatics = function (d, b) {
2365
+ extendStatics = Object.setPrototypeOf ||
2366
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2367
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2368
+ return extendStatics(d, b);
2369
+ };
2370
+ return function (d, b) {
2371
+ if (typeof b !== "function" && b !== null)
2372
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2373
+ extendStatics(d, b);
2374
+ function __() { this.constructor = d; }
2375
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2376
+ };
2377
+ })();
2378
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2379
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
2380
+ if (ar || !(i in from)) {
2381
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
2382
+ ar[i] = from[i];
2383
+ }
2384
+ }
2385
+ return to.concat(ar || Array.prototype.slice.call(from));
2386
+ };
2387
+ Object.defineProperty(exports, "__esModule", { value: true });
2388
+ var Setting_1 = __webpack_require__(/*! ./Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
2389
+ var Register_1 = __webpack_require__(/*! ./Register */ "./node_modules/@microchip/scf-device/lib/Register.js");
2390
+ var Arrays_1 = __webpack_require__(/*! ./util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
2391
+ /** Builder pattern */
2392
+ var CalculateRegisterValue = /** @class */ (function () {
2393
+ function CalculateRegisterValue(register) {
2394
+ var _this = this;
2395
+ this.modifiedSettings = [];
2396
+ /** Assign a numerical value to the given `Setting`. */
2397
+ this.withNumberValue = function (setting, value) {
2398
+ if (setting === undefined) {
2399
+ throw new Error("Cannot assign number value to setting, setting is undefined.");
2400
+ }
2401
+ if (!_this.getSetting(setting)) {
2402
+ throw new Error("Setting ".concat(setting.alias, " is not present in Register ").concat(_this.register.name));
2403
+ }
2404
+ _this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [
2405
+ new NumberSettingValue(setting, value),
2406
+ ], false);
2407
+ return _this;
2408
+ };
2409
+ /** Assign the given `Option` to the given `Setting`. */
2410
+ this.withOption = function (setting, option) {
2411
+ if (setting === undefined) {
2412
+ throw new Error("Cannot assign option to setting, setting is undefined.");
2413
+ }
2414
+ if (!_this.getSetting(setting)) {
2415
+ throw new Error("Setting ".concat(setting.alias, " is not present in Register ").concat(_this.register.name));
2416
+ }
2417
+ if (!option || !_this.getOption(setting, option)) {
2418
+ throw new Error("Option ".concat(option === null || option === void 0 ? void 0 : option.name, " is not present in Setting ").concat(setting.name));
2419
+ }
2420
+ _this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [
2421
+ new OptionSettingValue(setting, option),
2422
+ ], false);
2423
+ return _this;
2424
+ };
2425
+ /** Assign the `Option` matching the given alias to the given `Setting`. */
2426
+ this.withOptionAlias = function (setting, optionAlias) {
2427
+ if (setting === undefined) {
2428
+ throw new Error("Cannot assign option alias to setting, setting is undefined.");
2429
+ }
2430
+ var option = (0, Setting_1.getOptionByAlias)(optionAlias, setting);
2431
+ if (option === undefined) {
2432
+ throw new Error("Option Alias: \"".concat(optionAlias, "\" not present in Setting: \"").concat(setting.name, "\"."));
2433
+ }
2434
+ return _this.withOption(setting, option);
2435
+ };
2436
+ /** Assign the `Option` matching the given name to the given `Setting`. */
2437
+ this.withOptionName = function (setting, optionName) {
2438
+ if (setting === undefined) {
2439
+ throw new Error("Cannot assign option name to setting, setting is undefined.");
2440
+ }
2441
+ var option = (0, Setting_1.getOptionByName)(optionName, setting);
2442
+ if (option === undefined) {
2443
+ throw new Error("Option Name: \"".concat(optionName, "\" not present in Setting: \"").concat(setting.name, "\"."));
2444
+ }
2445
+ return _this.withOption(setting, option);
2446
+ };
2447
+ /** Assign the `Option` matching the given description to the given `Setting`. */
2448
+ this.withOptionDescription = function (setting, optionDescription) {
2449
+ if (setting === undefined) {
2450
+ throw new Error("Cannot assign option description to setting, setting is undefined.");
2451
+ }
2452
+ var option = (0, Setting_1.getOptionByDescription)(optionDescription, setting);
2453
+ if (option === undefined) {
2454
+ throw new Error("Option Description: \"".concat(optionDescription, "\" not present in Setting: \"").concat(setting.name, "\"."));
2455
+ }
2456
+ return _this.withOption(setting, option);
2457
+ };
2458
+ this.getSetting = function (setting) {
2459
+ return (0, Register_1.getSettingByAlias)(setting.alias, _this.register);
2460
+ };
2461
+ this.getOption = function (setting, option) {
2462
+ return (option === null || option === void 0 ? void 0 : option.name) ? (0, Setting_1.getOptionByName)(option.name, setting) : undefined;
2463
+ };
2464
+ this.calculate = function () {
2465
+ var registerValue = 0;
2466
+ _this.modifiedSettings.forEach(function (modifiedSetting) {
2467
+ registerValue = _this.setValue(modifiedSetting, registerValue);
2468
+ });
2469
+ var unmodifiedSettings = _this.getUnmodifiedSettings();
2470
+ unmodifiedSettings.forEach(function (unmodifiedSetting) {
2471
+ registerValue = _this.setValue(SettingValue.defaultValue(unmodifiedSetting), registerValue);
2472
+ });
2473
+ return Number(registerValue);
2474
+ };
2475
+ this.setValue = function (setting, registerValue) {
2476
+ var value = registerValue;
2477
+ value &= ~setting.getMask(); // Clear bits
2478
+ value |= setting.getShiftedValue(); // Set bits
2479
+ return value;
2480
+ };
2481
+ this.getUnmodifiedSettings = function () {
2482
+ var _a, _b;
2483
+ var modifiedSettingNames = (0, Arrays_1.map)(_this.modifiedSettings, function (setting) {
2484
+ return setting.getName();
2485
+ });
2486
+ return (0, Arrays_1.filter)((_b = (0, Arrays_1.values)((_a = _this.register.settings) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], function (setting) { return modifiedSettingNames.indexOf(setting.name) < 0; });
2487
+ };
2488
+ /** Calculate and print the register's value as a hex string. */
2489
+ this.asHexString = function () { return CalculateRegisterValue.toHexString(_this.calculate()); };
2490
+ /** Calculate and print the register's value as a binary string. */
2491
+ this.asBinaryString = function () {
2492
+ return CalculateRegisterValue.toBinaryString(_this.calculate());
2493
+ };
2494
+ /** Calculate and print the register's value as a decimal string. */
2495
+ this.asDecimalString = function () {
2496
+ return CalculateRegisterValue.toDecimalString(_this.calculate());
2497
+ };
2498
+ /** Calculate and return the register's value as a number. */
2499
+ this.asNumber = function () { return _this.calculate(); };
2500
+ this.register = register;
2501
+ }
2502
+ /** Creates a register value calculation object for the given register. */
2503
+ CalculateRegisterValue.for = function (register) {
2504
+ return new CalculateRegisterValue(register);
2505
+ };
2506
+ /** Format the given number as a hex string value. */
2507
+ CalculateRegisterValue.toHexString = function (value) {
2508
+ if (value == null) {
2509
+ throw new Error("CalculateRegisterValue.toHexString() illegal argument exception. Value must not be null.");
2510
+ }
2511
+ return "0x" + value.toString(16);
2512
+ };
2513
+ /** Format the given number as a binary string value. */
2514
+ CalculateRegisterValue.toBinaryString = function (value) {
2515
+ if (value == null) {
2516
+ throw new Error("CalculateRegisterValue.toBinaryString() illegal argument exception. Value must not be null.");
2517
+ }
2518
+ return "0b" + value.toString(2);
2519
+ };
2520
+ /** Format the given number as a decimal string value. */
2521
+ CalculateRegisterValue.toDecimalString = function (value) {
2522
+ if (value == null) {
2523
+ throw new Error("CalculateRegisterValue.toDecimalString() illegal argument exception. Value must not be null.");
2524
+ }
2525
+ return value.toString();
2526
+ };
2527
+ return CalculateRegisterValue;
2528
+ }());
2529
+ exports.default = CalculateRegisterValue;
2530
+ var SettingValue = /** @class */ (function () {
2531
+ function SettingValue(setting) {
2532
+ var _this = this;
2533
+ this.getMask = function () { return Number(_this.setting.mask); };
2534
+ this.getShift = function () {
2535
+ var mask = _this.getMask();
2536
+ var shiftIndex = 0;
2537
+ while (!(mask & 0x1)) {
2538
+ mask = mask >> 1;
2539
+ shiftIndex++;
2540
+ }
2541
+ return shiftIndex;
2542
+ };
2543
+ this.getShiftedValue = function () { return _this.getValue() << _this.getShift(); };
2544
+ this.getName = function () { return _this.setting.name; };
2545
+ this.setting = setting;
2546
+ }
2547
+ SettingValue.defaultValue = function (setting) {
2548
+ var value = Number(setting.porDefault);
2549
+ return new NumberSettingValue(setting, value);
2550
+ };
2551
+ return SettingValue;
2552
+ }());
2553
+ var NumberSettingValue = /** @class */ (function (_super) {
2554
+ __extends(NumberSettingValue, _super);
2555
+ function NumberSettingValue(setting, value) {
2556
+ var _this = _super.call(this, setting) || this;
2557
+ _this.getValue = function () { return _this.value; };
2558
+ _this.value = value;
2559
+ return _this;
2560
+ }
2561
+ return NumberSettingValue;
2562
+ }(SettingValue));
2563
+ var OptionSettingValue = /** @class */ (function (_super) {
2564
+ __extends(OptionSettingValue, _super);
2565
+ function OptionSettingValue(setting, option) {
2566
+ var _this = _super.call(this, setting) || this;
2567
+ _this.getValue = function () { return Number(_this.option.value); };
2568
+ _this.option = option;
2569
+ return _this;
2570
+ }
2571
+ OptionSettingValue.fromDefaultValue = function (setting, value) {
2572
+ var foundValueByName = (0, Setting_1.getOptionByName)(value, setting);
2573
+ if (foundValueByName)
2574
+ return new OptionSettingValue(setting, foundValueByName);
2575
+ var foundValueByAlias = (0, Setting_1.getOptionByAlias)(value, setting);
2576
+ if (foundValueByAlias)
2577
+ return new OptionSettingValue(setting, foundValueByAlias);
2578
+ throw new Error("Unable to create default value '".concat(value, "' for setting '").concat(setting.name, "'."));
2579
+ };
2580
+ return OptionSettingValue;
2581
+ }(SettingValue));
2582
+ //# sourceMappingURL=CalculateRegisterValue.js.map
2583
+
2584
+ /***/ }),
2585
+
2586
+ /***/ "./node_modules/@microchip/scf-device/lib/Register.js":
2587
+ /*!************************************************************!*\
2588
+ !*** ./node_modules/@microchip/scf-device/lib/Register.js ***!
2589
+ \************************************************************/
2590
+ /*! no static exports found */
2591
+ /***/ (function(module, exports, __webpack_require__) {
2592
+
2593
+ "use strict";
2594
+
2595
+ Object.defineProperty(exports, "__esModule", { value: true });
2596
+ exports.getSettingByAlias = void 0;
2597
+ var getSettingByAlias = function (alias, register) {
2598
+ var _a;
2599
+ return (_a = register.settings) === null || _a === void 0 ? void 0 : _a[alias];
2600
+ };
2601
+ exports.getSettingByAlias = getSettingByAlias;
2602
+ //# sourceMappingURL=Register.js.map
2603
+
2604
+ /***/ }),
2605
+
2606
+ /***/ "./node_modules/@microchip/scf-device/lib/Setting.js":
2607
+ /*!***********************************************************!*\
2608
+ !*** ./node_modules/@microchip/scf-device/lib/Setting.js ***!
2609
+ \***********************************************************/
2610
+ /*! no static exports found */
2611
+ /***/ (function(module, exports, __webpack_require__) {
2612
+
2613
+ "use strict";
2614
+
2615
+ Object.defineProperty(exports, "__esModule", { value: true });
2616
+ exports.getOptionDescriptions = exports.getOptionNames = exports.getOptionByDescription = exports.getOptionByName = exports.getOptionByAlias = exports.getBitRange = exports.getBitLabel = void 0;
2617
+ var Arrays_1 = __webpack_require__(/*! ./util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
2618
+ /**
2619
+ * Converts a hexadecimal string to binary.
2620
+ * Any leading zeros are removed from the returned string.
2621
+ */
2622
+ var hexToBinary = function (hex) {
2623
+ return parseInt(hex, 16).toString(2);
2624
+ };
2625
+ /**
2626
+ * Returns a string of the corresponding bit position(s).
2627
+ */
2628
+ var getBitLabel = function (setting) {
2629
+ if (setting.mask === undefined) {
2630
+ return undefined;
2631
+ }
2632
+ var bitRange = (0, exports.getBitRange)(setting);
2633
+ if (!bitRange)
2634
+ return undefined;
2635
+ if (bitRange.high === bitRange.low) {
2636
+ return "bit ".concat(bitRange.high);
2637
+ }
2638
+ return "bit ".concat(bitRange.high, "-").concat(bitRange.low);
2639
+ };
2640
+ exports.getBitLabel = getBitLabel;
2641
+ /**
2642
+ * Converts the hexadecimal mask provided within the register setting
2643
+ * and returns an interface containing the corresponding low and high bit positions.
2644
+ */
2645
+ var getBitRange = function (setting) {
2646
+ if (!setting.mask)
2647
+ return undefined;
2648
+ var processedHex = hexToBinary(setting.mask);
2649
+ return {
2650
+ high: processedHex.length - 1,
2651
+ low: getBitRangeLow(processedHex),
2652
+ };
2653
+ };
2654
+ exports.getBitRange = getBitRange;
2655
+ var getOptionByAlias = function (alias, setting) {
2656
+ var _a;
2657
+ return (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.alias == alias; });
2658
+ };
2659
+ exports.getOptionByAlias = getOptionByAlias;
2660
+ var getOptionByName = function (name, setting) {
2661
+ var _a;
2662
+ return (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name == name; });
2663
+ };
2664
+ exports.getOptionByName = getOptionByName;
2665
+ var getOptionByDescription = function (description, setting) {
2666
+ var _a;
2667
+ return (0, Arrays_1.find)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description == description; });
2668
+ };
2669
+ exports.getOptionByDescription = getOptionByDescription;
2670
+ var getOptionNames = function (setting) {
2671
+ var _a;
2672
+ return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name; });
2673
+ };
2674
+ exports.getOptionNames = getOptionNames;
2675
+ var getOptionDescriptions = function (setting) {
2676
+ var _a;
2677
+ return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description; });
2678
+ };
2679
+ exports.getOptionDescriptions = getOptionDescriptions;
2680
+ function getBitRangeLow(processedHex) {
2681
+ if (processedHex.charAt(1) === "1") {
2682
+ var index = 1;
2683
+ while (processedHex.charAt(index) === "1") {
2684
+ index++;
2685
+ }
2686
+ return processedHex.length - index;
2687
+ }
2688
+ else {
2689
+ return processedHex.length - 1;
2690
+ }
2691
+ }
2692
+ //# sourceMappingURL=Setting.js.map
2693
+
2694
+ /***/ }),
2695
+
2696
+ /***/ "./node_modules/@microchip/scf-device/lib/util/Arrays.js":
2697
+ /*!***************************************************************!*\
2698
+ !*** ./node_modules/@microchip/scf-device/lib/util/Arrays.js ***!
2699
+ \***************************************************************/
2700
+ /*! no static exports found */
2701
+ /***/ (function(module, exports, __webpack_require__) {
2702
+
2703
+ "use strict";
2704
+
2705
+ Object.defineProperty(exports, "__esModule", { value: true });
2706
+ exports.values = exports.getKeys = exports.find = exports.filter = exports.map = void 0;
2707
+ var map = function (arr, callback) {
2708
+ var result = [];
2709
+ arr.forEach(function (value, index) {
2710
+ result[index] = callback(value);
2711
+ });
2712
+ return result;
2713
+ };
2714
+ exports.map = map;
2715
+ var filter = function (arr, callback) {
2716
+ var result = [];
2717
+ arr.forEach(function (value) {
2718
+ if (callback(value)) {
2719
+ result.push(value);
2720
+ }
2721
+ });
2722
+ return result;
2723
+ };
2724
+ exports.filter = filter;
2725
+ /**
2726
+ * Iterates over elements of the array, returning the first element that the predicate returns truthy for.
2727
+ */
2728
+ var find = function (arr, callback) {
2729
+ for (var i = 0; i < arr.length; i++) {
2730
+ if (callback(arr[i])) {
2731
+ return arr[i];
2732
+ }
2733
+ }
2734
+ return undefined;
2735
+ };
2736
+ exports.find = find;
2737
+ /** @returns the non-prototype keys of the given object */
2738
+ var getKeys = function (obj) {
2739
+ if (!obj)
2740
+ return undefined;
2741
+ return Object.getOwnPropertyNames(obj);
2742
+ };
2743
+ exports.getKeys = getKeys;
2744
+ var values = function (obj) {
2745
+ var _a;
2746
+ if (!obj)
2747
+ return undefined;
2748
+ return (_a = (0, exports.getKeys)(obj)) === null || _a === void 0 ? void 0 : _a.map(function (key) { return obj[key]; });
2749
+ };
2750
+ exports.values = values;
2751
+ //# sourceMappingURL=Arrays.js.map
2752
+
2753
+ /***/ }),
2754
+
2755
+ /***/ "./node_modules/@microchip/scf-interface/lib/c-function-types.js":
2756
+ /*!***********************************************************************!*\
2757
+ !*** ./node_modules/@microchip/scf-interface/lib/c-function-types.js ***!
2758
+ \***********************************************************************/
2759
+ /*! no static exports found */
2760
+ /***/ (function(module, exports, __webpack_require__) {
2761
+
2762
+ "use strict";
2763
+
2764
+ Object.defineProperty(exports, "__esModule", { value: true });
2765
+ exports.buildSimpleApi = function (functions) {
2766
+ var api = {};
2767
+ for (var key in functions) {
2768
+ api[key] = buildFunction(functions[key]);
2769
+ }
2770
+ return api;
2771
+ };
2772
+ var buildFunction = function (cFunction) {
2773
+ return cFunction.returns + " " + cFunction.name + "(" + buildArguments(cFunction.arguments) + ")";
2774
+ };
2775
+ var buildArguments = function (args) {
2776
+ if (args) {
2777
+ return args.map(function (arg) { return arg.type + " " + arg.name; }).join(", ");
2778
+ }
2779
+ else {
2780
+ return "void";
2781
+ }
2782
+ };
2783
+
2784
+
2785
+ /***/ }),
2786
+
2787
+ /***/ "./node_modules/@microchip/scf-interface/lib/helpers.js":
2788
+ /*!**************************************************************!*\
2789
+ !*** ./node_modules/@microchip/scf-interface/lib/helpers.js ***!
2790
+ \**************************************************************/
2791
+ /*! no static exports found */
2792
+ /***/ (function(module, exports, __webpack_require__) {
2793
+
2794
+ "use strict";
2795
+
2796
+ Object.defineProperty(exports, "__esModule", { value: true });
2797
+ exports.getInterfaceName = function (pkgJson) {
2798
+ var strReplace = "@microchip/";
2799
+ var interfaceName;
2800
+ if (pkgJson) {
2801
+ interfaceName = pkgJson["name"];
2802
+ if (interfaceName) {
2803
+ interfaceName = interfaceName.replace(strReplace, "");
2804
+ }
2805
+ }
2806
+ if (!interfaceName) {
2807
+ throw new Error("Invalid Interface Name...!");
2808
+ }
2809
+ return interfaceName;
2810
+ };
2811
+ exports.getInterfaceVersion = function (pkgJson) {
2812
+ var versionRegex = new RegExp("\\d+.\\d+.\\d+");
2813
+ var version;
2814
+ if (pkgJson) {
2815
+ version = pkgJson["version"];
2816
+ }
2817
+ if (!version && !versionRegex.test(version)) {
2818
+ throw new Error("Invalid Interface Version...!");
2819
+ }
2820
+ return version;
2821
+ };
2822
+
2823
+
2824
+ /***/ }),
2825
+
2826
+ /***/ "./node_modules/@microchip/scf-interface/lib/index.js":
2827
+ /*!************************************************************!*\
2828
+ !*** ./node_modules/@microchip/scf-interface/lib/index.js ***!
2829
+ \************************************************************/
2830
+ /*! no static exports found */
2831
+ /***/ (function(module, exports, __webpack_require__) {
2832
+
2833
+ "use strict";
2834
+
2835
+ Object.defineProperty(exports, "__esModule", { value: true });
2836
+ var c_function_types_1 = __webpack_require__(/*! ./c-function-types */ "./node_modules/@microchip/scf-interface/lib/c-function-types.js");
2837
+ exports.buildSimpleApi = c_function_types_1.buildSimpleApi;
2838
+ var helpers_1 = __webpack_require__(/*! ./helpers */ "./node_modules/@microchip/scf-interface/lib/helpers.js");
2839
+ exports.getInterfaceName = helpers_1.getInterfaceName;
2840
+ exports.getInterfaceVersion = helpers_1.getInterfaceVersion;
2841
+
2842
+
2843
+ /***/ }),
2844
+
2845
+ /***/ "./src/Constants.ts":
2846
+ /*!**************************!*\
2847
+ !*** ./src/Constants.ts ***!
2848
+ \**************************/
2849
+ /*! exports provided: InterruptComponentNames, EdgeSettings, EXTINT_NAME, MACROS_NO_PRIORITY, MACROS_WITH_PRIORITY */
2850
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2851
+
2852
+ "use strict";
2853
+ __webpack_require__.r(__webpack_exports__);
2854
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterruptComponentNames", function() { return InterruptComponentNames; });
2855
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EdgeSettings", function() { return EdgeSettings; });
2856
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EXTINT_NAME", function() { return EXTINT_NAME; });
2857
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MACROS_NO_PRIORITY", function() { return MACROS_NO_PRIORITY; });
2858
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MACROS_WITH_PRIORITY", function() { return MACROS_WITH_PRIORITY; });
2859
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2860
+
2861
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2862
+
2863
+ var InterruptComponentNames = function InterruptComponentNames() {
2864
+ _classCallCheck(this, InterruptComponentNames);
2865
+ };
2866
+
2867
+ _defineProperty(InterruptComponentNames, "interruptEnables", {
2868
+ INTI: "inteIntcon",
2869
+ INT0I: "int0iePie0",
2870
+ INT1I: "int1iePie0",
2871
+ INT2I: "int2iePie0",
2872
+ INT3I: "int3iePie0"
2873
+ });
2874
+
2875
+ _defineProperty(InterruptComponentNames, "interruptEdges", {
2876
+ INTI: "intedgOptionReg",
2877
+ INT0I: "intedg0Intcon",
2878
+ INT1I: "intedg1Intcon",
2879
+ INT2I: "intedg2Intcon",
2880
+ INT3I: "intedg3Intcon"
2881
+ });
2882
+
2883
+ var EdgeSettings = function EdgeSettings() {
2884
+ _classCallCheck(this, EdgeSettings);
2885
+ };
2886
+
2887
+ _defineProperty(EdgeSettings, "edgeRegisterName", "OPTION_REG");
2888
+
2889
+ _defineProperty(EdgeSettings, "edgeSettingAlias", {
2890
+ INTI: "INTEDG",
2891
+ INT0I: "INTEDG0",
2892
+ INT1I: "INTEDG1",
2893
+ INT2I: "INTEDG2",
2894
+ INT3I: "INTEDG3"
2895
+ });
2896
+
2897
+ var EXTINT_NAME = "EXT_INT";
2898
+ var MACROS_NO_PRIORITY = {
2899
+ GIE_status: "INTERRUPT_GlobalInterruptStatus()",
2900
+ GIE_enable: "INTERRUPT_GlobalInterruptEnable()",
2901
+ GIE_disable: "INTERRUPT_GlobalInterruptDisable()"
2902
+ };
2903
+ var MACROS_WITH_PRIORITY = {
2904
+ GIE_status: {
2905
+ GIEH_status: "INTERRUPT_GlobalInterruptHighStatus()",
2906
+ GIEL_status: "INTERRUPT_GlobalInterruptLowStatus()"
2907
+ },
2908
+ GIE_enable: {
2909
+ GIEH_enable: "INTERRUPT_GlobalInterruptHighEnable()",
2910
+ GIEL_enable: "INTERRUPT_GlobalInterruptLowEnable()"
2911
+ },
2912
+ GIE_disable: {
2913
+ GIEH_disable: "INTERRUPT_GlobalInterruptHighDisable()",
2914
+ GIEL_disable: "INTERRUPT_GlobalInterruptLowDisable()"
2915
+ }
2916
+ };
2917
+
2918
+ /***/ }),
2919
+
2920
+ /***/ "./src/CreatorFunctions.ts":
2921
+ /*!*********************************!*\
2922
+ !*** ./src/CreatorFunctions.ts ***!
2923
+ \*********************************/
2924
+ /*! exports provided: getCreatorFunctions */
2925
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2926
+
2927
+ "use strict";
2928
+ __webpack_require__.r(__webpack_exports__);
2929
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return getCreatorFunctions; });
2930
+ var getCreatorFunctions = function getCreatorFunctions() {
2931
+ return {
2932
+ shouldImport: shouldImport,
2933
+ getCreatorImportArgs: getCreatorImportArgs
2934
+ };
2935
+ };
2936
+
2937
+ var shouldImport = function shouldImport(importKey, state) {
2938
+ return true;
2939
+ };
2940
+
2941
+ var getCreatorImportArgs = function getCreatorImportArgs(importKey, state) {
2942
+ return undefined;
2943
+ };
2944
+
2945
+ /***/ }),
2946
+
2947
+ /***/ "./src/DerivedData.ts":
2948
+ /*!****************************!*\
2949
+ !*** ./src/DerivedData.ts ***!
2950
+ \****************************/
2951
+ /*! exports provided: getDerivedData */
2952
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2953
+
2954
+ "use strict";
2955
+ __webpack_require__.r(__webpack_exports__);
2956
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDerivedData", function() { return getDerivedData; });
2957
+ /* harmony import */ var _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @microchip/scf-common/lib/Processor */ "./node_modules/@microchip/scf-common/lib/Processor.js");
2958
+ /* harmony import */ var _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__);
2959
+ /* harmony import */ var _microchip_interrupt_standard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @microchip/interrupt-standard */ "./node_modules/@microchip/interrupt-standard/lib/src/index.js");
2960
+ /* harmony import */ var _microchip_interrupt_standard__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_microchip_interrupt_standard__WEBPACK_IMPORTED_MODULE_1__);
2961
+ /* harmony import */ var _generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../generated_module/src/Utils */ "./generated_module/src/Utils.ts");
2962
+ /* harmony import */ var _GeneratorModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GeneratorModel */ "./src/GeneratorModel.tsx");
2963
+ /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Constants */ "./src/Constants.ts");
2964
+ /* harmony import */ var _microchip_initializer_system__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @microchip/initializer-system */ "./node_modules/@microchip/initializer-system/lib/src/index.js");
2965
+ /* harmony import */ var _microchip_initializer_system__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_microchip_initializer_system__WEBPACK_IMPORTED_MODULE_5__);
2966
+ /* harmony import */ var _microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @microchip/scf-device/lib/util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
2967
+ /* harmony import */ var _microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_6__);
2968
+ /* harmony import */ var _microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @microchip/interrupt-manager-generic */ "./node_modules/@microchip/interrupt-manager-generic/lib/index.js");
2969
+ /* harmony import */ var _microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7__);
2970
+ /* harmony import */ var _microchip_scf_automodule_impl_lib_interrupts_InterruptActions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @microchip/scf-automodule-impl/lib/interrupts/InterruptActions */ "./node_modules/@microchip/scf-automodule-impl/lib/interrupts/InterruptActions.js");
2971
+ /* harmony import */ var _microchip_scf_automodule_impl_lib_interrupts_InterruptActions__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_automodule_impl_lib_interrupts_InterruptActions__WEBPACK_IMPORTED_MODULE_8__);
2972
+ /* harmony import */ var _table_data_NoPrioTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./table_data/NoPrioTable */ "./src/table_data/NoPrioTable.ts");
2973
+ /* harmony import */ var _microchip_scf_automodule_impl_lib_tables_tables__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @microchip/scf-automodule-impl/lib/tables/tables */ "./node_modules/@microchip/scf-automodule-impl/lib/tables/tables.js");
2974
+ /* harmony import */ var _microchip_scf_automodule_impl_lib_tables_tables__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_automodule_impl_lib_tables_tables__WEBPACK_IMPORTED_MODULE_10__);
2975
+ /* harmony import */ var _generated_module_src_pins_PCPHelper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../generated_module/src/pins/PCPHelper */ "./generated_module/src/pins/PCPHelper.ts");
2976
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2977
+
2978
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2979
+
2980
+ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2981
+
2982
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2983
+
2984
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2985
+
2986
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2987
+
2988
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2989
+
2990
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
2991
+
2992
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2993
+
2994
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2995
+
2996
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2997
+
2998
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2999
+
3000
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3001
+
3002
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3003
+
3004
+
3005
+
3006
+
3007
+
3008
+
3009
+
3010
+
3011
+
3012
+
3013
+
3014
+
3015
+
3016
+
3017
+ var getDerivedData = function getDerivedData(dataModel) {
3018
+ if (dataModel) {
3019
+ return new MyDerivedData(dataModel);
3020
+ }
3021
+
3022
+ return new EmptyDerivedData();
3023
+ };
3024
+
3025
+ var EmptyDerivedData = function EmptyDerivedData() {
3026
+ _classCallCheck(this, EmptyDerivedData);
3027
+
3028
+ _defineProperty(this, "getMyFunctions", function () {
3029
+ return {};
3030
+ });
3031
+
3032
+ _defineProperty(this, "getModel", function () {
3033
+ return undefined;
3034
+ });
3035
+ };
3036
+
3037
+ var MyDerivedData = function MyDerivedData(dataModel) {
3038
+ var _this = this,
3039
+ _this$getModel$getSta5,
3040
+ _this$getModel$getSta6,
3041
+ _this$getModel$getSta7,
3042
+ _this$getModel$getSta8;
3043
+
3044
+ _classCallCheck(this, MyDerivedData);
3045
+
3046
+ _defineProperty(this, "dataModel", void 0);
3047
+
3048
+ _defineProperty(this, "templateData", void 0);
3049
+
3050
+ _defineProperty(this, "hasPriority", false);
3051
+
3052
+ _defineProperty(this, "interruptStoreState", []);
3053
+
3054
+ _defineProperty(this, "noPrioInterruptHelper", void 0);
3055
+
3056
+ _defineProperty(this, "getMyFunctions", function () {
3057
+ return {
3058
+ templateData: _this.getMyTemplateData,
3059
+ moduleName: _this.getModuleName,
3060
+ alerts: _this.getMyAlerts,
3061
+ isVisible: _this.isVisible,
3062
+ "interrupt-standard_payload": _this.getGeneralPayload,
3063
+ "interrupt-standard_payloads": _this.interrupt_standard_payloads,
3064
+ initializer_system_results: _this.initializer_system_results,
3065
+ initializer_main_results: _this.initializer_main_results,
3066
+ pin_standard_args: _this.pin_standard_args,
3067
+ isInterruptListNotEmpty: function isInterruptListNotEmpty() {
3068
+ return true;
3069
+ },
3070
+ isPriorityEnabled: function isPriorityEnabled() {
3071
+ return _this.getModel().isComponentValue("ipenIntcon");
3072
+ },
3073
+ isPriorityDisabled: function isPriorityDisabled() {
3074
+ return !_this.getModel().isComponentValue("ipenIntcon");
3075
+ },
3076
+ intePie0: function intePie0() {
3077
+ return _this.getBooleanValue(_this.getModel().isComponentValue("inti"));
3078
+ },
3079
+ int0iePie0: function int0iePie0() {
3080
+ return _this.getBooleanValue(_this.getModel().isComponentValue("int0i"));
3081
+ },
3082
+ int1iePie0: function int1iePie0() {
3083
+ return _this.getBooleanValue(_this.getModel().isComponentValue("int1i"));
3084
+ },
3085
+ int2iePie0: function int2iePie0() {
3086
+ return _this.getBooleanValue(_this.getModel().isComponentValue("int2i"));
3087
+ },
3088
+ int3iePie0: function int3iePie0() {
3089
+ return _this.getBooleanValue(_this.getModel().isComponentValue("int3i"));
3090
+ },
3091
+ noPriorityTable: _this.getNoPriorityTable,
3092
+ interruptStore: _this.getInterruptStore,
3093
+ noPrioTableVisible: _this.isNoPrioTableVisible,
3094
+ prioNonVectTableVisible: _this.isPrioNonVectTableVisible,
3095
+ isHidden: function isHidden() {
3096
+ return false;
3097
+ },
3098
+ getPinsLogic: _generated_module_src_pins_PCPHelper__WEBPACK_IMPORTED_MODULE_11__["getPinsLogic"],
3099
+ importName: _this.friendlyImportName
3100
+ };
3101
+ });
3102
+
3103
+ _defineProperty(this, "friendlyImportName", function (importKey) {
3104
+ if (importKey === "scf_pic8_interrupt_v3") return "INTERRUPT Hardware";
3105
+ if (importKey === "initializer_system") return "system.c Initialize()";
3106
+ if (importKey === "initializer_main") return "main.c Initialize()";
3107
+ if (importKey === "pin_standard") return "Pins";
3108
+ return importKey;
3109
+ });
3110
+
3111
+ _defineProperty(this, "getModel", function () {
3112
+ return _this.dataModel;
3113
+ });
3114
+
3115
+ _defineProperty(this, "getNoPrioInterruptHelper", function () {
3116
+ if (_this.noPrioInterruptHelper == undefined && _this.isNoPrioTableVisible()) {
3117
+ _this.noPrioInterruptHelper = new _microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7__["InterruptManagerHelper"](Object(_table_data_NoPrioTable__WEBPACK_IMPORTED_MODULE_9__["getNoPrioDefData"])(_this.getModel()), _this.getModel().getState());
3118
+
3119
+ _this.mapNoPrioInterruptData(_this.noPrioInterruptHelper);
3120
+
3121
+ _this.setNonVectorTableOrder(_this.noPrioInterruptHelper, "noPriorityTable");
3122
+ }
3123
+
3124
+ return _this.noPrioInterruptHelper;
3125
+ });
3126
+
3127
+ _defineProperty(this, "mapNoPrioInterruptData", function (interruptHelper) {
3128
+ var _this$getModel$getInt;
3129
+
3130
+ var interrupts = (_this$getModel$getInt = _this.getModel().getInterrupts()) !== null && _this$getModel$getInt !== void 0 ? _this$getModel$getInt : {};
3131
+ Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["map"])(_this.getInterruptResults(), function (key, value) {
3132
+ if (value) {
3133
+ var _value$interruptList;
3134
+
3135
+ interruptHelper.dataMap(key, (_value$interruptList = value.interruptList) !== null && _value$interruptList !== void 0 ? _value$interruptList : [], function (hookData) {
3136
+ return "".concat(Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_6__["find"])(Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["getKeys"])(interrupts), function (key) {
3137
+ var _interrupts$key, _interrupts$key2;
3138
+
3139
+ return ((_interrupts$key = interrupts[key]) === null || _interrupts$key === void 0 ? void 0 : _interrupts$key.name) === hookData.name && ((_interrupts$key2 = interrupts[key]) === null || _interrupts$key2 === void 0 ? void 0 : _interrupts$key2.module) === hookData.module;
3140
+ }), "-").concat(key);
3141
+ }, function (hookData, rowId) {
3142
+ var _value$moduleName, _value$interruptActio, _value$interruptActio2, _value$interruptActio3;
3143
+
3144
+ return {
3145
+ interruptName: {
3146
+ value: hookData.name
3147
+ },
3148
+ module: {
3149
+ value: (_value$moduleName = value.moduleName) !== null && _value$moduleName !== void 0 ? _value$moduleName : hookData.module
3150
+ },
3151
+ enable: {
3152
+ value: hookData.isEnabled,
3153
+ actions: (_value$interruptActio = value.interruptActions) === null || _value$interruptActio === void 0 ? void 0 : (_value$interruptActio2 = _value$interruptActio[hookData.name]) === null || _value$interruptActio2 === void 0 ? void 0 : (_value$interruptActio3 = _value$interruptActio2.isEnabled) === null || _value$interruptActio3 === void 0 ? void 0 : _value$interruptActio3.filter(function (action) {
3154
+ return action.validFor !== hookData.isEnabled;
3155
+ }).map(function (action) {
3156
+ return {
3157
+ "for": action.validFor,
3158
+ action: action.action
3159
+ };
3160
+ })
3161
+ }
3162
+ };
3163
+ }, function (hookData, rowId) {
3164
+ var _interrupts, _rowId$split$, _rowId$split;
3165
+
3166
+ return _objectSpread(_objectSpread({}, hookData), (_interrupts = interrupts[(_rowId$split$ = rowId === null || rowId === void 0 ? void 0 : (_rowId$split = rowId.split("-")) === null || _rowId$split === void 0 ? void 0 : _rowId$split[0]) !== null && _rowId$split$ !== void 0 ? _rowId$split$ : ""]) !== null && _interrupts !== void 0 ? _interrupts : {});
3167
+ });
3168
+ }
3169
+ });
3170
+ });
3171
+
3172
+ _defineProperty(this, "setNonVectorTableOrder", function (interruptHelper, tableComponentName) {
3173
+ var _this$getModel$getSta, _this$getModel$getSta2, _this$getModel$getSta3, _this$getModel$getSta4;
3174
+
3175
+ var tableState = (_this$getModel$getSta = (_this$getModel$getSta2 = _this.getModel().getState()) === null || _this$getModel$getSta2 === void 0 ? void 0 : (_this$getModel$getSta3 = _this$getModel$getSta2.main) === null || _this$getModel$getSta3 === void 0 ? void 0 : (_this$getModel$getSta4 = _this$getModel$getSta3.interruptTable) === null || _this$getModel$getSta4 === void 0 ? void 0 : _this$getModel$getSta4[tableComponentName]) !== null && _this$getModel$getSta !== void 0 ? _this$getModel$getSta : [];
3176
+ interruptHelper.setOrder(function (rowIds) {
3177
+ var uids = rowIds.map(function (rowUid, i) {
3178
+ var _find$rowId, _find;
3179
+
3180
+ return {
3181
+ rowUid: rowUid,
3182
+ index: (_find$rowId = (_find = Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_6__["find"])(tableState, function (row) {
3183
+ return row.uid === rowUid;
3184
+ })) === null || _find === void 0 ? void 0 : _find.rowId) !== null && _find$rowId !== void 0 ? _find$rowId : i
3185
+ };
3186
+ });
3187
+ return uids.sort(function (row1, row2) {
3188
+ return row1.index - row2.index;
3189
+ }).map(function (row) {
3190
+ return row.rowUid;
3191
+ });
3192
+ });
3193
+ });
3194
+
3195
+ _defineProperty(this, "getInterruptResults", function () {
3196
+ var _this$dataModel$getEx, _this$dataModel, _this$dataModel$getEx2, _this$dataModel$getEx3;
3197
+
3198
+ var results = (_this$dataModel$getEx = (_this$dataModel = _this.dataModel) === null || _this$dataModel === void 0 ? void 0 : (_this$dataModel$getEx2 = _this$dataModel.getExportInterfaces()) === null || _this$dataModel$getEx2 === void 0 ? void 0 : (_this$dataModel$getEx3 = _this$dataModel$getEx2.getInterface("interrupt", _microchip_interrupt_standard__WEBPACK_IMPORTED_MODULE_1__["Interface"].getInterfaceId())) === null || _this$dataModel$getEx3 === void 0 ? void 0 : _this$dataModel$getEx3.results) !== null && _this$dataModel$getEx !== void 0 ? _this$dataModel$getEx : {};
3199
+ results = _objectSpread(_objectSpread(_objectSpread({}, _this.getExtInterruptResults()), _this.getSystemInterruptsResults()), results);
3200
+ return results;
3201
+ });
3202
+
3203
+ _defineProperty(this, "getSystemInterruptsResults", function () {
3204
+ var _externalInterrupts$i, _iocInterrupts$interr, _externalInterrupts$i2, _iocInterrupts$interr2;
3205
+
3206
+ var externalInterrupts = _this.getExtInterruptResults()[_microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7__["NoMetaModule"]];
3207
+
3208
+ var iocInterrupts = _this.getIOCResults()[_microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7__["NoMetaModule"]];
3209
+
3210
+ return _defineProperty({}, _microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7__["NoMetaModule"], {
3211
+ interruptList: [].concat(_toConsumableArray((_externalInterrupts$i = externalInterrupts.interruptList) !== null && _externalInterrupts$i !== void 0 ? _externalInterrupts$i : []), _toConsumableArray((_iocInterrupts$interr = iocInterrupts.interruptList) !== null && _iocInterrupts$interr !== void 0 ? _iocInterrupts$interr : [])),
3212
+ interruptActions: _objectSpread(_objectSpread({}, (_externalInterrupts$i2 = externalInterrupts.interruptActions) !== null && _externalInterrupts$i2 !== void 0 ? _externalInterrupts$i2 : {}), (_iocInterrupts$interr2 = iocInterrupts.interruptActions) !== null && _iocInterrupts$interr2 !== void 0 ? _iocInterrupts$interr2 : {})
3213
+ });
3214
+ });
3215
+
3216
+ _defineProperty(this, "getIOCResults", function () {
3217
+ var _this$getModel$getInt2, _this$getModel;
3218
+
3219
+ var interrupts = [];
3220
+ var actions = {};
3221
+ Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["map"])((_this$getModel$getInt2 = (_this$getModel = _this.getModel()) === null || _this$getModel === void 0 ? void 0 : _this$getModel.getInterrupts()) !== null && _this$getModel$getInt2 !== void 0 ? _this$getModel$getInt2 : {}, function (id, interrupt) {
3222
+ var _ref2, _find2;
3223
+
3224
+ if (interrupt == undefined) return;
3225
+ if (interrupt.module !== "PIN_MANAGER") return;
3226
+
3227
+ var isEnabled = _this.getModel().isComponentValue("ioci");
3228
+
3229
+ interrupts.push({
3230
+ name: interrupt.name,
3231
+ module: "PIN_MANAGER",
3232
+ isEnabled: isEnabled,
3233
+ generateISR: isEnabled,
3234
+ isrCallback: {
3235
+ name: "PIN_MANAGER_IOC",
3236
+ header: {
3237
+ name: "pins.h",
3238
+ path: "system/"
3239
+ }
3240
+ },
3241
+ isHighPriority: (_ref2 = (_find2 = Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_6__["find"])(_this.interruptStoreState, function (_int) {
3242
+ return _int.uid === "".concat(id, "-").concat(_microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7__["NoMetaModule"]);
3243
+ })) === null || _find2 === void 0 ? void 0 : _find2.isHighPriority) !== null && _ref2 !== void 0 ? _ref2 : true
3244
+ });
3245
+ var isEnabledActions = _microchip_scf_automodule_impl_lib_interrupts_InterruptActions__WEBPACK_IMPORTED_MODULE_8__["InterruptActionsBuilder"].createActionBuilder(_this.getModel()).createActionFor("ioci").addActionIfEnabled(true).addActionIfDisabled(false).buildActions();
3246
+ actions = _objectSpread(_objectSpread({}, actions), {}, _defineProperty({}, interrupt.name, {
3247
+ isEnabled: isEnabledActions
3248
+ }));
3249
+ });
3250
+ return _defineProperty({}, _microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7__["NoMetaModule"], {
3251
+ interruptList: interrupts,
3252
+ interruptActions: actions
3253
+ });
3254
+ });
3255
+
3256
+ _defineProperty(this, "getExtInterruptResults", function () {
3257
+ var _this$getModel$getInt3, _this$getModel2;
3258
+
3259
+ var interrupts = [];
3260
+ var actions = {};
3261
+ Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["map"])((_this$getModel$getInt3 = (_this$getModel2 = _this.getModel()) === null || _this$getModel2 === void 0 ? void 0 : _this$getModel2.getInterrupts()) !== null && _this$getModel$getInt3 !== void 0 ? _this$getModel$getInt3 : {}, function (id, interrupt) {
3262
+ var _interrupt$name$toLow, _this$getModel3, _this$getModel3$getCo, _ref4, _find3;
3263
+
3264
+ if (interrupt == undefined) return;
3265
+ if (interrupt.module !== "EXT_INT") return;
3266
+ var componentName = (_interrupt$name$toLow = interrupt.name.toLowerCase()) !== null && _interrupt$name$toLow !== void 0 ? _interrupt$name$toLow : "";
3267
+ var isEnabled = (_this$getModel3 = _this.getModel()) === null || _this$getModel3 === void 0 ? void 0 : (_this$getModel3$getCo = _this$getModel3.getComponentValue) === null || _this$getModel3$getCo === void 0 ? void 0 : _this$getModel3$getCo.call(_this$getModel3, componentName);
3268
+ interrupts.push({
3269
+ name: interrupt.name,
3270
+ module: _Constants__WEBPACK_IMPORTED_MODULE_4__["EXTINT_NAME"],
3271
+ isEnabled: isEnabled,
3272
+ isrCallback: {
3273
+ name: "".concat(interrupt.name.replace(/I$/, ""), "_ISR"),
3274
+ header: Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getHeaderFiles"])()[0]
3275
+ },
3276
+ generateISR: isEnabled,
3277
+ isHighPriority: (_ref4 = (_find3 = Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_6__["find"])(_this.interruptStoreState, function (_int2) {
3278
+ return _int2.uid === "".concat(id, "-").concat(_microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7__["NoMetaModule"]);
3279
+ })) === null || _find3 === void 0 ? void 0 : _find3.isHighPriority) !== null && _ref4 !== void 0 ? _ref4 : true
3280
+ });
3281
+ var isEnabledActions = _microchip_scf_automodule_impl_lib_interrupts_InterruptActions__WEBPACK_IMPORTED_MODULE_8__["InterruptActionsBuilder"].createActionBuilder(_this.getModel()).createActionFor(componentName).addActionIfEnabled(true).addActionIfDisabled(false).buildActions();
3282
+ actions = _objectSpread(_objectSpread({}, actions), {}, _defineProperty({}, interrupt.name, {
3283
+ isEnabled: isEnabledActions
3284
+ }));
3285
+ });
3286
+ return _defineProperty({}, _microchip_interrupt_manager_generic__WEBPACK_IMPORTED_MODULE_7__["NoMetaModule"], {
3287
+ interruptList: interrupts,
3288
+ interruptActions: actions
3289
+ });
3290
+ });
3291
+
3292
+ _defineProperty(this, "getInterruptStandardRequests", function () {
3293
+ var _this$dataModel$getEx4, _this$dataModel2, _this$dataModel2$getE, _this$dataModel2$getE2;
3294
+
3295
+ return (_this$dataModel$getEx4 = (_this$dataModel2 = _this.dataModel) === null || _this$dataModel2 === void 0 ? void 0 : (_this$dataModel2$getE = _this$dataModel2.getExportInterfaces()) === null || _this$dataModel2$getE === void 0 ? void 0 : (_this$dataModel2$getE2 = _this$dataModel2$getE.getInterface("interrupt", _microchip_interrupt_standard__WEBPACK_IMPORTED_MODULE_1__["Interface"].getInterfaceId())) === null || _this$dataModel2$getE2 === void 0 ? void 0 : _this$dataModel2$getE2.args) !== null && _this$dataModel$getEx4 !== void 0 ? _this$dataModel$getEx4 : {};
3296
+ });
3297
+
3298
+ _defineProperty(this, "interrupt_standard_payloads", function () {
3299
+ var _processedState, _this$getInterruptSta;
3300
+
3301
+ var addressedPayload = {};
3302
+ var processedState = {};
3303
+
3304
+ _this.interruptStoreState.forEach(function (rowData) {
3305
+ var _rowData$uid, _processedState$modul;
3306
+
3307
+ var uid = (_rowData$uid = rowData === null || rowData === void 0 ? void 0 : rowData["uid"]) !== null && _rowData$uid !== void 0 ? _rowData$uid : "";
3308
+
3309
+ var _uid$split = uid.split("-"),
3310
+ _uid$split2 = _slicedToArray(_uid$split, 2),
3311
+ moduleId = _uid$split2[1];
3312
+
3313
+ processedState = _objectSpread(_objectSpread({}, processedState), {}, _defineProperty({}, moduleId, _objectSpread(_objectSpread({}, (_processedState$modul = processedState[moduleId]) !== null && _processedState$modul !== void 0 ? _processedState$modul : {}), {}, _defineProperty({}, uid, Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_6__["find"])(_this.interruptStoreState, function (_int3) {
3314
+ return _int3.uid === uid;
3315
+ })))));
3316
+ });
3317
+
3318
+ Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["map"])((_processedState = processedState) !== null && _processedState !== void 0 ? _processedState : {}, function (scriptId, value) {
3319
+ if (addressedPayload[scriptId]) {
3320
+ addressedPayload[scriptId] = _objectSpread({}, addressedPayload[scriptId]);
3321
+ } else {
3322
+ addressedPayload[scriptId] = _objectSpread({}, _this.getGeneralPayload());
3323
+ }
3324
+ });
3325
+ Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["map"])((_this$getInterruptSta = _this.getInterruptStandardRequests()) !== null && _this$getInterruptSta !== void 0 ? _this$getInterruptSta : {}, function (scriptId, value) {
3326
+ if (addressedPayload[scriptId]) {
3327
+ addressedPayload[scriptId] = _objectSpread(_objectSpread({}, addressedPayload[scriptId]), _this.getRequestsPayloadFor(value));
3328
+ } else {
3329
+ addressedPayload[scriptId] = _objectSpread(_objectSpread({}, _this.getGeneralPayload()), _this.getRequestsPayloadFor(value));
3330
+ }
3331
+ });
3332
+ return addressedPayload;
3333
+ });
3334
+
3335
+ _defineProperty(this, "getGeneralPayload", function () {
3336
+ return {
3337
+ isVectoredInterrupt: false,
3338
+ hasPriority: false
3339
+ };
3340
+ });
3341
+
3342
+ _defineProperty(this, "getRequestsPayloadFor", function (requests) {
3343
+ var requestsPayload = {};
3344
+ if (!requests) return {};
3345
+ requests.forEach(function (request) {
3346
+ switch (request.requestFor) {
3347
+ case "interruptDataList":
3348
+ {
3349
+ var _this$getModel$getInt4;
3350
+
3351
+ var interrupts = Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["values"])((_this$getModel$getInt4 = _this.getModel().getInterrupts()) !== null && _this$getModel$getInt4 !== void 0 ? _this$getModel$getInt4 : {});
3352
+
3353
+ if (request.data.mode === "both") {
3354
+ null;
3355
+ } else if (request.data.mode === "active") {
3356
+ interrupts = [];
3357
+ } else if (request.data.mode === "inactive") {
3358
+ interrupts = [];
3359
+ } else {
3360
+ break;
3361
+ }
3362
+
3363
+ if (request.data.moduleName === "all") {
3364
+ var _requestsPayload$requ;
3365
+
3366
+ requestsPayload = _objectSpread(_objectSpread({}, requestsPayload), {}, _defineProperty({}, request.requestFor, ((_requestsPayload$requ = requestsPayload[request.requestFor]) !== null && _requestsPayload$requ !== void 0 ? _requestsPayload$requ : []).concat(interrupts)));
3367
+ } else if (Array.isArray(request.data.moduleName)) {
3368
+ var _requestsPayload$requ2;
3369
+
3370
+ requestsPayload = _objectSpread(_objectSpread({}, requestsPayload), {}, _defineProperty({}, request.requestFor, ((_requestsPayload$requ2 = requestsPayload[request.requestFor]) !== null && _requestsPayload$requ2 !== void 0 ? _requestsPayload$requ2 : []).concat(interrupts.filter(function (interrupt) {
3371
+ return request.data.moduleName.indexOf(interrupt === null || interrupt === void 0 ? void 0 : interrupt.module) >= 0;
3372
+ }))));
3373
+ } else {
3374
+ var _requestsPayload$requ3;
3375
+
3376
+ requestsPayload = _objectSpread(_objectSpread({}, requestsPayload), {}, _defineProperty({}, request.requestFor, ((_requestsPayload$requ3 = requestsPayload[request.requestFor]) !== null && _requestsPayload$requ3 !== void 0 ? _requestsPayload$requ3 : []).concat(interrupts.filter(function (interrupt) {
3377
+ return request.data.moduleName === (interrupt === null || interrupt === void 0 ? void 0 : interrupt.module);
3378
+ }))));
3379
+ }
3380
+
3381
+ break;
3382
+ }
3383
+
3384
+ case "interruptIdList":
3385
+ {
3386
+ var _interrupts2 = _this.getModel().getInterrupts();
3387
+
3388
+ var interruptIds = Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["getKeys"])(_interrupts2 !== null && _interrupts2 !== void 0 ? _interrupts2 : {});
3389
+
3390
+ if (request.data.mode === "both") {
3391
+ null;
3392
+ } else if (request.data.mode === "active") {
3393
+ interruptIds = [];
3394
+ } else if (request.data.mode === "inactive") {
3395
+ interruptIds = [];
3396
+ } else {
3397
+ break;
3398
+ }
3399
+
3400
+ if (request.data.moduleName === "all") {
3401
+ var _requestsPayload$requ4;
3402
+
3403
+ requestsPayload = _objectSpread(_objectSpread({}, requestsPayload), {}, _defineProperty({}, request.requestFor, ((_requestsPayload$requ4 = requestsPayload[request.requestFor]) !== null && _requestsPayload$requ4 !== void 0 ? _requestsPayload$requ4 : []).concat(interruptIds)));
3404
+ } else if (Array.isArray(request.data.moduleName)) {
3405
+ var _requestsPayload$requ5;
3406
+
3407
+ requestsPayload = _objectSpread(_objectSpread({}, requestsPayload), {}, _defineProperty({}, request.requestFor, ((_requestsPayload$requ5 = requestsPayload[request.requestFor]) !== null && _requestsPayload$requ5 !== void 0 ? _requestsPayload$requ5 : []).concat(interruptIds.filter(function (interruptId) {
3408
+ var _interrupts2$interrup, _interrupts2$interrup2;
3409
+
3410
+ return request.data.moduleName.indexOf((_interrupts2$interrup = _interrupts2 === null || _interrupts2 === void 0 ? void 0 : (_interrupts2$interrup2 = _interrupts2[interruptId]) === null || _interrupts2$interrup2 === void 0 ? void 0 : _interrupts2$interrup2.module) !== null && _interrupts2$interrup !== void 0 ? _interrupts2$interrup : "") >= 0;
3411
+ }))));
3412
+ } else {
3413
+ var _requestsPayload$requ6;
3414
+
3415
+ requestsPayload = _objectSpread(_objectSpread({}, requestsPayload), {}, _defineProperty({}, request.requestFor, ((_requestsPayload$requ6 = requestsPayload[request.requestFor]) !== null && _requestsPayload$requ6 !== void 0 ? _requestsPayload$requ6 : []).concat(interruptIds.filter(function (interruptId) {
3416
+ var _interrupts2$interrup3;
3417
+
3418
+ return request.data.moduleName === (_interrupts2 === null || _interrupts2 === void 0 ? void 0 : (_interrupts2$interrup3 = _interrupts2[interruptId]) === null || _interrupts2$interrup3 === void 0 ? void 0 : _interrupts2$interrup3.module);
3419
+ }))));
3420
+ }
3421
+
3422
+ break;
3423
+ }
3424
+
3425
+ case "componentValues":
3426
+ {
3427
+ requestsPayload = _objectSpread({}, requestsPayload);
3428
+ break;
3429
+ }
3430
+
3431
+ case "macros":
3432
+ {
3433
+ var _request$data$macroFi, _requestsPayload$requ7;
3434
+
3435
+ var macros = {};
3436
+ (_request$data$macroFi = request.data.macroFilter) === null || _request$data$macroFi === void 0 ? void 0 : _request$data$macroFi.forEach(function (macro) {
3437
+ macros = _objectSpread(_objectSpread({}, macros), {}, _defineProperty({}, macro, _Constants__WEBPACK_IMPORTED_MODULE_4__["MACROS_NO_PRIORITY"][macro !== null && macro !== void 0 ? macro : ""]));
3438
+ });
3439
+ requestsPayload = _objectSpread(_objectSpread({}, requestsPayload), {}, _defineProperty({}, request.requestFor, _objectSpread(_objectSpread({}, (_requestsPayload$requ7 = requestsPayload[request.requestFor]) !== null && _requestsPayload$requ7 !== void 0 ? _requestsPayload$requ7 : {}), macros)));
3440
+ break;
3441
+ }
3442
+
3443
+ default:
3444
+ null;
3445
+ }
3446
+ });
3447
+ return requestsPayload;
3448
+ });
3449
+
3450
+ _defineProperty(this, "getMyTemplateData", function () {
3451
+ if (_this.templateData == undefined) {
3452
+ var _this$getNoPrioInterr, _this$getNoPrioInterr2;
3453
+
3454
+ _this.templateData = Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getGeneratorModel"])(_this.getModel(), (_this$getNoPrioInterr = (_this$getNoPrioInterr2 = _this.getNoPrioInterruptHelper()) === null || _this$getNoPrioInterr2 === void 0 ? void 0 : _this$getNoPrioInterr2.getProcessedInterruptData("name", "enable", "flag", "module", "handlerName", "isEnabled", "isHighPriority", "isrCallback", "generateISR", "priority")) !== null && _this$getNoPrioInterr !== void 0 ? _this$getNoPrioInterr : []);
3455
+ }
3456
+
3457
+ return _this.templateData;
3458
+ });
3459
+
3460
+ _defineProperty(this, "getModuleName", function () {
3461
+ return "Interrupt Manager";
3462
+ });
3463
+
3464
+ _defineProperty(this, "getMyAlerts", function () {
3465
+ var _this$getModel$getImp, _this$getModel$getImp2, _this$getModel$getImp3, _this$getModel$getImp4, _this$getModel$getPer, _this$getModel4, _this$getModel4$getPe, _this$getNoPrioInterr3, _this$getNoPrioInterr4, _this$getNoPrioInterr5;
3466
+
3467
+ var alerts = [];
3468
+ var ppsData = (_this$getModel$getImp = (_this$getModel$getImp2 = _this.getModel().getImportValue("pin_standard")) === null || _this$getModel$getImp2 === void 0 ? void 0 : (_this$getModel$getImp3 = _this$getModel$getImp2["pps"]) === null || _this$getModel$getImp3 === void 0 ? void 0 : (_this$getModel$getImp4 = _this$getModel$getImp3["data"]) === null || _this$getModel$getImp4 === void 0 ? void 0 : _this$getModel$getImp4[(_this$getModel$getPer = (_this$getModel4 = _this.getModel()) === null || _this$getModel4 === void 0 ? void 0 : (_this$getModel4$getPe = _this$getModel4.getPeripheralDescription()) === null || _this$getModel4$getPe === void 0 ? void 0 : _this$getModel4$getPe.name) !== null && _this$getModel$getPer !== void 0 ? _this$getModel$getPer : ""]) !== null && _this$getModel$getImp !== void 0 ? _this$getModel$getImp : {};
3469
+
3470
+ if (_this.getModel().isComponentValue("inti") && ppsData["INT"] === "") {
3471
+ alerts.push({
3472
+ type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Hint,
3473
+ text: "Configure a pin for EXT_INT INT"
3474
+ });
3475
+ }
3476
+
3477
+ if (_this.getModel().isComponentValue("int0i") && ppsData["INT0"] === "") {
3478
+ alerts.push({
3479
+ type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Hint,
3480
+ text: "Configure a pin for EXT_INT INT0"
3481
+ });
3482
+ }
3483
+
3484
+ if (_this.getModel().isComponentValue("int1i") && ppsData["INT1"] === "") {
3485
+ alerts.push({
3486
+ type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Hint,
3487
+ text: "Configure a pin for EXT_INT INT1"
3488
+ });
3489
+ }
3490
+
3491
+ if (_this.getModel().isComponentValue("int2i") && ppsData["INT2"] === "") {
3492
+ alerts.push({
3493
+ type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Hint,
3494
+ text: "Configure a pin for EXT_INT INT2"
3495
+ });
3496
+ }
3497
+
3498
+ if (_this.getModel().isComponentValue("int3i") && ppsData["INT3"] === "") {
3499
+ alerts.push({
3500
+ type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Hint,
3501
+ text: "Configure a pin for EXT_INT INT3"
3502
+ });
3503
+ }
3504
+
3505
+ var noPrioData = (_this$getNoPrioInterr3 = (_this$getNoPrioInterr4 = _this.getNoPrioInterruptHelper()) === null || _this$getNoPrioInterr4 === void 0 ? void 0 : (_this$getNoPrioInterr5 = _this$getNoPrioInterr4.getProcessedInterruptData("isEnabled", "module")) === null || _this$getNoPrioInterr5 === void 0 ? void 0 : _this$getNoPrioInterr5.filter(function (data) {
3506
+ return data.isEnabled;
3507
+ })) !== null && _this$getNoPrioInterr3 !== void 0 ? _this$getNoPrioInterr3 : [];
3508
+
3509
+ if (noPrioData.length > 0) {
3510
+ var _this$getModel$getReg, _this$getModel$getReg2, _this$getModel$getReg3;
3511
+
3512
+ alerts.push({
3513
+ type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Hint,
3514
+ text: "Interrupts are enabled, enable Global Interrupt in your embedded application to make interrupts work."
3515
+ });
3516
+
3517
+ if (noPrioData.filter(function (data) {
3518
+ return data.module !== _Constants__WEBPACK_IMPORTED_MODULE_4__["EXTINT_NAME"] && data.module !== "PIN_MANAGER";
3519
+ }).length > 0 && ((_this$getModel$getReg = _this.getModel().getRegisterValues()) === null || _this$getModel$getReg === void 0 ? void 0 : (_this$getModel$getReg2 = _this$getModel$getReg["INTCON"]) === null || _this$getModel$getReg2 === void 0 ? void 0 : (_this$getModel$getReg3 = _this$getModel$getReg2.settings) === null || _this$getModel$getReg3 === void 0 ? void 0 : _this$getModel$getReg3.PEIE) != undefined) {
3520
+ alerts.push({
3521
+ type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Hint,
3522
+ text: "Peripheral Interrupts are enabled, enable Peripheral Interrupt in your embedded application to make peripheral interrupts work."
3523
+ });
3524
+ }
3525
+ }
3526
+
3527
+ return alerts;
3528
+ });
3529
+
3530
+ _defineProperty(this, "isVisible", function (componentName) {
3531
+ var _this$getModel$getInt5;
3532
+
3533
+ switch (componentName) {
3534
+ case "inti":
3535
+ return ((_this$getModel$getInt5 = _this.getModel().getInterrupts()) === null || _this$getModel$getInt5 === void 0 ? void 0 : _this$getModel$getInt5.EXT_INT_INTI) != undefined;
3536
+
3537
+ default:
3538
+ return undefined;
3539
+ }
3540
+ });
3541
+
3542
+ _defineProperty(this, "initializer_system_results", function () {
3543
+ return {
3544
+ initializer: {
3545
+ name: "INTERRUPT" + "_Initialize",
3546
+ header: Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getHeaderFiles"])()[0],
3547
+ priority: _microchip_initializer_system__WEBPACK_IMPORTED_MODULE_5__["INIT_PRIORITY"].END
3548
+ }
3549
+ };
3550
+ });
3551
+
3552
+ _defineProperty(this, "initializer_main_results", function () {
3553
+ var initSectionMessage = "// If using interrupts in PIC18 High/Low Priority Mode you need to enable the Global High and Low Interrupts \n" + " // If using interrupts in PIC Mid-Range Compatibility Mode you need to enable the Global and Peripheral Interrupts \n" + " // Use the following macros to: \n\n";
3554
+
3555
+ if (!_this.getModel().isComponentValue("ipenIntcon")) {
3556
+ initSectionMessage += " // Enable the Global Interrupts \n" + " //INTERRUPT_GlobalInterruptEnable(); \n\n" + " // Disable the Global Interrupts \n" + " //INTERRUPT_GlobalInterruptDisable(); \n\n" + " // Enable the Peripheral Interrupts \n" + " //INTERRUPT_PeripheralInterruptEnable(); \n\n" + " // Disable the Peripheral Interrupts \n" + " //INTERRUPT_PeripheralInterruptDisable(); \n";
3557
+ } else {
3558
+ initSectionMessage += " // Enable the Global High Interrupts \n" + " //INTERRUPT_GlobalInterruptHighEnable(); \n\n" + " // Disable the Global High Interrupts \n" + " //INTERRUPT_GlobalInterruptHighDisable(); \n\n" + " // Enable the Global Low Interrupts \n" + " //INTERRUPT_GlobalInterruptLowEnable(); \n\n" + " // Disable the Global Low Interrupts \n" + " //INTERRUPT_GlobalInterruptLowDisable(); \n\n" + " // Enable the Peripheral Interrupts \n" + " //INTERRUPT_PeripheralInterruptEnable(); \n\n" + " // Disable the Peripheral Interrupts \n" + " //INTERRUPT_PeripheralInterruptDisable(); \n";
3559
+ }
3560
+
3561
+ return {
3562
+ initializer: {
3563
+ name: "",
3564
+ header: {
3565
+ name: "interrupt.h",
3566
+ path: "system/"
3567
+ }
3568
+ },
3569
+ initSection: {
3570
+ message: initSectionMessage
3571
+ }
3572
+ };
3573
+ });
3574
+
3575
+ _defineProperty(this, "pin_standard_args", function () {
3576
+ return {
3577
+ queryAdapters: ["ioc", "pps", "analog"]
3578
+ };
3579
+ });
3580
+
3581
+ _defineProperty(this, "getBooleanValue", function (value) {
3582
+ if (value === true) return "enabled";else if (value === false) return "disabled";else return undefined;
3583
+ });
3584
+
3585
+ _defineProperty(this, "getNoPriorityTable", function (table, model, tab) {
3586
+ var _table$rowData, _this$getNoPrioInterr6, _this$getNoPrioInterr7, _this$getNoPrioInterr8;
3587
+
3588
+ var currentTable = (_table$rowData = table.rowData) !== null && _table$rowData !== void 0 ? _table$rowData : [];
3589
+ var i = 0;
3590
+ var initIndex = currentTable.length;
3591
+ Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["map"])((_this$getNoPrioInterr6 = (_this$getNoPrioInterr7 = _this.getNoPrioInterruptHelper()) === null || _this$getNoPrioInterr7 === void 0 ? void 0 : (_this$getNoPrioInterr8 = _this$getNoPrioInterr7.getProcessedTableData()) === null || _this$getNoPrioInterr8 === void 0 ? void 0 : _this$getNoPrioInterr8.rowData) !== null && _this$getNoPrioInterr6 !== void 0 ? _this$getNoPrioInterr6 : {}, function (uid, data) {
3592
+ var rowData = _objectSpread(_objectSpread({}, Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["toDictionary"])(Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["getKeys"])(data), function (key) {
3593
+ return key;
3594
+ }, function (key) {
3595
+ var _data$key;
3596
+
3597
+ return (_data$key = data[key]) === null || _data$key === void 0 ? void 0 : _data$key.value;
3598
+ })), {}, {
3599
+ actions: Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["toDictionary"])(Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_2__["getKeys"])(data), function (key) {
3600
+ return key;
3601
+ }, function (key) {
3602
+ var _data$key2, _data$key2$actions, _data$key2$actions$;
3603
+
3604
+ return data === null || data === void 0 ? void 0 : (_data$key2 = data[key]) === null || _data$key2 === void 0 ? void 0 : (_data$key2$actions = _data$key2.actions) === null || _data$key2$actions === void 0 ? void 0 : (_data$key2$actions$ = _data$key2$actions[0]) === null || _data$key2$actions$ === void 0 ? void 0 : _data$key2$actions$.action;
3605
+ }),
3606
+ order: initIndex + i + 1,
3607
+ rowId: initIndex + i++,
3608
+ uid: uid
3609
+ });
3610
+
3611
+ currentTable = Object(_microchip_scf_automodule_impl_lib_tables_tables__WEBPACK_IMPORTED_MODULE_10__["addRowToTable"])(currentTable, table.columns, rowData);
3612
+ });
3613
+ return currentTable;
3614
+ });
3615
+
3616
+ _defineProperty(this, "getInterruptStore", function (table, model, tab) {
3617
+ var _table$rowData2;
3618
+
3619
+ var initRowData = (_table$rowData2 = table.rowData) !== null && _table$rowData2 !== void 0 ? _table$rowData2 : [];
3620
+ return initRowData;
3621
+ });
3622
+
3623
+ _defineProperty(this, "isNoPrioTableVisible", function () {
3624
+ return !_this.getModel().isComponentValue("ipenIntcon");
3625
+ });
3626
+
3627
+ _defineProperty(this, "isPrioNonVectTableVisible", function () {
3628
+ return _this.getModel().isComponentValue("ipenIntcon");
3629
+ });
3630
+
3631
+ this.dataModel = dataModel;
3632
+ this.interruptStoreState = (_this$getModel$getSta5 = (_this$getModel$getSta6 = this.getModel().getState()) === null || _this$getModel$getSta6 === void 0 ? void 0 : (_this$getModel$getSta7 = _this$getModel$getSta6.main) === null || _this$getModel$getSta7 === void 0 ? void 0 : (_this$getModel$getSta8 = _this$getModel$getSta7.interruptTable) === null || _this$getModel$getSta8 === void 0 ? void 0 : _this$getModel$getSta8["interruptStore"]) !== null && _this$getModel$getSta5 !== void 0 ? _this$getModel$getSta5 : [];
3633
+ };
3634
+
3635
+ /***/ }),
3636
+
3637
+ /***/ "./src/GeneratorModel.tsx":
3638
+ /*!********************************!*\
3639
+ !*** ./src/GeneratorModel.tsx ***!
3640
+ \********************************/
3641
+ /*! exports provided: getGeneratorModel, getHeaderFiles, getAllocatedPins */
3642
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3643
+
3644
+ "use strict";
3645
+ __webpack_require__.r(__webpack_exports__);
3646
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGeneratorModel", function() { return getGeneratorModel; });
3647
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHeaderFiles", function() { return getHeaderFiles; });
3648
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllocatedPins", function() { return getAllocatedPins; });
3649
+ /* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ "./src/Constants.ts");
3650
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3651
+
3652
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3653
+
3654
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3655
+
3656
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
3657
+
3658
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
3659
+
3660
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
3661
+
3662
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
3663
+
3664
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
3665
+
3666
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3667
+
3668
+
3669
+ var getGeneratorModel = function getGeneratorModel(model, noPrioIntList) {
3670
+ var _registerValues$INTCO, _registerValues$INTCO2, _extIntList, _model$getName, _model$getName2, _registerValues$INTCO3;
3671
+
3672
+ var highInterrupts = [];
3673
+ var lowInterrupts = [];
3674
+ var extIntList = [];
3675
+ var registerValues = model.getRegisterValues();
3676
+ if (!registerValues) return {};
3677
+ var pieAvailable = (registerValues === null || registerValues === void 0 ? void 0 : (_registerValues$INTCO = registerValues["INTCON"]) === null || _registerValues$INTCO === void 0 ? void 0 : (_registerValues$INTCO2 = _registerValues$INTCO.settings) === null || _registerValues$INTCO2 === void 0 ? void 0 : _registerValues$INTCO2.PEIE) != undefined;
3678
+ highInterrupts = noPrioIntList.filter(function (interrupt) {
3679
+ return interrupt.isEnabled;
3680
+ }).map(function (data) {
3681
+ return _objectSpread(_objectSpread({}, data), {}, {
3682
+ isPeripheralInterrupt: data.module !== _Constants__WEBPACK_IMPORTED_MODULE_0__["EXTINT_NAME"] && data.module !== "PIN_MANAGER"
3683
+ });
3684
+ });
3685
+ extIntList = (_extIntList = extIntList).concat.apply(_extIntList, _toConsumableArray(noPrioIntList.filter(function (data) {
3686
+ return data.module === _Constants__WEBPACK_IMPORTED_MODULE_0__["EXTINT_NAME"];
3687
+ })));
3688
+ return _objectSpread(_objectSpread({
3689
+ moduleNameLowerCase: (_model$getName = model.getName()) === null || _model$getName === void 0 ? void 0 : _model$getName.toLowerCase(),
3690
+ moduleNameUpperCase: (_model$getName2 = model.getName()) === null || _model$getName2 === void 0 ? void 0 : _model$getName2.toUpperCase(),
3691
+ header: getHeaderFiles(),
3692
+ hasHighInterrupts: highInterrupts.length > 0,
3693
+ hasLowInterrupts: lowInterrupts.length > 0,
3694
+ highInterrupts: highInterrupts,
3695
+ lowInterrupts: lowInterrupts,
3696
+ preemptiveHigh: model.isComponentValue("serviceSingleIsrPerInterrupt"),
3697
+ pieAvailable: pieAvailable,
3698
+ serviceSingleIsrPerInterrupt: model.isComponentValue("serviceSingleIsrPerInterrupt"),
3699
+ //Registers and Settings
3700
+ initRegisters: registerValues
3701
+ }, registerValues), {}, {
3702
+ GIE: "".concat(registerValues === null || registerValues === void 0 ? void 0 : (_registerValues$INTCO3 = registerValues["INTCON"]) === null || _registerValues$INTCO3 === void 0 ? void 0 : _registerValues$INTCO3.name, "bits.GIE"),
3703
+ // External Interrupt
3704
+ allocatedPins: getAllocatedPins(model, extIntList, registerValues),
3705
+ vectoredInterruptEnabled: false
3706
+ });
3707
+ };
3708
+ var getHeaderFiles = function getHeaderFiles() {
3709
+ return [{
3710
+ name: "interrupt.h",
3711
+ path: "system/"
3712
+ }];
3713
+ };
3714
+ var getAllocatedPins = function getAllocatedPins(model, extIntList, registerSettings) {
3715
+ var allocatedPins = [];
3716
+ extIntList.forEach(function (interrupt) {
3717
+ if (interrupt && interrupt.name) {
3718
+ var _model$getComponentVa, _registerSettings$OPT, _registerSettings$OPT2, _registerSettings$OPT3;
3719
+
3720
+ var interruptName = interrupt.name;
3721
+ var edge = (_model$getComponentVa = model.getComponentValue) === null || _model$getComponentVa === void 0 ? void 0 : _model$getComponentVa.call(model, _Constants__WEBPACK_IMPORTED_MODULE_0__["InterruptComponentNames"].interruptEdges[interruptName]);
3722
+ var interruptHandlerName = interruptName.slice(0, interruptName.length - 1);
3723
+ allocatedPins.push({
3724
+ isHighPriority: interrupt.isHighPriority,
3725
+ getIRQname: interruptHandlerName,
3726
+ customName: "EXT_".concat(interruptHandlerName),
3727
+ functionName: interruptHandlerName,
3728
+ edge: edge === null || edge === void 0 ? void 0 : edge.replace(/_edge$/, ""),
3729
+ SFREdgeDetectFromPin: registerSettings === null || registerSettings === void 0 ? void 0 : (_registerSettings$OPT = registerSettings["OPTION_REG"]) === null || _registerSettings$OPT === void 0 ? void 0 : (_registerSettings$OPT2 = _registerSettings$OPT.settings) === null || _registerSettings$OPT2 === void 0 ? void 0 : (_registerSettings$OPT3 = _registerSettings$OPT2[_Constants__WEBPACK_IMPORTED_MODULE_0__["EdgeSettings"].edgeSettingAlias[interruptName]]) === null || _registerSettings$OPT3 === void 0 ? void 0 : _registerSettings$OPT3.bitName,
3730
+ flagName: interrupt.flag,
3731
+ enableBitName: interrupt.enable,
3732
+ interruptEnabled: interrupt.isEnabled
3733
+ });
3734
+ }
3735
+ });
3736
+ return allocatedPins;
3737
+ };
3738
+
3739
+ /***/ }),
3740
+
3741
+ /***/ "./src/PinsLogic.ts":
3742
+ /*!**************************!*\
3743
+ !*** ./src/PinsLogic.ts ***!
3744
+ \**************************/
3745
+ /*! exports provided: getCompletePinData, getRowData */
3746
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3747
+
3748
+ "use strict";
3749
+ __webpack_require__.r(__webpack_exports__);
3750
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCompletePinData", function() { return getCompletePinData; });
3751
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRowData", function() { return getRowData; });
3752
+ // provide complete dynamic data for all pin rows. It overrides static pindata.json
3753
+ var getCompletePinData = function getCompletePinData(appModel) {
3754
+ // way to programatically override the json data
3755
+ return {};
3756
+ }; // overrides pin data for a particular row based on model.
3757
+
3758
+ function getRowData(appModel, rowData) {
3759
+ var retRowJSONdata;
3760
+
3761
+ if (rowData.name === "int") {
3762
+ retRowJSONdata = appModel.isComponentValue("inti") ? rowData : undefined;
3763
+ } else if (rowData.name === "int0") {
3764
+ retRowJSONdata = appModel.isComponentValue("int0i") ? rowData : undefined;
3765
+ } else if (rowData.name === "int1") {
3766
+ retRowJSONdata = appModel.isComponentValue("int1i") ? rowData : undefined;
3767
+ } else if (rowData.name === "int2") {
3768
+ retRowJSONdata = appModel.isComponentValue("int2i") ? rowData : undefined;
3769
+ } else if (rowData.name === "int3") {
3770
+ retRowJSONdata = appModel.isComponentValue("int3i") ? rowData : undefined;
3771
+ } else retRowJSONdata = undefined;
3772
+
3773
+ return retRowJSONdata;
3774
+ }
3775
+
3776
+ /***/ }),
3777
+
3778
+ /***/ "./src/moduleConfig.json":
3779
+ /*!*******************************!*\
3780
+ !*** ./src/moduleConfig.json ***!
3781
+ \*******************************/
3782
+ /*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, tabs, help, templates, imports, exports, hasPins, softwareData, peripherals, analytics, default */
3783
+ /***/ (function(module) {
3784
+
3785
+ module.exports = JSON.parse("{\"moduleName\":\"INTERRUPTMANAGER\",\"deviceType\":\"PIC\",\"booleanValues\":{\"true\":\"enabled\",\"false\":\"disabled\"},\"UIGroups\":{\"software\":\"Software Settings\",\"hardware\":\"Hardware Settings\",\"external\":\"External Interrupt Settings\",\"interruptTable\":\"Interrupt Tables\"},\"UIOrder\":{\"software\":[\"serviceSingleIsrPerInterrupt\",\"*\"],\"hardware\":[\"*\"],\"external\":[\"enableExtInt\",\"inti\",\"intedgIntcon\",\"int0i\",\"intedg0Intcon\",\"int1i\",\"intedg1Intcon\",\"int2i\",\"intedg2Intcon\",\"int3i\",\"intedg3Intcon\",\"*\"],\"interruptTable\":[\"noPriorityTable\",\"*\"]},\"tabs\":{\"main\":\"Easy View\"},\"help\":{\"url\":\"v2/keyword-lookup?keyword=scf-pic8-interrupt-v3&redirect=true\",\"tooltip\":\"The Interrupt Controller module manages interrupt sources.\"},\"templates\":[{\"src\":\"output/interrupt_manager_priorityDisabled.c.ftl\",\"dest\":\"system/src/interrupt.c\",\"generateWithHardware\":true,\"isGeneratableProperty\":\"isPriorityDisabled\"},{\"src\":\"output/interrupt_manager_priorityDisabled.h.ftl\",\"dest\":\"system/interrupt.h\",\"generateWithHardware\":true,\"isGeneratableProperty\":\"isPriorityDisabled\"},{\"src\":\"output/interrupt_manager_priorityEnabled.c.ftl\",\"dest\":\"system/src/interrupt.c\",\"generateWithHardware\":true,\"isGeneratableProperty\":\"isPriorityEnabled\"},{\"src\":\"output/interrupt_manager_priorityEnabled.h.ftl\",\"dest\":\"system/interrupt.h\",\"generateWithHardware\":true,\"isGeneratableProperty\":\"isPriorityEnabled\"}],\"imports\":{\"scf_pic8_interrupt_v3\":{\"import\":{\"interfaceId\":{\"name\":\"scf-pic8-interrupt-v3\",\"version\":\"1.0.0\"},\"isRequired\":true}},\"initializer_system\":{\"nodeModule\":{\"importName\":\"systemInit\",\"node\":\"@microchip/initializer-system\"},\"fullyTyped\":true,\"import\":{\"interfaceId\":{\"name\":\"initializer-system\",\"version\":\"^0\"}}},\"initializer_main\":{\"nodeModule\":{\"importName\":\"initializer_main\",\"node\":\"@microchip/initializer-main\"},\"fullyTyped\":true,\"import\":{\"interfaceId\":{\"name\":\"initializer-main\",\"version\":\"^0\"}}},\"pin_standard\":{\"import\":{\"interfaceId\":{\"name\":\"pin-standard\",\"version\":\"^0\"}}},\"device_meta\":{\"import\":{\"interfaceId\":{\"name\":\"device-meta\",\"version\":\"^1\"}}}},\"exports\":{\"interrupt\":{\"interfaces\":[{\"interfaceId\":{\"name\":\"interrupt-standard\",\"version\":\"1.0.1\"},\"fullyTyped\":true,\"nodeModule\":{\"importName\":\"interrupt_standard\",\"node\":\"@microchip/interrupt-standard\"}}]}},\"hasPins\":true,\"softwareData\":{\"serviceSingleIsrPerInterrupt\":{\"name\":\"serviceSingleIsrPerInterrupt\",\"description\":\"Enable Single ISR Execution per entry\",\"type\":\"boolean\",\"defaultValue\":true,\"group\":\"software\",\"tabs\":[\"main\"],\"category\":\"software\"},\"INTI\":{\"name\":\"inti\",\"category\":\"software\",\"description\":\"INT Enable\",\"defaultValue\":false,\"type\":\"boolean\",\"group\":\"external\",\"tabs\":[\"main\"],\"isVisibleProperty\":\"isHidden\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:PIE0&redirect=true\"}},\"INT0I\":{\"name\":\"int0i\",\"category\":\"software\",\"description\":\"INT0 Enable\",\"defaultValue\":false,\"type\":\"boolean\",\"group\":\"external\",\"tabs\":[\"main\"],\"isVisibleProperty\":\"isHidden\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:PIE0&redirect=true\"}},\"INT1I\":{\"name\":\"int1i\",\"category\":\"software\",\"description\":\"INT1 Enable\",\"defaultValue\":false,\"type\":\"boolean\",\"group\":\"external\",\"tabs\":[\"main\"],\"isVisibleProperty\":\"isHidden\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:PIE0&redirect=true\"}},\"INT2I\":{\"name\":\"int2i\",\"category\":\"software\",\"description\":\"INT2 Enable\",\"defaultValue\":false,\"type\":\"boolean\",\"group\":\"external\",\"tabs\":[\"main\"],\"isVisibleProperty\":\"isHidden\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:PIE0&redirect=true\"}},\"INT3I\":{\"name\":\"int3i\",\"category\":\"software\",\"description\":\"INT3 Enable\",\"defaultValue\":false,\"type\":\"boolean\",\"group\":\"external\",\"tabs\":[\"main\"],\"isVisibleProperty\":\"isHidden\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:PIE0&redirect=true\"}},\"ioci\":{\"name\":\"ioci\",\"description\":\"IOC\",\"type\":\"boolean\",\"defaultValue\":false,\"group\":\"software\",\"tabs\":[\"main\"],\"category\":\"software\",\"isVisibleProperty\":\"isHidden\"},\"noPriorityTable\":{\"name\":\"noPriorityTable\",\"description\":\"Interrupt Table\",\"type\":\"object\",\"category\":\"table\",\"group\":\"interruptTable\",\"tabs\":[\"main\"],\"columns\":{\"order\":{\"title\":\"Order\",\"type\":\"number\",\"defaultValue\":0,\"readonly\":true},\"module\":{\"title\":\"Module\",\"type\":\"string\",\"defaultValue\":\"\",\"readonly\":true},\"interruptName\":{\"title\":\"Interrupt Name\",\"type\":\"string\",\"defaultValue\":\"\",\"readonly\":true},\"enable\":{\"title\":\"Enable\",\"type\":\"boolean\",\"defaultValue\":false}},\"defaultRowNum\":0,\"rowData\":[],\"isVisibleProperty\":\"noPrioTableVisible\",\"canMoveRowDown\":true,\"canMoveRowUp\":true},\"interruptStore\":{\"name\":\"interruptStore\",\"description\":\"Interrupt Store\",\"type\":\"object\",\"category\":\"table\",\"group\":\"interruptTable\",\"tabs\":[\"main\"],\"columns\":{\"isHighPriority\":{\"title\":\"High Priority\",\"type\":\"boolean\",\"defaultValue\":true}},\"defaultRowNum\":0,\"rowData\":[],\"isVisibleProperty\":\"isHidden\"}},\"peripherals\":[{\"interfaceId\":{\"name\":\"scf-pic8-interrupt-v3\",\"version\":\"1.0.0\"},\"interrupts\":[\"INTI\"],\"registers\":{\"INTCON\":[{\"setting\":\"INTF\",\"name\":\"intfIntcon\",\"category\":\"hardware\",\"description\":\"INT External Interrupt Flag\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"]},{\"setting\":\"INTE\",\"name\":\"inteIntcon\",\"category\":\"hardware\",\"description\":\"INT External Interrupt Enable\",\"type\":\"boolean\",\"group\":\"external\",\"tabs\":[\"register\"]},{\"setting\":\"PEIE\",\"name\":\"peieIntcon\",\"category\":\"hardware\",\"description\":\"Peripheral Interrupt Enable\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"]},{\"setting\":\"GIE\",\"name\":\"gieIntcon\",\"category\":\"hardware\",\"description\":\"Global Interrupt Enable\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"]}],\"OPTION_REG\":[{\"setting\":\"INTEDG\",\"name\":\"intedgOptionReg\",\"category\":\"hardware\",\"description\":\"INT Edge Detect\",\"type\":\"ComboBox\",\"group\":\"external\",\"tabs\":[\"main\"],\"mode\":{\"masterComponent\":\"inti\",\"operation\":\"isVisible\",\"matchRegEx\":\"^(?:true)$\"},\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}}]}}],\"analytics\":{\"logAlwaysComps\":[\"serviceSingleIsrPerInterrupt\",\"ioci\",\"inti\",\"int0i\",\"int1i\",\"int2i\",\"int3i\",\"intedgOptionReg\"],\"compMapping\":{\"serviceSingleIsrPerInterrupt\":\"INT_Single_Isr_Per_Interrupt\",\"ioci\":\"INT_IOC_Enable\",\"inti\":\"INT_Inti\",\"int0i\":\"INT_Int0_Enable\",\"int1i\":\"INT_Int1_Enable\",\"int2i\":\"INT_Int2_Enable\",\"int3i\":\"INT_Int3_Enable\",\"intedgOptionReg\":\"INT_Edge_Trigger\"},\"logOnChangeComps\":[]}}");
3786
+
3787
+ /***/ }),
3788
+
3789
+ /***/ "./src/pinsdata.json":
3790
+ /*!***************************!*\
3791
+ !*** ./src/pinsdata.json ***!
3792
+ \***************************/
3793
+ /*! exports provided: rows, default */
3794
+ /***/ (function(module) {
3795
+
3796
+ module.exports = JSON.parse("{\"rows\":[{\"name\":\"int\",\"module\":\"EXT_INT\",\"function\":\"INT\",\"direction\":\"input\",\"filter\":{\"module\":\"INTERRUPT MANAGER\",\"aliasReEx\":\"^INT$\"},\"behaviour\":\"LOCK_UNLOCK\",\"attribs\":[{\"aliasReEx\":\".*\",\"analog\":false}]},{\"name\":\"int0\",\"module\":\"EXT_INT\",\"function\":\"INT0\",\"direction\":\"input\",\"filter\":{\"module\":\"INTERRUPT MANAGER\",\"aliasReEx\":\"^INT0$\"},\"behaviour\":\"LOCK_UNLOCK\",\"attribs\":[{\"aliasReEx\":\".*\",\"analog\":false}]},{\"name\":\"int1\",\"module\":\"EXT_INT\",\"function\":\"INT1\",\"direction\":\"input\",\"filter\":{\"module\":\"INTERRUPT MANAGER\",\"aliasReEx\":\"^INT1$\"},\"behaviour\":\"LOCK_UNLOCK\",\"attribs\":[{\"aliasReEx\":\".*\",\"analog\":false}]},{\"name\":\"int2\",\"module\":\"EXT_INT\",\"function\":\"INT2\",\"direction\":\"input\",\"filter\":{\"module\":\"INTERRUPT MANAGER\",\"aliasReEx\":\"^INT2$\"},\"behaviour\":\"LOCK_UNLOCK\",\"attribs\":[{\"aliasReEx\":\".*\",\"analog\":false}]},{\"name\":\"int3\",\"module\":\"EXT_INT\",\"function\":\"INT3\",\"direction\":\"input\",\"filter\":{\"module\":\"INTERRUPT MANAGER\",\"aliasReEx\":\"^INT3$\"},\"behaviour\":\"LOCK_UNLOCK\",\"attribs\":[{\"aliasReEx\":\".*\",\"analog\":false}]}]}");
3797
+
3798
+ /***/ }),
3799
+
3800
+ /***/ "./src/table_data/NoPrioTable.ts":
3801
+ /*!***************************************!*\
3802
+ !*** ./src/table_data/NoPrioTable.ts ***!
3803
+ \***************************************/
3804
+ /*! exports provided: getNoPrioDefData */
3805
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3806
+
3807
+ "use strict";
3808
+ __webpack_require__.r(__webpack_exports__);
3809
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNoPrioDefData", function() { return getNoPrioDefData; });
3810
+ /* harmony import */ var _types_TableTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../types/TableTypes */ "./src/types/TableTypes.ts");
3811
+
3812
+ var getNoPrioDefData = function getNoPrioDefData(model) {
3813
+ return {
3814
+ tableId: _types_TableTypes__WEBPACK_IMPORTED_MODULE_0__["NO_PRIO_TABLE_ID"],
3815
+ tableDescription: "Interrupt Table",
3816
+ hasReorder: false,
3817
+ showOrderColumn: true,
3818
+ headers: {
3819
+ module: {
3820
+ description: "Module",
3821
+ type: "string",
3822
+ show: true,
3823
+ readonly: true
3824
+ },
3825
+ interruptName: {
3826
+ description: "Interrupt Name",
3827
+ type: "string",
3828
+ show: true,
3829
+ readonly: true
3830
+ },
3831
+ enable: {
3832
+ description: "Enable",
3833
+ type: "boolean",
3834
+ show: true,
3835
+ readonly: false
3836
+ }
3837
+ },
3838
+ rowData: {}
3839
+ };
3840
+ };
3841
+
3842
+ /***/ }),
3843
+
3844
+ /***/ "./src/types/TableTypes.ts":
3845
+ /*!*********************************!*\
3846
+ !*** ./src/types/TableTypes.ts ***!
3847
+ \*********************************/
3848
+ /*! exports provided: NO_PRIO_TABLE_ID */
3849
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3850
+
3851
+ "use strict";
3852
+ __webpack_require__.r(__webpack_exports__);
3853
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_PRIO_TABLE_ID", function() { return NO_PRIO_TABLE_ID; });
3854
+ var NO_PRIO_TABLE_ID = "no_priority_interrupt_table";
3855
+
3856
+ /***/ })
3857
+
3858
+ /******/ });
3859
+ //# sourceMappingURL=autoCreator.js.map