@coreui/vue-pro 5.0.0 → 5.1.0

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 (48) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/components/calendar/CCalendar.js +4 -7
  3. package/dist/cjs/components/calendar/CCalendar.js.map +1 -1
  4. package/dist/cjs/components/dropdown/utils.js +1 -1
  5. package/dist/cjs/components/dropdown/utils.js.map +1 -1
  6. package/dist/cjs/components/index.d.ts +1 -0
  7. package/dist/cjs/components/index.js +26 -22
  8. package/dist/cjs/components/index.js.map +1 -1
  9. package/dist/cjs/components/multi-select/utils.js +0 -6
  10. package/dist/cjs/components/multi-select/utils.js.map +1 -1
  11. package/dist/cjs/components/rating/CRating.d.ts +132 -0
  12. package/dist/cjs/components/rating/CRating.js +240 -0
  13. package/dist/cjs/components/rating/CRating.js.map +1 -0
  14. package/dist/cjs/components/rating/index.d.ts +6 -0
  15. package/dist/cjs/components/rating/index.js +13 -0
  16. package/dist/cjs/components/rating/index.js.map +1 -0
  17. package/dist/cjs/components/smart-table/CSmartTableBody.js +2 -1
  18. package/dist/cjs/components/smart-table/CSmartTableBody.js.map +1 -1
  19. package/dist/cjs/index.js +32 -28
  20. package/dist/cjs/index.js.map +1 -1
  21. package/dist/cjs/node_modules/vue-types/dist/vue-types.modern.js +1 -1
  22. package/dist/cjs/node_modules/vue-types/dist/vue-types.modern.js.map +1 -1
  23. package/dist/esm/components/calendar/CCalendar.js +4 -7
  24. package/dist/esm/components/calendar/CCalendar.js.map +1 -1
  25. package/dist/esm/components/dropdown/utils.js +1 -1
  26. package/dist/esm/components/dropdown/utils.js.map +1 -1
  27. package/dist/esm/components/index.d.ts +1 -0
  28. package/dist/esm/components/index.js +2 -0
  29. package/dist/esm/components/index.js.map +1 -1
  30. package/dist/esm/components/multi-select/utils.js +0 -6
  31. package/dist/esm/components/multi-select/utils.js.map +1 -1
  32. package/dist/esm/components/rating/CRating.d.ts +132 -0
  33. package/dist/esm/components/rating/CRating.js +238 -0
  34. package/dist/esm/components/rating/CRating.js.map +1 -0
  35. package/dist/esm/components/rating/index.d.ts +6 -0
  36. package/dist/esm/components/rating/index.js +10 -0
  37. package/dist/esm/components/rating/index.js.map +1 -0
  38. package/dist/esm/components/smart-table/CSmartTableBody.js +3 -2
  39. package/dist/esm/components/smart-table/CSmartTableBody.js.map +1 -1
  40. package/dist/esm/index.js +2 -0
  41. package/dist/esm/index.js.map +1 -1
  42. package/dist/esm/node_modules/vue-types/dist/vue-types.modern.js +1 -1
  43. package/dist/esm/node_modules/vue-types/dist/vue-types.modern.js.map +1 -1
  44. package/package.json +7 -7
  45. package/src/components/index.ts +1 -0
  46. package/src/components/rating/CRating.ts +288 -0
  47. package/src/components/rating/index.ts +10 -0
  48. package/src/components/smart-table/CSmartTableBody.ts +3 -1
