@yh-ui/components 0.1.43 → 0.1.44
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, computed, watch, onMounted } from "vue";
|
|
3
3
|
import dayjs from "../../dayjs";
|
|
4
|
-
import
|
|
4
|
+
import * as isoWeekPluginModule from "dayjs/plugin/isoWeek.js";
|
|
5
5
|
import { useNamespace, useLocale } from "@yh-ui/hooks";
|
|
6
6
|
import { useComponentTheme } from "@yh-ui/theme";
|
|
7
7
|
import {
|
|
@@ -10,7 +10,9 @@ import {
|
|
|
10
10
|
DEFAULT_CHINA_HOLIDAYS_2026
|
|
11
11
|
} from "./calendar";
|
|
12
12
|
import { YhButton } from "../../button";
|
|
13
|
-
dayjs.extend(
|
|
13
|
+
dayjs.extend(
|
|
14
|
+
typeof isoWeekPluginModule === "function" ? isoWeekPluginModule : isoWeekPluginModule.default ?? isoWeekPluginModule
|
|
15
|
+
);
|
|
14
16
|
defineOptions({
|
|
15
17
|
name: "YhCalendar"
|
|
16
18
|
});
|
|
@@ -5,19 +5,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.parseDate = exports.generateCalendar = exports.formatDate = exports.DEFAULT_FORMATS = void 0;
|
|
7
7
|
var _dayjs = _interopRequireDefault(require("../../dayjs.cjs"));
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
8
|
+
var isBetweenPluginModule = _interopRequireWildcard(require("dayjs/plugin/isBetween.js"));
|
|
9
|
+
var weekOfYearPluginModule = _interopRequireWildcard(require("dayjs/plugin/weekOfYear.js"));
|
|
10
|
+
var isoWeekPluginModule = _interopRequireWildcard(require("dayjs/plugin/isoWeek.js"));
|
|
11
|
+
var quarterOfYearPluginModule = _interopRequireWildcard(require("dayjs/plugin/quarterOfYear.js"));
|
|
12
|
+
var advancedFormatPluginModule = _interopRequireWildcard(require("dayjs/plugin/advancedFormat.js"));
|
|
13
|
+
var customParseFormatPluginModule = _interopRequireWildcard(require("dayjs/plugin/customParseFormat.js"));
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
function resolveDayjsPlugin(module) {
|
|
18
|
+
if (typeof module === "function") {
|
|
19
|
+
return module;
|
|
20
|
+
}
|
|
21
|
+
if (typeof module.default === "function") {
|
|
22
|
+
return module.default;
|
|
23
|
+
}
|
|
24
|
+
return module;
|
|
25
|
+
}
|
|
26
|
+
_dayjs.default.extend(resolveDayjsPlugin(isBetweenPluginModule));
|
|
27
|
+
_dayjs.default.extend(resolveDayjsPlugin(weekOfYearPluginModule));
|
|
28
|
+
_dayjs.default.extend(resolveDayjsPlugin(isoWeekPluginModule));
|
|
29
|
+
_dayjs.default.extend(resolveDayjsPlugin(quarterOfYearPluginModule));
|
|
30
|
+
_dayjs.default.extend(resolveDayjsPlugin(advancedFormatPluginModule));
|
|
31
|
+
_dayjs.default.extend(resolveDayjsPlugin(customParseFormatPluginModule));
|
|
21
32
|
const DEFAULT_FORMATS = exports.DEFAULT_FORMATS = {
|
|
22
33
|
date: "YYYY-MM-DD",
|
|
23
34
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import dayjs from "../../dayjs.mjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import * as isBetweenPluginModule from "dayjs/plugin/isBetween.js";
|
|
3
|
+
import * as weekOfYearPluginModule from "dayjs/plugin/weekOfYear.js";
|
|
4
|
+
import * as isoWeekPluginModule from "dayjs/plugin/isoWeek.js";
|
|
5
|
+
import * as quarterOfYearPluginModule from "dayjs/plugin/quarterOfYear.js";
|
|
6
|
+
import * as advancedFormatPluginModule from "dayjs/plugin/advancedFormat.js";
|
|
7
|
+
import * as customParseFormatPluginModule from "dayjs/plugin/customParseFormat.js";
|
|
8
|
+
function resolveDayjsPlugin(module) {
|
|
9
|
+
if (typeof module === "function") {
|
|
10
|
+
return module;
|
|
11
|
+
}
|
|
12
|
+
if (typeof module.default === "function") {
|
|
13
|
+
return module.default;
|
|
14
|
+
}
|
|
15
|
+
return module;
|
|
16
|
+
}
|
|
17
|
+
dayjs.extend(resolveDayjsPlugin(isBetweenPluginModule));
|
|
18
|
+
dayjs.extend(resolveDayjsPlugin(weekOfYearPluginModule));
|
|
19
|
+
dayjs.extend(resolveDayjsPlugin(isoWeekPluginModule));
|
|
20
|
+
dayjs.extend(resolveDayjsPlugin(quarterOfYearPluginModule));
|
|
21
|
+
dayjs.extend(resolveDayjsPlugin(advancedFormatPluginModule));
|
|
22
|
+
dayjs.extend(resolveDayjsPlugin(customParseFormatPluginModule));
|
|
14
23
|
export const DEFAULT_FORMATS = {
|
|
15
24
|
date: "YYYY-MM-DD",
|
|
16
25
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, computed, watch } from "vue";
|
|
3
3
|
import dayjs from "../../dayjs";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import * as isBetweenPluginModule from "dayjs/plugin/isBetween.js";
|
|
5
|
+
import * as isoWeekPluginModule from "dayjs/plugin/isoWeek.js";
|
|
6
|
+
import * as quarterOfYearPluginModule from "dayjs/plugin/quarterOfYear.js";
|
|
7
7
|
import { useNamespace } from "@yh-ui/hooks";
|
|
8
8
|
import { useComponentTheme } from "@yh-ui/theme";
|
|
9
9
|
import { YhTooltip } from "../../tooltip";
|
|
10
10
|
import { YhInput } from "../../input";
|
|
11
11
|
import { YhRadioGroup, YhRadioButton } from "../../radio";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const resolveDayjsPlugin = (module) => {
|
|
13
|
+
if (typeof module === "function") {
|
|
14
|
+
return module;
|
|
15
|
+
}
|
|
16
|
+
if (typeof module.default === "function") {
|
|
17
|
+
return module.default;
|
|
18
|
+
}
|
|
19
|
+
return module;
|
|
20
|
+
};
|
|
21
|
+
dayjs.extend(resolveDayjsPlugin(isBetweenPluginModule));
|
|
22
|
+
dayjs.extend(resolveDayjsPlugin(isoWeekPluginModule));
|
|
23
|
+
dayjs.extend(resolveDayjsPlugin(quarterOfYearPluginModule));
|
|
15
24
|
defineOptions({ name: "YhGanttChart" });
|
|
16
25
|
const props = defineProps({
|
|
17
26
|
data: { type: Array, required: true, default: () => [] },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yh-ui/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.44",
|
|
4
4
|
"description": "YH-UI Vue 3 Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@webcontainer/api": "^1.6.1",
|
|
38
38
|
"@floating-ui/dom": "^1.7.4",
|
|
39
|
-
"@yh-ui/hooks": "^0.1.
|
|
40
|
-
"@yh-ui/locale": "^0.1.
|
|
41
|
-
"@yh-ui/theme": "^0.1.
|
|
42
|
-
"@yh-ui/utils": "^0.1.
|
|
39
|
+
"@yh-ui/hooks": "^0.1.44",
|
|
40
|
+
"@yh-ui/locale": "^0.1.44",
|
|
41
|
+
"@yh-ui/theme": "^0.1.44",
|
|
42
|
+
"@yh-ui/utils": "^0.1.44",
|
|
43
43
|
"async-validator": "^4.2.5",
|
|
44
44
|
"dayjs": "^1.11.19",
|
|
45
45
|
"markdown-it": "^14.1.1",
|