@qikdev/vue-ui 0.0.1 → 0.0.2

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 (72) hide show
  1. package/package.json +6 -2
  2. package/src/components.js +209 -6
  3. package/src/content/browser.vue +477 -0
  4. package/src/content/item.vue +48 -0
  5. package/src/content/render/field.vue +423 -0
  6. package/src/content/render/group.vue +65 -0
  7. package/src/content/render/render-mixin.js +101 -0
  8. package/src/content/render/render.vue +86 -0
  9. package/src/filter/FilterBuilder.vue +147 -0
  10. package/src/filter/FilterCondition.vue +335 -0
  11. package/src/filter/FilterRule.vue +257 -0
  12. package/src/form/expressions/index.js +83 -0
  13. package/src/form/field.vue +624 -0
  14. package/src/form/form.vue +280 -0
  15. package/src/form/getDefaultValue.js +224 -0
  16. package/src/form/inputs/button-select.vue +208 -0
  17. package/src/form/inputs/checkbox.vue +91 -0
  18. package/src/form/inputs/content-select.vue +187 -0
  19. package/src/form/inputs/currency.vue +205 -0
  20. package/src/form/inputs/datefield.vue +132 -0
  21. package/src/form/inputs/group.vue +155 -0
  22. package/src/form/inputs/input-mixin.js +440 -0
  23. package/src/form/inputs/native-select-old.vue +43 -0
  24. package/src/form/inputs/object-field.vue +50 -0
  25. package/src/form/inputs/option.vue +19 -0
  26. package/src/form/inputs/options-manager.vue +244 -0
  27. package/src/form/inputs/phone-number-input.vue +235 -0
  28. package/src/form/inputs/search.vue +117 -0
  29. package/src/form/inputs/select.vue +211 -0
  30. package/src/form/inputs/switch.vue +87 -0
  31. package/src/form/inputs/textarea.vue +80 -0
  32. package/src/form/inputs/textfield.vue +165 -0
  33. package/src/form/inputs/timezone.vue +642 -0
  34. package/src/form/inputs/upload/filedrop.vue +72 -0
  35. package/src/form/inputs/upload/upload.vue +323 -0
  36. package/src/form/parseBoolean.js +24 -0
  37. package/src/layout/flex-body.vue +3 -2
  38. package/src/layout/flex-cell.vue +45 -0
  39. package/src/layout/flex-column.vue +1 -1
  40. package/src/layout/flex-footer.vue +3 -2
  41. package/src/layout/flex-header.vue +3 -2
  42. package/src/layout/flex-row.vue +35 -0
  43. package/src/layout/flex-spacer.vue +17 -0
  44. package/src/layout/panel-body.vue +13 -0
  45. package/src/layout/panel-footer.vue +20 -0
  46. package/src/layout/panel-header.vue +20 -0
  47. package/src/layout/panel.vue +23 -0
  48. package/src/modal/ConfirmModal.vue +50 -0
  49. package/src/modal/ContentModal.vue +99 -0
  50. package/src/modal/Modal.vue +85 -0
  51. package/src/modal/ModalMixin.js +21 -0
  52. package/src/modal/OptionsModal.vue +31 -0
  53. package/src/modal/PromptModal.vue +31 -0
  54. package/src/services/selection.js +140 -0
  55. package/src/table/Table.vue +269 -0
  56. package/src/table/TableCell.vue +64 -0
  57. package/src/table/TableRow.vue +94 -0
  58. package/src/table/cells/TableCellMixin.js +15 -0
  59. package/src/table/cells/Thumbnail.vue +38 -0
  60. package/src/ui/button.vue +254 -0
  61. package/src/ui/checkbox.vue +79 -0
  62. package/src/ui/icon.vue +57 -0
  63. package/src/ui/image.vue +158 -0
  64. package/src/ui/link.vue +62 -0
  65. package/src/ui/list-item.vue +16 -0
  66. package/src/ui/list.vue +26 -0
  67. package/src/ui/menu.vue +135 -0
  68. package/src/ui/progressbar.vue +77 -0
  69. package/src/ui/spinner.vue +26 -0
  70. package/src/ui/switch.vue +89 -0
  71. package/yarn-error.log +2923 -0
  72. package/index.js +0 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qikdev/vue-ui",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "description": "Vue UI component library",
6
6
  "scripts": {
@@ -10,7 +10,7 @@
10
10
  "test:watch": "mocha --colors -w ./test/*.spec.js",
11
11
  "document": "jsdoc -r . -d docs -c jsdoc.conf README.md"
12
12
  },
13
- "exports": "./src/index.js",
13
+ "exports": "./src/components.js",
14
14
  "homepage": "https://qik.dev",