@@ -0,0 +1,240 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vCTooltip = require('../../directives/v-c-tooltip.js');
5
+
6
+ const CRating = vue.defineComponent({
7
+ name: 'CRating',
8
+ props: {
9
+ /**
10
+ * Enables the clearing upon clicking the selected item again.
11
+ */
12
+ allowClear: Boolean,
13
+ /**
14
+ * Toggle the disabled state for the component.
15
+ */
16
+ disabled: Boolean,
17
+ /**
18
+ * If enabled, only the currently selected icon will be visibly highlighted.
19
+ */
20
+ highlightOnlySelected: Boolean,
21
+ /**
22
+ * Specifies the total number of stars to be displayed in the star rating component. This property determines the scale of the rating, such as out of 5 stars, 10 stars, etc.
23
+ */
24
+ itemCount: {
25
+ type: Number,
26
+ default: 5,
27
+ },
28
+ /**
29
+ * The default name for a value passed using v-model.
30
+ */
31
+ modelValue: Number,
32
+ /**
33
+ * The name attribute of the radio input elements.
34
+ */
35
+ name: String,
36
+ /**
37
+ * Minimum increment value change allowed.
38
+ */
39
+ precision: {
40
+ type: Number,
41
+ default: 1,
42
+ },
43
+ /**
44
+ * Toggle the readonly state for the component.
45
+ */
46
+ readOnly: Boolean,
47
+ /**
48
+ * Size the component small, large, or custom if you define custom icons with custom height.
49
+ *
50
+ * @values 'sm', 'lg', 'custom'
51
+ */
52
+ size: {
53
+ type: String,
54
+ validator: (value) => {
55
+ return ['sm', 'lg', 'custom'].includes(value);
56
+ },
57
+ },
58
+ /**
59
+ * Enable tooltips with default values or set specific labels for each icon.
60
+ */
61
+ tooltips: {
62
+ type: [Boolean, Array],
63
+ },
64
+ /**
65
+ * The `value` attribute of component.
66
+ * */
67
+ value: Number,
68
+ },
69
+ emits: [
70
+ /**
71
+ * Execute a function when a user changes the selected element.
72
+ *
73
+ * @property {number | null} value
74
+ */
75
+ 'change',
76
+ /**
77
+ * Execute a function when a user hover the element.
78
+ *
79
+ * @property {number | null} value
80
+ */
81
+ 'hover',
82
+ /**
83
+ * Emit the new value whenever there’s a change event.
84
+ */
85
+ 'update:modelValue',
86
+ ],
87
+ setup(props, { slots, emit }) {
88
+ const cleared = vue.ref(false);
89
+ const currentValue = vue.ref((props.modelValue || props.value) ?? null);
90
+ const hoverValue = vue.ref(null);
91
+ const tooltipValue = vue.ref(null);
92
+ const name = props.name || `name${Math.floor(Math.random() * 1_000_000)}`;
93
+ const uid = `id${Math.floor(Math.random() * 1_000_000)}`;
94
+ vue.watch(() => props.value, () => {
95
+ if (props.value !== undefined) {
96
+ currentValue.value = props.value;
97
+ }
98
+ });
99
+ vue.watch(() => props.modelValue, () => {
100
+ if (props.modelValue !== undefined) {
101
+ currentValue.value = props.modelValue;
102
+ }
103
+ });
104
+ const handleMouseEnter = (value) => {
105
+ if (props.disabled || props.readOnly) {
106
+ return;
107
+ }
108
+ emit('hover', value);
109
+ hoverValue.value = value;
110
+ tooltipValue.value = value;
111
+ };
112
+ const handleMouseLeave = () => {
113
+ if (props.disabled || props.readOnly) {
114
+ return;
115
+ }
116
+ emit('hover', null);
117
+ hoverValue.value = null;
118
+ };
119
+ const handleOnChange = (value) => {
120
+ if (props.disabled || props.readOnly) {
121
+ return;
122
+ }
123
+ if (cleared.value) {
124
+ cleared.value = false;
125
+ return;
126
+ }
127
+ currentValue.value = value;
128
+ emit('change', value);
129
+ emit('update:modelValue', value);
130
+ };
131
+ const handleOnClick = (value) => {
132
+ if (props.disabled || props.readOnly) {
133
+ return;
134
+ }
135
+ if (props.allowClear && value === currentValue.value) {
136
+ emit('change', value);
137
+ cleared.value = true;
138
+ currentValue.value = null;
139
+ hoverValue.value = null;
140
+ }
141
+ };
142
+ return () => vue.h('div', {
143
+ class: [
144
+ 'rating',
145
+ {
146
+ [`rating-${props.size}`]: props.size,
147
+ disabled: props.disabled,
148
+ readonly: props.readOnly,
149
+ },
150
+ ],
151
+ role: 'radiogroup',
152
+ }, [
153
+ Array.from({ length: props.itemCount }, (_, index) => {
154
+ const numberOfRadios = 1 / props.precision;
155
+ return vue.withDirectives(vue.h('div', {
156
+ class: 'rating-item',
157
+ }, [
158
+ Array.from({ length: numberOfRadios }, (_, _index) => {
159
+ const isNotLastItem = _index + 1 < numberOfRadios;
160
+ const value = numberOfRadios === 1
161
+ ? index + 1
162
+ : index + (_index + 1) * (1 * props.precision);
163
+ const id = `${uid}${value}`;
164
+ const isItemChecked = () => value === currentValue.value;
165
+ const isItemActive = () => {
166
+ if (props.highlightOnlySelected
167
+ ? hoverValue.value === value
168
+ : hoverValue.value && hoverValue.value >= value) {
169
+ return true;
170
+ }
171
+ if (hoverValue.value === null &&
172
+ (props.highlightOnlySelected
173
+ ? isItemChecked()
174
+ : currentValue.value && currentValue.value >= value)) {
175
+ return true;
176
+ }
177
+ return false;
178
+ };
179
+ return [
180
+ vue.h('label', {
181
+ class: [
182
+ 'rating-item-label',
183
+ {
184
+ active: isItemActive(),
185
+ },
186
+ ],
187
+ for: id,
188
+ onClick: () => handleOnClick(value),
189
+ onMouseenter: () => handleMouseEnter(value),
190
+ onMouseleave: () => handleMouseLeave(),
191
+ ...(isNotLastItem && {
192
+ style: {
193
+ zIndex: 1 / props.precision - _index,
194
+ position: 'absolute',
195
+ width: `${props.precision * (_index + 1) * 100}%`,
196
+ overflow: 'hidden',
197
+ opacity: 0,
198
+ },
199
+ }),
200
+ }, {
201
+ default: () => [
202
+ slots.icon
203
+ ? vue.h('div', { class: 'rating-item-custom-icon' }, slots.icon({ value: index + 1 }))
204
+ : vue.h('div', { class: 'rating-item-icon' }),
205
+ slots.activeIcon &&
206
+ vue.h('div', { class: 'rating-item-custom-icon-active' }, slots.activeIcon({ value: index + 1 })),
207
+ ],
208
+ }),
209
+ vue.h('input', {
210
+ checked: isItemChecked(),
211
+ class: 'rating-item-input',
212
+ disabled: props.disabled || props.readOnly,
213
+ id: id,
214
+ name: name,
215
+ onBlur: () => handleMouseLeave(),
216
+ onChange: () => handleOnChange(value),
217
+ onFocus: () => handleMouseEnter(value),
218
+ type: 'radio',
219
+ value: value,
220
+ }),
221
+ ];
222
+ }),
223
+ ]), props.tooltips
224
+ ? [
225
+ [
226
+ vCTooltip.default,
227
+ {
228
+ content: Array.isArray(props.tooltips) ? props.tooltips[index] : index + 1,
229
+ placement: 'top',
230
+ },
231
+ ],
232
+ ]
233
+ : []);
234
+ }),
235
+ ]);
236
+ },
237
+ });
238
+
239
+ exports.CRating = CRating;
240
+ //# sourceMappingURL=CRating.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CRating.js","sources":["../../../../src/components/rating/CRating.ts"],"sourcesContent":[null],"names":["defineComponent","ref","watch","h","withDirectives","vCTooltip"],"mappings":";;;;;AAGM,MAAA,OAAO,GAAGA,mBAAe,CAAC;AAC9B,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,KAAK,EAAE;AACL;;AAEG;AACH,QAAA,UAAU,EAAE,OAAO;AACnB;;AAEG;AACH,QAAA,QAAQ,EAAE,OAAO;AACjB;;AAEG;AACH,QAAA,qBAAqB,EAAE,OAAO;AAC9B;;AAEG;AACH,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,CAAC;AACX,SAAA;AACD;;AAEG;AACH,QAAA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AC;AACrC,gCAAA,OAAO,EAAE,MAAM,gBAAgB,CAAC,KAAK,CAAC;AACtC,gCAAA,IAAI,EAAE,OAAO;AACb,gCAAA,KAAK,EAAE,KAAK;6BACb,CAAC;yBACH,CAAA;AACH,qBAAC,CAAC;iBACH,CACF,EACD,KAAK,CAAC,QAAQ;AACZ,sBAAE;AACE,wBAAA;4BACEE,iBAAS;AACT,4BAAA;gCACE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC;AAC1E,gCAAA,SAAS,EAAE,KAAK;AACjB,6BAAA;AACF,yBAAA;AACF,qBAAA;sBACD,EAAE,CACP,CAAA;AACH,aAAC,CAAC;AACH,SAAA,CACF,CAAA;KACJ;AACF,CAAA;;;;"}
@@ -0,0 +1,6 @@
1
+ import { App } from 'vue';
2
+ import { CRating } from './CRating';
3
+ declare const CRatingPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { CRating, CRatingPlugin };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var CRating = require('./CRating.js');
4
+
5
+ const CRatingPlugin = {
6
+ install: (app) => {
7
+ app.component(CRating.CRating.name, CRating.CRating);
8
+ },
9
+ };
10
+
11
+ exports.CRating = CRating.CRating;
12
+ exports.CRatingPlugin = CRatingPlugin;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/rating/index.ts"],"sourcesContent":[null],"names":["CRating"],"mappings":";;;;AAGA,MAAM,aAAa,GAAG;AACpB,IAAA,OAAO,EAAE,CAAC,GAAQ,KAAU;QAC1B,GAAG,CAAC,SAAS,CAACA,eAAO,CAAC,IAAc,EAAEA,eAAO,CAAC,CAAA;KAC/C;;;;;;"}
@@ -57,6 +57,7 @@ const CSmartTableBody = vue.defineComponent({
57
57
  emits: ['rowChecked', 'rowClick'],
58
58
  setup(props, { emit }) {
59
59
  const colspan = props.selectable ? props.columns.length + 1 : props.columns.length;
60
+ const columns = utils.getColumns(props.columns);
60
61
  return () => vue.h(CTableBody.CTableBody, {
61
62
  ...(props.clickableRows && { style: 'cursor:pointer;' }),
62
63
  }, {
@@ -79,7 +80,7 @@ const CSmartTableBody = vue.defineComponent({
79
80
  emit('rowChecked', item, event.target.checked);
80
81
  },
81
82
  })),
82
- props.columns.map((column) => {
83
+ columns.map((column) => {
83
84
  const colName = utils.getColumnName(column);
84
85
  return props.scopedSlots &&
85
86
  props.scopedSlots[colName] &&
@@ -1 +1 @@
1
- {"version":3,"file":"CSmartTableBody.js","sources":["../../../../src/components/smart-table/CSmartTableBody.ts"],"sourcesContent":[null],"names":["defineComponent","h","CTableBody","CTableRow","getClickedColumnName","CTableDataCell","CFormCheck","isObjectInArray","ITEM_INTERNAL_KEYS","getColumnName","getTableDataCellProps","getTableDataCellStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBM,MAAA,eAAe,GAAGA,mBAAe,CAAC;AACtC,IAAA,IAAI,EAAE,iBAAiB;AACvB,IAAA,KAAK,EAAE;AACL,QAAA,aAAa,EAAE,OAAO;AACtB,QAAA,WAAW,EAAE;AACX,YAAA,IAAI,EAAE,KAA2B;AACjC,YAAA,OAAO,EAAE,MAAM,EAAE;AACjB,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,KAAsC;AAC5C,YAAA,OAAO,EAAE,MAAM,EAAE;AACjB,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACD,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,KAAyB;AAC/B,YAAA,OAAO,EAAE,MAAM,EAAE;AAClB,SAAA;AACD,QAAA,0BAA0B,EAAE;AAC1B,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,OAAO,EAAE,CAAC;AACX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ts"],"sourcesContent":[null],"names":["defineComponent","getColumns","h","CTableBody","CTableRow","getClickedColumnName","CTableDataCell","CFormCheck","isObjectInArray","ITEM_INTERNAL_KEYS","getColumnName","getTableDataCellProps","getTableDataCellStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBM,MAAA,eAAe,GAAGA,mBAAe,CAAC;AACtC,IAAA,IAAI,EAAE,iBAAiB;AACvB,IAAA,KAAK,EAAE;AACL,QAAA,aAAa,EAAE,OAAO;AACtB,QAAA,WAAW,EAAE;AACX,YAAA,IAAI,EAAE,KAA2B;AACjC,YAAA,OAAO,EAAE,MAAM,EAAE;AACjB,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,KAAsC;AAC5C,YAAA,OAAO,EAAE,MAAM,EAAE;AACjB,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACD,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,KAAyB;AAC/B,YAAA,OAAO,EAAE,MAAM,EAAE;AAClB,SAAA;AACD,QAAA,0BAA0B,EAAE;AAC1B,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,OAAO,EAAE,CAAC;AACX,SAAA;AACD,QAAA,YAAY,EAAE,MAAM;AACpB,QAAA,WAAW,EAAE,MAAM;AACnB,QAAA,UAAU,EAAE,OAAO;AACnB,QAAA,QAAQ,EAAE,KAAyB;AACpC,KAAA;AACD,IAAA,KAAK,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACjC,IAAA,KAAK,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,EAAA;QACnB,MAAM,OAAO,GAAW,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAA;QAC1F,MAAM,OAAO,GAAGC,gBAAU,CAAC,KAAK,CAAC,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AO,EAAE,MACPF,KAAC,CACCI,6BAAc,EACd;gCACE,OAAO,EAAE,KAAK,CAAC,UAAU;AACvB,sCAAE,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;AAC9B,sCAAE,KAAK,CAAC,WAAW,CAAC,MAAM;AAC5B,gCAAA,KAAK,EAAE,KAAK;AACZ,gCAAA,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;6BACrB,EACD;AACE,gCAAA,OAAO,EAAE,MACP,KAAK,CAAC,WAAW;AACjB,oCAAA,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC;AAC5B,oCAAAJ,KAAC,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;AAC9B,wCAAA,IAAI,EAAE,IAAI;qCACX,CAAC;6BACL,CACF;yBACJ,CACF;AACF,qBAAA;iBACJ,CAAC;AACJ,kBAAEA,KAAC,CACCE,mBAAS,EACT,EAAE,EACF;AACE,oBAAA,OAAO,EAAE,MACPF,KAAC,CACCI,6BAAc,EACd,EAAE,OAAO,EAAE,OAAO,EAAE,EACpB;AACE,wBAAA,OAAO,EAAE,MAAM,KAAK,CAAC,YAAY;qBAClC,CACF;iBACJ,CACF;AACR,SAAA,CACF,CAAA;KACJ;AACF,CAAA;;;;"}
package/dist/cjs/index.js CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index$M = require('./components/index.js');
6
- var index$N = require('./directives/index.js');
5
+ var index$N = require('./components/index.js');
6
+ var index$O = require('./directives/index.js');
7
7
  var useColorModes = require('./composables/useColorModes.js');
8
8
  var useDebouncedCallback = require('./composables/useDebouncedCallback.js');
9
9
  var useIsVisible = require('./composables/useIsVisible.js');
@@ -146,20 +146,22 @@ var CProgressBar = require('./components/progress/CProgressBar.js');
146
146
  var CProgressStacked = require('./components/progress/CProgressStacked.js');
147
147
  var index$A = require('./components/popover/index.js');
148
148
  var CPopover = require('./components/popover/CPopover.js');
149
- var index$B = require('./components/sidebar/index.js');
149
+ var CRating = require('./components/rating/CRating.js');
150
+ var index$B = require('./components/rating/index.js');
151
+ var index$C = require('./components/sidebar/index.js');
150
152
  var CSidebar = require('./components/sidebar/CSidebar.js');
151
153
  var CSidebarBrand = require('./components/sidebar/CSidebarBrand.js');
152
154
  var CSidebarFooter = require('./components/sidebar/CSidebarFooter.js');
153
155
  var CSidebarHeader = require('./components/sidebar/CSidebarHeader.js');
154
156
  var CSidebarNav = require('./components/sidebar/CSidebarNav.js');
155
157
  var CSidebarToggler = require('./components/sidebar/CSidebarToggler.js');
156
- var index$C = require('./components/smart-pagination/index.js');
158
+ var index$D = require('./components/smart-pagination/index.js');
157
159
  var CSmartPagination = require('./components/smart-pagination/CSmartPagination.js');
158
- var index$D = require('./components/smart-table/index.js');
160
+ var index$E = require('./components/smart-table/index.js');
159
161
  var CSmartTable = require('./components/smart-table/CSmartTable.js');
160
- var index$E = require('./components/spinner/index.js');
162
+ var index$F = require('./components/spinner/index.js');
161
163
  var CSpinner = require('./components/spinner/CSpinner.js');
162
- var index$F = require('./components/table/index.js');
164
+ var index$G = require('./components/table/index.js');
163
165
  var CTable = require('./components/table/CTable.js');
164
166
  var CTableBody = require('./components/table/CTableBody.js');
165
167
  var CTableCaption = require('./components/table/CTableCaption.js');
@@ -168,22 +170,22 @@ var CTableFoot = require('./components/table/CTableFoot.js');
168
170
  var CTableHead = require('./components/table/CTableHead.js');
169
171
  var CTableHeaderCell = require('./components/table/CTableHeaderCell.js');
170
172
  var CTableRow = require('./components/table/CTableRow.js');
171
- var index$G = require('./components/tabs/index.js');
173
+ var index$H = require('./components/tabs/index.js');
172
174
  var CTabContent = require('./components/tabs/CTabContent.js');
173
175
  var CTabPane = require('./components/tabs/CTabPane.js');
174
176
  var CTimePicker = require('./components/time-picker/CTimePicker.js');
175
- var index$H = require('./components/time-picker/index.js');
176
- var index$I = require('./components/toast/index.js');
177
+ var index$I = require('./components/time-picker/index.js');
178
+ var index$J = require('./components/toast/index.js');
177
179
  var CToast = require('./components/toast/CToast.js');
178
180
  var CToastBody = require('./components/toast/CToastBody.js');
179
181
  var CToastClose = require('./components/toast/CToastClose.js');
180
182
  var CToaster = require('./components/toast/CToaster.js');
181
183
  var CToastHeader = require('./components/toast/CToastHeader.js');
182
- var index$J = require('./components/tooltip/index.js');
184
+ var index$K = require('./components/tooltip/index.js');
183
185
  var CTooltip = require('./components/tooltip/CTooltip.js');
184
186
  var CVirtualScroller = require('./components/virtual-scroller/CVirtualScroller.js');
185
- var index$K = require('./components/virtual-scroller/index.js');
186
- var index$L = require('./components/widgets/index.js');
187
+ var index$L = require('./components/virtual-scroller/index.js');
188
+ var index$M = require('./components/widgets/index.js');
187
189
  var CWidgetStatsA = require('./components/widgets/CWidgetStatsA.js');
188
190
  var CWidgetStatsB = require('./components/widgets/CWidgetStatsB.js');
189
191
  var CWidgetStatsC = require('./components/widgets/CWidgetStatsC.js');
@@ -196,11 +198,11 @@ var vCTooltip = require('./directives/v-c-tooltip.js');
196
198
 
197
199
  const CoreuiVue = {
198
200
  install: (app) => {
199
- for (const key in index$M) {
200
- app.component(key, index$M[key]);
201
- }
202
201
  for (const key in index$N) {
203
- app.directive(index$N[key]['name'], index$N[key]);
202
+ app.component(key, index$N[key]);
203
+ }
204
+ for (const key in index$O) {
205
+ app.directive(index$O[key]['name'], index$O[key]);
204
206
  }
205
207
  },
206
208
  };
@@ -347,20 +349,22 @@ exports.CProgressBar = CProgressBar.CProgressBar;
347
349
  exports.CProgressStacked = CProgressStacked.CProgressStacked;
348
350
  exports.CPopoverPlugin = index$A.CPopoverPlugin;
349
351
  exports.CPopover = CPopover.CPopover;
350
- exports.CSidebarPlugin = index$B.CSidebarPlugin;
352
+ exports.CRating = CRating.CRating;
353
+ exports.CRatingPlugin = index$B.CRatingPlugin;
354
+ exports.CSidebarPlugin = index$C.CSidebarPlugin;
351
355
  exports.CSidebar = CSidebar.CSidebar;
352
356
  exports.CSidebarBrand = CSidebarBrand.CSidebarBrand;
353
357
  exports.CSidebarFooter = CSidebarFooter.CSidebarFooter;
354
358
  exports.CSidebarHeader = CSidebarHeader.CSidebarHeader;
355
359
  exports.CSidebarNav = CSidebarNav.CSidebarNav;
356
360
  exports.CSidebarToggler = CSidebarToggler.CSidebarToggler;
357
- exports.CSmartPaginationPlugin = index$C.CSmartPaginationPlugin;
361
+ exports.CSmartPaginationPlugin = index$D.CSmartPaginationPlugin;
358
362
  exports.CSmartPagination = CSmartPagination.CSmartPagination;
359
- exports.CSmartTablePlugin = index$D.CSmartTablePlugin;
363
+ exports.CSmartTablePlugin = index$E.CSmartTablePlugin;
360
364
  exports.CSmartTable = CSmartTable.CSmartTable;
361
- exports.CSpinnerPlugin = index$E.CSpinnerPlugin;
365
+ exports.CSpinnerPlugin = index$F.CSpinnerPlugin;
362
366
  exports.CSpinner = CSpinner.CSpinner;
363
- exports.CTablePlugin = index$F.CTablePlugin;
367
+ exports.CTablePlugin = index$G.CTablePlugin;
364
368
  exports.CTable = CTable.CTable;
365
369
  exports.CTableBody = CTableBody.CTableBody;
366
370
  exports.CTableCaption = CTableCaption.CTableCaption;
@@ -369,22 +373,22 @@ exports.CTableFoot = CTableFoot.CTableFoot;
369
373
  exports.CTableHead = CTableHead.CTableHead;
370
374
  exports.CTableHeaderCell = CTableHeaderCell.CTableHeaderCell;
371
375
  exports.CTableRow = CTableRow.CTableRow;
372
- exports.CTabsPlugin = index$G.CTabsPlugin;
376
+ exports.CTabsPlugin = index$H.CTabsPlugin;
373
377
  exports.CTabContent = CTabContent.CTabContent;
374
378
  exports.CTabPane = CTabPane.CTabPane;
375
379
  exports.CTimePicker = CTimePicker.CTimePicker;
376
- exports.CTimePickerPlugin = index$H.CTimePickerPlugin;
377
- exports.CToastPlugin = index$I.CToastPlugin;
380
+ exports.CTimePickerPlugin = index$I.CTimePickerPlugin;
381
+ exports.CToastPlugin = index$J.CToastPlugin;
378
382
  exports.CToast = CToast.CToast;
379
383
  exports.CToastBody = CToastBody.CToastBody;
380
384
  exports.CToastClose = CToastClose.CToastClose;
381
385
  exports.CToaster = CToaster.CToaster;
382
386
  exports.CToastHeader = CToastHeader.CToastHeader;
383
- exports.CTooltipPlugin = index$J.CTooltipPlugin;
387
+ exports.CTooltipPlugin = index$K.CTooltipPlugin;
384
388
  exports.CTooltip = CTooltip.CTooltip;
385
389
  exports.CVirtualScroller = CVirtualScroller.CVirtualScroller;
386
- exports.CVirtualScrollerPlugin = index$K.CVirtualScrollerPlugin;
387
- exports.CWidgetsStatsPlugin = index$L.CWidgetsStatsPlugin;
390
+ exports.CVirtualScrollerPlugin = index$L.CVirtualScrollerPlugin;
391
+ exports.CWidgetsStatsPlugin = index$M.CWidgetsStatsPlugin;
388
392
  exports.CWidgetStatsA = CWidgetStatsA.CWidgetStatsA;
389
393
  exports.CWidgetStatsB = CWidgetStatsB.CWidgetStatsB;
390
394
  exports.CWidgetStatsC = CWidgetStatsC.CWidgetStatsC;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":[null],"names":["Components","Directives"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,SAAS,GAAG;AAChB,IAAA,OAAO,EAAE,CAAC,GAAQ,KAAU;AAC1B,QAAA,KAAK,MAAM,GAAG,IAAIA,OAAU,EAAE;YAC5B,GAAG,CAAC,SAAS,CAAC,GAAG,EAAGA,OAAqC,CAAC,GAAG,CAAC,CAAC,CAAA;SAChE;AAED,QAAA,KAAK,MAAM,GAAG,IAAIC,OAAU,EAAE;AAC5B,YAAA,GAAG,CAAC,SAAS,CACVA,OAAqC,CAAC,GAAG,CAAC,CAAC,MAA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;;"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var isPlainObject = require('../../is-plain-object/dist/is-plain-object.js');
6
6
 
7
- function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},t.apply(this,arguments)}function n(e,t){if(null==e)return {};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}const r={silent:!1,logLevel:"warn"},i=["validator"],o=Object.prototype,a=o.toString,s=o.hasOwnProperty,u=/^\s*function (\w+)/;function l(e){var t;const n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){const e=n.toString().match(u);return e?e[1]:""}return ""}const c=isPlainObject.isPlainObject,f=e=>e;let d=f;if("production"!==process.env.NODE_ENV){const e="undefined"!=typeof console;d=e?function(e,t=r.logLevel){!1===r.silent&&console[t](`[VueTypes warn]: ${e}`);}:f;}const p=(e,t)=>s.call(e,t),y=Number.isInteger||function(e){return "number"==typeof e&&isFinite(e)&&Math.floor(e)===e},v=Array.isArray||function(e){return "[object Array]"===a.call(e)},h=e=>"[object Function]"===a.call(e),b=(e,t)=>c(e)&&p(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t),g=e=>c(e)&&(p(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>p(e,t)));function O(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function m(e,t,n=!1){let r,i=!0,o="";r=c(e)?e:{type:e};const a=b(r)?r._vueTypes_name+" - ":"";if(g(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return i;if(!r.required&&null==t)return i;v(r.type)?(i=r.type.some(e=>!0===m(e,t,!0)),o=r.type.map(e=>l(e)).join(" or ")):(o=l(r),i="Array"===o?v(t):"Object"===o?c(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return "";const t=e.constructor.toString().match(u);return t?t[1].replace(/^Async/,""):""}(t)===o:t instanceof r.type);}if(!i){const e=`${a}value "${t}" should be of type "${o}"`;return !1===n?(d(e),!1):e}if(p(r,"validator")&&h(r.validator)){const e=d,o=[];if(d=e=>{o.push(e);},i=r.validator(t),d=e,!i){const e=(o.length>1?"* ":"")+o.join("\n* ");return o.length=0,!1===n?(d(e),i):e}}return i}function j(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(p(this,"default")&&delete this.default,this):h(e)||!0===m(this,e,!0)?(this.default=v(e)?()=>[...e]:c(e)?()=>Object.assign({},e):e,this):(d(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:r}=n;return h(r)&&(n.validator=O(r,n)),n}function _(e,t){const n=j(e,t);return Object.defineProperty(n,"validate",{value(e){return h(this.validator)&&d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=O(e,this),this}})}function T(e,t,r){const o=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=Object.getOwnPropertyDescriptor(e,n);}),Object.defineProperties({},t)}(t);if(o._vueTypes_name=e,!c(r))return o;const{validator:a}=r,s=n(r,i);if(h(a)){let{validator:e}=o;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),o.validator=O(e?function(t){return e.call(this,t)&&a.call(this,t)}:a,o);}var u,l;return Object.assign(o,s)}function $(e){return e.replace(/^(?!\s*$)/gm," ")}const w=()=>_("any",{}),x=()=>_("function",{type:Function}),P=()=>_("boolean",{type:Boolean}),A=()=>_("string",{type:String}),E=()=>_("number",{type:Number}),S=()=>_("array",{type:Array}),N=()=>_("object",{type:Object}),V=()=>j("integer",{type:Number,validator(e){const t=y(e);return !1===t&&d(`integer - "${e}" is not an integer`),t}}),q=()=>j("symbol",{validator(e){const t="symbol"==typeof e;return !1===t&&d(`symbol - invalid value "${e}"`),t}}),k=()=>Object.defineProperty({type:null,validator(e){const t=null===e;return !1===t&&d("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"});function D(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return j(e.name||"<<anonymous function>>",{type:null,validator(n){const r=e(n);return r||d(`${this._vueTypes_name} - ${t}`),r}})}function L(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.map(e=>"symbol"==typeof e?e.toString():e).join('", "')}".`,n={validator(n){const r=-1!==e.indexOf(n);return r||d(t),r}};if(-1===e.indexOf(null)){const t=e.reduce((e,t)=>{if(null!=t){const n=t.constructor;-1===e.indexOf(n)&&e.push(n);}return e},[]);t.length>0&&(n.type=t);}return j("oneOf",n)}function B(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=!1,r=[];for(let i=0;i<e.length;i+=1){const o=e[i];if(g(o)){if(h(o.validator)&&(t=!0),b(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(b(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){d('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type);}else r.push(o);}r=r.filter((e,t)=>r.indexOf(e)===t);const i=!1===n&&r.length>0?r:null;return j("oneOfType",t?{type:i,validator(t){const n=[],r=e.some(e=>{const r=m(e,t,!0);return "string"==typeof r&&n.push(r),!0===r});return r||d(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${$(n.join("\n"))}`),r}}:{type:i})}function F(e){return j("arrayOf",{type:Array,validator(t){let n="";const r=t.every(t=>(n=m(e,t,!0),!0===n));return r||d(`arrayOf - value validation error:\n${$(n)}`),r}})}function Y(e){return j("instanceOf",{type:e})}function I(e){return j("objectOf",{type:Object,validator(t){let n="";const r=Object.keys(t).every(r=>(n=m(e,t[r],!0),!0===n));return r||d(`objectOf - value validation error:\n${$(n)}`),r}})}function J(e){const t=Object.keys(e),n=t.filter(t=>{var n;return !(null===(n=e[t])||void 0===n||!n.required)}),r=j("shape",{type:Object,validator(r){if(!c(r))return !1;const i=Object.keys(r);if(n.length>0&&n.some(e=>-1===i.indexOf(e))){const e=n.filter(e=>-1===i.indexOf(e));return d(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return i.every(n=>{if(-1===t.indexOf(n))return !0===this._vueTypes_isLoose||(d(`shape - shape definition does not include a "${n}" property. Allowed keys: "${t.join('", "')}".`),!1);const i=m(e[n],r[n],!0);return "string"==typeof i&&d(`shape - "${n}" property validation error:\n ${$(i)}`),!0===i})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const M=["name","validate","getter"],R=/*#__PURE__*/(()=>{var e;return (e=class{static get any(){return w()}static get func(){return x().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?P():P().def(this.defaults.bool)}static get string(){return A().def(this.defaults.string)}static get number(){return E().def(this.defaults.number)}static get array(){return S().def(this.defaults.array)}static get object(){return N().def(this.defaults.object)}static get integer(){return V().def(this.defaults.integer)}static get symbol(){return q()}static get nullable(){return k()}static extend(e){if(d("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),v(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:r=!1,getter:i=!1}=e,o=n(e,M);if(p(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:a}=o;if(b(a))return delete o.type,Object.defineProperty(this,t,i?{get:()=>T(t,a,o)}:{value(...e){const n=T(t,a,o);return n.validator&&(n.validator=n.validator.bind(n,...e)),n}});let s;return s=i?{get(){const e=Object.assign({},o);return r?_(t,e):j(t,e)},enumerable:!0}:{value(...e){const n=Object.assign({},o);let i;return i=r?_(t,n):j(t,n),n.validator&&(i.validator=n.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,s)}}).defaults={},e.sensibleDefaults=void 0,e.config=r,e.custom=D,e.oneOf=L,e.instanceOf=Y,e.oneOfType=B,e.arrayOf=F,e.objectOf=I,e.shape=J,e.utils={validate:(e,t)=>!0===m(t,e,!0),toType:(e,t,n=!1)=>n?_(e,t):j(e,t)},e})();function U(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var n;return (n=class extends R{static get sensibleDefaults(){return t({},this.defaults)}static set sensibleDefaults(n){this.defaults=!1!==n?t({},!0!==n?n:e):{};}}).defaults=t({},e),n}class z extends(U()){}
7
+ function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},t.apply(this,arguments)}function n(e,t){if(null==e)return {};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r];}return n}const r={silent:!1,logLevel:"warn"},i=["validator"],o=Object.prototype,a=o.toString,s=o.hasOwnProperty,u=/^\s*function (\w+)/;function l(e){var t;const n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){const e=n.toString().match(u);return e?e[1]:""}return ""}const c=isPlainObject.isPlainObject,f=e=>e;let d=f;if("production"!==process.env.NODE_ENV){const e="undefined"!=typeof console;d=e?function(e,t=r.logLevel){!1===r.silent&&console[t](`[VueTypes warn]: ${e}`);}:f;}const p=(e,t)=>s.call(e,t),y=Number.isInteger||function(e){return "number"==typeof e&&isFinite(e)&&Math.floor(e)===e},v=Array.isArray||function(e){return "[object Array]"===a.call(e)},h=e=>"[object Function]"===a.call(e),b=(e,t)=>c(e)&&p(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t),g=e=>c(e)&&(p(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>p(e,t)));function O(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function m(e,t,n=!1){let r,i=!0,o="";r=c(e)?e:{type:e};const a=b(r)?r._vueTypes_name+" - ":"";if(g(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return i;if(!r.required&&null==t)return i;v(r.type)?(i=r.type.some(e=>!0===m(e,t,!0)),o=r.type.map(e=>l(e)).join(" or ")):(o=l(r),i="Array"===o?v(t):"Object"===o?c(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return "";const t=e.constructor.toString().match(u);return t?t[1].replace(/^Async/,""):""}(t)===o:t instanceof r.type);}if(!i){const e=`${a}value "${t}" should be of type "${o}"`;return !1===n?(d(e),!1):e}if(p(r,"validator")&&h(r.validator)){const e=d,o=[];if(d=e=>{o.push(e);},i=r.validator(t),d=e,!i){const e=(o.length>1?"* ":"")+o.join("\n* ");return o.length=0,!1===n?(d(e),i):e}}return i}function j(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(p(this,"default")&&delete this.default,this):h(e)||!0===m(this,e,!0)?(this.default=v(e)?()=>[...e]:c(e)?()=>Object.assign({},e):e,this):(d(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:r}=n;return h(r)&&(n.validator=O(r,n)),n}function _(e,t){const n=j(e,t);return Object.defineProperty(n,"validate",{value(e){return h(this.validator)&&d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=O(e,this),this}})}function T(e,t,r){const o=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=Object.getOwnPropertyDescriptor(e,n);}),Object.defineProperties({},t)}(t);if(o._vueTypes_name=e,!c(r))return o;const{validator:a}=r,s=n(r,i);if(h(a)){let{validator:e}=o;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),o.validator=O(e?function(t){return e.call(this,t)&&a.call(this,t)}:a,o);}var u,l;return Object.assign(o,s)}function $(e){return e.replace(/^(?!\s*$)/gm," ")}const w=()=>_("any",{}),x=()=>_("function",{type:Function}),P=()=>_("boolean",{type:Boolean}),A=()=>_("string",{type:String}),E=()=>_("number",{type:Number}),S=()=>_("array",{type:Array}),N=()=>_("object",{type:Object}),V=()=>j("integer",{type:Number,validator(e){const t=y(e);return !1===t&&d(`integer - "${e}" is not an integer`),t}}),q=()=>j("symbol",{validator(e){const t="symbol"==typeof e;return !1===t&&d(`symbol - invalid value "${e}"`),t}}),k=()=>Object.defineProperty({type:null,validator(e){const t=null===e;return !1===t&&d("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"});function D(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return j(e.name||"<<anonymous function>>",{type:null,validator(n){const r=e(n);return r||d(`${this._vueTypes_name} - ${t}`),r}})}function L(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.map(e=>"symbol"==typeof e?e.toString():e).join('", "')}".`,n={validator(n){const r=-1!==e.indexOf(n);return r||d(t),r}};if(-1===e.indexOf(null)){const t=e.reduce((e,t)=>{if(null!=t){const n=t.constructor;-1===e.indexOf(n)&&e.push(n);}return e},[]);t.length>0&&(n.type=t);}return j("oneOf",n)}function B(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=!1,r=[];for(let i=0;i<e.length;i+=1){const o=e[i];if(g(o)){if(h(o.validator)&&(t=!0),b(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(b(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){d('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type);}else r.push(o);}r=r.filter((e,t)=>r.indexOf(e)===t);const i=!1===n&&r.length>0?r:null;return j("oneOfType",t?{type:i,validator(t){const n=[],r=e.some(e=>{const r=m(e,t,!0);return "string"==typeof r&&n.push(r),!0===r});return r||d(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${$(n.join("\n"))}`),r}}:{type:i})}function F(e){return j("arrayOf",{type:Array,validator(t){let n="";const r=t.every(t=>(n=m(e,t,!0),!0===n));return r||d(`arrayOf - value validation error:\n${$(n)}`),r}})}function Y(e){return j("instanceOf",{type:e})}function I(e){return j("objectOf",{type:Object,validator(t){let n="";const r=Object.keys(t).every(r=>(n=m(e,t[r],!0),!0===n));return r||d(`objectOf - value validation error:\n${$(n)}`),r}})}function J(e){const t=Object.keys(e),n=t.filter(t=>{var n;return !(null===(n=e[t])||void 0===n||!n.required)}),r=j("shape",{type:Object,validator(r){if(!c(r))return !1;const i=Object.keys(r);if(n.length>0&&n.some(e=>-1===i.indexOf(e))){const e=n.filter(e=>-1===i.indexOf(e));return d(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return i.every(n=>{if(-1===t.indexOf(n))return !0===this._vueTypes_isLoose||(d(`shape - shape definition does not include a "${n}" property. Allowed keys: "${t.join('", "')}".`),!1);const i=m(e[n],r[n],!0);return "string"==typeof i&&d(`shape - "${n}" property validation error:\n ${$(i)}`),!0===i})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const M=["name","validate","getter"],R=/*#__PURE__*/(e=>((e=class{static get any(){return w()}static get func(){return x().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?P():P().def(this.defaults.bool)}static get string(){return A().def(this.defaults.string)}static get number(){return E().def(this.defaults.number)}static get array(){return S().def(this.defaults.array)}static get object(){return N().def(this.defaults.object)}static get integer(){return V().def(this.defaults.integer)}static get symbol(){return q()}static get nullable(){return k()}static extend(e){if(d("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),v(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:r=!1,getter:i=!1}=e,o=n(e,M);if(p(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:a}=o;if(b(a))return delete o.type,Object.defineProperty(this,t,i?{get:()=>T(t,a,o)}:{value(...e){const n=T(t,a,o);return n.validator&&(n.validator=n.validator.bind(n,...e)),n}});let s;return s=i?{get(){const e=Object.assign({},o);return r?_(t,e):j(t,e)},enumerable:!0}:{value(...e){const n=Object.assign({},o);let i;return i=r?_(t,n):j(t,n),n.validator&&(i.validator=n.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,s)}}).defaults={},e.sensibleDefaults=void 0,e.config=r,e.custom=D,e.oneOf=L,e.instanceOf=Y,e.oneOfType=B,e.arrayOf=F,e.objectOf=I,e.shape=J,e.utils={validate:(e,t)=>!0===m(t,e,!0),toType:(e,t,n=!1)=>n?_(e,t):j(e,t)},e))();function U(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var n;return (n=class extends R{static get sensibleDefaults(){return t({},this.defaults)}static set sensibleDefaults(n){this.defaults=!1!==n?t({},!0!==n?n:e):{};}}).defaults=t({},e),n}class z extends(U()){}
8
8
 
9
9
  exports.any = w;
10
10
  exports.array = S;