@ticatec/uniface-element 0.1.34 → 0.1.35

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,12 +1,12 @@
1
1
  <script lang="ts">
2
2
 
3
- export let style: string = "";
3
+ export let style: string | null = null;
4
4
  export let title: string = null as unknown as string;
5
5
  export let round: boolean = false;
6
6
  export let content$style: string | null = null;
7
7
  export let header$style: string | null = null;
8
8
  export let footer$style: string | null = null;
9
- export let showFooter: boolean = true;
9
+
10
10
  export {className as class};
11
11
 
12
12
  let className: string | null = null;
@@ -28,7 +28,7 @@
28
28
  <slot></slot>
29
29
  </div>
30
30
  {#if $$slots['footer']}
31
- <div class="box-footer flex-container" style="{footer$style}; {showFooter ? '' : 'display: none' }">
31
+ <div class="box-footer flex-container" style="{footer$style};">
32
32
  <slot name="footer">
33
33
  </slot>
34
34
  </div>
@@ -17,13 +17,12 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
17
17
  children?: any;
18
18
  } : {});
19
19
  declare const Box: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
- style?: string;
20
+ style?: string | null;
21
21
  title?: string;
22
22
  round?: boolean;
23
23
  content$style?: string | null;
24
24
  header$style?: string | null;
25
25
  footer$style?: string | null;
26
- showFooter?: boolean;
27
26
  class?: null;
