mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-18 05:20:45 +01:00
chore: remove lodash-es
Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
parent
03c129b79d
commit
d0af62dacf
9 changed files with 18 additions and 30 deletions
7
package-lock.json
generated
7
package-lock.json
generated
|
|
@ -28,7 +28,6 @@
|
|||
"blueimp-md5": "^2.19.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"js-confetti": "^0.12.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"pinia": "^2.2.5",
|
||||
"v-perfect-signature": "^1.4.0",
|
||||
"vue": "^2.7.16",
|
||||
|
|
@ -11266,12 +11265,6 @@
|
|||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash-es": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
|
||||
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lodash.debounce": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
"blueimp-md5": "^2.19.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"js-confetti": "^0.12.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"pinia": "^2.2.5",
|
||||
"v-perfect-signature": "^1.4.0",
|
||||
"vue": "^2.7.16",
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { isEmpty } from 'lodash-es'
|
||||
import { Cropper } from 'vue-advanced-cropper'
|
||||
|
||||
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
|
||||
|
|
@ -89,7 +88,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
hasImage() {
|
||||
return !isEmpty(this.image)
|
||||
return !!this.image
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@
|
|||
|
||||
<script>
|
||||
import '@fontsource/dancing-script'
|
||||
import { isEmpty } from 'lodash-es'
|
||||
|
||||
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
|
||||
import NcDialog from '@nextcloud/vue/dist/Components/NcDialog.js'
|
||||
|
|
@ -66,7 +65,7 @@ export default {
|
|||
}),
|
||||
computed: {
|
||||
isValid() {
|
||||
return !isEmpty(this.value)
|
||||
return !!this.value
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { size } from 'lodash-es'
|
||||
|
||||
import NcCounterBubble from '@nextcloud/vue/dist/Components/NcCounterBubble.js'
|
||||
|
||||
export default {
|
||||
|
|
@ -40,7 +38,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
size() {
|
||||
return size(this.pages)
|
||||
return this.pages.length
|
||||
},
|
||||
actual() {
|
||||
return this.value
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
* SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import { deburr } from 'lodash-es'
|
||||
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateOcsUrl } from '@nextcloud/router'
|
||||
|
|
@ -11,8 +10,10 @@ import { generateOcsUrl } from '@nextcloud/router'
|
|||
import '@nextcloud/password-confirmation/dist/style.css' // Required for dialog styles
|
||||
|
||||
// from https://gist.github.com/codeguy/6684588
|
||||
const slugfy = val =>
|
||||
deburr(val)
|
||||
const slugfy = (val) =>
|
||||
val
|
||||
.normalize('NFD')
|
||||
.replace(/[\u0300-\u036f]/g, '')
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9 -]/g, '') // remove invalid chars
|
||||
.replace(/\s+/g, '-') // collapse whitespace and replace by -
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/* eslint-disable valid-jsdoc */
|
||||
import { isEmpty } from 'lodash-es'
|
||||
|
||||
import axios from '@nextcloud/axios'
|
||||
import { confirmPassword } from '@nextcloud/password-confirmation'
|
||||
|
|
@ -30,7 +29,7 @@ const buildService = (http) => ({
|
|||
|
||||
const { data: { data } } = await http.put(url, { phone })
|
||||
|
||||
return { data, success: !isEmpty(data.phone) }
|
||||
return { data, success: !!data.phone }
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
* SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import { defaults } from 'lodash-es'
|
||||
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
|
||||
|
|
@ -11,10 +10,13 @@ const libresignState = loadState('libresign', 'config', {})
|
|||
export default {
|
||||
namespaced: true,
|
||||
|
||||
state: defaults({}, libresignState?.settings || {}, {
|
||||
hasSignatureFile: false,
|
||||
identificationDocumentsFlow: false,
|
||||
isApprover: false,
|
||||
phoneNumber: '',
|
||||
}),
|
||||
state: {
|
||||
...{
|
||||
hasSignatureFile: false,
|
||||
identificationDocumentsFlow: false,
|
||||
isApprover: false,
|
||||
phoneNumber: '',
|
||||
},
|
||||
...(libresignState?.settings || {}),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,8 +58,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { find, get } from 'lodash-es'
|
||||
|
||||
import axios from '@nextcloud/axios'
|
||||
import { showError, showWarning, showSuccess } from '@nextcloud/dialogs'
|
||||
import { FilePickerVue as FilePicker } from '@nextcloud/dialogs/filepicker.js'
|
||||
|
|
@ -77,7 +75,7 @@ const FILE_TYPE_INFO = {
|
|||
}
|
||||
|
||||
const findDocumentByType = (list, type) => {
|
||||
return find(list, row => get(row, ['file_type', 'type']) === type) || {
|
||||
return list.find(row => row?.file_type?.type === type) || {
|
||||
nodeId: 0,
|
||||
uuid: '',
|
||||
status: -1,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue