@wavemaker-ai/custom-widgets-m3 1.0.0-rc.647469
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/custom-widgets-bundle.cjs.js +421 -0
- package/index.d.ts +12 -0
- package/index.js +12 -0
- package/npm-shrinkwrap.json +2301 -0
- package/package-lock.json +2301 -0
- package/package.json +37 -0
- package/scripts/build.d.ts +1 -0
- package/scripts/build.js +172 -0
- package/scripts/generate-pagemin.d.ts +1 -0
- package/scripts/generate-pagemin.js +111 -0
- package/scripts/update-version.d.ts +1 -0
- package/scripts/update-version.js +20 -0
- package/src/checkbox_set/checkbox_set.d.ts +10 -0
- package/src/checkbox_set/checkbox_set.js +53 -0
- package/src/checkbox_set/page.min.d.ts +7 -0
- package/src/checkbox_set/page.min.js +7 -0
- package/src/discrete_slider/discrete_slider.d.ts +25 -0
- package/src/discrete_slider/discrete_slider.js +219 -0
- package/src/discrete_slider/page.min.d.ts +7 -0
- package/src/discrete_slider/page.min.js +7 -0
- package/src/divider/divider.d.ts +4 -0
- package/src/divider/divider.js +42 -0
- package/src/divider/page.min.d.ts +7 -0
- package/src/divider/page.min.js +7 -0
- package/src/icon_button/icon_button.d.ts +0 -0
- package/src/icon_button/icon_button.js +16 -0
- package/src/icon_button/page.min.d.ts +7 -0
- package/src/icon_button/page.min.js +7 -0
- package/src/icon_button_toggleable/icon_button_toggleable.d.ts +0 -0
- package/src/icon_button_toggleable/icon_button_toggleable.js +17 -0
- package/src/icon_button_toggleable/page.min.d.ts +7 -0
- package/src/icon_button_toggleable/page.min.js +7 -0
- package/src/input_chip/input_chip.d.ts +1 -0
- package/src/input_chip/input_chip.js +29 -0
- package/src/input_chip/page.min.d.ts +7 -0
- package/src/input_chip/page.min.js +7 -0
- package/src/progressbar/page.min.d.ts +7 -0
- package/src/progressbar/page.min.js +7 -0
- package/src/progressbar/progressbar.d.ts +2 -0
- package/src/progressbar/progressbar.js +48 -0
- package/src/radio_set/page.min.d.ts +7 -0
- package/src/radio_set/page.min.js +7 -0
- package/src/radio_set/radio_set.d.ts +9 -0
- package/src/radio_set/radio_set.js +46 -0
- package/src/slider/page.min.d.ts +7 -0
- package/src/slider/page.min.js +7 -0
- package/src/slider/slider.d.ts +16 -0
- package/src/slider/slider.js +128 -0
- package/src/switch_button/page.min.d.ts +7 -0
- package/src/switch_button/page.min.js +7 -0
- package/src/switch_button/switch_button.d.ts +8 -0
- package/src/switch_button/switch_button.js +109 -0
- package/src/textfield/page.min.d.ts +7 -0
- package/src/textfield/page.min.js +7 -0
- package/src/textfield/textfield.d.ts +4 -0
- package/src/textfield/textfield.js +66 -0
- package/src/widget-registry.d.ts +6 -0
- package/src/widget-registry.js +68 -0
- package/src/wm-namespace.d.ts +11 -0
- package/src/wm-namespace.js +12 -0
- package/webpack.config.cjs.d.ts +31 -0
- package/webpack.config.cjs.js +40 -0
- package/webpack.config.d.ts +32 -0
- package/webpack.config.js +41 -0
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wavemaker-ai/custom-widgets-m3",
|
|
3
|
+
"version": "1.0.0-rc.647469",
|
|
4
|
+
"description": "A collection of custom widgets",
|
|
5
|
+
"module": "index",
|
|
6
|
+
"main": "index",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"generate:page-min": "node ./scripts/generate-pagemin.js",
|
|
9
|
+
"build:cjs": "webpack --config webpack.config.cjs.js --mode development",
|
|
10
|
+
"build:esm": "webpack --config webpack.config.js --mode development",
|
|
11
|
+
"build": "npm run generate:page-min && tsc && npm run build:cjs && npm run build:esm && node ./scripts/build.js post-build",
|
|
12
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"widgets",
|
|
16
|
+
"custom-widgets"
|
|
17
|
+
],
|
|
18
|
+
"author": "",
|
|
19
|
+
"license": "ISC",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"css-loader": "^7.1.2",
|
|
22
|
+
"execa": "^5.0.0",
|
|
23
|
+
"fs-extra": "^11.2.0",
|
|
24
|
+
"html-loader": "^5.1.0",
|
|
25
|
+
"style-loader": "^4.0.0",
|
|
26
|
+
"ts-loader": "^9.5.1",
|
|
27
|
+
"typescript": "^5.5.4",
|
|
28
|
+
"webpack": "^5.94.0",
|
|
29
|
+
"webpack-cli": "^5.1.4",
|
|
30
|
+
"yargs": "^16.2.0",
|
|
31
|
+
"tar": "^6.1.0"
|
|
32
|
+
},
|
|
33
|
+
"exports": {
|
|
34
|
+
"import": "./index",
|
|
35
|
+
"require": "./dist/custom-widgets-bundle.cjs.js"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/scripts/build.js
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var fs = require('fs-extra');
|
|
38
|
+
var path = require('path');
|
|
39
|
+
var projectDir = '.';
|
|
40
|
+
var execa = require('execa');
|
|
41
|
+
var yargs = require('yargs');
|
|
42
|
+
var hideBin = require('yargs/helpers').hideBin;
|
|
43
|
+
var tar = require('tar');
|
|
44
|
+
var WM_NPM_SCOPE = require('../src/wm-namespace').WM_NPM_SCOPE;
|
|
45
|
+
function updatePackageVersion(packagePath, key, version) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
47
|
+
var content;
|
|
48
|
+
return __generator(this, function (_a) {
|
|
49
|
+
content = fs.readFileSync(packagePath, 'utf8');
|
|
50
|
+
content = content.replace(new RegExp("\"".concat(key, "\"\\s*:\\s*\"[^\"]*\"")), "\"".concat(key, "\": \"").concat(version, "\""));
|
|
51
|
+
fs.writeFileSync(packagePath, content);
|
|
52
|
+
return [2 /*return*/];
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function postBuild(runtimeVersion) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
58
|
+
var packageData;
|
|
59
|
+
return __generator(this, function (_a) {
|
|
60
|
+
switch (_a.label) {
|
|
61
|
+
case 0:
|
|
62
|
+
fs.copySync("".concat(projectDir, "/package.json"), "".concat(projectDir, "/dist/es2015/package.json"));
|
|
63
|
+
packageData = fs.readJSONSync("".concat(projectDir, "/package.json"), {
|
|
64
|
+
encoding: "utf8"
|
|
65
|
+
});
|
|
66
|
+
packageData.main = 'index';
|
|
67
|
+
packageData.module = 'index';
|
|
68
|
+
packageData.exports = {
|
|
69
|
+
"import": "./index",
|
|
70
|
+
"require": "./dist/custom-widgets-bundle.cjs.js"
|
|
71
|
+
};
|
|
72
|
+
delete packageData['files'];
|
|
73
|
+
fs.writeFileSync("".concat(projectDir, "/dist/es2015/package.json"), JSON.stringify(packageData, null, 2));
|
|
74
|
+
return [4 /*yield*/, updatePackageVersion("".concat(projectDir, "/dist/es2015/package.json"), 'version', runtimeVersion)];
|
|
75
|
+
case 1:
|
|
76
|
+
_a.sent();
|
|
77
|
+
console.log('Post Build successful!!!');
|
|
78
|
+
return [2 /*return*/];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function createPackageLock(path) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
+
var packageJSON;
|
|
86
|
+
return __generator(this, function (_a) {
|
|
87
|
+
switch (_a.label) {
|
|
88
|
+
case 0: return [4 /*yield*/, execa('npm', ['install', '--package-lock-only', '--ignore-scripts'], {
|
|
89
|
+
'cwd': path
|
|
90
|
+
})];
|
|
91
|
+
case 1:
|
|
92
|
+
_a.sent();
|
|
93
|
+
packageJSON = fs.readJSONSync("".concat(path, "/package-lock.json"));
|
|
94
|
+
Object.values(packageJSON.packages || {}).map(function (v) {
|
|
95
|
+
delete v.resolved;
|
|
96
|
+
});
|
|
97
|
+
fs.writeJSONSync("".concat(path, "/package-lock.json"), packageJSON, {
|
|
98
|
+
spaces: 4
|
|
99
|
+
});
|
|
100
|
+
fs.writeJSONSync("".concat(path, "/npm-shrinkwrap.json"), packageJSON, {
|
|
101
|
+
spaces: 4
|
|
102
|
+
});
|
|
103
|
+
return [2 /*return*/];
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function prepareNpmPackages(runtimeVersion) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
110
|
+
var wmNpmScopeSlug, tarballName, tarballPath, stdout;
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
switch (_a.label) {
|
|
113
|
+
case 0:
|
|
114
|
+
wmNpmScopeSlug = WM_NPM_SCOPE.replace(/^@/, '');
|
|
115
|
+
tarballName = "".concat(wmNpmScopeSlug, "-custom-widgets-m3-").concat(runtimeVersion, ".tgz");
|
|
116
|
+
fs.copySync("".concat(projectDir, "/dist/es2015"), "".concat(projectDir, "/dist/npm-packages/package"), {
|
|
117
|
+
filter: function (p) { return !p.startsWith('/node_modules/'); }
|
|
118
|
+
});
|
|
119
|
+
return [4 /*yield*/, createPackageLock("".concat(projectDir, "/dist/npm-packages/package"))];
|
|
120
|
+
case 1:
|
|
121
|
+
_a.sent();
|
|
122
|
+
return [4 /*yield*/, execa('tar', ['-czf', "dist/npm-packages/".concat(tarballName), '-C', 'dist/npm-packages', 'package'], {
|
|
123
|
+
'cwd': "".concat(projectDir)
|
|
124
|
+
})];
|
|
125
|
+
case 2:
|
|
126
|
+
_a.sent();
|
|
127
|
+
tarballPath = path.join(__dirname, "../dist/npm-packages/".concat(tarballName));
|
|
128
|
+
return [4 /*yield*/, execa('node', ['../process-npm-package-stats.js', "--path=".concat(tarballPath), "--packageName=".concat(WM_NPM_SCOPE, "/custom-widgets-m3"), "--publishVersion=".concat(runtimeVersion)])];
|
|
129
|
+
case 3:
|
|
130
|
+
stdout = (_a.sent()).stdout;
|
|
131
|
+
console.log(stdout);
|
|
132
|
+
return [2 /*return*/];
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function pushToLocalRepo() {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
139
|
+
return __generator(this, function (_a) {
|
|
140
|
+
switch (_a.label) {
|
|
141
|
+
case 0:
|
|
142
|
+
fs.writeFileSync("".concat(projectDir, "/dist/new-build"), '' + Date.now);
|
|
143
|
+
return [4 /*yield*/, execa('yalc', ['publish', '--no-sig', '--push'], {
|
|
144
|
+
'cwd': "".concat(projectDir, "/dist/es2015")
|
|
145
|
+
})];
|
|
146
|
+
case 1:
|
|
147
|
+
_a.sent();
|
|
148
|
+
return [2 /*return*/];
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
yargs(hideBin(process.argv)).command('post-build', 'to run post processing after project build', function (yargs) {
|
|
154
|
+
yargs.option('runtimeVersion', {
|
|
155
|
+
describe: 'version number',
|
|
156
|
+
type: 'string',
|
|
157
|
+
default: '1.0.0-dev'
|
|
158
|
+
}).option('production', {
|
|
159
|
+
describe: 'to perform a production build',
|
|
160
|
+
type: 'boolean',
|
|
161
|
+
default: false
|
|
162
|
+
});
|
|
163
|
+
}, function (argv) {
|
|
164
|
+
postBuild(argv.runtimeVersion).then(function () {
|
|
165
|
+
if (argv.production) {
|
|
166
|
+
return prepareNpmPackages(argv.runtimeVersion);
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
return pushToLocalRepo();
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}).showHelpOnFail().argv;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var fs = require("fs-extra");
|
|
38
|
+
var path = require("path");
|
|
39
|
+
var srcDir = path.join(__dirname, "..", "src");
|
|
40
|
+
function createMinJs() {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
+
var folders, _i, folders_1, folder, folderPath, fileNames, minJs, _a, fileNames_1, fileName, filePath, content, key, encodedContent, minJsPath, outputContent;
|
|
43
|
+
return __generator(this, function (_b) {
|
|
44
|
+
try {
|
|
45
|
+
folders = fs
|
|
46
|
+
.readdirSync(srcDir)
|
|
47
|
+
.filter(function (file) { return fs.lstatSync(path.join(srcDir, file)).isDirectory(); });
|
|
48
|
+
for (_i = 0, folders_1 = folders; _i < folders_1.length; _i++) {
|
|
49
|
+
folder = folders_1[_i];
|
|
50
|
+
folderPath = path.join(srcDir, folder);
|
|
51
|
+
fileNames = [
|
|
52
|
+
"".concat(folder, ".html"),
|
|
53
|
+
"".concat(folder, ".js"),
|
|
54
|
+
"".concat(folder, ".css"),
|
|
55
|
+
"".concat(folder, ".variables.json"),
|
|
56
|
+
"config.json",
|
|
57
|
+
];
|
|
58
|
+
minJs = {
|
|
59
|
+
markup: "",
|
|
60
|
+
script: "",
|
|
61
|
+
styles: "",
|
|
62
|
+
variables: "",
|
|
63
|
+
config: "",
|
|
64
|
+
};
|
|
65
|
+
// Reading each file and storing its URL-encoded content in the corresponding minjs property
|
|
66
|
+
for (_a = 0, fileNames_1 = fileNames; _a < fileNames_1.length; _a++) {
|
|
67
|
+
fileName = fileNames_1[_a];
|
|
68
|
+
filePath = path.join(folderPath, fileName);
|
|
69
|
+
// Check if the file exists before reading
|
|
70
|
+
if (fs.existsSync(filePath)) {
|
|
71
|
+
content = fs.readFileSync(filePath, "utf8");
|
|
72
|
+
key = fileName.split(".")[1];
|
|
73
|
+
encodedContent = encodeURIComponent(content);
|
|
74
|
+
switch (key) {
|
|
75
|
+
case "html":
|
|
76
|
+
minJs.markup = encodedContent;
|
|
77
|
+
break;
|
|
78
|
+
case "js":
|
|
79
|
+
minJs.script = encodedContent;
|
|
80
|
+
break;
|
|
81
|
+
case "css":
|
|
82
|
+
minJs.styles = encodedContent;
|
|
83
|
+
break;
|
|
84
|
+
case "variables":
|
|
85
|
+
minJs.variables = encodedContent;
|
|
86
|
+
break;
|
|
87
|
+
case "json":
|
|
88
|
+
minJs.config = encodedContent;
|
|
89
|
+
break;
|
|
90
|
+
default:
|
|
91
|
+
console.warn("Unexpected file type: ".concat(fileName));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
console.warn("File not found: ".concat(filePath));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
minJsPath = path.join(folderPath, "page.min.js");
|
|
99
|
+
outputContent = "export const ".concat(folder, " = ").concat(JSON.stringify(minJs, null, 2), ";");
|
|
100
|
+
fs.writeFileSync(minJsPath, outputContent);
|
|
101
|
+
console.log("Created page.min.js for ".concat(folder));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
console.error("Error creating page.min.js:", error);
|
|
106
|
+
}
|
|
107
|
+
return [2 /*return*/];
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
createMinJs();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var fs = require('fs');
|
|
3
|
+
var yargs = require('yargs');
|
|
4
|
+
var argv = yargs(process.argv).argv;
|
|
5
|
+
var WM_NPM_SCOPE = require('../src/wm-namespace').WM_NPM_SCOPE;
|
|
6
|
+
var updateCustomeWidgetsPackage = function (path) {
|
|
7
|
+
if (fs.existsSync(path)) {
|
|
8
|
+
var packageJSON = require('../' + path);
|
|
9
|
+
packageJSON['dependencies']["".concat(WM_NPM_SCOPE, "/custom-widgets-m3")] = argv["publish-version"];
|
|
10
|
+
fs.writeFileSync(path, JSON.stringify(packageJSON, null, 4));
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
console.log('package.json not found at ' + path);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var init = function () {
|
|
17
|
+
updateCustomeWidgetsPackage('../wavemaker-ng-runtime/package.json');
|
|
18
|
+
updateCustomeWidgetsPackage('../wavemaker-ng-studio/package.json');
|
|
19
|
+
};
|
|
20
|
+
init();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare function handleLabelPlacementChange(widgetMap: any, label_placement: any): void;
|
|
2
|
+
declare function handleLabelPlacementChange(widgetMap: any, label_placement: any): void;
|
|
3
|
+
declare function updateClasses(element: any, classMap: any): void;
|
|
4
|
+
declare function updateClasses(element: any, classMap: any): void;
|
|
5
|
+
declare function handleIntermediateChange(widgetMap: any, show_intermediate: any): void;
|
|
6
|
+
declare function handleLayoutChange(widgetMap: any, layout: any): void;
|
|
7
|
+
declare function handleLayoutChange(widgetMap: any, layout: any): void;
|
|
8
|
+
declare function handleRequiredChange(widgetMap: any, required: any): void;
|
|
9
|
+
declare function handleRequiredChange(widgetMap: any, required: any): void;
|
|
10
|
+
declare function handleRequiredChange(required: any, widgetMap: any): void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Use App.getDependency for Dependency Injection
|
|
3
|
+
* eg: var DialogService = App.getDependency('DialogService');
|
|
4
|
+
*/
|
|
5
|
+
Widget.onPropertyChange = function (propName, newValue, oldValue) {
|
|
6
|
+
var _a = Widget.props, show_intermediate = _a.show_intermediate, required = _a.required, layout = _a.layout, label_placement = _a.label_placement;
|
|
7
|
+
var widgetMap = Widget.Widgets;
|
|
8
|
+
var propertyHandlers = {
|
|
9
|
+
'prop-required': function () { return handleRequiredChange(widgetMap, required); },
|
|
10
|
+
'prop-layout': function () { return handleLayoutChange(widgetMap, layout); },
|
|
11
|
+
'prop-show_intermediate': function () { return handleIntermediateChange(widgetMap, show_intermediate); },
|
|
12
|
+
'prop-label_placement': function () { return handleLabelPlacementChange(widgetMap, label_placement); }
|
|
13
|
+
};
|
|
14
|
+
if (propertyHandlers[propName]) {
|
|
15
|
+
propertyHandlers[propName]();
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
Widget.onReady = function () {
|
|
19
|
+
var _a = Widget.props, show_intermediate = _a.show_intermediate, required = _a.required, layout = _a.layout, label_placement = _a.label_placement;
|
|
20
|
+
var widgetMap = Widget.Widgets;
|
|
21
|
+
handleLayoutChange(widgetMap, layout);
|
|
22
|
+
handleLabelPlacementChange(widgetMap, label_placement);
|
|
23
|
+
handleIntermediateChange(widgetMap, show_intermediate);
|
|
24
|
+
handleRequiredChange(widgetMap, required);
|
|
25
|
+
Widget.getDatavalue = function () { return Widget.props.default_value; };
|
|
26
|
+
};
|
|
27
|
+
function handleLabelPlacementChange(widgetMap, label_placement) {
|
|
28
|
+
updateClasses(widgetMap.checkboxset.nativeElement, {
|
|
29
|
+
'top-placement': label_placement === "top",
|
|
30
|
+
'bottom-placement': label_placement === "bottom",
|
|
31
|
+
'start-placement': label_placement === "start"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
// Utility function to manage class additions and removals
|
|
35
|
+
function updateClasses(element, classMap) {
|
|
36
|
+
Object.keys(classMap).forEach(function (className) {
|
|
37
|
+
element.classList.toggle(className, classMap[className]);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function handleIntermediateChange(widgetMap, show_intermediate) {
|
|
41
|
+
updateClasses(widgetMap.checkboxset.nativeElement, {
|
|
42
|
+
'intermediate-checkbox': show_intermediate.toString().toLowerCase() === 'true'
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function handleLayoutChange(widgetMap, layout) {
|
|
46
|
+
updateClasses(widgetMap.checkboxset.nativeElement, {
|
|
47
|
+
'horizontal': layout === "horizontal",
|
|
48
|
+
'vertical': layout === "vertical"
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function handleRequiredChange(widgetMap, required) {
|
|
52
|
+
widgetMap.composite1.required = required;
|
|
53
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var checkbox_set = {
|
|
2
|
+
"markup": "%3Cwm-custom-widget-container%20name%3D%22partial1%22%3E%0A%20%20%20%20%3Cwm-composite%20name%3D%22composite1%22%20captionposition%3D%22top%22%20required%3D%22false%22%3E%0A%20%20%20%20%20%20%20%20%3Cwm-label%20class%3D%22%20control-label%22%20notag%3D%22true%22%20name%3D%22label1%22%20caption%3D%22bind%3Aprops.label_text%22%3E%3C%2Fwm-label%3E%0A%20%20%20%20%20%20%20%20%3Cwm-container%20name%3D%22container1%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cwm-checkboxset%20height%3D%22auto%22%20name%3D%22checkboxset%22%20dataset%3D%22bind%3Aprops.data_set%22%20datafield%3D%22All%20Fields%22%20disabled%3D%22bind%3Aprops.state.toLowerCase()%3D%3D%26quot%3Bdisabled%26quot%3B%22%20required%3D%22bind%3Aprops.required%22%20datavalue%3D%22bind%3Aprops.default_value%22%3E%3C%2Fwm-checkboxset%3E%0A%20%20%20%20%20%20%20%20%3C%2Fwm-container%3E%0A%20%20%20%20%3C%2Fwm-composite%3E%0A%3C%2Fwm-custom-widget-container%3E%0A",
|
|
3
|
+
"script": "%2F*%0A%20*%20Use%20App.getDependency%20for%20Dependency%20Injection%0A%20*%20eg%3A%20var%20DialogService%20%3D%20App.getDependency('DialogService')%3B%0A%20*%2F%0A%0AWidget.onPropertyChange%20%3D%20function(propName%2C%20newValue%2C%20oldValue)%20%7B%0A%20%20%20%20const%20%7B%0A%20%20%20%20%20%20%20%20show_intermediate%2C%0A%20%20%20%20%20%20%20%20required%2C%0A%20%20%20%20%20%20%20%20layout%2C%0A%20%20%20%20%20%20%20%20label_placement%0A%20%20%20%20%7D%20%3D%20Widget.props%3B%0A%20%20%20%20const%20widgetMap%20%3D%20Widget.Widgets%3B%0A%0A%20%20%20%20const%20propertyHandlers%20%3D%20%7B%0A%20%20%20%20%20%20%20%20'prop-required'%3A%20()%20%3D%3E%20handleRequiredChange(widgetMap%2C%20required)%2C%0A%20%20%20%20%20%20%20%20'prop-layout'%3A%20()%20%3D%3E%20handleLayoutChange(widgetMap%2C%20layout)%2C%0A%20%20%20%20%20%20%20%20'prop-show_intermediate'%3A%20()%20%3D%3E%20handleIntermediateChange(widgetMap%2C%20show_intermediate)%2C%0A%20%20%20%20%20%20%20%20'prop-label_placement'%3A%20()%20%3D%3E%20handleLabelPlacementChange(widgetMap%2C%20label_placement)%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20if%20(propertyHandlers%5BpropName%5D)%20%7B%0A%20%20%20%20%20%20%20%20propertyHandlers%5BpropName%5D()%3B%0A%20%20%20%20%7D%0A%7D%3B%0A%0AWidget.onReady%20%3D%20function()%20%7B%0A%20%20%20%20const%20%7B%0A%20%20%20%20%20%20%20%20show_intermediate%2C%0A%20%20%20%20%20%20%20%20required%2C%0A%20%20%20%20%20%20%20%20layout%2C%0A%20%20%20%20%20%20%20%20label_placement%2C%0A%20%20%20%20%7D%20%3D%20Widget.props%3B%0A%20%20%20%20const%20widgetMap%20%3D%20Widget.Widgets%3B%0A%0A%20%20%20%20handleLayoutChange(widgetMap%2C%20layout)%3B%0A%20%20%20%20handleLabelPlacementChange(widgetMap%2C%20label_placement)%0A%20%20%20%20handleIntermediateChange(widgetMap%2C%20show_intermediate)%3B%0A%20%20%20%20handleRequiredChange(widgetMap%2C%20required)%3B%0A%20%20%20%20Widget.getDatavalue%20%3D%20()%20%3D%3E%20Widget.props.default_value%3B%0A%0A%7D%3B%0A%0Afunction%20handleLabelPlacementChange(widgetMap%2C%20label_placement)%20%7B%0A%20%20%20%20updateClasses(widgetMap.checkboxset.nativeElement%2C%20%7B%0A%20%20%20%20%20%20%20%20'top-placement'%3A%20label_placement%20%3D%3D%3D%20%22top%22%2C%0A%20%20%20%20%20%20%20%20'bottom-placement'%3A%20label_placement%20%3D%3D%3D%20%22bottom%22%2C%0A%20%20%20%20%20%20%20%20'start-placement'%3A%20label_placement%20%3D%3D%3D%20%22start%22%0A%20%20%20%20%7D)%3B%0A%7D%0A%0A%2F%2F%20Utility%20function%20to%20manage%20class%20additions%20and%20removals%0Afunction%20updateClasses(element%2C%20classMap)%20%7B%0A%20%20%20%20Object.keys(classMap).forEach((className)%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20element.classList.toggle(className%2C%20classMap%5BclassName%5D)%3B%0A%20%20%20%20%7D)%3B%0A%7D%0A%0Afunction%20handleIntermediateChange(widgetMap%2C%20show_intermediate)%20%7B%0A%20%20%20%20updateClasses(widgetMap.checkboxset.nativeElement%2C%20%7B%0A%20%20%20%20%20%20%20%20'intermediate-checkbox'%3A%20show_intermediate.toString().toLowerCase()%20%3D%3D%3D%20'true'%0A%20%20%20%20%7D)%3B%0A%7D%0A%0A%0Afunction%20handleLayoutChange(widgetMap%2C%20layout)%20%7B%0A%20%20%20%20updateClasses(widgetMap.checkboxset.nativeElement%2C%20%7B%0A%20%20%20%20%20%20%20%20'horizontal'%3A%20layout%20%3D%3D%3D%20%22horizontal%22%2C%0A%20%20%20%20%20%20%20%20'vertical'%3A%20layout%20%3D%3D%3D%20%22vertical%22%0A%20%20%20%20%7D)%3B%0A%7D%0A%0Afunction%20handleRequiredChange(widgetMap%2C%20required)%20%7B%0A%20%20%20%20widgetMap.composite1.required%20%3D%20required%3B%0A%7D%0A",
|
|
4
|
+
"styles": ".app-checkboxset.list-group.inline%2C%0A.app-checkboxset.list-group%20%7B%0A%20%20%20%20flex-direction%3A%20column%3B%0A%20%20%20%20display%3A%20inline-flex%3B%0A%7D%0A%0A.app-checkboxset.list-group.inline.horizontal%2C%0A.app-checkboxset.list-group.horizontal%20%7B%0A%20%20%20%20flex-direction%3A%20row%3B%0A%20%20%20%20display%3A%20inline-flex%3B%0A%7D%0A%0A.app-checkboxset%20.checkbox%3Elabel%20.caption%3Aafter%20%7B%0A%20%20%20%20box-sizing%3A%20unset%3B%0A%7D%0A%0A%0A%2F*%20start%20label%20placement%20styles%20%20*%2F%0A%0A.app-checkboxset.horizontal.start-placement%20.app-checkboxset-label%3E.caption%2C%0A.app-checkboxset.vertical.start-placement%20.app-checkboxset-label%3E.caption%20%7B%0A%20%20%20%20padding-left%3A%20unset%3B%0A%20%20%20%20padding-right%3A%20calc(var(--wm-checkbox-state-layer-size)%20%2B%20var(--wm-checkbox-gap))%3B%0A%7D%0A%0A.app-checkboxset.horizontal.start-placement%20.checkbox%3Elabel%20.caption%3Abefore%2C%0A.app-checkboxset.vertical.start-placement%20.checkbox%3Elabel%20.caption%3Abefore%20%7B%0A%20%20%20%20left%3A%20unset%3B%0A%20%20%20%20right%3A%20calc((var(--wm-checkbox-state-layer-size)%20-%20var(--wm-checkbox-size))%20%2F%202)%3B%0A%7D%0A%0A.app-checkboxset.horizontal.start-placement%20.checkbox%3Elabel%20.caption%3Aafter%2C%0A.app-checkboxset.vertical.start-placement%20.checkbox%3Elabel%20.caption%3Aafter%20%7B%0A%20%20%20%20left%3A%20unset%3B%0A%20%20%20%20right%3A%20calc(calc((var(--wm-checkbox-state-layer-size)%20-%20var(--wm-checkbox-size))%20%2F%202)%20%2B%206px)%3B%0A%7D%0A%0A.app-checkboxset.horizontal.start-placement%20.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%2C%0A.app-checkboxset.vertical.start-placement%20.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%20%7B%0A%20%20%20%20left%3A%20unset%3B%0A%20%20%20%20right%3A%200px%3B%0A%7D%0A%0A%0A%2F*%20top%20label%20placement%20styles%20%20*%2F%0A%0A.app-checkboxset.top-placement%20.app-checkboxset-label%3E.caption%20%7B%0A%20%20%20%20padding-left%3A%20unset%3B%0A%20%20%20%20padding-bottom%3A%20calc(var(--wm-checkbox-state-layer-size)%20%2B%20var(--wm-checkbox-gap))%3B%0A%20%20%20%20min-width%3A%2020px%3B%0A%20%20%20%20padding-top%3A%20unset%3B%0A%7D%0A%0A.app-checkboxset.top-placement%20.app-checkboxset-label%3E.caption%3A%3Abefore%20%7B%0A%20%20%20%20top%3A%20calc(calc(var(--wm-checkbox-caption-line-height)%20%2B%20var(--wm-checkbox-gap))%20%2B%20calc((var(--wm-checkbox-state-layer-size)%20-%20var(--wm-checkbox-size))%20%2F%202))%3B%0A%20%20%20%20left%3A%2050%25%3B%0A%20%20%20%20transform%3A%20translateX(-50%25)%3B%0A%7D%0A%0A.app-checkboxset.top-placement%20.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%20%7B%0A%20%20%20%20top%3A%20calc(calc(var(--wm-checkbox-caption-line-height)%20%2B%20var(--wm-checkbox-gap)))%3B%0A%20%20%20%20left%3A%2050%25%3B%0A%20%20%20%20transform%3A%20translateX(-50%25)%3B%0A%7D%0A%0A.wm-app%20.app-checkboxset.top-placement%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Achecked%2B.caption%3Aafter%20%7B%0A%20%20%20%20top%3A%20calc(calc(var(--wm-checkbox-caption-line-height)%20%2B%20var(--wm-checkbox-gap))%20%2B%20calc((var(--wm-checkbox-state-layer-size)%20-%20var(--wm-checkbox-size))%20%2F%202))%3B%0A%20%20%20%20left%3A%2050%25%3B%0A%20%20%20%20transform%3A%20translate(-6px%2C%204px)%20rotate(-45deg)%20scale(1)%3B%0A%7D%0A%0A%0A%2F*%20bottom%20label%20placement%20style%20%20*%2F%0A%0A.app-checkboxset.bottom-placement%20.app-checkboxset-label%3E.caption%20%7B%0A%20%20%20%20padding-left%3A%20unset%3B%0A%20%20%20%20padding-bottom%3A%20unset%3B%0A%20%20%20%20padding-top%3A%20calc(var(--wm-checkbox-state-layer-size)%20%2B%20var(--wm-checkbox-gap))%3B%0A%7D%0A%0A.app-checkboxset.bottom-placement%20%7B%0A%20%20%20%20display%3A%20inline-flex%3B%0A%20%20%20%20min-width%3A%2040px%3B%0A%20%20%20%20max-width%3A%20max-content%3B%0A%20%20%20%20align-items%3A%20center%3B%0A%7D%0A%0A.app-checkboxset.bottom-placement%20.app-checkboxset-label%3E.caption%3A%3Abefore%20%7B%0A%20%20%20%20left%3A%2050%25%3B%0A%20%20%20%20transform%3A%20translateX(-50%25)%3B%0A%7D%0A%0A.app-checkboxset.bottom-placement%20.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%20%7B%0A%20%20%20%20left%3A%2050%25%3B%0A%20%20%20%20transform%3A%20translateX(-50%25)%3B%0A%7D%0A%0A.wm-app%20.app-checkboxset.bottom-placement%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Achecked%2B.caption%3Aafter%20%7B%0A%20%20%20%20left%3A%2050%25%3B%0A%20%20%20%20transform%3A%20translate(-6px%2C%204px)%20rotate(-45deg)%20scale(1)%3B%0A%7D%0A%0A.app-checkboxset.horizontal.bottom-placement%20.app-checkboxset-label%3E.caption%20%7B%0A%20%20%20%20padding-left%3A%20unset%3B%0A%20%20%20%20padding-top%3A%20calc(var(--wm-checkbox-state-layer-size)%20%2B%20var(--wm-checkbox-gap))%3B%0A%20%20%20%20min-width%3A%2020px%3B%0A%20%20%20%20justify-content%3A%20center%3B%0A%20%20%20%20display%3A%20inline-flex%3B%0A%20%20%20%20margin-top%3A%20unset%3B%0A%7D%0A%0A.app-checkboxset.horizontal.bottom-placement%20.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Achecked%2B.caption%3Aafter%20%7B%0A%20%20%20%20top%3A%20calc((var(--wm-checkbox-state-layer-size)%20-%20var(--wm-checkbox-size))%20%2F%202)%3B%0A%7D%0A%0A.app-checkboxset.horizontal.bottom-placement%20.app-checkboxset-label%3E.caption%3A%3Abefore%20%7B%0A%20%20%20%20top%3A%20calc((var(--wm-checkbox-state-layer-size)%20-%20var(--wm-checkbox-size))%20%2F%202)%3B%0A%7D%0A%0A.app-checkboxset.horizontal.bottom-placement%20.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%20%7B%0A%20%20%20%20top%3A%200px%3B%0A%7D%0A%0A.app-checkboxset.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Anot(%3Achecked)%2B.caption%3Aafter%2C%0A.app-checkboxset.top-placement.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Anot(%3Achecked)%2B.caption%3Aafter%2C%0A.app-checkboxset.bottom-placement.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Anot(%3Achecked)%2B.caption%3Aafter%2C%0A.app-checkboxset.start-placement.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Anot(%3Achecked)%2B.caption%3Aafter%20%7B%0A%20%20%20%20border%3A%200px%3B%0A%7D%0A%0A.app-checkboxset.horizontal.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%2B.caption%3Aafter%2C%0A.app-checkboxset.vertical.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%2B.caption%3Aafter%20%7B%0A%20%20%20%20top%3A%20calc(calc(var(--wm-checkbox-state-layer-size)%2F2)%20-%201px)%3B%0A%20%20%20%20height%3A%200px%3B%0A%20%20%20%20transform%3A%20translate(3px%2C%200px)%20rotate(0deg)%20scale(1)%3B%0A%7D%0A%0A.app-checkboxset.top-placement.horizontal.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%2B.caption%3Aafter%2C%0A.app-checkboxset.top-placement.vertical.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%2B.caption%3Aafter%20%7B%0A%20%20%20%20top%3A%20calc(calc(var(--wm-checkbox-caption-line-height)%20%2B%20var(--wm-checkbox-gap))%20%2B%20calc(var(--wm-checkbox-state-layer-size)%2F2)%20-%201px)%3B%0A%20%20%20%20height%3A%200px%3B%0A%20%20%20%20transform%3A%20translate(-6px%2C%200px)%20rotate(0deg)%20scale(1)%3B%0A%20%20%20%20left%3A%2050%25%3B%0A%7D%0A%0A.app-checkboxset.horizontal.bottom-placement.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%2B.caption%3Aafter%2C%0A.app-checkboxset.vertical.bottom-placement.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%2B.caption%3Aafter%20%7B%0A%20%20%20%20top%3A%20calc(calc(var(--wm-checkbox-caption-line-height)%20%2B%20var(--wm-checkbox-gap))%20-%20calc(var(--wm-checkbox-state-layer-size)%2F2)%20%2B%207px)%3B%0A%20%20%20%20height%3A%200px%3B%0A%20%20%20%20transform%3A%20translate(-6px%2C%204px)%20rotate(0deg)%20scale(1)%3B%0A%20%20%20%20left%3A%2050%25%3B%0A%7D%0A%0A.app-checkboxset.start-placement.horizontal.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%2B.caption%3Aafter%2C%0A.app-checkboxset.start-placement.vertical.intermediate-checkbox%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%2B.caption%3Aafter%20%7B%0A%20%20%20%20top%3A%20calc(calc(var(--wm-checkbox-caption-line-height)%20%2B%20var(--wm-checkbox-gap))%20-%20calc(var(--wm-checkbox-state-layer-size)%2F2))%3B%0A%20%20%20%20height%3A%200px%3B%0A%20%20%20%20left%3A%20unset%3B%0A%20%20%20%20transform%3A%20translate(3px%2C%2011px)%20rotate(0deg)%20scale(1)%3B%0A%7D%0A",
|
|
5
|
+
"variables": "%7B%20%7D",
|
|
6
|
+
"config": "%7B%0A%09%22widgetType%22%20%3A%20%22wm-checkboxset%22%2C%0A%09%22properties%22%20%3A%20%7B%0A%09%20%20%22layout%22%20%3A%20%7B%0A%09%09%22type%22%20%3A%20%22list%22%2C%0A%09%09%22displayName%22%20%3A%20%22Layout%22%2C%0A%09%09%22description%22%20%3A%20%22Defines%20the%20orientation%20of%20the%20element.%20'horizontal'%20indicates%20that%20the%20element's%20layout%20or%20behavior%20is%20aligned%20along%20the%20horizontal%20axis%20(left%20to%20right)%2C%20while%20'vertical'%20means%20the%20element%20is%20aligned%20along%20the%20vertical%20axis%20(top%20to%20bottom)%22%2C%0A%09%09%22options%22%20%3A%20%5B%20%22horizontal%22%2C%20%22vertical%22%20%5D%2C%0A%09%09%22value%22%20%3A%20%22horizontal%22%0A%09%20%20%7D%2C%0A%09%20%20%22show_intermediate%22%20%3A%20%7B%0A%09%09%22type%22%20%3A%20%22boolean%22%2C%0A%09%09%22displayName%22%20%3A%20%22Intermediate%20checkbox%22%2C%0A%09%09%22description%22%20%3A%20%22Controls%20whether%20the%20checkbox%20shows%20an%20indeterminate%20state.%20True%20displays%20the%20intermediate%20state%22%2C%0A%09%09%22value%22%20%3A%20false%0A%09%20%20%7D%2C%0A%09%20%20%22state%22%20%3A%20%7B%0A%09%09%22type%22%20%3A%20%22list%22%2C%0A%09%09%22displayName%22%20%3A%20%22State%22%2C%0A%09%09%22description%22%20%3A%20%22Specifies%20whether%20the%20component%20is%20active%20or%20inactive.%20'enabled'%20means%20the%20component%20is%20interactive%20and%20functional%2C%20while%20'disabled'%20means%20it%20is%20non-interactive%20and%20inactive%22%2C%0A%09%09%22options%22%20%3A%20%5B%20%22Enabled%22%2C%20%22Disabled%22%20%5D%2C%0A%09%09%22value%22%20%3A%20%22Enabled%22%0A%09%20%20%7D%2C%0A%09%20%20%22label_placement%22%20%3A%20%7B%0A%09%09%22type%22%20%3A%20%22list%22%2C%0A%09%09%22displayName%22%20%3A%20%22Label%20placement%22%2C%0A%09%09%22description%22%20%3A%20%22Specifies%20the%20label's%20position%20relative%20to%20the%20component%2C%20with%20options%3A%20'top'%20(Label%20appears%20above%20the%20component)%2C%20'bottom'%20(Label%20appears%20below%20the%20component)%2C%20'start'%20(Label%20appears%20left%20of%20the%20component)%22%2C%0A%09%09%22options%22%20%3A%20%5B%20%22top%22%2C%20%22bottom%22%2C%20%22start%22%2C%20%22end%22%20%5D%2C%0A%09%09%22value%22%20%3A%20%22end%22%0A%09%20%20%7D%2C%0A%09%20%20%22label_text%22%20%3A%20%7B%0A%09%09%22type%22%20%3A%20%22string%22%2C%0A%09%09%22displayName%22%20%3A%20%22Label%20text%22%2C%0A%09%09%22description%22%20%3A%20%22Label%20text%20informs%20users%20about%20what%20information%20is%20requested%20for%20a%20checkboxSet%22%2C%0A%09%09%22value%22%20%3A%20%22Label%20Text%22%0A%09%20%20%7D%2C%0A%09%20%20%22data_set%22%20%3A%20%7B%0A%09%09%22type%22%20%3A%20%22string%22%2C%0A%09%09%22displayName%22%20%3A%20%22Data%20Set%20values%22%2C%0A%09%09%22description%22%20%3A%20%22Defines%20the%20available%20options%20for%20the%20data%20set%2C%20typically%20a%20list%20of%20labels%20such%20as%20'Option1'%2C%20'Option2'%2C%20'Option3'%22%2C%0A%09%09%22value%22%20%3A%20%22Option1%2COption2%2COption3%22%0A%09%20%20%7D%2C%0A%09%20%20%22default_value%22%20%3A%20%7B%0A%09%09%22type%22%20%3A%20%22string%22%2C%0A%09%09%22displayName%22%20%3A%20%22Default%20Value%22%2C%0A%09%09%22description%22%20%3A%20%22Specifies%20the%20default%20value%20for%20the%20checked%20attribute.%20Default%20is%20'Option1'%22%2C%0A%09%09%22value%22%20%3A%20%22%22%0A%09%20%20%7D%2C%0A%09%20%20%22required%22%20%3A%20%7B%0A%09%09%22type%22%20%3A%20%22boolean%22%2C%0A%09%09%22displayName%22%20%3A%20%22Required%22%2C%0A%09%09%22description%22%20%3A%20%22Indicates%20whether%20the%20checkboxSet%20is%20mandatory.%20True%20makes%20it%20required%3B%20false%20means%20it%20is%20optional%22%2C%0A%09%09%22value%22%20%3A%20false%0A%09%20%20%7D%0A%09%7D%2C%0A%09%22events%22%20%3A%20%7B%20%7D%0A%20%20%7D%0A%20%20"
|
|
7
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare function initializeSlider(widgetMap: any, value: any, minValue: any, maxValue: any, stepValue: any, required: any): void;
|
|
2
|
+
declare function updateSlider(widgetMap: any, value: any, minValue: any, maxValue: any, stepValue: any): void;
|
|
3
|
+
declare function updateSliderStep(widgetMap: any, value: any, minValue: any, maxValue: any, stepValue: any): void;
|
|
4
|
+
declare function setRequired(widgetMap: any, required: any): void;
|
|
5
|
+
declare function appendSliderIndicator(slider: any): void;
|
|
6
|
+
declare function configureSliderAndSetStyles(widgetMap: any, value: any, minValue: any, maxValue: any, stepValue: any): void;
|
|
7
|
+
declare function updateSliderStyles(slider: any, value: any, minValue: any, maxValue: any): void;
|
|
8
|
+
declare function setupStepsAndLabels(widgetMap: any): void;
|
|
9
|
+
declare function createStepLabel(labelValue: any, minValue: any, maxValue: any): HTMLParagraphElement;
|
|
10
|
+
declare function updateLabelVisibility(widgetMap: any): void;
|
|
11
|
+
declare function getSliderPercentage(value: any, minValue: any, maxValue: any): number;
|
|
12
|
+
declare function getSliderPercentage(value: any): number;
|
|
13
|
+
declare function clamp(value: any, minValue: any, maxValue: any): number;
|
|
14
|
+
declare function toggleLabelVisibilty(showLabelsBool: any, widgetMap: any): void;
|
|
15
|
+
declare function toggleLabelVisibilty(widgetMap: any, showLabelsBool: any): void;
|
|
16
|
+
declare function toggleIconsVisibility(widgetMap: any, showIconsBool: any, iconActionsBool: any): void;
|
|
17
|
+
declare function toggleIconsVisibility(widgetMap: any, showIconsBool: any, startIcon: any, endIcon: any, iconActionsBool: any): void;
|
|
18
|
+
declare function updateStartIconVisibility(widgetMap: any, iconActionsBool: any, showIconsBool: any): void;
|
|
19
|
+
declare function updateStartIconVisibility(widgetMap: any, iconActionsBool: any, showIconsBool: any): void;
|
|
20
|
+
declare function updateEndIconVisibility(widgetMap: any, iconActionsBool: any, showIconsBool: any): void;
|
|
21
|
+
declare function updateEndIconVisibility(widgetMap: any, iconActionsBool: any, showIconsBool: any): void;
|
|
22
|
+
declare function moveSlider(direction: any, widgetMap: any): void;
|
|
23
|
+
declare function moveSlider(widgetMap: any, direction: any): void;
|
|
24
|
+
declare function convertToBoolean(value: any): boolean;
|
|
25
|
+
declare function convertToBoolean(value: any): boolean;
|