@spteck/license-manager-react-components 1.0.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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/atoms/appGlobalState.d.ts +4 -0
- package/dist/components/RenderLabel/RenderLabel.d.ts +8 -0
- package/dist/components/RenderLabel/index.d.ts +2 -0
- package/dist/components/RenderLabel/useRenderLabelStylesStyles.d.ts +1 -0
- package/dist/components/customControlBar/CustomControlBar.d.ts +15 -0
- package/dist/components/customControlBar/index.d.ts +1 -0
- package/dist/components/dropDownField/DropDownField.d.ts +3 -0
- package/dist/components/dropDownField/IDropDownFieldProps.d.ts +15 -0
- package/dist/components/dropDownField/IOption.d.ts +8 -0
- package/dist/components/dropDownField/index.d.ts +3 -0
- package/dist/components/errorSVG/ErrorSVG.d.ts +2 -0
- package/dist/components/informationBar/InformationBar.d.ts +6 -0
- package/dist/components/licenseControl/LicenseControl.d.ts +10 -0
- package/dist/components/licenseControl/useLicenseControlStyles.d.ts +5 -0
- package/dist/components/licensePlaceHolder/LicensePlaceHolder.d.ts +8 -0
- package/dist/components/licensePlaceHolder/licensePlaceHolderStyles.d.ts +8 -0
- package/dist/components/licenseProvider/ILicenseProviderProps.d.ts +17 -0
- package/dist/components/licenseProvider/LicenseProvider.d.ts +3 -0
- package/dist/components/mailTo/Mailto.d.ts +12 -0
- package/dist/components/pricePlan/PricePlan.d.ts +9 -0
- package/dist/components/pricePlan/usePricePlansStyles.d.ts +12 -0
- package/dist/components/registerDialog/RegisterDialog.d.ts +10 -0
- package/dist/components/renderHeader/RenderHeader.d.ts +8 -0
- package/dist/components/renderHeader/index.d.ts +2 -0
- package/dist/components/renderHeader/useRenderHeaderStyles.d.ts +1 -0
- package/dist/components/showError/ShowError.d.ts +6 -0
- package/dist/components/trialLicense.ts/TrialLicense.d.ts +6 -0
- package/dist/components/trialLicense.ts/useTrialLicenseStyles.d.ts +5 -0
- package/dist/constants/constants.d.ts +3 -0
- package/dist/hooks/useUtils.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/license-manager-react-components.cjs.development.js +1433 -0
- package/dist/license-manager-react-components.cjs.development.js.map +1 -0
- package/dist/license-manager-react-components.cjs.production.min.js +2 -0
- package/dist/license-manager-react-components.cjs.production.min.js.map +1 -0
- package/dist/license-manager-react-components.esm.js +1406 -0
- package/dist/license-manager-react-components.esm.js.map +1 -0
- package/dist/loc/IStrings.d.ts +56 -0
- package/dist/loc/en.json +61 -0
- package/dist/models/EAppHostName.d.ts +7 -0
- package/dist/models/ETabsOptions.d.ts +5 -0
- package/dist/models/IGlobalState.d.ts +8 -0
- package/dist/zodSchemas/pricePlan.d.ts +47 -0
- package/package.json +79 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 João Mendes
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useRenderLabelStyles: () => Record<"labelContainer" | "iconStyles" | "item", string>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Theme } from '@fluentui/react-components';
|
|
3
|
+
export interface IControlItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
icon?: JSX.Element | string;
|
|
7
|
+
}
|
|
8
|
+
export interface ICustomControlBarProps {
|
|
9
|
+
items: IControlItem[];
|
|
10
|
+
selectedItemId: string | undefined;
|
|
11
|
+
onSelectedItem: (itemId: string) => void;
|
|
12
|
+
renderControl: (item: IControlItem, isSelected: boolean, onClick: () => void) => JSX.Element;
|
|
13
|
+
theme: Theme;
|
|
14
|
+
}
|
|
15
|
+
export declare const CustomControlBar: React.FunctionComponent<ICustomControlBarProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CustomControlBar';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IOption } from './IOption';
|
|
3
|
+
export interface IDropdownFieldProps {
|
|
4
|
+
options: IOption[];
|
|
5
|
+
onChange?: (selectedValue: string) => void;
|
|
6
|
+
renderItem?: (item: IOption) => JSX.Element;
|
|
7
|
+
validate?: (value: string) => string;
|
|
8
|
+
label?: string | JSX.Element;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
messageType?: "error" | "info" | "warning";
|
|
12
|
+
required?: boolean;
|
|
13
|
+
size?: "small" | "medium" | "large";
|
|
14
|
+
hint?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EStatus } from '@spteck/react-hooks-library';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface ILicenseControlProps {
|
|
4
|
+
licenseStatus: EStatus;
|
|
5
|
+
licenseType: string | undefined;
|
|
6
|
+
expiryDate: number | undefined;
|
|
7
|
+
onDismiss: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const LicenseControl: React.FC<ILicenseControlProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { EStatus } from '@spteck/react-hooks-library';
|
|
3
|
+
export interface ILicensePlaceHolderProps {
|
|
4
|
+
licenseStatus: EStatus;
|
|
5
|
+
licenseType: string | undefined;
|
|
6
|
+
expiryDate: number | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare const LicensePlaceHolder: React.FunctionComponent<ILicensePlaceHolderProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseComponentContext } from '@microsoft/sp-component-base';
|
|
3
|
+
import { EStatus } from '@spteck/react-hooks-library';
|
|
4
|
+
import { Theme } from '@fluentui/react-components';
|
|
5
|
+
export interface ILicenseProviderProps {
|
|
6
|
+
context: BaseComponentContext;
|
|
7
|
+
theme: Theme;
|
|
8
|
+
language?: string;
|
|
9
|
+
tenantId: string;
|
|
10
|
+
applicationId: string;
|
|
11
|
+
applicationName: string;
|
|
12
|
+
applicationIcon?: JSX.Element;
|
|
13
|
+
placeHolderText?: string;
|
|
14
|
+
showApps?: boolean;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
onLicenseStatusChange?: (status: EStatus) => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
|
+
interface MailtoProps<C extends ElementType> {
|
|
3
|
+
to: string;
|
|
4
|
+
from?: string;
|
|
5
|
+
subject?: string;
|
|
6
|
+
body?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
as?: C;
|
|
9
|
+
componentProps?: React.ComponentProps<C>;
|
|
10
|
+
}
|
|
11
|
+
export declare const Mailto: <C extends React.ElementType<any> = "a">(props: MailtoProps<C>) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Theme } from '@fluentui/react-components';
|
|
3
|
+
import { PricePlan, PricePlanCollection } from '../../zodSchemas/pricePlan';
|
|
4
|
+
export interface IPricePlanProps {
|
|
5
|
+
plans: PricePlanCollection;
|
|
6
|
+
onSelect: (pricePlan: PricePlan) => void;
|
|
7
|
+
theme?: Theme;
|
|
8
|
+
}
|
|
9
|
+
export declare const PricePlans: React.FunctionComponent<IPricePlanProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EStatus } from '@spteck/react-hooks-library';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IRegisterDialogProps {
|
|
4
|
+
licenseStatus: EStatus;
|
|
5
|
+
licenseType: string | undefined;
|
|
6
|
+
expiryDate: number | undefined;
|
|
7
|
+
open: boolean;
|
|
8
|
+
onDismiss: (update?: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const RegisterDialog: React.FC<IRegisterDialogProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface IRenderHeaderProps {
|
|
3
|
+
onDismiss: (open?: boolean) => void;
|
|
4
|
+
icon?: string | JSX.Element;
|
|
5
|
+
title: string | React.ReactNode;
|
|
6
|
+
description?: string | React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const RenderHeader: React.FunctionComponent<IRenderHeaderProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useRenderHeaderStyles: () => Record<"closeButton" | "divider" | "renderHeaderContent" | "renderHeaderHeader" | "renderHeaderFooter" | "renderHeaderBody" | "renderHeaderTitleContainer" | "renderHeaderTitle" | "renderHeaderDescription" | "dialogTitleAndDescriptionContainer", string>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const SUPPORT_EMAIL = "geral@spteck.com";
|
|
2
|
+
export declare const EMAIL_BODY_TEMPLATE = "Subject: Support Request from {0} {1}\n\nDear Support Team,\n\nI am reaching out to you because I am experiencing issues with my license. Here are my details:\n\n ** Tenant ID **: {2}\n ** Application ID **: {3} - {4}\n ** User First Name **: {5}\n ** User Last Name **: {6}\n ** Email**: {7}\n\n {8}\n\nBest regards,\n{9} {10}";
|
|
3
|
+
export declare const EMAIL_BODY_TEMPLATE_REQUEST_LICENSE = "Subject: Request for New License {0} {1}\n\nDear Support Team,\n\nI am just contacting you to request a license for the following product. Here are my details:\n\n ** Tenant ID **: {2}\n ** Application ID **: {3} - {4}\n ** User First Name **: {5}\n ** User Last Name **: {6}\n ** Email **: {7}\n\nBest regards,\n{8} {9}";
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED