@dosgato/dialog 1.2.3 → 1.2.4

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,10 +1,10 @@
1
1
  <script context="module">export const DG_DIALOG_FIELD_MULTIPLE = {};
2
2
  function noOp(..._) { return ''; }
3
3
  </script>
4
- <script>import caretCircleDown from '@iconify-icons/ph/caret-circle-down';
5
- import caretCircleUp from '@iconify-icons/ph/caret-circle-up';
4
+ <script>import caretCircleDown from '@iconify-icons/ph/caret-circle-down-fill';
5
+ import caretCircleUp from '@iconify-icons/ph/caret-circle-up-fill';
6
6
  import plusCircleLight from '@iconify-icons/ph/plus-circle-light';
7
- import xCircle from '@iconify-icons/ph/x-circle';
7
+ import xCircle from '@iconify-icons/ph/x-circle-fill';
8
8
  import { AddMore, FORM_CONTEXT, FORM_INHERITED_PATH } from '@txstate-mws/svelte-forms';
9
9
  import { derivedStore } from '@txstate-mws/svelte-store';
10
10
  import { getContext, setContext } from 'svelte';
@@ -132,6 +132,9 @@ $: messages = compact ? $messageStore : [];
132
132
  font-size: 1.3em;
133
133
  color: black;
134
134
  }
135
+ .dialog-multiple-buttons .dialog-multiple-delete {
136
+ color: var(--dg-danger-bg, #9a3332);
137
+ }
135
138
  .dialog-multiple-buttons button:disabled {
136
139
  color: #6d6d6d;
137
140
  }
@@ -130,6 +130,22 @@ async function reactToAspectRatio(ar) {
130
130
  }
131
131
  }
132
132
  $: void reactToAspectRatio(selectionAspectRatio);
133
+ let initialLoad = true;
134
+ let initialVal;
135
+ let srcChanged = false;
136
+ async function onimageload(e) {
137
+ if (initialLoad) {
138
+ initialVal = e.target.src;
139
+ initialLoad = false;
140
+ }
141
+ else {
142
+ if (e.target.src !== initialVal || srcChanged) {
143
+ await tick();
144
+ store.maximize();
145
+ srcChanged = true;
146
+ }
147
+ }
148
+ }
133
149
  </script>
134
150
 
135
151
  <svelte:window on:mousemove={onMouseMove} on:mouseup={onMouseUp} on:touchend={onMouseUp} on:touchcancel={onMouseUp} />
@@ -146,7 +162,7 @@ $: void reactToAspectRatio(selectionAspectRatio);
146
162
  </div>
147
163
  <!-- svelte-ignore a11y-no-static-element-interactions -->
148
164
  <div bind:this={container} use:resize on:resize={() => updateRect()} class="crop-image-container" on:mousedown={onMouseDown} on:touchstart={onMouseDown} on:touchmove={onMouseMove} style:cursor={$store.cursor}>
149
- <img class="crop-image" src={imageSrc} alt="" />
165
+ <img class="crop-image" src={imageSrc} alt="" on:load={onimageload}/>
150
166
  {#if $selection && $outputPct}
151
167
  <div class='crop-bg'>
152
168
  <img class='crop-image clipped' src={imageSrc} alt="" style:clip-path="polygon({$outputPct.left}% {$outputPct.top}%, {100 - $outputPct.right}% {$outputPct.top}%, {100 - $outputPct.right}% {100 - $outputPct.bottom}%, {$outputPct.left}% {100 - $outputPct.bottom}%, {$outputPct.left}% {$outputPct.top}%)" />
@@ -8,6 +8,9 @@ export let target;
8
8
  export let conditional = undefined;
9
9
  export let required = false;
10
10
  export let helptext = undefined;
11
+ export let emptyText = undefined;
12
+ /** Text to display in the tag picker input field when it's empty. */
13
+ export let placeholder = '';
11
14
  const tagClient = getContext(TAG_API_CONTEXT);
12
15
  let lasttarget = -1;
13
16
  let groups = [];
@@ -36,4 +39,4 @@ async function lookupByValue(id) {
36
39
  }
37
40
  </script>
38
41
 
39
- <FieldMultiselect {path} {label} {getOptions} {lookupByValue} {conditional} {required} {helptext}/>
42
+ <FieldMultiselect {path} {label} {getOptions} {lookupByValue} {conditional} {required} {helptext} {emptyText} {placeholder} />
@@ -7,6 +7,8 @@ declare const __propDef: {
7
7
  conditional?: boolean | undefined;
8
8
  required?: boolean;
9
9
  helptext?: string | undefined;
10
+ emptyText?: string | undefined;
11
+ /** Text to display in the tag picker input field when it's empty. */ placeholder?: string;
10
12
  };
11
13
  events: {
12
14
  [evt: string]: CustomEvent<any>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dosgato/dialog",
3
3
  "description": "A component library for building forms that edit a JSON document.",
4
- "version": "1.2.3",
4
+ "version": "1.2.4",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",
7
7
  "dev": "vite dev --force",