@sumaris-net/ngx-components 21.4.3 → 21.4.5

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "21.4.3",
4
+ "version": "21.4.5",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -836,5 +836,26 @@
836
836
  "TAB_IONIC": "Ionic",
837
837
  "TAB_MATERIAL": "Material",
838
838
  "SEARCH_PLACEHOLDER": "Search an icon…"
839
+ },
840
+ "TESTING_PAGE": {
841
+ "TITLE": "Tests",
842
+ "SEARCH_PLACEHOLDER": "Search...",
843
+ "BTN_CLEAR_SEARCH": "Clear search",
844
+ "BTN_SHOW_SEARCH": "Search",
845
+ "BTN_HIDE_SEARCH": "Hide search"
846
+ },
847
+ "MARKDOWN": {
848
+ "TOOLBAR": {
849
+ "BOLD": "Bold (**text**)",
850
+ "UNDERLINE": "Underline (<u>text</u>)",
851
+ "STRIKETHROUGH": "Strikethrough (~~text~~)",
852
+ "HIGHLIGHT": "Highlight (==text==)",
853
+ "HEADING1": "Title 1",
854
+ "HEADING2": "Title 2",
855
+ "BULLET_LIST": "Bullet list (- item)",
856
+ "LINK": "Insert link [text](url)",
857
+ "ATTACHMENT": "Attach a file",
858
+ "PREVIEW": "Show/hide markdown preview"
859
+ }
839
860
  }
840
861
  }
@@ -587,7 +587,6 @@
587
587
  "SUBJECT": "Object",
588
588
  "BODY_HELP": "Your message...",
589
589
  "ATTACHMENTS": {
590
- "BTN_ADD": "Add an attachment",
591
590
  "BTN_REMOVE": "Remove the attachment",
592
591
  "UPLOADING_ERROR": "Please wait for the uploads to finish, or remove the files in error."
593
592
  },
@@ -845,5 +844,26 @@
845
844
  "TAB_IONIC": "Ionic",
846
845
  "TAB_MATERIAL": "Material",
847
846
  "SEARCH_PLACEHOLDER": "Search an icon..."
847
+ },
848
+ "TESTING_PAGE": {
849
+ "TITLE": "Tests",
850
+ "SEARCH_PLACEHOLDER": "Search...",
851
+ "BTN_CLEAR_SEARCH": "Clear search",
852
+ "BTN_SHOW_SEARCH": "Search",
853
+ "BTN_HIDE_SEARCH": "Hide search"
854
+ },
855
+ "MARKDOWN": {
856
+ "TOOLBAR": {
857
+ "BOLD": "Bold (**text**)",
858
+ "UNDERLINE": "Underline (<u>text</u>)",
859
+ "STRIKETHROUGH": "Strikethrough (~~text~~)",
860
+ "HIGHLIGHT": "Highlight (==text==)",
861
+ "HEADING1": "Title 1",
862
+ "HEADING2": "Title 2",
863
+ "BULLET_LIST": "Bullet list (- item)",
864
+ "LINK": "Insert link [text](url)",
865
+ "ATTACHMENT": "Attach a file",
866
+ "PREVIEW": "Show/hide markdown preview"
867
+ }
848
868
  }
849
869
  }
@@ -590,7 +590,6 @@
590
590
  "SUBJECT": "Objet",
591
591
  "BODY_HELP": "Votre message...",
592
592
  "ATTACHMENTS": {
593
- "BTN_ADD": "Ajouter une pièce jointe",
594
593
  "BTN_REMOVE": "Retirer la pièce jointe",
595
594
  "UPLOADING_ERROR": "Veuillez attendre la fin des envois, ou supprimer les fichiers en erreur."
596
595
  },
@@ -848,5 +847,26 @@
848
847
  "TAB_IONIC": "Ionic",
849
848
  "TAB_MATERIAL": "Material",
850
849
  "SEARCH_PLACEHOLDER": "Rechercher une icône..."
850
+ },
851
+ "TESTING_PAGE": {
852
+ "TITLE": "Tests",
853
+ "SEARCH_PLACEHOLDER": "Rechercher...",
854
+ "BTN_CLEAR_SEARCH": "Effacer la recherche",
855
+ "BTN_SHOW_SEARCH": "Rechercher",
856
+ "BTN_HIDE_SEARCH": "Masquer la recherche"
857
+ },
858
+ "MARKDOWN": {
859
+ "TOOLBAR": {
860
+ "BOLD": "Gras (**texte**)",
861
+ "UNDERLINE": "Souligné (<u>texte</u>)",
862
+ "STRIKETHROUGH": "Barré (~~texte~~)",
863
+ "HIGHLIGHT": "Surligné (==texte==)",
864
+ "HEADING1": "Titre 1",
865
+ "HEADING2": "Titre 2",
866
+ "BULLET_LIST": "Liste à puces (- élément)",
867
+ "LINK": "Insérer un lien [texte](url)",
868
+ "ATTACHMENT": "Joindre un fichier",
869
+ "PREVIEW": "Afficher/masquer l'aperçu markdown"
870
+ }
851
871
  }
