@opengis/admin 0.2.44 → 0.2.45

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 (164) hide show
  1. package/README.md +97 -97
  2. package/config.js +4 -4
  3. package/dist/{add-page-CWDoV9kc.js → add-page-CyQgzB5b.js} +38 -36
  4. package/dist/{admin-interface-KnUgFCOB.js → admin-interface-PGZ-BhNF.js} +3 -3
  5. package/dist/{admin-view-DJz2GCsB.js → admin-view-Kx7vbJ3K.js} +2 -2
  6. package/dist/admin.js +1 -1
  7. package/dist/admin.umd.cjs +48 -48
  8. package/dist/assets/logo.svg +41 -41
  9. package/dist/{card-view-CCxJ3jfb.js → card-view-EZQWnsDz.js} +1 -1
  10. package/dist/edit-page-CFbMYyL0.js +125 -0
  11. package/dist/{import-file-CjSMt4zv.js → import-file-D5TQl-P7.js} +3132 -3132
  12. package/dist/style.css +1 -1
  13. package/module/settings/card/admin.accounts.table/index.yml +7 -7
  14. package/module/settings/card/admin.accounts.table/rules.hbs +18 -18
  15. package/module/settings/card/admin.accounts.table/users.hbs +13 -13
  16. package/module/settings/card/admin.roles.table/access.hbs +3 -3
  17. package/module/settings/card/admin.roles.table/general_info.hbs +1 -1
  18. package/module/settings/card/admin.roles.table/index.yml +21 -21
  19. package/module/settings/card/admin.roles.table/users.hbs +6 -6
  20. package/module/settings/card/admin.routes.table/general_info.hbs +13 -13
  21. package/module/settings/card/admin.routes.table/groups.hbs +11 -11
  22. package/module/settings/card/admin.routes.table/index.yml +11 -11
  23. package/module/settings/card/admin.routes.table/users.hbs +16 -16
  24. package/module/settings/card/admin.users.table/context.hbs +14 -14
  25. package/module/settings/card/admin.users.table/general_info.hbs +12 -12
  26. package/module/settings/card/admin.users.table/index.yml +22 -22
  27. package/module/settings/card/admin.users.table/last_login.hbs +9 -9
  28. package/module/settings/card/admin.users.table/logs.hbs +10 -10
  29. package/module/settings/card/admin.users.table/routes.hbs +7 -7
  30. package/module/settings/card/admin.users.table/user_roles.hbs +12 -12
  31. package/module/settings/cls/core.actions.json +17 -17
  32. package/module/settings/cls/core.scope.json +13 -13
  33. package/module/settings/cls/properties.site_status.json +13 -13
  34. package/module/settings/cls/properties.widget_status.json +13 -13
  35. package/module/settings/cls/users.user_type.json +13 -13
  36. package/module/settings/cls/yes_no.json +11 -11
  37. package/module/settings/form/admin.accounts.form.json +13 -13
  38. package/module/settings/form/admin.custom_column.form.json +71 -71
  39. package/module/settings/form/admin.properties.form.json +15 -15
  40. package/module/settings/form/admin.roles.form.json +21 -21
  41. package/module/settings/form/admin.routes.form.json +25 -25
  42. package/module/settings/form/admin.rules.form.json +30 -30
  43. package/module/settings/form/admin.user_properties.form.json +15 -15
  44. package/module/settings/form/admin.user_roles.form.json +13 -13
  45. package/module/settings/form/admin.user_roles_card.form.json +13 -13
  46. package/module/settings/form/admin.users.form.json +153 -153
  47. package/module/settings/form/context.account_grants.form.json +23 -23
  48. package/module/settings/form/context.account_users.form.json +12 -12
  49. package/module/settings/form/user.user_roles.form.json +13 -13
  50. package/module/settings/interface/admin.properties.json +4 -4
  51. package/module/settings/interface/admin.roles.json +4 -4
  52. package/module/settings/interface/admin.routes.json +4 -4
  53. package/module/settings/interface/admin.users.json +4 -4
  54. package/module/settings/menu.json +84 -84
  55. package/module/settings/select/core.routes.sql +1 -1
  56. package/module/settings/select/core.user_mentioned.sql +1 -1
  57. package/module/settings/select/core.user_uid.sql +1 -1
  58. package/module/settings/table/admin.accounts.table.json +42 -42
  59. package/module/settings/table/admin.custom_column.table.json +99 -99
  60. package/module/settings/table/admin.properties.table.json +39 -39
  61. package/module/settings/table/admin.roles.table.json +64 -64
  62. package/module/settings/table/admin.routes.table.json +73 -73
  63. package/module/settings/table/admin.rules.table.json +76 -76
  64. package/module/settings/table/admin.user_properties.table.json +34 -34
  65. package/module/settings/table/admin.user_roles.table.json +72 -72
  66. package/module/settings/table/admin.users.table.json +132 -132
  67. package/module/settings/table/context.account_grants.table.json +67 -67
  68. package/module/settings/table/context.account_users.table.json +37 -37
  69. package/package.json +2 -2
  70. package/plugin.js +29 -29
  71. package/server/helpers/core/badge.js +16 -16
  72. package/server/helpers/core/buttonHelper.js +21 -21
  73. package/server/helpers/core/select.js +48 -48
  74. package/server/helpers/core/token.js +18 -18
  75. package/server/helpers/index.js +29 -29
  76. package/server/helpers/list/buttonHelper.js +21 -21
  77. package/server/helpers/list/tableList.js +81 -81
  78. package/server/helpers/list/utils/button.js +5 -5
  79. package/server/helpers/temp/contentList.js +58 -58
  80. package/server/helpers/temp/ifCond.js +101 -101
  81. package/server/helpers/utils/button.js +5 -5
  82. package/server/helpers/utils/buttonAdd.js +5 -5
  83. package/server/helpers/utils/buttonDel.js +5 -5
  84. package/server/helpers/utils/buttonEdit.js +5 -5
  85. package/server/plugins/access/funcs/getAdminAccess.js +12 -12
  86. package/server/plugins/access/index.mjs +6 -6
  87. package/server/plugins/adminHook.js +81 -81
  88. package/server/plugins/cron.js +10 -10
  89. package/server/plugins/docs.js +28 -28
  90. package/server/plugins/hook.js +236 -236
  91. package/server/plugins/vite.js +71 -71
  92. package/server/routes/access/controllers/access.group.js +29 -29
  93. package/server/routes/access/controllers/access.group.post.js +49 -49
  94. package/server/routes/access/index.mjs +8 -8
  95. package/server/routes/access/schema.mjs +57 -57
  96. package/server/routes/calendar/controllers/calendar.data.js +87 -87
  97. package/server/routes/calendar/index.mjs +7 -7
  98. package/server/routes/calendar/schema.js +21 -21
  99. package/server/routes/data/controllers/cardData.js +106 -106
  100. package/server/routes/data/controllers/cardTabData.js +49 -49
  101. package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
  102. package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
  103. package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
  104. package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
  105. package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
  106. package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
  107. package/server/routes/data/controllers/tableData.js +29 -29
  108. package/server/routes/data/controllers/tableDataId.js +27 -27
  109. package/server/routes/data/controllers/tableFilter.js +68 -68
  110. package/server/routes/data/controllers/tokenInfo.js +9 -9
  111. package/server/routes/data/controllers/utils/assignTokens.js +30 -30
  112. package/server/routes/data/controllers/utils/conditions.js +20 -20
  113. package/server/routes/data/controllers/utils/getColumns.js +8 -8
  114. package/server/routes/data/index.mjs +19 -19
  115. package/server/routes/data/schema.js +54 -54
  116. package/server/routes/menu/controllers/getMenu.js +58 -58
  117. package/server/routes/menu/index.mjs +5 -5
  118. package/server/routes/notifications/controllers/readNotifications.js +27 -27
  119. package/server/routes/notifications/controllers/testEmail.js +35 -35
  120. package/server/routes/notifications/controllers/userNotifications.js +53 -53
  121. package/server/routes/notifications/funcs/addNotification.js +21 -21
  122. package/server/routes/notifications/funcs/sendNotification.js +92 -92
  123. package/server/routes/notifications/hook/onWidgetSet.js +57 -57
  124. package/server/routes/notifications/index.mjs +27 -27
  125. package/server/routes/notifications/schema.js +16 -16
  126. package/server/routes/properties/controllers/admin.properties.get.js +29 -29
  127. package/server/routes/properties/controllers/user.properties.get.js +30 -30
  128. package/server/routes/properties/controllers/user.properties.post.js +30 -30
  129. package/server/routes/properties/funcs/getSettings.js +56 -56
  130. package/server/routes/properties/funcs/setSettings.js +44 -44
  131. package/server/routes/properties/funcs/utils/dataInsert.js +26 -26
  132. package/server/routes/properties/index.mjs +14 -14
  133. package/server/routes/properties/schema.js +10 -10
  134. package/server/routes/root.mjs +3 -3
  135. package/server/routes/templates/controllers/getTemplate.js +49 -49
  136. package/server/routes/templates/index.mjs +16 -16
  137. package/server/routes/templates/schema.js +8 -8
  138. package/server/routes/user/controllers/user.cls.id.js +14 -14
  139. package/server/routes/user/controllers/user.cls.js +71 -71
  140. package/server/routes/user/controllers/user.cls.post.js +52 -52
  141. package/server/routes/user/controllers/user.info.js +17 -17
  142. package/server/routes/user/schema.js +14 -14
  143. package/server/routes/widget/controllers/utils/historyFormat.js +75 -75
  144. package/server/routes/widget/controllers/utils/obj2db.js +13 -13
  145. package/server/routes/widget/controllers/widget.del.js +41 -41
  146. package/server/routes/widget/controllers/widget.get.js +96 -96
  147. package/server/routes/widget/controllers/widget.set.js +76 -76
  148. package/server/routes/widget/index.mjs +11 -11
  149. package/server/routes/widget/schema.js +12 -12
  150. package/server/templates/cls/itree.recrzone_category.json +73 -73
  151. package/server/templates/cls/test.json +9 -9
  152. package/server/templates/form/admin.user_cls.data.form.json +49 -49
  153. package/server/templates/form/admin.user_group_rel.form.json +21 -21
  154. package/server/templates/form/cp_building.form.json +32 -32
  155. package/server/templates/form/form-user-pass.json +10 -10
  156. package/server/templates/form/form-user_group.json +39 -39
  157. package/server/templates/form/form-users.json +156 -156
  158. package/server/templates/form/user_group_access.form.json +22 -22
  159. package/server/templates/select/account_id.json +2 -2
  160. package/server/templates/table/gis.dataset.table.json +43 -43
  161. package/server/templates/table/management.user_group.table.json +112 -112
  162. package/server/templates/table/management.users.table.json +126 -126
  163. package/utils.js +29 -29
  164. package/dist/edit-page-CSEzk0Pj.js +0 -121
