@qikdev/vue-ui 0.1.2 → 0.1.8

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 (92) hide show
  1. package/README.md +4 -89
  2. package/dist/favicon.ico +0 -0
  3. package/dist/index.css +1 -0
  4. package/dist/lib.es.js +17802 -0
  5. package/dist/lib.es.js.map +1 -0
  6. package/dist/lib.umd.js +9 -0
  7. package/dist/lib.umd.js.map +1 -0
  8. package/package.json +31 -24
  9. package/.gitlab-ci.yml +0 -13
  10. package/jsdoc.conf +0 -10
  11. package/src/components.js +0 -255
  12. package/src/content/browser.vue +0 -842
  13. package/src/content/item.vue +0 -48
  14. package/src/content/render/field.vue +0 -431
  15. package/src/content/render/group.vue +0 -65
  16. package/src/content/render/render-mixin.js +0 -101
  17. package/src/content/render/render.vue +0 -86
  18. package/src/filter/FilterBuilder.vue +0 -145
  19. package/src/filter/FilterCondition.vue +0 -373
  20. package/src/filter/FilterRule.vue +0 -259
  21. package/src/form/expressions/index.js +0 -83
  22. package/src/form/field.vue +0 -640
  23. package/src/form/form.vue +0 -280
  24. package/src/form/getDefaultValue.js +0 -226
  25. package/src/form/inputs/button-select.vue +0 -208
  26. package/src/form/inputs/checkbox.vue +0 -91
  27. package/src/form/inputs/content-select.vue +0 -187
  28. package/src/form/inputs/currency.vue +0 -205
  29. package/src/form/inputs/datefield.vue +0 -132
  30. package/src/form/inputs/group.vue +0 -155
  31. package/src/form/inputs/html.vue +0 -39
  32. package/src/form/inputs/input-mixin.js +0 -440
  33. package/src/form/inputs/native-select-old.vue +0 -43
  34. package/src/form/inputs/object-field.vue +0 -50
  35. package/src/form/inputs/option.vue +0 -19
  36. package/src/form/inputs/options-manager.vue +0 -244
  37. package/src/form/inputs/phone-number-input.vue +0 -235
  38. package/src/form/inputs/search.vue +0 -117
  39. package/src/form/inputs/select.vue +0 -229
  40. package/src/form/inputs/switch.vue +0 -87
  41. package/src/form/inputs/textarea.vue +0 -80
  42. package/src/form/inputs/textfield.vue +0 -185
  43. package/src/form/inputs/timezone.vue +0 -642
  44. package/src/form/inputs/type-select.vue +0 -247
  45. package/src/form/inputs/upload/filedrop.vue +0 -72
  46. package/src/form/inputs/upload/upload.vue +0 -323
  47. package/src/form/parseBoolean.js +0 -24
  48. package/src/layout/flex-body.vue +0 -23
  49. package/src/layout/flex-cell.vue +0 -45
  50. package/src/layout/flex-column.vue +0 -31
  51. package/src/layout/flex-footer.vue +0 -14
  52. package/src/layout/flex-header.vue +0 -14
  53. package/src/layout/flex-row.vue +0 -39
  54. package/src/layout/flex-spacer.vue +0 -18
  55. package/src/layout/panel-body.vue +0 -13
  56. package/src/layout/panel-footer.vue +0 -20
  57. package/src/layout/panel-header.vue +0 -20
  58. package/src/layout/panel.vue +0 -23
  59. package/src/layout/tab.vue +0 -34
  60. package/src/layout/tabset.vue +0 -72
  61. package/src/mixins/RememberScroll.js +0 -30
  62. package/src/modal/ConfirmModal.vue +0 -50
  63. package/src/modal/ContentModal.vue +0 -107
  64. package/src/modal/Modal.vue +0 -86
  65. package/src/modal/ModalMixin.js +0 -21
  66. package/src/modal/OptionsModal.vue +0 -31
  67. package/src/modal/PromptModal.vue +0 -31
  68. package/src/services/device.js +0 -211
  69. package/src/services/selection.js +0 -165
  70. package/src/table/Table.vue +0 -316
  71. package/src/table/TableCell.vue +0 -113
  72. package/src/table/TableRow.vue +0 -82
  73. package/src/table/cells/Button.vue +0 -56
  74. package/src/table/cells/TableCellMixin.js +0 -15
  75. package/src/table/cells/Thumbnail.vue +0 -39
  76. package/src/table/cells/Value.vue +0 -46
  77. package/src/ui/button.vue +0 -255
  78. package/src/ui/checkbox.vue +0 -79
  79. package/src/ui/icon.vue +0 -57
  80. package/src/ui/image.vue +0 -158
  81. package/src/ui/link.vue +0 -62
  82. package/src/ui/list-item.vue +0 -22
  83. package/src/ui/list.vue +0 -26
  84. package/src/ui/menu.vue +0 -147
  85. package/src/ui/pager.vue +0 -156
  86. package/src/ui/progressbar.vue +0 -77
  87. package/src/ui/spinner.vue +0 -26
  88. package/src/ui/switch.vue +0 -89
  89. package/src/version.js +0 -1
  90. package/test/index.spec.js +0 -42
  91. package/test/mocha.opts +0 -0
  92. package/yarn-error.log +0 -2923
