@zeniai/client-epic-state 5.2.94-betaNB1 → 5.2.95

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.
@@ -116,15 +116,13 @@ export const getInvoicingQboAccountOptions = createSelector([
116
116
  * Normalises an account-type name for comparison. The config's mapping kinds
117
117
  * name QuickBooks types the way QuickBooks displays them ("Other Current
118
118
  * Asset", "Expense"), while the accounting service uses snake_case and
119
- * sometimes pluralises ("other_current_assets", "expenses"). Comparing the
120
- * normalised, de-pluralised forms keeps a picker from silently emptying because
121
- * of a trailing "s".
119
+ * sometimes pluralises ("other_current_assets", "expenses"), and QuickBooks
120
+ * itself sends PascalCase sub types ("SalesTaxPayable"). Comparing the
121
+ * separator-free, de-pluralised forms keeps a picker from silently emptying
122
+ * because of a trailing "s", and an exclusion from missing on casing.
122
123
  */
123
124
  const normalizeAccountTypeName = (value) => {
124
- const normalized = value
125
- .trim()
126
- .toLowerCase()
127
- .replace(/[^a-z0-9]+/g, '_');
125
+ const normalized = value.toLowerCase().replace(/[^a-z0-9]+/g, '');
128
126
  // Singularise so "Other Current Liability" meets `other_current_liabilities`
129
127
  // and "Expense" meets `expenses`. `-ies` needs its own case: stripping the
130
128
  // trailing "s" alone would leave "liabilitie", matching nothing.
@@ -125,15 +125,13 @@ exports.getInvoicingQboAccountOptions = (0, toolkit_1.createSelector)([
125
125
  * Normalises an account-type name for comparison. The config's mapping kinds
126
126
  * name QuickBooks types the way QuickBooks displays them ("Other Current
127
127
  * Asset", "Expense"), while the accounting service uses snake_case and
128
- * sometimes pluralises ("other_current_assets", "expenses"). Comparing the
129
- * normalised, de-pluralised forms keeps a picker from silently emptying because
130
- * of a trailing "s".
128
+ * sometimes pluralises ("other_current_assets", "expenses"), and QuickBooks
129
+ * itself sends PascalCase sub types ("SalesTaxPayable"). Comparing the
130
+ * separator-free, de-pluralised forms keeps a picker from silently emptying
131
+ * because of a trailing "s", and an exclusion from missing on casing.
131
132
  */
132
133
  const normalizeAccountTypeName = (value) => {
133
- const normalized = value
134
- .trim()
135
- .toLowerCase()
136
- .replace(/[^a-z0-9]+/g, '_');
134
+ const normalized = value.toLowerCase().replace(/[^a-z0-9]+/g, '');
137
135
  // Singularise so "Other Current Liability" meets `other_current_liabilities`
138
136
  // and "Expense" meets `expenses`. `-ies` needs its own case: stripping the
139
137
  // trailing "s" alone would leave "liabilitie", matching nothing.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.2.94-betaNB1",
3
+ "version": "5.2.95",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",