quasar-ui-danx-legacy 0.3.56-legacy

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 (165) hide show
  1. package/.eslintrc.cjs +37 -0
  2. package/LICENSE +21 -0
  3. package/README.md +156 -0
  4. package/danx-local.sh +15 -0
  5. package/dist/danx.es.js +21254 -0
  6. package/dist/danx.es.js.map +1 -0
  7. package/dist/danx.umd.js +18 -0
  8. package/dist/danx.umd.js.map +1 -0
  9. package/dist/style.css +1 -0
  10. package/index.js +1 -0
  11. package/package.json +65 -0
  12. package/postcss.config.js +6 -0
  13. package/src/components/ActionTable/ActionMenu.vue +55 -0
  14. package/src/components/ActionTable/ActionTable.vue +117 -0
  15. package/src/components/ActionTable/ActionTableColumn.vue +94 -0
  16. package/src/components/ActionTable/ActionTableHeaderColumn.vue +83 -0
  17. package/src/components/ActionTable/Columns/ColumnListItem.vue +62 -0
  18. package/src/components/ActionTable/Columns/ColumnSettingsDialog.vue +106 -0
  19. package/src/components/ActionTable/Columns/TitleColumnFormat.vue +30 -0
  20. package/src/components/ActionTable/Columns/VisibleColumnsToggleButtons.vue +159 -0
  21. package/src/components/ActionTable/Columns/index.ts +4 -0
  22. package/src/components/ActionTable/EmptyTableState.vue +37 -0
  23. package/src/components/ActionTable/Filters/CollapsableFiltersSidebar.vue +37 -0
  24. package/src/components/ActionTable/Filters/FilterFieldItem.vue +30 -0
  25. package/src/components/ActionTable/Filters/FilterFieldList.vue +76 -0
  26. package/src/components/ActionTable/Filters/FilterListToggle.vue +55 -0
  27. package/src/components/ActionTable/Filters/FilterToolbarLayout.vue +43 -0
  28. package/src/components/ActionTable/Filters/FilterableField.vue +150 -0
  29. package/src/components/ActionTable/Filters/index.ts +6 -0
  30. package/src/components/ActionTable/Form/Fields/BooleanField.vue +44 -0
  31. package/src/components/ActionTable/Form/Fields/ConfirmPasswordField.vue +48 -0
  32. package/src/components/ActionTable/Form/Fields/DateField.vue +59 -0
  33. package/src/components/ActionTable/Form/Fields/DateRangeField.vue +115 -0
  34. package/src/components/ActionTable/Form/Fields/DateTimeField.vue +53 -0
  35. package/src/components/ActionTable/Form/Fields/DateTimePicker.vue +81 -0
  36. package/src/components/ActionTable/Form/Fields/EditableDiv.vue +39 -0
  37. package/src/components/ActionTable/Form/Fields/FieldLabel.vue +32 -0
  38. package/src/components/ActionTable/Form/Fields/FileUploadButton.vue +111 -0
  39. package/src/components/ActionTable/Form/Fields/InlineDateTimeField.vue +44 -0
  40. package/src/components/ActionTable/Form/Fields/IntegerField.vue +26 -0
  41. package/src/components/ActionTable/Form/Fields/LabelValueBlock.vue +22 -0
  42. package/src/components/ActionTable/Form/Fields/LabeledInput.vue +66 -0
  43. package/src/components/ActionTable/Form/Fields/MultiFileField.vue +106 -0
  44. package/src/components/ActionTable/Form/Fields/MultiKeywordField.vue +57 -0
  45. package/src/components/ActionTable/Form/Fields/NewPasswordField.vue +39 -0
  46. package/src/components/ActionTable/Form/Fields/NoInputField.vue +65 -0
  47. package/src/components/ActionTable/Form/Fields/NumberField.vue +107 -0
  48. package/src/components/ActionTable/Form/Fields/NumberRangeField.vue +140 -0
  49. package/src/components/ActionTable/Form/Fields/SelectDrawer.vue +142 -0
  50. package/src/components/ActionTable/Form/Fields/SelectField.vue +327 -0
  51. package/src/components/ActionTable/Form/Fields/SelectWithChildrenField.vue +85 -0
  52. package/src/components/ActionTable/Form/Fields/SingleFileField.vue +79 -0
  53. package/src/components/ActionTable/Form/Fields/TextField.vue +88 -0
  54. package/src/components/ActionTable/Form/Fields/WysiwygField.vue +46 -0
  55. package/src/components/ActionTable/Form/Fields/index.ts +25 -0
  56. package/src/components/ActionTable/Form/RenderedForm.vue +283 -0
  57. package/src/components/ActionTable/Form/index.ts +2 -0
  58. package/src/components/ActionTable/Layouts/ActionTableLayout.vue +10 -0
  59. package/src/components/ActionTable/Layouts/index.ts +1 -0
  60. package/src/components/ActionTable/TableSummaryRow.vue +96 -0
  61. package/src/components/ActionTable/index.ts +13 -0
  62. package/src/components/ActionTable/listControls.ts +397 -0
  63. package/src/components/ActionTable/listHelpers.ts +59 -0
  64. package/src/components/ActionTable/tableColumns.ts +83 -0
  65. package/src/components/AuditHistory/AuditHistoryItem.vue +60 -0
  66. package/src/components/AuditHistory/AuditHistoryItemValue.vue +60 -0
  67. package/src/components/AuditHistory/index.ts +2 -0
  68. package/src/components/DragAndDrop/HandleDraggable.vue +53 -0
  69. package/src/components/DragAndDrop/ListItemDraggable.vue +57 -0
  70. package/src/components/DragAndDrop/dragAndDrop.ts +225 -0
  71. package/src/components/DragAndDrop/index.ts +4 -0
  72. package/src/components/DragAndDrop/listDragAndDrop.ts +237 -0
  73. package/src/components/Navigation/NavigationMenu.vue +101 -0
  74. package/src/components/Navigation/index.ts +1 -0
  75. package/src/components/PanelsDrawer/PanelsDrawer.vue +72 -0
  76. package/src/components/PanelsDrawer/PanelsDrawerPanels.vue +32 -0
  77. package/src/components/PanelsDrawer/PanelsDrawerTabs.vue +69 -0
  78. package/src/components/PanelsDrawer/index.ts +3 -0
  79. package/src/components/Utility/Buttons/ExportButton.vue +32 -0
  80. package/src/components/Utility/Buttons/RefreshButton.vue +16 -0
  81. package/src/components/Utility/Buttons/index.ts +2 -0
  82. package/src/components/Utility/Controls/PreviousNextControls.vue +28 -0
  83. package/src/components/Utility/Controls/index.ts +1 -0
  84. package/src/components/Utility/Dialogs/ConfirmDialog.vue +135 -0
  85. package/src/components/Utility/Dialogs/FullScreenDialog.vue +49 -0
  86. package/src/components/Utility/Dialogs/FullscreenCarouselDialog.vue +122 -0
  87. package/src/components/Utility/Dialogs/InfoDialog.vue +97 -0
  88. package/src/components/Utility/Dialogs/InputDialog.vue +35 -0
  89. package/src/components/Utility/Dialogs/index.ts +5 -0
  90. package/src/components/Utility/Files/FilePreview.vue +234 -0
  91. package/src/components/Utility/Files/SvgImg.vue +28 -0
  92. package/src/components/Utility/Files/index.ts +2 -0
  93. package/src/components/Utility/Formats/AddressFormat.vue +29 -0
  94. package/src/components/Utility/Formats/FlatListFormat.vue +19 -0
  95. package/src/components/Utility/Formats/GpsCoordinatesFormat.vue +36 -0
  96. package/src/components/Utility/Formats/IconWithTextFormat.vue +28 -0
  97. package/src/components/Utility/Formats/LabelValueFormat.vue +26 -0
  98. package/src/components/Utility/Formats/index.ts +5 -0
  99. package/src/components/Utility/Layouts/CollapsableSidebar.vue +112 -0
  100. package/src/components/Utility/Layouts/ContentDrawer.vue +65 -0
  101. package/src/components/Utility/Layouts/index.ts +2 -0
  102. package/src/components/Utility/Popovers/InteractiveTooltip.vue +66 -0
  103. package/src/components/Utility/Popovers/PopoverMenu.vue +85 -0
  104. package/src/components/Utility/Popovers/index.ts +2 -0
  105. package/src/components/Utility/Tabs/BadgeTab.vue +34 -0
  106. package/src/components/Utility/Tabs/IndicatorTab.vue +42 -0
  107. package/src/components/Utility/Tabs/index.ts +2 -0
  108. package/src/components/Utility/Tools/ActionVnode.vue +23 -0
  109. package/src/components/Utility/Tools/RenderComponent.vue +43 -0
  110. package/src/components/Utility/Tools/RenderVnode.vue +21 -0
  111. package/src/components/Utility/Tools/index.ts +3 -0
  112. package/src/components/Utility/Transitions/ListTransition.vue +50 -0
  113. package/src/components/Utility/Transitions/SlideTransition.vue +63 -0
  114. package/src/components/Utility/Transitions/StaggeredListTransition.vue +97 -0
  115. package/src/components/Utility/Transitions/index.ts +3 -0
  116. package/src/components/Utility/index.ts +10 -0
  117. package/src/components/index.ts +6 -0
  118. package/src/config/index.ts +36 -0
  119. package/src/helpers/FileUpload.ts +328 -0
  120. package/src/helpers/FlashMessages.ts +88 -0
  121. package/src/helpers/actions.ts +212 -0
  122. package/src/helpers/array.ts +32 -0
  123. package/src/helpers/compatibility.ts +64 -0
  124. package/src/helpers/date.ts +5 -0
  125. package/src/helpers/download.ts +234 -0
  126. package/src/helpers/downloadPdf.ts +92 -0
  127. package/src/helpers/files.ts +66 -0
  128. package/src/helpers/formats.ts +234 -0
  129. package/src/helpers/hotkeys.ts +59 -0
  130. package/src/helpers/index.ts +17 -0
  131. package/src/helpers/multiFileUpload.ts +68 -0
  132. package/src/helpers/request.ts +98 -0
  133. package/src/helpers/singleFileUpload.ts +60 -0
  134. package/src/helpers/storage.ts +8 -0
  135. package/src/helpers/styles.ts +18 -0
  136. package/src/helpers/utils.ts +77 -0
  137. package/src/index.common.js +1 -0
  138. package/src/index.esm.js +2 -0
  139. package/src/index.js +1 -0
  140. package/src/index.sass +1 -0
  141. package/src/index.umd.js +3 -0
  142. package/src/styles/actions.scss +10 -0
  143. package/src/styles/general.scss +18 -0
  144. package/src/styles/index.scss +7 -0
  145. package/src/styles/quasar-reset.scss +32 -0
  146. package/src/styles/transitions.scss +15 -0
  147. package/src/svg/CaretDownIcon.svg +3 -0
  148. package/src/svg/DragHandleDotsIcon.svg +5 -0
  149. package/src/svg/DragHandleIcon.svg +5 -0
  150. package/src/svg/FilterIcon.svg +7 -0
  151. package/src/svg/ImageIcon.svg +30 -0
  152. package/src/svg/PdfIcon.svg +21 -0
  153. package/src/svg/PercentIcon.svg +13 -0
  154. package/src/svg/SkipNextIcon.svg +5 -0
  155. package/src/svg/SkipPreviousIcon.svg +5 -0
  156. package/src/svg/TrashIcon.svg +15 -0
  157. package/src/svg/WarningIcon.svg +5 -0
  158. package/src/svg/XIcon.svg +18 -0
  159. package/src/svg/index.ts +12 -0
  160. package/src/vue-plugin.js +17 -0
  161. package/tailwind.config.js +27 -0
  162. package/tsconfig.json +49 -0
  163. package/types/svg.d.ts +4 -0
  164. package/types/vue-shims.d.ts +4 -0
  165. package/vite.config.js +39 -0
