@lucca-front/ng 22.0.1-rc.2 → 22.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucca-front/ng",
3
- "version": "22.0.1-rc.2",
3
+ "version": "22.0.1",
4
4
  "description": "A library of icons made by the team @Lucca",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,9 +28,9 @@
28
28
  "@angular/core": "^22.0.0",
29
29
  "@angular/cdk": "^22.0.0",
30
30
  "@angular/animations": "^22.0.0",
31
- "@lucca-front/icons": "22.0.1-rc.2",
32
- "@lucca-front/scss": "22.0.1-rc.2",
33
- "@lucca/prisme": "22.0.1-rc.2",
31
+ "@lucca-front/icons": "22.0.1",
32
+ "@lucca-front/scss": "22.0.1",
33
+ "@lucca/prisme": "22.0.1",
34
34
  "@types/dompurify": "^3.0.0",
35
35
  "isomorphic-dompurify": "^2.17.0",
36
36
  "date-fns": "^3.6.0",
@@ -1,8 +1,14 @@
1
- // The select/listbox Angular components (`lu-listbox`, `lu-select-option`, `lu-listbox-option`,
2
- // color picker) ship no component-scoped CSS — their visuals live in the shared `@lucca-front/scss`
3
- // component sheets. Forward them here so importing `@lucca-front/ng/styles` is enough to render the
4
- // selects, without the consuming app also having to pull `@lucca-front/scss` `main-all` (or these
5
- // sheets à la carte). Loaded once per compilation, so apps that also import the scss components
6
- // won't emit these twice.
1
+ // These components render listbox markup styled by shared `@lucca-front/scss` sheets, not by component-scoped CSS:
2
+ // - `lu-listbox`.
3
+ // - `lu-select-option`.
4
+ // - `lu-listbox-option`.
5
+ // - `lu-color-input`.
6
+ //
7
+ // Those sheets are forwarded here:
8
+ // - Importing `@lucca-front/ng/styles` is enough to render the selects.
9
+ // - Consumers don't need `@lucca-front/scss` `main-all`, nor these sheets à la carte.
10
+ // - Sass loads each sheet once per compilation: apps importing them too emit them once.
11
+ // - `checkboxField`: `multiple` option renders HTML, not `lu-checkbox-input`.
7
12
  @forward '@lucca-front/scss/src/components/listboxOption';
13
+ @forward '@lucca-front/scss/src/components/checkboxField';
8
14
  @forward '@lucca-front/scss/src/components/color';
@@ -44,6 +44,12 @@ declare abstract class ALuCoreSelectApiDirective<TOption, TParams = Record<strin
44
44
  * Return the options for the given params and page
45
45
  */
46
46
  protected abstract getOptions(params: TParams, page: number): Observable<TOption[]>;
47
+ /**
48
+ * Return every option of a group, ignoring pagination, so the group "select all" acts on the whole
49
+ * group and not only on the pages already loaded. Override it in directives that set a grouping;
50
+ * left undefined, the panel keeps its default behaviour and toggles the rendered options only.
51
+ */
52
+ protected getGroupOptions?: (group: unknown) => Observable<TOption[]>;
47
53
  ngOnInit(): void;
48
54
  /**
49
55
  * Post-process the whole list of loaded options (all pages accumulated). Override it for
@@ -41,6 +41,13 @@ declare class LuCoreSelectEstablishmentsDirective<T extends LuCoreSelectEstablis
41
41
  ngOnInit(): void;
42
42
  protected initGrouping(): void;
43
43
  protected buildParamsFromClue(clue: string): Observable<Record<string, string | number | boolean>>;
44
+ /**
45
+ * Establishments are grouped by legal unit, but the panel only knows the options of the pages it
46
+ * already loaded: a legal unit spanning several pages would be partially selected. Fetch the whole
47
+ * legal unit instead, page by page, so "select all" covers the options that are not rendered yet.
48
+ * Groups are only displayed when the clue is empty, hence the clue-less params.
49
+ */
50
+ protected getGroupOptions: (legalUnitId: unknown) => Observable<T[]>;
44
51
  protected getOptions(params: Record<string, string | number | boolean> | null, page: number): Observable<T[]>;
45
52
  protected readonly paramsSignal: _angular_core.Signal<Record<string, string | number | boolean>>;
