@tempots/beatui 0.89.0 → 0.91.0
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.
- package/dist/{ar-MUKILk4c.js → ar-8Cko5i-Z.js} +18 -10
- package/dist/{ar-CBrjAlIY.cjs → ar-D2DjoXta.cjs} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-DvVmqjnk.js → auth-divider-B4n8lGx5.js} +7 -7
- package/dist/{auth-divider-Cj-xJxF_.cjs → auth-divider-VzrKnv2d.cjs} +1 -1
- package/dist/beatui.css +88 -79
- package/dist/beatui.tailwind.css +88 -79
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +5 -5
- package/dist/{de-CEsW1rVX.js → de-Bt-d2iKj.js} +12 -4
- package/dist/{de-CrBw41po.cjs → de-Cdf3432J.cjs} +1 -1
- package/dist/{deep-merge-OvVqSLSN.js → deep-merge-BdRgguFO.js} +38 -38
- package/dist/deep-merge-CI1g9sjh.cjs +1 -0
- package/dist/{duration-input-BCXujp0V.js → duration-input-BZhzeELL.js} +4 -4
- package/dist/{duration-input-MJz6UO6E.cjs → duration-input-a1fCTfKl.cjs} +1 -1
- package/dist/{editor-toolbar-group-Cnta0SOa.js → editor-toolbar-group-CzdBZ1yr.js} +2 -2
- package/dist/{editor-toolbar-group-BgWLVgMZ.cjs → editor-toolbar-group-DhKJdqER.cjs} +1 -1
- package/dist/{es-ChP-aFwC.js → es-2llfNFX2.js} +10 -2
- package/dist/{es-Ca5xT3NE.cjs → es-6fFPkKHL.cjs} +1 -1
- package/dist/{fa-CNsrlIqh.js → fa-CQVIBjKP.js} +18 -10
- package/dist/{fa-DhZJYuC6.cjs → fa-GXyNzAXz.cjs} +1 -1
- package/dist/{fr-1nSKSIlw.cjs → fr-C6EYTwSH.cjs} +1 -1
- package/dist/{fr-DgEFKpML.js → fr-CC3smTlW.js} +19 -11
- package/dist/{he-DhcurPt5.cjs → he-CJUgxvi8.cjs} +1 -1
- package/dist/{he-B4TqfISZ.js → he-CZilsN75.js} +16 -8
- package/dist/{hi-TSoDsngT.js → hi-CAZjwGv-.js} +16 -8
- package/dist/{hi-CxsIxbfM.cjs → hi-DqIR4VtX.cjs} +1 -1
- package/dist/{index-D4ZFV8Rs.cjs → index-B-cwxUsP.cjs} +1 -1
- package/dist/{index-DOc1_-Nm.js → index-BFzxpY7y.js} +1 -1
- package/dist/{index-D3QVPAme.cjs → index-BOC0cVoY.cjs} +2 -2
- package/dist/{index-D_aTUfqS.js → index-DJ9YIJcG.js} +6 -6
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +1847 -1822
- package/dist/{input-container-BBWCDGTv.js → input-container-9r1F3KuX.js} +1 -1
- package/dist/{input-container-B31Seozh.cjs → input-container-DiYEl_y8.cjs} +1 -1
- package/dist/{it-D_IcaYxp.cjs → it-BvHsJ7fH.cjs} +1 -1
- package/dist/{it-BrbebXg4.js → it-D6RXFIL6.js} +19 -11
- package/dist/{ja-CMGqpPo7.cjs → ja-B2gP7OHY.cjs} +1 -1
- package/dist/{ja-DcfOktrV.js → ja-D7zsz4Ij.js} +15 -7
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +11 -12
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +1 -1
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +6 -6
- package/dist/{ko-BPl5rP97.cjs → ko-BddhddIA.cjs} +1 -1
- package/dist/{ko-73e6t369.js → ko-taN2Npr4.js} +12 -4
- package/dist/lexical/index.cjs.js +30 -30
- package/dist/lexical/index.es.js +5741 -5527
- package/dist/lexical.css +31 -28
- package/dist/{modal-jJMS0ZlW.cjs → modal-C-d5Btti.cjs} +1 -1
- package/dist/{modal-BBJWY7NB.js → modal-DTz98Dk7.js} +3 -3
- package/dist/{nl-BSfaHFt0.cjs → nl-COrtZUnH.cjs} +1 -1
- package/dist/{nl-Bq-1-ulc.js → nl-CRC6r4Q4.js} +22 -14
- package/dist/{notice-9lpZ-VDn.cjs → notice-BDTfBGtx.cjs} +1 -1
- package/dist/{notice-AUVH8Lho.js → notice-CZuh-h6a.js} +4 -4
- package/dist/{oneof-branch-detection-BsGhMslW.cjs → oneof-branch-detection-D6Xa8qNR.cjs} +1 -1
- package/dist/{oneof-branch-detection-BQnRjp9P.js → oneof-branch-detection-DCPwyutI.js} +1 -1
- package/dist/{pl-D-O4sCnr.cjs → pl-BHI4zBgV.cjs} +1 -1
- package/dist/{pl-Du9-VCfW.js → pl-C6qNs0Lq.js} +19 -11
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-chEEYLlt.cjs → pt-BGzC9MhU.cjs} +1 -1
- package/dist/{pt-B2UqqSAB.js → pt-CcWPLqBh.js} +20 -12
- package/dist/{ru-B46hVpFF.cjs → ru-CXeFbIPb.cjs} +1 -1
- package/dist/{ru-DiWa2inw.js → ru-Dt9-9m0E.js} +20 -12
- package/dist/tailwind/vite-plugin.es.js +0 -1
- package/dist/{text-input-6FD7p7hN.js → text-input-BgPx8BbG.js} +1 -1
- package/dist/{text-input-w0eVcqk5.cjs → text-input-DUnhBUd6.cjs} +1 -1
- package/dist/{toolbar-Cr0JGj5h.js → toolbar-DKOh_gbA.js} +1 -1
- package/dist/{toolbar-BR8In7O0.cjs → toolbar-Dkc2y1dI.cjs} +1 -1
- package/dist/{tr-Culcm2Zb.js → tr-CDTWeRY0.js} +14 -6
- package/dist/{tr-CaMaflJL.cjs → tr-CdOtQAtA.cjs} +1 -1
- package/dist/{translations-CZ0KOii3.cjs → translations-BdCtLBZt.cjs} +1 -1
- package/dist/{translations-uEUkO6gJ.js → translations-CiBhB2FV.js} +135 -127
- package/dist/translations-Cy9hoMGV.cjs +1 -0
- package/dist/{translations-Cttn6w0G.js → translations-NBY7SubC.js} +1 -1
- package/dist/types/beatui-i18n/default.d.ts +8 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +8 -0
- package/dist/types/beatui-i18n/translations.d.ts +8 -0
- package/dist/types/components/form/input/index.d.ts +2 -0
- package/dist/types/components/form/input/nullable-color-input.d.ts +31 -0
- package/dist/types/components/form/input/nullable-color-swatch-input.d.ts +39 -0
- package/dist/types/components/lexical/table/table-controls.d.ts +3 -1
- package/dist/types/components/lexical/toolbar/index.d.ts +1 -0
- package/dist/types/components/lexical/toolbar/toolbar-registry.d.ts +16 -0
- package/dist/types/lexical/index.d.ts +2 -1
- package/dist/types/lexical/plugins/element-style.d.ts +29 -0
- package/dist/types/lexical/plugins/index.d.ts +1 -0
- package/dist/types/lexical/types.d.ts +43 -2
- package/dist/{ur-CvGP14xo.cjs → ur-C7itXvnC.cjs} +1 -1
- package/dist/{ur-Deb-uH6b.js → ur-CLrK5FPQ.js} +16 -8
- package/dist/{use-form-lg6-7Brc.js → use-form-Cd8YFWaN.js} +3 -3
- package/dist/{use-form-i97PToWB.cjs → use-form-DQVN_Zjb.cjs} +2 -2
- package/dist/{vi-CUsCVh3n.js → vi-B1_QDUQJ.js} +21 -13
- package/dist/{vi-Df4WZe9y.cjs → vi-CQrUWB3y.cjs} +1 -1
- package/dist/{widget-customization-CDD72zYs.js → widget-customization-BY4Ox_4e.js} +25 -25
- package/dist/{widget-customization-BLvD4Lqt.cjs → widget-customization-eyQ2pxvu.cjs} +1 -1
- package/dist/{zh-C5a9NGFW.cjs → zh-DWswYYTS.cjs} +1 -1
- package/dist/{zh-Dil2Jft8.js → zh-rDtQ92Pp.js} +12 -4
- package/package.json +1 -1
- package/dist/deep-merge-Dgy9xj6w.cjs +0 -1
- package/dist/translations-gVgMyNno.cjs +0 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Renderable, Value } from '@tempots/dom';
|
|
2
|
+
import { InputOptions } from './input-options';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for the {@link NullableColorSwatchInput} component.
|
|
5
|
+
*
|
|
6
|
+
* Extends {@link InputOptions} for `string | null` color values with properties
|
|
7
|
+
* to control the blob preview size, alpha channel support, value display, and
|
|
8
|
+
* output color format.
|
|
9
|
+
*/
|
|
10
|
+
export type NullableColorSwatchInputOptions = InputOptions<string | null> & {
|
|
11
|
+
/** When true, renders the formatted color value text next to the blob preview. @default false */
|
|
12
|
+
displayValue?: Value<boolean>;
|
|
13
|
+
/** Size in pixels of the blob preview (square). @default 32 */
|
|
14
|
+
size?: Value<number>;
|
|
15
|
+
/** Enable alpha channel support with a small opacity slider. @default false */
|
|
16
|
+
withAlpha?: Value<boolean>;
|
|
17
|
+
/** Color space format for the displayed text label and emitted value. @default 'rgb' for display, 'hex' for emitted values */
|
|
18
|
+
colorTextFormat?: Value<'hex' | 'rgb' | 'hsl' | 'hwb' | 'oklch'>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A nullable variant of {@link ColorSwatchInput} for `string | null` values.
|
|
22
|
+
*
|
|
23
|
+
* Displays as a standard color swatch input where `null` values show as an empty
|
|
24
|
+
* state. Includes a reset button to clear the value back to `null`. Empty strings
|
|
25
|
+
* entered by the user are converted to `null` on change.
|
|
26
|
+
*
|
|
27
|
+
* @param options - Configuration options for the nullable color swatch input.
|
|
28
|
+
* @returns A renderable nullable color swatch input component.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* NullableColorSwatchInput({
|
|
33
|
+
* value: prop<string | null>(null),
|
|
34
|
+
* displayValue: true,
|
|
35
|
+
* onChange: v => console.log('Color:', v), // null or string
|
|
36
|
+
* })
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare const NullableColorSwatchInput: (options: NullableColorSwatchInputOptions) => Renderable;
|
|
@@ -7,6 +7,8 @@ export interface TableControlsOptions {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Table context menu that appears when a table cell is selected.
|
|
10
|
-
*
|
|
10
|
+
* Shows a marker button at the top-right of the selected cell and
|
|
11
|
+
* supports right-click context menu on table cells.
|
|
12
|
+
* Uses BeatUI Menu component for the dropdown.
|
|
11
13
|
*/
|
|
12
14
|
export declare function TableControls({ editor, stateUpdate, readOnly, }: TableControlsOptions): import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
|
|
@@ -4,3 +4,4 @@ export { LexicalToolbarButton } from './toolbar-button';
|
|
|
4
4
|
export type { LexicalToolbarButtonOptions } from './toolbar-button';
|
|
5
5
|
export { LexicalToolbarGroup } from './toolbar-group';
|
|
6
6
|
export { createToolbarHelpers, createButtonFactory } from './toolbar-helpers';
|
|
7
|
+
export { GROUP_BUTTONS, getDefaultLayout } from './toolbar-registry';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ToolbarButtonId, ToolbarConfig, ToolbarGroupId, ToolbarLayoutEntry } from '../../../lexical/types';
|
|
2
|
+
/**
|
|
3
|
+
* Default buttons for each toolbar group, in display order.
|
|
4
|
+
* This is the single source of truth for default group contents.
|
|
5
|
+
*/
|
|
6
|
+
export declare const GROUP_BUTTONS: Record<ToolbarGroupId, ToolbarButtonId[]>;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the default toolbar layout (all groups in standard order).
|
|
9
|
+
*/
|
|
10
|
+
export declare function getDefaultLayout(): ToolbarLayoutEntry[];
|
|
11
|
+
/**
|
|
12
|
+
* Resolves a ToolbarConfig into a concrete layout.
|
|
13
|
+
* - If `layout` is provided, returns it directly.
|
|
14
|
+
* - Otherwise, applies visibleGroups/hiddenGroups filtering to the default layout.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveLayout(config: ToolbarConfig): ToolbarLayoutEntry[];
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* pre-configured presets (Bare, Docked, Contextual), full plugin coverage,
|
|
7
7
|
* multi-format I/O, form integration, and theme/i18n support.
|
|
8
8
|
*/
|
|
9
|
-
export type { ContentFormatType, JsonContent, LexicalPluginDefinition, PluginConfig, HistoryPluginOptions, TablePluginOptions, AutoLinkPluginOptions, AutoLinkMatcher, CodePluginOptions, HashtagPluginOptions, OverflowPluginOptions, SlashCommandPluginOptions, SlashCommandDefinition, ToolbarGroupId, ToolbarConfig, MarkMetadata, MarkPluginCallbacks, CollaborationConfig, CollaborationUser, LexicalEditorBaseOptions, BareEditorOptions, DockedEditorOptions, ContextualEditorOptions, LexicalStringInputOptions, LexicalJsonInputOptions, LexicalInputOptions, HeadlessEditorOptions, CharacterCountInfo, SelectionInfo, EditorPresetType, EditorHeightMode, } from './types';
|
|
9
|
+
export type { ContentFormatType, JsonContent, LexicalPluginDefinition, PluginConfig, HistoryPluginOptions, TablePluginOptions, AutoLinkPluginOptions, AutoLinkMatcher, CodePluginOptions, HashtagPluginOptions, OverflowPluginOptions, SlashCommandPluginOptions, SlashCommandDefinition, ToolbarGroupId, ToolbarButtonId, ToolbarConfig, ToolbarLayoutGroup, ToolbarLayoutSeparator, ToolbarLayoutEntry, MarkMetadata, MarkPluginCallbacks, CollaborationConfig, CollaborationUser, LexicalEditorBaseOptions, BareEditorOptions, DockedEditorOptions, ContextualEditorOptions, LexicalStringInputOptions, LexicalJsonInputOptions, LexicalInputOptions, HeadlessEditorOptions, CharacterCountInfo, SelectionInfo, EditorPresetType, EditorHeightMode, } from './types';
|
|
10
|
+
export { TOOLBAR_SEPARATOR } from './types';
|
|
10
11
|
export { getNodesForPlugins, createDefaultPluginConfig } from './nodes';
|
|
11
12
|
export { HorizontalRuleNode, $createHorizontalRuleNode, $isHorizontalRuleNode, } from './horizontal-rule-node';
|
|
12
13
|
export type { SerializedHorizontalRuleNode } from './horizontal-rule-node';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { LexicalEditor, DOMExportOutputMap, DOMConversionMap } from 'lexical';
|
|
2
|
+
/**
|
|
3
|
+
* Merge a CSS property into an existing CSS text string.
|
|
4
|
+
* Replaces the property if it already exists, appends it otherwise.
|
|
5
|
+
* If value is empty, removes the property.
|
|
6
|
+
*/
|
|
7
|
+
export declare function mergeElementStyle(cssText: string, prop: string, value: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Extract a single CSS property value from a CSS text string.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getElementStyleProperty(cssText: string, prop: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Plugin that synchronizes ElementNode.__style to the DOM.
|
|
14
|
+
*
|
|
15
|
+
* Lexical's reconciler does not apply ElementNode.__style to the DOM
|
|
16
|
+
* automatically. This plugin bridges that gap by listening for updates
|
|
17
|
+
* and syncing background-color from node state to the DOM element.
|
|
18
|
+
*/
|
|
19
|
+
export declare function registerElementStylePlugin(editor: LexicalEditor): () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Build an html.export Map that overrides exportDOM for block element nodes
|
|
22
|
+
* to include __style (background-color) in the serialized HTML.
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildElementStyleExportMap(): DOMExportOutputMap;
|
|
25
|
+
/**
|
|
26
|
+
* Build an html.import DOMConversionMap that preserves background-color
|
|
27
|
+
* from imported HTML elements onto the Lexical node style.
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildElementStyleImportMap(): DOMConversionMap;
|
|
@@ -22,3 +22,4 @@ export { getSelectionInfo } from './selection';
|
|
|
22
22
|
export { getTextContent, getCharacterCount, getWordCount } from './text';
|
|
23
23
|
export { loadOffsetUtils } from './offset';
|
|
24
24
|
export { registerHorizontalRulePlugin, HR_TRANSFORMER } from './horizontal-rule';
|
|
25
|
+
export { registerElementStylePlugin, buildElementStyleExportMap, buildElementStyleImportMap, mergeElementStyle, getElementStyleProperty, } from './element-style';
|
|
@@ -278,16 +278,51 @@ export interface FontOption {
|
|
|
278
278
|
* Toolbar group identifiers
|
|
279
279
|
*/
|
|
280
280
|
export type ToolbarGroupId = 'text-formatting' | 'headings' | 'lists' | 'indent' | 'blocks' | 'tables' | 'links' | 'history' | 'clipboard' | 'font' | 'color' | 'clear-formatting';
|
|
281
|
+
/**
|
|
282
|
+
* Stable identifiers for individual toolbar buttons/controls.
|
|
283
|
+
* Each ID corresponds to a single button or widget within a toolbar group.
|
|
284
|
+
*/
|
|
285
|
+
export type ToolbarButtonId = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'clear-formatting' | 'paragraph' | 'heading-1' | 'heading-2' | 'heading-3' | 'heading-4' | 'heading-5' | 'heading-6' | 'bullet-list' | 'ordered-list' | 'check-list' | 'indent' | 'outdent' | 'blockquote' | 'code-block' | 'horizontal-rule' | 'insert-table' | 'link' | 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'font-family' | 'font-size' | 'font-color' | 'highlight-color' | 'background-color';
|
|
286
|
+
/**
|
|
287
|
+
* A group entry in the toolbar layout.
|
|
288
|
+
* Specifies which group to render, optionally restricting to specific buttons.
|
|
289
|
+
*/
|
|
290
|
+
export interface ToolbarLayoutGroup {
|
|
291
|
+
/** The group to render */
|
|
292
|
+
group: ToolbarGroupId;
|
|
293
|
+
/**
|
|
294
|
+
* Optional subset of buttons/controls to include within this group.
|
|
295
|
+
* When omitted, all buttons in the group are shown (respecting maxHeadingLevel).
|
|
296
|
+
*/
|
|
297
|
+
items?: ToolbarButtonId[];
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* A visual separator between toolbar groups.
|
|
301
|
+
*/
|
|
302
|
+
export interface ToolbarLayoutSeparator {
|
|
303
|
+
separator: true;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* A single entry in the toolbar layout.
|
|
307
|
+
* Either a group (with optional button subset) or a visual separator.
|
|
308
|
+
*/
|
|
309
|
+
export type ToolbarLayoutEntry = ToolbarLayoutGroup | ToolbarLayoutSeparator;
|
|
310
|
+
/**
|
|
311
|
+
* Convenience constant for inserting a separator in a toolbar layout.
|
|
312
|
+
*/
|
|
313
|
+
export declare const TOOLBAR_SEPARATOR: ToolbarLayoutSeparator;
|
|
281
314
|
/**
|
|
282
315
|
* Toolbar configuration
|
|
283
316
|
*/
|
|
284
317
|
export interface ToolbarConfig {
|
|
285
318
|
/**
|
|
286
|
-
* Groups to show in toolbar
|
|
319
|
+
* Groups to show in toolbar (whitelist).
|
|
320
|
+
* Ignored when `layout` is set.
|
|
287
321
|
*/
|
|
288
322
|
visibleGroups?: ToolbarGroupId[];
|
|
289
323
|
/**
|
|
290
|
-
* Groups to hide from toolbar
|
|
324
|
+
* Groups to hide from toolbar (blacklist).
|
|
325
|
+
* Ignored when `layout` is set.
|
|
291
326
|
*/
|
|
292
327
|
hiddenGroups?: ToolbarGroupId[];
|
|
293
328
|
/**
|
|
@@ -312,6 +347,12 @@ export interface ToolbarConfig {
|
|
|
312
347
|
* A `{ value: '', label: 'Default' }` entry is always prepended automatically.
|
|
313
348
|
*/
|
|
314
349
|
fontSizes?: FontOption[];
|
|
350
|
+
/**
|
|
351
|
+
* Declarative toolbar layout. When provided, takes full control over
|
|
352
|
+
* which groups/buttons appear and in what order.
|
|
353
|
+
* `visibleGroups` and `hiddenGroups` are ignored when `layout` is set.
|
|
354
|
+
*/
|
|
355
|
+
layout?: ToolbarLayoutEntry[];
|
|
315
356
|
}
|
|
316
357
|
/**
|
|
317
358
|
* Mark/annotation metadata
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-Cy9hoMGV.cjs"),r={loadingExtended:"لوڈ ہو رہا ہے، براہ کرم انتظار کریں",loadingShort:"لوڈ ہو رہا ہے...",locale:"زبان",iconDescription:"آئیکن",loadingIcon:"لوڈنگ آئیکن",failedToLoadIcon:"آئیکن لوڈ کرنے میں ناکام",editLabel:"ترمیم",selectOne:"ایک منتخب کریں",selectNone:"کوئی نہیں",selectMany:"متعدد منتخب کریں",noResults:"کوئی نتیجہ نہیں",passwordPlaceholderText:"خفیہ پاس ورڈ",togglePasswordVisibility:"پاس ورڈ کی مرئیت تبدیل کریں",toggleMenu:"مینو ٹوگل کریں",toggleAside:"سائیڈ پینل ٹوگل کریں",mainNavigation:"بنیادی نیویگیشن",sidebar:"سائیڈ بار",closeDrawer:"دراز بند کریں",closeModal:"ماڈل بند کریں",confirm:"تصدیق",cancel:"منسوخ",addLabel:"شامل کریں",removeItem:"آئٹم ہٹائیں",currentLocale:"اردو",ar:"عربی",de:"جرمن",en:"انگریزی",es:"ہسپانوی",fr:"فرانسیسی",he:"عبرانی",hi:"ہندی",it:"اطالوی",ja:"جاپانی",ko:"کوریائی",nl:"ڈچ",pl:"پولش",pt:"پرتگالی",ru:"روسی",tr:"ترکی",vi:"ویتنامی",zh:"چینی",fa:"فارسی",ur:"اردو",emailPlaceholderText:"اپنا ای میل داخل کریں",incrementValue:"قدر اضافہ کریں",decrementValue:"قدر کم کریں",dropZoneInstructions:e=>e?"منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں، یا فائل منتخب کرنے کے لیے Enter یا Space دبائیں":"فائلیں یہاں گھسیٹیں",fileSizeUnits:["بائٹس","KB","MB","GB","TB"],removeFile:"فائل حذف کریں",clearAllFiles:"تمام فائلیں صاف کریں",clearValue:"قدر صاف کریں",unknownType:"نامعلوم قسم",filesInputInstructions:(e,o,n)=>{let l=e==null||e>1?"منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں":"منتخب کرنے کے لیے کلک کریں یا فائل یہاں گھسیٹیں";if(e||o){const t=[];if(e!=null&&e>1&&t.push(`زیادہ سے زیادہ ${e} فائلیں`),o&&n){const a=i.formatFileSize(o,{units:n});t.push(`ہر ایک زیادہ سے زیادہ ${a}`)}t.length>0&&(l+=` (${t.join("، ")})`)}return l},paginationLabel:"صفحہ بندی",firstPage:"پہلا صفحہ",previousPage:"پچھلا صفحہ",nextPage:"اگلا صفحہ",lastPage:"آخری صفحہ",breadcrumbs:"بریڈ کرمبز",commandPalette:"کمانڈ پیلیٹ",typeACommand:"کمانڈ ٹائپ کریں...",noResultsFound:"کوئی نتیجہ نہیں ملا",noMatchingCommands:"کوئی مماثل کمانڈ نہیں ملی",appearanceSystem:"سسٹم",appearanceLight:"ہلکا",appearanceDark:"گہرا",ok:"OK",changeTypeConfirmation:"قسم تبدیل کرنے سے موجودہ قدر صاف ہو جائے گی۔ جاری رکھیں؟",notifications:"اطلاعات",markAllAsRead:"سب کو پڑھا ہوا نشان زد کریں",noNotifications:"کوئی اطلاع نہیں",schemaConflictsDetected:"اسکیما تنازعات کا پتا چلا",schemaViolationsDetected:"اسکیما خلاف ورزیوں کا پتا چلا",properties:"خصوصیات",uploading:"اپ لوڈ ہو رہا ہے...",dropFilesOrBrowse:"فائلیں یہاں چھوڑیں یا براؤز کرنے کے لیے کلک کریں",acceptedTypes:e=>`قابل قبول اقسام: ${e}`,enterUrlPrompt:"URL درج کریں:",exceeded:"(حد سے تجاوز)",pdfPreview:"PDF پیش نظارہ",lexical:{fontFamily:"فونٹ فیملی",fontSize:"فونٹ سائز",fontColor:"فونٹ رنگ",highlightColor:"ہائی لائٹ رنگ",backgroundColor:"پس منظر رنگ",bold:"بولڈ",italic:"ترچھا",underline:"خط کشیدہ",strikethrough:"کٹا ہوا",code:"کوڈ",clearFormatting:"فارمیٹنگ صاف کریں",normal:"عام",heading:e=>`سرخی ${e}`,bulletList:"بلٹ فہرست",orderedList:"نمبر شدہ فہرست",checkList:"چیک فہرست",indent:"اندر کریں",outdent:"باہر کریں",blockquote:"اقتباس",codeBlock:"کوڈ بلاک",horizontalRule:"افقی لکیر",insertTable:"ٹیبل داخل کریں",link:"لنک",undo:"واپس",redo:"دوبارہ",cut:"کاٹیں",copy:"نقل",paste:"چسپاں",defaultOption:"پہلے سے طے شدہ",slashCommands:"سلیش کمانڈز",noCommandsFound:"کوئی کمانڈ نہیں ملی",changeBlockType:"بلاک کی قسم تبدیل کریں",blockTypes:"بلاک کی اقسام",enterUrl:"URL درج کریں:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Loading PDF...",loadFailed:"Failed to load PDF",invalidPdf:"Invalid PDF file",pageOutOfRange:(e,o)=>`Page ${e} is out of range (1-${o})`,renderFailed:"Failed to render PDF page"}};exports.default=r;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as i } from "./translations-
|
|
1
|
+
import { f as i } from "./translations-CiBhB2FV.js";
|
|
2
2
|
const d = {
|
|
3
3
|
loadingExtended: "لوڈ ہو رہا ہے، براہ کرم انتظار کریں",
|
|
4
4
|
loadingShort: "لوڈ ہو رہا ہے...",
|
|
@@ -58,19 +58,19 @@ const d = {
|
|
|
58
58
|
// inputs reset
|
|
59
59
|
clearValue: "قدر صاف کریں",
|
|
60
60
|
unknownType: "نامعلوم قسم",
|
|
61
|
-
filesInputInstructions: (e, o,
|
|
62
|
-
let
|
|
61
|
+
filesInputInstructions: (e, o, l) => {
|
|
62
|
+
let n = e == null || e > 1 ? "منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں" : "منتخب کرنے کے لیے کلک کریں یا فائل یہاں گھسیٹیں";
|
|
63
63
|
if (e || o) {
|
|
64
64
|
const t = [];
|
|
65
|
-
if (e != null && e > 1 && t.push(`زیادہ سے زیادہ ${e} فائلیں`), o &&
|
|
65
|
+
if (e != null && e > 1 && t.push(`زیادہ سے زیادہ ${e} فائلیں`), o && l) {
|
|
66
66
|
const a = i(o, {
|
|
67
|
-
units:
|
|
67
|
+
units: l
|
|
68
68
|
});
|
|
69
69
|
t.push(`ہر ایک زیادہ سے زیادہ ${a}`);
|
|
70
70
|
}
|
|
71
|
-
t.length > 0 && (
|
|
71
|
+
t.length > 0 && (n += ` (${t.join("، ")})`);
|
|
72
72
|
}
|
|
73
|
-
return
|
|
73
|
+
return n;
|
|
74
74
|
},
|
|
75
75
|
// Pagination
|
|
76
76
|
paginationLabel: "صفحہ بندی",
|
|
@@ -144,7 +144,15 @@ const d = {
|
|
|
144
144
|
noCommandsFound: "کوئی کمانڈ نہیں ملی",
|
|
145
145
|
changeBlockType: "بلاک کی قسم تبدیل کریں",
|
|
146
146
|
blockTypes: "بلاک کی اقسام",
|
|
147
|
-
enterUrl: "URL درج کریں:"
|
|
147
|
+
enterUrl: "URL درج کریں:",
|
|
148
|
+
tableActions: "Table actions",
|
|
149
|
+
insertRowAbove: "Insert row above",
|
|
150
|
+
insertRowBelow: "Insert row below",
|
|
151
|
+
insertColumnLeft: "Insert column left",
|
|
152
|
+
insertColumnRight: "Insert column right",
|
|
153
|
+
deleteRow: "Delete row",
|
|
154
|
+
deleteColumn: "Delete column",
|
|
155
|
+
deleteTable: "Delete table"
|
|
148
156
|
},
|
|
149
157
|
// prosemirror
|
|
150
158
|
prosemirror: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Use as q, coalesce as G, aria as V, attr as c, on as M, html as m, Value as C, Empty as T, computedOf as y, When as A, dataAttr as P, TextNode as J, prop as k, Fragment as $, emitValueAsNumber as Q, emitValue as X } from "@tempots/dom";
|
|
2
|
-
import { B as Y, I as z } from "./translations-
|
|
3
|
-
import { B as Z, I as ee } from "./input-container-
|
|
2
|
+
import { B as Y, I as z } from "./translations-CiBhB2FV.js";
|
|
3
|
+
import { B as Z, I as ee } from "./input-container-9r1F3KuX.js";
|
|
4
4
|
import { M as te, L as se, i as g } from "./stack-Bm-UZosx.js";
|
|
5
5
|
import { s as j } from "./session-id-3KiilioY.js";
|
|
6
6
|
const E = (s, e) => s === e || s !== s && e !== e;
|
|
@@ -997,7 +997,7 @@ function Ve({
|
|
|
997
997
|
await e["~standard"].validate(h)
|
|
998
998
|
)
|
|
999
999
|
}), r = k(!1), l = a.object();
|
|
1000
|
-
return l.onDispose(r.dispose), {
|
|
1000
|
+
return l.onDispose(() => r.dispose()), {
|
|
1001
1001
|
controller: l,
|
|
1002
1002
|
setStatus: o,
|
|
1003
1003
|
submit: async (h) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("@tempots/dom"),E=require("./translations-gVgMyNno.cjs"),j=require("./input-container-B31Seozh.cjs"),m=require("./stack-4VUGISn6.cjs"),_=require("./session-id-B5lJMzbB.cjs"),C=(n,e)=>n===e||n!==n&&e!==e;function G({size:n="sm",icon:e="line-md:close",disabled:s,roundedness:i="full",color:r="base",onClick:o,label:l},...a){return t.Use(E.BeatUII18n,c=>{const d=t.coalesce(l,c.$.closeModal);return j.Button({variant:"text",size:n,roundedness:i,disabled:s,color:r,onClick:o},t.attr.title(d),t.aria.label(d),...a,E.Icon({icon:e,size:n??"sm"}))})}const J=n=>{const{value:e,onBlur:s,onChange:i,placeholder:r,disabled:o,id:l,checkedIcon:a,uncheckedIcon:c,iconSize:d="lg"}=n,h=l??_.sessionId("checkbox"),p=`${h}-label`,g=()=>{if(t.Value.get(o??!1))return;const u=t.Value.get(e);i?.(!u)},y=u=>{t.Value.get(o??!1)||(u.key===" "||u.key==="Enter")&&(u.preventDefault(),g())};return j.InputContainer({baseContainer:!0,growInput:!1,...n,input:t.html.span(t.attr.class("bc-checkbox-input"),t.html.span(t.attr.class("bc-checkbox-input__checkbox"),t.attr.class(t.Value.map(e,u=>u?"bc-checkbox-input__checkbox--checked":"bc-checkbox-input__checkbox--unchecked")),t.attr.class(t.Value.map(o??!1,u=>u?"bc-checkbox-input__checkbox--disabled":"")),t.attr.id(h),t.attr.role("checkbox"),t.attr.tabindex(t.Value.map(o??!1,u=>u?-1:0)),t.aria.checked(e),t.aria.disabled(o),r!=null?t.aria.labelledby(p):t.Empty,t.on.keydown(y),s!=null?t.on.blur(s):t.Empty,E.Icon({icon:t.computedOf(e,a,c)((u,f,v)=>u?f??"akar-icons/check-box-fill":v??"akar-icons/box"),accessibility:"decorative",size:d})),r!=null?t.html.label(t.attr.class("bc-checkbox-input__label"),t.attr.id(p),t.attr.for(h),m.MutedLabel(r)):t.Empty)},t.on.click(g))},P=t.html.span(t.attr.class("bc-input-wrapper__required")," *");function Q(n){const e=["bc-input-wrapper"];return n!=="vertical"&&e.push(`bc-input-wrapper--${n}`),e.join(" ")}function X(n,e){const s=["bc-input-wrapper__label-text"];return n?s.push("bc-input-wrapper__label-text--error"):e?s.push("bc-input-wrapper__label-text--disabled"):s.push("bc-input-wrapper__label-text--default"),s.join(" ")}function Y(n,e){if(n==="horizontal-fixed"&&e!=null)return`--input-wrapper-label-width: ${e}`}const M=({fullWidth:n=!1,required:e,label:s,labelChildren:i,context:r,description:o,content:l,error:a,labelFor:c,hasError:d,disabled:h,layout:p,labelWidth:g},...y)=>{const u=d??a!=null,f=h??!1,v=p??"vertical",D=_.sessionId("input-wrapper"),I=o?`${D}-description`:void 0,V=a!=null?`${D}-error`:void 0,B=t.computedOf(v)(b=>b!=="vertical"),K=t.computedOf(v,g??void 0)((b,w)=>Y(b,w));return t.html.div(t.attr.class(t.Value.map(v,b=>Q(b))),t.attr.class(t.Value.map(n,b=>b?"bc-input-wrapper--full-width":"")),t.attr.style(K),s!=null||r!=null?t.html.div(t.attr.class("bc-input-wrapper__header"),t.html.div(t.attr.class("bc-input-wrapper__label-section"),t.html.label(t.attr.class("bc-input-wrapper__label"),c!=null?t.attr.for(c):t.Empty,t.html.span(t.attr.class(t.computedOf(u,f)((b,w)=>X(b??!1,w??!1))),s),s!=null&&e?P:t.Empty),t.When(t.computedOf(B,o)((b,w)=>b&&w!=null),()=>t.html.div(t.attr.class("bc-input-wrapper__description bc-input-wrapper__description--under-label"),t.attr.id(I),o))),r!=null?m.Label(r):t.Empty,i):t.Empty,t.html.div(t.attr.class("bc-input-wrapper__content"),[I,V].filter(Boolean).length>0?t.dataAttr.describedby([I,V].filter(Boolean).join(" ")):t.Empty,e?t.dataAttr.required("true"):t.Empty,t.When(u,()=>t.dataAttr.invalid("true")),l),t.When(t.computedOf(B,o)((b,w)=>!b&&w!=null),()=>t.html.div(t.attr.class("bc-input-wrapper__description"),t.attr.id(I),o)),t.When(u,()=>t.html.div(t.attr.class("bc-input-wrapper__error"),t.attr.id(V),t.aria.live("polite"),t.attr.role("alert"),a)),...y)},H=((n,e)=>()=>{n.markTouched(),e?.()}),O=(n,e)=>s=>{n.change(s),e?.(s)};function x(n,e){const{controller:s,onBlur:i,onChange:r,id:o,triggerOn:l,...a}=e;return n({id:o??s.name,disabled:s.disabled,value:s.signal,hasError:s.errorVisible,name:s.name,...a,onInput:l==="input"?O(s,r):void 0,onChange:l!=="input"?O(s,r):void 0,onBlur:H(s,i)})}function Z(n,{id:e,labelFor:s,...i},...r){const o=e??i.controller.name??_.sessionId("control"),l=s??o;return M({...i,hasError:i.controller.errorVisible,error:t.TextNode(i.controller.error.map(a=>a??"")),labelFor:l,content:x(a=>n({...a,id:o}),i)},...r)}function F(n,e){const{toInput:s,fromInput:i,controller:r,...o}=e,l=r.transform(s,i);return x(n,{...o,controller:l})}function ee(n,{id:e,labelFor:s,...i},...r){const o=e??i.controller.name??_.sessionId("control");return M({...i,labelFor:s??o,content:F(n,{...i,id:o})},...r)}function te(n){return n.split(".").map(s=>{const i=s.match(/^\[(\d+)\]$/);return i?Number(i[1]):s})}function $(n){return typeof n=="number"?`[${n}]`:`.${n}`}function W(n){if(n.length===0)return"";const[e,...s]=n;return[typeof e=="number"?`[${e}]`:e,...s.map($)].join("")}const se={valid:m.i.valid,invalid(n){return m.i.invalid({message:n})},invalidFields(n){const e={};for(const[s,i]of Object.entries(n))e[s]=typeof i=="string"?{message:i}:i;return m.i.invalid({dependencies:e})},fromError(n){return m.i.invalid(n)}};function T(n){return function(s){if(s.type==="valid")return s;let i=s.error;for(const r of n)if(i=i?.dependencies?.[r],i==null)return m.i.valid;return m.i.invalid(i)}}class k{path;change;signal;status;error;hasError;touched;errorVisible;dirty;dependencyErrors;#e={disabled:t.prop(!1),touched:t.prop(!1)};#s;#t=t.prop(void 0);parent;disabled;#n=[];disabledOrHasErrors;constructor(e,s,i,r,o,l=C){this.path=e,this.change=s,this.signal=i,this.status=r,this.#s=l,this.#t.set(i.value),this.error=r.map(a=>a?.type==="invalid"?a.error?.message:void 0),this.hasError=this.error.map(a=>a!=null),this.touched=this.#e.touched,o.validationMode?this.errorVisible=t.computedOf(this.hasError,this.touched,o.validationMode)((a,c,d)=>d==="eager"?!!a:!!a&&!!c):this.errorVisible=t.computedOf(this.hasError,this.touched)((a,c)=>!!a&&!!c),this.dirty=t.computedOf(this.signal,this.#t)((a,c)=>!this.#s(a,c)),this.dependencyErrors=r.map(a=>a?.type==="invalid"?a.error?.dependencies:void 0),this.parent=o,this.disabled=t.computedOf(this.#e.disabled,o.disabled)((a,c)=>a||c),this.disabledOrHasErrors=t.computedOf(this.disabled,this.hasError)((a,c)=>a||c),this.onDispose(()=>{this.#e.disabled.dispose(),this.#e.touched.dispose(),this.disabled.dispose(),this.error.dispose(),this.errorVisible.dispose(),this.dirty.dispose(),this.#t.dispose(),this.dependencyErrors.dispose(),this.disabledOrHasErrors.dispose()})}get name(){return W(this.path)}onDispose=e=>{this.#n.push(e)};dispose=()=>{for(const e of this.#n)try{e()}catch(s){console.error("Error in dispose callback:",s)}this.#n.length=0};setDisabled=e=>{this.#e.disabled.set(e)};disable=()=>this.setDisabled(!0);enable=()=>this.setDisabled(!1);markTouched=()=>{this.#e.touched.set(!0)};resetTouched=()=>{this.#e.touched.set(!1)};markPristine=()=>{this.#t.set(this.signal.value)};reset=()=>{this.change(this.#t.value)};array=(e=C)=>new q(this.path,this.change,this.signal,this.status,this.parent,e);object=(e=C)=>new N(this.path,this.change,this.signal,this.status,this.parent,e);transform=(e,s,i=[],r=C)=>new k([...this.path,...i],o=>this.change(s(o)),this.signal.map(e,r),this.status.map(T(i)),this.parent,r);asyncTransform=(e,s,i,r=[],o=C)=>new k([...this.path,...r],l=>{s(l).then(a=>this.change(a))},this.signal.mapAsync(e,i,void 0,o),this.status.map(T(r)),this.parent,o)}class N extends k{#e=new Map;#s=new Map;#t=new Map;#n=t.prop(!1);touchedDeep=this.#n;#r=new Map;#i=new Map;#o=t.prop(!1);dirtyDeep=this.#o;#c;#h;#l=()=>{let e=!1;for(const s of this.#s.values())if(s){e=!0;break}this.#n.set(this.touched.value||e)};constructor(e,s,i,r,o,l){super(e,s,i.map(c=>c??{},l),r,o,l),this.#c=this.touched.on(()=>{this.#l()}),this.#h=this.dirty.on(()=>{this.#a()});const a=this.signal.on(()=>this.#a());this.onDispose(()=>{for(const c of this.#e.values())c.dispose();this.#e.clear();for(const c of this.#t.values())c();this.#t.clear(),this.#s.clear(),this.#n.dispose();for(const c of this.#i.values())c();this.#i.clear(),this.#r.clear(),this.#o.dispose(),this.#c(),this.#h(),a()})}field=e=>{if(this.#e.has(e))return this.#e.get(e);const s=async l=>{this.change({...this.signal.value,[e]:l})},i=new k([...this.path,e],s,this.signal.map(l=>l[e]),this.status.map(T([e])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e.set(e,i);const r=i.touched.on(l=>{this.#s.set(e,l),this.#l()});this.#t.set(e,r);const o=i.dirty.on(l=>{this.#r.set(e,l),this.#a()});return this.#i.set(e,o),i};markAllTouched=()=>{this.markTouched();const e=this.signal.value;for(const s of Object.keys(e))this.field(s).markTouched();for(const s of this.#e.values())s.markTouched()};markAllPristine=()=>{this.markPristine();const e=this.signal.value;for(const s of Object.keys(e))this.field(s).markPristine?.();for(const s of this.#e.values())s.markPristine?.()};#a=()=>{let e=!1;for(const s of this.#r.values())if(s){e=!0;break}this.#o.set(this.dirty.value||e)}}class q extends k{#e=new Array;length;#s=new Map;#t=new Map;#n=t.prop(!1);touchedDeep=this.#n;#r=new Map;#i=new Map;#o=t.prop(!1);dirtyDeep=this.#o;#c;#h;#l=()=>{let e=!1;for(const s of this.#s.values())if(s){e=!0;break}this.#n.set(this.touched.value||e)};constructor(e,s,i,r,o,l){const a=i.map(h=>h??[],l);super(e,s,a,r,o,l);const c=a.on(h=>{const p=this.#e.length-h.length;p>0&&(this.#e.splice(h.length,p).forEach((g,y)=>{const u=h.length+y;g.dispose(),this.#t.get(u)?.(),this.#t.delete(u),this.#s.delete(u),this.#i.get(u)?.(),this.#i.delete(u),this.#r.delete(u)}),this.#l(),this.#a())});this.length=a.map(h=>h.length),this.#c=this.touched.on(()=>{this.#l()}),this.#h=this.dirty.on(()=>{this.#a()});const d=this.signal.on(()=>this.#a());this.onDispose(()=>{for(const h of this.#e)h.dispose();this.length.dispose(),this.#e.length=0,c(),a.dispose();for(const h of this.#t.values())h();this.#t.clear(),this.#s.clear(),this.#n.dispose();for(const h of this.#i.values())h();this.#i.clear(),this.#r.clear(),this.#o.dispose(),this.#c(),this.#h(),d()})}item=e=>{if(this.#e[e])return this.#e[e];const s=async l=>{const a=this.signal.value.slice();a[e]=l,this.change(a)},i=new k([...this.path,e],s,this.signal.map(l=>l[e]),this.status.map(T([e])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e[e]=i;const r=i.touched.on(l=>{this.#s.set(e,l),this.#l()});this.#t.set(e,r);const o=i.dirty.on(l=>{this.#r.set(e,l),this.#a()});return this.#i.set(e,o),i};push=(...e)=>{this.change([...this.signal.value,...e])};pop=()=>{this.splice(this.signal.value.length-1,1)};shift=()=>{this.splice(0,1)};unshift=(...e)=>{this.change([...e,...this.signal.value])};removeAt=e=>{this.splice(e,1)};splice=(e,s)=>{const i=this.signal.value.slice();i.splice(e,s),this.change(i)};move=(e,s,i=1)=>{if(i<1||e===s)return;const r=this.signal.value.slice(),o=r.splice(e,i);r.splice(s,0,...o),this.change(r)};markAllTouched=()=>{this.markTouched();const e=this.signal.value.length;for(let s=0;s<e;s++)this.item(s).markTouched()};markAllPristine=()=>{this.markPristine();const e=this.signal.value.length;for(let s=0;s<e;s++)this.item(s).markPristine?.()};#a=()=>{let e=!1;for(const s of this.#r.values())if(s){e=!0;break}this.#o.set(this.dirty.value||e)}}function z(n){function e(s){return typeof s=="number"?s:s.toString()}return n.map(s=>typeof s=="object"&&s.key!=null?e(s.key):e(s))}function L(n){const e=n.filter(r=>r.path==null||r.path.length===0).map(r=>r.message),s=n.filter(r=>r.path!=null&&r.path.length>0).reduce((r,o)=>{const l=z(o.path),a=l.pop();let c=r;for(const d of l)c.dependencies==null&&(c.dependencies={}),c.dependencies[d]==null&&(c.dependencies[d]={}),c=c.dependencies[d];return c.dependencies==null&&(c.dependencies={}),c.dependencies[a]={message:o.message},r},{}),i=e.join(`
|
|
2
|
-
`);return{...s,message:i!=""?i:void 0}}function R({initialValue:n,onChange:e,validate:s,equals:i,validationMode:r,validateDebounceMs:o}){const l=t.Value.deriveProp(n),a=t.prop(m.i.valid),c=t.prop(!1),d=t.prop(r??"onTouched"),h=f=>{a.set(f)};let p;const g=async f=>{if(s!=null){const v=await s(f);h(v)}},y=async f=>{l.set(f),e?.(f);const v=d.value;if(s!=null){if(v==="onSubmit")return;const D=o??0;D>0?(p&&clearTimeout(p),p=setTimeout(()=>{g(f)},D)):await g(f)}},u=new k([],y,l,a,{disabled:c,validationMode:d},i??C);return u.onDispose(()=>{c.dispose(),l.dispose(),a.dispose(),d.dispose(),p&&clearTimeout(p)}),{controller:u,setStatus:h}}function A(n){return t.Fragment(t.attr.disabled(n.disabled),t.attr.name(n.name))}function ne(n,{triggerOn:e="change"}={}){return t.Fragment(A(n),t.attr.value(n.signal),(e==="input"?t.on.input:t.on.change)(t.emitValue(n.change)))}function ie(n,{triggerOn:e="change"}={}){return t.Fragment(A(n),t.attr.valueAsNumber(n.signal),(e==="input"?t.on.input:t.on.change)(t.emitValueAsNumber(n.change)))}function S(n){return n.issues!=null?m.i.invalid(L(n.issues)):m.i.valid}async function re({task:n,errorMessage:e,errorPath:s=["root"],validation:i}){try{const r=await n();return i!=null?i(r):m.i.valid}catch(r){const o=e??(r instanceof Error?r.message:"Operation failed");return s.length===1&&s[0]==="root"?m.i.invalid({message:o}):m.i.invalid({dependencies:U(s,o)})}}function U(n,e){if(n.length===1)return{[n[0]]:{message:e}};const[s,...i]=n;return{[s]:{dependencies:U(i,e)}}}function ae({initialValue:n={},schema:e,onSubmit:s=async()=>m.i.valid,validationMode:i,validateDebounceMs:r}){const{controller:o,setStatus:l}=R({initialValue:n,validationMode:i??"onTouched",validateDebounceMs:r,validate:(i??"onTouched")==="onSubmit"||e==null?void 0:async h=>S(await e["~standard"].validate(h))}),a=t.prop(!1),c=o.object();return c.onDispose(a.dispose),{controller:c,setStatus:l,submit:async h=>{if(a.set(!0),h?.preventDefault(),c.markAllTouched(),e!=null){const g=c.signal.value,y=S(await e["~standard"].validate(g));if(l(y),y.type==="invalid"){a.set(!1);return}}const p=await s(c.signal.value);a.set(!1),p.type==="invalid"&&l(p)},submitting:a}}exports.ArrayController=q;exports.BaseControl=x;exports.BaseMappedControl=F;exports.CheckboxInput=J;exports.CloseButton=G;exports.Control=Z;exports.Controller=k;exports.ControllerValidation=se;exports.InputWrapper=M;exports.MappedControl=ee;exports.O=C;exports.ObjectController=N;exports.RequiredSymbol=P;exports.connectCommonAttributes=A;exports.connectNumberInput=ie;exports.connectStringInput=ne;exports.convertStandardSchemaIssues=L;exports.convertStandardSchemaPathToPath=z;exports.makeMapValidation=T;exports.makeOnBlurHandler=H;exports.makeOnChangeHandler=O;exports.parsePath=te;exports.pathToString=W;exports.standardSchemaResultToValidation=S;exports.taskToValidation=re;exports.useController=R;exports.useForm=ae;exports.wrapSegment=$;
|
|
1
|
+
"use strict";const t=require("@tempots/dom"),E=require("./translations-Cy9hoMGV.cjs"),j=require("./input-container-DiYEl_y8.cjs"),m=require("./stack-4VUGISn6.cjs"),_=require("./session-id-B5lJMzbB.cjs"),C=(n,e)=>n===e||n!==n&&e!==e;function G({size:n="sm",icon:e="line-md:close",disabled:s,roundedness:i="full",color:r="base",onClick:o,label:l},...a){return t.Use(E.BeatUII18n,c=>{const d=t.coalesce(l,c.$.closeModal);return j.Button({variant:"text",size:n,roundedness:i,disabled:s,color:r,onClick:o},t.attr.title(d),t.aria.label(d),...a,E.Icon({icon:e,size:n??"sm"}))})}const J=n=>{const{value:e,onBlur:s,onChange:i,placeholder:r,disabled:o,id:l,checkedIcon:a,uncheckedIcon:c,iconSize:d="lg"}=n,h=l??_.sessionId("checkbox"),p=`${h}-label`,g=()=>{if(t.Value.get(o??!1))return;const u=t.Value.get(e);i?.(!u)},y=u=>{t.Value.get(o??!1)||(u.key===" "||u.key==="Enter")&&(u.preventDefault(),g())};return j.InputContainer({baseContainer:!0,growInput:!1,...n,input:t.html.span(t.attr.class("bc-checkbox-input"),t.html.span(t.attr.class("bc-checkbox-input__checkbox"),t.attr.class(t.Value.map(e,u=>u?"bc-checkbox-input__checkbox--checked":"bc-checkbox-input__checkbox--unchecked")),t.attr.class(t.Value.map(o??!1,u=>u?"bc-checkbox-input__checkbox--disabled":"")),t.attr.id(h),t.attr.role("checkbox"),t.attr.tabindex(t.Value.map(o??!1,u=>u?-1:0)),t.aria.checked(e),t.aria.disabled(o),r!=null?t.aria.labelledby(p):t.Empty,t.on.keydown(y),s!=null?t.on.blur(s):t.Empty,E.Icon({icon:t.computedOf(e,a,c)((u,f,v)=>u?f??"akar-icons/check-box-fill":v??"akar-icons/box"),accessibility:"decorative",size:d})),r!=null?t.html.label(t.attr.class("bc-checkbox-input__label"),t.attr.id(p),t.attr.for(h),m.MutedLabel(r)):t.Empty)},t.on.click(g))},P=t.html.span(t.attr.class("bc-input-wrapper__required")," *");function Q(n){const e=["bc-input-wrapper"];return n!=="vertical"&&e.push(`bc-input-wrapper--${n}`),e.join(" ")}function X(n,e){const s=["bc-input-wrapper__label-text"];return n?s.push("bc-input-wrapper__label-text--error"):e?s.push("bc-input-wrapper__label-text--disabled"):s.push("bc-input-wrapper__label-text--default"),s.join(" ")}function Y(n,e){if(n==="horizontal-fixed"&&e!=null)return`--input-wrapper-label-width: ${e}`}const M=({fullWidth:n=!1,required:e,label:s,labelChildren:i,context:r,description:o,content:l,error:a,labelFor:c,hasError:d,disabled:h,layout:p,labelWidth:g},...y)=>{const u=d??a!=null,f=h??!1,v=p??"vertical",D=_.sessionId("input-wrapper"),I=o?`${D}-description`:void 0,V=a!=null?`${D}-error`:void 0,B=t.computedOf(v)(b=>b!=="vertical"),K=t.computedOf(v,g??void 0)((b,w)=>Y(b,w));return t.html.div(t.attr.class(t.Value.map(v,b=>Q(b))),t.attr.class(t.Value.map(n,b=>b?"bc-input-wrapper--full-width":"")),t.attr.style(K),s!=null||r!=null?t.html.div(t.attr.class("bc-input-wrapper__header"),t.html.div(t.attr.class("bc-input-wrapper__label-section"),t.html.label(t.attr.class("bc-input-wrapper__label"),c!=null?t.attr.for(c):t.Empty,t.html.span(t.attr.class(t.computedOf(u,f)((b,w)=>X(b??!1,w??!1))),s),s!=null&&e?P:t.Empty),t.When(t.computedOf(B,o)((b,w)=>b&&w!=null),()=>t.html.div(t.attr.class("bc-input-wrapper__description bc-input-wrapper__description--under-label"),t.attr.id(I),o))),r!=null?m.Label(r):t.Empty,i):t.Empty,t.html.div(t.attr.class("bc-input-wrapper__content"),[I,V].filter(Boolean).length>0?t.dataAttr.describedby([I,V].filter(Boolean).join(" ")):t.Empty,e?t.dataAttr.required("true"):t.Empty,t.When(u,()=>t.dataAttr.invalid("true")),l),t.When(t.computedOf(B,o)((b,w)=>!b&&w!=null),()=>t.html.div(t.attr.class("bc-input-wrapper__description"),t.attr.id(I),o)),t.When(u,()=>t.html.div(t.attr.class("bc-input-wrapper__error"),t.attr.id(V),t.aria.live("polite"),t.attr.role("alert"),a)),...y)},H=((n,e)=>()=>{n.markTouched(),e?.()}),O=(n,e)=>s=>{n.change(s),e?.(s)};function x(n,e){const{controller:s,onBlur:i,onChange:r,id:o,triggerOn:l,...a}=e;return n({id:o??s.name,disabled:s.disabled,value:s.signal,hasError:s.errorVisible,name:s.name,...a,onInput:l==="input"?O(s,r):void 0,onChange:l!=="input"?O(s,r):void 0,onBlur:H(s,i)})}function Z(n,{id:e,labelFor:s,...i},...r){const o=e??i.controller.name??_.sessionId("control"),l=s??o;return M({...i,hasError:i.controller.errorVisible,error:t.TextNode(i.controller.error.map(a=>a??"")),labelFor:l,content:x(a=>n({...a,id:o}),i)},...r)}function F(n,e){const{toInput:s,fromInput:i,controller:r,...o}=e,l=r.transform(s,i);return x(n,{...o,controller:l})}function ee(n,{id:e,labelFor:s,...i},...r){const o=e??i.controller.name??_.sessionId("control");return M({...i,labelFor:s??o,content:F(n,{...i,id:o})},...r)}function te(n){return n.split(".").map(s=>{const i=s.match(/^\[(\d+)\]$/);return i?Number(i[1]):s})}function $(n){return typeof n=="number"?`[${n}]`:`.${n}`}function W(n){if(n.length===0)return"";const[e,...s]=n;return[typeof e=="number"?`[${e}]`:e,...s.map($)].join("")}const se={valid:m.i.valid,invalid(n){return m.i.invalid({message:n})},invalidFields(n){const e={};for(const[s,i]of Object.entries(n))e[s]=typeof i=="string"?{message:i}:i;return m.i.invalid({dependencies:e})},fromError(n){return m.i.invalid(n)}};function T(n){return function(s){if(s.type==="valid")return s;let i=s.error;for(const r of n)if(i=i?.dependencies?.[r],i==null)return m.i.valid;return m.i.invalid(i)}}class k{path;change;signal;status;error;hasError;touched;errorVisible;dirty;dependencyErrors;#e={disabled:t.prop(!1),touched:t.prop(!1)};#s;#t=t.prop(void 0);parent;disabled;#n=[];disabledOrHasErrors;constructor(e,s,i,r,o,l=C){this.path=e,this.change=s,this.signal=i,this.status=r,this.#s=l,this.#t.set(i.value),this.error=r.map(a=>a?.type==="invalid"?a.error?.message:void 0),this.hasError=this.error.map(a=>a!=null),this.touched=this.#e.touched,o.validationMode?this.errorVisible=t.computedOf(this.hasError,this.touched,o.validationMode)((a,c,d)=>d==="eager"?!!a:!!a&&!!c):this.errorVisible=t.computedOf(this.hasError,this.touched)((a,c)=>!!a&&!!c),this.dirty=t.computedOf(this.signal,this.#t)((a,c)=>!this.#s(a,c)),this.dependencyErrors=r.map(a=>a?.type==="invalid"?a.error?.dependencies:void 0),this.parent=o,this.disabled=t.computedOf(this.#e.disabled,o.disabled)((a,c)=>a||c),this.disabledOrHasErrors=t.computedOf(this.disabled,this.hasError)((a,c)=>a||c),this.onDispose(()=>{this.#e.disabled.dispose(),this.#e.touched.dispose(),this.disabled.dispose(),this.error.dispose(),this.errorVisible.dispose(),this.dirty.dispose(),this.#t.dispose(),this.dependencyErrors.dispose(),this.disabledOrHasErrors.dispose()})}get name(){return W(this.path)}onDispose=e=>{this.#n.push(e)};dispose=()=>{for(const e of this.#n)try{e()}catch(s){console.error("Error in dispose callback:",s)}this.#n.length=0};setDisabled=e=>{this.#e.disabled.set(e)};disable=()=>this.setDisabled(!0);enable=()=>this.setDisabled(!1);markTouched=()=>{this.#e.touched.set(!0)};resetTouched=()=>{this.#e.touched.set(!1)};markPristine=()=>{this.#t.set(this.signal.value)};reset=()=>{this.change(this.#t.value)};array=(e=C)=>new q(this.path,this.change,this.signal,this.status,this.parent,e);object=(e=C)=>new N(this.path,this.change,this.signal,this.status,this.parent,e);transform=(e,s,i=[],r=C)=>new k([...this.path,...i],o=>this.change(s(o)),this.signal.map(e,r),this.status.map(T(i)),this.parent,r);asyncTransform=(e,s,i,r=[],o=C)=>new k([...this.path,...r],l=>{s(l).then(a=>this.change(a))},this.signal.mapAsync(e,i,void 0,o),this.status.map(T(r)),this.parent,o)}class N extends k{#e=new Map;#s=new Map;#t=new Map;#n=t.prop(!1);touchedDeep=this.#n;#r=new Map;#i=new Map;#o=t.prop(!1);dirtyDeep=this.#o;#c;#h;#l=()=>{let e=!1;for(const s of this.#s.values())if(s){e=!0;break}this.#n.set(this.touched.value||e)};constructor(e,s,i,r,o,l){super(e,s,i.map(c=>c??{},l),r,o,l),this.#c=this.touched.on(()=>{this.#l()}),this.#h=this.dirty.on(()=>{this.#a()});const a=this.signal.on(()=>this.#a());this.onDispose(()=>{for(const c of this.#e.values())c.dispose();this.#e.clear();for(const c of this.#t.values())c();this.#t.clear(),this.#s.clear(),this.#n.dispose();for(const c of this.#i.values())c();this.#i.clear(),this.#r.clear(),this.#o.dispose(),this.#c(),this.#h(),a()})}field=e=>{if(this.#e.has(e))return this.#e.get(e);const s=async l=>{this.change({...this.signal.value,[e]:l})},i=new k([...this.path,e],s,this.signal.map(l=>l[e]),this.status.map(T([e])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e.set(e,i);const r=i.touched.on(l=>{this.#s.set(e,l),this.#l()});this.#t.set(e,r);const o=i.dirty.on(l=>{this.#r.set(e,l),this.#a()});return this.#i.set(e,o),i};markAllTouched=()=>{this.markTouched();const e=this.signal.value;for(const s of Object.keys(e))this.field(s).markTouched();for(const s of this.#e.values())s.markTouched()};markAllPristine=()=>{this.markPristine();const e=this.signal.value;for(const s of Object.keys(e))this.field(s).markPristine?.();for(const s of this.#e.values())s.markPristine?.()};#a=()=>{let e=!1;for(const s of this.#r.values())if(s){e=!0;break}this.#o.set(this.dirty.value||e)}}class q extends k{#e=new Array;length;#s=new Map;#t=new Map;#n=t.prop(!1);touchedDeep=this.#n;#r=new Map;#i=new Map;#o=t.prop(!1);dirtyDeep=this.#o;#c;#h;#l=()=>{let e=!1;for(const s of this.#s.values())if(s){e=!0;break}this.#n.set(this.touched.value||e)};constructor(e,s,i,r,o,l){const a=i.map(h=>h??[],l);super(e,s,a,r,o,l);const c=a.on(h=>{const p=this.#e.length-h.length;p>0&&(this.#e.splice(h.length,p).forEach((g,y)=>{const u=h.length+y;g.dispose(),this.#t.get(u)?.(),this.#t.delete(u),this.#s.delete(u),this.#i.get(u)?.(),this.#i.delete(u),this.#r.delete(u)}),this.#l(),this.#a())});this.length=a.map(h=>h.length),this.#c=this.touched.on(()=>{this.#l()}),this.#h=this.dirty.on(()=>{this.#a()});const d=this.signal.on(()=>this.#a());this.onDispose(()=>{for(const h of this.#e)h.dispose();this.length.dispose(),this.#e.length=0,c(),a.dispose();for(const h of this.#t.values())h();this.#t.clear(),this.#s.clear(),this.#n.dispose();for(const h of this.#i.values())h();this.#i.clear(),this.#r.clear(),this.#o.dispose(),this.#c(),this.#h(),d()})}item=e=>{if(this.#e[e])return this.#e[e];const s=async l=>{const a=this.signal.value.slice();a[e]=l,this.change(a)},i=new k([...this.path,e],s,this.signal.map(l=>l[e]),this.status.map(T([e])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e[e]=i;const r=i.touched.on(l=>{this.#s.set(e,l),this.#l()});this.#t.set(e,r);const o=i.dirty.on(l=>{this.#r.set(e,l),this.#a()});return this.#i.set(e,o),i};push=(...e)=>{this.change([...this.signal.value,...e])};pop=()=>{this.splice(this.signal.value.length-1,1)};shift=()=>{this.splice(0,1)};unshift=(...e)=>{this.change([...e,...this.signal.value])};removeAt=e=>{this.splice(e,1)};splice=(e,s)=>{const i=this.signal.value.slice();i.splice(e,s),this.change(i)};move=(e,s,i=1)=>{if(i<1||e===s)return;const r=this.signal.value.slice(),o=r.splice(e,i);r.splice(s,0,...o),this.change(r)};markAllTouched=()=>{this.markTouched();const e=this.signal.value.length;for(let s=0;s<e;s++)this.item(s).markTouched()};markAllPristine=()=>{this.markPristine();const e=this.signal.value.length;for(let s=0;s<e;s++)this.item(s).markPristine?.()};#a=()=>{let e=!1;for(const s of this.#r.values())if(s){e=!0;break}this.#o.set(this.dirty.value||e)}}function z(n){function e(s){return typeof s=="number"?s:s.toString()}return n.map(s=>typeof s=="object"&&s.key!=null?e(s.key):e(s))}function L(n){const e=n.filter(r=>r.path==null||r.path.length===0).map(r=>r.message),s=n.filter(r=>r.path!=null&&r.path.length>0).reduce((r,o)=>{const l=z(o.path),a=l.pop();let c=r;for(const d of l)c.dependencies==null&&(c.dependencies={}),c.dependencies[d]==null&&(c.dependencies[d]={}),c=c.dependencies[d];return c.dependencies==null&&(c.dependencies={}),c.dependencies[a]={message:o.message},r},{}),i=e.join(`
|
|
2
|
+
`);return{...s,message:i!=""?i:void 0}}function R({initialValue:n,onChange:e,validate:s,equals:i,validationMode:r,validateDebounceMs:o}){const l=t.Value.deriveProp(n),a=t.prop(m.i.valid),c=t.prop(!1),d=t.prop(r??"onTouched"),h=f=>{a.set(f)};let p;const g=async f=>{if(s!=null){const v=await s(f);h(v)}},y=async f=>{l.set(f),e?.(f);const v=d.value;if(s!=null){if(v==="onSubmit")return;const D=o??0;D>0?(p&&clearTimeout(p),p=setTimeout(()=>{g(f)},D)):await g(f)}},u=new k([],y,l,a,{disabled:c,validationMode:d},i??C);return u.onDispose(()=>{c.dispose(),l.dispose(),a.dispose(),d.dispose(),p&&clearTimeout(p)}),{controller:u,setStatus:h}}function A(n){return t.Fragment(t.attr.disabled(n.disabled),t.attr.name(n.name))}function ne(n,{triggerOn:e="change"}={}){return t.Fragment(A(n),t.attr.value(n.signal),(e==="input"?t.on.input:t.on.change)(t.emitValue(n.change)))}function ie(n,{triggerOn:e="change"}={}){return t.Fragment(A(n),t.attr.valueAsNumber(n.signal),(e==="input"?t.on.input:t.on.change)(t.emitValueAsNumber(n.change)))}function S(n){return n.issues!=null?m.i.invalid(L(n.issues)):m.i.valid}async function re({task:n,errorMessage:e,errorPath:s=["root"],validation:i}){try{const r=await n();return i!=null?i(r):m.i.valid}catch(r){const o=e??(r instanceof Error?r.message:"Operation failed");return s.length===1&&s[0]==="root"?m.i.invalid({message:o}):m.i.invalid({dependencies:U(s,o)})}}function U(n,e){if(n.length===1)return{[n[0]]:{message:e}};const[s,...i]=n;return{[s]:{dependencies:U(i,e)}}}function ae({initialValue:n={},schema:e,onSubmit:s=async()=>m.i.valid,validationMode:i,validateDebounceMs:r}){const{controller:o,setStatus:l}=R({initialValue:n,validationMode:i??"onTouched",validateDebounceMs:r,validate:(i??"onTouched")==="onSubmit"||e==null?void 0:async h=>S(await e["~standard"].validate(h))}),a=t.prop(!1),c=o.object();return c.onDispose(()=>a.dispose()),{controller:c,setStatus:l,submit:async h=>{if(a.set(!0),h?.preventDefault(),c.markAllTouched(),e!=null){const g=c.signal.value,y=S(await e["~standard"].validate(g));if(l(y),y.type==="invalid"){a.set(!1);return}}const p=await s(c.signal.value);a.set(!1),p.type==="invalid"&&l(p)},submitting:a}}exports.ArrayController=q;exports.BaseControl=x;exports.BaseMappedControl=F;exports.CheckboxInput=J;exports.CloseButton=G;exports.Control=Z;exports.Controller=k;exports.ControllerValidation=se;exports.InputWrapper=M;exports.MappedControl=ee;exports.O=C;exports.ObjectController=N;exports.RequiredSymbol=P;exports.connectCommonAttributes=A;exports.connectNumberInput=ie;exports.connectStringInput=ne;exports.convertStandardSchemaIssues=L;exports.convertStandardSchemaPathToPath=z;exports.makeMapValidation=T;exports.makeOnBlurHandler=H;exports.makeOnChangeHandler=O;exports.parsePath=te;exports.pathToString=W;exports.standardSchemaResultToValidation=S;exports.taskToValidation=re;exports.useController=R;exports.useForm=ae;exports.wrapSegment=$;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as a } from "./translations-
|
|
2
|
-
const
|
|
1
|
+
import { f as a } from "./translations-CiBhB2FV.js";
|
|
2
|
+
const c = {
|
|
3
3
|
loadingExtended: "Đang tải, vui lòng đợi",
|
|
4
4
|
loadingShort: "Đang tải...",
|
|
5
5
|
locale: "Ngôn ngữ",
|
|
@@ -58,17 +58,17 @@ const l = {
|
|
|
58
58
|
// inputs reset
|
|
59
59
|
clearValue: "Xóa giá trị",
|
|
60
60
|
unknownType: "Loại không xác định",
|
|
61
|
-
filesInputInstructions: (n,
|
|
61
|
+
filesInputInstructions: (n, e, i) => {
|
|
62
62
|
let o = n == null || n > 1 ? "Nhấp để chọn hoặc kéo tệp vào đây" : "Nhấp để chọn hoặc kéo một tệp vào đây";
|
|
63
|
-
if (n ||
|
|
64
|
-
const
|
|
65
|
-
if (n != null && n > 1 &&
|
|
66
|
-
const h = a(
|
|
67
|
-
units:
|
|
63
|
+
if (n || e) {
|
|
64
|
+
const t = [];
|
|
65
|
+
if (n != null && n > 1 && t.push(`tối đa ${n} tệp`), e && i) {
|
|
66
|
+
const h = a(e, {
|
|
67
|
+
units: i
|
|
68
68
|
});
|
|
69
|
-
|
|
69
|
+
t.push(`mỗi tệp tối đa ${h}`);
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
t.length > 0 && (o += ` (${t.join(", ")})`);
|
|
72
72
|
}
|
|
73
73
|
return o;
|
|
74
74
|
},
|
|
@@ -144,7 +144,15 @@ const l = {
|
|
|
144
144
|
noCommandsFound: "Không tìm thấy lệnh",
|
|
145
145
|
changeBlockType: "Đổi loại khối",
|
|
146
146
|
blockTypes: "Loại khối",
|
|
147
|
-
enterUrl: "Nhập URL:"
|
|
147
|
+
enterUrl: "Nhập URL:",
|
|
148
|
+
tableActions: "Table actions",
|
|
149
|
+
insertRowAbove: "Insert row above",
|
|
150
|
+
insertRowBelow: "Insert row below",
|
|
151
|
+
insertColumnLeft: "Insert column left",
|
|
152
|
+
insertColumnRight: "Insert column right",
|
|
153
|
+
deleteRow: "Delete row",
|
|
154
|
+
deleteColumn: "Delete column",
|
|
155
|
+
deleteTable: "Delete table"
|
|
148
156
|
},
|
|
149
157
|
// prosemirror
|
|
150
158
|
prosemirror: {
|
|
@@ -166,10 +174,10 @@ const l = {
|
|
|
166
174
|
loading: "Đang tải PDF...",
|
|
167
175
|
loadFailed: "Không thể tải PDF",
|
|
168
176
|
invalidPdf: "Tệp PDF không hợp lệ",
|
|
169
|
-
pageOutOfRange: (n,
|
|
177
|
+
pageOutOfRange: (n, e) => `Trang ${n} nằm ngoài phạm vi (1-${e})`,
|
|
170
178
|
renderFailed: "Không thể hiển thị trang PDF"
|
|
171
179
|
}
|
|
172
180
|
};
|
|
173
181
|
export {
|
|
174
|
-
|
|
182
|
+
c as default
|
|
175
183
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-Cy9hoMGV.cjs"),l={loadingExtended:"Đang tải, vui lòng đợi",loadingShort:"Đang tải...",locale:"Ngôn ngữ",iconDescription:"Biểu tượng",loadingIcon:"Biểu tượng tải",failedToLoadIcon:"Không thể tải biểu tượng",editLabel:"Chỉnh sửa",selectOne:"Chọn một",selectNone:"Không có",selectMany:"Chọn nhiều",noResults:"Không có kết quả",passwordPlaceholderText:"Mật khẩu bí mật",togglePasswordVisibility:"Chuyển đổi hiển thị mật khẩu",toggleMenu:"Chuyển đổi menu",toggleAside:"Chuyển đổi bảng bên",mainNavigation:"Điều hướng chính",sidebar:"Thanh bên",closeDrawer:"Đóng ngăn kéo",closeModal:"Đóng modal",confirm:"Xác nhận",cancel:"Hủy",addLabel:"Thêm",removeItem:"Xóa mục",currentLocale:"Tiếng Việt",ar:"Tiếng Ả Rập",de:"Tiếng Đức",en:"Tiếng Anh",es:"Tiếng Tây Ban Nha",fr:"Tiếng Pháp",hi:"Tiếng Hindi",it:"Tiếng Ý",ja:"Tiếng Nhật",ko:"Tiếng Hàn",nl:"Tiếng Hà Lan",pl:"Tiếng Ba Lan",pt:"Tiếng Bồ Đào Nha",ru:"Tiếng Nga",tr:"Tiếng Thổ Nhĩ Kỳ",vi:"Tiếng Việt",zh:"Tiếng Trung",he:"Tiếng Do Thái",fa:"Tiếng Ba Tư",ur:"Tiếng Urdu",emailPlaceholderText:"Nhập email của bạn",incrementValue:"Tăng giá trị",decrementValue:"Giảm giá trị",dropZoneInstructions:n=>n?"Nhấp để chọn hoặc kéo tệp vào đây, hoặc nhấn Enter hoặc Space để mở trình chọn tệp":"Kéo tệp vào đây",fileSizeUnits:["Byte","KB","MB","GB","TB"],removeFile:"Xóa tệp",clearAllFiles:"Xóa tất cả tệp",clearValue:"Xóa giá trị",unknownType:"Loại không xác định",filesInputInstructions:(n,e,i)=>{let o=n==null||n>1?"Nhấp để chọn hoặc kéo tệp vào đây":"Nhấp để chọn hoặc kéo một tệp vào đây";if(n||e){const t=[];if(n!=null&&n>1&&t.push(`tối đa ${n} tệp`),e&&i){const h=a.formatFileSize(e,{units:i});t.push(`mỗi tệp tối đa ${h}`)}t.length>0&&(o+=` (${t.join(", ")})`)}return o},paginationLabel:"Phân trang",firstPage:"Trang đầu",previousPage:"Trang trước",nextPage:"Trang tiếp",lastPage:"Trang cuối",breadcrumbs:"Thanh điều hướng",commandPalette:"Bảng lệnh",typeACommand:"Nhập lệnh...",noResultsFound:"Không tìm thấy kết quả",noMatchingCommands:"Không có lệnh phù hợp",appearanceSystem:"Hệ thống",appearanceLight:"Sáng",appearanceDark:"Tối",ok:"OK",changeTypeConfirmation:"Thay đổi loại sẽ xóa giá trị hiện tại. Tiếp tục?",notifications:"Thông báo",markAllAsRead:"Đánh dấu tất cả đã đọc",noNotifications:"Không có thông báo",schemaConflictsDetected:"Phát hiện xung đột lược đồ",schemaViolationsDetected:"Phát hiện vi phạm lược đồ",properties:"Thuộc tính",uploading:"Đang tải lên...",dropFilesOrBrowse:"Kéo thả tệp vào đây hoặc nhấp để duyệt",acceptedTypes:n=>`Loại tệp được chấp nhận: ${n}`,enterUrlPrompt:"Nhập URL:",exceeded:"(vượt quá)",pdfPreview:"Xem trước PDF",lexical:{fontFamily:"Phông chữ",fontSize:"Cỡ chữ",fontColor:"Màu chữ",highlightColor:"Màu đánh dấu",backgroundColor:"Màu nền",bold:"Đậm",italic:"Nghiêng",underline:"Gạch chân",strikethrough:"Gạch ngang",code:"Mã",clearFormatting:"Xóa định dạng",normal:"Bình thường",heading:n=>`Tiêu đề ${n}`,bulletList:"Danh sách dấu đầu dòng",orderedList:"Danh sách đánh số",checkList:"Danh sách kiểm tra",indent:"Thụt lề",outdent:"Giảm thụt lề",blockquote:"Trích dẫn",codeBlock:"Khối mã",horizontalRule:"Đường kẻ ngang",insertTable:"Chèn bảng",link:"Liên kết",undo:"Hoàn tác",redo:"Làm lại",cut:"Cắt",copy:"Sao chép",paste:"Dán",defaultOption:"Mặc định",slashCommands:"Lệnh gạch chéo",noCommandsFound:"Không tìm thấy lệnh",changeBlockType:"Đổi loại khối",blockTypes:"Loại khối",enterUrl:"Nhập URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:n=>`Heading ${n}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Đang tải PDF...",loadFailed:"Không thể tải PDF",invalidPdf:"Tệp PDF không hợp lệ",pageOutOfRange:(n,e)=>`Trang ${n} nằm ngoài phạm vi (1-${e})`,renderFailed:"Không thể hiển thị trang PDF"}};exports.default=l;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Value as p, prop as rt, computedOf as D, html as k, attr as u, svg as tt, svgAttr as Y, Empty as A, on as M, When as W, Fragment as j, aria as N, emitValue as Z, Use as lt, input as ot, emitValueAsNullableDate as et, emitValueAsNullableDateTime as nt, Repeat as ut, style as pt, emit as dt, emitValueAsNumber as V } from "@tempots/dom";
|
|
2
|
-
import { F as ht, N as z, T as gt, U as ft, a as mt } from "./deep-merge-
|
|
2
|
+
import { F as ht, N as z, T as gt, U as ft, a as mt } from "./deep-merge-BdRgguFO.js";
|
|
3
3
|
import { $ as bt } from "./string-DYyMxBl-.js";
|
|
4
|
-
import { I as E } from "./input-container-
|
|
5
|
-
import { C as U, T as wt } from "./text-input-
|
|
6
|
-
import { B as yt, I as q, b as st, a as It } from "./translations-
|
|
4
|
+
import { I as E } from "./input-container-9r1F3KuX.js";
|
|
5
|
+
import { C as U, T as wt } from "./text-input-BgPx8BbG.js";
|
|
6
|
+
import { B as yt, I as q, b as st, a as It } from "./translations-CiBhB2FV.js";
|
|
7
7
|
import { AutoSelect as Mt } from "@tempots/ui";
|
|
8
|
-
import { E as $t, P as xt } from "./notice-
|
|
8
|
+
import { E as $t, P as xt } from "./notice-CZuh-h6a.js";
|
|
9
9
|
import { s as _t } from "./session-id-3KiilioY.js";
|
|
10
10
|
import { r as kt } from "./utils-DEbsp9Q9.js";
|
|
11
11
|
function it(t) {
|
|
@@ -447,7 +447,22 @@ const ce = (t) => {
|
|
|
447
447
|
t.after
|
|
448
448
|
)
|
|
449
449
|
});
|
|
450
|
-
},
|
|
450
|
+
}, at = (t) => typeof t == "string" && t.trim() === "" ? null : t, Ht = (t) => t ?? "";
|
|
451
|
+
function L(t) {
|
|
452
|
+
return (e) => {
|
|
453
|
+
const { value: s, onBlur: n, onChange: r, onInput: a, after: o, disabled: i, ...c } = e, l = z(s, i, r ?? a);
|
|
454
|
+
return t({
|
|
455
|
+
...c,
|
|
456
|
+
disabled: i,
|
|
457
|
+
value: p.map(s, Ht),
|
|
458
|
+
onChange: r != null ? (d) => r(at(d)) : void 0,
|
|
459
|
+
onInput: a != null ? (d) => a(at(d)) : void 0,
|
|
460
|
+
onBlur: n,
|
|
461
|
+
after: o != null ? j(l, o) : l
|
|
462
|
+
});
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
const le = ({
|
|
451
466
|
startEditing: t,
|
|
452
467
|
value: e,
|
|
453
468
|
onChange: s,
|
|
@@ -524,11 +539,11 @@ const ce = (t) => {
|
|
|
524
539
|
),
|
|
525
540
|
after: a != null ? j(i, a) : i
|
|
526
541
|
});
|
|
527
|
-
},
|
|
542
|
+
}, jt = (t) => {
|
|
528
543
|
const e = t.getFullYear(), s = t.getMonth() + 1, n = t.getDate(), r = t.getHours(), a = t.getMinutes(), o = t.getSeconds();
|
|
529
544
|
return `${e}-${s.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${r.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}`;
|
|
530
545
|
}, pe = (t) => {
|
|
531
|
-
const { value: e, onBlur: s, onChange: n, onInput: r, after: a, disabled: o } = t, i = p.map(e, (l) => l != null ?
|
|
546
|
+
const { value: e, onBlur: s, onChange: n, onInput: r, after: a, disabled: o } = t, i = p.map(e, (l) => l != null ? jt(l) : null), c = z(e, o, n ?? r);
|
|
532
547
|
return E({
|
|
533
548
|
...t,
|
|
534
549
|
input: ot["datetime-local"](
|
|
@@ -541,22 +556,7 @@ const ce = (t) => {
|
|
|
541
556
|
),
|
|
542
557
|
after: a != null ? j(c, a) : c
|
|
543
558
|
});
|
|
544
|
-
},
|
|
545
|
-
function L(t) {
|
|
546
|
-
return (e) => {
|
|
547
|
-
const { value: s, onBlur: n, onChange: r, onInput: a, after: o, disabled: i, ...c } = e, l = z(s, i, r ?? a);
|
|
548
|
-
return t({
|
|
549
|
-
...c,
|
|
550
|
-
disabled: i,
|
|
551
|
-
value: p.map(s, jt),
|
|
552
|
-
onChange: r != null ? (d) => r(at(d)) : void 0,
|
|
553
|
-
onInput: a != null ? (d) => a(at(d)) : void 0,
|
|
554
|
-
onBlur: n,
|
|
555
|
-
after: o != null ? j(l, o) : l
|
|
556
|
-
});
|
|
557
|
-
};
|
|
558
|
-
}
|
|
559
|
-
const de = L($t), he = L(wt), ge = L(xt), fe = L(
|
|
559
|
+
}, de = L($t), he = L(wt), ge = L(xt), fe = L(
|
|
560
560
|
gt
|
|
561
561
|
), me = ({
|
|
562
562
|
value: t,
|
|
@@ -1028,7 +1028,7 @@ export {
|
|
|
1028
1028
|
ke as n,
|
|
1029
1029
|
xe as o,
|
|
1030
1030
|
at as p,
|
|
1031
|
-
|
|
1031
|
+
Ht as q,
|
|
1032
1032
|
re as r,
|
|
1033
1033
|
it as s,
|
|
1034
1034
|
At as t,
|