fuse-importer 0.27.0 → 0.30.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/lib/esm/Importer/ImporterWithContext.d.ts +2 -0
- package/lib/esm/Importer/ImporterWithContext.js +51 -13
- package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcher/index.js +2 -2
- package/lib/esm/Importer/Matcher/EnumFieldsMatchers/index.js +4 -3
- package/lib/esm/Importer/Matcher/HeaderMatcher/index.js +14 -9
- package/lib/esm/Importer/Matcher/index.js +0 -11
- package/lib/esm/Importer/PreviewFirstTime.js +1 -1
- package/lib/esm/Importer/Review/AppResponseModal.js +2 -2
- package/lib/esm/Importer/Review/ReviewContextProvider.d.ts +8 -6
- package/lib/esm/Importer/Review/ReviewContextProvider.js +72 -195
- package/lib/esm/Importer/Review/ReviewWithContext.js +2 -2
- package/lib/esm/Importer/Stepper/StepperSubmitModal.d.ts +2 -1
- package/lib/esm/Importer/Stepper/StepperSubmitModal.js +4 -2
- package/lib/esm/Importer/Stepper/UnmatchedHeadersModal.js +1 -1
- package/lib/esm/Importer/Stepper/index.js +36 -13
- package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterDropzone.d.ts +2 -1
- package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterDropzone.js +15 -64
- package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterSectionHeader/index.js +2 -2
- package/lib/esm/Importer/Uploader/DragAndDropImporter/index.js +11 -3
- package/lib/esm/Importer/Uploader/HeadersPreview.js +1 -1
- package/lib/esm/Importer/common/Spreadsheet/DataSetContextProvider/index.d.ts +16 -0
- package/lib/esm/Importer/common/Spreadsheet/DataSetContextProvider/index.js +63 -0
- package/lib/esm/Importer/common/Spreadsheet/DuplicateDataContextProvider/index.d.ts +19 -0
- package/lib/esm/Importer/common/Spreadsheet/DuplicateDataContextProvider/index.js +155 -0
- package/lib/esm/Importer/common/Spreadsheet/FilteredDataContextProvider/index.d.ts +29 -0
- package/lib/esm/Importer/common/Spreadsheet/FilteredDataContextProvider/index.js +150 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/filterMethods.d.ts +6 -4
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/filterMethods.js +38 -45
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/hashCalculators.d.ts +7 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/hashCalculators.js +152 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/index.d.ts +7 -30
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/index.js +10 -141
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useBatchProcessing.d.ts +5 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useBatchProcessing.js +81 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useDataSetManipulation.d.ts +5 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useDataSetManipulation.js +119 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useSpreadsheetFilter.d.ts +1 -1
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/utils.d.ts +1 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/utils.js +8 -0
- package/lib/esm/Importer/common/Spreadsheet/ValidationContextProvider/index.d.ts +31 -0
- package/lib/esm/Importer/common/Spreadsheet/ValidationContextProvider/index.js +324 -0
- package/lib/esm/Importer/common/Spreadsheet/common/index.js +18 -9
- package/lib/esm/Importer/common/Spreadsheet/common/types.d.ts +2 -3
- package/lib/esm/Importer/common/Spreadsheet/components/FieldHeader.d.ts +0 -2
- package/lib/esm/Importer/common/Spreadsheet/components/FieldHeader.js +26 -11
- package/lib/esm/Importer/common/Spreadsheet/components/FindAndReplace/index.d.ts +6 -0
- package/lib/esm/Importer/common/Spreadsheet/components/FindAndReplace/index.js +88 -0
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetData.js +25 -17
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowCheckboxes.js +48 -47
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowNumbers.js +3 -3
- package/lib/esm/Importer/common/Spreadsheet/components/fields/SpeadsheetAutocomplete.d.ts +1 -0
- package/lib/esm/Importer/common/Spreadsheet/components/fields/SpeadsheetAutocomplete.js +7 -3
- package/lib/esm/Importer/common/Spreadsheet/components/fields/SpreadsheetInput.d.ts +3 -1
- package/lib/esm/Importer/common/Spreadsheet/components/fields/SpreadsheetInput.js +45 -11
- package/lib/esm/Importer/common/Spreadsheet/components/fields/index.d.ts +12 -5
- package/lib/esm/Importer/common/Spreadsheet/components/fields/index.js +81 -26
- package/lib/esm/Importer/common/Spreadsheet/components/fields/utils.d.ts +11 -0
- package/lib/esm/Importer/common/Spreadsheet/components/fields/utils.js +29 -0
- package/lib/esm/Importer/common/Spreadsheet/components/inputs/index.js +1 -2
- package/lib/esm/Importer/common/Spreadsheet/index.d.ts +0 -1
- package/lib/esm/Importer/common/Spreadsheet/index.js +1 -84
- package/lib/esm/Importer/common/Spreadsheet/styles.d.ts +1 -2
- package/lib/esm/Importer/common/Spreadsheet/styles.js +13 -1
- package/lib/esm/Importer/common/Spreadsheet/transformation/index.d.ts +2 -2
- package/lib/esm/Importer/common/Spreadsheet/transformation/index.js +35 -13
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators/dateTimeAutoformatUtils.d.ts +5 -0
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators/dateTimeAutoformatUtils.js +231 -0
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators/index.d.ts +18 -0
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators/index.js +179 -0
- package/lib/esm/Importer/common/Spreadsheet/useFieldSorting.d.ts +5 -0
- package/lib/esm/Importer/common/Spreadsheet/useFieldSorting.js +81 -0
- package/lib/esm/Importer/common/Spreadsheet/validation/index.d.ts +5 -3
- package/lib/esm/Importer/common/Spreadsheet/validation/index.js +13 -17
- package/lib/esm/Importer/common/Spreadsheet/validation/validators.d.ts +3 -2
- package/lib/esm/Importer/common/Spreadsheet/validation/validators.js +23 -7
- package/lib/esm/Importer/common/theme.d.ts +1 -0
- package/lib/esm/Importer/contexts/ImporterContextProvider.d.ts +13 -4
- package/lib/esm/Importer/contexts/ImporterContextProvider.js +150 -21
- package/lib/esm/Importer/data/index.d.ts +7 -3
- package/lib/esm/Importer/data/index.js +49 -20
- package/lib/esm/Importer/hooks/useExportDataToFile.d.ts +5 -0
- package/lib/esm/Importer/hooks/useExportDataToFile.js +54 -0
- package/lib/esm/Importer/hooks/useSubmitToServer.d.ts +7 -0
- package/lib/esm/Importer/hooks/useSubmitToServer.js +214 -0
- package/lib/esm/Importer/index.d.ts +4 -3
- package/lib/esm/Importer/index.js +2 -2
- package/lib/esm/common/CircleSpinner.d.ts +1 -0
- package/lib/esm/common/CircleSpinner.js +13 -0
- package/lib/esm/common/ConfirmationModal.js +1 -1
- package/lib/esm/common/EventManagerContextProvider/index.d.ts +22 -0
- package/lib/esm/common/EventManagerContextProvider/index.js +38 -0
- package/lib/esm/common/FileUploadDropzone/ImporterDropzone.d.ts +16 -0
- package/lib/esm/common/FileUploadDropzone/ImporterDropzone.js +143 -0
- package/lib/esm/common/FileUploadDropzone/index.d.ts +1 -0
- package/lib/esm/common/FileUploadDropzone/index.js +1 -0
- package/lib/esm/common/Modal.js +2 -2
- package/lib/esm/common/Table/TableActions/CustomActions/CustomActions.d.ts +1 -0
- package/lib/esm/common/Table/TableActions/CustomActions/CustomActions.js +150 -0
- package/lib/esm/common/Table/TableActions/CustomActions/index.d.ts +1 -0
- package/lib/esm/common/Table/TableActions/CustomActions/index.js +1 -0
- package/lib/esm/common/Table/TableActions/DeleteSelectedRows.js +25 -8
- package/lib/esm/common/Table/TableActions/ExportData.js +5 -3
- package/lib/esm/common/Table/TableActions/FilterByErrors/FilterByErrors.js +41 -10
- package/lib/esm/common/Table/TableActions/RowFilters.js +63 -11
- package/lib/esm/common/Table/TableActions/SearchRows.js +28 -17
- package/lib/esm/common/Table/TableActions/TableActions.js +15 -4
- package/lib/esm/common/Table/TableActions/TableActions.styles.d.ts +1 -0
- package/lib/esm/common/Table/TableActions/TableActions.styles.js +4 -3
- package/lib/esm/common/Table/TableActions/TransformedRecordsCount.d.ts +6 -0
- package/lib/esm/common/Table/TableActions/TransformedRecordsCount.js +71 -0
- package/lib/esm/common/Table/TableActions/ValidationProgress.d.ts +2 -0
- package/lib/esm/common/Table/TableActions/ValidationProgress.js +22 -0
- package/lib/esm/common/Table/TableActions/icons.d.ts +3 -0
- package/lib/esm/common/Table/TableActions/icons.js +3 -0
- package/lib/esm/common/Table/TableActions/useFindAndReplace.d.ts +5 -0
- package/lib/esm/common/Table/TableActions/useFindAndReplace.js +45 -0
- package/lib/esm/common/Table/TableView/TableRows/TableRow.d.ts +1 -1
- package/lib/esm/common/Table/TableView/TableRows/TableRow.js +3 -3
- package/lib/esm/common/Table/TableView/TableRows/index.js +21 -6
- package/lib/esm/common/Table/TableView/index.d.ts +1 -1
- package/lib/esm/common/Table/TableView/index.js +7 -16
- package/lib/esm/common/Table/TableView/types.d.ts +9 -9
- package/lib/esm/common/Table/index.d.ts +2 -1
- package/lib/esm/common/Table/index.js +2 -2
- package/lib/esm/common/Toast.d.ts +42 -3
- package/lib/esm/common/Toast.js +56 -18
- package/lib/esm/common/TooltipProvider.d.ts +2 -0
- package/lib/esm/common/TooltipProvider.js +12 -9
- package/lib/esm/common/buttons.d.ts +5 -1
- package/lib/esm/common/buttons.js +19 -13
- package/lib/esm/common/columnsTransformations.d.ts +1 -0
- package/lib/esm/common/columnsTransformations.js +10 -16
- package/lib/esm/common/columnsValidations.d.ts +0 -26
- package/lib/esm/common/columnsValidations.js +1 -31
- package/lib/esm/common/datePatterns.d.ts +26 -0
- package/lib/esm/common/datePatterns.js +327 -0
- package/lib/esm/common/icons/index.d.ts +4 -0
- package/lib/esm/common/icons/index.js +6 -2
- package/lib/esm/common/index.d.ts +2 -0
- package/lib/esm/common/index.js +2 -0
- package/lib/esm/common/inputs/Autocomplete.js +2 -2
- package/lib/esm/common/inputs/Checkbox.d.ts +2 -1
- package/lib/esm/common/inputs/Checkbox.js +9 -7
- package/lib/esm/common/inputs/SelectMenu.d.ts +2 -1
- package/lib/esm/common/inputs/SelectMenu.js +14 -3
- package/lib/esm/common/inputs/TextInput.js +1 -1
- package/lib/esm/index.d.ts +3 -1
- package/lib/esm/index.js +9 -2
- package/lib/esm/locales/de.d.ts +13 -1
- package/lib/esm/locales/de.js +14 -2
- package/lib/esm/locales/en.d.ts +26 -1
- package/lib/esm/locales/en.js +30 -5
- package/lib/esm/locales/es.d.ts +13 -1
- package/lib/esm/locales/es.js +14 -2
- package/lib/esm/locales/fr.d.ts +13 -1
- package/lib/esm/locales/fr.js +14 -2
- package/lib/esm/styled/theme/colorPalette.d.ts +2 -0
- package/lib/esm/styled/theme/colorPalette.js +1 -0
- package/lib/esm/styled/theme/index.d.ts +1 -0
- package/lib/esm/styled/theme/textCss.js +1 -1
- package/lib/esm/types.d.ts +48 -5
- package/lib/esm/types.js +0 -1
- package/lib/esm/utils/index.d.ts +1 -0
- package/lib/esm/utils/index.js +4 -0
- package/lib/main.js +24 -24
- package/lib/main.js.LICENSE.txt +2 -0
- package/package.json +8 -6
- package/lib/esm/Importer/Stepper/common/getEnumFieldValueMatchingsInitialValue.d.ts +0 -8
- package/lib/esm/Importer/Stepper/common/getEnumFieldValueMatchingsInitialValue.js +0 -33
- package/lib/esm/Importer/common/Spreadsheet/components/ValidationProgress.d.ts +0 -5
- package/lib/esm/Importer/common/Spreadsheet/components/ValidationProgress.js +0 -19
- package/lib/esm/Importer/common/Spreadsheet/components/inputs/EmailInput.d.ts +0 -3
- package/lib/esm/Importer/common/Spreadsheet/components/inputs/EmailInput.js +0 -14
- package/lib/esm/Importer/common/Spreadsheet/hooks.d.ts +0 -34
- package/lib/esm/Importer/common/Spreadsheet/hooks.js +0 -254
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators.d.ts +0 -8
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators.js +0 -106
- package/lib/esm/common/Table/TableActions/FilterByErrors/functions.d.ts +0 -11
- package/lib/esm/common/Table/TableActions/FilterByErrors/functions.js +0 -35
- package/lib/esm/common/Table/TableActions/hooks.d.ts +0 -18
- package/lib/esm/common/Table/TableActions/hooks.js +0 -41
- package/lib/esm/common/Table/TableView/CustomScrollbar.d.ts +0 -2
- package/lib/esm/common/Table/TableView/CustomScrollbar.js +0 -34
|
@@ -27,14 +27,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
28
|
import { useMemo, useState } from "react";
|
|
29
29
|
import { usePopper } from "react-popper";
|
|
30
|
-
import styled from "styled-components";
|
|
30
|
+
import styled, { css } from "styled-components";
|
|
31
31
|
import { Div } from "../styled/utils";
|
|
32
|
-
export var TooltipContent = styled(Div)(
|
|
32
|
+
export var TooltipContent = styled(Div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n color: ", ";\n background: ", ";\n border-radius: 4px;\n padding: 10px;\n pointer-events: none;\n z-index: 1000;\n\n ", "\n"], ["\n ", ";\n color: ", ";\n background: ", ";\n border-radius: 4px;\n padding: 10px;\n pointer-events: none;\n z-index: 1000;\n\n ", "\n"])), function (p) { return p.theme.css.body4; }, function (p) { return p.theme.colors.white; }, function (p) { return p.theme.colors.black; }, function (_a) {
|
|
33
|
+
var shouldCenterText = _a.shouldCenterText;
|
|
34
|
+
return shouldCenterText && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n text-align: center;\n "], ["\n text-align: center;\n "])));
|
|
35
|
+
});
|
|
33
36
|
export var TooltipProvider = function (_a) {
|
|
34
|
-
var tooltip = _a.tooltip, children = _a.children, tooltipMaxWidth = _a.tooltipMaxWidth, tooltipMinWidth = _a.tooltipMinWidth, _b = _a.placement, placement = _b === void 0 ? "top-start" : _b, _c = _a.flip, flip = _c === void 0 ? true : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isOpen, isOpen = _e === void 0 ? false : _e, _f = _a.offset, offset = _f === void 0 ? [0, 4] : _f, props = __rest(_a, ["tooltip", "children", "tooltipMaxWidth", "tooltipMinWidth", "placement", "flip", "isDisabled", "isOpen", "offset"]);
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
37
|
+
var tooltip = _a.tooltip, children = _a.children, tooltipMaxWidth = _a.tooltipMaxWidth, tooltipMinWidth = _a.tooltipMinWidth, _b = _a.placement, placement = _b === void 0 ? "top-start" : _b, _c = _a.flip, flip = _c === void 0 ? true : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isOpen, isOpen = _e === void 0 ? false : _e, _f = _a.offset, offset = _f === void 0 ? [0, 4] : _f, _g = _a.shouldCenterText, shouldCenterText = _g === void 0 ? false : _g, props = __rest(_a, ["tooltip", "children", "tooltipMaxWidth", "tooltipMinWidth", "placement", "flip", "isDisabled", "isOpen", "offset", "shouldCenterText"]);
|
|
38
|
+
var _h = useState(false), isDisplayingTooltip = _h[0], setIsDisplayingTooltip = _h[1];
|
|
39
|
+
var _j = useState(null), referenceElement = _j[0], setReferenceElement = _j[1];
|
|
40
|
+
var _k = useState(null), popperElement = _k[0], setPopperElement = _k[1];
|
|
38
41
|
var options = useMemo(function () { return ({
|
|
39
42
|
placement: placement,
|
|
40
43
|
modifiers: [
|
|
@@ -50,8 +53,8 @@ export var TooltipProvider = function (_a) {
|
|
|
50
53
|
},
|
|
51
54
|
],
|
|
52
55
|
}); }, [placement, offset]);
|
|
53
|
-
var
|
|
56
|
+
var _l = usePopper(referenceElement, popperElement, options), styles = _l.styles, attributes = _l.attributes;
|
|
54
57
|
var showTooltip = isOpen || (isDisplayingTooltip && !!tooltip);
|
|
55
|
-
return (_jsxs(Div, __assign({ dim: "100%", ref: setReferenceElement, onMouseOver: function () { return isDisabled || setIsDisplayingTooltip(true); }, onMouseOut: function () { return isDisabled || setIsDisplayingTooltip(false); } }, props, { children: [children, showTooltip && (_jsx(TooltipContent, __assign({ ref: setPopperElement, style: styles.popper, maxw: tooltipMaxWidth, minw: tooltipMinWidth }, attributes.popper, { children: tooltip })))] })));
|
|
58
|
+
return (_jsxs(Div, __assign({ dim: "100%", ref: setReferenceElement, onMouseOver: function () { return isDisabled || setIsDisplayingTooltip(true); }, onMouseOut: function () { return isDisabled || setIsDisplayingTooltip(false); } }, props, { children: [children, showTooltip && (_jsx(TooltipContent, __assign({ ref: setPopperElement, style: styles.popper, maxw: tooltipMaxWidth, minw: tooltipMinWidth, shouldCenterText: shouldCenterText }, attributes.popper, { children: tooltip })))] })));
|
|
56
59
|
};
|
|
57
|
-
var templateObject_1;
|
|
60
|
+
var templateObject_1, templateObject_2;
|
|
@@ -15,6 +15,7 @@ export type BtnProps = {
|
|
|
15
15
|
svgNormalStrokeColorOverride?: string;
|
|
16
16
|
svgActiveStrokeColorOverride?: string;
|
|
17
17
|
svgDisabledStrokeColorOverride?: string;
|
|
18
|
+
iconPlacement?: "left" | "right";
|
|
18
19
|
} & CSSProps;
|
|
19
20
|
export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, CSSProps & {
|
|
20
21
|
onClick?: () => void;
|
|
@@ -30,6 +31,7 @@ export declare const ButtonWrapper: import("styled-components").StyledComponent<
|
|
|
30
31
|
svgNormalStrokeColorOverride?: string;
|
|
31
32
|
svgActiveStrokeColorOverride?: string;
|
|
32
33
|
svgDisabledStrokeColorOverride?: string;
|
|
34
|
+
iconPlacement?: "left" | "right";
|
|
33
35
|
}, never>;
|
|
34
36
|
export declare const ButtonElementWrapper: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, CSSProps & {
|
|
35
37
|
onClick?: () => void;
|
|
@@ -45,6 +47,8 @@ export declare const ButtonElementWrapper: import("styled-components").StyledCom
|
|
|
45
47
|
svgNormalStrokeColorOverride?: string;
|
|
46
48
|
svgActiveStrokeColorOverride?: string;
|
|
47
49
|
svgDisabledStrokeColorOverride?: string;
|
|
50
|
+
iconPlacement?: "left" | "right";
|
|
48
51
|
}, never>;
|
|
49
|
-
export declare const
|
|
52
|
+
export declare const ContentWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, CSSProps, never>;
|
|
53
|
+
export declare const Button: ({ onClick, isDisabled, variant, isSmall, children, isButtonElement, iconPlacement, ...props }: BtnProps) => JSX.Element;
|
|
50
54
|
export {};
|
|
@@ -24,16 +24,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
}
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
27
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
28
|
import { get } from "lodash";
|
|
29
29
|
import styled, { css } from "styled-components";
|
|
30
30
|
import { Div, HTMLButton } from "../styled/utils";
|
|
31
|
+
import { PlusActionIcon } from "./icons";
|
|
31
32
|
var types = ["primary", "secondary", "tertiary", "link"];
|
|
32
33
|
var getBgColor = function (props) {
|
|
33
|
-
return get(props, "backgroundColor", get(props.theme, "colors.
|
|
34
|
+
return get(props, "backgroundColor", get(props.theme, "colors.black"));
|
|
34
35
|
};
|
|
35
36
|
var getBorderColor = function (props) {
|
|
36
|
-
return get(props, "backgroundColor", get(props.theme, "colors.
|
|
37
|
+
return get(props, "backgroundColor", get(props.theme, "colors.blue500"));
|
|
37
38
|
};
|
|
38
39
|
var getSvgFillColorForNormalState = function (props) {
|
|
39
40
|
return get(props, "svgNormalFillColorOverride", get(props.theme, "colors.black"));
|
|
@@ -59,7 +60,7 @@ var styles = {
|
|
|
59
60
|
primary: css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n\n border: solid 4px ", ";\n box-sizing: border-box;\n\n :hover {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n :active {\n background: ", ";\n border: 4px solid ", ";\n }\n :focus {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n ", "\n "], ["\n color: ", ";\n background: ", ";\n\n border: solid 4px ", ";\n box-sizing: border-box;\n\n :hover {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n :active {\n background: ", ";\n border: 4px solid ", ";\n }\n :focus {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n ", "\n "])), function (props) { return props.theme.colors.white; }, getBgColor, getBgColor, getBgColor, getBgColor, getBgColor, getBorderColor, getBgColor, getBgColor, function (props) {
|
|
60
61
|
return props.isDisabled && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background: ", " !important;\n opacity: 0.4;\n box-shadow: none !important;\n border: none !important;\n cursor: not-allowed !important;\n "], ["\n background: ", " !important;\n opacity: 0.4;\n box-shadow: none !important;\n border: none !important;\n cursor: not-allowed !important;\n "])), getBgColor);
|
|
61
62
|
}),
|
|
62
|
-
secondary: css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", ";\n box-sizing: border-box;\n border: solid
|
|
63
|
+
secondary: css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", ";\n box-sizing: border-box;\n border: 2px solid ", ";\n color: ", ";\n & > svg {\n & > path {\n fill: ", ";\n stroke: ", ";\n }\n }\n :active {\n border: 2px solid ", ";\n background: ", ";\n color: ", ";\n & > svg {\n & > path {\n fill: ", ";\n stroke: ", ";\n }\n }\n }\n :focus {\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.24);\n }\n ", "\n "], ["\n background: ", ";\n box-sizing: border-box;\n border: 2px solid ", ";\n color: ", ";\n & > svg {\n & > path {\n fill: ", ";\n stroke: ", ";\n }\n }\n :active {\n border: 2px solid ", ";\n background: ", ";\n color: ", ";\n & > svg {\n & > path {\n fill: ", ";\n stroke: ", ";\n }\n }\n }\n :focus {\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.24);\n }\n ", "\n "])), function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.black; }, function (props) { return props.theme.colors.black; }, getSvgFillColorForNormalState, getSvgStrokeColorForNormalState, function (props) { return props.theme.colors.black; }, function (props) { return props.theme.colors.black; }, function (props) { return props.theme.colors.white; }, getSvgFillColorForActiveState, getSvgStrokeColorForActiveState, function (props) {
|
|
63
64
|
return props.isDisabled && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n border: 2px solid ", ";\n color: ", ";\n & > svg {\n & > path {\n fill: ", ";\n stroke: ", ";\n }\n }\n "], ["\n border: 2px solid ", ";\n color: ", ";\n & > svg {\n & > path {\n fill: ", ";\n stroke: ", ";\n }\n }\n "])), function (props) { return props.theme.colors.gray390; }, function (props) { return props.theme.colors.gray390; }, getSvgFillColorForDisabledState, getSvgStrokeColorForDisabledState);
|
|
64
65
|
}),
|
|
65
66
|
tertiary: css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background: transparent;\n border: solid 1px transparent;\n color: ", ";\n :hover {\n background: ", ";\n }\n :active {\n background: ", ";\n color: ", ";\n }\n ", "\n "], ["\n background: transparent;\n border: solid 1px transparent;\n color: ", ";\n :hover {\n background: ", ";\n }\n :active {\n background: ", ";\n color: ", ";\n }\n ", "\n "])), function (props) { return props.theme.colors.text; }, function (props) { return props.theme.colors.white50; }, function (props) { return props.theme.colors.black; }, function (props) { return props.theme.colors.white; }, function (props) {
|
|
@@ -74,24 +75,29 @@ var styles = {
|
|
|
74
75
|
: withBrandingCSS;
|
|
75
76
|
}, function (props) { return props.theme.colors.black; }, function (props) { return props.theme.colors.white; }),
|
|
76
77
|
};
|
|
77
|
-
var commonButtonStyle = css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n padding: 12px 24px;\n user-select: none;\n width: fit-content;\n\n
|
|
78
|
-
return props.
|
|
79
|
-
}, function (props) {
|
|
80
|
-
return props.isDisabled && css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n pointer-events: none;\n "], ["\n pointer-events: none;\n "])));
|
|
78
|
+
var commonButtonStyle = css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n padding: 12px 24px;\n user-select: none;\n width: fit-content;\n\n border: solid 1px black;\n border-radius: 4px;\n\n font-family: DM Sans;\n\n :focus {\n outline: none;\n }\n :hover {\n cursor: pointer;\n }\n\n ", "\n ", ";\n\n ", ";\n\n ", "\n"], ["\n padding: 12px 24px;\n user-select: none;\n width: fit-content;\n\n border: solid 1px black;\n border-radius: 4px;\n\n font-family: DM Sans;\n\n :focus {\n outline: none;\n }\n :hover {\n cursor: pointer;\n }\n\n ", "\n ", ";\n\n ", ";\n\n ", "\n"])), function (props) {
|
|
79
|
+
return props.isDisabled && css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n pointer-events: none;\n "], ["\n pointer-events: none;\n "])));
|
|
81
80
|
}, function (props) {
|
|
82
81
|
var c = props.theme.css;
|
|
83
82
|
return [c.centered, c.buttonText];
|
|
84
|
-
}, function (props) { return styles[props.variant || "primary"]; })
|
|
83
|
+
}, function (props) { return styles[props.variant || "primary"]; }, function (props) {
|
|
84
|
+
return props.isSmall && css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n padding: 6px 20px;\n font-size: 14px;\n "], ["\n padding: 6px 20px;\n font-size: 14px;\n "])));
|
|
85
|
+
});
|
|
85
86
|
export var ButtonWrapper = styled(Div)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), commonButtonStyle);
|
|
86
87
|
export var ButtonElementWrapper = styled(HTMLButton)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), commonButtonStyle);
|
|
88
|
+
export var ContentWrapper = styled(Div)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 12px;\n justify-content: center;\n"], ["\n display: flex;\n align-items: center;\n gap: 12px;\n justify-content: center;\n"])));
|
|
89
|
+
var ButtonContentWrapper = function (_a) {
|
|
90
|
+
var children = _a.children, iconPlacement = _a.iconPlacement;
|
|
91
|
+
return (_jsxs(_Fragment, { children: [iconPlacement === "left" && (_jsx(Div, __assign({ pr: 12, h: 20 }, { children: _jsx(PlusActionIcon, {}) }))), children, iconPlacement === "right" && (_jsx(Div, __assign({ pl: 12, h: 20 }, { children: _jsx(PlusActionIcon, {}) })))] }));
|
|
92
|
+
};
|
|
87
93
|
export var Button = function (_a) {
|
|
88
|
-
var _b = _a.onClick, onClick = _b === void 0 ? null : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.variant, variant = _d === void 0 ? "primary" : _d, _e = _a.isSmall, isSmall = _e === void 0 ? false : _e, children = _a.children, _f = _a.isButtonElement, isButtonElement = _f === void 0 ? false : _f, props = __rest(_a, ["onClick", "isDisabled", "variant", "isSmall", "children", "isButtonElement"]);
|
|
89
|
-
return (_jsx(_Fragment, { children: isButtonElement ? (_jsx(ButtonElementWrapper, __assign({ isSmall: isSmall, isDisabled: isDisabled, disabled: isDisabled, variant: variant, type: "submit" }, props, { children: children }))) : (_jsx(ButtonWrapper, __assign({ role: "button", w: "fit-content", p: 12, isSmall: isSmall, onClick: isDisabled ? null : onClick, onKeyDown: function (_a) {
|
|
94
|
+
var _b = _a.onClick, onClick = _b === void 0 ? null : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.variant, variant = _d === void 0 ? "primary" : _d, _e = _a.isSmall, isSmall = _e === void 0 ? false : _e, children = _a.children, _f = _a.isButtonElement, isButtonElement = _f === void 0 ? false : _f, iconPlacement = _a.iconPlacement, props = __rest(_a, ["onClick", "isDisabled", "variant", "isSmall", "children", "isButtonElement", "iconPlacement"]);
|
|
95
|
+
return (_jsx(_Fragment, { children: isButtonElement ? (_jsx(ButtonElementWrapper, __assign({ isSmall: isSmall, isDisabled: isDisabled, disabled: isDisabled, variant: variant, type: "submit" }, props, { children: _jsx(ButtonContentWrapper, __assign({ iconPlacement: iconPlacement }, { children: children })) }))) : (_jsx(ButtonWrapper, __assign({ role: "button", w: "fit-content", p: 12, isSmall: isSmall, onClick: isDisabled ? null : onClick, onKeyDown: function (_a) {
|
|
90
96
|
var code = _a.code;
|
|
91
97
|
if ((code === "Space" || (code === "Enter" && onClick)) &&
|
|
92
98
|
!isDisabled) {
|
|
93
99
|
onClick();
|
|
94
100
|
}
|
|
95
|
-
}, tabIndex: 0 }, __assign({ variant: variant, isDisabled: isDisabled, onClick: onClick, disabled: isDisabled }, props), { children: _jsx(
|
|
101
|
+
}, tabIndex: 0 }, __assign({ variant: variant, isDisabled: isDisabled, onClick: onClick, disabled: isDisabled }, props), { children: _jsx(ButtonContentWrapper, __assign({ iconPlacement: iconPlacement }, { children: children })) }))) }));
|
|
96
102
|
};
|
|
97
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15;
|
|
103
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
var commonDateAndTimeTransformations = [
|
|
2
2
|
{
|
|
3
3
|
value: "autoformat",
|
|
4
|
-
label: "Autoformat",
|
|
4
|
+
label: "Autoformat (e.g. 02-13-2020 -> 02/13/2020)",
|
|
5
|
+
isDefaultTransformation: true,
|
|
5
6
|
},
|
|
6
7
|
];
|
|
7
8
|
var stringTransformations = [
|
|
8
9
|
{
|
|
9
10
|
value: "sentence_case",
|
|
10
|
-
label: "Sentence Case",
|
|
11
|
+
label: "Sentence Case (e.g. hello world -> Hello world)",
|
|
11
12
|
},
|
|
12
13
|
{
|
|
13
14
|
value: "capitalize",
|
|
14
|
-
label: "Capitalize",
|
|
15
|
+
label: "Capitalize (e.g. hello world -> Hello World)",
|
|
15
16
|
},
|
|
16
17
|
{
|
|
17
18
|
value: "uppercase",
|
|
18
|
-
label: "Uppercase",
|
|
19
|
+
label: "Uppercase (e.g. hello world -> HELLO WORLD)",
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
value: "lowercase",
|
|
22
|
-
label: "Lowercase",
|
|
23
|
+
label: "Lowercase (e.g. Hello World -> hello world)",
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
26
|
value: "trim_whitespace",
|
|
26
|
-
label: "Trim Whitespace",
|
|
27
|
+
label: "Trim Whitespace (e.g. ' hello world ' -> 'hello world')",
|
|
27
28
|
},
|
|
28
29
|
];
|
|
29
30
|
var urlTransformations = [
|
|
@@ -55,28 +56,21 @@ var floatTransformations = [
|
|
|
55
56
|
var integerTransformations = [
|
|
56
57
|
{
|
|
57
58
|
value: "round",
|
|
58
|
-
label: "Round",
|
|
59
|
+
label: "Round (e.g. 3.19 -> 3)",
|
|
59
60
|
},
|
|
60
61
|
{
|
|
61
62
|
value: "floor",
|
|
62
|
-
label: "Floor",
|
|
63
|
+
label: "Floor (e.g. 3.99 -> 3)",
|
|
63
64
|
},
|
|
64
65
|
{
|
|
65
66
|
value: "ceiling",
|
|
66
|
-
label: "Ceiling",
|
|
67
|
-
},
|
|
68
|
-
];
|
|
69
|
-
var enumTransformations = [
|
|
70
|
-
{
|
|
71
|
-
value: "autodetect",
|
|
72
|
-
label: "Autodetect",
|
|
67
|
+
label: "Ceiling (e.g. 3.01 -> 4)",
|
|
73
68
|
},
|
|
74
69
|
];
|
|
75
70
|
export var transformationsByColumnType = {
|
|
76
71
|
string: stringTransformations,
|
|
77
72
|
integer: integerTransformations,
|
|
78
73
|
float: floatTransformations,
|
|
79
|
-
enum: enumTransformations,
|
|
80
74
|
url: urlTransformations,
|
|
81
75
|
date: commonDateAndTimeTransformations,
|
|
82
76
|
datetime: commonDateAndTimeTransformations,
|
|
@@ -15,31 +15,5 @@ export declare const validationsByColumnType: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const validationsByType: {};
|
|
17
17
|
export declare const availableColumnTypes: string[];
|
|
18
|
-
export declare const datePatterns: {
|
|
19
|
-
value: string;
|
|
20
|
-
label: string;
|
|
21
|
-
}[];
|
|
22
|
-
export declare const dateTimePatterns: {
|
|
23
|
-
value: string;
|
|
24
|
-
label: string;
|
|
25
|
-
}[];
|
|
26
|
-
export declare const timePatterns: {
|
|
27
|
-
value: string;
|
|
28
|
-
label: string;
|
|
29
|
-
}[];
|
|
30
|
-
export declare const allowedPatterns: {
|
|
31
|
-
date: {
|
|
32
|
-
value: string;
|
|
33
|
-
label: string;
|
|
34
|
-
}[];
|
|
35
|
-
datetime: {
|
|
36
|
-
value: string;
|
|
37
|
-
label: string;
|
|
38
|
-
}[];
|
|
39
|
-
time: {
|
|
40
|
-
value: string;
|
|
41
|
-
label: string;
|
|
42
|
-
}[];
|
|
43
|
-
};
|
|
44
18
|
export declare const patternsColumnTypes: string[];
|
|
45
19
|
export declare const validateColumn: <T extends "string" | "boolean" | "time" | "integer" | "float" | "email" | "url" | "enum" | "date" | "datetime">(columnData: ColumnRequiredProps<T>) => Promise<void>;
|
|
@@ -45,6 +45,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
45
45
|
};
|
|
46
46
|
import * as yup from "yup";
|
|
47
47
|
import { FieldTypes, mutableValidationTypes, mutableTransformationTypes, } from "../types";
|
|
48
|
+
import { allowedPatterns, datePatterns, dateTimePatterns, timePatterns, } from "./datePatterns";
|
|
48
49
|
var commonValidations = [
|
|
49
50
|
{
|
|
50
51
|
value: "regex",
|
|
@@ -219,37 +220,6 @@ export var validationsByType = Object.values(validationsByColumnType)
|
|
|
219
220
|
return result;
|
|
220
221
|
}, {});
|
|
221
222
|
export var availableColumnTypes = Object.keys(validationsByColumnType);
|
|
222
|
-
export var datePatterns = [
|
|
223
|
-
{
|
|
224
|
-
value: "MM/dd/yyyy",
|
|
225
|
-
label: "MM/dd/yyyy",
|
|
226
|
-
},
|
|
227
|
-
];
|
|
228
|
-
export var dateTimePatterns = [
|
|
229
|
-
{
|
|
230
|
-
value: "MM/dd/yyyy HH:mm",
|
|
231
|
-
label: "MM/dd/yyyy HH:mm",
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
value: "MM/dd/yyyy HH:mm:ss",
|
|
235
|
-
label: "MM/dd/yyyy HH:mm:ss",
|
|
236
|
-
},
|
|
237
|
-
];
|
|
238
|
-
export var timePatterns = [
|
|
239
|
-
{
|
|
240
|
-
value: "HH:mm",
|
|
241
|
-
label: "HH:mm",
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
value: "HH:mm:ss",
|
|
245
|
-
label: "HH:mm:ss",
|
|
246
|
-
},
|
|
247
|
-
];
|
|
248
|
-
export var allowedPatterns = {
|
|
249
|
-
date: datePatterns,
|
|
250
|
-
datetime: dateTimePatterns,
|
|
251
|
-
time: timePatterns,
|
|
252
|
-
};
|
|
253
223
|
export var patternsColumnTypes = Object.keys(allowedPatterns);
|
|
254
224
|
var iso8601Regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
255
225
|
var validationsSchema = yup
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const datePatterns: {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const dateTimePatterns: {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const timePatterns: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare const allowedPatterns: {
|
|
14
|
+
date: {
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}[];
|
|
18
|
+
datetime: {
|
|
19
|
+
value: string;
|
|
20
|
+
label: string;
|
|
21
|
+
}[];
|
|
22
|
+
time: {
|
|
23
|
+
value: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
export var datePatterns = [
|
|
2
|
+
{
|
|
3
|
+
value: "MM/dd/yyyy",
|
|
4
|
+
label: "MM/dd/yyyy (e.g. 08/31/2023)",
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
value: "MMM dd yyyy",
|
|
8
|
+
label: "MMM dd yyyy (e.g. Jan 15 1990)",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
value: "yyyy-MM-dd",
|
|
12
|
+
label: "yyyy-MM-dd (e.g. 2023-08-31",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
value: "dd/MM/yyyy",
|
|
16
|
+
label: "dd/MM/yyyy (e.g. 31/08/2023",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
value: "MM-dd-yyyy",
|
|
20
|
+
label: "MM-dd-yyyy (e.g. 08-31-2023)",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
value: "yyyy/MM/dd",
|
|
24
|
+
label: "yyyy/MM/dd (e.g. 2023/08/31)",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
value: "dd-MMMM-yyyy",
|
|
28
|
+
label: "dd-MMMM-yyyy (e.g. 31-August-2023)",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: "MMMM dd, yyyy",
|
|
32
|
+
label: "MMMM dd, yyyy (e.g. August 31, 2023)",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: "dd/MM/yy",
|
|
36
|
+
label: "dd/MM/yy (e.g. 31/08/23)",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: "MMMM dd, yy",
|
|
40
|
+
label: "MMMM dd, yy (e.g. August 31, 23)",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: "yy/MM/dd",
|
|
44
|
+
label: "yy/MM/dd (e.g. 23/08/31)",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: "MM-dd-yy",
|
|
48
|
+
label: "MM-dd-yy (e.g. 01-15-90)",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: "M-dd-yy",
|
|
52
|
+
label: "M-dd-yy (e.g. 1-15-90)",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
value: "dd-MM-yy",
|
|
56
|
+
label: "dd-MM-yy (e.g. 15-01-90)",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
value: "dd-MM-yyyy",
|
|
60
|
+
label: "dd-MM-yyyy (e.g. 15-01-1990)",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
value: "dd-M-yy",
|
|
64
|
+
label: "dd-M-yy (e.g. 15-1-90)",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
value: "MM/dd/yy",
|
|
68
|
+
label: "MM/dd/yy (e.g. 01/15/90)",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
value: "M/dd/yy",
|
|
72
|
+
label: "M/dd/yy (e.g. 1/15/90)",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
value: "MM.dd.yy",
|
|
76
|
+
label: "MM.dd.yy (e.g. 01.15.90)",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
value: "M.dd.yy",
|
|
80
|
+
label: "M.dd.yy (e.g. 1.15.90)",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
value: "MMM-dd-yy",
|
|
84
|
+
label: "MMM-dd-yy (e.g. Jan-15-90)",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
value: "MMMM-dd-yy",
|
|
88
|
+
label: "MMMM-dd-yy (e.g. January-15-90)",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
value: "dd-MMM-yy",
|
|
92
|
+
label: "dd-MMM-yy (e.g. 15-Jan-90)",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
value: "yyyy-M-dd",
|
|
96
|
+
label: "yyyy-M-dd (e.g. 1990-1-15)",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
value: "M-dd-yyyy",
|
|
100
|
+
label: "M-dd-yyyy (e.g. 1-15-1990)",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
value: "M/dd/yyyy",
|
|
104
|
+
label: "M/dd/yyyy (e.g. 1/15/1990)",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
value: "dd/M/yyyy",
|
|
108
|
+
label: "dd/M/yyyy (e.g. 15/1/1990)",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
value: "yyyy/M/dd",
|
|
112
|
+
label: "yyyy/M/dd (e.g. 1990/1/15)",
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
value: "dd.MM.yyyy",
|
|
116
|
+
label: "dd.MM.yyyy (e.g. 15.01.1990)",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
value: "dd.M.yyyy",
|
|
120
|
+
label: "dd.M.yyyy (e.g. 15.1.1990)",
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
value: "yyyy.MM.dd",
|
|
124
|
+
label: "yyyy.MM.dd (e.g. 1990.01.15)",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
value: "yyyy.M.dd",
|
|
128
|
+
label: "yyyy.M.dd (e.g. 1990.1.15)",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
value: "MMM. dd, yyyy",
|
|
132
|
+
label: "MMM. dd, yyyy (e.g. Jan. 15, 1990)",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
value: "dd MMM. yyyy",
|
|
136
|
+
label: "dd MMM. yyyy (e.g. 15 Jan. 1990)",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
value: "MMM dd",
|
|
140
|
+
label: "MMM dd (e.g. Jan 15)",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
value: "MMMM dd",
|
|
144
|
+
label: "MMMM dd (e.g. January 15)",
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
value: "MMM d",
|
|
148
|
+
label: "MMM d (e.g. Jan 5)",
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
value: "MMMM d",
|
|
152
|
+
label: "MMMM d (e.g. January 5)",
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
value: "dd. MMM. yyyy",
|
|
156
|
+
label: "dd. MMM. yyyy (e.g. 15. Jan. 1990)",
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
value: "EEE, MMM dd, yyyy",
|
|
160
|
+
label: "EEE, MMM dd, yyyy (e.g. Mon, Jan 15, 1990)",
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
value: "EEEE MMMM yyyy",
|
|
164
|
+
label: "Day MMMM Year (e.g. Tuesday August 2023)",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
value: "EEEE dd MMMM yyyy",
|
|
168
|
+
label: "Day Day-of-Month Month Year (e.g. Tuesday 08 August 2023)",
|
|
169
|
+
},
|
|
170
|
+
];
|
|
171
|
+
export var dateTimePatterns = [
|
|
172
|
+
{
|
|
173
|
+
value: "MM/dd/yyyy HH:mm",
|
|
174
|
+
label: "MM/dd/yyyy HH:mm (e.g. 08/31/2023 12:30)",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
value: "MM/dd/yyyy HH:mm:ss",
|
|
178
|
+
label: "MM/dd/yyyy HH:mm:ss (e.g. 08/31/2023 12:30:45)",
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
value: "MM/dd/yyyy HH:mm:ss.SSS",
|
|
182
|
+
label: "MM/dd/yyyy HH:mm:ss.SSS (e.g. 08/31/2023 12:30:45.500)",
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
value: "MM/dd/yyyy h:mm a",
|
|
186
|
+
label: "MM/dd/yyyy h:mm a (e.g. 08/31/2023 1:30 PM)",
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
value: "MM/dd/yyyy h:mm:ss a",
|
|
190
|
+
label: "MM/dd/yyyy h:mm:ss a (e.g. 08/31/2023 1:30:45 PM)",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
value: "MMM dd HH:mm:ss yyyy",
|
|
194
|
+
label: "MMM dd HH:mm:ss yyyy (e.g. Jan 15 00:34:59 1990)",
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
value: "MMM dd yyyy HH:mm:ss",
|
|
198
|
+
label: "MMM dd yyyy HH:mm:ss (e.g. Jan 15 1990 00:34:59)",
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
value: "dd MMM HH:mm:ss yyyy",
|
|
202
|
+
label: "dd MMM HH:mm:ss yyyy (e.g. 15 Jan 00:34:59 1990)",
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
value: "MM/dd/yyyy h:mm:ss.SSS a",
|
|
206
|
+
label: "MM/dd/yyyy h:mm:ss.SSS a (e.g. 08/31/2023 1:30:45.500 PM)",
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
value: "MMMM dd, yyyy HH:mm",
|
|
210
|
+
label: "MMMM dd, yyyy HH:mm (e.g. August 31, 2023 12:30)",
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
value: "MMMM dd, yyyy HH:mm:ss",
|
|
214
|
+
label: "MMMM dd, yyyy HH:mm:ss (e.g. August 31, 2023 12:30:45)",
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
value: "MMMM dd, yyyy h:mm a",
|
|
218
|
+
label: "MMMM dd, yyyy h:mm a (e.g. August 31, 2023 1:30 PM)",
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
value: "MMMM dd, yyyy h:mm:ss a",
|
|
222
|
+
label: "MMMM dd, yyyy h:mm:ss a (e.g. August 31, 2023 1:30:45 PM)",
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
value: "MMMM dd, yyyy h:mm:ss.SSS a",
|
|
226
|
+
label: "MMMM dd, yyyy h:mm:ss.SSS a (e.g. August 31, 2023 1:30:45.500 PM)",
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
value: "MM-dd-yy HH:mm",
|
|
230
|
+
label: "MM-dd-yy HH:mm (e.g. 01-15-90 10:10)",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
value: "dd-MM-yyyy HH:mm",
|
|
234
|
+
label: "dd-MM-yyyy HH:mm (e.g. 15-01-1990 10:10)",
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
value: "dd/MM/yyyy HH:mm",
|
|
238
|
+
label: "dd/MM/yyyy HH:mm (e.g. 15/01/1990 10:10)",
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
value: "dd-MM-yyyy h:mm a",
|
|
242
|
+
label: "dd-MM-yyyy h:mm a (e.g. 15-01-1990 10:10 AM)",
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
value: "dd/MM/yyyy h:mm a",
|
|
246
|
+
label: "dd/MM/yyyy h:mm a (e.g. 15/01/1990 10:10 AM)",
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
value: "MM/dd/yy HH:mm",
|
|
250
|
+
label: "MM/dd/yy HH:mm (e.g. 01/15/90 10:10)",
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
value: "MM/dd/yy HH:mm:ss",
|
|
254
|
+
label: "MM/dd/yy HH:mm:ss (e.g. 01/15/90 10:10:14)",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
value: "MM/dd/yy h:mm:ss a",
|
|
258
|
+
label: "MM/dd/yy h:mm:ss a (e.g. 01/15/90 5:10:14 AM)",
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
value: "yyyy/MM/dd HH:mm",
|
|
262
|
+
label: "yyyy/MM/dd HH:mm (e.g. 1990/01/15 10:10)",
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
value: "MM-dd-yyyy HH:mm",
|
|
266
|
+
label: "MM-dd-yyyy HH:mm (e.g. 01-15-1990 10:10)",
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
value: "yyyy-MM-dd HH:mm",
|
|
270
|
+
label: "yyyy-MM-dd HH:mm (e.g. 1990-01-15 10:10)",
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
value: "MMM dd HH:mm:ss",
|
|
274
|
+
label: "MMM dd HH:mm:ss (e.g. Jan 15 10:10:25)",
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
value: "MMMM dd HH:mm:ss",
|
|
278
|
+
label: "MMMM dd HH:mm:ss (e.g. January 15 10:10:25)",
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
value: "MMM d HH:mm:ss",
|
|
282
|
+
label: "MMM d HH:mm:ss (e.g. Jan 5 10:10:25)",
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
value: "MMMM d HH:mm:ss",
|
|
286
|
+
label: "MMMM d HH:mm:ss (e.g. January 5 10:10:25)",
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
value: "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
|
|
290
|
+
label: "ISO 8601 (e.g. 1990-01-15T00:34:55.020+09:30)",
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
value: "yyyy-MM-dd'T'HH:mm:ss.SSS",
|
|
294
|
+
label: "ISO 8601 without timezone offset (e.g. 1990-01-15T00:34:55.020)",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
value: "yyyy-MM-dd'T'HH:mmZ",
|
|
298
|
+
label: "yyyy-MM-dd'T'HH:mm+offset (e.g. 1990-01-15T10:10+09:30)",
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
value: "yyyy-MM-dd'T'HH:mm",
|
|
302
|
+
label: "yyyy-MM-dd'T'HH:mm (e.g. 1990-01-15T10:10)",
|
|
303
|
+
},
|
|
304
|
+
];
|
|
305
|
+
export var timePatterns = [
|
|
306
|
+
{
|
|
307
|
+
value: "HH:mm",
|
|
308
|
+
label: "HH:mm (e.g. 12:30)",
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
value: "HH:mm:ss",
|
|
312
|
+
label: "HH:mm:ss (e.g. 12:30:45)",
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
value: "hh:mm a",
|
|
316
|
+
label: "hh:mm a (e.g. 01:30 PM)",
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
value: "hh:mm:ss a",
|
|
320
|
+
label: "hh:mm:ss a (e.g. 01:30:45 PM)",
|
|
321
|
+
},
|
|
322
|
+
];
|
|
323
|
+
export var allowedPatterns = {
|
|
324
|
+
date: datePatterns,
|
|
325
|
+
datetime: dateTimePatterns,
|
|
326
|
+
time: timePatterns,
|
|
327
|
+
};
|