@lucca-front/ng 20.2.3-rc.1 → 20.2.4-rc.1
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/fesm2022/lucca-front-ng-callout.mjs +4 -4
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-department.mjs +3 -0
- package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +2 -0
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-formly.mjs +88 -154
- package/fesm2022/lucca-front-ng-formly.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +72 -14
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +2 -2
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tag.mjs +2 -2
- package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs +2 -2
- package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
- package/formly/index.d.ts +102 -109
- package/forms/rich-text-input/index.d.ts +24 -6
- package/package.json +11 -11
|
@@ -36,8 +36,8 @@ class TreeSelectDirective {
|
|
|
36
36
|
node: item,
|
|
37
37
|
children: [],
|
|
38
38
|
};
|
|
39
|
-
// Parent null means it's a root element
|
|
40
|
-
if (parent
|
|
39
|
+
// Parent null or undefined means it's a root element
|
|
40
|
+
if (!parent) {
|
|
41
41
|
res.push(itemNode);
|
|
42
42
|
itemToNode.set(item, itemNode);
|
|
43
43
|
handled.push(item);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-tree-select.mjs","sources":["../../../packages/ng/tree-select/tree-select.directive.ts","../../../packages/ng/tree-select/tree-branch/tree-branch.component.ts","../../../packages/ng/tree-select/tree-branch/tree-branch.component.html","../../../packages/ng/tree-select/lucca-front-ng-tree-select.ts"],"sourcesContent":["import { Directive, inject, input, linkedSignal } from '@angular/core';\nimport { ALuSelectInputComponent, TreeGenerator, TreeGroupingFn, TreeNode } from '@lucca-front/ng/core-select';\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[treeSelect],lu-multi-select[treeSelect]',\n\tstandalone: true,\n})\nexport class TreeSelectDirective<T, V> implements TreeGenerator<T, TreeNode<T>> {\n\t#select = inject<ALuSelectInputComponent<T, V>>(ALuSelectInputComponent);\n\n\tgroupingFnInput = input.required<TreeGroupingFn<T>>({ alias: 'treeSelect' });\n\n\tgroupingFn = linkedSignal(() => this.groupingFnInput());\n\n\tconstructor() {\n\t\tthis.#select.treeGenerator = this;\n\t}\n\n\tgenerateTrees(items: T[]): TreeNode<T>[] {\n\t\tconst res: TreeNode<T>[] = [];\n\t\t// Keep a registry of what has been handled already\n\t\tconst itemToNode = new Map<T, TreeNode<T>>();\n\t\tconst parentCache = new Map<T, T | null>();\n\t\tconst handled: T[] = [];\n\t\t// While we haven't handled all the items\n\t\twhile (items.length > handled.length) {\n\t\t\tfor (const item of items) {\n\t\t\t\tif (itemToNode.has(item)) {\n\t\t\t\t\t// item already in resultset\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlet parent: T | null;\n\t\t\t\tif (parentCache.has(item)) {\n\t\t\t\t\tparent = parentCache.get(item);\n\t\t\t\t} else {\n\t\t\t\t\tparent = this.groupingFn()(item, items);\n\t\t\t\t\tparentCache.set(item, parent);\n\t\t\t\t}\n\t\t\t\tconst itemNode: TreeNode<T> = {\n\t\t\t\t\tnode: item,\n\t\t\t\t\tchildren: [],\n\t\t\t\t};\n\t\t\t\t// Parent null means it's a root element\n\t\t\t\tif (parent === null) {\n\t\t\t\t\tres.push(itemNode);\n\t\t\t\t\titemToNode.set(item, itemNode);\n\t\t\t\t\thandled.push(item);\n\t\t\t\t} else {\n\t\t\t\t\t// If the parent is already in the resultset, we can add this\n\t\t\t\t\tif (itemToNode.has(parent)) {\n\t\t\t\t\t\titemToNode.get(parent).children.push(itemNode);\n\t\t\t\t\t\titemToNode.set(item, itemNode);\n\t\t\t\t\t\thandled.push(item);\n\t\t\t\t\t}\n\t\t\t\t\t// Else, we fizzle till the next iteration\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n}\n","import { booleanAttribute, ChangeDetectionStrategy, Component, inject, input, output, TemplateRef, Type, viewChild, ViewEncapsulation } from '@angular/core';\nimport { ALuSelectInputComponent, LuIsOptionSelectedPipe, LuOptionComparer, LuOptionContext, TreeNode, ɵCoreSelectPanelElement, ɵLuOptionComponent } from '@lucca-front/ng/core-select';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\n@Component({\n\tselector: 'lu-tree-branch',\n\timports: [ɵCoreSelectPanelElement, LuIsOptionSelectedPipe, ɵLuOptionComponent],\n\ttemplateUrl: './tree-branch.component.html',\n\tstyleUrl: './tree-branch.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TreeBranchComponent<T> {\n\tselectInputComponent = inject(ALuSelectInputComponent);\n\n\trootOptionRef = viewChild<ɵCoreSelectPanelElement<T>>('rootOption');\n\n\tbranch = input.required<TreeNode<T>>();\n\n\toptionTpl = input.required<TemplateRef<LuOptionContext<T>> | Type<unknown> | undefined>();\n\n\toptionIndex = input.required({ transform: (value: string | number) => `${value}` });\n\n\toptionComparer = input.required<LuOptionComparer<T>>();\n\n\tselectedOptions = input<T[]>([]);\n\n\ttoggleOne = output<T>();\n\n\tselectMany = output<T[]>();\n\n\tunselectMany = output<T[]>();\n\n\tsimpleMode = input(false, { transform: booleanAttribute });\n\n\tdepth = input(1);\n\n\tconstructor() {\n\t\tif (this.selectInputComponent.selectChildren$) {\n\t\t\tthis.selectInputComponent.selectChildren$.pipe(takeUntilDestroyed()).subscribe(() => {\n\t\t\t\tif (this.rootOptionRef().isHighlighted()) {\n\t\t\t\t\tthis.selectOnlyChildren(this.branch());\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.selectInputComponent.selectParent$.pipe(takeUntilDestroyed()).subscribe(() => {\n\t\t\t\tif (this.rootOptionRef().isHighlighted()) {\n\t\t\t\t\tthis.toggleOne.emit(this.branch().node);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\ttoggle(branchData: TreeNode<T>): void {\n\t\tif (this.simpleMode() || branchData.children.length === 0) {\n\t\t\tthis.toggleOne.emit(branchData.node);\n\t\t} else {\n\t\t\tconst flatOptions = this.flattenTree(branchData);\n\t\t\tconst options = flatOptions.filter((option) => !this.selectedOptions().some((so) => this.optionComparer()(so, option)));\n\t\t\tif (options.length > 0) {\n\t\t\t\tthis.selectMany.emit(options);\n\t\t\t} else {\n\t\t\t\tthis.unselectMany.emit(flatOptions);\n\t\t\t}\n\t\t}\n\t}\n\n\tselectOnlyChildren(branchData: TreeNode<T>): void {\n\t\tconst flatOptions = this.flattenTree(branchData, true);\n\t\tconst options = flatOptions.filter((option) => !this.selectedOptions().some((so) => this.optionComparer()(so, option)));\n\t\tif (options.length > 0) {\n\t\t\tthis.selectMany.emit(options);\n\t\t} else {\n\t\t\tthis.unselectMany.emit(flatOptions);\n\t\t}\n\t}\n\n\tflattenTree(branch: TreeNode<T>, excludeRoot = false): T[] {\n\t\tconst result: T[] = excludeRoot ? [] : [branch.node];\n\t\tif (branch.children.length > 0) {\n\t\t\tresult.push(...branch.children.map((child) => this.flattenTree(child)).flat());\n\t\t}\n\t\treturn result;\n\t}\n}\n","<lu-select-option\n\tluCoreSelectPanelElement\n\t#rootOption=\"luCoreSelectPanelElement\"\n\t[style.--components-treeBranch-level]=\"depth()\"\n\t[option]=\"branch().node\"\n\t[optionTpl]=\"optionTpl()\"\n\t[optionIndex]=\"optionIndex()\"\n\t[scrollIntoViewOptions]=\"{ block: 'nearest' }\"\n\t[isSelected]=\"branch().node | luIsOptionSelected: optionComparer() : selectedOptions()\"\n\t(selected)=\"toggle(branch())\"\n\t(click)=\"toggle(branch())\"\n\t(onlyParent)=\"toggleOne.emit(branch().node)\"\n\t(onlyChildren)=\"selectOnlyChildren(branch())\"\n\t[hasChildren]=\"!simpleMode() && branch().children?.length > 0\"\n/>\n@for (child of branch().children; track $index) {\n\t<lu-tree-branch\n\t\t[depth]=\"depth() + 1\"\n\t\t[branch]=\"child\"\n\t\t[optionTpl]=\"optionTpl()\"\n\t\t[optionIndex]=\"optionIndex() + '-' + $index\"\n\t\t[optionComparer]=\"optionComparer()\"\n\t\t[selectedOptions]=\"selectedOptions()\"\n\t\t[simpleMode]=\"simpleMode()\"\n\t\t(toggleOne)=\"toggleOne.emit($event)\"\n\t\t(selectMany)=\"selectMany.emit($event)\"\n\t\t(unselectMany)=\"unselectMany.emit($event)\"\n\t/>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵCoreSelectPanelElement","ɵLuOptionComponent"],"mappings":";;;;;MAQa,mBAAmB,CAAA;AAC/B,IAAA,OAAO;AAMP,IAAA,WAAA,GAAA;AANA,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAgC,uBAAuB,CAAC;QAExE,IAAe,CAAA,eAAA,GAAG,KAAK,CAAC,QAAQ,CAAoB,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QAE5E,IAAU,CAAA,UAAA,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;AAGtD,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,IAAI;;AAGlC,IAAA,aAAa,CAAC,KAAU,EAAA;QACvB,MAAM,GAAG,GAAkB,EAAE;;AAE7B,QAAA,MAAM,UAAU,GAAG,IAAI,GAAG,EAAkB;AAC5C,QAA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,EAAA;;;AEVhD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-tree-select.mjs","sources":["../../../packages/ng/tree-select/tree-select.directive.ts","../../../packages/ng/tree-select/tree-branch/tree-branch.component.ts","../../../packages/ng/tree-select/tree-branch/tree-branch.component.html","../../../packages/ng/tree-select/lucca-front-ng-tree-select.ts"],"sourcesContent":["import { Directive, inject, input, linkedSignal } from '@angular/core';\nimport { ALuSelectInputComponent, TreeGenerator, TreeGroupingFn, TreeNode } from '@lucca-front/ng/core-select';\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[treeSelect],lu-multi-select[treeSelect]',\n\tstandalone: true,\n})\nexport class TreeSelectDirective<T, V> implements TreeGenerator<T, TreeNode<T>> {\n\t#select = inject<ALuSelectInputComponent<T, V>>(ALuSelectInputComponent);\n\n\tgroupingFnInput = input.required<TreeGroupingFn<T>>({ alias: 'treeSelect' });\n\n\tgroupingFn = linkedSignal(() => this.groupingFnInput());\n\n\tconstructor() {\n\t\tthis.#select.treeGenerator = this;\n\t}\n\n\tgenerateTrees(items: T[]): TreeNode<T>[] {\n\t\tconst res: TreeNode<T>[] = [];\n\t\t// Keep a registry of what has been handled already\n\t\tconst itemToNode = new Map<T, TreeNode<T>>();\n\t\tconst parentCache = new Map<T, T | null>();\n\t\tconst handled: T[] = [];\n\t\t// While we haven't handled all the items\n\t\twhile (items.length > handled.length) {\n\t\t\tfor (const item of items) {\n\t\t\t\tif (itemToNode.has(item)) {\n\t\t\t\t\t// item already in resultset\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlet parent: T | null;\n\t\t\t\tif (parentCache.has(item)) {\n\t\t\t\t\tparent = parentCache.get(item);\n\t\t\t\t} else {\n\t\t\t\t\tparent = this.groupingFn()(item, items);\n\t\t\t\t\tparentCache.set(item, parent);\n\t\t\t\t}\n\t\t\t\tconst itemNode: TreeNode<T> = {\n\t\t\t\t\tnode: item,\n\t\t\t\t\tchildren: [],\n\t\t\t\t};\n\t\t\t\t// Parent null or undefined means it's a root element\n\t\t\t\tif (!parent) {\n\t\t\t\t\tres.push(itemNode);\n\t\t\t\t\titemToNode.set(item, itemNode);\n\t\t\t\t\thandled.push(item);\n\t\t\t\t} else {\n\t\t\t\t\t// If the parent is already in the resultset, we can add this\n\t\t\t\t\tif (itemToNode.has(parent)) {\n\t\t\t\t\t\titemToNode.get(parent).children.push(itemNode);\n\t\t\t\t\t\titemToNode.set(item, itemNode);\n\t\t\t\t\t\thandled.push(item);\n\t\t\t\t\t}\n\t\t\t\t\t// Else, we fizzle till the next iteration\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n}\n","import { booleanAttribute, ChangeDetectionStrategy, Component, inject, input, output, TemplateRef, Type, viewChild, ViewEncapsulation } from '@angular/core';\nimport { ALuSelectInputComponent, LuIsOptionSelectedPipe, LuOptionComparer, LuOptionContext, TreeNode, ɵCoreSelectPanelElement, ɵLuOptionComponent } from '@lucca-front/ng/core-select';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\n@Component({\n\tselector: 'lu-tree-branch',\n\timports: [ɵCoreSelectPanelElement, LuIsOptionSelectedPipe, ɵLuOptionComponent],\n\ttemplateUrl: './tree-branch.component.html',\n\tstyleUrl: './tree-branch.component.scss',\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TreeBranchComponent<T> {\n\tselectInputComponent = inject(ALuSelectInputComponent);\n\n\trootOptionRef = viewChild<ɵCoreSelectPanelElement<T>>('rootOption');\n\n\tbranch = input.required<TreeNode<T>>();\n\n\toptionTpl = input.required<TemplateRef<LuOptionContext<T>> | Type<unknown> | undefined>();\n\n\toptionIndex = input.required({ transform: (value: string | number) => `${value}` });\n\n\toptionComparer = input.required<LuOptionComparer<T>>();\n\n\tselectedOptions = input<T[]>([]);\n\n\ttoggleOne = output<T>();\n\n\tselectMany = output<T[]>();\n\n\tunselectMany = output<T[]>();\n\n\tsimpleMode = input(false, { transform: booleanAttribute });\n\n\tdepth = input(1);\n\n\tconstructor() {\n\t\tif (this.selectInputComponent.selectChildren$) {\n\t\t\tthis.selectInputComponent.selectChildren$.pipe(takeUntilDestroyed()).subscribe(() => {\n\t\t\t\tif (this.rootOptionRef().isHighlighted()) {\n\t\t\t\t\tthis.selectOnlyChildren(this.branch());\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.selectInputComponent.selectParent$.pipe(takeUntilDestroyed()).subscribe(() => {\n\t\t\t\tif (this.rootOptionRef().isHighlighted()) {\n\t\t\t\t\tthis.toggleOne.emit(this.branch().node);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\ttoggle(branchData: TreeNode<T>): void {\n\t\tif (this.simpleMode() || branchData.children.length === 0) {\n\t\t\tthis.toggleOne.emit(branchData.node);\n\t\t} else {\n\t\t\tconst flatOptions = this.flattenTree(branchData);\n\t\t\tconst options = flatOptions.filter((option) => !this.selectedOptions().some((so) => this.optionComparer()(so, option)));\n\t\t\tif (options.length > 0) {\n\t\t\t\tthis.selectMany.emit(options);\n\t\t\t} else {\n\t\t\t\tthis.unselectMany.emit(flatOptions);\n\t\t\t}\n\t\t}\n\t}\n\n\tselectOnlyChildren(branchData: TreeNode<T>): void {\n\t\tconst flatOptions = this.flattenTree(branchData, true);\n\t\tconst options = flatOptions.filter((option) => !this.selectedOptions().some((so) => this.optionComparer()(so, option)));\n\t\tif (options.length > 0) {\n\t\t\tthis.selectMany.emit(options);\n\t\t} else {\n\t\t\tthis.unselectMany.emit(flatOptions);\n\t\t}\n\t}\n\n\tflattenTree(branch: TreeNode<T>, excludeRoot = false): T[] {\n\t\tconst result: T[] = excludeRoot ? [] : [branch.node];\n\t\tif (branch.children.length > 0) {\n\t\t\tresult.push(...branch.children.map((child) => this.flattenTree(child)).flat());\n\t\t}\n\t\treturn result;\n\t}\n}\n","<lu-select-option\n\tluCoreSelectPanelElement\n\t#rootOption=\"luCoreSelectPanelElement\"\n\t[style.--components-treeBranch-level]=\"depth()\"\n\t[option]=\"branch().node\"\n\t[optionTpl]=\"optionTpl()\"\n\t[optionIndex]=\"optionIndex()\"\n\t[scrollIntoViewOptions]=\"{ block: 'nearest' }\"\n\t[isSelected]=\"branch().node | luIsOptionSelected: optionComparer() : selectedOptions()\"\n\t(selected)=\"toggle(branch())\"\n\t(click)=\"toggle(branch())\"\n\t(onlyParent)=\"toggleOne.emit(branch().node)\"\n\t(onlyChildren)=\"selectOnlyChildren(branch())\"\n\t[hasChildren]=\"!simpleMode() && branch().children?.length > 0\"\n/>\n@for (child of branch().children; track $index) {\n\t<lu-tree-branch\n\t\t[depth]=\"depth() + 1\"\n\t\t[branch]=\"child\"\n\t\t[optionTpl]=\"optionTpl()\"\n\t\t[optionIndex]=\"optionIndex() + '-' + $index\"\n\t\t[optionComparer]=\"optionComparer()\"\n\t\t[selectedOptions]=\"selectedOptions()\"\n\t\t[simpleMode]=\"simpleMode()\"\n\t\t(toggleOne)=\"toggleOne.emit($event)\"\n\t\t(selectMany)=\"selectMany.emit($event)\"\n\t\t(unselectMany)=\"unselectMany.emit($event)\"\n\t/>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵCoreSelectPanelElement","ɵLuOptionComponent"],"mappings":";;;;;MAQa,mBAAmB,CAAA;AAC/B,IAAA,OAAO;AAMP,IAAA,WAAA,GAAA;AANA,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAgC,uBAAuB,CAAC;QAExE,IAAe,CAAA,eAAA,GAAG,KAAK,CAAC,QAAQ,CAAoB,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QAE5E,IAAU,CAAA,UAAA,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;AAGtD,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,IAAI;;AAGlC,IAAA,aAAa,CAAC,KAAU,EAAA;QACvB,MAA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AC,MAAM,EAAA,QAAA,EAAA,mlCAAA,EAAA,MAAA,EAAA,CAAA,suCAAA,CAAA,EAAA;;;AEVhD;;AAEG;;;;"}
|
package/formly/index.d.ts
CHANGED
|
@@ -1,139 +1,160 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { ViewContainerRef } from '@angular/core';
|
|
3
1
|
import * as _ngx_formly_core from '@ngx-formly/core';
|
|
4
|
-
import {
|
|
5
|
-
import * as
|
|
2
|
+
import { ConfigOption, FieldType, FieldTypeConfig, FormlyFieldConfig, FieldWrapper } from '@ngx-formly/core';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { EnvironmentProviders, ViewContainerRef } from '@angular/core';
|
|
6
5
|
import { FormControl } from '@angular/forms';
|
|
7
|
-
import * as i18 from '@angular/common';
|
|
8
|
-
import * as i20 from '@lucca-front/ng/select';
|
|
9
|
-
import * as i21 from '@lucca-front/ng/option';
|
|
10
|
-
import * as i22 from '@lucca-front/ng/user';
|
|
11
|
-
import * as i23 from '@lucca-front/ng/input';
|
|
12
|
-
import * as i24 from '@lucca-front/ng/api';
|
|
13
|
-
import * as i25 from '@lucca-front/ng/department';
|
|
14
|
-
import * as i26 from '@lucca-front/ng/establishment';
|
|
15
|
-
import * as i27 from '@lucca-front/ng/date';
|
|
16
6
|
|
|
17
|
-
declare
|
|
18
|
-
fieldComponent: ViewContainerRef;
|
|
19
|
-
get validationId(): string;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyWrapperError, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperError, "lu-formly-wrapper-error", never, {}, {}, never, never, false, never>;
|
|
22
|
-
}
|
|
23
|
-
declare class LuFormlyErrorMessage {
|
|
24
|
-
formControl?: FormControl;
|
|
25
|
-
field: FormlyFieldConfig;
|
|
26
|
-
get errorMessages(): string[];
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyErrorMessage, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyErrorMessage, "lu-formly-error-message", never, { "formControl": { "alias": "formControl"; "required": false; }; "field": { "alias": "field"; "required": false; }; }, {}, never, never, false, never>;
|
|
29
|
-
}
|
|
30
|
-
declare const templateErrorExtension: _ngx_formly_core.FormlyExtension<FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
|
|
31
|
-
[additionalProperties: string]: any;
|
|
32
|
-
}>>;
|
|
7
|
+
declare const LU_FORMLY_CONFIG: ConfigOption;
|
|
33
8
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
39
|
-
static
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated use provideLuFormly() in a lazy loaded route (and stop using formly please)
|
|
11
|
+
* */
|
|
12
|
+
declare class LuFormlyModule {
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyModule, never>;
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LuFormlyModule, never, never, never>;
|
|
15
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LuFormlyModule>;
|
|
40
16
|
}
|
|
41
17
|
|
|
42
|
-
declare
|
|
18
|
+
declare function provideLuFormly(): EnvironmentProviders;
|
|
19
|
+
|
|
20
|
+
declare class LuFormlyFieldApi extends FieldType<FieldTypeConfig> {
|
|
21
|
+
get _api(): string;
|
|
22
|
+
get _filters(): string[];
|
|
23
|
+
get _orderBy(): string;
|
|
24
|
+
get _sort(): string;
|
|
25
|
+
get _standard(): "v3" | "v4";
|
|
43
26
|
focus(): void;
|
|
44
27
|
blur(): void;
|
|
45
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
46
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyFieldApi, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyFieldApi, "lu-formly-field-api", never, {}, {}, never, never, true, never>;
|
|
47
30
|
}
|
|
48
31
|
|
|
49
|
-
declare class
|
|
32
|
+
declare class LuFormlyFieldCheckbox extends FieldType<FieldTypeConfig> {
|
|
50
33
|
focus(): void;
|
|
51
34
|
blur(): void;
|
|
52
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
53
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyFieldCheckbox, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyFieldCheckbox, "lu-formly-field-checkbox", never, {}, {}, never, never, true, never>;
|
|
54
37
|
}
|
|
55
38
|
|
|
56
|
-
declare class
|
|
57
|
-
get _options(): {
|
|
58
|
-
value: unknown;
|
|
59
|
-
label: unknown;
|
|
60
|
-
name: string;
|
|
61
|
-
}[];
|
|
39
|
+
declare class LuFormlyFieldDate extends FieldType<FieldTypeConfig> {
|
|
62
40
|
focus(): void;
|
|
63
41
|
blur(): void;
|
|
64
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
65
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyFieldDate, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyFieldDate, "lu-formly-field-date", never, {}, {}, never, never, true, never>;
|
|
66
44
|
}
|
|
67
45
|
|
|
68
|
-
declare class
|
|
46
|
+
declare class LuFormlyFieldDepartment extends FieldType<FieldTypeConfig> {
|
|
69
47
|
focus(): void;
|
|
70
48
|
blur(): void;
|
|
71
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
72
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyFieldDepartment, never>;
|
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyFieldDepartment, "lu-formly-field-department", never, {}, {}, never, never, true, never>;
|
|
73
51
|
}
|
|
74
52
|
|
|
75
|
-
declare class
|
|
76
|
-
get _api(): string;
|
|
77
|
-
get _filters(): string[];
|
|
78
|
-
get _orderBy(): string;
|
|
79
|
-
get _sort(): string;
|
|
80
|
-
get _standard(): "v3" | "v4";
|
|
53
|
+
declare class LuFormlyFieldEstablishment extends FieldType<FieldTypeConfig> {
|
|
81
54
|
focus(): void;
|
|
82
55
|
blur(): void;
|
|
83
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
84
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyFieldEstablishment, never>;
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyFieldEstablishment, "lu-formly-field-establishment", never, {}, {}, never, never, true, never>;
|
|
85
58
|
}
|
|
86
59
|
|
|
87
|
-
declare class
|
|
60
|
+
declare class LuFormlyFieldInput extends FieldType<FieldTypeConfig> {
|
|
61
|
+
get type(): string;
|
|
88
62
|
focus(): void;
|
|
89
63
|
blur(): void;
|
|
90
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
91
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyFieldInput, never>;
|
|
65
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyFieldInput, "lu-formly-field-input", never, {}, {}, never, never, true, never>;
|
|
92
66
|
}
|
|
93
67
|
|
|
94
|
-
declare class
|
|
68
|
+
declare class LuFormlyFieldRadios extends FieldType<FieldTypeConfig> {
|
|
69
|
+
get _options(): {
|
|
70
|
+
value: unknown;
|
|
71
|
+
label: unknown;
|
|
72
|
+
}[];
|
|
95
73
|
focus(): void;
|
|
96
74
|
blur(): void;
|
|
97
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
98
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
75
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyFieldRadios, never>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyFieldRadios, "lu-formly-field-radios", never, {}, {}, never, never, true, never>;
|
|
99
77
|
}
|
|
100
78
|
|
|
101
|
-
declare class
|
|
79
|
+
declare class LuFormlyFieldSelect extends FieldType<FieldTypeConfig> {
|
|
102
80
|
get _options(): {
|
|
103
81
|
value: unknown;
|
|
104
82
|
label: unknown;
|
|
83
|
+
name: string;
|
|
105
84
|
}[];
|
|
106
85
|
focus(): void;
|
|
107
86
|
blur(): void;
|
|
108
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
109
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyFieldSelect, never>;
|
|
88
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyFieldSelect, "lu-formly-field-select", never, {}, {}, never, never, true, never>;
|
|
110
89
|
}
|
|
111
90
|
|
|
112
|
-
declare class
|
|
91
|
+
declare class LuFormlyFieldTextarea extends FieldType<FieldTypeConfig> {
|
|
113
92
|
focus(): void;
|
|
114
93
|
blur(): void;
|
|
115
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
116
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyFieldTextarea, never>;
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyFieldTextarea, "lu-formly-field-input", never, {}, {}, never, never, true, never>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare class LuFormlyFieldUser extends FieldType<FieldTypeConfig> {
|
|
99
|
+
focus(): void;
|
|
100
|
+
blur(): void;
|
|
101
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyFieldUser, never>;
|
|
102
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyFieldUser, "lu-formly-field-user", never, {}, {}, never, never, true, never>;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare class LuFormlyErrorMessage {
|
|
106
|
+
formControl?: FormControl;
|
|
107
|
+
field: FormlyFieldConfig;
|
|
108
|
+
get errorMessages(): string[];
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyErrorMessage, never>;
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyErrorMessage, "lu-formly-error-message", never, { "formControl": { "alias": "formControl"; "required": false; }; "field": { "alias": "field"; "required": false; }; }, {}, never, never, true, never>;
|
|
111
|
+
}
|
|
112
|
+
declare class LuFormlyWrapperError extends FieldWrapper<FieldTypeConfig> {
|
|
113
|
+
fieldComponent: ViewContainerRef;
|
|
114
|
+
get validationId(): string;
|
|
115
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyWrapperError, never>;
|
|
116
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperError, "lu-formly-wrapper-error", never, {}, {}, never, never, true, never>;
|
|
117
117
|
}
|
|
118
|
+
declare const templateErrorExtension: _ngx_formly_core.FormlyExtension<FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
|
|
119
|
+
[additionalProperties: string]: any;
|
|
120
|
+
}>>;
|
|
118
121
|
|
|
119
122
|
declare class LuFormlyWrapperHelper extends FieldWrapper {
|
|
120
123
|
fieldComponent: ViewContainerRef;
|
|
121
124
|
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyWrapperHelper, never>;
|
|
122
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperHelper, "lu-formly-wrapper-helper", never, {}, {}, never, never,
|
|
125
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperHelper, "lu-formly-wrapper-helper", never, {}, {}, never, never, true, never>;
|
|
123
126
|
}
|
|
124
127
|
declare const templateHelperExtension: _ngx_formly_core.FormlyExtension<_ngx_formly_core.FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
|
|
125
128
|
[additionalProperties: string]: any;
|
|
126
129
|
}>>;
|
|
127
130
|
|
|
128
|
-
declare class
|
|
131
|
+
declare class LuFormlyWrapperIcon extends FieldWrapper {
|
|
132
|
+
fieldComponent: ViewContainerRef;
|
|
133
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyWrapperIcon, never>;
|
|
134
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperIcon, "lu-formly-wrapper-suffix", never, {}, {}, never, never, true, never>;
|
|
135
|
+
}
|
|
136
|
+
declare const templateIconExtension: _ngx_formly_core.FormlyExtension<_ngx_formly_core.FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
|
|
137
|
+
[additionalProperties: string]: any;
|
|
138
|
+
}>>;
|
|
139
|
+
|
|
140
|
+
declare class LuFormlyWrapperRadiosfieldLayout extends FieldWrapper {
|
|
129
141
|
fieldComponent: ViewContainerRef;
|
|
130
142
|
get mod(): string;
|
|
131
143
|
get isRequired(): "" | "is-required";
|
|
132
144
|
get isFocused(): "" | "is-focused";
|
|
133
145
|
get isError(): "" | "is-error";
|
|
134
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
135
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
146
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyWrapperRadiosfieldLayout, never>;
|
|
147
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperRadiosfieldLayout, "lu-formly-wrapper-radiosfield-layout", never, {}, {}, never, never, true, never>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
declare class LuFormlyWrapperSuffix extends FieldWrapper {
|
|
151
|
+
fieldComponent: ViewContainerRef;
|
|
152
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyWrapperSuffix, never>;
|
|
153
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperSuffix, "lu-formly-wrapper-suffix", never, {}, {}, never, never, true, never>;
|
|
136
154
|
}
|
|
155
|
+
declare const templateSuffixExtension: _ngx_formly_core.FormlyExtension<_ngx_formly_core.FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
|
|
156
|
+
[additionalProperties: string]: any;
|
|
157
|
+
}>>;
|
|
137
158
|
|
|
138
159
|
declare class LuFormlyWrapperTextfieldLayout extends FieldWrapper {
|
|
139
160
|
fieldComponent: ViewContainerRef;
|
|
@@ -145,45 +166,17 @@ declare class LuFormlyWrapperTextfieldLayout extends FieldWrapper {
|
|
|
145
166
|
get isFocused(): "" | "is-focused";
|
|
146
167
|
get isError(): "" | "is-error";
|
|
147
168
|
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyWrapperTextfieldLayout, never>;
|
|
148
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperTextfieldLayout, "lu-formly-wrapper-layout", never, {}, {}, never, never,
|
|
169
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperTextfieldLayout, "lu-formly-wrapper-layout", never, {}, {}, never, never, true, never>;
|
|
149
170
|
}
|
|
150
171
|
|
|
151
|
-
declare class
|
|
172
|
+
declare class LuFormlyWrapperCheckboxLayout extends FieldWrapper {
|
|
152
173
|
fieldComponent: ViewContainerRef;
|
|
153
174
|
get mod(): string;
|
|
154
175
|
get isRequired(): "" | "is-required";
|
|
155
176
|
get isFocused(): "" | "is-focused";
|
|
156
177
|
get isError(): "" | "is-error";
|
|
157
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
158
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
declare class LuFormlyWrapperSuffix extends FieldWrapper {
|
|
162
|
-
fieldComponent: ViewContainerRef;
|
|
163
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyWrapperSuffix, never>;
|
|
164
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperSuffix, "lu-formly-wrapper-suffix", never, {}, {}, never, never, false, never>;
|
|
165
|
-
}
|
|
166
|
-
declare const templateSuffixExtension: _ngx_formly_core.FormlyExtension<_ngx_formly_core.FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
|
|
167
|
-
[additionalProperties: string]: any;
|
|
168
|
-
}>>;
|
|
169
|
-
|
|
170
|
-
declare class LuFormlyWrapperIcon extends FieldWrapper {
|
|
171
|
-
fieldComponent: ViewContainerRef;
|
|
172
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyWrapperIcon, never>;
|
|
173
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperIcon, "lu-formly-wrapper-suffix", never, {}, {}, never, never, false, never>;
|
|
174
|
-
}
|
|
175
|
-
declare const templateIconExtension: _ngx_formly_core.FormlyExtension<_ngx_formly_core.FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
|
|
176
|
-
[additionalProperties: string]: any;
|
|
177
|
-
}>>;
|
|
178
|
-
|
|
179
|
-
/** HACK to avoid a 'Function calls are not supported in decorators' error */
|
|
180
|
-
declare const LuFormlyChild: i0.ModuleWithProviders<FormlyModule>;
|
|
181
|
-
declare class LuFormlyModule {
|
|
182
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyModule, never>;
|
|
183
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<LuFormlyModule, [typeof LuFormlyErrorMessage, typeof LuFormlyFieldInput, typeof LuFormlyFieldDate, typeof LuFormlyFieldTextarea, typeof LuFormlyFieldSelect, typeof LuFormlyFieldUser, typeof LuFormlyFieldApi, typeof LuFormlyFieldDepartment, typeof LuFormlyFieldEstablishment, typeof LuFormlyFieldRadios, typeof LuFormlyFieldCheckbox, typeof LuFormlyWrapperHelper, typeof LuFormlyWrapperCheckboxLayout, typeof LuFormlyWrapperTextfieldLayout, typeof LuFormlyWrapperRadiosfieldLayout, typeof LuFormlyWrapperSuffix, typeof LuFormlyWrapperIcon, typeof LuFormlyWrapperError], [typeof i18.CommonModule, typeof i19.FormsModule, typeof i19.ReactiveFormsModule, typeof i20.LuSelectModule, typeof i21.LuOptionModule, typeof i22.LuUserModule, typeof i23.LuInputModule, typeof i24.LuApiModule, typeof i25.LuDepartmentModule, typeof i26.LuEstablishmentModule, typeof i27.LuDateModule, typeof _ngx_formly_core.FormlyModule], never>;
|
|
184
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<LuFormlyModule>;
|
|
178
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuFormlyWrapperCheckboxLayout, never>;
|
|
179
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuFormlyWrapperCheckboxLayout, "lu-formly-wrapper-checkbox-layout", never, {}, {}, never, never, true, never>;
|
|
185
180
|
}
|
|
186
181
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
export { LU_FORMLY_CONFIG, LuFormlyChild, LuFormlyErrorMessage, LuFormlyFieldApi, LuFormlyFieldCheckbox, LuFormlyFieldDate, LuFormlyFieldDepartment, LuFormlyFieldEstablishment, LuFormlyFieldInput, LuFormlyFieldRadios, LuFormlyFieldSelect, LuFormlyFieldTextarea, LuFormlyFieldUser, LuFormlyModule, LuFormlyWrapperCheckboxLayout, LuFormlyWrapperError, LuFormlyWrapperHelper, LuFormlyWrapperIcon, LuFormlyWrapperRadiosfieldLayout, LuFormlyWrapperSuffix, LuFormlyWrapperTextfieldLayout, templateErrorExtension, templateHelperExtension, templateIconExtension, templateSuffixExtension };
|
|
182
|
+
export { LU_FORMLY_CONFIG, LuFormlyErrorMessage, LuFormlyFieldApi, LuFormlyFieldCheckbox, LuFormlyFieldDate, LuFormlyFieldDepartment, LuFormlyFieldEstablishment, LuFormlyFieldInput, LuFormlyFieldRadios, LuFormlyFieldSelect, LuFormlyFieldTextarea, LuFormlyFieldUser, LuFormlyModule, LuFormlyWrapperCheckboxLayout, LuFormlyWrapperError, LuFormlyWrapperHelper, LuFormlyWrapperIcon, LuFormlyWrapperRadiosfieldLayout, LuFormlyWrapperSuffix, LuFormlyWrapperTextfieldLayout, provideLuFormly, templateErrorExtension, templateHelperExtension, templateIconExtension, templateSuffixExtension };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as lexical from 'lexical';
|
|
2
|
-
import { LexicalEditor, Klass, LexicalNode, CommandPayloadType, TextFormatType } from 'lexical';
|
|
2
|
+
import { LexicalEditor, Klass, LexicalNode, LexicalNodeReplacement, CommandPayloadType, DOMExportOutput, TextFormatType } from 'lexical';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { InjectionToken, Signal, WritableSignal, OnInit, OnDestroy, ElementRef } from '@angular/core';
|
|
4
|
+
import { InjectionToken, Signal, WritableSignal, OnInit, OnDestroy, ElementRef, ViewContainerRef, TemplateRef, AfterViewInit } from '@angular/core';
|
|
5
5
|
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
6
6
|
import { LuSimpleSelectInputComponent } from '@lucca-front/ng/simple-select';
|
|
7
|
+
import { LinkNode } from '@lexical/link';
|
|
7
8
|
import { TextMatchTransformer } from '@lexical/markdown';
|
|
8
9
|
import { LuccaIcon } from '@lucca-front/icons';
|
|
9
10
|
|
|
@@ -40,7 +41,7 @@ interface ILuRichTextInputLabel {
|
|
|
40
41
|
|
|
41
42
|
interface RichTextPluginComponent {
|
|
42
43
|
setEditorInstance(editor: LexicalEditor): void;
|
|
43
|
-
getLexicalNodes?(): Klass<LexicalNode>[];
|
|
44
|
+
getLexicalNodes?(): (Klass<LexicalNode> | LexicalNodeReplacement)[];
|
|
44
45
|
setDisabledState(isDisabled: boolean): void;
|
|
45
46
|
pluginComponents?: Signal<readonly RichTextPluginComponent[]>;
|
|
46
47
|
tabindex?: WritableSignal<number>;
|
|
@@ -104,17 +105,34 @@ declare class HeadingsComponent implements OnDestroy, RichTextPluginComponent {
|
|
|
104
105
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HeadingsComponent, "lu-rich-text-plugin-headings", never, { "maxHeadingLevel": { "alias": "maxHeadingLevel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
declare class
|
|
108
|
+
declare class PopoverLinkNode extends LinkNode {
|
|
109
|
+
#private;
|
|
110
|
+
static setViewContainerRef(vcr: ViewContainerRef): void;
|
|
111
|
+
static setTemplateRef(vcr: TemplateRef<unknown>): void;
|
|
112
|
+
static getType(): string;
|
|
113
|
+
createDOM(): HTMLElement;
|
|
114
|
+
exportDOM(editor: LexicalEditor): DOMExportOutput;
|
|
115
|
+
static clone(node: PopoverLinkNode): PopoverLinkNode;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare class LinkComponent implements OnDestroy, AfterViewInit, RichTextPluginComponent {
|
|
108
119
|
#private;
|
|
120
|
+
readonly linkNodeTemplate: _angular_core.Signal<TemplateRef<any>>;
|
|
109
121
|
readonly element: _angular_core.Signal<ElementRef<any>>;
|
|
110
122
|
readonly tabindex: _angular_core.WritableSignal<number>;
|
|
111
123
|
readonly active: _angular_core.WritableSignal<boolean>;
|
|
112
124
|
readonly isDisabled: _angular_core.WritableSignal<boolean>;
|
|
113
125
|
intl: ILuRichTextInputLabel;
|
|
126
|
+
constructor();
|
|
127
|
+
ngAfterViewInit(): void;
|
|
114
128
|
setEditorInstance(editor: LexicalEditor): void;
|
|
115
|
-
getLexicalNodes():
|
|
129
|
+
getLexicalNodes(): (typeof PopoverLinkNode | {
|
|
130
|
+
replace: typeof LinkNode;
|
|
131
|
+
with: (node: LinkNode) => PopoverLinkNode;
|
|
132
|
+
})[];
|
|
116
133
|
ngOnDestroy(): void;
|
|
117
134
|
dispatchCommand(): void;
|
|
135
|
+
deleteLink(): void;
|
|
118
136
|
focus(): void;
|
|
119
137
|
setDisabledState(isDisabled: boolean): void;
|
|
120
138
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LinkComponent, never>;
|
|
@@ -197,7 +215,7 @@ declare class TextStyleToolbarComponent implements RichTextPluginComponent {
|
|
|
197
215
|
declare class RichTextInputToolbarComponent implements RichTextPluginComponent {
|
|
198
216
|
pluginComponents: _angular_core.Signal<readonly RichTextPluginComponent[]>;
|
|
199
217
|
setEditorInstance(editor: LexicalEditor): void;
|
|
200
|
-
getLexicalNodes():
|
|
218
|
+
getLexicalNodes(): (lexical.KlassConstructor<typeof LexicalNode> | lexical.LexicalNodeReplacement)[];
|
|
201
219
|
setDisabledState(isDisabled: boolean): void;
|
|
202
220
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RichTextInputToolbarComponent, never>;
|
|
203
221
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RichTextInputToolbarComponent, "lu-rich-text-input-toolbar", never, {}, {}, never, never, true, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucca-front/ng",
|
|
3
|
-
"version": "20.2.
|
|
3
|
+
"version": "20.2.4-rc.1",
|
|
4
4
|
"description": "A library of icons made by the team @Lucca",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@angular/core": "^20.0.0",
|
|
28
28
|
"@angular/cdk": "^20.0.0",
|
|
29
29
|
"@angular/animations": "^20.0.0",
|
|
30
|
-
"@lucca-front/icons": "20.2.
|
|
31
|
-
"@lucca-front/scss": "20.2.
|
|
30
|
+
"@lucca-front/icons": "20.2.4-rc.1",
|
|
31
|
+
"@lucca-front/scss": "20.2.4-rc.1",
|
|
32
32
|
"isomorphic-dompurify": "^2.17.0",
|
|
33
33
|
"date-fns": "^3.6.0",
|
|
34
34
|
"rxjs": "^7.8.0",
|
|
@@ -89,22 +89,22 @@
|
|
|
89
89
|
"types": "./animations/index.d.ts",
|
|
90
90
|
"default": "./fesm2022/lucca-front-ng-animations.mjs"
|
|
91
91
|
},
|
|
92
|
-
"./api": {
|
|
93
|
-
"types": "./api/index.d.ts",
|
|
94
|
-
"default": "./fesm2022/lucca-front-ng-api.mjs"
|
|
95
|
-
},
|
|
96
|
-
"./box": {
|
|
97
|
-
"types": "./box/index.d.ts",
|
|
98
|
-
"default": "./fesm2022/lucca-front-ng-box.mjs"
|
|
99
|
-
},
|
|
100
92
|
"./app-layout": {
|
|
101
93
|
"types": "./app-layout/index.d.ts",
|
|
102
94
|
"default": "./fesm2022/lucca-front-ng-app-layout.mjs"
|
|
103
95
|
},
|
|
96
|
+
"./api": {
|
|
97
|
+
"types": "./api/index.d.ts",
|
|
98
|
+
"default": "./fesm2022/lucca-front-ng-api.mjs"
|
|
99
|
+
},
|
|
104
100
|
"./a11y": {
|
|
105
101
|
"types": "./a11y/index.d.ts",
|
|
106
102
|
"default": "./fesm2022/lucca-front-ng-a11y.mjs"
|
|
107
103
|
},
|
|
104
|
+
"./box": {
|
|
105
|
+
"types": "./box/index.d.ts",
|
|
106
|
+
"default": "./fesm2022/lucca-front-ng-box.mjs"
|
|
107
|
+
},
|
|
108
108
|
"./breadcrumbs": {
|
|
109
109
|
"types": "./breadcrumbs/index.d.ts",
|
|
110
110
|
"default": "./fesm2022/lucca-front-ng-breadcrumbs.mjs"
|