@designcrowd/library.brand-page 6.1.10 → 6.1.11

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.
Files changed (103) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-nsMF2NQ9.js → CreatedOnBrandCrowd-de-de-DToCz9Tp.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BQI_UCR7.js → CreatedOnBrandCrowd-en-us-CrjiEGmM.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-DgNOoSPn.js → CreatedOnBrandCrowd-es-es-DgVVM-Df.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-JFRaxjvx.js → CreatedOnBrandCrowd-fr-ca-C_oKH8iu.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-JFRaxjvx.js → CreatedOnBrandCrowd-fr-fr-C_oKH8iu.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-DP6_-90i.js → CreatedOnBrandCrowd-pt-br-DRvHblvI.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-DP6_-90i.js → CreatedOnBrandCrowd-pt-pt-DRvHblvI.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-07F2wjkk.js → CreatedOnDcom-de-de-uCIRFQYA.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-DaV9sa6e.js → CreatedOnDcom-en-us-DfbhIoId.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-73uOymvv.js → CreatedOnDcom-es-es-CipmOU1-.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-Ci9Ome30.js → CreatedOnDcom-fr-ca-B5Cq9iJK.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DLHuMHfE.js → CreatedOnDcom-fr-fr-DIvycPcx.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-Fbt7tY-E.js → CreatedOnDcom-pt-br-BQ3EajZC.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-V2jTB6of.js → CreatedOnDcom-pt-pt-DchaL_tP.js} +1 -1
  15. package/lib/src/brand-page/constants/index.d.ts +1 -0
  16. package/lib/src/brand-page/constants/index.js +1 -0
  17. package/lib/src/brand-page/constants/sections/header-display.constants.d.ts +2 -1
  18. package/lib/src/brand-page/constants/sections/header-display.constants.js +24 -24
  19. package/lib/src/brand-page/constants/sections/navigation-type.constants.d.ts +9 -0
  20. package/lib/src/brand-page/constants/sections/navigation-type.constants.js +33 -0
  21. package/lib/src/brand-page/models/index.d.ts +1 -1
  22. package/lib/src/brand-page/models/index.js +6 -6
  23. package/lib/src/brand-page/utils/container-text-color.util.d.ts +7 -4
  24. package/lib/src/brand-page/utils/container-text-color.util.js +11 -6
  25. package/lib/src/brand-page/utils/migration/migration-21.js +62 -0
  26. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -0
  27. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -0
  28. package/lib/src/brand-page-maker/models/navigation-style-configs.d.ts +1 -0
  29. package/lib/src/brand-page-maker/models/navigation-style-configs.js +31 -7
  30. package/lib/src/{bundled-translations-C98dISr1.js → bundled-translations-BiFAlQdC.js} +21 -21
  31. package/lib/src/{bundled-translations.de-DE-D8ul_G4P.js → bundled-translations.de-DE-DuRWnOP-.js} +14 -14
  32. package/lib/src/{bundled-translations.es-ES-BVmPyfw9.js → bundled-translations.es-ES-CokHdZtW.js} +17 -17
  33. package/lib/src/{bundled-translations.fr-CA-DmzKPhfa.js → bundled-translations.fr-CA-CJcMmubA.js} +1 -1
  34. package/lib/src/{bundled-translations.fr-FR-CQRiASGY.js → bundled-translations.fr-FR-DYPup8fJ.js} +1 -1
  35. package/lib/src/{bundled-translations.pt-BR-guDO9Yfg.js → bundled-translations.pt-BR-GSsp1kuV.js} +1 -1
  36. package/lib/src/{bundled-translations.pt-PT-GFpLNo-u.js → bundled-translations.pt-PT-DbkY8UQ3.js} +9 -9
  37. package/lib/src/bundles/bundled-translations.de-DE.json +5 -0
  38. package/lib/src/bundles/bundled-translations.es-ES.json +5 -0
  39. package/lib/src/bundles/bundled-translations.fr-CA.json +5 -0
  40. package/lib/src/bundles/bundled-translations.fr-FR.json +5 -0
  41. package/lib/src/bundles/bundled-translations.json +5 -0
  42. package/lib/src/bundles/bundled-translations.pt-BR.json +5 -0
  43. package/lib/src/bundles/bundled-translations.pt-PT.json +5 -0
  44. package/lib/src/css/library.brand-page-brandCrowd.min.css +185 -63
  45. package/lib/src/css/library.brand-page-brandPage.min.css +190 -63
  46. package/lib/src/css/library.brand-page-designCom.min.css +185 -63
  47. package/lib/src/css/library.brand-page-preview.min.css +185 -63
  48. package/lib/src/index.mjs +1 -1
  49. package/lib/src/{lib-D2a1EmRb.js → lib-zpGnKGKw.js} +32747 -32191
  50. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -0
  51. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -0
  52. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -0
  53. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +1 -0
  54. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -0
  55. package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +1 -0
  56. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -0
  57. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +4 -1
  58. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +15 -1
  59. package/lib/src/shared/page-settings/store/page-settings-store.d.ts +6 -0
  60. package/lib/src/shared/page-settings/store/page-settings-store.js +22 -1
  61. package/package.json +2 -2
  62. package/src/brand-page/constants/index.ts +1 -0
  63. package/src/brand-page/constants/sections/header-display.constants.ts +26 -25
  64. package/src/brand-page/constants/sections/navigation-type.constants.test.ts +53 -0
  65. package/src/brand-page/constants/sections/navigation-type.constants.ts +48 -0
  66. package/src/brand-page/models/footer-icon-color.test.ts +38 -102
  67. package/src/brand-page/models/index.ts +6 -9
  68. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +6 -6
  69. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +2 -6
  70. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +4 -12
  71. package/src/brand-page/utils/container-text-color.util.test.ts +16 -0
  72. package/src/brand-page/utils/container-text-color.util.ts +15 -6
  73. package/src/brand-page/utils/migration/migration-21.test.ts +169 -0
  74. package/src/brand-page/utils/migration/migration-21.ts +75 -0
  75. package/src/brand-page-maker/models/i18n/models.de-DE.json +3 -0
  76. package/src/brand-page-maker/models/i18n/models.es-ES.json +3 -0
  77. package/src/brand-page-maker/models/i18n/models.fr-CA.json +3 -0
  78. package/src/brand-page-maker/models/i18n/models.fr-FR.json +3 -0
  79. package/src/brand-page-maker/models/i18n/models.json +3 -0
  80. package/src/brand-page-maker/models/i18n/models.pt-BR.json +3 -0
  81. package/src/brand-page-maker/models/i18n/models.pt-PT.json +3 -0
  82. package/src/brand-page-maker/models/navigation-style-configs.ts +32 -6
  83. package/src/bundles/bundled-translations.de-DE.json +5 -0
  84. package/src/bundles/bundled-translations.es-ES.json +5 -0
  85. package/src/bundles/bundled-translations.fr-CA.json +5 -0
  86. package/src/bundles/bundled-translations.fr-FR.json +5 -0
  87. package/src/bundles/bundled-translations.json +5 -0
  88. package/src/bundles/bundled-translations.pt-BR.json +5 -0
  89. package/src/bundles/bundled-translations.pt-PT.json +5 -0
  90. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +0 -6
  91. package/src/shared/page-settings/components/header-settings-panel/HeaderSettingsPanel.vue +8 -0
  92. package/src/shared/page-settings/components/page-settings-section-styles/HeaderNavigationStyle.vue +95 -0
  93. package/src/shared/page-settings/components/page-settings-section-styles/HeaderNavigationType.vue +26 -14
  94. package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +33 -1
  95. package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.de-DE.json +10 -7
  96. package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.es-ES.json +10 -7
  97. package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.fr-CA.json +10 -7
  98. package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.fr-FR.json +10 -7
  99. package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.json +3 -0
  100. package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.pt-BR.json +10 -7
  101. package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.pt-PT.json +10 -7
  102. package/src/shared/page-settings/store/page-settings-store.test.ts +97 -0
  103. package/src/shared/page-settings/store/page-settings-store.ts +36 -1
