@leaddreamer/inventorylogic 0.0.3-beta.79 → 0.0.3-beta.80

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.
Files changed (59) hide show
  1. package/README.md +16 -20
  2. package/business/Utilities/index.js +1 -0
  3. package/business/Utilities/other.js +1 -3
  4. package/business/Utilities/promise-queue/index.js +183 -150
  5. package/business/Utilities/promise-queue/new.js +231 -0
  6. package/dist/InventoryLogic.0ac93278.js +35 -0
  7. package/dist/InventoryLogic.0ac93278.js.map +1 -0
  8. package/dist/InventoryLogic.31f6d549.js +152 -0
  9. package/dist/InventoryLogic.31f6d549.js.map +1 -0
  10. package/dist/InventoryLogic.35827495.js +285 -0
  11. package/dist/InventoryLogic.35827495.js.map +1 -0
  12. package/dist/InventoryLogic.37dfff3e.js +72 -0
  13. package/dist/InventoryLogic.37dfff3e.js.map +1 -0
  14. package/dist/InventoryLogic.4206cb15.js +213 -0
  15. package/dist/InventoryLogic.4206cb15.js.map +1 -0
  16. package/dist/InventoryLogic.44193a77.js +35 -0
  17. package/dist/InventoryLogic.44193a77.js.map +1 -0
  18. package/dist/InventoryLogic.46ca6768.js +131 -0
  19. package/dist/InventoryLogic.46ca6768.js.map +1 -0
  20. package/dist/InventoryLogic.4d012935.js +151 -0
  21. package/dist/InventoryLogic.4d012935.js.map +1 -0
  22. package/dist/InventoryLogic.57f24f5f.js +155 -0
  23. package/dist/InventoryLogic.57f24f5f.js.map +1 -0
  24. package/dist/InventoryLogic.59be76a4.js +184 -0
  25. package/dist/InventoryLogic.59be76a4.js.map +1 -0
  26. package/dist/InventoryLogic.70925a32.js +375 -0
  27. package/dist/InventoryLogic.70925a32.js.map +1 -0
  28. package/dist/InventoryLogic.72fcf301.js +6 -0
  29. package/dist/InventoryLogic.72fcf301.js.map +1 -0
  30. package/dist/InventoryLogic.7741caec.js +375 -0
  31. package/dist/InventoryLogic.7741caec.js.map +1 -0
  32. package/dist/InventoryLogic.78480e5e.js +152 -0
  33. package/dist/InventoryLogic.78480e5e.js.map +1 -0
  34. package/dist/InventoryLogic.80d0e568.js +135 -0
  35. package/dist/InventoryLogic.80d0e568.js.map +1 -0
  36. package/dist/InventoryLogic.8a273d2e.js +110 -0
  37. package/dist/InventoryLogic.8a273d2e.js.map +1 -0
  38. package/dist/InventoryLogic.8addb055.js +202 -0
  39. package/dist/InventoryLogic.8addb055.js.map +1 -0
  40. package/dist/InventoryLogic.9dee46ea.js +6 -0
  41. package/dist/InventoryLogic.9dee46ea.js.map +1 -0
  42. package/dist/InventoryLogic.b90f66ea.js +124 -0
  43. package/dist/InventoryLogic.b90f66ea.js.map +1 -0
  44. package/dist/InventoryLogic.bb447b4c.js +39 -0
  45. package/dist/InventoryLogic.bb447b4c.js.map +1 -0
  46. package/dist/InventoryLogic.d27e84a7.js +75 -0
  47. package/dist/InventoryLogic.d27e84a7.js.map +1 -0
  48. package/dist/InventoryLogic.d69ad127.js +217 -0
  49. package/dist/InventoryLogic.d69ad127.js.map +1 -0
  50. package/dist/InventoryLogic.e03e6b07.js +245 -0
  51. package/dist/InventoryLogic.e03e6b07.js.map +1 -0
  52. package/dist/InventoryLogic.f276f76c.js +213 -0
  53. package/dist/InventoryLogic.f276f76c.js.map +1 -0
  54. package/dist/InventoryLogic.f4627c8a.js +160 -0
  55. package/dist/InventoryLogic.f4627c8a.js.map +1 -0
  56. package/dist/index.js +23 -0
  57. package/dist/index.js.map +1 -0
  58. package/index.js +1 -2
  59. package/package.json +7 -3
