@bahmni/services 0.0.1-dev.417 → 0.0.1-dev.418

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 (2) hide show
  1. package/dist/index.js +71 -71
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3880,22 +3880,22 @@ class Vt extends cn {
3880
3880
  };
3881
3881
  }
3882
3882
  }
3883
- const he = Vt.createInstance();
3884
- he.createInstance = Vt.createInstance;
3885
- he.createInstance;
3886
- he.dir;
3887
- he.init;
3888
- he.loadResources;
3889
- he.reloadResources;
3890
- he.use;
3891
- he.changeLanguage;
3892
- he.getFixedT;
3893
- he.t;
3894
- he.exists;
3895
- he.setDefaultNamespace;
3896
- he.hasLoadedNamespace;
3897
- he.loadNamespaces;
3898
- he.loadLanguages;
3883
+ const de = Vt.createInstance();
3884
+ de.createInstance = Vt.createInstance;
3885
+ de.createInstance;
3886
+ de.dir;
3887
+ de.init;
3888
+ de.loadResources;
3889
+ de.reloadResources;
3890
+ de.use;
3891
+ de.changeLanguage;
3892
+ de.getFixedT;
3893
+ de.t;
3894
+ de.exists;
3895
+ de.setDefaultNamespace;
3896
+ de.hasLoadedNamespace;
3897
+ de.loadNamespaces;
3898
+ de.loadLanguages;
3899
3899
  const {
3900
3900
  slice: bd,
3901
3901
  forEach: vd
@@ -4247,11 +4247,11 @@ const kd = "en", Ui = "NG_TRANSLATE_LANG_KEY", Md = (t, e) => Xl + `${t}/locales
4247
4247
  };
4248
4248
  }, IE = async (t) => {
4249
4249
  const e = un(), r = await Fd(e, t);
4250
- return he.isInitialized ? (Object.entries(r).forEach(([n, s]) => {
4250
+ return de.isInitialized ? (Object.entries(r).forEach(([n, s]) => {
4251
4251
  Object.entries(s).forEach(([o, a]) => {
4252
- he.addResourceBundle(n, o, a, !0, !0);
4252
+ de.addResourceBundle(n, o, a, !0, !0);
4253
4253
  });
4254
- }), he.options.defaultNS = t, he.options.fallbackNS = Object.keys(he.store.data[he.language] ?? {})) : await he.use(Mi).use(Lc).init({
4254
+ }), de.options.defaultNS = t, de.options.fallbackNS = Object.keys(de.store.data[de.language] ?? {})) : await de.use(Mi).use(Lc).init({
4255
4255
  fallbackLng: "en",
4256
4256
  ns: [t],
4257
4257
  defaultNS: t,
@@ -4266,7 +4266,7 @@ const kd = "en", Ui = "NG_TRANSLATE_LANG_KEY", Md = (t, e) => Xl + `${t}/locales
4266
4266
  react: {
4267
4267
  useSuspense: !0
4268
4268
  }
4269
- }), he;
4269
+ }), de;
4270
4270
  };
