@spartan-ng/cli 0.0.1-alpha.655 → 0.0.1-alpha.656
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/package.json +1 -1
- package/src/generators/base/lib/styles/index.d.ts +3 -0
- package/src/generators/base/lib/styles/index.js +7 -0
- package/src/generators/base/lib/styles/index.js.map +1 -0
- package/src/generators/healthcheck/generator.js +2 -0
- package/src/generators/healthcheck/generator.js.map +1 -1
- package/src/generators/healthcheck/healthchecks/brn-select.d.ts +2 -0
- package/src/generators/healthcheck/healthchecks/brn-select.js +35 -0
- package/src/generators/healthcheck/healthchecks/brn-select.js.map +1 -0
- package/src/generators/migrate-brn-select/compat.d.ts +2 -0
- package/src/generators/migrate-brn-select/compat.js +6 -0
- package/src/generators/migrate-brn-select/compat.js.map +1 -0
- package/src/generators/migrate-brn-select/generator.d.ts +4 -0
- package/src/generators/migrate-brn-select/generator.js +78 -0
- package/src/generators/migrate-brn-select/generator.js.map +1 -0
- package/src/generators/migrate-brn-select/schema.d.ts +3 -0
- package/src/generators/migrate-brn-select/schema.json +14 -0
- package/src/generators/migrate-module-imports/import-map.d.ts +0 -1
- package/src/generators/migrate-module-imports/import-map.js +1 -1
- package/src/generators/migrate-module-imports/import-map.js.map +1 -1
- package/src/generators/ui/libs/calendar/files/lib/hlm-calendar-multi.ts.template +19 -16
- package/src/generators/ui/libs/calendar/files/lib/hlm-calendar-range.ts.template +19 -16
- package/src/generators/ui/libs/calendar/files/lib/hlm-calendar.ts.template +19 -16
- package/src/generators/ui/libs/combobox/files/index.ts.template +6 -0
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-placeholder.ts.template +17 -0
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-trigger.ts.template +6 -1
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-value-template.ts.template +5 -0
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-value.ts.template +10 -2
- package/src/generators/ui/libs/navigation-menu/files/index.ts.template +14 -14
- package/src/generators/ui/libs/pagination/files/lib/hlm-numbered-pagination-query-params.ts.template +8 -9
- package/src/generators/ui/libs/pagination/files/lib/hlm-numbered-pagination.ts.template +8 -8
- package/src/generators/ui/libs/select/files/index.ts.template +21 -3
- package/src/generators/ui/libs/select/files/lib/hlm-select-content.ts.template +28 -16
- package/src/generators/ui/libs/select/files/lib/hlm-select-group.ts.template +11 -3
- package/src/generators/ui/libs/select/files/lib/hlm-select-item.ts.template +34 -0
- package/src/generators/ui/libs/select/files/lib/hlm-select-label.ts.template +7 -11
- package/src/generators/ui/libs/select/files/lib/hlm-select-multiple.ts.template +47 -0
- package/src/generators/ui/libs/select/files/lib/hlm-select-placeholder.ts.template +17 -0
- package/src/generators/ui/libs/select/files/lib/hlm-select-portal.ts.template +8 -0
- package/src/generators/ui/libs/select/files/lib/hlm-select-scroll-down.ts.template +8 -4
- package/src/generators/ui/libs/select/files/lib/hlm-select-scroll-up.ts.template +8 -4
- package/src/generators/ui/libs/select/files/lib/hlm-select-separator.ts.template +4 -2
- package/src/generators/ui/libs/select/files/lib/hlm-select-trigger.ts.template +21 -33
- package/src/generators/ui/libs/select/files/lib/hlm-select-value-template.ts.template +5 -0
- package/src/generators/ui/libs/select/files/lib/hlm-select-value.ts.template +10 -3
- package/src/generators/ui/libs/select/files/lib/hlm-select-values-content.ts.template +9 -0
- package/src/generators/ui/libs/select/files/lib/hlm-select-values.ts.template +5 -0
- package/src/generators/ui/libs/select/files/lib/hlm-select.ts.template +38 -2
- package/src/generators/ui/supported-ui-libraries.json +40 -42
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/registry/schema.d.ts +14 -14
- package/src/generators/ui/libs/select/files/lib/hlm-select-option.ts.template +0 -32
- /package/src/generators/ui/libs/navigation-menu/files/{hlm-navigation-menu-content.ts.template → lib/hlm-navigation-menu-content.ts.template} +0 -0
- /package/src/generators/ui/libs/navigation-menu/files/{hlm-navigation-menu-item.ts.template → lib/hlm-navigation-menu-item.ts.template} +0 -0
- /package/src/generators/ui/libs/navigation-menu/files/{hlm-navigation-menu-link.ts.template → lib/hlm-navigation-menu-link.ts.template} +0 -0
- /package/src/generators/ui/libs/navigation-menu/files/{hlm-navigation-menu-list.ts.template → lib/hlm-navigation-menu-list.ts.template} +0 -0
- /package/src/generators/ui/libs/navigation-menu/files/{hlm-navigation-menu-portal.ts.template → lib/hlm-navigation-menu-portal.ts.template} +0 -0
- /package/src/generators/ui/libs/navigation-menu/files/{hlm-navigation-menu-trigger.ts.template → lib/hlm-navigation-menu-trigger.ts.template} +0 -0
- /package/src/generators/ui/libs/navigation-menu/files/{hlm-navigation-menu.ts.template → lib/hlm-navigation-menu.ts.template} +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./create-style-map"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./transform"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./transform-style-map"), exports);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/base/lib/styles/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,sDAA4B;AAC5B,gEAAsC"}
|
|
@@ -9,6 +9,7 @@ const brn_accordion_trigger_1 = require("./healthchecks/brn-accordion-trigger");
|
|
|
9
9
|
const brn_checkbox_changed_event_rename_1 = require("./healthchecks/brn-checkbox-changed-event-rename");
|
|
10
10
|
const brn_collapsible_1 = require("./healthchecks/brn-collapsible");
|
|
11
11
|
const brn_radio_1 = require("./healthchecks/brn-radio");
|
|
12
|
+
const brn_select_1 = require("./healthchecks/brn-select");
|
|
12
13
|
const brn_separator_1 = require("./healthchecks/brn-separator");
|
|
13
14
|
const brn_switch_changed_event_rename_1 = require("./healthchecks/brn-switch-changed-event-rename");
|
|
14
15
|
const brn_toggle_1 = require("./healthchecks/brn-toggle");
|
|
@@ -60,6 +61,7 @@ async function healthcheckGenerator(tree, options) {
|
|
|
60
61
|
hlm_dialog_1.helmDialogHealthcheck,
|
|
61
62
|
hlm_dialog_portal_1.helmDialogPortalHealthcheck,
|
|
62
63
|
sonner_1.sonnerHealthcheck,
|
|
64
|
+
brn_select_1.brnSelectHealthcheck,
|
|
63
65
|
];
|
|
64
66
|
const failedReports = [];
|
|
65
67
|
const importAlias = await (0, config_1.getImportAlias)(tree, options.angularCli);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/healthcheck/generator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/healthcheck/generator.ts"],"names":[],"mappings":";;AAkCA,oDA0DC;AA5FD,uCAA4D;AAC5D,+CAAoD;AACpD,iDAAmH;AACnH,gEAAuE;AACvE,gFAAwF;AACxF,wGAAiG;AACjG,oEAA6E;AAC7E,wDAAiE;AACjE,0DAAiE;AACjE,gEAAyE;AACzE,oGAA6F;AAC7F,0DAAmE;AACnE,sEAA8E;AAC9E,0EAAiF;AACjF,8DAAqE;AACrE,8DAAqE;AACrE,4CAA0D;AAC1D,oEAAuE;AACvE,0DAAkE;AAClE,wEAA+E;AAC/E,sDAA8D;AAC9D,sDAA8D;AAC9D,8DAAkE;AAClE,oEAAuE;AACvE,0DAA8D;AAC9D,kEAAyE;AACzE,0EAAgF;AAChF,kDAA0D;AAC1D,oDAA4D;AAE5D,2CAA4C;AAC5C,+CAA+C;AAC/C,2CAAgD;AAEzC,KAAK,UAAU,oBAAoB,CAAC,IAAU,EAAE,OAA8D;IACpH,eAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAEvC,MA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,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC;YACrF,CAAC;QACF,CAAC;IACF,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACzB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACzB,CAAC;AACF,CAAC;AAED,kBAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.brnSelectHealthcheck = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const generator_1 = tslib_1.__importDefault(require("../../migrate-brn-select/generator"));
|
|
7
|
+
const healthchecks_1 = require("../healthchecks");
|
|
8
|
+
exports.brnSelectHealthcheck = {
|
|
9
|
+
name: 'Brain Select',
|
|
10
|
+
async detect(tree, failure, _, { importAlias }) {
|
|
11
|
+
(0, devkit_1.visitNotIgnoredFiles)(tree, '/', (file) => {
|
|
12
|
+
// if the file is a .ts or .htlm file, check for helm menu
|
|
13
|
+
if (!file.endsWith('.ts') && !file.endsWith('.html')) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
// skip hlm select files itself
|
|
17
|
+
if (file.match(/hlm-select(-.*)?\.ts$/)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const contents = tree.read(file, 'utf-8');
|
|
21
|
+
if (!contents) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (contents.includes("'@spartan-ng/brain/select'")) {
|
|
25
|
+
failure(`The select package (@spartan-ng/brain/select) is deprecated. Please use ${importAlias}/select instead.`, healthchecks_1.HealthcheckSeverity.Error, true);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
fix: async (tree) => {
|
|
30
|
+
await (0, generator_1.default)(tree, { skipFormat: true });
|
|
31
|
+
return true;
|
|
32
|
+
},
|
|
33
|
+
prompt: 'Would you like to migrate @spartan-ng/brain/select imports and selectors? Regenerate the helm select package.',
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=brn-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brn-select.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/healthchecks/brn-select.ts"],"names":[],"mappings":";;;;AAAA,uCAAkD;AAClD,2FAA2E;AAC3E,kDAAwE;AAE3D,QAAA,oBAAoB,GAAgB;IAChD,IAAI,EAAE,cAAc;IACpB,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE;QAC7C,IAAA,6BAAoB,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,0DAA0D;YAC1D,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBACtD,OAAO;YACR,CAAC;YAED,+BAA+B;YAC/B,IAAI,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,EAAE,CAAC;gBACzC,OAAO;YACR,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAE1C,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACf,OAAO;YACR,CAAC;YAED,IAAI,QAAQ,CAAC,QAAQ,CAAC,4BAA4B,CAAC,EAAE,CAAC;gBACrD,OAAO,CACN,2EAA2E,WAAW,kBAAkB,EACxG,kCAAmB,CAAC,KAAK,EACzB,IAAI,CACJ,CAAC;YACH,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IACD,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACnB,MAAM,IAAA,mBAAyB,EAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,EACL,+GAA+G;CAChH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const generator_1 = require("./generator");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxGenerator)(generator_1.migrateBrnSelectGenerator);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-brn-select/compat.ts"],"names":[],"mappings":";;AAAA,uCAAgD;AAChD,2CAAwD;AAExD,kBAAe,IAAA,2BAAkB,EAAC,qCAAyB,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Tree } from '@nx/devkit';
|
|
2
|
+
import type { MigrateBrnSelectGeneratorSchema } from './schema';
|
|
3
|
+
export declare function migrateBrnSelectGenerator(tree: Tree, { skipFormat }: MigrateBrnSelectGeneratorSchema): Promise<void>;
|
|
4
|
+
export default migrateBrnSelectGenerator;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.migrateBrnSelectGenerator = migrateBrnSelectGenerator;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const visit_files_1 = require("../../utils/visit-files");
|
|
6
|
+
async function migrateBrnSelectGenerator(tree, { skipFormat }) {
|
|
7
|
+
updateImports(tree);
|
|
8
|
+
replaceSelector(tree);
|
|
9
|
+
if (!skipFormat) {
|
|
10
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Update imports
|
|
15
|
+
*/
|
|
16
|
+
function updateImports(tree) {
|
|
17
|
+
(0, visit_files_1.visitFiles)(tree, '/', (path) => {
|
|
18
|
+
// if this is not a typescript file then skip
|
|
19
|
+
if (!path.endsWith('.ts')) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
// skip hlm select files itself
|
|
23
|
+
if (path.match(/hlm-select(-.*)?\.ts$/)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
let content = tree.read(path, 'utf-8');
|
|
27
|
+
if (!content) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (content.includes('@spartan-ng/brain/select')) {
|
|
31
|
+
content = content
|
|
32
|
+
.replace(`import { BrnSelectImports } from '@spartan-ng/brain/select';`, '')
|
|
33
|
+
.replace(/BrnSelectImports,?\s?/g, '');
|
|
34
|
+
}
|
|
35
|
+
tree.write(path, content);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function replaceSelector(tree) {
|
|
39
|
+
(0, visit_files_1.visitFiles)(tree, '.', (path) => {
|
|
40
|
+
// if this is not an html file or typescript file (inline templates) then skip
|
|
41
|
+
if (!path.endsWith('.html') && !path.endsWith('.ts')) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
// skip hlm select files itself
|
|
45
|
+
if (path.match(/hlm-select(-.*)?\.ts$/)) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
let content = tree.read(path, 'utf-8');
|
|
49
|
+
if (!content) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (content.includes('<brn-select')) {
|
|
53
|
+
content = content.replace(/<brn-select([^>]*)>(.*?)<\/brn-select>/gs, (match, attributes, innerContent) => {
|
|
54
|
+
const placeholderMatch = attributes.match(/placeholder="([^"]*)"/);
|
|
55
|
+
const placeholder = placeholderMatch?.[1];
|
|
56
|
+
const newAttributes = attributes.replace(/\s+placeholder="[^"]*"/, '');
|
|
57
|
+
let newInnerContent = innerContent;
|
|
58
|
+
if (placeholder) {
|
|
59
|
+
newInnerContent = newInnerContent
|
|
60
|
+
.replace(/<hlm-select-value\s*\/>/g, `<hlm-select-value placeholder="${placeholder}" />`)
|
|
61
|
+
.replace(/<hlm-select-value\s*>/g, `<hlm-select-value placeholder="${placeholder}">`);
|
|
62
|
+
}
|
|
63
|
+
return `<hlm-select${newAttributes}>${newInnerContent}</hlm-select>`;
|
|
64
|
+
});
|
|
65
|
+
content = content
|
|
66
|
+
.replace(/<hlm-select-content/g, `<hlm-select-content *hlmSelectPortal`)
|
|
67
|
+
.replace(/<hlm-select-content([^>]*)>/g, `<hlm-select-content$1>\n<hlm-select-group>`)
|
|
68
|
+
.replace(/<\/hlm-select-content>/g, `</hlm-select-group>\n</hlm-select-content>`)
|
|
69
|
+
.replace(/<hlm-option/g, `<hlm-select-item`)
|
|
70
|
+
.replace(/<\/hlm-option>/g, `</hlm-select-item>`)
|
|
71
|
+
.replace(/<hlm-select-scroll-up \/>/g, '')
|
|
72
|
+
.replace(/<hlm-select-scroll-down \/>/g, '');
|
|
73
|
+
}
|
|
74
|
+
tree.write(path, content);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
exports.default = migrateBrnSelectGenerator;
|
|
78
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-brn-select/generator.ts"],"names":[],"mappings":";;AAIA,8DAOC;AAXD,uCAAoD;AACpD,yDAAqD;AAG9C,KAAK,UAAU,yBAAyB,CAAC,IAAU,EAAE,EAAE,UAAU,EAAmC;IAC1G,aAAa,CAAC,IAAI,CAAC,CAAC;IACpB,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACzB,CAAC;AACF,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CAAC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json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "MigrateBrnSelect",
|
|
4
|
+
"title": "",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"skipFormat": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"default": false,
|
|
10
|
+
"description": "Skip formatting files"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"required": []
|
|
14
|
+
}
|
|
@@ -24,7 +24,7 @@ exports.default = {
|
|
|
24
24
|
BrnPopoverModule: 'BrnPopoverImports',
|
|
25
25
|
BrnProgressModule: 'BrnProgressImports',
|
|
26
26
|
BrnRadioGroupModule: 'BrnRadioGroupImports',
|
|
27
|
-
BrnSelectModule: 'BrnSelectImports',
|
|
27
|
+
// BrnSelectModule: 'BrnSelectImports',
|
|
28
28
|
BrnSeparatorModule: 'BrnSeparatorImports',
|
|
29
29
|
BrnSheetModule: 'BrnSheetImports',
|
|
30
30
|
BrnSwitchModule: 'BrnSwitchImports',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-map.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-module-imports/import-map.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACd,kBAAkB,EAAE,qBAAqB;IACzC,oBAAoB,EAAE,uBAAuB;IAC7C,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,kBAAkB;IACnC,eAAe,EAAE,kBAAkB;IACnC,iBAAiB,EAAE,oBAAoB;IACvC,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,uBAAuB;IAC7C,gBAAgB,EAAE,mBAAmB;IACrC,eAAe,EAAE,kBAAkB;IACnC,kBAAkB,EAAE,qBAAqB;IACzC,iBAAiB,EAAE,oBAAoB;IACvC,cAAc,EAAE,iBAAiB;IACjC,kBAAkB,EAAE,wBAAwB;IAC5C,iBAAiB,EAAE,wBAAwB;IAC3C,qBAAqB,EAAE,wBAAwB;IAC/C,iBAAiB,EAAE,wBAAwB;IAC3C,aAAa,EAAE,wBAAwB;IACvC,gBAAgB,EAAE,wBAAwB;IAC1C,oBAAoB,EAAE,wBAAwB;IAC9C,gBAAgB,EAAE,mBAAmB;IACrC,iBAAiB,EAAE,oBAAoB;IACvC,mBAAmB,EAAE,sBAAsB;IAC3C,
|
|
1
|
+
{"version":3,"file":"import-map.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-module-imports/import-map.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACd,kBAAkB,EAAE,qBAAqB;IACzC,oBAAoB,EAAE,uBAAuB;IAC7C,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,kBAAkB;IACnC,eAAe,EAAE,kBAAkB;IACnC,iBAAiB,EAAE,oBAAoB;IACvC,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,uBAAuB;IAC7C,gBAAgB,EAAE,mBAAmB;IACrC,eAAe,EAAE,kBAAkB;IACnC,kBAAkB,EAAE,qBAAqB;IACzC,iBAAiB,EAAE,oBAAoB;IACvC,cAAc,EAAE,iBAAiB;IACjC,kBAAkB,EAAE,wBAAwB;IAC5C,iBAAiB,EAAE,wBAAwB;IAC3C,qBAAqB,EAAE,wBAAwB;IAC/C,iBAAiB,EAAE,wBAAwB;IAC3C,aAAa,EAAE,wBAAwB;IACvC,gBAAgB,EAAE,wBAAwB;IAC1C,oBAAoB,EAAE,wBAAwB;IAC9C,gBAAgB,EAAE,mBAAmB;IACrC,iBAAiB,EAAE,oBAAoB;IACvC,mBAAmB,EAAE,sBAAsB;IAC3C,uCAAuC;IACvC,kBAAkB,EAAE,qBAAqB;IACzC,cAAc,EAAE,iBAAiB;IACjC,eAAe,EAAE,kBAAkB;IACnC,aAAa,EAAE,gBAAgB;IAC/B,eAAe,EAAE,kBAAkB;IACnC,oBAAoB,EAAE,uBAAuB;IAC7C,wBAAwB,EAAE,uBAAuB;IACjD,gBAAgB,EAAE,mBAAmB;IACrC,kBAAkB,EAAE,qBA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C"}
|
|
@@ -14,7 +14,6 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
|
14
14
|
import { lucideChevronLeft, lucideChevronRight } from '@ng-icons/lucide';
|
|
15
15
|
import { BrnCalendarImports, BrnCalendarMulti, injectBrnCalendarI18n, type Weekday } from '@spartan-ng/brain/calendar';
|
|
16
16
|
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
17
|
-
import { BrnSelectImports } from '@spartan-ng/brain/select';
|
|
18
17
|
import { buttonVariants } from '<%- importAlias %>/button';
|
|
19
18
|
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
20
19
|
import { HlmSelectImports } from '<%- importAlias %>/select';
|
|
@@ -23,7 +22,7 @@ import type { ClassValue } from 'clsx';
|
|
|
23
22
|
|
|
24
23
|
@Component({
|
|
25
24
|
selector: 'hlm-calendar-multi',
|
|
26
|
-
imports: [BrnCalendarImports, NgIcon, HlmIcon, NgTemplateOutlet,
|
|
25
|
+
imports: [BrnCalendarImports, NgIcon, HlmIcon, NgTemplateOutlet, HlmSelectImports],
|
|
27
26
|
viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
|
|
28
27
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
29
28
|
template: `
|
|
@@ -46,28 +45,32 @@ import type { ClassValue } from 'clsx';
|
|
|
46
45
|
<div class="relative flex items-center justify-center pt-1">
|
|
47
46
|
<div class="flex w-full items-center justify-center gap-1.5">
|
|
48
47
|
<ng-template #month>
|
|
49
|
-
<
|
|
48
|
+
<hlm-select brnCalendarMonthSelect>
|
|
50
49
|
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
51
|
-
<
|
|
50
|
+
<hlm-select-value />
|
|
52
51
|
</hlm-select-trigger>
|
|
53
|
-
<hlm-select-content class="max-h-80">
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
<hlm-select-content *hlmSelectPortal class="max-h-80">
|
|
53
|
+
<hlm-select-group>
|
|
54
|
+
@for (month of _i18n.config().months(); track month) {
|
|
55
|
+
<hlm-select-item [value]="month">{{ month }}</hlm-select-item>
|
|
56
|
+
}
|
|
57
|
+
</hlm-select-group>
|
|
57
58
|
</hlm-select-content>
|
|
58
|
-
</
|
|
59
|
+
</hlm-select>
|
|
59
60
|
</ng-template>
|
|
60
61
|
<ng-template #year>
|
|
61
|
-
<
|
|
62
|
+
<hlm-select brnCalendarYearSelect>
|
|
62
63
|
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
63
|
-
<
|
|
64
|
+
<hlm-select-value />
|
|
64
65
|
</hlm-select-trigger>
|
|
65
|
-
<hlm-select-content class="max-h-80">
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
<hlm-select-content *hlmSelectPortal class="max-h-80">
|
|
67
|
+
<hlm-select-group>
|
|
68
|
+
@for (year of _i18n.config().years(); track year) {
|
|
69
|
+
<hlm-select-item [value]="year">{{ year }}</hlm-select-item>
|
|
70
|
+
}
|
|
71
|
+
</hlm-select-group>
|
|
69
72
|
</hlm-select-content>
|
|
70
|
-
</
|
|
73
|
+
</hlm-select>
|
|
71
74
|
</ng-template>
|
|
72
75
|
@let heading = _heading();
|
|
73
76
|
@switch (captionLayout()) {
|
|
@@ -14,7 +14,6 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
|
14
14
|
import { lucideChevronLeft, lucideChevronRight } from '@ng-icons/lucide';
|
|
15
15
|
import { BrnCalendarImports, BrnCalendarRange, injectBrnCalendarI18n, type Weekday } from '@spartan-ng/brain/calendar';
|
|
16
16
|
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
17
|
-
import { BrnSelectImports } from '@spartan-ng/brain/select';
|
|
18
17
|
import { buttonVariants } from '<%- importAlias %>/button';
|
|
19
18
|
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
20
19
|
import { HlmSelectImports } from '<%- importAlias %>/select';
|
|
@@ -23,7 +22,7 @@ import type { ClassValue } from 'clsx';
|
|
|
23
22
|
|
|
24
23
|
@Component({
|
|
25
24
|
selector: 'hlm-calendar-range',
|
|
26
|
-
imports: [BrnCalendarImports, NgIcon, HlmIcon, HlmSelectImports,
|
|
25
|
+
imports: [BrnCalendarImports, NgIcon, HlmIcon, HlmSelectImports, NgTemplateOutlet],
|
|
27
26
|
viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
|
|
28
27
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
29
28
|
template: `
|
|
@@ -45,28 +44,32 @@ import type { ClassValue } from 'clsx';
|
|
|
45
44
|
<div class="relative flex items-center justify-center pt-1">
|
|
46
45
|
<div class="flex w-full items-center justify-center gap-1.5">
|
|
47
46
|
<ng-template #month>
|
|
48
|
-
<
|
|
47
|
+
<hlm-select brnCalendarMonthSelect>
|
|
49
48
|
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
50
|
-
<
|
|
49
|
+
<hlm-select-value />
|
|
51
50
|
</hlm-select-trigger>
|
|
52
|
-
<hlm-select-content class="max-h-80">
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
<hlm-select-content *hlmSelectPortal class="max-h-80">
|
|
52
|
+
<hlm-select-group>
|
|
53
|
+
@for (month of _i18n.config().months(); track month) {
|
|
54
|
+
<hlm-select-item [value]="month">{{ month }}</hlm-select-item>
|
|
55
|
+
}
|
|
56
|
+
</hlm-select-group>
|
|
56
57
|
</hlm-select-content>
|
|
57
|
-
</
|
|
58
|
+
</hlm-select>
|
|
58
59
|
</ng-template>
|
|
59
60
|
<ng-template #year>
|
|
60
|
-
<
|
|
61
|
+
<hlm-select brnCalendarYearSelect>
|
|
61
62
|
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
62
|
-
<
|
|
63
|
+
<hlm-select-value />
|
|
63
64
|
</hlm-select-trigger>
|
|
64
|
-
<hlm-select-content class="max-h-80">
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
<hlm-select-content *hlmSelectPortal class="max-h-80">
|
|
66
|
+
<hlm-select-group>
|
|
67
|
+
@for (year of _i18n.config().years(); track year) {
|
|
68
|
+
<hlm-select-item [value]="year">{{ year }}</hlm-select-item>
|
|
69
|
+
}
|
|
70
|
+
</hlm-select-group>
|
|
68
71
|
</hlm-select-content>
|
|
69
|
-
</
|
|
72
|
+
</hlm-select>
|
|
70
73
|
</ng-template>
|
|
71
74
|
@let heading = _heading();
|
|
72
75
|
@switch (captionLayout()) {
|
|
@@ -14,7 +14,6 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
|
14
14
|
import { lucideChevronLeft, lucideChevronRight } from '@ng-icons/lucide';
|
|
15
15
|
import { BrnCalendar, BrnCalendarImports, injectBrnCalendarI18n, type Weekday } from '@spartan-ng/brain/calendar';
|
|
16
16
|
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
17
|
-
import { BrnSelectImports } from '@spartan-ng/brain/select';
|
|
18
17
|
import { buttonVariants } from '<%- importAlias %>/button';
|
|
19
18
|
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
20
19
|
import { HlmSelectImports } from '<%- importAlias %>/select';
|
|
@@ -23,7 +22,7 @@ import type { ClassValue } from 'clsx';
|
|
|
23
22
|
|
|
24
23
|
@Component({
|
|
25
24
|
selector: 'hlm-calendar',
|
|
26
|
-
imports: [BrnCalendarImports, NgIcon, HlmIcon,
|
|
25
|
+
imports: [BrnCalendarImports, NgIcon, HlmIcon, HlmSelectImports, NgTemplateOutlet],
|
|
27
26
|
viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
|
|
28
27
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
29
28
|
template: `
|
|
@@ -44,28 +43,32 @@ import type { ClassValue } from 'clsx';
|
|
|
44
43
|
<div class="relative flex items-center justify-center pt-1">
|
|
45
44
|
<div class="flex w-full items-center justify-center gap-1.5">
|
|
46
45
|
<ng-template #month>
|
|
47
|
-
<
|
|
46
|
+
<hlm-select brnCalendarMonthSelect>
|
|
48
47
|
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
49
|
-
<
|
|
48
|
+
<hlm-select-value />
|
|
50
49
|
</hlm-select-trigger>
|
|
51
|
-
<hlm-select-content class="max-h-80">
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
<hlm-select-content *hlmSelectPortal class="max-h-80">
|
|
51
|
+
<hlm-select-group>
|
|
52
|
+
@for (month of _i18n.config().months(); track month) {
|
|
53
|
+
<hlm-select-item [value]="month">{{ month }}</hlm-select-item>
|
|
54
|
+
}
|
|
55
|
+
</hlm-select-group>
|
|
55
56
|
</hlm-select-content>
|
|
56
|
-
</
|
|
57
|
+
</hlm-select>
|
|
57
58
|
</ng-template>
|
|
58
59
|
<ng-template #year>
|
|
59
|
-
<
|
|
60
|
+
<hlm-select brnCalendarYearSelect>
|
|
60
61
|
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
61
|
-
<
|
|
62
|
+
<hlm-select-value />
|
|
62
63
|
</hlm-select-trigger>
|
|
63
|
-
<hlm-select-content class="max-h-80">
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
<hlm-select-content *hlmSelectPortal class="max-h-80">
|
|
65
|
+
<hlm-select-group>
|
|
66
|
+
@for (year of _i18n.config().years(); track year) {
|
|
67
|
+
<hlm-select-item [value]="year">{{ year }}</hlm-select-item>
|
|
68
|
+
}
|
|
69
|
+
</hlm-select-group>
|
|
67
70
|
</hlm-select-content>
|
|
68
|
-
</
|
|
71
|
+
</hlm-select>
|
|
69
72
|
</ng-template>
|
|
70
73
|
@let heading = _heading();
|
|
71
74
|
@switch (captionLayout()) {
|
|
@@ -10,11 +10,13 @@ import { HlmComboboxItem } from './lib/hlm-combobox-item';
|
|
|
10
10
|
import { HlmComboboxLabel } from './lib/hlm-combobox-label';
|
|
11
11
|
import { HlmComboboxList } from './lib/hlm-combobox-list';
|
|
12
12
|
import { HlmComboboxMultiple } from './lib/hlm-combobox-multiple';
|
|
13
|
+
import { HlmComboboxPlaceholder } from './lib/hlm-combobox-placeholder';
|
|
13
14
|
import { HlmComboboxPortal } from './lib/hlm-combobox-portal';
|
|
14
15
|
import { HlmComboboxSeparator } from './lib/hlm-combobox-separator';
|
|
15
16
|
import { HlmComboboxStatus } from './lib/hlm-combobox-status';
|
|
16
17
|
import { HlmComboboxTrigger } from './lib/hlm-combobox-trigger';
|
|
17
18
|
import { HlmComboboxValue } from './lib/hlm-combobox-value';
|
|
19
|
+
import { HlmComboboxValueTemplate } from './lib/hlm-combobox-value-template';
|
|
18
20
|
import { HlmComboboxValues } from './lib/hlm-combobox-values';
|
|
19
21
|
|
|
20
22
|
export * from './lib/hlm-combobox';
|
|
@@ -29,11 +31,13 @@ export * from './lib/hlm-combobox-item';
|
|
|
29
31
|
export * from './lib/hlm-combobox-label';
|
|
30
32
|
export * from './lib/hlm-combobox-list';
|
|
31
33
|
export * from './lib/hlm-combobox-multiple';
|
|
34
|
+
export * from './lib/hlm-combobox-placeholder';
|
|
32
35
|
export * from './lib/hlm-combobox-portal';
|
|
33
36
|
export * from './lib/hlm-combobox-separator';
|
|
34
37
|
export * from './lib/hlm-combobox-status';
|
|
35
38
|
export * from './lib/hlm-combobox-trigger';
|
|
36
39
|
export * from './lib/hlm-combobox-value';
|
|
40
|
+
export * from './lib/hlm-combobox-value-template';
|
|
37
41
|
export * from './lib/hlm-combobox-values';
|
|
38
42
|
|
|
39
43
|
export const HlmComboboxImports = [
|
|
@@ -49,10 +53,12 @@ export const HlmComboboxImports = [
|
|
|
49
53
|
HlmComboboxLabel,
|
|
50
54
|
HlmComboboxList,
|
|
51
55
|
HlmComboboxMultiple,
|
|
56
|
+
HlmComboboxPlaceholder,
|
|
52
57
|
HlmComboboxPortal,
|
|
53
58
|
HlmComboboxSeparator,
|
|
54
59
|
HlmComboboxStatus,
|
|
55
60
|
HlmComboboxTrigger,
|
|
56
61
|
HlmComboboxValue,
|
|
62
|
+
HlmComboboxValueTemplate,
|
|
57
63
|
HlmComboboxValues,
|
|
58
64
|
] as const;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { BrnComboboxPlaceholder } from '@spartan-ng/brain/combobox';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
4
|
+
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmComboboxPlaceholder],hlm-combobox-placeholder',
|
|
7
|
+
hostDirectives: [BrnComboboxPlaceholder],
|
|
8
|
+
host: { 'data-slot': 'combobox-placeholder' },
|
|
9
|
+
})
|
|
10
|
+
export class HlmComboboxPlaceholder {
|
|
11
|
+
constructor() {
|
|
12
|
+
classes(
|
|
13
|
+
() =>
|
|
14
|
+
"flex items-center gap-2 data-hidden:hidden [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0 [&_ng-icon:not([class*='text-'])]:text-base",
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -24,6 +24,7 @@ import type { ClassValue } from 'clsx';
|
|
|
24
24
|
brnComboboxPopoverTrigger
|
|
25
25
|
hlmBtn
|
|
26
26
|
data-slot="combobox-trigger"
|
|
27
|
+
[id]="buttonId()"
|
|
27
28
|
[class]="_computedClass()"
|
|
28
29
|
[variant]="variant()"
|
|
29
30
|
>
|
|
@@ -33,10 +34,14 @@ import type { ClassValue } from 'clsx';
|
|
|
33
34
|
`,
|
|
34
35
|
})
|
|
35
36
|
export class HlmComboboxTrigger {
|
|
37
|
+
private static _id = 0;
|
|
38
|
+
|
|
36
39
|
public readonly userClass = input<ClassValue>('', {
|
|
37
40
|
alias: 'class',
|
|
38
41
|
});
|
|
39
|
-
protected readonly _computedClass = computed(() => hlm(this.userClass()));
|
|
42
|
+
protected readonly _computedClass = computed(() => hlm('data-placeholder:text-muted-foreground', this.userClass()));
|
|
43
|
+
|
|
44
|
+
public readonly buttonId = input<string>(`hlm-combobox-trigger-${HlmComboboxTrigger._id++}`);
|
|
40
45
|
|
|
41
46
|
public readonly variant = input<ButtonVariants['variant']>('outline');
|
|
42
47
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { Directive } from '@angular/core';
|
|
2
2
|
import { BrnComboboxValue } from '@spartan-ng/brain/combobox';
|
|
3
|
+
import { classes } from '<%- importAlias %>/utils';
|
|
3
4
|
|
|
4
|
-
@Directive({
|
|
5
|
-
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmComboboxValue],hlm-combobox-value',
|
|
7
|
+
hostDirectives: [{ directive: BrnComboboxValue, inputs: ['placeholder'] }],
|
|
8
|
+
})
|
|
9
|
+
export class HlmComboboxValue {
|
|
10
|
+
constructor() {
|
|
11
|
+
classes(() => 'data-hidden:hidden');
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { HlmNavigationMenu } from './hlm-navigation-menu';
|
|
2
|
-
import { HlmNavigationMenuContent } from './hlm-navigation-menu-content';
|
|
3
|
-
import { HlmNavigationMenuItem } from './hlm-navigation-menu-item';
|
|
4
|
-
import { HlmNavigationMenuLink } from './hlm-navigation-menu-link';
|
|
5
|
-
import { HlmNavigationMenuList } from './hlm-navigation-menu-list';
|
|
6
|
-
import { HlmNavigationMenuPortal } from './hlm-navigation-menu-portal';
|
|
7
|
-
import { HlmNavigationMenuTrigger } from './hlm-navigation-menu-trigger';
|
|
1
|
+
import { HlmNavigationMenu } from './lib/hlm-navigation-menu';
|
|
2
|
+
import { HlmNavigationMenuContent } from './lib/hlm-navigation-menu-content';
|
|
3
|
+
import { HlmNavigationMenuItem } from './lib/hlm-navigation-menu-item';
|
|
4
|
+
import { HlmNavigationMenuLink } from './lib/hlm-navigation-menu-link';
|
|
5
|
+
import { HlmNavigationMenuList } from './lib/hlm-navigation-menu-list';
|
|
6
|
+
import { HlmNavigationMenuPortal } from './lib/hlm-navigation-menu-portal';
|
|
7
|
+
import { HlmNavigationMenuTrigger } from './lib/hlm-navigation-menu-trigger';
|
|
8
8
|
|
|
9
|
-
export * from './hlm-navigation-menu';
|
|
10
|
-
export * from './hlm-navigation-menu-content';
|
|
11
|
-
export * from './hlm-navigation-menu-item';
|
|
12
|
-
export * from './hlm-navigation-menu-link';
|
|
13
|
-
export * from './hlm-navigation-menu-list';
|
|
14
|
-
export * from './hlm-navigation-menu-portal';
|
|
15
|
-
export * from './hlm-navigation-menu-trigger';
|
|
9
|
+
export * from './lib/hlm-navigation-menu';
|
|
10
|
+
export * from './lib/hlm-navigation-menu-content';
|
|
11
|
+
export * from './lib/hlm-navigation-menu-item';
|
|
12
|
+
export * from './lib/hlm-navigation-menu-link';
|
|
13
|
+
export * from './lib/hlm-navigation-menu-list';
|
|
14
|
+
export * from './lib/hlm-navigation-menu-portal';
|
|
15
|
+
export * from './lib/hlm-navigation-menu-trigger';
|
|
16
16
|
|
|
17
17
|
export const HlmNavigationMenuImports = [
|
|
18
18
|
HlmNavigationMenu,
|