@@ -0,0 +1,160 @@
1
+ var $d403d40112d3687c$exports = {};
2
+ /**
3
+ * Typedefs, constants, support functions and database operations related to Promise getQueueSize
4
+ * Thes era euseful for scheduling large serial asynchronous operations
5
+ * @module PromiseQueue
6
+ */ (function() {
7
+ /**
8
+ * Creates a new rate limited queue. The queue is created with stopped state, i.e. you have to call start() to run jobs.
9
+ * @param {number} maxCallsPerSecond=1 - The rate limit of this queue in maximum calls per seconds which may be executed at any time. Pass values less than 1 to have less than one call per second, e.g. 1/3 for 3 one call in three seconds at maximum.
10
+ * @param logger
11
+ * @constructor
12
+ */ function PromiseQueue(maxCallsPerSecond, logger) {
13
+ this.maxCallsPerSecond = typeof maxCallsPerSecond === "undefined" ? 1 : maxCallsPerSecond;
14
+ this.logger = logger;
15
+ this.tasks = [];
16
+ this.isActive = false;
17
+ this.jobIntervalMillis = 1000 / maxCallsPerSecond;
18
+ this.lastTaskTimestamp = null;
19
+ this.currentTaskTimeoutId = null;
20
+ }
21
+ /**
22
+ * Processes the next task and returns the id of the time used to wait for the next invocation of this method.
23
+ * @private
24
+ */ PromiseQueue.prototype.updateTaskSchedule = function() {
25
+ if (this.logger && this.logger.debug) this.logger.debug("PromiseQueue.updateTaskSchedule");
26
+ if (this.isEmpty() || this.isStopped()) return;
27
+ const queue = this;
28
+ function processNextTask() {
29
+ if (queue.logger && queue.logger.debug) queue.logger.debug("PromiseQueue.processNextTask", queue.tasks.length);
30
+ var nextTaskItem = queue.tasks.shift();
31
+ if (nextTaskItem) try {
32
+ const result = nextTaskItem.task.call();
33
+ if (queue.logger && queue.logger.debug) queue.logger.debug("Resolving queued promise", result, result instanceof Promise);
34
+ nextTaskItem.resolve(result);
35
+ } catch (e) {
36
+ queue.logger.info("rejecting queued promise result", e);
37
+ nextTaskItem.reject(e);
38
+ }
39
+ }
40
+ function scheduleNext(timeoutMillisOverride) {
41
+ if (queue.logger && queue.logger.debug) queue.logger.debug("PromiseQueue.scheduleNext", timeoutMillisOverride);
42
+ if (queue.isEmpty()) {
43
+ queue.currentTaskTimeoutId = null;
44
+ return;
45
+ }
46
+ queue.currentTaskTimeoutId = setTimeout(function() {
47
+ queue.lastTaskTimestamp = Date.now();
48
+ processNextTask();
49
+ scheduleNext(queue.jobIntervalMillis);
50
+ }, timeoutMillisOverride);
51
+ }
52
+ if (this.currentTaskTimeoutId == null) {
53
+ if (this.lastTaskTimestamp) {
54
+ let passedTime = Date.now() - this.lastTaskTimestamp;
55
+ if (passedTime > this.jobIntervalMillis) scheduleNext(this.jobIntervalMillis);
56
+ else scheduleNext(Math.max(0, this.jobIntervalMillis - passedTime));
57
+ } else scheduleNext(0);
58
+ }
59
+ };
60
+ /**
61
+ * Starts the task processing of this queue.
62
+ *
63
+ * If it is already started, then false will be returned.
64
+ * If it is not yet started then the first task will be processed in the background and true will be returned.
65
+ *
66
+ * @return {boolean} true if this queue wasn't started before and now started to process tasks.
67
+ */ PromiseQueue.prototype.start = function() {
68
+ if (this.isActive) return false;
69
+ this.isActive = true;
70
+ this.updateTaskSchedule();
71
+ return true;
72
+ };
73
+ /**
74
+ * Stops the processing of this queue.
75
+ * @return true if the queue was started and is now stopped. false if it was already stopped.
76
+ */ PromiseQueue.prototype.stop = function() {
77
+ if (this.isActive) {
78
+ this.isActive = false;
79
+ if (this.currentTaskTimeoutId) {
80
+ clearInterval(this.currentTaskTimeoutId);
81
+ this.currentTaskTimeoutId = null;
82
+ this.lastTaskTimestamp = null;
83
+ }
84
+ }
85
+ };
86
+ PromiseQueue.prototype.getMaxCallsPerSecond = function() {
87
+ return this.maxCallsPerSecond;
88
+ };
89
+ PromiseQueue.prototype.isStarted = function() {
90
+ return this.isActive;
91
+ };
92
+ PromiseQueue.prototype.isStopped = function() {
93
+ return !this.isStarted();
94
+ };
95
+ /**
96
+ * @returns {boolean} true if this queue is currently empty, i.e. if it has no tasks in the queue.
97
+ */ PromiseQueue.prototype.isEmpty = function() {
98
+ return this.tasks.length === 0;
99
+ };
100
+ /**
101
+ * @returns {boolean} true if this queue has one or more entries.
102
+ */ PromiseQueue.prototype.isNotEmpty = function() {
103
+ return !this.isEmpty();
104
+ };
105
+ /**
106
+ * @param {function} task - The task to add.
107
+ * @param {boolean} append - if the task should be appended or prepended to the list of queued tasks
108
+ * @return {Promise} A promise which is resolved/rejected when the task was executed by the queue.
109
+ */ PromiseQueue.prototype.add = function(task, append) {
110
+ var self = this;
111
+ var promise = new Promise(function(resolve, reject) {
112
+ var newTaskItem = {
113
+ task: task,
114
+ resolve: resolve,
115
+ reject: reject
116
+ };
117
+ if (self.isEmpty() || append) self.tasks.push(newTaskItem);
118
+ else self.tasks.unshift(newTaskItem);
119
+ });
120
+ self.updateTaskSchedule();
121
+ return promise;
122
+ };
123
+ /**
124
+ * Appends a new task at the end of the queue.
125
+ * @param {function} task - The task to perform. This function will be called with no arguments.
126
+ * @return {Promise} A promise which is resolved/rejected When the task was executed by the queue
127
+ */ PromiseQueue.prototype.append = function(task) {
128
+ return this.add(task, true);
129
+ };
130
+ /**
131
+ * Adds a new task as first item in the queue.
132
+ * @param task
133
+ * @return {Promise} A promise which is resolved/rejected When the task was executed by the queue
134
+ */ PromiseQueue.prototype.prepend = function(task) {
135
+ return this.add(task, false);
136
+ };
137
+ /**
138
+ * Removes the task from the qeueue. If the task is contained more than one time then all occurrences will be removed.
139
+ * @param {function} task - The task to remove.
140
+ * @return {number} - The number of items which were removed.
141
+ */ PromiseQueue.prototype.remove = function(task) {
142
+ if (this.isEmpty()) return 0;
143
+ var removedItems = 0;
144
+ for(var i = this.tasks.length - 1; i >= 0; i--)if (this.tasks[i].task === task) {
145
+ this.tasks.splice(i, 1);
146
+ removedItems++;
147
+ }
148
+ return removedItems;
149
+ };
150
+ /**
151
+ * @returns {Number} - The number of queued/waiting tasks in the queue.
152
+ */ PromiseQueue.prototype.getQueueSize = function() {
153
+ return this.tasks.length;
154
+ };
155
+ $d403d40112d3687c$exports = PromiseQueue;
156
+ })();
157
+
158
+
159
+ export {$d403d40112d3687c$exports as default};
160
+ //# sourceMappingURL=InventoryLogic.f4627c8a.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"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","sources":["business/Utilities/promise-queue/index.js"],"sourcesContent":["/**\n * Typedefs, constants, support functions and database operations related to Promise getQueueSize\n * Thes era euseful for scheduling large serial asynchronous operations\n * @module PromiseQueue\n */\n(function () {\n /**\n * Creates a new rate limited queue. The queue is created with stopped state, i.e. you have to call start() to run jobs.\n * @param {number} maxCallsPerSecond=1 - The rate limit of this queue in maximum calls per seconds which may be executed at any time. Pass values less than 1 to have less than one call per second, e.g. 1/3 for 3 one call in three seconds at maximum.\n * @param logger\n * @constructor\n */\n function PromiseQueue(maxCallsPerSecond, logger) {\n this.maxCallsPerSecond =\n typeof maxCallsPerSecond === \"undefined\" ? 1 : maxCallsPerSecond;\n this.logger = logger;\n\n this.tasks = [];\n this.isActive = false;\n this.jobIntervalMillis = 1000 / maxCallsPerSecond;\n\n this.lastTaskTimestamp = null;\n this.currentTaskTimeoutId = null;\n }\n\n /**\n * Processes the next task and returns the id of the time used to wait for the next invocation of this method.\n * @private\n */\n PromiseQueue.prototype.updateTaskSchedule = function () {\n if (this.logger && this.logger.debug) {\n this.logger.debug(\"PromiseQueue.updateTaskSchedule\");\n }\n\n if (this.isEmpty() || this.isStopped()) {\n return;\n }\n\n const queue = this;\n\n function processNextTask() {\n if (queue.logger && queue.logger.debug) {\n queue.logger.debug(\"PromiseQueue.processNextTask\", queue.tasks.length);\n }\n\n var nextTaskItem = queue.tasks.shift();\n if (nextTaskItem) {\n try {\n const result = nextTaskItem.task.call();\n\n if (queue.logger && queue.logger.debug) {\n queue.logger.debug(\n \"Resolving queued promise\",\n result,\n result instanceof Promise\n );\n }\n\n nextTaskItem.resolve(result);\n } catch (e) {\n queue.logger.info(\"rejecting queued promise result\", e);\n nextTaskItem.reject(e);\n }\n }\n }\n\n function scheduleNext(timeoutMillisOverride) {\n if (queue.logger && queue.logger.debug) {\n queue.logger.debug(\"PromiseQueue.scheduleNext\", timeoutMillisOverride);\n }\n\n if (queue.isEmpty()) {\n queue.currentTaskTimeoutId = null;\n return;\n }\n\n queue.currentTaskTimeoutId = setTimeout(function () {\n queue.lastTaskTimestamp = Date.now();\n processNextTask();\n\n scheduleNext(queue.jobIntervalMillis);\n }, timeoutMillisOverride);\n }\n\n if (this.currentTaskTimeoutId == null) {\n if (this.lastTaskTimestamp) {\n let passedTime = Date.now() - this.lastTaskTimestamp;\n if (passedTime > this.jobIntervalMillis) {\n scheduleNext(this.jobIntervalMillis);\n } else {\n scheduleNext(Math.max(0, this.jobIntervalMillis - passedTime));\n }\n } else {\n scheduleNext(0);\n }\n }\n };\n\n /**\n * Starts the task processing of this queue.\n *\n * If it is already started, then false will be returned.\n * If it is not yet started then the first task will be processed in the background and true will be returned.\n *\n * @return {boolean} true if this queue wasn't started before and now started to process tasks.\n */\n PromiseQueue.prototype.start = function () {\n if (this.isActive) {\n return false;\n }\n\n this.isActive = true;\n\n this.updateTaskSchedule();\n\n return true;\n };\n\n /**\n * Stops the processing of this queue.\n * @return true if the queue was started and is now stopped. false if it was already stopped.\n */\n PromiseQueue.prototype.stop = function () {\n if (this.isActive) {\n this.isActive = false;\n\n if (this.currentTaskTimeoutId) {\n clearInterval(this.currentTaskTimeoutId);\n this.currentTaskTimeoutId = null;\n this.lastTaskTimestamp = null;\n }\n }\n };\n\n PromiseQueue.prototype.getMaxCallsPerSecond = function () {\n return this.maxCallsPerSecond;\n };\n\n PromiseQueue.prototype.isStarted = function () {\n return this.isActive;\n };\n\n PromiseQueue.prototype.isStopped = function () {\n return !this.isStarted();\n };\n\n /**\n * @returns {boolean} true if this queue is currently empty, i.e. if it has no tasks in the queue.\n */\n PromiseQueue.prototype.isEmpty = function () {\n return this.tasks.length === 0;\n };\n\n /**\n * @returns {boolean} true if this queue has one or more entries.\n */\n PromiseQueue.prototype.isNotEmpty = function () {\n return !this.isEmpty();\n };\n\n /**\n * @param {function} task - The task to add.\n * @param {boolean} append - if the task should be appended or prepended to the list of queued tasks\n * @return {Promise} A promise which is resolved/rejected when the task was executed by the queue.\n */\n PromiseQueue.prototype.add = function (task, append) {\n var self = this;\n\n var promise = new Promise(function (resolve, reject) {\n var newTaskItem = { task: task, resolve: resolve, reject: reject };\n\n if (self.isEmpty() || append) {\n self.tasks.push(newTaskItem);\n } else {\n self.tasks.unshift(newTaskItem);\n }\n });\n\n self.updateTaskSchedule();\n\n return promise;\n };\n\n /**\n * Appends a new task at the end of the queue.\n * @param {function} task - The task to perform. This function will be called with no arguments.\n * @return {Promise} A promise which is resolved/rejected When the task was executed by the queue\n */\n PromiseQueue.prototype.append = function (task) {\n return this.add(task, true);\n };\n\n /**\n * Adds a new task as first item in the queue.\n * @param task\n * @return {Promise} A promise which is resolved/rejected When the task was executed by the queue\n */\n PromiseQueue.prototype.prepend = function (task) {\n return this.add(task, false);\n };\n\n /**\n * Removes the task from the qeueue. If the task is contained more than one time then all occurrences will be removed.\n * @param {function} task - The task to remove.\n * @return {number} - The number of items which were removed.\n */\n PromiseQueue.prototype.remove = function (task) {\n if (this.isEmpty()) {\n return 0;\n }\n\n var removedItems = 0;\n for (var i = this.tasks.length - 1; i >= 0; i--) {\n if (this.tasks[i].task === task) {\n this.tasks.splice(i, 1);\n removedItems++;\n }\n }\n\n return removedItems;\n };\n\n /**\n * @returns {Number} - The number of queued/waiting tasks in the queue.\n */\n PromiseQueue.prototype.getQueueSize = function () {\n return this.tasks.length;\n };\n\n module.exports = PromiseQueue;\n})();\n"],"names":[],"version":3,"file":"InventoryLogic.f4627c8a.js.map"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ import {UNSUBSCRIBEKEYS as $fefa9c41cb73ae0b$export$7d0a9b0c57bf84fd, ADDRESSES as $fefa9c41cb73ae0b$export$6890d3564b1f252d, BUSINESS as $fefa9c41cb73ae0b$export$6f454e69bce3a691, BRANDS as $fefa9c41cb73ae0b$export$9547bc19be285f8c, MANAGEDBRANDS as $fefa9c41cb73ae0b$export$73f9b6e7973e6848, ORGANIZATIONS as $fefa9c41cb73ae0b$export$a338fcb90fb9aa37, MANAGEDORGANIZATIONS as $fefa9c41cb73ae0b$export$e72e4cc6cbc6ed26, PRIVATEDATA as $fefa9c41cb73ae0b$export$398ebe85ebcaa41f, BUSINESSDATA as $fefa9c41cb73ae0b$export$e651cf32bc3f78a4, LOGISTICS as $fefa9c41cb73ae0b$export$466d3e044dd15afb, COMMODITY as $fefa9c41cb73ae0b$export$eb747620ce9c5e16, COMMODITIES as $fefa9c41cb73ae0b$export$695940e05bf65de8, LINEITEM as $fefa9c41cb73ae0b$export$4843f9d856059ffd, LINEITEMS as $fefa9c41cb73ae0b$export$f079c6e3d7477fb7, LABORRATES as $fefa9c41cb73ae0b$export$32912c8ca0a712d8, MESSAGES as $fefa9c41cb73ae0b$export$af7faffe10421f14, PRODUCT as $fefa9c41cb73ae0b$export$e36553b0ff5db35a, PRODUCTS as $fefa9c41cb73ae0b$export$4f02bea739260915, PAYMENT as $fefa9c41cb73ae0b$export$eaa266db8852871e, PAYMENTS as $fefa9c41cb73ae0b$export$fadbf22af86be55a, CARDS as $fefa9c41cb73ae0b$export$5f768699f44cc740, TRANSFERS as $fefa9c41cb73ae0b$export$88e60f3c1cd6ae1f, FUNDAMENTALS as $fefa9c41cb73ae0b$export$1a96cd5ee36c0372, PAYOUTRATES as $fefa9c41cb73ae0b$export$e313271f328bdd7d, RATES as $fefa9c41cb73ae0b$export$6b29f6d6b64b8c84, MCC as $fefa9c41cb73ae0b$export$af5764009005aa8e, BUSINESS_TYPE as $fefa9c41cb73ae0b$export$1bd589465335bb9d, ACCESS as $fefa9c41cb73ae0b$export$5eb0c58c8af5c758, ACCESSTO as $fefa9c41cb73ae0b$export$d66f9cc3fc90ff67, STAGE as $fefa9c41cb73ae0b$export$f9865a0a7f208c15, STAGES as $fefa9c41cb73ae0b$export$47007d96f3617630, MATERIAL as $fefa9c41cb73ae0b$export$ca8f11448d1a1116, MATERIALS as $fefa9c41cb73ae0b$export$b7815f33793b967, RECEIPTS as $fefa9c41cb73ae0b$export$cfa5730cd5118215, UNITS as $fefa9c41cb73ae0b$export$a037d132965e1c9f, UNIT as $fefa9c41cb73ae0b$export$97361b7a0c542045, USER as $fefa9c41cb73ae0b$export$ff09b90989b21a8, USERS as $fefa9c41cb73ae0b$export$5a898dd3a28f57e9, MARKUPS as $fefa9c41cb73ae0b$export$1bfdae073fb20e6c, BASE as $fefa9c41cb73ae0b$export$9e15ff8aa6bc996f, HIGHVALUE as $fefa9c41cb73ae0b$export$d93f73eb990136ee, SERVICE as $fefa9c41cb73ae0b$export$3ccfc9db9b7bf43f, FABRICATION as $fefa9c41cb73ae0b$export$5d39addb0306dfd4, WHOLESALE as $fefa9c41cb73ae0b$export$75be49b93be74cb5, RETAIL as $fefa9c41cb73ae0b$export$4466b7859aa06ffd, PAYMENT_SUCCEEDED as $fefa9c41cb73ae0b$export$22e7de231b4ec209, CUSTOMER as $fefa9c41cb73ae0b$export$1d0cc9f143bfe9fc, CUSTOMERADDRESS as $fefa9c41cb73ae0b$export$f437a67b3be18bd2, fakerJSON as $fefa9c41cb73ae0b$export$fe909d0e7ec8aa88, COMPONENT_RANGE as $fefa9c41cb73ae0b$export$72581e25313abf48, COMPONENT_COUNT_RANGE as $fefa9c41cb73ae0b$export$d141374f02dd06d9, ISBN_LENGTH as $fefa9c41cb73ae0b$export$dbb3cd0a4caa6254, AddressDefault as $5e875028eacae923$export$5b4eaa31e9936f4c, AddressForm as $5e875028eacae923$export$20ca2f03d61fd4de, AddressSelectForm as $5e875028eacae923$export$688a09815a2d76e, maplink as $5e875028eacae923$export$5003d738bf1e0422, deleteAddress as $5e875028eacae923$export$6f33ffc8bc2e0c30, deleteAddressByIdAndParent as $5e875028eacae923$export$2873378411ec704, formatAddress as $5e875028eacae923$export$9ab766ce7f4c1f3c, saveAddress as $5e875028eacae923$export$f4e55b204eefc919, fetchAddresses as $5e875028eacae923$export$c9b8cb1768a98d34, fetchFullAccount as $852adca6ae24886c$export$aeea048b1874c987, fetchBusinessData as $852adca6ae24886c$export$a273004aea0035e0, accountPage as $852adca6ae24886c$export$f81f3e9fae10e6db, createBusinessData as $852adca6ae24886c$export$ca4306a1b5762f0e, saveBusinessData as $852adca6ae24886c$export$4bb3a8bbe6017432, deleteBusinessData as $852adca6ae24886c$export$b8447d25d283e6cc, businessDataPath as $852adca6ae24886c$export$8c755753b01b12f, profileComplete as $852adca6ae24886c$export$1e2f140c95101692, profileIncomplete as $852adca6ae24886c$export$f9e1390aa5941c3f, setOpenIssues as $852adca6ae24886c$export$89c9bbe01d357e36, clearOpenIssues as $852adca6ae24886c$export$45379be9a22c2a97, updateCommodity as $21e76cc83a2e54db$export$1ec126d59f4db979, deleteCommodity as $21e76cc83a2e54db$export$9b6c8c0861c73078, deleteCommodityById as $21e76cc83a2e54db$export$51973e05c49d13bf, createCommodity as $21e76cc83a2e54db$export$8566c10d5b97fabb, updateCommodityByID as $21e76cc83a2e54db$export$8396fff7636b69e4, knownCommodity as $21e76cc83a2e54db$export$3171ba3c6caae841, fetchCommodity as $21e76cc83a2e54db$export$dad83ce325511ae2, fetchCommodities as $21e76cc83a2e54db$export$965ec48652f232c7, fetchCommoditiesPaginated as $21e76cc83a2e54db$export$7ad949526eb4312b, fetchCommodityName as $21e76cc83a2e54db$export$a621d0454ced7cc7, fetchFundamentals as $367d3ba5e1953c5d$export$f235c8eeea8b793b, fetchRates as $367d3ba5e1953c5d$export$1135a00cfd97f348, fetchPayoutRates as $367d3ba5e1953c5d$export$e545b306de1ff740, fetchMCCs as $367d3ba5e1953c5d$export$e12c451a9ec5cd7c, fetchBusinessTypes as $367d3ba5e1953c5d$export$b0ed4f3c6bb2aee1, deleteLineItem as $618035149cc2f269$export$42fb5c11b332038a, deleteLineItemById as $618035149cc2f269$export$9311bf4c650d8c56, createLineItem as $618035149cc2f269$export$9160586647000ce, knownLineItem as $618035149cc2f269$export$682c51c4d54f1588, fetchLineItem as $618035149cc2f269$export$7c918f386d58a9a2, fetchLineItems as $618035149cc2f269$export$93ad1b66295660db, fetchProductLineItems as $618035149cc2f269$export$d2c186a25126fe28, paginateProductLineItems as $618035149cc2f269$export$e6123a92ff8533fc, fetchLineItemName as $618035149cc2f269$export$218cbdd54a707ec7, MaterialChoices as $082cf3de7799191e$export$ede25c0a3a34c1c7, StageChoices as $082cf3de7799191e$export$eeb76fa3f6b878ea, logMessageEvent as $b08abff958f5c1f9$export$1d949c62ce6e9407, messageStatus as $b08abff958f5c1f9$export$fb609933e410a9ca, messageEvents as $b08abff958f5c1f9$export$404463f191aa95a1, ERROR_TYPES as $f9cb07fd17b476cd$export$63d334e60537ba01, PaymentDefault as $f9cb07fd17b476cd$export$25824cbb4751202b, paymentDescriptor as $f9cb07fd17b476cd$export$1dc3fa0a524d39c3, receiptDefault as $f9cb07fd17b476cd$export$a5734ae35e42ad51, createPaymentRecord as $f9cb07fd17b476cd$export$e7759a8c3eb8b251, savePaymentData as $f9cb07fd17b476cd$export$f034950df5cadf57, fetchPayment as $f9cb07fd17b476cd$export$81ed014c52470b45, fetchPaymentByUser as $f9cb07fd17b476cd$export$bf9a06d1f6c31bf4, addPaymentDescriptor as $f9cb07fd17b476cd$export$e5cc111dc11d988, savePaymentDescriptor as $f9cb07fd17b476cd$export$218f64344bb0d5b1, removePaymentDescriptor as $f9cb07fd17b476cd$export$2edf51a087d55c34, fetchPDByFingerprint as $f9cb07fd17b476cd$export$719d384deb9d4a1d, fetchPaymentDescriptors as $f9cb07fd17b476cd$export$e67def8f84ea0ce8, listPDSummaries as $f9cb07fd17b476cd$export$afe4f672b985ac26, fetchLatestPDSummary as $f9cb07fd17b476cd$export$46296a85983d5325, fetchPDByOwnerType as $f9cb07fd17b476cd$export$c10d531939e9952c, replaceDefaultPDSummary as $f9cb07fd17b476cd$export$6495802cd4961871, saveReceiptRecord as $f9cb07fd17b476cd$export$4c730f12f97432c2, updateReceipt as $f9cb07fd17b476cd$export$9d597d6207d02073, saveReceiptRecordByOwnerType as $f9cb07fd17b476cd$export$16e7bde1d3e4806e, anyReceiptsByMonthStamp as $f9cb07fd17b476cd$export$be8e05196fbdd05c, fetchReceiptsFiltered as $f9cb07fd17b476cd$export$4eb0e1031e4cb663, saveReceiptRecordByChild as $f9cb07fd17b476cd$export$9612333da9eb2b55, fetchProblemReceipts as $f9cb07fd17b476cd$export$f9dd3c42a9fe0ec7, fetchPledgeTicketReceipt as $f9cb07fd17b476cd$export$912a34b09f6646f6, markReceiptFromPledgeTicket as $f9cb07fd17b476cd$export$cc5e46e81267707d, markReceipt as $f9cb07fd17b476cd$export$b31aae8a995874b9, fetchPrivateData as $61cd1791d5265689$export$c3bebe1b4bbebe25, createPrivateData as $61cd1791d5265689$export$9cc830020e353c38, savePrivateData as $61cd1791d5265689$export$fd09f53e2b56e2af, deletePrivateData as $61cd1791d5265689$export$4d99519ebd12d7e2, privateDataPath as $61cd1791d5265689$export$9319c406c799955a, createProduct as $e615241e8e7f6b5a$export$9c734a715e6666d0, makeProductFromChild as $e615241e8e7f6b5a$export$d4a471daa895146b, GoogleAPIProductMap as $e409a6a48e9bf1c0$export$4059922dac929494, JSONProductFeedToItemMapping as $63eb266a363bf697$export$8f68ab01093b41d6, squarespaceFeedTest as $63eb266a363bf697$export$c736243f342fb27b, summarizeUser as $aeb56590b68e5483$export$7822bd6f88cc1494, deleteUser as $aeb56590b68e5483$export$7d0f10f273c0438a, deleteUserById as $aeb56590b68e5483$export$1eb857e02349d4c8, createUser as $aeb56590b68e5483$export$3493b8991d49f558, buildUserRecords as $aeb56590b68e5483$export$2cccdc7105e5f652, updateUserByID as $aeb56590b68e5483$export$3c10411f5368919b, updateUser as $aeb56590b68e5483$export$e3ac7a5d19605772, knownUser as $aeb56590b68e5483$export$e1980ceaf83ba89, fetchUser as $aeb56590b68e5483$export$6cf10d295bf9320e, fetchUsers as $aeb56590b68e5483$export$2bb8333a9210be15, fetchUsersPaginated as $aeb56590b68e5483$export$db873fddb7c8685b, fetchAnonymousPaginated as $aeb56590b68e5483$export$8cc74b74b196db4a, fetchUserName as $aeb56590b68e5483$export$32d6fa31f0d8a28, fetchUserEmail as $aeb56590b68e5483$export$53755dbf7eaa9f86, userFromId as $aeb56590b68e5483$export$e1ca85ff667d230a, fetchUserPaymentById as $aeb56590b68e5483$export$85df9b940b8f75fd, fetchUserByEmail as $aeb56590b68e5483$export$747404941cf39e5f, fetchFullUser as $aeb56590b68e5483$export$3f848cf621800fba, fetchUserFromChild as $aeb56590b68e5483$export$127de379ac0a4e64, makeUserFromChild as $aeb56590b68e5483$export$a081e2667846200b, fetchLinkedItem as $9ab66828811feaa2$export$c89b632375228111, fetchSubItem as $9ab66828811feaa2$export$5a3279b4c9648f0f, fetchType as $9ab66828811feaa2$export$d39fdbaf795265a7, searchType as $9ab66828811feaa2$export$abd398b6018f8436, recordByIdAndType as $9ab66828811feaa2$export$921842c360078a33, typedRecordFromChild as $9ab66828811feaa2$export$9536a88c96a1be48, typedSortArray as $9ab66828811feaa2$export$c093435923294c4e, processItemType as $9ab66828811feaa2$export$19e2e60a6b9b3b01, formatLinkedItem as $9ab66828811feaa2$export$d2db84ed358b7054, summarizeItem as $9ab66828811feaa2$export$da804150202b2b8d, baseItem as $9ab66828811feaa2$export$31dbe01f37b7732f, baseForm as $9ab66828811feaa2$export$3ee853080fb51bea, dataForm as $9ab66828811feaa2$export$5af4610fbe1137fd, createForm as $9ab66828811feaa2$export$f681a8129d2e9d28, accountForm as $9ab66828811feaa2$export$c050911d30958522, saveForm as $9ab66828811feaa2$export$55369601a4bc1cda, updateChangeForm as $9ab66828811feaa2$export$24178ee8231de835, choicesForm as $9ab66828811feaa2$export$b9a757ca31a5f892, saveHost as $9baf0c6b8de436d9$export$cc9d030424d53c6d, simpleObjectCompare as $9baf0c6b8de436d9$export$f5d1cbac23428e02, formatItem as $9baf0c6b8de436d9$export$62f58f44692b37a8, compare as $9baf0c6b8de436d9$export$398604a469f7de9a, anyInAny as $9baf0c6b8de436d9$export$3145210430358e7, lesserOf as $9baf0c6b8de436d9$export$15b0b9b385c1f78e, largerOf as $9baf0c6b8de436d9$export$e375dfe918aae343, archiveRecord as $9baf0c6b8de436d9$export$f7bac52274eacccb, refPathToBaseRecord as $9baf0c6b8de436d9$export$b6b6e72408f809e2, bound as $9baf0c6b8de436d9$export$adf7c0fe6059d774, blindPush as $9baf0c6b8de436d9$export$884089555def93f8, addToArrayObject as $9baf0c6b8de436d9$export$7fecbbe7deb1a058, makeHexAsNeeded as $9baf0c6b8de436d9$export$36538c15a30486a1, PromiseQueueClass as $d403d40112d3687c$export$e869d3bcedcd9592} from "./InventoryLogic.0ac93278.js";
2
+ import $63yyG$leaddreamerfirebasewrapper, * as $63yyG$leaddreamerfirebasewrapper1 from "@leaddreamer/firebase-wrapper";
3
+ import * as $63yyG$leaddreamergenericutilities from "@leaddreamer/genericutilities";
4
+ import * as $63yyG$leaddreamerstaticforms from "@leaddreamer/staticforms";
5
+
6
+ /**
7
+ * Business Logic for the PaaS, wrapped
8
+ * around FirebaseWrapper, to be shared between Back and Front End.
9
+ * This particular library only provides the business "logic" - not browser
10
+ * services.
11
+ * @module InventoryLogic
12
+ */
13
+
14
+
15
+
16
+ async function $72513e635e9c5d70$export$2e2bcd8739ae039(firebase, config, thisLogger = null) {
17
+ (0, $63yyG$setLogger)(thisLogger);
18
+ return (0, $63yyG$leaddreamerfirebasewrapper)(firebase, config, thisLogger);
19
+ }
20
+
21
+
22
+ export {$72513e635e9c5d70$export$2e2bcd8739ae039 as default, $fefa9c41cb73ae0b$export$7d0a9b0c57bf84fd as UNSUBSCRIBEKEYS, $fefa9c41cb73ae0b$export$6890d3564b1f252d as ADDRESSES, $fefa9c41cb73ae0b$export$6f454e69bce3a691 as BUSINESS, $fefa9c41cb73ae0b$export$9547bc19be285f8c as BRANDS, $fefa9c41cb73ae0b$export$73f9b6e7973e6848 as MANAGEDBRANDS, $fefa9c41cb73ae0b$export$a338fcb90fb9aa37 as ORGANIZATIONS, $fefa9c41cb73ae0b$export$e72e4cc6cbc6ed26 as MANAGEDORGANIZATIONS, $fefa9c41cb73ae0b$export$398ebe85ebcaa41f as PRIVATEDATA, $fefa9c41cb73ae0b$export$e651cf32bc3f78a4 as BUSINESSDATA, $fefa9c41cb73ae0b$export$466d3e044dd15afb as LOGISTICS, $fefa9c41cb73ae0b$export$eb747620ce9c5e16 as COMMODITY, $fefa9c41cb73ae0b$export$695940e05bf65de8 as COMMODITIES, $fefa9c41cb73ae0b$export$4843f9d856059ffd as LINEITEM, $fefa9c41cb73ae0b$export$f079c6e3d7477fb7 as LINEITEMS, $fefa9c41cb73ae0b$export$32912c8ca0a712d8 as LABORRATES, $fefa9c41cb73ae0b$export$af7faffe10421f14 as MESSAGES, $fefa9c41cb73ae0b$export$e36553b0ff5db35a as PRODUCT, $fefa9c41cb73ae0b$export$4f02bea739260915 as PRODUCTS, $fefa9c41cb73ae0b$export$eaa266db8852871e as PAYMENT, $fefa9c41cb73ae0b$export$fadbf22af86be55a as PAYMENTS, $fefa9c41cb73ae0b$export$5f768699f44cc740 as CARDS, $fefa9c41cb73ae0b$export$88e60f3c1cd6ae1f as TRANSFERS, $fefa9c41cb73ae0b$export$1a96cd5ee36c0372 as FUNDAMENTALS, $fefa9c41cb73ae0b$export$e313271f328bdd7d as PAYOUTRATES, $fefa9c41cb73ae0b$export$6b29f6d6b64b8c84 as RATES, $fefa9c41cb73ae0b$export$af5764009005aa8e as MCC, $fefa9c41cb73ae0b$export$1bd589465335bb9d as BUSINESS_TYPE, $fefa9c41cb73ae0b$export$5eb0c58c8af5c758 as ACCESS, $fefa9c41cb73ae0b$export$d66f9cc3fc90ff67 as ACCESSTO, $fefa9c41cb73ae0b$export$f9865a0a7f208c15 as STAGE, $fefa9c41cb73ae0b$export$47007d96f3617630 as STAGES, $fefa9c41cb73ae0b$export$ca8f11448d1a1116 as MATERIAL, $fefa9c41cb73ae0b$export$b7815f33793b967 as MATERIALS, $fefa9c41cb73ae0b$export$cfa5730cd5118215 as RECEIPTS, $fefa9c41cb73ae0b$export$a037d132965e1c9f as UNITS, $fefa9c41cb73ae0b$export$97361b7a0c542045 as UNIT, $fefa9c41cb73ae0b$export$ff09b90989b21a8 as USER, $fefa9c41cb73ae0b$export$5a898dd3a28f57e9 as USERS, $fefa9c41cb73ae0b$export$1bfdae073fb20e6c as MARKUPS, $fefa9c41cb73ae0b$export$9e15ff8aa6bc996f as BASE, $fefa9c41cb73ae0b$export$d93f73eb990136ee as HIGHVALUE, $fefa9c41cb73ae0b$export$3ccfc9db9b7bf43f as SERVICE, $fefa9c41cb73ae0b$export$5d39addb0306dfd4 as FABRICATION, $fefa9c41cb73ae0b$export$75be49b93be74cb5 as WHOLESALE, $fefa9c41cb73ae0b$export$4466b7859aa06ffd as RETAIL, $fefa9c41cb73ae0b$export$22e7de231b4ec209 as PAYMENT_SUCCEEDED, $fefa9c41cb73ae0b$export$1d0cc9f143bfe9fc as CUSTOMER, $fefa9c41cb73ae0b$export$f437a67b3be18bd2 as CUSTOMERADDRESS, $fefa9c41cb73ae0b$export$fe909d0e7ec8aa88 as fakerJSON, $fefa9c41cb73ae0b$export$72581e25313abf48 as COMPONENT_RANGE, $fefa9c41cb73ae0b$export$d141374f02dd06d9 as COMPONENT_COUNT_RANGE, $fefa9c41cb73ae0b$export$dbb3cd0a4caa6254 as ISBN_LENGTH, $5e875028eacae923$export$5b4eaa31e9936f4c as AddressDefault, $5e875028eacae923$export$20ca2f03d61fd4de as AddressForm, $5e875028eacae923$export$688a09815a2d76e as AddressSelectForm, $5e875028eacae923$export$5003d738bf1e0422 as maplink, $5e875028eacae923$export$6f33ffc8bc2e0c30 as deleteAddress, $5e875028eacae923$export$2873378411ec704 as deleteAddressByIdAndParent, $5e875028eacae923$export$9ab766ce7f4c1f3c as formatAddress, $5e875028eacae923$export$f4e55b204eefc919 as saveAddress, $5e875028eacae923$export$c9b8cb1768a98d34 as fetchAddresses, $852adca6ae24886c$export$aeea048b1874c987 as fetchFullAccount, $852adca6ae24886c$export$a273004aea0035e0 as fetchBusinessData, $852adca6ae24886c$export$f81f3e9fae10e6db as accountPage, $852adca6ae24886c$export$ca4306a1b5762f0e as createBusinessData, $852adca6ae24886c$export$4bb3a8bbe6017432 as saveBusinessData, $852adca6ae24886c$export$b8447d25d283e6cc as deleteBusinessData, $852adca6ae24886c$export$8c755753b01b12f as businessDataPath, $852adca6ae24886c$export$1e2f140c95101692 as profileComplete, $852adca6ae24886c$export$f9e1390aa5941c3f as profileIncomplete, $852adca6ae24886c$export$89c9bbe01d357e36 as setOpenIssues, $852adca6ae24886c$export$45379be9a22c2a97 as clearOpenIssues, $21e76cc83a2e54db$export$1ec126d59f4db979 as updateCommodity, $21e76cc83a2e54db$export$9b6c8c0861c73078 as deleteCommodity, $21e76cc83a2e54db$export$51973e05c49d13bf as deleteCommodityById, $21e76cc83a2e54db$export$8566c10d5b97fabb as createCommodity, $21e76cc83a2e54db$export$8396fff7636b69e4 as updateCommodityByID, $21e76cc83a2e54db$export$3171ba3c6caae841 as knownCommodity, $21e76cc83a2e54db$export$dad83ce325511ae2 as fetchCommodity, $21e76cc83a2e54db$export$965ec48652f232c7 as fetchCommodities, $21e76cc83a2e54db$export$7ad949526eb4312b as fetchCommoditiesPaginated, $21e76cc83a2e54db$export$a621d0454ced7cc7 as fetchCommodityName, $367d3ba5e1953c5d$export$f235c8eeea8b793b as fetchFundamentals, $367d3ba5e1953c5d$export$1135a00cfd97f348 as fetchRates, $367d3ba5e1953c5d$export$e545b306de1ff740 as fetchPayoutRates, $367d3ba5e1953c5d$export$e12c451a9ec5cd7c as fetchMCCs, $367d3ba5e1953c5d$export$b0ed4f3c6bb2aee1 as fetchBusinessTypes, $618035149cc2f269$export$42fb5c11b332038a as deleteLineItem, $618035149cc2f269$export$9311bf4c650d8c56 as deleteLineItemById, $618035149cc2f269$export$9160586647000ce as createLineItem, $618035149cc2f269$export$682c51c4d54f1588 as knownLineItem, $618035149cc2f269$export$7c918f386d58a9a2 as fetchLineItem, $618035149cc2f269$export$93ad1b66295660db as fetchLineItems, $618035149cc2f269$export$d2c186a25126fe28 as fetchProductLineItems, $618035149cc2f269$export$e6123a92ff8533fc as paginateProductLineItems, $618035149cc2f269$export$218cbdd54a707ec7 as fetchLineItemName, $082cf3de7799191e$export$ede25c0a3a34c1c7 as MaterialChoices, $082cf3de7799191e$export$eeb76fa3f6b878ea as StageChoices, $b08abff958f5c1f9$export$1d949c62ce6e9407 as logMessageEvent, $b08abff958f5c1f9$export$fb609933e410a9ca as messageStatus, $b08abff958f5c1f9$export$404463f191aa95a1 as messageEvents, $f9cb07fd17b476cd$export$63d334e60537ba01 as ERROR_TYPES, $f9cb07fd17b476cd$export$25824cbb4751202b as PaymentDefault, $f9cb07fd17b476cd$export$1dc3fa0a524d39c3 as paymentDescriptor, $f9cb07fd17b476cd$export$a5734ae35e42ad51 as receiptDefault, $f9cb07fd17b476cd$export$e7759a8c3eb8b251 as createPaymentRecord, $f9cb07fd17b476cd$export$f034950df5cadf57 as savePaymentData, $f9cb07fd17b476cd$export$81ed014c52470b45 as fetchPayment, $f9cb07fd17b476cd$export$bf9a06d1f6c31bf4 as fetchPaymentByUser, $f9cb07fd17b476cd$export$e5cc111dc11d988 as addPaymentDescriptor, $f9cb07fd17b476cd$export$218f64344bb0d5b1 as savePaymentDescriptor, $f9cb07fd17b476cd$export$2edf51a087d55c34 as removePaymentDescriptor, $f9cb07fd17b476cd$export$719d384deb9d4a1d as fetchPDByFingerprint, $f9cb07fd17b476cd$export$e67def8f84ea0ce8 as fetchPaymentDescriptors, $f9cb07fd17b476cd$export$afe4f672b985ac26 as listPDSummaries, $f9cb07fd17b476cd$export$46296a85983d5325 as fetchLatestPDSummary, $f9cb07fd17b476cd$export$c10d531939e9952c as fetchPDByOwnerType, $f9cb07fd17b476cd$export$6495802cd4961871 as replaceDefaultPDSummary, $f9cb07fd17b476cd$export$4c730f12f97432c2 as saveReceiptRecord, $f9cb07fd17b476cd$export$9d597d6207d02073 as updateReceipt, $f9cb07fd17b476cd$export$16e7bde1d3e4806e as saveReceiptRecordByOwnerType, $f9cb07fd17b476cd$export$be8e05196fbdd05c as anyReceiptsByMonthStamp, $f9cb07fd17b476cd$export$4eb0e1031e4cb663 as fetchReceiptsFiltered, $f9cb07fd17b476cd$export$9612333da9eb2b55 as saveReceiptRecordByChild, $f9cb07fd17b476cd$export$f9dd3c42a9fe0ec7 as fetchProblemReceipts, $f9cb07fd17b476cd$export$912a34b09f6646f6 as fetchPledgeTicketReceipt, $f9cb07fd17b476cd$export$cc5e46e81267707d as markReceiptFromPledgeTicket, $f9cb07fd17b476cd$export$b31aae8a995874b9 as markReceipt, $61cd1791d5265689$export$c3bebe1b4bbebe25 as fetchPrivateData, $61cd1791d5265689$export$9cc830020e353c38 as createPrivateData, $61cd1791d5265689$export$fd09f53e2b56e2af as savePrivateData, $61cd1791d5265689$export$4d99519ebd12d7e2 as deletePrivateData, $61cd1791d5265689$export$9319c406c799955a as privateDataPath, $e615241e8e7f6b5a$export$9c734a715e6666d0 as createProduct, $e615241e8e7f6b5a$export$d4a471daa895146b as makeProductFromChild, $e409a6a48e9bf1c0$export$4059922dac929494 as GoogleAPIProductMap, $63eb266a363bf697$export$8f68ab01093b41d6 as JSONProductFeedToItemMapping, $63eb266a363bf697$export$c736243f342fb27b as squarespaceFeedTest, $aeb56590b68e5483$export$7822bd6f88cc1494 as summarizeUser, $aeb56590b68e5483$export$7d0f10f273c0438a as deleteUser, $aeb56590b68e5483$export$1eb857e02349d4c8 as deleteUserById, $aeb56590b68e5483$export$3493b8991d49f558 as createUser, $aeb56590b68e5483$export$2cccdc7105e5f652 as buildUserRecords, $aeb56590b68e5483$export$3c10411f5368919b as updateUserByID, $aeb56590b68e5483$export$e3ac7a5d19605772 as updateUser, $aeb56590b68e5483$export$e1980ceaf83ba89 as knownUser, $aeb56590b68e5483$export$6cf10d295bf9320e as fetchUser, $aeb56590b68e5483$export$2bb8333a9210be15 as fetchUsers, $aeb56590b68e5483$export$db873fddb7c8685b as fetchUsersPaginated, $aeb56590b68e5483$export$8cc74b74b196db4a as fetchAnonymousPaginated, $aeb56590b68e5483$export$32d6fa31f0d8a28 as fetchUserName, $aeb56590b68e5483$export$53755dbf7eaa9f86 as fetchUserEmail, $aeb56590b68e5483$export$e1ca85ff667d230a as userFromId, $aeb56590b68e5483$export$85df9b940b8f75fd as fetchUserPaymentById, $aeb56590b68e5483$export$747404941cf39e5f as fetchUserByEmail, $aeb56590b68e5483$export$3f848cf621800fba as fetchFullUser, $aeb56590b68e5483$export$127de379ac0a4e64 as fetchUserFromChild, $aeb56590b68e5483$export$a081e2667846200b as makeUserFromChild, $9ab66828811feaa2$export$c89b632375228111 as fetchLinkedItem, $9ab66828811feaa2$export$5a3279b4c9648f0f as fetchSubItem, $9ab66828811feaa2$export$d39fdbaf795265a7 as fetchType, $9ab66828811feaa2$export$abd398b6018f8436 as searchType, $9ab66828811feaa2$export$921842c360078a33 as recordByIdAndType, $9ab66828811feaa2$export$9536a88c96a1be48 as typedRecordFromChild, $9ab66828811feaa2$export$c093435923294c4e as typedSortArray, $9ab66828811feaa2$export$19e2e60a6b9b3b01 as processItemType, $9ab66828811feaa2$export$d2db84ed358b7054 as formatLinkedItem, $9ab66828811feaa2$export$da804150202b2b8d as summarizeItem, $9ab66828811feaa2$export$31dbe01f37b7732f as baseItem, $9ab66828811feaa2$export$3ee853080fb51bea as baseForm, $9ab66828811feaa2$export$5af4610fbe1137fd as dataForm, $9ab66828811feaa2$export$f681a8129d2e9d28 as createForm, $9ab66828811feaa2$export$c050911d30958522 as accountForm, $9ab66828811feaa2$export$55369601a4bc1cda as saveForm, $9ab66828811feaa2$export$24178ee8231de835 as updateChangeForm, $9ab66828811feaa2$export$b9a757ca31a5f892 as choicesForm, $9baf0c6b8de436d9$export$cc9d030424d53c6d as saveHost, $9baf0c6b8de436d9$export$f5d1cbac23428e02 as simpleObjectCompare, $9baf0c6b8de436d9$export$62f58f44692b37a8 as formatItem, $9baf0c6b8de436d9$export$398604a469f7de9a as compare, $9baf0c6b8de436d9$export$3145210430358e7 as anyInAny, $9baf0c6b8de436d9$export$15b0b9b385c1f78e as lesserOf, $9baf0c6b8de436d9$export$e375dfe918aae343 as largerOf, $9baf0c6b8de436d9$export$f7bac52274eacccb as archiveRecord, $9baf0c6b8de436d9$export$b6b6e72408f809e2 as refPathToBaseRecord, $9baf0c6b8de436d9$export$adf7c0fe6059d774 as bound, $9baf0c6b8de436d9$export$884089555def93f8 as blindPush, $9baf0c6b8de436d9$export$7fecbbe7deb1a058 as addToArrayObject, $9baf0c6b8de436d9$export$36538c15a30486a1 as makeHexAsNeeded, $d403d40112d3687c$export$e869d3bcedcd9592 as PromiseQueueClass};
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;AAAA;;;;;;CAMC;;;;AA6Cc,wDAA+B,QAAQ,EAAE,MAAM,EAAE,aAAa,IAAI;IAC/E,CAAA,GAAA,gBAAQ,EAAE;IACV,OAAO,CAAA,GAAA,iCAAc,EAAE,UAAU,QAAQ;AAC3C","sources":["index.js"],"sourcesContent":["/**\n * Business Logic for the PaaS, wrapped\n * around FirebaseWrapper, to be shared between Back and Front End.\n * This particular library only provides the business \"logic\" - not browser\n * services.\n * @module InventoryLogic\n */\n\nimport FirebaseWrapper from \"@leaddreamer/firebase-wrapper\";\nimport { setLogger } from \"@leaddreamer/genericutilities\";\n\n/**\n * only authDomain, databaseURL and storageBucket are present when\n * called from a cloud environment\n * @typedef {object} FirebaseConfigObject\n * @property {!string} apiKey required api Key from Firebase Console,\n * @property {!string} appId required app ID from Firebase Console\n * @property {!string} projectId required Firebase projectID from Firebase\n * console\n * @property {?string} authDomain (optional) auth domain from Firebase Console\n * @property {?string} databaseURL (optional) Firestore database URL from Firebase\n * console\n * @property {?string} storageBucket: (optional) URL of Firestore Storage Bucket\n * @property {?string} messagingSenderId: (optional) ID for Messaing service from\n * Firebase Console\n * @property {?string} measurementId: (optional) Analytics/Measurement ID from Firebase\n * Console\n * @property {?string} mapsAPIKey (optional) App ID for Google Maps API, from Google\n */\n\n/**\n * all-in-one wrapper for a solid subset of CLIENT-SIDE Firebase\n * functions, with a consistent interface. There is a parallel set for\n * ADMIN-SIDE functions as well.\n * Call/initialize with Firebase Configuration settings in an object as\n * described below\n * @param {Firebase} firebase\n * @param {FirebaseConfigObject} config Firebase Admin object\n * @param {callback} thisLogger\n * @returns {Promise.Firebase}\n *\n * @example\n * ```\n * //this specifically loads ALL the subsections, specifically for\n * //the Browser. See later (tbd) notes for NodeJS\n *\n * import FirebaseWrapper from \"@leaddreamer/firebase-wrapper\";\n * FirebaseWrapper(config); //see below\n * export * from \"@leaddreamer/firebase-wrapper\";\n * ```\n */\nexport default async function databasePromise(firebase, config, thisLogger = null) {\n setLogger(thisLogger);\n return FirebaseWrapper(firebase, config, thisLogger);\n}\n\nexport * from \"./business/index.js\";\nexport * from \"@leaddreamer/firebase-wrapper\";\nexport * from \"@leaddreamer/genericutilities\";\nexport * from \"@leaddreamer/staticforms\";\n"],"names":[],"version":3,"file":"index.js.map"}
package/index.js CHANGED
@@ -49,7 +49,7 @@ import { setLogger } from "@leaddreamer/genericutilities";
49
49
  * export * from "@leaddreamer/firebase-wrapper";
