@hortiview/modulebase 0.0.15687 → 0.0.16348
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/hooks/useOption.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { g as
|
|
3
|
-
import { useBasePropsStore as
|
|
4
|
-
import { fetchFromCommonApi as i, fetchFromModuleApi as
|
|
5
|
-
import { universalSelector as
|
|
6
|
-
const f = (
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
queryKey: [
|
|
10
|
-
queryFn: () =>
|
|
11
|
-
select: (
|
|
1
|
+
import { u as s } from "../useQuery-XBGd5Kep.js";
|
|
2
|
+
import { g as c } from "../api-D9Lmqe6S.js";
|
|
3
|
+
import { useBasePropsStore as t } from "../stores/BasePropsStore.js";
|
|
4
|
+
import { fetchFromCommonApi as i, fetchFromModuleApi as p } from "../utils/fetches.js";
|
|
5
|
+
import { universalSelector as u } from "../utils/helper.js";
|
|
6
|
+
const f = (o) => {
|
|
7
|
+
const n = t((r) => r.commonOptions), m = t((r) => r.currentLanguageId), e = c(n, o);
|
|
8
|
+
return s({
|
|
9
|
+
queryKey: [o, m],
|
|
10
|
+
queryFn: () => e ? Promise.resolve(e) : i(`${o}/dropdown`),
|
|
11
|
+
select: (r) => u(r)
|
|
12
12
|
});
|
|
13
|
-
},
|
|
14
|
-
const
|
|
15
|
-
return
|
|
16
|
-
queryKey: [
|
|
17
|
-
queryFn: () =>
|
|
18
|
-
select: (
|
|
19
|
-
enabled:
|
|
13
|
+
}, I = (o = !0) => {
|
|
14
|
+
const n = t((e) => e.moduleId), m = t((e) => e.organizationId);
|
|
15
|
+
return s({
|
|
16
|
+
queryKey: [n, m],
|
|
17
|
+
queryFn: () => p(`ModuleDependencies/${n}`),
|
|
18
|
+
select: (e) => u(e),
|
|
19
|
+
enabled: o
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
I as useModuleDependency,
|
|
24
24
|
f as useOption
|
|
25
25
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e = /* @__PURE__ */ ((a) => (a[a.Category = 0] = "Category", a[a.Requirement = 1] = "Requirement", a[a.Country = 2] = "Country", a[a.CountryCode = 3] = "CountryCode", a[a.Crop = 4] = "Crop", a[a.CropType = 5] = "CropType", a[a.CropVariety = 6] = "CropVariety", a[a.Currency = 7] = "Currency", a[a.DataAreaEntity = 8] = "DataAreaEntity", a[a.DataAreaGroup = 9] = "DataAreaGroup", a[a.FieldAutomationLevelType = 10] = "FieldAutomationLevelType", a[a.FieldCoverageType = 11] = "FieldCoverageType", a[a.FieldSecurityLevelType = 12] = "FieldSecurityLevelType", a[a.FieldShadingType = 13] = "FieldShadingType", a[a.FieldSowingType = 14] = "FieldSowingType", a[a.FieldSubstrateType = 15] = "FieldSubstrateType", a[a.FieldTechnologyType = 16] = "FieldTechnologyType", a[a.Gender = 17] = "Gender", a[a.GrowingEnvironment = 18] = "GrowingEnvironment", a[a.Language = 19] = "Language", a[a.ModuleHostingType = 20] = "ModuleHostingType", a[a.ModuleType = 21] = "ModuleType", a[a.ModuleState = 22] = "ModuleState", a[a.Region = 23] = "Region", a[a.Rootstock = 24] = "Rootstock", a[a.Salutation = 25] = "Salutation", a[a.SeasonState = 26] = "SeasonState", a[a.SensorName = 27] = "SensorName", a[a.SensorState = 28] = "SensorState", a[a.TermAndCondition = 29] = "TermAndCondition", a[a.PackageState = 30] = "PackageState", a[a.DocumentType = 31] = "DocumentType", a[a.ModuleFederationType = 32] = "ModuleFederationType", a[a.PaymentCycle = 33] = "PaymentCycle", a[a.PaymentMethod = 34] = "PaymentMethod", a[a.PlantFamily = 35] = "PlantFamily", a[a.AlertCriteriaName = 36] = "AlertCriteriaName", a))(e || {});
|
|
1
|
+
var e = /* @__PURE__ */ ((a) => (a[a.Category = 0] = "Category", a[a.Requirement = 1] = "Requirement", a[a.Country = 2] = "Country", a[a.CountryCode = 3] = "CountryCode", a[a.Crop = 4] = "Crop", a[a.CropType = 5] = "CropType", a[a.CropVariety = 6] = "CropVariety", a[a.Currency = 7] = "Currency", a[a.DataAreaEntity = 8] = "DataAreaEntity", a[a.DataAreaGroup = 9] = "DataAreaGroup", a[a.FieldAutomationLevelType = 10] = "FieldAutomationLevelType", a[a.FieldCoverageType = 11] = "FieldCoverageType", a[a.FieldSecurityLevelType = 12] = "FieldSecurityLevelType", a[a.FieldShadingType = 13] = "FieldShadingType", a[a.FieldSowingType = 14] = "FieldSowingType", a[a.FieldSubstrateType = 15] = "FieldSubstrateType", a[a.FieldTechnologyType = 16] = "FieldTechnologyType", a[a.Gender = 17] = "Gender", a[a.GrowingEnvironment = 18] = "GrowingEnvironment", a[a.Language = 19] = "Language", a[a.ModuleHostingType = 20] = "ModuleHostingType", a[a.ModuleType = 21] = "ModuleType", a[a.ModuleState = 22] = "ModuleState", a[a.Region = 23] = "Region", a[a.Rootstock = 24] = "Rootstock", a[a.Salutation = 25] = "Salutation", a[a.SeasonState = 26] = "SeasonState", a[a.SensorName = 27] = "SensorName", a[a.SensorState = 28] = "SensorState", a[a.TermAndCondition = 29] = "TermAndCondition", a[a.PackageState = 30] = "PackageState", a[a.DocumentType = 31] = "DocumentType", a[a.ModuleFederationType = 32] = "ModuleFederationType", a[a.PaymentCycle = 33] = "PaymentCycle", a[a.PaymentMethod = 34] = "PaymentMethod", a[a.PlantFamily = 35] = "PlantFamily", a[a.AlertCriteriaName = 36] = "AlertCriteriaName", a[a.ProductionPurpose = 37] = "ProductionPurpose", a))(e || {});
|
|
2
2
|
export {
|
|
3
3
|
e as CommonOptionType
|
|
4
4
|
};
|
package/dist/utils/helper.js
CHANGED
|
@@ -24,7 +24,7 @@ const h = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([
|
|
|
24
24
|
}, g = (r, e) => {
|
|
25
25
|
const n = u(r), t = u(e), i = n.pop(), o = t.pop(), s = l(n, t);
|
|
26
26
|
return s !== 0 ? s : i && o ? l(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
27
|
-
}, p = "0.0.
|
|
27
|
+
}, p = "0.0.16348", w = (r) => d.every((e) => v(e, r)), v = (r, e) => {
|
|
28
28
|
if (!e[r]) {
|
|
29
29
|
if (e.throwError)
|
|
30
30
|
return e.throwError(`Missing required prop: ${r}`, 404), !1;
|
package/package.json
CHANGED