quasar-ui-danx 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/README.md +24 -109
  2. package/demo/.eslintrc.cjs +15 -0
  3. package/demo/.prettierrc.json +8 -0
  4. package/demo/.vscode/extensions.json +7 -0
  5. package/demo/README.md +45 -0
  6. package/demo/env.d.ts +5 -0
  7. package/demo/index.html +13 -0
  8. package/demo/package.json +42 -0
  9. package/demo/public/favicon.ico +0 -0
  10. package/demo/src/App.vue +86 -0
  11. package/demo/src/assets/base.css +86 -0
  12. package/demo/src/assets/logo.svg +1 -0
  13. package/demo/src/assets/main.css +35 -0
  14. package/demo/src/components/DemoActionTable/demoTableActions.ts +26 -0
  15. package/demo/src/components/DemoActionTable/demoTableCallbacks.ts +109 -0
  16. package/demo/src/components/DemoActionTable/demoTableColumns.ts +34 -0
  17. package/demo/src/components/DemoActionTable/demoTableFilterFields.ts +40 -0
  18. package/demo/src/components/HelloWorld.vue +41 -0
  19. package/demo/src/components/TheWelcome.vue +88 -0
  20. package/demo/src/components/WelcomeItem.vue +87 -0
  21. package/demo/src/components/__tests__/HelloWorld.spec.ts +11 -0
  22. package/demo/src/components/icons/IconCommunity.vue +7 -0
  23. package/demo/src/components/icons/IconDocumentation.vue +7 -0
  24. package/demo/src/components/icons/IconEcosystem.vue +7 -0
  25. package/demo/src/components/icons/IconSupport.vue +7 -0
  26. package/demo/src/components/icons/IconTooling.vue +19 -0
  27. package/demo/src/main.ts +11 -0
  28. package/demo/src/router/index.ts +28 -0
  29. package/demo/src/views/AboutView.vue +15 -0
  30. package/demo/src/views/DemoView.vue +17 -0
  31. package/demo/src/views/HomeView.vue +9 -0
  32. package/demo/tsconfig.app.json +14 -0
  33. package/demo/tsconfig.json +19 -0
  34. package/demo/tsconfig.node.json +19 -0
  35. package/demo/tsconfig.vitest.json +11 -0
  36. package/demo/vite.config.ts +18 -0
  37. package/demo/vitest.config.ts +14 -0
  38. package/dist/components/ActionTable/Columns/index.d.ts +4 -0
  39. package/dist/components/ActionTable/Filters/index.d.ts +6 -0
  40. package/dist/components/ActionTable/Form/Fields/index.d.ts +24 -0
  41. package/dist/components/ActionTable/Form/index.d.ts +2 -0
  42. package/dist/components/ActionTable/Layouts/ActionTableLayout.vue.d.ts +12 -0
  43. package/dist/components/ActionTable/Layouts/index.d.ts +1 -0
  44. package/dist/components/ActionTable/index.d.ts +12 -0
  45. package/dist/components/ActionTable/listControls.d.ts +50 -0
  46. package/dist/components/ActionTable/listHelpers.d.ts +12 -0
  47. package/dist/components/ActionTable/tableColumns.d.ts +8 -0
  48. package/dist/components/AuditHistory/index.d.ts +2 -0
  49. package/dist/components/DragAndDrop/dragAndDrop.d.ts +111 -0
  50. package/dist/components/DragAndDrop/index.d.ts +4 -0
  51. package/dist/components/DragAndDrop/listDragAndDrop.d.ts +74 -0
  52. package/dist/components/PanelsDrawer/index.d.ts +3 -0
  53. package/dist/components/Utility/Buttons/index.d.ts +2 -0
  54. package/dist/components/Utility/Controls/index.d.ts +1 -0
  55. package/dist/components/Utility/Dialogs/index.d.ts +5 -0
  56. package/dist/components/Utility/Files/index.d.ts +2 -0
  57. package/dist/components/Utility/Formats/index.d.ts +5 -0
  58. package/dist/components/Utility/Layouts/index.d.ts +2 -0
  59. package/dist/components/Utility/Popovers/index.d.ts +2 -0
  60. package/dist/components/Utility/Tabs/index.d.ts +2 -0
  61. package/dist/components/Utility/Tools/index.d.ts +3 -0
  62. package/dist/components/Utility/Transitions/index.d.ts +3 -0
  63. package/dist/components/Utility/index.d.ts +10 -0
  64. package/dist/components/index.d.ts +5 -0
  65. package/dist/config/index.d.ts +8 -0
  66. package/dist/danx.es.js +6 -6
  67. package/dist/danx.umd.js +2 -2
  68. package/dist/helpers/FileUpload.d.ts +107 -0
  69. package/dist/helpers/FlashMessages.d.ts +24 -0
  70. package/dist/helpers/actions.d.ts +58 -0
  71. package/dist/helpers/array.d.ts +16 -0
  72. package/dist/helpers/compatibility.d.ts +8 -0
  73. package/dist/helpers/date.d.ts +1 -0
  74. package/dist/helpers/download.d.ts +1 -0
  75. package/dist/helpers/downloadPdf.d.ts +24 -0
  76. package/dist/helpers/files.d.ts +1 -0
  77. package/dist/helpers/formats.d.ts +112 -0
  78. package/dist/helpers/http.d.ts +23 -0
  79. package/dist/helpers/index.d.ts +15 -0
  80. package/dist/helpers/multiFileUpload.d.ts +11 -0
  81. package/dist/helpers/singleFileUpload.d.ts +11 -0
  82. package/dist/helpers/storage.d.ts +2 -0
  83. package/dist/helpers/utils.d.ts +46 -0
  84. package/dist/svg/index.d.ts +12 -0
  85. package/dist/vendor/tinymce-config.d.ts +1 -0
  86. package/package.json +4 -3
  87. package/src/helpers/FileUpload.ts +16 -7
  88. package/tsconfig.json +24 -13
  89. package/vite.config.js +7 -1
