@finsys/core 1.2.0 → 1.3.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.
package/dist/index.cjs CHANGED
@@ -46,6 +46,7 @@ __export(index_exports, {
46
46
  generateSurveyJson: () => generateSurveyJson,
47
47
  getBaseCategories: () => getBaseCategories,
48
48
  getBaseFieldNames: () => getBaseFieldNames,
49
+ getBaseFieldSpecMap: () => getBaseFieldSpecMap,
49
50
  getBaseFieldSpecs: () => getBaseFieldSpecs,
50
51
  getCategoryName: () => getCategoryName,
51
52
  getPastMonthLabel: () => getPastMonthLabel,
@@ -9051,6 +9052,20 @@ function getBaseFieldSpecs() {
9051
9052
  function getBaseCategories() {
9052
9053
  return BASE_FIELD_SPECS.categories;
9053
9054
  }
9055
+ var cachedFieldSpecMap = null;
9056
+ function getBaseFieldSpecMap() {
9057
+ if (cachedFieldSpecMap) {
9058
+ return cachedFieldSpecMap;
9059
+ }
9060
+ const map = /* @__PURE__ */ new Map();
9061
+ for (const field of BASE_FIELD_SPECS.fields) {
9062
+ if (field.name) {
9063
+ map.set(field.name, field);
9064
+ }
9065
+ }
9066
+ cachedFieldSpecMap = map;
9067
+ return cachedFieldSpecMap;
9068
+ }
9054
9069
  var cachedFieldNames = null;
9055
9070
  function getBaseFieldNames() {
9056
9071
  if (cachedFieldNames) {
@@ -9086,6 +9101,7 @@ function getBaseFieldNames() {
9086
9101
  generateSurveyJson,
9087
9102
  getBaseCategories,
9088
9103
  getBaseFieldNames,
9104
+ getBaseFieldSpecMap,
9089
9105
  getBaseFieldSpecs,
9090
9106
  getCategoryName,
9091
9107
  getPastMonthLabel,