@quidgest/ui 0.14.12 → 0.14.14
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/manifest/components.json +3 -0
- package/dist/ui.css +1726 -211
- package/dist/ui.esm.js +11110 -1888
- package/dist/ui.js +21 -21
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1212 -255
- package/dist/ui.scss +278 -85
- package/esm/components/QBadge/QBadge.d.ts +2 -1
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +75 -66
- package/esm/components/QBadge/index.d.ts +3 -0
- package/esm/components/QBadge/index.d.ts.map +1 -1
- package/esm/components/QBadge/types.d.ts +7 -0
- package/esm/components/QBadge/types.d.ts.map +1 -1
- package/esm/components/QBadge/types.js +5 -2
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts +22 -0
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts.map +1 -0
- package/esm/components/QBadgeIndicator/QBadgeIndicator.vue.js +43 -0
- package/esm/components/QBadgeIndicator/QBadgeIndicator.vue2.js +4 -0
- package/esm/components/QBadgeIndicator/index.d.ts +28 -0
- package/esm/components/QBadgeIndicator/index.d.ts.map +1 -0
- package/esm/components/QBadgeIndicator/index.js +6 -0
- package/esm/components/QBadgeIndicator/types.d.ts +19 -0
- package/esm/components/QBadgeIndicator/types.d.ts.map +1 -0
- package/esm/components/QCombobox/QCombobox.d.ts +32 -4
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/index.d.ts +56 -7
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts +36 -0
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -0
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +168 -0
- package/esm/components/QDateTimePicker/QDateTimePicker.vue2.js +4 -0
- package/esm/components/QDateTimePicker/index.d.ts +54 -0
- package/esm/components/QDateTimePicker/index.d.ts.map +1 -0
- package/esm/components/QDateTimePicker/index.js +6 -0
- package/esm/components/QDateTimePicker/types.d.ts +93 -0
- package/esm/components/QDateTimePicker/types.d.ts.map +1 -0
- package/esm/components/QDateTimePicker/types.js +15 -0
- package/esm/components/QFileUpload/QFileUpload.d.ts +37 -0
- package/esm/components/QFileUpload/QFileUpload.d.ts.map +1 -0
- package/esm/components/QFileUpload/QFileUpload.vue.js +238 -0
- package/esm/components/QFileUpload/QFileUpload.vue2.js +4 -0
- package/esm/components/QFileUpload/index.d.ts +52 -0
- package/esm/components/QFileUpload/index.d.ts.map +1 -0
- package/esm/components/QFileUpload/index.js +6 -0
- package/esm/components/QFileUpload/types.d.ts +69 -0
- package/esm/components/QFileUpload/types.d.ts.map +1 -0
- package/esm/components/QFileUpload/types.js +28 -0
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +64 -64
- package/esm/components/QTextField/QTextField.d.ts +3 -0
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +51 -39
- package/esm/components/QTextField/index.d.ts +7 -0
- package/esm/components/QTextField/index.d.ts.map +1 -1
- package/esm/components/QTextField/types.d.ts +11 -0
- package/esm/components/QTextField/types.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +50 -29
- package/esm/components/index.d.ts +3 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +62 -56
- package/esm/composables/maska.d.ts +28 -0
- package/esm/composables/maska.d.ts.map +1 -0
- package/esm/composables/maska.js +26 -0
- package/esm/composables/useDropZone/index.d.ts +38 -0
- package/esm/composables/useDropZone/index.d.ts.map +1 -0
- package/esm/composables/useDropZone/index.js +62 -0
- package/esm/index.d.ts +3 -0
- package/esm/utils/color.js +57 -27
- package/esm/utils/date/date.d.ts +9 -0
- package/esm/utils/date/date.d.ts.map +1 -0
- package/esm/utils/date/date.js +91 -0
- package/esm/utils/date/index.d.ts +4 -0
- package/esm/utils/date/index.d.ts.map +1 -0
- package/esm/utils/date/tokens.d.ts +49 -0
- package/esm/utils/date/tokens.d.ts.map +1 -0
- package/esm/utils/date/tokens.js +243 -0
- package/esm/utils/download.d.ts +7 -0
- package/esm/utils/download.d.ts.map +1 -0
- package/esm/utils/download.js +16 -0
- package/esm/utils/string.d.ts.map +1 -1
- package/esm/utils/string.js +5 -2
- package/esm/utils/time.d.ts +36 -0
- package/esm/utils/time.d.ts.map +1 -0
- package/esm/utils/time.js +14 -0
- package/esm/vendors/@vuepic/vue-datepicker/dist/vue-datepicker.js +5148 -0
- package/esm/vendors/date-fns/_lib/addLeadingZeros.js +7 -0
- package/esm/vendors/date-fns/_lib/defaultOptions.js +7 -0
- package/esm/vendors/date-fns/_lib/format/formatters.js +583 -0
- package/esm/vendors/date-fns/_lib/format/lightFormatters.js +59 -0
- package/esm/vendors/date-fns/_lib/format/longFormatters.js +52 -0
- package/esm/vendors/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
- package/esm/vendors/date-fns/_lib/normalizeDates.js +11 -0
- package/esm/vendors/date-fns/_lib/normalizeInterval.js +8 -0
- package/esm/vendors/date-fns/_lib/protectedTokens.js +20 -0
- package/esm/vendors/date-fns/add.js +20 -0
- package/esm/vendors/date-fns/addDays.js +10 -0
- package/esm/vendors/date-fns/addHours.js +9 -0
- package/esm/vendors/date-fns/addMilliseconds.js +9 -0
- package/esm/vendors/date-fns/addMonths.js +20 -0
- package/esm/vendors/date-fns/addQuarters.js +8 -0
- package/esm/vendors/date-fns/addYears.js +8 -0
- package/esm/vendors/date-fns/compareAsc.js +9 -0
- package/esm/vendors/date-fns/constants.js +9 -0
- package/esm/vendors/date-fns/constructFrom.js +8 -0
- package/esm/vendors/date-fns/differenceInCalendarDays.js +16 -0
- package/esm/vendors/date-fns/differenceInCalendarYears.js +13 -0
- package/esm/vendors/date-fns/differenceInYears.js +17 -0
- package/esm/vendors/date-fns/eachDayOfInterval.js +17 -0
- package/esm/vendors/date-fns/eachQuarterOfInterval.js +18 -0
- package/esm/vendors/date-fns/endOfQuarter.js +9 -0
- package/esm/vendors/date-fns/endOfWeek.js +11 -0
- package/esm/vendors/date-fns/endOfYear.js +9 -0
- package/esm/vendors/date-fns/format.js +59 -0
- package/esm/vendors/date-fns/getDay.js +8 -0
- package/esm/vendors/date-fns/getDayOfYear.js +11 -0
- package/esm/vendors/date-fns/getDaysInMonth.js +10 -0
- package/esm/vendors/date-fns/getDefaultOptions.js +8 -0
- package/esm/vendors/date-fns/getHours.js +8 -0
- package/esm/vendors/date-fns/getISODay.js +9 -0
- package/esm/vendors/date-fns/getISOWeek.js +12 -0
- package/esm/vendors/date-fns/getISOWeekYear.js +15 -0
- package/esm/vendors/date-fns/getMinutes.js +8 -0
- package/esm/vendors/date-fns/getMonth.js +8 -0
- package/esm/vendors/date-fns/getQuarter.js +9 -0
- package/esm/vendors/date-fns/getSeconds.js +8 -0
- package/esm/vendors/date-fns/getWeek.js +12 -0
- package/esm/vendors/date-fns/getWeekYear.js +17 -0
- package/esm/vendors/date-fns/getYear.js +8 -0
- package/esm/vendors/date-fns/isAfter.js +8 -0
- package/esm/vendors/date-fns/isBefore.js +8 -0
- package/esm/vendors/date-fns/isDate.js +7 -0
- package/esm/vendors/date-fns/isEqual.js +8 -0
- package/esm/vendors/date-fns/isSameQuarter.js +14 -0
- package/esm/vendors/date-fns/isValid.js +9 -0
- package/esm/vendors/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/esm/vendors/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/esm/vendors/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/esm/vendors/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/esm/vendors/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/esm/vendors/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/esm/vendors/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/esm/vendors/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/esm/vendors/date-fns/locale/en-US/_lib/match.js +110 -0
- package/esm/vendors/date-fns/locale/en-US.js +21 -0
- package/esm/vendors/date-fns/parse/_lib/Parser.js +22 -0
- package/esm/vendors/date-fns/parse/_lib/Setter.js +41 -0
- package/esm/vendors/date-fns/parse/_lib/constants.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/AMPMParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/DateParser.js +61 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/DayOfYearParser.js +51 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/DayParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/DayPeriodParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/EraParser.js +33 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ExtendedYearParser.js +21 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +22 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour0To11Parser.js +32 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour0to23Parser.js +32 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour1To24Parser.js +33 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/Hour1to12Parser.js +33 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ISODayParser.js +105 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +48 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +48 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOWeekParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +40 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/LocalDayParser.js +80 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/LocalWeekParser.js +48 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +69 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/MinuteParser.js +32 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/MonthParser.js +77 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/QuarterParser.js +75 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/SecondParser.js +32 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +80 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +77 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +75 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +22 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +22 -0
- package/esm/vendors/date-fns/parse/_lib/parsers/YearParser.js +49 -0
- package/esm/vendors/date-fns/parse/_lib/parsers.js +67 -0
- package/esm/vendors/date-fns/parse/_lib/utils.js +103 -0
- package/esm/vendors/date-fns/parse.js +89 -0
- package/esm/vendors/date-fns/set.js +11 -0
- package/esm/vendors/date-fns/setDay.js +12 -0
- package/esm/vendors/date-fns/setHours.js +9 -0
- package/esm/vendors/date-fns/setISODay.js +11 -0
- package/esm/vendors/date-fns/setISOWeek.js +10 -0
- package/esm/vendors/date-fns/setMilliseconds.js +9 -0
- package/esm/vendors/date-fns/setMinutes.js +9 -0
- package/esm/vendors/date-fns/setMonth.js +13 -0
- package/esm/vendors/date-fns/setSeconds.js +9 -0
- package/esm/vendors/date-fns/setWeek.js +10 -0
- package/esm/vendors/date-fns/setYear.js +10 -0
- package/esm/vendors/date-fns/startOfDay.js +9 -0
- package/esm/vendors/date-fns/startOfISOWeek.js +8 -0
- package/esm/vendors/date-fns/startOfISOWeekYear.js +11 -0
- package/esm/vendors/date-fns/startOfMonth.js +9 -0
- package/esm/vendors/date-fns/startOfQuarter.js +9 -0
- package/esm/vendors/date-fns/startOfWeek.js +11 -0
- package/esm/vendors/date-fns/startOfWeekYear.js +13 -0
- package/esm/vendors/date-fns/startOfYear.js +9 -0
- package/esm/vendors/date-fns/sub.js +19 -0
- package/esm/vendors/date-fns/subDays.js +8 -0
- package/esm/vendors/date-fns/subMonths.js +8 -0
- package/esm/vendors/date-fns/subYears.js +8 -0
- package/esm/vendors/date-fns/toDate.js +8 -0
- package/esm/vendors/date-fns/transpose.js +18 -0
- package/esm/vendors/maska/dist/maska.js +179 -0
- package/package.json +5 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './QAccordion';
|
|
2
2
|
export * from './QBadge';
|
|
3
|
+
export * from './QBadgeIndicator';
|
|
3
4
|
export * from './QButton';
|
|
4
5
|
export * from './QButtonGroup';
|
|
5
6
|
export * from './QButtonToggle';
|
|
@@ -8,9 +9,11 @@ export * from './QCheckbox';
|
|
|
8
9
|
export * from './QCollapsible';
|
|
9
10
|
export * from './QColorPicker';
|
|
10
11
|
export * from './QCombobox';
|
|
12
|
+
export * from './QDateTimePicker';
|
|
11
13
|
export * from './QDialog';
|
|
12
14
|
export * from './QDropdownMenu';
|
|
13
15
|
export * from './QField';
|
|
16
|
+
export * from './QFileUpload';
|
|
14
17
|
export * from './QIcon';
|
|
15
18
|
export * from './QInputGroup';
|
|
16
19
|
export * from './QLineLoader';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA"}
|
package/esm/components/index.js
CHANGED
|
@@ -1,62 +1,68 @@
|
|
|
1
1
|
import { QAccordion as e } from "./QAccordion/index.js";
|
|
2
2
|
import { QBadge as p } from "./QBadge/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
3
|
+
import { QBadgeIndicator as m } from "./QBadgeIndicator/index.js";
|
|
4
|
+
import { QButton as f } from "./QButton/index.js";
|
|
5
|
+
import { QButtonGroup as n } from "./QButtonGroup/index.js";
|
|
6
|
+
import { QButtonToggle as a } from "./QButtonToggle/index.js";
|
|
7
|
+
import { QCard as c } from "./QCard/index.js";
|
|
8
|
+
import { QCheckbox as u } from "./QCheckbox/index.js";
|
|
9
|
+
import { QCollapsible as P } from "./QCollapsible/index.js";
|
|
10
|
+
import { QColorPicker as g } from "./QColorPicker/index.js";
|
|
11
|
+
import { QCombobox as B } from "./QCombobox/index.js";
|
|
12
|
+
import { QDateTimePicker as T } from "./QDateTimePicker/index.js";
|
|
13
|
+
import { QDialog as k } from "./QDialog/index.js";
|
|
14
|
+
import { QDropdownMenu as F } from "./QDropdownMenu/index.js";
|
|
15
|
+
import { QField as S } from "./QField/index.js";
|
|
16
|
+
import { QFileUpload as h } from "./QFileUpload/index.js";
|
|
17
|
+
import { QIcon as A, QIconFont as M, QIconImg as O, QIconSvg as R } from "./QIcon/index.js";
|
|
18
|
+
import { QInputGroup as j } from "./QInputGroup/index.js";
|
|
19
|
+
import { QLineLoader as z } from "./QLineLoader/index.js";
|
|
20
|
+
import { QList as H, QListItem as J, QListItemGroup as K } from "./QList/index.js";
|
|
21
|
+
import { QOverlay as V } from "./QOverlay/index.js";
|
|
22
|
+
import { QPopover as X } from "./QPopover/index.js";
|
|
23
|
+
import { QPropertyList as Z, QPropertyListGroup as _, QPropertyListPanel as $, QPropertyListRow as oo } from "./QPropertyList/index.js";
|
|
24
|
+
import { QSelect as eo } from "./QSelect/index.js";
|
|
25
|
+
import { QSkeletonLoader as po } from "./QSkeletonLoader/index.js";
|
|
26
|
+
import { QSpinnerLoader as mo } from "./QSpinnerLoader/index.js";
|
|
27
|
+
import { QTextField as fo } from "./QTextField/index.js";
|
|
28
|
+
import { QThemeProvider as no } from "./QThemeProvider/index.js";
|
|
29
|
+
import { QTooltip as ao } from "./QTooltip/index.js";
|
|
27
30
|
export {
|
|
28
31
|
e as QAccordion,
|
|
29
32
|
p as QBadge,
|
|
30
|
-
m as
|
|
31
|
-
f as
|
|
32
|
-
n as
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
u as
|
|
36
|
-
|
|
37
|
-
g as
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
R as
|
|
48
|
-
j as
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
J as
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
oo as
|
|
59
|
-
eo as
|
|
60
|
-
po as
|
|
61
|
-
mo as
|
|
33
|
+
m as QBadgeIndicator,
|
|
34
|
+
f as QButton,
|
|
35
|
+
n as QButtonGroup,
|
|
36
|
+
a as QButtonToggle,
|
|
37
|
+
c as QCard,
|
|
38
|
+
u as QCheckbox,
|
|
39
|
+
P as QCollapsible,
|
|
40
|
+
g as QColorPicker,
|
|
41
|
+
B as QCombobox,
|
|
42
|
+
T as QDateTimePicker,
|
|
43
|
+
k as QDialog,
|
|
44
|
+
F as QDropdownMenu,
|
|
45
|
+
S as QField,
|
|
46
|
+
h as QFileUpload,
|
|
47
|
+
A as QIcon,
|
|
48
|
+
M as QIconFont,
|
|
49
|
+
O as QIconImg,
|
|
50
|
+
R as QIconSvg,
|
|
51
|
+
j as QInputGroup,
|
|
52
|
+
z as QLineLoader,
|
|
53
|
+
H as QList,
|
|
54
|
+
J as QListItem,
|
|
55
|
+
K as QListItemGroup,
|
|
56
|
+
V as QOverlay,
|
|
57
|
+
X as QPopover,
|
|
58
|
+
Z as QPropertyList,
|
|
59
|
+
_ as QPropertyListGroup,
|
|
60
|
+
$ as QPropertyListPanel,
|
|
61
|
+
oo as QPropertyListRow,
|
|
62
|
+
eo as QSelect,
|
|
63
|
+
po as QSkeletonLoader,
|
|
64
|
+
mo as QSpinnerLoader,
|
|
65
|
+
fo as QTextField,
|
|
66
|
+
no as QThemeProvider,
|
|
67
|
+
ao as QTooltip
|
|
62
68
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MaskOptions, MaskInput } from 'maska';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* Creates and manages a masked input instance on a given HTML input element.
|
|
5
|
+
*
|
|
6
|
+
* This function initializes a MaskInput instance using the provided HTML input element or a ref to the element.
|
|
7
|
+
* It applies mask options if provided, and listens for changes in the options to update the mask instance dynamically.
|
|
8
|
+
* The mask is automatically destroyed when the component is unmounted.
|
|
9
|
+
*
|
|
10
|
+
* @param target - The HTML input element or a ref to the HTML input element where the mask should be applied.
|
|
11
|
+
* @param options - (Optional) A ref to a set of mask options to configure the input mask. The mask instance will be updated
|
|
12
|
+
* when these options change.
|
|
13
|
+
*
|
|
14
|
+
* @returns An object containing a "maska" ref to the MaskInput instance.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const inputRef = ref<HTMLInputElement | null>(null);
|
|
19
|
+
* const maskOptions = ref<MaskOptions>({ mask: '###-##-####', tokens: { '#': { pattern: /\d/ } } });
|
|
20
|
+
* const { maska } = useMaska(inputRef, maskOptions);
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @see MaskInput for more details on how the mask is implemented.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useMaska(target: HTMLInputElement | Ref<HTMLInputElement | null | undefined>, options?: Ref<MaskOptions>): {
|
|
26
|
+
maska: Ref<MaskInput, MaskInput>;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=maska.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maska.d.ts","sourceRoot":"","sources":["../../src/composables/maska.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAG9B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CACvB,MAAM,EAAE,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,GAAG,IAAI,GAAG,SAAS,CAAC,EACnE,OAAO,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC;;EAmC1B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MaskInput as m } from "../vendors/maska/dist/maska.js";
|
|
2
|
+
import { ref as c, onMounted as d, onUnmounted as f, watch as o } from "vue";
|
|
3
|
+
function M(u, e) {
|
|
4
|
+
const n = c(null), r = () => {
|
|
5
|
+
const a = u instanceof HTMLInputElement ? u : u.value;
|
|
6
|
+
if (!a)
|
|
7
|
+
throw new Error("Input element is required");
|
|
8
|
+
n.value = new m(a, e == null ? void 0 : e.value), e && o(
|
|
9
|
+
e,
|
|
10
|
+
(s) => {
|
|
11
|
+
var t;
|
|
12
|
+
(t = n.value) == null || t.update(s);
|
|
13
|
+
},
|
|
14
|
+
{ deep: !0 }
|
|
15
|
+
);
|
|
16
|
+
}, l = () => {
|
|
17
|
+
var a;
|
|
18
|
+
(a = n.value) == null || a.destroy(), n.value = null;
|
|
19
|
+
};
|
|
20
|
+
return d(r), f(l), {
|
|
21
|
+
maska: n
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
M as useMaska
|
|
26
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { MaybeRef, Ref } from 'vue';
|
|
2
|
+
interface DropZoneOptions {
|
|
3
|
+
/** Callback fired when valid files are dropped */
|
|
4
|
+
onDrop?: (files: File[]) => void;
|
|
5
|
+
/** Callback fired when files are dragged over the drop zone */
|
|
6
|
+
onDragOver?: (event: DragEvent) => void;
|
|
7
|
+
/** Callback fired when files are dragged out of the drop zone */
|
|
8
|
+
onDragLeave?: (event: DragEvent) => void;
|
|
9
|
+
/** Array of accepted MIME types or file patterns (e.g., 'image/*', '.pdf') */
|
|
10
|
+
accept?: MaybeRef<string[]>;
|
|
11
|
+
/** Whether to allow multiple files to be dropped */
|
|
12
|
+
multiple?: MaybeRef<boolean>;
|
|
13
|
+
/** Maximum allowed file size in bytes */
|
|
14
|
+
maxSize?: number;
|
|
15
|
+
/** Whether the drop zone is enabled */
|
|
16
|
+
enabled?: MaybeRef<boolean>;
|
|
17
|
+
}
|
|
18
|
+
interface UseDropZoneReturn {
|
|
19
|
+
/** Whether files are currently being dragged over the drop zone */
|
|
20
|
+
isOverDropZone: Ref<boolean>;
|
|
21
|
+
/** Whether the currently dragged files match the accepted types */
|
|
22
|
+
isValid: Ref<boolean>;
|
|
23
|
+
/** Whether the drop zone is currently enabled */
|
|
24
|
+
isEnabled: Ref<boolean>;
|
|
25
|
+
/** Function to enable the drop zone */
|
|
26
|
+
enable: () => void;
|
|
27
|
+
/** Function to disable the drop zone */
|
|
28
|
+
disable: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Vue composable for handling file drag and drop with validation
|
|
32
|
+
*
|
|
33
|
+
* @param elementRef - Ref to the HTML element that will act as the drop zone
|
|
34
|
+
* @param options - Configuration options for the drop zone
|
|
35
|
+
*/
|
|
36
|
+
export declare function useDropZone(elementRef: Ref<HTMLElement | null>, options?: DropZoneOptions): UseDropZoneReturn;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useDropZone/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAKxC,UAAU,eAAe;IACxB,kDAAkD;IAClD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAA;IAChC,+DAA+D;IAC/D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAA;IACvC,iEAAiE;IACjE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAA;IACxC,8EAA8E;IAC9E,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC5B,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uCAAuC;IACvC,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC3B;AAED,UAAU,iBAAiB;IAC1B,mEAAmE;IACnE,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAC5B,mEAAmE;IACnE,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,iDAAiD;IACjD,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACvB,uCAAuC;IACvC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,wCAAwC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAC1B,UAAU,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EACnC,OAAO,GAAE,eAAoB,GAC3B,iBAAiB,CAmJnB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ref as v, unref as c, isRef as C, watch as M, onMounted as O, onUnmounted as U } from "vue";
|
|
2
|
+
function k(p, s = {}) {
|
|
3
|
+
const {
|
|
4
|
+
onDrop: m,
|
|
5
|
+
onDragOver: i,
|
|
6
|
+
onDragLeave: d,
|
|
7
|
+
accept: y = [],
|
|
8
|
+
multiple: F,
|
|
9
|
+
maxSize: g,
|
|
10
|
+
enabled: T = !0
|
|
11
|
+
} = s;
|
|
12
|
+
let a = 0;
|
|
13
|
+
const l = v(!1), u = v(!1), t = v(c(T)), E = (e) => {
|
|
14
|
+
const r = c(y);
|
|
15
|
+
return r.length === 0 || r.some((n) => e.match(n));
|
|
16
|
+
}, x = (e) => !(g && e.size > g || !E(e.type)), f = () => {
|
|
17
|
+
a = 0, l.value = !1, u.value = !1;
|
|
18
|
+
}, L = (e) => {
|
|
19
|
+
var o;
|
|
20
|
+
if (!t.value) return;
|
|
21
|
+
e.preventDefault(), f();
|
|
22
|
+
const r = Array.from(((o = e.dataTransfer) == null ? void 0 : o.files) || []);
|
|
23
|
+
if (!c(F) && r.length > 1)
|
|
24
|
+
return;
|
|
25
|
+
const n = r.filter(x);
|
|
26
|
+
n.length && m && m(n);
|
|
27
|
+
}, h = (e) => {
|
|
28
|
+
var n;
|
|
29
|
+
if (!t.value) return;
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
const r = Array.from(((n = e.dataTransfer) == null ? void 0 : n.items) || []).map((o) => o.type);
|
|
32
|
+
u.value = r.some(E), a++, a === 1 && (l.value = !0, i == null || i(e));
|
|
33
|
+
}, D = (e) => {
|
|
34
|
+
t.value && (e.preventDefault(), a--, a === 0 && (l.value = !1, u.value = !1, d == null || d(e)));
|
|
35
|
+
}, b = (e) => {
|
|
36
|
+
t.value && e.preventDefault();
|
|
37
|
+
}, z = () => {
|
|
38
|
+
t.value = !0;
|
|
39
|
+
}, A = () => {
|
|
40
|
+
t.value = !1, f();
|
|
41
|
+
};
|
|
42
|
+
s.enabled && C(s.enabled) && M(s.enabled, (e) => {
|
|
43
|
+
t.value = e, e || f();
|
|
44
|
+
});
|
|
45
|
+
const S = () => {
|
|
46
|
+
const e = p.value;
|
|
47
|
+
e && (e.addEventListener("drop", L), e.addEventListener("dragenter", h), e.addEventListener("dragleave", D), e.addEventListener("dragover", b));
|
|
48
|
+
}, Z = () => {
|
|
49
|
+
const e = p.value;
|
|
50
|
+
e && (e.removeEventListener("drop", L), e.removeEventListener("dragenter", h), e.removeEventListener("dragleave", D), e.removeEventListener("dragover", b));
|
|
51
|
+
};
|
|
52
|
+
return O(S), U(Z), {
|
|
53
|
+
isOverDropZone: l,
|
|
54
|
+
isValid: u,
|
|
55
|
+
isEnabled: t,
|
|
56
|
+
enable: z,
|
|
57
|
+
disable: A
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
k as useDropZone
|
|
62
|
+
};
|
package/esm/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ declare module '@vue/runtime-core' {
|
|
|
9
9
|
export interface GlobalComponents {
|
|
10
10
|
QAccordion: typeof import('@quidgest/ui/components')['QAccordion']
|
|
11
11
|
QBadge: typeof import('@quidgest/ui/components')['QBadge']
|
|
12
|
+
QBadgeIndicator: typeof import('@quidgest/ui/components')['QBadgeIndicator']
|
|
12
13
|
QButton: typeof import('@quidgest/ui/components')['QButton']
|
|
13
14
|
QButtonGroup: typeof import('@quidgest/ui/components')['QButtonGroup']
|
|
14
15
|
QButtonToggle: typeof import('@quidgest/ui/components')['QButtonToggle']
|
|
@@ -17,9 +18,11 @@ declare module '@vue/runtime-core' {
|
|
|
17
18
|
QCollapsible: typeof import('@quidgest/ui/components')['QCollapsible']
|
|
18
19
|
QColorPicker: typeof import('@quidgest/ui/components')['QColorPicker']
|
|
19
20
|
QCombobox: typeof import('@quidgest/ui/components')['QCombobox']
|
|
21
|
+
QDateTimePicker: typeof import('@quidgest/ui/components')['QDateTimePicker']
|
|
20
22
|
QDialog: typeof import('@quidgest/ui/components')['QDialog']
|
|
21
23
|
QDropdownMenu: typeof import('@quidgest/ui/components')['QDropdownMenu']
|
|
22
24
|
QField: typeof import('@quidgest/ui/components')['QField']
|
|
25
|
+
QFileUpload: typeof import('@quidgest/ui/components')['QFileUpload']
|
|
23
26
|
QIcon: typeof import('@quidgest/ui/components')['QIcon']
|
|
24
27
|
QIconFont: typeof import('@quidgest/ui/components')['QIconFont']
|
|
25
28
|
QIconImg: typeof import('@quidgest/ui/components')['QIconImg']
|
package/esm/utils/color.js
CHANGED
|
@@ -1,41 +1,49 @@
|
|
|
1
|
-
function h(t,
|
|
2
|
-
return
|
|
1
|
+
function h(t, r = !1) {
|
|
2
|
+
return r ? /^#[a-fA-F0-9]{6}$/.test(t) : /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t);
|
|
3
3
|
}
|
|
4
4
|
function d(t) {
|
|
5
|
-
const
|
|
6
|
-
if (
|
|
7
|
-
const
|
|
8
|
-
return { r:
|
|
5
|
+
const r = t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
|
6
|
+
if (r) {
|
|
7
|
+
const n = parseInt(r[1], 10), s = parseInt(r[2], 10), e = parseInt(r[3], 10);
|
|
8
|
+
return { r: n, g: s, b: e };
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function b(t) {
|
|
12
12
|
if (h(t)) {
|
|
13
13
|
t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
|
|
14
|
-
const
|
|
15
|
-
return { r
|
|
14
|
+
const r = parseInt(t.slice(1, 3), 16), n = parseInt(t.slice(3, 5), 16), s = parseInt(t.slice(5, 7), 16);
|
|
15
|
+
return { r, g: n, b: s };
|
|
16
16
|
} else {
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
17
|
+
const r = d(t);
|
|
18
|
+
if (r) return r;
|
|
19
19
|
}
|
|
20
20
|
throw new Error("Invalid color format");
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const n = t
|
|
22
|
+
function p(t, r) {
|
|
23
|
+
const n = g(t), s = r / 100;
|
|
24
|
+
return n.l = n.l - s * n.l, l(n);
|
|
25
|
+
}
|
|
26
|
+
function M(t) {
|
|
27
|
+
const r = t.r.toString(16).padStart(2, "0"), n = t.g.toString(16).padStart(2, "0"), s = t.b.toString(16).padStart(2, "0");
|
|
28
|
+
return `#${r}${n}${s}`;
|
|
29
|
+
}
|
|
30
|
+
function g(t) {
|
|
31
|
+
const r = t.r / 255, n = t.g / 255, s = t.b / 255, e = Math.max(r, n, s), o = Math.min(r, n, s);
|
|
24
32
|
let a = 0, c;
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
33
|
+
const i = (e + o) / 2;
|
|
34
|
+
if (e === o)
|
|
27
35
|
a = c = 0;
|
|
28
36
|
else {
|
|
29
|
-
const
|
|
30
|
-
switch (c =
|
|
37
|
+
const u = e - o;
|
|
38
|
+
switch (c = i > 0.5 ? u / (2 - e - o) : u / (e + o), e) {
|
|
39
|
+
case r:
|
|
40
|
+
a = (n - s) / u + (n < s ? 6 : 0);
|
|
41
|
+
break;
|
|
31
42
|
case n:
|
|
32
|
-
a = (s -
|
|
43
|
+
a = (s - r) / u + 2;
|
|
33
44
|
break;
|
|
34
45
|
case s:
|
|
35
|
-
a = (
|
|
36
|
-
break;
|
|
37
|
-
case e:
|
|
38
|
-
a = (n - s) / f + 4;
|
|
46
|
+
a = (r - n) / u + 4;
|
|
39
47
|
break;
|
|
40
48
|
}
|
|
41
49
|
a /= 6;
|
|
@@ -43,16 +51,38 @@ function b(t) {
|
|
|
43
51
|
return {
|
|
44
52
|
h: Math.round(a * 360),
|
|
45
53
|
s: Math.round(c * 100),
|
|
46
|
-
l: Math.round(
|
|
54
|
+
l: Math.round(i * 100)
|
|
47
55
|
};
|
|
48
56
|
}
|
|
49
|
-
function
|
|
57
|
+
function l(t) {
|
|
58
|
+
const r = t.h / 360, n = t.s / 100, s = t.l / 100;
|
|
59
|
+
let e, o, a;
|
|
60
|
+
if (n === 0)
|
|
61
|
+
e = o = a = s;
|
|
62
|
+
else {
|
|
63
|
+
const c = s < 0.5 ? s * (1 + n) : s + n - s * n, i = 2 * s - c;
|
|
64
|
+
e = f(i, c, r + 1 / 3), o = f(i, c, r), a = f(i, c, r - 1 / 3);
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
r: Math.round(e * 255),
|
|
68
|
+
g: Math.round(o * 255),
|
|
69
|
+
b: Math.round(a * 255)
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function f(t, r, n) {
|
|
73
|
+
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (r - t) * 6 * n : n < 1 / 2 ? r : n < 2 / 3 ? t + (r - t) * (2 / 3 - n) * 6 : t;
|
|
74
|
+
}
|
|
75
|
+
function m(t) {
|
|
50
76
|
return t > 50 ? "#000" : "#fff";
|
|
51
77
|
}
|
|
52
78
|
export {
|
|
53
|
-
|
|
79
|
+
M as colorToHex,
|
|
80
|
+
p as darken,
|
|
81
|
+
m as getContrastingColor,
|
|
82
|
+
l as hslToRgb,
|
|
83
|
+
f as hueToRgb,
|
|
54
84
|
h as isValidHex,
|
|
55
|
-
|
|
56
|
-
|
|
85
|
+
b as parseColor,
|
|
86
|
+
g as rgbToHsl,
|
|
57
87
|
d as tryParseRgb
|
|
58
88
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a Unicode date format pattern
|
|
3
|
+
* into a mask string compatible with the Maska library.
|
|
4
|
+
*
|
|
5
|
+
* @param pattern - The Unicode date format pattern to be converted.
|
|
6
|
+
* @returns The corresponding mask string for the Maska library.
|
|
7
|
+
*/
|
|
8
|
+
export declare function convertDatePatternToMask(format: string): string | string[];
|
|
9
|
+
//# sourceMappingURL=date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/utils/date/date.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CA8C1E"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { tokenizeFormat as g, staticTokensMap as h, isUnitRepetition as y, dynamicTokensMap as E } from "./tokens.js";
|
|
2
|
+
function x(n) {
|
|
3
|
+
const r = g(n);
|
|
4
|
+
if (!r)
|
|
5
|
+
throw Error("Failed to tokenize format string.");
|
|
6
|
+
const i = [...r.sort((e, a) => a.length - e.length)], t = [n];
|
|
7
|
+
if (r.filter((e) => h[e] !== void 0).forEach((e) => {
|
|
8
|
+
const a = h[e];
|
|
9
|
+
d(a, t, e);
|
|
10
|
+
const c = i.indexOf(e);
|
|
11
|
+
i.splice(c, 1);
|
|
12
|
+
}), [...i].forEach((e) => {
|
|
13
|
+
if (!y(e))
|
|
14
|
+
throw new Error(`Invalid token format: ${e}. Tokens must be repeated characters.`);
|
|
15
|
+
const a = e[0], c = w(a, e.length);
|
|
16
|
+
d(c, t, e);
|
|
17
|
+
const f = i.indexOf(e);
|
|
18
|
+
i.splice(f, 1);
|
|
19
|
+
}), i.length > 0)
|
|
20
|
+
throw new Error(`Unhandled tokens remain: ${i.join(", ")}`);
|
|
21
|
+
return t.forEach((e, a) => {
|
|
22
|
+
t[a] = T(e);
|
|
23
|
+
}), t.length === 1 ? t[0] : t;
|
|
24
|
+
}
|
|
25
|
+
function T(n) {
|
|
26
|
+
const r = "\0";
|
|
27
|
+
return n.replace(/'((?:[^']|'')+)'/g, (i, t) => t.replace(/''/g, r).split("").map((e) => e === r ? "!'" : "!" + e).join(""));
|
|
28
|
+
}
|
|
29
|
+
function w(n, r) {
|
|
30
|
+
const i = [], t = E[n];
|
|
31
|
+
if (t === void 0)
|
|
32
|
+
throw new Error(`Dynamic token '${n}' not found.`);
|
|
33
|
+
if (typeof t == "string") {
|
|
34
|
+
const s = p(t, r);
|
|
35
|
+
i.push(s);
|
|
36
|
+
} else Array.isArray(i) && t.forEach((o) => {
|
|
37
|
+
const s = p(o, r);
|
|
38
|
+
i.push(s);
|
|
39
|
+
});
|
|
40
|
+
return i;
|
|
41
|
+
}
|
|
42
|
+
function p(n, r) {
|
|
43
|
+
const i = n.startsWith("-");
|
|
44
|
+
return i && (n = n.substring(1)), n = n.repeat(r), i && (n = `-${n}`), n;
|
|
45
|
+
}
|
|
46
|
+
function d(n, r, i) {
|
|
47
|
+
if (typeof n == "string") {
|
|
48
|
+
const t = n;
|
|
49
|
+
r.forEach((o, s) => {
|
|
50
|
+
r[s] = u(o, i, t);
|
|
51
|
+
});
|
|
52
|
+
} else if (Array.isArray(n)) {
|
|
53
|
+
const t = n.length, o = [...r], s = o.length;
|
|
54
|
+
for (let e = 1; e < t; e++)
|
|
55
|
+
r.push(...o);
|
|
56
|
+
n.forEach((e, a) => {
|
|
57
|
+
const c = a * s, f = c + s - 1;
|
|
58
|
+
for (let l = c; l <= f; l++)
|
|
59
|
+
r[l] = u(r[l], i, e);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function u(n, r, i) {
|
|
64
|
+
let t = "", o = 0, s = !1, e = "";
|
|
65
|
+
const a = r.length;
|
|
66
|
+
for (; o < n.length; ) {
|
|
67
|
+
const c = n[o];
|
|
68
|
+
if (!s && (c === "'" || c === '"')) {
|
|
69
|
+
s = !0, e = c, t += c, o++;
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (s)
|
|
73
|
+
if (c === e)
|
|
74
|
+
if (o + 1 < n.length && n[o + 1] === e) {
|
|
75
|
+
t += e + e, o += 2;
|
|
76
|
+
continue;
|
|
77
|
+
} else {
|
|
78
|
+
s = !1, t += c, o++;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
t += c, o++;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
n.substring(o, o + a) === r ? (t += i, o += a) : (t += c, o++);
|
|
86
|
+
}
|
|
87
|
+
return t;
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
x as convertDatePatternToMask
|
|
91
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/date/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAE3C,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type TokenMap = {
|
|
2
|
+
[token: string]: string | string[];
|
|
3
|
+
};
|
|
4
|
+
export declare const staticTokensMap: TokenMap;
|
|
5
|
+
export declare const dynamicTokensMap: TokenMap;
|
|
6
|
+
/**
|
|
7
|
+
* Tokenizes a given format string by matching against both variable and fixed token patterns.
|
|
8
|
+
*
|
|
9
|
+
* This function dynamically constructs a regular expression that first targets variable tokens
|
|
10
|
+
* (allowing for 1 to 4 greedy occurrences) and then fixed tokens (sorted in descending order of length).
|
|
11
|
+
* It escapes any special regex characters in both token maps to ensure that they are correctly interpreted
|
|
12
|
+
* as literal strings in the resulting Regex.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* The generated regular expression is used to match and extract tokens from the provided format string.
|
|
16
|
+
* If any tokens are found based on the specified patterns from `variableTokensMap` and `tokensMap`, an array
|
|
17
|
+
* of tokens is returned; otherwise, `null` is returned.
|
|
18
|
+
*
|
|
19
|
+
* @param format - The string containing the format to be tokenized.
|
|
20
|
+
* @returns An array of matched tokens if present, or `null` if no tokens match.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const tokens = tokenizeFormat("YYYY-MM-DD");
|
|
25
|
+
* console.log(tokens); // ['YYYY', 'MM', 'DD']
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @see dynamicTokensMap
|
|
29
|
+
* @see staticTokensMap
|
|
30
|
+
*/
|
|
31
|
+
export declare function tokenizeFormat(format: string): RegExpMatchArray | null;
|
|
32
|
+
/**
|
|
33
|
+
* Determines if a given format string represents a time-only format.
|
|
34
|
+
*
|
|
35
|
+
* @param format - The format string to check (e.g., 'HH:mm:ss', 'YYYY-MM-DD HH:mm').
|
|
36
|
+
* @returns `true` if the format is time-only, `false` if it includes date components.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isTimeOnlyFormat(format: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Checks whether the given token is not composed entirely of a single repeated character.
|
|
41
|
+
*
|
|
42
|
+
* A valid unit repetition (e.g., 'yyyy') consists of the same character repeated. This function
|
|
43
|
+
* returns false if the token consists solely of one repeating character, and true otherwise.
|
|
44
|
+
*
|
|
45
|
+
* @param token - The string token to evaluate.
|
|
46
|
+
* @returns False if the token is a unit repetition; true if it is not.
|
|
47
|
+
*/
|
|
48
|
+
export declare function isUnitRepetition(token: string): boolean;
|
|
49
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/date/tokens.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,QAAQ,GAAG;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,CAAA;AA0I7D,eAAO,MAAM,eAAe,EAAE,QAG7B,CAAA;AAuBD,eAAO,MAAM,gBAAgB,EAAE,QAG9B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAuBtE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAOxD;AA4BD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,WAG7C"}
|