@orangelogic/design-system 3.52.0 → 3.53.0
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/library/assets/validation.worker-CATXl-v2.js +1 -0
- package/library/chunks/{alert.CuW7fOVy.js → alert.l5EVK3-E.js} +2 -2
- package/library/chunks/{array-line-clamp.VOjhwp2T.js → array-line-clamp.CaiICVna.js} +2 -2
- package/library/chunks/{asset-link-format.DW4-Yf4S.js → asset-link-format.CylxIiPd.js} +9 -9
- package/library/chunks/{audio.D_O5ecXD.js → audio.BDjVHTU2.js} +2 -2
- package/library/chunks/{bicolor-picker.DKcKLKki.js → bicolor-picker.CHeZU9u5.js} +1 -1
- package/library/chunks/{block-width.DGKtI0si.js → block-width.RHVYimlE.js} +158 -158
- package/library/chunks/{border-input-group.Bo4n74DK.js → border-input-group.DitDsVli.js} +3 -3
- package/library/chunks/{breadcrumb.qggcceb5.js → breadcrumb.wAs0dDVb.js} +1 -1
- package/library/chunks/{button.Ccrk9fUD.js → button.HVChe9zT.js} +2 -2
- package/library/chunks/{color-picker.DJWwlNQc.js → color-picker.DjOq0eFi.js} +10 -10
- package/library/chunks/{color-swatch-group.DSNjAqYx.js → color-swatch-group.9Qx8Gvf2.js} +689 -613
- package/library/chunks/{color-swatch._892g6OH.js → color-swatch.Czkv1Mbb.js} +3 -3
- package/library/chunks/{config-manager.CQA-H3Np.js → config-manager.DjYQhlA6.js} +27 -27
- package/library/chunks/{configs-controller.BXb0_Hg2.js → configs-controller.DM4UNL35.js} +55 -7
- package/library/chunks/{confirm-popover.BjAGzV05.js → confirm-popover.CmkU5LOc.js} +4 -4
- package/library/chunks/{copy-button.BLHge7EN.js → copy-button.Db9OgUsk.js} +2 -2
- package/library/chunks/{corner-position-input-group.BAvx6UsV.js → corner-position-input-group.DtjehmV9.js} +4 -4
- package/library/chunks/{date-calendar.UWxXkZCn.js → date-calendar.QH4E3gcB.js} +1 -1
- package/library/chunks/{details.DLqFxjTf.js → details.QX575PyS.js} +1 -1
- package/library/chunks/{dialog.Dw-WUyD8.js → dialog.BpXFrOri.js} +3 -3
- package/library/chunks/{document-viewer.B7_Adb8g.js → document-viewer.C6pZUsMP.js} +13 -13
- package/library/chunks/{dot-pagination.CSSalEx6.js → dot-pagination.DecVZgSJ.js} +2 -2
- package/library/chunks/{drawer.tfa9-G6a.js → drawer.DL2AzbcX.js} +2 -2
- package/library/chunks/{dropdown.DUfiVpFI.js → dropdown.jJJ_wxJN.js} +4 -4
- package/library/chunks/{dynamic-select.o5G8iUV1.js → dynamic-select.Di2M5NWC.js} +5 -5
- package/library/chunks/{e-chart.BopkVc04.js → e-chart.c19ibTnT.js} +2 -2
- package/library/chunks/{element-clamp.DzR3w7RX.js → element-clamp.B-sumN97.js} +2 -2
- package/library/chunks/{file-on-demand.D7bLG0JA.js → file-on-demand.P_3uP0Ur.js} +16 -16
- package/library/chunks/{folder-select.DA7Ezy8P.js → folder-select.33VMtLnU.js} +7 -7
- package/library/chunks/{format-time.BO9Y72qk.js → format-time.Dfu1FCrK.js} +1 -1
- package/library/chunks/{header.BaWpIXRz.js → header.BosjiWVg.js} +2 -2
- package/library/chunks/{i18n.BMXeDUpk.js → i18n.D_iHIFdS.js} +3 -0
- package/library/chunks/{icon-button.CziUJUiX.js → icon-button.D6mTxvLN.js} +2 -2
- package/library/chunks/{iframe.BnAR2-o2.js → iframe.C7j4Uzku.js} +1 -1
- package/library/chunks/{image-comparer.DStatUUS.js → image-comparer.D7C-cLm6.js} +1 -1
- package/library/chunks/{image.DzFSYcXq.js → image.nqoaGkQd.js} +11 -4
- package/library/chunks/{input.B3HfssSr.js → input.C44u0jQi.js} +1 -1
- package/library/chunks/{line-clamp.DV3tlosD.js → line-clamp.C7M133Jo.js} +2 -2
- package/library/chunks/{markdown.C-q35PEY.js → markdown.B6J44eJB.js} +2 -2
- package/library/chunks/{masonry.D7YK0FcU.js → masonry.CsJC8M6I.js} +3 -3
- package/library/chunks/{menu-item.D-IE19Jn.js → menu-item.UQ_IlBEV.js} +3 -3
- package/library/chunks/{menu.3akay3Bh.js → menu.BTt3TxEj.js} +2 -2
- package/library/chunks/{option.9V-nTQp7.js → option.CizwUJwq.js} +1 -1
- package/library/chunks/{padding-input-group.DKIv6567.js → padding-input-group.CSYzP2s4.js} +1 -1
- package/library/chunks/{pagination.Cs-s_PTI.js → pagination.Dgn16y4P.js} +7 -7
- package/library/chunks/{popup.CxGrVXG-.js → popup.DwPq0yI9.js} +1 -1
- package/library/chunks/{position-picker.CyXlSYCi.js → position-picker.aNCROlig.js} +1 -1
- package/library/chunks/{progress-bar.Cp8jz3Cn.js → progress-bar.VFfb2YnK.js} +1 -1
- package/library/chunks/{progress-ring.CMylJgKR.js → progress-ring.Czn6GoZL.js} +1 -1
- package/library/chunks/{radio-card.D4B962Sg.js → radio-card.rgobVDcV.js} +1 -1
- package/library/chunks/{range.Dl85wEtv.js → range.UVbDGy7M.js} +2 -2
- package/library/chunks/{rating.C-3rSMOT.js → rating.Dpqp5fJ2.js} +1 -1
- package/library/chunks/{relative-time.5fu63h4C.js → relative-time.ImRpAXxg.js} +1 -1
- package/library/chunks/{select.DJ_bfkBn.js → select.NoJEwBN4.js} +8 -8
- package/library/chunks/{shadow-input-group.DaDZTOGa.js → shadow-input-group.0xDWAN9L.js} +2 -2
- package/library/chunks/{share-option-list.BO50cnCs.js → share-option-list.CVyc5zE3.js} +2 -2
- package/library/chunks/{sidebar.CDTaDQY_.js → sidebar.B1CkFnS-.js} +1 -1
- package/library/chunks/{size-input-group.DvTF3TsD.js → size-input-group.DoE-qa2S.js} +5 -5
- package/library/chunks/{spinner.-79sJ3oo.js → spinner.BPSFoJkz.js} +1 -1
- package/library/chunks/{split-panel.DE2NmORY.js → split-panel.BsE9_zvp.js} +1 -1
- package/library/chunks/{src.CNvhakVg.js → src.cG4bHSGM.js} +47 -47
- package/library/chunks/{step.CIXS6vq7.js → step.ZFoTM46R.js} +3 -3
- package/library/chunks/{stepper-wizard.Bydp0R7p.js → stepper-wizard.CImDe292.js} +2 -2
- package/library/chunks/{stepper.DlYgTq-1.js → stepper.Y2ydDAom.js} +1 -1
- package/library/chunks/{tab-group._olfRqqQ.js → tab-group.DVCzY8ff.js} +7 -7
- package/library/chunks/{tab.CDVHHAgG.js → tab.DTDi6_uw.js} +3 -3
- package/library/chunks/{tag.ajqJVQQB.js → tag.DI1e3R9Y.js} +3 -3
- package/library/chunks/{tooltip.CGCOh4cQ.js → tooltip.BAg1FXgE.js} +2 -2
- package/library/chunks/{tree.huEm605f.js → tree.BFReY9S3.js} +3 -3
- package/library/chunks/{typeface.CtBzG7NU.js → typeface.DPIZSN2l.js} +3 -3
- package/library/chunks/{video.Be2Oh_tS.js → video.d4acczzs.js} +2 -2
- package/library/components/alert.js +1 -1
- package/library/components/array-line-clamp.js +1 -1
- package/library/components/asset-link-format.js +1 -1
- package/library/components/atoms.js +48 -48
- package/library/components/audio.js +1 -1
- package/library/components/bicolor-picker.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +1 -1
- package/library/components/color-picker.js +1 -1
- package/library/components/color-swatch-group.js +1 -1
- package/library/components/color-swatch.js +1 -1
- package/library/components/confirm-popover.js +1 -1
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +1 -1
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +1 -1
- package/library/components/document-viewer.js +1 -1
- package/library/components/dot-pagination.js +1 -1
- package/library/components/drawer.js +1 -1
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +1 -1
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +1 -1
- package/library/components/file-on-demand.js +1 -1
- package/library/components/folder-select.js +1 -1
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +1 -1
- package/library/components/icon-button.js +1 -1
- package/library/components/iframe.js +1 -1
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +1 -1
- package/library/components/input.js +1 -1
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +1 -1
- package/library/components/masonry.js +1 -1
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +16 -16
- package/library/components/option.js +1 -1
- package/library/components/organisms.js +3 -3
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +1 -1
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +1 -1
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +1 -1
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/step.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/stepper.js +1 -1
- package/library/components/tab-group.js +1 -1
- package/library/components/tab.js +1 -1
- package/library/components/tag.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +1 -1
- package/library/components/tree.js +1 -1
- package/library/components/typeface.js +1 -1
- package/library/components/types.js +12779 -12613
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/image/image.d.ts +1 -1
- package/library/packages/molecules/src/multi-select/components/board-list-item/board-list-item.d.ts +1 -0
- package/library/packages/organisms/src/chatbot/chatbot.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +11 -1
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +4 -0
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +14 -10
- package/library/packages/organisms/src/index.d.ts +1 -0
- package/library/packages/types/src/table.d.ts +7 -6
- package/library/packages/utils/src/custom-element/i18n.d.ts +3 -0
- package/library/utils.js +1 -1
- package/package.json +1 -1
- package/library/assets/validation.worker-DnJlaA8S.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/video.
|
|
1
|
+
import { n as e, t } from "../chunks/video.d4acczzs.js";
|
|
2
2
|
export { t as VIDEO_BACKGROUND_SIZE_BY_OBJECT_FIT, e as default };
|
package/library/package.json
CHANGED
|
@@ -168,7 +168,7 @@ export default class CxImage extends ResizableElement {
|
|
|
168
168
|
get currentAltValue(): string;
|
|
169
169
|
get currentSrc(): string;
|
|
170
170
|
get highlighterTabindex(): "0" | undefined;
|
|
171
|
-
get highlighterRole():
|
|
171
|
+
get highlighterRole(): 'button' | 'img' | undefined;
|
|
172
172
|
/**
|
|
173
173
|
* `object-position` only shifts content already stretched to fill the `<img>` box, so
|
|
174
174
|
* under `contain` (where the image shrinks to fit and never fills that box on both axes)
|
|
@@ -109,6 +109,10 @@ export default class CxSbImage extends CxImage {
|
|
|
109
109
|
* A description of the image used by assistive devices in dark mode.
|
|
110
110
|
*/
|
|
111
111
|
altDarkMode: string;
|
|
112
|
+
/** Whether to use authored alt text instead of asset metadata. */
|
|
113
|
+
useCustomAlt: boolean;
|
|
114
|
+
/** Whether to use authored alt text for the dark-mode image. */
|
|
115
|
+
useCustomAltDarkMode: boolean;
|
|
112
116
|
altSourceField: string;
|
|
113
117
|
/**
|
|
114
118
|
* CMS5 only. Click action for the image.
|
|
@@ -260,7 +264,7 @@ export default class CxSbImage extends CxImage {
|
|
|
260
264
|
*/
|
|
261
265
|
private get requestedAssetFields();
|
|
262
266
|
get highlighterTabindex(): "0" | undefined;
|
|
263
|
-
get highlighterRole(): "button" | "img";
|
|
267
|
+
get highlighterRole(): "button" | "img" | undefined;
|
|
264
268
|
get highlighterClass(): {
|
|
265
269
|
[x: string]: boolean;
|
|
266
270
|
'highlightable-item--has-action': boolean;
|
|
@@ -282,6 +286,12 @@ export default class CxSbImage extends CxImage {
|
|
|
282
286
|
* Whether the image has an click action.
|
|
283
287
|
*/
|
|
284
288
|
private get hasClickAction();
|
|
289
|
+
/** The native link replaces the wrapper's synthetic button semantics in read mode. */
|
|
290
|
+
private get hasNavigationAnchor();
|
|
291
|
+
/** Resolves the destination shared by pointer handling and the accessibility anchor. */
|
|
292
|
+
private get navigationUrl();
|
|
293
|
+
/** Names the native link from visible content before falling back to its destination. */
|
|
294
|
+
private get navigationLabel();
|
|
285
295
|
/**
|
|
286
296
|
* The rendered width in CSS pixels, used as the `sizes` hint so the browser can pick
|
|
287
297
|
* the smallest `srcset` candidate that still covers the box.
|
|
@@ -3,6 +3,8 @@ import { LocalizeController } from '../../../../utils/src/custom-element/i18n';
|
|
|
3
3
|
import { default as CxImage } from '../blocks/image/image';
|
|
4
4
|
type Attribute = {
|
|
5
5
|
'additional-fields': string;
|
|
6
|
+
alt: CxImage['alt'];
|
|
7
|
+
'alt-dark-mode': CxImage['altDarkMode'];
|
|
6
8
|
'alt-source-field': CxImage['altSourceField'];
|
|
7
9
|
'aspect-ratio': CxImage['aspectRatio'];
|
|
8
10
|
'aspect-ratio-dark-mode': CxImage['aspectRatioDarkMode'];
|
|
@@ -51,6 +53,8 @@ type Attribute = {
|
|
|
51
53
|
'text-reveal-style'?: CxImage['textRevealStyle'];
|
|
52
54
|
transformations: string;
|
|
53
55
|
'transition-type'?: string;
|
|
56
|
+
'use-custom-alt': CxImage['useCustomAlt'];
|
|
57
|
+
'use-custom-alt-dark-mode': CxImage['useCustomAltDarkMode'];
|
|
54
58
|
width: CxImage['width'];
|
|
55
59
|
'zoom-style'?: CxImage['zoomStyle'];
|
|
56
60
|
};
|
|
@@ -310,6 +310,8 @@ export default class ConfigsController {
|
|
|
310
310
|
src: string;
|
|
311
311
|
}>[] | import('../../../types/src/content-builder').PropertyConfig<{
|
|
312
312
|
'additional-fields': string;
|
|
313
|
+
alt: import('./blocks/image/image').default["alt"];
|
|
314
|
+
'alt-dark-mode': import('./blocks/image/image').default["altDarkMode"];
|
|
313
315
|
'alt-source-field': import('./blocks/image/image').default["altSourceField"];
|
|
314
316
|
'aspect-ratio': import('./blocks/image/image').default["aspectRatio"];
|
|
315
317
|
'aspect-ratio-dark-mode': import('./blocks/image/image').default["aspectRatioDarkMode"];
|
|
@@ -358,15 +360,17 @@ export default class ConfigsController {
|
|
|
358
360
|
'text-reveal-style'?: import('./blocks/image/image').default["textRevealStyle"];
|
|
359
361
|
transformations: string;
|
|
360
362
|
'transition-type'?: string;
|
|
363
|
+
'use-custom-alt': import('./blocks/image/image').default["useCustomAlt"];
|
|
364
|
+
'use-custom-alt-dark-mode': import('./blocks/image/image').default["useCustomAltDarkMode"];
|
|
361
365
|
width: import('./blocks/image/image').default["width"];
|
|
362
366
|
'zoom-style'?: import('./blocks/image/image').default["zoomStyle"];
|
|
363
367
|
}>[] | import('../../../types/src/content-builder').PropertyConfig<{
|
|
364
|
-
appearance: import('
|
|
365
|
-
'can-search-by-icon': import('
|
|
368
|
+
appearance: import('../../../../apps/cortex/src/types').CxSearchBox["appearance"];
|
|
369
|
+
'can-search-by-icon': import('../../../../apps/cortex/src/types').CxSearchBox["canSearchByIcon"];
|
|
366
370
|
'data-icon-name': string;
|
|
367
|
-
label: import('
|
|
368
|
-
placeholder: import('
|
|
369
|
-
size: import('
|
|
371
|
+
label: import('../../../../apps/cortex/src/types').CxSearchBox["label"];
|
|
372
|
+
placeholder: import('../../../../apps/cortex/src/types').CxSearchBox["placeholder"];
|
|
373
|
+
size: import('../../../../apps/cortex/src/types').CxSearchBox["size"];
|
|
370
374
|
'width-type': import('../../../types/src/search-box').SearchBoxWidthType;
|
|
371
375
|
}>[] | import('../../../types/src/content-builder').PropertyConfig<{
|
|
372
376
|
data: string;
|
|
@@ -725,12 +729,12 @@ export default class ConfigsController {
|
|
|
725
729
|
'page-id': string;
|
|
726
730
|
src: string;
|
|
727
731
|
} | {
|
|
728
|
-
appearance: import('
|
|
729
|
-
'can-search-by-icon': import('
|
|
732
|
+
appearance: import('../../../../apps/cortex/src/types').CxSearchBox["appearance"];
|
|
733
|
+
'can-search-by-icon': import('../../../../apps/cortex/src/types').CxSearchBox["canSearchByIcon"];
|
|
730
734
|
'data-icon-name': string;
|
|
731
|
-
label: import('
|
|
732
|
-
placeholder: import('
|
|
733
|
-
size: import('
|
|
735
|
+
label: import('../../../../apps/cortex/src/types').CxSearchBox["label"];
|
|
736
|
+
placeholder: import('../../../../apps/cortex/src/types').CxSearchBox["placeholder"];
|
|
737
|
+
size: import('../../../../apps/cortex/src/types').CxSearchBox["size"];
|
|
734
738
|
'width-type': import('../../../types/src/search-box').SearchBoxWidthType;
|
|
735
739
|
} | {
|
|
736
740
|
'data-constraints': boolean;
|
|
@@ -20,6 +20,7 @@ export { default as CxFileOnDemand } from './file-on-demand/file-on-demand';
|
|
|
20
20
|
export { default as CxFindAndReplace } from './find-and-replace/find-and-replace';
|
|
21
21
|
export { default as CxLightbox } from './lightbox/lightbox';
|
|
22
22
|
export { default as CxListEditor } from './list-editor/list-editor';
|
|
23
|
+
export { default as CxSearchBox } from './content-builder/blocks/search-box/search-box';
|
|
23
24
|
export { default as CxSpaceSelector } from './space-selector/space-selector';
|
|
24
25
|
export { default as CxSpecialCharactersDialog } from './special-characters-dialog/special-characters-dialog';
|
|
25
26
|
export { default as CxTemplateSwitcher } from './template-switcher/template-switcher';
|
|
@@ -2667,12 +2667,13 @@ export interface StringValidatorParameters {
|
|
|
2667
2667
|
* inclusive bounds as ISO date strings (or anything `Date.parse` understands).
|
|
2668
2668
|
*
|
|
2669
2669
|
* `format` additionally requires the input string to match a specific date
|
|
2670
|
-
* shape before it is parsed, using token placeholders: `
|
|
2671
|
-
* `MM` (2-digit month), `
|
|
2672
|
-
* (2-digit minute), `ss` (2-digit second)
|
|
2673
|
-
* (
|
|
2674
|
-
* `
|
|
2675
|
-
*
|
|
2670
|
+
* shape before it is parsed, using .NET-style token placeholders: `yyyy`
|
|
2671
|
+
* (4-digit year), `MM` (2-digit month), `dd` (2-digit day), `HH` (2-digit
|
|
2672
|
+
* hour, 24h), `mm` (2-digit minute), `ss` (2-digit second), `f` / `ff` /
|
|
2673
|
+
* `fff` (fractional seconds), `z` / `zz` / `zzz` (UTC offset), and `Z` (UTC).
|
|
2674
|
+
* Legacy `YYYY` and `DD` tokens remain supported. Any other character is
|
|
2675
|
+
* treated as a literal, allowing new arrangements of supported tokens without
|
|
2676
|
+
* a component change. Example: `'MM/dd/yyyy'` accepts `'02/29/2024'`.
|
|
2676
2677
|
*/
|
|
2677
2678
|
export interface DateValidatorParameters {
|
|
2678
2679
|
starts?: string;
|
|
@@ -303,6 +303,7 @@ export interface Translation extends DefaultTranslation {
|
|
|
303
303
|
currentValue: string;
|
|
304
304
|
currentVersion: string;
|
|
305
305
|
custom: string;
|
|
306
|
+
customAltText: string;
|
|
306
307
|
customColumns: string;
|
|
307
308
|
customExport: string;
|
|
308
309
|
customFormat: string;
|
|
@@ -314,7 +315,9 @@ export interface Translation extends DefaultTranslation {
|
|
|
314
315
|
cut: string;
|
|
315
316
|
damLibrary: string;
|
|
316
317
|
damViewNoAvailableOptionsForThisAsset: string;
|
|
318
|
+
darkCustomAltText: string;
|
|
317
319
|
darkImageFormat: string;
|
|
320
|
+
darkModeAltText: string;
|
|
318
321
|
darkModeImage: string;
|
|
319
322
|
dashSpacing: string;
|
|
320
323
|
dashWidth: string;
|
package/library/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e, i as t, n, o as r, r as i, t as a } from "./chunks/event.C11S4obG.js";
|
|
2
2
|
import { t as o } from "./chunks/custom-element.BEMYNDK1.js";
|
|
3
|
-
import { r as s, t as c } from "./chunks/i18n.
|
|
3
|
+
import { r as s, t as c } from "./chunks/i18n.D_iHIFdS.js";
|
|
4
4
|
import { n as l, r as u, t as d } from "./chunks/slot.CZUlACxT.js";
|
|
5
5
|
import { t as f } from "./chunks/watch.Ub5r8btz.js";
|
|
6
6
|
import { C as p, S as m, _ as h, a as g, b as _, c as ee, d as te, f as ne, g as re, h as ie, i as ae, l as oe, m as se, n as ce, o as le, p as ue, r as de, s as fe, t as pe, u as me, v as he, w as ge, x as _e, y as ve } from "./chunks/string.DamEXDH2.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(){function e(e){return e===``||e==null}function t(e){return Number.isFinite(Number(e))}function n(e,t){if(!t||typeof t!=`object`)return!0;let n=Number(e);return!(t.min!==void 0&&n<t.min||t.max!==void 0&&n>t.max)}function r(e){return e instanceof Date?e.getTime():typeof e==`number`?Number.isFinite(e)?e:NaN:typeof e==`string`?Date.parse(e):NaN}let i=[{groupName:`year`,token:`YYYY`},{groupName:`month`,token:`MM`},{groupName:`day`,token:`DD`},{groupName:`hour`,token:`HH`},{groupName:`minute`,token:`mm`},{groupName:`second`,token:`ss`}];function a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function o(e){let t=``,n=0;for(;n<e.length;){let r=i.find(({token:t})=>e.startsWith(t,n));if(r){let e=r.token.length;t+=`(?<${r.groupName}>\\d{${e}})`,n+=e}else t+=a(e[n]),n+=1}return RegExp(`^${t}$`)}function s(e,t){let n=o(t).exec(e);if(!n?.groups)return NaN;let r=Number(n.groups.year??`1970`),i=Number(n.groups.month??`1`),a=Number(n.groups.day??`1`),s=Number(n.groups.hour??`0`),c=Number(n.groups.minute??`0`),l=Number(n.groups.second??`0`);if(i<1||i>12||s>23||c>59||l>59)return NaN;let u=new Date(r,i-1,a,s,c,l);return u.getFullYear()===r&&u.getMonth()===i-1&&u.getDate()===a?u.getTime():NaN}let c={alphanumeric(t){return e(t)?!0:/^[a-z0-9]+$/i.test(String(t))},boolean(t){return e(t)?!0:typeof t==`boolean`||t===`true`||t===`false`},date(t,n){if(e(t))return!0;let i=n&&typeof n==`object`?n.format:void 0,a=i===void 0?r(t):s(String(t),i);if(Number.isNaN(a))return!1;if(!n||typeof n!=`object`)return!0;if(n.starts!==void 0){let e=r(n.starts);if(Number.isNaN(e)||a<e)return!1}if(n.ends!==void 0){let e=r(n.ends);if(Number.isNaN(e)||a>e)return!1}return!0},ends(t,n){return e(t)?!0:String(t).toLowerCase().endsWith(String(n).toLowerCase())},float(r,i){if(e(r))return!0;let a=Number(r);return t(r)&&a%1!=0&&n(r,i)},in(t,n){if(e(t))return!0;let r=typeof n==`string`?n.split(`|`):n;return Array.isArray(r)&&r.includes(t)},integer(r,i){if(e(r))return!0;let a=Number(r);return t(r)&&Math.floor(a)===a&&n(r,i)},max(t,n){return e(t)?!0:Number.parseFloat(String(t))<=Number(n)},maxLength(t,n){return e(t)?!0:String(t).length<=Number(n)},min(t,n){return e(t)?!0:Number.parseFloat(String(t))>=Number(n)},minLength(t,n){return e(t)?!0:String(t).length>=Number(n)},numeric(t,r){return e(t)?!0:!Number.isNaN(Number(t))&&n(t,r)},regex(t,n){if(e(t))return!0;let r;r=n instanceof RegExp?n:n===void 0?``:String(n);try{return new RegExp(r).test(String(t))}catch{return!1}},required(t){return!e(t)},starts(t,n){return e(t)?!0:String(t).toLowerCase().startsWith(String(n).toLowerCase())},string(t,n){if(e(t))return!0;if(!Number.isNaN(Number(t)))return!1;if(!n||typeof n!=`object`)return!0;let r=String(t).length;return!(n.minLength!==void 0&&r<n.minLength||n.maxLength!==void 0&&r>n.maxLength)},unique(t,n,r){return e(t)||!r?.columnValues?!0:!r.columnValues.some(e=>e===t)}},l=1e3;function u(e){return e===``||e==null}function d(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{u(e)||t.set(e,(t.get(e)??0)+1)}),t}function f(e,t,n){let r=[];return t.forEach(t=>{let i;if(t.type===`unique`)i=u(e)||(n.get(e)??0)<=1;else{let n=c[t.type];i=!n||n(e,t.parameters)}i||r.push({message:t.message,parameters:t.parameters,type:t.type})}),r}globalThis.addEventListener(`message`,e=>{if(e.origin!==``||e.data?.type!==`cx-validation-request`)return;let{fields:t,id:n}=e.data.payload,r=t.map(e=>e.rules.some(e=>e.type===`unique`)?d(e.values):/* @__PURE__ */ new Map),i=t.reduce((e,t)=>Math.max(e,t.values.length),0);for(let e=0;e<i||e===0;e+=l){let a=Math.min(e+l,i),o=[];for(let n=e;n<a;n++)t.forEach((e,t)=>{let i=f(e.values[n],e.rules,r[t]);i.length&&o.push({failures:i,fieldIndex:t,rowIndex:n})});let s={done:a>=i,id:n,results:o};if(globalThis.postMessage({payload:s,type:`cx-validation-response`}),a>=i)break}})})();
|