quasar-ui-danx 0.2.16 → 0.2.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/package.json +1 -1
  2. package/src/components/ActionTable/ActionMenu.vue +4 -4
  3. package/src/components/ActionTable/ActionTable.vue +12 -12
  4. package/src/components/ActionTable/ActionTableColumn.vue +11 -11
  5. package/src/components/ActionTable/Columns/ColumnListItem.vue +2 -2
  6. package/src/components/ActionTable/Columns/ColumnSettingsDialog.vue +8 -8
  7. package/src/components/ActionTable/Columns/TitleColumnFormat.vue +1 -1
  8. package/src/components/ActionTable/Columns/VisibleColumnsToggleButtons.vue +7 -7
  9. package/src/components/ActionTable/EmptyTableState.vue +4 -4
  10. package/src/components/ActionTable/Filters/CollapsableFiltersSidebar.vue +3 -3
  11. package/src/components/ActionTable/Filters/FilterFieldList.vue +6 -6
  12. package/src/components/ActionTable/Filters/FilterListToggle.vue +3 -3
  13. package/src/components/ActionTable/Filters/FilterToolbarLayout.vue +3 -3
  14. package/src/components/ActionTable/Filters/FilterableField.vue +6 -6
  15. package/src/components/ActionTable/Form/Fields/BooleanField.vue +4 -4
  16. package/src/components/ActionTable/Form/Fields/ConfirmPasswordField.vue +7 -7
  17. package/src/components/ActionTable/Form/Fields/DateField.vue +6 -6
  18. package/src/components/ActionTable/Form/Fields/DateRangeField.vue +13 -13
  19. package/src/components/ActionTable/Form/Fields/DateTimeField.vue +6 -6
  20. package/src/components/ActionTable/Form/Fields/DateTimePicker.vue +6 -6
  21. package/src/components/ActionTable/Form/Fields/EditableDiv.vue +3 -3
  22. package/src/components/ActionTable/Form/Fields/FieldLabel.vue +2 -2
  23. package/src/components/ActionTable/Form/Fields/FileUploadButton.vue +15 -15
  24. package/src/components/ActionTable/Form/Fields/InlineDateTimeField.vue +7 -7
  25. package/src/components/ActionTable/Form/Fields/IntegerField.vue +2 -2
  26. package/src/components/ActionTable/Form/Fields/LabeledInput.vue +2 -2
  27. package/src/components/ActionTable/Form/Fields/MultiFileField.vue +6 -6
  28. package/src/components/ActionTable/Form/Fields/MultiKeywordField.vue +8 -8
  29. package/src/components/ActionTable/Form/Fields/NewPasswordField.vue +6 -6
  30. package/src/components/ActionTable/Form/Fields/NumberField.vue +20 -20
  31. package/src/components/ActionTable/Form/Fields/NumberRangeField.vue +20 -20
  32. package/src/components/ActionTable/Form/Fields/SelectDrawer.vue +8 -8
  33. package/src/components/ActionTable/Form/Fields/SelectField.vue +36 -36
  34. package/src/components/ActionTable/Form/Fields/SelectWithChildrenField.vue +9 -9
  35. package/src/components/ActionTable/Form/Fields/SingleFileField.vue +6 -6
  36. package/src/components/ActionTable/Form/Fields/TextField.vue +15 -15
  37. package/src/components/ActionTable/Form/Fields/WysiwygField.vue +4 -4
  38. package/src/components/ActionTable/Form/RenderedForm.vue +5 -5
  39. package/src/components/ActionTable/TableSummaryRow.vue +8 -8
  40. package/src/components/ActionTable/listControls.ts +5 -5
  41. package/src/components/ActionTable/listHelpers.ts +1 -1
  42. package/src/components/ActionTable/tableColumns.ts +24 -1
  43. package/src/components/AuditHistory/AuditHistoryItem.vue +4 -4
  44. package/src/components/AuditHistory/AuditHistoryItemValue.vue +10 -10
  45. package/src/components/DragAndDrop/HandleDraggable.vue +8 -8
  46. package/src/components/DragAndDrop/ListItemDraggable.vue +8 -8
  47. package/src/components/DragAndDrop/dragAndDrop.ts +219 -219
  48. package/src/components/DragAndDrop/listDragAndDrop.ts +4 -4
  49. package/src/components/PanelsDrawer/PanelsDrawer.vue +7 -7
  50. package/src/components/PanelsDrawer/PanelsDrawerPanels.vue +1 -1
  51. package/src/components/PanelsDrawer/PanelsDrawerTabs.vue +4 -4
  52. package/src/components/Utility/Buttons/ExportButton.vue +4 -4
  53. package/src/components/Utility/Buttons/RefreshButton.vue +2 -2
  54. package/src/components/Utility/Controls/PreviousNextControls.vue +2 -2
  55. package/src/components/Utility/Dialogs/ConfirmDialog.vue +14 -14
  56. package/src/components/Utility/Dialogs/FullScreenDialog.vue +8 -8
  57. package/src/components/Utility/Dialogs/FullscreenCarouselDialog.vue +11 -11
  58. package/src/components/Utility/Dialogs/InfoDialog.vue +12 -12
  59. package/src/components/Utility/Dialogs/InputDialog.vue +5 -5
  60. package/src/components/Utility/Files/FilePreview.vue +10 -10
  61. package/src/components/Utility/Formats/GpsCoordinatesFormat.vue +4 -4
  62. package/src/components/Utility/Formats/IconWithTextFormat.vue +2 -2
  63. package/src/components/Utility/Formats/LabelValueFormat.vue +2 -2
  64. package/src/components/Utility/Layouts/CollapsableSidebar.vue +15 -15
  65. package/src/components/Utility/Layouts/ContentDrawer.vue +6 -6
  66. package/src/components/Utility/Popovers/InteractiveTooltip.vue +4 -4
  67. package/src/components/Utility/Popovers/PopoverMenu.vue +49 -49
  68. package/src/components/Utility/Tabs/BadgeTab.vue +1 -1
  69. package/src/components/Utility/Tabs/IndicatorTab.vue +3 -3
  70. package/src/components/Utility/Tools/ActionVnode.vue +3 -3
  71. package/src/components/Utility/Tools/RenderComponent.vue +3 -3
  72. package/src/components/Utility/Transitions/StaggeredListTransition.vue +3 -3
  73. package/src/helpers/array.ts +16 -16
  74. package/src/helpers/storage.ts +5 -5
  75. package/src/helpers/utils.ts +1 -1
  76. package/src/index.common.js +1 -2
  77. package/src/index.esm.js +1 -1
  78. package/src/index.umd.js +2 -2
  79. package/src/svg/CaretDownIcon.svg +1 -1
  80. package/src/svg/DragHandleDotsIcon.svg +3 -3
  81. package/src/svg/DragHandleIcon.svg +3 -3
  82. package/src/svg/FilterIcon.svg +5 -5
  83. package/src/svg/ImageIcon.svg +27 -27
  84. package/src/svg/PdfIcon.svg +5 -5
  85. package/src/svg/SkipNextIcon.svg +3 -3
  86. package/src/svg/SkipPreviousIcon.svg +3 -3
  87. package/src/svg/TrashIcon.svg +12 -12
  88. package/src/svg/WarningIcon.svg +3 -3
  89. package/src/svg/XIcon.svg +15 -15
  90. package/src/vue-plugin.js +5 -5