@@ -1,31 +0,0 @@
1
- <template>
2
- <flex-column>
3
- <flex-header>
4
- Prompt
5
- </flex-header>
6
- <flex-body>
7
- Prompt
8
- </flex-body>
9
- <flex-footer>
10
- <flex-row>
11
- <flex-cell>
12
- <ux-button @click="dismiss">Cancel</ux-button>
13
- </flex-cell>
14
-
15
- <flex-cell>
16
- <ux-button @click="done">Done</ux-button>
17
- </flex-cell>
18
- </flex-row>
19
- </flex-footer>
20
- </flex-column>
21
- </template>
22
- <script>
23
-
24
- import ModalMixin from './ModalMixin';
25
-
26
- export default {
27
- mixins:[ModalMixin],
28
- }
29
- </script>
30
- <style lang="scss">
31
- </style>
@@ -1,211 +0,0 @@
1
-
2
- import { reactive } from 'vue'
3
-
4
- export default function() {
5
-
6
- var service = reactive({
7
- mounted:false,
8
- screen: {
9
- width: 1024,
10
- height: 768,
11
- },
12
- limits: {
13
- xs: 600,
14
- sm: 960,
15
- md: 1264,
16
- lg: 1904,
17
- },
18
- breakpoint: {
19
- mobile: false,
20
- tablet: false,
21
- desktop: false,
22
- xs: false,
23
- sm: false,
24
- md: false,
25
- lg: false,
26
- xl: false,
27
- xsOnly: false,
28
- smOnly: false,
29
- smAndDown: false,
30
- smAndUp: false,
31
- mdOnly: false,
32
- mdAndDown: false,
33
- mdAndUp: false,
34
- lgOnly: false,
35
- lgAndDown: false,
36
- lgAndUp: false,
37
- xlOnly: false,
38
- point: 0,
39
- },
40
- });
41
-
42
- ////////////////////////////////
43
-
44
- var mounted;
45
- let WindowReference;
46
-
47
- ////////////////////////////////
48
-
49
- service.resize = function() {
50
- console.log('RESIZE')
51
-
52
- var width = Math.max(WindowReference.innerWidth || 0);
53
- var height = Math.max(WindowReference.innerHeight || 0);
54
-
55
- service.screen = {
56
- width,
57
- height,
58
- }
59
-
60
- ///////////////////////////////////////////
61
-
62
- var breakpoint = {
63
- mobile: false,
64
- tablet: false,
65
- desktop: false,
66
- xs: false,
67
- sm: false,
68
- md: false,
69
- lg: false,
70
- xl: false,
71
- xsOnly: false,
72
- smOnly: false,
73
- smAndDown: false,
74
- smAndUp: false,
75
- mdOnly: false,
76
- mdAndDown: false,
77
- mdAndUp: false,
78
- lgOnly: false,
79
- lgAndDown: false,
80
- lgAndUp: false,
81
- xlOnly: false,
82
- point: 0,
83
- }
84
-
85
- ///////////////////////////////////////////
86
-
87
- var point = 0;
88
-
89
- if (width > service.limits.xs) {
90
- point++;
91
- }
92
-
93
- if (width > service.limits.sm) {
94
- point++;
95
- }
96
-
97
- if (width > service.limits.md) {
98
- point++;
99
- }
100
-
101
- if (width > service.limits.lg) {
102
- point++;
103
- }
104
-
105
- ///////////////////////////////////////////
106
-
107
- //XS Mobile
108
- if (point < 1) {
109
- breakpoint.mobile = true;
110
- breakpoint.xs = true;
111
- breakpoint.xsOnly = true;
112
-
113
- //Down
114
- breakpoint.smAndDown = true;
115
- breakpoint.mdAndDown = true;
116
- breakpoint.lgAndDown = true;
117
-
118
- }
119
-
120
- //SM Tablet
121
- if (point == 1) {
122
- breakpoint.tablet = true;
123
- breakpoint.sm = true;
124
- breakpoint.smOnly = true;
125
-
126
- //Down
127
- breakpoint.smAndDown = true;
128
- breakpoint.mdAndDown = true;
129
- breakpoint.lgAndDown = true;
130
-
131
- //Up
132
- breakpoint.smAndUp = true;
133
- }
134
-
135
- //MD Tablet
136
- if (point == 2) {
137
- breakpoint.desktop = true;
138
- breakpoint.md = true;
139
- breakpoint.mdOnly = true;
140
- //Down
141
- breakpoint.mdAndDown = true;
142
- breakpoint.lgAndDown = true;
143
-
144
- //Up
145
- breakpoint.smAndUp = true;
146
- breakpoint.mdAndUp = true;
147
- }
148
-
149
- //LG Desktop
150
- if (point == 3) {
151
- breakpoint.desktop = true;
152
- breakpoint.lg = true;
153
- breakpoint.lgOnly = true;
154
- //Down
155
- breakpoint.lgAndDown = true;
156
-
157
- //Up
158
- breakpoint.smAndUp = true;
159
- breakpoint.mdAndUp = true;
160
- breakpoint.lgAndUp = true;
161
- }
162
-
163
- //XL Desktop
164
- if (point > 3) {
165
- breakpoint.desktop = true;
166
- breakpoint.xl = true;
167
- breakpoint.xlOnly = true;
168
- //Up
169
- breakpoint.smAndUp = true;
170
- breakpoint.mdAndUp = true;
171
- breakpoint.lgAndUp = true;
172
- }
173
-
174
-
175
- service.point = point;
176
- service.breakpoint = breakpoint;
177
-
178
- // console.log('SERVICE', point, service.screen, breakpoint)
179
-
180
- }
181
-
182
-
183
- ////////////////////////////////
184
-
185
- service.mount = function(window) {
186
- if (mounted) {
187
- return;
188
- }
189
-
190
- WindowReference = window;
191
- service.resize();
192
- mounted = true;
193
- service.mounted = true;
194
- WindowReference.addEventListener('resize', service.resize);
195
- }
196
-
197
-
198
- ////////////////////////////////
199
-
200
- service.unmount = function() {
201
- WindowReference.removeEventListener('resize', service.resize);
202
- WindowReference = false;
203
- mounted = false;
204
- service.mounted = false;
205
- }
206
-
207
- ////////////////////////////////
208
-
209
- return service;
210
-
211
- }
@@ -1,165 +0,0 @@
1
- import { reactive, watch } from 'vue';
2
- import { EventDispatcher } from '@qikdev/sdk';
3
-
4
- export default function(options) {
5
-
6
- options = options || {};
7
- let minimum = Math.max(parseInt(options.minimum || 0), 0);
8
- let maximum = Math.max(parseInt(options.maximum || 0), 0);
9
-
10
- ///////////////////////////////////
11
-
12
- const service = EventDispatcher({})
13
-
14
- ///////////////////////////////////
15
-
16
- const selection = reactive([]);
17
- let hash = {};
18
-
19
- ///////////////////////////////////
20
-
21
-
22
- watch(selection, function() {
23
- recreateHash();
24
- });
25
-
26
- ///////////////////////////////////
27
-
28
- function recreateHash() {
29
- hash = selection.reduce(function(set, item) {
30
-
31
- var id = item._id || item.id;
32
- if (!id) {
33
- return;
34
- }
35
- set[id] = item;
36
- return set;
37
- }, {});
38
-
39
- }
40
- ///////////////////////////////////
41
-
42
- service.isSelected = function(item) {
43
- return hash[item._id || item.id];
44
- }
45
-
46
- service.select = function(item, ignoreDispatch) {
47
-
48
-
49
- //If there is a limit set
50
- if (maximum) {
51
- //But we are at or past the limit
52
- if (selection.length >= maximum) {
53
- if (maximum === 1) {
54
- //Clear the selection
55
- selection.length = 0;
56
- }
57
- }
58
- }
59
-
60
- //Check if this item is already selected
61
- if (service.isSelected(item)) {
62
- return;
63
- }
64
-
65
- //Add the item into the selection array
66
- selection.push(item);
67
-
68
- if (!ignoreDispatch) {
69
- service.dispatch('change', selection);
70
- }
71
- }
72
-
73
- service.deselect = function(item, ignoreDispatch) {
74
-
75
-
76
- //If we can only select one item
77
- //then just clear the selection
78
- if (maximum === 1) {
79
- selection.length = 0;
80
- return;
81
- }
82
-
83
- //Find the index of the item
84
- var index = selection.findIndex(function(entry) {
85
- return (entry._id && entry._id == item._id) || (entry.id && entry.id == item.id)
86
- })
87
-
88
- //If there was no index found
89
- if (index == -1) {
90
- return;
91
- }
92
-
93
- //remove it from the array
94
- selection.splice(index, 1);
95
- if (!ignoreDispatch) {
96
- service.dispatch('change', selection);
97
- }
98
-
99
- }
100
-
101
- service.toggle = function(item, ignoreDispatch) {
102
-
103
- if (service.isSelected(item)) {
104
- service.deselect(item, ignoreDispatch);
105
- } else {
106
- service.select(item, ignoreDispatch);
107
- }
108
- }
109
-
110
- service.selectMultiple = function(array) {
111
-
112
-
113
- array.forEach(function(item) {
114
- service.select(item, true);
115
- })
116
-
117
- service.dispatch('change', selection);
118
- }
119
-
120
- service.deselectMultiple = function(array) {
121
-
122
-
123
- array.forEach(function(item) {
124
- service.deselect(item, true);
125
- })
126
-
127
- service.dispatch('change', selection);
128
- }
129
-
130
- service.setSelection = function(array) {
131
-
132
-
133
- selection.length = 0;
134
- setTimeout(function() {
135
- service.selectMultiple(array);
136
- })
137
-
138
- }
139
-
140
- service.deselectAll = function() {
141
- selection.length = 0;
142
- service.dispatch('change', selection);
143
- }
144
-
145
- ///////////////////////////////////
146
-
147
-
148
- Object.defineProperty(service, 'items', {
149
- value: selection,
150
- writable: false,
151
- });
152
-
153
- ///////////////////////////////////
154
-
155
- Object.defineProperty(service, 'hash', {
156
- get() {
157
- return hash;
158
- }
159
- });
160
-
161
-
162
- ///////////////////////////////////
163
-
164
- return service;
165
- }