28
27
  }, {
29
28
  header: {};
@@ -90,7 +90,7 @@
90
90
 
91
91
  let idleTime = 0;
92
92
  const delayReload = async () => {
93
- idleTime ++;
93
+ idleTime++;
94
94
  if (idleTime > 10) {
95
95
  clearInterval(interval);
96
96
  interval = null;
@@ -167,22 +167,20 @@
167
167
 
168
168
  </script>
169
169
 
170
- <Box class="uniface-listbox {className}" {round} {footer$style} {style} showFooter={$$slots.footer!=null}
171
- header$style={boxHeaderStyle}>
172
- <svelte:fragment slot="header">
173
- {#if title || $$slots['header']}
174
- <slot name="header">
175
- <div class="title">
176
- <span>{title}</span>
177
- </div>
178
- </slot>
179
- {/if}
180
- {#if readonly === false && (filter || lazyLoader)}
181
- <div class="header-search">
182
- <SearchBox bind:this={searchBox} compact variant="plain" disabled={isBusy} style="width: 100%" bind:value={filterText} onChange={handleCriteriaChange}/>
170
+ <div {style} class="uniface-box {className}" class:round>
171
+ {#if title || $$slots['header']}
172
+ <slot name="header">
173
+ <div class="title" style={boxHeaderStyle}>
174
+ <span>{title}</span>
183
175
  </div>
184
- {/if}
185
- </svelte:fragment>
176
+ </slot>
177
+ {/if}
178
+ {#if readonly === false && (filter || lazyLoader)}
179
+ <div class="header-search">
180
+ <SearchBox bind:this={searchBox} compact variant="plain" disabled={isBusy} style="width: 100%" bind:value={filterText}
181
+ onChange={handleCriteriaChange}/>
182
+ </div>
183
+ {/if}
186
184
  <div class="listbox-content" class:selectable={selectMode==='single'} bind:this={scrollElement} on:scroll={handleScroll}>
187
185
  {#if filteredList && itemRender}
188
186
  {#each filteredList as item}
@@ -207,7 +205,12 @@
207
205
  <slot name="loadMoreIndicator"></slot>
208
206
  {/if}
209
207
  </div>
210
- <slot name="footer" slot="footer"/>
208
+ {#if $$slots['footer']}
209
+ <div class="box-footer flex-container" style="{footer$style};">
210
+ <slot name="footer">
211
+ </slot>
212
+ </div>
213
+ {/if}
211
214
  {#if isBusy}
212
215
  <div class="list-view-mask">
213
216
  <div style="height: 100%; height: 100%; text-align: center">
@@ -215,4 +218,4 @@
215
218
  </div>
216
219
  </div>
217
220
  {/if}
218
- </Box>
221
+ </div>
@@ -36,9 +36,7 @@ declare const ListBox: $$__sveltets_2_IsomorphicComponent<{
36
36
  }, {
37
37
  header: {};
38
38
  loadMoreIndicator: {};
39
- footer: {
40
- slot: string;
41
- };
39
+ footer: {};
42
40
  }, {}, string>;
43
41
  type ListBox = InstanceType<typeof ListBox>;
44
42
  export default ListBox;
@@ -1,11 +1,9 @@
1
1
  <script lang="ts">
2
2
 
3
-
4
3
  import {DisplayMode} from "../common/DisplayMode";
5
4
  import type {OnChangeHandler} from "../common/OnChangeHandler";
6
5
  import CommonPicker from "../common/CommonPicker.svelte";
7
6
 
8
-
9
7
  export let variant: '' | 'plain' | 'outlined' | 'filled' = '';
10
8
  export let disabled: boolean = false;
11
9
  export let readonly: boolean = false;
@@ -14,7 +14,6 @@
14
14
  export let tabs: Array<any> = [];
15
15
  export let closable: boolean | TabActionHandler = false;
16
16
  export let activeTab: any = null;
17
- export let refreshable: boolean = false;
18
17
  export let tabRender: TabRender = null as unknown as TabRender;
19
18
  export let reloadHandler: TabActionHandler = null as unknown as TabActionHandler;
20
19
  export let closeHandler: TabCloseHandler = null as unknown as TabCloseHandler;
@@ -115,17 +114,19 @@
115
114
  <div>
116
115
  <div class="uniface-tabs-wrap" class:simple>
117
116
  <div class="scroll-left" style="visibility: {showLeft ? 'visible' : 'hidden'}">
118
- <i class="uniface-icon-chevron-left" aria-hidden="true" on:click={() => scroll(-1)}></i>
117
+ <i class="icon_google_arrow_left" aria-hidden="true" on:click={() => scroll(-1)}></i>
119
118
  </div>
120
119
  <div class="tabs-panel" style="overflow: hidden;">
121
120
  <div style="position: relative; left: {-scrollX.current}px" bind:this={container}>
122
121
  {#each tabs as tab}
123
122
  <div class="uniface-tab" class:active={tab===activeTab} on:click={handleTabClick(tab)} aria-hidden="true">
124
123
  {#if tabRender != null}
125
- <svelte:component this={tabRender} {tab} {refreshable} {closable} on:reload on:close={closeTab(tab)}/>
124
+ <svelte:component this={tabRender} {tab} closeTab={closeHandler != null ? closeTab(tab) : null}
125
+ reloadTab={reloadHandler != null ? reloadTab(tab) : null}
126
+ closable={closable === true || (typeof (closable) == "function" && closable(tab))} />
126
127
  {:else}
127
128
  <span>{tab[textField]}</span>
128
- {#if refreshable}
129
+ {#if reloadHandler != null}
129
130
  <i class="icon_google_refresh tab-refresh" on:click={reloadTab(tab)} aria-hidden="true"></i>
130
131
  {/if}
131
132
  {#if closable === true || (typeof (closable) == "function" && closable(tab))}
@@ -137,7 +138,7 @@
137
138
  </div>
138
139
  </div>
139
140
  <div class="scroll-right" style="visibility: {showRight ? 'visible' : 'hidden'}">
140
- <i class="uniface-icon-chevron-right" aria-hidden="true" on:click={() => scroll(1)}></i>
141
+ <i class="icon_google_arrow_right" aria-hidden="true" on:click={() => scroll(1)}></i>
141
142
  </div>
142
143
  </div>
143
144
  <div class="tab-content" style="flex: 1 1 auto; height: 100%; overflow: hidden">
@@ -25,15 +25,12 @@ declare const Tabs: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithC
25
25
  tabs?: Array<any>;
26
26
  closable?: boolean | TabActionHandler;
27
27
  activeTab?: any;
28
- refreshable?: boolean;
29
28
  tabRender?: TabRender;
30
29
  reloadHandler?: TabActionHandler;
31
30
  closeHandler?: TabCloseHandler;
32
31
  }, {
33
32
  default: {};
34
33
  }>, {
35
- reload: any;
36
- } & {
37
34
  [evt: string]: CustomEvent<any>;
38
35
  }, {
39
36
  default: {};
@@ -351,7 +351,7 @@
351
351
  }
352
352
  }
353
353
  .uniface-group-box {
354
- border-bottom: 1px solid var(--uniface-border-color, #9d9d9d);
354
+ border-bottom: 1px solid var(--uniface-editor-border-color);
355
355
  padding: var(--uniface-box-padding, 0 4px);
356
356
  width: 100%;
357
357
  box-sizing: border-box;
@@ -363,28 +363,32 @@
363
363
  }
364
364
  .uniface-group-box:focus-within, .uniface-group-box:focus, .uniface-group-box:active {
365
365
  outline: none;
366
- border-bottom-color: var(--uniface-active-border-color, #ff3e00);
366
+ border-bottom-color: var(--uniface-active-border-color);
367
+ }
368
+ .uniface-group-box.filled {
369
+ border-top-right-radius: var(--uniface-field-round, 4px);
370
+ border-top-left-radius: var(--uniface-field-round, 4px);
371
+ background-color: var(--uniface-editor-filled-backgournd-color);
372
+ }
373
+ .uniface-group-box.disabled {
374
+ background-color: var(--uniface-editor-outlined-disabled-backgournd-color);
375
+ color: var(--uniface-editor-outlined-disabled-text-color);
367
376
  }
368
377
  .uniface-group-box.disabled:focus-within, .uniface-group-box.disabled:focus, .uniface-group-box.disabled:active {
369
- border-bottom-color: var(--uniface-border-color, #9d9d9d);
378
+ border-bottom-color: var(--uniface-editor-border-color);
370
379
  }
371
380
  .uniface-group-box.plain {
372
381
  border: none;
373
382
  }
374
383
  .uniface-group-box.outlined {
375
- border: 1px solid var(--uniface-border-color, #9d9d9d);
384
+ border: 1px solid var(--uniface-editor-border-color);
376
385
  border-radius: var(--uniface-field-round, 4px);
377
386
  }
378
387
  .uniface-group-box.outlined:focus-within, .uniface-group-box.outlined:focus, .uniface-group-box.outlined:active {
379
- border-color: var(--uniface-active-border-color, #ff3e00);
388
+ border-color: var(--uniface-editor-border-color);
380
389
  }
381
390
  .uniface-group-box.outlined.disabled:focus-within, .uniface-group-box.outlined.disabled:focus, .uniface-group-box.outlined.disabled:active {
382
- border-color: var(--uniface-border-color, #9d9d9d);
383
- }
384
- .uniface-group-box.filled {
385
- border-top-right-radius: var(--uniface-field-round, 4px);
386
- border-top-left-radius: var(--uniface-field-round, 4px);
387
- background-color: var(--uniface-filled-color, #f7f7f7);
391
+ border-color: var(--uniface-editor-border-color);
388
392
  }
389
393
  .uniface-group-box.compact {
390
394
  min-height: 28px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/uniface-element",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "description": "uniface web elements",
5
5
  "scripts": {
6
6
  "dev": "vite dev",