cnhis-design-vue 3.1.15-beta.4 → 3.1.15-beta.5

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 (154) hide show
  1. package/es/packages/bpmn-workflow/src/BpmnWorkflow.js +2 -2
  2. package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +8 -8
  3. package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomContextPadProvider.js +2 -2
  4. package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPalette.js +1 -1
  5. package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +4 -3
  6. package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +2 -2
  7. package/es/packages/bpmn-workflow/src/custom/customModeler/index.js +1 -1
  8. package/es/packages/bpmn-workflow/src/custom/customOtherModule/CustomPopupMenu.js +2 -2
  9. package/es/packages/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +3 -3
  10. package/es/packages/field-set/index.d.ts +4365 -0
  11. package/es/packages/field-set/src/FieldSet.js +53 -54
  12. package/es/packages/field-set/src/FieldSet.vue.d.ts +4365 -0
  13. package/es/packages/field-set/style/index.css +0 -9
  14. package/es/packages/form-render/index.d.ts +24 -3
  15. package/es/packages/form-render/src/FormRender.js +10 -6
  16. package/es/packages/form-render/src/FormRender.vue.d.ts +24 -3
  17. package/es/packages/form-render/src/components/renderer/combination/hooks/useDeepValidate.d.ts +5 -0
  18. package/es/packages/form-render/src/components/renderer/combination/hooks/useDeepValidate.js +32 -0
  19. package/es/packages/form-render/src/components/renderer/{combination.d.ts → combination/index.d.ts} +7 -1
  20. package/es/packages/form-render/src/components/renderer/combination/index.js +157 -0
  21. package/es/packages/form-render/src/components/renderer/date.d.ts +2 -2
  22. package/es/packages/form-render/src/components/renderer/index.js +1 -1
  23. package/es/packages/form-render/src/components/renderer/radio.js +4 -1
  24. package/es/packages/form-render/src/components/renderer/select.d.ts +9 -0
  25. package/es/packages/form-render/src/components/renderer/select.js +5 -1
  26. package/es/packages/form-render/src/constants/index.d.ts +2 -1
  27. package/es/packages/form-render/src/hooks/useAnchor.d.ts +7 -6
  28. package/es/packages/form-render/src/hooks/useAnchor.js +1 -2
  29. package/es/packages/form-render/src/hooks/useAsyncQueue.d.ts +6 -1
  30. package/es/packages/form-render/src/hooks/useAsyncQueue.js +11 -2
  31. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +2 -4
  32. package/es/packages/form-render/src/hooks/useFormContext.d.ts +3 -3
  33. package/es/packages/form-render/src/hooks/useFormContext.js +15 -3
  34. package/es/packages/form-render/src/hooks/useFormRenderLifeCycle.d.ts +13 -0
  35. package/es/packages/form-render/src/hooks/useFormRenderLifeCycle.js +10 -0
  36. package/es/packages/form-render/src/types/fieldItem.d.ts +8 -0
  37. package/es/packages/form-render/src/types/index.d.ts +25 -1
  38. package/es/packages/form-render/src/utils/index.d.ts +3 -3
  39. package/es/packages/form-render/src/utils/index.js +1 -4
  40. package/es/packages/index.css +0 -9
  41. package/es/packages/info-header/index.d.ts +1 -3
  42. package/es/packages/info-header/src/HiddenContent.js +1 -1
  43. package/es/packages/info-header/src/HiddenContent.vue.d.ts +1 -3
  44. package/es/packages/info-header/src/InfoHeader.vue.d.ts +1 -3
  45. package/es/packages/shortcut-setter/index.d.ts +25 -4
  46. package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +25 -4
  47. package/es/packages/shortcut-setter/src/ShortcutSetterItem.js +2 -2
  48. package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +1 -1
  49. package/global.d.ts +8 -8
  50. package/package.json +9 -1
  51. package/es/_virtual/_commonjsHelpers.js +0 -7
  52. package/es/_virtual/css.escape.js +0 -3
  53. package/es/_virtual/inherits.js +0 -3
  54. package/es/_virtual/inherits_browser.js +0 -3
  55. package/es/node_modules/@formily/path/esm/contexts.js +0 -22
  56. package/es/node_modules/@formily/path/esm/destructor.js +0 -124
  57. package/es/node_modules/@formily/path/esm/index.js +0 -579
  58. package/es/node_modules/@formily/path/esm/matcher.js +0 -199
  59. package/es/node_modules/@formily/path/esm/parser.js +0 -402
  60. package/es/node_modules/@formily/path/esm/shared.js +0 -73
  61. package/es/node_modules/@formily/path/esm/tokenizer.js +0 -287
  62. package/es/node_modules/@formily/path/esm/tokens.js +0 -240
  63. package/es/node_modules/@formily/path/esm/types.js +0 -17
  64. package/es/node_modules/css.escape/css.escape.js +0 -110
  65. package/es/node_modules/date-fns/esm/_lib/defaultOptions/index.js +0 -6
  66. package/es/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js +0 -18
  67. package/es/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js +0 -17
  68. package/es/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js +0 -27
  69. package/es/node_modules/date-fns/esm/_lib/getUTCWeek/index.js +0 -17
  70. package/es/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js +0 -38
  71. package/es/node_modules/date-fns/esm/_lib/requiredArgs/index.js +0 -7
  72. package/es/node_modules/date-fns/esm/_lib/setUTCDay/index.js +0 -27
  73. package/es/node_modules/date-fns/esm/_lib/setUTCISODay/index.js +0 -23
  74. package/es/node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js +0 -15
  75. package/es/node_modules/date-fns/esm/_lib/setUTCWeek/index.js +0 -15
  76. package/es/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js +0 -15
  77. package/es/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js +0 -15
  78. package/es/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js +0 -25
  79. package/es/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js +0 -21
  80. package/es/node_modules/date-fns/esm/_lib/toInteger/index.js +0 -15
  81. package/es/node_modules/date-fns/esm/compareAsc/index.js +0 -52
  82. package/es/node_modules/date-fns/esm/constants/index.js +0 -40
  83. package/es/node_modules/date-fns/esm/differenceInCalendarDays/index.js +0 -49
  84. package/es/node_modules/date-fns/esm/differenceInCalendarMonths/index.js +0 -35
  85. package/es/node_modules/date-fns/esm/differenceInCalendarYears/index.js +0 -33
  86. package/es/node_modules/date-fns/esm/differenceInDays/index.js +0 -86
  87. package/es/node_modules/date-fns/esm/differenceInMonths/index.js +0 -59
  88. package/es/node_modules/date-fns/esm/differenceInYears/index.js +0 -43
  89. package/es/node_modules/date-fns/esm/endOfDay/index.js +0 -30
  90. package/es/node_modules/date-fns/esm/endOfMonth/index.js +0 -32
  91. package/es/node_modules/date-fns/esm/isLastDayOfMonth/index.js +0 -30
  92. package/es/node_modules/date-fns/esm/parse/_lib/Parser.js +0 -32
  93. package/es/node_modules/date-fns/esm/parse/_lib/Setter.js +0 -37
  94. package/es/node_modules/date-fns/esm/parse/_lib/constants.js +0 -48
  95. package/es/node_modules/date-fns/esm/parse/_lib/parsers/AMPMMidnightParser.js +0 -55
  96. package/es/node_modules/date-fns/esm/parse/_lib/parsers/AMPMParser.js +0 -55
  97. package/es/node_modules/date-fns/esm/parse/_lib/parsers/DateParser.js +0 -55
  98. package/es/node_modules/date-fns/esm/parse/_lib/parsers/DayOfYearParser.js +0 -52
  99. package/es/node_modules/date-fns/esm/parse/_lib/parsers/DayParser.js +0 -80
  100. package/es/node_modules/date-fns/esm/parse/_lib/parsers/DayPeriodParser.js +0 -56
  101. package/es/node_modules/date-fns/esm/parse/_lib/parsers/EraParser.js +0 -53
  102. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ExtendedYearParser.js +0 -30
  103. package/es/node_modules/date-fns/esm/parse/_lib/parsers/FractionOfSecondParser.js +0 -29
  104. package/es/node_modules/date-fns/esm/parse/_lib/parsers/Hour0To11Parser.js +0 -48
  105. package/es/node_modules/date-fns/esm/parse/_lib/parsers/Hour0to23Parser.js +0 -41
  106. package/es/node_modules/date-fns/esm/parse/_lib/parsers/Hour1To24Parser.js +0 -42
  107. package/es/node_modules/date-fns/esm/parse/_lib/parsers/Hour1to12Parser.js +0 -50
  108. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ISODayParser.js +0 -99
  109. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneParser.js +0 -46
  110. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -46
  111. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekParser.js +0 -43
  112. package/es/node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekYearParser.js +0 -33
  113. package/es/node_modules/date-fns/esm/parse/_lib/parsers/LocalDayParser.js +0 -96
  114. package/es/node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekParser.js +0 -43
  115. package/es/node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekYearParser.js +0 -61
  116. package/es/node_modules/date-fns/esm/parse/_lib/parsers/MinuteParser.js +0 -41
  117. package/es/node_modules/date-fns/esm/parse/_lib/parsers/MonthParser.js +0 -80
  118. package/es/node_modules/date-fns/esm/parse/_lib/parsers/QuarterParser.js +0 -73
  119. package/es/node_modules/date-fns/esm/parse/_lib/parsers/SecondParser.js +0 -41
  120. package/es/node_modules/date-fns/esm/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -96
  121. package/es/node_modules/date-fns/esm/parse/_lib/parsers/StandAloneMonthParser.js +0 -80
  122. package/es/node_modules/date-fns/esm/parse/_lib/parsers/StandAloneQuarterParser.js +0 -73
  123. package/es/node_modules/date-fns/esm/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -26
  124. package/es/node_modules/date-fns/esm/parse/_lib/parsers/TimestampSecondsParser.js +0 -26
  125. package/es/node_modules/date-fns/esm/parse/_lib/parsers/YearParser.js +0 -66
  126. package/es/node_modules/date-fns/esm/parse/_lib/parsers/index.js +0 -109
  127. package/es/node_modules/date-fns/esm/parse/_lib/utils.js +0 -133
  128. package/es/node_modules/date-fns/esm/startOfDay/index.js +0 -30
  129. package/es/node_modules/date-fns/esm/toDate/index.js +0 -55
  130. package/es/node_modules/diagram-js/lib/command/CommandInterceptor.js +0 -139
  131. package/es/node_modules/diagram-js/lib/draw/BaseRenderer.js +0 -88
  132. package/es/node_modules/diagram-js/lib/features/popup-menu/PopupMenu.js +0 -591
  133. package/es/node_modules/diagram-js/lib/features/rules/RuleProvider.js +0 -88
  134. package/es/node_modules/diagram-js/lib/navigation/movecanvas/MoveCanvas.js +0 -120
  135. package/es/node_modules/diagram-js/lib/navigation/movecanvas/index.js +0 -8
  136. package/es/node_modules/diagram-js/lib/navigation/zoomscroll/ZoomScroll.js +0 -227
  137. package/es/node_modules/diagram-js/lib/navigation/zoomscroll/ZoomUtil.js +0 -24
  138. package/es/node_modules/diagram-js/lib/util/ClickTrap.js +0 -23
  139. package/es/node_modules/diagram-js/lib/util/Cursor.js +0 -20
  140. package/es/node_modules/diagram-js/lib/util/Event.js +0 -22
  141. package/es/node_modules/diagram-js/lib/util/Math.js +0 -9
  142. package/es/node_modules/diagram-js/lib/util/Mouse.js +0 -30
  143. package/es/node_modules/diagram-js/lib/util/Platform.js +0 -5
  144. package/es/node_modules/diagram-js/lib/util/PositionUtil.js +0 -8
  145. package/es/node_modules/diagram-js/lib/util/RenderUtil.js +0 -25
  146. package/es/node_modules/diagram-js/lib/util/SvgTransformUtil.js +0 -48
  147. package/es/node_modules/ids/dist/index.esm.js +0 -164
  148. package/es/node_modules/inherits/inherits.js +0 -19
  149. package/es/node_modules/inherits/inherits_browser.js +0 -38
  150. package/es/node_modules/inherits-browser/dist/index.es.js +0 -3
  151. package/es/node_modules/min-dash/dist/index.esm.js +0 -169
  152. package/es/node_modules/min-dom/dist/index.esm.js +0 -588
  153. package/es/node_modules/tiny-svg/dist/index.esm.js +0 -525
  154. package/es/packages/form-render/src/components/renderer/combination.js +0 -171
@@ -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 };