@bigbinary/neeto-trash-frontend 3.2.1-beta1 → 3.2.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.
- package/README.md +27 -0
- package/dist/.ready +1 -1
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -80,6 +80,33 @@ The `neeto-trash-nano` acts as the source of truth for the new nano's structure,
|
|
|
80
80
|
|
|
81
81
|
#### Usage
|
|
82
82
|
|
|
83
|
+
Models including `NeetoTrashEngine::Trashable` can override their deletion methods.
|
|
84
|
+
Single deletion and retention cleanup call `permanently_delete!`, which defaults
|
|
85
|
+
to `destroy!`. Bulk deletion calls `permanently_delete_all!` on the authorized
|
|
86
|
+
scope. Its default calls `destroy_all` and raises when a callback stops deletion,
|
|
87
|
+
so the bulk transaction rolls back.
|
|
88
|
+
|
|
89
|
+
An asynchronous implementation must immediately hide the record from the trash
|
|
90
|
+
list and enqueue cleanup after the transaction commits. For models that include
|
|
91
|
+
`NeetoCommonsBackend::Deletable`, use the existing methods for both deletion paths:
|
|
92
|
+
|
|
93
|
+
```ruby
|
|
94
|
+
def permanently_delete!
|
|
95
|
+
destroy_async
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def self.permanently_delete_all!
|
|
99
|
+
destroy_async_multiple(pluck(:id))
|
|
100
|
+
end
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The bulk override hides the selected records in one update and queues one job
|
|
104
|
+
after commit. Retention cleanup keeps its per-record lock and eligibility check.
|
|
105
|
+
|
|
106
|
+
Overrides must preserve the host model's destroy callbacks and dependent cleanup.
|
|
107
|
+
Use `destroy!` or the application's existing deletion service for physical deletion.
|
|
108
|
+
For asynchronous deletion, the background worker must perform this cleanup.
|
|
109
|
+
|
|
83
110
|
1. Replace NeetoTrashNano with your project name
|
|
84
111
|
|
|
85
112
|
Create a `script.rb` file in the project root and paste the script from the following file.
|
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-10-
|
|
1
|
+
Built at 2026-10-23T14:20:17.890Z
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-trash-frontend",
|
|
3
|
-
"version": "3.2.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "A repo acts as the source of truth for the new nano's structure, configs, data etc.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-trash-nano",
|
|
@@ -68,13 +68,15 @@
|
|
|
68
68
|
"@babel/preset-env": "7.26.0",
|
|
69
69
|
"@babel/preset-react": "7.25.9",
|
|
70
70
|
"@babel/preset-typescript": "7.26.0",
|
|
71
|
+
"@babel/runtime": "7.29.7",
|
|
71
72
|
"@bigbinary/babel-preset-neeto": "^1.0.3",
|
|
72
73
|
"@bigbinary/eslint-plugin-neeto": "1.9.1",
|
|
73
|
-
"@bigbinary/neeto-atoms": "1.0
|
|
74
|
+
"@bigbinary/neeto-atoms": "1.1.0",
|
|
74
75
|
"@bigbinary/neeto-cist": "1.0.17",
|
|
75
|
-
"@bigbinary/neeto-commons-frontend": "4.
|
|
76
|
+
"@bigbinary/neeto-commons-frontend": "4.14.2",
|
|
77
|
+
"@bigbinary/neeto-filters-frontend": "4.5.1",
|
|
76
78
|
"@bigbinary/neeto-icons": "1.20.89",
|
|
77
|
-
"@bigbinary/neeto-molecules": "5.
|
|
79
|
+
"@bigbinary/neeto-molecules": "5.9.4",
|
|
78
80
|
"@bigbinary/neetoui": "8.8.3",
|
|
79
81
|
"@emotion/is-prop-valid": "1.2.0",
|
|
80
82
|
"@faker-js/faker": "8.2.0",
|
|
@@ -92,7 +94,7 @@
|
|
|
92
94
|
"@tanstack/react-query-devtools": "5.59.20",
|
|
93
95
|
"antd": "5.22.1",
|
|
94
96
|
"autoprefixer": "^10.4.5",
|
|
95
|
-
"axios": "1.
|
|
97
|
+
"axios": "1.20.0",
|
|
96
98
|
"babel-loader": "^8.2.5",
|
|
97
99
|
"babel-plugin-istanbul": "^6.1.1",
|
|
98
100
|
"babel-plugin-js-logger": "1.0.17",
|
|
@@ -107,6 +109,7 @@
|
|
|
107
109
|
"classnames": "2.5.1",
|
|
108
110
|
"crypto-browserify": "3.12.1",
|
|
109
111
|
"css-loader": "6.8.1",
|
|
112
|
+
"dompurify": "3.4.17",
|
|
110
113
|
"dotenv-webpack": "^8.0.1",
|
|
111
114
|
"eslint": "^9.25.1",
|
|
112
115
|
"eslint-config-prettier": "^10.1.2",
|
|
@@ -137,14 +140,14 @@
|
|
|
137
140
|
"mixpanel-browser": "2.47.0",
|
|
138
141
|
"os-browserify": "0.3.0",
|
|
139
142
|
"path-browserify": "^1.0.1",
|
|
140
|
-
"postcss": "8.5.
|
|
143
|
+
"postcss": "8.5.29",
|
|
141
144
|
"postcss-import": "^15.0.0",
|
|
142
145
|
"postcss-loader": "^7.0.1",
|
|
143
146
|
"postcss-preset-env": "7.8.2",
|
|
144
147
|
"prettier": "3",
|
|
145
148
|
"prettier-plugin-tailwindcss": "^0.7.1",
|
|
146
149
|
"process": "0.11.10",
|
|
147
|
-
"qs": "6.
|
|
150
|
+
"qs": "6.16.1",
|
|
148
151
|
"ramda": "0.29.0",
|
|
149
152
|
"react": "18.3.1",
|
|
150
153
|
"react-dom": "18.3.1",
|
|
@@ -174,27 +177,27 @@
|
|
|
174
177
|
"webpack-cli": "5.1.4",
|
|
175
178
|
"webpack-dev-server": "5.2.4",
|
|
176
179
|
"yup": "0.32.11",
|
|
177
|
-
"zustand": "4.4.2"
|
|
178
|
-
"@babel/runtime": "7.29.7",
|
|
179
|
-
"dompurify": "3.4.12",
|
|
180
|
-
"@bigbinary/neeto-filters-frontend": "4.3.45"
|
|
180
|
+
"zustand": "4.4.2"
|
|
181
181
|
},
|
|
182
182
|
"peerDependencies": {
|
|
183
|
-
"@
|
|
183
|
+
"@babel/runtime": "7.29.7",
|
|
184
|
+
"@bigbinary/neeto-atoms": "1.1.0",
|
|
184
185
|
"@bigbinary/neeto-cist": "1.0.17",
|
|
185
|
-
"@bigbinary/neeto-commons-frontend": "4.
|
|
186
|
+
"@bigbinary/neeto-commons-frontend": "4.14.2",
|
|
187
|
+
"@bigbinary/neeto-filters-frontend": "4.5.1",
|
|
186
188
|
"@bigbinary/neeto-icons": "1.20.89",
|
|
187
|
-
"@bigbinary/neeto-molecules": "5.
|
|
189
|
+
"@bigbinary/neeto-molecules": "5.9.4",
|
|
188
190
|
"@bigbinary/neetoui": "8.8.3",
|
|
189
191
|
"@honeybadger-io/js": "6.10.1",
|
|
190
192
|
"@honeybadger-io/react": "6.1.25",
|
|
191
193
|
"@tanstack/react-query": "5.59.20",
|
|
192
194
|
"@tanstack/react-query-devtools": "5.59.20",
|
|
193
195
|
"antd": "5.22.1",
|
|
194
|
-
"axios": "1.
|
|
196
|
+
"axios": "1.20.0",
|
|
195
197
|
"buffer": "^6.0.3",
|
|
196
198
|
"classnames": "2.5.1",
|
|
197
199
|
"crypto-browserify": "3.12.1",
|
|
200
|
+
"dompurify": "3.4.17",
|
|
198
201
|
"formik": "2.4.6",
|
|
199
202
|
"https-browserify": "1.0.0",
|
|
200
203
|
"i18next": "22.5.1",
|
|
@@ -203,7 +206,7 @@
|
|
|
203
206
|
"mixpanel-browser": "2.45.0",
|
|
204
207
|
"os-browserify": "0.3.0",
|
|
205
208
|
"path-browserify": "^1.0.1",
|
|
206
|
-
"qs": "6.
|
|
209
|
+
"qs": "6.16.1",
|
|
207
210
|
"ramda": "0.29.0",
|
|
208
211
|
"react": "18.3.1",
|
|
209
212
|
"react-dom": "18.3.1",
|
|
@@ -220,10 +223,7 @@
|
|
|
220
223
|
"util": "^0.12.5",
|
|
221
224
|
"vm-browserify": "1.1.2",
|
|
222
225
|
"yup": "0.32.11",
|
|
223
|
-
"zustand": "4.4.2"
|
|
224
|
-
"@babel/runtime": "7.29.7",
|
|
225
|
-
"dompurify": "3.4.12",
|
|
226
|
-
"@bigbinary/neeto-filters-frontend": "4.3.45"
|
|
226
|
+
"zustand": "4.4.2"
|
|
227
227
|
},
|
|
228
228
|
"resolutions": {
|
|
229
229
|
"postcss": "^8",
|