@sc-360-v2/storefront-cms-library 0.0.4 → 0.0.6
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/README.md +7 -35
- package/dist/builder.js +1 -1
- package/dist/button.scss +139 -0
- package/dist/faq.scss +136 -0
- package/dist/functions.js +1 -0
- package/dist/htmlElement.js +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.js +1 -1
- package/dist/tab-panel.scss +93 -0
- package/dist/text-editor.scss +8 -0
- package/dist/types/builder/elements/button/index.d.ts +26 -0
- package/dist/types/builder/elements/code/index.d.ts +59 -0
- package/dist/types/builder/elements/common.d.ts +6 -0
- package/dist/types/builder/elements/faq/index.d.ts +30 -0
- package/dist/types/builder/elements/gallery-slider/index.d.ts +30 -0
- package/dist/types/builder/elements/grid/index.d.ts +4 -1
- package/dist/types/builder/elements/image/index.d.ts +4 -1
- package/dist/types/builder/elements/section/index.d.ts +8 -2
- package/dist/types/builder/elements/social/index.d.ts +36 -0
- package/dist/types/builder/elements/tab/index.d.ts +30 -0
- package/dist/types/builder/elements/table/index.d.ts +30 -0
- package/dist/types/builder/elements/text-editor/index.d.ts +4 -3
- package/dist/types/builder/elements/video/index.d.ts +30 -0
- package/dist/types/builder/enums/cssVariables.d.ts +361 -0
- package/dist/types/builder/enums/index.d.ts +39 -3
- package/dist/types/builder/index.d.ts +11 -1
- package/dist/types/builder/interfaces/global.d.ts +48 -0
- package/dist/types/builder/tools/element-edit/button.d.ts +25 -0
- package/dist/types/builder/tools/element-edit/code.d.ts +15 -0
- package/dist/types/builder/tools/element-edit/common.d.ts +65 -0
- package/dist/types/builder/tools/element-edit/embed.d.ts +13 -0
- package/dist/types/builder/tools/element-edit/faq.d.ts +41 -0
- package/dist/types/builder/tools/element-edit/gallery-slider.d.ts +81 -0
- package/dist/types/builder/tools/element-edit/grid.d.ts +15 -0
- package/dist/types/builder/tools/element-edit/image.d.ts +26 -0
- package/dist/types/builder/tools/element-edit/index.d.ts +16 -0
- package/dist/types/builder/tools/element-edit/section.d.ts +15 -0
- package/dist/types/builder/tools/element-edit/slideShowLayouter.d.ts +21 -0
- package/dist/types/builder/tools/element-edit/social.d.ts +62 -0
- package/dist/types/builder/tools/element-edit/table.d.ts +201 -0
- package/dist/types/builder/tools/element-edit/tabs.d.ts +158 -0
- package/dist/types/builder/tools/element-edit/text.d.ts +15 -0
- package/dist/types/builder/tools/element-edit/video.d.ts +74 -0
- package/dist/types/builder/utilities/global.d.ts +0 -2
- package/dist/types/global/attributes.d.ts +2 -2
- package/dist/types/global/style-properties.d.ts +3 -1
- package/dist/types/global/types.d.ts +6 -0
- package/dist/types/helper/helper-functions.d.ts +1 -0
- package/dist/types/html-elements/element-types.d.ts +11 -1
- package/dist/types/html-elements/elements.d.ts +3 -1
- package/dist/widget.scss +1 -0
- package/package.json +13 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { CMSIBCommonInterface } from "../../interfaces/global";
|
|
2
|
+
import { CMSElementEditPopupInterface, CMSElementEditPopupLayoutInterface } from "./common";
|
|
3
|
+
export interface SectionEditPopupInterface extends CMSElementEditPopupInterface {
|
|
4
|
+
}
|
|
5
|
+
interface ControlInterface {
|
|
6
|
+
value: string | boolean;
|
|
7
|
+
propertyType: string;
|
|
8
|
+
}
|
|
9
|
+
export interface VideoControlInterface {
|
|
10
|
+
selectorKey?: string;
|
|
11
|
+
autoplay?: CMSIBCommonInterface;
|
|
12
|
+
showControls?: ControlInterface;
|
|
13
|
+
positionType?: CMSIBCommonInterface;
|
|
14
|
+
loopVideo?: CMSIBCommonInterface;
|
|
15
|
+
loopCount?: CMSIBCommonInterface;
|
|
16
|
+
videoFile?: CMSIBCommonInterface;
|
|
17
|
+
pinTo?: CMSIBCommonInterface;
|
|
18
|
+
showVideoTitle?: CMSIBCommonInterface;
|
|
19
|
+
videoTitle?: CMSIBCommonInterface;
|
|
20
|
+
showVideoDescription?: CMSIBCommonInterface;
|
|
21
|
+
videoDescription?: CMSIBCommonInterface;
|
|
22
|
+
showCustomVideoThumbnail?: CMSIBCommonInterface;
|
|
23
|
+
thumbnailImage?: CMSIBCommonInterface;
|
|
24
|
+
image?: CMSIBCommonInterface;
|
|
25
|
+
videoPlayerText?: {
|
|
26
|
+
selectorKey?: string;
|
|
27
|
+
textPosition?: CMSIBCommonInterface;
|
|
28
|
+
textPositionOnTheImage?: CMSIBCommonInterface;
|
|
29
|
+
titleAndDescriptionAndAlignment?: CMSIBCommonInterface;
|
|
30
|
+
};
|
|
31
|
+
playPause?: {
|
|
32
|
+
selectorKey?: string;
|
|
33
|
+
icon?: CMSIBCommonInterface;
|
|
34
|
+
iconSize?: CMSIBCommonInterface;
|
|
35
|
+
iconColor?: CMSIBCommonInterface;
|
|
36
|
+
};
|
|
37
|
+
video?: {
|
|
38
|
+
selectorKey?: string;
|
|
39
|
+
backgroundColor?: CMSIBCommonInterface;
|
|
40
|
+
borderColor?: CMSIBCommonInterface;
|
|
41
|
+
borderStyle?: CMSIBCommonInterface;
|
|
42
|
+
borderPerSlide?: CMSIBCommonInterface;
|
|
43
|
+
showBorder?: CMSIBCommonInterface;
|
|
44
|
+
showShadow?: CMSIBCommonInterface;
|
|
45
|
+
shadowColor?: CMSIBCommonInterface;
|
|
46
|
+
blur?: CMSIBCommonInterface;
|
|
47
|
+
spread?: CMSIBCommonInterface;
|
|
48
|
+
angle?: CMSIBCommonInterface;
|
|
49
|
+
borderRadius?: CMSIBCommonInterface;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export interface CMSVideoEditPopupInterface<L = VideoControlInterface, C = VideoControlInterface, D = VideoControlInterface> {
|
|
53
|
+
layout?: L;
|
|
54
|
+
content?: C;
|
|
55
|
+
design?: D;
|
|
56
|
+
}
|
|
57
|
+
export declare enum VideoSelectorKeysEnum {
|
|
58
|
+
LAYOUT = "layout",
|
|
59
|
+
DESIGN = "design",
|
|
60
|
+
CONTENT = "content",
|
|
61
|
+
VIDEO_PLAYER_TEXT = "videoPlayerText",
|
|
62
|
+
PLAY_PAUSE = "playPause",
|
|
63
|
+
VIDEO = "video"
|
|
64
|
+
}
|
|
65
|
+
export interface SelectorKeys {
|
|
66
|
+
LAYOUT: string;
|
|
67
|
+
DESIGN: string;
|
|
68
|
+
CONTENT: string;
|
|
69
|
+
VIDEO_PLAYER_TEXT: string;
|
|
70
|
+
PLAY_PAUSE: string;
|
|
71
|
+
VIDEO: string;
|
|
72
|
+
}
|
|
73
|
+
export declare const getDefaultData: () => CMSVideoEditPopupInterface<VideoControlInterface & VideoControlInterface & VideoControlInterface & CMSElementEditPopupLayoutInterface>;
|
|
74
|
+
export {};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { CSSUnitOption } from "../interfaces/global";
|
|
2
2
|
export declare const CSSUnits: CSSUnitOption[];
|
|
3
|
-
export declare const stylesToString: (styles: any) => string;
|
|
4
|
-
export declare const loadNAppendStyleTag: (styleEle: any, id: string | number, parentEle?: null | any) => void;
|
|
5
3
|
declare const commonFunctions: any;
|
|
6
4
|
export default commonFunctions;
|
|
@@ -44,7 +44,7 @@ export interface CMSHTMLAttributes {
|
|
|
44
44
|
formNoValidate?: boolean;
|
|
45
45
|
formTarget?: string;
|
|
46
46
|
frameBorder?: number | string;
|
|
47
|
-
headers?:
|
|
47
|
+
headers?: any;
|
|
48
48
|
height?: number | string;
|
|
49
49
|
hidden?: boolean;
|
|
50
50
|
high?: number;
|
|
@@ -91,7 +91,7 @@ export interface CMSHTMLAttributes {
|
|
|
91
91
|
rel?: string;
|
|
92
92
|
required?: boolean;
|
|
93
93
|
reversed?: boolean;
|
|
94
|
-
rows?:
|
|
94
|
+
rows?: any;
|
|
95
95
|
rowSpan?: number;
|
|
96
96
|
sandbox?: string;
|
|
97
97
|
scope?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlignItemsValue, AlignSelfValue, BackgroundRepeatValue, BackgroundSizeValue, CursorValue, DisplayValue, FlexDirectionValue, FlexWrapValue, FontWeightValue, JustifyContentValue, JustifySelfValue, MarginValue, OverflowValue, PositionValue, TextAlignValue, VisibilityValue } from "./types";
|
|
1
|
+
import { AlignItemsValue, AlignSelfValue, BackgroundRepeatValue, BackgroundSizeValue, CursorValue, DisplayValue, FlexDirectionValue, FlexWrapValue, FontWeightValue, JustifyContentValue, JustifySelfValue, MarginValue, ObjectFitValue, ObjectPositionValue, OverflowValue, PositionValue, TextAlignValue, VisibilityValue } from "./types";
|
|
2
2
|
export interface CommonStyleProperties {
|
|
3
3
|
color?: string;
|
|
4
4
|
fontSize?: string;
|
|
@@ -44,4 +44,6 @@ export interface CommonStyleProperties {
|
|
|
44
44
|
transition?: string;
|
|
45
45
|
transform?: string;
|
|
46
46
|
visibility?: VisibilityValue;
|
|
47
|
+
objectFit?: ObjectFitValue;
|
|
48
|
+
objectPosition?: ObjectPositionValue;
|
|
47
49
|
}
|
|
@@ -28,3 +28,9 @@ export type SizeTypeValue = "inline" | "block" | string;
|
|
|
28
28
|
export type GlobalImageAttributes = "src" | "alt" | "width" | "height" | "loading" | "crossOrigin" | "referrerPolicy";
|
|
29
29
|
export type GlobalTextAttributes = "lang" | "dir" | "title" | "aria-label" | "aria-hidden" | "aria-live" | "tabIndex" | "role";
|
|
30
30
|
export type ImageBuilderAttributes = "dataDivType" | "dataType" | "dataElementType" | "dataWidgetType";
|
|
31
|
+
export type CMSEditControlsTypes = "Slider" | "Settings" | string;
|
|
32
|
+
export type GlobalVideoAttributes = "src" | "poster" | "controls" | "autoplay" | "loop" | "muted" | "preload" | "crossOrigin" | "playsInline";
|
|
33
|
+
export type CommonBuilderAttributes = "dataDivType" | "dataType" | "dataElementType" | "dataWidgetType";
|
|
34
|
+
export type GlobalTableAttributes = "cellPadding" | "cellSpacing" | "border" | "width" | "height" | "align" | "bgColor" | "frame" | "headers" | "rows" | "rules";
|
|
35
|
+
export type ObjectFitValue = "fill" | "contain" | "cover" | "none" | "scale-down" | string;
|
|
36
|
+
export type ObjectPositionValue = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dateTimeFormat: (dateString: string | number, isTime?: boolean, formatStr?: string, timeZone?: string, locale?: string) => string | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DetailedHTMLProps, HTMLAttributes, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, ButtonHTMLAttributes, SelectHTMLAttributes, OptionHTMLAttributes, ImgHTMLAttributes } from "react";
|
|
1
|
+
import { DetailedHTMLProps, HTMLAttributes, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, ButtonHTMLAttributes, SelectHTMLAttributes, OptionHTMLAttributes, ImgHTMLAttributes, VideoHTMLAttributes } from "react";
|
|
2
2
|
export interface H1Props extends DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> {
|
|
3
3
|
children?: ReactNode;
|
|
4
4
|
}
|
|
@@ -119,3 +119,13 @@ export interface DivProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElemen
|
|
|
119
119
|
export interface ImgProps extends DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
|
|
120
120
|
alt?: string;
|
|
121
121
|
}
|
|
122
|
+
export interface VideoProps extends VideoHTMLAttributes<HTMLVideoElement> {
|
|
123
|
+
children?: ReactNode;
|
|
124
|
+
tracks?: Array<{
|
|
125
|
+
kind: string;
|
|
126
|
+
srcLang: string;
|
|
127
|
+
src: string;
|
|
128
|
+
label?: string;
|
|
129
|
+
default?: boolean;
|
|
130
|
+
}>;
|
|
131
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from "react";
|
|
2
|
-
import { AddressProps, AProps, ArticleProps, AsideProps, BProps, ButtonProps, CodeProps, DetailsProps, DialogProps, DivProps, FooterProps, FormProps, H1Props, H2Props, H3Props, H4Props, H5Props, H6Props, HeaderProps, InputProps, IProps, KbdProps, LabelProps, MainProps, NavProps, OptionProps, PProps, PreProps, SectionProps, SelectProps, SmallProps, SpanProps, StrongProps, SummaryProps, TableCellProps, TableHeaderCellProps, TableProps, TableRowProps, TextareaProps, UProps, ImgProps } from "./element-types";
|
|
2
|
+
import { AddressProps, AProps, ArticleProps, AsideProps, BProps, ButtonProps, CodeProps, DetailsProps, DialogProps, DivProps, FooterProps, FormProps, H1Props, H2Props, H3Props, H4Props, H5Props, H6Props, HeaderProps, InputProps, IProps, KbdProps, LabelProps, MainProps, NavProps, OptionProps, PProps, PreProps, SectionProps, SelectProps, SmallProps, SpanProps, StrongProps, SummaryProps, TableCellProps, TableHeaderCellProps, TableProps, TableRowProps, TextareaProps, UProps, ImgProps, VideoProps } from "./element-types";
|
|
3
3
|
export declare const H1: FC<H1Props>;
|
|
4
4
|
export declare const H2: FC<H2Props>;
|
|
5
5
|
export declare const H3: FC<H3Props>;
|
|
@@ -31,6 +31,7 @@ export declare const Header: FC<HeaderProps>;
|
|
|
31
31
|
export declare const Footer: FC<FooterProps>;
|
|
32
32
|
export declare const Nav: FC<NavProps>;
|
|
33
33
|
export declare const Address: FC<AddressProps>;
|
|
34
|
+
export declare const Video: FC<VideoProps>;
|
|
34
35
|
export declare const Code: FC<CodeProps>;
|
|
35
36
|
export declare const Pre: FC<PreProps>;
|
|
36
37
|
export declare const Kbd: FC<KbdProps>;
|
|
@@ -83,5 +84,6 @@ declare const HTMLElements: {
|
|
|
83
84
|
U: React.FC<UProps>;
|
|
84
85
|
Div: React.FC<DivProps>;
|
|
85
86
|
Img: React.FC<ImgProps>;
|
|
87
|
+
Video: React.FC<VideoProps>;
|
|
86
88
|
};
|
|
87
89
|
export default HTMLElements;
|
package/dist/widget.scss
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sc-360-v2/storefront-cms-library",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"main": "/dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -24,8 +24,18 @@
|
|
|
24
24
|
"import": "./dist/builder.js",
|
|
25
25
|
"types": "./dist/types/builder/index.d.ts"
|
|
26
26
|
},
|
|
27
|
+
"./functions": {
|
|
28
|
+
"import": "./dist/functions.js",
|
|
29
|
+
"types": "./dist/types/helper/helper-functions.d.ts"
|
|
30
|
+
},
|
|
27
31
|
"./textEditor.scss": {
|
|
28
32
|
"import": "./dist/text-editor.scss"
|
|
33
|
+
},
|
|
34
|
+
"./tabPanel.scss": {
|
|
35
|
+
"import": "./dist/tab-panel.scss"
|
|
36
|
+
},
|
|
37
|
+
"./widget.scss": {
|
|
38
|
+
"import": "./dist/widget.scss"
|
|
29
39
|
}
|
|
30
40
|
},
|
|
31
41
|
"scripts": {
|
|
@@ -40,6 +50,8 @@
|
|
|
40
50
|
},
|
|
41
51
|
"dependencies": {
|
|
42
52
|
"@babel/runtime": "^7.25.6",
|
|
53
|
+
"date-fns": "^4.1.0",
|
|
54
|
+
"date-fns-tz": "^3.2.0",
|
|
43
55
|
"next": "^14.2.7",
|
|
44
56
|
"react": "^18",
|
|
45
57
|
"react-dom": "^18"
|