@elliemae/ds-date-time-picker 3.27.0-next.1 → 3.27.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -17,6 +17,7 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
21
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
22
  // If the importer is in node compatibility mode or this is not an ESM
22
23
  // file that has been converted to a CommonJS file using a Babel-
@@ -28,11 +29,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
30
  var src_exports = {};
30
31
  __export(src_exports, {
31
- DSDateTimePicker: () => import_DSDateTimePicker.DSDateTimePicker,
32
- DateTimePickerWithSchema: () => import_DSDateTimePicker.DateTimePickerWithSchema,
33
- default: () => import_DSDateTimePicker.default
32
+ default: () => import_ds_legacy_date_time_picker.default
34
33
  });
35
34
  module.exports = __toCommonJS(src_exports);
36
35
  var React = __toESM(require("react"));
37
- var import_DSDateTimePicker = __toESM(require("./DSDateTimePicker.js"));
36
+ __reExport(src_exports, require("@elliemae/ds-legacy-date-time-picker"), module.exports);
37
+ var import_ds_legacy_date_time_picker = __toESM(require("@elliemae/ds-legacy-date-time-picker"));
38
38
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { default, DSDateTimePicker, DateTimePickerWithSchema } from './DSDateTimePicker.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAoE;",
4
+ "sourcesContent": ["export * from '@elliemae/ds-legacy-date-time-picker';\nexport { default } from '@elliemae/ds-legacy-date-time-picker';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,iDAAd;AACA,wCAAwB;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import * as React from "react";
2
- import { default as default2, DSDateTimePicker, DateTimePickerWithSchema } from "./DSDateTimePicker.js";
2
+ export * from "@elliemae/ds-legacy-date-time-picker";
3
+ import { default as default2 } from "@elliemae/ds-legacy-date-time-picker";
3
4
  export {
4
- DSDateTimePicker,
5
- DateTimePickerWithSchema,
6
5
  default2 as default
7
6
  };
8
7
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default, DSDateTimePicker, DateTimePickerWithSchema } from './DSDateTimePicker.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAAA,UAAS,kBAAkB,gCAAgC;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from '@elliemae/ds-legacy-date-time-picker';\nexport { default } from '@elliemae/ds-legacy-date-time-picker';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;",
6
6
  "names": ["default"]
7
7
  }
@@ -1 +1,2 @@
1
- export { default, DSDateTimePicker, DateTimePickerWithSchema } from './DSDateTimePicker.js';
1
+ export * from '@elliemae/ds-legacy-date-time-picker';
2
+ export { default } from '@elliemae/ds-legacy-date-time-picker';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-date-time-picker",
3
- "version": "3.27.0-next.1",
3
+ "version": "3.27.0-next.3",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Date Time Picker",
6
6
  "files": [
@@ -13,26 +13,6 @@
13
13
  ".": {
14
14
  "import": "./dist/esm/index.js",
15
15
  "require": "./dist/cjs/index.js"
16
- },
17
- "./utils": {
18
- "import": "./dist/esm/utils.js",
19
- "require": "./dist/cjs/utils.js"
20
- },
21
- "./tests/utils": {
22
- "import": "./dist/esm/tests/utils.js",
23
- "require": "./dist/cjs/tests/utils.js"
24
- },
25
- "./lang/english": {
26
- "import": "./dist/esm/lang/english.js",
27
- "require": "./dist/cjs/lang/english.js"
28
- },
29
- "./DSDateTimePicker": {
30
- "import": "./dist/esm/DSDateTimePicker.js",
31
- "require": "./dist/cjs/DSDateTimePicker.js"
32
- },
33
- "./components/DateTimePickerImpl": {
34
- "import": "./dist/esm/components/DateTimePickerImpl.js",
35
- "require": "./dist/cjs/components/DateTimePickerImpl.js"
36
16
  }
37
17
  },
38
18
  "sideEffects": [
@@ -55,20 +35,12 @@
55
35
  "indent": 4
56
36
  },