50
50
  * ```
51
51
  */
52
- export async function databasePromise(firebase, config, thisLogger = null) {
52
+ export default async function databasePromise(firebase, config, thisLogger = null) {
53
53
  setLogger(thisLogger);
54
54
  return FirebaseWrapper(firebase, config, thisLogger);
55
55
  }
@@ -58,4 +58,3 @@ export * from "./business/index.js";
58
58
  export * from "@leaddreamer/firebase-wrapper";
59
59
  export * from "@leaddreamer/genericutilities";
60
60
  export * from "@leaddreamer/staticforms";
61
- export default databasePromise;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=22"
5
5
  },
6
- "version": "0.0.3-beta.79",
6
+ "version": "0.0.3-beta.80",
7
7
  "description": "Business & Database Logic for Inventory Services",
8
8
  "repository": {
9
9
  "type": "git",
@@ -26,10 +26,13 @@
26
26
  "*.md",
27
27
  "**/*.md",
28
28
  "*.json",
29
- "**/*.json"
29
+ "**/*.json",
30
+ "./dist/*.*",
31
+ "./dist/**/*.*"
30
32
  ],
31
- "type": "module",
32
33
  "source": "index.js",
34
+ "browser": "dist/index.js",
35
+ "type": "module",
33
36
  "scripts": {
34
37
  "reinstall": "rm -rf node_modules && rm -rf dist && npm install",
35
38
  "mybuild": "parcel build --dist-dir './dist'",
@@ -51,6 +54,7 @@
51
54
  "@leaddreamer/genericutilities": "^0.2.7",
52
55
  "@leaddreamer/staticforms": "^1.1.0",
53
56
  "lodash.clonedeep": "4.5.0",
57
+ "dayjs": "1.11.23",
54
58
  "mathjs": "15.2.0",
55
59
  "uuid": "14.0.1"
56
60
  },