@ezeep/ezeep-js 1.0.253 → 1.0.255

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.
@@ -34320,6 +34320,10 @@ let EzpUpload = class {
34320
34320
  this.selectedFiles = [...this.selectedFiles, ...files];
34321
34321
  this.uploadFile.emit(this.selectedFiles);
34322
34322
  };
34323
+ this.removeFile = (index) => {
34324
+ this.selectedFiles = this.selectedFiles.filter((_, i) => i !== index);
34325
+ this.uploadFile.emit(this.selectedFiles);
34326
+ };
34323
34327
  }
34324
34328
  /**
34325
34329
  *
@@ -34356,7 +34360,7 @@ let EzpUpload = class {
34356
34360
  *
34357
34361
  */
34358
34362
  render() {
34359
- return (index.h(index.Host, { class: { dragging: this.dragging } }, index.h("form", { id: "form", ref: (form) => (this.form = form) }, index.h("div", { id: "header" }, index.h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), index.h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), index.h("div", { id: "meta" }, index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), index.h("label", { htmlFor: "input", id: "select" }, index.h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), index.h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (index.h(index.Fragment, null, index.h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), this.selectedFiles.map((file, index$1) => (index.h("ezp-label", { key: index$1, level: "tertiary", text: file.name })))))))));
34363
+ return (index.h(index.Host, { class: { dragging: this.dragging } }, index.h("form", { id: "form", ref: (form) => (this.form = form) }, index.h("div", { id: "header" }, index.h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), index.h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), index.h("div", { id: "meta" }, index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), index.h("label", { htmlFor: "input", id: "select" }, index.h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), index.h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (index.h(index.Fragment, null, index.h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), this.selectedFiles.map((file, index$1) => (index.h("ezp-label", { key: index$1, level: "tertiary", text: `${file.name} ✕`, onClick: () => this.removeFile(index$1), style: { cursor: 'pointer' } })))))))));
34360
34364
  }
34361
34365
  };
34362
34366
  EzpUpload.style = ezpUploadCss;
@@ -20,6 +20,10 @@ export class EzpUpload {
20
20
  this.selectedFiles = [...this.selectedFiles, ...files];
21
21
  this.uploadFile.emit(this.selectedFiles);
22
22
  };
23
+ this.removeFile = (index) => {
24
+ this.selectedFiles = this.selectedFiles.filter((_, i) => i !== index);
25
+ this.uploadFile.emit(this.selectedFiles);
26
+ };
23
27
  }
24
28
  /**
25
29
  *
@@ -69,7 +73,7 @@ export class EzpUpload {
69
73
  h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })),
70
74
  this.selectedFiles.length > 0 && (h(Fragment, null,
71
75
  h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }),
72
- this.selectedFiles.map((file, index) => (h("ezp-label", { key: index, level: "tertiary", text: file.name })))))))));
76
+ this.selectedFiles.map((file, index) => (h("ezp-label", { key: index, level: "tertiary", text: `${file.name} ✕`, onClick: () => this.removeFile(index), style: { cursor: 'pointer' } })))))))));
73
77
  }
74
78
  static get is() { return "ezp-upload"; }
75
79
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,140 @@
1
+ export type IconButtonLevelTypes = 'primary' | 'secondary' | 'tertiary' | 'quaternary'
2
+ export type IconButtonTypeTypes = 'button'
3
+ export type IconNameTypes =
4
+ | 'account'
5
+ | 'checkmark-alt'
6
+ | 'checkmark'
7
+ | 'close'
8
+ | 'color'
9
+ | 'copies'
10
+ | 'dark'
11
+ | 'drag-drop'
12
+ | 'duplex'
13
+ | 'exclamation-mark'
14
+ | 'expand'
15
+ | 'height'
16
+ | 'help'
17
+ | 'light'
18
+ | 'logo'
19
+ | 'logout'
20
+ | 'menu'
21
+ | 'minus'
22
+ | 'orientation'
23
+ | 'plus'
24
+ | 'printer'
25
+ | 'quality'
26
+ | 'question-mark'
27
+ | 'size'
28
+ | 'system'
29
+ | 'width'
30
+ | 'paper_range'
31
+ | 'trays'
32
+ export type IconSizeTypes = 'normal' | 'large' | 'huge'
33
+ export type PrintOrganizationType = { id: number; name: string; printers: PrintPrinterType[] }
34
+ export type PrintPrinterType = { id: number; name: string; location: string }
35
+ export type PrintUserType = {
36
+ id: number
37
+ firstName: string
38
+ lastName: string
39
+ email: string
40
+ organizations: PrintOrganizationType[]
41
+ }
42
+ export type SelectFlowTypes = 'vertical' | 'horizontal'
43
+ export type SelectOptionType = {
44
+ id: number | string | boolean
45
+ title: string
46
+ meta: string
47
+ type?: string
48
+ }
49
+ export type TextButtonLevelTypes = 'primary' | 'secondary' | 'tertiary'
50
+ export type TextButtonTypeTypes = 'button'
51
+ export type LabelLevelTypes = 'primary' | 'secondary' | 'tertiary'
52
+ export type WeightTypes = 'soft' | 'strong' | 'heavy'
53
+ export type ThemeTypes = 'pink' | 'red' | 'orange' | 'green' | 'teal' | 'cyan' | 'blue' | 'violet'
54
+ export type AppearanceTypes = 'system' | 'light' | 'dark'
55
+ export type TriggerTypes = 'custom' | 'file' | 'button'
56
+ export type AlertType = { open: boolean; heading: string; description: string }
57
+ export type SystemAppearanceTypes = 'light' | 'dark'
58
+ export interface PrinterProperties {
59
+ paper?: string
60
+ paperid?: number | string
61
+ color?: boolean | string
62
+ duplex?: boolean | string
63
+ duplexmode?: number | string
64
+ orientation?: number | string
65
+ copies?: number | string
66
+ resolution?: string | number
67
+ paperlength? : string | number
68
+ paperwidth? : string | number
69
+ defaultSource?: number | string
70
+ trayname?: string
71
+ PageRanges? : string
72
+ }
73
+
74
+ export interface Printer {
75
+ id: string
76
+ location: string
77
+ name: string
78
+ is_queue: boolean
79
+ }
80
+
81
+ export interface PaperFormat {
82
+ Id: number
83
+ Name: string
84
+ XRes: number
85
+ YRes: number
86
+ Default: boolean
87
+ }
88
+
89
+ export interface Trays {
90
+ Default : boolean
91
+ Index: number
92
+ Name: string
93
+ }
94
+
95
+ export interface PrinterConfig {
96
+ Default?: {
97
+ Duplex?: string
98
+ Color?: string
99
+ Orientation?: string
100
+ Resolution?: string
101
+ Paper?: string
102
+ Tray?: string
103
+ },
104
+ Collate?: boolean
105
+ Color?: boolean
106
+ ColorSupported?: boolean
107
+ Driver?: string
108
+ DuplexMode?: number
109
+ DuplexSupported?: boolean
110
+ Id?: string
111
+ Location?: string
112
+ MediaSupported?: Array<string>
113
+ MediaSupportedId?: Array<number>
114
+ Name?: string
115
+ OrientationsSupported?: Array<string>
116
+ OrientationsSupportedId?: Array<number>
117
+ PaperFormats?: Array<PaperFormat>
118
+ Resolutions?: Array<string>
119
+ DefaultResolution?: string
120
+ TPUID?: number
121
+ Trays?: Array<Trays>
122
+ }
123
+
124
+ export interface User {
125
+ azureProfile: any
126
+ dateJoined: string
127
+ displayName: string
128
+ email: string
129
+ firstName: string
130
+ id: string
131
+ idProfile: {
132
+ name: string
133
+ oid: string
134
+ preferredUsername: string
135
+ }
136
+ isVerfified: boolean
137
+ lastName: string
138
+ roles: Array<string>
139
+ userInvitations: any
140
+ }
@@ -34357,6 +34357,10 @@ let EzpUpload$1 = class extends HTMLElement {
34357
34357
  this.selectedFiles = [...this.selectedFiles, ...files];
34358
34358
  this.uploadFile.emit(this.selectedFiles);
34359
34359
  };
34360
+ this.removeFile = (index) => {
34361
+ this.selectedFiles = this.selectedFiles.filter((_, i) => i !== index);
34362
+ this.uploadFile.emit(this.selectedFiles);
34363
+ };
34360
34364
  }
34361
34365
  /**
34362
34366
  *
@@ -34393,7 +34397,7 @@ let EzpUpload$1 = class extends HTMLElement {
34393
34397
  *
34394
34398
  */