@@ -0,0 +1,8 @@
1
+ export declare function useTableColumns(name: any, columns: any): {
2
+ sortableColumns: import('vue').WritableComputedRef<any[]>;
3
+ lockedColumns: import('vue').ComputedRef<any[]>;
4
+ visibleColumns: import('vue').ComputedRef<any[]>;
5
+ hiddenColumnNames: import('vue').Ref<any>;
6
+ titleColumnNames: import('vue').Ref<any>;
7
+ orderedTitleColumns: import('vue').ComputedRef<any[]>;
8
+ };
@@ -0,0 +1,2 @@
1
+ export { default as AuditHistoryItem } from './AuditHistoryItem.vue';
2
+ export { default as AuditHistoryItemValue } from './AuditHistoryItemValue.vue';
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Drag and Drop basic functionality for dragging elements and firing events on drag start, drag over and drag end
3
+ */
4
+ export declare class DragAndDrop {
5
+ options: {
6
+ direction?: string;
7
+ hideDragImage?: boolean;
8
+ showPlaceholder?: boolean;
9
+ };
10
+ startY: number;
11
+ startX: number;
12
+ startSize: number;
13
+ cursorY: number;
14
+ cursorX: number;
15
+ onStartCb: null;
16
+ onEndCb: null;
17
+ onDropCb: null;
18
+ onDraggingCb: null;
19
+ dropZoneResolver: null;
20
+ currentDropZone: null;
21
+ draggableData: null;
22
+ abortController: null;
23
+ constructor(options?: {});
24
+ /**
25
+ * Set the options for the drag and drop instance
26
+ * @param options
27
+ * @returns {DragAndDrop}
28
+ */
29
+ setOptions(options?: {}): this;
30
+ /**
31
+ * Returns if the list is stacked vertically or horizontally
32
+ * @returns {boolean}
33
+ */
34
+ isVertical(): boolean;
35
+ /**
36
+ * Set the target drop zone for draggable elements
37
+ * @param dropZone
38
+ * @returns {DragAndDrop}
39
+ */
40
+ setDropZone(dropZone: any): this;
41
+ /**
42
+ * Callback that fires when an element has started dragging
43
+ * @param cb
44
+ * @returns {DragAndDrop}
45
+ */
46
+ onStart(cb: any): this;
47
+ /**
48
+ * Callback that fires when an element has stopped dragging
49
+ * @param cb
50
+ * @returns {DragAndDrop}
51
+ */
52
+ onEnd(cb: any): this;
53
+ /**
54
+ * Callback that fires when the dragging element is moved
55
+ * @param cb
56
+ * @returns {DragAndDrop}
57
+ */
58
+ onDragging(cb: any): this;
59
+ /**
60
+ * Callback that fires when the dragging element has been dropped
61
+ * @param cb
62
+ * @returns {DragAndDrop}
63
+ */
64
+ onDrop(cb: any): this;
65
+ /**
66
+ * Start listening for drag events and prepare an element for drag/drop
67
+ * @param e
68
+ * @param data
69
+ */
70
+ dragStart(e: any, data: any): void;
71
+ /**
72
+ * Clean up event listeners after dragging is done
73
+ */
74
+ dragEnd(e: any): void;
75
+ /**
76
+ * The dragging element has entered a new target
77
+ * @param e
78
+ */
79
+ dragEnter(e: any): void;
80
+ /**
81
+ * The dragging element is moving
82
+ * @param e
83
+ */
84
+ dragOver(e: any): void;
85
+ /**
86
+ * Handle dropping the element into its correct position
87
+ * @param e
88
+ */
89
+ drop(e: any): void;
90
+ /**
91
+ * Returns the drop zone if the current target element is or is inside the drop zone
92
+ * @param e
93
+ * @returns {HTMLElement|null}
94
+ */
95
+ getDropZone(e: any): any;
96
+ /**
97
+ * Returns the distance between the start and current cursor position
98
+ * @returns {number}
99
+ */
100
+ getDistance(): number;
101
+ /**
102
+ * Returns the size of the drop zone
103
+ */
104
+ getDropZoneSize(): any;
105
+ /**
106
+ * Returns the percent change between the start and current cursor position relative to the drop zone size
107
+ *
108
+ * @returns {number}
109
+ */
110
+ getPercentChange(): number;
111
+ }
@@ -0,0 +1,4 @@
1
+ export { default as HandleDraggable } from './HandleDraggable.vue';
2
+ export { default as ListItemDraggable } from './ListItemDraggable.vue';
3
+ export { DragAndDrop } from './dragAndDrop';
4
+ export { ListDragAndDrop } from './listDragAndDrop';
@@ -0,0 +1,74 @@
1
+ import { DragAndDrop } from './dragAndDrop';
2
+
3
+ /**
4
+ * ListDragAndDrop supports dragging elements in a list to new positions in the same list.
5
+ * A placeholder is rendered to show the position the list item will be dropped.
6
+ *
7
+ * @class
8
+ */
9
+ export declare class ListDragAndDrop extends DragAndDrop {
10
+ listPosition: number;
11
+ cursorPosition: number;
12
+ initialPosition: number;
13
+ onPositionChangeCb: null;
14
+ onDragPositionChangeCb: null;
15
+ placeholder: null;
16
+ constructor(options?: {});
17
+ /**
18
+ * Callback that fires after dragging has ended and the list position has changed from the original
19
+ * @param cb
20
+ * @returns {ListDragAndDrop}
21
+ */
22
+ onPositionChange(cb: any): this;
23
+ /**
24
+ * Callback that fires while dragging the element when the cursor's position has changed in the list
25
+ * @param cb
26
+ * @returns {ListDragAndDrop}
27
+ */
28
+ onDragPositionChange(cb: any): this;
29
+ /**
30
+ * Start listening for drag events and prepare an element for drag/drop
31
+ * @param e
32
+ * @param data
33
+ */
34
+ dragStart(e: any, data: any): void;
35
+ /**
36
+ * When dragging has ended, check for list position changes and fire the onPositionChange callback if it has
37
+ */
38
+ dragEnd(e: any): void;
39
+ /**
40
+ * The dragging element is moving
41
+ * @param e
42
+ */
43
+ dragOver(e: any): void;
44
+ /**
45
+ * Notify if the targeted position of the cursor is different from the current position
46
+ * @param e
47
+ */
48
+ updateListPosition(e: any): void;
49
+ /**
50
+ * Find the numeric position of the element in the children of the list
51
+ * @returns {Number|null}
52
+ * @param item
53
+ */
54
+ getListPosition(item: any): number | null;
55
+ /**
56
+ * Get all the children of the current drop zone, excluding the placeholder
57
+ * @returns {*}
58
+ */
59
+ getChildren(): any[];
60
+ /**
61
+ * Find the element at the current cursor position in the given drop zone
62
+ * @param point
63
+ * @returns {null}
64
+ */
65
+ getListPositionOfPoint(point: any): number;
66
+ /**
67
+ * Updates the scroll position while dragging an element so a user can navigate a longer list while dragging
68
+ */
69
+ updateScrollPosition(): void;
70
+ /**
71
+ * Render a placeholder element at the given position (in between the elements)
72
+ */
73
+ renderPlaceholder(): void;
74
+ }
@@ -0,0 +1,3 @@
1
+ export { default as PanelsDrawer } from './PanelsDrawer.vue';
2
+ export { default as PanelsDrawerPanels } from './PanelsDrawerPanels.vue';
3
+ export { default as PanelsDrawerTabs } from './PanelsDrawerTabs.vue';
@@ -0,0 +1,2 @@
1
+ export { default as ExportButton } from './ExportButton.vue';
2
+ export { default as RefreshButton } from './RefreshButton.vue';
@@ -0,0 +1 @@
1
+ export { default as PreviousNextControls } from './PreviousNextControls.vue';
@@ -0,0 +1,5 @@
1
+ export { default as ConfirmDialog } from './ConfirmDialog.vue';
2
+ export { default as FullScreenCarouselDialog } from './FullscreenCarouselDialog.vue';
3
+ export { default as FullScreenDialog } from './FullScreenDialog.vue';
4
+ export { default as InfoDialog } from './InfoDialog.vue';
5
+ export { default as InputDialog } from './InputDialog.vue';
@@ -0,0 +1,2 @@
1
+ export { default as FilePreview } from './FilePreview.vue';
2
+ export { default as SvgImg } from './SvgImg.vue';
@@ -0,0 +1,5 @@
1
+ export { default as AddressFormat } from './AddressFormat.vue';
2
+ export { default as FlatListFormat } from './FlatListFormat.vue';
3
+ export { default as GpsCoordinatesFormat } from './GpsCoordinatesFormat.vue';
4
+ export { default as IconWithTextFormat } from './IconWithTextFormat.vue';
5
+ export { default as LabelValueFormat } from './LabelValueFormat.vue';
@@ -0,0 +1,2 @@
1
+ export { default as CollapsableSidebar } from './CollapsableSidebar.vue';
2
+ export { default as ContentDrawer } from './ContentDrawer.vue';
@@ -0,0 +1,2 @@
1
+ export { default as PopoverMenu } from './PopoverMenu.vue';
2
+ export { default as InteractiveTooltip } from './InteractiveTooltip.vue';
@@ -0,0 +1,2 @@
1
+ export { default as BadgeTab } from './BadgeTab.vue';
2
+ export { default as IndicatorTab } from './IndicatorTab.vue';
@@ -0,0 +1,3 @@
1
+ export { default as ActionVnode } from './ActionVnode.vue';
2
+ export { default as RenderComponent } from './RenderComponent.vue';
3
+ export { default as RenderVnode } from './RenderVnode.vue';
@@ -0,0 +1,3 @@
1
+ export { default as ListTransition } from './ListTransition.vue';
2
+ export { default as SlideTransition } from './SlideTransition.vue';
3
+ export { default as StaggeredListTransition } from './StaggeredListTransition.vue';
@@ -0,0 +1,10 @@
1
+ export * from './Buttons';
2
+ export * from './Controls';
3
+ export * from './Dialogs';
4
+ export * from './Files';
5
+ export * from './Formats';
6
+ export * from './Layouts';
7
+ export * from './Popovers';
8
+ export * from './Tabs';
9
+ export * from './Tools';
10
+ export * from './Transitions';
@@ -0,0 +1,5 @@
1
+ export * from './ActionTable';
2
+ export * from './AuditHistory';
3
+ export * from './DragAndDrop';
4
+ export * from './PanelsDrawer';
5
+ export * from './Utility';
@@ -0,0 +1,8 @@
1
+ export declare let danxOptions: {
2
+ fileUpload: {
3
+ directory: string;
4
+ presignedUploadUrl: null;
5
+ uploadCompletedUrl: null;
6
+ };
7
+ };
8
+ export declare function configure(options: any): void;
package/dist/danx.es.js CHANGED
@@ -9448,17 +9448,16 @@ async function Wy(t, e = null) {
9448
9448
  }
