@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,110 @@
1
+ <template>
2
+ <div>
3
+ <b-row>
4
+ <b-col sm="12">
5
+ <InputText title="Nome" field="name" :formName="formName" :required="true" :maxLength="40" v-model="report.name"
6
+ :markFormDirty="false" />
7
+ </b-col>
8
+ </b-row>
9
+ <b-row>
10
+ <b-col sm="12">
11
+ <div class="text-right">
12
+ <Button _key="btnSaveReport" type="success" title="Salvar" :disabled="!isFormValid(formName)"
13
+ classIcon="fas fa-save" size="medium" :clicked="saveReport" />
14
+ </div>
15
+ </b-col>
16
+ </b-row>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
22
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
23
+
24
+ import Report from "@nixweb/nixloc-ui/src/component/template/model/Report.js";
25
+
26
+ import { mapGetters, mapState, mapActions, mapMutations } from "vuex";
27
+
28
+ export default {
29
+ name: "ReportCreateUpdate",
30
+ components: { Button, InputText },
31
+ props: {
32
+ module: String,
33
+ },
34
+ data() {
35
+ return {
36
+ formName: "reportCreateUpdate",
37
+ report: new Report(),
38
+ urlCreate: "/api/v1/shared/report/create",
39
+ urlUpdate: "/api/v1/shared/report/update",
40
+ };
41
+ },
42
+ computed: {
43
+ ...mapGetters("validation", ["isFormValid"]),
44
+ ...mapGetters("generic", ["event"]),
45
+ ...mapState("report", ["selectedFields", "selectedRules"]),
46
+ },
47
+ methods: {
48
+ ...mapActions("generic", ["postApi", "putApi"]),
49
+ ...mapMutations("generic", ["removeLoading", "addEvent", "hideModal"]),
50
+ ...mapMutations("validation", ["resetValidation"]),
51
+ saveReport() {
52
+ var custom = this.report.id ? "" : "Custom";
53
+ const query = {
54
+ routeName: `${this.$route.name}${custom}`,
55
+ selectedFields: {
56
+ orderBy: this.selectedFields.orderBy,
57
+ selected: this.selectedFields.selected,
58
+ sort: this.selectedFields.sort,
59
+ },
60
+ selectedRules: this.selectedRules,
61
+ };
62
+ let obj = {
63
+ id: this.report.id,
64
+ name: this.report.name,
65
+ module: this.module,
66
+ query: JSON.stringify(query),
67
+ };
68
+ if (this.report.id) {
69
+ let params = { url: this.urlUpdate, obj: obj };
70
+ this.putApi(params).then((response) => {
71
+ if (response.success) {
72
+ this.sendEvent();
73
+ this.hideModal();
74
+ }
75
+ this.removeLoading(["btnSaveReport"]);
76
+ });
77
+ } else {
78
+ let params = { url: this.urlCreate, obj: obj };
79
+ this.postApi(params).then((response) => {
80
+ if (response.success) {
81
+ const query = JSON.parse(response.content.query);
82
+ this.$router.replace({
83
+ name: query.routeName,
84
+ params: { id: response.content.id, name: response.content.name },
85
+ });
86
+ this.sendEvent();
87
+ this.hideModal();
88
+ }
89
+ this.removeLoading(["btnSaveReport"]);
90
+ });
91
+ }
92
+ },
93
+ sendEvent() {
94
+ this.addEvent({ name: "savedReport" });
95
+ },
96
+ },
97
+ watch: {
98
+ event: {
99
+ handler(event) {
100
+ if (event.name == "saveReport") {
101
+ this.report.id = this.$route.params.id;
102
+ if (this.report.id) this.report.name = this.$route.params.name;
103
+ this.saveReport();
104
+ }
105
+ },
106
+ deep: true,
107
+ },
108
+ },
109
+ };
110
+ </script>
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <div>
3
+ <div>
4
+ <slot name="content-buttons"></slot>
5
+ <br v-if="templateList.dragAndDrop" />
6
+ <div v-if="showSearch">
7
+ <Search />
8
+ <br />
9
+ </div>
10
+ <ListViewWithDataHandler
11
+ :templateList="templateList"
12
+ :propsParam="propsParam"
13
+ :showMolded="false"
14
+ :showHorizontalFilter="showHorizontalFilter"
15
+ :buttonRemove="buttonRemove"
16
+ >
17
+ <div slot="content-buttons-table-header">
18
+ <slot name="content-buttons-table-header"></slot>
19
+ </div>
20
+ <div slot="content-filter-horizontal">
21
+ <slot name="content-filter-horizontal"></slot>
22
+ </div>
23
+ <div slot="content-buttons-table">
24
+ <slot name="content-buttons-table"></slot>
25
+ </div>
26
+ </ListViewWithDataHandler>
27
+ </div>
28
+ </div>
29
+ </template>
30
+
31
+ <script>
32
+ import Search from "../shared/Search.vue";
33
+
34
+ import ListViewWithDataHandler from "@nixweb/nixloc-ui/src/component/template/ListViewWithDataHandler.vue";
35
+
36
+ import { mapGetters, mapMutations } from "vuex";
37
+
38
+ export default {
39
+ name: "ViewTemplateConfiguration",
40
+ components: { Search, ListViewWithDataHandler },
41
+ props: {
42
+ templateList: Object,
43
+ propsParam: Object,
44
+ showSearch: {
45
+ type: Boolean,
46
+ default: true,
47
+ },
48
+ showHorizontalFilter: {
49
+ type: Boolean,
50
+ default: true,
51
+ },
52
+ buttonRemove: {
53
+ type: Boolean,
54
+ default: true,
55
+ },
56
+ },
57
+ created() {
58
+ this.addLoading("loadingLine");
59
+ },
60
+ methods: {
61
+ ...mapMutations("generic", ["addLoading"]),
62
+ },
63
+ };
64
+ </script>
@@ -0,0 +1,213 @@
1
+ <template>
2
+ <div>
3
+ <Panel :module="panel.module" :title="panel.title" :showFilter="panel.showFilter" :showSearch="panel.showSearch"
4
+ :showButtons="panel.showButtons">
5
+ <div slot="content-main">
6
+ <div>
7
+ <div class="div-top">
8
+ <Molded>
9
+ <b-row>
10
+ <b-col sm="6">
11
+ <div class="side-by-side">
12
+ <Button _key="saveDocument" type="success" title="Salvar" classIcon="fas fa-save"
13
+ :disabled="isDisabled" size="small" :clicked="saveDocument" />
14
+ </div>
15
+ <div class="side-by-side" v-if="showByRule">
16
+ <Button v-if="id" _key="saveAs" type="success" title="Clonar" classIcon="fas fa-clone" size="small"
17
+ :clicked="saveAs" />
18
+ </div>
19
+ </b-col>
20
+ <b-col class="text-right" sm="6">
21
+ <div class="side-by-side" v-if="id && showByRule">
22
+ <Button key="showModalConfig" type="info" classIcon="fa-solid fa-gear" size="small"
23
+ :clicked="showModalConfig" />
24
+ </div>
25
+ <div class="side-by-side" v-if="showByRule">
26
+ <Button key="showModalLegend" type="info" classIcon="fas fa-book-reader" size="small"
27
+ :clicked="showModalLegend" />
28
+ </div>
29
+ <div class="side-by-side" v-if="showByRule">
30
+ <Button key="showModalCode" type="info" classIcon="far fa-code" size="small"
31
+ :clicked="showModalCode" />
32
+ </div>
33
+ <div class="side-by-side">
34
+ <Button key="showModalPreview" type="info" title="Visualizar" classIcon="far fa-eye" size="small"
35
+ :clicked="showModalPreview" />
36
+ </div>
37
+ </b-col>
38
+ </b-row>
39
+ </Molded>
40
+ </div>
41
+ <Modal title="Salvar" :width="800" v-show="showModal('saveDocument')">
42
+ <slot></slot>
43
+ </Modal>
44
+ <Modal title="Parâmetros" :width="1100" v-show="showModal('legenda')">
45
+ <ParameterLegend v-show="modal.open" :legend="parameterLegend" :module="module" />
46
+ </Modal>
47
+ <Modal title="Editor de Código" :width="900" v-if="showModal('code')">
48
+ <CodeEditor v-if="modal.open" />
49
+ </Modal>
50
+ <Modal title="Visualizar" :width="1200" v-if="showModal('preview')">
51
+ <div v-if="modal.open">
52
+ <b-row>
53
+ <b-col class="text-center">
54
+ <Button v-if="false" v-print="'#printMe'" key="print" type="edit" title="Imprimir"
55
+ classIcon="fas fa-print" size="small" :clicked="print" />
56
+ </b-col>
57
+ </b-row>
58
+ <br />
59
+ <ScrollBar :minHeight="500" :maxHeight="500">
60
+ <div>
61
+ <div class="a4">
62
+ <div id="printMe">
63
+ <div :style="styleCss">
64
+ <DocumentPreview :template="documentPreview('dev')" :d="parameterExemple" />
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </ScrollBar>
70
+ </div>
71
+ </Modal>
72
+ <div class="div-editor">
73
+ <Loading type="line" v-if="!showDocumentEditor" />
74
+ <DocumentEditor v-if="showDocumentEditor" />
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </Panel>
79
+ </div>
80
+ </template>
81
+
82
+ <script>
83
+ import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel";
84
+ import DocumentEditor from "@nixweb/nixloc-ui/src/component/shared/DocumentEditor.vue";
85
+ import DocumentPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentPreview.vue";
86
+ import CodeEditor from "@nixweb/nixloc-ui/src/component/shared/CodeEditor.vue";
87
+ import ParameterLegend from "@nixweb/nixloc-ui/src/component/shared/ParameterLegend.vue";
88
+ import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
89
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
90
+ import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
91
+ import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
92
+ import Loading from "@nixweb/nixloc-ui/src/component/shared/Loading.vue";
93
+
94
+ import print from "vue-print-nb";
95
+
96
+ import { mapState, mapGetters, mapMutations } from "vuex";
97
+
98
+ export default {
99
+ name: "ViewTemplateDocumentView",
100
+ directives: {
101
+ print,
102
+ },
103
+ components: {
104
+ Panel,
105
+ DocumentEditor,
106
+ DocumentPreview,
107
+ CodeEditor,
108
+ ParameterLegend,
109
+ Molded,
110
+ Loading,
111
+ Button,
112
+ Modal,
113
+ ScrollBar,
114
+ },
115
+ props: {
116
+ panel: Object,
117
+ parameterExemple: Object,
118
+ parameterLegend: Array,
119
+ styleCss: String,
120
+ module: String,
121
+ },
122
+ data() {
123
+ return {
124
+ id: this.$route.params.id,
125
+ isDisabled: true,
126
+ showDocumentEditor: false,
127
+ };
128
+ },
129
+ created() {
130
+ let self = this;
131
+ setTimeout(function () {
132
+ self.showDocumentEditor = true;
133
+ }, 1500);
134
+ },
135
+ computed: {
136
+ ...mapState("user", ["userLogged"]),
137
+ ...mapState("generic", ["modal", "documentHtml"]),
138
+ ...mapGetters("generic", ["showModal", "event", "documentPreview"]),
139
+ showByRule() {
140
+ if (this.userLogged.user.userName == "UserTemp" || this.userLogged.companyId == 3)
141
+ return true;
142
+ return false;
143
+ },
144
+ },
145
+ methods: {
146
+ ...mapMutations("generic", [
147
+ "openModal",
148
+ "hideModal",
149
+ "removeLoading",
150
+ "addEvent",
151
+ ]),
152
+ saveDocument() {
153
+ if (this.id) {
154
+ this.addEvent({ name: "saveDocument" });
155
+ } else {
156
+ this.openModal("saveDocument");
157
+ this.removeLoading(["saveDocument"]);
158
+ }
159
+ },
160
+ saveAs() {
161
+ this.addEvent({ name: "saveAs" });
162
+ },
163
+ showModalConfig() {
164
+ this.openModal("saveDocument");
165
+ this.removeLoading(["showModalConfig"]);
166
+ },
167
+ showModalLegend() {
168
+ this.openModal("legenda");
169
+ this.removeLoading(["showModalLegend"]);
170
+ },
171
+ showModalCode() {
172
+ this.openModal("code");
173
+ this.removeLoading(["showModalCode"]);
174
+ },
175
+ showModalPreview() {
176
+ this.openModal("preview");
177
+ this.removeLoading(["showModalPreview"]);
178
+ },
179
+ print() {
180
+ this.removeLoading(["print"]);
181
+ },
182
+ },
183
+ watch: {
184
+ event: {
185
+ handler(event) {
186
+ if (event.name == "documentEditorModified") this.isDisabled = true;
187
+ if (event.name == "documentEditorChanged") this.isDisabled = false;
188
+ },
189
+ deep: true,
190
+ },
191
+ },
192
+ };
193
+ </script>
194
+ <style scoped>
195
+ .div-top {
196
+ margin-top: 30px;
197
+ }
198
+
199
+ .div-editor {
200
+ margin-top: 25px;
201
+ }
202
+
203
+ .a4 {
204
+ max-width: 1140px;
205
+ min-height: 21cm;
206
+ padding: 20px;
207
+ border: 1px hsl(0, 0%, 82.7%) solid;
208
+ border-radius: var(--ck-border-radius);
209
+ background: white;
210
+ box-shadow: 0 0 5px hsl(0deg 0% 0% / 10%);
211
+ margin: 0 auto;
212
+ }
213
+ </style>