57
37
  "dependencies": {
58
- "lodash": "~4.17.21",
59
- "moment": "~2.29.4",
60
- "@elliemae/ds-classnames": "3.27.0-next.1",
61
- "@elliemae/ds-date-picker": "3.27.0-next.1",
62
- "@elliemae/ds-props-helpers": "3.27.0-next.1",
63
- "@elliemae/ds-time-picker": "3.27.0-next.1",
64
- "@elliemae/ds-form": "3.27.0-next.1",
65
- "@elliemae/ds-utilities": "3.27.0-next.1",
66
- "@elliemae/ds-system": "3.27.0-next.1"
38
+ "@elliemae/ds-legacy-date-time-picker": "1.0.1"
67
39
  },
68
40
  "devDependencies": {
69
41
  "@elliemae/pui-cli": "~9.0.0-next.31",
70
42
  "styled-components": "~5.3.9",
71
- "@elliemae/ds-monorepo-devops": "3.27.0-next.1"
43
+ "@elliemae/ds-monorepo-devops": "3.27.0-next.3"
72
44
  },
73
45
  "peerDependencies": {
74
46
  "lodash": "^4.17.21",
@@ -82,13 +54,13 @@
82
54
  },
83
55
  "scripts": {
84
56
  "dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
85
- "test": "pui-cli test --passWithNoTests",
86
- "lint": "node ../../../scripts/lint.mjs",
57
+ "test": "exit 0 | echo",
58
+ "lint": "exit 0 | echo",
87
59
  "eslint:fix": "exit 0 | echo",
88
60
  "dts": "exit 0 | echo",
89
61
  "build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
90
62
  "dev:build": "pnpm --filter {.}... build",
91
63
  "dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
92
- "checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
64
+ "checkDeps": "exit 0 | echo"
93
65
  }
94
66
  }