9449
9449
  }
9450
9450
  class so {
9451
- constructor(e, n = null) {
9451
+ constructor(e, n = {}) {
9452
9452
  te(this, "files", []);
9453
9453
  te(this, "fileUploads", []);
9454
9454
  te(this, "onErrorCb", null);
9455
9455
  te(this, "onProgressCb", null);
9456
9456
  te(this, "onCompleteCb", null);
9457
9457
  te(this, "onAllCompleteCb", null);
9458
- te(this, "options", null);
9458
+ te(this, "options", {});
9459
9459
  if (!Array.isArray(e) && !(e instanceof FileList) && (e = [e]), this.files = e, this.fileUploads = [], this.onErrorCb = null, this.onProgressCb = null, this.onCompleteCb = null, this.onAllCompleteCb = null, this.options = {
9460
9460
  ...ss.fileUpload,
9461
- ...this.options,
9462
9461
  ...n
9463
9462
  }, !this.options.presignedUploadUrl)
9464
9463
  throw new Error("Please configure the danxOptions: import { configure } from 'quasar-ui-danx';");
@@ -17331,8 +17330,8 @@ const _S = {
17331
17330
  });
17332
17331
  };
17333
17332
  }
17334
- }, JS = "quasar-ui-danx", QS = "0.2.4", eT = "Dan <dan@flytedesk.com>", tT = "DanX Vue / Quasar component library", nT = "MIT", rT = "module", iT = "dist/dan.es.js", sT = "dist/dan.es.js", oT = {
17335
- dev: "vite",
17333
+ }, JS = "quasar-ui-danx", QS = "0.2.5", eT = "Dan <dan@flytedesk.com>", tT = "DanX Vue / Quasar component library", nT = "MIT", rT = "module", iT = "dist/danx.es.js", sT = "dist/danx.es.js", oT = {
17334
+ dev: "cd dev && quasar dev && cd ..",
17336
17335
  build: "vite build",
17337
17336
  preview: "vite preview"
17338
17337
  }, aT = {
@@ -17354,8 +17353,9 @@ const _S = {
17354
17353
  "ts-node": "^10.9.2",
17355
17354
  typescript: "^5.4.4",
17356
17355
  vite: "^5.2.8",
17356
+ "vite-plugin-dts": "^3.8.1",
17357
17357
  "vite-svg-loader": "^5.1.0",
17358
- vue: "^3.0.0",
17358
+ vue: "^3.4.21",
17359
17359
  "vue-router": "^4.0.0"
17360
17360
  }, uT = {
17361
17361
  "@heroicons/vue": "v1",