@@ -1,10 +1,13 @@
1
1
  {
2
- "pageSettingsSection" : {
3
- "showNavigationBelow" : "Afficher la navigation sous le logo",
4
- "previewDescription" : "L'aperçu n'est pas disponible pour cette taille d'écran.",
5
- "navigationStyle" : "Style de navigation",
6
- "logoSize" : "Taille du logo",
7
- "socialLinks" : "Liens vers les réseaux sociaux",
8
- "copyright" : "Droits d’auteur"
2
+ "pageSettingsSection": {
3
+ "showNavigationBelow": "Afficher la navigation sous le logo",
4
+ "previewDescription": "L'aperçu n'est pas disponible pour cette taille d'écran.",
5
+ "navigationStyle": "Style de navigation",
6
+ "navigationType": "Type de navigation",
7
+ "menuStyle": "Style de menu",
8
+ "iconStyle": "Style d'icône",
9
+ "logoSize": "Taille du logo",
10
+ "socialLinks": "Liens vers les réseaux sociaux",
11
+ "copyright": "Droits d’auteur"
9
12
  }
10
13
  }
@@ -3,6 +3,9 @@
3
3
  "showNavigationBelow": "Show navigation below logo",
4
4
  "previewDescription": "Preview is not available on this screen size.",
5
5
  "navigationStyle": "Navigation style",
6
+ "navigationType": "Navigation type",
7
+ "menuStyle": "Menu style",
8
+ "iconStyle": "Icon style",
6
9
  "logoSize": "Logo Size",
7
10
  "socialLinks": "Social Links",
8
11
  "copyright": "Copyright"
@@ -1,10 +1,13 @@
1
1
  {
2
- "pageSettingsSection" : {
3
- "showNavigationBelow" : "Mostrar navegação abaixo do logotipo",
4
- "previewDescription" : "A visualização não está disponível neste tamanho de tela.",
5
- "navigationStyle" : "Estilo de navegação",
6
- "logoSize" : "Tamanho do logotipo",
7
- "socialLinks" : "Links de redes sociais",
8
- "copyright" : "Direitos autorais"
2
+ "pageSettingsSection": {
3
+ "showNavigationBelow": "Mostrar navegação abaixo do logotipo",
4
+ "previewDescription": "A visualização não está disponível neste tamanho de tela.",
5
+ "navigationStyle": "Estilo de navegação",
6
+ "navigationType": "Tipo de navegação",
7
+ "menuStyle": "Estilo de menu",
8
+ "iconStyle": "Estilo de ícone",
9
+ "logoSize": "Tamanho do logotipo",
10
+ "socialLinks": "Links de redes sociais",
11
+ "copyright": "Direitos autorais"
9
12
  }
10
13
  }
@@ -1,10 +1,13 @@
1
1
  {
2
- "pageSettingsSection" : {
3
- "showNavigationBelow" : "Mostrar a navegação por baixo do logótipo",
4
- "previewDescription" : "A pré-visualização não está disponível neste tamanho de ecrã.",
5
- "navigationStyle" : "Estilo de navegação",
6
- "logoSize" : "Tamanho do logótipo",
7
- "socialLinks" : "Links de redes sociais",
8
- "copyright" : "Direitos de autor"
2
+ "pageSettingsSection": {
3
+ "showNavigationBelow": "Mostrar a navegação por baixo do logótipo",
4
+ "previewDescription": "A pré-visualização não está disponível neste tamanho de ecrã.",
5
+ "navigationStyle": "Estilo de navegação",
6
+ "navigationType": "Tipo de navegação",
7
+ "menuStyle": "Estilo de menu",
8
+ "iconStyle": "Estilo de Ícone",
9
+ "logoSize": "Tamanho do logótipo",
10
+ "socialLinks": "Links de redes sociais",
11
+ "copyright": "Direitos de autor"
9
12
  }
10
13
  }
@@ -273,4 +273,101 @@ describe('page store module', () => {
273
273
  // Assert
274
274
  expect(pageSettingsStore.currentPage.id).toEqual(PAGE_TWO.id);
275
275
  });
276
+
277
+ describe('setPreviousSelectedNavigationDisplayType', () => {
278
+ beforeEach(() => {
279
+ useUiPageSettingsStore().$patch(($state) => {
280
+ $state.previousSelectedNavigationDisplayTypes = {
281
+ desktop: {},
282
+ mobile: {},
283
+ };
284
+ });
285
+ });
286
+
287
+ test('remembers one display type per navigation type per viewport', () => {
288
+ const pageSettingsStore = useUiPageSettingsStore();
289
+
290
+ pageSettingsStore.setPreviousSelectedNavigationDisplayType(
291
+ 'desktop',
292
+ 'nav-tab-buttons',
293
+ );
294
+ pageSettingsStore.setPreviousSelectedNavigationDisplayType(
295
+ 'desktop',
296
+ 'nav-hamburger-hamburger',
297
+ );
298
+
299
+ expect(
300
+ pageSettingsStore.previousSelectedNavigationDisplayTypes?.desktop,
301
+ ).toEqual({
302
+ tabs: 'nav-tab-buttons',
303
+ hamburger: 'nav-hamburger-hamburger',
304
+ });
305
+ });
306
+
307
+ test('activity within one navigation type never evicts the other type (regression: MRU cap)', () => {
308
+ const pageSettingsStore = useUiPageSettingsStore();
309
+
310
+ // pick a bar style, switch to hamburger (default recorded), pick two more hamburger styles
311
+ pageSettingsStore.setPreviousSelectedNavigationDisplayType(
312
+ 'desktop',
313
+ 'nav-tab-buttons',
314
+ );
315
+ pageSettingsStore.setPreviousSelectedNavigationDisplayType(
316
+ 'desktop',
317
+ 'nav-hamburger-hamburger',
318
+ );
319
+ pageSettingsStore.setPreviousSelectedNavigationDisplayType(
320
+ 'desktop',
321
+ 'nav-hamburger-hamburger-light',
322
+ );
323
+
324
+ expect(
325
+ pageSettingsStore.previousSelectedNavigationDisplayTypes?.desktop?.tabs,
326
+ ).toEqual('nav-tab-buttons');
327
+ expect(
328
+ pageSettingsStore.previousSelectedNavigationDisplayTypes?.desktop
329
+ ?.hamburger,
330
+ ).toEqual('nav-hamburger-hamburger-light');
331
+ });
332
+
333
+ test('viewports are remembered independently', () => {
334
+ const pageSettingsStore = useUiPageSettingsStore();
335
+
336
+ pageSettingsStore.setPreviousSelectedNavigationDisplayType(
337
+ 'desktop',
338
+ 'nav-tab-buttons',
339
+ );
340
+ pageSettingsStore.setPreviousSelectedNavigationDisplayType(
341
+ 'mobile',
342
+ 'nav-hamburger-hamburger',
343
+ );
344
+
345
+ expect(
346
+ pageSettingsStore.previousSelectedNavigationDisplayTypes?.desktop,
347
+ ).toEqual({ tabs: 'nav-tab-buttons' });
348
+ expect(
349
+ pageSettingsStore.previousSelectedNavigationDisplayTypes?.mobile,
350
+ ).toEqual({ hamburger: 'nav-hamburger-hamburger' });
351
+ });
352
+
353
+ test('re-initialises itself if a setState payload wiped the default', () => {
354
+ const pageSettingsStore = useUiPageSettingsStore();
355
+
356
+ pageSettingsStore.$patch(($state) => {
357
+ Object.assign($state, {
358
+ previousSelectedNavigationDisplayTypes: undefined,
359
+ });
360
+ });
361
+
362
+ expect(() =>
363
+ pageSettingsStore.setPreviousSelectedNavigationDisplayType(
364
+ 'desktop',
365
+ 'nav-tab-buttons',
366
+ ),
367
+ ).not.toThrow();
368
+ expect(
369
+ pageSettingsStore.previousSelectedNavigationDisplayTypes?.desktop?.tabs,
370
+ ).toEqual('nav-tab-buttons');
371
+ });
372
+ });
276
373
  });
@@ -7,7 +7,9 @@ import {
7
7
  PageFooterDesktop,
8
8
  PageFooterMobile,
9
9
  VIEWPORTS,
10
+ getNavigationType,
10
11
  } from '@brand-page';
12
+ import type { NavigationType } from '@brand-page';
11
13
  import type {
12
14
  Content,
13
15
  ImageGalleryItem,
@@ -77,6 +79,10 @@ export interface PageSettingsState {
77
79
  [VIEWPORTS.desktop]: string[];
78
80
  [VIEWPORTS.mobile]: string[];
79
81
  };
82
+ previousSelectedNavigationDisplayTypes?: {
83
+ [VIEWPORTS.desktop]: Partial<Record<NavigationType, string>>;
84
+ [VIEWPORTS.mobile]: Partial<Record<NavigationType, string>>;
85
+ };
80
86
  }
81
87
 
82
88
  export const useUiPageSettingsStore = defineStore('uiPageSettings', {
@@ -104,6 +110,10 @@ export const useUiPageSettingsStore = defineStore('uiPageSettings', {
104
110
  [VIEWPORTS.desktop]: [],
105
111
  [VIEWPORTS.mobile]: [],
106
112
  },
113
+ previousSelectedNavigationDisplayTypes: {
114
+ [VIEWPORTS.desktop]: {},
115
+ [VIEWPORTS.mobile]: {},
116
+ },
107
117
  }),
108
118
  actions: {
109
119
  setState({
@@ -493,7 +503,16 @@ export const useUiPageSettingsStore = defineStore('uiPageSettings', {
493
503
  this.sectionCollapsedStates[key] = true;
494
504
  });
495
505
  },
496
- setPreviousSelectedDisplayStyle(viewport: string, displayStyle: string) {
506
+ setPreviousSelectedDisplayStyle(
507
+ viewport: string,
508
+ displayStyle: string,
509
+ ): void {
510
+ // guard against a setState payload wiping the initialized default
511
+ this.previousSelectedDisplayStyles ??= {
512
+ [VIEWPORTS.desktop]: [],
513
+ [VIEWPORTS.mobile]: [],
514
+ };
515
+
497
516
  // filter out duplicate
498
517
  this.previousSelectedDisplayStyles[viewport] =
499
518
  this.previousSelectedDisplayStyles[viewport].filter(
@@ -506,6 +525,22 @@ export const useUiPageSettingsStore = defineStore('uiPageSettings', {
506
525
  ...this.previousSelectedDisplayStyles[viewport].splice(0, 1),
507
526
  ];
508
527
  },
528
+ setPreviousSelectedNavigationDisplayType(
529
+ viewport: string,
530
+ displayType: string,
531
+ ): void {
532
+ // guard against a setState payload wiping the initialized default
533
+ this.previousSelectedNavigationDisplayTypes ??= {
534
+ [VIEWPORTS.desktop]: {},
535
+ [VIEWPORTS.mobile]: {},
536
+ };
537
+
538
+ // one remembered style per navigation type, so switching type restores it
539
+ this.previousSelectedNavigationDisplayTypes[viewport] = {
540
+ ...this.previousSelectedNavigationDisplayTypes[viewport],
541
+ [getNavigationType(displayType)]: displayType,
542
+ };
543
+ },
509
544
  },
510
545
  getters: {
511
546
  // Single source of truth for the page-limit paywall. Admin-maker (template