@nixweb/nixloc-ui 0.0.300 → 0.0.301

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 (158) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +13 -0
  3. package/src/component/forms/Button.vue +163 -0
  4. package/src/component/forms/ButtonFilter.vue +75 -0
  5. package/src/component/forms/ButtonGroup.vue +67 -0
  6. package/src/component/forms/ButtonSub.vue +98 -0
  7. package/src/component/forms/ButtonToggle.vue +77 -0
  8. package/src/component/forms/CheckboxGroup.vue +69 -0
  9. package/src/component/forms/CheckboxServer.vue +192 -0
  10. package/src/component/forms/CheckboxSimple.vue +60 -0
  11. package/src/component/forms/Color.vue +38 -0
  12. package/src/component/forms/DateTime.vue +170 -0
  13. package/src/component/forms/DateYearMonth.vue +193 -0
  14. package/src/component/forms/Dropdown.vue +236 -0
  15. package/src/component/forms/EditorHtml.vue +132 -0
  16. package/src/component/forms/FileUpload.vue +170 -0
  17. package/src/component/forms/ImageUpload.vue +214 -0
  18. package/src/component/forms/IncrementDecrement.vue +148 -0
  19. package/src/component/forms/InputAddressGoogle.vue +171 -0
  20. package/src/component/forms/InputCallToAction.vue +135 -0
  21. package/src/component/forms/InputDecimal.vue +153 -0
  22. package/src/component/forms/InputDecimalDiscount.vue +78 -0
  23. package/src/component/forms/InputNumber.vue +160 -0
  24. package/src/component/forms/InputPassword.vue +148 -0
  25. package/src/component/forms/InputTag.vue +125 -0
  26. package/src/component/forms/InputText.vue +174 -0
  27. package/src/component/forms/InputTextEdit.vue +69 -0
  28. package/src/component/forms/InputWhatsApp.vue +48 -0
  29. package/src/component/forms/Modal.vue +57 -0
  30. package/src/component/forms/RadioGroup.vue +91 -0
  31. package/src/component/forms/Select.vue +378 -0
  32. package/src/component/forms/SelectStatic.vue +198 -0
  33. package/src/component/forms/SideBar.vue +100 -0
  34. package/src/component/forms/Slider.vue +18 -0
  35. package/src/component/forms/TextArea.vue +138 -0
  36. package/src/component/forms/Toggle.vue +72 -0
  37. package/src/component/layout/Account.vue +131 -0
  38. package/src/component/layout/Alert.vue +88 -0
  39. package/src/component/layout/Badge.vue +111 -0
  40. package/src/component/layout/BarFloating.vue +68 -0
  41. package/src/component/layout/FixedBar.vue +103 -0
  42. package/src/component/layout/Gantt.vue +128 -0
  43. package/src/component/layout/Header.vue +56 -0
  44. package/src/component/layout/HideShow.vue +62 -0
  45. package/src/component/layout/IconMolded.vue +59 -0
  46. package/src/component/layout/LoadingFullPage.vue +27 -0
  47. package/src/component/layout/Menu.vue +287 -0
  48. package/src/component/layout/Molded.vue +30 -0
  49. package/src/component/layout/NewAccount.vue +136 -0
  50. package/src/component/layout/NewHeader.vue +60 -0
  51. package/src/component/layout/NewIconMolded.vue +71 -0
  52. package/src/component/layout/NewMenu.vue +456 -0
  53. package/src/component/layout/Panel.vue +185 -0
  54. package/src/component/layout/Popover.vue +126 -0
  55. package/src/component/layout/ScrollBar.vue +57 -0
  56. package/src/component/layout/Tab.vue +135 -0
  57. package/src/component/layout/Tag.vue +97 -0
  58. package/src/component/layout/Wizard.vue +211 -0
  59. package/src/component/rental/DisplayCalculatePeriod.vue +49 -0
  60. package/src/component/rental/DisplayPeriodRent.vue +55 -0
  61. package/src/component/rental/DisplayTotalization.vue +86 -0
  62. package/src/component/report/Fields.vue +109 -0
  63. package/src/component/report/Report.vue +314 -0
  64. package/src/component/report/ReportTable.vue +112 -0
  65. package/src/component/report/Totalization.vue +34 -0
  66. package/src/component/shared/CodeEditor.vue +128 -0
  67. package/src/component/shared/Collapse.vue +131 -0
  68. package/src/component/shared/Confirmation.vue +74 -0
  69. package/src/component/shared/DocumentEditor.vue +99 -0
  70. package/src/component/shared/DocumentPreview.vue +81 -0
  71. package/src/component/shared/DocumentPublic.vue +33 -0
  72. package/src/component/shared/ExportExcel.vue +56 -0
  73. package/src/component/shared/ExportPDF.vue +116 -0
  74. package/src/component/shared/FullCalendar.vue +174 -0
  75. package/src/component/shared/HeaderReport.vue +47 -0
  76. package/src/component/shared/HorizontalFilter.vue +64 -0
  77. package/src/component/shared/ListNotifications.vue +70 -0
  78. package/src/component/shared/Loading.vue +107 -0
  79. package/src/component/shared/LoadingCard.vue +65 -0
  80. package/src/component/shared/LoadingMoreButton.vue +23 -0
  81. package/src/component/shared/Messages.vue +109 -0
  82. package/src/component/shared/PDFViewer.vue +24 -0
  83. package/src/component/shared/Pagination.vue +108 -0
  84. package/src/component/shared/ParameterLegend.vue +169 -0
  85. package/src/component/shared/ProgressBar.vue +25 -0
  86. package/src/component/shared/QueryButton.vue +66 -0
  87. package/src/component/shared/Report.vue +200 -0
  88. package/src/component/shared/SaveCancel.vue +99 -0
  89. package/src/component/shared/Search.vue +174 -0
  90. package/src/component/shared/SelectOption.vue +162 -0
  91. package/src/component/shared/Table.vue +174 -0
  92. package/src/component/shared/TableButton.vue +36 -0
  93. package/src/component/shared/TableDraggable.vue +117 -0
  94. package/src/component/shared/TableImport.vue +93 -0
  95. package/src/component/shared/TableItem.vue +214 -0
  96. package/src/component/shared/TableTotalPerPage.vue +78 -0
  97. package/src/component/shared/TableTotalRecords.vue +44 -0
  98. package/src/component/shared/TableTotalization.vue +47 -0
  99. package/src/component/shared/TimeLine.vue +42 -0
  100. package/src/component/shared/Timer.vue +78 -0
  101. package/src/component/shared/Tip.vue +42 -0
  102. package/src/component/shared/Toast.vue +69 -0
  103. package/src/component/shared/ToggleTheme.vue +128 -0
  104. package/src/component/shared/TotalizationReport.vue +86 -0
  105. package/src/component/shared/VerticalFilter.vue +97 -0
  106. package/src/component/shared/automation/ActivitiesList.vue +44 -0
  107. package/src/component/shared/automation/AddRule.vue +61 -0
  108. package/src/component/shared/automation/AutomationBuilder.vue +27 -0
  109. package/src/component/shared/automation/DynamicComponentList.vue +86 -0
  110. package/src/component/shared/automation/SelectRule.vue +98 -0
  111. package/src/component/shared/automation/components/BillingByRent.vue +98 -0
  112. package/src/component/shared/automation/components/SendEmail.vue +94 -0
  113. package/src/component/shared/file-manager/FileManager.vue +391 -0
  114. package/src/component/shared/filter-builder/FilterBuilder.vue +221 -0
  115. package/src/component/shared/filter-builder/FilterQuery.vue +94 -0
  116. package/src/component/shared/query-builder/AddRule.vue +203 -0
  117. package/src/component/shared/query-builder/ConvertToOdata.js +86 -0
  118. package/src/component/shared/query-builder/DynamicComponent.vue +161 -0
  119. package/src/component/shared/query-builder/DynamicComponentList.vue +70 -0
  120. package/src/component/shared/query-builder/Fields.vue +93 -0
  121. package/src/component/shared/query-builder/QueryBuilder.vue +69 -0
  122. package/src/component/shared/query-builder/Rules.vue +68 -0
  123. package/src/component/shared/query-builder/SelectRule.vue +97 -0
  124. package/src/component/shared/query-builder/Tags.vue +59 -0
  125. package/src/component/shared/query-builder/utilities.js +22 -0
  126. package/src/component/signature/Payment.vue +161 -0
  127. package/src/component/signature/Warning.vue +76 -0
  128. package/src/component/template/ListViewWithDataHandler.vue +429 -0
  129. package/src/component/template/ReportCreateUpdate.vue +110 -0
  130. package/src/component/template/ViewTemplateConfiguration.vue +64 -0
  131. package/src/component/template/ViewTemplateDocumentView.vue +213 -0
  132. package/src/component/template/ViewTemplateImportFile.vue +347 -0
  133. package/src/component/template/ViewTemplateReportList.vue +217 -0
  134. package/src/component/template/ViewTemplateReportPreview.vue +432 -0
  135. package/src/component/template/ViewTemplateSelectOption.vue +46 -0
  136. package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -0
  137. package/src/component/template/ViewTemplateWithTable.vue +62 -0
  138. package/src/component/template/model/Report.js +6 -0
  139. package/src/component/training/Course.vue +344 -0
  140. package/src/component/training/CourseView.vue +190 -0
  141. package/src/component/value-objects/Address.js +11 -0
  142. package/src/component/value-objects/Address.vue +157 -0
  143. package/src/component/value-objects/Contact.js +7 -0
  144. package/src/component/value-objects/Contact.vue +106 -0
  145. package/src/component/value-objects/Person.js +10 -0
  146. package/src/component/value-objects/Person.vue +129 -0
  147. package/src/config/axios.js +9 -0
  148. package/src/config/dicas.js +15 -0
  149. package/src/config/router.js +14 -0
  150. package/src/config/token.js +15 -0
  151. package/src/main.js +23 -0
  152. package/src/store/modules/automation.js +31 -0
  153. package/src/store/modules/generic.js +816 -0
  154. package/src/store/modules/report.js +278 -0
  155. package/src/store/modules/user.js +67 -0
  156. package/src/store/modules/util.js +26 -0
  157. package/src/store/modules/validation.js +39 -0
  158. package/src/store/store.js +14 -0
