@enerex/template-studio 1.1.49 → 1.1.51
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/enerex-template-editor.es.js +1696 -24256
- package/dist/enerex-template-editor.umd.js +16 -2430
- package/dist/template-studio.css +1 -5
- package/dist/types/component/TemplateList/SortableTh.d.ts +11 -0
- package/dist/types/component/TemplateList/index.d.ts +14 -9
- package/dist/types/component/TemplateList/pagination/pagination.d.ts +9 -0
- package/dist/types/component/TemplateList/template-row.d.ts +14 -0
- package/dist/types/component/editor/index.d.ts +0 -2
- package/dist/types/component/editormodal/index.d.ts +2 -5
- package/dist/types/component/icons/down-icon.d.ts +6 -0
- package/dist/types/component/icons/ellipsis-vertical-icon.d.ts +6 -0
- package/dist/types/component/icons/serach-icon.d.ts +2 -0
- package/dist/types/component/icons/star-icon.d.ts +0 -2
- package/dist/types/component/icons/up-icon.d.ts +6 -0
- package/dist/types/component/template-form/index.d.ts +2 -4
- package/dist/types/index.d.ts +1 -2
- package/dist/types/queries/endpoints.d.ts +0 -1
- package/dist/types/queries/types.d.ts +0 -6
- package/dist/types/utils/utility.d.ts +0 -1
- package/package.json +2 -7
- package/dist/CraftLogoAnimated-krR7PJb-.mjs +0 -959
- package/dist/ExchangeLiveLogoAnimated-lh3AvtCi.mjs +0 -330
- package/dist/ExchangeLogoAnimated-BfEEO0we.mjs +0 -128
- package/dist/GeneratorLogoAnimated-C7Qjs1Aj.mjs +0 -47
- package/dist/InsightsLogoAnimated-BeYSz-hF.mjs +0 -180
- package/dist/PropellerLogoAnimated-EK-YLCSR.mjs +0 -20
- package/dist/SparkplugLogoAnimated-DG8-eD8V.mjs +0 -109
- package/dist/types/component/TemplateList/components/TemplateActionsCell.d.ts +0 -14
- package/dist/types/component/TemplateList/components/TemplateModal.d.ts +0 -13
- package/dist/types/component/TemplateList/components/TemplateStatusCell.d.ts +0 -8
- package/dist/types/component/TemplateList/components/TemplateTable.d.ts +0 -15
- package/dist/types/component/TemplateList/types.d.ts +0 -12
- package/dist/types/component/TemplateList/useTemplateController.d.ts +0 -20
- package/dist/types/component/icons/box-icon.d.ts +0 -2
- package/dist/types/component/icons/layers-icon.d.ts +0 -2
- package/dist/types/queries/get_template_settings.mutation.d.ts +0 -2
- package/dist/types/utils/stripoDomUtils.d.ts +0 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type SortKey = "name" | "category" | "type" | "subtype" | "companyName" | "lastUpdatedBy" | "lastUpdatedOn" | "templateId" | null;
|
|
3
|
+
interface SortableThProps {
|
|
4
|
+
label: string;
|
|
5
|
+
sortKey: NonNullable<SortKey>;
|
|
6
|
+
sortBy: SortKey;
|
|
7
|
+
sortOrder: "asc" | "desc";
|
|
8
|
+
onSort: (key: SortKey) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const SortableTh: React.FC<SortableThProps>;
|
|
11
|
+
export default SortableTh;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./template-list.css";
|
|
3
1
|
import type { ITemplatesList, ITemplateTypes } from "../../queries/types";
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export interface ChainNode {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
key: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ITemplateWithChain extends ITemplatesList {
|
|
8
|
+
categoryChain: ChainNode[];
|
|
9
|
+
}
|
|
10
|
+
interface TemplatesListPageProps {
|
|
6
11
|
templates: ITemplatesList[];
|
|
7
12
|
templateTypes: ITemplateTypes[];
|
|
8
|
-
onAdd: () => void;
|
|
9
|
-
onEdit: (t: ITemplateWithChain) => void;
|
|
10
|
-
onPreview: (t: ITemplateWithChain) => void;
|
|
11
13
|
onRefresh: () => void;
|
|
14
|
+
onAdd: () => void;
|
|
15
|
+
onEdit: (template: ITemplateWithChain) => void;
|
|
16
|
+
onPreview: (template: ITemplateWithChain) => void;
|
|
12
17
|
}
|
|
13
|
-
declare const
|
|
14
|
-
export default
|
|
18
|
+
declare const TemplatesListPage: React.FC<TemplatesListPageProps>;
|
|
19
|
+
export default TemplatesListPage;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface PaginationProps {
|
|
2
|
+
page: number;
|
|
3
|
+
pageSize: number;
|
|
4
|
+
totalRecords: number;
|
|
5
|
+
onPageChange: (page: number) => void;
|
|
6
|
+
onPageSizeChange: (size: number) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const Pagination: ({ page, pageSize, totalRecords, onPageChange, onPageSizeChange, }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default Pagination;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ITemplateWithChain } from ".";
|
|
2
|
+
interface TemplateRowProps {
|
|
3
|
+
template: ITemplateWithChain;
|
|
4
|
+
openActionId: string | null;
|
|
5
|
+
setOpenActionId: (id: string | null) => void;
|
|
6
|
+
onEdit: (template: ITemplateWithChain) => void;
|
|
7
|
+
onDuplicate: (template: ITemplateWithChain) => void;
|
|
8
|
+
onRemove: (template: ITemplateWithChain) => void;
|
|
9
|
+
onPreview: (template: ITemplateWithChain) => void;
|
|
10
|
+
onRefresh: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare function TemplateRow({ template, openActionId, setOpenActionId, onEdit, onDuplicate, onRemove, onPreview, onRefresh, }: TemplateRowProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const _default: import("react").MemoExoticComponent<typeof TemplateRow>;
|
|
14
|
+
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { stripoData } from "../../type/application-type";
|
|
2
|
-
import type { IProposalSettings } from "../../queries/types";
|
|
3
2
|
interface IproposalEditorProps {
|
|
4
3
|
templateHTML?: stripoData;
|
|
5
4
|
className?: string;
|
|
6
5
|
loading?: boolean;
|
|
7
6
|
onEditorInitialized?: (initialized: boolean) => void;
|
|
8
|
-
proposalSettings: IProposalSettings;
|
|
9
7
|
}
|
|
10
8
|
declare const ProposalEditor: React.FC<IproposalEditorProps>;
|
|
11
9
|
export default ProposalEditor;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import type { IProposalSettings, ITemplatesList, ITemplateTypes } from "../../queries/types";
|
|
1
|
+
import type { ITemplate, ITemplatesList, ITemplateTypes } from "../../queries/types";
|
|
3
2
|
import type { EditorModalVariant } from "../../type/application-type";
|
|
4
3
|
interface EditorModalProps {
|
|
5
4
|
show: boolean;
|
|
6
5
|
mode: EditorModalVariant;
|
|
7
|
-
template?:
|
|
6
|
+
template?: ITemplate;
|
|
8
7
|
templateTypes: ITemplateTypes[];
|
|
9
8
|
templateList: ITemplatesList[];
|
|
10
9
|
editorInitialized: boolean;
|
|
@@ -13,8 +12,6 @@ interface EditorModalProps {
|
|
|
13
12
|
onClose: () => void;
|
|
14
13
|
onSaved: () => void;
|
|
15
14
|
onRefresh: () => void;
|
|
16
|
-
isTemplateNameExists: (name: string, excludeId?: string) => boolean;
|
|
17
|
-
proposalSettings: IProposalSettings;
|
|
18
15
|
}
|
|
19
16
|
declare const EditorModal: React.FC<EditorModalProps>;
|
|
20
17
|
export default EditorModal;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ITemplate, ITemplatesList, ITemplateTypes } from "../../queries/types";
|
|
3
3
|
import type { EditorModalVariant } from "../../type/application-type";
|
|
4
4
|
interface ITemplateFormProps {
|
|
5
5
|
onReset: () => void;
|
|
@@ -7,11 +7,9 @@ interface ITemplateFormProps {
|
|
|
7
7
|
mode: EditorModalVariant;
|
|
8
8
|
templateTypes: ITemplateTypes[];
|
|
9
9
|
templateList: ITemplatesList[];
|
|
10
|
-
template?:
|
|
10
|
+
template?: ITemplate;
|
|
11
11
|
onRefresh: () => void;
|
|
12
12
|
closeEditorModal: () => void;
|
|
13
|
-
isTemplateNameExists: (name: string, excludeId?: string) => boolean;
|
|
14
|
-
proposalSettings: IProposalSettings;
|
|
15
13
|
}
|
|
16
14
|
declare const TemplateForm: React.FC<ITemplateFormProps>;
|
|
17
15
|
export default TemplateForm;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -15,12 +15,6 @@ export type ITemplatesList = {
|
|
|
15
15
|
html: string;
|
|
16
16
|
css?: string;
|
|
17
17
|
companyName?: string;
|
|
18
|
-
subject?: string;
|
|
19
|
-
proposalSettings: IProposalSettings;
|
|
20
|
-
};
|
|
21
|
-
export type IProposalSettings = {
|
|
22
|
-
primaryColor: string;
|
|
23
|
-
highlightColor: string;
|
|
24
18
|
};
|
|
25
19
|
export type ITemplate = {
|
|
26
20
|
templateID: string;
|
|
@@ -8,4 +8,3 @@ export declare function groupBy(array: any[]): {
|
|
|
8
8
|
}[];
|
|
9
9
|
export declare function groupByLevel(array: any[], level: number): any[];
|
|
10
10
|
export declare const formatToMMDDYY: (dateString?: string) => string;
|
|
11
|
-
export declare function applyThemeVariables(css: string, primary: string, highlight: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enerex/template-studio",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.51",
|
|
4
4
|
"main": "./dist/enerex-template-editor.umd.js",
|
|
5
5
|
"module": "./dist/enerex-template-editor.es.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -45,10 +45,5 @@
|
|
|
45
45
|
"vite",
|
|
46
46
|
"typescript",
|
|
47
47
|
"npm"
|
|
48
|
-
]
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@enerex/unified-ui-assets": "^1.0.61",
|
|
51
|
-
"@enerex/unified-ui-react": "^1.0.61",
|
|
52
|
-
"@enerex/unified-ui-utils": "^1.0.61"
|
|
53
|
-
}
|
|
48
|
+
]
|
|
54
49
|
}
|