jamespot-react-components 1.0.255 → 1.0.257
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 +48 -4
- package/build/jamespot-react-components.js +1010 -1234
- package/build/jamespot-react-components.js.LICENSE.txt +10 -0
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Common/DashedFocusBorder.d.ts +5 -4
- package/build/src/components/Common/DashedFocusBorder.stories.d.ts +6 -0
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.style.d.ts +2 -1
- package/build/src/components/JRCButton/JRCButton.stories.d.ts +13 -0
- package/build/src/components/JRCButtonDropdown/JRCButtonDropdown.stories.d.ts +5 -0
- package/build/src/components/JRCHtml/JRCHtml.d.ts +1 -1
- package/build/src/components/JRCIcon/JRCIcon.stories.d.ts +8 -0
- package/build/src/components/JRCLoader/JRCLoader.stories.d.ts +6 -0
- package/build/src/components/JRCTooltip/JRCTooltip.stories.d.ts +11 -0
- package/build/src/components/JRCTypography/JRCTypography.stories.d.ts +5 -0
- package/build/src/components/Widgets/JRCWidgetQuickSurvey/JRCWidgetQuickSurveyResponse.d.ts +2 -1
- package/build/src/index.d.ts +15 -17
- package/build/src/styles/theme.d.ts +1 -0
- package/build/src/styles/utils.d.ts +1 -2
- package/build/src/types.d.ts +1 -2
- package/build/src/utils/utils.date.d.ts +8 -0
- package/externals.json +0 -1
- package/jest.config.ts +4 -1
- package/package.json +23 -7
- package/build/src/components/Form/Input/Deprecated/JRCFormDateTime/JRCFormDateTime.d.ts +0 -44
- package/build/src/components/Widgets/utils.test.d.ts +0 -1
- package/build/src/hooks/useMoment.d.ts +0 -4
- package/build/src/utils/utils.files.test.d.ts +0 -1
- /package/build/src/components/JRCAvatar/{JRCAvatar.test.d.ts → JRCAvatar.oldtest.d.ts} +0 -0
- /package/build/src/components/{JRCButton/JRCButton.test.d.ts → JRCHtml/JRCHtml.oldtest.d.ts} +0 -0
- /package/build/src/components/{JRCHtml/JRCHtml.test.d.ts → JRCImg/JRCImg.oldtest.d.ts} +0 -0
- /package/build/src/components/{JRCImg/JRCImg.test.d.ts → JRCPagination/JRCPagination.oldtest.d.ts} +0 -0
- /package/build/src/components/{JRCPagination/JRCPagination.test.d.ts → Widgets/utils.oldtest.d.ts} +0 -0
- /package/build/src/{components/JRCTypography/JRCTypography.test.d.ts → utils/utils.files.oldtest.d.ts} +0 -0
|
@@ -3,12 +3,13 @@ export type DashedFocusBorderProps = {
|
|
|
3
3
|
offset?: string;
|
|
4
4
|
focusColor?: string;
|
|
5
5
|
};
|
|
6
|
+
export type DashedFocusBorderNormalProps = {
|
|
7
|
+
offset?: string;
|
|
8
|
+
color?: Colors;
|
|
9
|
+
};
|
|
6
10
|
/**
|
|
7
11
|
* The HTML element this styled is applied to should be selectable
|
|
8
12
|
* @props offset offset of the dashed focus border, default to 2px
|
|
9
13
|
*/
|
|
10
|
-
export declare const DashedFocusBorder: (args?:
|
|
11
|
-
offset?: string;
|
|
12
|
-
color?: Colors;
|
|
13
|
-
}) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("styled-components").DefaultTheme>>;
|
|
14
|
+
export declare const DashedFocusBorder: (args?: DashedFocusBorderNormalProps) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("styled-components").DefaultTheme>>;
|
|
14
15
|
export declare const DashedFocusBorderAbsolute: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<DashedFocusBorderProps, import("styled-components").DefaultTheme>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
2
|
+
import { DashedFocusBorderNormalProps, DashedFocusBorderProps } from './DashedFocusBorder';
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const CustomContainer: StoryFn<DashedFocusBorderNormalProps>;
|
|
6
|
+
export declare const AbsoluteDashedBorder: StoryFn<DashedFocusBorderProps>;
|
|
@@ -318,9 +318,10 @@ export declare const IconBefore: import("styled-components").StyledComponent<({
|
|
|
318
318
|
export declare const TimesIndicator: ({ onClick }: {
|
|
319
319
|
onClick?: (() => void) | undefined;
|
|
320
320
|
}) => React.JSX.Element;
|
|
321
|
-
export declare const DropdownIndicator: ({ loading, open, onClick, sizeVariant, }: {
|
|
321
|
+
export declare const DropdownIndicator: ({ loading, open, onClick, sizeVariant, disabled, }: {
|
|
322
322
|
loading: boolean;
|
|
323
323
|
open: boolean;
|
|
324
324
|
onClick?: (() => void) | undefined;
|
|
325
325
|
sizeVariant?: "s" | "md" | undefined;
|
|
326
|
+
disabled?: boolean | undefined;
|
|
326
327
|
}) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { JRCButtonProps } from './JRCButton';
|
|
3
|
+
import { JRCValidationButton, JRCValidationButtonProps } from './JRCValidationButton';
|
|
4
|
+
import { Meta, StoryFn, StoryObj } from '@storybook/react';
|
|
5
|
+
declare const meta: Meta;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const ButtonWithChildren: StoryFn<JRCButtonProps>;
|
|
8
|
+
export declare const ButtonWithLabel: StoryFn<JRCButtonProps>;
|
|
9
|
+
export declare const AllButtons: () => React.JSX.Element;
|
|
10
|
+
export declare const ValidationButton: StoryFn<JRCValidationButtonProps>;
|
|
11
|
+
type Story = StoryObj<typeof JRCValidationButton>;
|
|
12
|
+
export declare const ValidationButtonClicked: Story;
|
|
13
|
+
export declare const ValidationButtonClickReset: Story;
|
|
@@ -7,6 +7,6 @@ export type JRCHtmlProps = LimitLinesProps & {
|
|
|
7
7
|
};
|
|
8
8
|
export declare const JRCHtml: React.ForwardRefExoticComponent<LimitLinesProps & {
|
|
9
9
|
className?: string | undefined;
|
|
10
|
-
as?: "symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "tbody" | "td" | "template" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "g" | "circle" | "big" | "keygen" | "menuitem" | "noindex" | "param" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "
|
|
10
|
+
as?: "symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "tbody" | "td" | "template" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "g" | "filter" | "circle" | "big" | "keygen" | "menuitem" | "noindex" | "param" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
|
|
11
11
|
__html: string | undefined;
|
|
12
12
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { JRCIcon } from './JRCIcon';
|
|
3
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
4
|
+
declare const meta: Meta;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof JRCIcon>;
|
|
7
|
+
export declare const Primary: Story;
|
|
8
|
+
export declare const AllIcons: () => React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JRCTooltip, JRCTooltipProps } from './JRCTooltip';
|
|
2
|
+
import { Meta, StoryFn, StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const Default: StoryFn<JRCTooltipProps>;
|
|
6
|
+
export declare const SmallTooltip: StoryFn<JRCTooltipProps>;
|
|
7
|
+
export declare const LargeTooltipWithTitle: StoryFn<JRCTooltipProps>;
|
|
8
|
+
export declare const LargeTooltipWithoutTitle: StoryFn<JRCTooltipProps>;
|
|
9
|
+
export declare const LargeTooltipWithButton: StoryFn<JRCTooltipProps>;
|
|
10
|
+
type Story = StoryObj<typeof JRCTooltip>;
|
|
11
|
+
export declare const TooltipWithButtonTest: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jUserLittle, WidgetLegacyMixedBoolean } from 'jamespot-user-api';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare const JRCWidgetQuickSurveyResponse: ({ anonymize, limit, userResponses, canSeeResponses, isClosed, setOpenUsersModal, }: {
|
|
3
|
+
export declare const JRCWidgetQuickSurveyResponse: ({ anonymize, limit, userResponses, canSeeResponses, isClosed, setOpenUsersModal, handleResponseClick, }: {
|
|
4
4
|
anonymize?: boolean | 0 | 1 | undefined;
|
|
5
5
|
limit: number;
|
|
6
6
|
userResponses: {
|
|
@@ -10,4 +10,5 @@ export declare const JRCWidgetQuickSurveyResponse: ({ anonymize, limit, userResp
|
|
|
10
10
|
canSeeResponses?: boolean | 0 | 1 | undefined;
|
|
11
11
|
isClosed?: boolean | 0 | 1 | undefined;
|
|
12
12
|
setOpenUsersModal: () => void;
|
|
13
|
+
handleResponseClick: () => void;
|
|
13
14
|
}) => React.JSX.Element;
|
package/build/src/index.d.ts
CHANGED
|
@@ -28,18 +28,17 @@ export { default as Resources } from './translation';
|
|
|
28
28
|
export { JRC404 } from './components/404';
|
|
29
29
|
export { BETA_JRCDoubleClick } from './components/Beta/BETA_JRCDoubleClick/BETA_JRCDoubleClick';
|
|
30
30
|
export { BETA_JRCDragAndDrop } from './components/Beta/BETA_JRCDragAndDrop/BETA_JRCDragAndDrop';
|
|
31
|
-
export { JRCDriveMSGraph } from './components/Drives/JRCDriveMSGraph';
|
|
32
|
-
export { JRCDriveDropbox } from './components/Drives/JRCDriveDropbox';
|
|
33
|
-
export { JRCConditionalWrapper } from './components/Common/JRCConditionalWrapper';
|
|
34
31
|
export { DashedFocusBorder } from './components/Common/DashedFocusBorder';
|
|
32
|
+
export { JRCConditionalWrapper } from './components/Common/JRCConditionalWrapper';
|
|
35
33
|
export { JRCDraggingPlaceholder } from './components/Common/JRCDraggingPlaceholder';
|
|
34
|
+
export { JRCDriveDropbox } from './components/Drives/JRCDriveDropbox';
|
|
35
|
+
export { JRCDriveMSGraph } from './components/Drives/JRCDriveMSGraph';
|
|
36
36
|
export { ClickAwayListener } from './components/Form/Common/ClickAwayListener';
|
|
37
37
|
export { JRCFormAutocompleteAudienceField } from './components/Form/Input/Deprecated/JRCFormAutocomplete/JRCFormAutocompleteAudience';
|
|
38
38
|
export { JRCFormAutocompleteCommunityField } from './components/Form/Input/Deprecated/JRCFormAutocomplete/JRCFormAutocompleteCommunity';
|
|
39
39
|
export { JRCFormAutocompleteTaxonomyField } from './components/Form/Input/Deprecated/JRCFormAutocomplete/JRCFormAutocompleteTaxonomy';
|
|
40
40
|
export { JRCFormCheckbox } from './components/Form/Input/Deprecated/JRCFormCheckbox/JRCFormCheckbox';
|
|
41
41
|
export { JRCFormColorField } from './components/Form/Input/Deprecated/JRCFormColor/JRCFormColor';
|
|
42
|
-
export { JRCFormDatetimeField } from './components/Form/Input/Deprecated/JRCFormDateTime/JRCFormDateTime';
|
|
43
42
|
export { JRCFormEmailField } from './components/Form/Input/Deprecated/JRCFormEmail/JRCFormEmail';
|
|
44
43
|
export { JRCFormInputFileField } from './components/Form/Input/Deprecated/JRCFormFile/JRCFormFile';
|
|
45
44
|
export { JRCFormInputImage, JRCFormInputImageField, } from './components/Form/Input/Deprecated/JRCFormImage/JRCFormImage';
|
|
@@ -53,9 +52,10 @@ export { JRCFormSendAlertField } from './components/Form/Input/Deprecated/JRCFor
|
|
|
53
52
|
export { JRCFormTextField } from './components/Form/Input/Deprecated/JRCFormText/JRCFormText';
|
|
54
53
|
export { JRCFormTextarea, JRCFormTextareaField, } from './components/Form/Input/Deprecated/JRCFormTextarea/JRCFormTextarea';
|
|
55
54
|
export { JRCFormUrlField } from './components/Form/Input/Deprecated/JRCFormURL/JRCFormUrl';
|
|
55
|
+
export { JRCCheckbox } from './components/Form/Input/JRCInputCheckbox/components/JRCCheckbox';
|
|
56
56
|
export { JRCInputCheckbox, JRCInputCheckboxRaw } from './components/Form/Input/JRCInputCheckbox/JRCInputCheckbox';
|
|
57
|
+
export { JRCInputReorderCheckbox } from './components/Form/Input/JRCInputCheckbox/JRCInputReorderCheckbox';
|
|
57
58
|
export { JRCInputToggle, JRCInputToggleRaw } from './components/Form/Input/JRCInputCheckbox/JRCInputToggle';
|
|
58
|
-
export { JRCCheckbox } from './components/Form/Input/JRCInputCheckbox/components/JRCCheckbox';
|
|
59
59
|
export { JRCInputColor } from './components/Form/Input/JRCInputColor/JRCInputColor';
|
|
60
60
|
export { JRCInputColorRaw } from './components/Form/Input/JRCInputColor/JRCInputColorRaw';
|
|
61
61
|
export { JRCInputDate } from './components/Form/Input/JRCInputDate/JRCInputDate';
|
|
@@ -64,14 +64,13 @@ export { JRCInputEmail } from './components/Form/Input/JRCInputEmail/JRCInputEma
|
|
|
64
64
|
export { JRCInputFile } from './components/Form/Input/JRCInputFile/JRCInputFile';
|
|
65
65
|
export { JRCInputFileAdvancedRaw } from './components/Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw';
|
|
66
66
|
export { JRCInputImage } from './components/Form/Input/JRCInputImage/JRCInputImage';
|
|
67
|
-
export { JRCInputReorderCheckbox } from './components/Form/Input/JRCInputCheckbox/JRCInputReorderCheckbox';
|
|
68
67
|
export { JRCInputSearchRaw } from './components/Form/Input/JRCInputSearchRaw/JRCInputSearchRaw';
|
|
69
68
|
export { JRCInputPassword } from './components/Form/Input/JRCInputText/JRCInputPassword';
|
|
70
69
|
export { JRCInputNumber, JRCInputText } from './components/Form/Input/JRCInputText/JRCInputText';
|
|
71
70
|
export { JRCInputTextIconButton } from './components/Form/Input/JRCInputText/JRCInputTextIconButton';
|
|
72
|
-
export { JRCInputTextRaw } from './components/Form/Input/JRCInputTextRaw/JRCInputTextRaw';
|
|
73
71
|
export { JRCInputTextarea } from './components/Form/Input/JRCInputTextarea/JRCInputTextarea';
|
|
74
72
|
export { JRCInputTextareaRaw } from './components/Form/Input/JRCInputTextarea/JRCInputTextareaRaw';
|
|
73
|
+
export { JRCInputTextRaw } from './components/Form/Input/JRCInputTextRaw/JRCInputTextRaw';
|
|
75
74
|
export { JRCInputTime } from './components/Form/Input/JRCInputTime/JRCInputTime';
|
|
76
75
|
export { JRCInputTinyMCE } from './components/Form/Input/JRCInputTinyMCE/JRCInputTinyMCE';
|
|
77
76
|
export { JRCInputTinyMCERaw } from './components/Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
|
|
@@ -84,9 +83,9 @@ export { JRCInputAudience } from './components/Form/Input/JRCSelect/JRCInputAudi
|
|
|
84
83
|
export { JRCInputAutocomplete } from './components/Form/Input/JRCSelect/JRCInputAutocomplete';
|
|
85
84
|
export { JRCInputSelect } from './components/Form/Input/JRCSelect/JRCInputSelect';
|
|
86
85
|
export { JRCInputSelectExtended } from './components/Form/Input/JRCSelect/JRCInputSelectExtended';
|
|
87
|
-
export { JRCInputSelectRaw } from './components/Form/Input/JRCSelect/JRCInputSelectRaw';
|
|
88
86
|
export { JRCInputSelectHierarchicalTree } from './components/Form/Input/JRCSelect/JRCInputSelectHierarchicalTree';
|
|
89
87
|
export { JRCInputSelectList } from './components/Form/Input/JRCSelect/JRCInputSelectList';
|
|
88
|
+
export { JRCInputSelectRaw } from './components/Form/Input/JRCSelect/JRCInputSelectRaw';
|
|
90
89
|
export { JRCAlert } from './components/JRCAlert/JRCAlert';
|
|
91
90
|
export { JRCAppContainer } from './components/JRCAppContainer/JRCAppContainer';
|
|
92
91
|
export { JRCAppHeader } from './components/JRCAppHeader/JRCAppHeader';
|
|
@@ -173,10 +172,10 @@ export { JRCWidgetArticleText } from './components/Widgets/JRCWidgetArticleText/
|
|
|
173
172
|
export { JRCWidgetArticleTextEditor } from './components/Widgets/JRCWidgetArticleText/JRCWidgetArticleTextEditor';
|
|
174
173
|
export { JRCWidgetArticleTitle } from './components/Widgets/JRCWidgetArticleTitle/JRCWidgetArticleTitle';
|
|
175
174
|
export { JRCWidgetArticleTitleEditor } from './components/Widgets/JRCWidgetArticleTitle/JRCWidgetArticleTitleEditor';
|
|
176
|
-
export { JRCWidgetTable } from './components/Widgets/JRCWidgetTable/JRCWidgetTable';
|
|
177
|
-
export { JRCWidgetTableEditor } from './components/Widgets/JRCWidgetTable/JRCWidgetTableEditor';
|
|
178
175
|
export { JRCWidgetDatasourceTableEditor } from './components/Widgets/JRCWidgetTable/JRCWidgetDatasourceTableEditor';
|
|
179
176
|
export { JRCWidgetExcelDatasourceTableEditor } from './components/Widgets/JRCWidgetTable/JRCWidgetExcelDatasourceTableEditor';
|
|
177
|
+
export { JRCWidgetTable } from './components/Widgets/JRCWidgetTable/JRCWidgetTable';
|
|
178
|
+
export { JRCWidgetTableEditor } from './components/Widgets/JRCWidgetTable/JRCWidgetTableEditor';
|
|
180
179
|
export { JRCWidgetArticleSliderEditor } from './components/Widgets/JRCWidgetSlider/JRCWidgetArticleSliderEditor';
|
|
181
180
|
export { JRCWidgetSlider } from './components/Widgets/JRCWidgetSlider/JRCWidgetSlider';
|
|
182
181
|
export { JRCWidgetEmptyInplace } from './components/Widgets/JRCWidgetEmptyInplace';
|
|
@@ -188,27 +187,26 @@ export { JRCWidgetPresence } from './components/Widgets/JRCWidgetPresence/JRCWid
|
|
|
188
187
|
export { JRCWidgetPresenceEditor } from './components/Widgets/JRCWidgetPresence/JRCWidgetPresenceEditor';
|
|
189
188
|
export { JRCWidgetQuickSurvey } from './components/Widgets/JRCWidgetQuickSurvey/JRCWidgetQuickSurvey';
|
|
190
189
|
export { JRCWidgetQuickSurveyEditor } from './components/Widgets/JRCWidgetQuickSurvey/JRCWidgetQuickSurveyEditor';
|
|
190
|
+
export { JRCWidgetCalendarCalDav } from './components/Widgets/JRCWidgetCalendarCalDav/JRCWidgetCalendarCalDav';
|
|
191
|
+
export { JRCWidgetCalendarCalDavEditor } from './components/Widgets/JRCWidgetCalendarCalDav/JRCWidgetCalendarCalDavEditor';
|
|
191
192
|
export { JRCWidgetContactCardDav } from './components/Widgets/JRCWidgetContactCardDav/JRCWidgetContactCardDav';
|
|
192
193
|
export { JRCWidgetContactCardDavEditor } from './components/Widgets/JRCWidgetContactCardDav/JRCWidgetContactCardDavEditor';
|
|
193
194
|
export { JRCWidgetEmailsImap } from './components/Widgets/JRCWidgetEmailsImap/JRCWidgetEmailsImap';
|
|
194
|
-
export { JRCWidgetEmailsImapLevel2 } from './components/Widgets/JRCWidgetEmailsImap/JRCWidgetEmailsImapLevel2';
|
|
195
195
|
export { JRCWidgetEmailsImapEditor } from './components/Widgets/JRCWidgetEmailsImap/JRCWidgetEmailsImapEditor';
|
|
196
|
-
export {
|
|
197
|
-
export { JRCWidgetCalendarCalDavEditor } from './components/Widgets/JRCWidgetCalendarCalDav/JRCWidgetCalendarCalDavEditor';
|
|
196
|
+
export { JRCWidgetEmailsImapLevel2 } from './components/Widgets/JRCWidgetEmailsImap/JRCWidgetEmailsImapLevel2';
|
|
198
197
|
export { JRCWidgetIcon } from './components/Widgets/JRCWidgetIcon';
|
|
199
198
|
export { JRCModalUserList } from './components/JRCModalUserList/JRCModalUserList';
|
|
200
199
|
export { LabelDescriptionOption } from './components/Form/Input/JRCSelect/JRCInputSelect.defaults';
|
|
201
200
|
export { StyledInput } from './components/Form/Input/JRCStyledInput';
|
|
201
|
+
export { useAbortController } from './hooks/useAbortController';
|
|
202
|
+
export { useCancelOnUnmount } from './hooks/useCancelOnUnmount';
|
|
202
203
|
export { useDebounce } from './hooks/UseDebounce';
|
|
203
204
|
export { useDidMountEffect } from './hooks/UseDidMountEffect';
|
|
204
205
|
export { useImageLoader } from './hooks/UseImageLoader';
|
|
205
206
|
export { useKeyPress } from './hooks/UseKeyPress';
|
|
206
|
-
export { useTimeout } from './hooks/UseTimeout';
|
|
207
|
-
export { useMoment } from './hooks/useMoment';
|
|
208
|
-
export { useCancelOnUnmount } from './hooks/useCancelOnUnmount';
|
|
209
207
|
export { useRefSize } from './hooks/useRefSize';
|
|
208
|
+
export { useTimeout } from './hooks/UseTimeout';
|
|
210
209
|
export { useWindowSize } from './hooks/useWindowSize';
|
|
211
|
-
export { useAbortController } from './hooks/useAbortController';
|
|
212
210
|
export { JTinyMCEExtensionsBuilders } from './components/Form/Input/JRCInputTinyMCERaw/extensions/JTinyMCEExtensions';
|
|
213
211
|
/****
|
|
214
212
|
*
|
|
@@ -7,8 +7,7 @@ export declare const HSBToRGB: (hue: number, saturation: number, brightness: num
|
|
|
7
7
|
export declare const RGBToHSB: (r: number, g: number, b: number) => number[];
|
|
8
8
|
export declare const hexToHSL: (H: any) => number[];
|
|
9
9
|
export declare function hlsToHex(h: number, s: number, l: number): string[];
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const RGBToHSL: (rgb: any) => number[];
|
|
10
|
+
export declare const RGBToHSL: (rgb: string) => number[];
|
|
12
11
|
declare const _default: {
|
|
13
12
|
getLightShade: (hex: string, lightPercentage: number) => string;
|
|
14
13
|
getDarkShade: (hex: string, darkPercentage: number) => string;
|
package/build/src/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { Editor } from 'tinymce';
|
|
1
2
|
export type { JRCDragAndDropProps } from './components/Beta/BETA_JRCDragAndDrop/BETA_JRCDragAndDrop';
|
|
2
3
|
export type { JRCConditionalWrapperProps } from './components/Common/JRCConditionalWrapper';
|
|
3
4
|
export type { MessageType } from './components/Common/util/getColor.util';
|
|
@@ -8,7 +9,6 @@ export type { FormControls } from './components/Form/Input/Common/useFormControl
|
|
|
8
9
|
export type { JRCAutocompleteAudienceProps } from './components/Form/Input/Deprecated/JRCFormAutocomplete/JRCFormAutocompleteAudience';
|
|
9
10
|
export type { JRCAutocompleteTaxonomyProps } from './components/Form/Input/Deprecated/JRCFormAutocomplete/JRCFormAutocompleteTaxonomy';
|
|
10
11
|
export type { JRCFormCheckboxProps } from './components/Form/Input/Deprecated/JRCFormCheckbox/JRCFormCheckbox.types';
|
|
11
|
-
export type { JRCFormDateProps } from './components/Form/Input/Deprecated/JRCFormDateTime/JRCFormDateTime';
|
|
12
12
|
export type { JRCWritableFormInputProps } from './components/Form/Input/Deprecated/JRCFormFieldRender';
|
|
13
13
|
export type { JRCFormInputFileFieldProps } from './components/Form/Input/Deprecated/JRCFormFile/JRCFormFile';
|
|
14
14
|
export type { JRCFormInputImageFieldProps, JRCFormInputImageProps, } from './components/Form/Input/Deprecated/JRCFormImage/JRCFormImage';
|
|
@@ -85,7 +85,6 @@ export type { JRCTemplateTwoColumnsProps } from './components/Templates/JRCTwoCo
|
|
|
85
85
|
export type { JRCAppColumnProps, JRCAppTabsProps, JRCColumnProps, JRCContainerProps, JRCMainColumnProps, JRCTabEntry, LayoutMode, TabEventProps, } from './components/Templates/template.type';
|
|
86
86
|
export type { JRCWidgetCheckListEntries } from './components/Widgets/JRCWidgetCheckList/JRCWidgetCheckList';
|
|
87
87
|
export type { ThemeConfigOptions, ThemeType } from './styles/theme';
|
|
88
|
-
export type { Editor } from 'tinymce';
|
|
89
88
|
/****
|
|
90
89
|
*
|
|
91
90
|
* PLEASE RESPECT ALPHABETICAL ORDER
|
|
@@ -8,6 +8,12 @@ export interface extractDateProps {
|
|
|
8
8
|
}
|
|
9
9
|
export type DateFormat = 'date' | 'date-time' | 'date-time-sec' | 'time' | 'time-sec';
|
|
10
10
|
export declare const extractDate: (str?: string | Date) => extractDateProps;
|
|
11
|
+
/**
|
|
12
|
+
* Format date to YYYY-MM-DD hh:mm:ss format
|
|
13
|
+
* @param {Date} date - Date to format
|
|
14
|
+
* @returns {string} Formatted date string
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatDateTime: (date: Date) => string;
|
|
11
17
|
export declare const isSameDay: (d1: string, d2: string) => boolean;
|
|
12
18
|
export declare const isToday: (datetime: string) => boolean;
|
|
13
19
|
export declare const isYesterday: (datetime: string) => boolean;
|
|
@@ -27,3 +33,5 @@ export declare const strToTimestamp: (str: string) => undefined | number;
|
|
|
27
33
|
export declare const toISODate: (date?: Date) => string;
|
|
28
34
|
export declare const toHumanDate: (date: extractDateProps, format?: DateFormat) => string;
|
|
29
35
|
export declare const isValidDate: (date: string) => boolean;
|
|
36
|
+
export declare const substractMonth: (date: Date) => Date;
|
|
37
|
+
export declare const addMonth: (date: Date) => Date;
|
package/externals.json
CHANGED
package/jest.config.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// eslint-disable-next-line no-undef
|
|
2
2
|
module.exports = {
|
|
3
3
|
roots: ['<rootDir>'],
|
|
4
|
+
// TODO: do tests on utils files and usils misc and remove them from below
|
|
4
5
|
testMatch: ['**/*.test.(ts|tsx)'],
|
|
5
6
|
testEnvironment: 'jsdom',
|
|
6
7
|
transform: {
|
|
7
|
-
'^.+\\.(ts|tsx)?$': '
|
|
8
|
+
'^.+\\.(ts|tsx)?$': 'babel-jest',
|
|
8
9
|
'\\.(svg|jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
|
9
10
|
'<rootDir>/src/jest/fileMock.js',
|
|
10
11
|
},
|
|
@@ -15,4 +16,6 @@ module.exports = {
|
|
|
15
16
|
},
|
|
16
17
|
cacheDirectory: './node_modules/.cache/jest',
|
|
17
18
|
collectCoverage: true,
|
|
19
|
+
//TODO: remove misc from here too for coverage info
|
|
20
|
+
coveragePathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/src/utils/utils\\.misc\\.ts'],
|
|
18
21
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.257",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
7
|
+
"nyc": {
|
|
8
|
+
"sourceMap": false,
|
|
9
|
+
"instrument": false
|
|
10
|
+
},
|
|
7
11
|
"keywords": [],
|
|
8
12
|
"author": "",
|
|
9
13
|
"devDependencies": {
|
|
@@ -14,12 +18,17 @@
|
|
|
14
18
|
"@babel/preset-react": "^7.12.7",
|
|
15
19
|
"@babel/preset-typescript": "^7.12.7",
|
|
16
20
|
"@chromatic-com/storybook": "^3",
|
|
21
|
+
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
22
|
+
"@lcov-viewer/istanbul-report": "^1.4.0",
|
|
23
|
+
"@storybook/addon-a11y": "^8.6.12",
|
|
17
24
|
"@storybook/addon-actions": "^8.6.12",
|
|
25
|
+
"@storybook/addon-coverage": "^1.0.5",
|
|
18
26
|
"@storybook/addon-essentials": "^8.6.12",
|
|
19
27
|
"@storybook/addon-links": "^8.6.12",
|
|
20
28
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
|
21
29
|
"@storybook/react": "^8.6.12",
|
|
22
30
|
"@storybook/react-webpack5": "^8.6.12",
|
|
31
|
+
"@storybook/test-runner": "^0.22.0",
|
|
23
32
|
"@testing-library/dom": "^8.11.0",
|
|
24
33
|
"@testing-library/jest-dom": "^5.12.0",
|
|
25
34
|
"@testing-library/react": "^12.1.2",
|
|
@@ -46,8 +55,10 @@
|
|
|
46
55
|
"@typescript-eslint/parser": "^5.4.0",
|
|
47
56
|
"babel-jest": "^27.3.1",
|
|
48
57
|
"babel-loader": "^8.2.1",
|
|
58
|
+
"babel-plugin-istanbul": "^7.0.0",
|
|
49
59
|
"babel-plugin-react-intl": "^8.1.1",
|
|
50
60
|
"babel-plugin-styled-components": "^1.12.0",
|
|
61
|
+
"concurrently": "^9.1.2",
|
|
51
62
|
"cross-env": "^6.0.3",
|
|
52
63
|
"css-loader": "^4.2.1",
|
|
53
64
|
"eslint": "^8.2.0",
|
|
@@ -59,20 +70,23 @@
|
|
|
59
70
|
"html-webpack-plugin": "^5.5.0",
|
|
60
71
|
"husky": "^7.0.4",
|
|
61
72
|
"identity-obj-proxy": "^3.0.0",
|
|
62
|
-
"jest": "^27.
|
|
73
|
+
"jest": "^27.5.1",
|
|
63
74
|
"jest-styled-components": "^7.0.3",
|
|
64
75
|
"lint-staged": "^12.0.2",
|
|
76
|
+
"nyc": "^17.1.0",
|
|
65
77
|
"prettier": "^2.4.1",
|
|
66
78
|
"react-docgen-typescript-plugin": "^1.0.8",
|
|
67
79
|
"react-test-renderer": "^17.0.1",
|
|
68
80
|
"redux-form": "^8.3.8",
|
|
69
81
|
"source-map-loader": "^1.0.1",
|
|
82
|
+
"storybook": "^8.6.12",
|
|
70
83
|
"storybook-addon-react-docgen": "^1.2.44",
|
|
71
84
|
"style-loader": "^1.2.1",
|
|
72
85
|
"ts-jest": "^27.0.7",
|
|
73
86
|
"ts-loader": "^8.0.2",
|
|
74
87
|
"ts-node": "^10.3.0",
|
|
75
88
|
"typescript": "^4.4.4",
|
|
89
|
+
"wait-on": "^8.0.3",
|
|
76
90
|
"webpack": "^5.62.1",
|
|
77
91
|
"webpack-cli": "^4.9.1",
|
|
78
92
|
"webpack-dev-server": "^4.4.0"
|
|
@@ -82,8 +96,7 @@
|
|
|
82
96
|
"chroma-js": "^2.1.1",
|
|
83
97
|
"classnames": "^2.3.1",
|
|
84
98
|
"dompurify": "^3.0.5",
|
|
85
|
-
"jamespot-user-api": "^1.0.
|
|
86
|
-
"moment": "2.29.4",
|
|
99
|
+
"jamespot-user-api": "^1.0.228",
|
|
87
100
|
"react": "^17.x",
|
|
88
101
|
"react-beautiful-dnd": "^13.1.1",
|
|
89
102
|
"react-dnd": "^14.0.4",
|
|
@@ -127,6 +140,7 @@
|
|
|
127
140
|
"dev": "webpack --env NODE_ENV=development",
|
|
128
141
|
"local": "webpack --env NODE_ENV=development WATCH=true",
|
|
129
142
|
"build": "webpack --env NODE_ENV=production",
|
|
143
|
+
"build-storybook": "storybook build",
|
|
130
144
|
"build-theme": "webpack --env NODE_ENV=theme",
|
|
131
145
|
"build-dev-vm": "webpack --env NODE_ENV=development NODE_RUN=VM",
|
|
132
146
|
"watch-dev-vm": "webpack --env NODE_ENV=development NODE_RUN=VM WATCH=true",
|
|
@@ -134,10 +148,12 @@
|
|
|
134
148
|
"lint": "npx eslint ./src/ . --ext .ts,.tsx,.js",
|
|
135
149
|
"lint:fix": "npx eslint ./src/ . --ext .ts,.tsx,.js --fix ",
|
|
136
150
|
"lint:ci": "npx eslint --output-file eslint_report.json --format json . --ext .ts,.tsx,.js",
|
|
137
|
-
"test": "jest --updateSnapshot --runInBand",
|
|
138
|
-
"test:watch": "npm run test -- --watch --verbose",
|
|
139
151
|
"storybook": "storybook dev -p 6006",
|
|
140
152
|
"storybook-no-cache": "cross-env NODE_ENV=development STORYBOOK_MODE=true PUBLIC_PATH='' storybook dev -s ./.storybook/assets/ -c .storybook -p 3022 --no-manager-cache",
|
|
141
|
-
"
|
|
153
|
+
"test": "concurrently -k -s command-TEST -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm storybook --quiet --ci\" \"wait-on tcp:6006 && pnpm test:all\"",
|
|
154
|
+
"test:all": "cross-env NODE_ENV=test jest --runInBand --detectOpenHandles --logHeapUsage && test-storybook --maxWorkers=1 --coverage && cp coverage/storybook/coverage-storybook.json coverage && nyc report -t coverage --reporter=@lcov-viewer/istanbul-report --check-coverage --reporter=text --statements 100",
|
|
155
|
+
"test:clearJest": "jest --clearCache --detectOpenHandles --logHeapUsage",
|
|
156
|
+
"test:jest": "cross-env NODE_ENV=test jest --runInBand",
|
|
157
|
+
"test:storybook": "test-storybook --maxWorkers=4 --coverage"
|
|
142
158
|
}
|
|
143
159
|
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { JRCWritableFormInputProps } from '../JRCFormFieldRender';
|
|
3
|
-
import { ControlsProps } from '../ReduxFormControls';
|
|
4
|
-
export type JRCFormDateTimeInputCustomProps = React.ComponentPropsWithoutRef<'input'>;
|
|
5
|
-
export interface JRCFormDateTimeCustomMulti {
|
|
6
|
-
isMulti?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export type JRCFormDateTimeCustomFieldProps = JRCFormDateTimeInputCustomProps & ControlsProps & JRCFormDateTimeCustomMulti;
|
|
9
|
-
export interface JRCFormDateTimeCustomProps {
|
|
10
|
-
input?: any;
|
|
11
|
-
label?: string | JSX.Element;
|
|
12
|
-
htmlFor?: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
range?: boolean;
|
|
15
|
-
isMulti?: boolean;
|
|
16
|
-
start?: string;
|
|
17
|
-
end?: string;
|
|
18
|
-
hasTime: boolean;
|
|
19
|
-
name?: string;
|
|
20
|
-
id?: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Use JRCInputDate or JRCInputDateTime instead
|
|
24
|
-
*/
|
|
25
|
-
export declare const JRCFormDateTimeCustomMulti: (props: any) => React.JSX.Element;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated Use JRCInputDate instead
|
|
28
|
-
*/
|
|
29
|
-
export declare const JRCFormDateTimeCustom: (props: JRCFormDateTimeCustomProps) => React.JSX.Element;
|
|
30
|
-
export interface JRCFormDateProps extends JRCWritableFormInputProps {
|
|
31
|
-
range?: boolean;
|
|
32
|
-
isMulti?: boolean;
|
|
33
|
-
hasTime?: boolean;
|
|
34
|
-
start?: string;
|
|
35
|
-
end?: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Component used as a <input type="text"/>
|
|
39
|
-
* @param props JRCFormDateProps
|
|
40
|
-
* validation props: minValue, maxValue, required
|
|
41
|
-
* @returns JSX.Element
|
|
42
|
-
* @deprecated Use JRCInputDate instead
|
|
43
|
-
*/
|
|
44
|
-
export declare const JRCFormDatetimeField: (props: JRCFormDateProps) => React.JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
/package/build/src/components/{JRCButton/JRCButton.test.d.ts → JRCHtml/JRCHtml.oldtest.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
/package/build/src/components/{JRCImg/JRCImg.test.d.ts → JRCPagination/JRCPagination.oldtest.d.ts}
RENAMED
|
File without changes
|
/package/build/src/components/{JRCPagination/JRCPagination.test.d.ts → Widgets/utils.oldtest.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|