34395
34399
  render() {
34396
- return (h(Host, { class: { dragging: this.dragging } }, h("form", { id: "form", ref: (form) => (this.form = form) }, h("div", { id: "header" }, h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), h("div", { id: "meta" }, h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), h("label", { htmlFor: "input", id: "select" }, h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (h(Fragment, null, h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), this.selectedFiles.map((file, index) => (h("ezp-label", { key: index, level: "tertiary", text: file.name })))))))));
34400
+ return (h(Host, { class: { dragging: this.dragging } }, h("form", { id: "form", ref: (form) => (this.form = form) }, h("div", { id: "header" }, h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), h("div", { id: "meta" }, h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), h("label", { htmlFor: "input", id: "select" }, h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (h(Fragment, null, h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), this.selectedFiles.map((file, index) => (h("ezp-label", { key: index, level: "tertiary", text: `${file.name} ✕`, onClick: () => this.removeFile(index), style: { cursor: 'pointer' } })))))))));
34397
34401
  }
34398
34402
  static get style() { return ezpUploadCss; }
34399
34403
  };
@@ -34316,6 +34316,10 @@ let EzpUpload = class {
34316
34316
  this.selectedFiles = [...this.selectedFiles, ...files];
34317
34317
  this.uploadFile.emit(this.selectedFiles);
34318
34318
  };
34319
+ this.removeFile = (index) => {
34320
+ this.selectedFiles = this.selectedFiles.filter((_, i) => i !== index);
34321
+ this.uploadFile.emit(this.selectedFiles);
34322
+ };
34319
34323
  }
34320
34324
  /**
34321
34325
  *
@@ -34352,7 +34356,7 @@ let EzpUpload = class {
34352
34356
  *
34353
34357
  */
34354
34358
  render() {
34355
- return (h(Host, { class: { dragging: this.dragging } }, h("form", { id: "form", ref: (form) => (this.form = form) }, h("div", { id: "header" }, h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), h("div", { id: "meta" }, h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), h("label", { htmlFor: "input", id: "select" }, h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (h(Fragment, null, h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), this.selectedFiles.map((file, index) => (h("ezp-label", { key: index, level: "tertiary", text: file.name })))))))));
34359
+ return (h(Host, { class: { dragging: this.dragging } }, h("form", { id: "form", ref: (form) => (this.form = form) }, h("div", { id: "header" }, h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), h("div", { id: "meta" }, h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), h("label", { htmlFor: "input", id: "select" }, h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (h(Fragment, null, h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), this.selectedFiles.map((file, index) => (h("ezp-label", { key: index, level: "tertiary", text: `${file.name} ✕`, onClick: () => this.removeFile(index), style: { cursor: 'pointer' } })))))))));
34356
34360
  }
34357
34361
  };
34358
34362
  EzpUpload.style = ezpUploadCss;