@pequity/squirrel 10.1.0 → 11.0.1

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 (29) hide show
  1. package/dist/cjs/chunks/index.js +199 -143
  2. package/dist/cjs/chunks/p-inline-date-picker.js +51 -84
  3. package/dist/cjs/dateLocale.js +886 -0
  4. package/dist/cjs/index.js +2 -2
  5. package/dist/cjs/p-date-picker.js +146 -2
  6. package/dist/cjs/p-select-pill.js +1 -1
  7. package/dist/es/chunks/index.js +199 -143
  8. package/dist/es/chunks/p-inline-date-picker.js +50 -83
  9. package/dist/es/dateLocale.js +886 -0
  10. package/dist/es/index.js +50 -50
  11. package/dist/es/p-date-picker.js +146 -2
  12. package/dist/es/p-select-pill.js +1 -1
  13. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +19 -23
  14. package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +2 -2
  15. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +12 -13
  16. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +2 -2
  17. package/dist/squirrel/components/p-steps/p-steps.vue.d.ts +1 -1
  18. package/dist/squirrel/utils/dateLocale.d.ts +2 -0
  19. package/dist/squirrel.css +35 -2
  20. package/package.json +28 -27
  21. package/squirrel/components/p-date-picker/p-date-picker.spec.js +49 -4
  22. package/squirrel/components/p-date-picker/p-date-picker.vue +84 -12
  23. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.spec.js +33 -18
  24. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +21 -10
  25. package/squirrel/components/p-select-pill/p-select-pill.vue +1 -1
  26. package/squirrel/utils/dateLocale.spec.ts +20 -0
  27. package/squirrel/utils/dateLocale.ts +19 -0
  28. package/dist/cjs/chunks/p-date-picker.js +0 -171
  29. package/dist/es/chunks/p-date-picker.js +0 -172
@@ -1,6 +1,7 @@
1
1
  import { defineComponent, mergeModels, useModel, useAttrs, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, renderSlot, createVNode, withDirectives, unref, createCommentVNode, toDisplayString, mergeProps, createElementVNode, vShow } from "vue";
2
2
  import { useInputClasses } from "../useInputClasses.js";
3
- import VueDatePicker from "@vuepic/vue-datepicker";
3
+ import { getDateFnsLocale } from "../dateLocale.js";
4
+ import { VueDatePicker } from "@vuepic/vue-datepicker";
4
5
  import { useI18n } from "vue-i18n";
5
6
  const _hoisted_1 = ["data-has-error"];
6
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -10,112 +11,73 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10
11
  },
11
12
  __name: "p-inline-date-picker",
