@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,45 +0,0 @@
1
- <template>
2
- <div class="flex-cell">
3
- <slot></slot>
4
- </div>
5
- </template>
6
- <script>
7
-
8
- export default {
9
- }
10
-
11
- </script>
12
- <style scoped lang="scss">
13
- .flex-cell {
14
- overflow: hidden;
15
- flex: 1;
16
- flex-direction: row;
17
-
18
- &[flex] {
19
- display: flex;
20
- }
21
-
22
- &[center] {
23
- display: flex;
24
- align-items: center;
25
- justify-content: center;
26
- }
27
-
28
- &[vcenter] {
29
- display: flex;
30
- align-items: center;
31
- }
32
-
33
- &[align-bottom] {
34
- display: flex;
35
- align-items: self-end;
36
- }
37
-
38
- &[shrink] {
39
- flex:none;
40
- }
41
- }
42
-
43
-
44
-
45
- </style>
@@ -1,31 +0,0 @@
1
- <template>
2
- <div class="flex-column">
3
- <slot></slot>
4
- </div>
5
- </template>
6
- <script>
7
-
8
- export default {
9
- }
10
-
11
- </script>
12
- <style scoped lang="scss">
13
- .flex-column {
14
- display: flex;
15
- overflow: hidden;
16
- flex: 1;
17
- flex-direction: column;
18
-
19
- &[center] {
20
- align-items: center;
21
- justify-content: center;
22
- }
23
-
24
- &[shrink] {
25
- flex:none;
26
- }
27
- }
28
-
29
-
30
-
31
- </style>
@@ -1,14 +0,0 @@
1
- <template>
2
- <div class="flex-column-footer">
3
- <slot></slot>
4
- </div>
5
- </template>
6
- <script>
7
- export default {
8
- }
9
- </script>
10
- <style scoped lang="scss">
11
- .flex-column-footer {
12
- flex: none;
13
- }
14
- </style>
@@ -1,14 +0,0 @@
1
- <template>
2
- <div class="flex-column-header">
3
- <slot></slot>
4
- </div>
5
- </template>
6
- <script>
7
- export default {
8
- }
9
- </script>
10
- <style scoped lang="scss">
11
- .flex-column-header {
12
- flex: none;
13
- }
14
- </style>
@@ -1,39 +0,0 @@
1
- <template>
2
- <div class="flex-row">
3
- <slot></slot>
4
- </div>
5
- </template>
6
- <script>
7
-
8
- export default {
9
- }
10
-
11
- </script>
12
- <style scoped lang="scss">
13
- .flex-row {
14
- display: flex;
15
- overflow: hidden;
16
- flex: 1;
17
- flex-direction: row;
18
-
19
- &[center] {
20
- align-items: center;
21
- justify-content: center;
22
- }
23
-
24
- &[vcenter] {
25
- align-items: center;
26
- }
27
-
28
- &[wrap] {
29
- flex-wrap: wrap;
30
- }
31
-
32
- &[gap] {
33
- gap: 0.4em;
34
- }
35
- }
36
-
37
-
38
-
39
- </style>
@@ -1,18 +0,0 @@
1
- <template>
2
- <div class="flex-spacer"/>
3
- </template>
4
- <script>
5
-
6
- export default {
7
- }
8
-
9
- </script>
10
- <style scoped lang="scss">
11
- .flex-spacer {
12
- padding:0.25em;
13
- flex:1;
14
- }
15
-
16
-
17
-
18
- </style>
@@ -1,13 +0,0 @@
1
- <template>
2
- <div class="panel-body">
3
- <slot></slot>
4
- </div>
5
- </template>
6
- <script>
7
- export default {}
8
- </script>
9
- <style lang="scss" scoped>
10
- .panel-body {
11
- padding: 1em;
12
- }
13
- </style>
@@ -1,20 +0,0 @@
1
- <template>
2
- <div class="panel-footer">
3
- <slot></slot>
4
- </div>
5
- </template>
6
- <script>
7
-
8
- export default {
9
- }
10
-
11
- </script>
12
- <style lang="scss" scoped>
13
- .panel-footer {
14
- padding:0.5em 1em;
15
- border-top:1px solid rgba(#000,0.1);
16
- }
17
-
18
-
19
-
20
- </style>
@@ -1,20 +0,0 @@
1
- <template>
2
- <div class="panel-header">
3
- <slot></slot>
4
- </div>
5
- </template>
6
- <script>
7
-
8
- export default {
9
- }
10
-
11
- </script>
12
- <style lang="scss" scoped>
13
- .panel-header {
14
- padding:0.5em 0.5em 0.5em 1em;
15
- border-bottom:1px solid rgba(#000,0.1);
16
- }
17
-
18
-
19
-
20
- </style>
@@ -1,23 +0,0 @@
1
- <template>
2
- <div class="panel">
3
- <slot></slot>
4
- </div>
5
- </template>
6
- <script>
7
-
8
- export default {
9
- }
10
-
11
- </script>
12
- <style lang="scss" scoped>
13
- .panel {
14
- border-radius: 0.3em;
15
- border:1px solid rgba(#000,0.1);
16
- margin-bottom: 1em;
17
- box-shadow: 0 4px 4px 0px rgba(0, 0, 0, 0.02);
18
-
19
- }
20
-
21
-
22
-
23
- </style>
@@ -1,34 +0,0 @@
1
- <template>
2
- <flex-column>
3
-
4
- <slot/>
5
-
6
- </flex-column>
7
- </template>
8
- <script>
9
- export default {
10
- props:{
11
- heading:{
12
- type:String,
13
- required:true,
14
- }
15
- },
16
- data() {
17
- return {
18
- isActive:false,
19
- }
20
- },
21
- computed:{
22
- active:{
23
- get() {
24
- return this.isActive;
25
- },
26
- set(a) {
27
- this.isActive = a;
28
- }
29
- }
30
- }
31
- }
32
- </script>
33
- <style lang="scss" scoped>
34
- </style>
@@ -1,72 +0,0 @@
1
- <template>
2
- <flex-column>
3
- <flex-header class="tabset-menu">
4
- <flex-row>
5
- <a :class="{active:index === activeIndex}" v-for="(tab, index) in tabs" @click="select(index)">{{tab.props.heading}}</a>
6
- </flex-row>
7
- </flex-header>
8
- <flex-column>
9
- <flex-column v-show="index === activeIndex" :key="index" v-for="(tab, index) in tabs">
10
- <component :is="tab" />
11
- </flex-column>
12
- <!-- -->
13
- <!-- <slot/> -->
14
- </flex-column>
15
- </flex-column>
16
- </template>
17
- <script>
18
- export default {
19
- data() {
20
- return {
21
- activeIndex: 0,
22
- }
23
- },
24
- methods: {
25
- select(i) {
26
- console.log('SELECT', this.activeIndex)
27
- this.activeIndex = i;
28
- },
29
- },
30
- computed: {
31
- tabs() {
32
-
33
- var slotChildren = this.$slots.default()
34
- // .map(function(t) {
35
- // return t.children;
36
- // });
37
- console.log('SLOT CHILDREN', slotChildren);
38
- return slotChildren;
39
-
40
- //
41
- // return [];
42
- }
43
- },
44
- }
45
- </script>
46
- <style lang="scss" scoped>
47
-
48
- .tabset-menu {
49
- background: rgba(#000, 0.05);
50
-
51
- a {
52
- display: block;
53
- flex:1;
54
- align-items: center;
55
- padding:1em;
56
- text-transform: uppercase;
57
- text-align: center;
58
- letter-spacing: 0.05em;
59
- cursor: pointer;
60
- color: rgba(#000, 0.5);
61
- font-weight: bold;
62
- border-top:3px solid transparent;
63
-
64
- &.active {
65
- background: #fff;
66
- color: $primary;
67
- border-top:3px solid $primary;
68
- }
69
-
70
- }
71
- }
72
- </style>
@@ -1,30 +0,0 @@
1
-
2
- export default {
3
- data() {
4
- return {
5
- scrollTop: 0,
6
- }
7
- },
8
- methods: {
9
- updateScroll(e) {
10
- var scroller = this.$refs.scroll;
11
- scroller = scroller.$el || scroller;
12
- this.scrollTop = scroller.scrollTop;
13
- },
14
- },
15
- mounted() {
16
- var scroller = this.$refs.scroll;
17
- scroller = scroller.$el || scroller;
18
- scroller.addEventListener('scroll', this.updateScroll);
19
- },
20
- beforeUnmount() {
21
- var scroller = this.$refs.scroll;
22
- scroller = scroller.$el || scroller;
23
- scroller.removeEventListener('scroll', this.updateScroll);
24
- },
25
- activated() {
26
- var scroller = this.$refs.scroll;
27
- scroller = scroller.$el || scroller;
28
- scroller.scrollTop = this.scrollTop;
29
- },
30
- }
@@ -1,50 +0,0 @@
1
- <template>
2
- <flex-column class="wrapper">
3
- <flex-body>
4
- <div class="padder">
5
- <h5>{{options.title}}</h5>
6
- <div>{{options.description}}</div>
7
- </div>
8
- </flex-body>
9
- <flex-footer>
10
- <div class="padder">
11
- <flex-row>
12
- <flex-cell>
13
- <ux-button @click="dismiss">Cancel</ux-button>
14
- </flex-cell>
15
-
16
- <flex-cell>
17
- <ux-button @click="close">Confirm</ux-button>
18
- </flex-cell>
19
- </flex-row>
20
- </div>
21
- </flex-footer>
22
- </flex-column>
23
- </template>
24
- <script>
25
-
26
- import ModalMixin from './ModalMixin';
27
-
28
- export default {
29
- mixins:[ModalMixin],
30
- }
31
- </script>
32
- <style lang="scss" scoped>
33
-
34
- .wrapper {
35
- border-radius: 0.5em;
36
- overflow: hidden;
37
- background: #fff;
38
- text-align: center;
39
-
40
- h5 {
41
- font-size: 1.2em;
42
- margin:0;
43
- }
44
-
45
- .padder {
46
- padding: 1em;
47
- }
48
- }
49
-
50
- </style>
@@ -1,107 +0,0 @@
1
- <template>
2
- <flex-column class="wrapper">
3
- <flex-column v-if="loading">
4
- Loading
5
- </flex-column>
6
- <template v-else>
7
- <template v-if="definition">
8
- <flex-header>
9
- <div class="header">
10
- <flex-row center>
11
- <flex-cell shrink>
12
- Select {{maximum == 1 ? title : plural}}
13
- </flex-cell>
14
- <flex-spacer />
15
- <flex-cell>
16
- <search v-model="search" :loading="searching" :debounce="500" placeholder="Search" />
17
- </flex-cell>
18
- <flex-spacer />
19
- <flex-cell shrink>
20
- <ux-button color="primary" @click="selectionComplete">Done</ux-button>
21
- </flex-cell>
22
- </flex-row>
23
- </div>
24
- </flex-header>
25
- <content-browser ref="browser" :search="search" @click:row="rowClicked" :maximum="options.maximum" v-model="model" :type="options.type" :options="browserOptions">
26
- </content-browser>
27
- </template>
28
-
29
- </template>
30
- </flex-column>
31
- </template>
32
- <script>
33
- import Search from '../form/inputs/search.vue';
34
-
35
- import ContentBrowser from '../content/browser.vue';
36
- import ModalMixin from './ModalMixin';
37
-
38
- export default {
39
- components: {
40
- ContentBrowser,
41
- Search,
42
- },
43
- mixins: [ModalMixin],
44
- async created() {
45
- var self = this;
46
- var glossary = await self.$qik.content.glossary({ hash: true });
47
- self.loading = false;
48
- var definition = glossary[self.type]
49
-
50
- if(!definition) {
51
- //Close immediately
52
- self.$qik.notify('You do not have the required permissions to list content of this type');
53
- self.dismiss()
54
- return;
55
- }
56
- self.definition = definition;
57
- },
58
- computed: {
59
- type() {
60
- return this.options.type;
61
- },
62
- title() {
63
- return this.definition.title;
64
- },
65
- plural() {
66
- return this.definition.plural;
67
- },
68
- maximum() {
69
- return this.options.maximum || 0;
70
- },
71
- browserOptions() {
72
- return {}
73
- },
74
- },
75
- data() {
76
- return {
77
- search: '',
78
- searching: false,
79
- definition: null,
80
- loading: true,
81
- model: this.options.model.slice(),
82
- }
83
- },
84
- methods: {
85
- rowClicked(row) {
86
- this.$refs.browser.toggle(row);
87
- },
88
- selectionComplete(data) {
89
- this.close(this.model);
90
- }
91
- }
92
- }
93
- </script>
94
- <style lang="scss" scoped>
95
- .wrapper {
96
- min-width: 80vw;
97
- min-height: 80vh;
98
- border-radius: 0.5em;
99
- overflow: hidden;
100
- }
101
-
102
- .header {
103
- background: #fff;
104
- padding: 1em;
105
- border-bottom: 1px solid rgba(#000, 0.1);
106
- }
107
- </style>
@@ -1,86 +0,0 @@
1
- <template>
2
- <div class="modal-wrapper">
3
- <div class="modal-blanket" @click="blanketClick"/>
4
- <div class="modal-content" :style="style">
5
- <component :options="modal.options" v-bind="componentProps" @close="close" @dismiss="dismiss" :is="modal.component" />
6
- </div>
7
- </div>
8
- </template>
9
- <script>
10
- export default {
11
- props: {
12
- modal: {
13
- type: Object,
14
- required: true,
15
- }
16
- },
17
- data() {
18
- return {}
19
- },
20
- methods: {
21
- blanketClick() {
22
- this.dismiss();
23
- },
24
- dismiss(err) {
25
- this.$qik.closeModal(this.modal.id);
26
- this.modal.reject(err);
27
- },
28
- close(value) {
29
- this.$qik.closeModal(this.modal.id);
30
- this.modal.resolve(value);
31
- }
32
- },
33
- computed: {
34
- componentProps() {
35
- return this.modal.componentProps || {};
36
- },
37
- style() {
38
-
39
- var styles = {}
40
-
41
- if(this.modal.style) {
42
- styles = Object.assign(styles, this.modal.style);
43
- }
44
-
45
- return styles;
46
- }
47
- }
48
- }
49
- </script>
50
- <style lang="scss" scoped>
51
- .modal-wrapper {
52
- margin:0;
53
- padding:0;
54
- position: fixed;
55
- top:0;
56
- left:0;
57
- right:0;
58
- bottom:0;
59
- display: flex;
60
- width:100vw;
61
- height: 100vh;
62
- height: -webkit-fill-available;
63
- z-index: 100;
64
- justify-content: center;
65
- align-items:center;
66
- overflow: hidden;
67
- box-sizing: border-box;
68
-
69
- .modal-blanket {
70
- position:absolute;
71
- background: rgba(#333, 0.5);
72
- left:0;
73
- top:0;
74
- right:0;
75
- bottom:0;
76
- }
77
-
78
- .modal-content {
79
- display: flex;
80
- overflow: hidden;
81
- z-index: 101;
82
- max-width: 90%;
83
- max-height: 90%;
84
- }
85
- }
86
- </style>
@@ -1,21 +0,0 @@
1
- export default {
2
- props:{
3
- options:{
4
- type:Object,
5
- default() {
6
- return {}
7
- }
8
- }
9
- },
10
- data() {
11
- return {}
12
- },
13
- methods: {
14
- dismiss(error) {
15
- this.$emit('dismiss', error);
16
- },
17
- close(result) {
18
- this.$emit('close',result);
19
- },
20
- }
21
- }
@@ -1,31 +0,0 @@
1
- <template>
2
- <flex-column>
3
- <flex-header>
4
- Options
5
- </flex-header>
6
- <flex-body>
7
- Options
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>