package/.eslintrc.cjs ADDED
@@ -0,0 +1,37 @@
1
+ module.exports = {
2
+ root: true,
3
+
4
+ parser: "vue-eslint-parser",
5
+ parserOptions: {
6
+ ecmaVersion: "latest",
7
+ sourceType: "module",
8
+ parser: "@typescript-eslint/parser",
9
+ project: "./tsconfig.json", // Specify it only for TypeScript files
10
+ extraFileExtensions: [".vue"]
11
+ },
12
+
13
+ env: {
14
+ node: true,
15
+ browser: true,
16
+ "vue/setup-compiler-macros": true
17
+ },
18
+
19
+ extends: [
20
+ "eslint:recommended",
21
+ "plugin:vue/vue3-recommended", // Priority C: Recommended
22
+ "plugin:@typescript-eslint/recommended"
23
+ ],
24
+
25
+ plugins: [
26
+ "vue",
27
+ "@typescript-eslint",
28
+ "import"
29
+ ],
30
+
31
+ rules: {
32
+ "prefer-promise-reject-errors": "off",
33
+ "no-debugger":
34
+ process.env.NODE_ENV === "production" ? "error" : "off",
35
+ "import/extensions": ["error", "never"]
36
+ }
37
+ };
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Dan <dan@flytedesk.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,156 @@
1
+ # Component Danx
2
+
3
+ [![npm](https://img.shields.io/npm/v/quasar-ui-danx.svg?label=quasar-ui-danx)](https://www.npmjs.com/package/quasar-ui-danx)
4
+ [![npm](https://img.shields.io/npm/dt/quasar-ui-danx.svg)](https://www.npmjs.com/package/quasar-ui-danx)
5
+
6
+ **Compatible with Quasar UI v2 and Vue 3**.
7
+
8
+ # Component Danx
9
+
10
+ > Component and function library built on Quasar + Vue 3
11
+
12
+ # Usage
13
+
14
+ ```vue
15
+
16
+ <template>
17
+ <ActionTable
18
+ label="Danx"
19
+ name="danx"
20
+ v-model:quasar-pagination="quasarPagination"
21
+ v-model:selected-rows="selectedRows"
22
+ :columns="columns"
23
+ />
24
+ </template>
25
+ <script setup>
26
+ import 'quasar-ui-danx/dist/index.css';
27
+ import { ActionTable, useTableColumns, useListControls } from 'quasar-ui-danx';
28
+
29
+ const { columns } = useTableColumns([{ name: 'name', label: 'Name' }, { name: 'age', label: 'Age' }]);
30
+ const { quasarPagination, selectedRows } = useListControls({});
31
+ </script>
32
+ ```
33
+
34
+ # Setup
35
+
36
+ ```bash
37
+ yarn create vue # Follow instructions for settings up new Vue App
38
+ yarn add quasar-ui-danx quasar
39
+ yarn add -D sass vite-svg-loader tailwindcss eslint eslint-plugin-import autoprefixer
40
+ ```
41
+
42
+ ### Setup PHPStorm
43
+
44
+ * Disable Typescript language service
45
+ * Setup node_modules directory as a library
46
+ * Configure `tsconfig.json`
47
+
48
+ ```json
49
+ {
50
+ "include": [
51
+ "node_modules/quasar-ui-danx/**/*"
52
+ ]
53
+ }
54
+ ```
55
+
56
+ * Configure `vite.config.ts`
57
+
58
+ ```ts
59
+ export default ({ command }) => {
60
+ // For development w/ HMR, load the danx library + styles directly from the directory
61
+ // NOTE: These are the paths relative to the mounted quasar-ui-danx directory inside the mva docker container
62
+ const danx = (command === "serve" ? {
63
+ "quasar-ui-danx": resolve(__dirname, "../quasar-ui-danx/ui/src"),
64
+ "quasar-ui-danx-styles": resolve(__dirname, "../quasar-ui-danx/src/styles/index.scss")
65
+ } : {
66
+ // Import from quasar-ui-danx module for production
67
+ "quasar-ui-danx-styles": "quasar-ui-danx/dist/style.css"
68
+ });
69
+
70
+ return defineConfig({
71
+ resolve: {
72
+ alias: {
73
+ ...danx
74
+ }
75
+ },
76
+ });
77
+ }
78
+ ```
79
+
80
+ * Add node_modules as a library in PHPStorm
81
+ * Settings -> Directories -> Add
82
+ * Create a new directory w/ name node_modules and set the directory to the node_modules directory in your project
83
+ * Symlink Danx UI library
84
+ * FOR LOCAL DEVELOPMENT ONLY: if you plan on updating Danx UI
85
+ * Symlinking the danx UI library allows for better integration w/ PHPStorm + tailwindcss + HMR w/ vite.
86
+ * NOTE: Setting this up w/ `npm link` or trying to modify tsconfig.json / vite.config.ts only can be quite
87
+ challenging to get everything configured correctly. I found this to be the best solution.
88
+ * copy/paste and run `./danx-local.sh`
89
+ * (recommended) Configure yarn / npm to always run this after updating packages
90
+ * Add `{"scripts: {..., "postinstall": "./danx-local.sh"}}` to your package.json
91
+ * (or manually symlink node_modules/quasar-ui-danx to ../../quasar-ui-danx/ui/src)
92
+ * Directory structure of your project relative to quasar-ui-danx:
93
+
94
+ ```
95
+ - parent-directory
96
+ - your-app
97
+ - tsconfig.json
98
+ - vite.config.ts
99
+ - src
100
+ - node_modules
101
+ - quasar-ui-danx -> (symlink) ../../quasar-ui-danx/ui/src
102
+ - quasar-ui-danx
103
+ - ui
104
+ - src
105
+ - tests
106
+ ```
107
+
108
+ ### Setup Tailwind
109
+
110
+ Initialize config files for tailwind
111
+ NOTE: vite will automatically pick up the postcss.config.js file, no need to manually configure anything
112
+
113
+ ```
114
+ npx tailwindcss init -p
115
+ ```
116
+
117
+ * Rename tailwind.config.js to tailwind.config.ts
118
+ * Setup your tailwind.config.ts:
119
+ * Make any changes to the colors object
120
+
121
+ ```ts
122
+ /** @type {import('tailwindcss').Config} */
123
+ export const colors = {}
124
+
125
+ export default {
126
+ content: [],
127
+ theme: {
128
+ extend: {
129
+ colors
130
+ }
131
+ },
132
+ plugins: []
133
+ }
134
+ ```
135
+
136
+ # Developing
137
+
138
+ ```bash
139
+ # start dev in SPA mode
140
+ $ yarn dev
141
+ ```
142
+
143
+ # Building package
144
+
145
+ ```bash
146
+ $ yarn build
147
+ ```
148
+
149
+ # Adding Testing Components
150
+
151
+ in the `ui/dev/src/pages` you can add Vue files to test your component/directive. When using `yarn dev` to build the UI,
152
+ any pages in that location will automatically be picked up by dynamic routing and added to the test page.
153
+
154
+ # License
155
+
156
+ MIT (c) Dan <dan@flytedesk.com>
package/danx-local.sh ADDED
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+
3
+ set +x
4
+
5
+ # Resolve path to quasar-ui-danx (can be up 1 or 2 directories)
6
+ # shellcheck disable=SC2046
7
+ DANX_PATH="$(realpath $(find ../.. -maxdepth 2 -type d -name "quasar-ui-danx" | head -n 1))/ui/src"
8
+ MODULE_PATH="$(pwd)/node_modules/quasar-ui-danx"
9
+
10
+ # symlink ../quasar-ui-danx to node_modules/quasar-ui-danx if the directory exists
11
+ if [ -d "$DANX_PATH" ]; then
12
+ rm -rf node_modules/quasar-ui-danx
13
+ ln -s "$DANX_PATH" "$MODULE_PATH"
14
+ printf "Symlinked $DANX_PATH --> $MODULE_PATH\n"
15
+ fi