@@ -23,16 +23,16 @@
23
23
  >
24
24
  <div>{{ child.label }}</div>
25
25
  <div class="text-xs text-gray-silver">{{ child.name }}</div>
26
- </QCheckbox>
26
+ </QCheckbox>
27
27
  </div>
28
28
  </div>
29
29
  </template>
30
30
  <script setup>
31
- import { ref, watch } from 'vue';
32
- import { remove } from '../../../../helpers';
33
- import SelectField from './SelectField';
31
+ import { ref, watch } from "vue";
32
+ import { remove } from "../../../../helpers";
33
+ import SelectField from "./SelectField";
34
34
 
35
- const emit = defineEmits(['update:model-value']);
35
+ const emit = defineEmits(["update:model-value"]);
36
36
  const props = defineProps({
37
37
  modelValue: {
38
38
  type: Array,
@@ -40,11 +40,11 @@ const props = defineProps({
40
40
  },
41
41
  label: {
42
42
  type: String,
43
- default: 'Selection'
43
+ default: "Selection"
44
44
  },
45
45
  placeholder: {
46
46
  type: String,
47
- default: 'Select an option'
47
+ default: "Select an option"
48
48
  },
49
49
  options: {
50
50
  type: Array,
@@ -68,11 +68,11 @@ function onSelectChild(child) {
68
68
  } else {
69
69
  selectedChildren.value.push(child.id);
70
70
  }
71
- emit('update:model-value', selectedChildren.value.length > 0 ? selectedChildren.value : undefined);
71
+ emit("update:model-value", selectedChildren.value.length > 0 ? selectedChildren.value : undefined);
72
72
  }
73
73
  function onSelectOption() {
74
74
  selectedChildren.value = [];
75
- emit('update:model-value', undefined);
75
+ emit("update:model-value", undefined);
76
76
  }
77
77
  watch(() => props.modelValue, (value) => {
78
78
  selectedOption.value = resolveSelectedOption();
@@ -48,12 +48,12 @@
48
48
  </template>
49
49
 
50
50
  <script setup>
51
- import { onMounted } from 'vue';
52
- import { useSingleFileUpload } from '../../../../helpers';
53
- import { FilePreview } from '../../../Utility';
54
- import FieldLabel from './FieldLabel';
51
+ import { onMounted } from "vue";
52
+ import { useSingleFileUpload } from "../../../../helpers";
53
+ import { FilePreview } from "../../../Utility";
54
+ import FieldLabel from "./FieldLabel";
55
55
 
56
- const emit = defineEmits(['update:model-value']);
56
+ const emit = defineEmits(["update:model-value"]);
57
57
  const props = defineProps({
58
58
  modelValue: {
59
59
  type: [Object, String],
@@ -68,7 +68,7 @@ const props = defineProps({
68
68
  readonly: Boolean
69
69
  });
70
70
  const { onComplete, onDrop, onFileSelected, uploadedFile, onClear } = useSingleFileUpload();
71
- onComplete(() => emit('update:model-value', uploadedFile.value));
71
+ onComplete(() => emit("update:model-value", uploadedFile.value));
72
72
 
73
73
  onMounted(() => {
74
74
  if (props.modelValue) {
@@ -26,25 +26,25 @@
26
26
  :class="labelClass"
27
27
  />
28
28
  </template>
29
- </QInput>
30
- <div v-if="readonly">
31
- <LabelValueBlock
32
- :label="label || field.label"
33
- :value="modelValue"
34
- />
35
- </div>
29
+ </QInput>
30
+ <div v-if="readonly">
31
+ <LabelValueBlock
32
+ :label="label || field.label"
33
+ :value="modelValue"
34
+ />
35
+ </div>
36
36
  </div>
37
37
  </template>
38
38
 
39
39
  <script setup>
40
- import FieldLabel from './FieldLabel';
41
- import LabelValueBlock from './LabelValueBlock';
40
+ import FieldLabel from "./FieldLabel";
41
+ import LabelValueBlock from "./LabelValueBlock";
42
42
 
43
- defineEmits(['update:model-value', 'submit']);
43
+ defineEmits(["update:model-value", "submit"]);
44
44
  defineProps({
45
45
  modelValue: {
46
46
  type: [String, Number],
47
- default: ''
47
+ default: ""
48
48
  },
49
49
  field: {
50
50
  type: Object,
@@ -52,7 +52,7 @@ defineProps({
52
52
  },
53
53
  type: {
54
54
  type: String,
55
- default: 'text'
55
+ default: "text"
56
56
  },
57
57
  label: {
58
58
  type: String,
@@ -60,15 +60,15 @@ defineProps({
60
60
  },
61
61
  labelClass: {
62
62
  type: String,
63
- default: 'text-sm text-gray-shadow'
63
+ default: "text-sm text-gray-shadow"
64
64
  },
65
65
  parentClass: {
66
66
  type: String,
67
- default: ''
67
+ default: ""
68
68
  },
69
69
  inputClass: {
70
70
  type: String,
71
- default: ''
71
+ default: ""
72
72
  },
73
73
  noLabel: Boolean,
74
74
  showName: Boolean,
@@ -24,11 +24,11 @@
24
24
  </template>
25
25
 
26
26
  <script setup>
27
- import { default as TinyMceEditor } from '@tinymce/tinymce-vue';
28
- import { apiKey } from '../../../../vendor/tinymce-config';
29
- import FieldLabel from './FieldLabel';
27
+ import { default as TinyMceEditor } from "@tinymce/tinymce-vue";
28
+ import { apiKey } from "../../../../vendor/tinymce-config";
29
+ import FieldLabel from "./FieldLabel";
30
30
 
31
- defineEmits(['update:model-value']);
31
+ defineEmits(["update:model-value"]);
32
32
  defineProps({
33
33
  modelValue: {
34
34
  type: [String, Number],
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  </template>
22
22
  <script setup>
23
- import { reactive } from 'vue';
23
+ import { reactive } from "vue";
24
24
  import {
25
25
  BooleanField,
26
26
  DateField,
@@ -31,9 +31,9 @@ import {
31
31
  SingleFileField,
32
32
  TextField,
33
33
  WysiwygField
34
- } from './Fields';
34
+ } from "./Fields";
35
35
 
36
- const emit = defineEmits(['update:values']);
36
+ const emit = defineEmits(["update:values"]);
37
37
  const props = defineProps({
38
38
  values: {
39
39
  type: Object,
@@ -65,12 +65,12 @@ const mappedFields = props.fields.map((field) => ({
65
65
  placeholder: `Enter ${field.label}`,
66
66
  ...field,
67
67
  component: FORM_FIELD_MAP[field.type],
68
- default: field.type === 'BOOLEAN' ? false : ''
68
+ default: field.type === "BOOLEAN" ? false : ""
69
69
  }));
70
70
 
71
71
  const fieldValues = reactive(props.values || {});
72
72
 
73
73
  function onInput(key, value) {
74
- emit('update:values', { ...fieldValues, [key]: value });
74
+ emit("update:values", { ...fieldValues, [key]: value });
75
75
  }
76
76
  </script>
@@ -41,21 +41,21 @@
41
41
  </QTr>
42
42
  </template>
43
43
  <script setup>
44
- import { XCircleIcon as ClearIcon } from '@heroicons/vue/solid';
45
- import { QSpinner, QTd, QTr } from 'quasar';
46
- import { computed } from 'vue';
47
- import { fNumber } from '../../helpers';
44
+ import { XCircleIcon as ClearIcon } from "@heroicons/vue/solid";
45
+ import { QSpinner, QTd, QTr } from "quasar";
46
+ import { computed } from "vue";
47
+ import { fNumber } from "../../helpers";
48
48
 
49
- defineEmits(['clear']);
49
+ defineEmits(["clear"]);
50
50
  const props = defineProps({
51
51
  loading: Boolean,
52
52
  label: {
53
53
  type: String,
54
- default: 'Rows'
54
+ default: "Rows"
55
55
  },
56
56
  selectedLabel: {
57
57
  type: String,
58
- default: 'Selected'
58
+ default: "Selected"
59
59
  },
60
60
  selectedCount: {
61
61
  type: Number,
@@ -86,7 +86,7 @@ const summaryColumns = computed(() => {
86
86
 
87
87
  function formatValue(column) {
88
88
  const value = props.summary[column.name];
89
- if (value === undefined) return '';
89
+ if (value === undefined) return "";
90
90
 
91
91
  if (column.format) {
92
92
  return column.format(value);
@@ -4,11 +4,11 @@ import { getFilterFromUrl } from "./listHelpers";
4
4
 
5
5
  interface ListActionsOptions {
6
6
  listRoute: Function;
7
- summaryRoute?: Function;
8
- filterFieldOptionsRoute?: Function;
9
- moreRoute?: Function;
10
- itemDetailsRoute?: Function;
11
- urlPattern?: RegExp;
7
+ summaryRoute?: Function | null;
8
+ filterFieldOptionsRoute?: Function | null;
9
+ moreRoute?: Function | null;
10
+ itemDetailsRoute?: Function | null;
11
+ urlPattern?: RegExp | null;
12
12
  filterDefaults?: Record<string, any>;
13
13
  refreshFilters?: boolean;
14
14
  }
@@ -29,7 +29,7 @@ export function mapSortBy(pagination, columns) {
29
29
 
30
30
  const column = columns.find(c => c.name === pagination.sortBy);
31
31
  if (!column) return null;
32
-
32
+
33
33
  return [
34
34
  {
35
35
  column: column.sortBy || column.name,
@@ -1,7 +1,30 @@
1
1
  import { computed, ref, watch } from "vue";
2
2
  import { getItem, setItem } from "../../helpers";
3
3
 
4
- export function useTableColumns(name, columns) {
4
+ export interface TableColumn {
5
+ actionMenu?: object,
6
+ align?: string,
7
+ category?: string,
8
+ class?: string | object,
9
+ field: string,
10
+ format?: Function,
11
+ innerClass?: string | object,
12
+ isSaving?: boolean,
13
+ label: string,
14
+ maxWidth?: number,
15
+ minWidth?: number,
16
+ name: string,
17
+ onClick?: Function,
18
+ required?: boolean,
19
+ resizeable?: boolean,
20
+ sortable?: boolean,
21
+ sortBy?: string,
22
+ sortByExpression?: string,
23
+ titleColumns?: string[]
24
+ vnode?: Function,
25
+ }
26
+
27
+ export function useTableColumns(name: string, columns: TableColumn[]) {
5
28
  const COLUMN_ORDER_KEY = `${name}-column-order`;
6
29
  const VISIBLE_COLUMNS_KEY = `${name}-visible-columns`;
7
30
  const TITLE_COLUMNS_KEY = `${name}-title-columns`;
@@ -31,9 +31,9 @@
31
31
  </div>
32
32
  </template>
33
33
  <script setup>
34
- import { computed } from 'vue';
35
- import { fLocalizedDateTime } from '../../helpers';
36
- import AuditHistoryItemValue from './AuditHistoryItemValue';
34
+ import { computed } from "vue";
35
+ import { fLocalizedDateTime } from "../../helpers";
36
+ import AuditHistoryItemValue from "./AuditHistoryItemValue";
37
37
 
38
38
  const props = defineProps({
39
39
  item: {
@@ -46,7 +46,7 @@ const props = defineProps({
46
46
  },
47
47
  novaUrl: {
48
48
  type: String,
49
- default: '/nova'
49
+ default: "/nova"
50
50
  }
51
51
  });
52
52
 
@@ -23,8 +23,8 @@
23
23
  </div>
24
24
  </template>
25
25
  <script setup>
26
- import { fCurrency, fDate, fLocalizedDateTime, fNumber } from '../../helpers';
27
- import { FilePreview } from '../Utility';
26
+ import { fCurrency, fDate, fLocalizedDateTime, fNumber } from "../../helpers";
27
+ import { FilePreview } from "../Utility";
28
28
 
29
29
  const props = defineProps({
30
30
  type: {
@@ -38,21 +38,21 @@ const props = defineProps({
38
38
  });
39
39
 
40
40
  function format(value) {
41
- if (value === null || value === '' || value === undefined) {
42
- return '';
41
+ if (value === null || value === "" || value === undefined) {
42
+ return "";
43
43
  }
44
44
 
45
45
  switch (props.type) {
46
- case 'NUMBER':
46
+ case "NUMBER":
47
47
  return fNumber(value);
48
- case 'CURRENCY':
48
+ case "CURRENCY":
49
49
  return fCurrency(value);
50
- case 'DATE':
50
+ case "DATE":
51
51
  return fDate(value);
52
- case 'DATETIME':
52
+ case "DATETIME":
53
53
  return fLocalizedDateTime(value);
54
- case 'BOOLEAN':
55
- return value ? 'Yes' : 'No';
54
+ case "BOOLEAN":
55
+ return value ? "Yes" : "No";
56
56
  }
57
57
 
58
58
  return value;
@@ -13,10 +13,10 @@
13
13
  </div>
14
14
  </template>
15
15
  <script setup>
16
- import { useDebounceFn } from '@vueuse/core';
17
- import { DragAndDrop } from './dragAndDrop';
16
+ import { useDebounceFn } from "@vueuse/core";
17
+ import { DragAndDrop } from "./dragAndDrop";
18
18
 
19
- const emit = defineEmits(['start', 'end', 'resize']);
19
+ const emit = defineEmits(["start", "end", "resize"]);
20
20
  const props = defineProps({
21
21
  initialValue: {
22
22
  type: Number,
@@ -28,8 +28,8 @@ const props = defineProps({
28
28
  },
29
29
  direction: {
30
30
  type: String,
31
- default: 'horizontal',
32
- validator: (value) => ['vertical', 'horizontal'].includes(value)
31
+ default: "horizontal",
32
+ validator: (value) => ["vertical", "horizontal"].includes(value)
33
33
  }
34
34
  });
35
35
 
@@ -41,13 +41,13 @@ const dragAndDrop = new DragAndDrop()
41
41
  hideDragImage: true
42
42
  })
43
43
  .onDragging(useDebounceFn(() => {
44
- emit('resize', {
44
+ emit("resize", {
45
45
  distance: dragAndDrop.getDistance(),
46
46
  percent: dragAndDrop.getPercentChange(),
47
47
  startDropZoneSize: dragAndDrop.startSize,
48
48
  dropZoneSize: dragAndDrop.getDropZoneSize()
49
49
  });
50
50
  }, 20, { maxWait: 30 }))
51
- .onStart(() => emit('start'))
52
- .onEnd(() => emit('end'));
51
+ .onStart(() => emit("start"))
52
+ .onEnd(() => emit("end"));
53
53
  </script>
@@ -16,11 +16,11 @@
16
16
  </div>
17
17
  </template>
18
18
  <script setup>
19
- import { DragHandleDotsIcon as DragHandleIcon } from '../../svg';
20
- import { SvgImg } from '../Utility';
21
- import { ListDragAndDrop } from './listDragAndDrop';
19
+ import { DragHandleDotsIcon as DragHandleIcon } from "../../svg";
20
+ import { SvgImg } from "../Utility";
21
+ import { ListDragAndDrop } from "./listDragAndDrop";
22
22
 
23
- const emit = defineEmits(['position', 'update:list-items']);
23
+ const emit = defineEmits(["position", "update:list-items"]);
24
24
  const props = defineProps({
25
25
  dropZone: {
26
26
  type: [Function, String],
@@ -28,8 +28,8 @@ const props = defineProps({
28
28
  },
29
29
  direction: {
30
30
  type: String,
31
- default: 'vertical',
32
- validator: (value) => ['vertical', 'horizontal'].includes(value)
31
+ default: "vertical",
32
+ validator: (value) => ["vertical", "horizontal"].includes(value)
33
33
  },
34
34
  showHandle: Boolean,
35
35
  listItems: {
@@ -42,12 +42,12 @@ const dragAndDrop = new ListDragAndDrop()
42
42
  .setDropZone(props.dropZone)
43
43
  .setOptions({ showPlaceholder: true, direction: props.direction })
44
44
  .onPositionChange((newPosition, oldPosition) => {
45
- emit('position', newPosition);
45
+ emit("position", newPosition);
46
46
 
47
47
  if (props.listItems) {
48
48
  const items = [...props.listItems];
49
49
  items.splice(newPosition, 0, items.splice(oldPosition, 1)[0]);
50
- emit('update:list-items', items);
50
+ emit("update:list-items", items);
51
51
  }
52
52
  });
53
53
  </script>