forked from forcedotcom/commerce-on-lightning-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.js
More file actions
23 lines (23 loc) · 865 Bytes
/
constants.js
File metadata and controls
23 lines (23 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
* Copyright (c) 2023, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: Apache-2.0
* For full license text, see the LICENSE file in the repo
* root or https://opensource.org/licenses/apache-2-0/
*/
import { ERROR_RANGE_OVERFLOW, ERROR_RANGE_UNDERFLOW, STEP_MISMATCH, PATTERN_MISMATCH } from 'c/commonNumberInput';
import { patternMismatch, rangeOverflow, rangeUnderflow, stepMismatch } from './labels';
export const VALUE_CHANGED_EVT = 'valuechanged';
export const VALIDITY_CHANGED_EVT = 'validitychanged';
export const OUT_OF_STOCK_EVT = 'outofstock';
export const errorLabels = {
[ERROR_RANGE_OVERFLOW]: rangeOverflow,
[ERROR_RANGE_UNDERFLOW]: rangeUnderflow,
[STEP_MISMATCH]: stepMismatch,
[PATTERN_MISMATCH]: patternMismatch,
};
export const defaultRules = {
minimum: 1,
maximum: 100000000,
step: 1,
};