@adminforth/crud-approve-plugin 1.0.0

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.
@@ -0,0 +1,420 @@
1
+ {
2
+ "name": "custom",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "custom",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "@git-diff-view/file": "^0.0.35",
13
+ "@git-diff-view/vue": "^0.0.35",
14
+ "dayjs": "^1.11.19"
15
+ }
16
+ },
17
+ "node_modules/@babel/helper-string-parser": {
18
+ "version": "7.27.1",
19
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
20
+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
21
+ "license": "MIT",
22
+ "engines": {
23
+ "node": ">=6.9.0"
24
+ }
25
+ },
26
+ "node_modules/@babel/helper-validator-identifier": {
27
+ "version": "7.28.5",
28
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
29
+ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
30
+ "license": "MIT",
31
+ "engines": {
32
+ "node": ">=6.9.0"
33
+ }
34
+ },
35
+ "node_modules/@babel/parser": {
36
+ "version": "7.28.5",
37
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz",
38
+ "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==",
39
+ "license": "MIT",
40
+ "dependencies": {
41
+ "@babel/types": "^7.28.5"
42
+ },
43
+ "bin": {
44
+ "parser": "bin/babel-parser.js"
45
+ },
46
+ "engines": {
47
+ "node": ">=6.0.0"
48
+ }
49
+ },
50
+ "node_modules/@babel/types": {
51
+ "version": "7.28.5",
52
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz",
53
+ "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==",
54
+ "license": "MIT",
55
+ "dependencies": {
56
+ "@babel/helper-string-parser": "^7.27.1",
57
+ "@babel/helper-validator-identifier": "^7.28.5"
58
+ },
59
+ "engines": {
60
+ "node": ">=6.9.0"
61
+ }
62
+ },
63
+ "node_modules/@git-diff-view/core": {
64
+ "version": "0.0.35",
65
+ "resolved": "https://registry.npmjs.org/@git-diff-view/core/-/core-0.0.35.tgz",
66
+ "integrity": "sha512-cdH3BopR6AWUW+6hP78zGyryKxR9JkPgryd1JN78i5k+F9Eo4x/4S23ZF1VZnrpPlGLrSuYfiAZ0ho5m+pTuKg==",
67
+ "license": "MIT",
68
+ "dependencies": {
69
+ "@git-diff-view/lowlight": "^0.0.35",
70
+ "fast-diff": "^1.3.0",
71
+ "highlight.js": "^11.11.0",
72
+ "lowlight": "^3.3.0"
73
+ }
74
+ },
75
+ "node_modules/@git-diff-view/file": {
76
+ "version": "0.0.35",
77
+ "resolved": "https://registry.npmjs.org/@git-diff-view/file/-/file-0.0.35.tgz",
78
+ "integrity": "sha512-1dDtW3fFpvM4Sj37m251Ofr/8mYJKE3YdiK3lKIDHBkdymF7vWp3O2dHUASKy1/HSd27NcHPrMRFqGUIMQN5Tg==",
79
+ "license": "MIT",
80
+ "dependencies": {
81
+ "@git-diff-view/core": "^0.0.35",
82
+ "diff": "^8.0.2",
83
+ "fast-diff": "^1.3.0",
84
+ "highlight.js": "^11.11.0",
85
+ "lowlight": "^3.3.0"
86
+ }
87
+ },
88
+ "node_modules/@git-diff-view/lowlight": {
89
+ "version": "0.0.35",
90
+ "resolved": "https://registry.npmjs.org/@git-diff-view/lowlight/-/lowlight-0.0.35.tgz",
91
+ "integrity": "sha512-MVpOxrNn1oHVOTOWUjxLbbf1W4OtVHjj6CHxwJbBRg9ZWZdShBINjuEgHVMSGB6vZuHKfwruRfXw8XxV3aF8zw==",
92
+ "license": "MIT",
93
+ "dependencies": {
94
+ "@types/hast": "^3.0.0",
95
+ "highlight.js": "^11.11.0",
96
+ "lowlight": "^3.3.0"
97
+ }
98
+ },
99
+ "node_modules/@git-diff-view/vue": {
100
+ "version": "0.0.35",
101
+ "resolved": "https://registry.npmjs.org/@git-diff-view/vue/-/vue-0.0.35.tgz",
102
+ "integrity": "sha512-9Hy0iDYNoKWhb1HdlitcyLvMkZ89QJ7d/FTADGg/H7Wy4lOSLJ3fX7mAtuMacomI+blRFD3tK5AAOUnMRozczw==",
103
+ "license": "MIT",
104
+ "dependencies": {
105
+ "@git-diff-view/core": "^0.0.35",
106
+ "@types/hast": "^3.0.0",
107
+ "fast-diff": "^1.3.0",
108
+ "highlight.js": "^11.11.0",
109
+ "lowlight": "^3.3.0"
110
+ },
111
+ "peerDependencies": {
112
+ "vue": "^3"
113
+ }
114
+ },
115
+ "node_modules/@jridgewell/sourcemap-codec": {
116
+ "version": "1.5.5",
117
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
118
+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
119
+ "license": "MIT"
120
+ },
121
+ "node_modules/@types/hast": {
122
+ "version": "3.0.4",
123
+ "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",
124
+ "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==",
125
+ "license": "MIT",
126
+ "dependencies": {
127
+ "@types/unist": "*"
128
+ }
129
+ },
130
+ "node_modules/@types/unist": {
131
+ "version": "3.0.3",
132
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
133
+ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
134
+ "license": "MIT"
135
+ },
136
+ "node_modules/@vue/compiler-core": {
137
+ "version": "3.5.25",
138
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.25.tgz",
139
+ "integrity": "sha512-vay5/oQJdsNHmliWoZfHPoVZZRmnSWhug0BYT34njkYTPqClh3DNWLkZNJBVSjsNMrg0CCrBfoKkjZQPM/QVUw==",
140
+ "license": "MIT",
141
+ "dependencies": {
142
+ "@babel/parser": "^7.28.5",
143
+ "@vue/shared": "3.5.25",
144
+ "entities": "^4.5.0",
145
+ "estree-walker": "^2.0.2",
146
+ "source-map-js": "^1.2.1"
147
+ }
148
+ },
149
+ "node_modules/@vue/compiler-dom": {
150
+ "version": "3.5.25",
151
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.25.tgz",
152
+ "integrity": "sha512-4We0OAcMZsKgYoGlMjzYvaoErltdFI2/25wqanuTu+S4gismOTRTBPi4IASOjxWdzIwrYSjnqONfKvuqkXzE2Q==",
153
+ "license": "MIT",
154
+ "dependencies": {
155
+ "@vue/compiler-core": "3.5.25",
156
+ "@vue/shared": "3.5.25"
157
+ }
158
+ },
159
+ "node_modules/@vue/compiler-sfc": {
160
+ "version": "3.5.25",
161
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.25.tgz",
162
+ "integrity": "sha512-PUgKp2rn8fFsI++lF2sO7gwO2d9Yj57Utr5yEsDf3GNaQcowCLKL7sf+LvVFvtJDXUp/03+dC6f2+LCv5aK1ag==",
163
+ "license": "MIT",
164
+ "dependencies": {
165
+ "@babel/parser": "^7.28.5",
166
+ "@vue/compiler-core": "3.5.25",
167
+ "@vue/compiler-dom": "3.5.25",
168
+ "@vue/compiler-ssr": "3.5.25",
169
+ "@vue/shared": "3.5.25",
170
+ "estree-walker": "^2.0.2",
171
+ "magic-string": "^0.30.21",
172
+ "postcss": "^8.5.6",
173
+ "source-map-js": "^1.2.1"
174
+ }
175
+ },
176
+ "node_modules/@vue/compiler-ssr": {
177
+ "version": "3.5.25",
178
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.25.tgz",
179
+ "integrity": "sha512-ritPSKLBcParnsKYi+GNtbdbrIE1mtuFEJ4U1sWeuOMlIziK5GtOL85t5RhsNy4uWIXPgk+OUdpnXiTdzn8o3A==",
180
+ "license": "MIT",
181
+ "dependencies": {
182
+ "@vue/compiler-dom": "3.5.25",
183
+ "@vue/shared": "3.5.25"
184
+ }
185
+ },
186
+ "node_modules/@vue/reactivity": {
187
+ "version": "3.5.25",
188
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.25.tgz",
189
+ "integrity": "sha512-5xfAypCQepv4Jog1U4zn8cZIcbKKFka3AgWHEFQeK65OW+Ys4XybP6z2kKgws4YB43KGpqp5D/K3go2UPPunLA==",
190
+ "license": "MIT",
191
+ "dependencies": {
192
+ "@vue/shared": "3.5.25"
193
+ }
194
+ },
195
+ "node_modules/@vue/runtime-core": {
196
+ "version": "3.5.25",
197
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.25.tgz",
198
+ "integrity": "sha512-Z751v203YWwYzy460bzsYQISDfPjHTl+6Zzwo/a3CsAf+0ccEjQ8c+0CdX1WsumRTHeywvyUFtW6KvNukT/smA==",
199
+ "license": "MIT",
200
+ "dependencies": {
201
+ "@vue/reactivity": "3.5.25",
202
+ "@vue/shared": "3.5.25"
203
+ }
204
+ },
205
+ "node_modules/@vue/runtime-dom": {
206
+ "version": "3.5.25",
207
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.25.tgz",
208
+ "integrity": "sha512-a4WrkYFbb19i9pjkz38zJBg8wa/rboNERq3+hRRb0dHiJh13c+6kAbgqCPfMaJ2gg4weWD3APZswASOfmKwamA==",
209
+ "license": "MIT",
210
+ "dependencies": {
211
+ "@vue/reactivity": "3.5.25",
212
+ "@vue/runtime-core": "3.5.25",
213
+ "@vue/shared": "3.5.25",
214
+ "csstype": "^3.1.3"
215
+ }
216
+ },
217
+ "node_modules/@vue/server-renderer": {
218
+ "version": "3.5.25",
219
+ "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.25.tgz",
220
+ "integrity": "sha512-UJaXR54vMG61i8XNIzTSf2Q7MOqZHpp8+x3XLGtE3+fL+nQd+k7O5+X3D/uWrnQXOdMw5VPih+Uremcw+u1woQ==",
221
+ "license": "MIT",
222
+ "dependencies": {
223
+ "@vue/compiler-ssr": "3.5.25",
224
+ "@vue/shared": "3.5.25"
225
+ },
226
+ "peerDependencies": {
227
+ "vue": "3.5.25"
228
+ }
229
+ },
230
+ "node_modules/@vue/shared": {
231
+ "version": "3.5.25",
232
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.25.tgz",
233
+ "integrity": "sha512-AbOPdQQnAnzs58H2FrrDxYj/TJfmeS2jdfEEhgiKINy+bnOANmVizIEgq1r+C5zsbs6l1CCQxtcj71rwNQ4jWg==",
234
+ "license": "MIT"
235
+ },
236
+ "node_modules/csstype": {
237
+ "version": "3.2.3",
238
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
239
+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
240
+ "license": "MIT"
241
+ },
242
+ "node_modules/dayjs": {
243
+ "version": "1.11.19",
244
+ "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
245
+ "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==",
246
+ "license": "MIT"
247
+ },
248
+ "node_modules/dequal": {
249
+ "version": "2.0.3",
250
+ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
251
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
252
+ "license": "MIT",
253
+ "engines": {
254
+ "node": ">=6"
255
+ }
256
+ },
257
+ "node_modules/devlop": {
258
+ "version": "1.1.0",
259
+ "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz",
260
+ "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==",
261
+ "license": "MIT",
262
+ "dependencies": {
263
+ "dequal": "^2.0.0"
264
+ },
265
+ "funding": {
266
+ "type": "github",
267
+ "url": "https://github.com/sponsors/wooorm"
268
+ }
269
+ },
270
+ "node_modules/diff": {
271
+ "version": "8.0.2",
272
+ "resolved": "https://registry.npmjs.org/diff/-/diff-8.0.2.tgz",
273
+ "integrity": "sha512-sSuxWU5j5SR9QQji/o2qMvqRNYRDOcBTgsJ/DeCf4iSN4gW+gNMXM7wFIP+fdXZxoNiAnHUTGjCr+TSWXdRDKg==",
274
+ "license": "BSD-3-Clause",
275
+ "engines": {
276
+ "node": ">=0.3.1"
277
+ }
278
+ },
279
+ "node_modules/entities": {
280
+ "version": "4.5.0",
281
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
282
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
283
+ "license": "BSD-2-Clause",
284
+ "engines": {
285
+ "node": ">=0.12"
286
+ },
287
+ "funding": {
288
+ "url": "https://github.com/fb55/entities?sponsor=1"
289
+ }
290
+ },
291
+ "node_modules/estree-walker": {
292
+ "version": "2.0.2",
293
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
294
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
295
+ "license": "MIT"
296
+ },
297
+ "node_modules/fast-diff": {
298
+ "version": "1.3.0",
299
+ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
300
+ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
301
+ "license": "Apache-2.0"
302
+ },
303
+ "node_modules/highlight.js": {
304
+ "version": "11.11.1",
305
+ "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz",
306
+ "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==",
307
+ "license": "BSD-3-Clause",
308
+ "engines": {
309
+ "node": ">=12.0.0"
310
+ }
311
+ },
312
+ "node_modules/lowlight": {
313
+ "version": "3.3.0",
314
+ "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz",
315
+ "integrity": "sha512-0JNhgFoPvP6U6lE/UdVsSq99tn6DhjjpAj5MxG49ewd2mOBVtwWYIT8ClyABhq198aXXODMU6Ox8DrGy/CpTZQ==",
316
+ "license": "MIT",
317
+ "dependencies": {
318
+ "@types/hast": "^3.0.0",
319
+ "devlop": "^1.0.0",
320
+ "highlight.js": "~11.11.0"
321
+ },
322
+ "funding": {
323
+ "type": "github",
324
+ "url": "https://github.com/sponsors/wooorm"
325
+ }
326
+ },
327
+ "node_modules/magic-string": {
328
+ "version": "0.30.21",
329
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
330
+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
331
+ "license": "MIT",
332
+ "dependencies": {
333
+ "@jridgewell/sourcemap-codec": "^1.5.5"
334
+ }
335
+ },
336
+ "node_modules/nanoid": {
337
+ "version": "3.3.11",
338
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
339
+ "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
340
+ "funding": [
341
+ {
342
+ "type": "github",
343
+ "url": "https://github.com/sponsors/ai"
344
+ }
345
+ ],
346
+ "license": "MIT",
347
+ "bin": {
348
+ "nanoid": "bin/nanoid.cjs"
349
+ },
350
+ "engines": {
351
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
352
+ }
353
+ },
354
+ "node_modules/picocolors": {
355
+ "version": "1.1.1",
356
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
357
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
358
+ "license": "ISC"
359
+ },
360
+ "node_modules/postcss": {
361
+ "version": "8.5.6",
362
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
363
+ "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
364
+ "funding": [
365
+ {
366
+ "type": "opencollective",
367
+ "url": "https://opencollective.com/postcss/"
368
+ },
369
+ {
370
+ "type": "tidelift",
371
+ "url": "https://tidelift.com/funding/github/npm/postcss"
372
+ },
373
+ {
374
+ "type": "github",
375
+ "url": "https://github.com/sponsors/ai"
376
+ }
377
+ ],
378
+ "license": "MIT",
379
+ "dependencies": {
380
+ "nanoid": "^3.3.11",
381
+ "picocolors": "^1.1.1",
382
+ "source-map-js": "^1.2.1"
383
+ },
384
+ "engines": {
385
+ "node": "^10 || ^12 || >=14"
386
+ }
387
+ },
388
+ "node_modules/source-map-js": {
389
+ "version": "1.2.1",
390
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
391
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
392
+ "license": "BSD-3-Clause",
393
+ "engines": {
394
+ "node": ">=0.10.0"
395
+ }
396
+ },
397
+ "node_modules/vue": {
398
+ "version": "3.5.25",
399
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.25.tgz",
400
+ "integrity": "sha512-YLVdgv2K13WJ6n+kD5owehKtEXwdwXuj2TTyJMsO7pSeKw2bfRNZGjhB7YzrpbMYj5b5QsUebHpOqR3R3ziy/g==",
401
+ "license": "MIT",
402
+ "peer": true,
403
+ "dependencies": {
404
+ "@vue/compiler-dom": "3.5.25",
405
+ "@vue/compiler-sfc": "3.5.25",
406
+ "@vue/runtime-dom": "3.5.25",
407
+ "@vue/server-renderer": "3.5.25",
408
+ "@vue/shared": "3.5.25"
409
+ },
410
+ "peerDependencies": {
411
+ "typescript": "*"
412
+ },
413
+ "peerDependenciesMeta": {
414
+ "typescript": {
415
+ "optional": true
416
+ }
417
+ }
418
+ }
419
+ }
420
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "custom",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "type": "commonjs",
13
+ "dependencies": {
14
+ "@git-diff-view/file": "^0.0.35",
15
+ "@git-diff-view/vue": "^0.0.35",
16
+ "dayjs": "^1.11.19"
17
+ }
18
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".", // This should point to your project root
4
+ "paths": {
5
+ "@/*": [
6
+ "../node_modules/adminforth/dist/spa/src/*"
7
+ ],
8
+ "*": [
9
+ "../node_modules/adminforth/dist/spa/node_modules/*"
10
+ ],
11
+ "@@/*": [
12
+ "."
13
+ ]
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "custom",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "type": "commonjs"
13
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".", // This should point to your project root
4
+ "paths": {
5
+ "@/*": [
6
+ "../node_modules/adminforth/dist/spa/src/*"
7
+ ],
8
+ "*": [
9
+ "../node_modules/adminforth/dist/spa/node_modules/*"
10
+ ],
11
+ "@@/*": [
12
+ "."
13
+ ]
14
+ }
15
+ }
16
+ }
package/dist/index.js ADDED
@@ -0,0 +1,51 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { AdminForthPlugin } from "adminforth";
11
+ import { ApprovalStatusEnum } from './types.js';
12
+ export default class CRUDApprovePlugin extends AdminForthPlugin {
13
+ constructor(options) {
14
+ super(options, import.meta.url);
15
+ this.options = options;
16
+ }
17
+ modifyResourceConfig(adminforth, resourceConfig) {
18
+ const _super = Object.create(null, {
19
+ modifyResourceConfig: { get: () => super.modifyResourceConfig }
20
+ });
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ _super.modifyResourceConfig.call(this, adminforth, resourceConfig);
23
+ // simply modify resourceConfig or adminforth.config. You can get access to plugin options via this.options;
24
+ });
25
+ }
26
+ createApprovalRequest(resource, action, oldData, newData, user, extra) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ // create a record in diff table with oldData and newData
29
+ const record = {
30
+ [this.options.resourceColumns.resourceIdColumnName]: resource.resourceId,
31
+ [this.options.resourceColumns.resourceActionColumnName]: action,
32
+ [this.options.resourceColumns.resourceOldDataColumnName]: oldData ? JSON.stringify(oldData) : null,
33
+ [this.options.resourceColumns.resourceNewDataColumnName]: newData ? JSON.stringify(newData) : null,
34
+ [this.options.resourceColumns.resourceStatusColumnName]: ApprovalStatusEnum.PENDING,
35
+ [this.options.resourceColumns.resourceCreatedAtColumnName]: new Date().toISOString(),
36
+ // You can add userId from extra if you have authentication implemented
37
+ [this.options.resourceColumns.resourceUserIdColumnName]: user.pk,
38
+ };
39
+ const approvalResource = this.adminforth.config.resources.find(r => r.resourceId === this.options.diffTableName);
40
+ yield this.adminforth.createResourceRecord({ resource: approvalResource, record, adminUser: user });
41
+ });
42
+ }
43
+ validateConfigAfterDiscover(adminforth, resourceConfig) {
44
+ // optional method where you can safely check field types after database discovery was performed
45
+ }
46
+ instanceUniqueRepresentation(pluginOptions) {
47
+ // optional method to return unique string representation of plugin instance.
48
+ // Needed if plugin can have multiple instances on one resource
49
+ return `single`;
50
+ }
51
+ }
package/dist/types.js ADDED
@@ -0,0 +1,6 @@
1
+ export var ApprovalStatusEnum;
2
+ (function (ApprovalStatusEnum) {
3
+ ApprovalStatusEnum["PENDING"] = "pending";
4
+ ApprovalStatusEnum["APPROVED"] = "approved";
5
+ ApprovalStatusEnum["REJECTED"] = "rejected";
6
+ })(ApprovalStatusEnum || (ApprovalStatusEnum = {}));