@things-factory/font-ui 4.0.21 → 4.0.25
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/client/font-selector.js +13 -12
- package/package.json +6 -6
package/client/font-selector.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import './font-creation-card'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { i18next, localize } from '@things-factory/i18n-base'
|
|
3
|
+
import gql from 'graphql-tag'
|
|
4
|
+
import { css, html, LitElement } from 'lit-element'
|
|
5
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
6
|
+
import uuid from 'uuid/v4'
|
|
8
7
|
|
|
9
8
|
import Headroom from '@operato/headroom'
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
9
|
+
import { createFont, deleteFont, fetchFontList, updateFont } from '@things-factory/font-base'
|
|
10
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
11
|
+
import { client, store } from '@things-factory/shell'
|
|
12
|
+
import { HeadroomStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
12
13
|
import { pulltorefresh } from '@things-factory/utils'
|
|
13
|
-
import uuid from 'uuid/v4'
|
|
14
14
|
|
|
15
15
|
export class FontSelector extends localize(i18next)(connect(store)(LitElement)) {
|
|
16
16
|
static get styles() {
|
|
@@ -268,7 +268,8 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
|
|
|
268
268
|
async createFont(font) {
|
|
269
269
|
if (font._files?.length > 0) {
|
|
270
270
|
let attachment = await this.attachFile(font._files[0], ['fullpath', 'refBy'])
|
|
271
|
-
|
|
271
|
+
|
|
272
|
+
//font.id = attachment?.refBy
|
|
272
273
|
font.uri = attachment?.fullpath
|
|
273
274
|
delete font._files
|
|
274
275
|
}
|
|
@@ -315,7 +316,7 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
|
|
|
315
316
|
async attachFile(file, fields = []) {
|
|
316
317
|
var attaching = await client.mutate({
|
|
317
318
|
mutation: gql`
|
|
318
|
-
mutation($attachment: NewAttachment!) {
|
|
319
|
+
mutation ($attachment: NewAttachment!) {
|
|
319
320
|
createAttachment(attachment: $attachment) {
|
|
320
321
|
id
|
|
321
322
|
}
|
|
@@ -355,7 +356,7 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
|
|
|
355
356
|
async attachFiles(files, fields = []) {
|
|
356
357
|
var attaching = await client.mutate({
|
|
357
358
|
mutation: gql`
|
|
358
|
-
mutation($attachments: [NewAttachment!]!) {
|
|
359
|
+
mutation ($attachments: [NewAttachment!]!) {
|
|
359
360
|
createAttachments(attachments: $attachments) {
|
|
360
361
|
id
|
|
361
362
|
}
|
|
@@ -398,7 +399,7 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
|
|
|
398
399
|
require.resolve('@things-factory/attachment-ui')
|
|
399
400
|
client.mutate({
|
|
400
401
|
mutation: gql`
|
|
401
|
-
mutation($refBys: [String!]!) {
|
|
402
|
+
mutation ($refBys: [String!]!) {
|
|
402
403
|
deleteAttachmentsByRef(refBys: $refBys)
|
|
403
404
|
}
|
|
404
405
|
`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/font-ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.25",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@operato/headroom": "^0.2.
|
|
28
|
-
"@things-factory/attachment-ui": "^4.0.
|
|
29
|
-
"@things-factory/font-base": "^4.0.
|
|
30
|
-
"@things-factory/layout-base": "^4.0.
|
|
27
|
+
"@operato/headroom": "^0.2.52",
|
|
28
|
+
"@things-factory/attachment-ui": "^4.0.25",
|
|
29
|
+
"@things-factory/font-base": "^4.0.25",
|
|
30
|
+
"@things-factory/layout-base": "^4.0.25",
|
|
31
31
|
"uuid": "^3.4.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "9c44141d651dab7b4a9c0f0b6fecb8d6937d116f"
|
|
34
34
|
}
|