4271
4271
  function DE() {
4272
4272
  const t = qt(null), e = qt(null), r = Tn(async () => {
@@ -4446,18 +4446,18 @@ async function o0() {
4446
4446
  const e = Os(t), r = await H(Gd(e));
4447
4447
  return !r.results || r.results.length === 0 ? null : r.results[0];
4448
4448
  } catch {
4449
- throw new Error(he.t("ERROR_FETCHING_USER_DETAILS"));
4449
+ throw new Error(de.t("ERROR_FETCHING_USER_DETAILS"));
4450
4450
  }
4451
4451
  }
4452
4452
  const Rt = () => {
4453
4453
  const t = Rs(Ii) ?? null;
4454
4454
  if (!t)
4455
- throw new Error(he.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
4455
+ throw new Error(de.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
4456
4456
  const e = JSON.parse(
4457
4457
  Os(t)
4458
4458
  );
4459
4459
  if (!e.uuid)
4460
- throw new Error(he.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
4460
+ throw new Error(de.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
4461
4461
  return e;
4462
4462
  }, a0 = async () => (await H(Jd("commons"))).find(
4463
4463
  (r) => r.property === Qd
@@ -5414,7 +5414,7 @@ function Qi(t, e) {
5414
5414
  const r = ie(t, e?.in), n = +Ge(r, e) - +Ih(r, e);
5415
5415
  return Math.round(n / Yi) + 1;
5416
5416
  }
5417
- function fe(t, e) {
5417
+ function he(t, e) {
5418
5418
  const r = t < 0 ? "-" : "", n = Math.abs(t).toString().padStart(e, "0");
5419
5419
  return r + n;
5420
5420
  }
@@ -5422,16 +5422,16 @@ const ze = {
5422
5422
  // Year
5423
5423
  y(t, e) {
5424
5424
  const r = t.getFullYear(), n = r > 0 ? r : 1 - r;
5425
- return fe(e === "yy" ? n % 100 : n, e.length);
5425
+ return he(e === "yy" ? n % 100 : n, e.length);
5426
5426
  },
5427
5427
  // Month
5428
5428
  M(t, e) {
5429
5429
  const r = t.getMonth();
5430
- return e === "M" ? String(r + 1) : fe(r + 1, 2);
5430
+ return e === "M" ? String(r + 1) : he(r + 1, 2);
5431
5431
  },
5432
5432
  // Day of the month
5433
5433
  d(t, e) {
5434
- return fe(t.getDate(), e.length);
5434
+ return he(t.getDate(), e.length);
5435
5435
  },
5436
5436
  // AM or PM
5437
5437
  a(t, e) {
@@ -5450,26 +5450,26 @@ const ze = {
5450
5450
  },
5451
5451
  // Hour [1-12]
5452
5452
  h(t, e) {
5453
- return fe(t.getHours() % 12 || 12, e.length);
5453
+ return he(t.getHours() % 12 || 12, e.length);
5454
5454
  },
5455
5455
  // Hour [0-23]
5456
5456
  H(t, e) {
5457
- return fe(t.getHours(), e.length);
5457
+ return he(t.getHours(), e.length);
5458
5458
  },
5459
5459
  // Minute
5460
5460
  m(t, e) {
5461
- return fe(t.getMinutes(), e.length);
5461
+ return he(t.getMinutes(), e.length);
5462
5462
  },
5463
5463
  // Second
5464
5464
  s(t, e) {
5465
- return fe(t.getSeconds(), e.length);
5465
+ return he(t.getSeconds(), e.length);
5466
5466
  },
5467
5467
  // Fraction of second
5468
5468
  S(t, e) {
5469
5469
  const r = e.length, n = t.getMilliseconds(), s = Math.trunc(
5470
5470
  n * Math.pow(10, r - 3)
5471
5471
  );
5472
- return fe(s, e.length);
5472
+ return he(s, e.length);
5473
5473
  }
5474
5474
  }, ft = {
5475
5475
  midnight: "midnight",
@@ -5508,14 +5508,14 @@ const ze = {
5508
5508
  const s = Ns(t, n), o = s > 0 ? s : 1 - s;
5509
5509
  if (e === "YY") {
5510
5510
  const a = o % 100;
5511
- return fe(a, 2);
5511
+ return he(a, 2);
5512
5512
  }
5513
- return e === "Yo" ? r.ordinalNumber(o, { unit: "year" }) : fe(o, e.length);
5513
+ return e === "Yo" ? r.ordinalNumber(o, { unit: "year" }) : he(o, e.length);
5514
5514
  },
5515
5515
  // ISO week-numbering year
5516
5516
  R: function(t, e) {
5517
5517
  const r = Gi(t);
5518
- return fe(r, e.length);
5518
+ return he(r, e.length);
5519
5519
  },
5520
5520
  // Extended year. This is a single number designating the year of this calendar system.
5521
5521
  // The main difference between `y` and `u` localizers are B.C. years:
@@ -5528,7 +5528,7 @@ const ze = {
5528
5528
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
5529
5529
  u: function(t, e) {
5530
5530
  const r = t.getFullYear();
5531
- return fe(r, e.length);
5531
+ return he(r, e.length);
5532
5532
  },
5533
5533
  // Quarter
5534
5534
  Q: function(t, e, r) {
@@ -5539,7 +5539,7 @@ const ze = {
5539
5539
  return String(n);
5540
5540
  // 01, 02, 03, 04
5541
5541
  case "QQ":
5542
- return fe(n, 2);
5542
+ return he(n, 2);
5543
5543
  // 1st, 2nd, 3rd, 4th
5544
5544
  case "Qo":
5545
5545
  return r.ordinalNumber(n, { unit: "quarter" });
@@ -5571,7 +5571,7 @@ const ze = {
5571
5571
  return String(n);
5572
5572
  // 01, 02, 03, 04
5573
5573
  case "qq":
5574
- return fe(n, 2);
5574
+ return he(n, 2);
5575
5575
  // 1st, 2nd, 3rd, 4th
5576
5576
  case "qo":
5577
5577
  return r.ordinalNumber(n, { unit: "quarter" });
@@ -5629,7 +5629,7 @@ const ze = {
5629
5629
  return String(n + 1);
5630
5630
  // 01, 02, ..., 12
5631
5631
  case "LL":
5632
- return fe(n + 1, 2);
5632
+ return he(n + 1, 2);
5633
5633
  // 1st, 2nd, ..., 12th
5634
5634
  case "Lo":
5635
5635
  return r.ordinalNumber(n + 1, { unit: "month" });
@@ -5652,12 +5652,12 @@ const ze = {
5652
5652
  // Local week of year
5653
5653
  w: function(t, e, r, n) {
5654
5654
  const s = Qi(t, n);
5655
- return e === "wo" ? r.ordinalNumber(s, { unit: "week" }) : fe(s, e.length);
5655
+ return e === "wo" ? r.ordinalNumber(s, { unit: "week" }) : he(s, e.length);
5656
5656
  },
5657
5657
  // ISO week of year
5658
5658
  I: function(t, e, r) {
5659
5659
  const n = Ji(t);
5660
- return e === "Io" ? r.ordinalNumber(n, { unit: "week" }) : fe(n, e.length);
5660
+ return e === "Io" ? r.ordinalNumber(n, { unit: "week" }) : he(n, e.length);
5661
5661
  },
5662
5662
  // Day of the month
5663
5663
  d: function(t, e, r) {
@@ -5666,7 +5666,7 @@ const ze = {
5666
5666
  // Day of year
5667
5667
  D: function(t, e, r) {
5668
5668
  const n = Nh(t);
5669
- return e === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : fe(n, e.length);
5669
+ return e === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : he(n, e.length);
5670
5670
  },
5671
5671
  // Day of week
5672
5672
  E: function(t, e, r) {
@@ -5708,7 +5708,7 @@ const ze = {
5708
5708
  return String(o);
5709
5709
  // Padded numerical value
5710
5710
  case "ee":
5711
- return fe(o, 2);
5711
+ return he(o, 2);
5712
5712
  // 1st, 2nd, ..., 7th
5713
5713
  case "eo":
5714
5714
  return r.ordinalNumber(o, { unit: "day" });
@@ -5745,7 +5745,7 @@ const ze = {
5745
5745
  return String(o);
5746
5746
  // Padded numerical value
5747
5747
  case "cc":
5748
- return fe(o, e.length);
5748
+ return he(o, e.length);
5749
5749
  // 1st, 2nd, ..., 7th
5750
5750
  case "co":
5751
5751
  return r.ordinalNumber(o, { unit: "day" });
@@ -5782,7 +5782,7 @@ const ze = {
5782
5782
  return String(s);
5783
5783
  // 02
5784
5784
  case "ii":
5785
- return fe(s, e.length);
5785
+ return he(s, e.length);
5786
5786
  // 2nd
5787
5787
  case "io":
5788
5788
  return r.ordinalNumber(s, { unit: "day" });
@@ -5905,12 +5905,12 @@ const ze = {
5905
5905
  // Hour [0-11]
5906
5906
  K: function(t, e, r) {
5907
5907
  const n = t.getHours() % 12;
5908
- return e === "Ko" ? r.ordinalNumber(n, { unit: "hour" }) : fe(n, e.length);
5908
+ return e === "Ko" ? r.ordinalNumber(n, { unit: "hour" }) : he(n, e.length);
5909
5909
  },
5910
5910
  // Hour [1-24]
5911
5911
  k: function(t, e, r) {
5912
5912
  let n = t.getHours();
5913
- return n === 0 && (n = 24), e === "ko" ? r.ordinalNumber(n, { unit: "hour" }) : fe(n, e.length);
5913
+ return n === 0 && (n = 24), e === "ko" ? r.ordinalNumber(n, { unit: "hour" }) : he(n, e.length);
5914
5914
  },
5915
5915
  // Minute
5916
5916
  m: function(t, e, r) {
@@ -5991,22 +5991,22 @@ const ze = {
5991
5991
  // Seconds timestamp
5992
5992
  t: function(t, e, r) {
5993
5993
  const n = Math.trunc(+t / 1e3);
5994
- return fe(n, e.length);
5994
+ return he(n, e.length);
5995
5995
  },
5996
5996
  // Milliseconds timestamp
5997
5997
  T: function(t, e, r) {
5998
- return fe(+t, e.length);
5998
+ return he(+t, e.length);
5999
5999
  }
6000
6000
  };
6001
6001
  function xo(t, e = "") {
6002
6002
  const r = t > 0 ? "-" : "+", n = Math.abs(t), s = Math.trunc(n / 60), o = n % 60;
6003
- return o === 0 ? r + String(s) : r + String(s) + e + fe(o, 2);
6003
+ return o === 0 ? r + String(s) : r + String(s) + e + he(o, 2);
6004
6004
  }
6005
6005
  function Lo(t, e) {
6006
- return t % 60 === 0 ? (t > 0 ? "-" : "+") + fe(Math.abs(t) / 60, 2) : tt(t, e);
6006
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + he(Math.abs(t) / 60, 2) : tt(t, e);
6007
6007
  }
6008
6008
  function tt(t, e = "") {
6009
- const r = t > 0 ? "-" : "+", n = Math.abs(t), s = fe(Math.trunc(n / 60), 2), o = fe(n % 60, 2);
6009
+ const r = t > 0 ? "-" : "+", n = Math.abs(t), s = he(Math.trunc(n / 60), 2), o = he(n % 60, 2);
6010
6010
  return r + s + e + o;
6011
6011
  }
6012
6012
  const ko = (t, e) => {
@@ -8763,7 +8763,7 @@ const B_ = [
8763
8763
  "partial"
8764
8764
  ], Lg = "All Orderables", kg = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", Mg = "LabSet", Ug = "http://fhir.bahmni.org/ext/ValueSet/concept-class", Y_ = ["orderTypes"], Fg = async () => await Im(Lg), $s = async () => await H(kg), qg = (t) => {
8765
8765
  let e = t.display ?? "Unknown investigation";
8766
- return pc(t) === Mg && (e += ` (${he.t("INVESTIGATION_PANEL")})`), e;
8766
+ return pc(t) === Mg && (e += ` (${de.t("INVESTIGATION_PANEL")})`), e;
8767
8767
  }, jg = (t) => {
8768
8768
  const e = /* @__PURE__ */ new Map();
8769
8769
  return t.results.forEach((r) => {
@@ -10133,10 +10133,10 @@ function zg() {
10133
10133
  }
10134
10134
  return xt;
10135
10135
  }
10136
- var Le = {}, de = {}, Qo;
10136
+ var Le = {}, fe = {}, Qo;
10137
10137
  function Me() {
10138
- if (Qo) return de;
10139
- Qo = 1, Object.defineProperty(de, "__esModule", { value: !0 }), de.validateUnion = de.validateArray = de.usePattern = de.callValidateCode = de.schemaProperties = de.allSchemaProperties = de.noPropertyInData = de.propertyInData = de.isOwnProperty = de.hasPropFunc = de.reportMissingProp = de.checkMissingProp = de.checkReportMissingProp = void 0;
10138
+ if (Qo) return fe;
10139
+ Qo = 1, Object.defineProperty(fe, "__esModule", { value: !0 }), fe.validateUnion = fe.validateArray = fe.usePattern = fe.callValidateCode = fe.schemaProperties = fe.allSchemaProperties = fe.noPropertyInData = fe.propertyInData = fe.isOwnProperty = fe.hasPropFunc = fe.reportMissingProp = fe.checkMissingProp = fe.checkReportMissingProp = void 0;
10140
10140
  const t = te(), e = oe(), r = Je(), n = oe();
10141
10141
  function s(h, b) {
10142
10142
  const { gen: A, data: y, it: S } = h;
@@ -10144,15 +10144,15 @@ function Me() {
10144
10144
  h.setParams({ missingProperty: (0, t._)`${b}` }, !0), h.error();
10145
10145
  });
10146
10146
  }
10147
- de.checkReportMissingProp = s;
10147
+ fe.checkReportMissingProp = s;
10148
10148
  function o({ gen: h, data: b, it: { opts: A } }, y, S) {
10149
10149
  return (0, t.or)(...y.map((N) => (0, t.and)(l(h, b, N, A.ownProperties), (0, t._)`${S} = ${N}`)));
10150
10150
  }
10151
- de.checkMissingProp = o;
10151
+ fe.checkMissingProp = o;
10152
10152
  function a(h, b) {
10153
10153
  h.setParams({ missingProperty: b }, !0), h.error();
10154
10154
  }
10155
- de.reportMissingProp = a;
10155
+ fe.reportMissingProp = a;
10156
10156
  function i(h) {
10157
10157
  return h.scopeValue("func", {
10158
10158
  // eslint-disable-next-line @typescript-eslint/unbound-method
@@ -10160,29 +10160,29 @@ function Me() {
10160
10160
  code: (0, t._)`Object.prototype.hasOwnProperty`
10161
10161
  });
10162
10162
  }
10163
- de.hasPropFunc = i;
10163
+ fe.hasPropFunc = i;
10164
10164
  function c(h, b, A) {
10165
10165
  return (0, t._)`${i(h)}.call(${b}, ${A})`;
10166
10166
  }
10167
- de.isOwnProperty = c;
10167
+ fe.isOwnProperty = c;
10168
10168
  function u(h, b, A, y) {
10169
10169
  const S = (0, t._)`${b}${(0, t.getProperty)(A)} !== undefined`;
10170
10170
  return y ? (0, t._)`${S} && ${c(h, b, A)}` : S;
10171
10171
  }
10172
- de.propertyInData = u;
10172
+ fe.propertyInData = u;
10173
10173
  function l(h, b, A, y) {
10174
10174
  const S = (0, t._)`${b}${(0, t.getProperty)(A)} === undefined`;
10175
10175
  return y ? (0, t.or)(S, (0, t.not)(c(h, b, A))) : S;
10176
10176
  }
10177
- de.noPropertyInData = l;
10177
+ fe.noPropertyInData = l;
10178
10178
  function f(h) {
10179
10179
  return h ? Object.keys(h).filter((b) => b !== "__proto__") : [];
10180
10180
  }
10181
- de.allSchemaProperties = f;
10181
+ fe.allSchemaProperties = f;
10182
10182
  function w(h, b) {
10183
10183
  return f(b).filter((A) => !(0, e.alwaysValidSchema)(h, b[A]));
10184
10184
  }
10185
- de.schemaProperties = w;
10185
+ fe.schemaProperties = w;
10186
10186
  function T({ schemaCode: h, data: b, it: { gen: A, topSchemaRef: y, schemaPath: S, errorPath: N }, it: x }, M, j, q) {
10187
10187
  const Y = q ? (0, t._)`${h}, ${b}, ${y}${S}` : b, K = [
10188
10188
  [r.default.instancePath, (0, t.strConcat)(r.default.instancePath, N)],
@@ -10194,7 +10194,7 @@ function Me() {
10194
10194
  const G = (0, t._)`${Y}, ${A.object(...K)}`;
10195
10195
  return j !== t.nil ? (0, t._)`${M}.call(${j}, ${G})` : (0, t._)`${M}(${G})`;
10196
10196
  }
10197
- de.callValidateCode = T;
10197
+ fe.callValidateCode = T;
10198
10198
  const O = (0, t._)`new RegExp`;
10199
10199
  function P({ gen: h, it: { opts: b } }, A) {
10200
10200
  const y = b.unicodeRegExp ? "u" : "", { regExp: S } = b.code, N = S(A, y);
@@ -10204,7 +10204,7 @@ function Me() {
10204
10204
  code: (0, t._)`${S.code === "new RegExp" ? O : (0, n.useFunc)(h, S)}(${A}, ${y})`
10205
10205
  });
10206
10206
  }
10207
- de.usePattern = P;
10207
+ fe.usePattern = P;
10208
10208
  function m(h) {
10209
10209
  const { gen: b, data: A, keyword: y, it: S } = h, N = b.name("valid");
10210
10210
  if (S.allErrors) {
@@ -10223,7 +10223,7 @@ function Me() {
10223
10223
  });
10224
10224
  }
10225
10225
  }
10226
- de.validateArray = m;
10226
+ fe.validateArray = m;
10227
10227
  function p(h) {
10228
10228
  const { gen: b, schema: A, keyword: y, it: S } = h;
10229
10229
  if (!Array.isArray(A))
@@ -10240,7 +10240,7 @@ function Me() {
10240
10240
  b.assign(x, (0, t._)`${x} || ${M}`), h.mergeValidEvaluated(Y, M) || b.if((0, t.not)(x));
10241
10241
  })), h.result(x, () => h.reset(), () => h.error(!0));
10242
10242
  }
10243
- return de.validateUnion = p, de;
10243
+ return fe.validateUnion = p, fe;
10244
10244
  }
10245
10245
  var Xo;
10246
10246
  function Yg() {
@@ -13919,14 +13919,14 @@ const Wn = /* @__PURE__ */ new Map(), _w = async (t) => {
13919
13919
  if (!o)
13920
13920
  return {
13921
13921
  logged: !1,
13922
- error: he.t(Nf.UNKNOWN_EVENT_TYPE, {
13922
+ error: de.t(Nf.UNKNOWN_EVENT_TYPE, {
13923
13923
  eventType: e
13924
13924
  })
13925
13925
  };
13926
13926
  const a = {
13927
13927
  patientUuid: t,
13928
13928
  eventType: o.eventType,
13929
- message: r ? `${o.message}~${JSON.stringify(r)}` : o.message,
13929
+ message: r ? `${de.t(o.message)}~${JSON.stringify(r)}` : de.t(o.message),
13930
13930
  module: n
13931
13931
  };
13932
13932
  return await we(Pf, a), { logged: !0 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/services",
3
- "version": "0.0.1-dev.417",
3
+ "version": "0.0.1-dev.418",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",