@pdfme/schemas 5.3.5 → 5.3.7-dev.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/dist/node/__tests__/barcode.test.js +332 -0
- package/dist/node/__tests__/barcode.test.js.map +1 -0
- package/dist/node/__tests__/multiVariableText.test.js +96 -0
- package/dist/node/__tests__/multiVariableText.test.js.map +1 -0
- package/dist/node/__tests__/text.test.js +409 -0
- package/dist/node/__tests__/text.test.js.map +1 -0
- package/dist/node/__tests__/utils.test.js +132 -0
- package/dist/node/__tests__/utils.test.js.map +1 -0
- package/dist/node/src/barcodes/constants.js +20 -0
- package/dist/node/src/barcodes/constants.js.map +1 -0
- package/dist/node/src/barcodes/helper.js +145 -0
- package/dist/node/src/barcodes/helper.js.map +1 -0
- package/dist/node/src/barcodes/index.js +18 -0
- package/dist/node/src/barcodes/index.js.map +1 -0
- package/dist/node/src/barcodes/pdfRender.js +25 -0
- package/dist/node/src/barcodes/pdfRender.js.map +1 -0
- package/dist/node/src/barcodes/propPanel.js +228 -0
- package/dist/node/src/barcodes/propPanel.js.map +1 -0
- package/dist/node/src/barcodes/types.js +3 -0
- package/dist/node/src/barcodes/types.js.map +1 -0
- package/dist/node/src/barcodes/uiRender.js +89 -0
- package/dist/node/src/barcodes/uiRender.js.map +1 -0
- package/dist/node/src/checkbox/index.js +61 -0
- package/dist/node/src/checkbox/index.js.map +1 -0
- package/dist/node/src/constants.js +6 -0
- package/dist/node/src/constants.js.map +1 -0
- package/dist/node/src/date/date.js +9 -0
- package/dist/node/src/date/date.js.map +1 -0
- package/dist/node/src/date/dateTime.js +9 -0
- package/dist/node/src/date/dateTime.js.map +1 -0
- package/dist/node/src/date/helper.js +420 -0
- package/dist/node/src/date/helper.js.map +1 -0
- package/dist/node/src/date/time.js +9 -0
- package/dist/node/src/date/time.js.map +1 -0
- package/dist/node/src/date/types.js +3 -0
- package/dist/node/src/date/types.js.map +1 -0
- package/dist/node/src/graphics/cacheKey.js +6 -0
- package/dist/node/src/graphics/cacheKey.js.map +1 -0
- package/dist/node/src/graphics/image.js +167 -0
- package/dist/node/src/graphics/image.js.map +1 -0
- package/dist/node/src/graphics/imagehelper.js +124 -0
- package/dist/node/src/graphics/imagehelper.js.map +1 -0
- package/dist/node/src/graphics/svg.js +85 -0
- package/dist/node/src/graphics/svg.js.map +1 -0
- package/dist/node/src/index.js +38 -0
- package/dist/node/src/index.js.map +1 -0
- package/dist/node/src/multiVariableText/helper.js +46 -0
- package/dist/node/src/multiVariableText/helper.js.map +1 -0
- package/dist/node/src/multiVariableText/index.js +16 -0
- package/dist/node/src/multiVariableText/index.js.map +1 -0
- package/dist/node/src/multiVariableText/pdfRender.js +20 -0
- package/dist/node/src/multiVariableText/pdfRender.js.map +1 -0
- package/dist/node/src/multiVariableText/propPanel.js +130 -0
- package/dist/node/src/multiVariableText/propPanel.js.map +1 -0
- package/dist/node/src/multiVariableText/types.js +3 -0
- package/dist/node/src/multiVariableText/types.js.map +1 -0
- package/dist/node/src/multiVariableText/uiRender.js +138 -0
- package/dist/node/src/multiVariableText/uiRender.js.map +1 -0
- package/dist/node/src/radioGroup/index.js +93 -0
- package/dist/node/src/radioGroup/index.js.map +1 -0
- package/dist/node/src/select/index.js +164 -0
- package/dist/node/src/select/index.js.map +1 -0
- package/dist/node/src/shapes/line.js +60 -0
- package/dist/node/src/shapes/line.js.map +1 -0
- package/dist/node/src/shapes/rectAndEllipse.js +122 -0
- package/dist/node/src/shapes/rectAndEllipse.js.map +1 -0
- package/dist/node/src/tables/cell.js +126 -0
- package/dist/node/src/tables/cell.js.map +1 -0
- package/dist/node/src/tables/classes.js +467 -0
- package/dist/node/src/tables/classes.js.map +1 -0
- package/dist/node/src/tables/dynamicTemplate.js +17 -0
- package/dist/node/src/tables/dynamicTemplate.js.map +1 -0
- package/dist/node/src/tables/helper.js +189 -0
- package/dist/node/src/tables/helper.js.map +1 -0
- package/dist/node/src/tables/index.js +15 -0
- package/dist/node/src/tables/index.js.map +1 -0
- package/dist/node/src/tables/pdfRender.js +95 -0
- package/dist/node/src/tables/pdfRender.js.map +1 -0
- package/dist/node/src/tables/propPanel.js +101 -0
- package/dist/node/src/tables/propPanel.js.map +1 -0
- package/dist/node/src/tables/tableHelper.js +196 -0
- package/dist/node/src/tables/tableHelper.js.map +1 -0
- package/dist/node/src/tables/types.js +3 -0
- package/dist/node/src/tables/types.js.map +1 -0
- package/dist/node/src/tables/uiRender.js +367 -0
- package/dist/node/src/tables/uiRender.js.map +1 -0
- package/dist/node/src/text/constants.js +97 -0
- package/dist/node/src/text/constants.js.map +1 -0
- package/dist/node/src/text/extraFormatter.js +48 -0
- package/dist/node/src/text/extraFormatter.js.map +1 -0
- package/dist/node/src/text/helper.js +472 -0
- package/dist/node/src/text/helper.js.map +1 -0
- package/dist/node/src/text/icons/index.js +16 -0
- package/dist/node/src/text/icons/index.js.map +1 -0
- package/dist/node/src/text/index.js +15 -0
- package/dist/node/src/text/index.js.map +1 -0
- package/dist/node/src/text/pdfRender.js +156 -0
- package/dist/node/src/text/pdfRender.js.map +1 -0
- package/dist/node/src/text/propPanel.js +161 -0
- package/dist/node/src/text/propPanel.js.map +1 -0
- package/dist/node/src/text/types.js +3 -0
- package/dist/node/src/text/types.js.map +1 -0
- package/dist/node/src/text/uiRender.js +223 -0
- package/dist/node/src/text/uiRender.js.map +1 -0
- package/dist/node/src/utils.js +190 -0
- package/dist/node/src/utils.js.map +1 -0
- package/package.json +11 -4
- package/tsconfig.cjs.json +1 -1
- package/tsconfig.esm.json +1 -1
- package/tsconfig.node.json +10 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dateTime.js","sourceRoot":"","sources":["../../../../src/date/dateTime.ts"],"names":[],"mappings":";;AAAA,qCAAqC;AACrC,0CAA2C;AAC3C,mCAAuC;AAEvC,MAAM,IAAI,GAAG,UAAU,CAAC;AAExB,MAAM,IAAI,GAAG,IAAA,uBAAY,EAAC,sBAAa,CAAC,CAAC;AAEzC,kBAAe,IAAA,kBAAS,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC"}
|
@@ -0,0 +1,420 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.getPlugin = void 0;
|
30
|
+
const air_datepicker_1 = __importDefault(require("air-datepicker"));
|
31
|
+
const ar_1 = __importDefault(require("air-datepicker/locale/ar"));
|
32
|
+
const bg_1 = __importDefault(require("air-datepicker/locale/bg"));
|
33
|
+
const ca_1 = __importDefault(require("air-datepicker/locale/ca"));
|
34
|
+
const cs_1 = __importDefault(require("air-datepicker/locale/cs"));
|
35
|
+
const da_1 = __importDefault(require("air-datepicker/locale/da"));
|
36
|
+
const de_1 = __importDefault(require("air-datepicker/locale/de"));
|
37
|
+
const el_1 = __importDefault(require("air-datepicker/locale/el"));
|
38
|
+
const en_1 = __importDefault(require("air-datepicker/locale/en"));
|
39
|
+
const es_1 = __importDefault(require("air-datepicker/locale/es"));
|
40
|
+
const eu_1 = __importDefault(require("air-datepicker/locale/eu"));
|
41
|
+
const fi_1 = __importDefault(require("air-datepicker/locale/fi"));
|
42
|
+
const fr_1 = __importDefault(require("air-datepicker/locale/fr"));
|
43
|
+
const hr_1 = __importDefault(require("air-datepicker/locale/hr"));
|
44
|
+
const hu_1 = __importDefault(require("air-datepicker/locale/hu"));
|
45
|
+
const id_1 = __importDefault(require("air-datepicker/locale/id"));
|
46
|
+
const it_1 = __importDefault(require("air-datepicker/locale/it"));
|
47
|
+
const ja_1 = __importDefault(require("air-datepicker/locale/ja"));
|
48
|
+
const ko_1 = __importDefault(require("air-datepicker/locale/ko"));
|
49
|
+
const nb_1 = __importDefault(require("air-datepicker/locale/nb"));
|
50
|
+
const nl_1 = __importDefault(require("air-datepicker/locale/nl"));
|
51
|
+
const th_1 = __importDefault(require("air-datepicker/locale/th"));
|
52
|
+
const pl_1 = __importDefault(require("air-datepicker/locale/pl"));
|
53
|
+
const pt_BR_1 = __importDefault(require("air-datepicker/locale/pt-BR"));
|
54
|
+
const pt_1 = __importDefault(require("air-datepicker/locale/pt"));
|
55
|
+
const ro_1 = __importDefault(require("air-datepicker/locale/ro"));
|
56
|
+
const ru_1 = __importDefault(require("air-datepicker/locale/ru"));
|
57
|
+
const si_1 = __importDefault(require("air-datepicker/locale/si"));
|
58
|
+
const sk_1 = __importDefault(require("air-datepicker/locale/sk"));
|
59
|
+
const sl_1 = __importDefault(require("air-datepicker/locale/sl"));
|
60
|
+
const sv_1 = __importDefault(require("air-datepicker/locale/sv"));
|
61
|
+
const tr_1 = __importDefault(require("air-datepicker/locale/tr"));
|
62
|
+
const uk_1 = __importDefault(require("air-datepicker/locale/uk"));
|
63
|
+
const zh_1 = __importDefault(require("air-datepicker/locale/zh"));
|
64
|
+
const dateFns = __importStar(require("date-fns/locale"));
|
65
|
+
const date_fns_1 = require("date-fns");
|
66
|
+
const common_1 = require("@pdfme/common");
|
67
|
+
const text_1 = __importDefault(require("../text"));
|
68
|
+
const constants_js_1 = require("../constants.js");
|
69
|
+
const uiRender_1 = require("../text/uiRender");
|
70
|
+
const constants_js_2 = require("../text/constants.js");
|
71
|
+
const extraFormatter_1 = require("../text/extraFormatter");
|
72
|
+
const utils_1 = require("../utils");
|
73
|
+
const LOCALE_MAP = {
|
74
|
+
ar: { label: 'Arabic', adLocale: ar_1.default, formatLocale: dateFns.ar },
|
75
|
+
bg: { label: 'Bulgarian', adLocale: bg_1.default, formatLocale: dateFns.bg },
|
76
|
+
ca: { label: 'Catalan', adLocale: ca_1.default, formatLocale: dateFns.ca },
|
77
|
+
cs: { label: 'Czech', adLocale: cs_1.default, formatLocale: dateFns.cs },
|
78
|
+
da: { label: 'Danish', adLocale: da_1.default, formatLocale: dateFns.da },
|
79
|
+
de: { label: 'German', adLocale: de_1.default, formatLocale: dateFns.de },
|
80
|
+
el: { label: 'Greek', adLocale: el_1.default, formatLocale: dateFns.el },
|
81
|
+
en: { label: 'English', adLocale: en_1.default, formatLocale: dateFns.enUS },
|
82
|
+
es: { label: 'Spanish', adLocale: es_1.default, formatLocale: dateFns.es },
|
83
|
+
eu: { label: 'Basque', adLocale: eu_1.default, formatLocale: dateFns.eu },
|
84
|
+
fi: { label: 'Finnish', adLocale: fi_1.default, formatLocale: dateFns.fi },
|
85
|
+
fr: { label: 'French', adLocale: fr_1.default, formatLocale: dateFns.fr },
|
86
|
+
hr: { label: 'Croatian', adLocale: hr_1.default, formatLocale: dateFns.hr },
|
87
|
+
hu: { label: 'Hungarian', adLocale: hu_1.default, formatLocale: dateFns.hu },
|
88
|
+
id: { label: 'Indonesian', adLocale: id_1.default, formatLocale: dateFns.id },
|
89
|
+
it: { label: 'Italian', adLocale: it_1.default, formatLocale: dateFns.it },
|
90
|
+
ja: { label: 'Japanese', adLocale: ja_1.default, formatLocale: dateFns.ja },
|
91
|
+
ko: { label: 'Korean', adLocale: ko_1.default, formatLocale: dateFns.ko },
|
92
|
+
nb: { label: 'Norwegian Bokmål', adLocale: nb_1.default, formatLocale: dateFns.nb },
|
93
|
+
nl: { label: 'Dutch', adLocale: nl_1.default, formatLocale: dateFns.nl },
|
94
|
+
pl: { label: 'Polish', adLocale: pl_1.default, formatLocale: dateFns.pl },
|
95
|
+
'pt-Br': { label: 'Portuguese', adLocale: pt_BR_1.default, formatLocale: dateFns.ptBR },
|
96
|
+
pt: { label: 'Portuguese', adLocale: pt_1.default, formatLocale: dateFns.pt },
|
97
|
+
ro: { label: 'Romanian', adLocale: ro_1.default, formatLocale: dateFns.ro },
|
98
|
+
ru: { label: 'Russian', adLocale: ru_1.default, formatLocale: dateFns.ru },
|
99
|
+
si: { label: 'Sinhala', adLocale: si_1.default, formatLocale: dateFns.enUS },
|
100
|
+
sk: { label: 'Slovak', adLocale: sk_1.default, formatLocale: dateFns.sk },
|
101
|
+
sl: { label: 'Slovenian', adLocale: sl_1.default, formatLocale: dateFns.sl },
|
102
|
+
sv: { label: 'Swedish', adLocale: sv_1.default, formatLocale: dateFns.sv },
|
103
|
+
th: { label: 'Thai', adLocale: th_1.default, formatLocale: dateFns.th },
|
104
|
+
tr: { label: 'Turkish', adLocale: tr_1.default, formatLocale: dateFns.tr },
|
105
|
+
uk: { label: 'Ukrainian', adLocale: uk_1.default, formatLocale: dateFns.uk },
|
106
|
+
zh: { label: 'Chinese', adLocale: zh_1.default, formatLocale: dateFns.zhCN },
|
107
|
+
};
|
108
|
+
const getAirDatepickerLocale = (locale) => {
|
109
|
+
const data = LOCALE_MAP[locale];
|
110
|
+
if (!data) {
|
111
|
+
throw new Error(`Unsupported locale: ${locale}`);
|
112
|
+
}
|
113
|
+
return data;
|
114
|
+
};
|
115
|
+
const airDatepickerCss = `.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);box-sizing:border-box;cursor:pointer;display:flex;position:relative;align-items:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover,.air-datepicker-cell.-in-range-.-focus-{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}
|
116
|
+
.air-datepicker-body{transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7, var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:flex;align-items:center;justify-content:center;flex:1;text-align:center;text-transform:uppercase;font-size:.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7, var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3, 1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4, 1fr);grid-auto-rows:var(--adp-year-cell-height)}
|
117
|
+
.air-datepicker-nav{display:flex;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:flex;cursor:pointer;align-items:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}
|
118
|
+
.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255,255,255,0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:flex;align-items:center;justify-content:center;width:100%;height:100%}
|
119
|
+
.air-datepicker-time{display:grid;grid-template-columns:max-content 1fr;grid-column-gap:12px;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:flex;align-items:center;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:"";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:flex;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right, var(--adp-time-track-color), var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size)/2*-1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0,0,0,0)}
|
120
|
+
.air-datepicker{--adp-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--adp-font-size: 14px;--adp-width: 246px;--adp-z-index: 100;--adp-padding: 4px;--adp-grid-areas: "nav" "body" "timepicker" "buttons";--adp-transition-duration: .3s;--adp-transition-ease: ease-out;--adp-transition-offset: 8px;--adp-background-color: #fff;--adp-background-color-hover: #f0f0f0;--adp-background-color-active: #eaeaea;--adp-background-color-in-range: rgba(92, 196, 239, .1);--adp-background-color-in-range-focused: rgba(92, 196, 239, .2);--adp-background-color-selected-other-month-focused: #8ad5f4;--adp-background-color-selected-other-month: #a2ddf6;--adp-color: #4a4a4a;--adp-color-secondary: #9c9c9c;--adp-accent-color: #4eb5e6;--adp-color-current-date: var(--adp-accent-color);--adp-color-other-month: #dedede;--adp-color-disabled: #aeaeae;--adp-color-disabled-in-range: #939393;--adp-color-other-month-hover: #c5c5c5;--adp-border-color: #dbdbdb;--adp-border-color-inner: #efefef;--adp-border-radius: 4px;--adp-border-color-inline: #d7d7d7;--adp-nav-height: 32px;--adp-nav-arrow-color: var(--adp-color-secondary);--adp-nav-action-size: 32px;--adp-nav-color-secondary: var(--adp-color-secondary);--adp-day-name-color: #ff9a19;--adp-day-name-color-hover: #8ad5f4;--adp-day-cell-width: 1fr;--adp-day-cell-height: 32px;--adp-month-cell-height: 42px;--adp-year-cell-height: 56px;--adp-pointer-size: 10px;--adp-poiner-border-radius: 2px;--adp-pointer-offset: 14px;--adp-cell-border-radius: 4px;--adp-cell-background-color-hover: var(--adp-background-color-hover);--adp-cell-background-color-selected: #5cc4ef;--adp-cell-background-color-selected-hover: #45bced;--adp-cell-background-color-in-range: rgba(92, 196, 239, 0.1);--adp-cell-background-color-in-range-hover: rgba(92, 196, 239, 0.2);--adp-cell-border-color-in-range: var(--adp-cell-background-color-selected);--adp-btn-height: 32px;--adp-btn-color: var(--adp-accent-color);--adp-btn-color-hover: var(--adp-color);--adp-btn-border-radius: var(--adp-border-radius);--adp-btn-background-color-hover: var(--adp-background-color-hover);--adp-btn-background-color-active: var(--adp-background-color-active);--adp-time-track-height: 1px;--adp-time-track-color: #dedede;--adp-time-track-color-hover: #b1b1b1;--adp-time-thumb-size: 12px;--adp-time-padding-inner: 10px;--adp-time-day-period-color: var(--adp-color-secondary);--adp-mobile-font-size: 16px;--adp-mobile-nav-height: 40px;--adp-mobile-width: 320px;--adp-mobile-day-cell-height: 38px;--adp-mobile-month-cell-height: 48px;--adp-mobile-year-cell-height: 64px}.air-datepicker-overlay{--adp-overlay-background-color: rgba(0, 0, 0, .3);--adp-overlay-transition-duration: .3s;--adp-overlay-transition-ease: ease-out;--adp-overlay-z-index: 99}
|
121
|
+
.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);box-shadow:0 4px 12px rgba(0,0,0,.15);border-radius:var(--adp-border-radius);box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4, max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family),sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;transition:opacity var(--adp-transition-duration) var(--adp-transition-ease),transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){transform:translate(0, 0);opacity:1}.air-datepicker.-active-.-custom-position-{transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);box-shadow:none;position:static;left:auto;right:auto;opacity:1;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size: var(--adp-mobile-font-size);--adp-day-cell-height: var(--adp-mobile-day-cell-height);--adp-month-cell-height: var(--adp-mobile-month-cell-height);--adp-year-cell-height: var(--adp-mobile-year-cell-height);--adp-nav-height: var(--adp-mobile-nav-height);--adp-nav-action-size: var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0,0,0,0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){transform:translate(-50%, calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){transform:translate(-50%, -50%)}.air-datepicker.-custom-position-{transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size: calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:"";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size)/2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size)/2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),left 0s,height 0s,width 0s;transition-delay:0s,var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),height 0s,width 0s}`;
|
122
|
+
const injectStyles = (css) => {
|
123
|
+
if (typeof document !== 'undefined') {
|
124
|
+
const styleElementId = 'pdfme-air-datepicker-styles';
|
125
|
+
if (!document.getElementById(styleElementId)) {
|
126
|
+
const style = document.createElement('style');
|
127
|
+
style.id = styleElementId;
|
128
|
+
style.type = 'text/css';
|
129
|
+
style.appendChild(document.createTextNode(css));
|
130
|
+
document.head.appendChild(style);
|
131
|
+
}
|
132
|
+
}
|
133
|
+
};
|
134
|
+
const strDateToDate = (strDate, type) => {
|
135
|
+
if (!strDate.trim()) {
|
136
|
+
return new Date();
|
137
|
+
}
|
138
|
+
if (type === 'time') {
|
139
|
+
const dateTimePattern = /^\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}$/;
|
140
|
+
if (dateTimePattern.test(strDate)) {
|
141
|
+
return new Date(strDate.replace(/\//g, '-').replace(' ', 'T'));
|
142
|
+
}
|
143
|
+
return new Date(`2021-01-01T${strDate}`);
|
144
|
+
}
|
145
|
+
return new Date(strDate);
|
146
|
+
};
|
147
|
+
const getFormat = (type, locale) => {
|
148
|
+
switch (type) {
|
149
|
+
case 'date': {
|
150
|
+
return locale.adLocale.dateFormat;
|
151
|
+
}
|
152
|
+
case 'time': {
|
153
|
+
return 'HH:mm';
|
154
|
+
}
|
155
|
+
case 'dateTime': {
|
156
|
+
return `${locale.adLocale.dateFormat} ${locale.adLocale.timeFormat}`;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
};
|
160
|
+
const getFmtValue = (value, type, schema, locale) => {
|
161
|
+
return value
|
162
|
+
? (0, date_fns_1.format)(strDateToDate(value, type), schema.format, {
|
163
|
+
locale: locale.formatLocale,
|
164
|
+
})
|
165
|
+
: '';
|
166
|
+
};
|
167
|
+
const getFmtContent = (date, type) => {
|
168
|
+
const fmt = (() => {
|
169
|
+
switch (type) {
|
170
|
+
case 'date': {
|
171
|
+
return 'yyyy/MM/dd';
|
172
|
+
}
|
173
|
+
case 'time': {
|
174
|
+
return 'HH:mm';
|
175
|
+
}
|
176
|
+
case 'dateTime': {
|
177
|
+
return 'yyyy/MM/dd HH:mm';
|
178
|
+
}
|
179
|
+
}
|
180
|
+
})();
|
181
|
+
return date ? (0, date_fns_1.format)(date, fmt) : '';
|
182
|
+
};
|
183
|
+
const getPlugin = ({ type, icon }) => {
|
184
|
+
const defaultLocale = 'en';
|
185
|
+
const defaultFormat = getFormat(type, getAirDatepickerLocale(defaultLocale));
|
186
|
+
const plugin = {
|
187
|
+
ui: async (arg) => {
|
188
|
+
const { schema, value, onChange, rootElement, mode, options, i18n } = arg;
|
189
|
+
const locale = getAirDatepickerLocale(schema.locale || options.lang || defaultLocale);
|
190
|
+
const textElement = document.createElement('div');
|
191
|
+
const textElementStyle = {
|
192
|
+
width: `${schema.width}mm`,
|
193
|
+
height: `${schema.height}mm`,
|
194
|
+
display: 'flex',
|
195
|
+
flexDirection: 'column',
|
196
|
+
justifyContent: (0, uiRender_1.mapVerticalAlignToFlex)(constants_js_2.VERTICAL_ALIGN_MIDDLE),
|
197
|
+
};
|
198
|
+
Object.assign(textElement.style, textElementStyle);
|
199
|
+
await text_1.default.ui({
|
200
|
+
...arg,
|
201
|
+
rootElement: textElement,
|
202
|
+
mode: 'viewer',
|
203
|
+
value: getFmtValue(value, type, schema, locale),
|
204
|
+
schema: {
|
205
|
+
...schema,
|
206
|
+
verticalAlignment: constants_js_2.VERTICAL_ALIGN_MIDDLE,
|
207
|
+
lineHeight: constants_js_2.DEFAULT_LINE_HEIGHT,
|
208
|
+
},
|
209
|
+
});
|
210
|
+
injectStyles(airDatepickerCss);
|
211
|
+
const beforeRemoveEvent = new Event('beforeRemove');
|
212
|
+
rootElement.dispatchEvent(beforeRemoveEvent);
|
213
|
+
const input = document.createElement('input');
|
214
|
+
Object.assign(input.style, { visibility: 'hidden', position: 'absolute' });
|
215
|
+
const commitChange = (date) => {
|
216
|
+
if (onChange) {
|
217
|
+
onChange({ key: 'content', value: getFmtContent(date, type) });
|
218
|
+
}
|
219
|
+
};
|
220
|
+
const adButtons = [
|
221
|
+
{
|
222
|
+
content: i18n('cancel'),
|
223
|
+
onClick: (datepicker) => {
|
224
|
+
datepicker.hide();
|
225
|
+
},
|
226
|
+
},
|
227
|
+
{
|
228
|
+
content: i18n('clear'),
|
229
|
+
onClick: (datepicker) => {
|
230
|
+
datepicker.hide();
|
231
|
+
commitChange(null);
|
232
|
+
},
|
233
|
+
},
|
234
|
+
];
|
235
|
+
if (type !== 'date') {
|
236
|
+
adButtons.push({
|
237
|
+
content: i18n('set'),
|
238
|
+
onClick: (datepicker) => {
|
239
|
+
datepicker.hide();
|
240
|
+
const date = datepicker.selectedDates.length ? datepicker.selectedDates[0] : null;
|
241
|
+
commitChange(date);
|
242
|
+
},
|
243
|
+
});
|
244
|
+
}
|
245
|
+
const airDatepicker = new air_datepicker_1.default(input, {
|
246
|
+
locale: locale.adLocale,
|
247
|
+
selectedDates: [strDateToDate(value, type)],
|
248
|
+
dateFormat: (date) => (0, date_fns_1.format)(date, schema.format, { locale: locale.formatLocale }),
|
249
|
+
timepicker: type !== 'date',
|
250
|
+
onlyTimepicker: type === 'time',
|
251
|
+
isMobile: window.innerWidth < 768,
|
252
|
+
buttons: adButtons,
|
253
|
+
onSelect: ({ datepicker }) => {
|
254
|
+
if (type === 'date') {
|
255
|
+
commitChange(datepicker.selectedDates.length ? datepicker.selectedDates[0] : null);
|
256
|
+
datepicker.hide();
|
257
|
+
}
|
258
|
+
},
|
259
|
+
});
|
260
|
+
rootElement.addEventListener('beforeRemove', () => {
|
261
|
+
if ((0, utils_1.isEditable)(mode, schema)) {
|
262
|
+
airDatepicker.destroy();
|
263
|
+
}
|
264
|
+
});
|
265
|
+
textElement.addEventListener('click', () => {
|
266
|
+
if ((0, utils_1.isEditable)(mode, schema)) {
|
267
|
+
airDatepicker.show();
|
268
|
+
}
|
269
|
+
});
|
270
|
+
rootElement.appendChild(input);
|
271
|
+
rootElement.appendChild(textElement);
|
272
|
+
},
|
273
|
+
pdf: (arg) => {
|
274
|
+
const { schema, value, options } = arg;
|
275
|
+
if (!value)
|
276
|
+
return void 0;
|
277
|
+
const locale = getAirDatepickerLocale(schema.locale || options.lang || defaultLocale);
|
278
|
+
return text_1.default.pdf({
|
279
|
+
...arg,
|
280
|
+
value: getFmtValue(value, type, schema, locale),
|
281
|
+
schema: {
|
282
|
+
...schema,
|
283
|
+
verticalAlignment: constants_js_2.VERTICAL_ALIGN_MIDDLE,
|
284
|
+
lineHeight: constants_js_2.DEFAULT_LINE_HEIGHT,
|
285
|
+
},
|
286
|
+
});
|
287
|
+
},
|
288
|
+
propPanel: {
|
289
|
+
schema: ({ options, i18n, activeSchema, changeSchemas }) => {
|
290
|
+
const font = options.font || { [common_1.DEFAULT_FONT_NAME]: { data: '', fallback: true } };
|
291
|
+
const fontNames = Object.keys(font);
|
292
|
+
const fallbackFontName = (0, common_1.getFallbackFontName)(font);
|
293
|
+
const locale = getAirDatepickerLocale(activeSchema.locale || options.lang || defaultLocale);
|
294
|
+
if (activeSchema.locale === undefined &&
|
295
|
+
activeSchema.locale !== options.lang) {
|
296
|
+
changeSchemas([
|
297
|
+
{ schemaId: activeSchema.id, key: 'locale', value: options.lang },
|
298
|
+
{ schemaId: activeSchema.id, key: 'format', value: getFormat(type, locale) },
|
299
|
+
]);
|
300
|
+
}
|
301
|
+
const formatter = (0, extraFormatter_1.getExtraFormatterSchema)(i18n);
|
302
|
+
formatter.buttons = formatter.buttons.filter((button) => button.key === extraFormatter_1.Formatter.ALIGNMENT);
|
303
|
+
const validateDateTimeFormat = (_rule, formatString) => {
|
304
|
+
try {
|
305
|
+
(0, date_fns_1.format)('Thu Jan 01 1970 00:00:00 GMT+0000', formatString, {
|
306
|
+
locale: locale.formatLocale,
|
307
|
+
});
|
308
|
+
return true;
|
309
|
+
}
|
310
|
+
catch (_err) {
|
311
|
+
return false;
|
312
|
+
}
|
313
|
+
};
|
314
|
+
const localeOptions = Object.keys(LOCALE_MAP).map((lc) => ({
|
315
|
+
label: `${lc} (${LOCALE_MAP[lc].label})`,
|
316
|
+
value: lc,
|
317
|
+
}));
|
318
|
+
const dateSchema = {
|
319
|
+
format: {
|
320
|
+
title: i18n('schemas.date.format'),
|
321
|
+
type: 'string',
|
322
|
+
default: getFormat(type, locale),
|
323
|
+
placeholder: getFormat(type, locale),
|
324
|
+
rules: [
|
325
|
+
{
|
326
|
+
validator: validateDateTimeFormat,
|
327
|
+
message: i18n('validation.dateTimeFormat'),
|
328
|
+
},
|
329
|
+
],
|
330
|
+
span: 24,
|
331
|
+
},
|
332
|
+
fontName: {
|
333
|
+
title: i18n('schemas.text.fontName'),
|
334
|
+
type: 'string',
|
335
|
+
widget: 'select',
|
336
|
+
default: fallbackFontName,
|
337
|
+
placeholder: fallbackFontName,
|
338
|
+
props: { options: fontNames.map((name) => ({ label: name, value: name })) },
|
339
|
+
span: 12,
|
340
|
+
},
|
341
|
+
fontSize: {
|
342
|
+
title: i18n('schemas.text.size'),
|
343
|
+
type: 'number',
|
344
|
+
widget: 'inputNumber',
|
345
|
+
span: 6,
|
346
|
+
props: { min: 0 },
|
347
|
+
},
|
348
|
+
characterSpacing: {
|
349
|
+
title: i18n('schemas.text.spacing'),
|
350
|
+
type: 'number',
|
351
|
+
widget: 'inputNumber',
|
352
|
+
span: 6,
|
353
|
+
props: { min: 0 },
|
354
|
+
},
|
355
|
+
formatter,
|
356
|
+
fontColor: {
|
357
|
+
title: i18n('schemas.textColor'),
|
358
|
+
type: 'string',
|
359
|
+
widget: 'color',
|
360
|
+
props: {
|
361
|
+
disabledAlpha: true,
|
362
|
+
},
|
363
|
+
rules: [
|
364
|
+
{
|
365
|
+
pattern: constants_js_1.HEX_COLOR_PATTERN,
|
366
|
+
message: i18n('validation.hexColor'),
|
367
|
+
},
|
368
|
+
],
|
369
|
+
},
|
370
|
+
backgroundColor: {
|
371
|
+
title: i18n('schemas.bgColor'),
|
372
|
+
type: 'string',
|
373
|
+
widget: 'color',
|
374
|
+
props: {
|
375
|
+
disabledAlpha: true,
|
376
|
+
},
|
377
|
+
rules: [
|
378
|
+
{
|
379
|
+
pattern: constants_js_1.HEX_COLOR_PATTERN,
|
380
|
+
message: i18n('validation.hexColor'),
|
381
|
+
},
|
382
|
+
],
|
383
|
+
},
|
384
|
+
locale: {
|
385
|
+
title: i18n('schemas.date.locale'),
|
386
|
+
type: 'string',
|
387
|
+
widget: 'select',
|
388
|
+
props: {
|
389
|
+
options: localeOptions,
|
390
|
+
},
|
391
|
+
span: 16,
|
392
|
+
},
|
393
|
+
};
|
394
|
+
return dateSchema;
|
395
|
+
},
|
396
|
+
defaultSchema: {
|
397
|
+
name: '',
|
398
|
+
format: defaultFormat,
|
399
|
+
type,
|
400
|
+
content: getFmtContent(new Date(), type),
|
401
|
+
position: { x: 0, y: 0 },
|
402
|
+
width: 50,
|
403
|
+
height: 10,
|
404
|
+
rotate: 0,
|
405
|
+
alignment: constants_js_2.DEFAULT_ALIGNMENT,
|
406
|
+
fontSize: constants_js_2.DEFAULT_FONT_SIZE,
|
407
|
+
characterSpacing: constants_js_2.DEFAULT_CHARACTER_SPACING,
|
408
|
+
fontColor: constants_js_2.DEFAULT_FONT_COLOR,
|
409
|
+
fontName: undefined,
|
410
|
+
backgroundColor: '',
|
411
|
+
locale: undefined,
|
412
|
+
opacity: constants_js_1.DEFAULT_OPACITY,
|
413
|
+
},
|
414
|
+
},
|
415
|
+
icon,
|
416
|
+
};
|
417
|
+
return plugin;
|
418
|
+
};
|
419
|
+
exports.getPlugin = getPlugin;
|
420
|
+
//# sourceMappingURL=helper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../src/date/helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,oEAA2C;AAE3C,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,wEAAqD;AACrD,kEAAgD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AyB;gBAC3C,SAAS,EAAE,iCAAkB;gBAC7B,QAAQ,EAAE,SAAS;gBACnB,eAAe,EAAE,EAAE;gBACnB,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,8BAAe;aACzB;SACF;QACD,IAAI;KACL,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAnQW,QAAA,SAAS,aAmQpB"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const helper_1 = require("./helper");
|
4
|
+
const utils_js_1 = require("../utils.js");
|
5
|
+
const lucide_1 = require("lucide");
|
6
|
+
const type = 'time';
|
7
|
+
const icon = (0, utils_js_1.createSvgStr)(lucide_1.Clock);
|
8
|
+
exports.default = (0, helper_1.getPlugin)({ type, icon });
|
9
|
+
//# sourceMappingURL=time.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"time.js","sourceRoot":"","sources":["../../../../src/date/time.ts"],"names":[],"mappings":";;AAAA,qCAAqC;AACrC,0CAA2C;AAC3C,mCAA+B;AAE/B,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,MAAM,IAAI,GAAG,IAAA,uBAAY,EAAC,cAAK,CAAC,CAAC;AAEjC,kBAAe,IAAA,kBAAS,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/date/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cacheKey.js","sourceRoot":"","sources":["../../../../src/graphics/cacheKey.ts"],"names":[],"mappings":";;;AAEO,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,KAAa,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,GAAG,KAAK,EAAE,CAAC;AAA1E,QAAA,WAAW,eAA+D"}
|