@things-factory/pdf 9.1.19 → 10.0.0-beta.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.
@@ -1,5 +1,5 @@
1
1
  import { OxGristEditorCode } from '@operato/app/grist-editor/ox-grist-editor-code.js';
2
- import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist';
2
+ import { registerEditor as registerGristEditor } from '@operato/data-grist';
3
3
  export default function bootstrap() {
4
4
  registerGristEditor('template', OxGristEditorCode);
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAA;AACrF,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAAE,gBAAgB,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEtH,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B,mBAAmB,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAA;AACpD,CAAC","sourcesContent":["import { OxGristEditorCode } from '@operato/app/grist-editor/ox-grist-editor-code.js'\nimport { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist'\n\nexport default function bootstrap() {\n registerGristEditor('template', OxGristEditorCode)\n}\n"]}
1
+ {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAA;AACrF,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAA6C,MAAM,qBAAqB,CAAA;AAEtH,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B,mBAAmB,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAA;AACpD,CAAC","sourcesContent":["import { OxGristEditorCode } from '@operato/app/grist-editor/ox-grist-editor-code.js'\nimport { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist'\n\nexport default function bootstrap() {\n registerGristEditor('template', OxGristEditorCode)\n}\n"]}
@@ -6,13 +6,7 @@ import '@operato/data-grist/ox-record-creator.js';
6
6
  import { PageView } from '@operato/shell';
7
7
  import { FetchOption } from '@operato/data-grist';
8
8
  import { PdfReleaseImporter } from './pdf-release-importer';
9
- declare const PdfReleaseListPage_base: (new (...args: any[]) => {
10
- _storeUnsubscribe: import("redux").Unsubscribe;
11
- connectedCallback(): void;
12
- disconnectedCallback(): void;
13
- stateChanged(_state: unknown): void;
14
- readonly isConnected: boolean;
15
- }) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
9
+ declare const PdfReleaseListPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
16
10
  export declare class PdfReleaseListPage extends PdfReleaseListPage_base {
17
11
  static styles: import("lit").CSSResult[];
18
12
  static get scopedElements(): {
@@ -5,7 +5,7 @@ import '@operato/data-grist/ox-grist.js';
5
5
  import '@operato/data-grist/ox-filters-form.js';
6
6
  import '@operato/data-grist/ox-record-creator.js';
7
7
  import { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
8
- import { PageView, store } from '@operato/shell';
8
+ import { PageView } from '@operato/shell';
9
9
  import { css, html } from 'lit';
10
10
  import { customElement, property, query } from 'lit/decorators.js';
11
11
  import { ScopedElementsMixin } from '@open-wc/scoped-elements';
@@ -15,10 +15,9 @@ import { i18next, localize } from '@operato/i18n';
15
15
  import { notify, openPopup } from '@operato/layout';
16
16
  import { OxPrompt } from '@operato/popup';
17
17
  import { isMobileDevice } from '@operato/utils';
18
- import { connect } from 'pwa-helpers/connect-mixin';
19
18
  import gql from 'graphql-tag';
20
19
  import { PdfReleaseImporter } from './pdf-release-importer';
21
- let PdfReleaseListPage = class PdfReleaseListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
20
+ let PdfReleaseListPage = class PdfReleaseListPage extends localize(i18next)(ScopedElementsMixin(PageView)) {
22
21
  constructor() {
23
22
  super(...arguments);
24
23
  this.mode = isMobileDevice() ? 'CARD' : 'GRID';
@@ -28,65 +27,52 @@ let PdfReleaseListPage = class PdfReleaseListPage extends connect(store)(localiz
28
27
  CommonGristStyles,
29
28
  CommonHeaderStyles,
30
29
  css `
31
- :host {
32
- display: flex;
30
+ :host { display: flex;
33
31
 
34
32
  width: 100%;
35
33
 
36
34
  --grid-record-emphasized-background-color: #8B0000;
37
35
  --grid-record-emphasized-color: #FF6B6B;
38
- }
36
+ }
39
37
 
40
- ox-grist {
41
- overflow-y: auto;
38
+ ox-grist { overflow-y: auto;
42
39
  flex: 1;
43
- }
40
+ }
44
41
 
45
- ox-filters-form {
46
- flex: 1;
47
- }
42
+ ox-filters-form { flex: 1;
43
+ }
48
44
  `
49
45
  ]; }
50
46
  static get scopedElements() {
51
- return {
52
- 'pdf-release-importer': PdfReleaseImporter
47
+ return { 'pdf-release-importer': PdfReleaseImporter
53
48
  };
54
49
  }
55
50
  get context() {
56
- return {
57
- title: i18next.t('title.pdf-release list'),
58
- search: {
59
- handler: (search) => {
51
+ return { title: i18next.t('title.pdf-release list'),
52
+ search: { handler: (search) => {
60
53
  this.grist.searchText = search;
61
54
  },
62
- value: this.grist.searchText
63
- },
64
- filter: {
65
- handler: () => {
55
+ value: this.grist.searchText },
56
+ filter: { handler: () => {
66
57
  this.grist.toggleHeadroom();
67
58
  }
68
59
  },
69
60
  help: 'pdf/pdf-release',
70
61
  actions: [
71
- {
72
- title: i18next.t('button.save'),
62
+ { title: i18next.t('button.save'),
73
63
  action: this._updatePdfRelease.bind(this),
74
64
  ...CommonButtonStyles.save
75
65
  },
76
- {
77
- title: i18next.t('button.delete'),
66
+ { title: i18next.t('button.delete'),
78
67
  action: this._deletePdfRelease.bind(this),
79
68
  ...CommonButtonStyles.delete
80
69
  }
81
70
  ],
82
- exportable: {
83
- name: i18next.t('title.pdf-release list'),
71
+ exportable: { name: i18next.t('title.pdf-release list'),
84
72
  data: this.exportHandler.bind(this)
85
73
  },
86
- importable: {
87
- handler: this.importHandler.bind(this)
88
- }
89
- };
74
+ importable: { handler: this.importHandler.bind(this)
75
+ } };
90
76
  }
91
77
  render() {
92
78
  const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
@@ -118,140 +104,112 @@ let PdfReleaseListPage = class PdfReleaseListPage extends connect(store)(localiz
118
104
  `;
119
105
  }
120
106
  async pageInitialized(lifecycle) {
121
- this.gristConfig = {
122
- list: {
123
- fields: ['name', 'description'],
107
+ this.gristConfig = { list: { fields: ['name', 'description'],
124
108
  details: ['active', 'updatedAt']
125
109
  },
126
110
  columns: [
127
111
  { type: 'gutter', gutterName: 'sequence' },
128
112
  { type: 'gutter', gutterName: 'row-selector', multiple: true },
129
- {
130
- type: 'string',
113
+ { type: 'string',
131
114
  name: 'name',
132
115
  header: i18next.t('field.name'),
133
- record: {
134
- editable: true
116
+ record: { editable: true
135
117
  },
136
118
  filter: 'search',
137
119
  sortable: true,
138
120
  width: 150
139
121
  },
140
- {
141
- type: 'string',
122
+ { type: 'string',
142
123
  name: 'description',
143
124
  header: i18next.t('field.description'),
144
- record: {
145
- editable: true
125
+ record: { editable: true
146
126
  },
147
127
  filter: 'search',
148
128
  width: 200
149
129
  },
150
- {
151
- type: 'checkbox',
130
+ { type: 'checkbox',
152
131
  name: 'active',
153
132
  label: true,
154
133
  header: i18next.t('field.active'),
155
- record: {
156
- editable: true
134
+ record: { editable: true
157
135
  },
158
136
  filter: true,
159
137
  sortable: true,
160
138
  width: 60
161
139
  },
162
- {
163
- type: 'resource-object',
140
+ { type: 'resource-object',
164
141
  name: 'updater',
165
142
  header: i18next.t('field.updater'),
166
- record: {
167
- editable: false
143
+ record: { editable: false
168
144
  },
169
145
  sortable: true,
170
146
  width: 120
171
147
  },
172
- {
173
- type: 'datetime',
148
+ { type: 'datetime',
174
149
  name: 'updatedAt',
175
150
  header: i18next.t('field.updated_at'),
176
- record: {
177
- editable: false
151
+ record: { editable: false
178
152
  },
179
153
  sortable: true,
180
154
  width: 180
181
155
  }
182
156
  ],
183
- rows: {
184
- appendable: false,
185
- selectable: {
186
- multiple: true
157
+ rows: { appendable: false,
158
+ selectable: { multiple: true
187
159
  }
188
160
  },
189
161
  sorters: [
190
- {
191
- name: 'name'
162
+ { name: 'name'
192
163
  }
193
164
  ]
194
165
  };
195
166
  }
196
167
  async pageUpdated(changes, lifecycle) {
197
- if (this.active) {
198
- // do something here when this page just became as active
168
+ if (this.active) { // do something here when this page just became as active
199
169
  }
200
170
  }
201
171
  async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }) {
202
- const response = await client.query({
203
- query: gql `
204
- query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
205
- responses: pdfReleases(filters: $filters, pagination: $pagination, sortings: $sortings) {
206
- items {
207
- id
172
+ const response = await client.query({ query: gql `
173
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) { responses: pdfReleases(filters: $filters, pagination: $pagination, sortings: $sortings) { items { id
208
174
  name
209
175
  description
210
176
  active
211
- updater {
212
- id
177
+ updater { id
213
178
  name
214
- }
179
+ }
215
180
  updatedAt
216
- }
181
+ }
217
182
  total
218
- }
219
- }
183
+ }
184
+ }
220
185
  `,
221
- variables: {
222
- filters,
186
+ variables: { filters,
223
187
  pagination: { page, limit },
224
188
  sortings
225
189
  }
226
190
  });
227
- return {
228
- total: response.data.responses.total || 0,
191
+ return { total: response.data.responses.total || 0,
229
192
  records: response.data.responses.items || []
230
193
  };
231
194
  }
232
195
  async _deletePdfRelease() {
233
- if (await OxPrompt.open({
234
- title: i18next.t('text.are_you_sure'),
196
+ if (await OxPrompt.open({ title: i18next.t('text.are_you_sure'),
235
197
  text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
236
198
  confirmButton: { text: i18next.t('button.confirm') },
237
199
  cancelButton: { text: i18next.t('button.cancel') }
238
200
  })) {
239
201
  const ids = this.grist.selected.map(record => record.id);
240
202
  if (ids && ids.length > 0) {
241
- const response = await client.mutate({
242
- mutation: gql `
243
- mutation ($ids: [String!]!) {
244
- deletePdfReleases(ids: $ids)
245
- }
203
+ const response = await client.mutate({ mutation: gql `
204
+ mutation ($ids: [String!]!) { deletePdfReleases(ids: $ids)
205
+ }
246
206
  `,
247
- variables: {
248
- ids
207
+ variables: { ids
249
208
  }
250
209
  });
251
210
  if (!response.errors) {
252
211
  this.grist.fetch();
253
- notify({
254
- message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
212
+ notify({ message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
255
213
  });
256
214
  }
257
215
  }
@@ -269,16 +227,12 @@ let PdfReleaseListPage = class PdfReleaseListPage extends connect(store)(localiz
269
227
  patchField.cuFlag = patch.__dirty__;
270
228
  return patchField;
271
229
  });
272
- const response = await client.mutate({
273
- mutation: gql `
274
- mutation ($patches: [PdfReleasePatch!]!) {
275
- updateMultiplePdfRelease(patches: $patches) {
276
- name
277
- }
278
- }
230
+ const response = await client.mutate({ mutation: gql `
231
+ mutation ($patches: [PdfReleasePatch!]!) { updateMultiplePdfRelease(patches: $patches) { name
232
+ }
233
+ }
279
234
  `,
280
- variables: {
281
- patches
235
+ variables: { patches
282
236
  }
283
237
  });
284
238
  if (!response.errors) {
@@ -288,26 +242,19 @@ let PdfReleaseListPage = class PdfReleaseListPage extends connect(store)(localiz
288
242
  }
289
243
  async creationCallback(pdfRelease) {
290
244
  try {
291
- const response = await client.query({
292
- query: gql `
293
- mutation ($pdfRelease: NewPdfRelease!) {
294
- createPdfRelease(pdfRelease: $pdfRelease) {
295
- id
296
- }
297
- }
245
+ const response = await client.query({ query: gql `
246
+ mutation ($pdfRelease: NewPdfRelease!) { createPdfRelease(pdfRelease: $pdfRelease) { id
247
+ }
248
+ }
298
249
  `,
299
- variables: {
300
- pdfRelease
250
+ variables: { pdfRelease
301
251
  },
302
- context: {
303
- hasUpload: true
252
+ context: { hasUpload: true
304
253
  }
305
254
  });
306
255
  if (!response.errors) {
307
256
  this.grist.fetch();
308
- document.dispatchEvent(new CustomEvent('notify', {
309
- detail: {
310
- message: i18next.t('text.data_created_successfully')
257
+ document.dispatchEvent(new CustomEvent('notify', { detail: { message: i18next.t('text.data_created_successfully')
311
258
  }
312
259
  }));
313
260
  }
@@ -315,9 +262,7 @@ let PdfReleaseListPage = class PdfReleaseListPage extends connect(store)(localiz
315
262
  }
316
263
  catch (ex) {
317
264
  console.error(ex);
318
- document.dispatchEvent(new CustomEvent('notify', {
319
- detail: {
320
- type: 'error',
265
+ document.dispatchEvent(new CustomEvent('notify', { detail: { type: 'error',
321
266
  message: i18next.t('text.error')
322
267
  }
323
268
  }));
@@ -349,8 +294,7 @@ let PdfReleaseListPage = class PdfReleaseListPage extends connect(store)(localiz
349
294
  this.grist.fetch();
350
295
  }}
351
296
  ></pdf-release-importer>
352
- `, {
353
- backdrop: true,
297
+ `, { backdrop: true,
354
298
  size: 'large',
355
299
  title: i18next.t('title.import pdf-release')
356
300
  });
@@ -1 +1 @@
1
- {"version":3,"file":"pdf-release-list-page.js","sourceRoot":"","sources":["../../../client/pages/pdf-release/pdf-release-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAChD,OAAO,iCAAiC,CAAA;AACxC,OAAO,wCAAwC,CAAA;AAC/C,OAAO,0CAA0C,CAAA;AAEjD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5G,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE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,GAAG,SAAS,CACrB,IAAI,CAAA;;yBAEe,OAAO;sBACV,GAAG,EAAE;YACf,OAAO,CAAC,IAAI,EAAE,CAAA;YACd,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QACpB,CAAC;;OAEJ,EACD;YACE,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC;SAC7C,CACF,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG,GAAG,EAAE;YACpB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QACpB,CAAC,CAAA;IACH,CAAC;;AAlV2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAoE;AAEpE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;iDAAA;AApCjC,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CAoX9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\nimport '@operato/data-grist/ox-grist.js'\nimport '@operato/data-grist/ox-filters-form.js'\nimport '@operato/data-grist/ox-record-creator.js'\n\nimport { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { ColumnConfig, DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPopup, OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\nimport gql from 'graphql-tag'\n\nimport { PdfReleaseImporter } from './pdf-release-importer'\n\n@customElement('pdf-release-list-page')\nexport class PdfReleaseListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {\n\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: #8B0000;\n --grid-record-emphasized-color: #FF6B6B;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n\n ox-filters-form {\n flex: 1;\n }\n `\n ]\n\n static get scopedElements() {\n return {\n 'pdf-release-importer': PdfReleaseImporter\n }\n }\n\n @property({ type: Object }) gristConfig: any\n @property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('title.pdf-release list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'pdf/pdf-release',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this._updatePdfRelease.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deletePdfRelease.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('title.pdf-release list'),\n data: this.exportHandler.bind(this)\n },\n importable: {\n handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist\n .mode=${mode}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n >\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-filters-form autofocus without-search></ox-filters-form>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n\n <ox-record-creator id=\"add\" .callback=${this.creationCallback.bind(this)}>\n <button>\n <md-icon>add</md-icon>\n </button>\n </ox-record-creator>\n\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n list: {\n fields: ['name', 'description'],\n details: ['active', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n filter: true,\n sortable: true,\n width: 60\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n appendable: false,\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: pdfReleases(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n active\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async _deletePdfRelease() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deletePdfReleases(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n async _updatePdfRelease() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [PdfReleasePatch!]!) {\n updateMultiplePdfRelease(patches: $patches) {\n name\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n }\n\n async creationCallback(pdfRelease) {\n try {\n const response = await client.query({\n query: gql`\n mutation ($pdfRelease: NewPdfRelease!) {\n createPdfRelease(pdfRelease: $pdfRelease) {\n id\n }\n }\n `,\n variables: {\n pdfRelease\n },\n context: {\n hasUpload: true\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n message: i18next.t('text.data_created_successfully')\n }\n })\n )\n }\n\n return true\n } catch (ex) {\n console.error(ex)\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n type: 'error',\n message: i18next.t('text.error')\n }\n })\n )\n return false\n }\n }\n\n async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set([\n 'id',\n 'name',\n 'description',\n 'active'\n ])\n\n return exportTargets.map(pdfRelease => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = pdfRelease[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) {\n const popup = openPopup(\n html`\n <pdf-release-importer\n .pdfReleases=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></pdf-release-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import pdf-release')\n }\n )\n \n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n}\n\n"]}
1
+ {"version":3,"file":"pdf-release-list-page.js","sourceRoot":"","sources":["../../../client/pages/pdf-release/pdf-release-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAChD,OAAO,iCAAiC,CAAA;AACxC,OAAO,wCAAwC,CAAA;AAC/C,OAAO,0CAA0C,CAAA;AAEjD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5G,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAgB,SAAS,EAAe,MAAM,qBAAqB,CAAA;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;A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EAAE,CAAA;QACpD,CAAC,CAAA;IACD,CAAC;;AAvQ4B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAoE;AAEpE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;iDAAA;AA9BjC,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CAmS9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\nimport '@operato/data-grist/ox-grist.js'\nimport '@operato/data-grist/ox-filters-form.js'\nimport '@operato/data-grist/ox-record-creator.js'\n\nimport { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { ColumnConfig, DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPopup, OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\n\nimport gql from 'graphql-tag'\n\nimport { PdfReleaseImporter } from './pdf-release-importer'\n\n@customElement('pdf-release-list-page')\nexport class PdfReleaseListPage extends localize(i18next)(ScopedElementsMixin(PageView)) { \n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host { display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: #8B0000;\n --grid-record-emphasized-color: #FF6B6B;\n }\n\n ox-grist { overflow-y: auto;\n flex: 1;\n }\n\n ox-filters-form { flex: 1;\n }\n `\n ]\n\n static get scopedElements() { return { 'pdf-release-importer': PdfReleaseImporter\n }\n }\n\n @property({ type: Object }) gristConfig: any\n @property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() { return { title: i18next.t('title.pdf-release list'),\n search: { handler: (search: string) => { this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: { handler: () => { this.grist.toggleHeadroom()\n }\n },\n help: 'pdf/pdf-release',\n actions: [\n { title: i18next.t('button.save'),\n action: this._updatePdfRelease.bind(this),\n ...CommonButtonStyles.save\n },\n { title: i18next.t('button.delete'),\n action: this._deletePdfRelease.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: { name: i18next.t('title.pdf-release list'),\n data: this.exportHandler.bind(this)\n },\n importable: { handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() { const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist\n .mode=${mode}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n >\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-filters-form autofocus without-search></ox-filters-form>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n\n <ox-record-creator id=\"add\" .callback=${this.creationCallback.bind(this)}>\n <button>\n <md-icon>add</md-icon>\n </button>\n </ox-record-creator>\n\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) { this.gristConfig = { list: { fields: ['name', 'description'],\n details: ['active', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n { type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: { editable: true\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n { type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: { editable: true\n },\n filter: 'search',\n width: 200\n },\n { type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: { editable: true\n },\n filter: true,\n sortable: true,\n width: 60\n },\n { type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: { editable: false\n },\n sortable: true,\n width: 120\n },\n { type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: { editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: { appendable: false,\n selectable: { multiple: true\n }\n },\n sorters: [\n { name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) { if (this.active) { // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) { const response = await client.query({ query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) { responses: pdfReleases(filters: $filters, pagination: $pagination, sortings: $sortings) { items { id\n name\n description\n active\n updater { id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: { filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return { total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async _deletePdfRelease() { if (\n await OxPrompt.open({ title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) { const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) { const response = await client.mutate({ mutation: gql`\n mutation ($ids: [String!]!) { deletePdfReleases(ids: $ids)\n }\n `,\n variables: { ids\n }\n })\n\n if (!response.errors) { this.grist.fetch()\n notify({ message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n async _updatePdfRelease() { let patches = this.grist.dirtyRecords\n if (patches && patches.length) { patches = patches.map(patch => { let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) { patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({ mutation: gql`\n mutation ($patches: [PdfReleasePatch!]!) { updateMultiplePdfRelease(patches: $patches) { name\n }\n }\n `,\n variables: { patches\n }\n })\n\n if (!response.errors) { this.grist.fetch()\n }\n }\n }\n\n async creationCallback(pdfRelease) { try { const response = await client.query({ query: gql`\n mutation ($pdfRelease: NewPdfRelease!) { createPdfRelease(pdfRelease: $pdfRelease) { id\n }\n }\n `,\n variables: { pdfRelease\n },\n context: { hasUpload: true\n }\n })\n\n if (!response.errors) { this.grist.fetch()\n document.dispatchEvent(\n new CustomEvent('notify', { detail: { message: i18next.t('text.data_created_successfully')\n }\n })\n )\n }\n\n return true\n } catch (ex) { console.error(ex)\n document.dispatchEvent(\n new CustomEvent('notify', { detail: { type: 'error',\n message: i18next.t('text.error')\n }\n })\n )\n return false\n }\n }\n\n async exportHandler() { const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set([\n 'id',\n 'name',\n 'description',\n 'active'\n ])\n\n return exportTargets.map(pdfRelease => { let tempObj = {}\n for (const field of targetFieldSet) { tempObj[field] = pdfRelease[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) { const popup = openPopup(\n html`\n <pdf-release-importer\n .pdfReleases=${records}\n @imported=${() => { history.back()\n this.grist.fetch()\n }}\n ></pdf-release-importer>\n `,\n { backdrop: true,\n size: 'large',\n title: i18next.t('title.import pdf-release')\n }\n )\n \n popup.onclosed = () => { this.grist.fetch()\n }\n }\n}\n\n"]}
@@ -6,13 +6,7 @@ import '@operato/data-grist/ox-record-creator.js';
6
6
  import { PageView } from '@operato/shell';
7
7
  import { FetchOption } from '@operato/data-grist';
8
8
  import { PDFTemplateImporter } from './pdf-template-importer';
9
- declare const PDFTemplateListPage_base: (new (...args: any[]) => {
10
- _storeUnsubscribe: import("redux").Unsubscribe;
11
- connectedCallback(): void;
12
- disconnectedCallback(): void;
13
- stateChanged(_state: unknown): void;
14
- readonly isConnected: boolean;
15
- }) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
9
+ declare const PDFTemplateListPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
16
10
  export declare class PDFTemplateListPage extends PDFTemplateListPage_base {
17
11
  static styles: import("lit").CSSResult[];
18
12
  static get scopedElements(): {