12
13
  props: /* @__PURE__ */ mergeModels({
13
- label: { default: "" },
14
- errorMsg: { default: "" },
15
- required: { type: Boolean, default: false },
16
- uid: {},
17
- name: {},
18
- is24: { type: Boolean },
19
- enableTimePicker: { type: Boolean, default: false },
20
- range: { type: [Boolean, Object] },
21
14
  multiCalendars: { type: [Boolean, Number, String, Object] },
22
- modelValue: {},
23
- locale: {},
24
- position: {},
15
+ modelType: { default: "yyyy-MM-dd" },
25
16
  dark: { type: Boolean },
26
- placeholder: {},
27
- weekNumbers: {},
28
- hoursIncrement: {},
29
- hoursGridIncrement: {},
30
- secondsGridIncrement: {},
31
- minutesGridIncrement: {},
32
- minutesIncrement: {},
33
- secondsIncrement: {},
34
- minDate: {},
35
- maxDate: {},
36
- minTime: {},
37
- maxTime: {},
38
- weekStart: { default: 0 },
39
- disabled: { type: Boolean },
40
- readonly: { type: Boolean },
41
- format: {},
42
- previewFormat: {},
43
- hideInputIcon: { type: Boolean },
44
- state: { type: Boolean },
45
- clearable: { type: Boolean },
46
- alwaysClearable: { type: Boolean },
47
- autoApply: { type: Boolean, default: true },
48
- filters: {},
49
- disableMonthYearSelect: { type: Boolean },
17
+ transitions: { type: [Boolean, Object] },
18
+ ariaLabels: {},
19
+ hideNavigation: {},
20
+ timezone: {},
21
+ vertical: { type: Boolean },
22
+ hideMonthYearSelect: { type: Boolean },
23
+ disableYearSelect: { type: Boolean },
50
24
  yearRange: {},
25
+ autoApply: { type: Boolean, default: true },
51
26
  disabledDates: {},
52
- inline: { type: [Boolean, Object], default: true },
53
- selectText: {},
54
- cancelText: {},
55
- weekNumName: {},
56
- autoPosition: { type: [Boolean, String] },
57
- monthPicker: { type: Boolean },
58
- timePicker: { type: Boolean },
59
- textInput: { type: [Boolean, Object] },
60
- monthNameFormat: {},
61
27
  startDate: {},
62
- startTime: {},
63
28
  hideOffsetDates: { type: Boolean, default: true },
64
29
  noToday: { type: Boolean },
65
- noHoursOverlay: { type: Boolean },
66
- noMinutesOverlay: { type: Boolean },
67
- noSecondsOverlay: { type: Boolean },
68
- altPosition: {},
69
- disabledWeekDays: {},
70
30
  allowedDates: {},
71
- nowButtonLabel: {},
72
- monthChangeOnScroll: { type: [Boolean, String] },
73
31
  markers: {},
74
- transitions: { type: [Boolean, Object] },
75
- enableSeconds: { type: Boolean },
76
- escClose: { type: Boolean },
77
- spaceConfirm: { type: Boolean },
78
- monthChangeOnArrows: { type: Boolean },
79
- formatLocale: {},
80
- autocomplete: {},
81
- multiDates: { type: [Boolean, Object] },
82
32
  presetDates: {},
83
33
  flow: {},
84
- partialFlow: { type: Boolean },
85
34
  preventMinMaxNavigation: { type: Boolean },
86
- utc: { type: [Boolean, String] },
87
35
  reverseYears: { type: Boolean },
88
36
  weekPicker: { type: Boolean },
89
- vertical: { type: Boolean },
90
- ariaLabels: {},
37
+ filters: {},
91
38
  arrowNavigation: { type: Boolean },
92
- yearPicker: { type: Boolean },
39
+ highlight: {},
40
+ teleport: { type: [String, Boolean] },
41
+ centered: { type: Boolean },
42
+ locale: {},
43
+ weekStart: { default: 0 },
44
+ weekNumbers: { type: [Boolean, Object] },
93
45
  dayNames: {},
94
- modelType: { default: "yyyy-MM-dd" },
46
+ monthPicker: { type: Boolean },
47
+ yearPicker: { type: Boolean },
95
48
  modelAuto: { type: Boolean },
96
- highlight: {},
97
- offset: {},
98
- teleportCenter: { type: Boolean },
99
- teleport: { type: [Boolean, String] },
100
- ignoreTimeValidation: { type: Boolean },
101
- dayClass: {},
102
- hideNavigation: {},
49
+ formats: {},
50
+ multiDates: { type: [Boolean, Object] },
51
+ minDate: {},
52
+ maxDate: {},
53
+ minTime: {},
54
+ maxTime: {},
55
+ inputAttrs: {},
56
+ timeConfig: { default: () => ({ enableTimePicker: false }) },
57
+ placeholder: { default: "" },
58
+ timePicker: { type: Boolean },
59
+ range: { type: [Boolean, Object] },
60
+ menuId: {},
61
+ disabled: { type: Boolean },
62
+ readonly: { type: Boolean },
63
+ inline: { type: [Boolean, Object] },
64
+ textInput: { type: [Boolean, Object], default: false },
103
65
  sixWeeks: { type: [Boolean, String] },
104
- timezone: {},
105
- disableYearSelect: { type: Boolean },
66
+ actionRow: {},
106
67
  focusStartDate: { type: Boolean },
107
68
  disabledTimes: {},
108
- timePickerInline: { type: Boolean },
109
69
  calendar: {},
110
70
  config: {},
111
71
  quarterPicker: { type: Boolean },
112
72
  yearFirst: { type: Boolean },
113
73
  loading: { type: Boolean },
114
- onInternalModelChange: {},
115
- enableMinutes: { type: Boolean },
116
- ui: {}
74
+ ui: {},
75
+ floating: {},
76
+ label: { default: "" },
77
+ errorMsg: { default: "" },
78
+ required: { type: Boolean, default: false }
117
79
  }, {
118
- "modelValue": { default: "" },
80
+ "modelValue": {},
119
81
  "modelModifiers": {}
120
82
  }),
121
83
  emits: ["update:modelValue"],
@@ -126,9 +88,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
126
88
  const attrs = useAttrs();
127
89
  const { labelClasses, errorMsgClasses } = useInputClasses(props);
128
90
  const datePickerProps = computed(() => {
129
- const { modelValue: _, ...propsWithoutModelValue } = props;
91
+ const { label, errorMsg, required, ...vueDatePickerProps } = props;
130
92
  const { class: classes, style: style2, ...attrsWithoutClassAndStyle } = attrs;
131
- return { ...propsWithoutModelValue, ...attrsWithoutClassAndStyle, locale: locale.value };
93
+ return {
94
+ ...vueDatePickerProps,
95
+ ...attrsWithoutClassAndStyle,
96
+ locale: getDateFnsLocale(locale.value),
97
+ inline: true
98
+ };
132
99
  });
133
100
  const style = computed(() => {
134
101
  return attrs.style;