poe-svelte-ui-lib 1.9.21 → 1.9.22

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.
@@ -33,6 +33,7 @@
33
33
  | "EventHandlerArgument"
34
34
  | "IconsLib"
35
35
  | "Readonly"
36
+ | "BitModeInfo"
36
37
  | "MinMaxStep"
37
38
  | ""
38
39
 
@@ -203,6 +204,18 @@
203
204
  />
204
205
  {/snippet}
205
206
 
207
+ {#snippet BitModeInfo()}
208
+ {#if (component.properties as UI.IInputProps).type === "bitMode" || (component.properties as UI.ISelectProps).bitMode || (component.properties as UI.ISwitchProps).bitMode}
209
+ <UI.TextField
210
+ wrapperClass="mt-5 shadow-(--border-shadow-color) bg-(--blue-color)/20"
211
+ content={{
212
+ name: "Выберите битовый диапазон в рамках глобальной переменной для данного компонента.",
213
+ }}
214
+ background
215
+ />
216
+ {/if}
217
+ {/snippet}
218
+
206
219
  {#snippet MinMaxStep(initialValue: {
207
220
  number: { minNum: number; maxNum: number; step?: number }
208
221
  bitMode?: boolean
@@ -301,6 +314,8 @@
301
314
  {@render EventHandlerArgument()}
302
315
  {:else if snippet === "Readonly"}
303
316
  {@render Readonly()}
317
+ {:else if snippet === "BitModeInfo"}
318
+ {@render BitModeInfo()}
304
319
  {:else if snippet === "IconsLib"}
305
320
  {@render IconsLib(initialValue)}
306
321
  {:else if snippet === "MinMaxStep"}
@@ -1,5 +1,5 @@
1
1
  import * as UI from "./";
2
- type snippetNames = "Variable" | "Access" | "Colors" | "Label" | "LabelAlign" | "LabelClass" | "Identificator" | "WrapperClass" | "Disabled" | "EventHandlerArgument" | "IconsLib" | "Readonly" | "MinMaxStep" | "";
2
+ type snippetNames = "Variable" | "Access" | "Colors" | "Label" | "LabelAlign" | "LabelClass" | "Identificator" | "WrapperClass" | "Disabled" | "EventHandlerArgument" | "IconsLib" | "Readonly" | "BitModeInfo" | "MinMaxStep" | "";
3
3
  type $$ComponentProps = {
4
4
  snippet: snippetNames;
5
5
  component: UI.UIComponent;
@@ -6,6 +6,7 @@
6
6
  import { optionsStore } from "../options"
7
7
  import { twMerge } from "tailwind-merge"
8
8
  import Library from "../libIcons/Library.svelte"
9
+ import CommonSnippets from "../CommonSnippets.svelte"
9
10
 
10
11
  const {
11
12
  component,
@@ -381,6 +382,7 @@
381
382
  {@render InputPlaceholder()}
382
383
  {@render InputInfo()}
383
384
  {@render InputSettings()}
385
+ <CommonSnippets snippet="BitModeInfo" {component} {onPropertyChange} />
384
386
  </div>
385
387
  <div class="flex w-1/3 flex-col px-2">
386
388
  {@render InputLabel()}
@@ -403,6 +405,7 @@
403
405
  {@render InputAccess()}
404
406
  {@render InputValue()}
405
407
  {@render InputType()}
408
+ <CommonSnippets snippet="BitModeInfo" {component} {onPropertyChange} />
406
409
  </div>
407
410
  <div class="flex w-1/3 flex-col px-2">
408
411
  {@render InputPlaceholder()}
@@ -2,6 +2,4 @@ export declare const ModalStack: {
2
2
  subscribe: (this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: () => void) => import("svelte/store").Unsubscriber;
3
3
  open: (id: string) => void;
4
4
  close: (id: string) => void;
5
- getTopmost: () => string;
6
- isInStack: (id: string) => boolean;
7
5
  };
@@ -1,4 +1,4 @@
1
- import { writable, get } from "svelte/store";
1
+ import { writable } from "svelte/store";
2
2
  const ModalStore = writable([]);
3
3
  export const ModalStack = {
4
4
  subscribe: ModalStore.subscribe,
@@ -8,12 +8,4 @@ export const ModalStack = {
8
8
  close: (id) => {
9
9
  ModalStore.update((state) => state.filter((item) => item !== id));
10
10
  },
11
- getTopmost: () => {
12
- const state = get(ModalStore);
13
- return state[state.length - 1];
14
- },
15
- isInStack: (id) => {
16
- const state = get(ModalStore);
17
- return state.includes(id);
18
- },
19
11
  };
@@ -6,7 +6,6 @@
6
6
  import ButtonDelete from "../libIcons/ButtonDelete.svelte"
7
7
  import ButtonAdd from "../libIcons/ButtonAdd.svelte"
8
8
  import { optionsStore } from "../options.js"
9
- import { twMerge } from "tailwind-merge"
10
9
  import CommonSnippets from "../CommonSnippets.svelte"
11
10
 
12
11
  const {
@@ -265,6 +264,7 @@
265
264
  <div class="flex w-1/3 flex-col px-2">
266
265
  {@render SelectType()}
267
266
  {@render SelectValueType()}
267
+ <CommonSnippets snippet="BitModeInfo" {component} {onPropertyChange} />
268
268
  </div>
269
269
  <div class="flex w-1/3 flex-col px-2">
270
270
  <CommonSnippets snippet="Label" {component} {onPropertyChange} />
@@ -284,6 +284,7 @@
284
284
  <CommonSnippets snippet="Label" {component} {onPropertyChange} />
285
285
  <CommonSnippets snippet="LabelClass" {component} {onPropertyChange} />
286
286
  <CommonSnippets snippet="Disabled" {component} {onPropertyChange} />
287
+ <CommonSnippets snippet="BitModeInfo" {component} {onPropertyChange} />
287
288
  </div>
288
289
  <div class="flex w-1/3 flex-col items-center px-2">
289
290
  {@render SelectType()}
@@ -266,7 +266,7 @@
266
266
  column.label?.class,
267
267
  )}
268
268
  >
269
- <span>{column.label?.name}</span>
269
+ <span>{$t(column.label?.name ?? "")}</span>
270
270
 
271
271
  {#if typeof column.content !== "function" && (column.content as ITableContent<any>[])?.some((c) => c.type === "text" && c.data.sortable)}
272
272
  <button
@@ -348,7 +348,7 @@
348
348
  {/if}
349
349
  </span>
350
350
  {/if}
351
- {typeof button.name === "function" ? button.name(row) : button.name}
351
+ {typeof button.name === "function" ? $t(button.name(row)) : $t(button.name ?? "")}
352
352
  </button>
353
353
  {:else if content.type === "select"}
354
354
  {@const select = content.data}
@@ -15,7 +15,7 @@
15
15
 
16
16
  <div
17
17
  id={`${id}-${crypto.randomUUID().slice(0, 6)}`}
18
- class={twMerge(`relative flex w-full flex-col items-center ${background ? "rounded-2xl bg-(--back-color) px-6 py-2" : ""}`, wrapperClass)}
18
+ class={twMerge(`relative flex w-full flex-col items-center ${background ? "rounded-2xl bg-max px-6 py-2" : ""}`, wrapperClass)}
19
19
  >
20
20
  <p class={twMerge(`w-full text-center ${textSize[content.size ?? "base"]}`, content.class)}>
21
21
  {content.name}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "1.9.21",
3
+ "version": "1.9.22",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {