@monoui/vuejs 1.1.10

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 (83) hide show
  1. package/README.md +27 -0
  2. package/dist/main.js +410 -0
  3. package/package.json +105 -0
  4. package/src/components/BreadCrumb/BreadCrumb.vue +59 -0
  5. package/src/components/BreadCrumb/index.js +3 -0
  6. package/src/components/Button/Button.vue +118 -0
  7. package/src/components/Button/ButtonCore.vue +59 -0
  8. package/src/components/Button/ButtonEdit.vue +15 -0
  9. package/src/components/Button/ButtonRemove.vue +15 -0
  10. package/src/components/Button/index.js +4 -0
  11. package/src/components/Card/Card.vue +82 -0
  12. package/src/components/Card/CardBody.vue +72 -0
  13. package/src/components/Card/CardFooter.vue +55 -0
  14. package/src/components/Card/CardHeader.vue +58 -0
  15. package/src/components/Card/CardSubTitle.vue +43 -0
  16. package/src/components/Card/CardText.vue +21 -0
  17. package/src/components/Card/CardTitle.vue +38 -0
  18. package/src/components/Card/index.js +17 -0
  19. package/src/components/Checkbox/Checkbox.vue +72 -0
  20. package/src/components/Checkbox/index.js +3 -0
  21. package/src/components/Cron/Cron.vue +68 -0
  22. package/src/components/Cron/index.js +3 -0
  23. package/src/components/Date/DatePicker.vue +406 -0
  24. package/src/components/Date/index.js +3 -0
  25. package/src/components/Dropdown/Dropdown.vue +51 -0
  26. package/src/components/Dropdown/DropdownDivider.vue +12 -0
  27. package/src/components/Dropdown/DropdownItem.vue +23 -0
  28. package/src/components/Dropdown/index.js +5 -0
  29. package/src/components/DynamicInput/DynamicInput.vue +192 -0
  30. package/src/components/DynamicInput/index.js +3 -0
  31. package/src/components/DynamicInput/inputTypes.js +14 -0
  32. package/src/components/Icon/Icon.vue +43 -0
  33. package/src/components/Icon/index.js +3 -0
  34. package/src/components/Info/Info.vue +19 -0
  35. package/src/components/Info/index.js +3 -0
  36. package/src/components/Input/Input.vue +73 -0
  37. package/src/components/Input/index.js +3 -0
  38. package/src/components/KeyValue/KeyValue.vue +138 -0
  39. package/src/components/KeyValue/index.js +3 -0
  40. package/src/components/KeyValueInput/KeyValueInput.vue +203 -0
  41. package/src/components/KeyValueInput/index.js +3 -0
  42. package/src/components/Loader/Loader.vue +82 -0
  43. package/src/components/Loader/content-loader.js +150 -0
  44. package/src/components/Loader/index.js +2 -0
  45. package/src/components/Modal/Alert.vue +96 -0
  46. package/src/components/Modal/Modal.vue +125 -0
  47. package/src/components/Modal/RemoveAlert.vue +58 -0
  48. package/src/components/Modal/UnsavedChangesAlert.vue +83 -0
  49. package/src/components/Modal/index.js +6 -0
  50. package/src/components/MultiKeyValue/MultiKeyValue.vue +359 -0
  51. package/src/components/MultiKeyValue/index.js +3 -0
  52. package/src/components/NoData/NoData.vue +20 -0
  53. package/src/components/NoData/index.js +3 -0
  54. package/src/components/Popover/Popover.vue +91 -0
  55. package/src/components/Popover/index.js +3 -0
  56. package/src/components/Select/Select.vue +71 -0
  57. package/src/components/Select/index.js +3 -0
  58. package/src/components/Spinner/Spinner.vue +19 -0
  59. package/src/components/Spinner/index.js +3 -0
  60. package/src/components/Table/Icons/ArrowDown.vue +18 -0
  61. package/src/components/Table/Icons/ArrowDownLong.vue +18 -0
  62. package/src/components/Table/Icons/ArrowUp.vue +18 -0
  63. package/src/components/Table/Icons/ArrowUpLong.vue +18 -0
  64. package/src/components/Table/Icons/BaseIcon.vue +46 -0
  65. package/src/components/Table/Icons/Sorting.vue +16 -0
  66. package/src/components/Table/Icons/SortingAZ.vue +18 -0
  67. package/src/components/Table/Icons/SortingArrows.vue +18 -0
  68. package/src/components/Table/Table.vue +548 -0
  69. package/src/components/Table/index.js +3 -0
  70. package/src/components/Tabs/Tab.vue +36 -0
  71. package/src/components/Tabs/Tabs.vue +44 -0
  72. package/src/components/Tabs/index.js +4 -0
  73. package/src/components/TagInput/TagInput.vue +129 -0
  74. package/src/components/TagInput/index.js +3 -0
  75. package/src/components/Timeline/Timeline.vue +33 -0
  76. package/src/components/Timeline/TimelineItem.vue +40 -0
  77. package/src/components/Timeline/index.js +4 -0
  78. package/src/components/Tooltip/Tooltip.vue +62 -0
  79. package/src/components/Tooltip/index.js +3 -0
  80. package/src/functions/alert.js +40 -0
  81. package/src/functions/notification.js +51 -0
  82. package/src/icons.js +144 -0
  83. package/src/index.js +133 -0
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <b-dropdown-item v-on="$listeners" v-bind="$props">
3
+ <slot></slot>
4
+ </b-dropdown-item>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: "mui-dropdown-item",
10
+ props: {
11
+ to: {},
12
+ "link-class": {},
13
+ variant: {},
14
+ replace: {},
15
+ "exact-active-class": {},
16
+ "active-class": {},
17
+ disabled: {},
18
+ active: {},
19
+ target: {},
20
+ href: {}
21
+ }
22
+ };
23
+ </script>
@@ -0,0 +1,5 @@
1
+ import Dropdown from "./Dropdown";
2
+ import DropdownItem from "./DropdownItem";
3
+ import DropdownDivider from "./DropdownDivider";
4
+
5
+ export { Dropdown, DropdownItem, DropdownDivider };
@@ -0,0 +1,192 @@
1
+ <template>
2
+ <div>
3
+ <ValidationProvider
4
+ :rules="isRequired ? 'required' : ''"
5
+ in
6
+ v-slot="{ valid, errors }"
7
+ :name="property"
8
+ :id="property"
9
+ >
10
+ <b-form-input
11
+ :id="property"
12
+ v-model="bindValue"
13
+ type="text"
14
+ :state="
15
+ errors[0] && isRequired
16
+ ? false
17
+ : valid && isRequired
18
+ ? true
19
+ : null
20
+ "
21
+ trim
22
+ v-if="type == sourceType.Text"
23
+ ></b-form-input>
24
+
25
+ <b-form-input
26
+ :id="property"
27
+ v-model="bindValue"
28
+ type="number"
29
+ :state="
30
+ errors[0] && isRequired
31
+ ? false
32
+ : valid && isRequired
33
+ ? true
34
+ : null
35
+ "
36
+ trim
37
+ v-else-if="type == sourceType.Number"
38
+ :name="property"
39
+ ></b-form-input>
40
+
41
+ <b-form-checkbox
42
+ :name="property"
43
+ v-else-if="type == sourceType.YesOrNo"
44
+ v-model="bindValue"
45
+ :state="
46
+ errors[0] && isRequired
47
+ ? false
48
+ : valid && isRequired
49
+ ? true
50
+ : null
51
+ "
52
+ >Yes</b-form-checkbox
53
+ >
54
+ <b-form-input
55
+ :id="property"
56
+ v-model="bindValue"
57
+ type="date"
58
+ :state="
59
+ errors[0] && isRequired
60
+ ? false
61
+ : valid && isRequired
62
+ ? true
63
+ : null
64
+ "
65
+ trim
66
+ v-else-if="type == sourceType.Date"
67
+ ></b-form-input>
68
+ <b-form-select
69
+ v-model="bindValue"
70
+ :options="options"
71
+ v-else-if="type == sourceType.Dropdown"
72
+ class="nonBackground"
73
+ :state="
74
+ errors[0] && isRequired
75
+ ? false
76
+ : valid && isRequired
77
+ ? true
78
+ : null
79
+ "
80
+ ></b-form-select>
81
+ <mui-editor
82
+ :id="property"
83
+ v-else-if="type == sourceType.Json"
84
+ v-model="bindValue"
85
+ language="json"
86
+ :compact="true"
87
+ />
88
+ <mui-key-value-input
89
+ :id="property"
90
+ v-model="bindValue"
91
+ v-else-if="type == sourceType.KeyValue"
92
+ />
93
+ <mui-multi-key-value
94
+ :id="property"
95
+ v-model="bindValue"
96
+ v-else-if="type == sourceType.MultiKeyValue"
97
+ :typeOptions="options"
98
+ modeName="Mode"
99
+ typeName="Type"
100
+ keyName="Key"
101
+ valueName="Value"
102
+ activeName="IsActive"
103
+ />
104
+ <b-form-textarea
105
+ :id="property"
106
+ v-model="bindValue"
107
+ v-else-if="type == sourceType.TextArea"
108
+ rows="3"
109
+ max-rows="10"
110
+ :state="
111
+ errors[0] && isRequired
112
+ ? false
113
+ : valid && isRequired
114
+ ? true
115
+ : null
116
+ "
117
+ />
118
+ <b-form-invalid-feedback>{{ errors[0] }}</b-form-invalid-feedback>
119
+ </ValidationProvider>
120
+ </div>
121
+ </template>
122
+ <script>
123
+ import ObjectInputTypes from "./inputTypes";
124
+
125
+ export default {
126
+ name: "mui-dynamic-input",
127
+ props: {
128
+ property: {
129
+ type: String,
130
+ required: true
131
+ },
132
+ value: {
133
+ required: false
134
+ },
135
+ type: {
136
+ required: false,
137
+ default: 1
138
+ },
139
+ isRequired: {
140
+ required: false,
141
+ default: false
142
+ },
143
+ data: {
144
+ type: String,
145
+ required: false,
146
+ default: null
147
+ }
148
+ },
149
+ computed: {
150
+ bindValue: {
151
+ get: function() {
152
+ return this.value;
153
+ },
154
+ set: function(value) {
155
+ this.$emit("input", value);
156
+ }
157
+ }
158
+ },
159
+ data() {
160
+ return {
161
+ sourceType: ObjectInputTypes,
162
+ options: []
163
+ };
164
+ },
165
+ mounted() {
166
+ if (this.type == this.sourceType.Dropdown && this.data != null) {
167
+ let data = JSON.parse(this.data);
168
+ data.forEach(item => {
169
+ this.options.push({ value: item.key, text: item.value });
170
+ });
171
+ }
172
+
173
+ if (this.type == this.sourceType.MultiKeyValue && this.data != null) {
174
+ let data = JSON.parse(this.data);
175
+ data.forEach(item => {
176
+ this.options.push({ value: item.key, text: item.value });
177
+ });
178
+ }
179
+ },
180
+ methods: {
181
+ changeValue(data) {
182
+ this.selectedValue = data.Text;
183
+ }
184
+ }
185
+ };
186
+ </script>
187
+
188
+ <style scoped>
189
+ .nonBackground {
190
+ background: none;
191
+ }
192
+ </style>
@@ -0,0 +1,3 @@
1
+ import DynamicInput from "./DynamicInput.vue";
2
+
3
+ export default DynamicInput;
@@ -0,0 +1,14 @@
1
+ export default {
2
+ SystemDefault: 0,
3
+ Text: 1,
4
+ Number: 2,
5
+ YesOrNo: 3,
6
+ Date: 4,
7
+ DateTime: 5,
8
+ Dropdown: 6,
9
+ Guid: 7,
10
+ Json: 8,
11
+ KeyValue: 9,
12
+ MultiKeyValue: 10,
13
+ TextArea: 11
14
+ };
@@ -0,0 +1,43 @@
1
+ <template>
2
+ <font-awesome-icon fw :icon="iconList" :class="iconClass" />
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "mui-icon",
8
+ props: {
9
+ /**
10
+ * Icon
11
+ * @type String
12
+ */
13
+ icon: {
14
+ type: [String, Array],
15
+ required: true
16
+ },
17
+ /**
18
+ * Prefix
19
+ * @type String
20
+ */
21
+ prefix: {
22
+ type: String,
23
+ required: false,
24
+ default: "fas"
25
+ },
26
+ /**
27
+ * Icon class
28
+ * @type String
29
+ */
30
+ iconClass: {
31
+ type: String,
32
+ default: ""
33
+ }
34
+ },
35
+ computed: {
36
+ iconList() {
37
+ if (typeof this.icon === "object")
38
+ return [this.prefix, ...this.icon];
39
+ return [this.prefix, this.icon];
40
+ }
41
+ }
42
+ };
43
+ </script>
@@ -0,0 +1,3 @@
1
+ import Icon from "./Icon.vue";
2
+
3
+ export default Icon;
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <div class="mt-2 mr-2">
3
+ <mui-icon :icon="icon" v-if="icon != null" class="mr-2" />
4
+ <span></span>
5
+ <slot />
6
+ </div>
7
+ </template>
8
+ <script>
9
+ export default {
10
+ name: "mui-info",
11
+ props: {
12
+ icon: {
13
+ type: String,
14
+ default: null,
15
+ required: false
16
+ }
17
+ }
18
+ };
19
+ </script>
@@ -0,0 +1,3 @@
1
+ import Info from "./Info.vue";
2
+
3
+ export default Info;
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <div>
3
+ <input
4
+ class="form-control"
5
+ :type="type"
6
+ :class="
7
+ `${innerClass} ${
8
+ state === false
9
+ ? 'is-invalid'
10
+ : state === true
11
+ ? 'is-valid'
12
+ : ''
13
+ }`
14
+ "
15
+ v-bind="$attrs"
16
+ :value="value"
17
+ v-on="inputListeners"
18
+ />
19
+ <div class="invalid-feedback" v-if="invalidMsg && !state">
20
+ {{ invalidMsg }}
21
+ </div>
22
+ <div class="valid-feedback" v-if="validMsg && state">
23
+ {{ validMsg }}
24
+ </div>
25
+ </div>
26
+ </template>
27
+ <script>
28
+ export default {
29
+ name: "mui-input",
30
+ computed: {
31
+ inputListeners: function() {
32
+ return {
33
+ ...this.$listeners,
34
+ input: event => this.$emit("input", event.target.value)
35
+ };
36
+ }
37
+ },
38
+ props: {
39
+ value: {},
40
+ type: {
41
+ type: String,
42
+ default: "text",
43
+ validator: prop =>
44
+ [
45
+ "text",
46
+ "email",
47
+ "date",
48
+ "number",
49
+ "password",
50
+ "tel",
51
+ "url"
52
+ ].includes(prop)
53
+ },
54
+ innerClass: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ state: {
59
+ type: Boolean,
60
+ default: null
61
+ },
62
+ invalidMsg: {
63
+ type: String,
64
+ default: null
65
+ },
66
+ validMsg: {
67
+ type: String,
68
+ default: null
69
+ }
70
+ }
71
+ };
72
+ </script>
73
+ <style scoped></style>
@@ -0,0 +1,3 @@
1
+ import Input from "./Input.vue";
2
+
3
+ export default Input;
@@ -0,0 +1,138 @@
1
+ <template>
2
+ <table class="table table-condensed table-hover">
3
+ <thead>
4
+ <tr>
5
+ <th scope="col" class="pl-0">
6
+ <template>
7
+ {{ keyTitle || keyName }}
8
+ <small>{{ keyName }}</small>
9
+ </template>
10
+ <input
11
+ type="text"
12
+ class="form-control"
13
+ v-model="dataMapping[keyName]"
14
+ @keyup.enter="addMapping"
15
+ />
16
+ </th>
17
+ <th scope="col">
18
+ <template>
19
+ {{ valueTitle || valueName }}
20
+ <small>{{ valueName }}</small>
21
+ </template>
22
+ <input
23
+ type="text"
24
+ class="form-control"
25
+ v-model="dataMapping[valueName]"
26
+ @keyup.enter="addMapping"
27
+ />
28
+ </th>
29
+ <th scope="col">
30
+ <button class="btn btn-light" @click="addMapping">
31
+ Add
32
+ </button>
33
+ </th>
34
+ </tr>
35
+ </thead>
36
+ <tbody>
37
+ <tr v-for="(mapping, index) in data" :key="index">
38
+ <td>{{ mapping[keyName] }}</td>
39
+ <td>{{ mapping[valueName] }}</td>
40
+ <td>
41
+ <button
42
+ class="btn btn-light"
43
+ @click="removeMapping(mapping[keyName])"
44
+ >
45
+ Delete
46
+ </button>
47
+ </td>
48
+ </tr>
49
+ </tbody>
50
+ </table>
51
+ </template>
52
+
53
+ <script>
54
+ export default {
55
+ name: "mui-key-value",
56
+ props: {
57
+ value: {
58
+ required: true
59
+ },
60
+ keyName: {
61
+ type: String,
62
+ default: "key"
63
+ },
64
+ keyTitle: {
65
+ type: String,
66
+ default: "key"
67
+ },
68
+ valueName: {
69
+ type: String,
70
+ default: "value"
71
+ },
72
+ valueTitle: {
73
+ type: String,
74
+ default: "value"
75
+ }
76
+ },
77
+ data() {
78
+ return {
79
+ dataMapping: {
80
+ [this.keyName]: null,
81
+ [this.valueName]: null
82
+ },
83
+ data: []
84
+ };
85
+ },
86
+ methods: {
87
+ addMapping() {
88
+ let keyValue = this.dataMapping[this.keyName];
89
+ if (keyValue === null) return;
90
+
91
+ let valueValue = this.dataMapping[this.valueName];
92
+ if (valueValue === null) return;
93
+
94
+ const isValidDataMapping =
95
+ keyValue.trim().replace(" ", "").length > 0 &&
96
+ valueValue.trim().replace(" ", "").length > 0;
97
+
98
+ const isHaveSameDataMapping = this.isHaveSameDataMapping();
99
+
100
+ if (isValidDataMapping && !isHaveSameDataMapping) {
101
+ this.data.push({
102
+ [this.keyName]: keyValue.trim().replace(" ", ""),
103
+ [this.valueName]: valueValue.trim().replace(" ", "")
104
+ });
105
+
106
+ this.$emit("input", this.data);
107
+
108
+ this.clearInputs();
109
+ }
110
+ },
111
+ isHaveSameDataMapping() {
112
+ let index = this.data.findIndex(val => {
113
+ return (
114
+ val[this.keyName] ==
115
+ this.dataMapping[this.keyName].trim().replace(" ", "")
116
+ );
117
+ });
118
+
119
+ return index !== -1;
120
+ },
121
+ clearInputs() {
122
+ this.dataMapping[this.keyName] = null;
123
+ this.dataMapping[this.valueName] = null;
124
+ },
125
+ removeMapping(key) {
126
+ key = key.trim().replace(" ", "");
127
+ let index = this.data.findIndex(val => {
128
+ return val[this.keyName] == key;
129
+ });
130
+ if (index !== -1) {
131
+ this.data.splice(index, 1);
132
+
133
+ this.$emit("input", this.data);
134
+ }
135
+ }
136
+ }
137
+ };
138
+ </script>
@@ -0,0 +1,3 @@
1
+ import KeyValue from "./KeyValue.vue";
2
+
3
+ export default KeyValue;