package/README.md CHANGED
@@ -1,97 +1,97 @@
1
- ![alt text](https://cdn.softpro.ua/data/npm/admin/opengis-admin.png)
2
-
3
- [![NPM version](https://img.shields.io/npm/v/@opengis/admin?style=plain)](https://www.npmjs.com/package/@opengis/admin)
4
- [![NPM last update](https://img.shields.io/npm/last-update/@opengis/admin?style=plain)]()
5
- [![NPM downloads](https://img.shields.io/npm/dw/@opengis/admin?style=plain)]()
6
- [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=plain)](http://standardjs.com/)
7
-
8
- This package standardizes the entire website administration process. Built using the **Fastify** and **Vite** frameworks for reactive, component-driven development.
9
-
10
- ### Features
11
-
12
- - **Real-time Editing** - Simplifies and accelerates the development process.
13
- - **Customization** - Enabling developers to add custom components, templates, and modules.
14
- - **Database Management** - Provides tools to facilitate seamless management and interaction with PostgreSQL.
15
- - **Base Theme** - A clean and practical design inspired by Preline.
16
- - **Info Cards** - Easily created using pre-built layouts or custom Vue components.
17
- - **Geometry Visualization** - Enables visualization and editing of geometric data, using geometry inputs.
18
- - **User Settings** - Includes functionality for managing user settings, creating user groups, and defining roles with interface permissions.
19
-
20
- ---
21
-
22
- ### Install
23
-
24
- ```bash
25
- npm i @opengis/admin
26
- ```
27
-
28
- ### Usage
29
-
30
- ```js
31
- fastify.register(import('@opengis/admin'), config);
32
- ```
33
-
34
- ```js
35
- import v3admin from '@opengis/admin';
36
- import '@opengis/admin/dist/style.css';
37
- v3admin.install(app);
38
- ```
39
-
40
- ---
41
-
42
- ### Documentation
43
-
44
- For a detailed understanding of `admin`, its features, and how to use them, refer to our [Documentation](https://apidocs.softpro.ua/admin/).
45
-
46
- ---
47
-
48
- ### Technology stack
49
-
50
- <a href="https://fastify.dev/" target="_blank">
51
- <img src="https://img.shields.io/badge/Fastify-323330?style=for-the-badge&logo=fastify" /></a>
52
-
53
- <a href="https://vuejs.org/" target="_blank">
54
- <img src="https://img.shields.io/badge/Vue%20js-323330?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D" /></a>
55
-
56
- <a href="https://vite.dev/" target="_blank">
57
- <img src="https://img.shields.io/badge/Vite-323330?style=for-the-badge&logo=vite" /></a>
58
-
59
- <a href="https://tiptap.dev/" target="_blank">
60
- <img src="https://img.shields.io/badge/TipTap-323330?style=for-the-badge&logo=tiptap&logoColor=4FC08D" /></a>
61
-
62
- <a href="https://www.postgresql.org/" target="_blank">
63
- <img src="https://img.shields.io/badge/PostgreSQL-323330?style=for-the-badge&logo=postgresql&logoColor=white" /></a>
64
-
65
- <a href="https://maplibre.org/" target="_blank">
66
- <img src="https://img.shields.io/badge/Maplibre-323330?style=for-the-badge&logo=maplibre&logoColor=87b2f0" /></a>
67
-
68
- <a href="https://handlebarsjs.com/" target="_blank">
69
- <img src="https://img.shields.io/badge/Handlebars%20js-323330?style=for-the-badge&logo=handlebarsdotjs&logoColor=f0772b" /></a>
70
-
71
- <a href="https://redis.io/" target="_blank">
72
- <img src="https://img.shields.io/badge/redis-323330.svg?&style=for-the-badge&logo=redis&logoColor=%23DD0031" /></a>
73
-
74
- ---
75
-
76
- ### Contribute
77
-
78
- Feel free to contact us through our website [SOFTPRO.UA](https://softpro.ua) or email <info@softpro.ua>
79
-
80
- - Report bugs
81
- - Share your ideas
82
- - Ask questions
83
-
84
- ### Follow Us
85
-
86
- [Official site](https://softpro.ua)
87
-
88
- <p>
89
- <a href="https://www.instagram.com/gissoftpro/" target="_blank"><img src="https://cdn.softpro.ua/data/npm/instagram.png" alt="Softpro Instagram" title="oftpro Instagram"></a>&nbsp;&nbsp;
90
- <a href="https://www.facebook.com/gissoftpro" target="_blank"><img src="https://cdn.softpro.ua/data/npm/facebook.png" alt="Softpro Facebook" title="Softpro Facebook"></a>&nbsp;&nbsp;
91
- <a href="https://t.me/softprogis" target="_blank"><img src="https://cdn.softpro.ua/data/npm/telegram.png" alt="Softpro Telegram" title="Softpro Telegram"></a>&nbsp;&nbsp;
92
- <a href="https://www.linkedin.com/in/softpro-ukraine-a8876b282/recent-activity/all/" target="_blank"><img src="https://cdn.softpro.ua/data/npm/social/linkedin.png" alt="Softpro Linkedin" title="Softpro LinkedIn"></a>&nbsp;&nbsp;
93
- </p>
94
-
95
- ### License
96
-
97
- Copyright © SOFTPRO. All rights reserved.
1
+ ![alt text](https://cdn.softpro.ua/data/npm/admin/opengis-admin.png)
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/@opengis/admin?style=plain)](https://www.npmjs.com/package/@opengis/admin)
4
+ [![NPM last update](https://img.shields.io/npm/last-update/@opengis/admin?style=plain)]()
5
+ [![NPM downloads](https://img.shields.io/npm/dw/@opengis/admin?style=plain)]()
6
+ [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=plain)](http://standardjs.com/)
7
+
8
+ This package standardizes the entire website administration process. Built using the **Fastify** and **Vite** frameworks for reactive, component-driven development.
9
+
10
+ ### Features
11
+
12
+ - **Real-time Editing** - Simplifies and accelerates the development process.
13
+ - **Customization** - Enabling developers to add custom components, templates, and modules.
14
+ - **Database Management** - Provides tools to facilitate seamless management and interaction with PostgreSQL.
15
+ - **Base Theme** - A clean and practical design inspired by Preline.
16
+ - **Info Cards** - Easily created using pre-built layouts or custom Vue components.
17
+ - **Geometry Visualization** - Enables visualization and editing of geometric data, using geometry inputs.
18
+ - **User Settings** - Includes functionality for managing user settings, creating user groups, and defining roles with interface permissions.
19
+
20
+ ---
21
+
22
+ ### Install
23
+
24
+ ```bash
25
+ npm i @opengis/admin
26
+ ```
27
+
28
+ ### Usage
29
+
30
+ ```js
31
+ fastify.register(import('@opengis/admin'), config);
32
+ ```
33
+
34
+ ```js
35
+ import v3admin from '@opengis/admin';
36
+ import '@opengis/admin/dist/style.css';
37
+ v3admin.install(app);
38
+ ```
39
+
40
+ ---
41
+
42
+ ### Documentation
43
+
44
+ For a detailed understanding of `admin`, its features, and how to use them, refer to our [Documentation](https://apidocs.softpro.ua/admin/).
45
+
46
+ ---
47
+
48
+ ### Technology stack
49
+
50
+ <a href="https://fastify.dev/" target="_blank">
51
+ <img src="https://img.shields.io/badge/Fastify-323330?style=for-the-badge&logo=fastify" /></a>
52
+
53
+ <a href="https://vuejs.org/" target="_blank">
54
+ <img src="https://img.shields.io/badge/Vue%20js-323330?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D" /></a>
55
+
56
+ <a href="https://vite.dev/" target="_blank">
57
+ <img src="https://img.shields.io/badge/Vite-323330?style=for-the-badge&logo=vite" /></a>
58
+
59
+ <a href="https://tiptap.dev/" target="_blank">
60
+ <img src="https://img.shields.io/badge/TipTap-323330?style=for-the-badge&logo=tiptap&logoColor=4FC08D" /></a>
61
+
62
+ <a href="https://www.postgresql.org/" target="_blank">
63
+ <img src="https://img.shields.io/badge/PostgreSQL-323330?style=for-the-badge&logo=postgresql&logoColor=white" /></a>
64
+
65
+ <a href="https://maplibre.org/" target="_blank">
66
+ <img src="https://img.shields.io/badge/Maplibre-323330?style=for-the-badge&logo=maplibre&logoColor=87b2f0" /></a>
67
+
68
+ <a href="https://handlebarsjs.com/" target="_blank">
69
+ <img src="https://img.shields.io/badge/Handlebars%20js-323330?style=for-the-badge&logo=handlebarsdotjs&logoColor=f0772b" /></a>
70
+
71
+ <a href="https://redis.io/" target="_blank">
72
+ <img src="https://img.shields.io/badge/redis-323330.svg?&style=for-the-badge&logo=redis&logoColor=%23DD0031" /></a>
73
+
74
+ ---
75
+
76
+ ### Contribute
77
+
78
+ Feel free to contact us through our website [SOFTPRO.UA](https://softpro.ua) or email <info@softpro.ua>
79
+
80
+ - Report bugs
81
+ - Share your ideas
82
+ - Ask questions
83
+
84
+ ### Follow Us
85
+
86
+ [Official site](https://softpro.ua)
87
+
88
+ <p>
89
+ <a href="https://www.instagram.com/gissoftpro/" target="_blank"><img src="https://cdn.softpro.ua/data/npm/instagram.png" alt="Softpro Instagram" title="oftpro Instagram"></a>&nbsp;&nbsp;
90
+ <a href="https://www.facebook.com/gissoftpro" target="_blank"><img src="https://cdn.softpro.ua/data/npm/facebook.png" alt="Softpro Facebook" title="Softpro Facebook"></a>&nbsp;&nbsp;
91
+ <a href="https://t.me/softprogis" target="_blank"><img src="https://cdn.softpro.ua/data/npm/telegram.png" alt="Softpro Telegram" title="Softpro Telegram"></a>&nbsp;&nbsp;
92
+ <a href="https://www.linkedin.com/in/softpro-ukraine-a8876b282/recent-activity/all/" target="_blank"><img src="https://cdn.softpro.ua/data/npm/social/linkedin.png" alt="Softpro Linkedin" title="Softpro LinkedIn"></a>&nbsp;&nbsp;
93
+ </p>
94
+
95
+ ### License
96
+
97
+ Copyright © SOFTPRO. All rights reserved.
package/config.js CHANGED
@@ -1,5 +1,5 @@
1
- import { readFile } from 'fs/promises';
2
- import fs from 'fs';
3
- const config = fs.existsSync('config.json') ? JSON.parse(await readFile('config.json')) : {};
4
-
1
+ import { readFile } from 'fs/promises';
2
+ import fs from 'fs';
3
+ const config = fs.existsSync('config.json') ? JSON.parse(await readFile('config.json')) : {};
4
+
5
5
  export default config;
@@ -1,13 +1,14 @@
1
- import { _ as g, u as f, d as u } from "./import-file-CjSMt4zv.js";
2
- import { resolveComponent as x, openBlock as d, createElementBlock as w, createElementVNode as n, createBlock as k, createCommentVNode as y } from "vue";
3
- const v = {
1
+ import { _ as g, u as f, d as u } from "./import-file-D5TQl-P7.js";
2
+ import { resolveComponent as x, openBlock as h, createElementBlock as w, createElementVNode as n, createBlock as y, normalizeStyle as k, createCommentVNode as v } from "vue";
3
+ const V = {
4
4
  data() {
5
5
  return {
6
6
  formValues: {},
7
7
  scheme: null,
8
8
  table: "",
9
9
  token: "",
10
- api: ""
10
+ api: "",
11
+ style: null
11
12
  };
12
13
  },
13
14
  mounted() {
@@ -16,31 +17,31 @@ const v = {
16
17
  methods: {
17
18
  flattenMenu(t) {
18
19
  const e = [];
19
- return t.forEach((o) => {
20
- o.menu ? e.push(...this.flattenMenu(o.menu)) : e.push(o);
20
+ return t.forEach((a) => {
21
+ a.menu ? e.push(...this.flattenMenu(a.menu)) : e.push(a);
21
22
  }), e;
22
23
  },
23
24
  async getFormScheme() {
24
- var i, a;
25
+ var i, o;
25
26
  const t = this.flattenMenu(f.value);
26
27
  t != null && t.length || this.$router.replace("/404");
27
- const e = t == null ? void 0 : t.find((r) => {
28
- var s, l;
29
- return (r == null ? void 0 : r.path) == ((l = (s = this.$route) == null ? void 0 : s.query) == null ? void 0 : l.table);
28
+ const e = t == null ? void 0 : t.find((s) => {
29
+ var r, l;
30
+ return (s == null ? void 0 : s.path) == ((l = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : l.table);
30
31
  });
31
32
  e || this.$router.replace("/404");
32
- const o = e == null ? void 0 : e.table;
33
- this.table = o;
33
+ const a = e == null ? void 0 : e.table;
34
+ this.table = a;
34
35
  try {
35
- const r = await u.get(`/api/table-data/${o}`), { data: s } = await u.get(
36
- `/api/template/form/${(i = r == null ? void 0 : r.data) == null ? void 0 : i.form}`
36
+ const s = await u.get(`/api/table-data/${a}`), { data: r } = await u.get(
37
+ `/api/template/form/${(i = s == null ? void 0 : s.data) == null ? void 0 : i.form}`
37
38
  );
38
- this.scheme = (s == null ? void 0 : s.schema) || s, this.api = (s == null ? void 0 : s.api) || "", this.token = (a = r == null ? void 0 : r.data) == null ? void 0 : a.addToken;
39
+ this.scheme = (r == null ? void 0 : r.schema) || r, this.style = (r == null ? void 0 : r.style) || null, this.api = (r == null ? void 0 : r.api) || "", this.token = (o = s == null ? void 0 : s.data) == null ? void 0 : o.addToken;
39
40
  } catch {
40
41
  }
41
42
  },
42
43
  async createObject() {
43
- var e, o, i, a, r, s, l, m, b;
44
+ var e, a, i, o, s, r, l, m, b;
44
45
  const t = this.$refs.form;
45
46
  try {
46
47
  await t.doValidation(), await u.post(
@@ -52,51 +53,52 @@ const v = {
52
53
  type: "success"
53
54
  });
54
55
  } catch (c) {
55
- const h = ((e = c == null ? void 0 : c.response) == null ? void 0 : e.data) || "";
56
- let p = ((r = (a = (i = (o = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : o[0]) == null ? void 0 : i[1]) == null ? void 0 : a[0]) == null ? void 0 : r.message) === "Це поле обов'язкове" ? "Заповніть обов'язкові поля" : (b = (m = (l = (s = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : s[0]) == null ? void 0 : l[1]) == null ? void 0 : m[0]) == null ? void 0 : b.message;
56
+ const p = ((e = c == null ? void 0 : c.response) == null ? void 0 : e.data) || "";
57
+ let d = ((s = (o = (i = (a = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : a[0]) == null ? void 0 : i[1]) == null ? void 0 : o[0]) == null ? void 0 : s.message) === "Це поле обов'язкове" ? "Заповніть обов'язкові поля" : (b = (m = (l = (r = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : r[0]) == null ? void 0 : l[1]) == null ? void 0 : m[0]) == null ? void 0 : b.message;
57
58
  this.$notify({
58
59
  title: "Помилка!",
59
- message: h || p || "Сталася помилка валідаціі",
60
+ message: p || d || "Сталася помилка валідаціі",
60
61
  type: "error"
61
62
  });
62
63
  }
63
64
  }
64
65
  }
65
- }, V = { class: "bg-gray-50 lg:w-[calc(100vw-260px)] w-[100vw]" }, _ = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, $ = { class: "flex items-center gap-[6px]" }, j = {
66
+ }, _ = { class: "bg-gray-50 lg:w-[calc(100vw-260px)] w-[100vw]" }, $ = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, j = { class: "flex items-center gap-[6px]" }, E = {
66
67
  style: { height: "calc(100vh - 165px)" },
67
68
  class: "bg-gray-50 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw]"
68
- }, E = { class: "bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
69
- function O(t, e, o, i, a, r) {
70
- const s = x("VsForm");
71
- return d(), w("div", V, [
72
- n("div", _, [
69
+ }, O = { class: "bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
70
+ function C(t, e, a, i, o, s) {
71
+ const r = x("VsForm");
72
+ return h(), w("div", _, [
73
+ n("div", $, [
73
74
  e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Створити", -1)),
74
- n("div", $, [
75
+ n("div", j, [
75
76
  n("button", {
76
77
  onClick: e[0] || (e[0] = (l) => t.$router.back()),
77
78
  class: "flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100"
78
79
  }, " Скасувати "),
79
80
  n("button", {
80
- onClick: e[1] || (e[1] = (...l) => r.createObject && r.createObject(...l)),
81
+ onClick: e[1] || (e[1] = (...l) => s.createObject && s.createObject(...l)),
81
82
  class: "inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"
82
83
  }, " Зберегти ")
83
84
  ])
84
85
  ]),
85
- n("div", j, [
86
- n("div", E, [
87
- a.scheme ? (d(), k(s, {
86
+ n("div", E, [
87
+ n("div", O, [
88
+ o.scheme ? (h(), y(r, {
88
89
  key: 0,
89
90
  ref: "form",
90
- scheme: a.scheme,
91
- modelValue: a.formValues,
92
- "onUpdate:modelValue": e[2] || (e[2] = (l) => a.formValues = l),
91
+ scheme: o.scheme,
92
+ style: k(o.style),
93
+ modelValue: o.formValues,
94
+ "onUpdate:modelValue": e[2] || (e[2] = (l) => o.formValues = l),
93
95
  class: "p-0 mt-[20px]"
94
- }, null, 8, ["scheme", "modelValue"])) : y("", !0)
96
+ }, null, 8, ["scheme", "style", "modelValue"])) : v("", !0)
95
97
  ])
96
98
  ])
97
99
  ]);
98
100
  }
99
- const M = /* @__PURE__ */ g(v, [["render", O]]);
101
+ const B = /* @__PURE__ */ g(V, [["render", C]]);
100
102
  export {
101
- M as default
103
+ B as default
102
104
  };
@@ -1,4 +1,4 @@
1
- import { _ as C, e as qe, f as Pe, g as Be, d as F, I as Le, V as ze, h as Oe, i as Ue, j as Ne, A as Ee, a as He, u as Ce, s as Re } from "./import-file-CjSMt4zv.js";
1
+ import { _ as C, e as qe, f as Pe, g as Be, d as F, I as Le, V as ze, h as Oe, i as Ue, j as Ne, A as Ee, a as He, u as Ce, s as Re } from "./import-file-D5TQl-P7.js";
2
2
  import { openBlock as o, createElementBlock as c, createTextVNode as j, toDisplayString as I, createCommentVNode as w, resolveComponent as p, Fragment as T, createElementVNode as l, createVNode as y, withCtx as $, createBlock as _, renderList as D, withModifiers as We, normalizeClass as V, createStaticVNode as Ae, withDirectives as z, vModelCheckbox as Je, resolveDynamicComponent as q, Transition as O, renderSlot as Ze, vShow as Te, getCurrentInstance as Ie, ref as L, normalizeStyle as $e } from "vue";
3
3
  const Ge = {
4
4
  data() {
@@ -729,7 +729,7 @@ function hn(t, e, n, a, s, r) {
729
729
  ])
730
730
  ]);
731
731
  }
732
- const fn = /* @__PURE__ */ C(cn, [["render", hn], ["__scopeId", "data-v-e1f274c9"]]), mn = {
732
+ const fn = /* @__PURE__ */ C(cn, [["render", hn], ["__scopeId", "data-v-c6318482"]]), mn = {
733
733
  components: {
734
734
  AdminComponentIs: Se,
735
735
  AdminTree: fn,
@@ -1527,7 +1527,7 @@ function Ss(t, e, n, a, s, r) {
1527
1527
  ])
1528
1528
  ]);
1529
1529
  }
1530
- const Vs = /* @__PURE__ */ C(rs, [["render", Ss], ["__scopeId", "data-v-5b7d20f1"]]), Ds = {
1530
+ const Vs = /* @__PURE__ */ C(rs, [["render", Ss], ["__scopeId", "data-v-6645339e"]]), Ds = {
1531
1531
  components: { AdminTable: Vs },
1532
1532
  data() {
1533
1533
  return {
@@ -1,4 +1,4 @@
1
- import { _ as v, I as R, a as q, u as Z, s as T, b as G, c as J, d as S } from "./import-file-CjSMt4zv.js";
1
+ import { _ as v, I as R, a as q, u as Z, s as T, b as G, c as J, d as S } from "./import-file-D5TQl-P7.js";
2
2
  import { openBlock as l, createElementBlock as a, createElementVNode as n, createStaticVNode as B, resolveComponent as p, normalizeClass as L, createTextVNode as U, toDisplayString as A, createVNode as c, Transition as K, withCtx as Q, withDirectives as P, Fragment as E, renderList as F, vShow as W, createCommentVNode as D, withModifiers as X, createBlock as Y, resolveDynamicComponent as e1 } from "vue";
3
3
  const t1 = {}, o1 = {
4
4
  xmlns: "http://www.w3.org/2000/svg",
@@ -396,7 +396,7 @@ function q1(e, t, r, i, o, s) {
396
396
  ])
397
397
  ]);
398
398
  }
399
- const K1 = /* @__PURE__ */ v(Q1, [["render", q1], ["__scopeId", "data-v-79c10cab"]]);
399
+ const K1 = /* @__PURE__ */ v(Q1, [["render", q1], ["__scopeId", "data-v-34da2042"]]);
400
400
  export {
401
401
  K1 as default
402
402
  };
package/dist/admin.js CHANGED
@@ -1,4 +1,4 @@
1
- import { k as f } from "./import-file-CjSMt4zv.js";
1
+ import { k as f } from "./import-file-D5TQl-P7.js";
2
2
  export {
3
3
  f as default
4
4
  };