46
53
  protected readonly params$: Observable<Record<string, string | number | boolean>>;
@@ -14,6 +14,7 @@ interface LuCoreSelectJobQualification extends ILuApiItem {
14
14
  }
15
15
 
16
16
  declare class LuCoreSelectJobQualificationsDirective<T extends LuCoreSelectJobQualification = LuCoreSelectJobQualification> extends ALuCoreSelectApiDirective<T> implements OnInit, CoreSelectApiTotalCountProvider {
17
+ #private;
17
18
  protected httpClient: HttpClient;
18
19
  readonly url: _angular_core.InputSignal<string>;
19
20
  readonly filters: _angular_core.InputSignal<Record<string, string | number | boolean>>;
@@ -21,6 +22,13 @@ declare class LuCoreSelectJobQualificationsDirective<T extends LuCoreSelectJobQu
21
22
  protected readonly clue: _angular_core.Signal<string>;
22
23
  constructor();
23
24
  protected buildParamsFromClue(clue: string): Observable<Record<string, string | number | boolean>>;
25
+ /**
26
+ * Job qualifications are grouped by job, but the panel only knows the options of the pages it
27
+ * already loaded: a job spanning several pages would be partially selected. Fetch the whole job
28
+ * instead, page by page, so "select all" covers the options that are not rendered yet. Groups are
29
+ * only displayed when the clue is empty, hence the clue-less params.
30
+ */
31
+ protected getGroupOptions: (jobId: unknown) => Observable<T[]>;
24
32
  protected getOptions(params: Record<string, string | number | boolean> | null, page: number): Observable<T[]>;
25
33
  protected readonly paramsSignal: _angular_core.Signal<Record<string, string | number | boolean>>;
26
34
  protected readonly params$: Observable<Record<string, string | number | boolean>>;
@@ -246,6 +246,8 @@ type SerializedTagNode = Spread<{
246
246
  tagDescription?: string;
247
247
  disabled?: boolean;
248
248
  }, SerializedLexicalNode>;
249
+ /** Destroy stale chip components once Lexical has reconciled the DOM. */
250
+ declare function registerTagChipsCleanup(editor: LexicalEditor): () => void;
249
251
  declare class TagNode extends DecoratorNode<string> {
250
252
  #private;
251
253
  setViewContainerRef(vcr: ViewContainerRef): this;
@@ -265,7 +267,6 @@ declare class TagNode extends DecoratorNode<string> {
265
267
  decorate(): string;
266
268
  createDOM(_config: EditorConfig, editor: LexicalEditor): HTMLElement;
267
269
  updateDOM(prevNode: TagNode, _dom: HTMLElement, _config: EditorConfig): boolean;
268
- remove(preserveEmptyParent?: boolean): void;
269
270
  exportDOM(): DOMExportOutput;
270
271
  static importDOM(): DOMConversionMap;
271
272
  static importJSON(serializedNode: SerializedTagNode): TagNode;
@@ -312,5 +313,5 @@ declare class RichTextInputToolbarComponent implements RichTextPluginComponent {
312
313
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<RichTextInputToolbarComponent, "lu-rich-text-input-toolbar", never, {}, {}, never, never, true, never>;
313
314
  }
314
315
 
315
- export { $createTagNode, $isTagNode, ClearFormatComponent, HeadingsComponent, INITIAL_UPDATE_TAG, LinkComponent, ListStyleToolbarComponent, RICH_TEXT_FORMATTER, RICH_TEXT_PLUGIN_COMPONENT, RichTextFormatter, RichTextInputComponent, RichTextInputToolbarComponent, RichTextPluginTagComponent, TagNode, TextStyleComponent, TextStyleToolbarComponent };
316
+ export { $createTagNode, $isTagNode, ClearFormatComponent, HeadingsComponent, INITIAL_UPDATE_TAG, LinkComponent, ListStyleToolbarComponent, RICH_TEXT_FORMATTER, RICH_TEXT_PLUGIN_COMPONENT, RichTextFormatter, RichTextInputComponent, RichTextInputToolbarComponent, RichTextPluginTagComponent, TagNode, TextStyleComponent, TextStyleToolbarComponent, registerTagChipsCleanup };
316
317
  export type { RichTextPluginComponent, SerializedTagNode, Tag };