@kirby-tools/licensing 0.2.0 → 0.2.2
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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -16,8 +16,8 @@ interface LicenseModalResult {
|
|
|
16
16
|
}
|
|
17
17
|
declare function useLicense({ label, apiNamespace, }: LicenseOptions): {
|
|
18
18
|
isLocalhost: boolean;
|
|
19
|
-
assertActivationIntegrity: ({
|
|
20
|
-
|
|
19
|
+
assertActivationIntegrity: ({ component, license }: {
|
|
20
|
+
component: MaybeRef<ComponentPublicInstance | null | undefined>;
|
|
21
21
|
license: MaybeRef<boolean | string | License>;
|
|
22
22
|
}) => Promise<void>;
|
|
23
23
|
openLicenseModal: () => Promise<LicenseModalResult>;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ interface LicenseModalResult {
|
|
|
16
16
|
}
|
|
17
17
|
declare function useLicense({ label, apiNamespace, }: LicenseOptions): {
|
|
18
18
|
isLocalhost: boolean;
|
|
19
|
-
assertActivationIntegrity: ({
|
|
20
|
-
|
|
19
|
+
assertActivationIntegrity: ({ component, license }: {
|
|
20
|
+
component: MaybeRef<ComponentPublicInstance | null | undefined>;
|
|
21
21
|
license: MaybeRef<boolean | string | License>;
|
|
22
22
|
}) => Promise<void>;
|
|
23
23
|
openLicenseModal: () => Promise<LicenseModalResult>;
|
package/dist/index.mjs
CHANGED
|
@@ -122,15 +122,15 @@ function useLicense({
|
|
|
122
122
|
});
|
|
123
123
|
});
|
|
124
124
|
};
|
|
125
|
-
const assertActivationIntegrity = async ({
|
|
125
|
+
const assertActivationIntegrity = async ({ component, license }) => {
|
|
126
|
+
const _component = unref(component);
|
|
126
127
|
const _license = unref(license);
|
|
127
128
|
if (_license !== false) {
|
|
128
129
|
return;
|
|
129
130
|
}
|
|
130
131
|
await nextTick();
|
|
131
|
-
if (!
|
|
132
|
-
|
|
133
|
-
throw new Error(message);
|
|
132
|
+
if (!_component?.$el || window.getComputedStyle(_component.$el).display === "none" || window.getComputedStyle(_component.$el).visibility === "hidden") {
|
|
133
|
+
throw new Error("Are you trying to hide the activation buttons? Please buy a license.");
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
return {
|
package/package.json
CHANGED