15
15
  "bugs": {
16
16
  "url": "https://support.qik.dev"
@@ -38,6 +38,10 @@
38
38
  "webpack-cli": "^4.9.2"
39
39
  },
40
40
  "dependencies": {
41
+ "click-outside-vue3": "^4.0.1",
42
+ "expression-eval": "^5.0.0",
43
+ "maska": "^1.5.0",
44
+ "vuedraggable": "^4.1.0"
41
45
  },
42
46
  "peerDependencies": {
43
47
  "vue": "^3.2.21"
package/src/components.js CHANGED
@@ -1,24 +1,227 @@
1
1
  ////////////////////////////////////////////
2
2
 
3
3
  //Import the pieces we need
4
- import { version } from './version.js';
4
+ import { version } from './version';
5
+ const versionName = `qik vue ui ${version}`;
5
6
 
6
- var versionName = `qik vue ui ${version}`;
7
- console.log(versionName)
7
+ ////////////////////////////////////////////
8
+
9
+ export { default as FlexColumn } from './layout/flex-column.vue';
10
+ export { default as FlexBody } from './layout/flex-body.vue';
11
+ export { default as FlexHeader } from './layout/flex-header.vue';
12
+ export { default as FlexFooter } from './layout/flex-footer.vue';
13
+ export { default as FlexCell } from './layout/flex-cell.vue';
14
+ export { default as FlexRow } from './layout/flex-row.vue';
15
+ export { default as FlexSpacer } from './layout/flex-spacer.vue';
16
+ export { default as Panel } from './layout/panel.vue';
17
+ export { default as PanelBody } from './layout/panel-body.vue';
18
+ export { default as PanelHeader } from './layout/panel-header.vue';
19
+ export { default as PanelFooter } from './layout/panel-footer.vue';
20
+
21
+ export { default as UXButton } from './ui/button.vue';
22
+ export { default as UXCheckbox } from './ui/checkbox.vue';
23
+ export { default as UXSwitch } from './ui/switch.vue';
24
+ export { default as UXLink } from './ui/link.vue';
25
+ export { default as UXIcon } from './ui/icon.vue';
26
+ export { default as UXMenu } from './ui/menu.vue';
27
+ export { default as UXImage } from './ui/image.vue';
28
+ export { default as Spinner } from './ui/spinner.vue';
29
+ export { default as ProgressBar } from './ui/progressbar.vue';
30
+ export { default as UXList } from './ui/list.vue';
31
+ export { default as UXListItem } from './ui/list-item.vue';
32
+
33
+ export { default as UXForm } from './form/form.vue';
34
+ export { default as UXFormField } from './form/field.vue';
35
+ export { default as Search } from './form/inputs/search.vue';
36
+
37
+
38
+ export { default as UXRender } from './content/render/render.vue';
39
+ export { default as UXRenderField } from './content/render/field.vue';
8
40
 
9
41
  ////////////////////////////////////////////
10
42
 
43
+ export { default as ContentBrowser } from './content/browser.vue';
44
+
45
+ ////////////////////////////////////////////
46
+
47
+ export { default as QikModal } from './modal/Modal.vue';
48
+ export { default as QikConfirmModal } from './modal/ConfirmModal.vue';
49
+ export { default as QikOptionsModal } from './modal/OptionsModal.vue';
50
+ export { default as QikPromptModal } from './modal/PromptModal.vue';
51
+ export { default as QikContentModal } from './modal/ContentModal.vue';
52
+
53
+
54
+ //Services
55
+ export { default as Selection } from './services/selection.js';
56
+
57
+ ////////////////////////////////////////////
11
58
 
59
+ //Create a default set of components
12
60
  import FlexColumn from './layout/flex-column.vue';
13
61
  import FlexBody from './layout/flex-body.vue';
14
62
  import FlexHeader from './layout/flex-header.vue';
15
63
  import FlexFooter from './layout/flex-footer.vue';
64
+ import FlexRow from './layout/flex-row.vue';
65
+ import FlexCell from './layout/flex-cell.vue';
66
+ import FlexSpacer from './layout/flex-spacer.vue';
67
+ import Panel from './layout/panel.vue';
68
+ import PanelBody from './layout/panel-body.vue';
69
+ import PanelHeader from './layout/panel-header.vue';
70
+ import PanelFooter from './layout/panel-footer.vue';
16
71
 
17
- ////////////////////////////////////////////
72
+ import UXButton from './ui/button.vue';
73
+ import UXSwitch from './ui/switch.vue';
74
+ import UXCheckbox from './ui/checkbox.vue';
75
+ import UXIcon from './ui/icon.vue';
76
+ import UXMenu from './ui/menu.vue';
77
+ import UXImage from './ui/image.vue';
78
+ import UXLink from './ui/link.vue';
79
+ import UXList from './ui/list.vue';
80
+ import UXListItem from './ui/list-item.vue';
81
+ import Spinner from './ui/spinner.vue';
82
+ import ProgressBar from './ui/progressbar.vue';
18
83
 
19
- export default {
84
+ import UXForm from './form/form.vue';
85
+ import UXFormField from './form/field.vue';
86
+
87
+ import UXRender from './content/render/render.vue';
88
+ import UXRenderField from './content/render/field.vue';
89
+
90
+
91
+ //Modals
92
+ import QikModal from './modal/Modal.vue';
93
+ import QikConfirmModal from './modal/ConfirmModal.vue';
94
+ import QikOptionsModal from './modal/OptionsModal.vue';
95
+ import QikPromptModal from './modal/PromptModal.vue';
96
+ import QikContentModal from './modal/ContentModal.vue';
97
+
98
+ const defaultComponents = {
20
99
  FlexColumn,
21
100
  FlexBody,
22
101
  FlexHeader,
23
102
  FlexFooter,
24
- };
103
+ FlexCell,
104
+ FlexSpacer,
105
+ FlexRow,
106
+ Panel,
107
+ PanelBody,
108
+ PanelHeader,
109
+ PanelFooter,
110
+ UxList: UXList,
111
+ UxListItem: UXListItem,
112
+ UxForm: UXForm,
113
+ UxFormField: UXFormField,
114
+ UxRender: UXRender,
115
+ UxRenderField: UXRenderField,
116
+ UxIcon: UXIcon,
117
+ UxMenu:UXMenu,
118
+ UxImage:UXImage,
119
+ UxButton: UXButton,
120
+ UxCheckbox: UXCheckbox,
121
+ UxSwitch: UXSwitch,
122
+ UxLink: UXLink,
123
+ Spinner,
124
+ ProgressBar,
125
+ QikModal,
126
+ }
127
+
128
+
129
+ ////////////////////////////////////////////
130
+
131
+ import { reactive, watchEffect } from 'vue'
132
+ export default {
133
+ install(Vue, qik) {
134
+ console.log(versionName)
135
+
136
+ //////////////////////////////
137
+
138
+ //Create an array for our modal stack
139
+ qik.modals = reactive([]);
140
+
141
+ //Base modal function
142
+ qik.modal = function(modal) {
143
+
144
+ return new Promise(function(resolve, reject) {
145
+ modal.id = qik.modals.length;
146
+ modal.resolve = resolve;
147
+ modal.reject = reject;
148
+
149
+ //Add our modal to the stack
150
+ qik.modals.splice(modal.id, 0, modal);
151
+ });
152
+
153
+ }
154
+
155
+ //Quick function for asking the user to select an option
156
+ qik.browse = function(type, options) {
157
+ options = options || {}
158
+ options.type = type;
159
+ options.model = options.model || [];
160
+
161
+ return qik.modal({
162
+ component: QikContentModal,
163
+ options,
164
+ })
165
+
166
+ }
167
+
168
+ //Quick function for asking the user to select an option
169
+ qik.options = function(choices, title, description) {
170
+
171
+ return qik.modal({
172
+ component: QikOptionsModal,
173
+ options: {
174
+ title,
175
+ description,
176
+ choices,
177
+ }
178
+ })
179
+
180
+ }
181
+
182
+ //Prompt the user to input data into a form
183
+ qik.prompt = function(fields, options) {
184
+ options = options || {};
185
+ options.model = options.model || {}
186
+
187
+
188
+ //Append the fields
189
+ options.fields = fields;
190
+
191
+ return qik.modal({
192
+ component: QikPromptModal,
193
+ options,
194
+ })
195
+
196
+ }
197
+
198
+ //Prompt the user to confirm an action
199
+ qik.confirm = function(title, options) {
200
+ options = options || {};
201
+
202
+ options.title = title;
203
+
204
+ return qik.modal({
205
+ component: QikConfirmModal,
206
+ options,
207
+ })
208
+ }
209
+
210
+ qik.closeModal = function(id) {
211
+ var modal = qik.modals.find(function(modal) {
212
+ return modal.id == id;
213
+ })
214
+
215
+ var index = qik.modals.indexOf(modal);
216
+ qik.modals.splice(index, 1);
217
+ }
218
+
219
+ //////////////////////////////
220
+
221
+ //Add all of the UI Library components
222
+ for (const prop in defaultComponents) {
223
+ const component = defaultComponents[prop];
224
+ Vue.component(prop, component)
225
+ }
226
+ }
227
+ }