@@ -0,0 +1,174 @@
1
+ <template>
2
+ <div class="form-group">
3
+ <label>
4
+ <i class="title class-icon-title" :class="classIconTitle"></i>
5
+ <span class="title" :style="'color: ' + titleColor">{{ title }} </span>
6
+ <span class="required" v-if="required">*</span>
7
+ <Tip :field="field" :formName="formName" />
8
+ </label>
9
+ <div class="inner-addon right-addon">
10
+ <div class="required glyphicon" v-if="notifications.length > 0 && formDirty">
11
+ <i class="fas fa-exclamation-triangle"></i>
12
+ </div>
13
+ <slot v-else></slot>
14
+ <input type="text" :style="_style" :placeholder="titlePlaceholder" :disabled="disabled"
15
+ @keyup.enter.prevent="pressedEnter" @keyup="cleanedField" @blur="outField" v-mask="mask || withoutMask"
16
+ v-bind:value="value" v-on:input="$emit('input', $event.target.value)" class="form-control"
17
+ :class="{ required: notifications.length > 0 && formDirty }" />
18
+ </div>
19
+ <div v-if="formDirty">
20
+ <div v-for="message in notifications" :key="message">
21
+ <span class="invalid">{{ message }}</span>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import Tip from "../shared/Tip.vue";
29
+ import { mapState, mapMutations } from "vuex";
30
+
31
+ export default {
32
+ components: { Tip },
33
+ name: "InputText",
34
+ props: [
35
+ "title",
36
+ "classIconTitle",
37
+ "field",
38
+ "placeholder",
39
+ "disabled",
40
+ "titleColor",
41
+ "mask",
42
+ "_style",
43
+ "formName",
44
+ "required",
45
+ "maxLength",
46
+ "value",
47
+ "enter",
48
+ "cleaned",
49
+ "exited",
50
+ "markFormDirty",
51
+ ],
52
+ data() {
53
+ return {
54
+ notifications: [],
55
+ formDirty: false,
56
+ withoutMask: {
57
+ mask: "*".repeat(255),
58
+ tokens: {
59
+ "*": { pattern: /./ },
60
+ },
61
+ },
62
+ };
63
+ },
64
+ created() {
65
+ this.validate();
66
+ },
67
+ methods: {
68
+ ...mapMutations("validation", [
69
+ "addValidation",
70
+ "removeValidation",
71
+ "updateFormDirty",
72
+ ]),
73
+ validate() {
74
+ this.notifications = [];
75
+
76
+ if (this.required && this.value.length == 0) {
77
+ var message = `${this.title} não pode ser vazio!`;
78
+ this.notifications.push(message);
79
+ }
80
+
81
+ if (this.maxLength > 0) {
82
+ if (this.value.length > this.maxLength) {
83
+ var message = `Máximo de ${this.maxLength} caracteres!`;
84
+ this.notifications.push(message);
85
+ }
86
+ }
87
+ },
88
+ pressedEnter() {
89
+ if (this.enter) this.enter();
90
+ },
91
+ outField() {
92
+ if (this.exited) this.exited();
93
+ },
94
+ cleanedField() {
95
+ if (this.value.length == 0) {
96
+ if (this.cleaned) this.cleaned();
97
+ }
98
+ },
99
+ },
100
+ computed: {
101
+ ...mapState("validation", ["resetForm", "validations"]),
102
+ titlePlaceholder() {
103
+ return "Digite o " + this.title;
104
+ },
105
+ },
106
+ watch: {
107
+ value() {
108
+ this.validate();
109
+ this.formDirty = true;
110
+ // inverti a validação devido não colocar o default como true no props
111
+ var _value = this.markFormDirty == undefined ? true : this.markFormDirty;
112
+ if (_value) this.updateFormDirty(true);
113
+ },
114
+ notifications() {
115
+ let self = this;
116
+ this.notifications.forEach(function (notification) {
117
+ let obj = {
118
+ key: self.field + "&" + self.formName,
119
+ formName: self.formName,
120
+ notification: notification,
121
+ };
122
+ self.addValidation(obj);
123
+ });
124
+
125
+ if (this.notifications.length == 0) {
126
+ let obj = {
127
+ key: self.field + "&" + self.formName,
128
+ formName: self.formName,
129
+ };
130
+ self.removeValidation(obj);
131
+ }
132
+ },
133
+ resetForm: {
134
+ handler(form) {
135
+ if (form.name == this.formName) this.formDirty = false;
136
+ },
137
+ deep: true,
138
+ },
139
+ },
140
+ };
141
+ </script>
142
+
143
+ <style scoped>
144
+ .title {
145
+ font-size: 14px !important;
146
+ font-weight: 400 !important;
147
+ color: #0a0a0a;
148
+ letter-spacing: 0.5px !important;
149
+ }
150
+
151
+ input::placeholder {
152
+ font-weight: 300 !important;
153
+ opacity: 0.5;
154
+ color: #969595;
155
+ }
156
+
157
+ .class-icon-title {
158
+ margin-right: 5px;
159
+ }
160
+
161
+ .success {
162
+ color: #94aa2a;
163
+ font-size: 14px;
164
+ }
165
+
166
+ .invalid {
167
+ color: #f0134d;
168
+ font-size: 14px;
169
+ }
170
+
171
+ .margin-button {
172
+ margin-top: -3px;
173
+ }
174
+ </style>
@@ -0,0 +1,69 @@
1
+ <template>
2
+ <div>
3
+ <span class="num" @click="showEdit = true" v-if="!showEdit">
4
+ {{ value }}
5
+ <i class="icon-edit fa-solid fa-pen-to-square"></i>
6
+ </span>
7
+ <div class="wrapper" v-if="showEdit">
8
+ <input class="input" type="text" placeholder="Digite seu texto" @keyup.enter.prevent="done" v-bind:value="value"
9
+ v-on:input="$emit('input', $event.target.value)" v-if="showEdit" />
10
+ <span @click="done" v-if="showEdit">
11
+ <i class="fa-solid fa-check"></i>
12
+ </span>
13
+ </div>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ name: "InputTextEdit",
20
+ props: ["params", "enter", "value"],
21
+ data() {
22
+ return {
23
+ showEdit: false,
24
+ };
25
+ },
26
+ methods: {
27
+ done() {
28
+ this.showEdit = false;
29
+ if (this.enter) this.enter(this.params);
30
+ }
31
+ },
32
+
33
+ };
34
+ </script>
35
+
36
+ <style scoped>
37
+ .input {
38
+ width: 90%;
39
+ border: none;
40
+ text-align: center;
41
+ }
42
+
43
+ .wrapper {
44
+ height: 37px;
45
+ width: 100%;
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ background: #fff;
50
+ border-radius: 8px;
51
+ border: 1px solid #eaedf3;
52
+ box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 3%);
53
+ }
54
+
55
+ .wrapper span {
56
+ width: 10px;
57
+ text-align: center;
58
+ font-size: 14px;
59
+ font-weight: 600;
60
+ cursor: pointer;
61
+ user-select: none;
62
+ }
63
+
64
+ .icon-edit {
65
+ margin-left: 0px;
66
+ color: rgb(128, 127, 127);
67
+ cursor: pointer;
68
+ }
69
+ </style>
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <div>
3
+ <InputText
4
+ :title="title"
5
+ :field="field"
6
+ :formName="formName"
7
+ :required="required"
8
+ :mask="['(##) ####-####', '(##) #####-####']"
9
+ :maxLength="maxLength"
10
+ :markFormDirty="markFormDirty"
11
+ v-model="mobile"
12
+ />
13
+ </div>
14
+ </template>
15
+ <script>
16
+ import InputText from "./InputText";
17
+
18
+ export default {
19
+ name: "InputWhatsApp",
20
+ props: [
21
+ "title",
22
+ "field",
23
+ "disabled",
24
+ "formName",
25
+ "required",
26
+ "maxLength",
27
+ "value",
28
+ "markFormDirty",
29
+ ],
30
+ components: { InputText },
31
+ data() {
32
+ return {
33
+ mobile: "",
34
+ };
35
+ },
36
+ created() {
37
+ this.mobile = this.value;
38
+ },
39
+ watch: {
40
+ value() {
41
+ this.mobile = this.value;
42
+ },
43
+ mobile() {
44
+ this.$emit("input", this.mobile);
45
+ },
46
+ },
47
+ };
48
+ </script>
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <div>
3
+ <vodal :duration="80" :show="modal.open" @hide="hide()" :width="width" :height="height" :closeOnEsc="closeOnEsc"
4
+ :closeButton="closeButton" :closeOnClickMask="false">
5
+ <div class="d-block text-left">
6
+ <Messages v-if="!vodal.open" />
7
+ <div class="title">{{ title }}</div>
8
+ <hr class="hr" />
9
+ <slot></slot>
10
+ </div>
11
+ <div slot="modal-footer"></div>
12
+ </vodal>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import Messages from "@nixweb/nixloc-ui/src/component/shared/Messages";
18
+ import Vodal from "vodal";
19
+
20
+ import { mapState, mapMutations } from "vuex";
21
+
22
+ export default {
23
+ name: "Modal",
24
+ props: {
25
+ title: String,
26
+ width: Number,
27
+ height: Number,
28
+ closeOnEsc: {
29
+ type: Boolean,
30
+ default: true,
31
+ },
32
+ closeButton: {
33
+ type: Boolean,
34
+ default: true,
35
+ },
36
+ onHideModal: Function,
37
+ },
38
+ components: { Messages, Vodal },
39
+ computed: {
40
+ ...mapState("generic", ["modal", "vodal"]),
41
+ },
42
+ methods: {
43
+ ...mapMutations("generic", ["hideModal"]),
44
+ hide() {
45
+ if (this.onHideModal) this.onHideModal();
46
+ this.hideModal();
47
+ },
48
+ },
49
+ };
50
+ </script>
51
+
52
+ <style scoped>
53
+ .title {
54
+ font-size: 18px;
55
+ margin-bottom: 5px;
56
+ }
57
+ </style>
@@ -0,0 +1,91 @@
1
+ <template>
2
+ <div>
3
+ <span class="title">{{ title }}</span>
4
+ <div class="options">
5
+ <b-form-group>
6
+ <b-form-radio-group v-model="selected" :options="options" :disabled="disabled"
7
+ :stacked="stacked"></b-form-radio-group>
8
+ </b-form-group>
9
+ </div>
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+ import Tip from "../shared/Tip.vue";
15
+
16
+ import { mapMutations, mapGetters } from "vuex";
17
+
18
+ export default {
19
+ components: { Tip },
20
+ name: "options",
21
+ props: {
22
+ title: String,
23
+ options: Array,
24
+ initialFieldTarget: String,
25
+ fieldTarget: String,
26
+ disabled: Boolean,
27
+ stacked: Boolean,
28
+ markFormDirty: {
29
+ type: Boolean,
30
+ default: true,
31
+ },
32
+ changed: Function,
33
+ value: Number,
34
+ },
35
+ data() {
36
+ return {
37
+ selected: this.value,
38
+ };
39
+ },
40
+ mounted() {
41
+ if (this.initialFieldTarget) {
42
+ let value = this.initialFieldTarget.value;
43
+ let obj = { tag: `${this.title}: ${value}`, fieldTarget: this.fieldTarget, value: value };
44
+ this.addFilter(obj);
45
+ }
46
+ },
47
+ computed: {
48
+ ...mapGetters("generic", ["event"]),
49
+ },
50
+ methods: {
51
+ ...mapMutations("validation", ["updateFormDirty"]),
52
+ ...mapMutations("generic", ["addFilter"]),
53
+ },
54
+ watch: {
55
+ value() {
56
+ this.selected = this.value;
57
+ },
58
+ selected() {
59
+ this.$emit("input", this.selected);
60
+
61
+ if (this.markFormDirty) this.updateFormDirty(true);
62
+ if (this.changed) this.changed();
63
+ if (this.fieldTarget) {
64
+ let obj = { tag: `${this.title}: ${this.selected}`, fieldTarget: this.fieldTarget, value: this.selected };
65
+ this.addFilter(obj);
66
+ }
67
+ },
68
+ event: {
69
+ handler(event) {
70
+ if (event.name == "tagRemoved") {
71
+ if (this.fieldTarget == event.data)
72
+ this.$emit("input", "");
73
+ }
74
+ },
75
+ deep: true,
76
+ },
77
+ },
78
+ };
79
+ </script>
80
+ <style>
81
+ .custom-control-label {
82
+ font-size: 13px !important;
83
+ font-weight: 400 !important;
84
+ text-transform: uppercase;
85
+ color: #778498;
86
+ }
87
+
88
+ .options {
89
+ margin-top: 5px;
90
+ }
91
+ </style>