@@ -1,193 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var DSDateTimePicker_exports = {};
30
- __export(DSDateTimePicker_exports, {
31
- DSDateTimePicker: () => DSDateTimePicker,
32
- DateTimePickerWithSchema: () => DateTimePickerWithSchema,
33
- default: () => DSDateTimePicker_default
34
- });
35
- module.exports = __toCommonJS(DSDateTimePicker_exports);
36
- var React = __toESM(require("react"));
37
- var import_jsx_runtime = require("react/jsx-runtime");
38
- var import_ds_utilities = require("@elliemae/ds-utilities");
39
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
- var import_moment = __toESM(require("moment"));
41
- var import_ds_classnames = require("@elliemae/ds-classnames");
42
- var import_ds_date_picker = require("@elliemae/ds-date-picker");
43
- var import_DateTimePickerImpl = require("./components/DateTimePickerImpl.js");
44
- var import_english = __toESM(require("./lang/english.js"));
45
- const { placeholder: placeholderDefault, className: classNameDefault, id: idDefault } = import_english.default;
46
- const DSDateTimePicker = ({
47
- containerProps = {},
48
- className = classNameDefault,
49
- id = idDefault,
50
- placeholder = placeholderDefault,
51
- date,
52
- clearable = false,
53
- onBlur = () => null,
54
- datePickerProps = {
55
- disabled: false,
56
- numberOfMonths: 1,
57
- readOnly: false,
58
- enableOutsideDays: false,
59
- transitionDuration: 0,
60
- firstDayOfWeek: 0,
61
- keepOpenOnDateSelect: true,
62
- hideKeyboardShortcutsPanel: true,
63
- onPrevMonthClick: () => null,
64
- onNextMonthClick: () => null,
65
- onClose: () => null,
66
- onchange: () => null,
67
- onDateChange: () => null,
68
- phrases: import_ds_date_picker.SingleDatePickerPhrases,
69
- displayFormatDay: "D",
70
- isDayBlocked: () => false,
71
- isOutsideRange: () => false,
72
- isDayHighlighted: () => false,
73
- zIndex: 11
74
- },
75
- timePickerProps = {
76
- format: "hh:mm A",
77
- onChange: () => null,
78
- disabledTimes: void 0,
79
- minutesInterval: 1
80
- },
81
- dateInputProps = {
82
- onDateInputDateChange: () => null
83
- }
84
- }) => {
85
- (0, import_ds_utilities.useDeprecateComponent)({ componentName: "ds-date-time-picker", version: "3.x Date: 2023 Q1" });
86
- const { cssClassName } = (0, import_ds_classnames.convertPropToCssClassName)("datetimepicker", className, {
87
- id
88
- });
89
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cssClassName, ...containerProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
- import_DateTimePickerImpl.DSDateTimePickerImpl,
91
- {
92
- clearable,
93
- date,
94
- datePickerProps,
95
- onBlur,
96
- placeholder,
97
- timePickerProps,
98
- dateInputProps
99
- }
100
- ) });
101
- };
102
- const dateTimePickerProps = {
103
- containerProps: import_ds_props_helpers.PropTypes.object.description("Set of Properties attached to the main container"),
104
- className: import_ds_props_helpers.PropTypes.string.description("html class attribute"),
105
- id: import_ds_props_helpers.PropTypes.string.description("components id"),
106
- /**
107
- * on blur callback
108
- */
109
- onBlur: import_ds_props_helpers.PropTypes.func.description("on blur callback"),
110
- /**
111
- * Initial date, by default current date
112
- */
113
- date: import_ds_props_helpers.PropTypes.instanceOf(Date, import_moment.default).description("Initial date, by default current date"),
114
- /**
115
- * Flag to trigger onDateChange on error
116
- */
117
- clearable: import_ds_props_helpers.PropTypes.bool.description("Flag to trigger onDateChange on error"),
118
- /**
119
- * DatePicker properties
120
- */
121
- datePickerProps: import_ds_props_helpers.PropTypes.shape({
122
- disabled: import_ds_props_helpers.PropTypes.bool,
123
- numberOfMonths: import_ds_props_helpers.PropTypes.number,
124
- readOnly: import_ds_props_helpers.PropTypes.bool,
125
- enableOutsideDays: import_ds_props_helpers.PropTypes.bool,
126
- transitionDuration: import_ds_props_helpers.PropTypes.number,
127
- firstDayOfWeek: import_ds_props_helpers.PropTypes.number,
128
- keepOpenOnDateSelect: import_ds_props_helpers.PropTypes.bool,
129
- hideKeyboardShortcutsPanel: import_ds_props_helpers.PropTypes.bool,
130
- onPrevMonthClick: import_ds_props_helpers.PropTypes.func,
131
- onNextMonthClick: import_ds_props_helpers.PropTypes.func,
132
- onClose: import_ds_props_helpers.PropTypes.func,
133
- onDateChange: import_ds_props_helpers.PropTypes.func,
134
- phrases: import_ds_props_helpers.PropTypes.shape({
135
- calendarLabel: import_ds_props_helpers.PropTypes.string,
136
- closeDatePicker: import_ds_props_helpers.PropTypes.string,
137
- clearDates: import_ds_props_helpers.PropTypes.string,
138
- focusStartDate: import_ds_props_helpers.PropTypes.string,
139
- jumpToPrevMonth: import_ds_props_helpers.PropTypes.string,
140
- jumpToNextMonth: import_ds_props_helpers.PropTypes.string,
141
- keyboardShortcuts: import_ds_props_helpers.PropTypes.string,
142
- showKeyboardShortcutsPanel: import_ds_props_helpers.PropTypes.string,
143
- hideKeyboardShortcutsPanel: import_ds_props_helpers.PropTypes.string,
144
- openThisPanel: import_ds_props_helpers.PropTypes.string,
145
- enterKey: import_ds_props_helpers.PropTypes.string,
146
- leftArrowRightArrow: import_ds_props_helpers.PropTypes.string,
147
- upArrowDownArrow: import_ds_props_helpers.PropTypes.string,
148
- pageUpPageDown: import_ds_props_helpers.PropTypes.string,
149
- homeEnd: import_ds_props_helpers.PropTypes.string,
150
- escape: import_ds_props_helpers.PropTypes.string,
151
- questionMark: import_ds_props_helpers.PropTypes.string,
152
- selectFocusedDate: import_ds_props_helpers.PropTypes.string,
153
- moveFocusByOneDay: import_ds_props_helpers.PropTypes.string,
154
- moveFocusByOneWeek: import_ds_props_helpers.PropTypes.string,
155
- moveFocusByOneMonth: import_ds_props_helpers.PropTypes.string,
156
- moveFocustoStartAndEndOfWeek: import_ds_props_helpers.PropTypes.string,
157
- returnFocusToInput: import_ds_props_helpers.PropTypes.string,
158
- keyboardNavigationInstructions: import_ds_props_helpers.PropTypes.string,
159
- chooseAvailableStartDate: import_ds_props_helpers.PropTypes.func,
160
- chooseAvailableEndDate: import_ds_props_helpers.PropTypes.func,
161
- dateIsUnavailable: import_ds_props_helpers.PropTypes.func,
162
- dateIsSelected: import_ds_props_helpers.PropTypes.func,
163
- /**
164
- * ZIndex for the picker popup
165
- */
166
- zIndex: import_ds_props_helpers.PropTypes.number
167
- }),
168
- displayFormatDay: import_ds_props_helpers.PropTypes.string,
169
- isDayBlocked: import_ds_props_helpers.PropTypes.func,
170
- isOutsideRange: import_ds_props_helpers.PropTypes.func,
171
- isDayHighlighted: import_ds_props_helpers.PropTypes.func
172
- }).description("DatePicker properties"),
173
- /**
174
- * Input placeholder
175
- */
176
- placeholder: import_ds_props_helpers.PropTypes.string.description("Input placeholder"),
177
- /**
178
- * TimePicker properties
179
- */
180
- timePickerProps: import_ds_props_helpers.PropTypes.shape({
181
- format: import_ds_props_helpers.PropTypes.string,
182
- onChange: import_ds_props_helpers.PropTypes.func
183
- }).description("TimePicker properties"),
184
- dateInputProps: import_ds_props_helpers.PropTypes.shape({
185
- onDateInputDateChange: import_ds_props_helpers.PropTypes.func
186
- }).description("DateInputProperties")
187
- };
188
- DSDateTimePicker.propTypes = dateTimePickerProps;
189
- DSDateTimePicker.displayName = "DSDateTimePicker";
190
- const DateTimePickerWithSchema = (0, import_ds_props_helpers.describe)(DSDateTimePicker);
191
- DateTimePickerWithSchema.propTypes = dateTimePickerProps;
192
- var DSDateTimePicker_default = DSDateTimePicker;
193
- //# sourceMappingURL=DSDateTimePicker.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/DSDateTimePicker.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport React from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport moment from 'moment';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { SingleDatePickerPhrases } from '@elliemae/ds-date-picker';\nimport { DSDateTimePickerImpl } from './components/DateTimePickerImpl.js';\nimport english from './lang/english.js';\n\nconst { placeholder: placeholderDefault, className: classNameDefault, id: idDefault } = english;\n\nconst DSDateTimePicker = ({\n containerProps = {},\n className = classNameDefault,\n id = idDefault,\n placeholder = placeholderDefault,\n date,\n clearable = false,\n onBlur = () => null,\n datePickerProps = {\n disabled: false,\n numberOfMonths: 1,\n readOnly: false,\n enableOutsideDays: false,\n transitionDuration: 0,\n firstDayOfWeek: 0,\n keepOpenOnDateSelect: true,\n hideKeyboardShortcutsPanel: true,\n onPrevMonthClick: () => null,\n onNextMonthClick: () => null,\n onClose: () => null,\n onchange: () => null,\n onDateChange: () => null,\n phrases: SingleDatePickerPhrases,\n displayFormatDay: 'D',\n isDayBlocked: () => false,\n isOutsideRange: () => false,\n isDayHighlighted: () => false,\n zIndex: 11,\n },\n timePickerProps = {\n format: 'hh:mm A',\n onChange: () => null,\n disabledTimes: undefined,\n minutesInterval: 1,\n },\n dateInputProps = {\n onDateInputDateChange: () => null,\n },\n}) => {\n useDeprecateComponent({ componentName: 'ds-date-time-picker', version: '3.x Date: 2023 Q1' });\n\n const { cssClassName } = convertPropToCssClassName('datetimepicker', className, {\n id,\n });\n return (\n <div className={cssClassName} {...containerProps}>\n <DSDateTimePickerImpl\n clearable={clearable}\n date={date}\n datePickerProps={datePickerProps}\n onBlur={onBlur}\n placeholder={placeholder}\n timePickerProps={timePickerProps}\n dateInputProps={dateInputProps}\n />\n </div>\n );\n};\n\nconst dateTimePickerProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n className: PropTypes.string.description('html class attribute'),\n id: PropTypes.string.description('components id'),\n /**\n * on blur callback\n */\n onBlur: PropTypes.func.description('on blur callback'),\n /**\n * Initial date, by default current date\n */\n date: PropTypes.instanceOf(Date, moment).description('Initial date, by default current date'),\n /**\n * Flag to trigger onDateChange on error\n */\n clearable: PropTypes.bool.description('Flag to trigger onDateChange on error'),\n /**\n * DatePicker properties\n */\n datePickerProps: PropTypes.shape({\n disabled: PropTypes.bool,\n numberOfMonths: PropTypes.number,\n readOnly: PropTypes.bool,\n enableOutsideDays: PropTypes.bool,\n transitionDuration: PropTypes.number,\n firstDayOfWeek: PropTypes.number,\n keepOpenOnDateSelect: PropTypes.bool,\n hideKeyboardShortcutsPanel: PropTypes.bool,\n onPrevMonthClick: PropTypes.func,\n onNextMonthClick: PropTypes.func,\n onClose: PropTypes.func,\n onDateChange: PropTypes.func,\n phrases: PropTypes.shape({\n calendarLabel: PropTypes.string,\n closeDatePicker: PropTypes.string,\n clearDates: PropTypes.string,\n focusStartDate: PropTypes.string,\n jumpToPrevMonth: PropTypes.string,\n jumpToNextMonth: PropTypes.string,\n keyboardShortcuts: PropTypes.string,\n showKeyboardShortcutsPanel: PropTypes.string,\n hideKeyboardShortcutsPanel: PropTypes.string,\n openThisPanel: PropTypes.string,\n enterKey: PropTypes.string,\n leftArrowRightArrow: PropTypes.string,\n upArrowDownArrow: PropTypes.string,\n pageUpPageDown: PropTypes.string,\n homeEnd: PropTypes.string,\n escape: PropTypes.string,\n questionMark: PropTypes.string,\n selectFocusedDate: PropTypes.string,\n moveFocusByOneDay: PropTypes.string,\n moveFocusByOneWeek: PropTypes.string,\n moveFocusByOneMonth: PropTypes.string,\n moveFocustoStartAndEndOfWeek: PropTypes.string,\n returnFocusToInput: PropTypes.string,\n keyboardNavigationInstructions: PropTypes.string,\n chooseAvailableStartDate: PropTypes.func,\n chooseAvailableEndDate: PropTypes.func,\n dateIsUnavailable: PropTypes.func,\n dateIsSelected: PropTypes.func,\n /**\n * ZIndex for the picker popup\n */\n zIndex: PropTypes.number,\n }),\n displayFormatDay: PropTypes.string,\n isDayBlocked: PropTypes.func,\n isOutsideRange: PropTypes.func,\n isDayHighlighted: PropTypes.func,\n }).description('DatePicker properties'),\n /**\n * Input placeholder\n */\n placeholder: PropTypes.string.description('Input placeholder'),\n /**\n * TimePicker properties\n */\n timePickerProps: PropTypes.shape({\n format: PropTypes.string,\n onChange: PropTypes.func,\n }).description('TimePicker properties'),\n dateInputProps: PropTypes.shape({\n onDateInputDateChange: PropTypes.func,\n }).description('DateInputProperties'),\n};\n\nDSDateTimePicker.propTypes = dateTimePickerProps;\nDSDateTimePicker.displayName = 'DSDateTimePicker';\nconst DateTimePickerWithSchema = describe(DSDateTimePicker);\nDateTimePickerWithSchema.propTypes = dateTimePickerProps;\n\nexport { DateTimePickerWithSchema, DSDateTimePicker };\nexport default DSDateTimePicker;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0DjB;AAxDN,0BAAsC;AACtC,8BAAoC;AACpC,oBAAmB;AACnB,2BAA0C;AAC1C,4BAAwC;AACxC,gCAAqC;AACrC,qBAAoB;AAEpB,MAAM,EAAE,aAAa,oBAAoB,WAAW,kBAAkB,IAAI,UAAU,IAAI,eAAAA;AAExF,MAAM,mBAAmB,CAAC;AAAA,EACxB,iBAAiB,CAAC;AAAA,EAClB,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,cAAc;AAAA,EACd;AAAA,EACA,YAAY;AAAA,EACZ,SAAS,MAAM;AAAA,EACf,kBAAkB;AAAA,IAChB,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,UAAU;AAAA,IACV,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,gBAAgB;AAAA,IAChB,sBAAsB;AAAA,IACtB,4BAA4B;AAAA,IAC5B,kBAAkB,MAAM;AAAA,IACxB,kBAAkB,MAAM;AAAA,IACxB,SAAS,MAAM;AAAA,IACf,UAAU,MAAM;AAAA,IAChB,cAAc,MAAM;AAAA,IACpB,SAAS;AAAA,IACT,kBAAkB;AAAA,IAClB,cAAc,MAAM;AAAA,IACpB,gBAAgB,MAAM;AAAA,IACtB,kBAAkB,MAAM;AAAA,IACxB,QAAQ;AAAA,EACV;AAAA,EACA,kB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uBAAuB;AAAA,EACtC,gBAAgB,kCAAU,MAAM;AAAA,IAC9B,uBAAuB,kCAAU;AAAA,EACnC,CAAC,EAAE,YAAY,qBAAqB;AACtC;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,cAAc;AAC/B,MAAM,+BAA2B,kCAAS,gBAAgB;AAC1D,yBAAyB,YAAY;AAGrC,IAAO,2BAAQ;",
6
- "names": ["english", "moment"]
7
- }
@@ -1,289 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var DateTimePickerImpl_exports = {};
30
- __export(DateTimePickerImpl_exports, {
31
- DSDateTimePickerImpl: () => DSDateTimePickerImpl,
32
- default: () => DateTimePickerImpl_default
33
- });
34
- module.exports = __toCommonJS(DateTimePickerImpl_exports);
35
- var React = __toESM(require("react"));
36
- var import_jsx_runtime = require("react/jsx-runtime");
37
- var import_react = require("react");
38
- var import_moment = __toESM(require("moment"));
39
- var import_ds_classnames = require("@elliemae/ds-classnames");
40
- var import_ds_date_picker = require("@elliemae/ds-date-picker");
41
- var import_ds_form = require("@elliemae/ds-form");
42
- var import_ds_utilities = require("@elliemae/ds-utilities");
43
- var import_ds_time_picker = require("@elliemae/ds-time-picker");
44
- var import_utils = require("../utils.js");
45
- const blockName = "date-time-picker";
46
- const DateTimePickerWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "wrapper");
47
- const TimePicker = (0, import_ds_classnames.aggregatedClasses)(import_ds_time_picker.DSTimePickerMenu)(blockName, "time-picker");
48
- const TimePickerWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "time-picker-wrapper");
49
- const formatDate = "MMDDYYYY";
50
- const DSDateTimePickerImpl = ({
51
- onBlur = () => null,
52
- placeholder,
53
- date,
54
- clearable,
55
- datePickerProps: {
56
- disabled = false,
57
- numberOfMonths = 1,
58
- readOnly = false,
59
- enableOutsideDays = false,
60
- transitionDuration = 0,
61
- firstDayOfWeek = 0,
62
- keepOpenOnDateSelect = true,
63
- hideKeyboardShortcutsPanel = true,
64
- onPrevMonthClick = () => null,
65
- onNextMonthClick = () => null,
66
- onClose = () => null,
67
- onChange: onDatePickerChange = () => null,
68
- onDateChange = () => null,
69
- onError: onErrorDate = () => null,
70
- phrases = import_ds_date_picker.SingleDatePickerPhrases,
71
- displayFormatDay = "D",
72
- isDayBlocked = () => false,
73
- isOutsideRange = () => false,
74
- isDayHighlighted = () => false,
75
- zIndex = 11
76
- },
77
- timePickerProps: {
78
- format = "hh:mm A",
79
- onChange: onChangeTimePicker = () => null,
80
- disabledTimes = void 0,
81
- onError: onErrorTime = () => null,
82
- minutesInterval = 1
83
- },
84
- dateInputProps: { onDateInputDateChange = () => null }
85
- }) => {
86
- const [selectedDate, setSelectedDate] = (0, import_react.useState)(void 0);
87
- const [incompleteInput, setIncompleteInput] = (0, import_react.useState)(void 0);
88
- const [isOpen, setIsOpen] = (0, import_react.useState)(false);
89
- const disabledTimeRange = disabledTimes && {
90
- from: (0, import_ds_time_picker.convertTimeString)(disabledTimes.from),
91
- to: (0, import_ds_time_picker.convertTimeString)(disabledTimes.to)
92
- };
93
- const dateTimePickerWrapperRef = (0, import_react.useRef)();
94
- const fullFormat = `${formatDate} ${format}`;
95
- (0, import_react.useEffect)(() => {
96
- if (date) {
97
- setSelectedDate((0, import_moment.default)(date));
98
- } else if (date === null)
99
- setSelectedDate(void 0);
100
- }, [date]);
101
- const visiblePanels = (0, import_react.useMemo)(() => (0, import_ds_utilities.getVisibleTimeByFormat)(format), []);
102
- const currentYear = (0, import_moment.default)().year();
103
- const handleDatePickerChange = (dateSelected) => {
104
- const splittedDate = (0, import_utils.updateDateAndTime)(dateSelected, selectedDate);
105
- if (!readOnly) {
106
- setSelectedDate(splittedDate);
107
- onDateChange(splittedDate);
108
- }
109
- };
110
- const onTimeChange = (pickerTime) => {
111
- const splittedDate = (0, import_utils.updateDateAndTime)(selectedDate, pickerTime);
112
- onChangeTimePicker(splittedDate);
113
- setSelectedDate(splittedDate);
114
- };
115
- const handleInputChange = (inputValue, type) => {
116
- onDatePickerChange(inputValue);
117
- let timeBlocked = false;
118
- const inputMoment = (0, import_moment.default)(inputValue, fullFormat);
119
- setIncompleteInput(inputValue);
120
- if (type === "date") {
121
- const splittedDate = (0, import_utils.updateDateAndTime)(inputMoment, selectedDate);
122
- if (inputValue.length < 8) {
123
- onErrorDate({ message: "date incomplete", inputValue });
124
- if (clearable)
125
- onDateChange("error");
126
- return;
127
- }
128
- if (inputValue.length === 8 && inputMoment.isValid()) {
129
- setSelectedDate(splittedDate);
130
- onChangeTimePicker(splittedDate);
131
- }
132
- onDateChange(splittedDate);
133
- return;
134
- }
135
- if (disabledTimeRange) {
136
- const hour = inputValue.hour();
137
- const min = inputValue.minutes();
138
- const { from, to } = disabledTimeRange;
139
- if (hour > from.hour && hour < to.hour || hour === to.hour && min < to.min) {
140
- timeBlocked = true;
141
- }
142
- }
143
- if (timeBlocked)
144
- onErrorTime({ message: "time blocked", inputValue });
145
- const dateBlocked = isDayBlocked(inputMoment);
146
- if (dateBlocked)
147
- onErrorDate({ message: "date blocked", inputValue });
148
- if (!timeBlocked && !dateBlocked) {
149
- onDateChange(inputValue);
150
- }
151
- };
152
- const handleOutsideClick = (event) => {
153
- if (!dateTimePickerWrapperRef.current.contains(event.target)) {
154
- setIsOpen(false);
155
- }
156
- };
157
- const handleClickEscape = () => setIsOpen(false);
158
- const handleOpen = () => setIsOpen(true);
159
- const handleContainerBlur = (event) => {
160
- if (!isOpen && !event.currentTarget.contains(event.relatedTarget)) {
161
- onBlur(
162
- event,
163
- selectedDate?.isValid() ? selectedDate : {
164
- error: true,
165
- message: "incomplete input",
166
- input: incompleteInput
167
- }
168
- );
169
- if (clearable && !selectedDate && !!incompleteInput) {
170
- const inputMoment = (0, import_moment.default)(incompleteInput, fullFormat);
171
- const splittedDate = (0, import_utils.updateDateAndTime)(inputMoment, selectedDate);
172
- setSelectedDate(splittedDate);
173
- onDateChange(splittedDate);
174
- }
175
- }
176
- };
177
- (0, import_react.useEffect)(() => {
178
- if (!isOpen)
179
- onBlur(
180
- {},
181
- selectedDate?.isValid() ? selectedDate : {
182
- error: true,
183
- message: "incomplete input",
184
- input: incompleteInput
185
- }
186
- );
187
- }, [isOpen]);
188
- const hasSelectedDate = !!selectedDate;
189
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
190
- import_ds_form.DSInputGroup,
191
- {
192
- containerProps: {
193
- onBlur: handleContainerBlur
194
- },
195
- rightAddon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
196
- import_ds_date_picker.DatePickerDropdown,
197
- {
198
- disabled,
199
- isOpen,
200
- zIndex,
201
- menu: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DateTimePickerWrapper, { ref: dateTimePickerWrapperRef, "data-testid": "date-time-picker", children: [
202
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
203
- "div",
204
- {
205
- className: hasSelectedDate ? "has-selected-date" : "without-selected-date",
206
- "data-testid": "date-time-picker-portal-wrapper",
207
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
208
- import_ds_date_picker.DSDatePickerController,
209
- {
210
- date: selectedDate,
211
- displayFormatDay,
212
- enableOutsideDays,
213
- firstDayOfWeek,
214
- hideKeyboardShortcutsPanel,
215
- isDayBlocked,
216
- isDayHighlighted,
217
- isOutsideRange,
218
- keepOpenOnDateSelect,
219
- numberOfMonths,
220
- onClickEscape: handleClickEscape,
221
- onClose,
222
- onDateChange: handleDatePickerChange,
223
- onNextMonthClick,
224
- onOutsideClick: (event) => handleOutsideClick(event),
225
- onPrevMonthClick,
226
- phrases,
227
- transitionDuration
228
- }
229
- )
230
- }
231
- ),
232
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TimePickerWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
233
- TimePicker,
234
- {
235
- disabled,
236
- disabledTimes: disabledTimeRange,
237
- format,
238
- hasHeader: true,
239
- hasHeaderDisplay: true,
240
- onTimeChange,
241
- showSeconds: false,
242
- minutesInterval,
243
- time: selectedDate,
244
- ...visiblePanels
245
- }
246
- ) })
247
- ] }),
248
- onClick: handleOpen,
249
- readOnly
250
- }
251
- ),
252
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
253
- import_ds_form.DSInput,
254
- {
255
- customInputType: ({ onChange: handleChange, ...restInputProps }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
256
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
257
- import_ds_form.DateInputsV2Impl,
258
- {
259
- disabled,
260
- onChange: (input) => handleChange(input, "date"),
261
- ...restInputProps,
262
- onDateChange: onDateInputDateChange,
263
- yearMaxRange: currentYear + 100,
264
- yearMinRange: currentYear - 100,
265
- time: restInputProps.value && restInputProps.value.hour && restInputProps.value.isValid() ? restInputProps.value.format(formatDate) : restInputProps.value
266
- }
267
- ) }),
268
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
269
- import_ds_form.TimeInputImpl,
270
- {
271
- disabled,
272
- format,
273
- onChange: (time) => handleChange(time, "time"),
274
- ...restInputProps
275
- }
276
- )
277
- ] }),
278
- isShowElipsisActive: false,
279
- disabled,
280
- onChange: handleInputChange,
281
- placeholder,
282
- value: selectedDate
283
- }
284
- )
285
- }
286
- );
287
- };
288
- var DateTimePickerImpl_default = DSDateTimePickerImpl;
289
- //# sourceMappingURL=DateTimePickerImpl.js.map