@ianua/ianus-dataverse-react-fluentui8 1.0.10 → 1.0.11

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 +11 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -460,7 +460,7 @@ var DebugDialog = ({ publisherId, productId, environmentType, environmentIdentif
460
460
  dialogContentProps: dialogContentProps2,
461
461
  modalProps: modalProps2
462
462
  },
463
- /* @__PURE__ */ React3.createElement("p", null, /* @__PURE__ */ React3.createElement(import_react2.Text, null, /* @__PURE__ */ React3.createElement("b", null, "Current environment type:"), " ", environmentType), /* @__PURE__ */ React3.createElement(import_react2.Text, null, /* @__PURE__ */ React3.createElement("b", null, "Current environment identifier:"), " ", environmentIdentifier), /* @__PURE__ */ React3.createElement(import_react2.Text, null, /* @__PURE__ */ React3.createElement("b", null, "Target license identifier:"), " ", publisherId, "_", productId), /* @__PURE__ */ React3.createElement("br", null), /* @__PURE__ */ React3.createElement("br", null), isDataset(dataProvider) && /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(import_react2.Text, null, /* @__PURE__ */ React3.createElement("b", null, "Licenses in data provider:"), " ", dataProvider.sortedRecordIds.length), /* @__PURE__ */ React3.createElement("br", null), /* @__PURE__ */ React3.createElement(
463
+ /* @__PURE__ */ React3.createElement("p", { style: { display: "flex", flexDirection: "column" } }, /* @__PURE__ */ React3.createElement(import_react2.Text, null, /* @__PURE__ */ React3.createElement("b", null, "Current environment type:"), " ", environmentType), /* @__PURE__ */ React3.createElement(import_react2.Text, null, /* @__PURE__ */ React3.createElement("b", null, "Current environment identifier:"), " ", environmentIdentifier), /* @__PURE__ */ React3.createElement(import_react2.Text, null, /* @__PURE__ */ React3.createElement("b", null, "Target license identifier:"), " ", publisherId, "_", productId), /* @__PURE__ */ React3.createElement("br", null), /* @__PURE__ */ React3.createElement("br", null), isDataset(dataProvider) && /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(import_react2.Text, null, /* @__PURE__ */ React3.createElement("b", null, "Licenses in data provider:"), " ", dataProvider.sortedRecordIds.length), /* @__PURE__ */ React3.createElement("br", null), /* @__PURE__ */ React3.createElement(
464
464
  import_react2.DetailsList,
465
465
  {
466
466
  items: mapRecordsToItems(dataProvider),
@@ -534,6 +534,16 @@ var IanusGuard = ({ publisherId, productId, publicKeys, environmentType, environ
534
534
  const resolvedEnvironmentIdentifierRef = React4.useRef(null);
535
535
  const runValidation = React4.useCallback(() => __async(null, null, function* () {
536
536
  try {
537
+ if (resolvedEnvironmentIdentifierRef.current === null) {
538
+ resolvedEnvironmentIdentifierRef.current = isWebApi(environmentIdentifier) ? yield fetchOrganizationIdFromWebApi(environmentIdentifier) : environmentIdentifier;
539
+ }
540
+ if (!resolvedEnvironmentIdentifierRef.current) {
541
+ return {
542
+ isValid: false,
543
+ isTerminalError: true,
544
+ reason: `Failed to determine current environment identifier!`
545
+ };
546
+ }
537
547
  if (!productId) {
538
548
  return {
539
549
  isValid: false,
@@ -566,16 +576,6 @@ var IanusGuard = ({ publisherId, productId, publicKeys, environmentType, environ
566
576
  };
567
577
  }
568
578
  const licenseRecord = licenses[0];
569
- if (resolvedEnvironmentIdentifierRef.current === null) {
570
- resolvedEnvironmentIdentifierRef.current = isWebApi(environmentIdentifier) ? yield fetchOrganizationIdFromWebApi(environmentIdentifier) : environmentIdentifier;
571
- }
572
- if (!resolvedEnvironmentIdentifierRef.current) {
573
- return {
574
- isValid: false,
575
- isTerminalError: true,
576
- reason: `Failed to determine current environment identifier!`
577
- };
578
- }
579
579
  const validationResult = yield validateLicense(publisherId, productId, environmentType, resolvedEnvironmentIdentifierRef.current, publicKeysRef.current, licenseRecord.ian_key);
580
580
  return __spreadProps(__spreadValues({}, validationResult), {
581
581
  licenseId: licenseRecord.ian_licenseid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ianua/ianus-dataverse-react-fluentui8",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Client-side validation for Ianus Guard licenses in Dataverse using react and FluentUi v8",
5
5
  "scripts": {
6
6
  "build": "tsup"