cnhis-design-vue 3.1.15-beta.1 → 3.1.15-beta.10

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.
Files changed (220) hide show
  1. package/es/packages/annotation-edit/src/AnnotationEdit.js +2 -1
  2. package/es/packages/big-table/index.d.ts +8 -11
  3. package/es/packages/big-table/src/BigTable.vue.d.ts +24 -19
  4. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +17 -11
  5. package/es/packages/big-table/src/bigTableProps.d.ts +4 -3
  6. package/es/packages/big-table/src/bigTableProps.js +1 -1
  7. package/es/packages/big-table/src/components/edit-form/edit-date.js +2 -1
  8. package/es/packages/big-table/src/components/edit-form/edit-select.js +2 -1
  9. package/es/packages/big-table/src/components/edit-form/edit-separate.js +8 -1
  10. package/es/packages/big-table/src/components/edit-form/edit-separate.vue.d.ts +2 -1
  11. package/es/packages/big-table/src/hooks/useAnnotation.d.ts +4 -0
  12. package/es/packages/big-table/src/hooks/useAnnotation.js +21 -0
  13. package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +7 -2
  14. package/es/packages/big-table/src/hooks/useEdit.d.ts +2 -1
  15. package/es/packages/big-table/style/index.css +27 -1
  16. package/es/packages/bpmn-workflow/src/BpmnWorkflow.js +2 -2
  17. package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +8 -8
  18. package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomContextPadProvider.js +2 -2
  19. package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPalette.js +1 -1
  20. package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +4 -3
  21. package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +2 -2
  22. package/es/packages/bpmn-workflow/src/custom/customModeler/index.js +1 -1
  23. package/es/packages/bpmn-workflow/src/custom/customOtherModule/CustomPopupMenu.js +2 -2
  24. package/es/packages/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +3 -3
  25. package/es/packages/button-print/src/utils/print.d.ts +1 -1
  26. package/es/packages/button-print/src/utils/print.js +1 -1
  27. package/es/packages/fabric-chart/index.d.ts +1 -0
  28. package/es/packages/fabric-chart/src/FabricChart.js +17 -17
  29. package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +12 -10
  30. package/es/packages/fabric-chart/src/hooks/useCenter.js +7 -5
  31. package/es/packages/fabric-chart/src/hooks/useCumputedPoint.js +4 -2
  32. package/es/packages/fabric-chart/src/hooks/useDraw.js +1 -0
  33. package/es/packages/fabric-chart/src/hooks/useLeft.js +5 -4
  34. package/es/packages/field-set/index.d.ts +4365 -0
  35. package/es/packages/field-set/src/FieldSet.js +53 -54
  36. package/es/packages/field-set/src/FieldSet.vue.d.ts +4365 -0
  37. package/es/packages/field-set/style/index.css +0 -9
  38. package/es/packages/form-config/index.d.ts +12111 -0
  39. package/es/packages/form-config/index.js +10 -0
  40. package/es/packages/form-config/src/FormConfig.js +113 -0
  41. package/es/packages/form-config/src/FormConfig.vue.d.ts +12113 -0
  42. package/es/packages/form-config/src/components/FormConfigCreator.js +97 -0
  43. package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +5094 -0
  44. package/es/packages/form-config/src/components/FormConfigEdit.js +81 -0
  45. package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +3591 -0
  46. package/es/packages/form-config/src/constants/index.d.ts +28 -0
  47. package/es/packages/form-config/src/constants/index.js +28 -0
  48. package/es/packages/form-config/src/hooks/index.d.ts +2 -0
  49. package/es/packages/form-config/src/hooks/index.js +2 -0
  50. package/es/packages/form-config/src/hooks/useConfigurationField.d.ts +6 -0
  51. package/es/packages/form-config/src/hooks/useConfigurationField.js +103 -0
  52. package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +5 -0
  53. package/es/packages/form-config/src/hooks/usePresetRenderer.js +117 -0
  54. package/es/packages/form-config/src/hooks/useSortable.d.ts +11 -0
  55. package/es/packages/form-config/src/hooks/useSortable.js +31 -0
  56. package/es/packages/form-config/src/types/index.d.ts +18 -0
  57. package/es/packages/form-config/src/types/index.js +1 -0
  58. package/es/packages/form-config/style/index.css +108 -0
  59. package/es/packages/form-render/index.d.ts +24 -3
  60. package/es/packages/form-render/src/FormRender.js +10 -6
  61. package/es/packages/form-render/src/FormRender.vue.d.ts +24 -3
  62. package/es/packages/form-render/src/components/renderer/cascader.js +7 -7
  63. package/es/packages/form-render/src/components/renderer/combination/hooks/useDeepValidate.d.ts +5 -0
  64. package/es/packages/form-render/src/components/renderer/combination/hooks/useDeepValidate.js +32 -0
  65. package/es/packages/form-render/src/components/renderer/{combination.d.ts → combination/index.d.ts} +7 -1
  66. package/es/packages/form-render/src/components/renderer/combination/index.js +157 -0
  67. package/es/packages/form-render/src/components/renderer/complex.d.ts +2 -0
  68. package/es/packages/form-render/src/components/renderer/complex.js +2 -5
  69. package/es/packages/form-render/src/components/renderer/date.d.ts +29 -0
  70. package/es/packages/form-render/src/components/renderer/date.js +63 -56
  71. package/es/packages/form-render/src/components/renderer/formItem.js +3 -3
  72. package/es/packages/form-render/src/components/renderer/index.js +1 -1
  73. package/es/packages/form-render/src/components/renderer/radio.js +4 -1
  74. package/es/packages/form-render/src/components/renderer/select.d.ts +9 -0
  75. package/es/packages/form-render/src/components/renderer/select.js +28 -17
  76. package/es/packages/form-render/src/constants/index.d.ts +2 -1
  77. package/es/packages/form-render/src/hooks/useAnchor.d.ts +7 -6
  78. package/es/packages/form-render/src/hooks/useAnchor.js +1 -2
  79. package/es/packages/form-render/src/hooks/useAsyncQueue.d.ts +6 -1
  80. package/es/packages/form-render/src/hooks/useAsyncQueue.js +12 -7
  81. package/es/packages/form-render/src/hooks/useCommonInjection.d.ts +6 -0
  82. package/es/packages/form-render/src/hooks/useCommonInjection.js +19 -0
  83. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +4 -5
  84. package/es/packages/form-render/src/hooks/useFormContext.d.ts +3 -3
  85. package/es/packages/form-render/src/hooks/useFormContext.js +21 -3
  86. package/es/packages/form-render/src/hooks/useFormRenderLifeCycle.d.ts +13 -0
  87. package/es/packages/form-render/src/hooks/useFormRenderLifeCycle.js +10 -0
  88. package/es/packages/form-render/src/types/fieldItem.d.ts +16 -0
  89. package/es/packages/form-render/src/types/index.d.ts +30 -2
  90. package/es/packages/form-render/src/utils/index.d.ts +7 -5
  91. package/es/packages/form-render/src/utils/index.js +59 -11
  92. package/es/packages/form-render/style/index.css +11 -10
  93. package/es/packages/form-table/src/hooks/useNuiThemeOverrides.js +1 -1
  94. package/es/packages/index.css +147 -21
  95. package/es/packages/index.d.ts +3 -1
  96. package/es/packages/index.js +4 -1
  97. package/es/packages/info-header/index.d.ts +1 -3
  98. package/es/packages/info-header/src/HiddenContent.js +1 -1
  99. package/es/packages/info-header/src/HiddenContent.vue.d.ts +1 -3
  100. package/es/packages/info-header/src/InfoHeader.vue.d.ts +1 -3
  101. package/es/packages/info-header/style/index.css +1 -1
  102. package/es/packages/shortcut-provider/index.d.ts +2 -11
  103. package/es/packages/shortcut-provider/src/ShortcutProvider.js +1 -5
  104. package/es/packages/shortcut-provider/src/ShortcutProvider.vue.d.ts +2 -11
  105. package/es/packages/shortcut-provider/src/hooks/useShortcuts.d.ts +11 -8
  106. package/es/packages/shortcut-provider/src/hooks/useShortcuts.js +44 -28
  107. package/es/packages/shortcut-provider/src/types/index.d.ts +32 -4
  108. package/es/packages/shortcut-provider/src/utils/index.d.ts +3 -0
  109. package/es/packages/shortcut-provider/src/utils/index.js +15 -5
  110. package/es/packages/shortcut-setter/index.d.ts +32 -9
  111. package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +32 -9
  112. package/es/packages/shortcut-setter/src/ShortcutSetterItem.js +8 -6
  113. package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +8 -6
  114. package/es/src/utils/state.d.ts +29 -0
  115. package/es/src/utils/state.js +44 -0
  116. package/package.json +10 -1
  117. package/es/_virtual/_commonjsHelpers.js +0 -7
  118. package/es/_virtual/css.escape.js +0 -3
  119. package/es/_virtual/inherits.js +0 -3
  120. package/es/_virtual/inherits_browser.js +0 -3
  121. package/es/node_modules/@formily/path/esm/contexts.js +0 -22
  122. package/es/node_modules/@formily/path/esm/destructor.js +0 -124
  123. package/es/node_modules/@formily/path/esm/index.js +0 -579
  124. package/es/node_modules/@formily/path/esm/matcher.js +0 -199
  125. package/es/node_modules/@formily/path/esm/parser.js +0 -402
  126. package/es/node_modules/@formily/path/esm/shared.js +0 -73
  127. package/es/node_modules/@formily/path/esm/tokenizer.js +0 -287
  128. package/es/node_modules/@formily/path/esm/tokens.js +0 -240
  129. package/es/node_modules/@formily/path/esm/types.js +0 -17
  130. package/es/node_modules/css.escape/css.escape.js +0 -110
  131. package/es/node_modules/date-fns/esm/_lib/defaultOptions/index.js +0 -6
  132. package/es/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js +0 -18
  133. package/es/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js +0 -17
  134. package/es/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js +0 -27
  135. package/es/node_modules/date-fns/esm/_lib/getUTCWeek/index.js +0 -17
  136. package/es/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js +0 -38
  137. package/es/node_modules/date-fns/esm/_lib/requiredArgs/index.js +0 -7
  138. package/es/node_modules/date-fns/esm/_lib/setUTCDay/index.js +0 -27
  139. package/es/node_modules/date-fns/esm/_lib/setUTCISODay/index.js +0 -23
  140. package/es/node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js +0 -15
  141. package/es/node_modules/date-fns/esm/_lib/setUTCWeek/index.js +0 -15
  142. package/es/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js +0 -15
  143. package/es/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js +0 -15
  144. package/es/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js +0 -25
  145. package/es/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js +0 -21
  146. package/es/node_modules/date-fns/esm/_lib/toInteger/index.js +0 -15
  147. package/es/node_modules/date-fns/esm/compareAsc/index.js +0 -52
  148. package/es/node_modules/date-fns/esm/constants/index.js +0 -40
  149. package/es/node_modules/date-fns/esm/differenceInCalendarDays/index.js +0 -49
  150. package/es/node_modules/date-fns/esm/differenceInCalendarMonths/index.js +0 -35
  151. package/es/node_modules/date-fns/esm/differenceInCalendarYears/index.js +0 -33
  152. package/es/node_modules/date-fns/esm/differenceInDays/index.js +0 -86
  153. package/es/node_modules/date-fns/esm/differenceInMonths/index.js +0 -59
  154. package/es/node_modules/date-fns/esm/differenceInYears/index.js +0 -43
  155. package/es/node_modules/date-fns/esm/endOfDay/index.js +0 -30
  156. package/es/node_modules/date-fns/esm/endOfMonth/index.js +0 -32
  157. package/es/node_modules/date-fns/esm/isLastDayOfMonth/index.js +0 -30
  158. package/es/node_modules/date-fns/esm/parse/_lib/Parser.js +0 -32
  159. package/es/node_modules/date-fns/esm/parse/_lib/Setter.js +0 -37
  160. package/es/node_modules/date-fns/esm/parse/_lib/constants.js +0 -48
  161. package/es/node_modules/date-fns/esm/parse/_lib/parsers/AMPMMidnightParser.js +0 -55
  162. package/es/node_modules/date-fns/esm/parse/_lib/parsers/AMPMParser.js +0 -55
  163. package/es/node_modules/date-fns/esm/parse/_lib/parsers/DateParser.js +0 -55
  164. package/es/node_modules/date-fns/esm/parse/_lib/parsers/DayOfYearParser.js +0 -52
  165. package/es/node_modules/date-fns/esm/parse/_lib/parsers/DayParser.js +0 -80
  166. package/es/node_modules/date-fns/esm/parse/_lib/parsers/DayPeriodParser.js +0 -56
  167. package/es/node_modules/date-fns/esm/parse/_lib/parsers/EraParser.js +0 -53
  168. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ExtendedYearParser.js +0 -30
  169. package/es/node_modules/date-fns/esm/parse/_lib/parsers/FractionOfSecondParser.js +0 -29
  170. package/es/node_modules/date-fns/esm/parse/_lib/parsers/Hour0To11Parser.js +0 -48
  171. package/es/node_modules/date-fns/esm/parse/_lib/parsers/Hour0to23Parser.js +0 -41
  172. package/es/node_modules/date-fns/esm/parse/_lib/parsers/Hour1To24Parser.js +0 -42
  173. package/es/node_modules/date-fns/esm/parse/_lib/parsers/Hour1to12Parser.js +0 -50
  174. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ISODayParser.js +0 -99
  175. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneParser.js +0 -46
  176. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -46
  177. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekParser.js +0 -43
  178. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekYearParser.js +0 -33
  179. package/es/node_modules/date-fns/esm/parse/_lib/parsers/LocalDayParser.js +0 -96
  180. package/es/node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekParser.js +0 -43
  181. package/es/node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekYearParser.js +0 -61
  182. package/es/node_modules/date-fns/esm/parse/_lib/parsers/MinuteParser.js +0 -41
  183. package/es/node_modules/date-fns/esm/parse/_lib/parsers/MonthParser.js +0 -80
  184. package/es/node_modules/date-fns/esm/parse/_lib/parsers/QuarterParser.js +0 -73
  185. package/es/node_modules/date-fns/esm/parse/_lib/parsers/SecondParser.js +0 -41
  186. package/es/node_modules/date-fns/esm/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -96
  187. package/es/node_modules/date-fns/esm/parse/_lib/parsers/StandAloneMonthParser.js +0 -80
  188. package/es/node_modules/date-fns/esm/parse/_lib/parsers/StandAloneQuarterParser.js +0 -73
  189. package/es/node_modules/date-fns/esm/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -26
  190. package/es/node_modules/date-fns/esm/parse/_lib/parsers/TimestampSecondsParser.js +0 -26
  191. package/es/node_modules/date-fns/esm/parse/_lib/parsers/YearParser.js +0 -66
  192. package/es/node_modules/date-fns/esm/parse/_lib/parsers/index.js +0 -109
  193. package/es/node_modules/date-fns/esm/parse/_lib/utils.js +0 -133
  194. package/es/node_modules/date-fns/esm/startOfDay/index.js +0 -30
  195. package/es/node_modules/date-fns/esm/toDate/index.js +0 -55
  196. package/es/node_modules/diagram-js/lib/command/CommandInterceptor.js +0 -139
  197. package/es/node_modules/diagram-js/lib/draw/BaseRenderer.js +0 -88
  198. package/es/node_modules/diagram-js/lib/features/popup-menu/PopupMenu.js +0 -591
  199. package/es/node_modules/diagram-js/lib/features/rules/RuleProvider.js +0 -88
  200. package/es/node_modules/diagram-js/lib/navigation/movecanvas/MoveCanvas.js +0 -120
  201. package/es/node_modules/diagram-js/lib/navigation/movecanvas/index.js +0 -8
  202. package/es/node_modules/diagram-js/lib/navigation/zoomscroll/ZoomScroll.js +0 -227
  203. package/es/node_modules/diagram-js/lib/navigation/zoomscroll/ZoomUtil.js +0 -24
  204. package/es/node_modules/diagram-js/lib/util/ClickTrap.js +0 -23
  205. package/es/node_modules/diagram-js/lib/util/Cursor.js +0 -20
  206. package/es/node_modules/diagram-js/lib/util/Event.js +0 -22
  207. package/es/node_modules/diagram-js/lib/util/Math.js +0 -9
  208. package/es/node_modules/diagram-js/lib/util/Mouse.js +0 -30
  209. package/es/node_modules/diagram-js/lib/util/Platform.js +0 -5
  210. package/es/node_modules/diagram-js/lib/util/PositionUtil.js +0 -8
  211. package/es/node_modules/diagram-js/lib/util/RenderUtil.js +0 -25
  212. package/es/node_modules/diagram-js/lib/util/SvgTransformUtil.js +0 -48
  213. package/es/node_modules/ids/dist/index.esm.js +0 -164
  214. package/es/node_modules/inherits/inherits.js +0 -19
  215. package/es/node_modules/inherits/inherits_browser.js +0 -38
  216. package/es/node_modules/inherits-browser/dist/index.es.js +0 -3
  217. package/es/node_modules/min-dash/dist/index.esm.js +0 -169
  218. package/es/node_modules/min-dom/dist/index.esm.js +0 -588
  219. package/es/node_modules/tiny-svg/dist/index.esm.js +0 -525
  220. package/es/packages/form-render/src/components/renderer/combination.js +0 -168
