stacks 0.47.2 → 0.48.1

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 (148) hide show
  1. package/buddy/art/social.png +0 -0
  2. package/buddy/package.json +1 -1
  3. package/buddy/src/commands/make.ts +27 -12
  4. package/buddy/src/commands/test.ts +40 -2
  5. package/core/actions/package.json +2 -2
  6. package/core/actions/src/helpers/utils.ts +21 -1
  7. package/core/actions/src/make.ts +37 -6
  8. package/core/actions/src/test-coverage.ts +1 -1
  9. package/core/actions/src/test-feature.ts +5 -0
  10. package/core/actions/src/test-unit.ts +5 -0
  11. package/core/ai/package.json +1 -1
  12. package/core/alias/package.json +1 -1
  13. package/core/alias/src/index.ts +8 -0
  14. package/core/arrays/package.json +1 -1
  15. package/core/auth/package.json +1 -1
  16. package/core/build/package.json +3 -3
  17. package/core/cache/package.json +3 -3
  18. package/core/chat/README.md +33 -40
  19. package/core/chat/package.json +4 -5
  20. package/core/cli/package.json +1 -1
  21. package/core/cloud/package.json +1 -1
  22. package/core/collections/package.json +1 -1
  23. package/core/config/package.json +1 -1
  24. package/core/dashboard/package.json +1 -1
  25. package/core/database/package.json +1 -1
  26. package/core/datetime/package.json +1 -1
  27. package/core/desktop/package.json +1 -1
  28. package/core/docs/node_modules/.bin/vitepress +2 -2
  29. package/core/docs/package.json +2 -2
  30. package/core/domains/package.json +1 -1
  31. package/core/drivers/package.json +1 -1
  32. package/core/email/README.md +101 -35
  33. package/core/email/package.json +10 -2
  34. package/core/email/src/utils/config.ts +1 -1
  35. package/core/error-handling/package.json +2 -2
  36. package/core/events/package.json +1 -1
  37. package/core/git/package.json +1 -1
  38. package/core/health/package.json +1 -1
  39. package/core/lint/node_modules/.bin/eslint +2 -2
  40. package/core/lint/package.json +3 -3
  41. package/core/logging/package.json +1 -1
  42. package/core/modules/package.json +1 -1
  43. package/core/notifications/README.md +7 -2
  44. package/core/notifications/package.json +5 -1
  45. package/core/notifications/src/drivers/chat.ts +1 -0
  46. package/core/notifications/src/drivers/email.ts +1 -0
  47. package/core/notifications/src/drivers/push.ts +1 -0
  48. package/core/notifications/src/drivers/sms.ts +1 -0
  49. package/core/notifications/src/index.ts +37 -9
  50. package/core/notifications/src/utils/config.ts +2 -2
  51. package/core/notifications/tests/chat/Slack.test.ts +5 -4
  52. package/core/notifications/tests/email/Mailgun.test.ts +4 -3
  53. package/core/notifications/tests/email/Sendgrid.test.ts +3 -3
  54. package/core/notifications/tests/sms/Twilio.test.ts +3 -3
  55. package/core/objects/package.json +1 -1
  56. package/core/path/package.json +1 -1
  57. package/core/path/src/index.ts +25 -0
  58. package/core/payments/package.json +1 -1
  59. package/core/push/README.md +24 -42
  60. package/core/push/package.json +1 -1
  61. package/core/realtime/package.json +1 -1
  62. package/core/router/package.json +1 -1
  63. package/core/search-engine/package.json +1 -1
  64. package/core/security/package.json +1 -1
  65. package/core/server/package.json +1 -1
  66. package/core/sms/README.md +82 -35
  67. package/core/sms/package.json +10 -4
  68. package/core/storage/package.json +1 -1
  69. package/core/storage/src/index.ts +13 -0
  70. package/core/strings/README.md +10 -2
  71. package/core/strings/package.json +4 -2
  72. package/core/strings/src/case.ts +14 -0
  73. package/core/strings/src/index.ts +4 -97
  74. package/core/strings/src/pluralize.ts +1 -0
  75. package/core/strings/src/utils.ts +80 -0
  76. package/core/strings/src/validation.ts +182 -0
  77. package/core/tables/README.md +109 -0
  78. package/core/tables/examples/vue/App.vue +12 -0
  79. package/core/tables/examples/vue/favicon.png +0 -0
  80. package/core/tables/examples/vue/index.html +20 -0
  81. package/core/tables/examples/web/favicon.png +0 -0
  82. package/core/tables/examples/web/index.html +13 -0
  83. package/core/tables/node_modules/.bin/mkdist +17 -0
  84. package/core/tables/node_modules/.bin/tsc +17 -0
  85. package/core/tables/node_modules/.bin/tsserver +17 -0
  86. package/core/tables/node_modules/.bin/unbuild +17 -0
  87. package/core/tables/package.json +97 -0
  88. package/core/tables/src/cli/index.ts +1 -0
  89. package/core/tables/src/components/Demo.vue +89 -0
  90. package/core/tables/src/components/README.md +111 -0
  91. package/core/tables/src/components/Table.vue +342 -0
  92. package/core/tables/src/components/TableBody.vue +33 -0
  93. package/core/tables/src/components/TableCellActionItems.vue +9 -0
  94. package/core/tables/src/components/TableFilters.vue +703 -0
  95. package/core/tables/src/components/TableHead.vue +87 -0
  96. package/core/tables/src/components/TablePagination.vue +146 -0
  97. package/core/tables/src/components/TableRow.vue +78 -0
  98. package/core/tables/src/components/TableSearch.vue +38 -0
  99. package/core/tables/src/components/Tooltip.vue +10 -0
  100. package/core/tables/src/config/tables.ts +1 -0
  101. package/core/tables/src/docs/index.md +0 -0
  102. package/core/tables/src/functions/README.md +8 -0
  103. package/core/tables/src/functions/dark.ts +3 -0
  104. package/core/tables/src/functions/index.ts +2 -0
  105. package/core/tables/src/functions/table.ts +180 -0
  106. package/core/tables/tests/example.test.ts +7 -0
  107. package/core/testing/node_modules/.bin/vitest +2 -2
  108. package/core/testing/package.json +9 -6
  109. package/core/types/node_modules/.bin/vitepress +2 -2
  110. package/core/types/package.json +3 -3
  111. package/core/types/src/cli.ts +10 -2
  112. package/core/types/src/hashing.ts +15 -0
  113. package/core/types/src/index.ts +2 -0
  114. package/core/types/src/notifications.ts +1 -0
  115. package/core/types/src/reactivity.ts +3 -0
  116. package/core/types/src/tables.ts +48 -0
  117. package/core/ui/node_modules/.bin/vue-tsc +2 -2
  118. package/core/ui/package.json +2 -2
  119. package/core/utils/package.json +1 -1
  120. package/core/x-ray/package.json +1 -1
  121. package/package.json +3 -2
  122. package/tsconfig.json +8 -0
  123. package/vitest.config.ts +2 -0
  124. package/core/notifications/src/drivers/chat/discord.ts +0 -15
  125. package/core/notifications/src/drivers/chat/index.ts +0 -2
  126. package/core/notifications/src/drivers/chat/slack.ts +0 -22
  127. package/core/notifications/src/drivers/email/actions/send.ts +0 -36
  128. package/core/notifications/src/drivers/email/emailjs.ts +0 -21
  129. package/core/notifications/src/drivers/email/index.ts +0 -9
  130. package/core/notifications/src/drivers/email/mailgun.ts +0 -19
  131. package/core/notifications/src/drivers/email/mailjet.ts +0 -18
  132. package/core/notifications/src/drivers/email/mandrill.ts +0 -17
  133. package/core/notifications/src/drivers/email/netcore.ts +0 -17
  134. package/core/notifications/src/drivers/email/nodemailer.ts +0 -21
  135. package/core/notifications/src/drivers/email/postmark.ts +0 -17
  136. package/core/notifications/src/drivers/email/sendgrid.ts +0 -18
  137. package/core/notifications/src/drivers/email/ses.ts +0 -19
  138. package/core/notifications/src/drivers/push/expo.ts +0 -19
  139. package/core/notifications/src/drivers/push/fcm.ts +0 -19
  140. package/core/notifications/src/drivers/sms/gupshup.ts +0 -21
  141. package/core/notifications/src/drivers/sms/index.ts +0 -8
  142. package/core/notifications/src/drivers/sms/nexmo.ts +0 -22
  143. package/core/notifications/src/drivers/sms/plivo.ts +0 -22
  144. package/core/notifications/src/drivers/sms/sms77.ts +0 -21
  145. package/core/notifications/src/drivers/sms/sns.ts +0 -22
  146. package/core/notifications/src/drivers/sms/telnyx.ts +0 -22
  147. package/core/notifications/src/drivers/sms/termii.ts +0 -21
  148. package/core/notifications/src/drivers/sms/twilio.ts +0 -22
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Replace backslash to slash
3
+ *
4
+ * @category String
5
+ */
6
+ export function slash(str: string) {
7
+ return str.replace(/\\/g, '/')
8
+ }
9
+
10
+ /**
11
+ * Ensure prefix of a string
12
+ *
13
+ * @category String
14
+ */
15
+ export function ensurePrefix(prefix: string, str: string) {
16
+ if (!str.startsWith(prefix))
17
+ return prefix + str
18
+ return str
19
+ }
20
+
21
+ /**
22
+ * Ensure suffix of a string
23
+ *
24
+ * @category String
25
+ */
26
+ export function ensureSuffix(suffix: string, str: string) {
27
+ if (!str.endsWith(suffix))
28
+ return str + suffix
29
+ return str
30
+ }
31
+
32
+ /**
33
+ * Dead simple template engine, just like Python's `.format()`
34
+ *
35
+ * @category String
36
+ * @example
37
+ * ```
38
+ * const result = template(
39
+ * 'Hello {0}! My name is {1}.',
40
+ * 'Buddy',
41
+ * 'Chris'
42
+ * ) // Hello Buddy! My name is Chris.
43
+ * ```
44
+ */
45
+ export function template(str: string, ...args: any[]): string {
46
+ return str.replace(/{(\d+)}/g, (match, key) => {
47
+ const index = Number(key)
48
+ if (Number.isNaN(index))
49
+ return match
50
+ return args[index]
51
+ })
52
+ }
53
+
54
+ // port from nanoid
55
+ // https://github.com/ai/nanoid
56
+ const urlAlphabet = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
57
+ /**
58
+ * Generate a random string
59
+ * @category String
60
+ */
61
+ export function randomStr(size = 16, dict = urlAlphabet) {
62
+ let id = ''
63
+ let i = size
64
+ const len = dict.length
65
+ while (i--)
66
+ id += dict[(Math.random() * len) | 0]
67
+ return id
68
+ }
69
+
70
+ /**
71
+ * First letter uppercase, other lowercase
72
+ * @category string
73
+ * @example
74
+ * ```
75
+ * capitalize('hello') => 'Hello'
76
+ * ```
77
+ */
78
+ export function capitalize(str: string): string {
79
+ return str[0].toUpperCase() + str.slice(1).toLowerCase()
80
+ }
@@ -0,0 +1,182 @@
1
+ import validator from 'validator'
2
+ import type { HashAlgorithm } from '@stacksjs/types'
3
+
4
+ export function isEmail(email: string) {
5
+ return validator.isEmail(email)
6
+ }
7
+
8
+ export function isStrongPassword(password: string) {
9
+ return validator.isStrongPassword(password)
10
+ }
11
+
12
+ export function isAlphanumeric(username: string) {
13
+ return validator.isAlphanumeric(username)
14
+ }
15
+
16
+ export function validateUsername(username: string) {
17
+ return isAlphanumeric(username)
18
+ }
19
+
20
+ export function isURL(url: string) {
21
+ return validator.isURL(url)
22
+ }
23
+
24
+ export function isMobilePhone(phoneNumber: string) {
25
+ return validator.isMobilePhone(phoneNumber)
26
+ }
27
+
28
+ export function isAlpha(name: string) {
29
+ return validator.isAlpha(name)
30
+ }
31
+
32
+ export function isPostalCode(zipCode: string) {
33
+ return validator.isPostalCode(zipCode, 'any')
34
+ }
35
+
36
+ export function isDate(date: string) {
37
+ return validator.isDate(date)
38
+ }
39
+
40
+ export function isNumeric(number: string) {
41
+ return validator.isNumeric(number)
42
+ }
43
+
44
+ export function isBoolean(boolean: string) {
45
+ return validator.isBoolean(boolean)
46
+ }
47
+
48
+ export function isHexColor(color: string) {
49
+ return validator.isHexColor(color)
50
+ }
51
+
52
+ export function isHexadecimal(hex: string) {
53
+ return validator.isHexadecimal(hex)
54
+ }
55
+
56
+ export function isBase64(base64: string) {
57
+ return validator.isBase64(base64)
58
+ }
59
+
60
+ export function isUUID(uuid: string) {
61
+ return validator.isUUID(uuid)
62
+ }
63
+
64
+ export function isJSON(json: string) {
65
+ return validator.isJSON(json)
66
+ }
67
+
68
+ export function isCreditCard(creditCard: string) {
69
+ return validator.isCreditCard(creditCard)
70
+ }
71
+
72
+ export function isISBN(isbn: string) {
73
+ return validator.isISBN(isbn)
74
+ }
75
+
76
+ export function isIP(ip: string) {
77
+ return validator.isIP(ip)
78
+ }
79
+
80
+ export function isIPRange(ip: string) {
81
+ return validator.isIPRange(ip)
82
+ }
83
+
84
+ export function isMACAddress(macAddress: string) {
85
+ return validator.isMACAddress(macAddress)
86
+ }
87
+
88
+ export function isLatLong(latitude: string) {
89
+ return validator.isLatLong(latitude)
90
+ }
91
+
92
+ export function isLatitude(longitude: string) {
93
+ return validator.isLatLong(longitude)
94
+ }
95
+
96
+ export function isLongitude(longitude: string) {
97
+ return validator.isLatLong(longitude)
98
+ }
99
+
100
+ export function isCurrency(currency: string) {
101
+ return validator.isCurrency(currency)
102
+ }
103
+
104
+ export function isDataURI(dataURI: string) {
105
+ return validator.isDataURI(dataURI)
106
+ }
107
+
108
+ export function isMimeType(mimeType: string) {
109
+ return validator.isMimeType(mimeType)
110
+ }
111
+
112
+ export function isJWT(jwt: string) {
113
+ return validator.isJWT(jwt)
114
+ }
115
+
116
+ export function isMongoId(mongoId: string) {
117
+ return validator.isMongoId(mongoId)
118
+ }
119
+
120
+ export function isAscii(ascii: string) {
121
+ return validator.isAscii(ascii)
122
+ }
123
+
124
+ export function isBase32(base32: string) {
125
+ return validator.isBase32(base32)
126
+ }
127
+
128
+ export function isByteLength(byteLength: string) {
129
+ return validator.isByteLength(byteLength)
130
+ }
131
+
132
+ export function isFQDN(fqdn: string) {
133
+ return validator.isFQDN(fqdn)
134
+ }
135
+
136
+ export function isFullWidth(fullWidth: string) {
137
+ return validator.isFullWidth(fullWidth)
138
+ }
139
+
140
+ export function isHalfWidth(halfWidth: string) {
141
+ return validator.isHalfWidth(halfWidth)
142
+ }
143
+
144
+ export function isHash(hash: string, algorithm: HashAlgorithm) {
145
+ return validator.isHash(hash, algorithm)
146
+ }
147
+
148
+ export function isHSL(hsl: string) {
149
+ return validator.isHSL(hsl)
150
+ }
151
+
152
+ export function isIBAN(iban: string) {
153
+ return validator.isIBAN(iban)
154
+ }
155
+
156
+ export function isIdentityCard(identityCard: string) {
157
+ return validator.isIdentityCard(identityCard)
158
+ }
159
+
160
+ export function isISIN(isin: string) {
161
+ return validator.isISIN(isin)
162
+ }
163
+
164
+ export function isISO8601(iso8601: string) {
165
+ return validator.isISO8601(iso8601)
166
+ }
167
+
168
+ export function isISRC(isrc: string) {
169
+ return validator.isISRC(isrc)
170
+ }
171
+
172
+ export function isISSN(issn: string) {
173
+ return validator.isISSN(issn)
174
+ }
175
+
176
+ export function isISO31661Alpha2(iso31661Alpha2: string) {
177
+ return validator.isISO31661Alpha2(iso31661Alpha2)
178
+ }
179
+
180
+ export function isISO31661Alpha3(iso31661Alpha3: string) {
181
+ return validator.isISO31661Alpha3(iso31661Alpha3)
182
+ }
@@ -0,0 +1,109 @@
1
+ # Table Stack
2
+
3
+ The easy & modern way to work with tables of any size. Blazing-fast searching, filtering, sorting, and paginating. Powered by your search engine of choice. Kick-start the development of a feature-rich & configurable table UI, including a beautiful default UX.
4
+
5
+ ## 🐙 Features
6
+
7
+ This Vue component library comes with the following features, improvements to the `table` element:
8
+
9
+ - `<table-v2 />`
10
+ - quickly spin up a highly-configurable table UI without worrying about the backend
11
+ - "facet-filtering" & "table head sorting" natively built-in
12
+ - Meilisearch & Laravel Scout API compatible
13
+ - Enterprise-ready
14
+ - _Soon: Algolia & Typesense integration_
15
+
16
+ Get granular control over the table appearance & behavior, with the following (optional) components:
17
+
18
+ - `<table-search />`
19
+ - configure your search input for blazing fast search results
20
+
21
+ - `<table-filters />`
22
+ - overwrite the default display of your table's filters
23
+
24
+ - `<table-pagination />`
25
+ - easily configure the pagination of your table
26
+
27
+ - `<table-configure />`
28
+ - simple way to configure the table in HTML semantic fashion
29
+
30
+ Read more about these features in their respective [docs](https://ow3.org/docs).
31
+
32
+ ## 💡 Get Started
33
+
34
+ To get started, you simply need to install the `@ow3/table-vue` npm package.
35
+
36
+ ```bash
37
+ npm install @ow3/table-vue
38
+ ```
39
+
40
+ Next up, we need to make use of the components.
41
+
42
+ ```vue
43
+ <script setup>
44
+ import { Table as TableV2 } from 'table-vue'
45
+ </script>
46
+
47
+ <template>
48
+ <!-- the `type`-property indicates to to the search engine the "index" you want to target -->
49
+ <TableV2 type="movies" />
50
+
51
+ <!-- these are the default properties (all of them are optional) -->
52
+ <TableV2
53
+ source="127.0.0.1:7700"
54
+ columns="*"
55
+ :searchable="true"
56
+ :filterable="true"
57
+ :sortable="true"
58
+ :actionable="true"
59
+ :selectable="false"
60
+ :per-page="20"
61
+ />
62
+
63
+ <!-- another "data table" example -->
64
+ <TableV2
65
+ source="127.0.0.1:7700"
66
+ password="NtUvZv5Q87e355b807622149c350ac38679645b4e2603a1d3eb48cda080f977e76329aeb"
67
+ type="orders"
68
+ columns="id: Order, customer_name: Customer, customer_po: PO#, part_name: Part, created_at: Ordered, due_at: Due, stage_name: Status"
69
+ sort="id:desc"
70
+ sorts="id, customer_name, customer_po, part_name, stage_name, due_at, created_at"
71
+ filters="customer_name, vendor_name, part_name, document_types"
72
+ actions="Edit"
73
+ per-page="10"
74
+ selectable="true"
75
+ />
76
+ </template>
77
+ ```
78
+
79
+ To learn more about what's possible & how to best build modern data tables, check out our documentation.
80
+
81
+ ## 🧪 Testing
82
+
83
+ ```bash
84
+ yarn test
85
+ ```
86
+
87
+ ## 📈 Changelog
88
+
89
+ Please see our [releases](https://github.com/stacksjs/table/releases) page for more information on what has changed recently.
90
+
91
+ ## 💪🏼 Contributing
92
+
93
+ Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
94
+
95
+ ## 🏝 Community
96
+
97
+ For help, discussion about best practices, or any other conversation that would benefit from being searchable:
98
+
99
+ [Table Elements on GitHub](https://github.com/stacksjs/table/discussions)
100
+
101
+ For casual chit-chat with others using this package:
102
+
103
+ [Join the Open Web Discord Server](https://discord.ow3.org)
104
+
105
+ ## 📄 License
106
+
107
+ The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.
108
+
109
+ Made with ❤️ by Open Web Labs.
@@ -0,0 +1,12 @@
1
+ <!--
2
+ This is how you would implement your generated
3
+ library into your own frontend. You may import
4
+ any of the components developed.
5
+ -->
6
+ <script setup lang="ts">
7
+ import { Demo } from './dist/index.mjs'
8
+ </script>
9
+
10
+ <template>
11
+ <Demo />
12
+ </template>
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="./favicon.png" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Stacks Vue Example</title>
8
+ <link rel="stylesheet" href="./dist/style.css">
9
+ </head>
10
+ <body>
11
+ <div id="app"></div>
12
+
13
+ <script type="module">
14
+ import { createApp } from 'vue'
15
+ import App from './App.vue'
16
+
17
+ createApp(App).mount('#app')
18
+ </script>
19
+ </body>
20
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="./favicon.png" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Stacks Web Component Example</title>
8
+ </head>
9
+ <body>
10
+ <script type="module" src="./dist/index.mjs"></script>
11
+ <hello-world></hello-world>
12
+ </body>
13
+ </html>
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/mkdist@1.0.0_typescript@4.9.4/node_modules/mkdist/dist/cli.cjs" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/mkdist@1.0.0_typescript@4.9.4/node_modules/mkdist/dist/cli.cjs" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/bin/tsc" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/bin/tsc" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/bin/tsserver" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/bin/tsserver" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/unbuild@1.0.2/node_modules/unbuild/dist/cli.mjs" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/unbuild@1.0.2/node_modules/unbuild/dist/cli.mjs" "$@"
17
+ fi
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@stacksjs/tables",
3
+ "version": "0.48.1",
4
+ "description": "The easy & modern way to work with tables. Facet filtering, searching, pagination, ...",
5
+ "author": "Open Web Labs",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/stacksjs/tables.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/stacksjs/tables/issues"
13
+ },
14
+ "keywords": [
15
+ "tables",
16
+ "filters",
17
+ "pagination",
18
+ "sorting",
19
+ "search",
20
+ "component",
21
+ "library",
22
+ "vue",
23
+ "typescript",
24
+ "javascript"
25
+ ],
26
+ "contributors": [
27
+ "Chris Breuer <chris@ow3.org>"
28
+ ],
29
+ "engines": {
30
+ "node": ">=v18.12.1",
31
+ "pnpm": ">=7.21.0"
32
+ },
33
+ "scripts": {
34
+ "dev": "pnpm buddy dev",
35
+ "dev:components": "pnpm buddy dev:components",
36
+ "dev:docs": "pnpm buddy dev:docs",
37
+ "dev:functions": "pnpm buddy dev:functions // todo: opens the auto-generated web server of functions",
38
+ "development": "pnpm buddy dev",
39
+ "build": "pnpm buddy build",
40
+ "build:components": "pnpm buddy build:components",
41
+ "build:vue-components": "pnpm buddy build:web-components",
42
+ "build:web-components": "pnpm buddy build:web-components",
43
+ "build:functions": "pnpm buddy build:functions // needs to have option to ",
44
+ "build:docs": "pnpm buddy build:docs",
45
+ "prod": "pnpm buddy build",
46
+ "prod:components": "pnpm buddy build:components",
47
+ "prod:vue-components": "pnpm buddy build:web-components",
48
+ "prod:web-components": "pnpm buddy build:web-components",
49
+ "prod:functions": "pnpm buddy build:functions // needs to have option to ",
50
+ "prod:docs": "pnpm buddy build:docs",
51
+ "production": "pnpm buddy build",
52
+ "deploy": "pnpm buddy deploy",
53
+ "deploy:functions": "pnpm buddy deploy:functions",
54
+ "deploy:pages": "pnpm buddy deploy:functions",
55
+ "deploy:docs": "pnpm buddy deploy:docs",
56
+ "deploy:all": "pnpm buddy deploy:all",
57
+ "lint": "pnpm buddy lint",
58
+ "lint:fix": "pnpm buddy lint:fix",
59
+ "serve": "pnpm buddy dev",
60
+ "serve:pages": "pnpm buddy dev:pages",
61
+ "serve:functions": "pnpm buddy dev:functions",
62
+ "make": "pnpm buddy make",
63
+ "make:table": "pnpm buddy make:table",
64
+ "commit": "pnpm buddy commit",
65
+ "release": "pnpm buddy release",
66
+ "changelog": "pnpm buddy changelog",
67
+ "generate": "pnpm buddy generate",
68
+ "generate:entries": "pnpm buddy generate:entries",
69
+ "generate:vue-compat": "pnpm buddy generate:vue-compat",
70
+ "generate:vscode-custom-data": "pnpm buddy generate:vscode-custom-data",
71
+ "generate:web-types": "pnpm buddy generate:web-types",
72
+ "generate:component-meta": "pnpm buddy generate:component-meta",
73
+ "test": "pnpm buddy test",
74
+ "test:coverage": "pnpm buddy test:coverage",
75
+ "test:types": "pnpm buddy test:types"
76
+ },
77
+ "peerDependencies": {
78
+ "@stacksjs/types": "workspace:*",
79
+ "@stacksjs/utils": "workspace:*",
80
+ "@vueform/multiselect": "^2.4.2",
81
+ "meilisearch": "^0.25.1"
82
+ },
83
+ "devDependencies": {
84
+ "@stacksjs/testing": "workspace:*",
85
+ "mkdist": "^1.0.0",
86
+ "typescript": "^4.9.4",
87
+ "unbuild": "^1.0.2"
88
+ },
89
+ "lint-staged": {
90
+ "*.{js,jsx,ts,tsx,vue}": "eslint --fix"
91
+ },
92
+ "config": {
93
+ "commitizen": {
94
+ "path": ".stacks/node_modules/cz-git"
95
+ }
96
+ }
97
+ }
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,89 @@
1
+ <script setup lang="ts">
2
+ import { Table as TableV2 } from './main'
3
+
4
+ const filterValues = {
5
+ website_access: [{
6
+ label: 'Yes',
7
+ value: 1,
8
+ }, {
9
+ label: 'No',
10
+ value: 0,
11
+ }],
12
+ disposition: [{
13
+ label: 'Active',
14
+ value: 'Active',
15
+ }, {
16
+ label: 'Released',
17
+ value: 'Released',
18
+ },
19
+ {
20
+ label: 'Terminated',
21
+ value: 'Terminated',
22
+ }],
23
+ }
24
+ </script>
25
+
26
+ <template>
27
+ <div class="font-sans">
28
+ <Suspense>
29
+ <TableSearch />
30
+ </Suspense>
31
+
32
+ <Suspense>
33
+ <TableFilters :filter-values="filterValues" />
34
+ </Suspense>
35
+ <Suspense>
36
+ <TableV2
37
+ source="http://127.0.0.1:7700/"
38
+ password=""
39
+ type="users"
40
+ columns="
41
+ id: ID,
42
+ first_name: First Name,
43
+ last_name: Last Name,
44
+ npn: NPN,
45
+ email: Email,
46
+ website_access: Website Access,
47
+ disposition: Disposition"
48
+ sort="id:desc"
49
+ sorts="id, email, npn"
50
+ filters=""
51
+ actions="Info"
52
+ per-page="50"
53
+ selectable="true"
54
+ >
55
+ <template #id="id">
56
+ <a
57
+ href="#"
58
+ class="flex font-medium text-yellow-600"
59
+ >
60
+ {{ id.value }}
61
+ </a>
62
+ </template>
63
+
64
+ <template #customer_name="customerName">
65
+ <a
66
+ href="#"
67
+ class="flex font-medium text-yellow-600"
68
+ >
69
+ {{ customerName.value }}
70
+ </a>
71
+ </template>
72
+ <template #part_name="parts">
73
+ <a
74
+ v-for="(part, index) in parts.value"
75
+ :key="index"
76
+ href="#"
77
+ class="flex font-medium text-yellow-600"
78
+ >
79
+ {{ part }}
80
+ </a>
81
+ </template>
82
+ </TableV2>
83
+ </Suspense>
84
+
85
+ <Suspense>
86
+ <TablePagination />
87
+ </Suspense>
88
+ </div>
89
+ </template>