@kubex/zinc 1.1.64 → 1.1.66
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/custom-elements.json +255 -27
- package/dist/vscode.html-custom-data.json +13 -3
- package/dist/web-types.json +44 -5
- package/dist/zn.d.ts +47 -11
- package/dist/zn.min.js +447 -394
- package/docs/pages/components/remarkd-editor.md +25 -9
- package/package.json +2 -2
- package/src/components/data-table/data-table.component.ts +16 -10
- package/src/components/data-table/data-table.test.ts +24 -0
- package/src/components/page-builder/page-builder.component.ts +118 -54
- package/src/components/query-builder/query-builder.component.ts +2 -1
- package/src/components/remarkd-editor/remarkd-editor.component.ts +240 -55
- package/src/components/remarkd-editor/remarkd-editor.scss +106 -3
- package/src/components/remarkd-editor/remarkd-editor.test.ts +40 -6
- package/web-test-runner.config.js +2 -2
package/dist/zn.d.ts
CHANGED
|
@@ -3578,6 +3578,7 @@ declare module "components/data-table/data-table.component" {
|
|
|
3578
3578
|
selectAllButton: ZnButton;
|
|
3579
3579
|
private _initialLoad;
|
|
3580
3580
|
private _hasLoadedData;
|
|
3581
|
+
private _lastLoadHadRows;
|
|
3581
3582
|
private _lastTableContent;
|
|
3582
3583
|
private readonly resizeObserver;
|
|
3583
3584
|
private page;
|
|
@@ -8711,9 +8712,7 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8711
8712
|
* @dependency zn-button
|
|
8712
8713
|
* @dependency zn-button-group
|
|
8713
8714
|
* @dependency zn-icon
|
|
8714
|
-
* @dependency zn-dialog
|
|
8715
8715
|
* @dependency zn-file
|
|
8716
|
-
* @dependency zn-input
|
|
8717
8716
|
*
|
|
8718
8717
|
* @event zn-input - Emitted on each keystroke while editing a block.
|
|
8719
8718
|
* @event zn-change - Emitted when a block edit is committed and the value changes.
|
|
@@ -8724,6 +8723,7 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8724
8723
|
* @csspart rendered - The rendered remarkd output of a block.
|
|
8725
8724
|
* @csspart input - The textarea shown while editing a block.
|
|
8726
8725
|
* @csspart slash-menu - The context menu opened by typing "/" in a block.
|
|
8726
|
+
* @csspart image-controls - The caption / alignment / size panel shown when an image block is clicked.
|
|
8727
8727
|
*/
|
|
8728
8728
|
export default class ZnRemarkdEditor extends ZincElement implements ZincFormControl {
|
|
8729
8729
|
static styles: CSSResultGroup;
|
|
@@ -8737,11 +8737,11 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8737
8737
|
private slashMenuOpen;
|
|
8738
8738
|
private slashQuery;
|
|
8739
8739
|
private slashActiveIndex;
|
|
8740
|
-
private
|
|
8740
|
+
private imagePickerIndex;
|
|
8741
|
+
private imageEdit;
|
|
8741
8742
|
private dropIndicator;
|
|
8742
8743
|
private dragIndex;
|
|
8743
8744
|
private editShell;
|
|
8744
|
-
private imageInsertIndex;
|
|
8745
8745
|
private pendingDragHandle;
|
|
8746
8746
|
private dragStartX;
|
|
8747
8747
|
private dragStartY;
|
|
@@ -8755,10 +8755,9 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8755
8755
|
/** Placeholder shown when the document is empty. */
|
|
8756
8756
|
placeholder: string;
|
|
8757
8757
|
/**
|
|
8758
|
-
* Endpoint for image uploads. Posting the file
|
|
8759
|
-
* `{uploadPath, uploadUrl}`; the file is then PUT
|
|
8760
|
-
* `
|
|
8761
|
-
* prompts for a URL instead.
|
|
8758
|
+
* Endpoint for image uploads — required for image support. Posting the file
|
|
8759
|
+
* metadata here must return `{uploadPath, uploadUrl}`; the file is then PUT
|
|
8760
|
+
* to `uploadUrl` and the returned `uploadPath` is embedded as the image URL.
|
|
8762
8761
|
*/
|
|
8763
8762
|
attachmentUrl: string;
|
|
8764
8763
|
/** Makes the editor required for form submission. */
|
|
@@ -8789,8 +8788,17 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8789
8788
|
private closesFence;
|
|
8790
8789
|
private updateBlocks;
|
|
8791
8790
|
private handleRenderedClick;
|
|
8791
|
+
/** Parses a block that is purely an image (with optional caption/align lines). */
|
|
8792
|
+
private parseImageBlock;
|
|
8793
|
+
private serializeImageBlock;
|
|
8792
8794
|
private toggleCheckbox;
|
|
8793
8795
|
private startEdit;
|
|
8796
|
+
private updateImageEdit;
|
|
8797
|
+
private saveImageEdit;
|
|
8798
|
+
private closeImageEdit;
|
|
8799
|
+
private deleteImageBlock;
|
|
8800
|
+
private editImageSource;
|
|
8801
|
+
private handleImageControlsKeydown;
|
|
8794
8802
|
/**
|
|
8795
8803
|
* The remarkd chrome the editing block should keep, derived from its first
|
|
8796
8804
|
* line — so a NOTE still looks like a note while its source is edited.
|
|
@@ -8798,6 +8806,7 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8798
8806
|
private computeEditShell;
|
|
8799
8807
|
private focusInput;
|
|
8800
8808
|
private addBlockAt;
|
|
8809
|
+
private deleteBlock;
|
|
8801
8810
|
/** Inserts a draft block — committed (or dropped, if left empty) on blur. */
|
|
8802
8811
|
private insertDraftBlock;
|
|
8803
8812
|
/**
|
|
@@ -8824,16 +8833,19 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8824
8833
|
private createDragGhost;
|
|
8825
8834
|
private moveDragGhost;
|
|
8826
8835
|
private pickImage;
|
|
8827
|
-
private
|
|
8828
|
-
private
|
|
8836
|
+
private closeImagePicker;
|
|
8837
|
+
private handleImagePicked;
|
|
8829
8838
|
private insertImage;
|
|
8830
8839
|
private uploadImage;
|
|
8831
8840
|
private autosize;
|
|
8832
8841
|
private handleToolbarInsert;
|
|
8833
8842
|
private renderSlashMenu;
|
|
8843
|
+
private renderImageControls;
|
|
8834
8844
|
private renderBlock;
|
|
8835
8845
|
render(): import("lit-html").TemplateResult<1>;
|
|
8836
|
-
|
|
8846
|
+
/** The block views, with the inline image picker spliced in when active. */
|
|
8847
|
+
private renderBody;
|
|
8848
|
+
private renderImagePicker;
|
|
8837
8849
|
}
|
|
8838
8850
|
}
|
|
8839
8851
|
declare module "components/remarkd-editor/index" {
|
|
@@ -10152,6 +10164,11 @@ declare module "components/page-builder/page-builder.component" {
|
|
|
10152
10164
|
'zn-page-palette-item': typeof ZnPagePaletteItem;
|
|
10153
10165
|
'zn-page-section-card': typeof ZnPageSectionCard;
|
|
10154
10166
|
};
|
|
10167
|
+
private readonly formControlController;
|
|
10168
|
+
/** The name of the control, submitted as a name/value pair with form data. */
|
|
10169
|
+
name: string;
|
|
10170
|
+
/** Associates the control with a form by id. The form must be in the same document or shadow root. */
|
|
10171
|
+
form: string;
|
|
10155
10172
|
/** The page state as a JSON string. Parsed on set; invalid JSON is ignored with a warning. */
|
|
10156
10173
|
config: string;
|
|
10157
10174
|
heading: string;
|
|
@@ -10188,6 +10205,24 @@ declare module "components/page-builder/page-builder.component" {
|
|
|
10188
10205
|
get state(): PageState;
|
|
10189
10206
|
/** Replaces the page state wholesale (does not emit zn-page-change). */
|
|
10190
10207
|
set state(next: PageState);
|
|
10208
|
+
/** The page state as a JSON string — the value submitted with form data. */
|
|
10209
|
+
get value(): string;
|
|
10210
|
+
/** Replaces the page state from a JSON string (does not emit zn-page-change). */
|
|
10211
|
+
set value(next: string);
|
|
10212
|
+
/** The serialised state of the last externally loaded page — restored on form reset. */
|
|
10213
|
+
defaultValue: string;
|
|
10214
|
+
/** Gets the validity state object. */
|
|
10215
|
+
get validity(): ValidityState;
|
|
10216
|
+
/** Gets the validation message. */
|
|
10217
|
+
get validationMessage(): string;
|
|
10218
|
+
/** Checks for validity but does not show a validation message. */
|
|
10219
|
+
checkValidity(): boolean;
|
|
10220
|
+
/** Gets the associated form, if one exists. */
|
|
10221
|
+
getForm(): HTMLFormElement | null;
|
|
10222
|
+
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
10223
|
+
reportValidity(): boolean;
|
|
10224
|
+
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
10225
|
+
setCustomValidity(_message?: string): void;
|
|
10191
10226
|
handleConfigChange(): void;
|
|
10192
10227
|
handleSectionTypesChange(): void;
|
|
10193
10228
|
registerSectionType(type: PageSectionType): this;
|
|
@@ -10229,6 +10264,7 @@ declare module "components/page-builder/page-builder.component" {
|
|
|
10229
10264
|
*/
|
|
10230
10265
|
private _offerRestoreIfNewer;
|
|
10231
10266
|
protected willUpdate(changed: PropertyValues): void;
|
|
10267
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
10232
10268
|
private _typeFromTemplate;
|
|
10233
10269
|
private _registerSlottedTemplates;
|
|
10234
10270
|
/** Normalises and installs an externally provided state; resets selection. */
|