852
872
  }
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "21.4.3",
5
+ "version": "21.4.5",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{
@@ -167,6 +167,13 @@
167
167
  padding-left: var(--padding-start, 16px) !important;
168
168
  }
169
169
 
170
+ // Option panels are rendered inline (Material popover), so they inherit the padding vars
171
+ // from their ancestors (e.g. 0 from an `ion-no-padding` grid): reset them on the option.
172
+ .mat-mdc-option:not(.ion-no-padding):not([no-padding]) {
173
+ --padding-start: 16px;
174
+ --padding-end: 16px;
175
+ }
176
+
170
177
  .mat-action-row {
171
178
  height: 46px;
172
179
  padding-top: var(--padding-top, 16px) !important;
@@ -71,6 +71,8 @@ declare const MaterialSelectors: {
71
71
  tabGroup: string;
72
72
  /** Material tab label */
73
73
  tabLabel: string;
74
+ /** Material tab link (tab nav bar) */
75
+ tabLink: string;
74
76
  /** Material paginator */
75
77
  paginator: string;
76
78
  /** Material paginator range label (e.g. '1 - 20 of 42') */
@@ -83,6 +85,12 @@ declare const MaterialSelectors: {
83
85
  autocompletePanel: string;
84
86
  /** Material autocomplete option */
85
87
  autocompleteOption: string;
88
+ /** Material autocomplete trigger (input) */
89
+ autocompleteTrigger: string;
90
+ /** Material select panel */
91
+ selectPanel: string;
92
+ /** Material select trigger */
93
+ selectTrigger: string;
86
94
  };
87
95
  /**
88
96
  * Helper functions for interacting with Angular Material components.
@@ -237,6 +245,57 @@ declare class AuthHelper {
237
245
  }): Promise<void>;
238
246
  }
239
247
 
248
+ interface OptionPadding {
249
+ left: string;
250
+ right: string;
251
+ }
252
+ /** What to expect from options. An application that changes their padding must set the value it expects. */
253
+ interface OptionPaddingOptions {
254
+ /** Expected padding of options, unless marked as "no padding" */
255
+ padding?: OptionPadding;
256
+ /** Selector of options without padding, managing their own inset (e.g. autocomplete columns, through the `ion-col` padding) */
257
+ noPaddingSelector?: string;
258
+ }
259
+ interface OptionPaddingReport {
260
+ fieldCount: number;
261
+ optionCount: number;
262
+ violations: string[];
263
+ }
264
+ /**
265
+ * Check the padding of `mat-option`, on any page.
266
+ *
267
+ * Nothing here depends on a given field: tabs, fields and options are discovered from the DOM,
268
+ * using the CSS classes set by Angular Material. Test cases can be added to (or removed from)
269
+ * a page without changing the tests.
270
+ */
271
+ declare class OptionPaddingHelper {
272
+ private page;
273
+ private readonly options;
274
+ constructor(page: Page, options?: OptionPaddingOptions);
275
+ /** Wait for the page to display at least one field */
276
+ waitForFields(timeout?: number): Promise<void>;
277
+ /** Open the panel of every field of every tab of the current page, and check all of its options */
278
+ checkAllFields(): Promise<OptionPaddingReport>;
279
+ /**
280
+ * Check the option padding without any field, using fake options added to the page. Their parent is a panel
281
+ * inheriting from `ion-no-padding`, like an inline panel inside a form grid. This catches a global rule leaking
282
+ * from any component loaded by the page (e.g. `::ng-deep .mat-mdc-option`), or padding vars inherited from a parent.
283
+ */
284
+ checkProbes(): Promise<string[]>;
285
+ protected checkFieldsOfCurrentView(tabName: string, report: OptionPaddingReport): Promise<void>;
286
+ protected checkPadding(where: string, left: string, right: string, noPadding: boolean): string | null;
287
+ protected getFieldName(trigger: Locator): Promise<string>;
288
+ /** Open the field's panel. Dispatch the event, because some triggers ignore the pointer until focused (e.g. lat/long sign) */
289
+ protected openPanel(trigger: Locator): Promise<Locator | null>;
290
+ protected closePanel(panel: Locator): Promise<void>;
291
+ protected readOptions(panel: Locator): Promise<{
292
+ text: string;
293
+ noPadding: boolean;
294
+ left: string;
295
+ right: string;
296
+ }[]>;
297
+ }
298
+
240
299
  /**
241
300
  * Search environments based on provided criteria.
242
301
  *
@@ -313,5 +372,5 @@ interface LoginEnv {
313
372
  password: string;
314
373
  }
315
374
 
316
- export { AuthHelper, IonicHelper, IonicSelectors, MaterialHelper, MaterialSelectors, STARTUP_DATA_STORAGE_KEY, UiHelper, testWithEnv, withEnvs };
317
- export type { EnvFilter, LoginEnv };
375
+ export { AuthHelper, IonicHelper, IonicSelectors, MaterialHelper, MaterialSelectors, OptionPaddingHelper, STARTUP_DATA_STORAGE_KEY, UiHelper, testWithEnv, withEnvs };
376
+ export type { EnvFilter, LoginEnv, OptionPadding, OptionPaddingOptions, OptionPaddingReport };