@@ -1,30 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { parseNDigitsSigned } from '../utils.js';
3
-
4
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- class ExtendedYearParser extends Parser {
6
- constructor() {
7
- super(...arguments);
8
-
9
- _defineProperty(this, "priority", 130);
10
-
11
- _defineProperty(this, "incompatibleTokens", ['G', 'y', 'Y', 'R', 'w', 'I', 'i', 'e', 'c', 't', 'T']);
12
- }
13
-
14
- parse(dateString, token) {
15
- if (token === 'u') {
16
- return parseNDigitsSigned(4, dateString);
17
- }
18
-
19
- return parseNDigitsSigned(token.length, dateString);
20
- }
21
-
22
- set(date, _flags, value) {
23
- date.setUTCFullYear(value, 0, 1);
24
- date.setUTCHours(0, 0, 0, 0);
25
- return date;
26
- }
27
-
28
- }
29
-
30
- export { ExtendedYearParser };
@@ -1,29 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { mapValue, parseNDigits } from '../utils.js';
3
-
4
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- class FractionOfSecondParser extends Parser {
6
- constructor() {
7
- super(...arguments);
8
-
9
- _defineProperty(this, "priority", 30);
10
-
11
- _defineProperty(this, "incompatibleTokens", ['t', 'T']);
12
- }
13
-
14
- parse(dateString, token) {
15
- var valueCallback = function (value) {
16
- return Math.floor(value * Math.pow(10, -token.length + 3));
17
- };
18
-
19
- return mapValue(parseNDigits(token.length, dateString), valueCallback);
20
- }
21
-
22
- set(date, _flags, value) {
23
- date.setUTCMilliseconds(value);
24
- return date;
25
- }
26
-
27
- }
28
-
29
- export { FractionOfSecondParser };
@@ -1,48 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { numericPatterns } from '../constants.js';
3
- import { parseNDigits, parseNumericPattern } from '../utils.js';
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- class Hour0To11Parser extends Parser {
7
- constructor() {
8
- super(...arguments);
9
-
10
- _defineProperty(this, "priority", 70);
11
-
12
- _defineProperty(this, "incompatibleTokens", ['h', 'H', 'k', 't', 'T']);
13
- }
14
-
15
- parse(dateString, token, match) {
16
- switch (token) {
17
- case 'K':
18
- return parseNumericPattern(numericPatterns.hour11h, dateString);
19
-
20
- case 'Ko':
21
- return match.ordinalNumber(dateString, {
22
- unit: 'hour'
23
- });
24
-
25
- default:
26
- return parseNDigits(token.length, dateString);
27
- }
28
- }
29
-
30
- validate(_date, value) {
31
- return value >= 0 && value <= 11;
32
- }
33
-
34
- set(date, _flags, value) {
35
- var isPM = date.getUTCHours() >= 12;
36
-
37
- if (isPM && value < 12) {
38
- date.setUTCHours(value + 12, 0, 0, 0);
39
- } else {
40
- date.setUTCHours(value, 0, 0, 0);
41
- }
42
-
43
- return date;
44
- }
45
-
46
- }
47
-
48
- export { Hour0To11Parser };
@@ -1,41 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { numericPatterns } from '../constants.js';
3
- import { parseNDigits, parseNumericPattern } from '../utils.js';
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- class Hour0to23Parser extends Parser {
7
- constructor() {
8
- super(...arguments);
9
-
10
- _defineProperty(this, "priority", 70);
11
-
12
- _defineProperty(this, "incompatibleTokens", ['a', 'b', 'h', 'K', 'k', 't', 'T']);
13
- }
14
-
15
- parse(dateString, token, match) {
16
- switch (token) {
17
- case 'H':
18
- return parseNumericPattern(numericPatterns.hour23h, dateString);
19
-
20
- case 'Ho':
21
- return match.ordinalNumber(dateString, {
22
- unit: 'hour'
23
- });
24
-
25
- default:
26
- return parseNDigits(token.length, dateString);
27
- }
28
- }
29
-
30
- validate(_date, value) {
31
- return value >= 0 && value <= 23;
32
- }
33
-
34
- set(date, _flags, value) {
35
- date.setUTCHours(value, 0, 0, 0);
36
- return date;
37
- }
38
-
39
- }
40
-
41
- export { Hour0to23Parser };
@@ -1,42 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { numericPatterns } from '../constants.js';
3
- import { parseNDigits, parseNumericPattern } from '../utils.js';
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- class Hour1To24Parser extends Parser {
7
- constructor() {
8
- super(...arguments);
9
-
10
- _defineProperty(this, "priority", 70);
11
-
12
- _defineProperty(this, "incompatibleTokens", ['a', 'b', 'h', 'H', 'K', 't', 'T']);
13
- }
14
-
15
- parse(dateString, token, match) {
16
- switch (token) {
17
- case 'k':
18
- return parseNumericPattern(numericPatterns.hour24h, dateString);
19
-
20
- case 'ko':
21
- return match.ordinalNumber(dateString, {
22
- unit: 'hour'
23
- });
24
-
25
- default:
26
- return parseNDigits(token.length, dateString);
27
- }
28
- }
29
-
30
- validate(_date, value) {
31
- return value >= 1 && value <= 24;
32
- }
33
-
34
- set(date, _flags, value) {
35
- var hours = value <= 24 ? value % 24 : value;
36
- date.setUTCHours(hours, 0, 0, 0);
37
- return date;
38
- }
39
-
40
- }
41
-
42
- export { Hour1To24Parser };
@@ -1,50 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { numericPatterns } from '../constants.js';
3
- import { parseNDigits, parseNumericPattern } from '../utils.js';
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- class Hour1to12Parser extends Parser {
7
- constructor() {
8
- super(...arguments);
9
-
10
- _defineProperty(this, "priority", 70);
11
-
12
- _defineProperty(this, "incompatibleTokens", ['H', 'K', 'k', 't', 'T']);
13
- }
14
-
15
- parse(dateString, token, match) {
16
- switch (token) {
17
- case 'h':
18
- return parseNumericPattern(numericPatterns.hour12h, dateString);
19
-
20
- case 'ho':
21
- return match.ordinalNumber(dateString, {
22
- unit: 'hour'
23
- });
24
-
25
- default:
26
- return parseNDigits(token.length, dateString);
27
- }
28
- }
29
-
30
- validate(_date, value) {
31
- return value >= 1 && value <= 12;
32
- }
33
-
34
- set(date, _flags, value) {
35
- var isPM = date.getUTCHours() >= 12;
36
-
37
- if (isPM && value < 12) {
38
- date.setUTCHours(value + 12, 0, 0, 0);
39
- } else if (!isPM && value === 12) {
40
- date.setUTCHours(0, 0, 0, 0);
41
- } else {
42
- date.setUTCHours(value, 0, 0, 0);
43
- }
44
-
45
- return date;
46
- }
47
-
48
- }
49
-
50
- export { Hour1to12Parser };
@@ -1,99 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { mapValue, parseNDigits } from '../utils.js';
3
- import setUTCISODay from '../../../_lib/setUTCISODay/index.js';
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
- class ISODayParser extends Parser {
8
- constructor() {
9
- super(...arguments);
10
-
11
- _defineProperty(this, "priority", 90);
12
-
13
- _defineProperty(this, "incompatibleTokens", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'E', 'e', 'c', 't', 'T']);
14
- }
15
-
16
- parse(dateString, token, match) {
17
- var valueCallback = function (value) {
18
- if (value === 0) {
19
- return 7;
20
- }
21
-
22
- return value;
23
- };
24
-
25
- switch (token) {
26
- // 2
27
- case 'i':
28
- case 'ii':
29
- // 02
30
- return parseNDigits(token.length, dateString);
31
- // 2nd
32
-
33
- case 'io':
34
- return match.ordinalNumber(dateString, {
35
- unit: 'day'
36
- });
37
- // Tue
38
-
39
- case 'iii':
40
- return mapValue(match.day(dateString, {
41
- width: 'abbreviated',
42
- context: 'formatting'
43
- }) || match.day(dateString, {
44
- width: 'short',
45
- context: 'formatting'
46
- }) || match.day(dateString, {
47
- width: 'narrow',
48
- context: 'formatting'
49
- }), valueCallback);
50
- // T
51
-
52
- case 'iiiii':
53
- return mapValue(match.day(dateString, {
54
- width: 'narrow',
55
- context: 'formatting'
56
- }), valueCallback);
57
- // Tu
58
-
59
- case 'iiiiii':
60
- return mapValue(match.day(dateString, {
61
- width: 'short',
62
- context: 'formatting'
63
- }) || match.day(dateString, {
64
- width: 'narrow',
65
- context: 'formatting'
66
- }), valueCallback);
67
- // Tuesday
68
-
69
- case 'iiii':
70
- default:
71
- return mapValue(match.day(dateString, {
72
- width: 'wide',
73
- context: 'formatting'
74
- }) || match.day(dateString, {
75
- width: 'abbreviated',
76
- context: 'formatting'
77
- }) || match.day(dateString, {
78
- width: 'short',
79
- context: 'formatting'
80
- }) || match.day(dateString, {
81
- width: 'narrow',
82
- context: 'formatting'
83
- }), valueCallback);
84
- }
85
- }
86
-
87
- validate(_date, value) {
88
- return value >= 1 && value <= 7;
89
- }
90
-
91
- set(date, _flags, value) {
92
- date = setUTCISODay(date, value);
93
- date.setUTCHours(0, 0, 0, 0);
94
- return date;
95
- }
96
-
97
- }
98
-
99
- export { ISODayParser };
@@ -1,46 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { timezonePatterns } from '../constants.js';
3
- import { parseTimezonePattern } from '../utils.js';
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
- class ISOTimezoneParser extends Parser {
8
- constructor() {
9
- super(...arguments);
10
-
11
- _defineProperty(this, "priority", 10);
12
-
13
- _defineProperty(this, "incompatibleTokens", ['t', 'T', 'X']);
14
- }
15
-
16
- parse(dateString, token) {
17
- switch (token) {
18
- case 'x':
19
- return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);
20
-
21
- case 'xx':
22
- return parseTimezonePattern(timezonePatterns.basic, dateString);
23
-
24
- case 'xxxx':
25
- return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);
26
-
27
- case 'xxxxx':
28
- return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);
29
-
30
- case 'xxx':
31
- default:
32
- return parseTimezonePattern(timezonePatterns.extended, dateString);
33
- }
34
- }
35
-
36
- set(date, flags, value) {
37
- if (flags.timestampIsSet) {
38
- return date;
39
- }
40
-
41
- return new Date(date.getTime() - value);
42
- }
43
-
44
- }
45
-
46
- export { ISOTimezoneParser };
@@ -1,46 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { timezonePatterns } from '../constants.js';
3
- import { parseTimezonePattern } from '../utils.js';
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
- class ISOTimezoneWithZParser extends Parser {
8
- constructor() {
9
- super(...arguments);
10
-
11
- _defineProperty(this, "priority", 10);
12
-
13
- _defineProperty(this, "incompatibleTokens", ['t', 'T', 'x']);
14
- }
15
-
16
- parse(dateString, token) {
17
- switch (token) {
18
- case 'X':
19
- return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);
20
-
21
- case 'XX':
22
- return parseTimezonePattern(timezonePatterns.basic, dateString);
23
-
24
- case 'XXXX':
25
- return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);
26
-
27
- case 'XXXXX':
28
- return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);
29
-
30
- case 'XXX':
31
- default:
32
- return parseTimezonePattern(timezonePatterns.extended, dateString);
33
- }
34
- }
35
-
36
- set(date, flags, value) {
37
- if (flags.timestampIsSet) {
38
- return date;
39
- }
40
-
41
- return new Date(date.getTime() - value);
42
- }
43
-
44
- }
45
-
46
- export { ISOTimezoneWithZParser };
@@ -1,43 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { numericPatterns } from '../constants.js';
3
- import { parseNDigits, parseNumericPattern } from '../utils.js';
4
- import setUTCISOWeek from '../../../_lib/setUTCISOWeek/index.js';
5
- import startOfUTCISOWeek from '../../../_lib/startOfUTCISOWeek/index.js';
6
-
7
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
-
9
- class ISOWeekParser extends Parser {
10
- constructor() {
11
- super(...arguments);
12
-
13
- _defineProperty(this, "priority", 100);
14
-
15
- _defineProperty(this, "incompatibleTokens", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);
16
- }
17
-
18
- parse(dateString, token, match) {
19
- switch (token) {
20
- case 'I':
21
- return parseNumericPattern(numericPatterns.week, dateString);
22
-
23
- case 'Io':
24
- return match.ordinalNumber(dateString, {
25
- unit: 'week'
26
- });
27
-
28
- default:
29
- return parseNDigits(token.length, dateString);
30
- }
31
- }
32
-
33
- validate(_date, value) {
34
- return value >= 1 && value <= 53;
35
- }
36
-
37
- set(date, _flags, value) {
38
- return startOfUTCISOWeek(setUTCISOWeek(date, value));
39
- }
40
-
41
- }
42
-
43
- export { ISOWeekParser };
@@ -1,33 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { parseNDigitsSigned } from '../utils.js';
3
- import startOfUTCISOWeek from '../../../_lib/startOfUTCISOWeek/index.js';
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
- class ISOWeekYearParser extends Parser {
8
- constructor() {
9
- super(...arguments);
10
-
11
- _defineProperty(this, "priority", 130);
12
-
13
- _defineProperty(this, "incompatibleTokens", ['G', 'y', 'Y', 'u', 'Q', 'q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);
14
- }
15
-
16
- parse(dateString, token) {
17
- if (token === 'R') {
18
- return parseNDigitsSigned(4, dateString);
19
- }
20
-
21
- return parseNDigitsSigned(token.length, dateString);
22
- }
23
-
24
- set(_date, _flags, value) {
25
- var firstWeekOfYear = new Date(0);
26
- firstWeekOfYear.setUTCFullYear(value, 0, 4);
27
- firstWeekOfYear.setUTCHours(0, 0, 0, 0);
28
- return startOfUTCISOWeek(firstWeekOfYear);
29
- }
30
-
31
- }
32
-
33
- export { ISOWeekYearParser };
@@ -1,96 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { mapValue, parseNDigits } from '../utils.js';
3
- import setUTCDay from '../../../_lib/setUTCDay/index.js';
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
- class LocalDayParser extends Parser {
8
- constructor() {
9
- super(...arguments);
10
-
11
- _defineProperty(this, "priority", 90);
12
-
13
- _defineProperty(this, "incompatibleTokens", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'c', 't', 'T']);
14
- }
15
-
16
- parse(dateString, token, match, options) {
17
- var valueCallback = function (value) {
18
- var wholeWeekDays = Math.floor((value - 1) / 7) * 7;
19
- return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;
20
- };
21
-
22
- switch (token) {
23
- // 3
24
- case 'e':
25
- case 'ee':
26
- // 03
27
- return mapValue(parseNDigits(token.length, dateString), valueCallback);
28
- // 3rd
29
-
30
- case 'eo':
31
- return mapValue(match.ordinalNumber(dateString, {
32
- unit: 'day'
33
- }), valueCallback);
34
- // Tue
35
-
36
- case 'eee':
37
- return match.day(dateString, {
38
- width: 'abbreviated',
39
- context: 'formatting'
40
- }) || match.day(dateString, {
41
- width: 'short',
42
- context: 'formatting'
43
- }) || match.day(dateString, {
44
- width: 'narrow',
45
- context: 'formatting'
46
- });
47
- // T
48
-
49
- case 'eeeee':
50
- return match.day(dateString, {
51
- width: 'narrow',
52
- context: 'formatting'
53
- });
54
- // Tu
55
-
56
- case 'eeeeee':
57
- return match.day(dateString, {
58
- width: 'short',
59
- context: 'formatting'
60
- }) || match.day(dateString, {
61
- width: 'narrow',
62
- context: 'formatting'
63
- });
64
- // Tuesday
65
-
66
- case 'eeee':
67
- default:
68
- return match.day(dateString, {
69
- width: 'wide',
70
- context: 'formatting'
71
- }) || match.day(dateString, {
72
- width: 'abbreviated',
73
- context: 'formatting'
74
- }) || match.day(dateString, {
75
- width: 'short',
76
- context: 'formatting'
77
- }) || match.day(dateString, {
78
- width: 'narrow',
79
- context: 'formatting'
80
- });
81
- }
82
- }
83
-
84
- validate(_date, value) {
85
- return value >= 0 && value <= 6;
86
- }
87
-
88
- set(date, _flags, value, options) {
89
- date = setUTCDay(date, value, options);
90
- date.setUTCHours(0, 0, 0, 0);
91
- return date;
92
- }
93
-
94
- }
95
-
96
- export { LocalDayParser };
@@ -1,43 +0,0 @@
1
- import { Parser } from '../Parser.js';
2
- import { numericPatterns } from '../constants.js';
3
- import { parseNDigits, parseNumericPattern } from '../utils.js';
4
- import setUTCWeek from '../../../_lib/setUTCWeek/index.js';
5
- import startOfUTCWeek from '../../../_lib/startOfUTCWeek/index.js';
6
-
7
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
-
9
- class LocalWeekParser extends Parser {
10
- constructor() {
11
- super(...arguments);
12
-
13
- _defineProperty(this, "priority", 100);
14
-
15
- _defineProperty(this, "incompatibleTokens", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);
16
- }
17
-
18
- parse(dateString, token, match) {
19
- switch (token) {
20
- case 'w':
21
- return parseNumericPattern(numericPatterns.week, dateString);
22
-
23
- case 'wo':
24
- return match.ordinalNumber(dateString, {
25
- unit: 'week'
26
- });
27
-
28
- default:
29
- return parseNDigits(token.length, dateString);
30
- }
31
- }
32
-
33
- validate(_date, value) {
34
- return value >= 1 && value <= 53;
35
- }
36
-
37
- set(date, _flags, value, options) {
38
- return startOfUTCWeek(setUTCWeek(date, value, options), options);
39
- }
40
-
41
- }
42
-
43
- export { LocalWeekParser };