@useinsider/guido 3.2.0-beta.bdc0c2a → 3.2.0-beta.c08c480
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/README.md +25 -1
- package/dist/@types/config/schemas.js +38 -36
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +35 -34
- package/dist/components/organisms/AutoSaveController.vue.js +17 -0
- package/dist/components/organisms/AutoSaveController.vue2.js +13 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
- package/dist/components/organisms/header/RightSlot.vue.js +8 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +9 -8
- package/dist/composables/useAutoSave.js +72 -0
- package/dist/composables/useSave.js +15 -15
- package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
- package/dist/config/migrator/radioButtonMigrator.js +44 -64
- package/dist/enums/unsubscribe.js +34 -27
- package/dist/extensions/Blocks/RadioButton/template.js +1 -1
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/components/Guido.vue.d.ts +1 -1
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/AutoSaveToggle.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/composables/useAutoSave.d.ts +3 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useSave.d.ts +1 -1
- package/dist/src/enums/unsubscribe.d.ts +5 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/stores/autosave.d.ts +6 -0
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/src/utils/timeUtil.d.ts +8 -0
- package/dist/stores/autosave.js +11 -0
- package/dist/utils/timeUtil.js +19 -0
- package/package.json +1 -1
|
@@ -67,6 +67,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
67
67
|
unsubscribe: boolean;
|
|
68
68
|
modulesDisabled: boolean;
|
|
69
69
|
liquidSyntax: boolean;
|
|
70
|
+
autosave: boolean;
|
|
70
71
|
};
|
|
71
72
|
blocks: {
|
|
72
73
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -170,6 +171,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
170
171
|
unsubscribe: boolean;
|
|
171
172
|
modulesDisabled: boolean;
|
|
172
173
|
liquidSyntax: boolean;
|
|
174
|
+
autosave: boolean;
|
|
173
175
|
};
|
|
174
176
|
blocks: {
|
|
175
177
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -273,6 +275,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
273
275
|
unsubscribe: boolean;
|
|
274
276
|
modulesDisabled: boolean;
|
|
275
277
|
liquidSyntax: boolean;
|
|
278
|
+
autosave: boolean;
|
|
276
279
|
};
|
|
277
280
|
blocks: {
|
|
278
281
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -376,6 +379,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
376
379
|
unsubscribe: boolean;
|
|
377
380
|
modulesDisabled: boolean;
|
|
378
381
|
liquidSyntax: boolean;
|
|
382
|
+
autosave: boolean;
|
|
379
383
|
};
|
|
380
384
|
blocks: {
|
|
381
385
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -479,6 +483,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
479
483
|
unsubscribe: boolean;
|
|
480
484
|
modulesDisabled: boolean;
|
|
481
485
|
liquidSyntax: boolean;
|
|
486
|
+
autosave: boolean;
|
|
482
487
|
};
|
|
483
488
|
blocks: {
|
|
484
489
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -582,6 +587,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
582
587
|
unsubscribe: boolean;
|
|
583
588
|
modulesDisabled: boolean;
|
|
584
589
|
liquidSyntax: boolean;
|
|
590
|
+
autosave: boolean;
|
|
585
591
|
};
|
|
586
592
|
blocks: {
|
|
587
593
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -685,6 +691,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
685
691
|
unsubscribe: boolean;
|
|
686
692
|
modulesDisabled: boolean;
|
|
687
693
|
liquidSyntax: boolean;
|
|
694
|
+
autosave: boolean;
|
|
688
695
|
};
|
|
689
696
|
blocks: {
|
|
690
697
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -788,6 +795,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
788
795
|
unsubscribe: boolean;
|
|
789
796
|
modulesDisabled: boolean;
|
|
790
797
|
liquidSyntax: boolean;
|
|
798
|
+
autosave: boolean;
|
|
791
799
|
};
|
|
792
800
|
blocks: {
|
|
793
801
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -891,6 +899,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
891
899
|
unsubscribe: boolean;
|
|
892
900
|
modulesDisabled: boolean;
|
|
893
901
|
liquidSyntax: boolean;
|
|
902
|
+
autosave: boolean;
|
|
894
903
|
};
|
|
895
904
|
blocks: {
|
|
896
905
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -994,6 +1003,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
994
1003
|
unsubscribe: boolean;
|
|
995
1004
|
modulesDisabled: boolean;
|
|
996
1005
|
liquidSyntax: boolean;
|
|
1006
|
+
autosave: boolean;
|
|
997
1007
|
};
|
|
998
1008
|
blocks: {
|
|
999
1009
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1097,6 +1107,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1097
1107
|
unsubscribe: boolean;
|
|
1098
1108
|
modulesDisabled: boolean;
|
|
1099
1109
|
liquidSyntax: boolean;
|
|
1110
|
+
autosave: boolean;
|
|
1100
1111
|
};
|
|
1101
1112
|
blocks: {
|
|
1102
1113
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1200,6 +1211,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1200
1211
|
unsubscribe: boolean;
|
|
1201
1212
|
modulesDisabled: boolean;
|
|
1202
1213
|
liquidSyntax: boolean;
|
|
1214
|
+
autosave: boolean;
|
|
1203
1215
|
};
|
|
1204
1216
|
blocks: {
|
|
1205
1217
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1303,6 +1315,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1303
1315
|
unsubscribe: boolean;
|
|
1304
1316
|
modulesDisabled: boolean;
|
|
1305
1317
|
liquidSyntax: boolean;
|
|
1318
|
+
autosave: boolean;
|
|
1306
1319
|
};
|
|
1307
1320
|
blocks: {
|
|
1308
1321
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1406,6 +1419,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1406
1419
|
unsubscribe: boolean;
|
|
1407
1420
|
modulesDisabled: boolean;
|
|
1408
1421
|
liquidSyntax: boolean;
|
|
1422
|
+
autosave: boolean;
|
|
1409
1423
|
};
|
|
1410
1424
|
blocks: {
|
|
1411
1425
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1509,6 +1523,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1509
1523
|
unsubscribe: boolean;
|
|
1510
1524
|
modulesDisabled: boolean;
|
|
1511
1525
|
liquidSyntax: boolean;
|
|
1526
|
+
autosave: boolean;
|
|
1512
1527
|
};
|
|
1513
1528
|
blocks: {
|
|
1514
1529
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1612,6 +1627,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1612
1627
|
unsubscribe: boolean;
|
|
1613
1628
|
modulesDisabled: boolean;
|
|
1614
1629
|
liquidSyntax: boolean;
|
|
1630
|
+
autosave: boolean;
|
|
1615
1631
|
};
|
|
1616
1632
|
blocks: {
|
|
1617
1633
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1715,6 +1731,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1715
1731
|
unsubscribe: boolean;
|
|
1716
1732
|
modulesDisabled: boolean;
|
|
1717
1733
|
liquidSyntax: boolean;
|
|
1734
|
+
autosave: boolean;
|
|
1718
1735
|
};
|
|
1719
1736
|
blocks: {
|
|
1720
1737
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1818,6 +1835,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1818
1835
|
unsubscribe: boolean;
|
|
1819
1836
|
modulesDisabled: boolean;
|
|
1820
1837
|
liquidSyntax: boolean;
|
|
1838
|
+
autosave: boolean;
|
|
1821
1839
|
};
|
|
1822
1840
|
blocks: {
|
|
1823
1841
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a Date as local time in 24-hour format.
|
|
3
|
+
* Pass `useTimezone = true` to append the UTC offset and city name — useful when the
|
|
4
|
+
* timestamp must clearly communicate the client's timezone.
|
|
5
|
+
* @example formatLocalTime(date) -> 12:20:02
|
|
6
|
+
* @example formatLocalTime(date, true) -> 12:20:02 (UTC+3 Istanbul)
|
|
7
|
+
*/
|
|
8
|
+
export declare const formatLocalTime: (date: Date, useTimezone?: boolean) => string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const r = (t) => {
|
|
2
|
+
const e = -t.getTimezoneOffset(), o = e >= 0 ? "+" : "-", n = Math.abs(e), s = Math.floor(n / 60), i = n % 60;
|
|
3
|
+
return i === 0 ? `UTC${o}${s}` : `UTC${o}${s}:${String(i).padStart(2, "0")}`;
|
|
4
|
+
}, a = () => {
|
|
5
|
+
var e;
|
|
6
|
+
const { timeZone: t } = new Intl.DateTimeFormat().resolvedOptions();
|
|
7
|
+
return ((e = t.split("/").pop()) == null ? void 0 : e.replace(/_/g, " ")) ?? t;
|
|
8
|
+
}, c = (t, e = !1) => {
|
|
9
|
+
const o = t.toLocaleTimeString([], {
|
|
10
|
+
hour: "2-digit",
|
|
11
|
+
hour12: !1,
|
|
12
|
+
minute: "2-digit",
|
|
13
|
+
second: "2-digit"
|
|
14
|
+
});
|
|
15
|
+
return e ? `${o} (${r(t)} ${a()})` : o;
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
c as formatLocalTime
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.2.0-beta.
|
|
3
|
+
"version": "3.2.0-beta.c08c480",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|